@intentius/chant 0.91.0 → 0.94.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/graph.d.ts.map +1 -1
- package/dist/cli/handlers/operator.d.ts +6 -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-plugins.d.ts +6 -6
- package/dist/cli/mcp/workspace-tools.d.ts +2 -1
- 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 +12 -2
- package/dist/cli/registry.d.ts.map +1 -1
- package/dist/codegen/pinned-upgrade.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/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/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 +201 -0
- 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/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 +11 -4
- package/dist/op/index.d.ts.map +1 -1
- package/dist/op/local-executor.d.ts +29 -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 +2 -0
- package/dist/op/op-ir.d.ts.map +1 -1
- package/dist/op/op-verb-class.d.ts.map +1 -1
- package/dist/op/operator.d.ts +97 -1
- package/dist/op/operator.d.ts.map +1 -1
- package/dist/op/runtime.d.ts +37 -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/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 +22 -1
- package/dist/op/steward.d.ts.map +1 -1
- package/dist/op/types.d.ts +7 -0
- package/dist/op/types.d.ts.map +1 -1
- package/dist/op/work-lease-run.d.ts +1 -1
- package/dist/op/work-lease-run.d.ts.map +1 -1
- 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-intent.d.ts +85 -0
- package/dist/workspace/box-intent.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 +104 -0
- package/dist/workspace/chant-migrations.d.ts.map +1 -0
- package/dist/workspace/checks/boxes.d.ts +47 -1
- package/dist/workspace/checks/boxes.d.ts.map +1 -1
- 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 +7 -0
- package/dist/workspace/checks/records.d.ts.map +1 -1
- package/dist/workspace/checks.d.ts +7 -0
- 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 +49 -4
- package/dist/workspace/decide.d.ts.map +1 -1
- package/dist/workspace/decision-points.schema.json +3 -3
- package/dist/workspace/declaration.d.ts +58 -0
- package/dist/workspace/declaration.d.ts.map +1 -1
- package/dist/workspace/declaration.schema.json +119 -1
- package/dist/workspace/declared-kinds.d.ts +20 -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-joins.d.ts +5 -5
- 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 +2 -0
- package/dist/workspace/points-cli.d.ts.map +1 -1
- package/dist/workspace/points.d.ts +4 -6
- package/dist/workspace/points.d.ts.map +1 -1
- package/dist/workspace/reason-codes.d.ts +16 -2
- package/dist/workspace/reason-codes.d.ts.map +1 -1
- package/dist/workspace/records-cli.d.ts +11 -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 +34 -4
- 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 +65 -1
- package/dist/workspace/status-stewards.d.ts.map +1 -1
- package/dist/workspace/status.d.ts +24 -0
- package/dist/workspace/status.d.ts.map +1 -1
- package/dist/workspace/work-cli.d.ts +113 -2
- package/dist/workspace/work-cli.d.ts.map +1 -1
- 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/graph.test.ts +20 -0
- package/src/cli/handlers/graph.ts +16 -2
- package/src/cli/handlers/operator.ts +34 -2
- package/src/cli/handlers/run.test.ts +154 -2
- package/src/cli/handlers/run.ts +121 -2
- package/src/cli/main.test.ts +10 -0
- package/src/cli/main.ts +23 -3
- package/src/cli/mcp/workspace-plugins.ts +6 -6
- package/src/cli/mcp/workspace-tools.test.ts +35 -19
- package/src/cli/mcp/workspace-tools.ts +62 -4
- package/src/cli/plugins.ts +11 -3
- package/src/cli/registry.ts +12 -2
- package/src/cli/serve-mcp-workspace.test.ts +6 -6
- 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/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/run-ledger.ts +6 -0
- package/src/lifecycle/symptoms.ts +95 -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 +308 -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 +119 -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/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 +18 -3
- package/src/op/local-executor.ts +151 -15
- package/src/op/local-output.test.ts +33 -0
- package/src/op/local-output.ts +20 -2
- package/src/op/op-ir.test.ts +10 -0
- package/src/op/op-ir.ts +4 -0
- package/src/op/op-verb-class.ts +1 -0
- package/src/op/operator.ts +290 -11
- package/src/op/runtime.ts +31 -8
- package/src/op/runtimes/local.ts +3 -1
- package/src/op/source-archive.ts +161 -0
- package/src/op/steward-points.test.ts +364 -0
- package/src/op/steward-points.ts +194 -0
- package/src/op/steward-turn.ts +79 -0
- package/src/op/steward.test.ts +87 -3
- package/src/op/steward.ts +25 -1
- package/src/op/types.ts +7 -0
- package/src/op/work-lease-run.test.ts +20 -1
- package/src/op/work-lease-run.ts +2 -2
- 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-intent.test.ts +205 -0
- package/src/workspace/box-intent.ts +159 -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 +169 -0
- package/src/workspace/check-contract.test.ts +4 -2
- package/src/workspace/check.schema.json +19 -5
- package/src/workspace/checks/boxes.test.ts +82 -2
- package/src/workspace/checks/boxes.ts +202 -1
- package/src/workspace/checks/diagrams.test.ts +134 -0
- package/src/workspace/checks/diagrams.ts +108 -0
- package/src/workspace/checks/records.ts +47 -0
- package/src/workspace/checks.ts +20 -2
- 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 +1 -1
- package/src/workspace/decide.ts +156 -23
- package/src/workspace/decision-points.schema.json +3 -3
- package/src/workspace/declaration.schema.json +119 -1
- package/src/workspace/declaration.test.ts +58 -0
- package/src/workspace/declaration.ts +112 -0
- package/src/workspace/declared-kinds.test.ts +31 -5
- package/src/workspace/declared-kinds.ts +46 -1
- 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-joins.test.ts +5 -5
- package/src/workspace/intent-joins.ts +5 -5
- package/src/workspace/intent.schema.json +8 -2
- 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/points-cli.ts +17 -3
- package/src/workspace/points-write.schema.json +11 -1
- package/src/workspace/points.schema.json +51 -0
- package/src/workspace/points.test.ts +16 -15
- package/src/workspace/points.ts +5 -17
- package/src/workspace/read-contract.test.ts +9 -1
- package/src/workspace/reason-codes.test.ts +18 -8
- package/src/workspace/reason-codes.ts +21 -2
- package/src/workspace/records-amend.schema.json +2 -0
- package/src/workspace/records-cli.ts +27 -4
- package/src/workspace/records-close.schema.json +2 -0
- package/src/workspace/records-formats.test.ts +15 -15
- 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-since.test.ts +8 -7
- 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 +36 -2
- package/src/workspace/records.test.ts +49 -4
- package/src/workspace/records.ts +109 -3
- package/src/workspace/status-contract.test.ts +14 -8
- package/src/workspace/status-gates.ts +9 -4
- package/src/workspace/status-stewards.ts +155 -5
- package/src/workspace/status.schema.json +129 -8
- package/src/workspace/status.ts +46 -1
- package/src/workspace/work-acceptance.test.ts +274 -0
- package/src/workspace/{work-cli.test.ts → work-cli.e2e.test.ts} +1 -1
- package/src/workspace/work-cli.ts +193 -10
- 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-readiness-chud.test.ts → work-readiness.test.ts} +30 -32
- package/src/workspace/work.test.ts +20 -2
- package/src/workspace/work.ts +100 -1
- /package/src/cli/{discovery-skip.test.ts → discovery-skip.e2e.test.ts} +0 -0
- /package/src/workspace/conformance/{conformance.test.ts → conformance.e2e.test.ts} +0 -0
- /package/src/workspace/{which-chant.test.ts → which-chant.e2e.test.ts} +0 -0
|
@@ -0,0 +1,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,MAAM,qBAAqB,CAAC;AAG9E,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAE9E,mDAAmD;AACnD,eAAO,MAAM,cAAc,kBAAkB,CAAC;AAE9C,gHAAgH;AAChH,eAAO,MAAM,kBAAkB,QAAS,CAAC;AAEzC,wBAAwB;AACxB,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,OAAO,CAAC;IACf,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,EAAE,CAAA;KAAE,CAAC,CAAC;CAChH;AAED,yDAAyD;AACzD,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC,MAAM,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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"}
|
|
@@ -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,0BAA0B,CAAC;AAIlC,OAAO,KAAK,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAI1E;;;;;;;GAOG;AACH,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,iBAAiB,CAAC;IAC1B;;;OAGG;IACH,MAAM,EAAE,OAAO,CAAC;IAChB,kCAAkC;IAClC,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,qGAAqG;AACrG,MAAM,WAAW,cAAc;IAC7B,IAAI,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,WAAW,EAAE,oBAAoB,EAAE,CAAC;QAAC,OAAO,EAAE,iBAAiB,EAAE,CAAA;KAAE,CAAC,CAAC;IAC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;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,4 +1,4 @@
|
|
|
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";
|
|
@@ -12,6 +12,8 @@ export type { WorkLeaseOutput, WorkLeaseRunResult, WorkClaimOutcome, RunWorkLeas
|
|
|
12
12
|
export { isValidCronExpression, cronSyntaxMessage, cronMatches, cronDueBetween } from "./cron.js";
|
|
13
13
|
export { WatchOp, ReconcileOp, ApplyOp, ConvergeOp, WorkflowAuditOp, PipelineAuditOp, LexiconUpgradeOp, IN_SCOPE_LEXICONS, BehaviourOp, } from "./composites/index.js";
|
|
14
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";
|
|
15
17
|
export { receiptActivities, receiptCheckInput } from "./receipt-store.js";
|
|
16
18
|
export type { ReceiptStore, EffectReceiptRef, ReceiptCheckInput, ReceiptActivities, ReceiptActivityOptions, ReceiptReadArgs, ReceiptReadResult, ReceiptWriteArgs, ReceiptStalenessArgs, ReceiptStalenessResult, ReceiptStaleFinding, } from "./receipt-store.js";
|
|
17
19
|
export { discoverOps } from "./discover.js";
|
|
@@ -22,7 +24,7 @@ export { loadActivities, loadProfiles, resolveActivity } from "./activity-regist
|
|
|
22
24
|
export type { ActivityFn } from "./activity-registry.js";
|
|
23
25
|
export { loadActivityContracts, mergeActivityContracts } from "./activity-contract-registry.js";
|
|
24
26
|
export type { LexiconActivityContractContributor } from "./activity-contract-registry.js";
|
|
25
|
-
export { ACTIVITY_PROFILES, ACTIVITY_PROFILE_NAMES } from "./activity-profiles.js";
|
|
27
|
+
export { ACTIVITY_PROFILES, ACTIVITY_PROFILE_NAMES, MAX_STEP_TIMEOUT } from "./activity-profiles.js";
|
|
26
28
|
export type { ActivityProfile, ActivityProfileName } from "./activity-profiles.js";
|
|
27
29
|
export { NonRetryableActivityError, nonRetryableFailure } from "./activity-failure.js";
|
|
28
30
|
export { runOpLocally, parseDuration, OpRunFailure } from "./local-executor.js";
|
|
@@ -48,10 +50,15 @@ export type { StepOutputRef, WithStepRefs } from "./step-output-ref.js";
|
|
|
48
50
|
export type { NamedActivityStep } from "./builders.js";
|
|
49
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";
|
|
50
52
|
export type { FieldComparisonOp, FieldTruthinessOp, FieldComparisonPredicate, FieldTruthinessPredicate, AllOfPredicate, AnyOfPredicate, SymptomPredicate, RunAction, ReportAction, RuleAction, ConvergeRule, } from "./converge-rule.js";
|
|
51
|
-
export { discoverConvergeOps, runOperatorRound, runOperatorForever, formatRoundLine, formatSignalLine, DEFAULT_OPERATOR_INTERVAL_MS, acquireStewardLease, } from "./operator.js";
|
|
52
|
-
export { declareSteward, isStewardDeclaration, stewardFormFor, stewardOpConfig, normaliseStewardForm, stewardLeaseName, STEWARD_KIND, STEWARD_FORMS, STEWARD_NAME_PATTERN, DEFAULT_STEWARD_ENV, } from "./steward.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";
|
|
53
55
|
export type { StewardDeclaration, StewardDeclarationConfig, StewardForm, StewardFormSpec, StewardOpInput, } from "./steward.js";
|
|
54
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";
|
|
55
62
|
export type { DiscoveredSteward, StewardDiscoveryResult } from "./discover.js";
|
|
56
63
|
export type { OperatorTickEvent, OperatorRoundOptions, OperatorLoopOptions, ChangeSubscriber, OperatorSignalEvent, } from "./operator.js";
|
|
57
64
|
export { createChangeSignalGate, DEFAULT_SIGNAL_FLOOR_MS } 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,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AAgB,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EACL,aAAa,EAAE,gBAAgB,EAAE,WAAW,EAAE,SAAS,EAAE,4BAA4B,GACtF,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAC7F,OAAO,EAAE,QAAQ,EAAE,UAAU,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"}
|
|
@@ -22,6 +22,7 @@ import type { OpConfig, ActivityStep } from "./types.js";
|
|
|
22
22
|
import { type ActivityFn, type ActivityProfile } from "./activity-registry.js";
|
|
23
23
|
import { type GateLedgerPort } from "./gate.js";
|
|
24
24
|
import type { PendingGateRecord } from "../lifecycle/gate-ledger.js";
|
|
25
|
+
import { type WaitingPoint } from "./steward-points.js";
|
|
25
26
|
import type { OpRunRecord } from "./runtime.js";
|
|
26
27
|
import { type WorkLeaseRunResult } from "./work-lease-run.js";
|
|
27
28
|
export { parseDuration } from "./duration.js";
|
|
@@ -70,6 +71,21 @@ export interface StepRecord {
|
|
|
70
71
|
* was applied.
|
|
71
72
|
*/
|
|
72
73
|
refusal?: string;
|
|
74
|
+
/**
|
|
75
|
+
* Set on an activity step that asked a decision point still open (#2749):
|
|
76
|
+
* the question the run now waits on. The step's status is `skipped` and the
|
|
77
|
+
* run's is `waiting`: nothing broke, and a person answers the question.
|
|
78
|
+
*/
|
|
79
|
+
point?: WaitingPoint;
|
|
80
|
+
/**
|
|
81
|
+
* Set on an activity step whose command stopped at a gate of its own
|
|
82
|
+
* (#2779): the op the gate is recorded under and its name, what `chant
|
|
83
|
+
* approve` takes. The step's status is `skipped` and the run's is `gated`.
|
|
84
|
+
*/
|
|
85
|
+
gate?: {
|
|
86
|
+
op: string;
|
|
87
|
+
gate: string;
|
|
88
|
+
};
|
|
73
89
|
}
|
|
74
90
|
export interface OpRunResult {
|
|
75
91
|
op: string;
|
|
@@ -82,11 +98,17 @@ export interface OpRunResult {
|
|
|
82
98
|
*
|
|
83
99
|
* Written to the run ledger as the record's own `status` (#2118).
|
|
84
100
|
*/
|
|
85
|
-
status: "ok" | "fail" | "gated";
|
|
101
|
+
status: "ok" | "fail" | "gated" | "waiting";
|
|
86
102
|
/** ISO-8601 start of this run. */
|
|
87
103
|
startedAt: string;
|
|
88
104
|
/** Present when `status === "gated"`: the pending fact the run ended on. */
|
|
89
105
|
gate?: PendingGateRecord;
|
|
106
|
+
/**
|
|
107
|
+
* Present when `status === "waiting"` (#2749): the open decision point the
|
|
108
|
+
* run stopped on. Like a gate, it is a fact and not a wait: a person answers
|
|
109
|
+
* the question, and the next run reads the answer.
|
|
110
|
+
*/
|
|
111
|
+
point?: WaitingPoint;
|
|
90
112
|
/**
|
|
91
113
|
* Present when `status === "gated"` and this run's own append tried to push:
|
|
92
114
|
* whether it reached the remote (#2310). Absent when the run stopped on a
|
|
@@ -182,6 +204,8 @@ export interface RunOpOptions {
|
|
|
182
204
|
* never promoted into a run failure.
|
|
183
205
|
*/
|
|
184
206
|
onLedgerError?: (err: unknown) => void;
|
|
207
|
+
/** The steward whose turn this run is (#2749), recorded on its ledger record. */
|
|
208
|
+
steward?: string;
|
|
185
209
|
/**
|
|
186
210
|
* For an Op that declares `workLease` (#2748): the item this run is for
|
|
187
211
|
* (`chant run <op> --work <id>`), which takes the place of the Op's own, and
|
|
@@ -201,9 +225,10 @@ export interface RunOpOptions {
|
|
|
201
225
|
* Resolves with the run result when every phase succeeds (`status: "ok"`), and
|
|
202
226
|
* also when the run stopped at an unapproved gate (`status: "gated"`, with the
|
|
203
227
|
* pending fact on `result.gate`) — a gate is a fact, not an error, so it is not
|
|
204
|
-
* thrown.
|
|
205
|
-
*
|
|
206
|
-
*
|
|
228
|
+
* thrown. So does an activity's open decision point (`status: "waiting"`, with
|
|
229
|
+
* the question on `result.point`, #2749). Rejects with `OpRunFailure` (carrying the partial result) on terminal
|
|
230
|
+
* failure, after running any `onFailure` phases in reverse order; a gated or
|
|
231
|
+
* waiting run runs no `onFailure` phase, because nothing failed and nothing was left
|
|
207
232
|
* half-applied to compensate for.
|
|
208
233
|
*
|
|
209
234
|
* Whichever of the three ways it settles, the run carries an
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local-executor.d.ts","sourceRoot":"","sources":["../../src/op/local-executor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAGH,OAAO,KAAK,EAAE,QAAQ,EAAmB,YAAY,EAAwC,MAAM,SAAS,CAAC;AAC7G,OAAO,EAAmB,KAAK,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"local-executor.d.ts","sourceRoot":"","sources":["../../src/op/local-executor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAGH,OAAO,KAAK,EAAE,QAAQ,EAAmB,YAAY,EAAwC,MAAM,SAAS,CAAC;AAC7G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E;IAChE,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,sEAAsE;IACtE,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,0DAA0D;IAC1D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI,CAAC;IACxC;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE;QAAE,GAAG,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC1B;;;;OAIG;IACH,aAAa,CAAC,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,iFAAiF;IACjF,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;;OAKG;IACH,IAAI,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC1C,iGAAiG;IACjG,kBAAkB,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CAChD;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAsB,YAAY,CAChC,MAAM,EAAE,QAAQ,EAChB,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,EACnC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,EACzC,MAAM,CAAC,EAAE,WAAW,EACpB,OAAO,GAAE,YAAiB,GACzB,OAAO,CAAC,WAAW,CAAC,CAetB"}
|
|
@@ -23,4 +23,6 @@ export declare function renderHuman(result: OpRunResult, write?: Writer): void;
|
|
|
23
23
|
*/
|
|
24
24
|
export declare function renderJson(result: OpRunResult, write?: Writer): void;
|
|
25
25
|
export type { OpRunResult, StepRecord };
|
|
26
|
+
/** The command a person answers an open decision point with (#2749). */
|
|
27
|
+
export declare function pointAnswerCommand(id: string): string;
|
|
26
28
|
//# sourceMappingURL=local-output.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local-output.d.ts","sourceRoot":"","sources":["../../src/op/local-output.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAGhE,KAAK,MAAM,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;AAerC;;;GAGG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,WAAW,EAAE,KAAK,GAAE,MAAe,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"local-output.d.ts","sourceRoot":"","sources":["../../src/op/local-output.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAGhE,KAAK,MAAM,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;AAerC;;;GAGG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,WAAW,EAAE,KAAK,GAAE,MAAe,GAAG,IAAI,CAwF7E;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,WAAW,EAAE,KAAK,GAAE,MAAe,GAAG,IAAI,CAS5E;AAED,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,CAAC;AAExC,wEAAwE;AACxE,wBAAgB,kBAAkB,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAErD"}
|
package/dist/op/op-ir.d.ts
CHANGED
|
@@ -101,6 +101,8 @@ export interface OpIRActivityStep {
|
|
|
101
101
|
args: Record<string, unknown>;
|
|
102
102
|
/** Resolved to its effective value — `ActivityStep.profile ?? "fastIdempotent"`. */
|
|
103
103
|
profile: string;
|
|
104
|
+
/** The step's own timeout, replacing its profile's (#2787). Absent when the profile's applies. */
|
|
105
|
+
timeout?: string;
|
|
104
106
|
/**
|
|
105
107
|
* What this step's effect touches in the estate (#2022): the string values
|
|
106
108
|
* of the args its contract declares as entity-identifying
|
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IAC1J,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IAClD;;;;OAIG;IACH,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC;CACzD;AAsGD;;;;;;;;;GASG;AACH,wBAAgB,SAAS,CACvB,MAAM,EAAE,QAAQ,EAChB,gBAAgB,GAAE,WAAW,CAAC,MAAM,EAAE,gBAAgB,CAAgB,EACtE,eAAe,GAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAqB,GAC7E,IAAI,CA6CN;AAED,sLAAsL;AACtL,wBAAgB,aAAa,CAC3B,MAAM,EAAE,QAAQ,EAChB,gBAAgB,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,gBAAgB,CAAC,EACxD,eAAe,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC,GAC1D,MAAM,CAER;AAiDD,qDAAqD;AACrD,wBAAgB,cAAc,CAAC,EAAE,EAAE,IAAI,GAAG,QAAQ,CAkBjD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"op-verb-class.d.ts","sourceRoot":"","sources":["../../src/op/op-verb-class.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,KAAK,EAAsC,QAAQ,EAAkB,MAAM,SAAS,CAAC;AAE5F,MAAM,MAAM,WAAW,GAAG,WAAW,GAAG,UAAU,GAAG,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"op-verb-class.d.ts","sourceRoot":"","sources":["../../src/op/op-verb-class.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,KAAK,EAAsC,QAAQ,EAAkB,MAAM,SAAS,CAAC;AAE5F,MAAM,MAAM,WAAW,GAAG,WAAW,GAAG,UAAU,GAAG,aAAa,CAAC;AAiDnE;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,IAAI,CAAC,QAAQ,EAAE,QAAQ,GAAG,WAAW,CAAC,GAAG,WAAW,CA2B/F;AAED;;;;;;;;GAQG;AACH,wBAAgB,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC,QAAQ,EAAE,QAAQ,GAAG,WAAW,CAAC,GAAG,OAAO,CAS/E"}
|