@jeger-ai/opengantry 3.2.6 → 3.4.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/README.md +12 -2
- package/dist/cli/commands/contract.d.ts +21 -0
- package/dist/cli/commands/contract.d.ts.map +1 -0
- package/dist/cli/commands/contract.js +113 -0
- package/dist/cli/commands/contract.js.map +1 -0
- package/dist/cli/commands/deps.d.ts +18 -0
- package/dist/cli/commands/deps.d.ts.map +1 -0
- package/dist/cli/commands/deps.js +63 -0
- package/dist/cli/commands/deps.js.map +1 -0
- package/dist/cli/commands/doctor.d.ts +3 -6
- package/dist/cli/commands/doctor.d.ts.map +1 -1
- package/dist/cli/commands/doctor.js +8 -1
- package/dist/cli/commands/doctor.js.map +1 -1
- package/dist/cli/commands/interrogate.js +3 -3
- package/dist/cli/commands/interrogate.js.map +1 -1
- package/dist/cli/commands/ledger.d.ts +24 -0
- package/dist/cli/commands/ledger.d.ts.map +1 -0
- package/dist/cli/commands/ledger.js +88 -0
- package/dist/cli/commands/ledger.js.map +1 -0
- package/dist/cli/commands/mission.d.ts +6 -0
- package/dist/cli/commands/mission.d.ts.map +1 -1
- package/dist/cli/commands/mission.js +43 -3
- package/dist/cli/commands/mission.js.map +1 -1
- package/dist/cli/commands/perimeter.d.ts.map +1 -1
- package/dist/cli/commands/perimeter.js +4 -0
- package/dist/cli/commands/perimeter.js.map +1 -1
- package/dist/cli/commands/policy.d.ts +10 -0
- package/dist/cli/commands/policy.d.ts.map +1 -0
- package/dist/cli/commands/policy.js +49 -0
- package/dist/cli/commands/policy.js.map +1 -0
- package/dist/cli/commands/tmvc-guard.d.ts.map +1 -1
- package/dist/cli/commands/tmvc-guard.js +1 -0
- package/dist/cli/commands/tmvc-guard.js.map +1 -1
- package/dist/cli/commands/triage.d.ts.map +1 -1
- package/dist/cli/commands/triage.js +2 -1
- package/dist/cli/commands/triage.js.map +1 -1
- package/dist/cli/commands/verify.d.ts.map +1 -1
- package/dist/cli/commands/verify.js +2 -11
- package/dist/cli/commands/verify.js.map +1 -1
- package/dist/cli/kernel.d.ts +10 -3
- package/dist/cli/kernel.d.ts.map +1 -1
- package/dist/cli/kernel.js +18 -2
- package/dist/cli/kernel.js.map +1 -1
- package/dist/cli/lib/adapter-preflight-checks.d.ts +55 -0
- package/dist/cli/lib/adapter-preflight-checks.d.ts.map +1 -0
- package/dist/cli/lib/adapter-preflight-checks.js +275 -0
- package/dist/cli/lib/adapter-preflight-checks.js.map +1 -0
- package/dist/cli/lib/attest-mission.d.ts.map +1 -1
- package/dist/cli/lib/attest-mission.js +7 -0
- package/dist/cli/lib/attest-mission.js.map +1 -1
- package/dist/cli/lib/break-glass.d.ts +1 -1
- package/dist/cli/lib/break-glass.d.ts.map +1 -1
- package/dist/cli/lib/break-glass.js +6 -0
- package/dist/cli/lib/break-glass.js.map +1 -1
- package/dist/cli/lib/command-boundary.d.ts +7 -3
- package/dist/cli/lib/command-boundary.d.ts.map +1 -1
- package/dist/cli/lib/command-boundary.js +20 -4
- package/dist/cli/lib/command-boundary.js.map +1 -1
- package/dist/cli/lib/constants.d.ts +13 -0
- package/dist/cli/lib/constants.d.ts.map +1 -1
- package/dist/cli/lib/constants.js +13 -0
- package/dist/cli/lib/constants.js.map +1 -1
- package/dist/cli/lib/contract/approve-prompt.d.ts +22 -0
- package/dist/cli/lib/contract/approve-prompt.d.ts.map +1 -0
- package/dist/cli/lib/contract/approve-prompt.js +71 -0
- package/dist/cli/lib/contract/approve-prompt.js.map +1 -0
- package/dist/cli/lib/contract/contract-hash.d.ts +19 -0
- package/dist/cli/lib/contract/contract-hash.d.ts.map +1 -0
- package/dist/cli/lib/contract/contract-hash.js +67 -0
- package/dist/cli/lib/contract/contract-hash.js.map +1 -0
- package/dist/cli/lib/contract/contract-scan.d.ts +27 -0
- package/dist/cli/lib/contract/contract-scan.d.ts.map +1 -0
- package/dist/cli/lib/contract/contract-scan.js +167 -0
- package/dist/cli/lib/contract/contract-scan.js.map +1 -0
- package/dist/cli/lib/contract/contract-types.d.ts +38 -0
- package/dist/cli/lib/contract/contract-types.d.ts.map +1 -0
- package/dist/cli/lib/contract/contract-types.js +11 -0
- package/dist/cli/lib/contract/contract-types.js.map +1 -0
- package/dist/cli/lib/contract/effective-scope.d.ts +21 -0
- package/dist/cli/lib/contract/effective-scope.d.ts.map +1 -0
- package/dist/cli/lib/contract/effective-scope.js +77 -0
- package/dist/cli/lib/contract/effective-scope.js.map +1 -0
- package/dist/cli/lib/contract/format.d.ts +20 -0
- package/dist/cli/lib/contract/format.d.ts.map +1 -0
- package/dist/cli/lib/contract/format.js +48 -0
- package/dist/cli/lib/contract/format.js.map +1 -0
- package/dist/cli/lib/contract/propose-gate.d.ts +21 -0
- package/dist/cli/lib/contract/propose-gate.d.ts.map +1 -0
- package/dist/cli/lib/contract/propose-gate.js +57 -0
- package/dist/cli/lib/contract/propose-gate.js.map +1 -0
- package/dist/cli/lib/contract/propose-imports.d.ts +26 -0
- package/dist/cli/lib/contract/propose-imports.d.ts.map +1 -0
- package/dist/cli/lib/contract/propose-imports.js +128 -0
- package/dist/cli/lib/contract/propose-imports.js.map +1 -0
- package/dist/cli/lib/contract/propose.d.ts +25 -0
- package/dist/cli/lib/contract/propose.d.ts.map +1 -0
- package/dist/cli/lib/contract/propose.js +100 -0
- package/dist/cli/lib/contract/propose.js.map +1 -0
- package/dist/cli/lib/contract/resolve-specifier.d.ts +34 -0
- package/dist/cli/lib/contract/resolve-specifier.d.ts.map +1 -0
- package/dist/cli/lib/contract/resolve-specifier.js +93 -0
- package/dist/cli/lib/contract/resolve-specifier.js.map +1 -0
- package/dist/cli/lib/defensive-profile-presets.d.ts +6 -0
- package/dist/cli/lib/defensive-profile-presets.d.ts.map +1 -1
- package/dist/cli/lib/defensive-profile-presets.js +15 -1
- package/dist/cli/lib/defensive-profile-presets.js.map +1 -1
- package/dist/cli/lib/deps/deps-fetch.d.ts +4 -0
- package/dist/cli/lib/deps/deps-fetch.d.ts.map +1 -0
- package/dist/cli/lib/deps/deps-fetch.js +16 -0
- package/dist/cli/lib/deps/deps-fetch.js.map +1 -0
- package/dist/cli/lib/deps/deps-resolve.d.ts +18 -0
- package/dist/cli/lib/deps/deps-resolve.d.ts.map +1 -0
- package/dist/cli/lib/deps/deps-resolve.js +66 -0
- package/dist/cli/lib/deps/deps-resolve.js.map +1 -0
- package/dist/cli/lib/deps/deps-slug.d.ts +5 -0
- package/dist/cli/lib/deps/deps-slug.d.ts.map +1 -0
- package/dist/cli/lib/deps/deps-slug.js +44 -0
- package/dist/cli/lib/deps/deps-slug.js.map +1 -0
- package/dist/cli/lib/doctor-adapter-preflight.d.ts +24 -0
- package/dist/cli/lib/doctor-adapter-preflight.d.ts.map +1 -0
- package/dist/cli/lib/doctor-adapter-preflight.js +98 -0
- package/dist/cli/lib/doctor-adapter-preflight.js.map +1 -0
- package/dist/cli/lib/doctor-core.d.ts +7 -1
- package/dist/cli/lib/doctor-core.d.ts.map +1 -1
- package/dist/cli/lib/doctor-core.js +36 -5
- package/dist/cli/lib/doctor-core.js.map +1 -1
- package/dist/cli/lib/doctor-integration.d.ts +2 -0
- package/dist/cli/lib/doctor-integration.d.ts.map +1 -1
- package/dist/cli/lib/doctor-integration.js +4 -2
- package/dist/cli/lib/doctor-integration.js.map +1 -1
- package/dist/cli/lib/doctor-preflight/eslint.d.ts +4 -0
- package/dist/cli/lib/doctor-preflight/eslint.d.ts.map +1 -0
- package/dist/cli/lib/doctor-preflight/eslint.js +41 -0
- package/dist/cli/lib/doctor-preflight/eslint.js.map +1 -0
- package/dist/cli/lib/doctor-preflight/index.d.ts +3 -0
- package/dist/cli/lib/doctor-preflight/index.d.ts.map +1 -0
- package/dist/cli/lib/doctor-preflight/index.js +3 -0
- package/dist/cli/lib/doctor-preflight/index.js.map +1 -0
- package/dist/cli/lib/doctor-preflight/tsc.d.ts +4 -0
- package/dist/cli/lib/doctor-preflight/tsc.d.ts.map +1 -0
- package/dist/cli/lib/doctor-preflight/tsc.js +42 -0
- package/dist/cli/lib/doctor-preflight/tsc.js.map +1 -0
- package/dist/cli/lib/doctor-substrate.d.ts +2 -2
- package/dist/cli/lib/doctor-substrate.d.ts.map +1 -1
- package/dist/cli/lib/doctor-types.d.ts +4 -4
- package/dist/cli/lib/doctor-types.d.ts.map +1 -1
- package/dist/cli/lib/draft-token.d.ts +7 -1
- package/dist/cli/lib/draft-token.d.ts.map +1 -1
- package/dist/cli/lib/draft-token.js +25 -3
- package/dist/cli/lib/draft-token.js.map +1 -1
- package/dist/cli/lib/errors.d.ts +2 -0
- package/dist/cli/lib/errors.d.ts.map +1 -1
- package/dist/cli/lib/errors.js +15 -2
- package/dist/cli/lib/errors.js.map +1 -1
- package/dist/cli/lib/gate-adapters/adapter-findings.d.ts +41 -0
- package/dist/cli/lib/gate-adapters/adapter-findings.d.ts.map +1 -0
- package/dist/cli/lib/gate-adapters/adapter-findings.js +99 -0
- package/dist/cli/lib/gate-adapters/adapter-findings.js.map +1 -0
- package/dist/cli/lib/gate-adapters/eslint-json-adapter.d.ts +14 -0
- package/dist/cli/lib/gate-adapters/eslint-json-adapter.d.ts.map +1 -0
- package/dist/cli/lib/gate-adapters/eslint-json-adapter.js +63 -0
- package/dist/cli/lib/gate-adapters/eslint-json-adapter.js.map +1 -0
- package/dist/cli/lib/gate-adapters/gate-adapter-id.d.ts +10 -0
- package/dist/cli/lib/gate-adapters/gate-adapter-id.d.ts.map +1 -0
- package/dist/cli/lib/gate-adapters/gate-adapter-id.js +12 -0
- package/dist/cli/lib/gate-adapters/gate-adapter-id.js.map +1 -0
- package/dist/cli/lib/gate-adapters/gate-adapter-types.d.ts +17 -0
- package/dist/cli/lib/gate-adapters/gate-adapter-types.d.ts.map +1 -0
- package/dist/cli/lib/gate-adapters/gate-adapter-types.js +2 -0
- package/dist/cli/lib/gate-adapters/gate-adapter-types.js.map +1 -0
- package/dist/cli/lib/gate-adapters/generic-spawn-adapter.d.ts +4 -0
- package/dist/cli/lib/gate-adapters/generic-spawn-adapter.d.ts.map +1 -0
- package/dist/cli/lib/gate-adapters/generic-spawn-adapter.js +12 -0
- package/dist/cli/lib/gate-adapters/generic-spawn-adapter.js.map +1 -0
- package/dist/cli/lib/gate-adapters/parsing-adapter.d.ts +5 -0
- package/dist/cli/lib/gate-adapters/parsing-adapter.d.ts.map +1 -0
- package/dist/cli/lib/gate-adapters/parsing-adapter.js +13 -0
- package/dist/cli/lib/gate-adapters/parsing-adapter.js.map +1 -0
- package/dist/cli/lib/gate-adapters/registry.d.ts +6 -0
- package/dist/cli/lib/gate-adapters/registry.d.ts.map +1 -0
- package/dist/cli/lib/gate-adapters/registry.js +13 -0
- package/dist/cli/lib/gate-adapters/registry.js.map +1 -0
- package/dist/cli/lib/gate-adapters/spawn-stream-core.d.ts +36 -0
- package/dist/cli/lib/gate-adapters/spawn-stream-core.d.ts.map +1 -0
- package/dist/cli/lib/gate-adapters/spawn-stream-core.js +99 -0
- package/dist/cli/lib/gate-adapters/spawn-stream-core.js.map +1 -0
- package/dist/cli/lib/gate-adapters/tsc-adapter.d.ts +16 -0
- package/dist/cli/lib/gate-adapters/tsc-adapter.d.ts.map +1 -0
- package/dist/cli/lib/gate-adapters/tsc-adapter.js +51 -0
- package/dist/cli/lib/gate-adapters/tsc-adapter.js.map +1 -0
- package/dist/cli/lib/gate-log-writer.d.ts +8 -0
- package/dist/cli/lib/gate-log-writer.d.ts.map +1 -1
- package/dist/cli/lib/gate-log-writer.js +35 -0
- package/dist/cli/lib/gate-log-writer.js.map +1 -1
- package/dist/cli/lib/gate.d.ts +2 -0
- package/dist/cli/lib/gate.d.ts.map +1 -1
- package/dist/cli/lib/gate.js +2 -2
- package/dist/cli/lib/gate.js.map +1 -1
- package/dist/cli/lib/git.d.ts +14 -2
- package/dist/cli/lib/git.d.ts.map +1 -1
- package/dist/cli/lib/git.js +22 -7
- package/dist/cli/lib/git.js.map +1 -1
- package/dist/cli/lib/gxt-config.d.ts +9 -0
- package/dist/cli/lib/gxt-config.d.ts.map +1 -1
- package/dist/cli/lib/gxt-config.js +16 -0
- package/dist/cli/lib/gxt-config.js.map +1 -1
- package/dist/cli/lib/gxt-error-codes.d.ts +17 -0
- package/dist/cli/lib/gxt-error-codes.d.ts.map +1 -1
- package/dist/cli/lib/gxt-error-codes.js +18 -0
- package/dist/cli/lib/gxt-error-codes.js.map +1 -1
- package/dist/cli/lib/import-scanner.d.ts +13 -3
- package/dist/cli/lib/import-scanner.d.ts.map +1 -1
- package/dist/cli/lib/import-scanner.js +185 -23
- package/dist/cli/lib/import-scanner.js.map +1 -1
- package/dist/cli/lib/init-tutorial.js +3 -4
- package/dist/cli/lib/init-tutorial.js.map +1 -1
- package/dist/cli/lib/interrogate/gaps.d.ts +2 -0
- package/dist/cli/lib/interrogate/gaps.d.ts.map +1 -1
- package/dist/cli/lib/interrogate/gaps.js +3 -4
- package/dist/cli/lib/interrogate/gaps.js.map +1 -1
- package/dist/cli/lib/interrogate/run.d.ts +1 -0
- package/dist/cli/lib/interrogate/run.d.ts.map +1 -1
- package/dist/cli/lib/interrogate/run.js +1 -0
- package/dist/cli/lib/interrogate/run.js.map +1 -1
- package/dist/cli/lib/kpi-scan.js +5 -1
- package/dist/cli/lib/kpi-scan.js.map +1 -1
- package/dist/cli/lib/ledger/ledger-append.d.ts +14 -0
- package/dist/cli/lib/ledger/ledger-append.d.ts.map +1 -0
- package/dist/cli/lib/ledger/ledger-append.js +63 -0
- package/dist/cli/lib/ledger/ledger-append.js.map +1 -0
- package/dist/cli/lib/ledger/ledger-chain.d.ts +24 -0
- package/dist/cli/lib/ledger/ledger-chain.d.ts.map +1 -0
- package/dist/cli/lib/ledger/ledger-chain.js +101 -0
- package/dist/cli/lib/ledger/ledger-chain.js.map +1 -0
- package/dist/cli/lib/ledger/ledger-entry.d.ts +79 -0
- package/dist/cli/lib/ledger/ledger-entry.d.ts.map +1 -0
- package/dist/cli/lib/ledger/ledger-entry.js +36 -0
- package/dist/cli/lib/ledger/ledger-entry.js.map +1 -0
- package/dist/cli/lib/ledger/ledger-export.d.ts +28 -0
- package/dist/cli/lib/ledger/ledger-export.d.ts.map +1 -0
- package/dist/cli/lib/ledger/ledger-export.js +36 -0
- package/dist/cli/lib/ledger/ledger-export.js.map +1 -0
- package/dist/cli/lib/legislate-from-intent.d.ts +9 -0
- package/dist/cli/lib/legislate-from-intent.d.ts.map +1 -0
- package/dist/cli/lib/legislate-from-intent.js +59 -0
- package/dist/cli/lib/legislate-from-intent.js.map +1 -0
- package/dist/cli/lib/legislate-gate-options.d.ts +3 -4
- package/dist/cli/lib/legislate-gate-options.d.ts.map +1 -1
- package/dist/cli/lib/legislate-gate-options.js +9 -4
- package/dist/cli/lib/legislate-gate-options.js.map +1 -1
- package/dist/cli/lib/legislate-policy-warn.d.ts +3 -0
- package/dist/cli/lib/legislate-policy-warn.d.ts.map +1 -0
- package/dist/cli/lib/legislate-policy-warn.js +17 -0
- package/dist/cli/lib/legislate-policy-warn.js.map +1 -0
- package/dist/cli/lib/legislate.d.ts +5 -1
- package/dist/cli/lib/legislate.d.ts.map +1 -1
- package/dist/cli/lib/legislate.js +38 -12
- package/dist/cli/lib/legislate.js.map +1 -1
- package/dist/cli/lib/mcp-doctor.d.ts +18 -0
- package/dist/cli/lib/mcp-doctor.d.ts.map +1 -0
- package/dist/cli/lib/mcp-doctor.js +35 -0
- package/dist/cli/lib/mcp-doctor.js.map +1 -0
- package/dist/cli/lib/mcp-draft-legislation.d.ts.map +1 -1
- package/dist/cli/lib/mcp-draft-legislation.js +39 -16
- package/dist/cli/lib/mcp-draft-legislation.js.map +1 -1
- package/dist/cli/lib/mcp-execute-legislation.d.ts.map +1 -1
- package/dist/cli/lib/mcp-execute-legislation.js +2 -0
- package/dist/cli/lib/mcp-execute-legislation.js.map +1 -1
- package/dist/cli/lib/mcp-governance-shared.d.ts +4 -1
- package/dist/cli/lib/mcp-governance-shared.d.ts.map +1 -1
- package/dist/cli/lib/mcp-governance-shared.js.map +1 -1
- package/dist/cli/lib/mcp-interrogate.js +3 -3
- package/dist/cli/lib/mcp-interrogate.js.map +1 -1
- package/dist/cli/lib/mcp-org.d.ts +19 -0
- package/dist/cli/lib/mcp-org.d.ts.map +1 -0
- package/dist/cli/lib/mcp-org.js +51 -0
- package/dist/cli/lib/mcp-org.js.map +1 -0
- package/dist/cli/lib/mcp-propose-contract.d.ts +22 -0
- package/dist/cli/lib/mcp-propose-contract.d.ts.map +1 -0
- package/dist/cli/lib/mcp-propose-contract.js +51 -0
- package/dist/cli/lib/mcp-propose-contract.js.map +1 -0
- package/dist/cli/lib/mcp-runtime.d.ts +1 -1
- package/dist/cli/lib/mcp-runtime.d.ts.map +1 -1
- package/dist/cli/lib/mcp-runtime.js +1 -1
- package/dist/cli/lib/mcp-runtime.js.map +1 -1
- package/dist/cli/lib/mcp-start-orchestration.d.ts.map +1 -1
- package/dist/cli/lib/mcp-start-orchestration.js +1 -0
- package/dist/cli/lib/mcp-start-orchestration.js.map +1 -1
- package/dist/cli/lib/mcp-tools-register.d.ts.map +1 -1
- package/dist/cli/lib/mcp-tools-register.js +110 -17
- package/dist/cli/lib/mcp-tools-register.js.map +1 -1
- package/dist/cli/lib/mission-changed.d.ts +27 -0
- package/dist/cli/lib/mission-changed.d.ts.map +1 -0
- package/dist/cli/lib/mission-changed.js +107 -0
- package/dist/cli/lib/mission-changed.js.map +1 -0
- package/dist/cli/lib/missions/formatter.d.ts +1 -1
- package/dist/cli/lib/missions/formatter.d.ts.map +1 -1
- package/dist/cli/lib/missions/formatter.js +5 -0
- package/dist/cli/lib/missions/formatter.js.map +1 -1
- package/dist/cli/lib/missions/parser.d.ts +3 -1
- package/dist/cli/lib/missions/parser.d.ts.map +1 -1
- package/dist/cli/lib/missions/parser.js +30 -0
- package/dist/cli/lib/missions/parser.js.map +1 -1
- package/dist/cli/lib/msn-allocate.d.ts.map +1 -1
- package/dist/cli/lib/msn-allocate.js +17 -24
- package/dist/cli/lib/msn-allocate.js.map +1 -1
- package/dist/cli/lib/planner-signature.d.ts +7 -0
- package/dist/cli/lib/planner-signature.d.ts.map +1 -1
- package/dist/cli/lib/planner-signature.js +18 -1
- package/dist/cli/lib/planner-signature.js.map +1 -1
- package/dist/cli/lib/policy/policy-bundle.d.ts +6 -0
- package/dist/cli/lib/policy/policy-bundle.d.ts.map +1 -0
- package/dist/cli/lib/policy/policy-bundle.js +62 -0
- package/dist/cli/lib/policy/policy-bundle.js.map +1 -0
- package/dist/cli/lib/policy/policy-doctor.d.ts +4 -0
- package/dist/cli/lib/policy/policy-doctor.d.ts.map +1 -0
- package/dist/cli/lib/policy/policy-doctor.js +34 -0
- package/dist/cli/lib/policy/policy-doctor.js.map +1 -0
- package/dist/cli/lib/policy/policy-fetch.d.ts +10 -0
- package/dist/cli/lib/policy/policy-fetch.d.ts.map +1 -0
- package/dist/cli/lib/policy/policy-fetch.js +78 -0
- package/dist/cli/lib/policy/policy-fetch.js.map +1 -0
- package/dist/cli/lib/policy/policy-resolve.d.ts +38 -0
- package/dist/cli/lib/policy/policy-resolve.d.ts.map +1 -0
- package/dist/cli/lib/policy/policy-resolve.js +194 -0
- package/dist/cli/lib/policy/policy-resolve.js.map +1 -0
- package/dist/cli/lib/policy/policy-types.d.ts +76 -0
- package/dist/cli/lib/policy/policy-types.d.ts.map +1 -0
- package/dist/cli/lib/policy/policy-types.js +3 -0
- package/dist/cli/lib/policy/policy-types.js.map +1 -0
- package/dist/cli/lib/policy-digest-doctor.d.ts +1 -0
- package/dist/cli/lib/policy-digest-doctor.d.ts.map +1 -1
- package/dist/cli/lib/policy-digest-doctor.js +4 -2
- package/dist/cli/lib/policy-digest-doctor.js.map +1 -1
- package/dist/cli/lib/runtime-env.d.ts +3 -0
- package/dist/cli/lib/runtime-env.d.ts.map +1 -1
- package/dist/cli/lib/runtime-env.js +12 -2
- package/dist/cli/lib/runtime-env.js.map +1 -1
- package/dist/cli/lib/runtime-exec.d.ts +5 -1
- package/dist/cli/lib/runtime-exec.d.ts.map +1 -1
- package/dist/cli/lib/runtime-exec.js +18 -1
- package/dist/cli/lib/runtime-exec.js.map +1 -1
- package/dist/cli/lib/staged-tmvc-guard.d.ts +3 -0
- package/dist/cli/lib/staged-tmvc-guard.d.ts.map +1 -1
- package/dist/cli/lib/staged-tmvc-guard.js +4 -2
- package/dist/cli/lib/staged-tmvc-guard.js.map +1 -1
- package/dist/cli/lib/start-orchestration.d.ts +2 -1
- package/dist/cli/lib/start-orchestration.d.ts.map +1 -1
- package/dist/cli/lib/start-orchestration.js +5 -3
- package/dist/cli/lib/start-orchestration.js.map +1 -1
- package/dist/cli/lib/surgeons/banned-import.js +1 -1
- package/dist/cli/lib/surgeons/banned-import.js.map +1 -1
- package/dist/cli/lib/surgeons/import-layer.d.ts.map +1 -1
- package/dist/cli/lib/surgeons/import-layer.js +1 -1
- package/dist/cli/lib/surgeons/import-layer.js.map +1 -1
- package/dist/cli/lib/surgeons/registry.d.ts.map +1 -1
- package/dist/cli/lib/surgeons/registry.js +2 -4
- package/dist/cli/lib/surgeons/registry.js.map +1 -1
- package/dist/cli/lib/types.d.ts +30 -0
- package/dist/cli/lib/types.d.ts.map +1 -1
- package/dist/cli/lib/types.js +5 -1
- package/dist/cli/lib/types.js.map +1 -1
- package/dist/cli/lib/verify-contract.d.ts +22 -0
- package/dist/cli/lib/verify-contract.d.ts.map +1 -0
- package/dist/cli/lib/verify-contract.js +110 -0
- package/dist/cli/lib/verify-contract.js.map +1 -0
- package/dist/cli/lib/verify-engine.d.ts +1 -1
- package/dist/cli/lib/verify-engine.d.ts.map +1 -1
- package/dist/cli/lib/verify-engine.js +38 -17
- package/dist/cli/lib/verify-engine.js.map +1 -1
- package/dist/cli/lib/verify-evidence-snippet.d.ts +7 -0
- package/dist/cli/lib/verify-evidence-snippet.d.ts.map +1 -0
- package/dist/cli/lib/verify-evidence-snippet.js +29 -0
- package/dist/cli/lib/verify-evidence-snippet.js.map +1 -0
- package/dist/cli/lib/verify-failure-normalize.d.ts.map +1 -1
- package/dist/cli/lib/verify-failure-normalize.js +30 -4
- package/dist/cli/lib/verify-failure-normalize.js.map +1 -1
- package/dist/cli/lib/verify-failure.d.ts +27 -5
- package/dist/cli/lib/verify-failure.d.ts.map +1 -1
- package/dist/cli/lib/verify-finding-gate-projector.d.ts +1 -1
- package/dist/cli/lib/verify-finding-gate-projector.d.ts.map +1 -1
- package/dist/cli/lib/verify-finding-gate-projector.js +6 -28
- package/dist/cli/lib/verify-finding-gate-projector.js.map +1 -1
- package/dist/cli/lib/verify-finding.d.ts +1 -1
- package/dist/cli/lib/verify-finding.d.ts.map +1 -1
- package/dist/cli/lib/verify-finding.js.map +1 -1
- package/dist/cli/lib/verify-hints.d.ts.map +1 -1
- package/dist/cli/lib/verify-hints.js +27 -3
- package/dist/cli/lib/verify-hints.js.map +1 -1
- package/dist/cli/lib/verify-interrogation.d.ts +2 -0
- package/dist/cli/lib/verify-interrogation.d.ts.map +1 -1
- package/dist/cli/lib/verify-interrogation.js +2 -2
- package/dist/cli/lib/verify-interrogation.js.map +1 -1
- package/dist/cli/lib/verify-options.d.ts +5 -14
- package/dist/cli/lib/verify-options.d.ts.map +1 -1
- package/dist/cli/lib/verify-org-phases.d.ts +18 -0
- package/dist/cli/lib/verify-org-phases.d.ts.map +1 -0
- package/dist/cli/lib/verify-org-phases.js +61 -0
- package/dist/cli/lib/verify-org-phases.js.map +1 -0
- package/dist/cli/lib/verify-payload.d.ts +1 -1
- package/dist/cli/lib/verify-payload.d.ts.map +1 -1
- package/dist/cli/lib/verify-payload.js +49 -27
- package/dist/cli/lib/verify-payload.js.map +1 -1
- package/dist/cli/lib/verify-phase-clock.d.ts +3 -2
- package/dist/cli/lib/verify-phase-clock.d.ts.map +1 -1
- package/dist/cli/lib/verify-phase-clock.js +17 -5
- package/dist/cli/lib/verify-phase-clock.js.map +1 -1
- package/dist/cli/lib/verify-phase-steps.d.ts +14 -7
- package/dist/cli/lib/verify-phase-steps.d.ts.map +1 -1
- package/dist/cli/lib/verify-phase-steps.js +33 -24
- package/dist/cli/lib/verify-phase-steps.js.map +1 -1
- package/dist/cli/lib/verify-presenters.d.ts +1 -0
- package/dist/cli/lib/verify-presenters.d.ts.map +1 -1
- package/dist/cli/lib/verify-presenters.js +15 -4
- package/dist/cli/lib/verify-presenters.js.map +1 -1
- package/dist/cli/lib/verify-remediation-pipeline.d.ts +2 -0
- package/dist/cli/lib/verify-remediation-pipeline.d.ts.map +1 -1
- package/dist/cli/lib/verify-remediation-pipeline.js +5 -2
- package/dist/cli/lib/verify-remediation-pipeline.js.map +1 -1
- package/dist/cli/lib/verify-run.d.ts +2 -2
- package/dist/cli/lib/verify-run.d.ts.map +1 -1
- package/dist/cli/lib/verify-run.js +27 -13
- package/dist/cli/lib/verify-run.js.map +1 -1
- package/dist/cli/lib/version.gen.d.ts +1 -1
- package/dist/cli/lib/version.gen.js +1 -1
- package/dist/cli/program-core.d.ts +1 -1
- package/dist/cli/program-core.d.ts.map +1 -1
- package/dist/cli/program-core.js +62 -5
- package/dist/cli/program-core.js.map +1 -1
- package/dist/cli/program-mission.d.ts.map +1 -1
- package/dist/cli/program-mission.js +97 -35
- package/dist/cli/program-mission.js.map +1 -1
- package/dist/cli/program-org.d.ts +3 -0
- package/dist/cli/program-org.d.ts.map +1 -0
- package/dist/cli/program-org.js +119 -0
- package/dist/cli/program-org.js.map +1 -0
- package/dist/cli/program-workflow.d.ts +6 -2
- package/dist/cli/program-workflow.d.ts.map +1 -1
- package/dist/cli/program-workflow.js +63 -6
- package/dist/cli/program-workflow.js.map +1 -1
- package/dist/cli/program.d.ts.map +1 -1
- package/dist/cli/program.js +11 -0
- package/dist/cli/program.js.map +1 -1
- package/package.json +2 -1
- package/templates/.gitagent/config.json +4 -0
- package/templates/.gitagent/foreman/MANIFEST.json +1 -0
- package/templates/.gitagent/foreman/PLANNER.signing.pub +3 -0
- package/templates/.gitagent/foreman/POLICY.pointer.json +11 -0
- package/templates/.gitagent/foreman/SUBSTRATE.version.json +1 -1
- package/templates/.gitagent/planner/MISSION-ARCHITECT.md +26 -5
- package/templates/.gitagent/planner/MISSION.schema.yaml +103 -0
- package/templates/.gitagent/planner/ORG-POLICY.schema.yaml +174 -0
- package/templates/.gitagent/planner/RULES.md +75 -22
- package/templates/.githooks/pre-commit +12 -0
- package/templates/.github/workflows/gxt-attest-ingest.yml +56 -6
- package/templates/.github/workflows/gxt-validate.yml +33 -0
- package/templates/.gitignore.gxt +1 -0
- package/templates/integrations/asset-catalog.json +2 -0
- package/templates/integrations/compatibility.json +1 -1
- package/templates/scripts/validate-mcp-dogfood.mjs +5 -0
- package/templates/scripts/verify-pr-missions.sh +20 -41
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type LedgerEntry } from "./ledger-entry.js";
|
|
2
|
+
export declare const LEDGER_CAS_MAX_ATTEMPTS = 8;
|
|
3
|
+
export declare function readLedgerTip(root: string, ref?: string): string | null;
|
|
4
|
+
export declare function readLedgerEntryAt(root: string, commit: string): LedgerEntry;
|
|
5
|
+
export declare function commitLedgerEntry(root: string, entry: LedgerEntry, parent: string | null, sign: boolean): string;
|
|
6
|
+
export declare function casUpdateLedgerRef(root: string, newCommit: string, expectedOld: string | null): boolean;
|
|
7
|
+
/** Sync CAS backoff (Atomics.wait parks the thread; not a busy-spin). */
|
|
8
|
+
export declare function sleepJitter(attempt: number): void;
|
|
9
|
+
export interface LedgerChainReport {
|
|
10
|
+
ok: boolean;
|
|
11
|
+
ref: string;
|
|
12
|
+
tip: string | null;
|
|
13
|
+
count: number;
|
|
14
|
+
errors: string[];
|
|
15
|
+
entries: LedgerEntry[];
|
|
16
|
+
}
|
|
17
|
+
export declare function verifyLedgerChain(root: string, ref?: string, opts?: {
|
|
18
|
+
requireSignatures?: boolean;
|
|
19
|
+
}): LedgerChainReport;
|
|
20
|
+
export declare function runLedgerDoctorChecks(root: string): {
|
|
21
|
+
level: "ok" | "warn" | "fail";
|
|
22
|
+
message: string;
|
|
23
|
+
}[];
|
|
24
|
+
//# sourceMappingURL=ledger-chain.d.ts.map
|
|
@@ -0,0 +1 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AM,GAAG,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,EAAE,CASxG"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
import { LEDGER_REF } from "../constants.js";
|
|
3
|
+
import { gitRevParse, gitRun } from "../git.js";
|
|
4
|
+
import { GantryUserError } from "../errors.js";
|
|
5
|
+
import { GXT_ERROR } from "../gxt-error-codes.js";
|
|
6
|
+
import { entryHash, genesisPrevHash } from "./ledger-entry.js";
|
|
7
|
+
export const LEDGER_CAS_MAX_ATTEMPTS = 8;
|
|
8
|
+
function requireRoot(root) {
|
|
9
|
+
if (!root || !path.isAbsolute(root)) {
|
|
10
|
+
throw new GantryUserError(GXT_ERROR.INVALID_ARGUMENT, "ledger helpers require an absolute repo root (never implicit cwd)", undefined, 2);
|
|
11
|
+
}
|
|
12
|
+
return root;
|
|
13
|
+
}
|
|
14
|
+
function requireGitOk(result, verb, hint) {
|
|
15
|
+
const out = result.stdout.trim();
|
|
16
|
+
if (!result.ok || !out) {
|
|
17
|
+
throw new GantryUserError(GXT_ERROR.LEDGER_CHAIN_BROKEN, `git ${verb} failed: ${result.stderr.trim() || "no output"}`, hint, 1);
|
|
18
|
+
}
|
|
19
|
+
return out;
|
|
20
|
+
}
|
|
21
|
+
export function readLedgerTip(root, ref = LEDGER_REF) {
|
|
22
|
+
return gitRevParse(requireRoot(root), ref);
|
|
23
|
+
}
|
|
24
|
+
export function readLedgerEntryAt(root, commit) {
|
|
25
|
+
const show = gitRun(requireRoot(root), ["show", `${commit}:entry.json`]);
|
|
26
|
+
if (!show.ok) {
|
|
27
|
+
throw new GantryUserError(GXT_ERROR.LEDGER_CHAIN_BROKEN, `ledger commit ${commit} has no entry.json`, undefined, 1);
|
|
28
|
+
}
|
|
29
|
+
try {
|
|
30
|
+
return JSON.parse(show.stdout);
|
|
31
|
+
}
|
|
32
|
+
catch {
|
|
33
|
+
throw new GantryUserError(GXT_ERROR.LEDGER_CHAIN_BROKEN, `ledger commit ${commit} has invalid entry.json`, undefined, 1);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
export function commitLedgerEntry(root, entry, parent, sign) {
|
|
37
|
+
const absRoot = requireRoot(root);
|
|
38
|
+
const body = `${JSON.stringify(entry, null, 2)}\n`;
|
|
39
|
+
const blob = requireGitOk(gitRun(absRoot, ["hash-object", "-w", "--stdin"], { input: body }), "hash-object");
|
|
40
|
+
const tree = requireGitOk(gitRun(absRoot, ["mktree"], { input: `100644 blob ${blob}\tentry.json\n` }), "mktree");
|
|
41
|
+
const subject = `[GXT-LEDGER] ${entry.entry_kind} ${entry.msn_id}`;
|
|
42
|
+
const commitArgs = ["commit-tree", tree, "-m", subject];
|
|
43
|
+
if (parent)
|
|
44
|
+
commitArgs.push("-p", parent);
|
|
45
|
+
if (sign)
|
|
46
|
+
commitArgs.splice(1, 0, "-S");
|
|
47
|
+
return requireGitOk(gitRun(absRoot, commitArgs), "commit-tree", sign ? "configure user.signingkey or set ledger.signature off" : undefined);
|
|
48
|
+
}
|
|
49
|
+
export function casUpdateLedgerRef(root, newCommit, expectedOld) {
|
|
50
|
+
const absRoot = requireRoot(root);
|
|
51
|
+
const old = expectedOld ?? "0000000000000000000000000000000000000000";
|
|
52
|
+
const r = gitRun(absRoot, ["update-ref", LEDGER_REF, newCommit, old]);
|
|
53
|
+
return r.ok;
|
|
54
|
+
}
|
|
55
|
+
/** Sync CAS backoff (Atomics.wait parks the thread; not a busy-spin). */
|
|
56
|
+
export function sleepJitter(attempt) {
|
|
57
|
+
const ms = Math.min(50 * 2 ** attempt, 400) + Math.floor(Math.random() * 25);
|
|
58
|
+
Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, ms);
|
|
59
|
+
}
|
|
60
|
+
export function verifyLedgerChain(root, ref = LEDGER_REF, opts) {
|
|
61
|
+
const tip = readLedgerTip(root, ref);
|
|
62
|
+
if (!tip) {
|
|
63
|
+
return { ok: true, ref, tip: null, count: 0, errors: [], entries: [] };
|
|
64
|
+
}
|
|
65
|
+
const log = gitRun(root, ["rev-list", "--reverse", tip]);
|
|
66
|
+
const commits = log.ok ? log.stdout.split("\n").map((s) => s.trim()).filter(Boolean) : [];
|
|
67
|
+
const errors = [];
|
|
68
|
+
const entries = [];
|
|
69
|
+
let expectedPrev = genesisPrevHash();
|
|
70
|
+
for (const commit of commits) {
|
|
71
|
+
try {
|
|
72
|
+
const entry = readLedgerEntryAt(root, commit);
|
|
73
|
+
entries.push(entry);
|
|
74
|
+
if (entry.prev_entry_hash !== expectedPrev) {
|
|
75
|
+
errors.push(`${GXT_ERROR.LEDGER_CHAIN_BROKEN}: ${commit} prev_entry_hash mismatch`);
|
|
76
|
+
}
|
|
77
|
+
if (opts?.requireSignatures === true) {
|
|
78
|
+
const verified = gitRun(root, ["verify-commit", commit]);
|
|
79
|
+
if (!verified.ok) {
|
|
80
|
+
errors.push(`${GXT_ERROR.LEDGER_UNSIGNED}: ${commit} failed git verify-commit`);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
expectedPrev = entryHash(entry);
|
|
84
|
+
}
|
|
85
|
+
catch (e) {
|
|
86
|
+
errors.push(e instanceof Error ? e.message : String(e));
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
return { ok: errors.length === 0, ref, tip, count: entries.length, errors, entries };
|
|
90
|
+
}
|
|
91
|
+
export function runLedgerDoctorChecks(root) {
|
|
92
|
+
const report = verifyLedgerChain(root);
|
|
93
|
+
if (!report.tip) {
|
|
94
|
+
return [{ level: "ok", message: `${LEDGER_REF}: absent` }];
|
|
95
|
+
}
|
|
96
|
+
if (!report.ok) {
|
|
97
|
+
return report.errors.map((message) => ({ level: "fail", message }));
|
|
98
|
+
}
|
|
99
|
+
return [{ level: "ok", message: `${LEDGER_REF}: ${report.count} entries, chain consistent` }];
|
|
100
|
+
}
|
|
101
|
+
//# sourceMappingURL=ledger-chain.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version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TRY_SCHEMA_VERSION: "1.0.0";
|
|
3
|
+
export declare const LEDGER_ENTRY_KINDS: readonly ["receipt", "verify_findings", "break_glass", "policy_pin", "dependency_check"];
|
|
4
|
+
export type LedgerEntryKind = (typeof LEDGER_ENTRY_KINDS)[number];
|
|
5
|
+
/** Digest-only receipt fields already allowed on the export path (ADR-0043). */
|
|
6
|
+
export interface ReceiptLedgerPayload {
|
|
7
|
+
verify_status?: string;
|
|
8
|
+
signed?: boolean;
|
|
9
|
+
receipt_sha256?: string;
|
|
10
|
+
source?: string;
|
|
11
|
+
envelope_sha?: string;
|
|
12
|
+
has_payload?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export interface VerifyFindingsLedgerPayload {
|
|
15
|
+
failed_gate: string;
|
|
16
|
+
findings_digest?: string;
|
|
17
|
+
fingerprints?: string[];
|
|
18
|
+
message?: string;
|
|
19
|
+
}
|
|
20
|
+
export interface BreakGlassLedgerPayload {
|
|
21
|
+
reason_sha256: string;
|
|
22
|
+
error_code: string;
|
|
23
|
+
}
|
|
24
|
+
export interface PolicyPinLedgerPayload {
|
|
25
|
+
policy_id: string;
|
|
26
|
+
bundle_sha256: string;
|
|
27
|
+
pinned_commit: string;
|
|
28
|
+
}
|
|
29
|
+
export interface DependencyCheckLedgerPayload {
|
|
30
|
+
repo: string;
|
|
31
|
+
msn_id: string;
|
|
32
|
+
require?: MissionDependencySpec["require"];
|
|
33
|
+
result: string;
|
|
34
|
+
}
|
|
35
|
+
export type LedgerPayload = ReceiptLedgerPayload | VerifyFindingsLedgerPayload | BreakGlassLedgerPayload | PolicyPinLedgerPayload | DependencyCheckLedgerPayload;
|
|
36
|
+
export type LedgerPayloadFor<K extends LedgerEntryKind> = K extends "receipt" ? ReceiptLedgerPayload : K extends "verify_findings" ? VerifyFindingsLedgerPayload : K extends "break_glass" ? BreakGlassLedgerPayload : K extends "policy_pin" ? PolicyPinLedgerPayload : K extends "dependency_check" ? DependencyCheckLedgerPayload : never;
|
|
37
|
+
interface LedgerEntryBase {
|
|
38
|
+
schema_version: typeof LEDGER_ENTRY_SCHEMA_VERSION;
|
|
39
|
+
org_id: string;
|
|
40
|
+
repository_hash: string;
|
|
41
|
+
msn_id: string;
|
|
42
|
+
git_head: string;
|
|
43
|
+
payload_sha256: string;
|
|
44
|
+
prev_entry_hash: string;
|
|
45
|
+
issued_at: string;
|
|
46
|
+
}
|
|
47
|
+
export type LedgerEntry = (LedgerEntryBase & {
|
|
48
|
+
entry_kind: "receipt";
|
|
49
|
+
payload: ReceiptLedgerPayload;
|
|
50
|
+
}) | (LedgerEntryBase & {
|
|
51
|
+
entry_kind: "verify_findings";
|
|
52
|
+
payload: VerifyFindingsLedgerPayload;
|
|
53
|
+
}) | (LedgerEntryBase & {
|
|
54
|
+
entry_kind: "break_glass";
|
|
55
|
+
payload: BreakGlassLedgerPayload;
|
|
56
|
+
}) | (LedgerEntryBase & {
|
|
57
|
+
entry_kind: "policy_pin";
|
|
58
|
+
payload: PolicyPinLedgerPayload;
|
|
59
|
+
}) | (LedgerEntryBase & {
|
|
60
|
+
entry_kind: "dependency_check";
|
|
61
|
+
payload: DependencyCheckLedgerPayload;
|
|
62
|
+
});
|
|
63
|
+
export declare function sha256Utf8(text: string): string;
|
|
64
|
+
export declare function entryHash(entry: LedgerEntry): string;
|
|
65
|
+
export declare function genesisPrevHash(): string;
|
|
66
|
+
export declare function buildLedgerEntry<K extends LedgerEntryKind>(input: {
|
|
67
|
+
kind: K;
|
|
68
|
+
org_id: string;
|
|
69
|
+
repository_hash: string;
|
|
70
|
+
msn_id: string;
|
|
71
|
+
git_head: string;
|
|
72
|
+
payload: LedgerPayloadFor<K>;
|
|
73
|
+
prev_entry_hash: string;
|
|
74
|
+
issued_at?: string;
|
|
75
|
+
}): Extract<LedgerEntry, {
|
|
76
|
+
entry_kind: K;
|
|
77
|
+
}>;
|
|
78
|
+
export {};
|
|
79
|
+
//# sourceMappingURL=ledger-entry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
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eAAe,IAAI,MAAM,CAExC;AAED,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,eAAe,EAAE,KAAK,EAAE;IACjE,IAAI,EAAE,CAAC,CAAC;IACR,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,gBAAgB,CAAC,CAAC,CAAC,CAAC;IAC7B,eAAe,EAAE,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,OAAO,CAAC,WAAW,EAAE;IAAE,UAAU,EAAE,CAAC,CAAA;CAAE,CAAC,CAc1C"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import crypto from "node:crypto";
|
|
2
|
+
import { canonicalJson } from "../canonical-json.js";
|
|
3
|
+
import { LEDGER_GENESIS_HASH } from "../constants.js";
|
|
4
|
+
export const LEDGER_ENTRY_SCHEMA_VERSION = "1.0.0";
|
|
5
|
+
export const LEDGER_ENTRY_KINDS = [
|
|
6
|
+
"receipt",
|
|
7
|
+
"verify_findings",
|
|
8
|
+
"break_glass",
|
|
9
|
+
"policy_pin",
|
|
10
|
+
"dependency_check",
|
|
11
|
+
];
|
|
12
|
+
export function sha256Utf8(text) {
|
|
13
|
+
return crypto.createHash("sha256").update(text, "utf8").digest("hex");
|
|
14
|
+
}
|
|
15
|
+
export function entryHash(entry) {
|
|
16
|
+
return sha256Utf8(canonicalJson(entry));
|
|
17
|
+
}
|
|
18
|
+
export function genesisPrevHash() {
|
|
19
|
+
return LEDGER_GENESIS_HASH;
|
|
20
|
+
}
|
|
21
|
+
export function buildLedgerEntry(input) {
|
|
22
|
+
const payload_sha256 = sha256Utf8(canonicalJson(input.payload));
|
|
23
|
+
return {
|
|
24
|
+
schema_version: LEDGER_ENTRY_SCHEMA_VERSION,
|
|
25
|
+
entry_kind: input.kind,
|
|
26
|
+
org_id: input.org_id,
|
|
27
|
+
repository_hash: input.repository_hash,
|
|
28
|
+
msn_id: input.msn_id,
|
|
29
|
+
git_head: input.git_head,
|
|
30
|
+
payload_sha256,
|
|
31
|
+
payload: input.payload,
|
|
32
|
+
prev_entry_hash: input.prev_entry_hash,
|
|
33
|
+
issued_at: input.issued_at ?? new Date().toISOString(),
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=ledger-entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ledger-entry.js","sourceRoot":"","sources":["../../../../src/cli/lib/ledger/ledger-entry.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAGtD,MAAM,CAAC,MAAM,2BAA2B,GAAG,OAAgB,CAAC;AAE5D,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,SAAS;IACT,iBAAiB;IACjB,aAAa;IACb,YAAY;IACZ,kBAAkB;CACV,CAAC;AA4EX,MAAM,UAAU,UAAU,CAAC,IAAY;IACrC,OAAO,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AACxE,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,KAAkB;IAC1C,OAAO,UAAU,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC;AAC1C,CAAC;AAED,MAAM,UAAU,eAAe;IAC7B,OAAO,mBAAmB,CAAC;AAC7B,CAAC;AAED,MAAM,UAAU,gBAAgB,CAA4B,KAS3D;IACC,MAAM,cAAc,GAAG,UAAU,CAAC,aAAa,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;IAChE,OAAO;QACL,cAAc,EAAE,2BAA2B;QAC3C,UAAU,EAAE,KAAK,CAAC,IAAI;QACtB,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,eAAe,EAAE,KAAK,CAAC,eAAe;QACtC,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,QAAQ,EAAE,KAAK,CAAC,QAAQ;QACxB,cAAc;QACd,OAAO,EAAE,KAAK,CAAC,OAAO;QACtB,eAAe,EAAE,KAAK,CAAC,eAAe;QACtC,SAAS,EAAE,KAAK,CAAC,SAAS,IAAI,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;KACZ,CAAC;AAC/C,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export declare const SOC2_CONTROL_MAP: readonly [{
|
|
2
|
+
readonly framework: "ISO 27001";
|
|
3
|
+
readonly control: "A.5.3";
|
|
4
|
+
readonly mapping: "Planner stamp + mission YAML + verify ledger entry";
|
|
5
|
+
}, {
|
|
6
|
+
readonly framework: "ISO 27001";
|
|
7
|
+
readonly control: "A.8.15";
|
|
8
|
+
readonly mapping: "refs/gxt/ledger + EXECUTOR_LOG.md quotes";
|
|
9
|
+
}, {
|
|
10
|
+
readonly framework: "ISO 27001";
|
|
11
|
+
readonly control: "A.8.28";
|
|
12
|
+
readonly mapping: "TMVC + policy floor (mandatory_gates, banned_imports)";
|
|
13
|
+
}, {
|
|
14
|
+
readonly framework: "ISO 42001";
|
|
15
|
+
readonly control: "AI boundaries";
|
|
16
|
+
readonly mapping: "Mission depends_on + interrogation record";
|
|
17
|
+
}, {
|
|
18
|
+
readonly framework: "SOC 2";
|
|
19
|
+
readonly control: "CC7";
|
|
20
|
+
readonly mapping: "Ledger chain verify + doctor ledger health";
|
|
21
|
+
}, {
|
|
22
|
+
readonly framework: "SOC 2";
|
|
23
|
+
readonly control: "CC8";
|
|
24
|
+
readonly mapping: "Planner git-proof + receipt / verify_findings entries";
|
|
25
|
+
}];
|
|
26
|
+
export declare function exportLedgerJson(root: string, outDir: string): string;
|
|
27
|
+
export declare function exportSoc2Pack(root: string, outDir: string): string;
|
|
28
|
+
//# sourceMappingURL=ledger-export.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ledger-export.d.ts","sourceRoot":"","sources":["../../../../src/cli/lib/ledger/ledger-export.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;EAOnB,CAAC;AAEX,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAMrE;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAmBnE"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import fs from "node:fs";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { REL_RECEIPTS_DIR } from "../constants.js";
|
|
4
|
+
import { verifyLedgerChain } from "./ledger-chain.js";
|
|
5
|
+
export const SOC2_CONTROL_MAP = [
|
|
6
|
+
{ framework: "ISO 27001", control: "A.5.3", mapping: "Planner stamp + mission YAML + verify ledger entry" },
|
|
7
|
+
{ framework: "ISO 27001", control: "A.8.15", mapping: "refs/gxt/ledger + EXECUTOR_LOG.md quotes" },
|
|
8
|
+
{ framework: "ISO 27001", control: "A.8.28", mapping: "TMVC + policy floor (mandatory_gates, banned_imports)" },
|
|
9
|
+
{ framework: "ISO 42001", control: "AI boundaries", mapping: "Mission depends_on + interrogation record" },
|
|
10
|
+
{ framework: "SOC 2", control: "CC7", mapping: "Ledger chain verify + doctor ledger health" },
|
|
11
|
+
{ framework: "SOC 2", control: "CC8", mapping: "Planner git-proof + receipt / verify_findings entries" },
|
|
12
|
+
];
|
|
13
|
+
export function exportLedgerJson(root, outDir) {
|
|
14
|
+
const report = verifyLedgerChain(root);
|
|
15
|
+
fs.mkdirSync(outDir, { recursive: true });
|
|
16
|
+
const dest = path.join(outDir, "ledger.json");
|
|
17
|
+
fs.writeFileSync(dest, `${JSON.stringify(report, null, 2)}\n`, "utf8");
|
|
18
|
+
return dest;
|
|
19
|
+
}
|
|
20
|
+
export function exportSoc2Pack(root, outDir) {
|
|
21
|
+
fs.mkdirSync(outDir, { recursive: true });
|
|
22
|
+
exportLedgerJson(root, outDir);
|
|
23
|
+
fs.writeFileSync(path.join(outDir, "control-map.json"), `${JSON.stringify({ schema_version: "1.0.0", controls: SOC2_CONTROL_MAP }, null, 2)}\n`, "utf8");
|
|
24
|
+
const receiptsDir = path.join(root, REL_RECEIPTS_DIR);
|
|
25
|
+
const destReceipts = path.join(outDir, "receipts");
|
|
26
|
+
if (fs.existsSync(receiptsDir)) {
|
|
27
|
+
fs.mkdirSync(destReceipts, { recursive: true });
|
|
28
|
+
for (const name of fs.readdirSync(receiptsDir)) {
|
|
29
|
+
if (name.endsWith(".json")) {
|
|
30
|
+
fs.copyFileSync(path.join(receiptsDir, name), path.join(destReceipts, name));
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
return outDir;
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=ledger-export.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ledger-export.js","sourceRoot":"","sources":["../../../../src/cli/lib/ledger/ledger-export.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEtD,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,EAAE,SAAS,EAAE,WAAW,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,oDAAoD,EAAE;IAC3G,EAAE,SAAS,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,0CAA0C,EAAE;IAClG,EAAE,SAAS,EAAE,WAAW,EAAE,OAAO,EAAE,QA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E,gBAAgB,CAAC,CAAC;IACtD,MAAM,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IACnD,IAAI,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC,EAAE,CAAC;QAC/B,EAAE,CAAC,SAAS,CAAC,YAAY,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QAChD,KAAK,MAAM,IAAI,IAAI,EAAE,CAAC,WAAW,CAAC,WAAW,CAAC,EAAE,CAAC;YAC/C,IAAI,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;gBAC3B,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC,CAAC;YAC/E,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type LegislateOptions, type LegislateResult } from "./legislate.js";
|
|
2
|
+
export interface FromIntentOptions extends LegislateOptions {
|
|
3
|
+
fromIntent?: boolean;
|
|
4
|
+
yes?: boolean;
|
|
5
|
+
contractFile?: string;
|
|
6
|
+
}
|
|
7
|
+
/** Propose (or load) a contract, optionally prompt, then legislate. */
|
|
8
|
+
export declare function runLegislateFromIntent(options: FromIntentOptions): Promise<LegislateResult>;
|
|
9
|
+
//# sourceMappingURL=legislate-from-intent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"legislate-from-intent.d.ts","sourceRoot":"","sources":["../../../src/cli/lib/legislate-from-intent.ts"],"names":[],"mappings":"AAMA,OAAO,EAA+C,KAAK,gBAAgB,EAAE,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAI1H,MAAM,WAAW,iBAAkB,SAAQ,gBAAgB;IACzD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAMD,uEAAuE;AACvE,wBAAsB,sBAAsB,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,eAAe,CAAC,CAiDjG"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import fs from "node:fs";
|
|
2
|
+
import { approveContractPrompt } from "./contract/approve-prompt.js";
|
|
3
|
+
import { normalizeContract, parseContractYaml } from "./contract/contract-hash.js";
|
|
4
|
+
import { proposeContract } from "./contract/propose.js";
|
|
5
|
+
import { GantryUserError } from "./errors.js";
|
|
6
|
+
import { logInfo } from "./cli-io.js";
|
|
7
|
+
import { resolveSkillKeyForLegislation, runLegislate } from "./legislate.js";
|
|
8
|
+
import { loadWorkspace } from "./workspace.js";
|
|
9
|
+
function loadContractFile(file) {
|
|
10
|
+
return parseContractYaml(fs.readFileSync(file, "utf8"));
|
|
11
|
+
}
|
|
12
|
+
/** Propose (or load) a contract, optionally prompt, then legislate. */
|
|
13
|
+
export async function runLegislateFromIntent(options) {
|
|
14
|
+
const { root, manifest } = loadWorkspace();
|
|
15
|
+
const resolved = resolveSkillKeyForLegislation({
|
|
16
|
+
root,
|
|
17
|
+
manifest,
|
|
18
|
+
intent: options.intent,
|
|
19
|
+
skillKey: options.skillKey,
|
|
20
|
+
});
|
|
21
|
+
if (!resolved.ok) {
|
|
22
|
+
throw new GantryUserError("INVALID_ARGUMENT", `legislate: ${resolved.reason}`, undefined, 2);
|
|
23
|
+
}
|
|
24
|
+
const proposed = proposeContract({
|
|
25
|
+
root,
|
|
26
|
+
manifest,
|
|
27
|
+
intent: options.intent,
|
|
28
|
+
skillKey: resolved.skillKey,
|
|
29
|
+
paths: options.paths,
|
|
30
|
+
gateCommand: options.gateCommand,
|
|
31
|
+
gateSuccessSubstring: options.gateSuccessSubstring,
|
|
32
|
+
});
|
|
33
|
+
let contract = options.contractFile?.trim()
|
|
34
|
+
? loadContractFile(options.contractFile.trim())
|
|
35
|
+
: options.contract
|
|
36
|
+
? normalizeContract(options.contract)
|
|
37
|
+
: proposed.contract;
|
|
38
|
+
if (options.fromIntent === true && !options.contractFile?.trim()) {
|
|
39
|
+
const decision = await approveContractPrompt({
|
|
40
|
+
contract,
|
|
41
|
+
gate: proposed.gate,
|
|
42
|
+
rationale: proposed.rationale,
|
|
43
|
+
yes: options.yes,
|
|
44
|
+
});
|
|
45
|
+
if (decision.action === "quit") {
|
|
46
|
+
logInfo("legislate: contract rejected — no mission written");
|
|
47
|
+
return { ok: false, exitCode: 2 };
|
|
48
|
+
}
|
|
49
|
+
contract = decision.contract;
|
|
50
|
+
}
|
|
51
|
+
return runLegislate({
|
|
52
|
+
...options,
|
|
53
|
+
skillKey: resolved.skillKey,
|
|
54
|
+
contract,
|
|
55
|
+
gateCommand: options.gateCommand ?? proposed.gate.command,
|
|
56
|
+
gateSuccessSubstring: options.gateSuccessSubstring ?? proposed.gate.successSubstring ?? undefined,
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=legislate-from-intent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"legislate-from-intent.js","sourceRoot":"","sources":["../../../src/cli/lib/legislate-from-intent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AACnF,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,6BAA6B,EAAE,YAAY,EAA+C,MAAM,gBAAgB,CAAC;AAC1H,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;A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E,EAAE,CAAC;QACjE,MAAM,QAAQ,GAAG,MAAM,qBAAqB,CAAC;YAC3C,QAAQ;YACR,IAAI,EAAE,QAAQ,CAAC,IAAI;YACnB,SAAS,EAAE,QAAQ,CAAC,SAAS;YAC7B,GAAG,EAAE,OAAO,CAAC,GAAG;SACjB,CAAC,CAAC;QACH,IAAI,QAAQ,CAAC,MAAM,KAAK,MAAM,EAAE,CAAC;YAC/B,OAAO,CAAC,mDAAmD,CAAC,CAAC;YAC7D,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC;QACpC,CAAC;QACD,QAAQ,GAAG,QAAQ,CAAC,QAAQ,CAAC;IAC/B,CAAC;IAED,OAAO,YAAY,CAAC;QAClB,GAAG,OAAO;QACV,QAAQ,EAAE,QAAQ,CAAC,QAAQ;QAC3B,QAAQ;QACR,WAAW,EAAE,OAAO,CAAC,WAAW,IAAI,QAAQ,CAAC,IAAI,CAAC,OAAO;QACzD,oBAAoB,EAAE,OAAO,CAAC,oBAAoB,IAAI,QAAQ,CAAC,IAAI,CAAC,gBAAgB,IAAI,SAAS;KAClG,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
+
import { type GateAdapterId, type GateSpec } from "./types.js";
|
|
1
2
|
/** Shared gate-command defaults for legislate, interrogate, and MCP draft flows. */
|
|
2
3
|
export declare function resolveLegislateGateOptions(options: {
|
|
3
4
|
gateCommand?: string;
|
|
4
5
|
gateSuccessSubstring?: string;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
gateSuccessSubstring: string | null;
|
|
8
|
-
};
|
|
6
|
+
adapter?: GateAdapterId;
|
|
7
|
+
}): GateSpec;
|
|
9
8
|
//# sourceMappingURL=legislate-gate-options.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"legislate-gate-options.d.ts","sourceRoot":"","sources":["../../../src/cli/lib/legislate-gate-options.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,wBAAgB,2BAA2B,CAAC,OAAO,EAAE;IACnD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,oBAAoB,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"legislate-gate-options.d.ts","sourceRoot":"","sources":["../../../src/cli/lib/legislate-gate-options.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,aAAa,EAClB,KAAK,QAAQ,EACd,MAAM,YAAY,CAAC;AAEpB,oFAAoF;AACpF,wBAAgB,2BAA2B,CAAC,OAAO,EAAE;IACnD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,OAAO,CAAC,EAAE,aAAa,CAAC;CACzB,GAAG,QAAQ,CAaX"}
|
|
@@ -1,11 +1,16 @@
|
|
|
1
|
+
import { DEFAULT_GATE_ADAPTER, } from "./types.js";
|
|
1
2
|
/** Shared gate-command defaults for legislate, interrogate, and MCP draft flows. */
|
|
2
3
|
export function resolveLegislateGateOptions(options) {
|
|
3
|
-
const
|
|
4
|
-
const
|
|
4
|
+
const command = options.gateCommand?.trim() || "echo OK";
|
|
5
|
+
const successSubstring = options.gateSuccessSubstring !== undefined
|
|
5
6
|
? options.gateSuccessSubstring.trim() || null
|
|
6
|
-
:
|
|
7
|
+
: command === "echo OK"
|
|
7
8
|
? "OK"
|
|
8
9
|
: null;
|
|
9
|
-
return {
|
|
10
|
+
return {
|
|
11
|
+
command,
|
|
12
|
+
successSubstring,
|
|
13
|
+
adapter: options.adapter ?? DEFAULT_GATE_ADAPTER,
|
|
14
|
+
};
|
|
10
15
|
}
|
|
11
16
|
//# sourceMappingURL=legislate-gate-options.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"legislate-gate-options.js","sourceRoot":"","sources":["../../../src/cli/lib/legislate-gate-options.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,MAAM,UAAU,2BAA2B,CAAC,
|
|
1
|
+
{"version":3,"file":"legislate-gate-options.js","sourceRoot":"","sources":["../../../src/cli/lib/legislate-gate-options.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,GAGrB,MAAM,YAAY,CAAC;AAEpB,oFAAoF;AACpF,MAAM,UAAU,2BAA2B,CAAC,OAI3C;IACC,MAAM,OAAO,GAAG,OAAO,CAAC,WAAW,EAAE,IAAI,EAAE,IAAI,SAAS,CAAC;IACzD,MAAM,gBAAgB,GACpB,OAAO,CAAC,oBAAoB,KAAK,SAAS;QACxC,CAAC,CAAC,OAAO,CAAC,oBAAoB,CAAC,IAAI,EAAE,IAAI,IAAI;QAC7C,CAAC,CAAC,OAAO,KAAK,SAAS;YACrB,CAAC,CAAC,IAAI;YACN,CAAC,CAAC,IAAI,CAAC;IACb,OAAO;QACL,OAAO;QACP,gBAAgB;QAChB,OAAO,EAAE,OAAO,CAAC,OAAO,IAAI,oBAAoB;KACjD,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"legislate-policy-warn.d.ts","sourceRoot":"","sources":["../../../src/cli/lib/legislate-policy-warn.ts"],"names":[],"mappings":"AAGA,uFAAuF;AACvF,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAW3D"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { logWarn } from "./cli-io.js";
|
|
2
|
+
import { configFloorViolations, localConfigFloor, resolveOrgPolicy } from "./policy/policy-resolve.js";
|
|
3
|
+
/** Warn-only: a draft that would violate the org floor is still written (ADR-0042). */
|
|
4
|
+
export function warnLegislatePolicyFloor(root) {
|
|
5
|
+
const resolved = resolveOrgPolicy(root);
|
|
6
|
+
if (!resolved.ok) {
|
|
7
|
+
logWarn(`legislate: org policy preflight warning — ${resolved.message}`);
|
|
8
|
+
return;
|
|
9
|
+
}
|
|
10
|
+
if (!resolved.present)
|
|
11
|
+
return;
|
|
12
|
+
const violations = configFloorViolations(resolved.bundle?.config_floor ?? {}, localConfigFloor(root));
|
|
13
|
+
for (const v of violations) {
|
|
14
|
+
logWarn(`legislate: org policy floor warning — ${v}`);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=legislate-policy-warn.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"legislate-policy-warn.js","sourceRoot":"","sources":["../../../src/cli/lib/legislate-policy-warn.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAEvG,uFAAuF;AACvF,MAAM,UAAU,wBAAwB,CAAC,IAAY;IACnD,MAAM,QAAQ,GAAG,gBAAgB,CAAC,IAAI,CAAC,CAAC;IACxC,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;QACjB,OAAO,CAAC,6CAA6C,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC;QACzE,OAAO;IACT,CAAC;IACD,IAAI,CAAC,QAAQ,CAAC,OAAO;QAAE,OAAO;IAC9B,MAAM,UAAU,GAAG,qBAAqB,CAAC,QAAQ,CAAC,MAAM,EAAE,YAAY,IAAI,EAAE,EAAE,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAC;IACtG,KAAK,MAAM,CAAC,IAAI,UAAU,EAAE,CAAC;QAC3B,OAAO,CAAC,yCAAyC,CAAC,EAAE,CAAC,CAAC;IACxD,CAAC;AACH,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type GateAdapterId, type Manifest, type MissionContract, type TriageResult } from "./types.js";
|
|
2
2
|
import type { InterrogationRow } from "./interrogate/findings.js";
|
|
3
3
|
export type LegislateInterrogation = {
|
|
4
4
|
source: "draft_token";
|
|
@@ -16,10 +16,14 @@ export interface LegislateOptions {
|
|
|
16
16
|
allowDuplicate?: boolean;
|
|
17
17
|
gateCommand?: string;
|
|
18
18
|
gateSuccessSubstring?: string;
|
|
19
|
+
/** Explicit gate output parser (ADR-0041); omitted/generic is not written. */
|
|
20
|
+
gateAdapter?: GateAdapterId;
|
|
19
21
|
paths?: string[];
|
|
20
22
|
interrogation?: LegislateInterrogation;
|
|
21
23
|
/** When true, skip stdout info messages (MCP / structured JSON callers). */
|
|
22
24
|
silent?: boolean;
|
|
25
|
+
/** Planner-sealed cage; written as `contract` + `contract_sha256`. */
|
|
26
|
+
contract?: MissionContract | null;
|
|
23
27
|
}
|
|
24
28
|
export type ResolveSkillKeyResult = {
|
|
25
29
|
ok: true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"legislate.d.ts","sourceRoot":"","sources":["../../../src/cli/lib/legislate.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"legislate.d.ts","sourceRoot":"","sources":["../../../src/cli/lib/legislate.ts"],"names":[],"mappings":"AAmBA,OAAO,EAEL,KAAK,aAAa,EAClB,KAAK,QAAQ,EACb,KAAK,eAAe,EACpB,KAAK,YAAY,EAClB,MAAM,YAAY,CAAC;AAQpB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAIlE,MAAM,MAAM,sBAAsB,GAC9B;IAAE,MAAM,EAAE,aAAa,CAAC;IAAC,IAAI,EAAE,gBAAgB,EAAE,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GACnE;IAAE,MAAM,EAAE,eAAe,CAAC;IAAC,IAAI,EAAE,gBAAgB,EAAE,CAAA;CAAE,CAAC;AAE1D,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CA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