@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
|
@@ -43,8 +43,9 @@
|
|
|
43
43
|
* @see #1484, #1487
|
|
44
44
|
*/
|
|
45
45
|
import type { OpResource } from "../resource.js";
|
|
46
|
+
import type { ActivityStep } from "../types.js";
|
|
46
47
|
import { type ConvergeRule } from "../converge-rule.js";
|
|
47
|
-
import type { ConvergeSymptom } from "../../lifecycle/symptoms.js";
|
|
48
|
+
import type { ConvergeSymptom, ResourceSymptom } from "../../lifecycle/symptoms.js";
|
|
48
49
|
/**
|
|
49
50
|
* Authority level for this ConvergeOp's environment — issue #1484's own
|
|
50
51
|
* Autonomy table (dial × verb class):
|
|
@@ -91,7 +92,7 @@ import type { ConvergeSymptom } from "../../lifecycle/symptoms.js";
|
|
|
91
92
|
* Gated dispatch that waits for the approval is #1485's design to own.
|
|
92
93
|
*/
|
|
93
94
|
export type ConvergeDial = "observe" | "reconcile" | "apply";
|
|
94
|
-
|
|
95
|
+
interface ConvergeOpCommon {
|
|
95
96
|
/** Op name (kebab-case). Names the Op's output directory and is what `chant run` takes. */
|
|
96
97
|
name: string;
|
|
97
98
|
/** Environment to converge (e.g. "staging"). */
|
|
@@ -100,8 +101,6 @@ export interface ConvergeOpConfig {
|
|
|
100
101
|
dial?: ConvergeDial;
|
|
101
102
|
/** Max number of `run` dispatches per tick — the issue's "the worst tick is bounded" (Accessible Ops factor VI). Rules matched beyond the budget are recorded, not run. @default 3 */
|
|
102
103
|
budget?: number;
|
|
103
|
-
/** The rule table — build with `when()`/`eq()`/`run()`/`report()` from `@intentius/chant/op`. Non-empty; every rule id must be unique. */
|
|
104
|
-
rules: ConvergeRule<ConvergeSymptom>[];
|
|
105
104
|
/**
|
|
106
105
|
* Cron expression. When set, it lands on the Op as `schedule` — the cadence
|
|
107
106
|
* `chant operator` ticks this Op on and the CI generators render; omit for
|
|
@@ -109,12 +108,40 @@ export interface ConvergeOpConfig {
|
|
|
109
108
|
* "one-shot runnable locally for a single tick").
|
|
110
109
|
*/
|
|
111
110
|
schedule?: string;
|
|
111
|
+
}
|
|
112
|
+
/** A ConvergeOp that observes a chant environment through its lexicons. */
|
|
113
|
+
export interface EnvironmentConvergeOpConfig extends ConvergeOpCommon {
|
|
114
|
+
/** The rule table — build with `when()`/`eq()`/`run()`/`report()` from `@intentius/chant/op`. Non-empty; every rule id must be unique. */
|
|
115
|
+
rules: ConvergeRule<ConvergeSymptom>[];
|
|
112
116
|
/** Run `chant lifecycle diff --live` in the Observe phase (queries live state). @default true */
|
|
113
117
|
live?: boolean;
|
|
118
|
+
observe?: undefined;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* A ConvergeOp whose Observe phase is a step of its own (#2778), for
|
|
122
|
+
* resources no lexicon declares or observes, such as the services a
|
|
123
|
+
* supervisor runs in a box (the fly lexicon's `spriteServicesObserve`).
|
|
124
|
+
*/
|
|
125
|
+
export interface StepConvergeOpConfig extends ConvergeOpCommon {
|
|
126
|
+
/**
|
|
127
|
+
* The observer: an activity step that returns a `ResourceObservation`,
|
|
128
|
+
* `{ resources: [{ name, status: "in-sync" | "drifted" | "unknown", detail? }] }`,
|
|
129
|
+
* or a `shell()` step that prints one as JSON. Its id defaults to `observe`.
|
|
130
|
+
*/
|
|
131
|
+
observe: ActivityStep;
|
|
132
|
+
/**
|
|
133
|
+
* The rule table, evaluated once per observed resource against a
|
|
134
|
+
* `ResourceSymptom` (`env`, `resource`, `status`, `detail`). A fired
|
|
135
|
+
* `run()` is dispatched for that resource: the dispatched Op reads its
|
|
136
|
+
* name from `CHANT_CONVERGE_RESOURCE`.
|
|
137
|
+
*/
|
|
138
|
+
rules: ConvergeRule<ResourceSymptom>[];
|
|
114
139
|
}
|
|
140
|
+
export type ConvergeOpConfig = EnvironmentConvergeOpConfig | StepConvergeOpConfig;
|
|
115
141
|
export interface ConvergeOpResources {
|
|
116
142
|
/** Op resource — the observe-then-converge Op. */
|
|
117
143
|
op: InstanceType<typeof OpResource>;
|
|
118
144
|
}
|
|
119
145
|
export declare function ConvergeOp(config: ConvergeOpConfig): ConvergeOpResources;
|
|
146
|
+
export {};
|
|
120
147
|
//# sourceMappingURL=converge-op.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"converge-op.d.ts","sourceRoot":"","sources":["../../../src/op/composites/converge-op.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AAGH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAA2C,KAAK,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAC9F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"converge-op.d.ts","sourceRoot":"","sources":["../../../src/op/composites/converge-op.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AAGH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE7C,OAAO,EAA2C,KAAK,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAC9F,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAGjF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,WAAW,GAAG,OAAO,CAAC;AAE7D,UAAU,gBAAgB;IACxB,2FAA2F;IAC3F,IAAI,EAAE,MAAM,CAAC;IACb,gDAAgD;IAChD,GAAG,EAAE,MAAM,CAAC;IACZ,yBAAyB;IACzB,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,sLAAsL;IACtL,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,2EAA2E;AAC3E,MAAM,WAAW,2BAA4B,SAAQ,gBAAgB;IACnE,0IAA0I;IAC1I,KAAK,EAAE,YAAY,CAAC,eAAe,CAAC,EAAE,CAAC;IACvC,iGAAiG;IACjG,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,SAAS,CAAC;CACrB;AAED;;;;GAIG;AACH,MAAM,WAAW,oBAAqB,SAAQ,gBAAgB;IAC5D;;;;OAIG;IACH,OAAO,EAAE,YAAY,CAAC;IACtB;;;;;OAKG;IACH,KAAK,EAAE,YAAY,CAAC,eAAe,CAAC,EAAE,CAAC;CACxC;AAED,MAAM,MAAM,gBAAgB,GAAG,2BAA2B,GAAG,oBAAoB,CAAC;AAElF,MAAM,WAAW,mBAAmB;IAClC,kDAAkD;IAClD,EAAE,EAAE,YAAY,CAAC,OAAO,UAAU,CAAC,CAAC;CACrC;AAED,wBAAgB,UAAU,CAAC,MAAM,EAAE,gBAAgB,GAAG,mBAAmB,CAgHxE"}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The client for the `POST /v1/systemone` wire format (#2491): TypeSafe's Jev
|
|
3
|
+
* API, and every server that implements the same request and response.
|
|
4
|
+
*
|
|
5
|
+
* ```
|
|
6
|
+
* POST <url>/v1/systemone Authorization: Bearer <key>
|
|
7
|
+
* { "model": "jev-1.13.0", "state": {...}, "questions": { "<name>": { "type": "noul" | "choice" | "score", "instructions": ..., "criteria": ... } } }
|
|
8
|
+
*
|
|
9
|
+
* { "model": "jev-1.13.0", "answers": { "<name>": { "type": "noul", "noul": 0.22 } | { "type": "choice", "choice": ..., "probabilities": {...}, "confidence": ... } | { "type": "score", ... } } }
|
|
10
|
+
* ```
|
|
11
|
+
*
|
|
12
|
+
* {@link backendAsk} turns a set of backends into core's `ModelAsk`, the
|
|
13
|
+
* model call `askPoint` takes (`../workspace/points.ts`). This file
|
|
14
|
+
* only speaks the wire format: whether an answer is observed, proposed or
|
|
15
|
+
* escalated, and what a point does when the backend is unreachable, are
|
|
16
|
+
* core's (`runChain`), so they are the same for this client, for a response
|
|
17
|
+
* handed to `points ask --response`, and for any runtime's decider.
|
|
18
|
+
*
|
|
19
|
+
* The model id is sent as the point pins it. An alias such as `jev-latest` is
|
|
20
|
+
* refused where the point is declared, and the response's `model` is compared
|
|
21
|
+
* with the pin by core, so an alias that moved is never recorded as the pin.
|
|
22
|
+
*
|
|
23
|
+
* Anything that stops an answer arriving throws: no key, a network error, a
|
|
24
|
+
* timeout, a non-2xx status (Jev's are 401, 422, 429 and 529), or a response
|
|
25
|
+
* without an answer to the question asked. Core reads a throw as the backend
|
|
26
|
+
* being unreachable and follows the point's `unreachable`.
|
|
27
|
+
*
|
|
28
|
+
* It reads the workspace declaration for a brokered key, so it loads code
|
|
29
|
+
* under `workspace/`: the `decide` activity imports it on first call, never
|
|
30
|
+
* at module load (#2525 rule 5).
|
|
31
|
+
*/
|
|
32
|
+
import type { ModelAsk, ModelRequest, WireAnswer } from "../workspace/points.js";
|
|
33
|
+
import type { BackendKey, BrokeredKey, DecideBackend } from "./decide-config.js";
|
|
34
|
+
/** The path every Jev-compatible server serves. */
|
|
35
|
+
export declare const SYSTEMONE_PATH = "/v1/systemone";
|
|
36
|
+
/** How long a call may take before the backend counts as unreachable, when the backend names no `timeoutMs`. */
|
|
37
|
+
export declare const DEFAULT_TIMEOUT_MS = 30000;
|
|
38
|
+
/** The request body. */
|
|
39
|
+
export interface BackendRequest {
|
|
40
|
+
model: string;
|
|
41
|
+
state: unknown;
|
|
42
|
+
questions: Record<string, {
|
|
43
|
+
type: string;
|
|
44
|
+
instructions: string;
|
|
45
|
+
criteria: Record<string, string> | string[];
|
|
46
|
+
}>;
|
|
47
|
+
}
|
|
48
|
+
/** The response body, as far as this client reads it. */
|
|
49
|
+
export interface BackendResponse {
|
|
50
|
+
model: string;
|
|
51
|
+
answers: Record<string, WireAnswer>;
|
|
52
|
+
usage?: {
|
|
53
|
+
input_tokens?: number;
|
|
54
|
+
output_tokens?: number;
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* The name a point's question is sent under: the point's own name, so a
|
|
59
|
+
* response reads back the way `points ask --response` reads one, with the
|
|
60
|
+
* answer under `answers["<point>"]`.
|
|
61
|
+
*/
|
|
62
|
+
export declare const questionName: (point: string) => string;
|
|
63
|
+
/** A backend or key that is configured wrongly: the activity refuses before asking anything. */
|
|
64
|
+
export declare class DecideConfigError extends Error {
|
|
65
|
+
constructor(message: string);
|
|
66
|
+
}
|
|
67
|
+
/** Where a brokered capability is declared: the member and its broker. */
|
|
68
|
+
export interface BrokeredCapability {
|
|
69
|
+
member: string;
|
|
70
|
+
broker: string;
|
|
71
|
+
scope: string[];
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* The declaration's entry for a brokered key (#2726): the box member that
|
|
75
|
+
* declares the capability, and the broker it names. Read from the workspace
|
|
76
|
+
* declaration nearest above `cwd`, the same declaration `workspace status`
|
|
77
|
+
* reads it from. Throws a {@link DecideConfigError} when no member declares
|
|
78
|
+
* the capability, when more than one does and the key names none, or when the
|
|
79
|
+
* capability names no broker.
|
|
80
|
+
*/
|
|
81
|
+
export declare function brokeredCapability(key: BrokeredKey, cwd: string): BrokeredCapability;
|
|
82
|
+
/** Check a key reference without reading any secret: a string is a literal and refused, and a brokered capability must be declared. */
|
|
83
|
+
export declare function checkKey(key: unknown, where: string, cwd: string): void;
|
|
84
|
+
/**
|
|
85
|
+
* The bearer key for one call, or undefined when none is sent: a backend with
|
|
86
|
+
* no key, or a brokered capability whose broker is the endpoint. Throws when a
|
|
87
|
+
* variable the key names is unset, which the chain reads as unreachable.
|
|
88
|
+
*/
|
|
89
|
+
export declare function resolveKey(key: BackendKey | undefined, cwd: string, env?: NodeJS.ProcessEnv): string | undefined;
|
|
90
|
+
export interface BackendAskOptions {
|
|
91
|
+
/** Backend name, as a point's model decider names it, to the backend. */
|
|
92
|
+
backends: Record<string, DecideBackend>;
|
|
93
|
+
/** Where the workspace declaration is found, for a brokered key. */
|
|
94
|
+
cwd: string;
|
|
95
|
+
/** The HTTP call. Defaults to the global fetch; a test passes its own. */
|
|
96
|
+
transport?: typeof fetch;
|
|
97
|
+
/** Defaults to process.env. */
|
|
98
|
+
env?: NodeJS.ProcessEnv;
|
|
99
|
+
/** Cancels an in-flight call, such as the Op's timeout. */
|
|
100
|
+
signal?: AbortSignal;
|
|
101
|
+
/** Called with each response, for usage and logs. */
|
|
102
|
+
onResponse?: (backend: string, response: BackendResponse) => void;
|
|
103
|
+
}
|
|
104
|
+
/** Post one question to one backend and return the model that answered and its answer. */
|
|
105
|
+
export declare function postQuestion(backend: DecideBackend, name: string, request: ModelRequest, opts: Omit<BackendAskOptions, "backends">): Promise<{
|
|
106
|
+
model: string;
|
|
107
|
+
answer: WireAnswer;
|
|
108
|
+
response: BackendResponse;
|
|
109
|
+
}>;
|
|
110
|
+
/**
|
|
111
|
+
* The model call for `askPoint`: each request goes to the backend its decider
|
|
112
|
+
* names. A name no backend has throws, and so does anything
|
|
113
|
+
* {@link postQuestion} throws, which the chain reads as unreachable.
|
|
114
|
+
*/
|
|
115
|
+
export declare function backendAsk(opts: BackendAskOptions): ModelAsk;
|
|
116
|
+
//# sourceMappingURL=decide-backend.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"decide-backend.d.ts","sourceRoot":"","sources":["../../src/op/decide-backend.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,UAAU,EAAE,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KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,CAMvE;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,UAAU,GAAG,SAAS,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,MAAM,GAAG,SAAS,CAY7H;AAED,MAAM,WAAW,iBAAiB;IAChC,yEAAyE;IACzE,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IACxC,oEAAoE;IACpE,GAAG,EAAE,MAAM,CAAC;IACZ,0EAA0E;IAC1E,SAAS,CAAC,EAAE,OAAO,KAAK,CAAC;IACzB,+BAA+B;IAC/B,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;IACxB,2DAA2D;IAC3D,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,qDAAqD;IACrD,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,eAAe,KAAK,IAAI,CAAC;CACnE;AAOD,0FAA0F;AAC1F,wBAAsB,YAAY,CAAC,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,IAAI,CAAC,iBAAiB,EAAE,UAAU,CAAC,GAAG,OAAO,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,UAAU,CAAC;IAAC,QAAQ,EAAE,eAAe,CAAA;CAAE,CAAC,CAqCpN;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,iBAAiB,GAAG,QAAQ,CAQ5D"}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `decide` block in `chant.config.ts`: the backends a decision point's
|
|
3
|
+
* model decider names, which the `decide` Op activity calls (#2828).
|
|
4
|
+
*
|
|
5
|
+
* ```ts
|
|
6
|
+
* import type { ChantConfig } from "@intentius/chant/config";
|
|
7
|
+
*
|
|
8
|
+
* export default {
|
|
9
|
+
* decide: {
|
|
10
|
+
* backends: {
|
|
11
|
+
* systemone: { url: "https://api.typesafe.ai", key: { env: "TYPESAFE_API_KEY" } },
|
|
12
|
+
* local: { url: "http://127.0.0.1:8080" },
|
|
13
|
+
* studio: { url: "http://127.0.0.1:7071", key: { capability: "inference", member: "box" } },
|
|
14
|
+
* },
|
|
15
|
+
* },
|
|
16
|
+
* } satisfies ChantConfig;
|
|
17
|
+
* ```
|
|
18
|
+
*
|
|
19
|
+
* A point's model decider says `"backend": "systemone"`, and that name is the
|
|
20
|
+
* key here. A backend is an endpoint that speaks the `POST /v1/systemone` wire
|
|
21
|
+
* format (TypeSafe's, or any server that implements it, #2491) and where its
|
|
22
|
+
* key comes from.
|
|
23
|
+
*
|
|
24
|
+
* The key is never a literal. It is either an environment variable's name, or
|
|
25
|
+
* a capability the workspace declares as brokered on a box member (#2726).
|
|
26
|
+
* With a brokered capability the broker holds the credential: it either sets
|
|
27
|
+
* the variable `env` names for this process, or it is itself the endpoint and
|
|
28
|
+
* adds the key on the way through, in which case no key is sent from here.
|
|
29
|
+
* SYS001 refuses a string literal where a key goes.
|
|
30
|
+
*
|
|
31
|
+
* This module holds only the schemas, so `../config.ts` can validate the
|
|
32
|
+
* block without loading the client or anything under `workspace/`.
|
|
33
|
+
*/
|
|
34
|
+
import { z } from "zod";
|
|
35
|
+
/** A key read from an environment variable at call time. */
|
|
36
|
+
export declare const envKeySchema: z.ZodObject<{
|
|
37
|
+
/** The variable's name. */
|
|
38
|
+
env: z.ZodString;
|
|
39
|
+
}, z.core.$strict>;
|
|
40
|
+
/**
|
|
41
|
+
* A key reached through a capability a box member declares as brokered
|
|
42
|
+
* (`box.capabilities` in `chant.workspace.json`, #2726). The capability must be
|
|
43
|
+
* declared and name a broker, or the call is refused.
|
|
44
|
+
*/
|
|
45
|
+
export declare const brokeredKeySchema: z.ZodObject<{
|
|
46
|
+
/** The capability's name in the box block, such as `inference`. */
|
|
47
|
+
capability: z.ZodString;
|
|
48
|
+
/** The member whose box declares it. Without it, the one member that declares the capability. */
|
|
49
|
+
member: z.ZodOptional<z.ZodString>;
|
|
50
|
+
/**
|
|
51
|
+
* The environment variable the broker sets with the scoped key. Without it,
|
|
52
|
+
* the broker is the endpoint and adds the key itself, so none is sent.
|
|
53
|
+
*/
|
|
54
|
+
env: z.ZodOptional<z.ZodString>;
|
|
55
|
+
}, z.core.$strict>;
|
|
56
|
+
export declare const keySchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
57
|
+
/** The variable's name. */
|
|
58
|
+
env: z.ZodString;
|
|
59
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
60
|
+
/** The capability's name in the box block, such as `inference`. */
|
|
61
|
+
capability: z.ZodString;
|
|
62
|
+
/** The member whose box declares it. Without it, the one member that declares the capability. */
|
|
63
|
+
member: z.ZodOptional<z.ZodString>;
|
|
64
|
+
/**
|
|
65
|
+
* The environment variable the broker sets with the scoped key. Without it,
|
|
66
|
+
* the broker is the endpoint and adds the key itself, so none is sent.
|
|
67
|
+
*/
|
|
68
|
+
env: z.ZodOptional<z.ZodString>;
|
|
69
|
+
}, z.core.$strict>]>;
|
|
70
|
+
export declare const backendSchema: z.ZodObject<{
|
|
71
|
+
/** The server's base URL. `/v1/systemone` is appended. */
|
|
72
|
+
url: z.ZodString;
|
|
73
|
+
/** Where the bearer key comes from. Omitted for a server that takes none, such as a local one. */
|
|
74
|
+
key: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
75
|
+
/** The variable's name. */
|
|
76
|
+
env: z.ZodString;
|
|
77
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
78
|
+
/** The capability's name in the box block, such as `inference`. */
|
|
79
|
+
capability: z.ZodString;
|
|
80
|
+
/** The member whose box declares it. Without it, the one member that declares the capability. */
|
|
81
|
+
member: z.ZodOptional<z.ZodString>;
|
|
82
|
+
/**
|
|
83
|
+
* The environment variable the broker sets with the scoped key. Without it,
|
|
84
|
+
* the broker is the endpoint and adds the key itself, so none is sent.
|
|
85
|
+
*/
|
|
86
|
+
env: z.ZodOptional<z.ZodString>;
|
|
87
|
+
}, z.core.$strict>]>>;
|
|
88
|
+
/** How long to wait for an answer before the backend counts as unreachable, in milliseconds. Default 30000. */
|
|
89
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
90
|
+
}, z.core.$strict>;
|
|
91
|
+
export declare const decideConfigSchema: z.ZodObject<{
|
|
92
|
+
/** Backend name, as a point's model decider names it, to the backend. */
|
|
93
|
+
backends: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
94
|
+
/** The server's base URL. `/v1/systemone` is appended. */
|
|
95
|
+
url: z.ZodString;
|
|
96
|
+
/** Where the bearer key comes from. Omitted for a server that takes none, such as a local one. */
|
|
97
|
+
key: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
98
|
+
/** The variable's name. */
|
|
99
|
+
env: z.ZodString;
|
|
100
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
101
|
+
/** The capability's name in the box block, such as `inference`. */
|
|
102
|
+
capability: z.ZodString;
|
|
103
|
+
/** The member whose box declares it. Without it, the one member that declares the capability. */
|
|
104
|
+
member: z.ZodOptional<z.ZodString>;
|
|
105
|
+
/**
|
|
106
|
+
* The environment variable the broker sets with the scoped key. Without it,
|
|
107
|
+
* the broker is the endpoint and adds the key itself, so none is sent.
|
|
108
|
+
*/
|
|
109
|
+
env: z.ZodOptional<z.ZodString>;
|
|
110
|
+
}, z.core.$strict>]>>;
|
|
111
|
+
/** How long to wait for an answer before the backend counts as unreachable, in milliseconds. Default 30000. */
|
|
112
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
113
|
+
}, z.core.$strict>>>;
|
|
114
|
+
}, z.core.$strict>;
|
|
115
|
+
export type EnvKey = z.infer<typeof envKeySchema>;
|
|
116
|
+
export type BrokeredKey = z.infer<typeof brokeredKeySchema>;
|
|
117
|
+
export type BackendKey = z.infer<typeof keySchema>;
|
|
118
|
+
export type DecideBackend = z.infer<typeof backendSchema>;
|
|
119
|
+
export type DecideConfig = z.infer<typeof decideConfigSchema>;
|
|
120
|
+
//# sourceMappingURL=decide-config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"decide-config.d.ts","sourceRoot":"","sources":["../../src/op/decide-config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,4DAA4D;AAC5D,eAAO,MAAM,YAAY;IACvB,2BAA2B;;kBAE3B,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,iBAAiB;IAC5B,mEAAmE;;IAEnE,iGAAiG;;IAEjG;;;OAGG;;kBAEH,CAAC;AAEH,eAAO,MAAM,SAAS;IArBpB,2BAA2B;;;IAU3B,mEAAmE;;IAEnE,iGAAiG;;IAEjG;;;OAGG;;oBAI8D,CAAC;AAEpE,eAAO,MAAM,aAAa;IACxB,0DAA0D;;IAE1D,kGAAkG;;QA1BlG,2BAA2B;;;QAU3B,mEAAmE;;QAEnE,iGAAiG;;QAEjG;;;WAGG;;;IAWH,+GAA+G;;kBAE/G,CAAC;AAEH,eAAO,MAAM,kBAAkB;IAC7B,yEAAyE;;QATzE,0DAA0D;;QAE1D,kGAAkG;;YA1BlG,2BAA2B;;;YAU3B,mEAAmE;;YAEnE,iGAAiG;;YAEjG;;;eAGG;;;QAWH,+GAA+G;;;kBAO/G,CAAC;AAEH,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAClD,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC5D,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,SAAS,CAAC,CAAC;AACnD,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAC1D,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A point's inputs, read through the read contract.
|
|
3
|
+
*
|
|
4
|
+
* A point names each input as a read-contract output, optionally with a
|
|
5
|
+
* dotted field: `work-item.criteria` is the `criteria` field of a work item as
|
|
6
|
+
* `records --json` lists it (#2738). The decide activity takes, for each
|
|
7
|
+
* output, what to read (`read: { "work-item": "W-002" }`), reads it the way
|
|
8
|
+
* the read contract does, and gives each input its field. Values passed in
|
|
9
|
+
* `inputs` are taken as given and win over read ones.
|
|
10
|
+
*
|
|
11
|
+
* Read by id or name here:
|
|
12
|
+
*
|
|
13
|
+
* record, decision, work-item a record, by id, from the declared record kinds (`records --json`)
|
|
14
|
+
* member a member, by name (`ls --json`)
|
|
15
|
+
*
|
|
16
|
+
* The other outputs a point may name (finding, region, commit, gate, release,
|
|
17
|
+
* environment, component) are passed in `inputs`, as the output printed them.
|
|
18
|
+
* These reads never call a model, and never write. The module loads code
|
|
19
|
+
* under `workspace/`, so the `decide` activity imports it on first call.
|
|
20
|
+
*/
|
|
21
|
+
/** The outputs {@link readInputs} reads by id or name. */
|
|
22
|
+
export declare const READABLE_OUTPUTS: readonly ["record", "decision", "work-item", "member"];
|
|
23
|
+
/** One output a decide step asked to read that could not be read. */
|
|
24
|
+
export declare class InputReadError extends Error {
|
|
25
|
+
constructor(message: string);
|
|
26
|
+
}
|
|
27
|
+
/** A field of `value` by dotted path, or undefined. */
|
|
28
|
+
export declare function fieldOf(value: unknown, path: string): unknown;
|
|
29
|
+
export interface ReadInputsResult {
|
|
30
|
+
inputs: Record<string, unknown>;
|
|
31
|
+
/** Declared inputs of a read output that the value read does not have. Left out, so no table row matches on them. */
|
|
32
|
+
missing: string[];
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Read each output `read` names, and give the point's inputs that name it
|
|
36
|
+
* their values. Throws an {@link InputReadError} for an output this does not
|
|
37
|
+
* read, one the point does not name, or an id that is not there.
|
|
38
|
+
*/
|
|
39
|
+
export declare function readInputs(declared: string[], read: Record<string, string>, cwd: string): Promise<ReadInputsResult>;
|
|
40
|
+
//# sourceMappingURL=decide-read-inputs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"decide-read-inputs.d.ts","sourceRoot":"","sources":["../../src/op/decide-read-inputs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAMH,0DAA0D;AAC1D,eAAO,MAAM,gBAAgB,wDAAyD,CAAC;AAEvF,qEAAqE;AACrE,qBAAa,cAAe,SAAQ,KAAK;gBAC3B,OAAO,EAAE,MAAM;CAI5B;AAED,uDAAuD;AACvD,wBAAgB,OAAO,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAO7D;AAsCD,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,qHAAqH;IACrH,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAED;;;;GAIG;AACH,wBAAsB,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAuBzH"}
|
package/dist/op/discover.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { OpConfig } from "./types.js";
|
|
2
|
+
import { type StewardDeclaration } from "./steward.js";
|
|
2
3
|
export interface DiscoveredOp {
|
|
3
4
|
config: OpConfig;
|
|
4
5
|
filePath: string;
|
|
@@ -25,4 +26,28 @@ export interface OpDiscoveryResult {
|
|
|
25
26
|
export declare function discoverOps(opts?: {
|
|
26
27
|
cwd?: string;
|
|
27
28
|
}): Promise<OpDiscoveryResult>;
|
|
29
|
+
export interface DiscoveredSteward {
|
|
30
|
+
declaration: StewardDeclaration;
|
|
31
|
+
filePath: string;
|
|
32
|
+
exportName: string;
|
|
33
|
+
}
|
|
34
|
+
export interface StewardDiscoveryResult {
|
|
35
|
+
stewards: Map<string, DiscoveredSteward>;
|
|
36
|
+
/** Files that could not be imported. */
|
|
37
|
+
errors: string[];
|
|
38
|
+
/** Stewards dropped because they would be a second writer: a name or an Op another steward already has. */
|
|
39
|
+
conflicts: string[];
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Every steward declared in the project's `*.op.ts` files (#2731), found the
|
|
43
|
+
* way {@link discoverOps} finds Ops, keyed by the steward's name.
|
|
44
|
+
*
|
|
45
|
+
* Refuses, as errors, the two ways a project could end up with two writers:
|
|
46
|
+
* two stewards of one name, and one Op listed by two stewards. The steward
|
|
47
|
+
* declared first (in file walk order) keeps its entry; the other is dropped
|
|
48
|
+
* and reported in `conflicts`.
|
|
49
|
+
*/
|
|
50
|
+
export declare function discoverStewards(opts?: {
|
|
51
|
+
cwd?: string;
|
|
52
|
+
}): Promise<StewardDiscoveryResult>;
|
|
28
53
|
//# sourceMappingURL=discover.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discover.d.ts","sourceRoot":"","sources":["../../src/op/discover.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"discover.d.ts","sourceRoot":"","sources":["../../src/op/discover.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAIxC,OAAO,EAAwB,KAAK,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAE1E,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,QAAQ,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,iBAAiB;IAChC,GAAG,EAAE,GAAG,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;IAC/B,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AA6GD;;;;;;;;GAQG;AACH,wBAAsB,WAAW,CAAC,IAAI,CAAC,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,iBAAiB,CAAC,CA4CrF;AAED,MAAM,WAAW,iBAAiB;IAChC,WAAW,EAAE,kBAAkB,CAAC;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,sBAAsB;IACrC,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC;IACzC,wCAAwC;IACxC,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,2GAA2G;IAC3G,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB;AAED;;;;;;;;GAQG;AACH,wBAAsB,gBAAgB,CAAC,IAAI,CAAC,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,sBAAsB,CAAC,CA0C/F"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A step whose command stopped at a gate of its own (#2779).
|
|
3
|
+
*
|
|
4
|
+
* Some chant commands decide a gate themselves rather than through a `gate`
|
|
5
|
+
* step: `chant workspace upgrade` stages its patch, records
|
|
6
|
+
* `workspace-upgrade` / `<scope>` pending on the gate ledger, and exits 3.
|
|
7
|
+
* An Op step that runs such a command stops its run at that gate by throwing
|
|
8
|
+
* {@link GateWait} with the pending fact the command recorded. The executor
|
|
9
|
+
* ends the run there with status `gated`, as it does at a pending `gate`
|
|
10
|
+
* step: no later step runs, no `onFailure` phase runs, a work lease is
|
|
11
|
+
* released `gated`, and the run ledger names the gate, with the op it is
|
|
12
|
+
* recorded under when that isn't the run's own.
|
|
13
|
+
*
|
|
14
|
+
* Nothing waits. After `chant approve <op> <gate>` the next run runs the
|
|
15
|
+
* command again, the command finds the approval, and the step goes on. A
|
|
16
|
+
* local steward re-runs its own gated run on the first round after the
|
|
17
|
+
* approval (`./operator.ts`).
|
|
18
|
+
*
|
|
19
|
+
* `shell()` throws it for an exit code named in `gatedExit`
|
|
20
|
+
* (`./activities/shell.ts`); an activity of a lexicon can throw it too.
|
|
21
|
+
*/
|
|
22
|
+
import type { PendingGateRecord } from "../lifecycle/gate-ledger.js";
|
|
23
|
+
/** The marker {@link GateWait} carries, so a copy of core linked twice still recognises it. */
|
|
24
|
+
declare const GATE_WAIT: unique symbol;
|
|
25
|
+
/**
|
|
26
|
+
* Thrown by an activity whose command stopped at a gate. Not a failure: the
|
|
27
|
+
* executor ends the run with status `gated` (see the module doc).
|
|
28
|
+
*/
|
|
29
|
+
export declare class GateWait extends Error {
|
|
30
|
+
readonly pending: PendingGateRecord;
|
|
31
|
+
readonly [GATE_WAIT] = true;
|
|
32
|
+
constructor(pending: PendingGateRecord);
|
|
33
|
+
}
|
|
34
|
+
/** Is this a {@link GateWait}? Duck-typed on the shared symbol. */
|
|
35
|
+
export declare function isGateWait(err: unknown): err is GateWait;
|
|
36
|
+
/**
|
|
37
|
+
* `value` as a pending gate fact, or undefined when it isn't one: it needs
|
|
38
|
+
* the `op`, `gate`, `timestamp` and `expiresAt` every pending line on the
|
|
39
|
+
* gate ledger carries.
|
|
40
|
+
*/
|
|
41
|
+
export declare function asPendingGate(value: unknown): PendingGateRecord | undefined;
|
|
42
|
+
export {};
|
|
43
|
+
//# sourceMappingURL=gate-wait.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gate-wait.d.ts","sourceRoot":"","sources":["../../src/op/gate-wait.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAElE,+FAA+F;AAC/F,QAAA,MAAM,SAAS,eAAkC,CAAC;AAElD;;;GAGG;AACH,qBAAa,QAAS,SAAQ,KAAK;IAErB,QAAQ,CAAC,OAAO,EAAE,iBAAiB;IAD/C,QAAQ,CAAC,CAAC,SAAS,CAAC,QAAQ;gBACP,OAAO,EAAE,iBAAiB;CAIhD;AAED,mEAAmE;AACnE,wBAAgB,UAAU,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,QAAQ,CAExD;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,iBAAiB,GAAG,SAAS,CAO3E"}
|
package/dist/op/gate.d.ts
CHANGED
|
@@ -243,7 +243,10 @@ export declare function evaluateGate(port: GateLedgerPort, input: GateCheckInput
|
|
|
243
243
|
/**
|
|
244
244
|
* The line every renderer prints to say how a pending gate is cleared. A
|
|
245
245
|
* component gate names its environment (#2574), so the approval picks that
|
|
246
|
-
* environment's pending fact when others stand beside it.
|
|
246
|
+
* environment's pending fact when others stand beside it. A gate bound to a
|
|
247
|
+
* plan (#2300) gets `--plan <digest>` too (#2832), so the line approves the
|
|
248
|
+
* plan the reader was shown and not whatever is pending by the time they run
|
|
249
|
+
* it.
|
|
247
250
|
*/
|
|
248
|
-
export declare function approveCommand(op: string, gate: string, environment?: string): string;
|
|
251
|
+
export declare function approveCommand(op: string, gate: string, environment?: string, planDigest?: string): string;
|
|
249
252
|
//# sourceMappingURL=gate.d.ts.map
|
package/dist/op/gate.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gate.d.ts","sourceRoot":"","sources":["../../src/op/gate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,OAAO,EAQL,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACvB,MAAM,0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,oBAAoB,CAAC;IAC9B,sFAAsF;IACtF,UAAU,CAAC,EAAE,oBAAoB,CAAC;CACnC;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,oBAAoB,EAAE,EAC/B,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,MAAM,GAAG,SAAS,EAC9B,QAAQ,EAAE,oBAAoB,GAC7B,SAAS,CAqCX;AAUD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAsB,YAAY,CAAC,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE,cAAc,GAAG,OAAO,CAAC,SAAS,CAAC,CA2FlG;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAI1G"}
|
package/dist/op/index.d.ts
CHANGED
|
@@ -1,15 +1,19 @@
|
|
|
1
|
-
export { Op, phase, activity, gate, effect, build, kubectlApply, helmInstall, helmInstallPinned, waitForStack, waitForReady, gitlabPipeline, lifecycleSnapshot, shell, ensureSecret, teardown, envTeardown, k3dUp, k3dDown, k3sInstall, k3sUninstall, flociUp, flociDown, flociAzUp, flociAzDown, flociGcpUp, flociGcpDown, httpCheck, azGroupEnsure, azGroupDelete, azApply, azDelete, awsApply, awsDelete, gcpApply, gcpDelete, policyGate, guardValidate, spriteCreate, spriteExec, spriteCheckpoint, spriteRestore, listCheckpoints, spriteDestroy, spriteWriteFile, spriteReadFile, spriteListDir, spriteRemove, spriteApplyNetworkPolicy, spriteApplyServices, spriteTaskCreate, spriteTaskRefresh, spriteTaskRelease, spritesUp, spritesDown } from "./builders.js";
|
|
1
|
+
export { Op, phase, activity, gate, effect, build, kubectlApply, helmInstall, helmInstallPinned, waitForStack, waitForReady, gitlabPipeline, lifecycleSnapshot, shell, sourceArchive, releasePlan, releaseRecord, releaseRollbackPlan, releaseRollbackRecord, decide, ensureSecret, teardown, envTeardown, k3dUp, k3dDown, k3sInstall, k3sUninstall, flociUp, flociDown, flociAzUp, flociAzDown, flociGcpUp, flociGcpDown, httpCheck, azGroupEnsure, azGroupDelete, azApply, azDelete, awsApply, awsDelete, gcpApply, gcpDelete, policyGate, guardValidate, workEvidence, spriteCreate, spriteExec, spriteCheckpoint, spriteRestore, listCheckpoints, spriteDestroy, spriteWriteFile, spriteReadFile, spriteListDir, spriteRemove, spriteApplyNetworkPolicy, spriteApplyServices, spriteTaskCreate, spriteTaskRefresh, spriteTaskRelease, spritesUp, spritesDown } from "./builders.js";
|
|
2
2
|
export { OpResource } from "./resource.js";
|
|
3
3
|
export { sleep } from "./activity-runtime.js";
|
|
4
4
|
export { emulatorLifecycle, emulatorsOf, endpointEnvVars } from "./emulator-lifecycle.js";
|
|
5
5
|
export type { EmulatorSpec, EmulatorCapability, EmulatorDeclaration, EmulatorUpArgs, EmulatorLifecycle } from "./emulator-lifecycle.js";
|
|
6
6
|
export { checkFreshness, compare, formatResult, latestRelease, parseVersion, unpinned } from "./emulator-freshness.js";
|
|
7
7
|
export type { FreshnessResult } from "./emulator-freshness.js";
|
|
8
|
-
export type { OpConfig, OpSchedule, PhaseDefinition, StepDefinition, ActivityStep, GateStep, EffectStep, OutcomeAttribute } from "./types.js";
|
|
9
|
-
export { outcomeAttributesOf } from "./types.js";
|
|
8
|
+
export type { OpConfig, OpSchedule, OpWorkLease, PhaseDefinition, StepDefinition, ActivityStep, GateStep, EffectStep, OutcomeAttribute } from "./types.js";
|
|
9
|
+
export { outcomeAttributesOf, WORK_LEASE_STEP_ID } from "./types.js";
|
|
10
|
+
export { RunWorkLease, workLeaseOutput, stewardWorkHolder, workLeaseProblems, workLeaseNeedsRunItem, LEASE_LOST, WORK_BRANCH_PREFIX, } from "./work-lease-run.js";
|
|
11
|
+
export type { WorkLeaseOutput, WorkLeaseRunResult, WorkClaimOutcome, RunWorkLeaseOptions } from "./work-lease-run.js";
|
|
10
12
|
export { isValidCronExpression, cronSyntaxMessage, cronMatches, cronDueBetween } from "./cron.js";
|
|
11
13
|
export { WatchOp, ReconcileOp, ApplyOp, ConvergeOp, WorkflowAuditOp, PipelineAuditOp, LexiconUpgradeOp, IN_SCOPE_LEXICONS, BehaviourOp, } from "./composites/index.js";
|
|
12
14
|
export type { WatchOpConfig, WatchOpResources, ReconcileOpConfig, ReconcileOpResources, ApplyOpConfig, ApplyOpResources, ConvergeOpConfig, ConvergeOpResources, ConvergeDial, WorkflowAuditOpConfig, WorkflowAuditOpResources, PipelineAuditOpConfig, PipelineAuditOpResources, LexiconUpgradeOpConfig, LexiconUpgradeOpResources, BehaviourOpConfig, BehaviourOpResources, } from "./composites/index.js";
|
|
15
|
+
export type { ConvergeSymptom, ResourceSymptom, ResourceObservation, ObservedResource, ResourceStatus, } from "../lifecycle/symptoms.js";
|
|
16
|
+
export { parseResourceObservation, CONVERGE_RESOURCE_ENV } from "../lifecycle/symptoms.js";
|
|
13
17
|
export { receiptActivities, receiptCheckInput } from "./receipt-store.js";
|
|
14
18
|
export type { ReceiptStore, EffectReceiptRef, ReceiptCheckInput, ReceiptActivities, ReceiptActivityOptions, ReceiptReadArgs, ReceiptReadResult, ReceiptWriteArgs, ReceiptStalenessArgs, ReceiptStalenessResult, ReceiptStaleFinding, } from "./receipt-store.js";
|
|
15
19
|
export { discoverOps } from "./discover.js";
|
|
@@ -20,7 +24,7 @@ export { loadActivities, loadProfiles, resolveActivity } from "./activity-regist
|
|
|
20
24
|
export type { ActivityFn } from "./activity-registry.js";
|
|
21
25
|
export { loadActivityContracts, mergeActivityContracts } from "./activity-contract-registry.js";
|
|
22
26
|
export type { LexiconActivityContractContributor } from "./activity-contract-registry.js";
|
|
23
|
-
export { ACTIVITY_PROFILES, ACTIVITY_PROFILE_NAMES } from "./activity-profiles.js";
|
|
27
|
+
export { ACTIVITY_PROFILES, ACTIVITY_PROFILE_NAMES, MAX_STEP_TIMEOUT } from "./activity-profiles.js";
|
|
24
28
|
export type { ActivityProfile, ActivityProfileName } from "./activity-profiles.js";
|
|
25
29
|
export { NonRetryableActivityError, nonRetryableFailure } from "./activity-failure.js";
|
|
26
30
|
export { runOpLocally, parseDuration, OpRunFailure } from "./local-executor.js";
|
|
@@ -46,7 +50,16 @@ export type { StepOutputRef, WithStepRefs } from "./step-output-ref.js";
|
|
|
46
50
|
export type { NamedActivityStep } from "./builders.js";
|
|
47
51
|
export { eq, neq, gt, gte, lt, lte, truthy, falsy, allOf, anyOf, evaluatePredicate, isWellFormedPredicate, predicateReferencesField, run, report, when, duplicateRuleIds, DEFAULT_FLAP_THRESHOLD, } from "./converge-rule.js";
|
|
48
52
|
export type { FieldComparisonOp, FieldTruthinessOp, FieldComparisonPredicate, FieldTruthinessPredicate, AllOfPredicate, AnyOfPredicate, SymptomPredicate, RunAction, ReportAction, RuleAction, ConvergeRule, } from "./converge-rule.js";
|
|
49
|
-
export { discoverConvergeOps, runOperatorRound, runOperatorForever, formatRoundLine, formatSignalLine, DEFAULT_OPERATOR_INTERVAL_MS, } from "./operator.js";
|
|
53
|
+
export { discoverConvergeOps, runOperatorRound, runOperatorForever, formatRoundLine, formatSignalLine, DEFAULT_OPERATOR_INTERVAL_MS, acquireStewardLease, acquireStewardTurn, STEWARD_TURN_WAIT_MS, } from "./operator.js";
|
|
54
|
+
export { declareSteward, isStewardDeclaration, stewardFormFor, stewardOpConfig, normaliseStewardForm, stewardLeaseName, stewardTurnLeaseName, STEWARD_KIND, STEWARD_FORMS, STEWARD_NAME_PATTERN, DEFAULT_STEWARD_ENV, } from "./steward.js";
|
|
55
|
+
export type { StewardDeclaration, StewardDeclarationConfig, StewardForm, StewardFormSpec, StewardOpInput, } from "./steward.js";
|
|
56
|
+
export { discoverStewards } from "./discover.js";
|
|
57
|
+
export { askPointInRun, brokeredModelAsk, isPointWait, PointWait, DEFAULT_INFERENCE_CAPABILITY, } from "./steward-points.js";
|
|
58
|
+
export type { AskPointInRunOptions, BrokeredModelAsk, WaitingPoint } from "./steward-points.js";
|
|
59
|
+
export { GateWait, isGateWait } from "./gate-wait.js";
|
|
60
|
+
export { currentStewardTurn, enterStewardTurn, setStewardTurn, resetStewardTurn, STEWARD_ENV, } from "./steward-turn.js";
|
|
61
|
+
export type { StewardTurn } from "./steward-turn.js";
|
|
62
|
+
export type { DiscoveredSteward, StewardDiscoveryResult } from "./discover.js";
|
|
50
63
|
export type { OperatorTickEvent, OperatorRoundOptions, OperatorLoopOptions, ChangeSubscriber, OperatorSignalEvent, } from "./operator.js";
|
|
51
64
|
export { createChangeSignalGate, DEFAULT_SIGNAL_FLOOR_MS } from "./change-signal.js";
|
|
52
65
|
export type { ChangeSignalGate, ChangeSignalGateOptions, WakeReason } from "./change-signal.js";
|
package/dist/op/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/op/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,iBAAiB,EAAE,YAAY,EAAE,YAAY,EAClH,cAAc,EAAE,iBAAiB,EAAE,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,WAAW,EAAE,KAAK,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/op/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,iBAAiB,EAAE,YAAY,EAAE,YAAY,EAClH,cAAc,EAAE,iBAAiB,EAAE,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,aAAa,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,EAAE,YAAY,EAAE,QAAQ,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EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EACL,kBAAkB,EAAE,gBAAgB,EAAE,cAAc,EAAE,gBAAgB,EAAE,WAAW,GACpF,MAAM,gBAAgB,CAAC;AACxB,YAAY,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,YAAY,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAC5E,YAAY,EACV,iBAAiB,EAAE,oBAAoB,EAAE,mBAAmB,EAC5D,gBAAgB,EAAE,mBAAmB,GACtC,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAClF,YAAY,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7F,OAAO,EAAE,mBAAmB,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC/D,YAAY,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A receipt store on the `chant/lifecycle` branch (#2736, ws-056).
|
|
3
|
+
*
|
|
4
|
+
* The aws and k8s rows keep receipts in the cloud they deploy to (an SSM
|
|
5
|
+
* parameter, a ConfigMap). A target with no store of its own, such as a Fly
|
|
6
|
+
* Machine, keeps them next to the release ledger instead: one file per receipt
|
|
7
|
+
* at `<env>/receipts/<name>.receipt` on the lifecycle branch, written through
|
|
8
|
+
* the same plumbing as the release and build ledgers (../lifecycle/git.ts), so
|
|
9
|
+
* a workspace member's receipts land under its own `_members/<member>/` prefix.
|
|
10
|
+
*
|
|
11
|
+
* The receipt is per environment, not per checkout: every checkout that
|
|
12
|
+
* fetches the branch sees which effects have fired there. Writing is local;
|
|
13
|
+
* the ledger push that follows a recorded release (or `chant lifecycle push`)
|
|
14
|
+
* carries it to the remote.
|
|
15
|
+
*/
|
|
16
|
+
import type { ReceiptStore } from "./receipt-store.js";
|
|
17
|
+
/** Options for {@link lifecycleReceiptStore}. */
|
|
18
|
+
export interface LifecycleReceiptStoreOptions {
|
|
19
|
+
/** The environment whose ledger directory holds the receipts. Omitted, `CHANT_ENV` answers. */
|
|
20
|
+
environment?: string;
|
|
21
|
+
/** The checkout whose lifecycle branch is written. Defaults to the working directory. */
|
|
22
|
+
cwd?: string;
|
|
23
|
+
/** Environment record the `CHANT_ENV` fallback reads. Defaults to `process.env`. */
|
|
24
|
+
env?: Record<string, string | undefined>;
|
|
25
|
+
}
|
|
26
|
+
/** The file name a receipt is kept under: its name with anything outside `[A-Za-z0-9_.-]` replaced. */
|
|
27
|
+
export declare function lifecycleReceiptFile(name: string): string;
|
|
28
|
+
/**
|
|
29
|
+
* A {@link ReceiptStore} over the lifecycle branch. The environment is resolved
|
|
30
|
+
* at first use, so constructing the store reads nothing; with none given and no
|
|
31
|
+
* `CHANT_ENV`, a read or write fails rather than guessing a directory.
|
|
32
|
+
*/
|
|
33
|
+
export declare function lifecycleReceiptStore(options?: LifecycleReceiptStoreOptions): ReceiptStore;
|
|
34
|
+
//# sourceMappingURL=lifecycle-receipt-store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lifecycle-receipt-store.d.ts","sourceRoot":"","sources":["../../src/op/lifecycle-receipt-store.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,KAAK,EAAoB,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEtE,iDAAiD;AACjD,MAAM,WAAW,4BAA4B;IAC3C,+FAA+F;IAC/F,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,yFAAyF;IACzF,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,oFAAoF;IACpF,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;CAC1C;AAED,uGAAuG;AACvG,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEzD;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,GAAE,4BAAiC,GAAG,YAAY,CAqB9F"}
|