@intentius/chant 0.102.0 → 0.104.1
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/audit/core.d.ts +2 -0
- package/dist/audit/core.d.ts.map +1 -1
- package/dist/audit/discover.d.ts.map +1 -1
- package/dist/change-set.d.ts +232 -0
- package/dist/change-set.d.ts.map +1 -0
- package/dist/cli/commands/audit.d.ts +7 -0
- package/dist/cli/commands/audit.d.ts.map +1 -1
- package/dist/cli/commands/build.d.ts.map +1 -1
- package/dist/cli/handlers/build.d.ts.map +1 -1
- package/dist/cli/handlers/change-set.d.ts +11 -0
- package/dist/cli/handlers/change-set.d.ts.map +1 -0
- package/dist/cli/handlers/fan-out.d.ts +33 -0
- package/dist/cli/handlers/fan-out.d.ts.map +1 -1
- package/dist/cli/handlers/operator.d.ts +7 -0
- package/dist/cli/handlers/operator.d.ts.map +1 -1
- package/dist/cli/handlers/pr.d.ts +31 -0
- package/dist/cli/handlers/pr.d.ts.map +1 -0
- package/dist/cli/handlers/run.d.ts.map +1 -1
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/mcp/op-tools.d.ts.map +1 -1
- package/dist/cli/mcp/workspace-tools.d.ts +3 -2
- package/dist/cli/mcp/workspace-tools.d.ts.map +1 -1
- package/dist/cli/registry.d.ts +63 -1
- package/dist/cli/registry.d.ts.map +1 -1
- package/dist/components/auto-release.d.ts +16 -0
- package/dist/components/auto-release.d.ts.map +1 -1
- package/dist/components/capability.d.ts +53 -0
- package/dist/components/capability.d.ts.map +1 -1
- package/dist/components/changed-files.d.ts +31 -0
- package/dist/components/changed-files.d.ts.map +1 -0
- package/dist/components/cli-support.d.ts +9 -1
- package/dist/components/cli-support.d.ts.map +1 -1
- package/dist/components/component.d.ts +24 -0
- package/dist/components/component.d.ts.map +1 -1
- package/dist/components/deploy-units.d.ts.map +1 -1
- package/dist/components/driver.d.ts +13 -0
- package/dist/components/driver.d.ts.map +1 -1
- package/dist/components/fan-out-output.d.ts +6 -0
- package/dist/components/fan-out-output.d.ts.map +1 -1
- package/dist/components/fan-out-record.d.ts +41 -0
- package/dist/components/fan-out-record.d.ts.map +1 -0
- package/dist/components/fan-out-run.d.ts +65 -0
- package/dist/components/fan-out-run.d.ts.map +1 -1
- package/dist/components/fan-out-support.d.ts +2 -0
- package/dist/components/fan-out-support.d.ts.map +1 -1
- package/dist/components/fan-out.d.ts +6 -0
- package/dist/components/fan-out.d.ts.map +1 -1
- package/dist/components/gated-wave-pipeline.d.ts +50 -0
- package/dist/components/gated-wave-pipeline.d.ts.map +1 -0
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/layers.d.ts +25 -0
- package/dist/components/layers.d.ts.map +1 -0
- package/dist/components/pr-pipeline.d.ts +61 -0
- package/dist/components/pr-pipeline.d.ts.map +1 -0
- package/dist/components/pr-run.d.ts +119 -0
- package/dist/components/pr-run.d.ts.map +1 -0
- package/dist/components/promote.d.ts.map +1 -1
- package/dist/components/verbs/shell.d.ts.map +1 -1
- package/dist/components/wave-plan.d.ts +49 -0
- package/dist/components/wave-plan.d.ts.map +1 -0
- package/dist/gated-waves.d.ts +147 -0
- package/dist/gated-waves.d.ts.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/lexicon.d.ts +48 -0
- package/dist/lexicon.d.ts.map +1 -1
- package/dist/lifecycle/gate-ledger.d.ts +7 -0
- package/dist/lifecycle/gate-ledger.d.ts.map +1 -1
- package/dist/lifecycle/git.d.ts +46 -1
- package/dist/lifecycle/git.d.ts.map +1 -1
- package/dist/lint/post-synth.d.ts +18 -0
- package/dist/lint/post-synth.d.ts.map +1 -1
- package/dist/op/activities/activity-contracts.d.ts +126 -0
- package/dist/op/activities/activity-contracts.d.ts.map +1 -1
- package/dist/op/activities/change-set.d.ts +62 -0
- package/dist/op/activities/change-set.d.ts.map +1 -0
- package/dist/op/activities/decide.d.ts +2 -0
- package/dist/op/activities/decide.d.ts.map +1 -1
- package/dist/op/activities/factory.d.ts +137 -0
- package/dist/op/activities/factory.d.ts.map +1 -0
- package/dist/op/activities/index.d.ts +4 -0
- package/dist/op/activities/index.d.ts.map +1 -1
- package/dist/op/activity-contract.d.ts.map +1 -1
- package/dist/op/builders.d.ts +11 -0
- package/dist/op/builders.d.ts.map +1 -1
- package/dist/op/decide-backend.d.ts +5 -1
- package/dist/op/decide-backend.d.ts.map +1 -1
- package/dist/op/decide-read-inputs.d.ts +4 -2
- package/dist/op/decide-read-inputs.d.ts.map +1 -1
- package/dist/op/factory.d.ts +83 -0
- package/dist/op/factory.d.ts.map +1 -0
- package/dist/op/index.d.ts +4 -1
- package/dist/op/index.d.ts.map +1 -1
- package/dist/op/op-ir.d.ts +2 -0
- package/dist/op/op-ir.d.ts.map +1 -1
- package/dist/op/op-verb-class.d.ts.map +1 -1
- package/dist/op/types.d.ts +8 -0
- package/dist/op/types.d.ts.map +1 -1
- package/dist/op/work-lease-run.d.ts.map +1 -1
- package/dist/plan-summary.d.ts +207 -0
- package/dist/plan-summary.d.ts.map +1 -0
- package/dist/pr-forge.d.ts +105 -0
- package/dist/pr-forge.d.ts.map +1 -0
- package/dist/pr-loop.d.ts +178 -0
- package/dist/pr-loop.d.ts.map +1 -0
- package/dist/telemetry-attribution.d.ts +31 -0
- package/dist/telemetry-attribution.d.ts.map +1 -1
- package/dist/terraform/hcl2json.d.ts +45 -0
- package/dist/terraform/hcl2json.d.ts.map +1 -0
- package/dist/terraform/parse.d.ts +4 -40
- package/dist/terraform/parse.d.ts.map +1 -1
- package/dist/vendor/js-yaml-load.d.ts +56 -0
- package/dist/vendor/js-yaml-load.d.ts.map +1 -0
- package/dist/workspace/box-cli.d.ts +12 -0
- package/dist/workspace/box-cli.d.ts.map +1 -0
- package/dist/workspace/box-factory.d.ts +27 -3
- package/dist/workspace/box-factory.d.ts.map +1 -1
- package/dist/workspace/box-listing.d.ts +85 -0
- package/dist/workspace/box-listing.d.ts.map +1 -0
- package/dist/workspace/box-publish.d.ts +147 -0
- package/dist/workspace/box-publish.d.ts.map +1 -0
- package/dist/workspace/broker-protocol.d.ts +190 -0
- package/dist/workspace/broker-protocol.d.ts.map +1 -0
- package/dist/workspace/checks.d.ts.map +1 -1
- package/dist/workspace/composites.d.ts +2 -2
- package/dist/workspace/composites.d.ts.map +1 -1
- package/dist/workspace/conformance/__fixtures__/reference-broker.d.ts +17 -0
- package/dist/workspace/conformance/__fixtures__/reference-broker.d.ts.map +1 -0
- package/dist/workspace/conformance/broker.d.ts +202 -0
- package/dist/workspace/conformance/broker.d.ts.map +1 -0
- package/dist/workspace/conformance/index.d.ts +2 -1
- package/dist/workspace/conformance/index.d.ts.map +1 -1
- package/dist/workspace/conformance/vitest.d.ts +9 -2
- package/dist/workspace/conformance/vitest.d.ts.map +1 -1
- package/dist/workspace/conformance/writer.d.ts +108 -14
- package/dist/workspace/conformance/writer.d.ts.map +1 -1
- package/dist/workspace/decide.d.ts +126 -12
- package/dist/workspace/decide.d.ts.map +1 -1
- package/dist/workspace/decision-points.schema.json +11 -4
- package/dist/workspace/declaration.d.ts +65 -0
- package/dist/workspace/declaration.d.ts.map +1 -1
- package/dist/workspace/declaration.schema.json +153 -4
- package/dist/workspace/environments.d.ts +36 -10
- package/dist/workspace/environments.d.ts.map +1 -1
- package/dist/workspace/factory-rules.d.ts +180 -0
- package/dist/workspace/factory-rules.d.ts.map +1 -0
- package/dist/workspace/init.d.ts +21 -0
- package/dist/workspace/init.d.ts.map +1 -1
- package/dist/workspace/intent-cli.d.ts +1 -1
- package/dist/workspace/intent-cli.d.ts.map +1 -1
- package/dist/workspace/intent-record.d.ts +28 -1
- package/dist/workspace/intent-record.d.ts.map +1 -1
- package/dist/workspace/intent.d.ts +102 -5
- package/dist/workspace/intent.d.ts.map +1 -1
- package/dist/workspace/json-edit.d.ts +24 -0
- package/dist/workspace/json-edit.d.ts.map +1 -0
- package/dist/workspace/jsonc.d.ts +11 -0
- package/dist/workspace/jsonc.d.ts.map +1 -1
- package/dist/workspace/kinds.d.ts +48 -0
- package/dist/workspace/kinds.d.ts.map +1 -1
- package/dist/workspace/lexicon-symbols.d.ts +29 -0
- package/dist/workspace/lexicon-symbols.d.ts.map +1 -0
- package/dist/workspace/lineage-upgrade.d.ts +31 -2
- package/dist/workspace/lineage-upgrade.d.ts.map +1 -1
- package/dist/workspace/point-answer.schema.json +42 -2
- package/dist/workspace/points-cli.d.ts +10 -3
- package/dist/workspace/points-cli.d.ts.map +1 -1
- package/dist/workspace/points.d.ts +66 -5
- package/dist/workspace/points.d.ts.map +1 -1
- package/dist/workspace/reason-codes.d.ts +33 -4
- package/dist/workspace/reason-codes.d.ts.map +1 -1
- package/dist/workspace/record-sessions.d.ts +5 -7
- package/dist/workspace/record-sessions.d.ts.map +1 -1
- package/dist/workspace/records-cli.d.ts +7 -0
- package/dist/workspace/records-cli.d.ts.map +1 -1
- package/dist/workspace/records-close.d.ts +7 -3
- package/dist/workspace/records-close.d.ts.map +1 -1
- package/dist/workspace/records-write.d.ts +66 -6
- package/dist/workspace/records-write.d.ts.map +1 -1
- package/dist/workspace/records.d.ts +28 -9
- package/dist/workspace/records.d.ts.map +1 -1
- package/dist/workspace/runs-cli.d.ts +138 -6
- package/dist/workspace/runs-cli.d.ts.map +1 -1
- package/dist/workspace/runs.d.ts +132 -11
- package/dist/workspace/runs.d.ts.map +1 -1
- package/dist/workspace/session-kinds.d.ts +1 -1
- package/dist/workspace/session-kinds.d.ts.map +1 -1
- package/dist/workspace/squash.d.ts +80 -0
- package/dist/workspace/squash.d.ts.map +1 -0
- package/dist/workspace/status-gates.d.ts +2 -0
- package/dist/workspace/status-gates.d.ts.map +1 -1
- package/dist/workspace/status.d.ts +54 -0
- package/dist/workspace/status.d.ts.map +1 -1
- package/dist/workspace/symbols.d.ts +16 -5
- package/dist/workspace/symbols.d.ts.map +1 -1
- package/dist/workspace/trust/run-commits.d.ts +46 -0
- package/dist/workspace/trust/run-commits.d.ts.map +1 -0
- package/dist/workspace/trust/run-statement.d.ts +128 -0
- package/dist/workspace/trust/run-statement.d.ts.map +1 -0
- package/dist/workspace/trust/seal.d.ts +6 -1
- package/dist/workspace/trust/seal.d.ts.map +1 -1
- package/dist/workspace/trust/verify-cli.d.ts +1 -1
- package/dist/workspace/trust/verify.d.ts +16 -2
- package/dist/workspace/trust/verify.d.ts.map +1 -1
- package/dist/workspace/wip-cli.d.ts +21 -0
- package/dist/workspace/wip-cli.d.ts.map +1 -0
- package/dist/workspace/wip.d.ts +268 -0
- package/dist/workspace/wip.d.ts.map +1 -0
- 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-size.d.ts +55 -0
- package/dist/workspace/work-size.d.ts.map +1 -0
- package/dist/workspace/workspace-kinds.schema.json +122 -0
- package/dist/workspace/write-lock-cli.d.ts +60 -0
- package/dist/workspace/write-lock-cli.d.ts.map +1 -0
- package/dist/workspace/write-lock.d.ts +152 -0
- package/dist/workspace/write-lock.d.ts.map +1 -0
- package/dist/workspace/write-scope.d.ts +6 -2
- package/dist/workspace/write-scope.d.ts.map +1 -1
- package/dist/yaml.d.ts +1 -1
- package/dist/yaml.d.ts.map +1 -1
- package/package.json +6 -1
- package/src/__fixtures__/change-set/lifecycle-plan.floci.json +59 -0
- package/src/__fixtures__/change-set/lifecycle-v1.ts.txt +4 -0
- package/src/__fixtures__/change-set/lifecycle-v2.ts.txt +4 -0
- package/src/__fixtures__/change-set/lifecycle.change-set.golden.json +95 -0
- package/src/__fixtures__/change-set/warden.change-set.golden.json +106 -0
- package/src/__fixtures__/change-set/warden.plan.json +44 -0
- package/src/__fixtures__/plan-summary/normalization-vectors.json +1593 -0
- package/src/__fixtures__/pr-loop/pr-apply-applied.note.golden.md +31 -0
- package/src/__fixtures__/pr-loop/pr-apply-refused.note.golden.md +31 -0
- package/src/__fixtures__/pr-loop/pr-plan.golden.json +127 -0
- package/src/__fixtures__/pr-loop/pr-plan.note.golden.md +37 -0
- package/src/audit/core.test.ts +15 -0
- package/src/audit/core.ts +8 -2
- package/src/audit/discover.test.ts +11 -0
- package/src/audit/discover.ts +7 -2
- package/src/change-set-bundle.test.ts +57 -0
- package/src/change-set.test.ts +215 -0
- package/src/change-set.ts +445 -0
- package/src/cli/commands/audit-opt-in.test.ts +54 -0
- package/src/cli/commands/audit.ts +29 -2
- package/src/cli/commands/build.test.ts +19 -0
- package/src/cli/commands/build.ts +3 -2
- package/src/cli/handlers/build.ts +13 -1
- package/src/cli/handlers/change-set.test.ts +56 -0
- package/src/cli/handlers/change-set.ts +44 -0
- package/src/cli/handlers/fan-out.test.ts +221 -2
- package/src/cli/handlers/fan-out.ts +165 -75
- package/src/cli/handlers/graph.ts +3 -0
- package/src/cli/handlers/operator.test.ts +21 -0
- package/src/cli/handlers/operator.ts +34 -3
- package/src/cli/handlers/pr.ts +373 -0
- package/src/cli/handlers/run.ts +1 -0
- package/src/cli/main.test.ts +20 -0
- package/src/cli/main.ts +185 -23
- package/src/cli/mcp/never-over-mcp.test.ts +101 -0
- package/src/cli/mcp/op-tools.ts +24 -2
- package/src/cli/mcp/workspace-tools.test.ts +1 -1
- package/src/cli/mcp/workspace-tools.ts +34 -6
- package/src/cli/registry.ts +63 -1
- package/src/components/auto-release.ts +1 -1
- package/src/components/capability.ts +55 -0
- package/src/components/changed-files.ts +66 -0
- package/src/components/cli-support.ts +28 -5
- package/src/components/component.schema.json +17 -0
- package/src/components/component.ts +25 -0
- package/src/components/deploy-units.ts +3 -0
- package/src/components/driver.test.ts +52 -0
- package/src/components/driver.ts +31 -13
- package/src/components/fan-out-output.ts +42 -1
- package/src/components/fan-out-record.ts +69 -0
- package/src/components/fan-out-run.test.ts +17 -0
- package/src/components/fan-out-run.ts +304 -1
- package/src/components/fan-out-support.ts +3 -0
- package/src/components/fan-out-waves.test.ts +375 -0
- package/src/components/fan-out.ts +18 -17
- package/src/components/gated-wave-pipeline.ts +82 -0
- package/src/components/index.ts +1 -0
- package/src/components/layers.ts +30 -0
- package/src/components/pr-pipeline.ts +91 -0
- package/src/components/pr-run.test.ts +205 -0
- package/src/components/pr-run.ts +280 -0
- package/src/components/promote.ts +5 -0
- package/src/components/verbs/shell.test.ts +11 -0
- package/src/components/verbs/shell.ts +7 -3
- package/src/components/wave-plan.ts +124 -0
- package/src/discovery/sandbox/bundle.ts +1 -1
- package/src/gated-waves-bundle.test.ts +62 -0
- package/src/gated-waves.test.ts +118 -0
- package/src/gated-waves.ts +240 -0
- package/src/index.ts +1 -0
- package/src/lexicon.ts +51 -0
- package/src/lifecycle/gate-ledger.ts +7 -0
- package/src/lifecycle/git.ts +102 -16
- package/src/lint/post-synth.test.ts +19 -0
- package/src/lint/post-synth.ts +19 -1
- package/src/meta/declared-imports.test.ts +1 -1
- package/src/op/activities/activity-contracts.ts +84 -0
- package/src/op/activities/change-set.ts +114 -0
- package/src/op/activities/decide.ts +3 -0
- package/src/op/activities/factory.ts +675 -0
- package/src/op/activities/index.ts +6 -0
- package/src/op/activity-contract.test.ts +21 -1
- package/src/op/activity-contract.ts +19 -9
- package/src/op/builders.ts +23 -0
- package/src/op/decide-backend.ts +5 -1
- package/src/op/decide-read-inputs.ts +33 -5
- package/src/op/factory.e2e.test.ts +232 -0
- package/src/op/factory.ts +118 -0
- package/src/op/index.ts +9 -1
- package/src/op/op-ir.test.ts +9 -0
- package/src/op/op-ir.ts +4 -0
- package/src/op/op-verb-class.ts +3 -0
- package/src/op/types.ts +8 -0
- package/src/op/work-lease-run.ts +3 -0
- package/src/plan-summary.test.ts +263 -0
- package/src/plan-summary.ts +845 -0
- package/src/pr-forge.test.ts +237 -0
- package/src/pr-forge.ts +332 -0
- package/src/pr-loop-bundle.test.ts +46 -0
- package/src/pr-loop.test.ts +171 -0
- package/src/pr-loop.ts +324 -0
- package/src/telemetry-attribution.test.ts +23 -1
- package/src/telemetry-attribution.ts +51 -0
- package/src/terraform/hcl2json.test.ts +21 -0
- package/src/terraform/hcl2json.ts +81 -0
- package/src/terraform/parse.ts +11 -74
- package/src/vendor/js-yaml-load.test.ts +115 -0
- package/src/vendor/js-yaml-load.ts +1939 -0
- package/src/workspace/__fixtures__/studio-template-84c8b21.json +1 -1
- package/src/workspace/app-kind.test.ts +196 -0
- package/src/workspace/box-cli.ts +113 -0
- package/src/workspace/box-factory.test.ts +4 -1
- package/src/workspace/box-factory.ts +37 -4
- package/src/workspace/box-listing-write.schema.json +204 -0
- package/src/workspace/box-listing.test.ts +234 -0
- package/src/workspace/box-listing.ts +324 -0
- package/src/workspace/box-publish.schema.json +498 -0
- package/src/workspace/box-publish.test.ts +204 -0
- package/src/workspace/box-publish.ts +420 -0
- package/src/workspace/box-ship.test.ts +96 -0
- package/src/workspace/broker-protocol.schema.json +186 -0
- package/src/workspace/broker-protocol.test.ts +122 -0
- package/src/workspace/broker-protocol.ts +317 -0
- package/src/workspace/builder-tiers.test.ts +146 -0
- package/src/workspace/change-set.schema.json +460 -0
- package/src/workspace/chant-migrations.e2e.test.ts +17 -5
- package/src/workspace/checks/boxes.test.ts +3 -0
- package/src/workspace/checks.ts +10 -3
- package/src/workspace/component-environments.test.ts +105 -0
- package/src/workspace/composites.schema.json +23 -4
- package/src/workspace/composites.test.ts +8 -8
- package/src/workspace/composites.ts +13 -2
- package/src/workspace/conformance/__fixture__/decisions/decision.schema.json +2 -2
- package/src/workspace/conformance/__fixtures__/reference-broker.ts +207 -0
- package/src/workspace/conformance/__writer_fixture__/answers/answer.kind.mjs +7 -2
- package/src/workspace/conformance/__writer_fixture__/answers/answer.schema.json +42 -2
- package/src/workspace/conformance/__writer_fixture__/contracts/contract.kind.mjs +37 -0
- package/src/workspace/conformance/__writer_fixture__/contracts/contract.schema.json +213 -0
- package/src/workspace/conformance/__writer_fixture__/decisions/points.json +96 -0
- package/src/workspace/conformance/__writer_fixture__/drivers/driver.kind.mjs +15 -0
- package/src/workspace/conformance/__writer_fixture__/drivers/driver.schema.json +38 -0
- package/src/workspace/conformance/__writer_fixture__/sessions/session.kind.mjs +14 -8
- package/src/workspace/conformance/__writer_fixture__/sessions/session.schema.json +187 -6
- package/src/workspace/conformance/__writer_fixture__/work/work.schema.json +25 -0
- package/src/workspace/conformance/broker.test.ts +122 -0
- package/src/workspace/conformance/broker.ts +792 -0
- package/src/workspace/conformance/conformance.e2e.test.ts +2 -1
- package/src/workspace/conformance/index.mjs +22 -1
- package/src/workspace/conformance/index.ts +5 -1
- package/src/workspace/conformance/vitest.ts +33 -1
- package/src/workspace/conformance/writer-conformance.e2e.test.ts +49 -3
- package/src/workspace/conformance/writer.test.ts +32 -2
- package/src/workspace/conformance/writer.ts +339 -28
- package/src/workspace/decide.test.ts +208 -4
- package/src/workspace/decide.ts +427 -73
- package/src/workspace/decision-points.schema.json +11 -4
- package/src/workspace/declaration.schema.json +153 -4
- package/src/workspace/declaration.ts +141 -0
- package/src/workspace/environments.ts +66 -14
- package/src/workspace/factory-rules.test.ts +62 -0
- package/src/workspace/factory-rules.ts +218 -0
- package/src/workspace/graph-cli.ts +2 -2
- package/src/workspace/graph.schema.json +67 -0
- package/src/workspace/identity.test.ts +23 -0
- package/src/workspace/init.ts +82 -2
- package/src/workspace/intent-cli.ts +26 -9
- package/src/workspace/intent-patch-id.test.ts +162 -0
- package/src/workspace/intent-record.schema.json +130 -3
- package/src/workspace/intent-record.ts +74 -28
- package/src/workspace/intent-reviews.test.ts +76 -0
- package/src/workspace/intent-squash.test.ts +213 -0
- package/src/workspace/intent-why.test.ts +5 -5
- package/src/workspace/intent.schema.json +234 -4
- package/src/workspace/intent.ts +260 -66
- package/src/workspace/json-edit.test.ts +121 -0
- package/src/workspace/json-edit.ts +142 -0
- package/src/workspace/jsonc.ts +20 -0
- package/src/workspace/kinds.ts +157 -2
- package/src/workspace/lexicon-symbols.test.ts +148 -0
- package/src/workspace/lexicon-symbols.ts +125 -0
- package/src/workspace/lineage-upgrade.test.ts +63 -0
- package/src/workspace/lineage-upgrade.ts +146 -5
- package/src/workspace/plan-summary.schema.json +155 -0
- package/src/workspace/point-answer.schema.json +42 -2
- package/src/workspace/points-cli.ts +42 -16
- package/src/workspace/points-write.schema.json +162 -4
- package/src/workspace/points.schema.json +157 -2
- package/src/workspace/points.test.ts +13 -1
- package/src/workspace/points.ts +118 -12
- package/src/workspace/pr-report.schema.json +95 -0
- package/src/workspace/profiles.test.ts +159 -0
- package/src/workspace/read-contract.test.ts +2 -2
- package/src/workspace/reason-codes.test.ts +13 -1
- package/src/workspace/reason-codes.ts +38 -4
- package/src/workspace/record-sessions.ts +9 -8
- package/src/workspace/records-amend.schema.json +78 -0
- package/src/workspace/records-cli.ts +20 -6
- package/src/workspace/records-close.schema.json +78 -0
- package/src/workspace/records-close.ts +31 -7
- package/src/workspace/records-concurrent.e2e.test.ts +135 -0
- package/src/workspace/records-concurrent.test.ts +145 -0
- package/src/workspace/records-formats.test.ts +46 -10
- package/src/workspace/records-new.schema.json +7 -0
- package/src/workspace/records-review.schema.json +78 -0
- package/src/workspace/records-sessions-write.test.ts +69 -0
- package/src/workspace/records-sessions.test.ts +22 -0
- package/src/workspace/records-write.ts +192 -25
- package/src/workspace/records.schema.json +16 -0
- package/src/workspace/records.ts +50 -9
- package/src/workspace/reference-kinds/app/package.json +10 -0
- package/src/workspace/reference-kinds/app/workspace-kinds.json +45 -0
- package/src/workspace/run-statement.schema.json +622 -0
- package/src/workspace/runs-cli.ts +343 -14
- package/src/workspace/runs-statement.test.ts +239 -0
- package/src/workspace/runs-write.schema.json +416 -5
- package/src/workspace/runs.schema.json +451 -4
- package/src/workspace/runs.test.ts +39 -0
- package/src/workspace/runs.ts +296 -35
- package/src/workspace/session-kinds.ts +3 -3
- package/src/workspace/squash.ts +198 -0
- package/src/workspace/status-contract.test.ts +5 -2
- package/src/workspace/status-gates.ts +3 -1
- package/src/workspace/status.schema.json +126 -3
- package/src/workspace/status.ts +90 -1
- package/src/workspace/symbols.ts +20 -9
- package/src/workspace/trust/run-commits.ts +115 -0
- package/src/workspace/trust/run-statement.ts +226 -0
- package/src/workspace/trust/seal.ts +8 -2
- package/src/workspace/trust/verify-cli.ts +6 -5
- package/src/workspace/trust/verify.ts +39 -6
- package/src/workspace/wip-cli.ts +97 -0
- package/src/workspace/wip-write.schema.json +504 -0
- package/src/workspace/wip.schema.json +334 -0
- package/src/workspace/wip.test.ts +294 -0
- package/src/workspace/wip.ts +753 -0
- package/src/workspace/work-cli.ts +3 -0
- package/src/workspace/work-evidence.schema.json +3 -0
- package/src/workspace/work-size.test.ts +77 -0
- package/src/workspace/work-size.ts +93 -0
- package/src/workspace/workspace-kinds.schema.json +122 -0
- package/src/workspace/write-lock-cli.ts +131 -0
- package/src/workspace/write-lock.schema.json +172 -0
- package/src/workspace/write-lock.test.ts +189 -0
- package/src/workspace/write-lock.ts +474 -0
- package/src/workspace/write-scope.test.ts +16 -1
- package/src/workspace/write-scope.ts +33 -11
- package/src/yaml.ts +31 -21
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How much a work item holds, for the `slice-tier` decision point (#3150).
|
|
3
|
+
*
|
|
4
|
+
* The point picks the smallest builder tier that can build an item, from five
|
|
5
|
+
* inputs every orchestrator must compute the same way, so chant computes
|
|
6
|
+
* them. They are read through the `work-item` output like any other field:
|
|
7
|
+
*
|
|
8
|
+
* work-item.criteria the item's acceptance criteria, counted
|
|
9
|
+
* work-item.files distinct paths the item names in backticks
|
|
10
|
+
* work-item.words words in the item's text
|
|
11
|
+
* work-item.fits_<tier> whether criteria, files and words are each within
|
|
12
|
+
* that tier's limits (`fits_small`, `fits_medium`)
|
|
13
|
+
*
|
|
14
|
+
* The item's text is what a person asked (`source.ask.said`, or the answer
|
|
15
|
+
* to the box's intent, `source.intent.answer`), the record's Markdown body
|
|
16
|
+
* with its heading lines left out, and each acceptance criterion's text. A
|
|
17
|
+
* path is a backticked token with a `/` between two parts, such as
|
|
18
|
+
* `app/server.ts` or `design/screens/`, or a file name with an extension of
|
|
19
|
+
* one to five letters, such as `README.md`. Words are runs of non-blank
|
|
20
|
+
* characters.
|
|
21
|
+
*
|
|
22
|
+
* The limits are the work kind's `work.tier.limits`, else
|
|
23
|
+
* {@link DEFAULT_TIER_LIMITS}: small holds at most 10 criteria, 5 files and
|
|
24
|
+
* 150 words, medium 20, 10 and 300. A tier with no limits, such as large,
|
|
25
|
+
* has no `fits_` input; an item that fits neither small nor medium is large.
|
|
26
|
+
* These are the sizing defaults studio's factory used (arugula-salad/studio
|
|
27
|
+
* `queue.mjs` `sizing()`), so a point's answers keep their meaning.
|
|
28
|
+
*/
|
|
29
|
+
/** What one tier may hold. A limit left out is not checked. */
|
|
30
|
+
export interface TierLimit {
|
|
31
|
+
criteria?: number;
|
|
32
|
+
files?: number;
|
|
33
|
+
words?: number;
|
|
34
|
+
}
|
|
35
|
+
/** The limits when the work kind declares none. */
|
|
36
|
+
export declare const DEFAULT_TIER_LIMITS: Readonly<Record<string, TierLimit>>;
|
|
37
|
+
export interface WorkItemSize {
|
|
38
|
+
criteria: number;
|
|
39
|
+
files: number;
|
|
40
|
+
words: number;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Measure a work item from its front matter (`data`) and Markdown body.
|
|
44
|
+
* `acceptanceField` is the work kind's `work.acceptance.field`, `acceptance`
|
|
45
|
+
* when it names none.
|
|
46
|
+
*/
|
|
47
|
+
export declare function measureWorkItem(data: Record<string, unknown> | null, body: string, acceptanceField?: string): WorkItemSize;
|
|
48
|
+
/** Whether `size` is within `limit`: each limit given is at least the measure. */
|
|
49
|
+
export declare function fitsTier(size: WorkItemSize, limit: TierLimit | undefined): boolean;
|
|
50
|
+
/**
|
|
51
|
+
* The slice-tier inputs' fields for a measured item: `criteria`, `files`,
|
|
52
|
+
* `words` and `fits_<tier>` for each tier `limits` names.
|
|
53
|
+
*/
|
|
54
|
+
export declare function sizeFields(size: WorkItemSize, limits?: Readonly<Record<string, TierLimit>>): Record<string, number | boolean>;
|
|
55
|
+
//# sourceMappingURL=work-size.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"work-size.d.ts","sourceRoot":"","sources":["../../src/workspace/work-size.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAYH,+DAA+D;AAC/D,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,mDAAmD;AACnD,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAGlE,CAAC;AAEH,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf;AAMD;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,eAAe,SAAe,GAAG,YAAY,CAShI;AAED,kFAAkF;AAClF,wBAAgB,QAAQ,CAAC,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,SAAS,GAAG,SAAS,GAAG,OAAO,CAGlF;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,YAAY,EAAE,MAAM,GAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAuB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,CAIlJ"}
|
|
@@ -75,6 +75,9 @@
|
|
|
75
75
|
},
|
|
76
76
|
"graph": {
|
|
77
77
|
"$ref": "#/$defs/graph"
|
|
78
|
+
},
|
|
79
|
+
"fields": {
|
|
80
|
+
"$ref": "#/$defs/fields"
|
|
78
81
|
}
|
|
79
82
|
},
|
|
80
83
|
"patternProperties": {
|
|
@@ -123,6 +126,34 @@
|
|
|
123
126
|
}
|
|
124
127
|
},
|
|
125
128
|
"additionalProperties": false
|
|
129
|
+
},
|
|
130
|
+
"anyJsonKey": {
|
|
131
|
+
"type": "object",
|
|
132
|
+
"description": "The directory passes when a file directly in it, whose name matches one of in, parses as JSON and has a value at one of pointers, each a JSON Pointer such as /scripts/start (#3151). A file that is not JSON is no evidence either way. Added by chant 0.103.0.",
|
|
133
|
+
"required": [
|
|
134
|
+
"in",
|
|
135
|
+
"pointers"
|
|
136
|
+
],
|
|
137
|
+
"properties": {
|
|
138
|
+
"in": {
|
|
139
|
+
"type": "array",
|
|
140
|
+
"minItems": 1,
|
|
141
|
+
"uniqueItems": true,
|
|
142
|
+
"items": {
|
|
143
|
+
"$ref": "#/$defs/fileName"
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
"pointers": {
|
|
147
|
+
"type": "array",
|
|
148
|
+
"minItems": 1,
|
|
149
|
+
"uniqueItems": true,
|
|
150
|
+
"items": {
|
|
151
|
+
"type": "string",
|
|
152
|
+
"pattern": "^(/[^/]+)+$"
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
"additionalProperties": false
|
|
126
157
|
}
|
|
127
158
|
},
|
|
128
159
|
"additionalProperties": false
|
|
@@ -154,6 +185,97 @@
|
|
|
154
185
|
"^x-": true
|
|
155
186
|
},
|
|
156
187
|
"additionalProperties": false
|
|
188
|
+
},
|
|
189
|
+
"fields": {
|
|
190
|
+
"type": "object",
|
|
191
|
+
"description": "The fields a member entry of this kind may set under its own fields block, each with a type and, optionally, a default (#3151). chant workspace check fails a member whose fields name one the kind doesn't declare or give a value of the wrong type (WSP005), and chant workspace status --json prints every declared field with the defaults filled in. Added by chant 0.103.0; an older chant can't read a kinds file that uses it.",
|
|
192
|
+
"minProperties": 1,
|
|
193
|
+
"propertyNames": {
|
|
194
|
+
"$ref": "#/$defs/fieldName"
|
|
195
|
+
},
|
|
196
|
+
"additionalProperties": {
|
|
197
|
+
"oneOf": [
|
|
198
|
+
{
|
|
199
|
+
"$ref": "#/$defs/scalarField"
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
"$ref": "#/$defs/objectField"
|
|
203
|
+
}
|
|
204
|
+
]
|
|
205
|
+
}
|
|
206
|
+
},
|
|
207
|
+
"fieldName": {
|
|
208
|
+
"type": "string",
|
|
209
|
+
"pattern": "^[a-z][A-Za-z0-9]{0,39}$"
|
|
210
|
+
},
|
|
211
|
+
"scalarField": {
|
|
212
|
+
"type": "object",
|
|
213
|
+
"required": [
|
|
214
|
+
"type",
|
|
215
|
+
"description"
|
|
216
|
+
],
|
|
217
|
+
"properties": {
|
|
218
|
+
"type": {
|
|
219
|
+
"enum": [
|
|
220
|
+
"string",
|
|
221
|
+
"integer",
|
|
222
|
+
"boolean"
|
|
223
|
+
]
|
|
224
|
+
},
|
|
225
|
+
"description": {
|
|
226
|
+
"type": "string",
|
|
227
|
+
"minLength": 1
|
|
228
|
+
},
|
|
229
|
+
"default": {
|
|
230
|
+
"oneOf": [
|
|
231
|
+
{
|
|
232
|
+
"type": "string"
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
"type": "integer"
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
"type": "boolean"
|
|
239
|
+
}
|
|
240
|
+
],
|
|
241
|
+
"description": "The value a member that doesn't set the field gets. Its type is the field's. Without it the field reads as null when unset."
|
|
242
|
+
},
|
|
243
|
+
"pattern": {
|
|
244
|
+
"type": "string",
|
|
245
|
+
"minLength": 1,
|
|
246
|
+
"description": "For a string field: a regular expression the value must match."
|
|
247
|
+
}
|
|
248
|
+
},
|
|
249
|
+
"additionalProperties": false
|
|
250
|
+
},
|
|
251
|
+
"objectField": {
|
|
252
|
+
"type": "object",
|
|
253
|
+
"required": [
|
|
254
|
+
"type",
|
|
255
|
+
"description",
|
|
256
|
+
"properties"
|
|
257
|
+
],
|
|
258
|
+
"properties": {
|
|
259
|
+
"type": {
|
|
260
|
+
"const": "object"
|
|
261
|
+
},
|
|
262
|
+
"description": {
|
|
263
|
+
"type": "string",
|
|
264
|
+
"minLength": 1
|
|
265
|
+
},
|
|
266
|
+
"properties": {
|
|
267
|
+
"type": "object",
|
|
268
|
+
"minProperties": 1,
|
|
269
|
+
"propertyNames": {
|
|
270
|
+
"$ref": "#/$defs/fieldName"
|
|
271
|
+
},
|
|
272
|
+
"additionalProperties": {
|
|
273
|
+
"$ref": "#/$defs/scalarField"
|
|
274
|
+
},
|
|
275
|
+
"description": "The object's own fields, each a string, integer or boolean field. A member sets any of them; the rest take their defaults."
|
|
276
|
+
}
|
|
277
|
+
},
|
|
278
|
+
"additionalProperties": false
|
|
157
279
|
}
|
|
158
280
|
}
|
|
159
281
|
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `chant workspace lock` (#3173, ws-089): the working tree's write lock
|
|
3
|
+
* (`write-lock.ts`), seen and held from outside chant.
|
|
4
|
+
*
|
|
5
|
+
* - `lock` prints who holds it now, or that nobody does.
|
|
6
|
+
* - `lock acquire --holder <name> [--ttl <duration>]` takes it for a batch of
|
|
7
|
+
* writes across several chant calls, waiting for it as a write does, and
|
|
8
|
+
* prints the token. Each chant write of the batch runs with
|
|
9
|
+
* `CHANT_WRITE_LOCK=<token>` and goes ahead without waiting; every other
|
|
10
|
+
* writer waits. The lock lasts until it is released or the ttl passes
|
|
11
|
+
* (default 60s, at most 10m), after which any writer may break it.
|
|
12
|
+
* - `lock release --token <token>` gives it back.
|
|
13
|
+
*
|
|
14
|
+
* Each prints one JSON document (`write-lock.schema.json`); a refusal exits 1.
|
|
15
|
+
* The token is printed only to the caller that took the lock: `lock` never
|
|
16
|
+
* prints it, so holding the lock can't be taken over by reading who holds it.
|
|
17
|
+
*/
|
|
18
|
+
import type { CommandContext } from "../cli/registry.js";
|
|
19
|
+
import { type WriteLockHolder } from "./write-lock.js";
|
|
20
|
+
export declare const WRITE_LOCK_CONTRACT_VERSION = 1;
|
|
21
|
+
export declare const WRITE_LOCK_SCHEMA_ID = "https://intentius.io/chant/schemas/workspace/write-lock/v1/write-lock.schema.json";
|
|
22
|
+
/** Why a lock command did nothing. Closed. */
|
|
23
|
+
export declare const WRITE_LOCK_ERROR_CODES: readonly ["write-usage-invalid", "write-lock-timeout", "write-lock-not-held"];
|
|
24
|
+
export type WriteLockErrorCode = (typeof WRITE_LOCK_ERROR_CODES)[number];
|
|
25
|
+
/** A holder as the documents show it: everything but the token. */
|
|
26
|
+
export type HolderView = Omit<WriteLockHolder, "token">;
|
|
27
|
+
export type WriteLockDocument = {
|
|
28
|
+
$schema: string;
|
|
29
|
+
contract: number;
|
|
30
|
+
chant: string;
|
|
31
|
+
verb: "status" | "acquire" | "release";
|
|
32
|
+
/** The lock directory. */
|
|
33
|
+
path: string;
|
|
34
|
+
/** Who holds the lock after the command: the batch for acquire, null after release. */
|
|
35
|
+
holder: HolderView | null;
|
|
36
|
+
/** acquire only: the token each write of the batch runs with, as CHANT_WRITE_LOCK. */
|
|
37
|
+
token?: string;
|
|
38
|
+
} | {
|
|
39
|
+
$schema: string;
|
|
40
|
+
contract: number;
|
|
41
|
+
chant: string;
|
|
42
|
+
verb: "status" | "acquire" | "release";
|
|
43
|
+
error: {
|
|
44
|
+
code: WriteLockErrorCode;
|
|
45
|
+
message: string;
|
|
46
|
+
};
|
|
47
|
+
holder: HolderView | null;
|
|
48
|
+
};
|
|
49
|
+
/** Run one lock command and build its document. */
|
|
50
|
+
export declare function workspaceLock(req: {
|
|
51
|
+
cwd: string;
|
|
52
|
+
verb: string | undefined;
|
|
53
|
+
holder?: string;
|
|
54
|
+
ttl?: string;
|
|
55
|
+
token?: string;
|
|
56
|
+
agent?: string;
|
|
57
|
+
}): Promise<WriteLockDocument>;
|
|
58
|
+
/** `chant workspace lock [acquire|release]`. Prints one JSON document; exits 1 on a refusal. */
|
|
59
|
+
export declare function runWorkspaceLock(ctx: CommandContext): Promise<number>;
|
|
60
|
+
//# sourceMapping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AU,GAAG,IAAI,CAAA;CAAE,CAAC;AAUlL,mDAAmD;AACnD,wBAAsB,aAAa,CAAC,GAAG,EAAE;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAwC7K;AAUD,gGAAgG;AAChG,wBAAsB,gBAAgB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAY3E"}
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The working tree's write lock and write journal (#3173, ws-089).
|
|
3
|
+
*
|
|
4
|
+
* The repo is the database (ws-074), and one working tree is written by
|
|
5
|
+
* several principals at once: people through hud, the coding agent, the
|
|
6
|
+
* steward and builders. chant's working-tree writes (records new, amend,
|
|
7
|
+
* review and close, points ask and answer, box listing set) each read the
|
|
8
|
+
* records, build the file they write, validate it and write it. Two of them
|
|
9
|
+
* running at once could each read the same record and the second write would
|
|
10
|
+
* drop the first's change, or two `records new` could hand out the same id.
|
|
11
|
+
* So every such write holds this lock from its first read to its last write:
|
|
12
|
+
* writes to one working tree are serialised, and each one reads what the one
|
|
13
|
+
* before it wrote.
|
|
14
|
+
*
|
|
15
|
+
* The lock is a directory, `chant-write.lock`, in the working tree's git
|
|
16
|
+
* directory (`.git`, or `.git/worktrees/<name>` for a linked worktree, so two
|
|
17
|
+
* worktrees of one repository never wait on each other), made with `mkdir`,
|
|
18
|
+
* which either creates it or fails. `owner.json` inside it says who holds it.
|
|
19
|
+
* Outside git it lives in the system's temporary directory, keyed by the
|
|
20
|
+
* working directory's real path, so nothing is added to the files a person
|
|
21
|
+
* reviews. A holder that died leaves its lock behind: one whose process is
|
|
22
|
+
* gone on this host, or whose `expiresAt` has passed, is broken by the next
|
|
23
|
+
* writer. A writer waits for the lock up to `CHANT_WRITE_LOCK_WAIT_MS`
|
|
24
|
+
* (default {@link DEFAULT_WAIT_MS}) and is then refused with
|
|
25
|
+
* `write-lock-timeout`, naming the holder.
|
|
26
|
+
*
|
|
27
|
+
* A caller can hold the lock across several chant calls, for a batch of
|
|
28
|
+
* writes nobody else interleaves with (`chant workspace lock acquire`, hud#819):
|
|
29
|
+
* each call of the batch runs with `CHANT_WRITE_LOCK=<token>` in its
|
|
30
|
+
* environment, and goes ahead without waiting while the lock is held under
|
|
31
|
+
* that token. A token that no longer holds the lock (released, or broken
|
|
32
|
+
* after it expired) is refused with `write-lock-not-held`, so a batch never
|
|
33
|
+
* runs on unlocked.
|
|
34
|
+
*
|
|
35
|
+
* The journal, `chant-writes.json` beside the lock, notes the last chant
|
|
36
|
+
* write of each record file: the verb, who it named and when, keyed by the
|
|
37
|
+
* file's SHA-256 after the write. The read contract reports it as a record's
|
|
38
|
+
* `lastWrite` while the file still has those bytes, and a conflict refusal
|
|
39
|
+
* names it. It is a cache in the git directory (ws-074's exceptions), never
|
|
40
|
+
* a fact: lost, every record's `lastWrite` is null, and nothing else changes.
|
|
41
|
+
*/
|
|
42
|
+
/** The environment variable that names a lock token a batch holds across chant calls. */
|
|
43
|
+
export declare const WRITE_LOCK_ENV = "CHANT_WRITE_LOCK";
|
|
44
|
+
/** The environment variable that sets how long a write waits for the lock, in milliseconds. */
|
|
45
|
+
export declare const WRITE_LOCK_WAIT_ENV = "CHANT_WRITE_LOCK_WAIT_MS";
|
|
46
|
+
/** How long a write waits for the lock by default. */
|
|
47
|
+
export declare const DEFAULT_WAIT_MS = 15000;
|
|
48
|
+
/** How long one command's lock is good for, should its process be unable to say it died. */
|
|
49
|
+
export declare const COMMAND_TTL_MS: number;
|
|
50
|
+
/** The longest a batch may hold the lock with `lock acquire --ttl`. */
|
|
51
|
+
export declare const MAX_BATCH_TTL_MS: number;
|
|
52
|
+
/** The default `--ttl` of `lock acquire`. */
|
|
53
|
+
export declare const DEFAULT_BATCH_TTL_MS = 60000;
|
|
54
|
+
/** The lock directory's name in the git directory. */
|
|
55
|
+
export declare const WRITE_LOCK_NAME = "chant-write.lock";
|
|
56
|
+
/** The journal's name in the git directory. */
|
|
57
|
+
export declare const WRITE_JOURNAL_NAME = "chant-writes.json";
|
|
58
|
+
export declare const WRITE_LOCK_CODES: readonly ["write-lock-timeout", "write-lock-not-held"];
|
|
59
|
+
export type WriteLockCode = (typeof WRITE_LOCK_CODES)[number];
|
|
60
|
+
/** Who holds the lock, as `owner.json` holds it. */
|
|
61
|
+
export interface WriteLockHolder {
|
|
62
|
+
token: string;
|
|
63
|
+
/** The process holding it, or null for a batch held across calls by `lock acquire`. */
|
|
64
|
+
pid: number | null;
|
|
65
|
+
host: string;
|
|
66
|
+
/** What holds it: a write verb, such as `records amend`, or `batch`. */
|
|
67
|
+
verb: string;
|
|
68
|
+
by: string | null;
|
|
69
|
+
agent: string | null;
|
|
70
|
+
acquiredAt: string;
|
|
71
|
+
expiresAt: string;
|
|
72
|
+
}
|
|
73
|
+
/** Who is writing: the verb, and the principal and agent session the write names. */
|
|
74
|
+
export interface WriteLockWho {
|
|
75
|
+
verb: string;
|
|
76
|
+
by?: string | null;
|
|
77
|
+
agent?: string | null;
|
|
78
|
+
}
|
|
79
|
+
export declare class WriteLockError extends Error {
|
|
80
|
+
readonly code: WriteLockCode;
|
|
81
|
+
readonly holder: WriteLockHolder | null;
|
|
82
|
+
constructor(code: WriteLockCode, message: string, holder: WriteLockHolder | null);
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* The git directory of the working tree `start` is in: `.git`, or the
|
|
86
|
+
* directory a linked worktree's `.git` file names. Null outside git.
|
|
87
|
+
*/
|
|
88
|
+
export declare function gitDirOf(start: string): string | null;
|
|
89
|
+
/** The lock directory for the working tree `start` is in. */
|
|
90
|
+
export declare function writeLockPath(start: string): string;
|
|
91
|
+
/** The journal for the working tree `start` is in, or null outside git. */
|
|
92
|
+
export declare function writeJournalPath(start: string): string | null;
|
|
93
|
+
/** Remove the lock at `lock` when `token` holds it. Returns whether it did. */
|
|
94
|
+
export declare function releaseLock(lock: string, token: string): boolean;
|
|
95
|
+
/**
|
|
96
|
+
* Run `fn` holding the working tree's write lock, taken for this one write
|
|
97
|
+
* and released when `fn` settles. With `dryRun`, without it, since a dry run
|
|
98
|
+
* writes nothing. Throws a {@link WriteLockError} when the lock can't be had.
|
|
99
|
+
*/
|
|
100
|
+
export declare function withWriteLock<T>(start: string, who: WriteLockWho, dryRun: boolean | undefined, fn: () => Promise<T>): Promise<T>;
|
|
101
|
+
/**
|
|
102
|
+
* {@link withWriteLock} for a write that is synchronous throughout: it
|
|
103
|
+
* blocks while it waits. When another write in this same process holds the
|
|
104
|
+
* lock, blocking would keep that write from ever finishing, so it is refused
|
|
105
|
+
* with write-lock-timeout at once.
|
|
106
|
+
*/
|
|
107
|
+
export declare function withWriteLockSync<T>(start: string, who: WriteLockWho, dryRun: boolean | undefined, fn: () => T): T;
|
|
108
|
+
/**
|
|
109
|
+
* Take the lock for a batch held across chant calls (`lock acquire`): no
|
|
110
|
+
* process holds it, so it lasts until it is released or `ttlMs` passes.
|
|
111
|
+
* Waits like a write does.
|
|
112
|
+
*/
|
|
113
|
+
export declare function acquireBatchLock(start: string, who: WriteLockWho, ttlMs: number): Promise<{
|
|
114
|
+
path: string;
|
|
115
|
+
holder: WriteLockHolder;
|
|
116
|
+
}>;
|
|
117
|
+
/** Who holds the working tree's write lock now, or null when nobody does (a stale lock counts as nobody). */
|
|
118
|
+
export declare function writeLockHolder(start: string): {
|
|
119
|
+
path: string;
|
|
120
|
+
holder: WriteLockHolder | null;
|
|
121
|
+
};
|
|
122
|
+
/** Write `text` to `file` through a sibling temporary file, so a reader never sees half of it. */
|
|
123
|
+
export declare function writeFileAtomic(file: string, text: string): void;
|
|
124
|
+
/** The last chant write of a record file, as the read contract reports it. */
|
|
125
|
+
export interface LastWrite {
|
|
126
|
+
/** The write command, such as `records amend` or `points answer`. */
|
|
127
|
+
verb: string;
|
|
128
|
+
/** The principal the write named (--by, or the channel's author), or null when it named none. */
|
|
129
|
+
by: string | null;
|
|
130
|
+
/** The agent session it was made in (CHANT_AGENT), or null. */
|
|
131
|
+
agent: string | null;
|
|
132
|
+
/** When, as an ISO 8601 time. */
|
|
133
|
+
at: string;
|
|
134
|
+
}
|
|
135
|
+
export declare function sha256Text(text: string): string;
|
|
136
|
+
/**
|
|
137
|
+
* Note in the journal that `who` wrote each file, with the text it now
|
|
138
|
+
* holds. Called holding the lock, after the write. Best effort: a journal
|
|
139
|
+
* that can't be written never fails the write it notes.
|
|
140
|
+
*/
|
|
141
|
+
export declare function noteWrites(start: string, writes: readonly {
|
|
142
|
+
path: string;
|
|
143
|
+
text: string;
|
|
144
|
+
}[], who: WriteLockWho): void;
|
|
145
|
+
/**
|
|
146
|
+
* A reader of the journal for the working tree `start` is in: the last chant
|
|
147
|
+
* write of a record file, while the file still holds the text that write
|
|
148
|
+
* left, and null otherwise (written by something else since, or never by
|
|
149
|
+
* chant here).
|
|
150
|
+
*/
|
|
151
|
+
export declare function lastWriteReader(start: string): (path: string, text: string | null) => LastWrite | null;
|
|
152
|
+
//# sourceMappingURL=write-lock.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"write-lock.d.ts","sourceRoot":"","sources":["../../src/workspace/write-lock.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAQH,yFAAyF;AACzF,eAAO,MAAM,cAAc,qBAAqB,CAAC;AACjD,+FAA+F;AAC/F,eAAO,MAAM,mBAAmB,6BAA6B,CAAC;AAC9D,sDAAsD;AACtD,eAAO,MAAM,eAAe,QAAS,CAAC;AACtC,4FAA4F;AAC5F,eAAO,MAAM,cAAc,QAAa,CAAC;AACzC,uEAAuE;AACvE,eAAO,MAAM,gBAAg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AAM,GAAG,IAAI,CAAC;IACrB,iCAAiC;IACjC,EAAE,EAAE,MAAM,CAAC;CACZ;AAWD,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE/C;AAYD;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,EAAE,EAAE,GAAG,EAAE,YAAY,GAAG,IAAI,CAgBpH;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,KAAK,SAAS,GAAG,IAAI,CAQtG"}
|
|
@@ -129,8 +129,12 @@ export declare function judgeRecord(declaration: Declaration | null, writer: Wri
|
|
|
129
129
|
*/
|
|
130
130
|
export declare function protectedEntry(entries: readonly ProtectedPath[], path: string): ProtectedPath | null;
|
|
131
131
|
/**
|
|
132
|
-
* Whether JSON text `before` and `after` differ only in
|
|
133
|
-
*
|
|
132
|
+
* Whether JSON text `before` and `after` differ only in what `except`
|
|
133
|
+
* allows: a top-level key, or, for an entry starting with `/`, the values a
|
|
134
|
+
* JSON Pointer matches, where a `*` token matches every key or array index
|
|
135
|
+
* at its level (`/members/*\/box/listing`, #3308). Comments and trailing
|
|
136
|
+
* commas are read, so a `.jsonc` declaration is judged too. False when either
|
|
137
|
+
* is missing or isn't a JSON object.
|
|
134
138
|
*/
|
|
135
139
|
export declare function onlyKeysChanged(before: string | null, after: string | null, except: readonly string[]): boolean;
|
|
136
140
|
/** A file's text before and after a write, read only when a protected entry with `except` needs it. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"write-scope.d.ts","sourceRoot":"","sources":["../../src/workspace/write-scope.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA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E,WAAW,CAAC;IACzB,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,sGAAsG;IACtG,OAAO,CAAC,EAAE,aAAa,CAAC;CACzB,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,CAuE9B"}
|
package/dist/yaml.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* YAML emitter and parser.
|
|
3
3
|
*
|
|
4
4
|
* The emitter writes the block-style YAML chant's serializers produce. The
|
|
5
|
-
* parser is js-yaml with chant's schema (#3006): YAML 1.2 core types,
|
|
5
|
+
* parser is a vendored js-yaml loader with chant's schema (#3006): YAML 1.2 core types,
|
|
6
6
|
* merge keys, `yes`/`no` booleans, and local tags such as `!reference` read
|
|
7
7
|
* as strings. `splitYAMLDocuments` splits a multi-document stream. Input the
|
|
8
8
|
* parser cannot read throws a `YAMLParseError` naming the line.
|
package/dist/yaml.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"yaml.d.ts","sourceRoot":"","sources":["../src/yaml.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;
|
|
1
|
+
{"version":3,"file":"yaml.d.ts","sourceRoot":"","sources":["../src/yaml.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAqCH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAsH/D;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,SAAI,GAAG,MAAM,CAG7E;AAMD;;;GAGG;AACH,qBAAa,cAAe,SAAQ,KAAK;IACvC,gEAAgE;IAChE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAEtB,YAAY,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAIxC;CACF;AAmID;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAQlE;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAO1D;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,CAc5D;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAwBlD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intentius/chant",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.104.1",
|
|
4
4
|
"description": "Declarative infrastructure-as-code toolkit — TypeScript on Node.js",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://intentius.io/chant",
|
|
@@ -50,6 +50,11 @@
|
|
|
50
50
|
"default": "./src/cli/index.ts"
|
|
51
51
|
},
|
|
52
52
|
"./workspace/*.schema.json": "./src/workspace/*.schema.json",
|
|
53
|
+
"./workspace/factory-rules": {
|
|
54
|
+
"development": "./src/workspace/factory-rules.ts",
|
|
55
|
+
"types": "./dist/workspace/factory-rules.d.ts",
|
|
56
|
+
"default": "./src/workspace/factory-rules.ts"
|
|
57
|
+
},
|
|
53
58
|
"./workspace/conformance": {
|
|
54
59
|
"development": "./src/workspace/conformance/index.ts",
|
|
55
60
|
"types": "./dist/workspace/conformance/index.d.ts",
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
{
|
|
2
|
+
"env": "dev",
|
|
3
|
+
"entries": [
|
|
4
|
+
{
|
|
5
|
+
"name": "alerts",
|
|
6
|
+
"type": "AWS::SNS::Topic",
|
|
7
|
+
"lexicon": "aws",
|
|
8
|
+
"physicalId": "arn:aws:sns:us-east-1:000000000000:cs-alerts",
|
|
9
|
+
"action": "noop",
|
|
10
|
+
"evidence": {
|
|
11
|
+
"declared": false,
|
|
12
|
+
"inSnapshot": true,
|
|
13
|
+
"live": false,
|
|
14
|
+
"observed": true
|
|
15
|
+
},
|
|
16
|
+
"ownership": "unknown"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"name": "dlq",
|
|
20
|
+
"lexicon": "aws",
|
|
21
|
+
"action": "create",
|
|
22
|
+
"evidence": {
|
|
23
|
+
"declared": true,
|
|
24
|
+
"inSnapshot": false,
|
|
25
|
+
"live": false,
|
|
26
|
+
"observed": true
|
|
27
|
+
},
|
|
28
|
+
"ownership": "unknown"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"name": "events",
|
|
32
|
+
"type": "AWS::SQS::Queue",
|
|
33
|
+
"lexicon": "aws",
|
|
34
|
+
"physicalId": "http://localhost:4566/000000000000/cs-events",
|
|
35
|
+
"action": "noop",
|
|
36
|
+
"evidence": {
|
|
37
|
+
"declared": true,
|
|
38
|
+
"inSnapshot": true,
|
|
39
|
+
"live": true,
|
|
40
|
+
"observed": true
|
|
41
|
+
},
|
|
42
|
+
"ownership": "foreign"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"name": "jobs",
|
|
46
|
+
"type": "AWS::SQS::Queue",
|
|
47
|
+
"lexicon": "aws",
|
|
48
|
+
"physicalId": "http://localhost:4566/000000000000/cs-jobs",
|
|
49
|
+
"action": "noop",
|
|
50
|
+
"evidence": {
|
|
51
|
+
"declared": true,
|
|
52
|
+
"inSnapshot": true,
|
|
53
|
+
"live": true,
|
|
54
|
+
"observed": true
|
|
55
|
+
},
|
|
56
|
+
"ownership": "foreign"
|
|
57
|
+
}
|
|
58
|
+
]
|
|
59
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Queue, Topic } from "@intentius/chant-lexicon-aws";
|
|
2
|
+
export const jobs = new Queue({ QueueName: "cs-jobs", VisibilityTimeout: 30 });
|
|
3
|
+
export const events = new Queue({ QueueName: "cs-events", VisibilityTimeout: 30 });
|
|
4
|
+
export const alerts = new Topic({ TopicName: "cs-alerts" });
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Queue } from "@intentius/chant-lexicon-aws";
|
|
2
|
+
export const jobs = new Queue({ QueueName: "cs-jobs", VisibilityTimeout: 60 });
|
|
3
|
+
export const events = new Queue({ QueueName: "cs-events-v2", VisibilityTimeout: 30 });
|
|
4
|
+
export const dlq = new Queue({ QueueName: "cs-dlq" });
|