@intentius/chant 0.101.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/builder.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/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 +1 -1
- package/dist/cli/mcp/workspace-tools.d.ts.map +1 -1
- package/dist/cli/registry.d.ts +11 -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 +19 -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 +55 -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-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 +8 -8
- 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 +11 -11
- 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/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 +2 -0
- 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/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 +5 -0
- package/dist/workspace/agent-cli.d.ts.map +1 -1
- package/dist/workspace/box-factory.d.ts +73 -0
- package/dist/workspace/box-factory.d.ts.map +1 -0
- 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.d.ts +5 -0
- package/dist/workspace/checks.d.ts.map +1 -1
- package/dist/workspace/compose-graph.d.ts +10 -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 +91 -4
- package/dist/workspace/declaration.d.ts.map +1 -1
- package/dist/workspace/declaration.schema.json +234 -5
- 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/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 +18 -4
- package/dist/workspace/kinds.d.ts.map +1 -1
- package/dist/workspace/lineage-hash-index.d.ts.map +1 -1
- package/dist/workspace/lineage-lock.d.ts +2 -2
- package/dist/workspace/lineage-lock.d.ts.map +1 -1
- package/dist/workspace/links.d.ts.map +1 -1
- 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 +21 -1
- package/dist/workspace/reason-codes.d.ts.map +1 -1
- package/dist/workspace/record-assets.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 +27 -1
- package/dist/workspace/records-cli.d.ts.map +1 -1
- package/dist/workspace/records-close.d.ts +1 -1
- 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 +5 -4
- package/dist/workspace/records-write.d.ts.map +1 -1
- package/dist/workspace/records.d.ts +15 -0
- package/dist/workspace/records.d.ts.map +1 -1
- 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/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.map +1 -1
- package/dist/workspace/trust/rotation.d.ts.map +1 -1
- package/dist/workspace/trust/seal.d.ts +33 -0
- package/dist/workspace/trust/seal.d.ts.map +1 -1
- package/dist/workspace/trust/test-repo.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 +79 -19
- package/dist/workspace/write-scope.d.ts.map +1 -1
- 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/cli/commands/__fixtures__/init-lexicon-output/package.json +1 -1
- 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 +18 -0
- package/src/cli/commands/import-parser-options.test.ts +133 -0
- package/src/cli/commands/import.ts +21 -3
- 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/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 +87 -3
- 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 +1 -0
- package/src/cli/main.ts +65 -11
- package/src/cli/mcp/workspace-tools.test.ts +5 -2
- package/src/cli/mcp/workspace-tools.ts +29 -2
- package/src/cli/registry.ts +11 -2
- 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/testdata/postgres-tags.json +242 -0
- package/src/config.test.ts +21 -0
- package/src/config.ts +15 -0
- 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 +55 -3
- package/src/lifecycle/gate-ledger.ts +16 -0
- package/src/lifecycle/observe.test.ts +18 -0
- package/src/lifecycle/observe.ts +6 -4
- 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/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/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 +74 -0
- package/src/op/gate-approval.ts +5 -1
- package/src/op/gate.ts +31 -5
- package/src/op/index.ts +2 -0
- 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/workspace/__fixtures__/studio-template-84c8b21.json +1 -1
- package/src/workspace/agent-cli.ts +7 -3
- package/src/workspace/agent.schema.json +22 -0
- package/src/workspace/box-factory.test.ts +320 -0
- package/src/workspace/box-factory.ts +103 -0
- package/src/workspace/changes.schema.json +12 -20
- package/src/workspace/changes.ts +4 -1
- package/src/workspace/checks/boxes.test.ts +2 -0
- package/src/workspace/checks.ts +29 -5
- package/src/workspace/compose-graph.ts +7 -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 +234 -5
- package/src/workspace/declaration.ts +174 -10
- package/src/workspace/graph-cli.ts +5 -2
- package/src/workspace/graph.schema.json +247 -0
- package/src/workspace/identity.test.ts +196 -0
- package/src/workspace/identity.ts +186 -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.ts +44 -37
- package/src/workspace/points-write.schema.json +1 -0
- package/src/workspace/principal-classes.test.ts +175 -0
- package/src/workspace/principal-classes.ts +307 -0
- package/src/workspace/reason-codes.test.ts +11 -3
- package/src/workspace/reason-codes.ts +24 -1
- package/src/workspace/records-amend.schema.json +2 -0
- package/src/workspace/records-checkout.ts +106 -0
- package/src/workspace/records-cli.ts +103 -11
- package/src/workspace/records-close.schema.json +1 -0
- package/src/workspace/records-new.schema.json +2 -0
- package/src/workspace/records-review.schema.json +2 -0
- package/src/workspace/records-uncommitted.test.ts +171 -0
- package/src/workspace/records-write.ts +28 -6
- package/src/workspace/records.schema.json +72 -1
- package/src/workspace/records.ts +27 -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/status-contract.test.ts +5 -0
- package/src/workspace/status-gates.ts +22 -8
- 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/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/seal.ts +52 -1
- 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 +2 -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 +128 -2
- package/src/workspace/write-scope.ts +170 -45
- package/src/yaml.test.ts +111 -1
- package/src/yaml.ts +141 -549
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checks.d.ts","sourceRoot":"","sources":["../../src/workspace/checks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAIH,OAAO,KAAK,EAAE,cAAc,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACvE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAsD,KAAK,WAAW,EAAkC,KAAK,aAAa,EAAE,MAAM,eAAe,CAAC;AACzJ,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEjD,OAAO,EAA4C,KAAK,eAAe,EAAE,KAAK,YA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AAE,MAAM,EAAE,mBAAmB,EAAE,CAAC;IAAC,UAAU,EAAE,CAAC,mBAAmB,GAAG;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,EAAE,CAAA;CAAE,CAkB7F;AAED,MAAM,WAAW,uBAAuB;IACtC;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,sHAAsH;IACtH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,8FAA8F;IAC9F,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB;;;;;OAKG;IACH,IAAI,CAAC,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;KAAE,CAAC;CAC3D;AAED;;;;;;GAMG;AACH,wBAAsB,oBAAoB,CAAC,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,WAAW,EAAE,OAAO,GAAE;IAAE,aAAa,CAAC,EAAE,OAAO,CAAA;CAAO,GAAG,OAAO,CAAC,cAAc,CAAC,CASrJ;AAUD;;;;;;;;GAQG;AACH,wBAAsB,oBAAoB,CACxC,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAiB,EAC5C,OAAO,GAAE,uBAA4B,GACpC,OAAO,CAAC,sBAAsB,CAAC,CAiEjC"}
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
*
|
|
29
29
|
* `chant graph` itself is untouched: this is the only place members compose.
|
|
30
30
|
*/
|
|
31
|
+
import type { FactoryView, ListingView } from "./box-factory.js";
|
|
31
32
|
import type { Declaration } from "./declaration.js";
|
|
32
33
|
import type { KindRegistry } from "./kinds.js";
|
|
33
34
|
import { type LinkTableRow } from "./links.js";
|
|
@@ -72,6 +73,15 @@ export interface ComposedMember {
|
|
|
72
73
|
* the outer `nodes` with `outer/inner/id` ids.
|
|
73
74
|
*/
|
|
74
75
|
nested?: NestedWorkspace;
|
|
76
|
+
/**
|
|
77
|
+
* The factory and listing the member's box block declares (#3146, ws-077),
|
|
78
|
+
* read from the declaration at the revision read. Set by
|
|
79
|
+
* `chant workspace graph` on every member; null when the box declares neither.
|
|
80
|
+
*/
|
|
81
|
+
box?: {
|
|
82
|
+
factory: FactoryView | null;
|
|
83
|
+
listing: ListingView | null;
|
|
84
|
+
} | null;
|
|
75
85
|
/** Whole-read facts the member's IR carried (`meta`, `pipeline`), kept apart from the composed sections. */
|
|
76
86
|
meta?: Record<string, unknown>;
|
|
77
87
|
pipeline?: unknown;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compose-graph.d.ts","sourceRoot":"","sources":["../../src/workspace/compose-graph.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,EAAc,KAAK,YAAY,EAAE,MAAM,SAAS,CAAC;AACxD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD,OAAO,EAAoB,KAAK,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,QAAQ,EAAE,KAAK,QAAQ,EAAE,KAAK,MAAM,EAAE,KAAK,MAAM,EAAE,MAAM,aAAa,CAAC;AAEpI,2EAA2E;AAC3E,eAAO,MAAM,uBAAuB,IAAI,CAAC;AAEzC;;;GAGG;AACH,eAAO,MAAM,uBAAuB,gJAeM,CAAC;AAC3C,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE3E,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,mBAAmB,CAAC;IAC1B,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,cAA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K,CAAC,EAAE,YAAY,CAAA;CAAE,GACzD,cAAc,CAuEhB"}
|
|
@@ -35,9 +35,17 @@
|
|
|
35
35
|
* app, and a chant member with one composite and one component), declared
|
|
36
36
|
* by `chant workspace init --yes`, so {@link REFERENCE_READS} resolve in
|
|
37
37
|
* both. `workspaceDir` names another workspace with the same files.
|
|
38
|
+
*
|
|
39
|
+
* The workspace the suite generates for a run also holds one decision,
|
|
40
|
+
* proposed and never committed ({@link UNCOMMITTED_DECISION}), so
|
|
41
|
+
* `records --uncommitted` (#3160) has a record to list with its `worktree`.
|
|
42
|
+
* {@link createConformanceWorkspace} called directly leaves it out unless
|
|
43
|
+
* asked, so a test that writes records there allocates the ids it always
|
|
44
|
+
* did. In the chant repository the reference workspace holds whatever the
|
|
45
|
+
* checkout does, often nothing uncommitted.
|
|
38
46
|
*/
|
|
39
47
|
/** The read-contract commands, as a reader names them. */
|
|
40
|
-
export declare const READ_CONTRACT_COMMANDS: readonly ["ls", "graph", "check", "status", "records", "graph --intent", "graph --composites"];
|
|
48
|
+
export declare const READ_CONTRACT_COMMANDS: readonly ["ls", "graph", "check", "status", "records", "records --uncommitted", "graph --intent", "graph --composites", "runs"];
|
|
41
49
|
export type ReadContractCommand = (typeof READ_CONTRACT_COMMANDS)[number];
|
|
42
50
|
/**
|
|
43
51
|
* Each command's output schema, beside this module's parent in `src/workspace/`.
|
|
@@ -49,16 +57,25 @@ export declare const READ_CONTRACT_SCHEMAS: Record<ReadContractCommand, string>;
|
|
|
49
57
|
export declare const READ_CONTRACT_JSON_FLAGS: Record<ReadContractCommand, readonly (readonly string[])[]>;
|
|
50
58
|
/** The arguments the suite passes each read, on the reference workspace or the generated one. */
|
|
51
59
|
export declare const REFERENCE_READS: Record<ReadContractCommand, string[]>;
|
|
52
|
-
/** One chant run: the arguments after `chant`, and what it printed. */
|
|
60
|
+
/** One chant run: the arguments after `chant`, what it was given on stdin, and what it printed. */
|
|
53
61
|
export interface ChantRun {
|
|
54
62
|
argv: string[];
|
|
63
|
+
/** What the caller gave chant on stdin, such as a record's fields for `--from -` (#3159). Absent when nothing was. */
|
|
64
|
+
input?: string;
|
|
55
65
|
status: number | null;
|
|
56
66
|
stdout: string;
|
|
57
67
|
stderr: string;
|
|
58
68
|
}
|
|
59
|
-
/**
|
|
69
|
+
/**
|
|
70
|
+
* How a reader or a writer runs chant. It runs in the workspace; the caller
|
|
71
|
+
* never sees the path. A writer passes `input` for a command that reads its
|
|
72
|
+
* fields from stdin (`--from -`, `--set -`, `--inputs -`, #3159); a reader
|
|
73
|
+
* never needs it.
|
|
74
|
+
*/
|
|
60
75
|
export interface ChantTransport {
|
|
61
|
-
run(argv: string[]
|
|
76
|
+
run(argv: string[], options?: {
|
|
77
|
+
input?: string;
|
|
78
|
+
}): Promise<ChantRun>;
|
|
62
79
|
}
|
|
63
80
|
export interface WorkspaceReader {
|
|
64
81
|
/** Run one read-contract command with `args`, and return the parsed JSON document. */
|
|
@@ -190,6 +207,46 @@ export declare function startMcpSession(command: string[], cwd: string, options?
|
|
|
190
207
|
};
|
|
191
208
|
timeoutMs?: number;
|
|
192
209
|
}): Promise<McpSession>;
|
|
210
|
+
/**
|
|
211
|
+
* The decision the generated workspace leaves uncommitted (#3160): proposed,
|
|
212
|
+
* about the delivery member only, so the app region the intent read walks
|
|
213
|
+
* is unchanged. Its path from the workspace root, and its text.
|
|
214
|
+
*/
|
|
215
|
+
export declare const UNCOMMITTED_DECISION: {
|
|
216
|
+
readonly path: "decisions/fix-002-where-kept-records-wait.md";
|
|
217
|
+
readonly text: `---
|
|
218
|
+
schema: 1
|
|
219
|
+
id: "fix-002"
|
|
220
|
+
title: "Where kept records wait"
|
|
221
|
+
state: "proposed"
|
|
222
|
+
area: "delivery"
|
|
223
|
+
source:
|
|
224
|
+
kind: "workspace"
|
|
225
|
+
member: "delivery"
|
|
226
|
+
question: "Where does a record wait between being kept and being applied?"
|
|
227
|
+
options:
|
|
228
|
+
- id: "a"
|
|
229
|
+
label: "uncommitted in the working tree"
|
|
230
|
+
how: "The record stays a file in the checkout until it is committed or applied."
|
|
231
|
+
tradeoff: "A reader lists it with records --uncommitted, and nothing else holds it."
|
|
232
|
+
choice: null
|
|
233
|
+
rejected: []
|
|
234
|
+
supersedes: []
|
|
235
|
+
evidence:
|
|
236
|
+
- title: "INTENTIUS/chant#3160, uncommitted records in the read contract"
|
|
237
|
+
url: "https://github.com/INTENTIUS/chant/issues/3160"
|
|
238
|
+
decided_by: null
|
|
239
|
+
decided_on: null
|
|
240
|
+
reviews: []
|
|
241
|
+
constrains:
|
|
242
|
+
- "member:delivery"
|
|
243
|
+
---
|
|
244
|
+
|
|
245
|
+
# Where kept records wait
|
|
246
|
+
|
|
247
|
+
The reader conformance workspace leaves this decision uncommitted, so \`records --uncommitted\` has one record to list.
|
|
248
|
+
`;
|
|
249
|
+
};
|
|
193
250
|
/** A workspace generated for a conformance run, and how to remove it. */
|
|
194
251
|
export interface ConformanceWorkspace {
|
|
195
252
|
dir: string;
|
|
@@ -200,11 +257,13 @@ export interface ConformanceWorkspace {
|
|
|
200
257
|
* `__fixture__/`, link this package in as `node_modules/@intentius/chant`
|
|
201
258
|
* so the chant member resolves it, declare the workspace with
|
|
202
259
|
* `chant workspace init --yes --name conformance` and commit it all to a new
|
|
203
|
-
* git repository on `main`.
|
|
260
|
+
* git repository on `main`. With `uncommitted`, then write
|
|
261
|
+
* {@link UNCOMMITTED_DECISION} and leave it uncommitted (#3160).
|
|
204
262
|
*/
|
|
205
263
|
export declare function createConformanceWorkspace(options?: {
|
|
206
264
|
chantCommand?: string[];
|
|
207
265
|
timeoutMs?: number;
|
|
266
|
+
uncommitted?: boolean;
|
|
208
267
|
}): ConformanceWorkspace;
|
|
209
268
|
/** The workspace and chant a run uses, from its options. `dispose` removes a generated workspace. */
|
|
210
269
|
export declare function conformanceTarget(options?: WorkspaceReaderConformanceOptions): {
|
|
@@ -212,6 +271,8 @@ export declare function conformanceTarget(options?: WorkspaceReaderConformanceOp
|
|
|
212
271
|
chantCommand: string[];
|
|
213
272
|
dispose(): void;
|
|
214
273
|
};
|
|
274
|
+
/** Run `command` in `cwd`, with `input` on stdin when given, collecting what it printed. Resolves, never rejects. */
|
|
275
|
+
export declare function runChant(command: string[], argv: string[], cwd: string, timeoutMs: number, input?: string): Promise<ChantRun>;
|
|
215
276
|
/**
|
|
216
277
|
* Whether an MCP tool's document and the one its command printed are the same
|
|
217
278
|
* read (#2707). Each graph member's `cached` flag (#2876) is left out: it says
|
|
@@ -256,5 +317,5 @@ export declare function readAndCheck(reader: WorkspaceReader, recorder: ReturnTy
|
|
|
256
317
|
* ```
|
|
257
318
|
*/
|
|
258
319
|
export declare function runWorkspaceReaderConformance(reader: WorkspaceReaderFactory, options?: WorkspaceReaderConformanceOptions): Promise<WorkspaceReaderConformanceReport>;
|
|
259
|
-
export
|
|
320
|
+
export * from "./writer.js";
|
|
260
321
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/workspace/conformance/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/workspace/conformance/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AAYH,0DAA0D;AAC1D,eAAO,MAAM,sBAAsB,YAAI,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,uBAAuB,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,CAAU,CAAC;AACtK,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE1E;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,mBAAmB,EAAE,MAAM,CAUrE,CAAC;AAEF,0GAA0G;AAC1G,eAAO,MAAM,wBAAwB,EAAE,MA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,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,EAAE,CAAA;CAAE,EAAE,SAAS,SAAU,EAAE,IAAI,GAAE,KAAK,GAAG,KAAa;;;;;;IA+C/I,kDAAkD;;EAMrD;AAED,iHAAiH;AACjH,wBAAsB,YAAY,CAAC,MAAM,EAAE,eAAe,EAAE,QAAQ,EAAE,UAAU,CAAC,OAAO,kBAAkB,CAAC,EAAE,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAWpK;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,6BAA6B,CAAC,MAAM,EAAE,sBAAsB,EAAE,OAAO,GAAE,iCAAsC,GAAG,OAAO,CAAC,gCAAgC,CAAC,CAiB9K;AAGD,cAAc,UAAU,CAAC"}
|
|
@@ -2,10 +2,19 @@
|
|
|
2
2
|
* The workspace reader conformance suite for vitest (#2657, #2679):
|
|
3
3
|
* {@link describeWorkspaceReaderConformance} wraps the runner-neutral checks
|
|
4
4
|
* of `./index` in `describe` and `it`, one test per listed command and one
|
|
5
|
-
* for the workspace's files.
|
|
6
|
-
*
|
|
5
|
+
* for the workspace's files. {@link describeWorkspaceWriterConformance}
|
|
6
|
+
* (#3159) does the same for the writer suite: one test per step of the
|
|
7
|
+
* script, and one per check after it. This is the only module of the suite
|
|
8
|
+
* that imports vitest; `@intentius/chant/workspace/conformance` imports no
|
|
9
|
+
* runner.
|
|
7
10
|
*/
|
|
8
|
-
import { type WorkspaceReaderConformanceConfig } from "./index.js";
|
|
11
|
+
import { type WorkspaceReaderConformanceConfig, type WorkspaceWriterConformanceConfig } from "./index.js";
|
|
9
12
|
export declare function describeWorkspaceReaderConformance(config: WorkspaceReaderConformanceConfig): void;
|
|
13
|
+
/**
|
|
14
|
+
* The writer suite in vitest: the runner-neutral run happens once, before the
|
|
15
|
+
* tests, and each test reports its part of it. A step whose action the writer
|
|
16
|
+
* does not list is skipped, as not applicable; the suite still performed it.
|
|
17
|
+
*/
|
|
18
|
+
export declare function describeWorkspaceWriterConformance(config: WorkspaceWriterConformanceConfig): void;
|
|
10
19
|
export * from "./index.js";
|
|
11
20
|
//# sourceMappingURL=vitest.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vitest.d.ts","sourceRoot":"","sources":["../../../src/workspace/conformance/vitest.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"vitest.d.ts","sourceRoot":"","sources":["../../../src/workspace/conformance/vitest.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,EAaL,KAAK,gCAAgC,EACrC,KAAK,gCAAgC,EAEtC,MAAM,SAAS,CAAC;AAEjB,wBAAgB,kCAAkC,CAAC,MAAM,EAAE,gCAAgC,GAAG,IAAI,CA8CjG;AAED;;;;GAIG;AACH,wBAAgB,kCAAkC,CAAC,MAAM,EAAE,gCAAgC,GAAG,IAAI,CA2BjG;AAED,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1,368 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Workspace writer conformance (#3159, ws-074).
|
|
3
|
+
*
|
|
4
|
+
* The repo is the database (ws-074): every durable fact about a workspace is
|
|
5
|
+
* a file in the repository or a line on its ledger branch, written only
|
|
6
|
+
* through chant's write contract, and a tool keeps nothing but secrets,
|
|
7
|
+
* telemetry, caches and its substrate's runtime state outside it. The reader
|
|
8
|
+
* suite beside this module holds a reader to the read contract. This one
|
|
9
|
+
* holds a writer, such as hud or studio's factory, to the write contract:
|
|
10
|
+
*
|
|
11
|
+
* 1. Writes go through chant. The suite drives a script of writes
|
|
12
|
+
* ({@link WRITER_SCRIPT}) through the writer's `write(step)`. Each step
|
|
13
|
+
* must make exactly one chant call, the step's write-contract command
|
|
14
|
+
* with its arguments (and its JSON flag, where the command has one),
|
|
15
|
+
* giving chant the step's fields on stdin. The document the writer
|
|
16
|
+
* returns is the one chant printed, it validates against the command's
|
|
17
|
+
* output schema, and it is not a refusal.
|
|
18
|
+
* 2. Every change is chant's. The workspace's files (outside `.git`) and its
|
|
19
|
+
* git refs are read before and after each step. A file may change only
|
|
20
|
+
* when it is the path the command reports writing, and a ref only when
|
|
21
|
+
* it is the lease ref or the `chant/lifecycle` commit the command
|
|
22
|
+
* reports.
|
|
23
|
+
* 3. Amnesia. The writer is given a state directory of its own, outside
|
|
24
|
+
* the workspace, and declares what it keeps there (`privateState`). After
|
|
25
|
+
* the script the suite asks the writer for the facts it shows
|
|
26
|
+
* (`facts()`), closes it, deletes everything in the state directory,
|
|
27
|
+
* builds the writer again and asks again: the two answers must be equal.
|
|
28
|
+
* The suite also reads every fact the script produced back through the
|
|
29
|
+
* read contract, the uncommitted records included.
|
|
30
|
+
* 4. No facts outside the repo. A file left in the state directory that
|
|
31
|
+
* `privateState` does not declare is a problem, and so is an entry of
|
|
32
|
+
* the writer's optional `holds()` that names a record, run or lease the
|
|
33
|
+
* repository does not have, unless it names itself one of the four
|
|
34
|
+
* exceptions.
|
|
35
|
+
*
|
|
36
|
+
* `facts()` may only read: every chant call it makes must be a read-contract
|
|
37
|
+
* command, and it must leave the workspace as it was.
|
|
38
|
+
*
|
|
39
|
+
* The workspace is generated for each run, from the reader suite's fixture
|
|
40
|
+
* and the `__writer_fixture__/` overlay this package ships beside this module:
|
|
41
|
+
* the reference workspace's work, answer and session kinds, its decision
|
|
42
|
+
* points, and one open work item, W-001. Nothing is written anywhere else.
|
|
43
|
+
*
|
|
44
|
+
* Actions a writer does not list in `actions` are not applicable to it. The
|
|
45
|
+
* suite still performs those steps itself, directly through chant, so a later
|
|
46
|
+
* step that depends on one (an amend on the decision a `records new` made,
|
|
47
|
+
* an evidence entry under a claimed lease) has what it needs.
|
|
48
|
+
*/
|
|
49
|
+
import { type ChantRun, type ChantTransport } from "./index.js";
|
|
50
|
+
/** The write-contract commands a writer performs, as the suite names them. */
|
|
51
|
+
export declare const WRITE_CONTRACT_ACTIONS: readonly ["records new", "records amend", "records review", "records close", "points ask", "points answer", "work claim", "work renew", "work evidence", "work release", "runs start", "runs end", "runs record"];
|
|
52
|
+
export type WriteContractAction = (typeof WRITE_CONTRACT_ACTIONS)[number];
|
|
53
|
+
/** Each action's output schema, in `src/workspace/` beside this module's directory. */
|
|
54
|
+
export declare const WRITE_CONTRACT_SCHEMAS: Record<WriteContractAction, string>;
|
|
55
|
+
/**
|
|
56
|
+
* The flags a writer may add to each command. The record, points, evidence
|
|
57
|
+
* and run writes always print their document, so a writer adds nothing or
|
|
58
|
+
* `--json`; a lease prints its document only with `--json`.
|
|
59
|
+
*/
|
|
60
|
+
export declare const WRITE_CONTRACT_JSON_FLAGS: Record<WriteContractAction, readonly (readonly string[])[]>;
|
|
61
|
+
/** What each action is given. Field documents are JSON values; the command reads them from stdin. */
|
|
62
|
+
export interface WriteParams {
|
|
63
|
+
"records new": {
|
|
64
|
+
kind: string;
|
|
65
|
+
fields: Record<string, unknown>;
|
|
66
|
+
};
|
|
67
|
+
"records amend": {
|
|
68
|
+
id: string;
|
|
69
|
+
kind: string;
|
|
70
|
+
fields: Record<string, unknown>;
|
|
71
|
+
};
|
|
72
|
+
"records review": {
|
|
73
|
+
id: string;
|
|
74
|
+
kind: string;
|
|
75
|
+
verdict: "agree" | "dissent" | "abstain";
|
|
76
|
+
by: string;
|
|
77
|
+
note?: string;
|
|
78
|
+
};
|
|
79
|
+
"records close": {
|
|
80
|
+
id: string;
|
|
81
|
+
kind: string;
|
|
82
|
+
};
|
|
83
|
+
"points ask": {
|
|
84
|
+
point: string;
|
|
85
|
+
kind: string;
|
|
86
|
+
inputs: Record<string, unknown>;
|
|
87
|
+
subject?: string;
|
|
88
|
+
};
|
|
89
|
+
"points answer": {
|
|
90
|
+
id: string;
|
|
91
|
+
kind: string;
|
|
92
|
+
answer: string;
|
|
93
|
+
by: string;
|
|
94
|
+
};
|
|
95
|
+
"work claim": {
|
|
96
|
+
id: string;
|
|
97
|
+
kind: string;
|
|
98
|
+
holder: string;
|
|
99
|
+
};
|
|
100
|
+
"work renew": {
|
|
101
|
+
id: string;
|
|
102
|
+
kind: string;
|
|
103
|
+
holder: string;
|
|
104
|
+
token: string;
|
|
105
|
+
};
|
|
106
|
+
"work evidence": {
|
|
107
|
+
id: string;
|
|
108
|
+
kind: string;
|
|
109
|
+
holder: string;
|
|
110
|
+
token: string;
|
|
111
|
+
entry: Record<string, unknown>;
|
|
112
|
+
};
|
|
113
|
+
"work release": {
|
|
114
|
+
id: string;
|
|
115
|
+
kind: string;
|
|
116
|
+
holder: string;
|
|
117
|
+
token: string;
|
|
118
|
+
outcome: string;
|
|
119
|
+
};
|
|
120
|
+
"runs start": {
|
|
121
|
+
run: Record<string, unknown>;
|
|
122
|
+
};
|
|
123
|
+
"runs end": {
|
|
124
|
+
id: string;
|
|
125
|
+
fields: Record<string, unknown>;
|
|
126
|
+
};
|
|
127
|
+
"runs record": {
|
|
128
|
+
run: Record<string, unknown>;
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
/** One write the suite asks of the writer: the action, what it is given, and the command that performs it. */
|
|
132
|
+
export type WriteStep = {
|
|
133
|
+
[A in WriteContractAction]: {
|
|
134
|
+
/** The step's name in the script, such as `review`. */
|
|
135
|
+
id: string;
|
|
136
|
+
action: A;
|
|
137
|
+
params: WriteParams[A];
|
|
138
|
+
/** The arguments after `chant workspace <action>`, as {@link writeArgv} builds them from `params`. */
|
|
139
|
+
args: string[];
|
|
140
|
+
/** What the command reads on stdin (`--from -`, `--set -`, `--inputs -`), when it reads anything. */
|
|
141
|
+
input?: string;
|
|
142
|
+
};
|
|
143
|
+
}[WriteContractAction];
|
|
144
|
+
/**
|
|
145
|
+
* The arguments that perform `action` with `params`, after `chant workspace
|
|
146
|
+
* <action>`, and the JSON the command reads on stdin. A writer can build its
|
|
147
|
+
* calls with this, or with its own code that makes the same call.
|
|
148
|
+
*/
|
|
149
|
+
export declare function writeArgv<A extends WriteContractAction>(action: A, params: WriteParams[A]): {
|
|
150
|
+
args: string[];
|
|
151
|
+
input?: string;
|
|
152
|
+
};
|
|
153
|
+
/** The kind files of the writer workspace, from its root. */
|
|
154
|
+
export declare const WRITER_KINDS: {
|
|
155
|
+
readonly decision: "decisions/decision.kind.mjs";
|
|
156
|
+
readonly session: "sessions/session.kind.mjs";
|
|
157
|
+
readonly answer: "answers/answer.kind.mjs";
|
|
158
|
+
readonly work: "work/work.kind.mjs";
|
|
159
|
+
};
|
|
160
|
+
/** The principals the script writes as. */
|
|
161
|
+
export declare const WRITER_PRINCIPALS: {
|
|
162
|
+
readonly holder: "conformance-writer";
|
|
163
|
+
readonly reviewer: "conformance-reviewer";
|
|
164
|
+
readonly by: "conformance";
|
|
165
|
+
};
|
|
166
|
+
/** One step of the script: its name, its action, and its params from the documents of the steps before it. */
|
|
167
|
+
export interface WriterScriptStep<A extends WriteContractAction = WriteContractAction> {
|
|
168
|
+
id: string;
|
|
169
|
+
action: A;
|
|
170
|
+
params(done: Record<string, Record<string, unknown>>): WriteParams[A];
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* The writes the suite drives, in order, each action at least once: a
|
|
174
|
+
* decision made, amended and reviewed; a review session opened and closed; a
|
|
175
|
+
* decision point asked and answered; the work item's lease claimed, renewed,
|
|
176
|
+
* evidence attached under it and released; one run started and ended, and one
|
|
177
|
+
* recorded whole.
|
|
178
|
+
*/
|
|
179
|
+
export declare const WRITER_SCRIPT: readonly WriterScriptStep[];
|
|
180
|
+
/** The four things ws-074 lets a tool keep outside the repo. */
|
|
181
|
+
export declare const PRIVATE_STATE_CATEGORIES: readonly ["cache", "telemetry", "secret", "runtime"];
|
|
182
|
+
export type PrivateStateCategory = (typeof PRIVATE_STATE_CATEGORIES)[number];
|
|
183
|
+
/** A file or directory the writer keeps in its state directory, and which of the four it is. */
|
|
184
|
+
export interface PrivateStatePath {
|
|
185
|
+
/** From the state directory, with / separators. A directory covers everything under it. */
|
|
186
|
+
path: string;
|
|
187
|
+
is: PrivateStateCategory | readonly PrivateStateCategory[];
|
|
188
|
+
}
|
|
189
|
+
/** One thing the writer holds, as its `holds()` reports it. */
|
|
190
|
+
export type HeldItem = {
|
|
191
|
+
record: string;
|
|
192
|
+
kind: string;
|
|
193
|
+
} | {
|
|
194
|
+
run: string;
|
|
195
|
+
} | {
|
|
196
|
+
lease: string;
|
|
197
|
+
kind: string;
|
|
198
|
+
} | {
|
|
199
|
+
exempt: PrivateStateCategory;
|
|
200
|
+
what: string;
|
|
201
|
+
};
|
|
202
|
+
export interface WorkspaceWriter {
|
|
203
|
+
/** Perform one step: run its write-contract command through the transport, and return the parsed document chant printed. */
|
|
204
|
+
write(step: WriteStep): Promise<unknown> | unknown;
|
|
205
|
+
/**
|
|
206
|
+
* The facts the tool shows, read the way the tool reads them, as a JSON
|
|
207
|
+
* value. The suite compares the answer before and after amnesia. It may make
|
|
208
|
+
* read-contract calls only.
|
|
209
|
+
*/
|
|
210
|
+
facts(): Promise<unknown> | unknown;
|
|
211
|
+
/** Optional: what the tool holds, each entry a record, run or lease in the repo, or one of the four exceptions. */
|
|
212
|
+
holds?(): Promise<readonly HeldItem[]> | readonly HeldItem[];
|
|
213
|
+
/** Optional: let go of the state directory (close a database) before the suite deletes it. */
|
|
214
|
+
close?(): Promise<void> | void;
|
|
215
|
+
}
|
|
216
|
+
export interface WriterContext {
|
|
217
|
+
/**
|
|
218
|
+
* A directory the writer keeps its private state in, such as a database
|
|
219
|
+
* file. The suite makes it, outside the workspace, and the same one is given
|
|
220
|
+
* to the writer built again after amnesia.
|
|
221
|
+
*/
|
|
222
|
+
stateDir: string;
|
|
223
|
+
}
|
|
224
|
+
/** Build the writer over the transport the suite gives it. Called twice: before the script, and again after amnesia. */
|
|
225
|
+
export type WorkspaceWriterFactory = (chant: ChantTransport, context: WriterContext) => WorkspaceWriter;
|
|
226
|
+
export interface WorkspaceWriterConformanceOptions {
|
|
227
|
+
/** The actions the writer performs. The suite performs the other steps itself. Defaults to every action. */
|
|
228
|
+
actions?: readonly WriteContractAction[];
|
|
229
|
+
/** What the writer keeps in its state directory. Anything else left there is a problem. Defaults to nothing. */
|
|
230
|
+
privateState?: readonly PrivateStatePath[];
|
|
231
|
+
/** The chant to run, as a command and its leading arguments. The reader suite's default. */
|
|
232
|
+
chantCommand?: string[];
|
|
233
|
+
/** How long one chant run may take, in milliseconds. Default 120000. */
|
|
234
|
+
timeoutMs?: number;
|
|
235
|
+
}
|
|
236
|
+
export interface WorkspaceWriterConformanceConfig extends WorkspaceWriterConformanceOptions {
|
|
237
|
+
/** Short label, used in the suite name. */
|
|
238
|
+
name: string;
|
|
239
|
+
writer: WorkspaceWriterFactory;
|
|
240
|
+
}
|
|
241
|
+
/** What one step found. */
|
|
242
|
+
export interface WriterStepResult {
|
|
243
|
+
id: string;
|
|
244
|
+
action: WriteContractAction;
|
|
245
|
+
/** Whether the writer performed it, or the suite did because the action is not the writer's. */
|
|
246
|
+
by: "writer" | "suite";
|
|
247
|
+
args: string[];
|
|
248
|
+
problems: string[];
|
|
249
|
+
}
|
|
250
|
+
/** What {@link runWorkspaceWriterConformance} found. The writer conforms when `problems` is empty. */
|
|
251
|
+
export interface WorkspaceWriterConformanceReport {
|
|
252
|
+
/** Every problem, each starting with the step it concerns, or `amnesia:`, `facts:`, `state:`, `holds:` or `read back:`. */
|
|
253
|
+
problems: string[];
|
|
254
|
+
/** The actions the writer performed, in contract order. */
|
|
255
|
+
checked: WriteContractAction[];
|
|
256
|
+
/** The actions not in `actions`, so not applicable to this writer. */
|
|
257
|
+
skipped: WriteContractAction[];
|
|
258
|
+
results: WriterStepResult[];
|
|
259
|
+
/** The problems of the checks after the script, by check. */
|
|
260
|
+
after: {
|
|
261
|
+
facts: string[];
|
|
262
|
+
state: string[];
|
|
263
|
+
amnesia: string[];
|
|
264
|
+
holds: string[];
|
|
265
|
+
readBack: string[];
|
|
266
|
+
};
|
|
267
|
+
/** What `facts()` returned before amnesia and after. */
|
|
268
|
+
facts: {
|
|
269
|
+
before: unknown;
|
|
270
|
+
after: unknown;
|
|
271
|
+
};
|
|
272
|
+
/** The workspace written. Removed before the report is returned. */
|
|
273
|
+
workspaceDir: string;
|
|
274
|
+
}
|
|
275
|
+
/** The overlay the writer workspace adds to the reader suite's fixture, shipped under `src/`. */
|
|
276
|
+
export declare const WRITER_FIXTURE_DIR: string;
|
|
277
|
+
type Validate = ((d: unknown) => boolean) & {
|
|
278
|
+
errors?: unknown;
|
|
279
|
+
};
|
|
280
|
+
/** An action's output schema and a draft 2020-12 validator for it, from this package's own ajv 8. */
|
|
281
|
+
export declare function writeContractSchema(action: WriteContractAction): {
|
|
282
|
+
schema: {
|
|
283
|
+
$id: string;
|
|
284
|
+
};
|
|
285
|
+
validate: Validate;
|
|
286
|
+
};
|
|
287
|
+
/** A digest of every file under `dir`, skipping `.git` and node_modules: the working tree. */
|
|
288
|
+
export declare function worktreeDigest(dir: string): Record<string, string>;
|
|
289
|
+
/** Every git ref in `dir` and what it points at, with `HEAD` as the branch it names and its commit. */
|
|
290
|
+
export declare function gitRefs(dir: string): Record<string, string>;
|
|
291
|
+
/** The refs that differ between two {@link gitRefs}, with what each now points at (empty when removed). */
|
|
292
|
+
export declare function refChanges(before: Record<string, string>, after: Record<string, string>): Record<string, string>;
|
|
293
|
+
/** Whether `argv` is a read-contract call: one a reader may make, which writes nothing. */
|
|
294
|
+
export declare function isReadCall(argv: readonly string[]): boolean;
|
|
295
|
+
/**
|
|
296
|
+
* What is wrong with the chant calls one step made: anything but exactly
|
|
297
|
+
* one call, of `workspace <action>` with the step's arguments in order and
|
|
298
|
+
* the action's JSON flag, given the step's fields on stdin. Empty when the
|
|
299
|
+
* calls conform.
|
|
300
|
+
*/
|
|
301
|
+
export declare function writerCallProblems(step: WriteStep, calls: readonly ChantRun[]): string[];
|
|
302
|
+
/** Everything wrong with the document one step returned (`doc`), given what chant printed (`printed`). Empty when it conforms. */
|
|
303
|
+
export declare function writerDocumentProblems(step: WriteStep, printed: ChantRun, doc: unknown): string[];
|
|
304
|
+
/** The files and refs a step's document says chant wrote. */
|
|
305
|
+
export declare function reportedWrites(action: WriteContractAction, doc: unknown): {
|
|
306
|
+
paths: string[];
|
|
307
|
+
refs: Record<string, string>;
|
|
308
|
+
};
|
|
309
|
+
/**
|
|
310
|
+
* What changed in the workspace during one step that the step's document
|
|
311
|
+
* does not report: a file other than the path chant wrote, or a ref other
|
|
312
|
+
* than the lease ref and the ledger commit chant wrote.
|
|
313
|
+
*/
|
|
314
|
+
export declare function unreportedChanges(step: WriteStep, doc: unknown, files: {
|
|
315
|
+
before: Record<string, string>;
|
|
316
|
+
after: Record<string, string>;
|
|
317
|
+
}, refs: {
|
|
318
|
+
before: Record<string, string>;
|
|
319
|
+
after: Record<string, string>;
|
|
320
|
+
}): string[];
|
|
321
|
+
/** Build the step a script step is at, from the documents of the steps before it. */
|
|
322
|
+
export declare function buildStep(s: WriterScriptStep, done: Record<string, Record<string, unknown>>): WriteStep;
|
|
323
|
+
/** The smallest writer that conforms: each step is its one command, and its facts are read through the read contract. */
|
|
324
|
+
export declare const referenceWriter: WorkspaceWriterFactory;
|
|
325
|
+
/** A workspace generated for a writer run, and how to remove it. */
|
|
326
|
+
export interface WriterConformanceWorkspace {
|
|
327
|
+
dir: string;
|
|
328
|
+
dispose(): void;
|
|
329
|
+
}
|
|
330
|
+
/**
|
|
331
|
+
* Generate the writer conformance workspace: the reader suite's workspace
|
|
332
|
+
* ({@link createConformanceWorkspace}), with `__writer_fixture__/` copied over
|
|
333
|
+
* it, the four kinds declared in its `records`, and that committed.
|
|
334
|
+
*/
|
|
335
|
+
export declare function createWriterConformanceWorkspace(options?: {
|
|
336
|
+
chantCommand?: string[];
|
|
337
|
+
timeoutMs?: number;
|
|
338
|
+
}): WriterConformanceWorkspace;
|
|
339
|
+
/** The actions to exercise and the ones skipped, from `actions`. Throws on a name that is not a write-contract action. */
|
|
340
|
+
export declare function selectActions(actions?: readonly WriteContractAction[]): {
|
|
341
|
+
checked: WriteContractAction[];
|
|
342
|
+
skipped: WriteContractAction[];
|
|
343
|
+
};
|
|
344
|
+
/** The files in the state directory that `privateState` does not declare, and problems with the declaration itself. */
|
|
345
|
+
export declare function undeclaredState(files: readonly string[], privateState: readonly PrivateStatePath[]): string[];
|
|
346
|
+
/**
|
|
347
|
+
* Hold a writer to the write contract, with no test runner: drive
|
|
348
|
+
* {@link WRITER_SCRIPT} through it on a generated workspace, check each step,
|
|
349
|
+
* then the amnesia test and what the writer holds, and return what is wrong.
|
|
350
|
+
* The writer conforms when `problems` is empty.
|
|
351
|
+
*
|
|
352
|
+
* ```js
|
|
353
|
+
* import { test } from "node:test";
|
|
354
|
+
* import assert from "node:assert/strict";
|
|
355
|
+
* import { runWorkspaceWriterConformance } from "@intentius/chant/workspace/conformance";
|
|
356
|
+
*
|
|
357
|
+
* test("my writer writes only through chant", { timeout: 600_000 }, async () => {
|
|
358
|
+
* const report = await runWorkspaceWriterConformance(myWriter, {
|
|
359
|
+
* actions: ["records review", "points answer"],
|
|
360
|
+
* privateState: [{ path: "events.db", is: "cache" }],
|
|
361
|
+
* });
|
|
362
|
+
* assert.deepEqual(report.problems, []);
|
|
363
|
+
* });
|
|
364
|
+
* ```
|
|
365
|
+
*/
|
|
366
|
+
export declare function runWorkspaceWriterConformance(writer: WorkspaceWriterFactory, options?: WorkspaceWriterConformanceOptions): Promise<WorkspaceWriterConformanceReport>;
|
|
367
|
+
export {};
|
|
368
|
+
//# sourceMappingURL=writer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"writer.d.ts","sourceRoot":"","sources":["../../../src/workspace/conformance/writer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AAUH,OAAO,EAA0E,KAAK,QAAQ,EAAE,KAAK,cAAc,EAAE,MAAM,SAAS,CAAC;AAKrI,8EAA8E;AAC9E,eAAO,MAAM,sBAAsB,YACjC,aAAa,EACb,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,eAAe,EACf,YAAY,EACZ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AAE,iCAAsC,GAAG,OAAO,CAAC,gCAAgC,CAAC,CA4K9K"}
|
|
@@ -34,7 +34,7 @@ import type { SourceVia } from "./source-block.js";
|
|
|
34
34
|
export declare const POINTS_WRITE_CONTRACT_VERSION = 1;
|
|
35
35
|
export declare const POINTS_WRITE_SCHEMA_ID = "https://intentius.io/chant/schemas/workspace/points-write/v1/points-write.schema.json";
|
|
36
36
|
/** Why `points ask` or `points answer` wrote nothing. Closed: a reader may switch on it. */
|
|
37
|
-
export declare const POINTS_WRITE_ERROR_CODES: readonly ["kind-unreadable", "kind-invalid", "schema-unreadable", "schema-id-mismatch", "schema-invalid", "location-missing", "write-usage-invalid", "write-input-invalid", "points-undeclared", "points-invalid", "point-unknown", "point-inputs-invalid", "point-decider-failed", "answer-not-candidate", "quorum-not-met", "record-not-found", "record-closed", "record-id-taken", "answer-in-steward-turn", "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"];
|
|
37
|
+
export declare const POINTS_WRITE_ERROR_CODES: readonly ["kind-unreadable", "kind-invalid", "schema-unreadable", "schema-id-mismatch", "schema-invalid", "location-missing", "write-usage-invalid", "write-input-invalid", "points-undeclared", "points-invalid", "point-unknown", "point-inputs-invalid", "point-decider-failed", "answer-not-candidate", "quorum-not-met", "record-not-found", "record-closed", "record-id-taken", "answer-in-steward-turn", "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"];
|
|
38
38
|
export type PointsWriteErrorCode = (typeof POINTS_WRITE_ERROR_CODES)[number];
|
|
39
39
|
export declare class PointsWriteError extends Error {
|
|
40
40
|
readonly code: PointsWriteErrorCode;
|