@intentius/chant 0.102.0 → 0.104.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/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/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/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/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
|
@@ -369,6 +369,9 @@
|
|
|
369
369
|
"$ref": "#/$defs/outputName"
|
|
370
370
|
}
|
|
371
371
|
},
|
|
372
|
+
"fields": {
|
|
373
|
+
"$ref": "#/$defs/memberFields"
|
|
374
|
+
},
|
|
372
375
|
"links": {
|
|
373
376
|
"type": "array",
|
|
374
377
|
"description": "Member links (#2524 D6, #2539): the outputs of other members this member reads. A link is stated once, here on the consumer, and matched exactly against the producer's outputs. chant workspace check resolves it in source.",
|
|
@@ -438,6 +441,23 @@
|
|
|
438
441
|
]
|
|
439
442
|
}
|
|
440
443
|
},
|
|
444
|
+
"memberFields": {
|
|
445
|
+
"type": "object",
|
|
446
|
+
"description": "Values for the fields the member's kind declares (#3151), such as an app member's scripts, env and health. Each is a string, integer or boolean, or an object of those for a field the kind declares as an object. chant workspace check fails when the kind declares no such field or a value is of the wrong type (WSP005), and chant workspace status --json prints every field the kind declares with its defaults filled in. Added in schema 1 by chant 0.103.0, so a declaration that uses it sets minReader to 0.103.0 or newer.",
|
|
447
|
+
"propertyNames": { "pattern": "^[a-z][A-Za-z0-9]{0,39}$" },
|
|
448
|
+
"additionalProperties": {
|
|
449
|
+
"oneOf": [
|
|
450
|
+
{ "type": "string" },
|
|
451
|
+
{ "type": "integer" },
|
|
452
|
+
{ "type": "boolean" },
|
|
453
|
+
{
|
|
454
|
+
"type": "object",
|
|
455
|
+
"propertyNames": { "pattern": "^[a-z][A-Za-z0-9]{0,39}$" },
|
|
456
|
+
"additionalProperties": { "oneOf": [{ "type": "string" }, { "type": "integer" }, { "type": "boolean" }] }
|
|
457
|
+
}
|
|
458
|
+
]
|
|
459
|
+
}
|
|
460
|
+
},
|
|
441
461
|
"group": {
|
|
442
462
|
"type": "object",
|
|
443
463
|
"description": "An example group (ws-051): every directory the glob matches that holds a chant project is built and linted. A group has no ledger, releases or links, and its matches are never members. A match may sit inside a member's directory; that member leaves it to the group.",
|
|
@@ -484,7 +504,7 @@
|
|
|
484
504
|
},
|
|
485
505
|
"box": {
|
|
486
506
|
"type": "object",
|
|
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),
|
|
507
|
+
"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), its listing what the box shows of itself (#3146), and its replicate where the box's work in progress is pushed so a lost box loses none of it (#3172, ws-085). Added in schema 1 by chant 0.91.0, so a declaration that uses it sets minReader to 0.91.0 or newer.",
|
|
488
508
|
"properties": {
|
|
489
509
|
"intent": {
|
|
490
510
|
"type": "string",
|
|
@@ -504,6 +524,18 @@
|
|
|
504
524
|
"listing": {
|
|
505
525
|
"$ref": "#/$defs/boxListing"
|
|
506
526
|
},
|
|
527
|
+
"publisher": {
|
|
528
|
+
"type": "string",
|
|
529
|
+
"minLength": 1,
|
|
530
|
+
"pattern": "\\S",
|
|
531
|
+
"description": "The command that publishes the box's work (#3165, ws-088): it applies a built work item to the box's checkout and, when factory.publish names a target, pushes it and opens the pull request, and it sends the records a person kept uncommitted. It is run from the workspace root by chant workspace box publish, split into words as a shell splits plain words (quotes group, a backslash escapes) but never given to a shell, with a JSON request on stdin; box-publish.schema.json says what it reads and prints. An orchestrator such as studio supplies it. chant workspace status --json prints it under the member's box, so a surface offers a publish only when a box names one. Added in schema 1 by chant 0.103.0, so a declaration that uses it sets minReader to 0.103.0 or newer."
|
|
532
|
+
},
|
|
533
|
+
"replicate": {
|
|
534
|
+
"$ref": "#/$defs/boxReplicate"
|
|
535
|
+
},
|
|
536
|
+
"ship": {
|
|
537
|
+
"$ref": "#/$defs/boxShip"
|
|
538
|
+
},
|
|
507
539
|
"capabilities": {
|
|
508
540
|
"type": "array",
|
|
509
541
|
"description": "Each capability the box reaches outside itself, named once. None when omitted.",
|
|
@@ -634,7 +666,41 @@
|
|
|
634
666
|
},
|
|
635
667
|
"builders": {
|
|
636
668
|
"$ref": "#/$defs/name",
|
|
637
|
-
"description": "The member that declares the builder agents, such as the one whose agents/ holds them.
|
|
669
|
+
"description": "The member that declares the builder agents, such as the one whose agents/ holds them. tiers says which of them builds at which tier (#3152)."
|
|
670
|
+
},
|
|
671
|
+
"tiers": {
|
|
672
|
+
"type": "array",
|
|
673
|
+
"minItems": 1,
|
|
674
|
+
"description": "Which builder agent builds at which tier (#3152, ws-094), replacing studio's studio/role and studio/tier Agent metadata. Each entry names a tier, in the vocabulary of the work kind's work.tier.tiers (#3147), and an agent the builders member declares, by its name. An entry with kinds builds only members of those kinds, so an infra builder and an app builder can share a tier; an entry without kinds builds the tier for every other kind. A tier has at most one entry without kinds and at most one per kind, tiers needs builders, and a session names a declared agent session, or the declaration can't be read (declaration-invalid). chant workspace status --json prints builderFor, the agent for each built member and tier. Added in schema 1 by chant 0.103.0, so a declaration that uses it sets minReader to 0.103.0 or newer.",
|
|
675
|
+
"items": {
|
|
676
|
+
"type": "object",
|
|
677
|
+
"required": ["tier", "agent"],
|
|
678
|
+
"properties": {
|
|
679
|
+
"tier": {
|
|
680
|
+
"$ref": "#/$defs/kindName",
|
|
681
|
+
"description": "The tier, such as small, medium or large: a word of the work kind's work.tier.tiers, which a work item's tier or the slice-tier decision point answers."
|
|
682
|
+
},
|
|
683
|
+
"agent": {
|
|
684
|
+
"type": "string",
|
|
685
|
+
"minLength": 1,
|
|
686
|
+
"pattern": "^[^\\u0000-\\u001f]+$",
|
|
687
|
+
"description": "The builder agent's name, as the builders member declares it (such as an Agent of the fountain lexicon in its agents/)."
|
|
688
|
+
},
|
|
689
|
+
"kinds": {
|
|
690
|
+
"type": "array",
|
|
691
|
+
"minItems": 1,
|
|
692
|
+
"uniqueItems": true,
|
|
693
|
+
"items": { "$ref": "#/$defs/kindName" },
|
|
694
|
+
"description": "The member kinds this agent builds at the tier, such as app or terraform. Without it, every kind no other entry of the tier names."
|
|
695
|
+
},
|
|
696
|
+
"session": {
|
|
697
|
+
"$ref": "#/$defs/name",
|
|
698
|
+
"description": "The declared agent session (agents) the builder writes as, so its write scope is that session's. Optional: without it the orchestrator chooses."
|
|
699
|
+
}
|
|
700
|
+
},
|
|
701
|
+
"patternProperties": { "^x-": true },
|
|
702
|
+
"additionalProperties": false
|
|
703
|
+
}
|
|
638
704
|
},
|
|
639
705
|
"publish": {
|
|
640
706
|
"type": "object",
|
|
@@ -712,6 +778,89 @@
|
|
|
712
778
|
},
|
|
713
779
|
"additionalProperties": false
|
|
714
780
|
},
|
|
781
|
+
"boxReplicate": {
|
|
782
|
+
"type": "object",
|
|
783
|
+
"description": "Where the box's work in progress is replicated, so a box that is lost, reclaimed or corrupted before anyone commits loses nothing (#3172, ws-085). Work in progress is the work branches (chant/work/...), the kept attempts (refs/chant/kept/..., #3147), the snapshots chant workspace wip save takes of each branch's working tree, uncommitted records included (refs/chant/wip/<branch>), and the ledger branch, chant/lifecycle. chant pushes them to remote under their own names and never forces a push. Opt-in: a box block without it replicates nothing. At most one box block in a declaration declares one, or the declaration can't be read (declaration-invalid). chant workspace status --json prints it under the member's box, with every default filled in, and reports in replication how far each ref is from the remote. Added in schema 1 by chant 0.103.0, so a declaration that uses it sets minReader to 0.103.0 or newer.",
|
|
784
|
+
"properties": {
|
|
785
|
+
"remote": {
|
|
786
|
+
"type": "string",
|
|
787
|
+
"pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$",
|
|
788
|
+
"description": "The git remote to push to, by name: the repository's own remote, such as origin, or a mirror the host adds to the box's checkout with its credential, since a box holds none (#2726). origin when omitted."
|
|
789
|
+
},
|
|
790
|
+
"refs": {
|
|
791
|
+
"type": "array",
|
|
792
|
+
"minItems": 1,
|
|
793
|
+
"uniqueItems": true,
|
|
794
|
+
"description": "What is replicated: work (the branches under chant/work/), kept (the kept attempts under refs/chant/kept/), wip (the snapshots under refs/chant/wip/) and ledger (the chant/lifecycle branch). All four when omitted.",
|
|
795
|
+
"items": {
|
|
796
|
+
"enum": [
|
|
797
|
+
"work",
|
|
798
|
+
"kept",
|
|
799
|
+
"wip",
|
|
800
|
+
"ledger"
|
|
801
|
+
]
|
|
802
|
+
}
|
|
803
|
+
},
|
|
804
|
+
"on": {
|
|
805
|
+
"type": "array",
|
|
806
|
+
"uniqueItems": true,
|
|
807
|
+
"description": "When chant pushes on its own: save, after each chant workspace wip save, and release, after a work lease is released (chant workspace work release, or a run of an Op under a work lease ending, which is when a kept attempt is written). Both when omitted; an empty list leaves every push to chant workspace wip push. A record write never pushes, because chant's record writes never run git (ws-074).",
|
|
808
|
+
"items": {
|
|
809
|
+
"enum": [
|
|
810
|
+
"save",
|
|
811
|
+
"release"
|
|
812
|
+
]
|
|
813
|
+
}
|
|
814
|
+
},
|
|
815
|
+
"every": {
|
|
816
|
+
"type": "string",
|
|
817
|
+
"pattern": "^[1-9][0-9]*(s|m|h)$",
|
|
818
|
+
"description": "How often the host runs chant workspace wip push on a schedule of its own, such as 10m, beside the pushes on save and release. chant runs no scheduler; it only states the interval. None when omitted."
|
|
819
|
+
}
|
|
820
|
+
},
|
|
821
|
+
"patternProperties": {
|
|
822
|
+
"^x-": true
|
|
823
|
+
},
|
|
824
|
+
"additionalProperties": false
|
|
825
|
+
},
|
|
826
|
+
"boxShip": {
|
|
827
|
+
"type": "object",
|
|
828
|
+
"description": "How the box ships its staged work to its own site (ws-100): the people working on a box see the working tree at once, everyone else sees the last release, and a person ships. op is the Op in the box member that does it: its own steps commit the staged tree as one commit by the person shipping (named to it in CHANT_SHIP_BY) with a Chant-Record trailer for each work item it lands, then release that commit to the box's site, stopping at gate, and record the release in env's release ledger. chant runs none of it; a surface runs chant run <op> in the member's directory and approves the gate as for any Op. chant workspace status --json prints it under the member's box with the commit the site serves (the latest release in env's ledger) and what is waiting to ship (the files changed between that commit and the working tree, bookkeeping left out). Added in schema 1 by chant 0.104.0, so a declaration that uses it sets minReader to 0.104.0 or newer.",
|
|
829
|
+
"required": [
|
|
830
|
+
"op"
|
|
831
|
+
],
|
|
832
|
+
"properties": {
|
|
833
|
+
"op": {
|
|
834
|
+
"type": "string",
|
|
835
|
+
"pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$",
|
|
836
|
+
"description": "The name of the Op in the box member that ships, as chant run takes it."
|
|
837
|
+
},
|
|
838
|
+
"gate": {
|
|
839
|
+
"type": "string",
|
|
840
|
+
"pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$",
|
|
841
|
+
"description": "The gate the Op stops at for a person's approval. ship when omitted."
|
|
842
|
+
},
|
|
843
|
+
"env": {
|
|
844
|
+
"type": "string",
|
|
845
|
+
"pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$",
|
|
846
|
+
"description": "The environment whose release ledger, under the box member, the Op records each release in. box when omitted."
|
|
847
|
+
},
|
|
848
|
+
"bookkeeping": {
|
|
849
|
+
"type": "array",
|
|
850
|
+
"uniqueItems": true,
|
|
851
|
+
"description": "Path prefixes from the workspace root whose changes are bookkeeping, such as the record directories, and never count as waiting to ship. None when omitted.",
|
|
852
|
+
"items": {
|
|
853
|
+
"type": "string",
|
|
854
|
+
"minLength": 1,
|
|
855
|
+
"pattern": "^(?!/)(?!.*(^|/)\\.\\.(/|$))[^\\n]+$"
|
|
856
|
+
}
|
|
857
|
+
}
|
|
858
|
+
},
|
|
859
|
+
"patternProperties": {
|
|
860
|
+
"^x-": true
|
|
861
|
+
},
|
|
862
|
+
"additionalProperties": false
|
|
863
|
+
},
|
|
715
864
|
"boxService": {
|
|
716
865
|
"type": "object",
|
|
717
866
|
"description": "A service a box runs under its supervisor (#2880).",
|
|
@@ -1103,7 +1252,7 @@
|
|
|
1103
1252
|
}
|
|
1104
1253
|
},
|
|
1105
1254
|
"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.",
|
|
1255
|
+
"description": "A protected path: a glob from the workspace root, or { path, except } for a JSON file whose listed top-level keys, or the values JSON Pointers name, may still change.",
|
|
1107
1256
|
"oneOf": [
|
|
1108
1257
|
{
|
|
1109
1258
|
"$ref": "#/$defs/fileGlob"
|
|
@@ -1121,7 +1270,7 @@
|
|
|
1121
1270
|
"type": "array",
|
|
1122
1271
|
"minItems": 1,
|
|
1123
1272
|
"uniqueItems": true,
|
|
1124
|
-
"description": "
|
|
1273
|
+
"description": "What a write may change in the JSON file: a top-level key, or, for an entry starting with /, the values a JSON Pointer matches, where a * token matches every key or array index at its level, such as /members/*/box/listing for every box's listing (#3308). 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
1274
|
"items": {
|
|
1126
1275
|
"type": "string",
|
|
1127
1276
|
"minLength": 1
|
|
@@ -15,8 +15,13 @@
|
|
|
15
15
|
* (`../cli/handlers/run.ts`), when neither the config nor the ledger names
|
|
16
16
|
* it.
|
|
17
17
|
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
18
|
+
* A component may also declare environments of its own (#3153, ws-095),
|
|
19
|
+
* each with the site a release goes to there: the runtime that hosts it, its
|
|
20
|
+
* URL, a custom domain and the git remote its lifecycle records are pushed
|
|
21
|
+
* to. Each declared environment the member already lists carries that site,
|
|
22
|
+
* and one it doesn't is added with source `component` when `chant run --env`
|
|
23
|
+
* would take it, or left out with `environments-component-undeclared` when
|
|
24
|
+
* the config's environments don't cover it.
|
|
20
25
|
*
|
|
21
26
|
* `chant run --env` refuses a name the config's `environments` doesn't cover
|
|
22
27
|
* whenever it declares any (`unknownEnvError` in `../env.ts`), so a ledger
|
|
@@ -29,11 +34,13 @@
|
|
|
29
34
|
* `--at` exported. The ledger is always the local `chant/lifecycle` branch,
|
|
30
35
|
* as for `workspace status`, and is never fetched.
|
|
31
36
|
*/
|
|
37
|
+
import { type EnvironmentDeclaration } from "../config.js";
|
|
38
|
+
import type { ComponentEnvironmentDeclaration } from "../components/component.js";
|
|
32
39
|
import { type MemberRuntimes } from "./runtimes.js";
|
|
33
40
|
/** The environment `chant run --components` deploys to without `--env`. */
|
|
34
41
|
export declare const LOCAL_ENVIRONMENT = "local";
|
|
35
42
|
/** Why a member's environments are only `local`, or leave out one the ledger has. Closed: part of the read contract. */
|
|
36
|
-
export declare const ENVIRONMENT_REASON_CODES: readonly ["runtimes-config-unreadable", "environments-none-declared", "environments-ledger-undeclared", "environments-ledger-unreadable"];
|
|
43
|
+
export declare const ENVIRONMENT_REASON_CODES: readonly ["runtimes-config-unreadable", "environments-none-declared", "environments-ledger-undeclared", "environments-ledger-unreadable", "environments-component-undeclared"];
|
|
37
44
|
export type EnvironmentReasonCode = (typeof ENVIRONMENT_REASON_CODES)[number];
|
|
38
45
|
export interface EnvironmentReason {
|
|
39
46
|
code: EnvironmentReasonCode;
|
|
@@ -45,11 +52,20 @@ export interface ComponentEnvironment {
|
|
|
45
52
|
name: string;
|
|
46
53
|
/** True for the environment `chant run --components` deploys to without `--env`. */
|
|
47
54
|
default: boolean;
|
|
48
|
-
/** Where the name came from; the first of config, ledger and
|
|
49
|
-
source: "config" | "ledger" | "builtin";
|
|
50
|
-
/**
|
|
55
|
+
/** Where the name came from; the first of config, ledger, builtin and the component's own environments that names it. */
|
|
56
|
+
source: "config" | "ledger" | "builtin" | "component";
|
|
57
|
+
/** Where a release of the component goes in this environment, as the component declares it (#3153), or null when it declares nothing for it. */
|
|
58
|
+
site: ComponentSite | null;
|
|
59
|
+
/** The command that deploys the component there, on the site's runtime when the member hosts it and else the default runtime, run in the member's directory. */
|
|
51
60
|
command: string;
|
|
52
61
|
}
|
|
62
|
+
/** A component's declared site in one environment (#3153): every field present, null when not declared. */
|
|
63
|
+
export interface ComponentSite {
|
|
64
|
+
runtime: string | null;
|
|
65
|
+
url: string | null;
|
|
66
|
+
domain: string | null;
|
|
67
|
+
lifecycle: string | null;
|
|
68
|
+
}
|
|
53
69
|
/** The environments a member's ledger has, or why they couldn't be listed. */
|
|
54
70
|
export interface LedgerEnvironments {
|
|
55
71
|
envs: string[];
|
|
@@ -62,9 +78,11 @@ export type LedgerEnvironmentReader = (member: {
|
|
|
62
78
|
}, cwd: string) => LedgerEnvironments;
|
|
63
79
|
/** What one member's config and ledger say about environments. */
|
|
64
80
|
export interface MemberEnvironments {
|
|
65
|
-
/** Each environment in list order, without the per-component command. */
|
|
66
|
-
environments: Omit<ComponentEnvironment, "command">[];
|
|
81
|
+
/** Each environment in list order, without the per-component site and command. */
|
|
82
|
+
environments: Omit<ComponentEnvironment, "command" | "site">[];
|
|
67
83
|
reasons: EnvironmentReason[];
|
|
84
|
+
/** The config's environments, for whether `chant run --env` takes a name: null when the config couldn't be read, `[]` when it declares none. */
|
|
85
|
+
declared?: EnvironmentDeclaration[] | null;
|
|
68
86
|
}
|
|
69
87
|
/**
|
|
70
88
|
* The environments with a release ledger for `member` on the local
|
|
@@ -75,6 +93,14 @@ export interface MemberEnvironments {
|
|
|
75
93
|
export declare const readLedgerEnvironments: LedgerEnvironmentReader;
|
|
76
94
|
/** Join a member's config and ledger into its environment list, `local` first, then config order, then the ledger's. */
|
|
77
95
|
export declare function memberEnvironments(runtimes: MemberRuntimes | undefined, ledger: LedgerEnvironments | undefined): MemberEnvironments;
|
|
78
|
-
/**
|
|
79
|
-
|
|
96
|
+
/**
|
|
97
|
+
* The environments one component may deploy to, each with its command line.
|
|
98
|
+
* `declared` is what the component's contract says (#3153): an environment
|
|
99
|
+
* the member lists takes its site, and one it doesn't is added after the
|
|
100
|
+
* member's when `chant run --env` takes it. `reasons` collects the declared
|
|
101
|
+
* environments left out because the config's environments don't cover them.
|
|
102
|
+
* `hosts` are the runtimes the member configures; a site's runtime is used
|
|
103
|
+
* for the command only when it is one of them.
|
|
104
|
+
*/
|
|
105
|
+
export declare function componentEnvironments(component: string, member: MemberEnvironments | undefined, runtime?: string, declared?: readonly ComponentEnvironmentDeclaration[], hosts?: readonly string[], reasons?: EnvironmentReason[]): ComponentEnvironment[];
|
|
80
106
|
//# sourceMappingURL=environments.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"environments.d.ts","sourceRoot":"","sources":["../../src/workspace/environments.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"environments.d.ts","sourceRoot":"","sources":["../../src/workspace/environments.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAGH,OAAO,EAAqE,KAAK,sBAAsB,EAAE,MAAM,WAAW,CAAC;AAC3H,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,yBAAyB,CAAC;AAE/E,OAAO,EAAiB,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC;AAGhE,2EAA2E;AAC3E,eAAO,MAAM,iBAAiB,UAAU,CAAC;AAEzC,wHAAwH;AACxH,eAAO,MAAM,wBAAwB,gLAWK,CAAC;AAC3C,MAAM,MAAM,qBAAqB,GAAG,CAAC,OAAO,wBAAwB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE9E,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,qBAAqB,CAAC;IAC5B,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,iDAAiD;AACjD,MAAM,WAAW,oBAAoB;IACnC,0BAA0B;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,oFAAoF;IACpF,OAAO,EAAE,OAAO,CAAC;IACjB,yHAAyH;IACzH,MAAM,EAAE,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,WAAW,CAAC;IACtD,gJAAgJ;IAChJ,IAAI,EAAE,aAAa,GAAG,IAAI,CAAC;IAC3B,gKAAgK;IAChK,OAAO,EAAE,MAAM,CAAC;C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E,CAqBxB"}
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The factory's rules (#3406, ws-087): what every orchestrator of a factory
|
|
3
|
+
* must agree on, as pure functions over what the read contract prints. The
|
|
4
|
+
* reference Op (`../op/factory.ts`) runs them; an orchestrator supplies only
|
|
5
|
+
* execution (the builder, the context, the check).
|
|
6
|
+
*
|
|
7
|
+
* - Readiness ({@link pickable}): on top of the work kind's `ready`, the box's
|
|
8
|
+
* intent is decided, a contract the item builds is approved and in force,
|
|
9
|
+
* the item is under its attempt limit, it is not done and waiting to be
|
|
10
|
+
* applied on its branch, its slice-tier and understand questions are not
|
|
11
|
+
* open, an understand answer of redraft or ask holds it, and a failed last
|
|
12
|
+
* build holds it until a person asks for a retry ({@link retryState}).
|
|
13
|
+
* - The understand point's answers ({@link understandOutcome}): proceed
|
|
14
|
+
* builds; refuse drops the item on its branch; redraft and ask build
|
|
15
|
+
* nothing and leave it for its author. Each maps to a lease outcome, and
|
|
16
|
+
* only a build's outcome counts as an attempt (#3147).
|
|
17
|
+
* - Done ({@link doneVerdict}): the builder finished, the check ran and
|
|
18
|
+
* passed, and every criterion the factory may tick has passing evidence. A
|
|
19
|
+
* criterion verified `manual` or `runtime` is not the factory's to tick, so
|
|
20
|
+
* an item with one is not done by the factory.
|
|
21
|
+
* - Retry ({@link retryState}): a failed build is never tried again on its
|
|
22
|
+
* own. A person's request, the item's `retry: { after, by, at }`, names the
|
|
23
|
+
* lease token of the failed build it follows, so one request starts one run.
|
|
24
|
+
* - Implements ({@link proposeImplements}): a build recorded done proposes
|
|
25
|
+
* each decision in force that constrains, by path, a path it changed.
|
|
26
|
+
*/
|
|
27
|
+
/** The decision point that gates every build of a person's ask (#3150). */
|
|
28
|
+
export declare const UNDERSTAND_POINT = "understand";
|
|
29
|
+
/** The decision point that picks a builder tier (ws-057, #3150). */
|
|
30
|
+
export declare const TIER_POINT = "slice-tier";
|
|
31
|
+
/** What the understand point answers. */
|
|
32
|
+
export declare const UNDERSTAND_ANSWERS: readonly ["proceed", "redraft", "ask", "refuse"];
|
|
33
|
+
export type UnderstandAnswer = (typeof UNDERSTAND_ANSWERS)[number];
|
|
34
|
+
/** Why an item is not picked. Closed. */
|
|
35
|
+
export declare const FACTORY_HOLDS: readonly ["not-ready", "intent-undecided", "contract-not-approved", "attempts-exhausted", "awaiting-retry", "built-not-applied", "dropped-on-branch", "question-open", "redraft-or-ask", "leased"];
|
|
36
|
+
export type FactoryHold = (typeof FACTORY_HOLDS)[number];
|
|
37
|
+
/** A work item as the factory reads it: its record from `records --json`, trimmed to what the rules use. */
|
|
38
|
+
export interface FactoryItem {
|
|
39
|
+
id: string;
|
|
40
|
+
state: string | null;
|
|
41
|
+
/** The kind's open state, such as open. */
|
|
42
|
+
openState: string;
|
|
43
|
+
/** The kind's first state for a proposal, such as proposed; an ask in it is a candidate too. */
|
|
44
|
+
proposedState: string | null;
|
|
45
|
+
ready: boolean;
|
|
46
|
+
data: Record<string, unknown> | null;
|
|
47
|
+
/** The item's own tier, or null. */
|
|
48
|
+
tier: string | null;
|
|
49
|
+
/** The contract it builds, with that record's state, or null. */
|
|
50
|
+
contract: {
|
|
51
|
+
id: string;
|
|
52
|
+
state: string | null;
|
|
53
|
+
} | null;
|
|
54
|
+
/** The record's warnings' codes. */
|
|
55
|
+
warnings: string[];
|
|
56
|
+
/** The answers about it, as records --json joins them. */
|
|
57
|
+
answers: {
|
|
58
|
+
id: string;
|
|
59
|
+
point: string | null;
|
|
60
|
+
state: string | null;
|
|
61
|
+
answer: string | boolean | null;
|
|
62
|
+
}[];
|
|
63
|
+
/** Someone holds its lease now. */
|
|
64
|
+
leased: boolean;
|
|
65
|
+
}
|
|
66
|
+
/** One claim of the item's lease history, as `work history --json` prints it. */
|
|
67
|
+
export interface FactoryClaim {
|
|
68
|
+
token: string;
|
|
69
|
+
ended: string;
|
|
70
|
+
outcome: string | null;
|
|
71
|
+
attempt: boolean;
|
|
72
|
+
}
|
|
73
|
+
/** What the factory knows besides the item. */
|
|
74
|
+
export interface FactoryContext {
|
|
75
|
+
/** null when no box names an intent; else whether that decision is decided. */
|
|
76
|
+
intentDecided: boolean | null;
|
|
77
|
+
claims: FactoryClaim[];
|
|
78
|
+
attempts: {
|
|
79
|
+
exhausted: boolean;
|
|
80
|
+
};
|
|
81
|
+
/** The item as its work branch holds it, when the branch exists: its state there and whether the branch is in the checkout. */
|
|
82
|
+
branch: {
|
|
83
|
+
state: string | null;
|
|
84
|
+
applied: boolean;
|
|
85
|
+
} | null;
|
|
86
|
+
/** The current question of each point for the item as it is now (a dry run), or null when not asked yet. */
|
|
87
|
+
questions: {
|
|
88
|
+
tier: {
|
|
89
|
+
state: string;
|
|
90
|
+
answer: string | boolean | null;
|
|
91
|
+
} | null;
|
|
92
|
+
understand: {
|
|
93
|
+
state: string;
|
|
94
|
+
answer: string | boolean | null;
|
|
95
|
+
} | null;
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
/** Whether a work item is a person's ask: its source names what they said, or it is the box's first build from its intent. */
|
|
99
|
+
export declare function isAsk(data: Record<string, unknown> | null): boolean;
|
|
100
|
+
/** The retry request on an item: `retry: { after, by, at }`, or null. */
|
|
101
|
+
export declare function retryRequest(data: Record<string, unknown> | null): {
|
|
102
|
+
after: string;
|
|
103
|
+
by: string;
|
|
104
|
+
at: string;
|
|
105
|
+
} | null;
|
|
106
|
+
export type RetryState =
|
|
107
|
+
/** The last claim was a failed build and a person may ask for one more. */
|
|
108
|
+
{
|
|
109
|
+
possible: true;
|
|
110
|
+
after: string;
|
|
111
|
+
asked: boolean;
|
|
112
|
+
} | {
|
|
113
|
+
possible: false;
|
|
114
|
+
reason: "no-failed-build" | "attempts-exhausted" | "held";
|
|
115
|
+
message: string;
|
|
116
|
+
};
|
|
117
|
+
/**
|
|
118
|
+
* Whether a person may ask for item `data`'s failed build to run again: the
|
|
119
|
+
* last claim is a failed build, nobody holds the lease, and attempts remain.
|
|
120
|
+
* `asked` says a request naming that build is already on the item.
|
|
121
|
+
*/
|
|
122
|
+
export declare function retryState(data: Record<string, unknown> | null, claims: readonly FactoryClaim[], attempts: {
|
|
123
|
+
exhausted: boolean;
|
|
124
|
+
}, leased: boolean): RetryState;
|
|
125
|
+
/** The lease outcome an understand answer leads to: null for proceed, which builds. */
|
|
126
|
+
export declare function understandOutcome(answer: unknown): "dropped" | "redraft" | "ask" | null;
|
|
127
|
+
/**
|
|
128
|
+
* Whether the factory picks `item` now, or why not. Asks are candidates while
|
|
129
|
+
* proposed as well as open; any other item only when the work kind reads it
|
|
130
|
+
* ready.
|
|
131
|
+
*/
|
|
132
|
+
export declare function pickable(item: FactoryItem, ctx: FactoryContext): {
|
|
133
|
+
ok: true;
|
|
134
|
+
} | {
|
|
135
|
+
ok: false;
|
|
136
|
+
hold: FactoryHold;
|
|
137
|
+
message: string;
|
|
138
|
+
};
|
|
139
|
+
/** One acceptance criterion's state, as records --json lists it. */
|
|
140
|
+
export interface CriterionView {
|
|
141
|
+
id: string;
|
|
142
|
+
verification: string;
|
|
143
|
+
met: boolean;
|
|
144
|
+
}
|
|
145
|
+
/** Whether a build is done, or why not. */
|
|
146
|
+
export declare function doneVerdict(build: {
|
|
147
|
+
finished: boolean;
|
|
148
|
+
reverted: string[];
|
|
149
|
+
}, check: {
|
|
150
|
+
ran: boolean;
|
|
151
|
+
ok: boolean;
|
|
152
|
+
}, criteria: readonly CriterionView[]): {
|
|
153
|
+
done: true;
|
|
154
|
+
} | {
|
|
155
|
+
done: false;
|
|
156
|
+
reason: string;
|
|
157
|
+
};
|
|
158
|
+
/**
|
|
159
|
+
* The decisions a done build proposes it implements (studio#243): from the
|
|
160
|
+
* intent graph's `constrains` edges of granularity `path` to each changed
|
|
161
|
+
* path, the decisions in force, less those the item already implements.
|
|
162
|
+
*/
|
|
163
|
+
export declare function proposeImplements(changed: readonly {
|
|
164
|
+
path: string;
|
|
165
|
+
decisions: readonly {
|
|
166
|
+
id: string;
|
|
167
|
+
state: string | null;
|
|
168
|
+
granularity: string;
|
|
169
|
+
}[];
|
|
170
|
+
}[], already: readonly string[], inForce?: readonly string[]): {
|
|
171
|
+
decision: string;
|
|
172
|
+
paths: string[];
|
|
173
|
+
}[];
|
|
174
|
+
/**
|
|
175
|
+
* The key of the state an item was read in, for a steward's ready step: a
|
|
176
|
+
* new key is work no run was started for. It names the item, its last claim
|
|
177
|
+
* and its open questions, so a person's answer to either point is a new key.
|
|
178
|
+
*/
|
|
179
|
+
export declare function readyKey(item: Pick<FactoryItem, "id">, ctx: Pick<FactoryContext, "claims" | "questions">, data: Record<string, unknown> | null): string;
|
|
180
|
+
//# sourceMappingURL=factory-rules.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"factory-rules.d.ts","sourceRoot":"","sources":["../../src/workspace/factory-rules.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,2EAA2E;AAC3E,eAAO,MAAM,gBAAgB,eAAe,CAAC;AAC7C,oEAAoE;AACpE,eAAO,MAAM,UAAU,eAAe,CAAC;AAEvC,yCAAyC;AACzC,eAAO,MAAM,kBAAkB,YAAI,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,CAAU,CAAC;AACnF,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEnE,yCAAyC;AACzC,eAAO,MAAM,aAAa,YACxB,WAAW,EACX,kBAAkB,EAClB,uBAAuB,EACvB,oBAAoB,EACpB,gBAAgB,EAChB,mBAAmB,EACnB,mBAAmB,EACnB,eAAe,EACf,gBAAgB,EAChB,QAAQ,CACA,CAAC;AACX,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;AAEzD,4GAA4G;AAC5G,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;I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E,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,EAAE,GAAG,EAAE,IAAI,CAAC,cAAc,EAAE,QAAQ,GAAG,WAAW,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,GAAG,MAAM,CAIvJ"}
|
package/dist/workspace/init.d.ts
CHANGED
|
@@ -21,9 +21,30 @@
|
|
|
21
21
|
* never written.
|
|
22
22
|
*
|
|
23
23
|
* Nothing here runs project code: it reads file names and package.json files.
|
|
24
|
+
*
|
|
25
|
+
* `--profile ideation|app|infra` starts a workspace from one of the reference
|
|
26
|
+
* workspace's profiles instead (#3174, ws-096): records only with a stub app,
|
|
27
|
+
* an app with its factory, or an estate with a factory and no app. It is
|
|
28
|
+
* `chant init --from` on `reference-workspace/profiles/<profile>` of the chant
|
|
29
|
+
* repository at this chant's release tag, or of the repository or directory
|
|
30
|
+
* `--from` names, so the new workspace gets a lineage lock and can be upgraded
|
|
31
|
+
* like any template copy.
|
|
24
32
|
*/
|
|
25
33
|
import type { CommandContext } from "../cli/registry.js";
|
|
26
34
|
import { type WorkspaceTree } from "./tree.js";
|
|
35
|
+
/** The profiles `--profile` takes (#3174), each a directory under {@link PROFILES_DIR} in the chant repository. */
|
|
36
|
+
export declare const PROFILES: readonly ["ideation", "app", "infra"];
|
|
37
|
+
export type Profile = (typeof PROFILES)[number];
|
|
38
|
+
/** Where the profiles live in the chant repository. */
|
|
39
|
+
export declare const PROFILES_DIR = "reference-workspace/profiles";
|
|
40
|
+
/** The repository the profiles are read from by default, at this chant's release tag. */
|
|
41
|
+
export declare const PROFILES_REPO = "https://github.com/INTENTIUS/chant";
|
|
42
|
+
/**
|
|
43
|
+
* The `chant init --from` source for a profile: `from` (a `<repo>@<ref>` or
|
|
44
|
+
* a directory holding a chant checkout) when given, else the chant repository
|
|
45
|
+
* at the tag of the chant reading, `chant-v<version>`.
|
|
46
|
+
*/
|
|
47
|
+
export declare function profileSource(profile: Profile, from: string | undefined, version: string): string;
|
|
27
48
|
export interface ProposedEntry {
|
|
28
49
|
name: string;
|
|
29
50
|
dir?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/workspace/init.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/workspace/init.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAMH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AActD,OAAO,EAAmC,KAAK,aAAa,EAAE,MAAM,QAAQ,CAAC;AAI7E,mHAAmH;AACnH,eAAO,MAAM,QAAQ,YAAI,UAAU,EAAE,KAAK,EAAE,OAAO,CAAU,CAAC;AAC9D,MAAM,MAAM,OAAO,GAAG,CAAC,OAAO,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC;AAEhD,uDAAuD;AACvD,eAAO,MAAM,YAAY,iCAAiC,CAAC;AAE3D,yFAAyF;AACzF,eAAO,MAAM,aAAa,uCAAuC,CAAC;AAElE;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,SAAS,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAGjG;AAoBD,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;CAC1B;AAED,mEAAmE;AACnE,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,iEAAiE;IACjE,MAAM,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,OAAO,EAAE,MAAM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AO,CAAC,MAAM,CAAC,CAoE3E"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `chant workspace graph --intent <path[:start-end]|path#symbol> [--at <rev>] [--kind <kind file>...] [--json]`
|
|
2
|
+
* `chant workspace graph --intent <path[:start-end]|path#symbol> [--at <rev>] [--kind <kind file>...] [--follow-squash] [--json]`
|
|
3
3
|
* (#2651, #3034): the intent graph over one region (`intent.ts`), printed as JSON
|
|
4
4
|
* with `--json` or as a walk, one line per node, in the order of #2650
|
|
5
5
|
* section B: the region, its decisions, their artifacts, the commits, and the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"intent-cli.d.ts","sourceRoot":"","sources":["../../src/workspace/intent-cli.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAgB,KAAK,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAC1E,OAAO,EAAsE,KAAK,cAAc,EAAkD,KAAK,SAAS,EAAiB,MAAM,UAAU,CAAC;AAKlM,KAAK,MAAM,GAAG,OAAO,CAAC,cAAc,EAAE;IAAE,KAAK,EAAE,OAAO,CAAA;CAAE,CAAC,CAAC;AAC1D,KAAK,YAAY,GAAG,OAAO,CAAC,oBAAoB,EAAE;IAAE,KAAK,EAAE,OAAO,CAAA;CAAE,CAAC,CAAC;AAYtE,gIAAgI;AAChI,eAAO,MAAM,kBAAkB,0FAA0F,CAAC;
|
|
1
|
+
{"version":3,"file":"intent-cli.d.ts","sourceRoot":"","sources":["../../src/workspace/intent-cli.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAgB,KAAK,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAC1E,OAAO,EAAsE,KAAK,cAAc,EAAkD,KAAK,SAAS,EAAiB,MAAM,UAAU,CAAC;AAKlM,KAAK,MAAM,GAAG,OAAO,CAAC,cAAc,EAAE;IAAE,KAAK,EAAE,OAAO,CAAA;CAAE,CAAC,CAAC;AAC1D,KAAK,YAAY,GAAG,OAAO,CAAC,oBAAoB,EAAE;IAAE,KAAK,EAAE,OAAO,CAAA;CAAE,CAAC,CAAC;AAYtE,gIAAgI;AAChI,eAAO,MAAM,kBAAkB,0FAA0F,CAAC;AAwG1H,2IAA2I;AAC3I,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,SAAS,GAAG,MAAM,EAAE,CAsB9D;AAED,wEAAwE;AACxE,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CA6BhD;AAED,yGAAyG;AACzG,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,YAAY,GAAG,MAAM,CAwB5D;AAcD,wBAAsB,kBAAkB,CAAC,GAAG,EAAE,cAAc,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAuB1F"}
|
|
@@ -29,11 +29,16 @@
|
|
|
29
29
|
* `workedBy` and `alsoWithin` list every work item and other decision that
|
|
30
30
|
* matched, whatever the bucket. `issue` and `contract` entries are listed and
|
|
31
31
|
* not walked: they name no path. Git is read through a local `git`
|
|
32
|
-
* subprocess only: no fetch, no network
|
|
32
|
+
* subprocess only: no fetch, no network, unless the walk is asked to follow
|
|
33
|
+
* squashes (#3035). Then a squash commit lists its pull request's original
|
|
34
|
+
* commits, joins their runs and counts as the record's own work when one of
|
|
35
|
+
* them carries it, and a pull request ref the clone lacks is fetched from
|
|
36
|
+
* `origin`.
|
|
33
37
|
*/
|
|
34
38
|
import { type IntentErrorCode, type IntentReason } from "./intent.js";
|
|
35
39
|
import type { DecidedIn } from "./record-decided.js";
|
|
36
40
|
import { type RunRef } from "./runs.js";
|
|
41
|
+
import { type Forge } from "./squash.js";
|
|
37
42
|
import { type CommitTrailerJoins } from "./trailer-joins.js";
|
|
38
43
|
/** The version of the `intent-record` document this chant writes. */
|
|
39
44
|
export declare const INTENT_RECORD_CONTRACT_VERSION = 1;
|
|
@@ -72,6 +77,26 @@ export interface RecordCommit {
|
|
|
72
77
|
joins: CommitTrailerJoins;
|
|
73
78
|
/** The agent runs that made the commit (#3033): the one its Chant-Run names, and any whose record lists it. */
|
|
74
79
|
runs: RunRef[];
|
|
80
|
+
/** Only when the walk follows squashes (#3035) and the commit squashes a pull request: its original commits and what their trailers join. */
|
|
81
|
+
squash?: {
|
|
82
|
+
pullRequest: number;
|
|
83
|
+
forge: Forge | null;
|
|
84
|
+
ref: string | null;
|
|
85
|
+
head: string | null;
|
|
86
|
+
fetched: boolean;
|
|
87
|
+
followed: boolean;
|
|
88
|
+
commits: {
|
|
89
|
+
sha: string;
|
|
90
|
+
subject: string;
|
|
91
|
+
author: {
|
|
92
|
+
name: string;
|
|
93
|
+
email: string;
|
|
94
|
+
};
|
|
95
|
+
date: string;
|
|
96
|
+
trailers: Record<string, string[]>;
|
|
97
|
+
joins: CommitTrailerJoins;
|
|
98
|
+
}[];
|
|
99
|
+
};
|
|
75
100
|
/** The record's constrains entries whose history listed the commit. */
|
|
76
101
|
entries: string[];
|
|
77
102
|
/** The files the commit changed in the record's region, from the workspace root. Empty when git lists none, as for a merge that changed nothing against its first parent there. */
|
|
@@ -141,6 +166,8 @@ export interface IntentRecordQuery {
|
|
|
141
166
|
record: string;
|
|
142
167
|
at?: string;
|
|
143
168
|
kinds?: string[];
|
|
169
|
+
/** Follow squash merges to their pull requests' original commits, fetching a missing pull request ref from `origin` (#3035). */
|
|
170
|
+
followSquash?: boolean;
|
|
144
171
|
}
|
|
145
172
|
export interface IntentRecordResult {
|
|
146
173
|
doc: IntentRecordDocument;
|