@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
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Signer rotation, verified from history (#2553, #2524 D5, ws-001).
|
|
3
|
+
*
|
|
4
|
+
* A signer set is the signers file plus a threshold. A new set is valid only
|
|
5
|
+
* when a threshold of the previous set signed it, as in TUF's root rotation.
|
|
6
|
+
* The signatures live beside the signers file, in `<signers>.rotation.json`:
|
|
7
|
+
*
|
|
8
|
+
* ```json
|
|
9
|
+
* { "schema": 1, "version": 2, "previous": "sha256:…", "threshold": 1,
|
|
10
|
+
* "signatures": [{ "principal": "alice@example.com", "signature": "-----BEGIN SSH SIGNATURE-----…" }] }
|
|
11
|
+
* ```
|
|
12
|
+
*
|
|
13
|
+
* Each signature is `ssh-keygen -Y sign -n chant-signers` over the statement
|
|
14
|
+
* {@link rotationStatement} returns: the new version, the digest of the
|
|
15
|
+
* previous signers file, the digest of the new one and the new threshold. The
|
|
16
|
+
* version number and the previous digest together stop an old, once-valid set
|
|
17
|
+
* from being replayed, and the namespace stops a commit signature from
|
|
18
|
+
* standing in for a rotation signature.
|
|
19
|
+
*
|
|
20
|
+
* ## Revocation by position
|
|
21
|
+
*
|
|
22
|
+
* Dates prove nothing: whoever makes a commit sets its date. So a commit is
|
|
23
|
+
* judged by where it sits in the base's history. Walking the base's
|
|
24
|
+
* first-parent line from the oldest commit, each commit that changes the
|
|
25
|
+
* signer set starts a version, and each version must be signed by a threshold
|
|
26
|
+
* of the one before. A commit already in the base's history is judged by the
|
|
27
|
+
* version in effect just before the first-parent commit that brought it in. A
|
|
28
|
+
* key removed at version N therefore still vouches for what was merged before
|
|
29
|
+
* N, and for nothing merged after, however the later commit is dated. A commit
|
|
30
|
+
* not yet in the base's history is judged by the latest version.
|
|
31
|
+
*/
|
|
32
|
+
import { z } from "zod";
|
|
33
|
+
import { type ExcludedSigner, type Signer } from "./policy.js";
|
|
34
|
+
/** Why a signer set is not a valid next version (#2553). Each is in `reason-codes.ts` and in `signers.schema.json`. */
|
|
35
|
+
export declare const ROTATION_REFUSAL_CODES: readonly ["signers-removed", "rotation-unparseable", "rotation-invalid", "rotation-first-version", "rotation-missing", "rotation-version-skew", "rotation-previous-mismatch", "rotation-threshold-unsatisfiable", "rotation-threshold-not-met"];
|
|
36
|
+
export type RotationRefusalCode = (typeof ROTATION_REFUSAL_CODES)[number];
|
|
37
|
+
/** A refused version: the code and a sentence for people. */
|
|
38
|
+
export interface RotationRefusal {
|
|
39
|
+
code: RotationRefusalCode;
|
|
40
|
+
reason: string;
|
|
41
|
+
}
|
|
42
|
+
/** The ssh-keygen namespace rotation signatures are made in. Never `git`. */
|
|
43
|
+
export declare const ROTATION_NAMESPACE = "chant-signers";
|
|
44
|
+
/** The rotation file for a signers file. */
|
|
45
|
+
export declare function rotationPath(signersPath: string): string;
|
|
46
|
+
/** `sha256:<hex>` of a signers file's bytes, line endings normalised. */
|
|
47
|
+
export declare function signersDigest(text: string): string;
|
|
48
|
+
export declare const rotationFileSchema: z.ZodObject<{
|
|
49
|
+
schema: z.ZodLiteral<1>;
|
|
50
|
+
version: z.ZodNumber;
|
|
51
|
+
previous: z.ZodNullable<z.ZodString>;
|
|
52
|
+
threshold: z.ZodNumber;
|
|
53
|
+
signatures: z.ZodArray<z.ZodObject<{
|
|
54
|
+
principal: z.ZodString;
|
|
55
|
+
signature: z.ZodString;
|
|
56
|
+
}, z.core.$strict>>;
|
|
57
|
+
}, z.core.$strict>;
|
|
58
|
+
export type RotationFile = z.infer<typeof rotationFileSchema>;
|
|
59
|
+
/** The bytes each rotation signature covers. */
|
|
60
|
+
export declare function rotationStatement(r: {
|
|
61
|
+
version: number;
|
|
62
|
+
previous: string | null;
|
|
63
|
+
threshold: number;
|
|
64
|
+
}, signers: string): Buffer;
|
|
65
|
+
/** One version of the signer set, as history established it. */
|
|
66
|
+
export interface SignerVersion {
|
|
67
|
+
/** 1 and up; 0 marks where the signers file was removed and nothing was in effect. */
|
|
68
|
+
version: number;
|
|
69
|
+
/** The first-parent commit that made this version, or null for a set not yet merged. */
|
|
70
|
+
commit: string | null;
|
|
71
|
+
digest: string;
|
|
72
|
+
threshold: number;
|
|
73
|
+
signers: Signer[];
|
|
74
|
+
excluded: ExcludedSigner[];
|
|
75
|
+
/** The principals whose signatures made this version valid; empty for the first version. */
|
|
76
|
+
signedBy: string[];
|
|
77
|
+
}
|
|
78
|
+
export interface SignerHistory {
|
|
79
|
+
versions: SignerVersion[];
|
|
80
|
+
/** Where the chain broke, when it did. Nothing verifies then. */
|
|
81
|
+
broken?: {
|
|
82
|
+
commit: string | null;
|
|
83
|
+
} & RotationRefusal;
|
|
84
|
+
}
|
|
85
|
+
/** The state of the signer files at one point, as text. */
|
|
86
|
+
export interface SignerFiles {
|
|
87
|
+
signers?: string;
|
|
88
|
+
rotation?: string;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Check `next` against the version before it. Returns the new version, or
|
|
92
|
+
* the reason it is not valid. `prev` undefined means there was no signer set,
|
|
93
|
+
* so `next` is a first version and needs no signatures.
|
|
94
|
+
*/
|
|
95
|
+
export declare function nextVersion(prev: SignerVersion | undefined, next: SignerFiles, commit: string | null): SignerVersion | RotationRefusal;
|
|
96
|
+
/**
|
|
97
|
+
* How many signers could each give a counted signature: principals and keys
|
|
98
|
+
* are both distinct, so this is the size of a largest matching between them.
|
|
99
|
+
*/
|
|
100
|
+
export declare function distinctHolders(signers: readonly Signer[]): number;
|
|
101
|
+
/** A file's text at `commit`, or undefined when it is not there. */
|
|
102
|
+
export declare function fileAt(repo: string, commit: string, path: string): string | undefined;
|
|
103
|
+
/**
|
|
104
|
+
* Walk the signer set's history along the first-parent line of `base`,
|
|
105
|
+
* oldest first. A removal ends the chain; a later signers file starts a new
|
|
106
|
+
* one, which only the protected-write check in CI could have admitted.
|
|
107
|
+
*/
|
|
108
|
+
export declare function signerHistory(repo: string, base: string, signersPath: string): SignerHistory;
|
|
109
|
+
/**
|
|
110
|
+
* Finds the signer set in effect for a commit, by its position in the base's
|
|
111
|
+
* history. Built once per base; the first-parent line is read once and
|
|
112
|
+
* each lookup is a binary search.
|
|
113
|
+
*/
|
|
114
|
+
export declare class SignerPositions {
|
|
115
|
+
private readonly repo;
|
|
116
|
+
private readonly base;
|
|
117
|
+
private readonly history;
|
|
118
|
+
private line;
|
|
119
|
+
private index;
|
|
120
|
+
private memo;
|
|
121
|
+
constructor(repo: string, base: string, history: SignerHistory);
|
|
122
|
+
private isAncestor;
|
|
123
|
+
/** The base's first-parent line, newest first. */
|
|
124
|
+
private firstParents;
|
|
125
|
+
/**
|
|
126
|
+
* The version that judges `commit`, or null when no signer set was in
|
|
127
|
+
* effect there (before the first one, or the chain is broken).
|
|
128
|
+
*/
|
|
129
|
+
versionFor(commit: string): SignerVersion | null;
|
|
130
|
+
private lookup;
|
|
131
|
+
}
|
|
132
|
+
//# sourceMappingURL=rotation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rotation.d.ts","sourceRoot":"","sources":["../../../src/workspace/trust/rotation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAKH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAAuB,KAAK,cAAc,EAAE,KAAK,MAAM,EAAE,MAAM,UAAU,CAAC;AAGjF,uHAAuH;AACvH,eAAO,MAAM,sBAAsB,iPAUO,CAAC;AAC3C,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE1E,6DAA6D;AAC7D,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,mBAAmB,CAAC;IAC1B,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,6EAA6E;AAC7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AAI,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,aAAa,GAAG,eAAe,CA6DtI;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CAuBlE;AAMD,oEAAoE;AACpE,wBAAgB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAMrF;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,aAAa,CAqB5F;AAED;;;;GAIG;AACH,qBAAa,eAAe;IAMxB,OAAO,CAAC,QAAQ,CAAC,IAAI;IACrB,OAAO,CAAC,QAAQ,CAAC,IAAI;IACrB,OAAO,CAAC,QAAQ,CAAC,OAAO;IAP1B,OAAO,CAAC,IAAI,CAAuB;IACnC,OAAO,CAAC,KAAK,CAA6B;IAC1C,OAAO,CAAC,IAAI,CAA2C;IAEvD,YACmB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,aAAa,EACrC;IAEJ,OAAO,CAAC,UAAU;IASlB,kDAAkD;IAClD,OAAO,CAAC,YAAY;IAQpB;;;OAGG;IACH,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,aAAa,GAAG,IAAI,CAM/C;IAED,OAAO,CAAC,MAAM;CA+Bf"}
|
|
@@ -27,6 +27,11 @@ import { type TrustPolicy } from "./policy.js";
|
|
|
27
27
|
export declare const REVIEW_SEAL_NAMESPACE = "chant-review";
|
|
28
28
|
/** The ssh signature namespace of a record's author seal (#2688). */
|
|
29
29
|
export declare const RECORD_SEAL_NAMESPACE = "chant-record";
|
|
30
|
+
/**
|
|
31
|
+
* The ssh signature namespace of a gate approval's seal (#3163, ws-080), so a
|
|
32
|
+
* verdict, record or commit signature can't stand in for one.
|
|
33
|
+
*/
|
|
34
|
+
export declare const GATE_SEAL_NAMESPACE = "chant-gate";
|
|
30
35
|
/** A seal as a review entry holds it. */
|
|
31
36
|
export interface VerdictSeal {
|
|
32
37
|
/** The principal who signed: the reviewer, as the signers file names them. */
|
|
@@ -63,6 +68,23 @@ export declare function reviewSealPayload(record: string, digest: string, verdic
|
|
|
63
68
|
* states signs an empty last line.
|
|
64
69
|
*/
|
|
65
70
|
export declare function recordSealPayload(record: string, digest: string, author: string, state: string | null): Buffer;
|
|
71
|
+
/** The gate approval a seal covers (#3163): the fields of a gate resolution line that say what was approved, by whom and when. */
|
|
72
|
+
export interface SealedGateApproval {
|
|
73
|
+
op: string;
|
|
74
|
+
gate: string;
|
|
75
|
+
environment?: string;
|
|
76
|
+
planDigest?: string;
|
|
77
|
+
resolvedBy: string;
|
|
78
|
+
timestamp: string;
|
|
79
|
+
seal?: unknown;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* The bytes a gate approval's seal signs (#3163): the op (or component), the
|
|
83
|
+
* gate, the environment, the plan digest, the approver and the time, joined
|
|
84
|
+
* by LF with no final newline. An approval that binds no environment or plan
|
|
85
|
+
* signs an empty line for it.
|
|
86
|
+
*/
|
|
87
|
+
export declare function gateSealPayload(a: SealedGateApproval): Buffer;
|
|
66
88
|
/** The record an author seal covers (#2688). */
|
|
67
89
|
export interface SealedRecord {
|
|
68
90
|
record: string | null;
|
|
@@ -88,6 +110,12 @@ export declare function checkVerdictSeal(policy: TrustPolicy, v: SealedVerdict):
|
|
|
88
110
|
* null even under an active policy: it claims no author to attest.
|
|
89
111
|
*/
|
|
90
112
|
export declare function checkRecordSeal(policy: TrustPolicy, r: SealedRecord): SealCheck;
|
|
113
|
+
/**
|
|
114
|
+
* Check a gate approval's seal (#3163), as a verdict's is checked, over
|
|
115
|
+
* {@link gateSealPayload} in the `chant-gate` namespace: it verifies only
|
|
116
|
+
* when the signers file at base lists a key for the approver.
|
|
117
|
+
*/
|
|
118
|
+
export declare function checkGateSeal(policy: TrustPolicy, a: SealedGateApproval): SealCheck;
|
|
91
119
|
/** Why a seal could not be made. */
|
|
92
120
|
export declare class SealError extends Error {
|
|
93
121
|
constructor(message: string);
|
|
@@ -124,4 +152,9 @@ export declare function sealRecord(keyFile: string, r: {
|
|
|
124
152
|
author: string;
|
|
125
153
|
state: string | null;
|
|
126
154
|
}): VerdictSeal;
|
|
155
|
+
/**
|
|
156
|
+
* Seal a gate approval (#3163) with the key in `keyFile`, over
|
|
157
|
+
* {@link gateSealPayload}. Throws a {@link SealError}.
|
|
158
|
+
*/
|
|
159
|
+
export declare function sealGateApproval(keyFile: string, a: SealedGateApproval): VerdictSeal;
|
|
127
160
|
//# sourceMappingURL=seal.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"seal.d.ts","sourceRoot":"","sources":["../../../src/workspace/trust/seal.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAMH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC;AAG5C,qDAAqD;AACrD,eAAO,MAAM,qBAAqB,iBAAiB,CAAC;AAEpD,qEAAqE;AACrE,eAAO,MAAM,qBAAqB,iBAAiB,CAAC;AAEpD,yCAAyC;AACzC,MAAM,WAAW,WAAW;IAC1B,8EAA8E;IAC9E,MAAM,EAAE,MAAM,CAAC;IACf,gHAAgH;IAChH,GAAG,EAAE,MAAM,CAAC;IACZ,iCAAiC;IACjC,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,yCAAyC;AACzC,MAAM,WAAW,SAAS;IACxB,kKAAkK;IAClK,QAAQ,EAAE,OAAO,GAAG,IAAI,CAAC;IACzB,8DAA8D;IAC9D,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,0FAA0F;IAC1F,GAAG,CAAC,EAAE,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OAAO,EAAE,MAAM,IAAI,CAAA;CAAE,CAuBzG;AAMD;;;GAGG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,CAAC,EAAE;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE,GAAG,WAAW,CAE9I;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,CAAC,EAAE;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,GAAG,WAAW,CAEpI;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,CAAC,EAAE,kBAAkB,GAAG,WAAW,CAEpF"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `chant workspace signers [rotate [--threshold <n>] | sign --key <file>]`
|
|
3
|
+
* (#2553): show the signer history, and propose a new signer set.
|
|
4
|
+
*
|
|
5
|
+
* Rotating is three steps: edit the signers file, run `rotate` to write the
|
|
6
|
+
* rotation file for the next version, and have a threshold of the current
|
|
7
|
+
* signers each run `sign` with their own key. `chant workspace verify` then
|
|
8
|
+
* checks the result against the set at base.
|
|
9
|
+
*/
|
|
10
|
+
import type { CommandContext } from "../../cli/registry.js";
|
|
11
|
+
import { type RotationRefusalCode, type SignerHistory } from "./rotation.js";
|
|
12
|
+
export declare const SIGNERS_CONTRACT_VERSION = 1;
|
|
13
|
+
export declare const SIGNERS_OUTPUT_SCHEMA_ID = "https://intentius.io/chant/schemas/workspace/signers/v1/signers.schema.json";
|
|
14
|
+
/** Why `chant workspace signers` prints no history. Each is in `reason-codes.ts` and `signers.schema.json`. */
|
|
15
|
+
export declare const SIGNERS_ERROR_CODES: readonly ["not-a-git-repository", "revision-unknown", "signers-file-missing"];
|
|
16
|
+
export type SignersErrorCode = (typeof SIGNERS_ERROR_CODES)[number];
|
|
17
|
+
/** What `chant workspace signers --json` prints. */
|
|
18
|
+
export type SignersDocument = {
|
|
19
|
+
$schema: string;
|
|
20
|
+
contract: number;
|
|
21
|
+
chant: string;
|
|
22
|
+
base: string;
|
|
23
|
+
signersPath: string;
|
|
24
|
+
versions: Array<{
|
|
25
|
+
version: number;
|
|
26
|
+
commit: string | null;
|
|
27
|
+
digest: string | null;
|
|
28
|
+
threshold: number;
|
|
29
|
+
principals: string[];
|
|
30
|
+
signedBy: string[];
|
|
31
|
+
}>;
|
|
32
|
+
broken: {
|
|
33
|
+
commit: string | null;
|
|
34
|
+
code: RotationRefusalCode;
|
|
35
|
+
message: string;
|
|
36
|
+
} | null;
|
|
37
|
+
} | {
|
|
38
|
+
$schema: string;
|
|
39
|
+
contract: number;
|
|
40
|
+
chant: string;
|
|
41
|
+
error: {
|
|
42
|
+
code: SignersErrorCode;
|
|
43
|
+
message: string;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
/** The signer history at `base` as the `--json` document. */
|
|
47
|
+
export declare function signersDocument(repo: string, base: string, signersPath: string, history: SignerHistory): SignersDocument;
|
|
48
|
+
export declare function runWorkspaceSigners(ctx: CommandContext): Promise<number>;
|
|
49
|
+
//# sourceMappingURL=signers-cli.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signers-cli.d.ts","sourceRoot":"","sources":["../../../src/workspace/trust/signers-cli.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAMH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAOzD,OAAO,EASL,KAAK,mBAAmB,EACxB,KAAK,aAAa,EACnB,MAAM,YAAY,CAAC;AAKpB,eAAO,MAAM,wBAAwB,IAAI,CAAC;AAC1C,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|
|
@@ -47,4 +47,16 @@ export declare function verifySshSignature(signers: Signer[], payload: Buffer, s
|
|
|
47
47
|
reason: string;
|
|
48
48
|
};
|
|
49
49
|
export declare const sshCommitAttestor: CommitAttestor;
|
|
50
|
+
/**
|
|
51
|
+
* The public key inside an armored ssh signature (the SSHSIG format), as
|
|
52
|
+
* `<type> <base64>`, or undefined when the text is not one. The key is what
|
|
53
|
+
* made the signature; whether anyone trusts it is a separate question.
|
|
54
|
+
*/
|
|
55
|
+
export declare function sshSignatureKey(signature: string): string | undefined;
|
|
56
|
+
/**
|
|
57
|
+
* Whether an ssh signature over `payload` in `namespace` is intact, whoever
|
|
58
|
+
* made it (`ssh-keygen -Y check-novalidate`). Returns the key's fingerprint,
|
|
59
|
+
* false when it does not check, or null when ssh-keygen is not installed.
|
|
60
|
+
*/
|
|
61
|
+
export declare function sshSignatureIntact(payload: Buffer, signature: string, namespace: string): string | false | null;
|
|
50
62
|
//# sourceMappingURL=ssh-commit.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ssh-commit.d.ts","sourceRoot":"","sources":["../../../src/workspace/trust/ssh-commit.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAMH,OAAO,KAAK,EAAsC,cAAc,EAAE,MAAM,YAAY,CAAC;AACrF,OAAO,EAAwB,KAAK,MAAM,EAAE,MAAM,UAAU,CAAC;AAI7D,uEAAuE;AACvE,MAAM,WAAW,YAAY;IAC3B,sFAAsF;IACtF,OAAO,EAAE,MAAM,CAAC;IAChB,uEAAuE;IACvE,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,SAAW,GAAG,YAAY,CAsB9E;AAUD,6GAA6G;AAC7G,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG;IAAE,MAAM,EAAE,MAAM,G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;;;GAIG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,MAAM,EAAE,EACjB,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,GAChB;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,OAAO,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAuBjG;AAED,eAAO,MAAM,iBAAiB,EAAE,cAiB/B,CAAC;AAeF;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAmBrE;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,KAAK,GAAG,IAAI,CAY/G"}
|
|
@@ -36,6 +36,19 @@ export declare class TestRepo {
|
|
|
36
36
|
sshSign(key: Key, payload: Buffer, namespace: string): string;
|
|
37
37
|
cleanup(): void;
|
|
38
38
|
}
|
|
39
|
+
/**
|
|
40
|
+
* Write `<signers>.rotation.json` for the signers file now in the working
|
|
41
|
+
* tree, as the next version after `previousText`, signed by `by` in the
|
|
42
|
+
* rotation namespace (#2553).
|
|
43
|
+
*/
|
|
44
|
+
export declare function writeRotation(repo: TestRepo, opts: {
|
|
45
|
+
previousText: string;
|
|
46
|
+
version: number;
|
|
47
|
+
threshold?: number;
|
|
48
|
+
by: Array<[string, Key]>;
|
|
49
|
+
namespace?: string;
|
|
50
|
+
signersPath?: string;
|
|
51
|
+
}): void;
|
|
39
52
|
/** A record kind reading `records/*.md`, and its schema, written into `repo`. */
|
|
40
53
|
export declare function writeRecordKind(repo: TestRepo): string;
|
|
41
54
|
export declare function note(id: string, body?: string): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-repo.d.ts","sourceRoot":"","sources":["../../../src/workspace/trust/test-repo.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"test-repo.d.ts","sourceRoot":"","sources":["../../../src/workspace/trust/test-repo.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAQH,eAAO,MAAM,YAAY,SAA2E,CAAC;AAErG,MAAM,WAAW,GAAG;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,wBAAwB;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,yCAAyC;IACzC,GAAG,EAAE,MAAM,CAAC;CACb;AAED,qBAAa,QAAQ;IACnB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAS;IAC9B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IAEjC,YAAY,KAAK,EAAE,MAAM,EAOxB;IAED,GAAG,CAAC,KAAK,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM,GAAG,MAAM,CAAC,UAAU,CAYzD;IAED,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,IAAI,GAAE;QAAE,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;KAAO,GAAG,MAAM,CAEhG;IAED,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,GAAG,CAKrB;IAED,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAGtC;IAED,wFAAwF;IACxF,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,GAAG,EAAE,GAAG,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM,GAAG,MAAM,CAK3E;IAED,IAAI,IAAI,MAAM,CAEb;IAED;;;;OAIG;IACH,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,MAAM,GAAG,MAAM,CActE;IAED,gEAAgE;IAChE,OAAO,CAAC,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAK5D;IAED,OAAO,IAAI,IAAI,CAEd;CACF;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAC3B,IAAI,EAAE,QAAQ,EACd,IAAI,EAAE;IAAE,YAAY,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,KAAK,CAAC,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,GACtI,IAAI,CAON;AAED,iFAAiF;AACjF,wBAAgB,eAAe,CAAC,IAAI,EAAE,QAAQ,GAAG,MAAM,CAqBtD;AAED,wBAAgB,IAAI,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,SAAK,GAAG,MAAM,CAElD"}
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
import { type CommitAttestor, type ProvenanceLevel } from "./attestor.js";
|
|
15
15
|
import { type BaseSource, type RecordProvenance } from "./provenance.js";
|
|
16
16
|
import { type ExcludedSigner } from "./policy.js";
|
|
17
|
+
import { type RotationRefusalCode } from "./rotation.js";
|
|
17
18
|
export interface CommitVerdict extends RecordProvenance {
|
|
18
19
|
commit: string;
|
|
19
20
|
subject: string;
|
|
@@ -46,6 +47,20 @@ export interface ChangeReport {
|
|
|
46
47
|
/** Protected paths whose content differs between the merge base and head. */
|
|
47
48
|
protectedChanged: string[];
|
|
48
49
|
protectedWrites: ProtectedWrite[];
|
|
50
|
+
/**
|
|
51
|
+
* When the change edits the signer set (#2553): the version it proposes and
|
|
52
|
+
* who signed it, or, when the new set is refused, the version it had to
|
|
53
|
+
* follow and why.
|
|
54
|
+
*/
|
|
55
|
+
rotation: {
|
|
56
|
+
from: number;
|
|
57
|
+
to: number;
|
|
58
|
+
signedBy: string[];
|
|
59
|
+
} | {
|
|
60
|
+
from: number;
|
|
61
|
+
code: RotationRefusalCode;
|
|
62
|
+
reason: string;
|
|
63
|
+
} | null;
|
|
49
64
|
notes: string[];
|
|
50
65
|
failures: string[];
|
|
51
66
|
ok: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verify.d.ts","sourceRoot":"","sources":["../../../src/workspace/trust/verify.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,eAAe,EAAE,MAAM,YAAY,CAAC;AACvE,OAAO,EAA+C,KAAK,UAAU,EAAE,KAAK,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACnH,OAAO,EAAiC,KAAK,cAAc,EAAoB,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"verify.d.ts","sourceRoot":"","sources":["../../../src/workspace/trust/verify.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,eAAe,EAAE,MAAM,YAAY,CAAC;AACvE,OAAO,EAA+C,KAAK,UAAU,EAAE,KAAK,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACnH,OAAO,EAAiC,KAAK,cAAc,EAAoB,MAAM,UAAU,CAAC;AAChG,OAAO,EAAoD,KAAK,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAExG,MAAM,WAAW,aAAc,SAAQ,gBAAgB;IACrD,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,gFAAgF;IAChF,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE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CAAC;IACd,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,SAAS,EAAE,SAAS,cAAc,EAAE,CAAC;CACtC;AAMD;;;GAGG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAUnG;AAQD,wBAAgB,YAAY,CAAC,IAAI,EAAE,aAAa,GAAG,YAAY,CAoH9D"}
|
|
@@ -4,6 +4,10 @@
|
|
|
4
4
|
* workspace work history <id>` (#2785): the item's lease history, each claim
|
|
5
5
|
* and how it ended, a read-contract output (`work-history.schema.json`).
|
|
6
6
|
*
|
|
7
|
+
* And `chant workspace work evidence <id>` (#3159): the `workEvidence`
|
|
8
|
+
* activity as a command, so a writer outside an Op attaches evidence under
|
|
9
|
+
* the lease it holds.
|
|
10
|
+
*
|
|
7
11
|
* The lease itself is `../lifecycle/work-lease.ts`, the operator lease under
|
|
8
12
|
* the key `work/<id>`. This file finds the work item first: in the work kind
|
|
9
13
|
* `--kind` names, or in the one work kind the declaration names that has a
|
|
@@ -20,13 +24,13 @@
|
|
|
20
24
|
* could not run (usage, an unreadable kind, an unknown item).
|
|
21
25
|
*/
|
|
22
26
|
import type { CommandContext } from "../cli/registry.js";
|
|
23
|
-
import { type WorkLease, type WorkLeaseRefusal, type LeaseHistoryWrite, type LeaseHistoryRecord, type WorkLeaseState } from "../lifecycle/work-lease.js";
|
|
27
|
+
import { type KeptAttempt, type WorkLease, type WorkLeaseRefusal, type LeaseHistoryWrite, type LeaseHistoryRecord, type WorkLeaseState } from "../lifecycle/work-lease.js";
|
|
24
28
|
import { type LoadedRecordKind, type RecordEntry } from "./records.js";
|
|
25
29
|
/** The version of the `work` output this chant writes. */
|
|
26
30
|
export declare const WORK_LEASE_CONTRACT_VERSION = 1;
|
|
27
31
|
/** `$id` of the JSON Schema for the `--json` output, shipped beside this file. */
|
|
28
32
|
export declare const WORK_LEASE_OUTPUT_SCHEMA_ID = "https://intentius.io/chant/schemas/workspace/work-lease/v1/work-lease.schema.json";
|
|
29
|
-
export { WORK_LEASE_REFUSALS } from "../lifecycle/work-lease.js";
|
|
33
|
+
export { WORK_LEASE_REFUSALS, WORK_LEASE_OUTCOMES } from "../lifecycle/work-lease.js";
|
|
30
34
|
/** Exit code when the lease was refused rather than the command failing. */
|
|
31
35
|
export declare const EXIT_LEASE_REFUSED = 2;
|
|
32
36
|
export type WorkVerb = "claim" | "renew" | "release";
|
|
@@ -125,6 +129,26 @@ export interface LeaseClaim {
|
|
|
125
129
|
outcome: string | null;
|
|
126
130
|
note: string | null;
|
|
127
131
|
} | null;
|
|
132
|
+
/**
|
|
133
|
+
* Whether the claim counts toward the item's attempt limit (#3147): one
|
|
134
|
+
* released `not_done` or `abandoned`, with no outcome or an outcome from
|
|
135
|
+
* before the list was closed, or one that expired or was lost unreleased.
|
|
136
|
+
* Not one that is held, and not one released with any other outcome.
|
|
137
|
+
*/
|
|
138
|
+
attempt: boolean;
|
|
139
|
+
/** The ref keeping this claim's unfinished work, `refs/chant/kept/.../<item>/<token>`, or null. */
|
|
140
|
+
kept: string | null;
|
|
141
|
+
}
|
|
142
|
+
/** An item's attempts against its limit (#3147). */
|
|
143
|
+
export interface WorkAttempts {
|
|
144
|
+
/** The claims that count as attempts. */
|
|
145
|
+
failed: number;
|
|
146
|
+
/** The item's limit: its own field, else its kind's default; null when neither declares one. */
|
|
147
|
+
limit: number | null;
|
|
148
|
+
/** How many attempts are left, never below 0; null without a limit. */
|
|
149
|
+
remaining: number | null;
|
|
150
|
+
/** True once failed reaches the limit: a runner leaves the item to people. */
|
|
151
|
+
exhausted: boolean;
|
|
128
152
|
}
|
|
129
153
|
/** What `work history --json` prints. */
|
|
130
154
|
export type WorkHistoryDocument = {
|
|
@@ -159,6 +183,10 @@ export type WorkHistoryDocument = {
|
|
|
159
183
|
lost: number;
|
|
160
184
|
outcomes: Record<string, number>;
|
|
161
185
|
};
|
|
186
|
+
/** The item's attempts against its limit (#3147). */
|
|
187
|
+
attempts: WorkAttempts;
|
|
188
|
+
/** Every kept attempt of the item, by ref (#3147). */
|
|
189
|
+
kept: KeptAttempt[];
|
|
162
190
|
} | {
|
|
163
191
|
$schema: string;
|
|
164
192
|
contract: number;
|
|
@@ -169,7 +197,15 @@ export type WorkHistoryDocument = {
|
|
|
169
197
|
};
|
|
170
198
|
};
|
|
171
199
|
/** Fold a history into its claims: one per token, in the order they were first seen. */
|
|
172
|
-
export declare function claimsOf(events: LeaseHistoryRecord[], live: Pick<WorkLeaseState, "token" | "state"> | null): LeaseClaim[];
|
|
200
|
+
export declare function claimsOf(events: LeaseHistoryRecord[], live: Pick<WorkLeaseState, "token" | "state"> | null, kept?: readonly KeptAttempt[]): LeaseClaim[];
|
|
201
|
+
/**
|
|
202
|
+
* The attempt limit of a work record (#3147): the integer in the field the
|
|
203
|
+
* kind's `work.attempts.field` names, else the kind's `work.attempts.max`;
|
|
204
|
+
* null when the kind declares no attempts.
|
|
205
|
+
*/
|
|
206
|
+
export declare function attemptLimit(kind: LoadedRecordKind["kind"], data: Record<string, unknown> | null): number | null;
|
|
207
|
+
/** Count `claims`' attempts against `limit`. */
|
|
208
|
+
export declare function attemptsOf(claims: readonly LeaseClaim[], limit: number | null): WorkAttempts;
|
|
173
209
|
/**
|
|
174
210
|
* Read work item `id`'s lease history (#2785): every claim, renew and release
|
|
175
211
|
* on `_leases/<id>.jsonl` in the ledger of the member owning the work kind,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"work-cli.d.ts","sourceRoot":"","sources":["../../src/workspace/work-cli.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"work-cli.d.ts","sourceRoot":"","sources":["../../src/workspace/work-cli.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAIH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAA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GAAG,OAAO,CAAC,GAAG,IAAI,EAAE,IAAI,GAAE,SAAS,WAAW,EAAO,GAAG,UAAU,EAAE,CAwB5J;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,gBAAgB,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,GAAG,MAAM,GAAG,IAAI,CAKhH;AAED,gDAAgD;AAChD,wBAAgB,UAAU,CAAC,MAAM,EAAE,SAAS,UAAU,EAAE,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,YAAY,CAG5F;AAED;;;;;GAKG;AACH,wBAAsB,WAAW,CAAC,GAAG,EAAE;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAiC/G;AAED,yCAAyC;AACzC,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,OAAO,CAAC,mBAAmB,EAAE;IAAE,MAAM,EAAE,OAAO,CAAA;CAAE,CAAC,GAAG,MAAM,CAahG;AAiFD,wBAAsB,gBAAgB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CA8C3E"}
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
*/
|
|
21
21
|
import { type EvidenceResult, type WorkAcceptance } from "./work.js";
|
|
22
22
|
/** Why evidence was not attached. Closed. Nothing is written with any of them. */
|
|
23
|
-
export declare const WORK_EVIDENCE_ERROR_CODES: readonly ["kind-unreadable", "kind-invalid", "schema-unreadable", "schema-id-mismatch", "schema-invalid", "location-missing", "write-usage-invalid", "write-input-invalid", "record-not-found", "amend-id-immutable", "record-closed", "amend-supersede-instead", "record-sign-failed", "ratify-quorum-not-met", "record-unparseable", "record-schema-invalid", "record-id-duplicate", "record-supersedes-unknown", "record-supersedes-conflict", "record-remediates-unknown", "record-remediates-not-closed", "session-seal-mismatch", "session-verdict-unknown-record", "work-kind-missing", "work-kind-ambiguous", "work-item-unknown", "work-item-closed", "work-criterion-unknown", "work-acceptance-self-verified", "lease-held", "lease-not-held", "lease-token-mismatch", "not-a-git-repository"];
|
|
23
|
+
export declare const WORK_EVIDENCE_ERROR_CODES: readonly ["kind-unreadable", "kind-invalid", "schema-unreadable", "schema-id-mismatch", "schema-invalid", "location-missing", "write-usage-invalid", "write-input-invalid", "record-not-found", "amend-id-immutable", "record-closed", "amend-supersede-instead", "record-sign-failed", "ratify-quorum-not-met", "write-scope-member", "write-scope-kind", "write-scope-class-unknown", "agent-unknown", "principal-unidentified", "record-unparseable", "record-schema-invalid", "record-id-duplicate", "record-supersedes-unknown", "record-supersedes-conflict", "record-remediates-unknown", "record-remediates-not-closed", "record-seal-mismatch", "session-seal-mismatch", "session-verdict-unknown-record", "work-kind-missing", "work-kind-ambiguous", "work-item-unknown", "work-item-closed", "work-criterion-unknown", "work-acceptance-self-verified", "lease-held", "lease-not-held", "lease-token-mismatch", "not-a-git-repository"];
|
|
24
24
|
export type WorkEvidenceErrorCode = (typeof WORK_EVIDENCE_ERROR_CODES)[number];
|
|
25
25
|
export interface AttachWorkEvidenceRequest {
|
|
26
26
|
/** Where the workspace is found, and what `path` and `kind` resolve against. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"work-evidence.d.ts","sourceRoot":"","sources":["../../src/workspace/work-evidence.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAOH,OAAO,EAAwD,KAAK,cAAc,EAAyB,KAAK,cAAc,EAAE,MAAM,QAAQ,CAAC;AAG/I,kFAAkF;AAClF,eAAO,MAAM,yBAAyB,
|
|
1
|
+
{"version":3,"file":"work-evidence.d.ts","sourceRoot":"","sources":["../../src/workspace/work-evidence.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAOH,OAAO,EAAwD,KAAK,cAAc,EA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AC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,CAC9D,CAAC;AAWJ,sGAAsG;AACtG,wBAAsB,kBAAkB,CAAC,GAAG,EAAE,yBAAyB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CA+DtG"}
|
package/dist/workspace/work.d.ts
CHANGED
|
@@ -17,6 +17,9 @@
|
|
|
17
17
|
* - `implements`: each decision it names, with that decision's state;
|
|
18
18
|
* - `acceptance`, for a kind with acceptance criteria (#2772): how many of the
|
|
19
19
|
* record's criteria passing evidence of the expected verification meets;
|
|
20
|
+
* - `contract`, for a kind with a contract link (#3147): the contract record
|
|
21
|
+
* the item builds, with its state, read from the contract kind at the same
|
|
22
|
+
* revision;
|
|
20
23
|
*
|
|
21
24
|
* and each decision `implementedBy`, the work records naming it. The
|
|
22
25
|
* warnings are closed codes. `work-done-gap-open` is not raised here: it
|
|
@@ -25,7 +28,7 @@
|
|
|
25
28
|
*/
|
|
26
29
|
import { type LoadedRecordKind, type ReadRecordsOptions, type RecordEntry } from "./records.js";
|
|
27
30
|
/** Why a work record carries a warning. Closed, like the record warning codes. */
|
|
28
|
-
export declare const WORK_WARNING_CODES: readonly ["work-needs-unknown", "work-implements-unknown", "work-needs-cycle", "work-implements-undecided", "work-done-unpinned", "work-closed-without-date", "work-done-gap-open", "work-acceptance-unmet", "work-acceptance-self-verified"];
|
|
31
|
+
export declare const WORK_WARNING_CODES: readonly ["work-needs-unknown", "work-implements-unknown", "work-needs-cycle", "work-implements-undecided", "work-done-unpinned", "work-closed-without-date", "work-done-gap-open", "work-acceptance-unmet", "work-acceptance-self-verified", "work-contract-unknown", "work-contract-undecided", "work-tier-unknown"];
|
|
29
32
|
export type WorkWarningCode = (typeof WORK_WARNING_CODES)[number];
|
|
30
33
|
/** A link from a work record to another record, with that record's state now. */
|
|
31
34
|
export interface WorkLink {
|
|
@@ -33,6 +36,28 @@ export interface WorkLink {
|
|
|
33
36
|
/** The linked record's state, or null when no record has the id. */
|
|
34
37
|
state: string | null;
|
|
35
38
|
}
|
|
39
|
+
/**
|
|
40
|
+
* One decision-point answer about a work item (#3147), as `records --json`
|
|
41
|
+
* joins it from the answer kind the work kind names: the answer records whose
|
|
42
|
+
* `constrains` names the item's id. The item never copies them.
|
|
43
|
+
*/
|
|
44
|
+
export interface WorkAnswer {
|
|
45
|
+
/** The answer record's id, such as understand-0123456789ab. */
|
|
46
|
+
id: string;
|
|
47
|
+
/** The decision point it answers. */
|
|
48
|
+
point: string | null;
|
|
49
|
+
/** escalated, proposed or answered. */
|
|
50
|
+
state: string | null;
|
|
51
|
+
/** The answer, or null while there is none. */
|
|
52
|
+
answer: string | boolean | null;
|
|
53
|
+
/** The people who answered or confirmed it, empty when a table or model did. */
|
|
54
|
+
answeredBy: string[];
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* The answers about each work item: every answer record whose `constrains`
|
|
58
|
+
* names the item's id, in path order, by item id.
|
|
59
|
+
*/
|
|
60
|
+
export declare function workAnswers(answerRecords: readonly RecordEntry[], ids: Iterable<string>): Map<string, WorkAnswer[]>;
|
|
36
61
|
/** A decision as a work read lists it: its state and the work records implementing it. */
|
|
37
62
|
export interface DecisionWork {
|
|
38
63
|
id: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"work.d.ts","sourceRoot":"","sources":["../../src/workspace/work.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"work.d.ts","sourceRoot":"","sources":["../../src/workspace/work.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAIH,OAAO,EAAmD,KAAK,gBAAgB,EAAE,KAAK,kBAAkB,EAAE,KAAK,WAAW,EAAE,MAAM,WAAW,CAAC;AAE9I,kFAAkF;AAClF,eAAO,MAAM,kBAAkB,wTAyBW,CAAC;AAC3C,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC;AAElE,iF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AE,kBAAkB,GAAG,OAAO,CAAC;IAAE,SAAS,EAAE,YAAY,EAAE,CAAA;CAAE,CAAC,CA+HrJ"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://intentius.io/chant/schemas/workspace/principals/v1/workspace-principals.schema.json",
|
|
4
|
+
"title": "workspace-principals.json",
|
|
5
|
+
"description": "Principal classes a plugin supplies (#2524 D5, #3080, ws-079). A package publishes this file as data at its ./workspace-principals subpath, beside ./workspace-kinds. chant reads it with the file system and never imports the package. A class is a name for the principals holding one role in the trust policy at base; the declaration's writeScope may then give it an entry.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["schema", "classes"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"$schema": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"description": "An editor hint. chant ignores it."
|
|
12
|
+
},
|
|
13
|
+
"$comment": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"description": "A note for people. chant ignores it."
|
|
16
|
+
},
|
|
17
|
+
"schema": {
|
|
18
|
+
"const": 1,
|
|
19
|
+
"description": "The principal classes format version."
|
|
20
|
+
},
|
|
21
|
+
"classes": {
|
|
22
|
+
"type": "array",
|
|
23
|
+
"minItems": 1,
|
|
24
|
+
"items": {
|
|
25
|
+
"$ref": "#/$defs/class"
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"patternProperties": {
|
|
30
|
+
"^x-": true
|
|
31
|
+
},
|
|
32
|
+
"additionalProperties": false,
|
|
33
|
+
"$defs": {
|
|
34
|
+
"class": {
|
|
35
|
+
"type": "object",
|
|
36
|
+
"required": ["name", "description", "role"],
|
|
37
|
+
"properties": {
|
|
38
|
+
"name": {
|
|
39
|
+
"type": "string",
|
|
40
|
+
"pattern": "^(?!x-)[a-z][a-z0-9-]{0,39}$",
|
|
41
|
+
"description": "The class's name, as a key of the declaration's writeScope names it. human, agent, runner and service are the core classes and can't be supplied."
|
|
42
|
+
},
|
|
43
|
+
"description": {
|
|
44
|
+
"type": "string",
|
|
45
|
+
"minLength": 1,
|
|
46
|
+
"description": "One line saying who is in the class, for listings and error messages."
|
|
47
|
+
},
|
|
48
|
+
"role": {
|
|
49
|
+
"type": "string",
|
|
50
|
+
"pattern": "^[a-z][a-z0-9-]*$",
|
|
51
|
+
"description": "The role whose grant in the trust policy at base (.chant/trust.json roles) puts a principal in this class. The agent, runner and service roles belong to the core classes and can't be named here. One role puts a principal in one class."
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"patternProperties": {
|
|
55
|
+
"^x-": true
|
|
56
|
+
},
|
|
57
|
+
"additionalProperties": false
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|