@intentius/chant 0.90.0 → 0.93.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/cli/commands/build.d.ts.map +1 -1
- package/dist/cli/commands/lint.d.ts.map +1 -1
- package/dist/cli/handlers/components.d.ts +8 -0
- package/dist/cli/handlers/components.d.ts.map +1 -1
- package/dist/cli/handlers/graph.d.ts.map +1 -1
- package/dist/cli/handlers/operator.d.ts +20 -0
- package/dist/cli/handlers/operator.d.ts.map +1 -1
- package/dist/cli/handlers/run.d.ts.map +1 -1
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/mcp/workspace-tools.d.ts +7 -4
- package/dist/cli/mcp/workspace-tools.d.ts.map +1 -1
- package/dist/cli/plugins.d.ts.map +1 -1
- package/dist/cli/registry.d.ts +42 -1
- package/dist/cli/registry.d.ts.map +1 -1
- package/dist/codegen/pinned-upgrade.d.ts.map +1 -1
- package/dist/components/verbs/vuln-scan.d.ts +72 -0
- package/dist/components/verbs/vuln-scan.d.ts.map +1 -1
- package/dist/config.d.ts +22 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/lexicon-module.d.ts +22 -0
- package/dist/lexicon-module.d.ts.map +1 -1
- package/dist/lifecycle/converge-ledger.d.ts +19 -0
- package/dist/lifecycle/converge-ledger.d.ts.map +1 -1
- package/dist/lifecycle/git.d.ts +40 -5
- package/dist/lifecycle/git.d.ts.map +1 -1
- package/dist/lifecycle/lease.d.ts +72 -16
- package/dist/lifecycle/lease.d.ts.map +1 -1
- package/dist/lifecycle/member-ledger.d.ts +3 -2
- package/dist/lifecycle/member-ledger.d.ts.map +1 -1
- package/dist/lifecycle/plan-ledger.d.ts +114 -0
- package/dist/lifecycle/plan-ledger.d.ts.map +1 -0
- package/dist/lifecycle/run-ledger.d.ts +2 -0
- package/dist/lifecycle/run-ledger.d.ts.map +1 -1
- package/dist/lifecycle/symptoms.d.ts +51 -0
- package/dist/lifecycle/symptoms.d.ts.map +1 -1
- package/dist/lifecycle/work-lease.d.ts +140 -0
- package/dist/lifecycle/work-lease.d.ts.map +1 -0
- package/dist/lint/rules/index.d.ts +4 -2
- package/dist/lint/rules/index.d.ts.map +1 -1
- package/dist/lint/rules/op/index.d.ts +14 -3
- package/dist/lint/rules/op/index.d.ts.map +1 -1
- package/dist/lint/rules/op/ops014-converge-rule-refusals.d.ts.map +1 -1
- package/dist/lint/rules/op/sys010-key-over-plain-http.d.ts +29 -0
- package/dist/lint/rules/op/sys010-key-over-plain-http.d.ts.map +1 -0
- package/dist/lint/rules/sys001-no-literal-key.d.ts +3 -0
- package/dist/lint/rules/sys001-no-literal-key.d.ts.map +1 -0
- package/dist/op/__fixtures__/decide-stub-backend.d.ts +53 -0
- package/dist/op/__fixtures__/decide-stub-backend.d.ts.map +1 -0
- package/dist/op/activities/activity-contracts.d.ts +203 -2
- package/dist/op/activities/activity-contracts.d.ts.map +1 -1
- package/dist/op/activities/apply.d.ts.map +1 -1
- package/dist/op/activities/change-coverage.d.ts +44 -0
- package/dist/op/activities/change-coverage.d.ts.map +1 -0
- package/dist/op/activities/converge.d.ts +24 -1
- package/dist/op/activities/converge.d.ts.map +1 -1
- package/dist/op/activities/decide.d.ts +107 -0
- package/dist/op/activities/decide.d.ts.map +1 -0
- package/dist/op/activities/index.d.ts +10 -0
- package/dist/op/activities/index.d.ts.map +1 -1
- package/dist/op/activities/shell.d.ts +32 -0
- package/dist/op/activities/shell.d.ts.map +1 -1
- package/dist/op/activities/source-release.d.ts +86 -0
- package/dist/op/activities/source-release.d.ts.map +1 -0
- package/dist/op/activities/source-rollback.d.ts +100 -0
- package/dist/op/activities/source-rollback.d.ts.map +1 -0
- package/dist/op/activities/work-evidence.d.ts +42 -0
- package/dist/op/activities/work-evidence.d.ts.map +1 -0
- package/dist/op/activity-contract.d.ts +1 -0
- package/dist/op/activity-contract.d.ts.map +1 -1
- package/dist/op/activity-profiles.d.ts +16 -0
- package/dist/op/activity-profiles.d.ts.map +1 -1
- package/dist/op/builders.d.ts +84 -2
- package/dist/op/builders.d.ts.map +1 -1
- package/dist/op/composites/converge-op.d.ts +31 -4
- package/dist/op/composites/converge-op.d.ts.map +1 -1
- package/dist/op/decide-backend.d.ts +116 -0
- package/dist/op/decide-backend.d.ts.map +1 -0
- package/dist/op/decide-config.d.ts +120 -0
- package/dist/op/decide-config.d.ts.map +1 -0
- package/dist/op/decide-read-inputs.d.ts +40 -0
- package/dist/op/decide-read-inputs.d.ts.map +1 -0
- package/dist/op/discover.d.ts +25 -0
- package/dist/op/discover.d.ts.map +1 -1
- package/dist/op/gate-wait.d.ts +43 -0
- package/dist/op/gate-wait.d.ts.map +1 -0
- package/dist/op/gate.d.ts +5 -2
- package/dist/op/gate.d.ts.map +1 -1
- package/dist/op/index.d.ts +18 -5
- package/dist/op/index.d.ts.map +1 -1
- package/dist/op/lifecycle-receipt-store.d.ts +34 -0
- package/dist/op/lifecycle-receipt-store.d.ts.map +1 -0
- package/dist/op/local-executor.d.ts +48 -4
- package/dist/op/local-executor.d.ts.map +1 -1
- package/dist/op/local-output.d.ts +2 -0
- package/dist/op/local-output.d.ts.map +1 -1
- package/dist/op/op-ir.d.ts +12 -1
- package/dist/op/op-ir.d.ts.map +1 -1
- package/dist/op/op-verb-class.d.ts.map +1 -1
- package/dist/op/operator.d.ts +126 -1
- package/dist/op/operator.d.ts.map +1 -1
- package/dist/op/runtime.d.ts +46 -5
- package/dist/op/runtime.d.ts.map +1 -1
- package/dist/op/runtimes/local.d.ts.map +1 -1
- package/dist/op/source-archive.d.ts +63 -0
- package/dist/op/source-archive.d.ts.map +1 -0
- package/dist/op/step-output-ref.d.ts +2 -2
- package/dist/op/step-output-ref.d.ts.map +1 -1
- package/dist/op/steward-points.d.ts +136 -0
- package/dist/op/steward-points.d.ts.map +1 -0
- package/dist/op/steward-turn.d.ts +53 -0
- package/dist/op/steward-turn.d.ts.map +1 -0
- package/dist/op/steward.d.ts +161 -0
- package/dist/op/steward.d.ts.map +1 -0
- package/dist/op/types.d.ts +58 -0
- package/dist/op/types.d.ts.map +1 -1
- package/dist/op/work-lease-decl.d.ts +18 -0
- package/dist/op/work-lease-decl.d.ts.map +1 -0
- package/dist/op/work-lease-run.d.ts +173 -0
- package/dist/op/work-lease-run.d.ts.map +1 -0
- package/dist/workspace/__fixtures__/decide-workspace.d.ts +100 -0
- package/dist/workspace/__fixtures__/decide-workspace.d.ts.map +1 -0
- package/dist/workspace/answers-ledger.d.ts +76 -0
- package/dist/workspace/answers-ledger.d.ts.map +1 -0
- package/dist/workspace/box-isolation.d.ts +99 -0
- package/dist/workspace/box-isolation.d.ts.map +1 -0
- package/dist/workspace/changes-cli.d.ts +16 -0
- package/dist/workspace/changes-cli.d.ts.map +1 -0
- package/dist/workspace/changes.d.ts +200 -0
- package/dist/workspace/changes.d.ts.map +1 -0
- package/dist/workspace/chant-migrations/chud-lexicon-exit-fly-site.d.ts +59 -0
- package/dist/workspace/chant-migrations/chud-lexicon-exit-fly-site.d.ts.map +1 -0
- package/dist/workspace/chant-migrations/chud-lexicon-exit-live-names.d.ts +51 -0
- package/dist/workspace/chant-migrations/chud-lexicon-exit-live-names.d.ts.map +1 -0
- package/dist/workspace/chant-migrations/chud-lexicon-exit-rollback.d.ts +26 -0
- package/dist/workspace/chant-migrations/chud-lexicon-exit-rollback.d.ts.map +1 -0
- package/dist/workspace/chant-migrations/chud-lexicon-exit-ship-inputs.d.ts +59 -0
- package/dist/workspace/chant-migrations/chud-lexicon-exit-ship-inputs.d.ts.map +1 -0
- package/dist/workspace/chant-migrations/chud-lexicon-exit-ship-policy.d.ts +22 -0
- package/dist/workspace/chant-migrations/chud-lexicon-exit-ship-policy.d.ts.map +1 -0
- package/dist/workspace/chant-migrations/chud-lexicon-exit.d.ts +71 -0
- package/dist/workspace/chant-migrations/chud-lexicon-exit.d.ts.map +1 -0
- package/dist/workspace/chant-migrations.d.ts +99 -0
- package/dist/workspace/chant-migrations.d.ts.map +1 -0
- package/dist/workspace/checks/box-isolation.d.ts +18 -0
- package/dist/workspace/checks/box-isolation.d.ts.map +1 -0
- package/dist/workspace/checks/boxes.d.ts +104 -0
- package/dist/workspace/checks/boxes.d.ts.map +1 -0
- package/dist/workspace/checks/diagrams.d.ts +31 -0
- package/dist/workspace/checks/diagrams.d.ts.map +1 -0
- package/dist/workspace/checks/records.d.ts +8 -0
- package/dist/workspace/checks/records.d.ts.map +1 -1
- package/dist/workspace/checks.d.ts +13 -1
- package/dist/workspace/checks.d.ts.map +1 -1
- package/dist/workspace/compose-graph.d.ts +2 -0
- package/dist/workspace/compose-graph.d.ts.map +1 -1
- package/dist/workspace/conformance/index.d.ts.map +1 -1
- package/dist/workspace/decide.d.ts +229 -0
- package/dist/workspace/decide.d.ts.map +1 -0
- package/dist/workspace/decision-points.schema.json +137 -0
- package/dist/workspace/declaration.d.ts +103 -0
- package/dist/workspace/declaration.d.ts.map +1 -1
- package/dist/workspace/declaration.schema.json +285 -0
- package/dist/workspace/declared-kinds.d.ts +32 -0
- package/dist/workspace/declared-kinds.d.ts.map +1 -1
- package/dist/workspace/generated-files.d.ts +7 -0
- package/dist/workspace/generated-files.d.ts.map +1 -1
- package/dist/workspace/intent.d.ts.map +1 -1
- package/dist/workspace/lineage-check.d.ts +3 -0
- package/dist/workspace/lineage-check.d.ts.map +1 -1
- package/dist/workspace/lineage-upgrade.d.ts +6 -1
- package/dist/workspace/lineage-upgrade.d.ts.map +1 -1
- package/dist/workspace/ls.d.ts +39 -1
- package/dist/workspace/ls.d.ts.map +1 -1
- package/dist/workspace/point-answer.schema.json +95 -0
- package/dist/workspace/points-cli.d.ts +113 -0
- package/dist/workspace/points-cli.d.ts.map +1 -0
- package/dist/workspace/points.d.ts +320 -0
- package/dist/workspace/points.d.ts.map +1 -0
- package/dist/workspace/reason-codes.d.ts +38 -0
- package/dist/workspace/reason-codes.d.ts.map +1 -1
- package/dist/workspace/record-assets.d.ts.map +1 -1
- package/dist/workspace/records-cli.d.ts +23 -1
- package/dist/workspace/records-cli.d.ts.map +1 -1
- package/dist/workspace/records-close.d.ts +1 -1
- package/dist/workspace/records-close.d.ts.map +1 -1
- package/dist/workspace/records-write.d.ts +11 -5
- package/dist/workspace/records-write.d.ts.map +1 -1
- package/dist/workspace/records.d.ts +42 -6
- package/dist/workspace/records.d.ts.map +1 -1
- package/dist/workspace/status-gates.d.ts +7 -2
- package/dist/workspace/status-gates.d.ts.map +1 -1
- package/dist/workspace/status-stewards.d.ts +179 -0
- package/dist/workspace/status-stewards.d.ts.map +1 -0
- package/dist/workspace/status.d.ts +68 -1
- package/dist/workspace/status.d.ts.map +1 -1
- package/dist/workspace/work-cli.d.ts +189 -0
- package/dist/workspace/work-cli.d.ts.map +1 -0
- package/dist/workspace/work-evidence.d.ts +74 -0
- package/dist/workspace/work-evidence.d.ts.map +1 -0
- package/dist/workspace/work.d.ts +43 -1
- package/dist/workspace/work.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/cli/commands/audit.test.ts +9 -1
- package/src/cli/commands/build.ts +3 -2
- package/src/cli/commands/lint.ts +7 -1
- package/src/cli/handlers/components.test.ts +93 -0
- package/src/cli/handlers/components.ts +44 -3
- package/src/cli/handlers/graph.test.ts +20 -0
- package/src/cli/handlers/graph.ts +16 -2
- package/src/cli/handlers/operator.ts +141 -4
- package/src/cli/handlers/run.test.ts +173 -2
- package/src/cli/handlers/run.ts +174 -3
- package/src/cli/main.test.ts +50 -0
- package/src/cli/main.ts +97 -2
- package/src/cli/mcp/workspace-tools.test.ts +48 -19
- package/src/cli/mcp/workspace-tools.ts +110 -8
- package/src/cli/plugins.ts +11 -3
- package/src/cli/registry.ts +42 -1
- package/src/codegen/pinned-upgrade.ts +2 -1
- package/src/codegen/release-wiring.test.ts +49 -2
- package/src/components/capability-plugin-loader.ts +3 -3
- package/src/components/cli-support.ts +2 -2
- package/src/components/verbs/vuln-scan.test.ts +124 -1
- package/src/components/verbs/vuln-scan.ts +142 -1
- package/src/config.ts +11 -0
- package/src/lexicon-module.ts +56 -1
- package/src/lexicon-package.test.ts +96 -0
- package/src/lifecycle/converge-ledger.ts +20 -0
- package/src/lifecycle/git.ts +65 -15
- package/src/lifecycle/lease.test.ts +22 -0
- package/src/lifecycle/lease.ts +133 -29
- package/src/lifecycle/member-ledger.ts +3 -2
- package/src/lifecycle/plan-ledger.test.ts +148 -0
- package/src/lifecycle/plan-ledger.ts +158 -0
- package/src/lifecycle/run-ledger.ts +6 -0
- package/src/lifecycle/symptoms.ts +95 -0
- package/src/lifecycle/work-lease.test.ts +236 -0
- package/src/lifecycle/work-lease.ts +426 -0
- package/src/lint/rules/index.ts +6 -2
- package/src/lint/rules/op/index.ts +17 -4
- package/src/lint/rules/op/ops014-converge-rule-refusals.test.ts +23 -1
- package/src/lint/rules/op/ops014-converge-rule-refusals.ts +10 -6
- package/src/lint/rules/op/sys010-key-over-plain-http.test.ts +52 -0
- package/src/lint/rules/op/sys010-key-over-plain-http.ts +100 -0
- package/src/lint/rules/sys001-no-literal-key.test.ts +31 -0
- package/src/lint/rules/sys001-no-literal-key.ts +67 -0
- package/src/op/__fixtures__/decide-stub-backend.ts +143 -0
- package/src/op/activities/activity-contracts.ts +190 -1
- package/src/op/activities/apply.ts +7 -6
- package/src/op/activities/change-coverage.ts +60 -0
- package/src/op/activities/converge.test.ts +55 -1
- package/src/op/activities/converge.ts +208 -29
- package/src/op/activities/decide.live.test.ts +78 -0
- package/src/op/activities/decide.test.ts +300 -0
- package/src/op/activities/decide.ts +267 -0
- package/src/op/activities/index.ts +21 -0
- package/src/op/activities/shell.test.ts +91 -1
- package/src/op/activities/shell.ts +91 -2
- package/src/op/activities/source-release.test.ts +118 -0
- package/src/op/activities/source-release.ts +168 -0
- package/src/op/activities/source-rollback.test.ts +131 -0
- package/src/op/activities/source-rollback.ts +239 -0
- package/src/op/activities/work-evidence.ts +62 -0
- package/src/op/activity-contract-registry.test.ts +2 -0
- package/src/op/activity-contract-registry.ts +2 -2
- package/src/op/activity-contract.test.ts +12 -0
- package/src/op/activity-contract.ts +6 -1
- package/src/op/activity-profiles.ts +29 -0
- package/src/op/activity-registry.test.ts +1 -1
- package/src/op/activity-registry.ts +2 -2
- package/src/op/builders.ts +124 -5
- package/src/op/command-gate.test.ts +192 -0
- package/src/op/composites/converge-op.test.ts +27 -1
- package/src/op/composites/converge-op.ts +69 -15
- package/src/op/decide-backend.test.ts +44 -0
- package/src/op/decide-backend.ts +212 -0
- package/src/op/decide-config.test.ts +52 -0
- package/src/op/decide-config.ts +80 -0
- package/src/op/decide-read-inputs.ts +117 -0
- package/src/op/discover.ts +71 -0
- package/src/op/gate-approval.ts +2 -2
- package/src/op/gate-wait.ts +57 -0
- package/src/op/gate.ts +8 -3
- package/src/op/generate-pipeline.ts +2 -2
- package/src/op/index.ts +34 -6
- package/src/op/lifecycle-receipt-store.test.ts +60 -0
- package/src/op/lifecycle-receipt-store.ts +61 -0
- package/src/op/local-executor.ts +367 -33
- package/src/op/local-output.test.ts +33 -0
- package/src/op/local-output.ts +33 -2
- package/src/op/op-ir.test.ts +10 -0
- package/src/op/op-ir.ts +18 -0
- package/src/op/op-verb-class.ts +1 -0
- package/src/op/operator.ts +360 -10
- package/src/op/runtime.ts +37 -8
- package/src/op/runtimes/local.ts +6 -1
- package/src/op/source-archive.ts +161 -0
- package/src/op/step-output-ref.ts +6 -2
- package/src/op/steward-points.test.ts +313 -0
- package/src/op/steward-points.ts +194 -0
- package/src/op/steward-turn.ts +79 -0
- package/src/op/steward.test.ts +296 -0
- package/src/op/steward.ts +277 -0
- package/src/op/types.ts +60 -0
- package/src/op/work-lease-decl.ts +80 -0
- package/src/op/work-lease-run.test.ts +345 -0
- package/src/op/work-lease-run.ts +395 -0
- package/src/workspace/__fixtures__/decide-workspace.ts +129 -0
- package/src/workspace/__fixtures__/studio-template-84c8b21.json +67 -0
- package/src/workspace/answers-ledger.ts +118 -0
- package/src/workspace/box-isolation.test.ts +261 -0
- package/src/workspace/box-isolation.ts +205 -0
- package/src/workspace/changes-cli.ts +56 -0
- package/src/workspace/changes.schema.json +472 -0
- package/src/workspace/changes.test.ts +315 -0
- package/src/workspace/changes.ts +512 -0
- package/src/workspace/chant-migrations/chud-lexicon-exit-fly-site.ts +234 -0
- package/src/workspace/chant-migrations/chud-lexicon-exit-live-names.ts +164 -0
- package/src/workspace/chant-migrations/chud-lexicon-exit-rollback.ts +223 -0
- package/src/workspace/chant-migrations/chud-lexicon-exit-ship-inputs.ts +195 -0
- package/src/workspace/chant-migrations/chud-lexicon-exit-ship-policy.ts +108 -0
- package/src/workspace/chant-migrations/chud-lexicon-exit.ts +882 -0
- package/src/workspace/chant-migrations.e2e.test.ts +1089 -0
- package/src/workspace/chant-migrations.ts +164 -0
- package/src/workspace/check-contract.test.ts +5 -1
- package/src/workspace/check.schema.json +25 -7
- package/src/workspace/checks/box-isolation.ts +68 -0
- package/src/workspace/checks/boxes.test.ts +276 -0
- package/src/workspace/checks/boxes.ts +442 -0
- package/src/workspace/checks/diagrams.test.ts +134 -0
- package/src/workspace/checks/diagrams.ts +108 -0
- package/src/workspace/checks/records.ts +72 -0
- package/src/workspace/checks.test.ts +7 -0
- package/src/workspace/checks.ts +27 -3
- package/src/workspace/compose-graph.ts +2 -0
- package/src/workspace/conformance/__fixture__/decisions/decision.kind.mjs +10 -0
- package/src/workspace/conformance/__fixture__/decisions/decision.schema.json +26 -0
- package/src/workspace/conformance/index.ts +5 -0
- package/src/workspace/decide.test.ts +224 -0
- package/src/workspace/decide.ts +709 -0
- package/src/workspace/decision-points.schema.json +137 -0
- package/src/workspace/declaration.schema.json +285 -0
- package/src/workspace/declaration.test.ts +58 -0
- package/src/workspace/declaration.ts +241 -0
- package/src/workspace/declared-kinds.test.ts +5 -5
- package/src/workspace/declared-kinds.ts +71 -3
- package/src/workspace/generated-files.ts +14 -0
- package/src/workspace/graph-cli.ts +1 -1
- package/src/workspace/graph.schema.json +9 -1
- package/src/workspace/intent.schema.json +12 -3
- package/src/workspace/intent.ts +3 -10
- package/src/workspace/lineage-check.ts +16 -1
- package/src/workspace/lineage-upgrade-cli.ts +1 -1
- package/src/workspace/lineage-upgrade.test.ts +70 -0
- package/src/workspace/lineage-upgrade.ts +81 -10
- package/src/workspace/ls-contract.test.ts +57 -0
- package/src/workspace/ls.schema.json +46 -1
- package/src/workspace/ls.ts +62 -3
- package/src/workspace/point-answer.schema.json +95 -0
- package/src/workspace/points-cli.ts +284 -0
- package/src/workspace/points-write.schema.json +499 -0
- package/src/workspace/points.schema.json +743 -0
- package/src/workspace/points.test.ts +264 -0
- package/src/workspace/points.ts +564 -0
- package/src/workspace/read-contract.test.ts +18 -1
- package/src/workspace/reason-codes.test.ts +24 -1
- package/src/workspace/reason-codes.ts +49 -0
- package/src/workspace/record-assets.test.ts +3 -2
- package/src/workspace/record-assets.ts +4 -1
- package/src/workspace/records-amend.schema.json +2 -0
- package/src/workspace/records-cli.ts +28 -5
- package/src/workspace/records-close.schema.json +2 -0
- package/src/workspace/records-contract.test.ts +3 -2
- package/src/workspace/records-new.schema.json +2 -0
- package/src/workspace/records-review.schema.json +2 -0
- package/src/workspace/records-sessions-write.e2e.test.ts +77 -0
- package/src/workspace/records-sessions-write.test.ts +2 -34
- package/src/workspace/records-write.e2e.test.ts +108 -0
- package/src/workspace/records-write.test.ts +32 -41
- package/src/workspace/records-write.ts +33 -15
- package/src/workspace/records.schema.json +53 -2
- package/src/workspace/records.test.ts +48 -3
- package/src/workspace/records.ts +142 -6
- package/src/workspace/status-contract.test.ts +189 -6
- package/src/workspace/status-gates.ts +9 -4
- package/src/workspace/status-stewards.ts +329 -0
- package/src/workspace/status.schema.json +335 -5
- package/src/workspace/status.ts +142 -6
- package/src/workspace/work-acceptance.test.ts +274 -0
- package/src/workspace/work-cli.e2e.test.ts +180 -0
- package/src/workspace/work-cli.ts +429 -0
- package/src/workspace/work-evidence.schema.json +212 -0
- package/src/workspace/work-evidence.ts +169 -0
- package/src/workspace/work-history.schema.json +349 -0
- package/src/workspace/work-history.test.ts +156 -0
- package/src/workspace/work-lease.schema.json +233 -0
- package/src/workspace/work-readiness-chud.test.ts +145 -0
- package/src/workspace/work.test.ts +3 -2
- package/src/workspace/work.ts +100 -1
- /package/src/cli/{discovery-skip.test.ts → discovery-skip.e2e.test.ts} +0 -0
- /package/src/workspace/conformance/{conformance.test.ts → conformance.e2e.test.ts} +0 -0
- /package/src/workspace/{which-chant.test.ts → which-chant.e2e.test.ts} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"work-lease-run.d.ts","sourceRoot":"","sources":["../../src/op/work-lease-run.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AAiBH,OAAO,EAA+B,KAAK,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACpF,OAAO,EAAsB,KAAK,QAAQ,EAAE,MAAM,SAAS,CAAC;AAE5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAE7E,wFAAwF;AACxF,eAAO,MAAM,UAAU,eAAe,CAAC;AAEvC,kEAAkE;AAClE,eAAO,MAAM,kBAAkB,gBAAgB,CAAC;AAEhD,iFAAiF;AACjF,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,8EAA8E;IAC9E,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,qBAAqB;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,2FAA2F;IAC3F,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,kFAAkF;IAClF,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB;AAED,gEAAgE;AAChE,MAAM,WAAW,kBAAkB;IACjC,8DAA8D;IAC9D,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,MA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
|
|
|
1
|
+
/**
|
|
2
|
+
* A throwaway workspace for the decide tests: a git repository with an answer
|
|
3
|
+
* kind (the reference workspace's), a task kind the points read through the
|
|
4
|
+
* read contract, three points (a noul, a choice and a score), and a box member
|
|
5
|
+
* that declares one brokered capability and one without a broker.
|
|
6
|
+
*/
|
|
7
|
+
/** The chant checkout the tests run in. */
|
|
8
|
+
export declare const REPO: string;
|
|
9
|
+
export declare const MODEL = "jev-1.13.0";
|
|
10
|
+
export declare const POINTS: {
|
|
11
|
+
points: {
|
|
12
|
+
triage: {
|
|
13
|
+
title: string;
|
|
14
|
+
question: {
|
|
15
|
+
type: string;
|
|
16
|
+
instructions: string;
|
|
17
|
+
criteria: {
|
|
18
|
+
true: string;
|
|
19
|
+
false: string;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
inputs: {
|
|
23
|
+
"record.size": string;
|
|
24
|
+
"record.risky": string;
|
|
25
|
+
};
|
|
26
|
+
deciders: ({
|
|
27
|
+
kind: string;
|
|
28
|
+
backend: string;
|
|
29
|
+
model: string;
|
|
30
|
+
threshold: number;
|
|
31
|
+
} | {
|
|
32
|
+
kind: string;
|
|
33
|
+
rows: {
|
|
34
|
+
when: {
|
|
35
|
+
"record.size": number;
|
|
36
|
+
};
|
|
37
|
+
answer: boolean;
|
|
38
|
+
}[];
|
|
39
|
+
count?: undefined;
|
|
40
|
+
} | {
|
|
41
|
+
kind: string;
|
|
42
|
+
count: number;
|
|
43
|
+
rows?: undefined;
|
|
44
|
+
})[];
|
|
45
|
+
};
|
|
46
|
+
route: {
|
|
47
|
+
title: string;
|
|
48
|
+
question: {
|
|
49
|
+
type: string;
|
|
50
|
+
instructions: string;
|
|
51
|
+
criteria: {
|
|
52
|
+
platform: string;
|
|
53
|
+
app: string;
|
|
54
|
+
docs: string;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
inputs: {
|
|
58
|
+
"record.title": string;
|
|
59
|
+
"record.size": string;
|
|
60
|
+
};
|
|
61
|
+
deciders: ({
|
|
62
|
+
kind: string;
|
|
63
|
+
backend: string;
|
|
64
|
+
model: string;
|
|
65
|
+
threshold: number;
|
|
66
|
+
} | {
|
|
67
|
+
kind: string;
|
|
68
|
+
count: number;
|
|
69
|
+
})[];
|
|
70
|
+
};
|
|
71
|
+
effort: {
|
|
72
|
+
title: string;
|
|
73
|
+
question: {
|
|
74
|
+
type: string;
|
|
75
|
+
instructions: string;
|
|
76
|
+
criteria: string[];
|
|
77
|
+
};
|
|
78
|
+
inputs: {
|
|
79
|
+
"record.size": string;
|
|
80
|
+
"member.kind": string;
|
|
81
|
+
};
|
|
82
|
+
deciders: ({
|
|
83
|
+
kind: string;
|
|
84
|
+
backend: string;
|
|
85
|
+
model: string;
|
|
86
|
+
threshold: number;
|
|
87
|
+
} | {
|
|
88
|
+
kind: string;
|
|
89
|
+
count: number;
|
|
90
|
+
})[];
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
export declare function cleanScratch(): void;
|
|
95
|
+
export declare function git(cwd: string, ...args: string[]): string;
|
|
96
|
+
/** Make the workspace and commit it. Returns its root. */
|
|
97
|
+
export declare function workspace(points?: unknown): string;
|
|
98
|
+
/** The front matter text of a written record. */
|
|
99
|
+
export declare const recordText: (root: string, path: string) => string;
|
|
100
|
+
//# sourceMappingURL=decide-workspace.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"decide-workspace.d.ts","sourceRoot":"","sources":["../../../src/workspace/__fixtures__/decide-workspace.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAOH,2CAA2C;AAC3C,eAAO,MAAM,IAAI,QAAwE,CAAC;AAG1F,eAAO,MAAM,KAAK,eAAe,CAAC;AAIlC,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqBlB,CAAC;AAkCF,wBAAgB,YAAY,IAAI,IAAI,CAEnC;AAED,wBAAgB,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,CAE1D;AAED,0DAA0D;AAC1D,wBAAgB,SAAS,CAAC,MAAM,GAAE,OAAgB,GAAG,MAAM,CAyC1D;AAED,iDAAiD;AACjD,eAAO,MAAM,UAAU,GAAI,MAAM,MAAM,EAAE,MAAM,MAAM,KAAG,MAAiD,CAAC"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Answer records held on the lifecycle ledger (#2786).
|
|
3
|
+
*
|
|
4
|
+
* A steward's writes never touch the checkout's index or working tree
|
|
5
|
+
* (`../op/steward.ts`): the working tree is the coding agent's. A decision
|
|
6
|
+
* point asked in a steward's turn still has to leave its question somewhere a
|
|
7
|
+
* person finds it after the turn ends, and an Op's leased worktree is removed
|
|
8
|
+
* with the run. So a question asked in a steward's turn is written to
|
|
9
|
+
* `chant/lifecycle`, beside the lease histories and run records, under
|
|
10
|
+
* `_answers/<kind name>/<id>.md` in the ledger of the member that owns the
|
|
11
|
+
* answer kind. The file is the same Markdown record the kind's directory
|
|
12
|
+
* would hold, and it is written with git plumbing, like every ledger write.
|
|
13
|
+
*
|
|
14
|
+
* Readers see the ledger's answers as if they sat in the kind's directory:
|
|
15
|
+
* {@link withLedgerAnswers} lays them over the working tree, so `points`,
|
|
16
|
+
* `points --open`, a later `points ask` of the same question and `points
|
|
17
|
+
* answer` all find them. A record on the ledger wins over a file of the same
|
|
18
|
+
* name in the tree, because the ledger copy is the one a steward rewrote.
|
|
19
|
+
* People's answer to a question held on the ledger is written back there, so
|
|
20
|
+
* answering through hud in a box does not touch the checkout either.
|
|
21
|
+
*
|
|
22
|
+
* `points --at <rev>` reads a revision of the working branch, which the
|
|
23
|
+
* ledger is not part of, so it lists the tree's records only.
|
|
24
|
+
*/
|
|
25
|
+
import type { RecordSource } from "./record-source.js";
|
|
26
|
+
/** The directory on `chant/lifecycle`, under the member's prefix, that holds answer records. */
|
|
27
|
+
export declare const ANSWERS_LEDGER_DIR = "_answers";
|
|
28
|
+
/** One answer record on the ledger. */
|
|
29
|
+
export interface LedgerAnswer {
|
|
30
|
+
/** Where the record reads as being: the kind's directory, from the repository root. */
|
|
31
|
+
path: string;
|
|
32
|
+
/** Where it is: `chant/lifecycle:<path on the branch>`, which `git show` reads. */
|
|
33
|
+
ledger: string;
|
|
34
|
+
text: string;
|
|
35
|
+
/** Its blob sha, for a compare-and-set rewrite. */
|
|
36
|
+
sha: string;
|
|
37
|
+
}
|
|
38
|
+
/** The answer records one kind holds on the ledger. */
|
|
39
|
+
export interface LedgerAnswers {
|
|
40
|
+
/** Where the ledger is resolved from: the kind file's directory, so the member owning the kind owns its answers. */
|
|
41
|
+
cwd: string;
|
|
42
|
+
/** The directory on the branch, relative to the member's prefix. */
|
|
43
|
+
dir: string;
|
|
44
|
+
/** The kind's records directory, from the repository root. */
|
|
45
|
+
dirRel: string;
|
|
46
|
+
/** By the path each record reads as. */
|
|
47
|
+
byPath: Map<string, LedgerAnswer>;
|
|
48
|
+
}
|
|
49
|
+
/** The ledger directory of the kind named `kindName`. */
|
|
50
|
+
export declare function answersLedgerDir(kindName: string): string;
|
|
51
|
+
/**
|
|
52
|
+
* Read the answer records the kind at `kindFile` holds on the ledger. Empty
|
|
53
|
+
* when there are none, when there is no ledger branch, and outside a git
|
|
54
|
+
* repository.
|
|
55
|
+
*/
|
|
56
|
+
export declare function readLedgerAnswers(kind: {
|
|
57
|
+
file: string;
|
|
58
|
+
name: string;
|
|
59
|
+
dirRel: string;
|
|
60
|
+
}): Promise<LedgerAnswers>;
|
|
61
|
+
/** `base` with each ledger answer at the path it reads as, over any file of the same name. */
|
|
62
|
+
export declare function withLedgerAnswers(base: RecordSource, answers: LedgerAnswers): RecordSource;
|
|
63
|
+
/** Fetch `chant/lifecycle` before a ledger write when it fast-forwards, so a question another clone asked is found. Best effort. */
|
|
64
|
+
export declare function refreshLedger(kindFile: string): Promise<void>;
|
|
65
|
+
/**
|
|
66
|
+
* Write the record read as `path` to the ledger, expecting the blob it had
|
|
67
|
+
* when it was read (`prior`, null for a new record), then push the branch.
|
|
68
|
+
* A changed blob throws `RefCASConflictError` from `../lifecycle/git`. The
|
|
69
|
+
* push is best effort: a question that did not reach the remote is still
|
|
70
|
+
* open here. Returns where the record went.
|
|
71
|
+
*/
|
|
72
|
+
export declare function writeLedgerAnswer(answers: LedgerAnswers, path: string, text: string, message: string, prior: string | null): Promise<{
|
|
73
|
+
ledger: string;
|
|
74
|
+
pushed: boolean;
|
|
75
|
+
}>;
|
|
76
|
+
//# sourceMappingURL=answers-ledger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"answers-ledger.d.ts","sourceRoot":"","sources":["../../src/workspace/answers-ledger.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAIH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAGpD,gGAAgG;AAChG,eAAO,MAAM,kBAAkB,aAAa,CAAC;AAI7C,uCAAuC;AACvC,MAAM,WAAW,YAAY;IAC3B,uFAAuF;IACvF,IAAI,EAAE,MAAM,CAAC;IACb,mFAAmF;IACnF,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,mDAAmD;IACnD,GAAG,EAAE,MAAM,CAAC;CACb;AAED,uDAAuD;AACvD,MAAM,WAAW,aAAa;IAC5B,oHAAoH;IACpH,GAAG,EAAE,MAAM,CAAC;IACZ,oEAAoE;IACpE,GAAG,EAAE,MAAM,CAAC;IACZ,8DAA8D;IAC9D,MAAM,EAAE,MAAM,CAAC;IACf,wCAAwC;IACxC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;CACnC;AAED,yDAAyD;AACzD,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAEzD;AAMD;;;;GAIG;AACH,wBAAsB,iBAAiB,CAAC,IAAI,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,aAAa,CAAC,CAmBpH;AAED,8FAA8F;AAC9F,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,YAAY,EAAE,OAAO,EAAE,aAAa,GAAG,YAAY,CAI1F;AAED,oIAAoI;AACpI,wBAAsB,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAEnE;AAED;;;;;;GAMG;AACH,wBAAsB,iBAAiB,CAAC,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAAC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,OAAO,CAAA;CAAE,CAAC,CAK/K"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Box isolation (#2727): the ports, state paths and cookie names each box
|
|
3
|
+
* uses, derived from its identity and its host, never chosen by a runtime.
|
|
4
|
+
*
|
|
5
|
+
* A box is a member with a `box` block (#2726), and its name is the
|
|
6
|
+
* member's. A box's identity is its host, its name and its slot, from the
|
|
7
|
+
* block's `host` and `slot`. Everything else
|
|
8
|
+
* follows from those and the host's declaration, and nothing else goes in:
|
|
9
|
+
*
|
|
10
|
+
* - port `p` is `host.ports.from + slot * host.ports.perBox + offset(p)`;
|
|
11
|
+
* - the state directory is `<host.stateRoot>/<box name>`, and state entry
|
|
12
|
+
* `k` is that directory joined with the entry's relative path;
|
|
13
|
+
* - cookie `c` is `<c>_<box name>`.
|
|
14
|
+
*
|
|
15
|
+
* So the same declaration gives the same values on every machine and every
|
|
16
|
+
* run, and adding or removing a box changes no other box's values. The state
|
|
17
|
+
* paths keep their environment reference (`${XDG_STATE_HOME}` by default):
|
|
18
|
+
* the runtime that sets them expands it on its machine, and chant never
|
|
19
|
+
* reads the machine.
|
|
20
|
+
*
|
|
21
|
+
* Distinct names on one host give distinct state paths and cookie names by
|
|
22
|
+
* construction (a member name has no `_`, so `<c>_<box>` splits one way).
|
|
23
|
+
* Ports are the only value two boxes can share: two boxes on one host with
|
|
24
|
+
* the same slot, or two ports in one box at the same offset. `chant
|
|
25
|
+
* workspace check` compares every value anyway (WSP123), so an entry whose
|
|
26
|
+
* path escapes its directory is caught too.
|
|
27
|
+
*/
|
|
28
|
+
import { type BoxIsolationDeclaration, type Declaration, type Host, type Member } from "./declaration.js";
|
|
29
|
+
/** A box's isolation, resolved: what `chant workspace status --json` prints in the member's box block. */
|
|
30
|
+
export interface ResolvedIsolation {
|
|
31
|
+
host: string;
|
|
32
|
+
slot: number;
|
|
33
|
+
/** The box's block of its host's range, inclusive. */
|
|
34
|
+
portRange: {
|
|
35
|
+
from: number;
|
|
36
|
+
to: number;
|
|
37
|
+
};
|
|
38
|
+
/** Each declared port's number, in file order. */
|
|
39
|
+
ports: Record<string, number>;
|
|
40
|
+
/** `<stateRoot>/<box name>`, with the environment reference unexpanded. */
|
|
41
|
+
stateDir: string;
|
|
42
|
+
/** Each declared state entry's path, under `stateDir`. */
|
|
43
|
+
state: Record<string, string>;
|
|
44
|
+
/** Each declared cookie's name for this box. */
|
|
45
|
+
cookies: Record<string, string>;
|
|
46
|
+
}
|
|
47
|
+
/** The host's state root as written, or the default. */
|
|
48
|
+
export declare function stateRootOf(host: Host): string;
|
|
49
|
+
/** Resolve the isolation of the box named `name` on its host. */
|
|
50
|
+
export declare function resolveIsolation(name: string, box: BoxIsolationDeclaration, host: Host): ResolvedIsolation;
|
|
51
|
+
/** A member whose box block declares its isolation, with it resolved. */
|
|
52
|
+
export interface IsolatedBox {
|
|
53
|
+
member: Member;
|
|
54
|
+
isolation: ResolvedIsolation;
|
|
55
|
+
}
|
|
56
|
+
/** Every box that declares its isolation, resolved, in member order. The declaration read already checked each box's host exists. */
|
|
57
|
+
export declare function resolveBoxes(declaration: Declaration): IsolatedBox[];
|
|
58
|
+
/**
|
|
59
|
+
* Why a host's `stateRoot` is a literal machine path, or undefined when it is
|
|
60
|
+
* not. A state root starts with an environment reference the runtime expands,
|
|
61
|
+
* and that reference is not `$HOME`: a path under a home directory names one
|
|
62
|
+
* person's machine layout (`${HOME}/<user>/...`), where `${XDG_STATE_HOME}`
|
|
63
|
+
* names the place the machine keeps state.
|
|
64
|
+
*/
|
|
65
|
+
export declare function stateRootLiteral(root: string): string | undefined;
|
|
66
|
+
/**
|
|
67
|
+
* Why a state entry's path is not one relative to the box's state directory,
|
|
68
|
+
* or undefined when it is: absolute, home-relative, starting with an
|
|
69
|
+
* environment reference, a Windows drive path, or with a `..` segment.
|
|
70
|
+
*/
|
|
71
|
+
export declare function statePathLiteral(path: string): string | undefined;
|
|
72
|
+
export interface BoxLiteral {
|
|
73
|
+
/** The box, or null for a host's state root. */
|
|
74
|
+
box: string | null;
|
|
75
|
+
message: string;
|
|
76
|
+
pointer: string;
|
|
77
|
+
}
|
|
78
|
+
/** Every literal machine path in the hosts and boxes. */
|
|
79
|
+
export declare function boxLiterals(declaration: Declaration): BoxLiteral[];
|
|
80
|
+
export interface BoxCollision {
|
|
81
|
+
host: string;
|
|
82
|
+
what: "port" | "state" | "cookie";
|
|
83
|
+
/** The shared value. */
|
|
84
|
+
value: string;
|
|
85
|
+
/** Each holder as `<box>.<name>`, in declaration order. */
|
|
86
|
+
holders: {
|
|
87
|
+
box: string;
|
|
88
|
+
name: string;
|
|
89
|
+
pointer: string;
|
|
90
|
+
}[];
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Every value two holders on one host resolve to. Ports collide within a box
|
|
94
|
+
* too, since two listeners can't share a port; state entries in one box may
|
|
95
|
+
* name one file on purpose (a runtime and the door both reading hud's
|
|
96
|
+
* identity), and cookies are unique in a box by the schema.
|
|
97
|
+
*/
|
|
98
|
+
export declare function boxCollisions(declaration: Declaration): BoxCollision[];
|
|
99
|
+
//# sourceMappingURL=box-isolation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"box-isolation.d.ts","sourceRoot":"","sources":["../../src/workspace/box-isolation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EAAsB,KAAK,uBAAuB,EAAE,KAAK,WAAW,EAAE,KAAK,IAAI,EAAE,KAAK,MAAM,EAAE,MAAM,eAAe,CAAC;AAG3H,0GAA0G;AAC1G,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,sDAAsD;IACtD,SAAS,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC;IACxC,kDAAkD;IAClD,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9B,2EAA2E;IAC3E,QAAQ,EAAE,MAAM,CAAC;IACjB,0DAA0D;IAC1D,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9B,gDAAgD;IAChD,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACjC;AAED,wDAAwD;AACxD,wBAAgB,WAAW,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CAE9C;AAID,iEAAiE;AACjE,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,uBAAuB,EAAE,IAAI,EAAE,IAAI,GAAG,iBAAiB,CAY1G;AAED,yEAAyE;AACzE,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,iBAAiB,CAAC;CAC9B;AAED,qIAAqI;AACrI,wBAAgB,YAAY,CAAC,WAAW,EAAE,WAAW,GAAG,WAAW,EAAE,CAQpE;AAOD;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAKjE;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAOjE;AAED,MAAM,WAAW,UAAU;IACzB,gDAAgD;IAChD,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,yDAAyD;AACzD,wBAAgB,WAAW,CAAC,WAAW,EAAE,WAAW,GAAG,UAAU,EAAE,CAoBlE;AAID,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;IAClC,wBAAwB;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,2DAA2D;IAC3D,OAAO,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CAC3D;AAaD;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,WAAW,EAAE,WAAW,GAAG,YAAY,EAAE,CA2BtE"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `chant workspace check --changes <base>..<head> [--work <id>] [--severity
|
|
3
|
+
* off|warn|fail] [--kind <kind file>...] [--json]` (#2773): the forward
|
|
4
|
+
* coverage check (`changes.ts`), printed as JSON with `--json` or as one line
|
|
5
|
+
* per changed path, then the findings.
|
|
6
|
+
*/
|
|
7
|
+
import type { CommandContext } from "../cli/registry.js";
|
|
8
|
+
import { type ChangesDocument } from "./changes.js";
|
|
9
|
+
type Result = Exclude<ChangesDocument, {
|
|
10
|
+
error: unknown;
|
|
11
|
+
}>;
|
|
12
|
+
/** One line per changed path, then the findings and a summary. */
|
|
13
|
+
export declare function formatChanges(doc: Result): string;
|
|
14
|
+
export declare function runWorkspaceChanges(ctx: CommandContext, cwd: string): Promise<number>;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=changes-cli.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"changes-cli.d.ts","sourceRoot":"","sources":["../../src/workspace/changes-cli.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAmC,KAAK,eAAe,EAAE,MAAM,WAAW,CAAC;AAKlF,KAAK,MAAM,GAAG,OAAO,CAAC,eAAe,EAAE;IAAE,KAAK,EAAE,OAAO,CAAA;CAAE,CAAC,CAAC;AAE3D,kEAAkE;AAClE,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAmBjD;AAED,wBAAsB,mBAAmB,CAAC,GAAG,EAAE,cAAc,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAgB3F"}
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The forward coverage check: `chant workspace check --changes
|
|
3
|
+
* <base>..<head>` (#2773).
|
|
4
|
+
*
|
|
5
|
+
* `graph --intent` reads the join between records and code backwards, from a
|
|
6
|
+
* region to the decisions and work items whose `constrains` cover it. This
|
|
7
|
+
* reads it forwards. Each path a diff changes is mapped to the current
|
|
8
|
+
* records whose `constrains` cover it, and two gaps are findings with closed
|
|
9
|
+
* codes:
|
|
10
|
+
*
|
|
11
|
+
* - `change-uncovered`: no current decided record and no open work item
|
|
12
|
+
* covers the path, by a `path:` entry that is the path or a directory
|
|
13
|
+
* above it, or by the `member:` of the member holding it.
|
|
14
|
+
* - `change-out-of-scope`: a record in hand for the change lists the path in
|
|
15
|
+
* its `out_of_scope` (the field its kind names in `outOfScope`). With
|
|
16
|
+
* `--work <id>`, the records in hand are that work item and the decisions it
|
|
17
|
+
* implements; without it, every current record that covers some path the
|
|
18
|
+
* diff changes.
|
|
19
|
+
*
|
|
20
|
+
* A path the declaration's `changes.ignore` globs match is listed as
|
|
21
|
+
* `ignored`, and a record file of a kind read as `record`: a change to the
|
|
22
|
+
* records is the coverage itself. The declaration's `changes.severity` says
|
|
23
|
+
* what a finding does: `off` reports none, `warn` (the default) reports them
|
|
24
|
+
* and passes, `fail` reports them and fails. Nothing here runs unless the
|
|
25
|
+
* check is asked for, so a workspace that never asks pays nothing.
|
|
26
|
+
*
|
|
27
|
+
* Records are read at `<head>`, so a change that adds the work item covering
|
|
28
|
+
* it is covered. Each finding carries `triage`, the `{ finding, region }` a
|
|
29
|
+
* work item's `source` takes (`work.schema.json`'s `sourceGap`), so the
|
|
30
|
+
* finding-triage decision point (#2741) can seed a work item or a decision
|
|
31
|
+
* from it; see {@link changeFindingSource}. When a work kind is read, each
|
|
32
|
+
* finding also says whether a work item already addresses it, the way `graph
|
|
33
|
+
* --intent` says it for its own findings (#2683), and
|
|
34
|
+
* {@link changeFindingTriageInputs} turns a finding into that point's inputs
|
|
35
|
+
* (#2794). Git is read through a local `git` subprocess only: no fetch, no
|
|
36
|
+
* network.
|
|
37
|
+
*/
|
|
38
|
+
import { type ChangeSeverity } from "./declaration.js";
|
|
39
|
+
/** The version of the `changes` document this chant writes. */
|
|
40
|
+
export declare const CHANGES_CONTRACT_VERSION = 1;
|
|
41
|
+
/** `$id` of the JSON Schema for the document, shipped beside this file. */
|
|
42
|
+
export declare const CHANGES_OUTPUT_SCHEMA_ID = "https://intentius.io/chant/schemas/workspace/changes/v1/changes.schema.json";
|
|
43
|
+
/** The finding codes. Closed: a reader may switch on them. */
|
|
44
|
+
export declare const CHANGES_FINDING_CODES: readonly ["change-uncovered", "change-out-of-scope"];
|
|
45
|
+
export type ChangesFindingCode = (typeof CHANGES_FINDING_CODES)[number];
|
|
46
|
+
/** Why the check failed as a whole: the declaration's codes, the record kind's, or a `--work` item no record has. */
|
|
47
|
+
export declare const CHANGES_ERROR_CODES: readonly ["declaration-missing", "declaration-ambiguous", "declaration-unparseable", "declaration-invalid", "placement-invalid", "reader-too-old", "root-chant-required", "not-a-git-repository", "revision-unknown", "kind-unreadable", "kind-invalid", "schema-unreadable", "schema-id-mismatch", "schema-invalid", "location-missing", "work-item-unknown"];
|
|
48
|
+
export type ChangesErrorCode = (typeof CHANGES_ERROR_CODES)[number];
|
|
49
|
+
export declare const CHANGE_SEVERITIES: readonly ["off", "warn", "fail"];
|
|
50
|
+
/** A record, as `<kind name>/<id>`, and the entry that ties it to the path. */
|
|
51
|
+
export interface ChangeRecordRef {
|
|
52
|
+
record: string;
|
|
53
|
+
state: string | null;
|
|
54
|
+
/** The constrains or out_of_scope entry. */
|
|
55
|
+
entry: string;
|
|
56
|
+
}
|
|
57
|
+
export type ChangeStatus = "covered" | "uncovered" | "out-of-scope" | "ignored" | "record";
|
|
58
|
+
export interface ChangedPath {
|
|
59
|
+
/** From the workspace root. */
|
|
60
|
+
path: string;
|
|
61
|
+
change: "added" | "modified" | "deleted" | "renamed";
|
|
62
|
+
/** For a rename, the path it had at base. */
|
|
63
|
+
from: string | null;
|
|
64
|
+
/** The member whose directory holds the path, or null. */
|
|
65
|
+
member: string | null;
|
|
66
|
+
/** Whether the path is a generated file, as `graph --intent` reads a region's `generated` (#2794). */
|
|
67
|
+
generated: boolean;
|
|
68
|
+
status: ChangeStatus;
|
|
69
|
+
/** The current records covering the path, with the entry that covers it. */
|
|
70
|
+
coveredBy: ChangeRecordRef[];
|
|
71
|
+
/** The records in hand that put the path out of scope. */
|
|
72
|
+
outOfScopeBy: ChangeRecordRef[];
|
|
73
|
+
/** For an ignored path, the first glob that matched it. */
|
|
74
|
+
ignoredBy: string | null;
|
|
75
|
+
}
|
|
76
|
+
export interface ChangeFinding {
|
|
77
|
+
/** `finding:<code>:<path>`: one finding per path. */
|
|
78
|
+
id: string;
|
|
79
|
+
code: ChangesFindingCode;
|
|
80
|
+
path: string;
|
|
81
|
+
message: string;
|
|
82
|
+
severity: "warn" | "fail";
|
|
83
|
+
/** The records the finding concerns, as `<kind name>/<id>`: for out-of-scope, the records that put the path out. */
|
|
84
|
+
records: string[];
|
|
85
|
+
/** What a work item's `source` takes to name this gap (#2741): `{ finding, region }`. */
|
|
86
|
+
triage: {
|
|
87
|
+
finding: ChangesFindingCode;
|
|
88
|
+
region: string;
|
|
89
|
+
};
|
|
90
|
+
/**
|
|
91
|
+
* Present when a work kind was read (#2794): whether a work item addresses
|
|
92
|
+
* the finding, because its `source.finding` is this code and its
|
|
93
|
+
* `source.region` is this path or a directory above it.
|
|
94
|
+
*/
|
|
95
|
+
addressed?: boolean;
|
|
96
|
+
/** Present when a work kind was read: the work items addressing the finding, as `<kind name>/<id>`, each with its state. */
|
|
97
|
+
addressedBy?: {
|
|
98
|
+
record: string;
|
|
99
|
+
state: string | null;
|
|
100
|
+
}[];
|
|
101
|
+
}
|
|
102
|
+
/** The inputs of the finding-triage decision point (#2741), by the names `decisions/points.json` declares. */
|
|
103
|
+
export type ChangeFindingTriageInputs = {
|
|
104
|
+
"finding.code": ChangesFindingCode;
|
|
105
|
+
"finding.message": string;
|
|
106
|
+
"finding.addressed": boolean;
|
|
107
|
+
"region.path": string;
|
|
108
|
+
"region.member": string | null;
|
|
109
|
+
"region.generated": boolean;
|
|
110
|
+
};
|
|
111
|
+
interface Head {
|
|
112
|
+
$schema: string;
|
|
113
|
+
contract: number;
|
|
114
|
+
chant: string;
|
|
115
|
+
}
|
|
116
|
+
export type ChangesDocument = (Head & {
|
|
117
|
+
workspace: {
|
|
118
|
+
name: string;
|
|
119
|
+
root: string;
|
|
120
|
+
};
|
|
121
|
+
range: {
|
|
122
|
+
spec: string;
|
|
123
|
+
base: string;
|
|
124
|
+
head: string;
|
|
125
|
+
};
|
|
126
|
+
severity: ChangeSeverity;
|
|
127
|
+
ignore: string[];
|
|
128
|
+
/** The work item in hand, from `--work`, or null. */
|
|
129
|
+
work: {
|
|
130
|
+
record: string;
|
|
131
|
+
state: string | null;
|
|
132
|
+
} | null;
|
|
133
|
+
kinds: {
|
|
134
|
+
file: string;
|
|
135
|
+
name: string;
|
|
136
|
+
role: "decision" | "work" | "other";
|
|
137
|
+
}[];
|
|
138
|
+
paths: ChangedPath[];
|
|
139
|
+
findings: ChangeFinding[];
|
|
140
|
+
summary: {
|
|
141
|
+
paths: number;
|
|
142
|
+
covered: number;
|
|
143
|
+
uncovered: number;
|
|
144
|
+
outOfScope: number;
|
|
145
|
+
ignored: number;
|
|
146
|
+
records: number;
|
|
147
|
+
};
|
|
148
|
+
/** False only when severity is fail and there are findings. */
|
|
149
|
+
ok: boolean;
|
|
150
|
+
}) | (Head & {
|
|
151
|
+
error: {
|
|
152
|
+
code: ChangesErrorCode;
|
|
153
|
+
message: string;
|
|
154
|
+
};
|
|
155
|
+
});
|
|
156
|
+
export interface ChangesQuery {
|
|
157
|
+
/** Where the walk up to the declaration starts. */
|
|
158
|
+
cwd: string;
|
|
159
|
+
/** `<base>..<head>`, `<base>...<head>` (from their merge base), or `<base>` alone, to HEAD. */
|
|
160
|
+
range: string;
|
|
161
|
+
/** Kind files, relative to `cwd`. Left out, every record kind the declaration names. */
|
|
162
|
+
kinds?: string[];
|
|
163
|
+
/** The id of the work item in hand, such as the item an Op's work lease holds. */
|
|
164
|
+
work?: string;
|
|
165
|
+
/** In place of the declaration's `changes.severity`. */
|
|
166
|
+
severity?: ChangeSeverity;
|
|
167
|
+
}
|
|
168
|
+
export interface ChangesResult {
|
|
169
|
+
doc: ChangesDocument;
|
|
170
|
+
/** The read failed, or severity is fail and there are findings. */
|
|
171
|
+
failed: boolean;
|
|
172
|
+
}
|
|
173
|
+
/** The `source` a work item seeded from this finding carries (`work.schema.json`'s `sourceGap`): the seam for the finding-triage point (#2741). */
|
|
174
|
+
export declare function changeFindingSource(finding: Pick<ChangeFinding, "code" | "path">): {
|
|
175
|
+
finding: ChangesFindingCode;
|
|
176
|
+
region: string;
|
|
177
|
+
};
|
|
178
|
+
/**
|
|
179
|
+
* The finding-triage point's inputs for a change finding and the entry in
|
|
180
|
+
* `paths` it fired on (#2794), for `askPoint` or the `decide` activity. The
|
|
181
|
+
* same names a caller fills from `graph --intent`'s finding and region nodes.
|
|
182
|
+
* The region is the changed file, so `region.generated` is never null. A
|
|
183
|
+
* document that read no work kind has no `addressed`, and it is passed as
|
|
184
|
+
* false: nothing that was read addresses the finding.
|
|
185
|
+
*/
|
|
186
|
+
export declare function changeFindingTriageInputs(finding: Pick<ChangeFinding, "code" | "message" | "path" | "addressed">, path: Pick<ChangedPath, "path" | "member" | "generated">): ChangeFindingTriageInputs;
|
|
187
|
+
/** Run the check and build the document. Never throws a {@link WorkspaceReadError} or {@link RecordReadError}. */
|
|
188
|
+
export declare function checkChanges(query: ChangesQuery): Promise<ChangesResult>;
|
|
189
|
+
/**
|
|
190
|
+
* For a checkout on a work branch, `chant/work/[<member>/]<id>`, as an Op
|
|
191
|
+
* with `changesCheckout` works in (#2748): the range from where the branch
|
|
192
|
+
* left the main worktree's HEAD to its own HEAD, and the item's id. Undefined
|
|
193
|
+
* on any other branch.
|
|
194
|
+
*/
|
|
195
|
+
export declare function workBranchChanges(cwd: string): {
|
|
196
|
+
range: string;
|
|
197
|
+
work: string;
|
|
198
|
+
} | undefined;
|
|
199
|
+
export {};
|
|
200
|
+
//# sourceMappingURL=changes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"changes.d.ts","sourceRoot":"","sources":["../../src/workspace/changes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAMH,OAAO,EAAkG,KAAK,cAAc,EAAE,MAAM,eAAe,CAAC;AAYpJ,+DAA+D;AAC/D,eAAO,MAAM,wBAAwB,IAAI,CAAC;AAE1C,2EAA2E;AAC3E,eAAO,MAAM,wBAAwB,gFAAgF,CAAC;AAEtH,8DAA8D;AAC9D,eAA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a,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,WAAW,CAAC,EACvE,IAAI,EAAE,IAAI,CAAC,WAAW,EAAE,MAAM,GAAG,QAAQ,GAAG,WAAW,CAAC,GACvD,yBAAyB,CAU3B;AA+ED,kHAAkH;AAClH,wBAAsB,YAAY,CAAC,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC,aAAa,CAAC,CAW9E;AA2KD;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAmB1F"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `chud-lexicon-exit-fly-site` (#2809): declare a migrated repo's Fly site
|
|
3
|
+
* with the fly lexicon's `FlySite` composite.
|
|
4
|
+
*
|
|
5
|
+
* `chud-lexicon-exit` (0.92.0) deleted deploy/site.ts, chud's `ChudLocalSite`
|
|
6
|
+
* composite, and removed chud's `FlySite` marker from deploy/fly.ts, so the
|
|
7
|
+
* repo declared no composite instance: `chant workspace graph --composites`
|
|
8
|
+
* listed none, and nothing told a reader the app component deploys the site.
|
|
9
|
+
* Per ws-056 the Fly resources stay on the fly lexicon. This migration:
|
|
10
|
+
*
|
|
11
|
+
* - rewrites deploy/fly.ts as one `FlySite` instance (`flySite`) with the
|
|
12
|
+
* values deploy/fly.ts and deploy/fly-machine.ts declared, and deletes
|
|
13
|
+
* deploy/fly-machine.ts, when the two declare exactly the template's
|
|
14
|
+
* resources (comments aside). The build's plan has the same App, Volume,
|
|
15
|
+
* IP, Secret and one Machine, which the release Op's `flyRelease` finds;
|
|
16
|
+
* - names `FlySite` in the app component's `composites`, so the listing joins
|
|
17
|
+
* the instance to the component.
|
|
18
|
+
*
|
|
19
|
+
* A site the project changed keeps its files, and the plan lists the
|
|
20
|
+
* composite as not moved. The plan is empty unless the app component is the
|
|
21
|
+
* one `chud-lexicon-exit` wrote and names no composites yet.
|
|
22
|
+
*/
|
|
23
|
+
import type { ChantMigration } from "../chant-migrations.js";
|
|
24
|
+
export declare const CHUD_LEXICON_EXIT_FLY_SITE = "chud-lexicon-exit-fly-site";
|
|
25
|
+
/** The template's Fly site, as deploy/fly.ts and deploy/fly-machine.ts declare it. */
|
|
26
|
+
export interface FlySiteValues {
|
|
27
|
+
/** The import that gives the app's name, kept as it is: `import { appSlug } from "../app-name.ts";`. */
|
|
28
|
+
nameImport: string | null;
|
|
29
|
+
/** The expression the App's name is, as written. */
|
|
30
|
+
app: string;
|
|
31
|
+
region: string;
|
|
32
|
+
machine: string;
|
|
33
|
+
image: string;
|
|
34
|
+
port: string;
|
|
35
|
+
env: string;
|
|
36
|
+
cpuKind: string;
|
|
37
|
+
cpus: string;
|
|
38
|
+
memoryMb: string;
|
|
39
|
+
volume: {
|
|
40
|
+
name: string;
|
|
41
|
+
sizeGb: string;
|
|
42
|
+
path: string;
|
|
43
|
+
};
|
|
44
|
+
ip: string;
|
|
45
|
+
secret: {
|
|
46
|
+
name: string;
|
|
47
|
+
value: string;
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* The Fly site's values when deploy/fly.ts and deploy/fly-machine.ts declare
|
|
52
|
+
* exactly the template's resources (their comments aside), or null. A site
|
|
53
|
+
* the project changed is left in its files, and the plan says so.
|
|
54
|
+
*/
|
|
55
|
+
export declare function readFlySite(fly: string, machine: string): FlySiteValues | null;
|
|
56
|
+
/** deploy/fly.ts declaring the site with the fly lexicon's FlySite composite. */
|
|
57
|
+
export declare function flySiteFile(v: FlySiteValues): string;
|
|
58
|
+
export declare const chudLexiconExitFlySite: ChantMigration;
|
|
59
|
+
//# sourceMappingURL=chud-lexicon-exit-fly-site.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chud-lexicon-exit-fly-site.d.ts","sourceRoot":"","sources":["../../../src/workspace/chant-migrations/chud-lexicon-exit-fly-site.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAIH,OAAO,KAAK,EAAE,cAAc,EAAsE,MAAM,qBAAqB,CAAC;AAE9H,eAAO,MAAM,0BAA0B,+BAA+B,CAAC;AASvE,sFAAsF;AACtF,MAAM,WAAW,aAAa;IAC5B,wGAAwG;IACxG,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,oDAAoD;IACpD,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IACvD,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;CACzC;AAgDD;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,aAAa,GAAG,IAAI,CAuB9E;AAED,iFAAiF;AACjF,wBAAgB,WAAW,CAAC,CAAC,EAAE,aAAa,GAAG,MAAM,CA4CpD;AAqDD,eAAO,MAAM,sBAAsB,EAAE,cAIpC,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `chud-lexicon-exit-live-names` (#2833): join the migrated `app` component
|
|
3
|
+
* to the Machine its release Op ships to, so `chant components status --live`
|
|
4
|
+
* reads it reconciled instead of stale.
|
|
5
|
+
*
|
|
6
|
+
* `chud-lexicon-exit` (0.92.0) rewrote `deploy/app.component.ts` off chud's
|
|
7
|
+
* app component, and wrote no `liveNames` on it. `components status --live`
|
|
8
|
+
* joins a component to live entities by name (`Component.liveNames`, falling
|
|
9
|
+
* back to the component's own name), and the component is `app` while the
|
|
10
|
+
* Machine the release Op ships to is some other entity. With no `liveNames`,
|
|
11
|
+
* the identity fallback looks for an entity named `app`, finds none, and the
|
|
12
|
+
* status reads `stale` even right after a release.
|
|
13
|
+
*
|
|
14
|
+
* This migration adds `liveNames: [<name>]` to the app component chant
|
|
15
|
+
* wrote, deriving `<name>` from what the member's Fly resources actually
|
|
16
|
+
* declare (#2839) rather than assuming one: while `deploy/fly-machine.ts`
|
|
17
|
+
* still declares the Machine directly, it is the entity `server`, its own
|
|
18
|
+
* top-level export. Once chant#2809's `FlySite` migration has taken over
|
|
19
|
+
* (deploy/fly.ts declares the site with the fly lexicon's `FlySite`
|
|
20
|
+
* composite and `fly-machine.ts` is gone), the composite expands its
|
|
21
|
+
* `machine` member under the site's own instance name, so the Machine is
|
|
22
|
+
* `<instance>Machine` — `flySiteMachine` for the instance name the FlySite
|
|
23
|
+
* migration writes (`flySite`), but read from the file rather than assumed,
|
|
24
|
+
* since a person may rename the export. The two migrations run in registry
|
|
25
|
+
* order (`FlySite` first), so a fresh upgrade that takes both always sees the
|
|
26
|
+
* post-`FlySite` shape by the time this one plans.
|
|
27
|
+
*
|
|
28
|
+
* It looks for the component `chud-lexicon-exit` left (by its own comment and
|
|
29
|
+
* shape) and inserts the field after `dependsOn: [],` rather than next to
|
|
30
|
+
* `archetype` — chant#2809's `FlySite` migration recognises the component by
|
|
31
|
+
* the exact, contiguous text `archetype: "service",\n dependsOn: [],\n`, so
|
|
32
|
+
* anything inserted between those two lines (by either migration, in either
|
|
33
|
+
* order) would stop it from finding a component whose `composites` a person
|
|
34
|
+
* later removes. Anchoring after `dependsOn` instead keeps that pair intact
|
|
35
|
+
* whichever of the two migrations plans first.
|
|
36
|
+
*
|
|
37
|
+
* The plan is empty once `liveNames` already names the Machine this would
|
|
38
|
+
* derive. A component whose `liveNames` is exactly `["server"]` — this
|
|
39
|
+
* migration's own hardcoded output before #2839 — is corrected once the
|
|
40
|
+
* Machine it names is gone (`FlySite` has since taken over); any other
|
|
41
|
+
* hand-set value is left alone, on the same "by any hand" rule the empty
|
|
42
|
+
* case follows. It is a conflict when the component still reads as
|
|
43
|
+
* chud-lexicon-exit's but the `dependsOn: [],` line the edit anchors on is
|
|
44
|
+
* gone, or neither `deploy/fly.ts` nor `deploy/fly-machine.ts` says what the
|
|
45
|
+
* Machine's live name is — either way a person needs to add the mapping by
|
|
46
|
+
* hand.
|
|
47
|
+
*/
|
|
48
|
+
import type { ChantMigration } from "../chant-migrations.js";
|
|
49
|
+
export declare const CHUD_LEXICON_EXIT_LIVE_NAMES = "chud-lexicon-exit-live-names";
|
|
50
|
+
export declare const chudLexiconExitLiveNames: ChantMigration;
|
|
51
|
+
//# sourceMappingURL=chud-lexicon-exit-live-names.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chud-lexicon-exit-live-names.d.ts","sourceRoot":"","sources":["../../../src/workspace/chant-migrations/chud-lexicon-exit-live-names.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AAGH,OAAO,KAAK,EAAE,cAAc,EAA0E,MAAM,qBAAqB,CAAC;AAGlI,eAAO,MAAM,4BAA4B,iCAAiC,CAAC;AA2G3E,eAAO,MAAM,wBAAwB,EAAE,cAItC,CAAC"}
|