@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
|
@@ -101,6 +101,71 @@
|
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
|
+
},
|
|
105
|
+
"writeScope": {
|
|
106
|
+
"type": "object",
|
|
107
|
+
"propertyNames": {
|
|
108
|
+
"$ref": "#/$defs/className"
|
|
109
|
+
},
|
|
110
|
+
"additionalProperties": {
|
|
111
|
+
"$ref": "#/$defs/classScope",
|
|
112
|
+
"description": "A domain class a pinned package supplies at its ./workspace-principals subpath (#3080, ws-079): principals holding the role the class names in the trust policy at base, and none of the agent, runner and service roles. A key no pinned package supplies fails chant workspace check with WSP003, and a writer judged human is refused with write-scope-class-unknown, since it may be in that class. Added in schema 1 by chant 0.102.0, so a declaration that uses one sets minReader to 0.102.0 or newer."
|
|
113
|
+
},
|
|
114
|
+
"description": "Who may write what (#2524 D5, #2548, ws-067): for each principal class, the members whose files it may write and the record kinds it may write, with which verbs. A class is human, agent, runner or service, or a domain class a pinned package supplies (#3080). A class with no entry is not restricted. An agent is always bound to its session's member (agents); its entry can only narrow the record kinds and verbs. chant workspace records new, amend, review and close and the MCP record tools refuse a write outside the writer's scope with write-scope-member or write-scope-kind, and chant workspace check --changes reports each commit that writes outside its author's scope, read from the declaration and the trust policy at the range's base, and a write to a path the class's protected list covers with write-scope-protected (#3146). Added in schema 1 by chant 0.101.0, so a declaration that uses it sets minReader to 0.101.0 or newer.",
|
|
115
|
+
"properties": {
|
|
116
|
+
"human": {
|
|
117
|
+
"$ref": "#/$defs/classScope",
|
|
118
|
+
"description": "Principals holding none of the agent, runner and service roles, and none of the roles a domain class names, in the trust policy at base."
|
|
119
|
+
},
|
|
120
|
+
"agent": {
|
|
121
|
+
"$ref": "#/$defs/agentScope",
|
|
122
|
+
"description": "An agent session (agents), or a principal holding the agent role in the trust policy at base."
|
|
123
|
+
},
|
|
124
|
+
"runner": {
|
|
125
|
+
"$ref": "#/$defs/classScope",
|
|
126
|
+
"description": "Principals holding the runner role in the trust policy at base, such as a CI job's signing identity."
|
|
127
|
+
},
|
|
128
|
+
"service": {
|
|
129
|
+
"$ref": "#/$defs/classScope",
|
|
130
|
+
"description": "Principals holding the service role in the trust policy at base."
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
"agents": {
|
|
135
|
+
"type": "array",
|
|
136
|
+
"description": "The agent sessions the workspace declares (#2524 D20, #2548, ws-067). Each is bound to one member: it writes that member's files and the records of kinds that member or the workspace declares, as writeScope.agent allows. A session resumes from chant workspace agent <name> --json, which prints its member, its scope and the spec, read from the repository alone. A write names its session with the CHANT_AGENT environment variable, or a commit with a Chant-Agent trailer. Added in schema 1 by chant 0.101.0, so a declaration that uses it sets minReader to 0.101.0 or newer.",
|
|
137
|
+
"items": {
|
|
138
|
+
"$ref": "#/$defs/agent"
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
"identity": {
|
|
142
|
+
"type": "object",
|
|
143
|
+
"additionalProperties": false,
|
|
144
|
+
"description": "Who a person-attributed record or gate approval may name, and which gates need a signed approval (#3163, ws-080). Read from the declaration at base, like writeScope, so a change can't loosen its own rule. A person is named by a forge identity (github:<login>, gitlab:<login>, or <forge>@<host>:<login> for forgejo, gitea or a self-hosted github or gitlab) that the surface which signed them in maps their session to, or by a principal .chant/allowed_signers lists at base. chant never authenticates a person: a forge identity is recorded as the surface gives it, and only a seal verified against the signers at base attests it. Added in schema 1 by chant 0.102.0, so a declaration that uses it sets minReader to 0.102.0 or newer.",
|
|
145
|
+
"properties": {
|
|
146
|
+
"attribution": {
|
|
147
|
+
"enum": ["any", "identified"],
|
|
148
|
+
"description": "any (the default): a record's by, decided_by, reviewer or answerer and a gate approval's actor may be any name, such as a roster name. identified: each must be a forge identity, a principal the signers file at base lists, or a principal holding the agent, runner or service role at base or listed by a declared agent session; chant workspace records new and review, points answer and chant approve refuse any other name with principal-unidentified."
|
|
149
|
+
},
|
|
150
|
+
"gates": {
|
|
151
|
+
"type": "object",
|
|
152
|
+
"description": "Gates, by name, that pass only on a signed approval: chant approve --sign with a key the signers file at base lists for the approver. The rule applies to a gate of that name in every member, Op and component. An unsigned approval, or one whose signer is not in class, is recorded nowhere and never counts toward the gate.",
|
|
153
|
+
"propertyNames": {
|
|
154
|
+
"type": "string",
|
|
155
|
+
"minLength": 1
|
|
156
|
+
},
|
|
157
|
+
"additionalProperties": {
|
|
158
|
+
"type": "object",
|
|
159
|
+
"additionalProperties": false,
|
|
160
|
+
"properties": {
|
|
161
|
+
"class": {
|
|
162
|
+
"$ref": "#/$defs/className",
|
|
163
|
+
"description": "The principal class the signer must be in, read from the role grants at base (#3080, ws-079): human, runner, service, or a domain class a pinned package supplies. A class no pinned package supplies lets no approval through (fail closed). Absent: any signer the signers file lists."
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
104
169
|
}
|
|
105
170
|
},
|
|
106
171
|
"patternProperties": {
|
|
@@ -117,6 +182,11 @@
|
|
|
117
182
|
"type": "string",
|
|
118
183
|
"pattern": "^[a-z][a-z0-9-]{0,39}$"
|
|
119
184
|
},
|
|
185
|
+
"className": {
|
|
186
|
+
"type": "string",
|
|
187
|
+
"pattern": "^(?!x-)[a-z][a-z0-9-]{0,39}$",
|
|
188
|
+
"description": "A principal class: human, agent, runner, service, or a domain class a pinned package supplies (#3080)."
|
|
189
|
+
},
|
|
120
190
|
"version": {
|
|
121
191
|
"type": "string",
|
|
122
192
|
"pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)(-[0-9A-Za-z.-]+)?$"
|
|
@@ -173,7 +243,7 @@
|
|
|
173
243
|
},
|
|
174
244
|
"link": {
|
|
175
245
|
"type": "object",
|
|
176
|
-
"description": "A member link: this member reads output of member (#2539).",
|
|
246
|
+
"description": "A member link: this member reads output of member (#2539), or sends its telemetry to a pipeline of its collector (#2558).",
|
|
177
247
|
"required": [
|
|
178
248
|
"member",
|
|
179
249
|
"output"
|
|
@@ -185,11 +255,19 @@
|
|
|
185
255
|
},
|
|
186
256
|
"output": {
|
|
187
257
|
"$ref": "#/$defs/outputName",
|
|
188
|
-
"description": "The producer's output, matched exactly. It must be one the producer's kind exposes."
|
|
258
|
+
"description": "The producer's output, matched exactly. It must be one the producer's kind exposes. For a telemetry link, the id of a pipeline or an exporter in the producer's collector."
|
|
189
259
|
},
|
|
190
260
|
"kind": {
|
|
191
261
|
"$ref": "#/$defs/kindName",
|
|
192
|
-
"description": "The link kind. output, the default
|
|
262
|
+
"description": "The link kind. output, the default: the consumer reads the named output. telemetry (#2558): the consumer sends its telemetry to the named pipeline or exporter of the producer's collector, and chant workspace graph checks that it exists and, when protocol is given, that it speaks it. A declaration that uses telemetry sets minReader to 0.101.0 or newer."
|
|
263
|
+
},
|
|
264
|
+
"protocol": {
|
|
265
|
+
"enum": [
|
|
266
|
+
"grpc",
|
|
267
|
+
"http/protobuf",
|
|
268
|
+
"http/json"
|
|
269
|
+
],
|
|
270
|
+
"description": "For a telemetry link, the OTLP protocol the consumer sends, as OTEL_EXPORTER_OTLP_PROTOCOL names it. Refused on any other kind. Added in schema 1 by chant 0.101.0."
|
|
193
271
|
}
|
|
194
272
|
},
|
|
195
273
|
"patternProperties": {
|
|
@@ -320,6 +398,10 @@
|
|
|
320
398
|
"minLength": 1,
|
|
321
399
|
"description": "Where an embedded member's files come from. Versions live in the lock."
|
|
322
400
|
},
|
|
401
|
+
"travel": {
|
|
402
|
+
"type": "boolean",
|
|
403
|
+
"description": "Whether the member goes with an export (#2524 D10, #2552). chant workspace export writes only members that set travel to true into the export member, and refuses to name one that does not. Added in schema 1 by chant 0.101.0, so a declaration that uses it sets minReader to 0.101.0 or newer."
|
|
404
|
+
},
|
|
323
405
|
"because": {
|
|
324
406
|
"type": "string",
|
|
325
407
|
"minLength": 1,
|
|
@@ -402,7 +484,7 @@
|
|
|
402
484
|
},
|
|
403
485
|
"box": {
|
|
404
486
|
"type": "object",
|
|
405
|
-
"description": "The member is a box, or holds a box's declarations (#2726). A box holds no credential: each capability it needs outside itself is reached through a broker, a runtime such as a lobby or a door, which holds the credential and enforces the scope. chant workspace check fails when a file in the member's directory carries a literal secret (WSP121) and when a capability names no broker (WSP122). chant workspace status --json lists the capabilities, so a broker can read the scopes. Its host, slot, ports, state and cookies state the box's isolation (#2727): chant derives each value from the box's identity, its host, the member's name and its slot, and prints them in chant workspace status --json, so a runtime reads them instead of choosing its own. chant workspace check fails when two boxes on a host resolve to the same value (WSP123) and when a box hard-codes a machine path (WSP124). A member that builds the fountain lexicon's Box declares the callback token fountain gives its persistent sandbox as the capability fountain-callback, brokered by fountain, with scope owner, or chant workspace check fails (WSP125, #2780). Its intent names the decision record that says what the box is for (#2850): chant workspace status --json reports the record's state and answer, and chant workspace check fails when no decision record has the id (WSP126) and warns when the record constrains no member or path of this workspace (WSP127, #2857). Its services list what the box runs under its supervisor (#2880), which the fly lexicon observes, restarts and applies through sprite-env, and which chant workspace status --json prints. Added in schema 1 by chant 0.91.0, so a declaration that uses it sets minReader to 0.91.0 or newer.",
|
|
487
|
+
"description": "The member is a box, or holds a box's declarations (#2726). A box holds no credential: each capability it needs outside itself is reached through a broker, a runtime such as a lobby or a door, which holds the credential and enforces the scope. chant workspace check fails when a file in the member's directory carries a literal secret (WSP121) and when a capability names no broker (WSP122). chant workspace status --json lists the capabilities, so a broker can read the scopes. Its host, slot, ports, state and cookies state the box's isolation (#2727): chant derives each value from the box's identity, its host, the member's name and its slot, and prints them in chant workspace status --json, so a runtime reads them instead of choosing its own. chant workspace check fails when two boxes on a host resolve to the same value (WSP123) and when a box hard-codes a machine path (WSP124). A member that builds the fountain lexicon's Box declares the callback token fountain gives its persistent sandbox as the capability fountain-callback, brokered by fountain, with scope owner, or chant workspace check fails (WSP125, #2780). Its intent names the decision record that says what the box is for (#2850): chant workspace status --json reports the record's state and answer, and chant workspace check fails when no decision record has the id (WSP126) and warns when the record constrains no member or path of this workspace (WSP127, #2857). Its services list what the box runs under its supervisor (#2880), which the fly lexicon observes, restarts and applies through sprite-env, and which chant workspace status --json prints. Its factory declares what the box builds, how a build is checked, which member declares the builder agents and where a finished build is published (#3146, ws-077), and its listing what the box shows of itself (#3146). Added in schema 1 by chant 0.91.0, so a declaration that uses it sets minReader to 0.91.0 or newer.",
|
|
406
488
|
"properties": {
|
|
407
489
|
"intent": {
|
|
408
490
|
"type": "string",
|
|
@@ -416,6 +498,12 @@
|
|
|
416
498
|
"$ref": "#/$defs/boxService"
|
|
417
499
|
}
|
|
418
500
|
},
|
|
501
|
+
"factory": {
|
|
502
|
+
"$ref": "#/$defs/boxFactory"
|
|
503
|
+
},
|
|
504
|
+
"listing": {
|
|
505
|
+
"$ref": "#/$defs/boxListing"
|
|
506
|
+
},
|
|
419
507
|
"capabilities": {
|
|
420
508
|
"type": "array",
|
|
421
509
|
"description": "Each capability the box reaches outside itself, named once. None when omitted.",
|
|
@@ -488,6 +576,142 @@
|
|
|
488
576
|
},
|
|
489
577
|
"additionalProperties": false
|
|
490
578
|
},
|
|
579
|
+
"boxFactory": {
|
|
580
|
+
"type": "object",
|
|
581
|
+
"description": "What the box builds and how (#3146, ws-077), replacing studio's x-factory. Opt-in: a box block without it declares no factory, and nothing here is required of a workspace that doesn't build with agents (#3174). At most one box block in a declaration declares a factory. builds and builders name declared members, or the declaration can't be read (declaration-invalid). chant workspace status --json and chant workspace graph --json print it under the member's box. The factory need not build an app: builds may name any member kind, such as chant or terraform, and the check may be a plan, a lint or a conformance run. Added in schema 1 by chant 0.102.0, so a declaration that uses it sets minReader to 0.102.0 or newer.",
|
|
582
|
+
"required": [
|
|
583
|
+
"builds"
|
|
584
|
+
],
|
|
585
|
+
"properties": {
|
|
586
|
+
"builds": {
|
|
587
|
+
"type": "array",
|
|
588
|
+
"minItems": 1,
|
|
589
|
+
"uniqueItems": true,
|
|
590
|
+
"description": "The members the factory builds, each a declared member of any kind. A work item a person asks for here constrains member:<the first>.",
|
|
591
|
+
"items": {
|
|
592
|
+
"$ref": "#/$defs/name"
|
|
593
|
+
}
|
|
594
|
+
},
|
|
595
|
+
"check": {
|
|
596
|
+
"description": "The command whose exit code is a build's verdict, run from the workspace root after the work item's own checks: a command, or { run, kind } saying what it is. kind is test when omitted.",
|
|
597
|
+
"oneOf": [
|
|
598
|
+
{
|
|
599
|
+
"type": "string",
|
|
600
|
+
"minLength": 1
|
|
601
|
+
},
|
|
602
|
+
{
|
|
603
|
+
"type": "object",
|
|
604
|
+
"required": [
|
|
605
|
+
"run"
|
|
606
|
+
],
|
|
607
|
+
"properties": {
|
|
608
|
+
"run": {
|
|
609
|
+
"type": "string",
|
|
610
|
+
"minLength": 1,
|
|
611
|
+
"description": "The command, run from the workspace root."
|
|
612
|
+
},
|
|
613
|
+
"kind": {
|
|
614
|
+
"enum": [
|
|
615
|
+
"test",
|
|
616
|
+
"build",
|
|
617
|
+
"lint",
|
|
618
|
+
"plan",
|
|
619
|
+
"conformance"
|
|
620
|
+
],
|
|
621
|
+
"description": "What the command is: an app's tests, a build, a lint, a lifecycle plan or a conformance run. test when omitted."
|
|
622
|
+
}
|
|
623
|
+
},
|
|
624
|
+
"patternProperties": {
|
|
625
|
+
"^x-": true
|
|
626
|
+
},
|
|
627
|
+
"additionalProperties": false
|
|
628
|
+
}
|
|
629
|
+
]
|
|
630
|
+
},
|
|
631
|
+
"checks": {
|
|
632
|
+
"$ref": "#/$defs/path",
|
|
633
|
+
"description": "The directory, from the workspace root, where a work item's builder writes the check for its item. When omitted the orchestrator chooses, such as <the first member of builds>/checks."
|
|
634
|
+
},
|
|
635
|
+
"builders": {
|
|
636
|
+
"$ref": "#/$defs/name",
|
|
637
|
+
"description": "The member that declares the builder agents, such as the one whose agents/ holds them. Which agent builds at which tier is #3152; the tier vocabulary is the work kind's work.tier.tiers (#3147)."
|
|
638
|
+
},
|
|
639
|
+
"publish": {
|
|
640
|
+
"type": "object",
|
|
641
|
+
"description": "Where a finished build is published: its branch is pushed and a pull request opened against repo's base. The repo is the record, so an orchestrator reads this instead of being told the target in its environment.",
|
|
642
|
+
"required": [
|
|
643
|
+
"repo"
|
|
644
|
+
],
|
|
645
|
+
"properties": {
|
|
646
|
+
"forge": {
|
|
647
|
+
"enum": [
|
|
648
|
+
"github"
|
|
649
|
+
],
|
|
650
|
+
"description": "The forge repo is on. github when omitted."
|
|
651
|
+
},
|
|
652
|
+
"repo": {
|
|
653
|
+
"type": "string",
|
|
654
|
+
"pattern": "^[A-Za-z0-9][A-Za-z0-9-]{0,38}/[A-Za-z0-9._-]{1,100}$",
|
|
655
|
+
"description": "The repository the pull request is opened on, as owner/name."
|
|
656
|
+
},
|
|
657
|
+
"base": {
|
|
658
|
+
"type": "string",
|
|
659
|
+
"minLength": 1,
|
|
660
|
+
"description": "The branch the pull request targets. The repository's default branch when omitted."
|
|
661
|
+
},
|
|
662
|
+
"branchPrefix": {
|
|
663
|
+
"type": "string",
|
|
664
|
+
"minLength": 1,
|
|
665
|
+
"pattern": "^[A-Za-z0-9._/-]+$",
|
|
666
|
+
"description": "What the published branch's name starts with; the work item's id follows, as in box/ and then box/work-012. chant/work/ when omitted, the work lease's own branch."
|
|
667
|
+
},
|
|
668
|
+
"head": {
|
|
669
|
+
"type": "string",
|
|
670
|
+
"pattern": "^[A-Za-z0-9][A-Za-z0-9-]{0,38}/[A-Za-z0-9._-]{1,100}$",
|
|
671
|
+
"description": "The repository the branch is pushed to when it isn't repo, as owner/name: a fork, so the pull request comes from <head owner>:<branch>. A runtime that publishes for one contributor's fork supplies that per contributor instead (arugula-salad/studio#242); this names a fork the whole workspace publishes from."
|
|
672
|
+
}
|
|
673
|
+
},
|
|
674
|
+
"patternProperties": {
|
|
675
|
+
"^x-": true
|
|
676
|
+
},
|
|
677
|
+
"additionalProperties": false
|
|
678
|
+
}
|
|
679
|
+
},
|
|
680
|
+
"patternProperties": {
|
|
681
|
+
"^x-": true
|
|
682
|
+
},
|
|
683
|
+
"additionalProperties": false
|
|
684
|
+
},
|
|
685
|
+
"boxListing": {
|
|
686
|
+
"type": "object",
|
|
687
|
+
"description": "What the box shows of itself on a home site that lists boxes (#3146, #3154): whether it is listed, its title and one line, and a cover image kept as a file in the repo. A box's listing is configuration, so changing it is a reviewed change (ws-074). chant workspace status --json and chant workspace graph --json print it under the member's box, with the cover's sha256. Added in schema 1 by chant 0.102.0, so a declaration that uses it sets minReader to 0.102.0 or newer.",
|
|
688
|
+
"properties": {
|
|
689
|
+
"published": {
|
|
690
|
+
"type": "boolean",
|
|
691
|
+
"description": "Whether the box is listed. true when omitted: a box is listed unless its owner takes it out."
|
|
692
|
+
},
|
|
693
|
+
"title": {
|
|
694
|
+
"type": "string",
|
|
695
|
+
"maxLength": 60,
|
|
696
|
+
"pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]*$",
|
|
697
|
+
"description": "The box's title, one line of at most 60 characters. Empty when omitted, and a reader then shows a name of its own."
|
|
698
|
+
},
|
|
699
|
+
"line": {
|
|
700
|
+
"type": "string",
|
|
701
|
+
"maxLength": 140,
|
|
702
|
+
"pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f]*$",
|
|
703
|
+
"description": "One line saying what the box is, at most 140 characters. Empty when omitted."
|
|
704
|
+
},
|
|
705
|
+
"cover": {
|
|
706
|
+
"$ref": "#/$defs/path",
|
|
707
|
+
"description": "A PNG, JPEG or WebP picture of the box, as a file from the workspace root. None when omitted."
|
|
708
|
+
}
|
|
709
|
+
},
|
|
710
|
+
"patternProperties": {
|
|
711
|
+
"^x-": true
|
|
712
|
+
},
|
|
713
|
+
"additionalProperties": false
|
|
714
|
+
},
|
|
491
715
|
"boxService": {
|
|
492
716
|
"type": "object",
|
|
493
717
|
"description": "A service a box runs under its supervisor (#2880).",
|
|
@@ -858,6 +1082,146 @@
|
|
|
858
1082
|
"type": "string",
|
|
859
1083
|
"description": "A glob over file paths, relative to the workspace root: * and ? within one segment, ** across segments, [...] classes and {a,b} alternatives. No leading /, no . or .. segments.",
|
|
860
1084
|
"pattern": "^(?!\\.\\.?(/|$))[^/\\\\]+(/(?!\\.\\.?(/|$))[^/\\\\]+)*$"
|
|
1085
|
+
},
|
|
1086
|
+
"recordScope": {
|
|
1087
|
+
"type": "object",
|
|
1088
|
+
"description": "Record kind names, as the kind file's recordKind.name or the name the declaration gives it, each with the verbs the class may write it with: new, amend, review and close (a review session). A kind left out may not be written at all. A record file a commit deletes is never in scope.",
|
|
1089
|
+
"propertyNames": {
|
|
1090
|
+
"$ref": "#/$defs/kindName"
|
|
1091
|
+
},
|
|
1092
|
+
"additionalProperties": {
|
|
1093
|
+
"type": "array",
|
|
1094
|
+
"uniqueItems": true,
|
|
1095
|
+
"items": {
|
|
1096
|
+
"enum": [
|
|
1097
|
+
"new",
|
|
1098
|
+
"amend",
|
|
1099
|
+
"review",
|
|
1100
|
+
"close"
|
|
1101
|
+
]
|
|
1102
|
+
}
|
|
1103
|
+
}
|
|
1104
|
+
},
|
|
1105
|
+
"protectedPath": {
|
|
1106
|
+
"description": "A protected path: a glob from the workspace root, or { path, except } for a JSON file whose listed top-level keys may still change.",
|
|
1107
|
+
"oneOf": [
|
|
1108
|
+
{
|
|
1109
|
+
"$ref": "#/$defs/fileGlob"
|
|
1110
|
+
},
|
|
1111
|
+
{
|
|
1112
|
+
"type": "object",
|
|
1113
|
+
"required": [
|
|
1114
|
+
"path"
|
|
1115
|
+
],
|
|
1116
|
+
"properties": {
|
|
1117
|
+
"path": {
|
|
1118
|
+
"$ref": "#/$defs/fileGlob"
|
|
1119
|
+
},
|
|
1120
|
+
"except": {
|
|
1121
|
+
"type": "array",
|
|
1122
|
+
"minItems": 1,
|
|
1123
|
+
"uniqueItems": true,
|
|
1124
|
+
"description": "Top-level keys of the JSON file a write may change. A change anywhere else in the file, or to a file that doesn't parse as a JSON object before and after, is still outside the scope.",
|
|
1125
|
+
"items": {
|
|
1126
|
+
"type": "string",
|
|
1127
|
+
"minLength": 1
|
|
1128
|
+
}
|
|
1129
|
+
}
|
|
1130
|
+
},
|
|
1131
|
+
"patternProperties": {
|
|
1132
|
+
"^x-": true
|
|
1133
|
+
},
|
|
1134
|
+
"additionalProperties": false
|
|
1135
|
+
}
|
|
1136
|
+
]
|
|
1137
|
+
},
|
|
1138
|
+
"classScope": {
|
|
1139
|
+
"type": "object",
|
|
1140
|
+
"description": "A principal class's write scope.",
|
|
1141
|
+
"properties": {
|
|
1142
|
+
"members": {
|
|
1143
|
+
"description": "The members whose files the class may write, by name, or * for every path. Without it, every path. A path in no member is in scope only under *.",
|
|
1144
|
+
"oneOf": [
|
|
1145
|
+
{
|
|
1146
|
+
"const": "*"
|
|
1147
|
+
},
|
|
1148
|
+
{
|
|
1149
|
+
"type": "array",
|
|
1150
|
+
"uniqueItems": true,
|
|
1151
|
+
"items": {
|
|
1152
|
+
"$ref": "#/$defs/name"
|
|
1153
|
+
}
|
|
1154
|
+
}
|
|
1155
|
+
]
|
|
1156
|
+
},
|
|
1157
|
+
"protected": {
|
|
1158
|
+
"type": "array",
|
|
1159
|
+
"description": "Paths the class may not write, even inside a member it may (#3146, ws-077): each a glob from the workspace root, or { path, except } for a JSON file the class may change only in the top-level keys except names. An entry protects the files it matches and everything under a directory it matches. A record file is judged by records, not here. Added in schema 1 by chant 0.102.0, so a declaration that uses it sets minReader to 0.102.0 or newer.",
|
|
1160
|
+
"items": {
|
|
1161
|
+
"$ref": "#/$defs/protectedPath"
|
|
1162
|
+
}
|
|
1163
|
+
},
|
|
1164
|
+
"records": {
|
|
1165
|
+
"$ref": "#/$defs/recordScope",
|
|
1166
|
+
"description": "The record kinds the class may write, and how. Without it, every kind in reach, with every verb. A kind a member declares is in reach when that member is; the workspace's own kinds always are."
|
|
1167
|
+
}
|
|
1168
|
+
},
|
|
1169
|
+
"patternProperties": {
|
|
1170
|
+
"^x-": true
|
|
1171
|
+
},
|
|
1172
|
+
"additionalProperties": false
|
|
1173
|
+
},
|
|
1174
|
+
"agentScope": {
|
|
1175
|
+
"type": "object",
|
|
1176
|
+
"description": "The agent class's write scope. Its members are always its session's one member, so only the record kinds and the protected paths can be set.",
|
|
1177
|
+
"properties": {
|
|
1178
|
+
"protected": {
|
|
1179
|
+
"type": "array",
|
|
1180
|
+
"description": "Paths the class may not write, even inside a member it may (#3146, ws-077): each a glob from the workspace root, or { path, except } for a JSON file the class may change only in the top-level keys except names. An entry protects the files it matches and everything under a directory it matches. A record file is judged by records, not here. Added in schema 1 by chant 0.102.0, so a declaration that uses it sets minReader to 0.102.0 or newer.",
|
|
1181
|
+
"items": {
|
|
1182
|
+
"$ref": "#/$defs/protectedPath"
|
|
1183
|
+
}
|
|
1184
|
+
},
|
|
1185
|
+
"records": {
|
|
1186
|
+
"$ref": "#/$defs/recordScope",
|
|
1187
|
+
"description": "The record kinds an agent may write, and how. Without it, every kind in reach of its member, with every verb."
|
|
1188
|
+
}
|
|
1189
|
+
},
|
|
1190
|
+
"patternProperties": {
|
|
1191
|
+
"^x-": true
|
|
1192
|
+
},
|
|
1193
|
+
"additionalProperties": false
|
|
1194
|
+
},
|
|
1195
|
+
"agent": {
|
|
1196
|
+
"type": "object",
|
|
1197
|
+
"description": "An agent session (#2548).",
|
|
1198
|
+
"required": [
|
|
1199
|
+
"name",
|
|
1200
|
+
"member"
|
|
1201
|
+
],
|
|
1202
|
+
"properties": {
|
|
1203
|
+
"name": {
|
|
1204
|
+
"$ref": "#/$defs/name",
|
|
1205
|
+
"description": "The session's name, unique among agents: what CHANT_AGENT and a Chant-Agent trailer give."
|
|
1206
|
+
},
|
|
1207
|
+
"member": {
|
|
1208
|
+
"$ref": "#/$defs/name",
|
|
1209
|
+
"description": "The one member the session is bound to. It must be a declared member, not an example group."
|
|
1210
|
+
},
|
|
1211
|
+
"principals": {
|
|
1212
|
+
"type": "array",
|
|
1213
|
+
"uniqueItems": true,
|
|
1214
|
+
"items": {
|
|
1215
|
+
"type": "string",
|
|
1216
|
+
"minLength": 1
|
|
1217
|
+
},
|
|
1218
|
+
"description": "Principals that write only as this session: a commit attested by one, or a write whose by names one, is judged as the session. A principal is listed by one session at most."
|
|
1219
|
+
}
|
|
1220
|
+
},
|
|
1221
|
+
"patternProperties": {
|
|
1222
|
+
"^x-": true
|
|
1223
|
+
},
|
|
1224
|
+
"additionalProperties": false
|
|
861
1225
|
}
|
|
862
1226
|
}
|
|
863
1227
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `chant workspace export [<member>...] [--to <member>] [--param name=value] [--dry-run] [--json]`,
|
|
3
|
+
* `chant workspace import [<dir>] [--remove] [--dry-run] [--json]` and
|
|
4
|
+
* `chant workspace admit <return id> [--note <text>] [--dry-run] [--json]` (#2552).
|
|
5
|
+
*
|
|
6
|
+
* See ./export.ts, ./import.ts and ./returns.ts.
|
|
7
|
+
*/
|
|
8
|
+
import type { CommandContext } from "../cli/registry.js";
|
|
9
|
+
export declare function runWorkspaceExport(ctx: CommandContext): Promise<number>;
|
|
10
|
+
export declare function runWorkspaceImport(ctx: CommandContext): Promise<number>;
|
|
11
|
+
export declare function runWorkspaceAdmit(ctx: CommandContext): Promise<number>;
|
|
12
|
+
//# sourceMappingURL=export-cli.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"export-cli.d.ts","sourceRoot":"","sources":["../../src/workspace/export-cli.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AA+BtD,wBAAsB,kBAAkB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CA0C7E;AAED,wBAAsB,kBAAkB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAmD7E;AAED,wBAAsB,iBAAiB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAyC5E"}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `chant workspace export`: write members of this workspace, with their
|
|
3
|
+
* lineage and records, into the workspace's export member as a workspace of
|
|
4
|
+
* their own (#2552, #2524 D10, requirements X1 to X3 and X6, ws-073).
|
|
5
|
+
*
|
|
6
|
+
* The export goes into its own member, found by role: a member of kind
|
|
7
|
+
* `workspace` with the role `export`. Nothing is written anywhere else, and a
|
|
8
|
+
* layout where the export would land inside another member, or another
|
|
9
|
+
* member inside the export, is refused. That member is a nested workspace
|
|
10
|
+
* (ws-071): the outer workspace reads it only through its own commands, and
|
|
11
|
+
* export is the one command that writes there.
|
|
12
|
+
*
|
|
13
|
+
* Only members that declare `travel: true` go (X6). With no members named,
|
|
14
|
+
* every such member goes, with the workspace's own record kinds and their
|
|
15
|
+
* records: that is an export of the workspace. Naming members exports just
|
|
16
|
+
* those, each with the record kinds it declares.
|
|
17
|
+
*
|
|
18
|
+
* The export keeps the workspace's layout: a member at `app/` is at
|
|
19
|
+
* `<export>/app/`. It gets a declaration listing the members that went, each
|
|
20
|
+
* entry copied as written, less the links, agents and pins that point at
|
|
21
|
+
* members that stayed. The lineage of each scope goes with it, filtered to
|
|
22
|
+
* the files that went. Records are copied byte for byte, so every seal on
|
|
23
|
+
* them stays as it was.
|
|
24
|
+
*
|
|
25
|
+
* Host-bound parameters (D9) switch on export (X3): `--param name=value`
|
|
26
|
+
* gives an exported lineage's host-bound parameter the value it has where the
|
|
27
|
+
* export goes. The files the lineage lists for it get the new value, the lock
|
|
28
|
+
* records it, and a file that had its recorded hash keeps a matching one. The
|
|
29
|
+
* host's values stay in `.chant/export.json`, where `import` reads them to
|
|
30
|
+
* switch back.
|
|
31
|
+
*
|
|
32
|
+
* `.chant/export.json` records where the export came from (the workspace's
|
|
33
|
+
* name and revision, ws-016), what went, and the hash each file had here and
|
|
34
|
+
* in the export. Import uses those as its merge base.
|
|
35
|
+
*/
|
|
36
|
+
import { z } from "zod";
|
|
37
|
+
import { type Declaration, type Member } from "./declaration.js";
|
|
38
|
+
import { LockError, type Lineage } from "./lineage-lock.js";
|
|
39
|
+
/** The role that marks the member an export is written into. */
|
|
40
|
+
export declare const EXPORT_ROLE = "export";
|
|
41
|
+
/** The export manifest, relative to the export's root. */
|
|
42
|
+
export declare const EXPORT_MANIFEST = ".chant/export.json";
|
|
43
|
+
declare const ManifestSchema: z.ZodObject<{
|
|
44
|
+
schema: z.ZodLiteral<1>;
|
|
45
|
+
id: z.ZodString;
|
|
46
|
+
from: z.ZodObject<{
|
|
47
|
+
workspace: z.ZodString;
|
|
48
|
+
revision: z.ZodNullable<z.ZodString>;
|
|
49
|
+
dirty: z.ZodBoolean;
|
|
50
|
+
}, z.core.$strict>;
|
|
51
|
+
member: z.ZodString;
|
|
52
|
+
members: z.ZodArray<z.ZodString>;
|
|
53
|
+
whole: z.ZodBoolean;
|
|
54
|
+
dirs: z.ZodArray<z.ZodString>;
|
|
55
|
+
files: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
56
|
+
host: z.ZodString;
|
|
57
|
+
export: z.ZodString;
|
|
58
|
+
}, z.core.$strict>>;
|
|
59
|
+
locks: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
60
|
+
host: z.ZodString;
|
|
61
|
+
export: z.ZodString;
|
|
62
|
+
partial: z.ZodBoolean;
|
|
63
|
+
}, z.core.$strict>>>;
|
|
64
|
+
hostValues: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
65
|
+
host: z.ZodString;
|
|
66
|
+
export: z.ZodString;
|
|
67
|
+
}, z.core.$strict>>>;
|
|
68
|
+
dropped: z.ZodObject<{
|
|
69
|
+
links: z.ZodArray<z.ZodObject<{
|
|
70
|
+
member: z.ZodString;
|
|
71
|
+
to: z.ZodString;
|
|
72
|
+
}, z.core.$strict>>;
|
|
73
|
+
agents: z.ZodArray<z.ZodString>;
|
|
74
|
+
pins: z.ZodArray<z.ZodString>;
|
|
75
|
+
records: z.ZodArray<z.ZodString>;
|
|
76
|
+
diagrams: z.ZodArray<z.ZodString>;
|
|
77
|
+
}, z.core.$strict>;
|
|
78
|
+
}, z.core.$strict>;
|
|
79
|
+
export type ExportManifest = z.infer<typeof ManifestSchema>;
|
|
80
|
+
export declare class ExportError extends LockError {
|
|
81
|
+
name: string;
|
|
82
|
+
}
|
|
83
|
+
export declare function parseManifest(text: string, label: string): ExportManifest;
|
|
84
|
+
export declare function readManifestAt(dir: string): ExportManifest | null;
|
|
85
|
+
/** `true` when `path` is `dir` or below it. Both relative, `/`-separated, `"."` for the root. */
|
|
86
|
+
export declare function under(path: string, dir: string): boolean;
|
|
87
|
+
export declare function gitTopOf(dir: string): string | undefined;
|
|
88
|
+
/**
|
|
89
|
+
* The files under `dir` (absolute) that git tracks or would track, relative
|
|
90
|
+
* to `dir`, that exist in the working tree. Outside git, every file, leaving
|
|
91
|
+
* out `.git` and `node_modules`.
|
|
92
|
+
*/
|
|
93
|
+
export declare function listFiles(dir: string): string[];
|
|
94
|
+
/** A lock's path, relative to the workspace root, is a lock file: `.chant/workspace.lock.json` at some directory. */
|
|
95
|
+
export declare function isLockPath(path: string): boolean;
|
|
96
|
+
/** The directory, relative to the workspace root, a lock at `path` sits in. */
|
|
97
|
+
export declare function lockDir(path: string): string;
|
|
98
|
+
/** Join a lock directory, a scope and a file into a workspace-relative path. */
|
|
99
|
+
export declare function scopedPath(dir: string, scope: string, file: string): string;
|
|
100
|
+
/** The digest of a lineage, for telling whether it changed. */
|
|
101
|
+
export declare function lineageDigest(lineage: Lineage): string;
|
|
102
|
+
/**
|
|
103
|
+
* Switch host-bound values in a scope (#2552): for each parameter in
|
|
104
|
+
* `values`, the files the lineage lists for it get `to` in place of `from`,
|
|
105
|
+
* the lineage records `to`, and a file that had its recorded hash keeps a
|
|
106
|
+
* matching one. `files` holds the scope's files by workspace-relative path,
|
|
107
|
+
* and is changed in place. Returns the paths whose content changed.
|
|
108
|
+
*/
|
|
109
|
+
export declare function switchHostValues(lineage: Lineage, dir: string, scope: string, values: Record<string, {
|
|
110
|
+
from: string;
|
|
111
|
+
to: string;
|
|
112
|
+
}>, files: Map<string, Buffer>): string[];
|
|
113
|
+
/** The raw declaration object, read as JSON or JSONC. */
|
|
114
|
+
export declare function rawDeclaration(root: string): {
|
|
115
|
+
file: string;
|
|
116
|
+
obj: Record<string, unknown>;
|
|
117
|
+
};
|
|
118
|
+
/** The export member: the one with the export role, or the one `to` names. */
|
|
119
|
+
export declare function exportMember(decl: Declaration, to?: string): Member;
|
|
120
|
+
export interface ExportOptions {
|
|
121
|
+
/** The workspace root, where `chant.workspace.json` is. */
|
|
122
|
+
root: string;
|
|
123
|
+
/** Members to export. Empty or absent: every member that travels, with the workspace's own records. */
|
|
124
|
+
members?: string[];
|
|
125
|
+
/** The export member's name, when more than one has the role. */
|
|
126
|
+
to?: string;
|
|
127
|
+
/** Host-bound parameter values for the export. */
|
|
128
|
+
params?: Record<string, string>;
|
|
129
|
+
dryRun?: boolean;
|
|
130
|
+
}
|
|
131
|
+
export interface ExportResult {
|
|
132
|
+
member: string;
|
|
133
|
+
/** The export's directory, relative to the workspace root. */
|
|
134
|
+
dir: string;
|
|
135
|
+
manifest: ExportManifest;
|
|
136
|
+
/** Files written, relative to the export's root, besides the declaration and the manifest. */
|
|
137
|
+
files: number;
|
|
138
|
+
/** Paths, relative to the workspace root, whose host-bound values were switched. */
|
|
139
|
+
switched: string[];
|
|
140
|
+
written: boolean;
|
|
141
|
+
}
|
|
142
|
+
/** Plan the export, and write it unless `dryRun`. Throws an {@link ExportError}. */
|
|
143
|
+
export declare function exportWorkspace(o: ExportOptions): Promise<ExportResult>;
|
|
144
|
+
export {};
|
|
145
|
+
//# sourceMappingURL=export.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"export.d.ts","sourceRoot":"","sources":["../../src/workspace/export.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;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C;CAClB;AAED,oFAAoF;AACpF,wBAAsB,eAAe,CAAC,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,YAAY,CAAC,CAmM7E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generated-files.d.ts","sourceRoot":"","sources":["../../src/workspace/generated-files.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAIH,OAAO,EAA6B,KAAK,WAAW,EAAE,MAAM,eAAe,CAAC;AAI5E,8EAA8E;AAC9E,eAAO,MAAM,kBAAkB
|
|
1
|
+
{"version":3,"file":"generated-files.d.ts","sourceRoot":"","sources":["../../src/workspace/generated-files.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAIH,OAAO,EAA6B,KAAK,WAAW,EAAE,MAAM,eAAe,CAAC;AAI5E,8EAA8E;AAC9E,eAAO,MAAM,kBAAkB;aAAM,IAAI,EAAE,mBAAmB;aAAE,OAAO;aAAgC,OAAO,EAAE,cAAc;EAAY,CAAC;AAE3I,4CAA4C;AAC5C,eAAO,MAAM,UAAU,YAAI,WAAW,CAAU,CAAC;AAEjD,6EAA6E;AAC7E,eAAO,MAAM,YAAY,YAAI,cAAc,CAAU,CAAC;AAEtD,iFAAiF;AACjF,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,OAAO,CAAC;CACtB;AACD,MAAM,MAAM,aAAa,GAAG,WAAW,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;AAE9D,MAAM,MAAM,kBAAkB,GAC1B;IAAE,KAAK,EAAE,OAAO,CAAA;CAAE,GAClB;IAAE,KAAK,EAAE,WAAW,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GACvC;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GACjB;IAAE,KAAK,EAAE,SAAS,CAAA;CAAE,CAAC;AAEzB,iDAAiD;AACjD,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,GAAG,SAAS,CAE/F;AAED,oFAAoF;AACpF,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,aAAa,GAAG,kBAAkB,CAQvF;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE,YAAY,CAAC,CAUnG;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,WAAW,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAK/E;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE,YAAY,CAAC,CAM1E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graph-cache.d.ts","sourceRoot":"","sources":["../../src/workspace/graph-cache.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AAMH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,OAAO,EAAc,KAAK,UAAU,EAAE,KAAK,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/G,gFAAgF;AAChF,eAAO,MAAM,YAAY,IAAI,CAAC;AAE9B,mHAAmH;AACnH,eAAO,MAAM,aAAa,oBAAoB,CAAC;AAE/C,eAAO,MAAM,WAAW,MAAM,CAAC;AAC/B,eAAO,MAAM,SAAS,QAAoB,CAAC;AAE3C,gFAAgF;AAChF,eAAO,MAAM,eAAe,OAAO,CAAC;AAEpC,qFAAqF;AACrF,eAAO,MAAM,UAAU
|
|
1
|
+
{"version":3,"file":"graph-cache.d.ts","sourceRoot":"","sources":["../../src/workspace/graph-cache.ts"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