@intentius/chant 0.100.0 → 0.102.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/agents/checks.d.ts.map +1 -1
- package/dist/attrref.d.ts.map +1 -1
- package/dist/audit/discover.d.ts.map +1 -1
- package/dist/audit/nginx.d.ts.map +1 -1
- package/dist/audit/prior-art.d.ts +48 -0
- package/dist/audit/prior-art.d.ts.map +1 -1
- package/dist/behaviour-kinds.d.ts.map +1 -1
- package/dist/build.d.ts +6 -0
- package/dist/build.d.ts.map +1 -1
- package/dist/builder.d.ts.map +1 -1
- package/dist/cli/build-options.d.ts +2 -0
- package/dist/cli/build-options.d.ts.map +1 -1
- package/dist/cli/commands/build.d.ts.map +1 -1
- package/dist/cli/commands/carve-emit.d.ts.map +1 -1
- package/dist/cli/commands/check-lexicon.d.ts +16 -0
- package/dist/cli/commands/check-lexicon.d.ts.map +1 -1
- package/dist/cli/commands/import.d.ts +8 -0
- package/dist/cli/commands/import.d.ts.map +1 -1
- package/dist/cli/commands/init-lexicon.d.ts.map +1 -1
- package/dist/cli/commands/init.d.ts +19 -0
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/onboard.d.ts +9 -0
- package/dist/cli/commands/onboard.d.ts.map +1 -1
- package/dist/cli/commands/pinned-upgrade.d.ts +19 -5
- package/dist/cli/commands/pinned-upgrade.d.ts.map +1 -1
- package/dist/cli/handlers/dev.d.ts.map +1 -1
- package/dist/cli/handlers/fan-out.d.ts.map +1 -1
- package/dist/cli/handlers/lifecycle.d.ts.map +1 -1
- package/dist/cli/handlers/misc.d.ts.map +1 -1
- package/dist/cli/handlers/operator.d.ts +9 -0
- package/dist/cli/handlers/operator.d.ts.map +1 -1
- package/dist/cli/handlers/run.d.ts.map +1 -1
- package/dist/cli/lsp/server.d.ts.map +1 -1
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/mcp/server.d.ts.map +1 -1
- package/dist/cli/mcp/tools/build.d.ts.map +1 -1
- package/dist/cli/mcp/tools/composites.d.ts.map +1 -1
- package/dist/cli/mcp/tools/explain.d.ts.map +1 -1
- package/dist/cli/mcp/tools/import.d.ts.map +1 -1
- package/dist/cli/mcp/tools/lint.d.ts.map +1 -1
- package/dist/cli/mcp/tools/scaffold.d.ts.map +1 -1
- package/dist/cli/mcp/tools/search.d.ts.map +1 -1
- package/dist/cli/mcp/workspace-tools.d.ts +9 -1
- package/dist/cli/mcp/workspace-tools.d.ts.map +1 -1
- package/dist/cli/registry.d.ts +33 -2
- package/dist/cli/registry.d.ts.map +1 -1
- package/dist/codegen/fetch.d.ts.map +1 -1
- package/dist/codegen/naming.d.ts.map +1 -1
- package/dist/codegen/pinned-upgrade.d.ts +67 -3
- package/dist/codegen/pinned-upgrade.d.ts.map +1 -1
- package/dist/codegen/registry.d.ts.map +1 -1
- package/dist/components/capability-plugin-loader.d.ts.map +1 -1
- package/dist/components/capability.d.ts.map +1 -1
- package/dist/components/driver.d.ts.map +1 -1
- package/dist/components/fan-out.d.ts.map +1 -1
- package/dist/components/starter-plugin.d.ts.map +1 -1
- package/dist/components/verbs/process-runner.d.ts.map +1 -1
- package/dist/components/verbs/r2-sync.d.ts.map +1 -1
- package/dist/components/verbs/run-agent.d.ts.map +1 -1
- package/dist/components/verbs/sbom-generator.d.ts.map +1 -1
- package/dist/components/verbs/sign.d.ts.map +1 -1
- package/dist/components/verbs/verify.d.ts.map +1 -1
- package/dist/components/verbs/vuln-gate.d.ts.map +1 -1
- package/dist/components/verbs/vuln-scan.d.ts.map +1 -1
- package/dist/components/verbs/wrangler.d.ts.map +1 -1
- package/dist/composite.d.ts.map +1 -1
- package/dist/config.d.ts +30 -7
- package/dist/config.d.ts.map +1 -1
- package/dist/declarable.d.ts +16 -0
- package/dist/declarable.d.ts.map +1 -1
- package/dist/discovery/cache.d.ts.map +1 -1
- package/dist/discovery/fold-import.d.ts +15 -5
- package/dist/discovery/fold-import.d.ts.map +1 -1
- package/dist/discovery/param-deps.d.ts +16 -0
- package/dist/discovery/param-deps.d.ts.map +1 -1
- package/dist/discovery/sandbox/policy-wire.d.ts.map +1 -1
- package/dist/discovery/specifier-resolve.d.ts +37 -0
- package/dist/discovery/specifier-resolve.d.ts.map +1 -0
- package/dist/errors.d.ts.map +1 -1
- package/dist/fold/fold.d.ts +3 -1
- package/dist/fold/fold.d.ts.map +1 -1
- package/dist/graph-detail.d.ts.map +1 -1
- package/dist/graph-ir.d.ts.map +1 -1
- package/dist/graph-layout.d.ts.map +1 -1
- package/dist/import/base-parser.d.ts.map +1 -1
- package/dist/import/embedded.d.ts +7 -0
- package/dist/import/embedded.d.ts.map +1 -1
- package/dist/import/parser-options.d.ts +14 -0
- package/dist/import/parser-options.d.ts.map +1 -0
- package/dist/import/parser.d.ts +17 -0
- package/dist/import/parser.d.ts.map +1 -1
- package/dist/kubectl-context.d.ts.map +1 -1
- package/dist/lexicon-output.d.ts.map +1 -1
- package/dist/lexicon-schema.d.ts +3 -3
- package/dist/lexicon.d.ts +78 -3
- package/dist/lexicon.d.ts.map +1 -1
- package/dist/lifecycle/assert-live.d.ts.map +1 -1
- package/dist/lifecycle/gate-ledger.d.ts +15 -0
- package/dist/lifecycle/gate-ledger.d.ts.map +1 -1
- package/dist/lifecycle/git.d.ts.map +1 -1
- package/dist/lifecycle/member-ledger.d.ts.map +1 -1
- package/dist/lifecycle/observe.d.ts.map +1 -1
- package/dist/lifecycle/plan-digest.d.ts +26 -5
- package/dist/lifecycle/plan-digest.d.ts.map +1 -1
- package/dist/lifecycle/plan-ledger.d.ts.map +1 -1
- package/dist/lifecycle/release-ledger.d.ts.map +1 -1
- package/dist/lifecycle/scenario.d.ts.map +1 -1
- package/dist/lifecycle/status.d.ts.map +1 -1
- package/dist/lifecycle/work-lease.d.ts +61 -2
- package/dist/lifecycle/work-lease.d.ts.map +1 -1
- package/dist/lint/config.d.ts +4 -4
- package/dist/lint/engine.d.ts +6 -0
- package/dist/lint/engine.d.ts.map +1 -1
- package/dist/lsp/lexicon-providers.d.ts.map +1 -1
- package/dist/op/activities/activity-contracts.d.ts +12 -11
- package/dist/op/activities/activity-contracts.d.ts.map +1 -1
- package/dist/op/activities/apply.d.ts +79 -9
- package/dist/op/activities/apply.d.ts.map +1 -1
- package/dist/op/activities/decide.d.ts.map +1 -1
- package/dist/op/activities/index.d.ts +1 -1
- package/dist/op/activities/index.d.ts.map +1 -1
- package/dist/op/activities/lexicon-upgrade.d.ts +44 -12
- package/dist/op/activities/lexicon-upgrade.d.ts.map +1 -1
- package/dist/op/activities/propose-upgrade.d.ts +2 -0
- package/dist/op/activities/propose-upgrade.d.ts.map +1 -1
- package/dist/op/activity-contract.d.ts +1 -1
- package/dist/op/activity-failure.d.ts.map +1 -1
- package/dist/op/activity-profiles.d.ts.map +1 -1
- package/dist/op/builders.d.ts.map +1 -1
- package/dist/op/composites/apply-op.d.ts +12 -5
- package/dist/op/composites/apply-op.d.ts.map +1 -1
- package/dist/op/composites/lexicon-upgrade-op.d.ts +22 -6
- package/dist/op/composites/lexicon-upgrade-op.d.ts.map +1 -1
- package/dist/op/decide-backend.d.ts.map +1 -1
- package/dist/op/decide-read-inputs.d.ts.map +1 -1
- package/dist/op/emulator-lifecycle.d.ts +21 -2
- package/dist/op/emulator-lifecycle.d.ts.map +1 -1
- package/dist/op/gate-approval.d.ts +5 -1
- package/dist/op/gate-approval.d.ts.map +1 -1
- package/dist/op/gate-wait.d.ts.map +1 -1
- package/dist/op/gate.d.ts +19 -3
- package/dist/op/gate.d.ts.map +1 -1
- package/dist/op/index.d.ts +3 -1
- package/dist/op/index.d.ts.map +1 -1
- package/dist/op/local-executor.d.ts +6 -0
- package/dist/op/local-executor.d.ts.map +1 -1
- package/dist/op/operator.d.ts.map +1 -1
- package/dist/op/run-context.d.ts +39 -0
- package/dist/op/run-context.d.ts.map +1 -0
- package/dist/op/run-live.d.ts.map +1 -1
- package/dist/op/runtimes/local.d.ts.map +1 -1
- package/dist/op/source-archive.d.ts.map +1 -1
- package/dist/op/steward-beside.d.ts.map +1 -1
- package/dist/op/steward-points.d.ts.map +1 -1
- package/dist/op/steward.d.ts.map +1 -1
- package/dist/op/types.d.ts +8 -3
- package/dist/op/types.d.ts.map +1 -1
- package/dist/op/work-lease-run.d.ts +24 -4
- package/dist/op/work-lease-run.d.ts.map +1 -1
- package/dist/project-root.d.ts.map +1 -1
- package/dist/provenance.d.ts +21 -0
- package/dist/provenance.d.ts.map +1 -1
- package/dist/pseudo-parameter.d.ts.map +1 -1
- package/dist/reconcile.d.ts.map +1 -1
- package/dist/secret-materialization.d.ts.map +1 -1
- package/dist/serializer.d.ts +8 -0
- package/dist/serializer.d.ts.map +1 -1
- package/dist/telemetry-attribution.d.ts +77 -0
- package/dist/telemetry-attribution.d.ts.map +1 -0
- package/dist/terraform/emit-source.d.ts.map +1 -1
- package/dist/terraform/parse.d.ts.map +1 -1
- package/dist/testing.d.ts.map +1 -1
- package/dist/workspace/__fixtures__/contract-repo.d.ts.map +1 -1
- package/dist/workspace/__fixtures__/decide-workspace.d.ts +1 -1
- package/dist/workspace/__fixtures__/decide-workspace.d.ts.map +1 -1
- package/dist/workspace/agent-cli.d.ts +88 -0
- package/dist/workspace/agent-cli.d.ts.map +1 -0
- package/dist/workspace/box-factory.d.ts +73 -0
- package/dist/workspace/box-factory.d.ts.map +1 -0
- package/dist/workspace/changes-cli.d.ts.map +1 -1
- package/dist/workspace/changes.d.ts +8 -1
- package/dist/workspace/changes.d.ts.map +1 -1
- package/dist/workspace/chant-migrations/chud-lexicon-exit.d.ts.map +1 -1
- package/dist/workspace/checks/boxes.d.ts.map +1 -1
- package/dist/workspace/checks/links.d.ts +1 -0
- package/dist/workspace/checks/links.d.ts.map +1 -1
- package/dist/workspace/checks/live.d.ts +40 -0
- package/dist/workspace/checks/live.d.ts.map +1 -0
- package/dist/workspace/checks.d.ts +26 -2
- package/dist/workspace/checks.d.ts.map +1 -1
- package/dist/workspace/compose-graph.d.ts +73 -0
- package/dist/workspace/compose-graph.d.ts.map +1 -1
- package/dist/workspace/conformance/index.d.ts +67 -6
- package/dist/workspace/conformance/index.d.ts.map +1 -1
- package/dist/workspace/conformance/vitest.d.ts +12 -3
- package/dist/workspace/conformance/vitest.d.ts.map +1 -1
- package/dist/workspace/conformance/writer.d.ts +368 -0
- package/dist/workspace/conformance/writer.d.ts.map +1 -0
- package/dist/workspace/decide.d.ts +1 -1
- package/dist/workspace/decide.d.ts.map +1 -1
- package/dist/workspace/declaration.d.ts +119 -0
- package/dist/workspace/declaration.d.ts.map +1 -1
- package/dist/workspace/declaration.schema.json +368 -4
- package/dist/workspace/export-cli.d.ts +12 -0
- package/dist/workspace/export-cli.d.ts.map +1 -0
- package/dist/workspace/export.d.ts +145 -0
- package/dist/workspace/export.d.ts.map +1 -0
- package/dist/workspace/generated-files.d.ts.map +1 -1
- package/dist/workspace/graph-cache.d.ts.map +1 -1
- package/dist/workspace/graph-cli.d.ts +2 -0
- package/dist/workspace/graph-cli.d.ts.map +1 -1
- package/dist/workspace/identity.d.ts +111 -0
- package/dist/workspace/identity.d.ts.map +1 -0
- package/dist/workspace/import.d.ts +73 -0
- package/dist/workspace/import.d.ts.map +1 -0
- package/dist/workspace/intent-cli.d.ts +7 -4
- package/dist/workspace/intent-cli.d.ts.map +1 -1
- package/dist/workspace/intent-record.d.ts +8 -1
- package/dist/workspace/intent-record.d.ts.map +1 -1
- package/dist/workspace/intent.d.ts +149 -5
- package/dist/workspace/intent.d.ts.map +1 -1
- package/dist/workspace/kinds.d.ts +24 -6
- package/dist/workspace/kinds.d.ts.map +1 -1
- package/dist/workspace/lineage-adopt-cli.d.ts +15 -0
- package/dist/workspace/lineage-adopt-cli.d.ts.map +1 -0
- package/dist/workspace/lineage-adopt.d.ts +106 -0
- package/dist/workspace/lineage-adopt.d.ts.map +1 -0
- package/dist/workspace/lineage-check.d.ts +9 -2
- package/dist/workspace/lineage-check.d.ts.map +1 -1
- package/dist/workspace/lineage-cli.d.ts +6 -1
- package/dist/workspace/lineage-cli.d.ts.map +1 -1
- package/dist/workspace/lineage-hash-index.d.ts +110 -0
- package/dist/workspace/lineage-hash-index.d.ts.map +1 -0
- package/dist/workspace/lineage-init.d.ts +10 -0
- package/dist/workspace/lineage-init.d.ts.map +1 -1
- package/dist/workspace/lineage-lock.d.ts +149 -2
- package/dist/workspace/lineage-lock.d.ts.map +1 -1
- package/dist/workspace/lineage-migrations.d.ts +15 -3
- package/dist/workspace/lineage-migrations.d.ts.map +1 -1
- package/dist/workspace/lineage-provenance.d.ts +18 -0
- package/dist/workspace/lineage-provenance.d.ts.map +1 -0
- package/dist/workspace/lineage-upgrade-cli.d.ts +2 -0
- package/dist/workspace/lineage-upgrade-cli.d.ts.map +1 -1
- package/dist/workspace/lineage-upgrade.d.ts +30 -1
- package/dist/workspace/lineage-upgrade.d.ts.map +1 -1
- package/dist/workspace/lineage-versions.d.ts +116 -0
- package/dist/workspace/lineage-versions.d.ts.map +1 -0
- package/dist/workspace/links.d.ts +31 -5
- package/dist/workspace/links.d.ts.map +1 -1
- package/dist/workspace/ls-generated.d.ts +37 -0
- package/dist/workspace/ls-generated.d.ts.map +1 -0
- package/dist/workspace/ls.d.ts +4 -0
- package/dist/workspace/ls.d.ts.map +1 -1
- package/dist/workspace/member-commands.d.ts.map +1 -1
- package/dist/workspace/nested-graph.d.ts +56 -0
- package/dist/workspace/nested-graph.d.ts.map +1 -0
- package/dist/workspace/nesting.d.ts +21 -0
- package/dist/workspace/nesting.d.ts.map +1 -0
- package/dist/workspace/pin-cli.d.ts +10 -0
- package/dist/workspace/pin-cli.d.ts.map +1 -0
- package/dist/workspace/pin-integrity.d.ts +51 -0
- package/dist/workspace/pin-integrity.d.ts.map +1 -0
- package/dist/workspace/points.d.ts.map +1 -1
- package/dist/workspace/principal-classes.d.ts +114 -0
- package/dist/workspace/principal-classes.d.ts.map +1 -0
- package/dist/workspace/reason-codes.d.ts +47 -3
- package/dist/workspace/reason-codes.d.ts.map +1 -1
- package/dist/workspace/record-assets.d.ts.map +1 -1
- package/dist/workspace/record-sessions.d.ts +7 -11
- package/dist/workspace/record-sessions.d.ts.map +1 -1
- package/dist/workspace/records-checkout.d.ts +54 -0
- package/dist/workspace/records-checkout.d.ts.map +1 -0
- package/dist/workspace/records-cli.d.ts +57 -2
- package/dist/workspace/records-cli.d.ts.map +1 -1
- package/dist/workspace/records-close.d.ts +5 -2
- package/dist/workspace/records-close.d.ts.map +1 -1
- package/dist/workspace/records-since.d.ts.map +1 -1
- package/dist/workspace/records-write.d.ts +23 -4
- package/dist/workspace/records-write.d.ts.map +1 -1
- package/dist/workspace/records.d.ts +58 -5
- package/dist/workspace/records.d.ts.map +1 -1
- package/dist/workspace/returns.d.ts +129 -0
- package/dist/workspace/returns.d.ts.map +1 -0
- package/dist/workspace/runs-cli.d.ts +164 -0
- package/dist/workspace/runs-cli.d.ts.map +1 -0
- package/dist/workspace/runs.d.ts +423 -0
- package/dist/workspace/runs.d.ts.map +1 -0
- package/dist/workspace/source-block.d.ts +1 -1
- package/dist/workspace/source-block.d.ts.map +1 -1
- package/dist/workspace/status-gates.d.ts +15 -3
- package/dist/workspace/status-gates.d.ts.map +1 -1
- package/dist/workspace/status.d.ts +10 -0
- package/dist/workspace/status.d.ts.map +1 -1
- package/dist/workspace/symbols.d.ts +52 -0
- package/dist/workspace/symbols.d.ts.map +1 -0
- package/dist/workspace/template-manifest.d.ts +11 -3
- package/dist/workspace/template-manifest.d.ts.map +1 -1
- package/dist/workspace/trailer-joins.d.ts +46 -0
- package/dist/workspace/trailer-joins.d.ts.map +1 -0
- package/dist/workspace/trailers.d.ts +89 -0
- package/dist/workspace/trailers.d.ts.map +1 -0
- package/dist/workspace/trust/attestor.d.ts +8 -0
- package/dist/workspace/trust/attestor.d.ts.map +1 -1
- package/dist/workspace/trust/dsse.d.ts +58 -0
- package/dist/workspace/trust/dsse.d.ts.map +1 -0
- package/dist/workspace/trust/evidence-cli.d.ts +66 -0
- package/dist/workspace/trust/evidence-cli.d.ts.map +1 -0
- package/dist/workspace/trust/evidence.d.ts +93 -0
- package/dist/workspace/trust/evidence.d.ts.map +1 -0
- package/dist/workspace/trust/policy.d.ts +54 -1
- package/dist/workspace/trust/policy.d.ts.map +1 -1
- package/dist/workspace/trust/provenance.d.ts +21 -1
- package/dist/workspace/trust/provenance.d.ts.map +1 -1
- package/dist/workspace/trust/rotation.d.ts +132 -0
- package/dist/workspace/trust/rotation.d.ts.map +1 -0
- package/dist/workspace/trust/seal.d.ts +33 -0
- package/dist/workspace/trust/seal.d.ts.map +1 -1
- package/dist/workspace/trust/signers-cli.d.ts +49 -0
- package/dist/workspace/trust/signers-cli.d.ts.map +1 -0
- package/dist/workspace/trust/ssh-commit.d.ts +12 -0
- package/dist/workspace/trust/ssh-commit.d.ts.map +1 -1
- package/dist/workspace/trust/test-repo.d.ts +13 -0
- package/dist/workspace/trust/test-repo.d.ts.map +1 -1
- package/dist/workspace/trust/verify.d.ts +15 -0
- package/dist/workspace/trust/verify.d.ts.map +1 -1
- package/dist/workspace/work-cli.d.ts +39 -3
- package/dist/workspace/work-cli.d.ts.map +1 -1
- package/dist/workspace/work-evidence.d.ts +1 -1
- package/dist/workspace/work-evidence.d.ts.map +1 -1
- package/dist/workspace/work.d.ts +26 -1
- package/dist/workspace/work.d.ts.map +1 -1
- package/dist/workspace/workspace-principals.schema.json +60 -0
- package/dist/workspace/write-scope.d.ts +259 -0
- package/dist/workspace/write-scope.d.ts.map +1 -0
- package/dist/yaml.d.ts +21 -39
- package/dist/yaml.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/audit/prior-art.ts +15 -0
- package/src/build.ts +8 -0
- package/src/cli/build-options.ts +4 -1
- package/src/cli/commands/__fixtures__/init-lexicon-output/package.json +1 -1
- package/src/cli/commands/build.ts +2 -0
- package/src/cli/commands/carve-emit-state.test.ts +4 -0
- package/src/cli/commands/carve-emit.ts +5 -19
- package/src/cli/commands/check-lexicon.test.ts +62 -1
- package/src/cli/commands/check-lexicon.ts +36 -6
- package/src/cli/commands/import-live.test.ts +87 -1
- package/src/cli/commands/import-parser-options.test.ts +133 -0
- package/src/cli/commands/import.ts +69 -25
- package/src/cli/commands/init-lexicon/templates/project.ts +1 -1
- package/src/cli/commands/init.test.ts +8 -1
- package/src/cli/commands/init.ts +23 -8
- package/src/cli/commands/lint.test.ts +37 -0
- package/src/cli/commands/onboard.test.ts +53 -3
- package/src/cli/commands/onboard.ts +52 -4
- package/src/cli/commands/pinned-upgrade.ts +73 -33
- package/src/cli/handlers/__snapshots__/build-member.test.ts.snap +2 -2
- package/src/cli/handlers/components.ts +2 -2
- package/src/cli/handlers/dev.ts +8 -6
- package/src/cli/handlers/fan-out.test.ts +6 -6
- package/src/cli/handlers/fan-out.ts +2 -1
- package/src/cli/handlers/graph.test.ts +42 -0
- package/src/cli/handlers/graph.ts +22 -0
- package/src/cli/handlers/lifecycle.test.ts +67 -0
- package/src/cli/handlers/lifecycle.ts +6 -5
- package/src/cli/handlers/misc.ts +2 -0
- package/src/cli/handlers/operator.ts +88 -4
- package/src/cli/handlers/run.test.ts +111 -0
- package/src/cli/handlers/run.ts +85 -24
- package/src/cli/handlers/scenario.ts +2 -2
- package/src/cli/main.test.ts +33 -0
- package/src/cli/main.ts +168 -17
- package/src/cli/mcp/workspace-tools.test.ts +5 -2
- package/src/cli/mcp/workspace-tools.ts +62 -4
- package/src/cli/registry.ts +33 -2
- package/src/cli/serve-mcp-workspace.test.ts +1 -1
- package/src/codegen/pinned-upgrade-multi.test.ts +157 -0
- package/src/codegen/pinned-upgrade-tags.test.ts +112 -0
- package/src/codegen/pinned-upgrade.test.ts +104 -0
- package/src/codegen/pinned-upgrade.ts +250 -56
- package/src/codegen/release-wiring.test.ts +5 -1
- package/src/codegen/testdata/postgres-tags.json +242 -0
- package/src/components/fan-out-output.test.ts +1 -1
- package/src/components/fan-out.test.ts +1 -1
- package/src/components/promote.test.ts +1 -1
- package/src/config.test.ts +21 -0
- package/src/config.ts +27 -0
- package/src/content-digest.test.ts +2 -2
- package/src/declarable.test.ts +21 -0
- package/src/declarable.ts +19 -0
- package/src/discovery/fold-composite.test.ts +41 -5
- package/src/discovery/fold-import.test.ts +129 -0
- package/src/discovery/fold-import.ts +643 -131
- package/src/discovery/fold-package-composite.test.ts +264 -0
- package/src/discovery/fold-specifiers.test.ts +191 -0
- package/src/discovery/param-deps.test.ts +66 -1
- package/src/discovery/param-deps.ts +45 -0
- package/src/discovery/specifier-resolve.ts +344 -0
- package/src/fold/fold.test.ts +39 -1
- package/src/fold/fold.ts +83 -9
- package/src/fold-provenance.test.ts +140 -0
- package/src/graph-ir.test.ts +83 -0
- package/src/graph-ir.ts +29 -0
- package/src/import/embedded.test.ts +20 -0
- package/src/import/embedded.ts +13 -0
- package/src/import/parser-options.ts +46 -0
- package/src/import/parser.ts +20 -0
- package/src/lexicon.ts +79 -3
- package/src/lifecycle/gate-ledger.test.ts +14 -0
- package/src/lifecycle/gate-ledger.ts +18 -1
- package/src/lifecycle/observe.test.ts +18 -0
- package/src/lifecycle/observe.ts +6 -4
- package/src/lifecycle/plan-digest.test.ts +54 -3
- package/src/lifecycle/plan-digest.ts +38 -8
- package/src/lifecycle/snapshot.ts +2 -2
- package/src/lifecycle/work-lease.test.ts +1 -1
- package/src/lifecycle/work-lease.ts +93 -2
- package/src/lint/engine.test.ts +55 -0
- package/src/lint/engine.ts +30 -4
- package/src/lint/output-docs.test.ts +59 -56
- package/src/op/activities/activity-contracts.ts +1 -0
- package/src/op/activities/apply.test.ts +189 -5
- package/src/op/activities/apply.ts +230 -8
- package/src/op/activities/index.ts +3 -0
- package/src/op/activities/lexicon-upgrade.test.ts +160 -6
- package/src/op/activities/lexicon-upgrade.ts +154 -51
- package/src/op/activities/propose-upgrade.ts +8 -5
- package/src/op/composites/apply-op.ts +12 -5
- package/src/op/composites/composites.test.ts +30 -3
- package/src/op/composites/lexicon-upgrade-op.test.ts +7 -2
- package/src/op/composites/lexicon-upgrade-op.ts +29 -8
- package/src/op/emulator-lifecycle.test.ts +23 -0
- package/src/op/emulator-lifecycle.ts +52 -14
- package/src/op/gate-approval.test.ts +91 -0
- package/src/op/gate-approval.ts +5 -1
- package/src/op/gate.ts +34 -8
- package/src/op/index.ts +3 -1
- package/src/op/local-executor.test.ts +15 -0
- package/src/op/local-executor.ts +40 -12
- package/src/op/local-output.ts +1 -1
- package/src/op/operator.ts +4 -0
- package/src/op/run-context.test.ts +141 -0
- package/src/op/run-context.ts +51 -0
- package/src/op/runtimes/local.test.ts +14 -0
- package/src/op/runtimes/local.ts +2 -0
- package/src/op/steward-beside.ts +2 -0
- package/src/op/types.ts +8 -3
- package/src/op/work-lease-run.test.ts +47 -0
- package/src/op/work-lease-run.ts +73 -11
- package/src/provenance.ts +35 -0
- package/src/serializer.ts +9 -0
- package/src/telemetry-attribution.test.ts +91 -0
- package/src/telemetry-attribution.ts +145 -0
- package/src/workspace/__fixtures__/studio-template-84c8b21.json +1 -1
- package/src/workspace/agent-cli.ts +138 -0
- package/src/workspace/agent.schema.json +378 -0
- package/src/workspace/behold-kinds.test.ts +1 -1
- package/src/workspace/box-factory.test.ts +320 -0
- package/src/workspace/box-factory.ts +103 -0
- package/src/workspace/changes-cli.ts +5 -0
- package/src/workspace/changes.schema.json +171 -1
- package/src/workspace/changes.ts +61 -4
- package/src/workspace/check-live.test.ts +192 -0
- package/src/workspace/check.schema.json +64 -0
- package/src/workspace/checks/boxes.test.ts +2 -0
- package/src/workspace/checks/links.ts +23 -2
- package/src/workspace/checks/live.ts +113 -0
- package/src/workspace/checks.test.ts +2 -2
- package/src/workspace/checks.ts +49 -8
- package/src/workspace/compose-graph.test.ts +47 -0
- package/src/workspace/compose-graph.ts +127 -3
- package/src/workspace/conformance/__fixture__/decisions/decision.kind.mjs +7 -1
- package/src/workspace/conformance/__fixture__/decisions/decision.schema.json +5 -0
- package/src/workspace/conformance/__writer_fixture__/answers/answer.kind.mjs +27 -0
- package/src/workspace/conformance/__writer_fixture__/answers/answer.schema.json +95 -0
- package/src/workspace/conformance/__writer_fixture__/decisions/points.json +132 -0
- package/src/workspace/conformance/__writer_fixture__/sessions/session.kind.mjs +48 -0
- package/src/workspace/conformance/__writer_fixture__/sessions/session.schema.json +108 -0
- package/src/workspace/conformance/__writer_fixture__/work/W-001-the-writer-suite-works-this-item.md +25 -0
- package/src/workspace/conformance/__writer_fixture__/work/work.kind.mjs +60 -0
- package/src/workspace/conformance/__writer_fixture__/work/work.schema.json +578 -0
- package/src/workspace/conformance/conformance.e2e.test.ts +35 -3
- package/src/workspace/conformance/index.mjs +30 -3
- package/src/workspace/conformance/index.ts +103 -15
- package/src/workspace/conformance/vitest.ts +44 -2
- package/src/workspace/conformance/writer-conformance.e2e.test.ts +131 -0
- package/src/workspace/conformance/writer.test.ts +156 -0
- package/src/workspace/conformance/writer.ts +880 -0
- package/src/workspace/decide.ts +7 -1
- package/src/workspace/declaration.schema.json +368 -4
- package/src/workspace/declaration.ts +270 -1
- package/src/workspace/declared-kinds.test.ts +33 -0
- package/src/workspace/evidence.schema.json +279 -0
- package/src/workspace/export-cli.ts +180 -0
- package/src/workspace/export-import.test.ts +282 -0
- package/src/workspace/export.ts +486 -0
- package/src/workspace/graph-cli.ts +51 -2
- package/src/workspace/graph-contract.test.ts +89 -4
- package/src/workspace/graph.schema.json +453 -1
- package/src/workspace/identity.test.ts +196 -0
- package/src/workspace/identity.ts +186 -0
- package/src/workspace/import.ts +325 -0
- package/src/workspace/intent-cli.ts +64 -10
- package/src/workspace/intent-record.schema.json +208 -0
- package/src/workspace/intent-record.ts +35 -1
- package/src/workspace/intent-why.test.ts +274 -0
- package/src/workspace/intent.schema.json +718 -7
- package/src/workspace/intent.test.ts +11 -2
- package/src/workspace/intent.ts +495 -32
- package/src/workspace/kinds.test.ts +5 -5
- package/src/workspace/kinds.ts +62 -33
- package/src/workspace/lineage-adopt-cli.ts +103 -0
- package/src/workspace/lineage-adopt.test.ts +552 -0
- package/src/workspace/lineage-adopt.ts +452 -0
- package/src/workspace/lineage-check.ts +26 -5
- package/src/workspace/lineage-cli.ts +12 -2
- package/src/workspace/lineage-hash-index.ts +305 -0
- package/src/workspace/lineage-init.test.ts +9 -0
- package/src/workspace/lineage-init.ts +29 -9
- package/src/workspace/lineage-lock.ts +54 -0
- package/src/workspace/lineage-migrations.test.ts +27 -0
- package/src/workspace/lineage-migrations.ts +44 -14
- package/src/workspace/lineage-provenance.ts +40 -0
- package/src/workspace/lineage-upgrade-cli.ts +9 -5
- package/src/workspace/lineage-upgrade.test.ts +92 -1
- package/src/workspace/lineage-upgrade.ts +111 -16
- package/src/workspace/lineage-versions.ts +348 -0
- package/src/workspace/links.test.ts +121 -2
- package/src/workspace/links.ts +97 -6
- package/src/workspace/ls-contract.test.ts +84 -1
- package/src/workspace/ls-generated.ts +111 -0
- package/src/workspace/ls.schema.json +19 -0
- package/src/workspace/ls.ts +8 -1
- package/src/workspace/member-commands.ts +3 -1
- package/src/workspace/nested-graph.test.ts +176 -0
- package/src/workspace/nested-graph.ts +169 -0
- package/src/workspace/nesting.ts +37 -0
- package/src/workspace/pin-cli.test.ts +71 -0
- package/src/workspace/pin-cli.ts +57 -0
- package/src/workspace/pin-integrity.test.ts +121 -0
- package/src/workspace/pin-integrity.ts +104 -0
- package/src/workspace/points-write.schema.json +2 -0
- package/src/workspace/principal-classes.test.ts +175 -0
- package/src/workspace/principal-classes.ts +307 -0
- package/src/workspace/read-contract.test.ts +24 -0
- package/src/workspace/reason-codes.test.ts +20 -2
- package/src/workspace/reason-codes.ts +53 -3
- package/src/workspace/record-sessions.ts +12 -14
- package/src/workspace/records-amend.schema.json +6 -0
- package/src/workspace/records-checkout.ts +106 -0
- package/src/workspace/records-cli.ts +195 -22
- package/src/workspace/records-close.schema.json +7 -2
- package/src/workspace/records-close.ts +10 -2
- package/src/workspace/records-formats.test.ts +13 -5
- package/src/workspace/records-new.schema.json +6 -0
- package/src/workspace/records-review.schema.json +6 -0
- package/src/workspace/records-sessions.test.ts +23 -6
- package/src/workspace/records-uncommitted.test.ts +171 -0
- package/src/workspace/records-write.test.ts +65 -8
- package/src/workspace/records-write.ts +92 -6
- package/src/workspace/records.schema.json +127 -4
- package/src/workspace/records.ts +123 -5
- package/src/workspace/returns.ts +328 -0
- package/src/workspace/runs-cli.ts +381 -0
- package/src/workspace/runs-write.schema.json +583 -0
- package/src/workspace/runs.schema.json +810 -0
- package/src/workspace/runs.test.ts +242 -0
- package/src/workspace/runs.ts +709 -0
- package/src/workspace/signers.schema.json +206 -0
- package/src/workspace/status-contract.test.ts +5 -0
- package/src/workspace/status-gates.ts +24 -9
- package/src/workspace/status.schema.json +127 -2
- package/src/workspace/status.ts +21 -1
- package/src/workspace/symbols.ts +180 -0
- package/src/workspace/template-manifest.ts +22 -4
- package/src/workspace/trailer-joins.test.ts +171 -0
- package/src/workspace/trailer-joins.ts +82 -0
- package/src/workspace/trailers.ts +148 -0
- package/src/workspace/trust/attestor.ts +15 -0
- package/src/workspace/trust/dsse.ts +134 -0
- package/src/workspace/trust/evidence-cli.ts +195 -0
- package/src/workspace/trust/evidence.test.ts +241 -0
- package/src/workspace/trust/evidence.ts +207 -0
- package/src/workspace/trust/policy.ts +110 -3
- package/src/workspace/trust/provenance.ts +41 -4
- package/src/workspace/trust/record-seal.test.ts +1 -1
- package/src/workspace/trust/rotation.test.ts +258 -0
- package/src/workspace/trust/rotation.ts +336 -0
- package/src/workspace/trust/seal.ts +63 -1
- package/src/workspace/trust/signers-cli.ts +178 -0
- package/src/workspace/trust/ssh-commit.ts +53 -4
- package/src/workspace/trust/test-repo.ts +18 -0
- package/src/workspace/trust/trust.test.ts +8 -2
- package/src/workspace/trust/verify-cli.ts +1 -0
- package/src/workspace/trust/verify.ts +22 -0
- package/src/workspace/work-cli.e2e.test.ts +28 -1
- package/src/workspace/work-cli.ts +133 -8
- package/src/workspace/work-evidence.schema.json +6 -0
- package/src/workspace/work-history.schema.json +73 -1
- package/src/workspace/work-history.test.ts +48 -5
- package/src/workspace/work-kind-fields.test.ts +154 -0
- package/src/workspace/work-lease.schema.json +14 -1
- package/src/workspace/work.ts +82 -0
- package/src/workspace/workspace-principals.schema.json +60 -0
- package/src/workspace/write-scope.test.ts +466 -0
- package/src/workspace/write-scope.ts +573 -0
- package/src/yaml.test.ts +111 -1
- package/src/yaml.ts +141 -549
|
@@ -26,9 +26,12 @@
|
|
|
26
26
|
* the merge base and the target version, so an unedited file carrying a value
|
|
27
27
|
* still has its recorded hash.
|
|
28
28
|
*
|
|
29
|
-
* `hostBound`
|
|
30
|
-
*
|
|
31
|
-
*
|
|
29
|
+
* A parameter marked `hostBound` holds a value that differs per host, such
|
|
30
|
+
* as the domain a hosted service serves the app on. Its value is recorded in
|
|
31
|
+
* `parameters` like any other, and the lineage also records, under
|
|
32
|
+
* `hostBound`, the files whose template text carries it, so `chant workspace
|
|
33
|
+
* export` can switch the value for the export and `import` can switch it
|
|
34
|
+
* back without fetching the template (#2552).
|
|
32
35
|
*/
|
|
33
36
|
import { z } from "zod";
|
|
34
37
|
import { LockError } from "./lineage-lock.js";
|
|
@@ -86,5 +89,10 @@ export declare function substituteParameters(files: Map<string, Buffer>, manifes
|
|
|
86
89
|
* one it adds. A recorded parameter the version no longer declares is dropped.
|
|
87
90
|
*/
|
|
88
91
|
export declare function carryParameters(manifest: TemplateManifest | null, recorded: Record<string, unknown>): Record<string, string>;
|
|
92
|
+
/**
|
|
93
|
+
* The host-bound parameters of a template (#2552), each with the listed files
|
|
94
|
+
* whose text carries its placeholder. Undefined when the template declares none.
|
|
95
|
+
*/
|
|
96
|
+
export declare function hostBoundFiles(files: Map<string, Buffer>, manifest: TemplateManifest | null): Record<string, string[]> | undefined;
|
|
89
97
|
export {};
|
|
90
98
|
//# sourceMappingURL=template-manifest.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"template-manifest.d.ts","sourceRoot":"","sources":["../../src/workspace/template-manifest.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"template-manifest.d.ts","sourceRoot":"","sources":["../../src/workspace/template-manifest.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C,MAAM,EAAE,MAAM,CAAC,CAiBrB;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,gBAAgB,GAAG,IAAI,EAAE,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAO5H;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,QAAQ,EAAE,gBAAgB,GAAG,IAAI,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,GAAG,SAAS,CASlI"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Joining a commit through chant's own trailers (#3149, ws-075), for `graph
|
|
3
|
+
* --intent` and `graph --intent --record`.
|
|
4
|
+
*
|
|
5
|
+
* A plugin's `commitJoins` reads a kind's own trailers (`intent-joins.ts`).
|
|
6
|
+
* These are core's: a `Chant-Record` names a record by kind and id, and a
|
|
7
|
+
* `Chant-Lease` names a work lease by its fencing token, which the lease
|
|
8
|
+
* histories on `chant/lifecycle` turn into the work item it was taken on.
|
|
9
|
+
* Both read the local branch and never fetch.
|
|
10
|
+
*/
|
|
11
|
+
import { type AppliedTrailers, type ChantTrailers } from "./trailers.js";
|
|
12
|
+
/** What chant's trailers on one commit join it to, as a commit in `graph --intent` reports it. */
|
|
13
|
+
export interface CommitTrailerJoins {
|
|
14
|
+
/** `Chant-Agent`: the agent session that wrote the commit. */
|
|
15
|
+
agent: string | null;
|
|
16
|
+
/** `Chant-Lease`: the work lease's token, and the work item a lease history on `chant/lifecycle` names for it, or null when none does. */
|
|
17
|
+
lease: {
|
|
18
|
+
token: string;
|
|
19
|
+
item: string | null;
|
|
20
|
+
} | null;
|
|
21
|
+
/** `Chant-Run`: the agent run that made the commit. */
|
|
22
|
+
run: string | null;
|
|
23
|
+
/** Each `Chant-Record`, with the id of its node in the graph, or null when no kind read has the record. */
|
|
24
|
+
records: {
|
|
25
|
+
kind: string;
|
|
26
|
+
id: string;
|
|
27
|
+
node: string | null;
|
|
28
|
+
}[];
|
|
29
|
+
/** The `Chant-Applied-*` trailers of a commit that applied a leased branch. */
|
|
30
|
+
applied: AppliedTrailers | null;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* The work item each lease token names, from the lease histories
|
|
34
|
+
* (`_leases/<item>.jsonl`, any member's) on the local `chant/lifecycle`
|
|
35
|
+
* branch. A token no history names is left out. Never fetches.
|
|
36
|
+
*/
|
|
37
|
+
export declare function leaseItemsByToken(top: string, tokens: string[]): Map<string, string>;
|
|
38
|
+
/** Read chant's trailers from each commit, and the work items their lease tokens name. */
|
|
39
|
+
export declare function readTrailerJoins(top: string, commits: {
|
|
40
|
+
sha: string;
|
|
41
|
+
trailers: Record<string, string[]>;
|
|
42
|
+
}[]): Map<string, {
|
|
43
|
+
trailers: ChantTrailers;
|
|
44
|
+
joins: CommitTrailerJoins;
|
|
45
|
+
}>;
|
|
46
|
+
//# sourceMappingURL=trailer-joins.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trailer-joins.d.ts","sourceRoot":"","sources":["../../src/workspace/trailer-joins.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,OAAO,EAAqB,KAAK,eAAe,EAAE,KAAK,aAAa,EAAE,MAAM,YAAY,CAAC;AAKzF,kGAAkG;AAClG,MAAM,WAAW,kBAAkB;IACjC,8DAA8D;IAC9D,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,0IAA0I;IAC1I,KAAK,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,GAAG,IAAI,CAAC;IACrD,uDAAuD;IACvD,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,2GAA2G;IAC3G,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,EAAE,CAAC;IAC7D,+EAA+E;IAC/E,OAAO,EAAE,eAAe,GAAG,IAAI,CAAC;CACjC;AAUD;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAapF;AAED,0FAA0F;AAC1F,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAA;CAAE,EAAE,GAAG,GAAG,CAAC,MAAM,EAAE;IAAE,QAAQ,EAAE,aAAa,CAAC;IAAC,KAAK,EAAE,kBAAkB,CAAA;CAAE,CAAC,CAoBjL"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* chant's commit trailers (#3149, ws-075): the vocabulary a commit uses to
|
|
3
|
+
* name the lease, the agent run, the records and the apply behind it.
|
|
4
|
+
*
|
|
5
|
+
* A trailer is how a commit points at a fact kept elsewhere: a work lease on
|
|
6
|
+
* `chant/lifecycle`, an agent run in the run ledger (#3033), a record in the
|
|
7
|
+
* working tree. Provenance is keyed to those ids, never to commit SHAs, so a
|
|
8
|
+
* commit that keeps its message through a rebase or a cherry-pick keeps its
|
|
9
|
+
* joins (#3037). chant never writes a commit itself (ws-074): whoever makes
|
|
10
|
+
* the commit adds the trailers, and chant reads them back in `graph
|
|
11
|
+
* --intent`, `graph --intent --record` and `workspace runs`.
|
|
12
|
+
*
|
|
13
|
+
* | Trailer | Value | Names |
|
|
14
|
+
* |---|---|---|
|
|
15
|
+
* | `Chant-Agent` | an agent session | the session that wrote the commit (ws-067) |
|
|
16
|
+
* | `Chant-Lease` | a fencing token | the work lease the commit was made under |
|
|
17
|
+
* | `Chant-Run` | a run id | the agent run that made the commit (#3033) |
|
|
18
|
+
* | `Chant-Record` | `<kind>:<id>` | a record the commit carries out or changes; repeatable |
|
|
19
|
+
* | `Chant-Applied-By` | a principal | who applied a leased branch, on the apply commit |
|
|
20
|
+
* | `Chant-Applied-At` | ISO 8601 | when it was applied |
|
|
21
|
+
* | `Chant-Applied-Commit` | a commit id | the tip of the branch that was applied |
|
|
22
|
+
*
|
|
23
|
+
* Every other trailer is a plugin's, and core gives it no meaning; a kind's
|
|
24
|
+
* `commitJoins` may (`intent-joins.ts`).
|
|
25
|
+
*/
|
|
26
|
+
/** The agent session that wrote a commit (ws-067). */
|
|
27
|
+
export declare const AGENT_TRAILER = "Chant-Agent";
|
|
28
|
+
/** The fencing token of the work lease a commit was made under. */
|
|
29
|
+
export declare const LEASE_TRAILER = "Chant-Lease";
|
|
30
|
+
/** The agent run that made a commit (#3033). */
|
|
31
|
+
export declare const RUN_TRAILER = "Chant-Run";
|
|
32
|
+
/** A record a commit carries out or changes, as `<kind>:<id>`. Repeatable. */
|
|
33
|
+
export declare const RECORD_TRAILER = "Chant-Record";
|
|
34
|
+
/** Who applied a leased branch, on the commit that applied it. */
|
|
35
|
+
export declare const APPLIED_BY_TRAILER = "Chant-Applied-By";
|
|
36
|
+
/** When the branch was applied, ISO 8601. */
|
|
37
|
+
export declare const APPLIED_AT_TRAILER = "Chant-Applied-At";
|
|
38
|
+
/** The tip of the branch that was applied. */
|
|
39
|
+
export declare const APPLIED_COMMIT_TRAILER = "Chant-Applied-Commit";
|
|
40
|
+
/** Every trailer key core reads, in the order a writer should add them. */
|
|
41
|
+
export declare const CHANT_TRAILERS: readonly ["Chant-Agent", "Chant-Lease", "Chant-Run", "Chant-Record", "Chant-Applied-By", "Chant-Applied-At", "Chant-Applied-Commit"];
|
|
42
|
+
/** One `Chant-Record` value. */
|
|
43
|
+
export interface RecordRef {
|
|
44
|
+
/** The record kind's name, such as `decision` or `work`. */
|
|
45
|
+
kind: string;
|
|
46
|
+
id: string;
|
|
47
|
+
}
|
|
48
|
+
/** An apply, from the `Chant-Applied-*` trailers. */
|
|
49
|
+
export interface AppliedTrailers {
|
|
50
|
+
by: string;
|
|
51
|
+
/** ISO 8601, or null when the trailer is missing. */
|
|
52
|
+
at: string | null;
|
|
53
|
+
/** The applied branch's tip, or null when the trailer is missing or is not a commit id. */
|
|
54
|
+
commit: string | null;
|
|
55
|
+
}
|
|
56
|
+
/** What chant's own trailers on one commit say. */
|
|
57
|
+
export interface ChantTrailers {
|
|
58
|
+
agent: string | null;
|
|
59
|
+
lease: string | null;
|
|
60
|
+
run: string | null;
|
|
61
|
+
/** Each well-formed `Chant-Record` value, in order, without repeats. */
|
|
62
|
+
records: RecordRef[];
|
|
63
|
+
applied: AppliedTrailers | null;
|
|
64
|
+
}
|
|
65
|
+
/** Parse one `Chant-Record` value, `<kind>:<id>`, or undefined when it is not one. */
|
|
66
|
+
export declare function parseRecordRef(value: string): RecordRef | undefined;
|
|
67
|
+
/** Read chant's own trailers from a commit's parsed trailers. Keys compare without case, as git's do. */
|
|
68
|
+
export declare function readChantTrailers(trailers: Record<string, string[]>): ChantTrailers;
|
|
69
|
+
/** Whether a commit carries any of chant's own trailers. */
|
|
70
|
+
export declare function hasChantTrailers(t: ChantTrailers): boolean;
|
|
71
|
+
/** What a writer passes to {@link formatChantTrailers}. */
|
|
72
|
+
export interface ChantTrailerInput {
|
|
73
|
+
agent?: string;
|
|
74
|
+
lease?: string;
|
|
75
|
+
run?: string;
|
|
76
|
+
records?: (RecordRef | string)[];
|
|
77
|
+
applied?: {
|
|
78
|
+
by: string;
|
|
79
|
+
at?: string;
|
|
80
|
+
commit?: string;
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* The trailer lines for a commit message, in {@link CHANT_TRAILERS} order.
|
|
85
|
+
* Throws when a value holds a line break or a record ref is malformed, since
|
|
86
|
+
* either would write a trailer git parses differently.
|
|
87
|
+
*/
|
|
88
|
+
export declare function formatChantTrailers(input: ChantTrailerInput): string[];
|
|
89
|
+
//# sourceMappingURL=trailers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trailers.d.ts","sourceRoot":"","sources":["../../src/workspace/trailers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAIH,sDAAsD;AACtD,eAAO,MAAM,aAAa,gBAAgB,CAAC;AAC3C,mEAAmE;AACnE,eAAO,MAAM,aAAa,gBAAgB,CAAC;AAC3C,gDAAgD;AAChD,eAAO,MAAM,WAAW,cAAc,CAAC;AACvC,8EAA8E;AAC9E,eAAO,MAAM,cAAc,iBAAiB,CAAC;AAC7C,kEAAkE;AAClE,eAAO,MAAM,kBAAkB,qBAAqB,CAAC;AACrD,6CAA6C;AAC7C,eAAO,MAAM,kBAAkB,qBAAqB,CAAC;AACrD,8CAA8C;AAC9C,eAAO,MAAM,sBAAsB,yBAAyB,CAAC;AAE7D,2EAA2E;AAC3E,eAAO,MAAM,cAAc,sIAAuI,CAAC;AAQnK,gCAAgC;AAChC,MAAM,WAAW,SAAS;IACxB,4DAA4D;IAC5D,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,qDAAqD;AACrD,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,qDAAqD;IACrD,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IAClB,2FAA2F;IAC3F,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB;AAED,mDAAmD;AACnD,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,wEAAwE;IACxE,OAAO,EAAE,SAAS,EAAE,CAAC;IACrB,OAAO,EAAE,eAAe,GAAG,IAAI,CAAC;CACjC;AAED,sFAAsF;AACtF,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,CAMnE;AAED,yGAAyG;AACzG,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,GAAG,aAAa,CAenF;AAED,4DAA4D;AAC5D,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,aAAa,GAAG,OAAO,CAE1D;AAED,2DAA2D;AAC3D,MAAM,WAAW,iBAAiB;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,CAAC,SAAS,GAAG,MAAM,CAAC,EAAE,CAAC;IACjC,OAAO,CAAC,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,EAAE,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CACxD;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,iBAAiB,GAAG,MAAM,EAAE,CAuBtE"}
|
|
@@ -51,6 +51,12 @@ export interface CommitAttestor {
|
|
|
51
51
|
/** A stable name, such as `ssh-commit`. */
|
|
52
52
|
readonly name: string;
|
|
53
53
|
attestCommit(ctx: AttestorContext, commit: string): CommitAttestation;
|
|
54
|
+
/**
|
|
55
|
+
* Judge a commit object that is not in this repository, given its raw bytes
|
|
56
|
+
* (`git cat-file commit` output), such as one a return carries (#2552).
|
|
57
|
+
* Optional: an attestor without it is not asked.
|
|
58
|
+
*/
|
|
59
|
+
attestRaw?(ctx: AttestorContext, raw: Buffer): CommitAttestation;
|
|
54
60
|
}
|
|
55
61
|
/** Add an attestor. Later registrations are asked after earlier ones. */
|
|
56
62
|
export declare function registerAttestor(attestor: CommitAttestor): void;
|
|
@@ -62,6 +68,8 @@ export declare function resetAttestors(): void;
|
|
|
62
68
|
* can check is still reported as there.
|
|
63
69
|
*/
|
|
64
70
|
export declare function attestCommit(ctx: AttestorContext, commit: string, attestors: readonly CommitAttestor[]): CommitAttestation;
|
|
71
|
+
/** {@link attestCommit} for a raw commit object, asking only the attestors that judge one. */
|
|
72
|
+
export declare function attestRawCommit(ctx: AttestorContext, raw: Buffer, attestors: readonly CommitAttestor[]): CommitAttestation;
|
|
65
73
|
/** The attestors in use: the built-in ones first, then any registered. */
|
|
66
74
|
export declare function activeAttestors(): Promise<CommitAttestor[]>;
|
|
67
75
|
//# sourceMappingURL=attestor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attestor.d.ts","sourceRoot":"","sources":["../../../src/workspace/trust/attestor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,iBAAiB,
|
|
1
|
+
{"version":3,"file":"attestor.d.ts","sourceRoot":"","sources":["../../../src/workspace/trust/attestor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,iBAAiB,YAAI,UAAU,EAAE,4BAA4B,EAAE,SAAS,eAA+B,CAAC;AACrH,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEjE,+CAA+C;AAC/C,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,UAAU,GAAG,4BAA4B,GAAG,YAAY,CAAC;IAChE,0CAA0C;IAC1C,QAAQ,EAAE,MAAM,CAAC;IACjB,yDAAyD;IACzD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yCAAyC;IACzC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,kDAAkD;IAClD,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,wDAAwD;AACxD,MAAM,WAAW,eAAe;IAC9B,sCAAsC;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,+BAA+B;IAC/B,MAAM,EAAE,WAAW,CAAC;CACrB;AAED,iDAAiD;AACjD,MAAM,WAAW,cAAc;IAC7B,2CAA2C;IAC3C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,GAAG,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,GAAG,iBAAiB,CAAC;IACtE;;;;OAIG;IACH,SAAS,CAAC,CAAC,GAAG,EAAE,eAAe,EAAE,GAAG,EAAE,MAAM,GAAG,iBAAiB,CAAC;CAClE;AAID,yEAAyE;AACzE,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,cAAc,GAAG,IAAI,CAE/D;AAED,+EAA+E;AAC/E,wBAAgB,cAAc,IAAI,IAAI,CAErC;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,cAAc,EAAE,GAAG,iBAAiB,CAQ1H;AAED,8FAA8F;AAC9F,wBAAgB,eAAe,CAAC,GAAG,EAAE,eAAe,EAAE,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,cAAc,EAAE,GAAG,iBAAiB,CAM1H;AAED,0EAA0E;AAC1E,wBAAsB,eAAe,IAAI,OAAO,CAAC,cAAc,EAAE,CAAC,CAGjE"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DSSE envelopes (https://github.com/secure-systems-lab/dsse, v1) signed with
|
|
3
|
+
* Ed25519 runner keys (#2553).
|
|
4
|
+
*
|
|
5
|
+
* The signature covers the pre-authentication encoding (PAE) of the payload
|
|
6
|
+
* type and the payload, never the payload alone, so an envelope cannot be
|
|
7
|
+
* replayed under another type. Everything here runs offline: verifying needs
|
|
8
|
+
* the envelope and the public key, nothing else.
|
|
9
|
+
*
|
|
10
|
+
* Public keys are written the way ssh writes them (`ssh-ed25519 AAAA...`), so
|
|
11
|
+
* the runner keys in `.chant/trust.json` read like the signers file beside
|
|
12
|
+
* them, and a key id is the key's ssh fingerprint (`SHA256:...`).
|
|
13
|
+
*/
|
|
14
|
+
import { type KeyObject } from "node:crypto";
|
|
15
|
+
export declare const IN_TOTO_PAYLOAD_TYPE = "application/vnd.in-toto+json";
|
|
16
|
+
export interface DsseSignature {
|
|
17
|
+
keyid: string;
|
|
18
|
+
sig: string;
|
|
19
|
+
}
|
|
20
|
+
export interface DsseEnvelope {
|
|
21
|
+
payloadType: string;
|
|
22
|
+
/** Base64 of the payload bytes. */
|
|
23
|
+
payload: string;
|
|
24
|
+
signatures: DsseSignature[];
|
|
25
|
+
}
|
|
26
|
+
/** DSSE v1 pre-authentication encoding. Lengths are byte lengths in ASCII decimal. */
|
|
27
|
+
export declare function pae(payloadType: string, payload: Buffer): Buffer;
|
|
28
|
+
/** The 32 raw bytes of an `ssh-ed25519 <base64>` public key. */
|
|
29
|
+
export declare function ed25519FromSsh(line: string): Buffer;
|
|
30
|
+
/** An `ssh-ed25519 <base64>` line for 32 raw public key bytes. */
|
|
31
|
+
export declare function sshFromEd25519(raw: Buffer): string;
|
|
32
|
+
/** The ssh fingerprint of a public key line: `SHA256:` and unpadded base64. */
|
|
33
|
+
export declare function sshFingerprint(line: string): string;
|
|
34
|
+
/** A private Ed25519 key from PEM (PKCS#8), and its public half as an ssh line. */
|
|
35
|
+
export declare function loadRunnerKey(pem: string): {
|
|
36
|
+
key: KeyObject;
|
|
37
|
+
publicKey: string;
|
|
38
|
+
};
|
|
39
|
+
export declare function signEnvelope(payloadType: string, payload: Buffer, key: KeyObject, publicKey: string): DsseEnvelope;
|
|
40
|
+
export interface TrustedKey {
|
|
41
|
+
principal: string;
|
|
42
|
+
/** `ssh-ed25519 <base64>`. */
|
|
43
|
+
key: string;
|
|
44
|
+
}
|
|
45
|
+
export type EnvelopeVerdict = {
|
|
46
|
+
ok: true;
|
|
47
|
+
principal: string;
|
|
48
|
+
keyid: string;
|
|
49
|
+
payloadType: string;
|
|
50
|
+
payload: Buffer;
|
|
51
|
+
} | {
|
|
52
|
+
ok: false;
|
|
53
|
+
code: "envelope-invalid" | "envelope-untrusted";
|
|
54
|
+
reason: string;
|
|
55
|
+
};
|
|
56
|
+
/** Verify an envelope against `trusted`. One valid signature by a trusted key is enough. */
|
|
57
|
+
export declare function verifyEnvelope(envelope: unknown, trusted: readonly TrustedKey[]): EnvelopeVerdict;
|
|
58
|
+
//# sourceMappingURL=dsse.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dsse.d.ts","sourceRoot":"","sources":["../../../src/workspace/trust/dsse.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAA+D,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AAE1G,eAAO,MAAM,oBAAoB,iCAAiC,CAAC;AAEnE,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,YAAY;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,mCAAmC;IACnC,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,aAAa,EAAE,CAAC;CAC7B;AAED,sFAAsF;AACtF,wBAAgB,GAAG,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAGhE;AAWD,gEAAgE;AAChE,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CASnD;AAED,kEAAkE;AAClE,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAOlD;AAED,+EAA+E;AAC/E,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAGnD;AAMD,mFAAmF;AACnF,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG;IAAE,GAAG,EAAE,SAAS,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAKhF;AAID,wBAAgB,YAAY,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,GAAG,YAAY,CAGlH;AAED,MAAM,WAAW,UAAU;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,8BAA8B;IAC9B,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,MAAM,eAAe,GACvB;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GACpF;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,IAAI,EAAE,kBAAkB,GAAG,oBAAoB,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAEnF,4FAA4F;AAC5F,wBAAgB,cAAc,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,UAAU,EAAE,GAAG,eAAe,CAmBjG"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `chant workspace evidence sign|verify` (#2553): runner evidence over the
|
|
3
|
+
* records a kind locates, in a DSSE envelope. See ./evidence.ts.
|
|
4
|
+
*
|
|
5
|
+
* `sign` runs in CI or in a service, with a runner key the policy at base
|
|
6
|
+
* lists. It refuses a key the signers file lists: evidence is a machine's
|
|
7
|
+
* statement, and a developer's key cannot make one. `verify` needs no
|
|
8
|
+
* network and no key, only the envelope and the repository.
|
|
9
|
+
*
|
|
10
|
+
* With `--json`, `verify` prints the `evidence.schema.json` document, and a
|
|
11
|
+
* refused `sign` prints its failure branch.
|
|
12
|
+
*/
|
|
13
|
+
import type { CommandContext } from "../../cli/registry.js";
|
|
14
|
+
import { type DsseEnvelope } from "./dsse.js";
|
|
15
|
+
import { type EvidenceErrorCode, type EvidenceStatement, type EvidenceVerdict } from "./evidence.js";
|
|
16
|
+
export declare const EVIDENCE_CONTRACT_VERSION = 1;
|
|
17
|
+
export declare const EVIDENCE_OUTPUT_SCHEMA_ID = "https://intentius.io/chant/schemas/workspace/evidence/v1/evidence.schema.json";
|
|
18
|
+
export interface EvidenceFailure {
|
|
19
|
+
code: EvidenceErrorCode;
|
|
20
|
+
message: string;
|
|
21
|
+
}
|
|
22
|
+
/** What `evidence verify --json` prints, and a refused `evidence sign --json`. */
|
|
23
|
+
export type EvidenceDocument = ({
|
|
24
|
+
$schema: string;
|
|
25
|
+
contract: number;
|
|
26
|
+
chant: string;
|
|
27
|
+
at: string;
|
|
28
|
+
} & Extract<EvidenceVerdict, {
|
|
29
|
+
ok: true;
|
|
30
|
+
}>) | {
|
|
31
|
+
$schema: string;
|
|
32
|
+
contract: number;
|
|
33
|
+
chant: string;
|
|
34
|
+
at: string | null;
|
|
35
|
+
error: EvidenceFailure;
|
|
36
|
+
};
|
|
37
|
+
export declare function runWorkspaceEvidence(ctx: CommandContext): Promise<number>;
|
|
38
|
+
export interface SignRequest {
|
|
39
|
+
repo: string;
|
|
40
|
+
/** The kind file, resolved against `cwd`. */
|
|
41
|
+
kind: string;
|
|
42
|
+
cwd: string;
|
|
43
|
+
keyPem: string;
|
|
44
|
+
checkId: string;
|
|
45
|
+
at?: string;
|
|
46
|
+
base?: string;
|
|
47
|
+
claim?: Buffer;
|
|
48
|
+
environment?: Buffer;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Build and sign evidence, or say why not. Refuses a key the signers file
|
|
52
|
+
* lists, and a key the policy at base does not list as a runner.
|
|
53
|
+
*/
|
|
54
|
+
export declare function signRecordsEvidence(req: SignRequest): Promise<{
|
|
55
|
+
envelope: DsseEnvelope;
|
|
56
|
+
statement: EvidenceStatement;
|
|
57
|
+
runner: string;
|
|
58
|
+
} | {
|
|
59
|
+
error: EvidenceFailure;
|
|
60
|
+
}>;
|
|
61
|
+
/** Verify an envelope file at `at` against the runner keys at base, as the document `--json` prints. */
|
|
62
|
+
export declare function verifyEvidenceFile(repo: string, envelopePath: string, opts?: {
|
|
63
|
+
at?: string;
|
|
64
|
+
base?: string;
|
|
65
|
+
}): EvidenceDocument;
|
|
66
|
+
//# sourceMappingURL=evidence-cli.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"evidence-cli.d.ts","sourceRoot":"","sources":["../../../src/workspace/trust/evidence-cli.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAIzD,OAAO,EAAiB,KAAK,YAAY,EAAE,MAAM,QAAQ,CAAC;AAC1D,OAAO,EAAsE,KAAK,iBAAiB,EAAE,KAAK,iBAAiB,EAAE,KAAK,eAAe,EAAE,MAAM,YAAY,CAAC;AAGtK,eAAO,MAAM,yBAAyB,IAAI,CAAC;AAC3C,eAAO,MAAM,yBAAyB,kFAAkF,CAAC;AAMzH,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,iBAAiB,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,kFAAkF;AAClF,MAAM,MAAM,gBAAgB,GACxB,CAAC;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,eAAe,EAAE;IAAE,EAAE,EAAE,IAAI,CAAA;CAAE,CAAC,CAAC,GAC3G;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,KAAK,EAAE,eAAe,CAAA;CAAE,CAAC;AAqBpG,wBAAsB,oBAAoB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAO/E;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,6CAA6C;IAC7C,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;GAGG;AACH,wBAAsB,mBAAmB,CACvC,GAAG,EAAE,WAAW,GACf,OAAO,CAAC;IAAE,QAAQ,EAAE,YAAY,CAAC;IAAC,SAAS,EAAE,iBAAiB,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,KAAK,EAAE,eAAe,CAAA;CAAE,CAAC,CA8ChH;AA2BD,wGAAwG;AACxG,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,IAAI,GAAE;IAAE,EAAE,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAO,GAAG,gBAAgB,CAgBlI"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Runner evidence (#2553, #2524 D5 "Evidence").
|
|
3
|
+
*
|
|
4
|
+
* A runner, meaning a CI job or a service, states that a check ran over a
|
|
5
|
+
* set of records at one commit. The statement is an in-toto Statement v1:
|
|
6
|
+
* each record is a subject, named by its path and hashed, and the predicate
|
|
7
|
+
* binds the commit, its tree, the check, and the digests of the claim and of
|
|
8
|
+
* the environment when given. The runner signs it in a DSSE envelope with its
|
|
9
|
+
* own Ed25519 key.
|
|
10
|
+
*
|
|
11
|
+
* Verifying needs only the envelope, the repository's objects and the runner
|
|
12
|
+
* keys the policy at base lists, so it works offline. Evidence is never
|
|
13
|
+
* reused on trust: a verdict reports, subject by subject, whether the records
|
|
14
|
+
* still hash the same, and evidence for records that changed is `stale`.
|
|
15
|
+
*/
|
|
16
|
+
import { z } from "zod";
|
|
17
|
+
import { type DsseEnvelope } from "./dsse.js";
|
|
18
|
+
import type { KeyObject } from "node:crypto";
|
|
19
|
+
import type { RunnerKey } from "./policy.js";
|
|
20
|
+
export declare const STATEMENT_TYPE = "https://in-toto.io/Statement/v1";
|
|
21
|
+
export declare const RUNNER_EVIDENCE_PREDICATE = "https://intentius.io/chant/runner-evidence/v1";
|
|
22
|
+
/**
|
|
23
|
+
* Why evidence is refused, by `evidence sign` or `evidence verify` (#2553).
|
|
24
|
+
* Each is in `reason-codes.ts` and in `evidence.schema.json`. A sign or verify
|
|
25
|
+
* that can't read the record kind fails with the records read's own code.
|
|
26
|
+
*/
|
|
27
|
+
export declare const EVIDENCE_ERROR_CODES: readonly ["not-a-git-repository", "revision-unknown", "trust-policy-unreadable", "envelope-unreadable", "envelope-invalid", "envelope-untrusted", "evidence-payload-type", "evidence-statement-invalid", "evidence-runner-mismatch", "runner-key-invalid", "runner-key-is-signer", "runner-key-unlisted", "kind-unreadable", "kind-invalid", "schema-unreadable", "schema-id-mismatch", "schema-invalid", "location-missing"];
|
|
28
|
+
export type EvidenceErrorCode = (typeof EVIDENCE_ERROR_CODES)[number];
|
|
29
|
+
/** The statement a runner signs. Strict, so a verifier never acts on a field it does not know. */
|
|
30
|
+
export declare const evidenceStatementSchema: z.ZodObject<{
|
|
31
|
+
_type: z.ZodLiteral<"https://in-toto.io/Statement/v1">;
|
|
32
|
+
subject: z.ZodArray<z.ZodObject<{
|
|
33
|
+
name: z.ZodString;
|
|
34
|
+
digest: z.ZodObject<{
|
|
35
|
+
sha256: z.ZodString;
|
|
36
|
+
}, z.core.$strict>;
|
|
37
|
+
}, z.core.$strict>>;
|
|
38
|
+
predicateType: z.ZodLiteral<"https://intentius.io/chant/runner-evidence/v1">;
|
|
39
|
+
predicate: z.ZodObject<{
|
|
40
|
+
runner: z.ZodString;
|
|
41
|
+
commit: z.ZodString;
|
|
42
|
+
tree: z.ZodString;
|
|
43
|
+
check: z.ZodString;
|
|
44
|
+
claim: z.ZodOptional<z.ZodObject<{
|
|
45
|
+
sha256: z.ZodString;
|
|
46
|
+
}, z.core.$strict>>;
|
|
47
|
+
environment: z.ZodOptional<z.ZodObject<{
|
|
48
|
+
sha256: z.ZodString;
|
|
49
|
+
}, z.core.$strict>>;
|
|
50
|
+
}, z.core.$strict>;
|
|
51
|
+
}, z.core.$strict>;
|
|
52
|
+
export type EvidenceStatement = z.infer<typeof evidenceStatementSchema>;
|
|
53
|
+
/** SHA-256 of a record's text, line endings normalised as seals do (#2524 D4). */
|
|
54
|
+
export declare function recordHash(text: string): string;
|
|
55
|
+
export interface EvidenceInput {
|
|
56
|
+
repo: string;
|
|
57
|
+
/** The full commit id the check ran at. Records are hashed as committed there. */
|
|
58
|
+
commit: string;
|
|
59
|
+
paths: string[];
|
|
60
|
+
runner: string;
|
|
61
|
+
check: string;
|
|
62
|
+
claim?: Buffer;
|
|
63
|
+
environment?: Buffer;
|
|
64
|
+
}
|
|
65
|
+
export declare function buildStatement(input: EvidenceInput): EvidenceStatement;
|
|
66
|
+
export declare function signEvidence(statement: EvidenceStatement, key: KeyObject, publicKey: string): DsseEnvelope;
|
|
67
|
+
export interface SubjectVerdict {
|
|
68
|
+
name: string;
|
|
69
|
+
signed: string;
|
|
70
|
+
/** The hash at the revision checked, or null when the record is not there. */
|
|
71
|
+
now: string | null;
|
|
72
|
+
matches: boolean;
|
|
73
|
+
}
|
|
74
|
+
export type EvidenceVerdict = {
|
|
75
|
+
ok: true;
|
|
76
|
+
/** `current` when every subject still hashes the same at the revision checked; otherwise `stale`. */
|
|
77
|
+
status: "current" | "stale";
|
|
78
|
+
runner: string;
|
|
79
|
+
class: RunnerKey["class"];
|
|
80
|
+
keyid: string;
|
|
81
|
+
statement: EvidenceStatement;
|
|
82
|
+
subjects: SubjectVerdict[];
|
|
83
|
+
} | {
|
|
84
|
+
ok: false;
|
|
85
|
+
code: EvidenceErrorCode;
|
|
86
|
+
reason: string;
|
|
87
|
+
};
|
|
88
|
+
/**
|
|
89
|
+
* Verify an envelope against the runner keys at base, then compare each
|
|
90
|
+
* subject with the record as committed at `at`.
|
|
91
|
+
*/
|
|
92
|
+
export declare function verifyEvidence(envelope: unknown, runners: readonly RunnerKey[], repo: string, at: string): EvidenceVerdict;
|
|
93
|
+
//# sourceMappingURL=evidence.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"evidence.d.ts","sourceRoot":"","sources":["../../../src/workspace/trust/evidence.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAsD,KAAK,YAAY,EAAE,MAAM,QAAQ,CAAC;AAC/F,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAE1C,eAAO,MAAM,cAAc,oCAAoC,CAAC;AAChE,eAAO,MAAM,yBAAyB,kDAAkD,CAAC;AAEzF;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,+ZAmBS,CAAC;AAC3C,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC;AAKtE,kGAAkG;AAClG,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;kBA2BzB,CAAC;AACZ,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,kFAAkF;AAClF,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE/C;AAkBD,MAAM,WAA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<{
|
|
|
72
72
|
to: z.ZodString;
|
|
73
73
|
note: z.ZodOptional<z.ZodString>;
|
|
74
74
|
}, z.core.$strict>>>;
|
|
75
|
+
runners: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
76
|
+
principal: z.ZodString;
|
|
77
|
+
class: z.ZodEnum<{
|
|
78
|
+
runner: "runner";
|
|
79
|
+
service: "service";
|
|
80
|
+
}>;
|
|
81
|
+
key: z.ZodString;
|
|
82
|
+
}, z.core.$strict>>>;
|
|
83
|
+
admitted: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
84
|
+
return: z.ZodString;
|
|
85
|
+
signers: z.ZodArray<z.ZodObject<{
|
|
86
|
+
principal: z.ZodString;
|
|
87
|
+
key: z.ZodString;
|
|
88
|
+
}, z.core.$strict>>;
|
|
89
|
+
note: z.ZodOptional<z.ZodString>;
|
|
90
|
+
}, z.core.$strict>>>;
|
|
75
91
|
}, z.core.$strict>;
|
|
76
92
|
export type TrustConfig = z.infer<typeof trustConfigSchema>;
|
|
77
93
|
/** The role whose holders may change the policy. Without any grant of it, every signer may. */
|
|
78
94
|
export declare const ADMIN_ROLE = "admin";
|
|
95
|
+
/** A key that signs runner evidence: a service or CI identity. */
|
|
96
|
+
export interface RunnerKey {
|
|
97
|
+
principal: string;
|
|
98
|
+
class: "runner" | "service";
|
|
99
|
+
/** `ssh-ed25519 <base64>`. */
|
|
100
|
+
key: string;
|
|
101
|
+
}
|
|
79
102
|
/** The policy a check applies, as read at base. */
|
|
80
103
|
export interface TrustPolicy {
|
|
81
104
|
/** The full commit id the policy was read at, or null when there is no base. */
|
|
@@ -91,10 +114,34 @@ export interface TrustPolicy {
|
|
|
91
114
|
from?: string;
|
|
92
115
|
to: string;
|
|
93
116
|
}>;
|
|
117
|
+
/** Runner and service keys that may sign runner evidence (#2553). */
|
|
118
|
+
runners: RunnerKey[];
|
|
119
|
+
/** Runner entries that are not used, and why. */
|
|
120
|
+
excludedRunners: Array<{
|
|
121
|
+
principal: string;
|
|
122
|
+
reason: string;
|
|
123
|
+
}>;
|
|
124
|
+
/** Signers admitted per return (#2552), keyed by return id. They verify that return's commits and seals only. */
|
|
125
|
+
admitted: Record<string, Signer[]>;
|
|
126
|
+
/**
|
|
127
|
+
* Set on a copy of the policy used for one returned record (#2552): the
|
|
128
|
+
* return it came back in. A seal by a principal the policy does not list
|
|
129
|
+
* then reads as unverifiable rather than unlisted, until an admin admits
|
|
130
|
+
* the signer. Never set on the policy read at base.
|
|
131
|
+
*/
|
|
132
|
+
returnedFrom?: string;
|
|
94
133
|
/** Why the policy could not be read, when it could not. Nothing verifies then. */
|
|
95
134
|
problems: string[];
|
|
135
|
+
/**
|
|
136
|
+
* The signer set in effect at a commit's position in the base's history
|
|
137
|
+
* (#2553). Absent, every commit is judged by `signers`.
|
|
138
|
+
*/
|
|
139
|
+
signersAt?: (commit: string) => {
|
|
140
|
+
version: number;
|
|
141
|
+
signers: Signer[];
|
|
142
|
+
} | null;
|
|
96
143
|
}
|
|
97
|
-
/** Paths whose change is a protected write under `policy
|
|
144
|
+
/** Paths whose change is a protected write under `policy`: the config, the signers file and its rotation file (#2553). */
|
|
98
145
|
export declare function protectedPaths(policy: TrustPolicy): string[];
|
|
99
146
|
/** Principals allowed to change the policy: the admins when any are granted, otherwise every signer. */
|
|
100
147
|
export declare function policyWriters(policy: TrustPolicy): Set<string>;
|
|
@@ -106,6 +153,12 @@ export declare function emptyPolicy(base: string | null, problems?: string[]): T
|
|
|
106
153
|
* its problems listed, so nothing is attested (fail closed).
|
|
107
154
|
*/
|
|
108
155
|
export declare function readTrustPolicy(source: RecordSource, base: string | null): TrustPolicy;
|
|
156
|
+
/**
|
|
157
|
+
* The policy for work that came back in return `id` (#2552): the signers at
|
|
158
|
+
* base plus the ones admitted for that return, marked with the return so a
|
|
159
|
+
* seal by an unknown signer reads as unverifiable.
|
|
160
|
+
*/
|
|
161
|
+
export declare function returnedPolicy(policy: TrustPolicy, id: string): TrustPolicy;
|
|
109
162
|
/** A file's text through `source`, or undefined when it is not there. */
|
|
110
163
|
export declare function readOptional(source: RecordSource, path: string): string | undefined;
|
|
111
164
|
//# sourceMappingURL=policy.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"policy.d.ts","sourceRoot":"","sources":["../../../src/workspace/trust/policy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAGH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAErD,0GAA0G;AAC1G,eAAO,MAAM,iBAAiB,sBAAsB,CAAC;AAErD,mEAAmE;AACnE,eAAO,MAAM,oBAAoB,2BAA2B,CAAC;AAe7D,uEAAuE;AACvE,MAAM,WAAW,MAAM;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,0CAA0C;IAC1C,GAAG,EAAE,MAAM,CAAC;IACZ,kGAAkG;IAClG,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,wCAAwC;IACxC,IAAI,EAAE,MAAM,CAAC;CACd;AAED,4DAA4D;AAC5D,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,SAAS;IACxB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,EAAE,cAAc,EAAE,CAAC;CAC5B;AAmDD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,CAkD3D;AAED,8FAA8F;AAC9F,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,MAAM,CAM9D;AAcD,eAAO,MAAM,iBAAiB
|
|
1
|
+
{"version":3,"file":"policy.d.ts","sourceRoot":"","sources":["../../../src/workspace/trust/policy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAGH,OA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ACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,WAAW,CAiDtF;AAWD;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,WAAW,EAAE,EAAE,EAAE,MAAM,GAAG,WAAW,CAE3E;AAED,yEAAyE;AACzE,wBAAgB,YAAY,CAAC,MAAM,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAKnF"}
|
|
@@ -21,6 +21,16 @@ export interface RecordProvenance {
|
|
|
21
21
|
principal?: string;
|
|
22
22
|
key?: string;
|
|
23
23
|
reason: string;
|
|
24
|
+
/**
|
|
25
|
+
* Set when the content came back in a return (#2552): the return's id, the
|
|
26
|
+
* commit in the returned copy that the level judges, and the commit here
|
|
27
|
+
* that holds the content. `commit` above is that commit here.
|
|
28
|
+
*/
|
|
29
|
+
returned?: {
|
|
30
|
+
id: string;
|
|
31
|
+
commit?: string;
|
|
32
|
+
importedIn: string | null;
|
|
33
|
+
};
|
|
24
34
|
}
|
|
25
35
|
/** Where the base revision came from. */
|
|
26
36
|
export type BaseSource = "flag" | "origin/HEAD" | "main" | "master";
|
|
@@ -36,7 +46,11 @@ export interface ResolvedBase {
|
|
|
36
46
|
* `HEAD`, which is the change under review.
|
|
37
47
|
*/
|
|
38
48
|
export declare function resolveBase(repo: string, explicit?: string): ResolvedBase;
|
|
39
|
-
/**
|
|
49
|
+
/**
|
|
50
|
+
* The policy at `base`, or an inactive one when there is no base. With a
|
|
51
|
+
* signers file, its history is verified too (#2553): every version must be
|
|
52
|
+
* signed by a threshold of the one before, or nothing verifies.
|
|
53
|
+
*/
|
|
40
54
|
export declare function policyAtBase(repo: string, base: ResolvedBase): TrustPolicy;
|
|
41
55
|
/**
|
|
42
56
|
* The last commit reachable from `rev` that changed each path. Merges are
|
|
@@ -58,6 +72,12 @@ export interface ProvenanceQuery {
|
|
|
58
72
|
at: string | null;
|
|
59
73
|
paths: string[];
|
|
60
74
|
attestors: readonly CommitAttestor[];
|
|
75
|
+
/**
|
|
76
|
+
* A second look at each committed path, given the provenance of the commit
|
|
77
|
+
* that holds it here. Returned work (#2552) uses it to judge the commit the
|
|
78
|
+
* content was made in, which a return carries. Undefined keeps the answer.
|
|
79
|
+
*/
|
|
80
|
+
revisit?: (path: string, host: RecordProvenance) => RecordProvenance | undefined;
|
|
61
81
|
}
|
|
62
82
|
/**
|
|
63
83
|
* The provenance of each path. With attestation off (no signers file at
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provenance.d.ts","sourceRoot":"","sources":["../../../src/workspace/trust/provenance.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH,OAAO,EAAgB,KAAK,cAAc,EAAE,KAAK,eAAe,EAAE,MAAM,YAAY,CAAC;AACrF,OAAO,EAAgC,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"provenance.d.ts","sourceRoot":"","sources":["../../../src/workspace/trust/provenance.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH,OAAO,EAAgB,KAAK,cAAc,EAAE,KAAK,eAAe,EAAE,MAAM,YAAY,CAAC;AACrF,OAAO,EAAgC,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC;AAG1E,6CAA6C;AAC7C,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,eAAe,CAAC;IACvB,mFAAmF;IACnF,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,QAAQ,CAAC,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,GAAG,IAAI,C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