@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lint/rules/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lint/rules/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAExC,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAAE,8BAA8B,EAAE,MAAM,gCAAgC,CAAC;AAChF,OAAO,EAAE,4BAA4B,EAAE,MAAM,+BAA+B,CAAC;AAC7E,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AACvE,OAAO,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AACvE,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,8BAA8B,EAAE,MAAM,iCAAiC,CAAC;AACjF,OAAO,EAAE,6BAA6B,EAAE,MAAM,gCAAgC,CAAC;AAC/E,OAAO,EAAE,+BAA+B,EAAE,MAAM,kCAAkC,CAAC;AACnF,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,EAAE,2BAA2B,EAAE,MAAM,8BAA8B,CAAC;AAC3E,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EAAE,6BAA6B,EAAE,MAAM,gCAAgC,CAAC;AAC/E,OAAO,EAAE,8BAA8B,EAAE,MAAM,iCAAiC,CAAC;AACjF,OAAO,EAAE,4BAA4B,EAAE,MAAM,+BAA+B,CAAC;AAC7E,OAAO,EAAE,4BAA4B,EAAE,MAAM,+BAA+B,CAAC;AAC7E,OAAO,EAAE,oCAAoC,EAAE,MAAM,wCAAwC,CAAC;AAC9F,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3G,OAAO,EAAE,8BAA8B,EAAE,MAAM,iCAAiC,CAAC;AACjF,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AA6B7D;;GAEG;AACH,wBAAgB,aAAa,IAAI,QAAQ,EAAE,CA6B1C"}
|
|
@@ -5,13 +5,24 @@
|
|
|
5
5
|
* `coreReceiptChecks`) so they run over the FULL build result regardless of
|
|
6
6
|
* which lexicons are configured — an Op is recognized by entity type
|
|
7
7
|
* (`../../../op/resource.ts`'s `OpResource`), not by which lexicon declared
|
|
8
|
-
* it.
|
|
8
|
+
* it. SYS010 (#2828) joined them when the `decide` activity moved into core:
|
|
9
|
+
* it reads the decide steps, and the `decide.backends` the caller passes.
|
|
9
10
|
*/
|
|
10
11
|
import type { PostSynthCheck } from "../../post-synth.js";
|
|
12
|
+
import type { DecideBackend } from "../../../op/decide-config.js";
|
|
11
13
|
export { ops012 } from "./ops012-activity-contract.js";
|
|
12
14
|
export { ops013 } from "./ops013-step-output-ref.js";
|
|
13
15
|
export { ops014 } from "./ops014-converge-rule-refusals.js";
|
|
14
16
|
export { ops015 } from "./ops015-gate-approval.js";
|
|
15
|
-
|
|
16
|
-
export
|
|
17
|
+
export { sys010, sys010Check } from "./sys010-key-over-plain-http.js";
|
|
18
|
+
export interface CoreOpCheckOptions {
|
|
19
|
+
/** `decide.backends` from the project's chant.config, for SYS010 (#2828). */
|
|
20
|
+
decideBackends?: Record<string, Pick<DecideBackend, "url" | "key">>;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Core's own post-synth checks over the Op model: OPS012, OPS013, OPS014,
|
|
24
|
+
* OPS015, and SYS010 over the `decide` steps and the configured decide
|
|
25
|
+
* backends.
|
|
26
|
+
*/
|
|
27
|
+
export declare function coreOpChecks(opts?: CoreOpCheckOptions): PostSynthCheck[];
|
|
17
28
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lint/rules/op/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lint/rules/op/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAMvD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE/D,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAC;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAEnE,MAAM,WAAW,kBAAkB;IACjC,6EAA6E;IAC7E,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,aAAa,EAAE,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC;CACrE;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,IAAI,GAAE,kBAAuB,GAAG,cAAc,EAAE,CAE5E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ops014-converge-rule-refusals.d.ts","sourceRoot":"","sources":["../../../../src/lint/rules/op/ops014-converge-rule-refusals.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AACH,OAAO,KAAK,EAAE,cAAc,EAAyC,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"ops014-converge-rule-refusals.d.ts","sourceRoot":"","sources":["../../../../src/lint/rules/op/ops014-converge-rule-refusals.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AACH,OAAO,KAAK,EAAE,cAAc,EAAyC,MAAM,kBAAkB,CAAC;AA0B9F,eAAO,MAAM,MAAM,EAAE,cAwGpB,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SYS010: a `decide` backend sends its key over plain HTTP (#2740, core's
|
|
3
|
+
* since #2828).
|
|
4
|
+
*
|
|
5
|
+
* A backend in `decide.backends` in chant.config, or in a `decide` step's own
|
|
6
|
+
* `backends`, may have a key and an `http://` URL. The bearer key then crosses
|
|
7
|
+
* the network in clear text. A loopback address (127.0.0.1, ::1, localhost)
|
|
8
|
+
* is exempt, since that is where a local server such as `von serve` or the
|
|
9
|
+
* stub runs, and where a broker that is itself the endpoint listens.
|
|
10
|
+
*
|
|
11
|
+
* The steps are read off the Op entities, which covers a step written with
|
|
12
|
+
* the `decide` builder and one written with `activity("decide", ...)`. The
|
|
13
|
+
* configured backends are not entities: `chant build` and `chant lint` read
|
|
14
|
+
* them from the project's config and hand them to {@link sys010Check}. The id
|
|
15
|
+
* keeps the SYS prefix it had in the systemone lexicon.
|
|
16
|
+
*/
|
|
17
|
+
import type { PostSynthCheck } from "../../post-synth.js";
|
|
18
|
+
import type { DecideBackend } from "../../../op/decide-config.js";
|
|
19
|
+
/** The host of an http:// URL that is not loopback, or undefined. */
|
|
20
|
+
export declare function plainRemoteHost(url: unknown): string | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* SYS010 over the Op entities and, when given, the backends configured in
|
|
23
|
+
* `decide.backends`. A configured backend's diagnostic names it as the entity
|
|
24
|
+
* `decide.backends.<name>`.
|
|
25
|
+
*/
|
|
26
|
+
export declare function sys010Check(configured?: Record<string, Pick<DecideBackend, "url" | "key">>): PostSynthCheck;
|
|
27
|
+
/** SYS010 over the Op entities alone, with no configured backends. */
|
|
28
|
+
export declare const sys010: PostSynthCheck;
|
|
29
|
+
//# sourceMappingURL=sys010-key-over-plain-http.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sys010-key-over-plain-http.d.ts","sourceRoot":"","sources":["../../../../src/lint/rules/op/sys010-key-over-plain-http.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAyC,MAAM,kBAAkB,CAAC;AAE9F,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAgB/D,qEAAqE;AACrE,wBAAgB,eAAe,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAUhE;AAID;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,aAAa,EAAE,KAAK,GAAG,KAAK,CAAC,CAAC,GAAG,cAAc,CAyC3G;AAED,sEAAsE;AACtE,eAAO,MAAM,MAAM,EAAE,cAA8B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sys001-no-literal-key.d.ts","sourceRoot":"","sources":["../../../src/lint/rules/sys001-no-literal-key.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAA+B,MAAM,SAAS,CAAC;AAgCrE,eAAO,MAAM,gBAAgB,EAAE,QAiC9B,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A stub `POST /v1/systemone` server for tests of the `decide` activity
|
|
3
|
+
* (`@intentius/chant/op/__fixtures__/decide-stub-backend`): a real HTTP server on
|
|
4
|
+
* 127.0.0.1 that checks a request the way a Jev-compatible server would and
|
|
5
|
+
* answers with what the test scripts. No model runs.
|
|
6
|
+
*
|
|
7
|
+
* ```ts
|
|
8
|
+
* const stub = await startStubBackend({ key: "k", answers: { slice_tier: { type: "choice", choice: "large", probabilities: {...}, confidence: 0.9 } } });
|
|
9
|
+
* // decide.backends, or a decide step's backends: { systemone: { url: stub.url, key: { env: "STUB_KEY" } } }
|
|
10
|
+
* await stub.close();
|
|
11
|
+
* ```
|
|
12
|
+
*
|
|
13
|
+
* It answers 401 when a key is set and the request's bearer differs, 422 when
|
|
14
|
+
* the body is not a request in the wire format, and `status` when the test
|
|
15
|
+
* forces one (429 or 529, say). Every request it read is kept in `requests`.
|
|
16
|
+
*
|
|
17
|
+
* It lives under `__fixtures__` because it listens on a port, and no module
|
|
18
|
+
* chant runs does (#2657, `test/no-listener.test.ts`): only tests start it.
|
|
19
|
+
*/
|
|
20
|
+
import type { WireAnswer } from "../../workspace/points.js";
|
|
21
|
+
import { type BackendRequest } from "../decide-backend.js";
|
|
22
|
+
export interface StubQuestion {
|
|
23
|
+
name: string;
|
|
24
|
+
type: string;
|
|
25
|
+
instructions: string;
|
|
26
|
+
criteria: Record<string, string> | string[];
|
|
27
|
+
}
|
|
28
|
+
export interface StubBackendOptions {
|
|
29
|
+
/** The bearer key the stub requires. Without it, any request is taken. */
|
|
30
|
+
key?: string;
|
|
31
|
+
/** The model id the response reports. Defaults to the id the request sent. */
|
|
32
|
+
model?: string;
|
|
33
|
+
/** The answer to a question, by question name, or computed from the question. Defaults to {@link defaultAnswer}. */
|
|
34
|
+
answers?: Record<string, WireAnswer> | ((question: StubQuestion, request: BackendRequest) => WireAnswer);
|
|
35
|
+
/** Answer every request with this status and no answers. */
|
|
36
|
+
status?: number;
|
|
37
|
+
}
|
|
38
|
+
export interface StubBackend {
|
|
39
|
+
/** The base URL, without `/v1/systemone`. */
|
|
40
|
+
url: string;
|
|
41
|
+
/** Each request body the stub read, in order. */
|
|
42
|
+
requests: BackendRequest[];
|
|
43
|
+
/** The Authorization header of each request, or null. */
|
|
44
|
+
authorizations: (string | null)[];
|
|
45
|
+
close(): Promise<void>;
|
|
46
|
+
}
|
|
47
|
+
/** A confident answer of the question's own type: true, the first option, or the last level. */
|
|
48
|
+
export declare function defaultAnswer(question: StubQuestion): WireAnswer;
|
|
49
|
+
/** Why a body is not a request in the wire format, or null when it is one. */
|
|
50
|
+
export declare function requestProblem(body: unknown): string | null;
|
|
51
|
+
/** Start the stub on a free port on 127.0.0.1. */
|
|
52
|
+
export declare function startStubBackend(opts?: StubBackendOptions): Promise<StubBackend>;
|
|
53
|
+
//# sourceMappingURL=decide-stub-backend.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"decide-stub-backend.d.ts","sourceRoot":"","sources":["../../../src/op/__fixtures__/decide-stub-backend.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAkB,KAAK,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAExE,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,EAAE,CAAC;CAC7C;AAED,MAAM,WAAW,kBAAkB;IACjC,0EAA0E;IAC1E,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,8EAA8E;IAC9E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oHAAoH;IACpH,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,YAAY,EAAE,OAAO,EAAE,cAAc,KAAK,UAAU,CAAC,CAAC;IACzG,4DAA4D;IAC5D,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,WAAW;IAC1B,6CAA6C;IAC7C,GAAG,EAAE,MAAM,CAAC;IACZ,iDAAiD;IACjD,QAAQ,EAAE,cAAc,EAAE,CAAC;IAC3B,yDAAyD;IACzD,cAAc,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,CAAC;IAClC,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACxB;AAED,gGAAgG;AAChG,wBAAgB,aAAa,CAAC,QAAQ,EAAE,YAAY,GAAG,UAAU,CAchE;AAED,8EAA8E;AAC9E,wBAAgB,cAAc,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAoB3D;AAaD,kDAAkD;AAClD,wBAAsB,gBAAgB,CAAC,IAAI,GAAE,kBAAuB,GAAG,OAAO,CAAC,WAAW,CAAC,CAqC1F"}
|
|
@@ -48,10 +48,17 @@ export declare const shellCmdContract: import("../index.js").ActivityContract<{
|
|
|
48
48
|
env?: Record<string, string> | undefined;
|
|
49
49
|
cwd?: string | undefined;
|
|
50
50
|
okExit?: number[] | undefined;
|
|
51
|
+
gatedExit?: number | undefined;
|
|
52
|
+
gate?: {
|
|
53
|
+
op: string;
|
|
54
|
+
gate: string;
|
|
55
|
+
} | undefined;
|
|
56
|
+
json?: boolean | undefined;
|
|
51
57
|
}, {
|
|
52
58
|
stdout: string;
|
|
53
59
|
stderr: string;
|
|
54
60
|
exitCode: number;
|
|
61
|
+
json?: unknown;
|
|
55
62
|
}>;
|
|
56
63
|
export declare const httpCheckContract: import("../index.js").ActivityContract<{
|
|
57
64
|
url: string;
|
|
@@ -117,7 +124,7 @@ export declare const behaviourFindingContract: import("../index.js").ActivityCon
|
|
|
117
124
|
export declare const proposeWorkspaceUpgradeContract: import("../index.js").ActivityContract<{
|
|
118
125
|
scope?: string | undefined;
|
|
119
126
|
to?: string | undefined;
|
|
120
|
-
mode?: "report" | "
|
|
127
|
+
mode?: "report" | "branch" | "pull-request" | undefined;
|
|
121
128
|
branch?: string | undefined;
|
|
122
129
|
base?: string | undefined;
|
|
123
130
|
remote?: string | undefined;
|
|
@@ -125,7 +132,7 @@ export declare const proposeWorkspaceUpgradeContract: import("../index.js").Acti
|
|
|
125
132
|
cwd?: string | undefined;
|
|
126
133
|
}, {
|
|
127
134
|
scope: string;
|
|
128
|
-
mode: "report" | "
|
|
135
|
+
mode: "report" | "branch" | "pull-request";
|
|
129
136
|
changed: boolean;
|
|
130
137
|
proposed: boolean;
|
|
131
138
|
checksOk: boolean;
|
|
@@ -140,4 +147,198 @@ export declare const proposeWorkspaceUpgradeContract: import("../index.js").Acti
|
|
|
140
147
|
pushed?: boolean | undefined;
|
|
141
148
|
prUrl?: string | undefined;
|
|
142
149
|
}>;
|
|
150
|
+
/**
|
|
151
|
+
* The forward coverage check over an Op's own diff (#2773). `args` mirrors
|
|
152
|
+
* `ChangeCoverageArgs`. `returns` names what a step reads: whether the check
|
|
153
|
+
* passed, the range and work item checked, and each finding with the
|
|
154
|
+
* `triage` a work item seeded from it takes as its `source`.
|
|
155
|
+
*/
|
|
156
|
+
export declare const changeCoverageContract: import("../index.js").ActivityContract<{
|
|
157
|
+
cwd?: string | undefined;
|
|
158
|
+
range?: string | undefined;
|
|
159
|
+
work?: string | undefined;
|
|
160
|
+
severity?: "off" | "warn" | "fail" | undefined;
|
|
161
|
+
}, {
|
|
162
|
+
ok: boolean;
|
|
163
|
+
range: {
|
|
164
|
+
spec: string;
|
|
165
|
+
base: string;
|
|
166
|
+
head: string;
|
|
167
|
+
};
|
|
168
|
+
work: string | null;
|
|
169
|
+
severity: "off" | "warn" | "fail";
|
|
170
|
+
findings: {
|
|
171
|
+
code: "change-uncovered" | "change-out-of-scope";
|
|
172
|
+
path: string;
|
|
173
|
+
message: string;
|
|
174
|
+
severity: "warn" | "fail";
|
|
175
|
+
records: string[];
|
|
176
|
+
triage: {
|
|
177
|
+
finding: "change-uncovered" | "change-out-of-scope";
|
|
178
|
+
region: string;
|
|
179
|
+
};
|
|
180
|
+
}[];
|
|
181
|
+
summary: {
|
|
182
|
+
paths: number;
|
|
183
|
+
covered: number;
|
|
184
|
+
uncovered: number;
|
|
185
|
+
outOfScope: number;
|
|
186
|
+
ignored: number;
|
|
187
|
+
records: number;
|
|
188
|
+
};
|
|
189
|
+
}>;
|
|
190
|
+
/**
|
|
191
|
+
* Evidence for an acceptance criterion, under the run's work lease (#2772).
|
|
192
|
+
* `lease` is the run's lease, a reference the builder fills in, so it is not
|
|
193
|
+
* checked here. `returns` names what a step reads: the item, the record's
|
|
194
|
+
* path, the entry appended and the criteria counted with it.
|
|
195
|
+
*/
|
|
196
|
+
export declare const workEvidenceContract: import("../index.js").ActivityContract<{
|
|
197
|
+
lease: unknown;
|
|
198
|
+
criterion: string;
|
|
199
|
+
result: "fail" | "pass";
|
|
200
|
+
title: string;
|
|
201
|
+
url?: string | undefined;
|
|
202
|
+
path?: string | undefined;
|
|
203
|
+
kind?: string | undefined;
|
|
204
|
+
cwd?: string | undefined;
|
|
205
|
+
}, {
|
|
206
|
+
item: string;
|
|
207
|
+
path: string;
|
|
208
|
+
evidence: Record<string, unknown>;
|
|
209
|
+
acceptance: {
|
|
210
|
+
met: number;
|
|
211
|
+
total: number;
|
|
212
|
+
criteria: {
|
|
213
|
+
id: string;
|
|
214
|
+
verification: string;
|
|
215
|
+
met: boolean;
|
|
216
|
+
}[];
|
|
217
|
+
};
|
|
218
|
+
}>;
|
|
219
|
+
/**
|
|
220
|
+
* The source-release activities (#2782, ./source-release.ts). A release Op
|
|
221
|
+
* reads `archive.out.digest` into its plan, `plan.out.digest` into its gate
|
|
222
|
+
* and its ship step, and `plan.out.file` into its record step.
|
|
223
|
+
*/
|
|
224
|
+
export declare const sourceArchiveContract: import("../index.js").ActivityContract<{
|
|
225
|
+
path: string;
|
|
226
|
+
ref?: string | undefined;
|
|
227
|
+
out?: string | undefined;
|
|
228
|
+
cwd?: string | undefined;
|
|
229
|
+
}, {
|
|
230
|
+
digest: string;
|
|
231
|
+
archive: string;
|
|
232
|
+
commit: string;
|
|
233
|
+
dir: string;
|
|
234
|
+
files: number;
|
|
235
|
+
bytes: number;
|
|
236
|
+
}>;
|
|
237
|
+
export declare const releasePlanContract: import("../index.js").ActivityContract<{
|
|
238
|
+
component: string;
|
|
239
|
+
env: string;
|
|
240
|
+
gitSha: string;
|
|
241
|
+
content: Record<string, unknown>;
|
|
242
|
+
dir?: string | undefined;
|
|
243
|
+
cwd?: string | undefined;
|
|
244
|
+
}, {
|
|
245
|
+
digest: string;
|
|
246
|
+
file: string;
|
|
247
|
+
gitSha: string;
|
|
248
|
+
}>;
|
|
249
|
+
export declare const releaseRecordContract: import("../index.js").ActivityContract<{
|
|
250
|
+
plan: string;
|
|
251
|
+
digest?: string | undefined;
|
|
252
|
+
approval?: {
|
|
253
|
+
op: string;
|
|
254
|
+
gate: string;
|
|
255
|
+
} | undefined;
|
|
256
|
+
actor?: string | undefined;
|
|
257
|
+
runId?: string | undefined;
|
|
258
|
+
cwd?: string | undefined;
|
|
259
|
+
}, {
|
|
260
|
+
recorded: boolean;
|
|
261
|
+
digest: string;
|
|
262
|
+
env: string;
|
|
263
|
+
component: string;
|
|
264
|
+
approver: string | null;
|
|
265
|
+
}>;
|
|
266
|
+
export declare const decideContract: import("../index.js").ActivityContract<{
|
|
267
|
+
point: string;
|
|
268
|
+
inputs?: Record<string, unknown> | undefined;
|
|
269
|
+
read?: Record<string, string> | undefined;
|
|
270
|
+
subject?: string | undefined;
|
|
271
|
+
kind?: string | undefined;
|
|
272
|
+
cwd?: string | undefined;
|
|
273
|
+
backends?: Record<string, {
|
|
274
|
+
url: string;
|
|
275
|
+
key?: {
|
|
276
|
+
env: string;
|
|
277
|
+
} | {
|
|
278
|
+
capability: string;
|
|
279
|
+
member?: string | undefined;
|
|
280
|
+
env?: string | undefined;
|
|
281
|
+
} | undefined;
|
|
282
|
+
timeoutMs?: number | undefined;
|
|
283
|
+
}> | undefined;
|
|
284
|
+
dryRun?: boolean | undefined;
|
|
285
|
+
}, {
|
|
286
|
+
id: string;
|
|
287
|
+
path: string;
|
|
288
|
+
state: "escalated" | "proposed" | "answered";
|
|
289
|
+
open: boolean;
|
|
290
|
+
answer: string | boolean | null;
|
|
291
|
+
decider: string;
|
|
292
|
+
model: string | null;
|
|
293
|
+
backend: string | null;
|
|
294
|
+
confidence: number | null;
|
|
295
|
+
threshold: number | null;
|
|
296
|
+
answeredBy: string[];
|
|
297
|
+
escalations: {
|
|
298
|
+
[x: string]: unknown;
|
|
299
|
+
kind: "model" | "table";
|
|
300
|
+
reason: string;
|
|
301
|
+
}[];
|
|
302
|
+
missing: string[];
|
|
303
|
+
}>;
|
|
304
|
+
/**
|
|
305
|
+
* The rollback activities for a source release (#2800, ./source-rollback.ts).
|
|
306
|
+
* A rollback Op reads `plan.out.digest` into its gate, `plan.out.to` and the
|
|
307
|
+
* archive fields into the step that restores the Machine, and
|
|
308
|
+
* `plan.out.file` into its record step.
|
|
309
|
+
*/
|
|
310
|
+
export declare const releaseRollbackPlanContract: import("../index.js").ActivityContract<{
|
|
311
|
+
component: string;
|
|
312
|
+
env: string;
|
|
313
|
+
to?: string | undefined;
|
|
314
|
+
path?: string | undefined;
|
|
315
|
+
dir?: string | undefined;
|
|
316
|
+
cwd?: string | undefined;
|
|
317
|
+
}, {
|
|
318
|
+
digest: string;
|
|
319
|
+
file: string;
|
|
320
|
+
to: string;
|
|
321
|
+
from: string;
|
|
322
|
+
gitSha: string;
|
|
323
|
+
archive: string;
|
|
324
|
+
archiveDigest: string;
|
|
325
|
+
dir: string;
|
|
326
|
+
}>;
|
|
327
|
+
export declare const releaseRollbackRecordContract: import("../index.js").ActivityContract<{
|
|
328
|
+
plan: string;
|
|
329
|
+
digest?: string | undefined;
|
|
330
|
+
approval?: {
|
|
331
|
+
op: string;
|
|
332
|
+
gate: string;
|
|
333
|
+
} | undefined;
|
|
334
|
+
actor?: string | undefined;
|
|
335
|
+
runId?: string | undefined;
|
|
336
|
+
cwd?: string | undefined;
|
|
337
|
+
}, {
|
|
338
|
+
recorded: boolean;
|
|
339
|
+
digest: string;
|
|
340
|
+
env: string;
|
|
341
|
+
component: string;
|
|
342
|
+
approver: string | null;
|
|
343
|
+
}>;
|
|
143
344
|
//# sourceMappingURL=activity-contracts.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"activity-contracts.d.ts","sourceRoot":"","sources":["../../../src/op/activities/activity-contracts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;
|
|
1
|
+
{"version":3,"file":"activity-contracts.d.ts","sourceRoot":"","sources":["../../../src/op/activities/activity-contracts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAMH,eAAO,MAAM,yBAAyB;;SAGrC,CAAC;AAEF,eAAO,MAAM,qBAAqB;;;;;;;EAIjC,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;EAe5B,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;;;;;;;EAgB7B,CAAC;AAEF,eAAO,MAAM,qBAAqB;;SAGjC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;EAUpC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;EAuBpC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;EA6B3C,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgClC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;EAkBhC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;EAIjC,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;;;;;;;;EAW/B,CAAC;AAEF,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;EAWjC,CAAC;AAUF,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4B1B,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;EAoBvC,CAAC;AAEF,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;EAWzC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apply.d.ts","sourceRoot":"","sources":["../../../src/op/activities/apply.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAIH,OAAO,EAAkB,KAAK,WAAW,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"apply.d.ts","sourceRoot":"","sources":["../../../src/op/activities/apply.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAIH,OAAO,EAAkB,KAAK,WAAW,EAAE,MAAM,aAAa,CAAC;AAK/D,+CAA+C;AAC/C,MAAM,MAAM,WAAW,GAAG,gBAAgB,GAAG,SAAS,GAAG,KAAK,GAAG,WAAW,GAAG,KAAK,GAAG,KAAK,CAAC;AAE7F;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,YA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AAC,EAAE,YAAY,EAC3B,QAAQ,GAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAuB,EACxF,UAAU,CAAC,EAAE,UAAU,EACvB,UAAU,CAAC,EAAE,UAAU,EACvB,UAAU,CAAC,EAAE,UAAU,GACtB,OAAO,CAAC,iBAAiB,CAAC,CA0F5B;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,WAAW,GAAG,OAAO,CAE9D;AAED,MAAM,WAAW,mBAAmB;IAClC,yCAAyC;IACzC,MAAM,EAAE,WAAW,CAAC;IACpB,yDAAyD;IACzD,GAAG,EAAE,MAAM,CAAC;IACZ,2EAA2E;IAC3E,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,+BAA+B;AAC/B,MAAM,WAAW,qBAAqB;IACpC,qEAAqE;IACrE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,8CAA8C;IAC9C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;sFACkF;IAClF,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,+DAA+D;IAC/D,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,eAAe,CACnC,IAAI,EAAE,mBAAmB,EACzB,MAAM,CAAC,EAAE,WAAW,EACpB,QAAQ,CAAC,EAAE,WAAW,GACrB,OAAO,CAAC,qBAAqB,CAAC,CA0BhC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* changeCoverage — the forward coverage check (#2773) as an Op activity, for
|
|
3
|
+
* an Op that changes the checkout (#2748) to run on its own diff.
|
|
4
|
+
*
|
|
5
|
+
* Such an Op's leased steps work in a worktree of their own on
|
|
6
|
+
* `chant/work/[<member>/]<item>`. Given that worktree as `cwd`
|
|
7
|
+
* (`workLeaseOutput("worktree")`) and no `range`, the activity checks the
|
|
8
|
+
* commits the branch holds beyond the main worktree's HEAD, with the branch's
|
|
9
|
+
* item as the work item in hand, exactly as `chant workspace check --changes
|
|
10
|
+
* <base>..HEAD --work <item>` would. A `range` or `work` given replaces what
|
|
11
|
+
* the branch says.
|
|
12
|
+
*
|
|
13
|
+
* The step fails when the check's severity is `fail` and it has a finding,
|
|
14
|
+
* or when the check can't run; otherwise it returns the document's findings
|
|
15
|
+
* and summary for later steps. The workspace code loads on first call, so
|
|
16
|
+
* importing core's activities loads nothing under `workspace/` (#2525 rule 5).
|
|
17
|
+
*/
|
|
18
|
+
import type { ChangeFinding, ChangesDocument } from "../../workspace/changes.js";
|
|
19
|
+
export interface ChangeCoverageArgs {
|
|
20
|
+
/** The checkout to check: the Op's worktree. Default: the working directory. */
|
|
21
|
+
cwd?: string;
|
|
22
|
+
/** `<base>..<head>`, `<base>...<head>` or `<base>`. Default: the work branch's own commits. */
|
|
23
|
+
range?: string;
|
|
24
|
+
/** The work item in hand. Default: the work branch's item. */
|
|
25
|
+
work?: string;
|
|
26
|
+
/** In place of the declaration's `changes.severity`. */
|
|
27
|
+
severity?: "off" | "warn" | "fail";
|
|
28
|
+
}
|
|
29
|
+
export interface ChangeCoverageResult {
|
|
30
|
+
ok: boolean;
|
|
31
|
+
range: {
|
|
32
|
+
spec: string;
|
|
33
|
+
base: string;
|
|
34
|
+
head: string;
|
|
35
|
+
};
|
|
36
|
+
work: string | null;
|
|
37
|
+
severity: "off" | "warn" | "fail";
|
|
38
|
+
findings: Pick<ChangeFinding, "code" | "path" | "message" | "severity" | "records" | "triage">[];
|
|
39
|
+
summary: Exclude<ChangesDocument, {
|
|
40
|
+
error: unknown;
|
|
41
|
+
}>["summary"];
|
|
42
|
+
}
|
|
43
|
+
export declare function changeCoverage(args?: ChangeCoverageArgs): Promise<ChangeCoverageResult>;
|
|
44
|
+
//# sourceMappingURL=change-coverage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"change-coverage.d.ts","sourceRoot":"","sources":["../../../src/op/activities/change-coverage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE9E,MAAM,WAAW,kBAAkB;IACjC,gFAAgF;IAChF,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,+FAA+F;IAC/F,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,8DAA8D;IAC9D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,wDAAwD;IACxD,QAAQ,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC;CACpC;AAED,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,OAAO,CAAC;IACZ,KAAK,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IACpD,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,QAAQ,EAAE,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC;IAClC,QAAQ,EAAE,IAAI,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,GAAG,UAAU,GAAG,SAAS,GAAG,QAAQ,CAAC,EAAE,CAAC;IACjG,OAAO,EAAE,OAAO,CAAC,eAAe,EAAE;QAAE,KAAK,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC,SAAS,CAAC,CAAC;CAClE;AAED,wBAAsB,cAAc,CAAC,IAAI,GAAE,kBAAuB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAmBjG"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ConvergeRule } from "../converge-rule.js";
|
|
2
2
|
import { type OpVerbClass } from "../op-verb-class.js";
|
|
3
|
-
import { type ConvergeSymptom } from "../../lifecycle/symptoms.js";
|
|
3
|
+
import { type ConvergeSymptom, type ObservedResource, type ResourceSymptom } from "../../lifecycle/symptoms.js";
|
|
4
4
|
import { sanitizeLedgerText, type ConvergeRuleOutcome, type ConvergeTickRecord } from "../../lifecycle/converge-ledger.js";
|
|
5
5
|
/** A `ConvergeRule<ConvergeSymptom>`, restated with `S = ConvergeSymptom` fixed — the JSON shape `ConvergeOp` bakes into the Op's `convergeTick` step args. */
|
|
6
6
|
export type SerializedConvergeRule = ConvergeRule<ConvergeSymptom>;
|
|
@@ -32,6 +32,14 @@ export interface ConvergeTickArgs {
|
|
|
32
32
|
* (this activity re-derives its own symptom independently).
|
|
33
33
|
*/
|
|
34
34
|
preflightDrift?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* The observer step's result, for a ConvergeOp declared with `observe`
|
|
37
|
+
* (#2778): a {@link ResourceObservation}, or a `shell()` result whose
|
|
38
|
+
* stdout is one. Present, the tick observes nothing itself: it evaluates
|
|
39
|
+
* `rules` once per reported resource, against a `ResourceSymptom`, and
|
|
40
|
+
* dispatches a fired `run()` for that resource.
|
|
41
|
+
*/
|
|
42
|
+
observed?: unknown;
|
|
35
43
|
}
|
|
36
44
|
export interface ConvergeTickResult {
|
|
37
45
|
/** The ledger record's tick id (#2027) — what a caller correlates this tick's outcomes, gate facts and remediations against. */
|
|
@@ -132,5 +140,20 @@ export interface ConvergeTickPlan {
|
|
|
132
140
|
outcomes: ConvergeRuleOutcome[];
|
|
133
141
|
}
|
|
134
142
|
export declare function planConvergeTick(symptom: ConvergeSymptom, rules: SerializedConvergeRule[], priorRecords: ConvergeTickRecord[], dial: ConvergeTickArgs["dial"], budget: number): ConvergeTickPlan;
|
|
143
|
+
/**
|
|
144
|
+
* How many consecutive most-recent ticks of `op` fired `ruleId` for
|
|
145
|
+
* `resource`. A rule of a ConvergeOp with an observer step fires once per
|
|
146
|
+
* resource, so its flap damping is counted per resource: a rule that
|
|
147
|
+
* restarts `app` on one tick and `hud` on the next is not flapping.
|
|
148
|
+
*/
|
|
149
|
+
export declare function consecutiveResourceFires(records: ConvergeTickRecord[], op: string, ruleId: string, resource: string): number;
|
|
150
|
+
/**
|
|
151
|
+
* The pure planning core of a resource tick (#2778): every rule against every
|
|
152
|
+
* observed resource, in authored order within each resource. The rules of
|
|
153
|
+
* {@link planConvergeTick} hold per resource: `unknown` never remediates, a
|
|
154
|
+
* `report()` never dispatches, the dial decides whether a `run()` may, and
|
|
155
|
+
* `budget` bounds the dispatches across the whole tick.
|
|
156
|
+
*/
|
|
157
|
+
export declare function planResourceTick(env: string, resources: ObservedResource[], rules: ConvergeRule<ResourceSymptom>[], priorRecords: ConvergeTickRecord[], op: string, dial: ConvergeTickArgs["dial"], budget: number): ConvergeTickPlan;
|
|
135
158
|
export declare function convergeTick(args: ConvergeTickArgs, signal?: AbortSignal): Promise<ConvergeTickResult>;
|
|
136
159
|
//# sourceMappingURL=converge.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"converge.d.ts","sourceRoot":"","sources":["../../../src/op/activities/converge.ts"],"names":[],"mappings":"AAkCA,OAAO,EAEL,KAAK,YAAY,EAGlB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAuB,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEzE,OAAO,
|
|
1
|
+
{"version":3,"file":"converge.d.ts","sourceRoot":"","sources":["../../../src/op/activities/converge.ts"],"names":[],"mappings":"AAkCA,OAAO,EAEL,KAAK,YAAY,EAGlB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAuB,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEzE,OAAO,EAIL,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACrB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAKL,kBAAkB,EAClB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACxB,MAAM,iCAAiC,CAAC;AAQzC,+JAA+J;AAC/J,MAAM,MAAM,sBAAsB,GAAG,YAAY,CAAC,eAAe,CAAC,CAAC;AAEnE,MAAM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B,0BAA0B,CACxC,OAAO,EAAE,mBAAmB,EAC5B,IAAI,EAAE,gBAAgB,CAAC,MAAM,CAAC,EAC9B,SAAS,EAAE,WAAW,GAAG,SAAS,GACjC,mBAAmB,CAWrB;AAaD;;;;;;;GAOG;AACH,MAAM,WAAW,gBAAgB;IAC/B,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,QAAQ,EAAE,mBAAmB,EAAE,CAAC;CACjC;AAED,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,eAAe,EACxB,KAAK,EAAE,sBAAsB,EAAE,EAC/B,YAAY,EAAE,kBAAkB,EAAE,EAClC,IAAI,EAAE,gBAAgB,CAAC,MAAM,CAAC,EAC9B,MAAM,EAAE,MAAM,GACb,gBAAgB,CAmDlB;AAsBD;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,kBAAkB,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAQ5H;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC9B,GAAG,EAAE,MAAM,EACX,SAAS,EAAE,gBAAgB,EAAE,EAC7B,KAAK,EAAE,YAAY,CAAC,eAAe,CAAC,EAAE,EACtC,YAAY,EAAE,kBAAkB,EAAE,EAClC,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,gBAAgB,CAAC,MAAM,CAAC,EAC9B,MAAM,EAAE,MAAM,GACb,gBAAgB,CAiDlB;AAuHD,wBAAsB,YAAY,CAAC,IAAI,EAAE,gBAAgB,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAiE5G"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `decide` Op activity (ws-058, #2740): ask a decision point for one set
|
|
3
|
+
* of inputs, calling the backend its model decider names, and record the
|
|
4
|
+
* answer. Core's own since #2828, next to the decision points it asks; the
|
|
5
|
+
* typed step builder is `decide` in `../builders.ts`.
|
|
6
|
+
*
|
|
7
|
+
* The point is asked through core's `askPointInRun` (#2749), which writes the
|
|
8
|
+
* answer with `askPoint` (`points ask`, #2739), the same path `chant workspace
|
|
9
|
+
* points ask --response` takes. So the chain, the threshold, a model's answer
|
|
10
|
+
* being `proposed` and never `answered`, the reuse of an answer the same point,
|
|
11
|
+
* declaration and inputs already have, the escalation to people, and what an
|
|
12
|
+
* open question does to the run all come from core:
|
|
13
|
+
*
|
|
14
|
+
* - an answered question (a table row, or a person) is the step's result, and
|
|
15
|
+
* the Op goes on;
|
|
16
|
+
* - an escalated or proposed question is open, so the step throws core's
|
|
17
|
+
* `PointWait` and the run ends `waiting`. A person answers with `points
|
|
18
|
+
* answer` or through hud, and the next run reads the answer from the record.
|
|
19
|
+
*
|
|
20
|
+
* This activity adds three things: reading the inputs through the read
|
|
21
|
+
* contract (`../decide-read-inputs.ts`), the call to a `POST /v1/systemone`
|
|
22
|
+
* backend (`../decide-backend.ts`), and refusing a misconfigured backend before
|
|
23
|
+
* anything is asked or written. The backends are the step's own `backends`, or
|
|
24
|
+
* `decide.backends` in chant.config (`../decide-config.ts`).
|
|
25
|
+
*
|
|
26
|
+
* With the backend unreachable, the point's `unreachable` decides: `escalate`
|
|
27
|
+
* (the default) records the question open for people with the reason, and
|
|
28
|
+
* `fail` writes nothing and fails the step.
|
|
29
|
+
*
|
|
30
|
+
* In a steward's turn the model call goes through the broker (#2749): core
|
|
31
|
+
* makes it only through a capability the steward declares, and a backend whose
|
|
32
|
+
* key is an environment variable is not called, since that key would be a
|
|
33
|
+
* credential the steward holds.
|
|
34
|
+
*
|
|
35
|
+
* chant's reads never call a model (ws-052): this runs only as an Op step.
|
|
36
|
+
*
|
|
37
|
+
* The workspace code, the client and the read-contract reads load on first
|
|
38
|
+
* call, so importing core's activities loads nothing under `workspace/`
|
|
39
|
+
* (#2525 rule 5).
|
|
40
|
+
*/
|
|
41
|
+
import type { Escalation } from "../../workspace/points.js";
|
|
42
|
+
import { type DecideBackend } from "../decide-config.js";
|
|
43
|
+
import type { BackendAskOptions, BackendResponse } from "../decide-backend.js";
|
|
44
|
+
export interface DecideArgs {
|
|
45
|
+
/** The point's name, as its points file declares it. */
|
|
46
|
+
point: string;
|
|
47
|
+
/** Input values by the point's input names, such as `{ "work-item.fits_small": false }`. They win over values read with `read`. */
|
|
48
|
+
inputs?: Record<string, unknown>;
|
|
49
|
+
/** What to read through the read contract, by output: `{ "work-item": "W-002" }` reads work item W-002 for every `work-item.*` input. */
|
|
50
|
+
read?: Record<string, string>;
|
|
51
|
+
/** What the question is about, such as a work item's id. Written to the answer's `constrains`. */
|
|
52
|
+
subject?: string;
|
|
53
|
+
/** The answer kind file, or a declared kind's name. Without it, the declared answer kind whose points file declares the point. */
|
|
54
|
+
kind?: string;
|
|
55
|
+
/** Where the workspace is found. Defaults to the working directory. */
|
|
56
|
+
cwd?: string;
|
|
57
|
+
/** Backends by name, in place of `decide.backends` in chant.config. */
|
|
58
|
+
backends?: Record<string, DecideBackend>;
|
|
59
|
+
/** Ask, but write nothing, and return the question whatever its state: an open one does not stop the run. */
|
|
60
|
+
dryRun?: boolean;
|
|
61
|
+
}
|
|
62
|
+
export interface DecideResult {
|
|
63
|
+
/** The answer record's id: the point's name and the first 12 hex digits of the inputs hash. */
|
|
64
|
+
id: string;
|
|
65
|
+
/** The record file, from the repository root. */
|
|
66
|
+
path: string;
|
|
67
|
+
/** `answered`, unless this was a dry run, which returns a question in any state. */
|
|
68
|
+
state: "escalated" | "proposed" | "answered";
|
|
69
|
+
open: boolean;
|
|
70
|
+
/** The answer, or null while the question is escalated. */
|
|
71
|
+
answer: string | boolean | null;
|
|
72
|
+
/** The decider that gave the recorded state: table, model (a proposal, or one a person confirmed) or quorum. */
|
|
73
|
+
decider: string;
|
|
74
|
+
/** For a model's answer: the pinned model id, the backend, its confidence and the threshold it met. */
|
|
75
|
+
model: string | null;
|
|
76
|
+
backend: string | null;
|
|
77
|
+
confidence: number | null;
|
|
78
|
+
threshold: number | null;
|
|
79
|
+
/** The people who answered, when people did. */
|
|
80
|
+
answeredBy: string[];
|
|
81
|
+
/** Each decider that was asked and did not answer, and why. */
|
|
82
|
+
escalations: Escalation[];
|
|
83
|
+
/** Declared inputs the read value did not have. */
|
|
84
|
+
missing: string[];
|
|
85
|
+
}
|
|
86
|
+
/** Seams a test swaps. */
|
|
87
|
+
export interface DecideDeps {
|
|
88
|
+
/** The HTTP call, in place of the global one. */
|
|
89
|
+
transport?: BackendAskOptions["transport"];
|
|
90
|
+
env?: NodeJS.ProcessEnv;
|
|
91
|
+
/** The date written as asked_on, YYYY-MM-DD. */
|
|
92
|
+
on?: string;
|
|
93
|
+
onResponse?: (backend: string, response: BackendResponse) => void;
|
|
94
|
+
}
|
|
95
|
+
/** The step failed: what core refused, or a configuration this activity refuses. */
|
|
96
|
+
export declare class DecideError extends Error {
|
|
97
|
+
readonly code: string;
|
|
98
|
+
constructor(code: string, message: string);
|
|
99
|
+
}
|
|
100
|
+
/** Run the activity with its seams. {@link decide} is this with the real ones. */
|
|
101
|
+
export declare function runDecide(args: DecideArgs, deps?: DecideDeps, signal?: AbortSignal): Promise<DecideResult>;
|
|
102
|
+
/**
|
|
103
|
+
* Ask a decision point and record the answer. The Op activity: an answered
|
|
104
|
+
* question is the step's result, and an open one stops the run `waiting`.
|
|
105
|
+
*/
|
|
106
|
+
export declare function decide(args: DecideArgs, signal?: AbortSignal): Promise<DecideResult>;
|
|
107
|
+
//# sourceMappingURL=decide.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"decide.d.ts","sourceRoot":"","sources":["../../../src/op/activities/decide.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAOH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAiB,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACrE,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