@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
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "https://intentius.io/chant/schemas/workspace/records/v1/records.schema.json",
|
|
4
4
|
"title": "chant workspace records output",
|
|
5
|
-
"description": "What `chant workspace records --json` prints, version 1 of the read contract for records (#2536).
|
|
5
|
+
"description": "What `chant workspace records --json` prints, version 1 of the read contract for records (#2536). A closed record of a kind that declares seal carries a whole-file seal, checked on every read (#2546). Readers ignore fields they do not know; a field is only ever added within a version. The reason and error codes are closed lists: a new code is a new contract version. Contract version 1 is written by chant 0.81.0 and newer; a reader that needs it refuses output whose `contract` it doesn't know. Every code is in the one closed list of `reason-codes.ts`.",
|
|
6
6
|
"oneOf": [{ "$ref": "#/$defs/result" }, { "$ref": "#/$defs/failure" }, { "$ref": "#/$defs/set" }],
|
|
7
7
|
"$defs": {
|
|
8
8
|
"decidedIn": {
|
|
@@ -47,6 +47,43 @@
|
|
|
47
47
|
]
|
|
48
48
|
}
|
|
49
49
|
},
|
|
50
|
+
"spec": {
|
|
51
|
+
"description": "Added in contract 1 by #2546 (#2524 D20). With --current only: the workspace's spec, the current records of each declared kind marked spec: true, each with the workspace files it pins. A kind whose read failed is left out, and is listed under kinds with its error.",
|
|
52
|
+
"type": "object",
|
|
53
|
+
"required": ["kinds", "records"],
|
|
54
|
+
"properties": {
|
|
55
|
+
"kinds": {
|
|
56
|
+
"type": "array",
|
|
57
|
+
"description": "The spec kinds, as the declaration names them, in its order.",
|
|
58
|
+
"items": {
|
|
59
|
+
"type": "object",
|
|
60
|
+
"required": ["member", "path", "name"],
|
|
61
|
+
"properties": {
|
|
62
|
+
"member": { "type": ["string", "null"] },
|
|
63
|
+
"path": { "type": "string" },
|
|
64
|
+
"name": { "type": ["string", "null"] }
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"records": {
|
|
69
|
+
"type": "array",
|
|
70
|
+
"description": "Every current record of the spec kinds, in the order of kinds and then path. Invalid records are listed with valid false, as under kinds.",
|
|
71
|
+
"items": {
|
|
72
|
+
"type": "object",
|
|
73
|
+
"required": ["kind", "id", "path", "state", "valid", "digest", "assets"],
|
|
74
|
+
"properties": {
|
|
75
|
+
"kind": { "type": "string", "description": "The kind's name, such as decision." },
|
|
76
|
+
"id": { "type": ["string", "null"] },
|
|
77
|
+
"path": { "type": "string" },
|
|
78
|
+
"state": { "type": ["string", "null"] },
|
|
79
|
+
"valid": { "type": "boolean" },
|
|
80
|
+
"digest": { "type": "string", "pattern": "^[0-9a-f]{64}$" },
|
|
81
|
+
"assets": { "type": "array", "items": { "$ref": "#/$defs/asset" } }
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
},
|
|
50
87
|
"kind": false,
|
|
51
88
|
"records": false,
|
|
52
89
|
"error": false
|
|
@@ -69,6 +106,10 @@
|
|
|
69
106
|
"format": {
|
|
70
107
|
"enum": ["markdown-front-matter", "json"],
|
|
71
108
|
"description": "Added in contract 1 by #2664 (ws-053). How each record file holds its structured core: the YAML front matter of a Markdown file, or the whole file as one JSON object, read as I-JSON (no repeated member name)."
|
|
109
|
+
},
|
|
110
|
+
"spec": {
|
|
111
|
+
"type": "boolean",
|
|
112
|
+
"description": "Added in contract 1 by #2546. true when the kind file marks the kind spec: true, so its current records and the files they pin are part of the workspace's spec (#2524 D20)."
|
|
72
113
|
}
|
|
73
114
|
}
|
|
74
115
|
},
|
|
@@ -83,6 +124,14 @@
|
|
|
83
124
|
},
|
|
84
125
|
"error": false,
|
|
85
126
|
"current": { "type": "boolean", "description": "Whether superseded records were left out (--current)." },
|
|
127
|
+
"uncommitted": {
|
|
128
|
+
"type": "boolean",
|
|
129
|
+
"description": "Added in contract 1 by #3160. Whether only the records HEAD doesn't hold were listed (--uncommitted): each record's worktree is then modified or new, checkout is present, and summary's total, valid and invalid count the records listed. Absent from documents written before #3160, which read as false."
|
|
130
|
+
},
|
|
131
|
+
"checkout": {
|
|
132
|
+
"description": "Added in contract 1 by #3160, on a read of the working tree in a git repository; absent under --at and outside git. The branch, head and base the working tree is on, and the records of the kind it has deleted.",
|
|
133
|
+
"$ref": "#/$defs/checkout"
|
|
134
|
+
},
|
|
86
135
|
"trust": { "$ref": "#/$defs/trust" },
|
|
87
136
|
"records": {
|
|
88
137
|
"description": "One entry per file the kind locates, sorted by path.",
|
|
@@ -104,6 +153,42 @@
|
|
|
104
153
|
"type": "array",
|
|
105
154
|
"items": { "$ref": "#/$defs/decisionWork" }
|
|
106
155
|
}
|
|
156
|
+
},
|
|
157
|
+
"allOf": [
|
|
158
|
+
{
|
|
159
|
+
"if": { "properties": { "uncommitted": { "const": true } }, "required": ["uncommitted"] },
|
|
160
|
+
"then": {
|
|
161
|
+
"required": ["checkout"],
|
|
162
|
+
"properties": {
|
|
163
|
+
"checkout": true,
|
|
164
|
+
"at": { "type": "null" },
|
|
165
|
+
"records": { "type": "array", "items": { "type": "object", "required": ["worktree"], "properties": { "worktree": { "enum": ["modified", "new"] } } } }
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
]
|
|
170
|
+
},
|
|
171
|
+
"checkout": {
|
|
172
|
+
"type": "object",
|
|
173
|
+
"required": ["branch", "head", "base", "baseFrom", "deleted"],
|
|
174
|
+
"properties": {
|
|
175
|
+
"branch": { "type": ["string", "null"], "description": "The checked-out branch's short name, such as chant/work/w-12, or null when HEAD is detached." },
|
|
176
|
+
"head": {
|
|
177
|
+
"type": ["string", "null"],
|
|
178
|
+
"pattern": "^[0-9a-f]{40,64}$",
|
|
179
|
+
"description": "The full commit id HEAD names, or null before the first commit (every record is then new). Each record's worktree is judged against it."
|
|
180
|
+
},
|
|
181
|
+
"base": {
|
|
182
|
+
"type": ["string", "null"],
|
|
183
|
+
"pattern": "^[0-9a-f]{40,64}$",
|
|
184
|
+
"description": "The merge base of head and the target branch tip, the commit the branch forked from: what applying the branch would be measured against. The target is --base when given, else origin/HEAD, main or master, as for trust. Null without a head, a target, or common history."
|
|
185
|
+
},
|
|
186
|
+
"baseFrom": { "enum": ["flag", "origin/HEAD", "main", "master", null], "description": "Where the target branch was found; null when there is none." },
|
|
187
|
+
"deleted": {
|
|
188
|
+
"type": "array",
|
|
189
|
+
"items": { "type": "string" },
|
|
190
|
+
"description": "Record files of the kind that head holds and the working tree no longer has, staged or not, from the repository root with / separators, sorted. A renamed record is here under its old name and in records as new."
|
|
191
|
+
}
|
|
107
192
|
}
|
|
108
193
|
},
|
|
109
194
|
"workLink": {
|
|
@@ -114,6 +199,17 @@
|
|
|
114
199
|
"state": { "type": ["string", "null"], "description": "The linked record's state as it writes it, or null when no record has the id." }
|
|
115
200
|
}
|
|
116
201
|
},
|
|
202
|
+
"workAnswer": {
|
|
203
|
+
"type": "object",
|
|
204
|
+
"required": ["id", "point", "state", "answer", "answeredBy"],
|
|
205
|
+
"properties": {
|
|
206
|
+
"id": { "type": "string", "description": "The answer record's id: the point's name and the first 12 hex digits of its inputs hash." },
|
|
207
|
+
"point": { "type": ["string", "null"], "description": "The decision point it answers." },
|
|
208
|
+
"state": { "type": ["string", "null"], "description": "escalated, proposed or answered." },
|
|
209
|
+
"answer": { "oneOf": [{ "type": "string" }, { "type": "boolean" }, { "type": "null" }], "description": "The answer, or null while there is none." },
|
|
210
|
+
"answeredBy": { "type": "array", "items": { "type": "string" }, "description": "The people who answered or confirmed it; empty when a table or a model answered." }
|
|
211
|
+
}
|
|
212
|
+
},
|
|
117
213
|
"decisionWork": {
|
|
118
214
|
"type": "object",
|
|
119
215
|
"required": ["id", "path", "state", "supersededBy", "implementedBy"],
|
|
@@ -158,12 +254,12 @@
|
|
|
158
254
|
"items": { "$ref": "#/$defs/asset" }
|
|
159
255
|
},
|
|
160
256
|
"warnings": {
|
|
161
|
-
"description": "Added in contract 1 by #2549. Findings that leave the record valid: a pinned file that changed, went missing or did not follow a superseding decision, a supersedes link that has no effect yet, (added by #2654) an evidence list that is empty, (added by #2672) a verdict that names no digest, or (added by #2683) a work record's links and dates, or (added by #2688) a record whose author seal is not attested under a signers file at base, or (added by #2772) a work record's acceptance criteria unmet when it is done, or met by a manual verdict from its implementer. A work record never carries record-no-evidence; a done one with no evidence carries work-done-unpinned. valid and --current do not look at them.",
|
|
257
|
+
"description": "Added in contract 1 by #2549. Findings that leave the record valid: a pinned file that changed, went missing or did not follow a superseding decision, a supersedes link that has no effect yet, (added by #2654) an evidence list that is empty, (added by #2672) a verdict that names no digest, or (added by #2683) a work record's links and dates, or (added by #2688) a record whose author seal is not attested under a signers file at base, or (added by #2772) a work record's acceptance criteria unmet when it is done, or met by a manual verdict from its implementer, or (added by #3147) a work record's contract that no record has or nobody approved, or a builder tier its kind does not list. A work record never carries record-no-evidence; a done one with no evidence carries work-done-unpinned. valid and --current do not look at them.",
|
|
162
258
|
"type": "array",
|
|
163
259
|
"items": { "$ref": "#/$defs/warning" }
|
|
164
260
|
},
|
|
165
261
|
"digest": {
|
|
166
|
-
"description": "Added in contract 1 by #2672. The lowercase hex SHA-256 of the record file's text, with LF line endings and without the kind's reviews block and its top-level seal block (#2688) in the front matter, or for a kind of format json without the top-level reviews and seal members, each with one comma beside it (#2664). A record with no seal hashes as it did before #2688. A review verdict names it in its digest field, and stops counting once the record's digest moves on; a record's author seal signs it. For a kind with no reviews list, the digest of the whole text.",
|
|
262
|
+
"description": "Added in contract 1 by #2672. The lowercase hex SHA-256 of the record file's text, with LF line endings and without the kind's reviews block and its top-level seal block (#2688) in the front matter, or for a kind of format json without the top-level reviews and seal members, each with one comma beside it (#2664). A record with no seal hashes as it did before #2688. A review verdict names it in its digest field, and stops counting once the record's digest moves on; a record's author seal signs it. A kind that declares seal (#2546) also leaves out the field holding the whole-file seal, and a kind with reviews.ratified its state line (#2873). For a kind with no reviews list, the digest of the whole text. It is not the record's seal: the seal covers the whole file (#2546, ws-063).",
|
|
167
263
|
"type": "string",
|
|
168
264
|
"pattern": "^[0-9a-f]{64}$"
|
|
169
265
|
},
|
|
@@ -202,6 +298,19 @@
|
|
|
202
298
|
"description": "Added in contract 1 by #2772, on every parsed record of a work kind whose work block names acceptance criteria. How many of the record's criteria passing evidence meets: evidence naming the criterion, with result pass and the criterion's verification, and for a manual criterion a by other than the implementer. Null when the record lists no criteria, so a record without them reads as before.",
|
|
203
299
|
"oneOf": [{ "type": "null" }, { "$ref": "#/$defs/workAcceptance" }]
|
|
204
300
|
},
|
|
301
|
+
"worktree": {
|
|
302
|
+
"enum": ["committed", "modified", "new"],
|
|
303
|
+
"description": "Added in contract 1 by #3160, on every record of a read of the working tree in a git repository; absent under --at and outside git. committed when the file is as HEAD holds it, modified when it differs from HEAD, new when HEAD doesn't hold it, staged or not. modified and new are the records a person has kept and not yet committed or applied."
|
|
304
|
+
},
|
|
305
|
+
"contract": {
|
|
306
|
+
"description": "Added in contract 1 by #3147, on every parsed record of a work kind whose work block names a contract kind. The contract record the item builds, by the id in the work block's contract field, with that record's state now; state is null when no record of the contract kind has the id. Null when the item names no contract.",
|
|
307
|
+
"oneOf": [{ "type": "null" }, { "$ref": "#/$defs/workLink" }]
|
|
308
|
+
},
|
|
309
|
+
"answers": {
|
|
310
|
+
"description": "Added in contract 1 by #3147, on every record with an id of a work kind whose work block names an answer kind. The decision-point answers about the item: each answer record whose constrains names the item's id, in path order, joined by id and never copied onto the item. Read at the same revision; in the working tree, with the answers a steward keeps on the lifecycle ledger laid over it. Absent when the answer kind can't be read.",
|
|
311
|
+
"type": "array",
|
|
312
|
+
"items": { "$ref": "#/$defs/workAnswer" }
|
|
313
|
+
},
|
|
205
314
|
"lease": {
|
|
206
315
|
"description": "Added in contract 1 by #2732, on every record of a work kind with an id, read in the working tree (absent under --at). The item's active work lease (chant workspace work claim), or null when nobody holds one live. Read from the local lease refs, refs/chant/lease/[_members/<member>/]work/<id> and the remote's as last fetched, of the ledger owning the work kind file; records never fetches.",
|
|
207
316
|
"oneOf": [{ "type": "null" }, { "$ref": "#/$defs/workLease" }]
|
|
@@ -278,6 +387,9 @@
|
|
|
278
387
|
"work-done-gap-open",
|
|
279
388
|
"work-acceptance-unmet",
|
|
280
389
|
"work-acceptance-self-verified",
|
|
390
|
+
"work-contract-unknown",
|
|
391
|
+
"work-contract-undecided",
|
|
392
|
+
"work-tier-unknown",
|
|
281
393
|
"answer-points-unreadable",
|
|
282
394
|
"answer-point-unknown",
|
|
283
395
|
"answer-point-changed",
|
|
@@ -405,7 +517,17 @@
|
|
|
405
517
|
"attestor": { "type": "string", "description": "The attestor that answered, such as ssh-commit." },
|
|
406
518
|
"principal": { "type": "string", "description": "The signer, when attested." },
|
|
407
519
|
"key": { "type": "string", "description": "The signing key's fingerprint, when known." },
|
|
408
|
-
"reason": { "type": "string" }
|
|
520
|
+
"reason": { "type": "string" },
|
|
521
|
+
"returned": {
|
|
522
|
+
"description": "Added in contract 1 by #2552. Set when the record's bytes came back in a return that carries the commit they were made in: level, principal and key then judge that commit, with the signers at base plus those admitted for the return, and commit is the commit here that holds the bytes. A signer neither lists reads as attested-unverifiable-here until an admin admits it.",
|
|
523
|
+
"type": "object",
|
|
524
|
+
"required": ["id", "importedIn"],
|
|
525
|
+
"properties": {
|
|
526
|
+
"id": { "type": "string", "pattern": "^ret-[0-9a-f]{12}$", "description": "The return, .chant/returns/<id>.json at the workspace root." },
|
|
527
|
+
"commit": { "type": "string", "pattern": "^[0-9a-f]{40,64}$", "description": "The commit in the returned copy that last changed the file." },
|
|
528
|
+
"importedIn": { "type": ["string", "null"], "pattern": "^[0-9a-f]{40,64}$", "description": "The commit here that holds the returned bytes." }
|
|
529
|
+
}
|
|
530
|
+
}
|
|
409
531
|
}
|
|
410
532
|
},
|
|
411
533
|
"reason": {
|
|
@@ -421,6 +543,7 @@
|
|
|
421
543
|
"record-supersedes-conflict",
|
|
422
544
|
"record-remediates-unknown",
|
|
423
545
|
"record-remediates-not-closed",
|
|
546
|
+
"record-seal-mismatch",
|
|
424
547
|
"session-seal-mismatch",
|
|
425
548
|
"session-verdict-unknown-record"
|
|
426
549
|
]
|
package/src/workspace/records.ts
CHANGED
|
@@ -13,15 +13,18 @@
|
|
|
13
13
|
*
|
|
14
14
|
* A record that fails any of that is still returned, with reason codes, and the
|
|
15
15
|
* read succeeds. Only a failure to read the kind, its schema or the revision is
|
|
16
|
-
* an error.
|
|
17
|
-
* #
|
|
16
|
+
* an error. A closed record of a kind that declares `seal` is checked against
|
|
17
|
+
* its whole-file seal ({@link recordSeal}, #2546); author and verdict seals
|
|
18
|
+
* are checked by `records-cli.ts` against the policy at base. Nothing here
|
|
19
|
+
* needs a `chant.workspace.json`.
|
|
18
20
|
*
|
|
19
21
|
* Everything under `workspace/` loads only when a `chant workspace` command
|
|
20
22
|
* runs. The level-0 goldens (#2526) fail if a level-0 command loads it.
|
|
21
23
|
*/
|
|
22
24
|
|
|
23
25
|
import { createHash } from "node:crypto";
|
|
24
|
-
import { sha256Hex } from "../content-digest";
|
|
26
|
+
import { contentDigest, sha256Hex } from "../content-digest";
|
|
27
|
+
import { canonicalJson } from "../effect-receipt";
|
|
25
28
|
import { readFileSync, statSync } from "node:fs";
|
|
26
29
|
import { dirname, posix, relative, resolve, sep } from "node:path";
|
|
27
30
|
import yaml from "js-yaml";
|
|
@@ -57,6 +60,8 @@ export const RECORD_REASON_CODES = [
|
|
|
57
60
|
"record-remediates-unknown",
|
|
58
61
|
/** A `remediates` link names a record that isn't closed: a record still open is amended instead (#2774). */
|
|
59
62
|
"record-remediates-not-closed",
|
|
63
|
+
/** A closed record's seal is not the whole-file seal of its text now: it changed after it closed (#2546, ws-063). */
|
|
64
|
+
"record-seal-mismatch",
|
|
60
65
|
/** A closed session's seal is not the digest of its text: it changed after it closed (#2673). */
|
|
61
66
|
"session-seal-mismatch",
|
|
62
67
|
/** A session's verdict names a record the kind's subject records do not have (#2673). */
|
|
@@ -171,13 +176,21 @@ export const RECORD_SEAL_FIELD = "seal";
|
|
|
171
176
|
* moving a record to that state keeps the verdicts that ratified it
|
|
172
177
|
* counting.
|
|
173
178
|
*/
|
|
174
|
-
export function digestFields(kind: Pick<RecordKind, "reviews" | "stateField">): string[] | null {
|
|
179
|
+
export function digestFields(kind: Pick<RecordKind, "reviews" | "stateField" | "seal">): string[] | null {
|
|
175
180
|
if (!kind.reviews) return null;
|
|
176
181
|
const fields = [kind.reviews.field, RECORD_SEAL_FIELD];
|
|
177
182
|
if (kind.reviews.ratified !== undefined && kind.stateField !== undefined) fields.push(kind.stateField);
|
|
183
|
+
// The whole-file seal is written when the record closes (#2546, ws-063), so
|
|
184
|
+
// the verdicts that ratified it keep counting on the sealed record.
|
|
185
|
+
if (kind.seal !== undefined) fields.push(kind.seal.field);
|
|
178
186
|
return fields;
|
|
179
187
|
}
|
|
180
188
|
|
|
189
|
+
/** The field holding a closed record's whole-file seal: the kind's `seal.field`, or a session kind's `session.seal` (#2546, #2673). */
|
|
190
|
+
export function sealFieldOf(kind: Pick<RecordKind, "seal" | "session">): string | undefined {
|
|
191
|
+
return kind.seal?.field ?? kind.session?.seal;
|
|
192
|
+
}
|
|
193
|
+
|
|
181
194
|
/** What a verdict's seal establishes (#2687). See `trust/seal.ts`. */
|
|
182
195
|
export interface VerdictAttestation {
|
|
183
196
|
/** Why the verdict is not attested. Absent when its seal verified. */
|
|
@@ -406,6 +419,23 @@ export const recordKindSchema = z
|
|
|
406
419
|
* done record with a criterion that no passing evidence meets is warned
|
|
407
420
|
* `work-acceptance-unmet`, which `check` fails on (WSP117). Optional, and
|
|
408
421
|
* a record without the list is read as before.
|
|
422
|
+
*
|
|
423
|
+
* #3147 adds four, each optional:
|
|
424
|
+
*
|
|
425
|
+
* - `contract`: the front-matter field naming the contract record the
|
|
426
|
+
* item builds, and the kind file of those records (relative to this
|
|
427
|
+
* kind file). Each record gets `contract` with that record's state,
|
|
428
|
+
* warned `work-contract-unknown` or `work-contract-undecided`.
|
|
429
|
+
* - `tier`: the field holding the item's builder tier, and the tiers the
|
|
430
|
+
* workspace allows, declared once here. A tier outside them is warned
|
|
431
|
+
* `work-tier-unknown`.
|
|
432
|
+
* - `attempts`: the field holding an item's own attempt limit, and the
|
|
433
|
+
* default `max` for items without one. `work history` counts attempts
|
|
434
|
+
* against it.
|
|
435
|
+
* - `answers`: the answer kind file (relative to this kind file) whose
|
|
436
|
+
* records answer decision points about an item. Each record gets
|
|
437
|
+
* `answers`, the answers whose `constrains` names its id, joined by id
|
|
438
|
+
* rather than copied onto the item.
|
|
409
439
|
*/
|
|
410
440
|
work: z
|
|
411
441
|
.object({
|
|
@@ -416,6 +446,14 @@ export const recordKindSchema = z
|
|
|
416
446
|
done: z.string().min(1),
|
|
417
447
|
closedOn: z.string().min(1),
|
|
418
448
|
acceptance: z.object({ field: z.string().min(1), implementer: z.string().min(1) }).strict().optional(),
|
|
449
|
+
contract: z.object({ field: z.string().min(1), kind: z.string().min(1) }).strict().optional(),
|
|
450
|
+
tier: z
|
|
451
|
+
.object({ field: z.string().min(1), tiers: z.array(z.string().min(1)).min(1) })
|
|
452
|
+
.strict()
|
|
453
|
+
.refine((t) => new Set(t.tiers).size === t.tiers.length, { message: "work.tier.tiers lists each tier once", path: ["tiers"] })
|
|
454
|
+
.optional(),
|
|
455
|
+
attempts: z.object({ field: z.string().min(1), max: z.number().int().min(1) }).strict().optional(),
|
|
456
|
+
answers: z.string().min(1).optional(),
|
|
419
457
|
})
|
|
420
458
|
.strict()
|
|
421
459
|
.optional(),
|
|
@@ -430,8 +468,32 @@ export const recordKindSchema = z
|
|
|
430
468
|
* Optional.
|
|
431
469
|
*/
|
|
432
470
|
answers: z.object({ points: z.string().min(1) }).strict().optional(),
|
|
471
|
+
/**
|
|
472
|
+
* The top-level field that holds a closed record's seal (#2546, ws-003,
|
|
473
|
+
* ws-063): {@link recordSeal}, the whole-file JCS/SHA-256 of the record
|
|
474
|
+
* without that field. `records amend` and `records new` write it when a
|
|
475
|
+
* record enters one of `closedStates`, and `records` reports a closed
|
|
476
|
+
* record whose seal does not match as `record-seal-mismatch`. Requires
|
|
477
|
+
* states. A session kind's `session.seal` names the same field for a
|
|
478
|
+
* session, and when both are given they must agree. Optional.
|
|
479
|
+
*/
|
|
480
|
+
seal: z.object({ field: z.string().min(1) }).strict().optional(),
|
|
481
|
+
/**
|
|
482
|
+
* The kind's current records, with the files they pin, are part of the
|
|
483
|
+
* workspace's spec (#2524 D20): `chant workspace records --current
|
|
484
|
+
* --json` lists them under `spec`. Optional, and false when left out.
|
|
485
|
+
*/
|
|
486
|
+
spec: z.boolean().optional(),
|
|
433
487
|
})
|
|
434
488
|
.strict()
|
|
489
|
+
.refine((k) => k.states !== undefined || k.seal === undefined, {
|
|
490
|
+
message: "a kind without states cannot have seal: a record is sealed when it enters a closed state",
|
|
491
|
+
path: ["seal"],
|
|
492
|
+
})
|
|
493
|
+
.refine((k) => k.seal === undefined || k.session === undefined || k.seal.field === k.session.seal, {
|
|
494
|
+
message: "seal.field and session.seal name the field that holds a closed session's seal, and must be the same",
|
|
495
|
+
path: ["seal"],
|
|
496
|
+
})
|
|
435
497
|
.refine((k) => (k.idField === undefined) !== (k.idFrom === undefined), {
|
|
436
498
|
message: "a kind names its id with exactly one of idField and idFrom",
|
|
437
499
|
path: ["idField"],
|
|
@@ -748,7 +810,9 @@ function nonJson(v: unknown, at: string, seen: Set<object>): string | undefined
|
|
|
748
810
|
* record's author seal (#2688; {@link digestFields}), so sealing a record
|
|
749
811
|
* leaves its digest where it was too. A record with no `seal` hashes exactly
|
|
750
812
|
* as it did before author seals existed. A kind with `reviews.ratified` adds
|
|
751
|
-
* its state field (#2873)
|
|
813
|
+
* its state field (#2873), and a kind with `seal` its seal field (#2546), so
|
|
814
|
+
* the whole-file seal written at the close moves no digest. The digest is not
|
|
815
|
+
* that seal: {@link recordSeal} covers the whole record.
|
|
752
816
|
*
|
|
753
817
|
* The rule, which a hand-editor can follow with a text editor and
|
|
754
818
|
* `sha256sum`:
|
|
@@ -776,6 +840,50 @@ export function recordTextDigest(text: string, field: string | readonly string[]
|
|
|
776
840
|
return createHash("sha256").update(kept, "utf8").digest("hex");
|
|
777
841
|
}
|
|
778
842
|
|
|
843
|
+
// ── Record seal ──────────────────────────────────────────────────────────────
|
|
844
|
+
|
|
845
|
+
/**
|
|
846
|
+
* The seal of a closed record (#2546, ws-003, ws-063): `sha256:` and the
|
|
847
|
+
* lowercase hex SHA-256 of the RFC 8785 (JCS) form of the whole record, with
|
|
848
|
+
* only the field that holds the seal left out. It is a separate hash from
|
|
849
|
+
* {@link recordTextDigest}, which a review verdict names: the digest leaves
|
|
850
|
+
* out the reviews, the author seal and the state so verdicts keep counting,
|
|
851
|
+
* and the seal covers all of them.
|
|
852
|
+
*
|
|
853
|
+
* 1. Line endings become LF (CRLF and a lone CR each become one LF).
|
|
854
|
+
* 2. The structured core is parsed as the kind's format says: the front
|
|
855
|
+
* matter, as the JSON subset of YAML, or the whole JSON object. The
|
|
856
|
+
* top-level member `field` is removed from it.
|
|
857
|
+
* 3. For a Markdown record the value hashed is the object
|
|
858
|
+
* `{"body": <the text after the closing --- line>, "core": <the core>}`;
|
|
859
|
+
* for a JSON record it is the core itself.
|
|
860
|
+
* 4. That value is written in JCS (keys sorted by UTF-16 code units, no
|
|
861
|
+
* whitespace, ECMAScript number and string forms) and hashed as UTF-8.
|
|
862
|
+
*
|
|
863
|
+
* So every value in the record and every byte of its body is sealed, the
|
|
864
|
+
* reviews, the author seal and the state included, while the key order,
|
|
865
|
+
* quoting and indentation of the front matter are not: the same record
|
|
866
|
+
* written another way has the same seal. A YAML comment in the front matter
|
|
867
|
+
* is not part of the record, so it is not sealed either (#3066). Returns null when
|
|
868
|
+
* the core can't be parsed.
|
|
869
|
+
*/
|
|
870
|
+
export function recordSeal(text: string, field: string, format: RecordFormat = "markdown-front-matter"): string | null {
|
|
871
|
+
const lf = text.replace(/\r\n?/g, "\n");
|
|
872
|
+
const parsed = parseRecord(format, lf);
|
|
873
|
+
if (!parsed.ok) return null;
|
|
874
|
+
const core = { ...parsed.value };
|
|
875
|
+
delete core[field];
|
|
876
|
+
const sealed = format === "json" ? core : { body: bodyText(lf), core };
|
|
877
|
+
return contentDigest(canonicalJson(sealed));
|
|
878
|
+
}
|
|
879
|
+
|
|
880
|
+
/** The text below a Markdown file's front matter, with LF line endings: everything after the closing `---` line. */
|
|
881
|
+
export function bodyText(text: string): string {
|
|
882
|
+
const normalised = text.replace(/\r\n?/g, "\n");
|
|
883
|
+
const m = normalised.match(/^---\n[\s\S]*?\n---(?:\n|$)/);
|
|
884
|
+
return m ? normalised.slice(m[0].length) : "";
|
|
885
|
+
}
|
|
886
|
+
|
|
779
887
|
/**
|
|
780
888
|
* `text` with the top-level member `field` removed from a JSON record, by the
|
|
781
889
|
* rule a hand-editor follows for a JSON record (ws-053). With several fields
|
|
@@ -1065,6 +1173,8 @@ export interface RecordEntry {
|
|
|
1065
1173
|
implements?: WorkLink[];
|
|
1066
1174
|
/** For a work kind with acceptance criteria (#2772): how many of the record's criteria passing evidence meets, or null when it lists none. */
|
|
1067
1175
|
acceptance?: WorkAcceptance | null;
|
|
1176
|
+
/** For a work kind with a contract link (#3147): the contract record the item builds, with its state, or null when it names none. */
|
|
1177
|
+
contract?: WorkLink | null;
|
|
1068
1178
|
}
|
|
1069
1179
|
|
|
1070
1180
|
export interface ReadRecordsOptions {
|
|
@@ -1282,6 +1392,14 @@ export async function readRecords(loaded: LoadedRecordKind, options: ReadRecords
|
|
|
1282
1392
|
if (drift) entry.warnings.push({ code: "source-transcript-drift", message: drift });
|
|
1283
1393
|
}
|
|
1284
1394
|
}
|
|
1395
|
+
if (kind.seal && !kind.session && entry.state !== null && (kind.closedStates ?? []).includes(entry.state)) {
|
|
1396
|
+
// A closed record's whole-file seal (#2546, ws-063). A session's is checked with its verdicts (#2673).
|
|
1397
|
+
const seal = fm.value[kind.seal.field];
|
|
1398
|
+
const actual = typeof seal === "string" ? recordSeal(text, kind.seal.field, kind.format) : null;
|
|
1399
|
+
if (typeof seal === "string" && actual !== seal) {
|
|
1400
|
+
entry.reasons.push({ code: "record-seal-mismatch", message: `${kind.seal.field} is ${seal}, but the record seals to ${actual}: it changed after it closed` });
|
|
1401
|
+
}
|
|
1402
|
+
}
|
|
1285
1403
|
if (kind.pins) {
|
|
1286
1404
|
const cited = fm.value[kind.pins.field];
|
|
1287
1405
|
if (Array.isArray(cited) && cited.length === 0) {
|