@azx-pbc/axiom-runtime 0.0.0-stage → 0.0.1
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/LICENSE +21 -0
- package/README.md +714 -2
- package/dist/cache/index.d.ts +191 -0
- package/dist/cache/index.d.ts.map +1 -0
- package/dist/cache/index.js +361 -0
- package/dist/cache/index.js.map +1 -0
- package/dist/canonical/jcs.d.ts +78 -0
- package/dist/canonical/jcs.d.ts.map +1 -0
- package/dist/canonical/jcs.js +500 -0
- package/dist/canonical/jcs.js.map +1 -0
- package/dist/canonical/restricted-json.d.ts +7 -0
- package/dist/canonical/restricted-json.d.ts.map +1 -0
- package/dist/canonical/restricted-json.js +318 -0
- package/dist/canonical/restricted-json.js.map +1 -0
- package/dist/canonical/restricted-value.d.ts +59 -0
- package/dist/canonical/restricted-value.d.ts.map +1 -0
- package/dist/canonical/restricted-value.js +156 -0
- package/dist/canonical/restricted-value.js.map +1 -0
- package/dist/canonical/restricted.d.ts +85 -0
- package/dist/canonical/restricted.d.ts.map +1 -0
- package/dist/canonical/restricted.js +163 -0
- package/dist/canonical/restricted.js.map +1 -0
- package/dist/canonical/signature.d.ts +38 -0
- package/dist/canonical/signature.d.ts.map +1 -0
- package/dist/canonical/signature.js +47 -0
- package/dist/canonical/signature.js.map +1 -0
- package/dist/eval/access/delivery.d.ts +63 -0
- package/dist/eval/access/delivery.d.ts.map +1 -0
- package/dist/eval/access/delivery.js +98 -0
- package/dist/eval/access/delivery.js.map +1 -0
- package/dist/eval/access/overlay.d.ts +72 -0
- package/dist/eval/access/overlay.d.ts.map +1 -0
- package/dist/eval/access/overlay.js +402 -0
- package/dist/eval/access/overlay.js.map +1 -0
- package/dist/eval/access/projection.d.ts +159 -0
- package/dist/eval/access/projection.d.ts.map +1 -0
- package/dist/eval/access/projection.js +211 -0
- package/dist/eval/access/projection.js.map +1 -0
- package/dist/eval/access/window.d.ts +128 -0
- package/dist/eval/access/window.d.ts.map +1 -0
- package/dist/eval/access/window.js +254 -0
- package/dist/eval/access/window.js.map +1 -0
- package/dist/eval/access/write.d.ts +113 -0
- package/dist/eval/access/write.d.ts.map +1 -0
- package/dist/eval/access/write.js +119 -0
- package/dist/eval/access/write.js.map +1 -0
- package/dist/eval/addressing.d.ts +131 -0
- package/dist/eval/addressing.d.ts.map +1 -0
- package/dist/eval/addressing.js +270 -0
- package/dist/eval/addressing.js.map +1 -0
- package/dist/eval/budget.d.ts +143 -0
- package/dist/eval/budget.d.ts.map +1 -0
- package/dist/eval/budget.js +387 -0
- package/dist/eval/budget.js.map +1 -0
- package/dist/eval/computed.d.ts +46 -0
- package/dist/eval/computed.d.ts.map +1 -0
- package/dist/eval/computed.js +89 -0
- package/dist/eval/computed.js.map +1 -0
- package/dist/eval/denials.d.ts +64 -0
- package/dist/eval/denials.d.ts.map +1 -0
- package/dist/eval/denials.js +87 -0
- package/dist/eval/denials.js.map +1 -0
- package/dist/eval/engine/cancellation.d.ts +12 -0
- package/dist/eval/engine/cancellation.d.ts.map +1 -0
- package/dist/eval/engine/cancellation.js +56 -0
- package/dist/eval/engine/cancellation.js.map +1 -0
- package/dist/eval/engine/delta.d.ts +104 -0
- package/dist/eval/engine/delta.d.ts.map +1 -0
- package/dist/eval/engine/delta.js +466 -0
- package/dist/eval/engine/delta.js.map +1 -0
- package/dist/eval/engine/deps.d.ts +136 -0
- package/dist/eval/engine/deps.d.ts.map +1 -0
- package/dist/eval/engine/deps.js +345 -0
- package/dist/eval/engine/deps.js.map +1 -0
- package/dist/eval/engine/identity.d.ts +128 -0
- package/dist/eval/engine/identity.d.ts.map +1 -0
- package/dist/eval/engine/identity.js +398 -0
- package/dist/eval/engine/identity.js.map +1 -0
- package/dist/eval/engine/index.d.ts +200 -0
- package/dist/eval/engine/index.d.ts.map +1 -0
- package/dist/eval/engine/index.js +1242 -0
- package/dist/eval/engine/index.js.map +1 -0
- package/dist/eval/engine/measurement.d.ts +23 -0
- package/dist/eval/engine/measurement.d.ts.map +1 -0
- package/dist/eval/engine/measurement.js +42 -0
- package/dist/eval/engine/measurement.js.map +1 -0
- package/dist/eval/engine/naive.d.ts +19 -0
- package/dist/eval/engine/naive.d.ts.map +1 -0
- package/dist/eval/engine/naive.js +59 -0
- package/dist/eval/engine/naive.js.map +1 -0
- package/dist/eval/engine/ops.d.ts +214 -0
- package/dist/eval/engine/ops.d.ts.map +1 -0
- package/dist/eval/engine/ops.js +1422 -0
- package/dist/eval/engine/ops.js.map +1 -0
- package/dist/eval/engine/patches.d.ts +40 -0
- package/dist/eval/engine/patches.d.ts.map +1 -0
- package/dist/eval/engine/patches.js +125 -0
- package/dist/eval/engine/patches.js.map +1 -0
- package/dist/eval/engine/ports.d.ts +71 -0
- package/dist/eval/engine/ports.d.ts.map +1 -0
- package/dist/eval/engine/ports.js +2 -0
- package/dist/eval/engine/ports.js.map +1 -0
- package/dist/eval/engine/session.d.ts +116 -0
- package/dist/eval/engine/session.d.ts.map +1 -0
- package/dist/eval/engine/session.js +653 -0
- package/dist/eval/engine/session.js.map +1 -0
- package/dist/eval/engine/snapshot.d.ts +97 -0
- package/dist/eval/engine/snapshot.d.ts.map +1 -0
- package/dist/eval/engine/snapshot.js +221 -0
- package/dist/eval/engine/snapshot.js.map +1 -0
- package/dist/eval/engine/subscriptions.d.ts +47 -0
- package/dist/eval/engine/subscriptions.d.ts.map +1 -0
- package/dist/eval/engine/subscriptions.js +103 -0
- package/dist/eval/engine/subscriptions.js.map +1 -0
- package/dist/eval/engine/trace.d.ts +77 -0
- package/dist/eval/engine/trace.d.ts.map +1 -0
- package/dist/eval/engine/trace.js +140 -0
- package/dist/eval/engine/trace.js.map +1 -0
- package/dist/eval/error-diagnostic.d.ts +26 -0
- package/dist/eval/error-diagnostic.d.ts.map +1 -0
- package/dist/eval/error-diagnostic.js +63 -0
- package/dist/eval/error-diagnostic.js.map +1 -0
- package/dist/eval/evaluate-expr.d.ts +44 -0
- package/dist/eval/evaluate-expr.d.ts.map +1 -0
- package/dist/eval/evaluate-expr.js +149 -0
- package/dist/eval/evaluate-expr.js.map +1 -0
- package/dist/eval/evaluate.d.ts +282 -0
- package/dist/eval/evaluate.d.ts.map +1 -0
- package/dist/eval/evaluate.js +391 -0
- package/dist/eval/evaluate.js.map +1 -0
- package/dist/eval/evolution/relocate.d.ts +72 -0
- package/dist/eval/evolution/relocate.d.ts.map +1 -0
- package/dist/eval/evolution/relocate.js +427 -0
- package/dist/eval/evolution/relocate.js.map +1 -0
- package/dist/eval/evolution/select.d.ts +11 -0
- package/dist/eval/evolution/select.d.ts.map +1 -0
- package/dist/eval/evolution/select.js +53 -0
- package/dist/eval/evolution/select.js.map +1 -0
- package/dist/eval/evolution/upcast.d.ts +13 -0
- package/dist/eval/evolution/upcast.d.ts.map +1 -0
- package/dist/eval/evolution/upcast.js +88 -0
- package/dist/eval/evolution/upcast.js.map +1 -0
- package/dist/eval/expr/aggregates.d.ts +75 -0
- package/dist/eval/expr/aggregates.d.ts.map +1 -0
- package/dist/eval/expr/aggregates.js +991 -0
- package/dist/eval/expr/aggregates.js.map +1 -0
- package/dist/eval/expr/arithmetic.d.ts +26 -0
- package/dist/eval/expr/arithmetic.d.ts.map +1 -0
- package/dist/eval/expr/arithmetic.js +387 -0
- package/dist/eval/expr/arithmetic.js.map +1 -0
- package/dist/eval/expr/between.d.ts +17 -0
- package/dist/eval/expr/between.d.ts.map +1 -0
- package/dist/eval/expr/between.js +46 -0
- package/dist/eval/expr/between.js.map +1 -0
- package/dist/eval/expr/binder.d.ts +96 -0
- package/dist/eval/expr/binder.d.ts.map +1 -0
- package/dist/eval/expr/binder.js +253 -0
- package/dist/eval/expr/binder.js.map +1 -0
- package/dist/eval/expr/call-dispatch.d.ts +28 -0
- package/dist/eval/expr/call-dispatch.d.ts.map +1 -0
- package/dist/eval/expr/call-dispatch.js +114 -0
- package/dist/eval/expr/call-dispatch.js.map +1 -0
- package/dist/eval/expr/collections.d.ts +20 -0
- package/dist/eval/expr/collections.d.ts.map +1 -0
- package/dist/eval/expr/collections.js +66 -0
- package/dist/eval/expr/collections.js.map +1 -0
- package/dist/eval/expr/compare.d.ts +36 -0
- package/dist/eval/expr/compare.d.ts.map +1 -0
- package/dist/eval/expr/compare.js +115 -0
- package/dist/eval/expr/compare.js.map +1 -0
- package/dist/eval/expr/datasets.d.ts +28 -0
- package/dist/eval/expr/datasets.d.ts.map +1 -0
- package/dist/eval/expr/datasets.js +304 -0
- package/dist/eval/expr/datasets.js.map +1 -0
- package/dist/eval/expr/digest.d.ts +23 -0
- package/dist/eval/expr/digest.d.ts.map +1 -0
- package/dist/eval/expr/digest.js +89 -0
- package/dist/eval/expr/digest.js.map +1 -0
- package/dist/eval/expr/domains.d.ts +19 -0
- package/dist/eval/expr/domains.d.ts.map +1 -0
- package/dist/eval/expr/domains.js +18 -0
- package/dist/eval/expr/domains.js.map +1 -0
- package/dist/eval/expr/host.d.ts +152 -0
- package/dist/eval/expr/host.d.ts.map +1 -0
- package/dist/eval/expr/host.js +36 -0
- package/dist/eval/expr/host.js.map +1 -0
- package/dist/eval/expr/lists.d.ts +24 -0
- package/dist/eval/expr/lists.d.ts.map +1 -0
- package/dist/eval/expr/lists.js +155 -0
- package/dist/eval/expr/lists.js.map +1 -0
- package/dist/eval/expr/member.d.ts +15 -0
- package/dist/eval/expr/member.d.ts.map +1 -0
- package/dist/eval/expr/member.js +32 -0
- package/dist/eval/expr/member.js.map +1 -0
- package/dist/eval/expr/money-ops.d.ts +10 -0
- package/dist/eval/expr/money-ops.d.ts.map +1 -0
- package/dist/eval/expr/money-ops.js +17 -0
- package/dist/eval/expr/money-ops.js.map +1 -0
- package/dist/eval/expr/operands.d.ts +27 -0
- package/dist/eval/expr/operands.d.ts.map +1 -0
- package/dist/eval/expr/operands.js +167 -0
- package/dist/eval/expr/operands.js.map +1 -0
- package/dist/eval/expr/presence.d.ts +27 -0
- package/dist/eval/expr/presence.d.ts.map +1 -0
- package/dist/eval/expr/presence.js +140 -0
- package/dist/eval/expr/presence.js.map +1 -0
- package/dist/eval/expr/records.d.ts +22 -0
- package/dist/eval/expr/records.d.ts.map +1 -0
- package/dist/eval/expr/records.js +101 -0
- package/dist/eval/expr/records.js.map +1 -0
- package/dist/eval/expr/rule-refs.d.ts +25 -0
- package/dist/eval/expr/rule-refs.d.ts.map +1 -0
- package/dist/eval/expr/rule-refs.js +60 -0
- package/dist/eval/expr/rule-refs.js.map +1 -0
- package/dist/eval/expr/sequences.d.ts +26 -0
- package/dist/eval/expr/sequences.d.ts.map +1 -0
- package/dist/eval/expr/sequences.js +151 -0
- package/dist/eval/expr/sequences.js.map +1 -0
- package/dist/eval/expr/value.d.ts +99 -0
- package/dist/eval/expr/value.d.ts.map +1 -0
- package/dist/eval/expr/value.js +14 -0
- package/dist/eval/expr/value.js.map +1 -0
- package/dist/eval/expression.d.ts +142 -0
- package/dist/eval/expression.d.ts.map +1 -0
- package/dist/eval/expression.js +446 -0
- package/dist/eval/expression.js.map +1 -0
- package/dist/eval/firing.d.ts +68 -0
- package/dist/eval/firing.d.ts.map +1 -0
- package/dist/eval/firing.js +222 -0
- package/dist/eval/firing.js.map +1 -0
- package/dist/eval/gate.d.ts +110 -0
- package/dist/eval/gate.d.ts.map +1 -0
- package/dist/eval/gate.js +278 -0
- package/dist/eval/gate.js.map +1 -0
- package/dist/eval/layout-visibility.d.ts +18 -0
- package/dist/eval/layout-visibility.d.ts.map +1 -0
- package/dist/eval/layout-visibility.js +61 -0
- package/dist/eval/layout-visibility.js.map +1 -0
- package/dist/eval/option-availability.d.ts +26 -0
- package/dist/eval/option-availability.d.ts.map +1 -0
- package/dist/eval/option-availability.js +580 -0
- package/dist/eval/option-availability.js.map +1 -0
- package/dist/eval/options-boundary.d.ts +15 -0
- package/dist/eval/options-boundary.d.ts.map +1 -0
- package/dist/eval/options-boundary.js +40 -0
- package/dist/eval/options-boundary.js.map +1 -0
- package/dist/eval/options.d.ts +99 -0
- package/dist/eval/options.d.ts.map +1 -0
- package/dist/eval/options.js +96 -0
- package/dist/eval/options.js.map +1 -0
- package/dist/eval/overrides.d.ts +116 -0
- package/dist/eval/overrides.d.ts.map +1 -0
- package/dist/eval/overrides.js +176 -0
- package/dist/eval/overrides.js.map +1 -0
- package/dist/eval/paths.d.ts +25 -0
- package/dist/eval/paths.d.ts.map +1 -0
- package/dist/eval/paths.js +47 -0
- package/dist/eval/paths.js.map +1 -0
- package/dist/eval/presentation-reads.d.ts +20 -0
- package/dist/eval/presentation-reads.d.ts.map +1 -0
- package/dist/eval/presentation-reads.js +2 -0
- package/dist/eval/presentation-reads.js.map +1 -0
- package/dist/eval/presentation.d.ts +122 -0
- package/dist/eval/presentation.d.ts.map +1 -0
- package/dist/eval/presentation.js +255 -0
- package/dist/eval/presentation.js.map +1 -0
- package/dist/eval/reader/context-value.d.ts +41 -0
- package/dist/eval/reader/context-value.d.ts.map +1 -0
- package/dist/eval/reader/context-value.js +129 -0
- package/dist/eval/reader/context-value.js.map +1 -0
- package/dist/eval/reader/covered.d.ts +53 -0
- package/dist/eval/reader/covered.d.ts.map +1 -0
- package/dist/eval/reader/covered.js +139 -0
- package/dist/eval/reader/covered.js.map +1 -0
- package/dist/eval/reader/declarations.d.ts +182 -0
- package/dist/eval/reader/declarations.d.ts.map +1 -0
- package/dist/eval/reader/declarations.js +153 -0
- package/dist/eval/reader/declarations.js.map +1 -0
- package/dist/eval/reader/member-access.d.ts +87 -0
- package/dist/eval/reader/member-access.d.ts.map +1 -0
- package/dist/eval/reader/member-access.js +212 -0
- package/dist/eval/reader/member-access.js.map +1 -0
- package/dist/eval/reader/memo.d.ts +34 -0
- package/dist/eval/reader/memo.d.ts.map +1 -0
- package/dist/eval/reader/memo.js +67 -0
- package/dist/eval/reader/memo.js.map +1 -0
- package/dist/eval/reader/overlay.d.ts +74 -0
- package/dist/eval/reader/overlay.d.ts.map +1 -0
- package/dist/eval/reader/overlay.js +365 -0
- package/dist/eval/reader/overlay.js.map +1 -0
- package/dist/eval/reader/questions.d.ts +37 -0
- package/dist/eval/reader/questions.d.ts.map +1 -0
- package/dist/eval/reader/questions.js +78 -0
- package/dist/eval/reader/questions.js.map +1 -0
- package/dist/eval/reader/resolve.d.ts +84 -0
- package/dist/eval/reader/resolve.d.ts.map +1 -0
- package/dist/eval/reader/resolve.js +310 -0
- package/dist/eval/reader/resolve.js.map +1 -0
- package/dist/eval/reader/value-read.d.ts +50 -0
- package/dist/eval/reader/value-read.d.ts.map +1 -0
- package/dist/eval/reader/value-read.js +133 -0
- package/dist/eval/reader/value-read.js.map +1 -0
- package/dist/eval/reader/withheld.d.ts +48 -0
- package/dist/eval/reader/withheld.d.ts.map +1 -0
- package/dist/eval/reader/withheld.js +108 -0
- package/dist/eval/reader/withheld.js.map +1 -0
- package/dist/eval/reader-paths.d.ts +24 -0
- package/dist/eval/reader-paths.d.ts.map +1 -0
- package/dist/eval/reader-paths.js +23 -0
- package/dist/eval/reader-paths.js.map +1 -0
- package/dist/eval/reader.d.ts +281 -0
- package/dist/eval/reader.d.ts.map +1 -0
- package/dist/eval/reader.js +560 -0
- package/dist/eval/reader.js.map +1 -0
- package/dist/eval/receipt.d.ts +37 -0
- package/dist/eval/receipt.d.ts.map +1 -0
- package/dist/eval/receipt.js +222 -0
- package/dist/eval/receipt.js.map +1 -0
- package/dist/eval/report/assemble.d.ts +84 -0
- package/dist/eval/report/assemble.d.ts.map +1 -0
- package/dist/eval/report/assemble.js +277 -0
- package/dist/eval/report/assemble.js.map +1 -0
- package/dist/eval/report/fold.d.ts +18 -0
- package/dist/eval/report/fold.d.ts.map +1 -0
- package/dist/eval/report/fold.js +58 -0
- package/dist/eval/report/fold.js.map +1 -0
- package/dist/eval/rule/alternatives.d.ts +23 -0
- package/dist/eval/rule/alternatives.d.ts.map +1 -0
- package/dist/eval/rule/alternatives.js +46 -0
- package/dist/eval/rule/alternatives.js.map +1 -0
- package/dist/eval/rule/behaviour.d.ts +47 -0
- package/dist/eval/rule/behaviour.d.ts.map +1 -0
- package/dist/eval/rule/behaviour.js +249 -0
- package/dist/eval/rule/behaviour.js.map +1 -0
- package/dist/eval/rule/compute.d.ts +46 -0
- package/dist/eval/rule/compute.d.ts.map +1 -0
- package/dist/eval/rule/compute.js +158 -0
- package/dist/eval/rule/compute.js.map +1 -0
- package/dist/eval/rule/create-state.d.ts +42 -0
- package/dist/eval/rule/create-state.d.ts.map +1 -0
- package/dist/eval/rule/create-state.js +134 -0
- package/dist/eval/rule/create-state.js.map +1 -0
- package/dist/eval/rule/diagnostics.d.ts +24 -0
- package/dist/eval/rule/diagnostics.d.ts.map +1 -0
- package/dist/eval/rule/diagnostics.js +45 -0
- package/dist/eval/rule/diagnostics.js.map +1 -0
- package/dist/eval/rule/execution.d.ts +24 -0
- package/dist/eval/rule/execution.d.ts.map +1 -0
- package/dist/eval/rule/execution.js +495 -0
- package/dist/eval/rule/execution.js.map +1 -0
- package/dist/eval/rule/gate.d.ts +12 -0
- package/dist/eval/rule/gate.d.ts.map +1 -0
- package/dist/eval/rule/gate.js +34 -0
- package/dist/eval/rule/gate.js.map +1 -0
- package/dist/eval/rule/item.d.ts +11 -0
- package/dist/eval/rule/item.d.ts.map +1 -0
- package/dist/eval/rule/item.js +265 -0
- package/dist/eval/rule/item.js.map +1 -0
- package/dist/eval/rule/prepare.d.ts +64 -0
- package/dist/eval/rule/prepare.d.ts.map +1 -0
- package/dist/eval/rule/prepare.js +131 -0
- package/dist/eval/rule/prepare.js.map +1 -0
- package/dist/eval/rule/result.d.ts +97 -0
- package/dist/eval/rule/result.d.ts.map +1 -0
- package/dist/eval/rule/result.js +347 -0
- package/dist/eval/rule/result.js.map +1 -0
- package/dist/eval/rule/runner.d.ts +128 -0
- package/dist/eval/rule/runner.d.ts.map +1 -0
- package/dist/eval/rule/runner.js +296 -0
- package/dist/eval/rule/runner.js.map +1 -0
- package/dist/eval/rule/screen.d.ts +32 -0
- package/dist/eval/rule/screen.d.ts.map +1 -0
- package/dist/eval/rule/screen.js +73 -0
- package/dist/eval/rule/screen.js.map +1 -0
- package/dist/eval/rule/state.d.ts +137 -0
- package/dist/eval/rule/state.d.ts.map +1 -0
- package/dist/eval/rule/state.js +2 -0
- package/dist/eval/rule/state.js.map +1 -0
- package/dist/eval/rule/steps.d.ts +44 -0
- package/dist/eval/rule/steps.d.ts.map +1 -0
- package/dist/eval/rule/steps.js +367 -0
- package/dist/eval/rule/steps.js.map +1 -0
- package/dist/eval/rule/visibility.d.ts +18 -0
- package/dist/eval/rule/visibility.d.ts.map +1 -0
- package/dist/eval/rule/visibility.js +79 -0
- package/dist/eval/rule/visibility.js.map +1 -0
- package/dist/eval/seal.d.ts +74 -0
- package/dist/eval/seal.d.ts.map +1 -0
- package/dist/eval/seal.js +154 -0
- package/dist/eval/seal.js.map +1 -0
- package/dist/eval/signature-coverage.d.ts +19 -0
- package/dist/eval/signature-coverage.d.ts.map +1 -0
- package/dist/eval/signature-coverage.js +160 -0
- package/dist/eval/signature-coverage.js.map +1 -0
- package/dist/eval/state/derive.d.ts +72 -0
- package/dist/eval/state/derive.d.ts.map +1 -0
- package/dist/eval/state/derive.js +61 -0
- package/dist/eval/state/derive.js.map +1 -0
- package/dist/eval/state/describe.d.ts +18 -0
- package/dist/eval/state/describe.d.ts.map +1 -0
- package/dist/eval/state/describe.js +19 -0
- package/dist/eval/state/describe.js.map +1 -0
- package/dist/eval/state/field-state.d.ts +471 -0
- package/dist/eval/state/field-state.d.ts.map +1 -0
- package/dist/eval/state/field-state.js +1604 -0
- package/dist/eval/state/field-state.js.map +1 -0
- package/dist/eval/state/measurement.d.ts +136 -0
- package/dist/eval/state/measurement.d.ts.map +1 -0
- package/dist/eval/state/measurement.js +209 -0
- package/dist/eval/state/measurement.js.map +1 -0
- package/dist/eval/state/options.d.ts +21 -0
- package/dist/eval/state/options.d.ts.map +1 -0
- package/dist/eval/state/options.js +3 -0
- package/dist/eval/state/options.js.map +1 -0
- package/dist/eval/state/readiness.d.ts +400 -0
- package/dist/eval/state/readiness.d.ts.map +1 -0
- package/dist/eval/state/readiness.js +1067 -0
- package/dist/eval/state/readiness.js.map +1 -0
- package/dist/eval/state/snapshot.d.ts +130 -0
- package/dist/eval/state/snapshot.d.ts.map +1 -0
- package/dist/eval/state/snapshot.js +35 -0
- package/dist/eval/state/snapshot.js.map +1 -0
- package/dist/eval/state/unavailable-options.d.ts +54 -0
- package/dist/eval/state/unavailable-options.d.ts.map +1 -0
- package/dist/eval/state/unavailable-options.js +82 -0
- package/dist/eval/state/unavailable-options.js.map +1 -0
- package/dist/eval/state/value-state.d.ts +38 -0
- package/dist/eval/state/value-state.d.ts.map +1 -0
- package/dist/eval/state/value-state.js +52 -0
- package/dist/eval/state/value-state.js.map +1 -0
- package/dist/eval/submission/admission.d.ts +50 -0
- package/dist/eval/submission/admission.d.ts.map +1 -0
- package/dist/eval/submission/admission.js +174 -0
- package/dist/eval/submission/admission.js.map +1 -0
- package/dist/eval/submission/authority.d.ts +71 -0
- package/dist/eval/submission/authority.d.ts.map +1 -0
- package/dist/eval/submission/authority.js +118 -0
- package/dist/eval/submission/authority.js.map +1 -0
- package/dist/eval/submission/datasets.d.ts +28 -0
- package/dist/eval/submission/datasets.d.ts.map +1 -0
- package/dist/eval/submission/datasets.js +109 -0
- package/dist/eval/submission/datasets.js.map +1 -0
- package/dist/eval/submission/index.d.ts +15 -0
- package/dist/eval/submission/index.d.ts.map +1 -0
- package/dist/eval/submission/index.js +13 -0
- package/dist/eval/submission/index.js.map +1 -0
- package/dist/eval/submission/refusals.d.ts +103 -0
- package/dist/eval/submission/refusals.d.ts.map +1 -0
- package/dist/eval/submission/refusals.js +15 -0
- package/dist/eval/submission/refusals.js.map +1 -0
- package/dist/eval/submission/signatures.d.ts +7 -0
- package/dist/eval/submission/signatures.d.ts.map +1 -0
- package/dist/eval/submission/signatures.js +215 -0
- package/dist/eval/submission/signatures.js.map +1 -0
- package/dist/eval/submission/writes.d.ts +51 -0
- package/dist/eval/submission/writes.d.ts.map +1 -0
- package/dist/eval/submission/writes.js +203 -0
- package/dist/eval/submission/writes.js.map +1 -0
- package/dist/eval/submission.d.ts +53 -0
- package/dist/eval/submission.d.ts.map +1 -0
- package/dist/eval/submission.js +521 -0
- package/dist/eval/submission.js.map +1 -0
- package/dist/eval/suggestions-to-engine.d.ts +18 -0
- package/dist/eval/suggestions-to-engine.d.ts.map +1 -0
- package/dist/eval/suggestions-to-engine.js +40 -0
- package/dist/eval/suggestions-to-engine.js.map +1 -0
- package/dist/eval/suggestions.d.ts +17 -0
- package/dist/eval/suggestions.d.ts.map +1 -0
- package/dist/eval/suggestions.js +314 -0
- package/dist/eval/suggestions.js.map +1 -0
- package/dist/eval/undecided.d.ts +64 -0
- package/dist/eval/undecided.d.ts.map +1 -0
- package/dist/eval/undecided.js +101 -0
- package/dist/eval/undecided.js.map +1 -0
- package/dist/eval/verdict.d.ts +66 -0
- package/dist/eval/verdict.d.ts.map +1 -0
- package/dist/eval/verdict.js +106 -0
- package/dist/eval/verdict.js.map +1 -0
- package/dist/eval/verify-signature.d.ts +78 -0
- package/dist/eval/verify-signature.d.ts.map +1 -0
- package/dist/eval/verify-signature.js +185 -0
- package/dist/eval/verify-signature.js.map +1 -0
- package/dist/eval/version-dispatch.d.ts +38 -0
- package/dist/eval/version-dispatch.d.ts.map +1 -0
- package/dist/eval/version-dispatch.js +61 -0
- package/dist/eval/version-dispatch.js.map +1 -0
- package/dist/eval/visibility.d.ts +33 -0
- package/dist/eval/visibility.d.ts.map +1 -0
- package/dist/eval/visibility.js +83 -0
- package/dist/eval/visibility.js.map +1 -0
- package/dist/evaluate.d.ts +24 -0
- package/dist/evaluate.d.ts.map +1 -0
- package/dist/evaluate.js +18 -0
- package/dist/evaluate.js.map +1 -0
- package/dist/expr/builtin-docs.d.ts +51 -0
- package/dist/expr/builtin-docs.d.ts.map +1 -0
- package/dist/expr/builtin-docs.js +874 -0
- package/dist/expr/builtin-docs.js.map +1 -0
- package/dist/expr/builtins.d.ts +50 -0
- package/dist/expr/builtins.d.ts.map +1 -0
- package/dist/expr/builtins.js +966 -0
- package/dist/expr/builtins.js.map +1 -0
- package/dist/expr/decimal-precision.d.ts +39 -0
- package/dist/expr/decimal-precision.d.ts.map +1 -0
- package/dist/expr/decimal-precision.js +62 -0
- package/dist/expr/decimal-precision.js.map +1 -0
- package/dist/expr/decimal.d.ts +172 -0
- package/dist/expr/decimal.d.ts.map +1 -0
- package/dist/expr/decimal.js +782 -0
- package/dist/expr/decimal.js.map +1 -0
- package/dist/expr/deprecations.d.ts +34 -0
- package/dist/expr/deprecations.d.ts.map +1 -0
- package/dist/expr/deprecations.js +17 -0
- package/dist/expr/deprecations.js.map +1 -0
- package/dist/expr/diagnostics.d.ts +21 -0
- package/dist/expr/diagnostics.d.ts.map +1 -0
- package/dist/expr/diagnostics.js +231 -0
- package/dist/expr/diagnostics.js.map +1 -0
- package/dist/expr/direction.d.ts +30 -0
- package/dist/expr/direction.d.ts.map +1 -0
- package/dist/expr/direction.js +77 -0
- package/dist/expr/direction.js.map +1 -0
- package/dist/expr/example-expression.d.ts +62 -0
- package/dist/expr/example-expression.d.ts.map +1 -0
- package/dist/expr/example-expression.js +670 -0
- package/dist/expr/example-expression.js.map +1 -0
- package/dist/expr/instant.d.ts +49 -0
- package/dist/expr/instant.d.ts.map +1 -0
- package/dist/expr/instant.js +111 -0
- package/dist/expr/instant.js.map +1 -0
- package/dist/expr/logic.d.ts +17 -0
- package/dist/expr/logic.d.ts.map +1 -0
- package/dist/expr/logic.js +65 -0
- package/dist/expr/logic.js.map +1 -0
- package/dist/expr/messages.d.ts +45 -0
- package/dist/expr/messages.d.ts.map +1 -0
- package/dist/expr/messages.js +280 -0
- package/dist/expr/messages.js.map +1 -0
- package/dist/expr/money.d.ts +38 -0
- package/dist/expr/money.d.ts.map +1 -0
- package/dist/expr/money.js +127 -0
- package/dist/expr/money.js.map +1 -0
- package/dist/expr/ordering.d.ts +56 -0
- package/dist/expr/ordering.d.ts.map +1 -0
- package/dist/expr/ordering.js +167 -0
- package/dist/expr/ordering.js.map +1 -0
- package/dist/expr/pattern.d.ts +44 -0
- package/dist/expr/pattern.d.ts.map +1 -0
- package/dist/expr/pattern.js +458 -0
- package/dist/expr/pattern.js.map +1 -0
- package/dist/expr/plain-date.d.ts +90 -0
- package/dist/expr/plain-date.d.ts.map +1 -0
- package/dist/expr/plain-date.js +230 -0
- package/dist/expr/plain-date.js.map +1 -0
- package/dist/expr/plural-categories.d.ts +8 -0
- package/dist/expr/plural-categories.d.ts.map +1 -0
- package/dist/expr/plural-categories.js +15 -0
- package/dist/expr/plural-categories.js.map +1 -0
- package/dist/expr/plural-keys.d.ts +39 -0
- package/dist/expr/plural-keys.d.ts.map +1 -0
- package/dist/expr/plural-keys.js +46 -0
- package/dist/expr/plural-keys.js.map +1 -0
- package/dist/expr/plural.d.ts +33 -0
- package/dist/expr/plural.d.ts.map +1 -0
- package/dist/expr/plural.js +50 -0
- package/dist/expr/plural.js.map +1 -0
- package/dist/expr/quantity.d.ts +31 -0
- package/dist/expr/quantity.d.ts.map +1 -0
- package/dist/expr/quantity.js +83 -0
- package/dist/expr/quantity.js.map +1 -0
- package/dist/expr/reduce.d.ts +50 -0
- package/dist/expr/reduce.d.ts.map +1 -0
- package/dist/expr/reduce.js +236 -0
- package/dist/expr/reduce.js.map +1 -0
- package/dist/expr/regex.d.ts +108 -0
- package/dist/expr/regex.d.ts.map +1 -0
- package/dist/expr/regex.js +1207 -0
- package/dist/expr/regex.js.map +1 -0
- package/dist/expr/select-locale.d.ts +67 -0
- package/dist/expr/select-locale.d.ts.map +1 -0
- package/dist/expr/select-locale.js +219 -0
- package/dist/expr/select-locale.js.map +1 -0
- package/dist/expr/sequences.d.ts +123 -0
- package/dist/expr/sequences.d.ts.map +1 -0
- package/dist/expr/sequences.js +234 -0
- package/dist/expr/sequences.js.map +1 -0
- package/dist/expr/strings.d.ts +50 -0
- package/dist/expr/strings.d.ts.map +1 -0
- package/dist/expr/strings.js +184 -0
- package/dist/expr/strings.js.map +1 -0
- package/dist/expr/validation.d.ts +32 -0
- package/dist/expr/validation.d.ts.map +1 -0
- package/dist/expr/validation.js +182 -0
- package/dist/expr/validation.js.map +1 -0
- package/dist/graph/freeze.d.ts +4 -0
- package/dist/graph/freeze.d.ts.map +1 -0
- package/dist/graph/freeze.js +52 -0
- package/dist/graph/freeze.js.map +1 -0
- package/dist/graph/index.d.ts +15 -0
- package/dist/graph/index.d.ts.map +1 -0
- package/dist/graph/index.js +13 -0
- package/dist/graph/index.js.map +1 -0
- package/dist/graph/inspect.d.ts +76 -0
- package/dist/graph/inspect.d.ts.map +1 -0
- package/dist/graph/inspect.js +263 -0
- package/dist/graph/inspect.js.map +1 -0
- package/dist/graph/read-walk.d.ts +101 -0
- package/dist/graph/read-walk.d.ts.map +1 -0
- package/dist/graph/read-walk.js +358 -0
- package/dist/graph/read-walk.js.map +1 -0
- package/dist/graph/record-index.d.ts +24 -0
- package/dist/graph/record-index.d.ts.map +1 -0
- package/dist/graph/record-index.js +35 -0
- package/dist/graph/record-index.js.map +1 -0
- package/dist/index.d.ts +104 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +139 -0
- package/dist/index.js.map +1 -0
- package/dist/lookup/digest.d.ts +51 -0
- package/dist/lookup/digest.d.ts.map +1 -0
- package/dist/lookup/digest.js +46 -0
- package/dist/lookup/digest.js.map +1 -0
- package/dist/lookup/index.d.ts +28 -0
- package/dist/lookup/index.d.ts.map +1 -0
- package/dist/lookup/index.js +27 -0
- package/dist/lookup/index.js.map +1 -0
- package/dist/lookup/install.d.ts +48 -0
- package/dist/lookup/install.d.ts.map +1 -0
- package/dist/lookup/install.js +315 -0
- package/dist/lookup/install.js.map +1 -0
- package/dist/lookup/pass.d.ts +55 -0
- package/dist/lookup/pass.d.ts.map +1 -0
- package/dist/lookup/pass.js +212 -0
- package/dist/lookup/pass.js.map +1 -0
- package/dist/lookup/pins.d.ts +34 -0
- package/dist/lookup/pins.d.ts.map +1 -0
- package/dist/lookup/pins.js +39 -0
- package/dist/lookup/pins.js.map +1 -0
- package/dist/lookup/provenance.d.ts +23 -0
- package/dist/lookup/provenance.d.ts.map +1 -0
- package/dist/lookup/provenance.js +78 -0
- package/dist/lookup/provenance.js.map +1 -0
- package/dist/lookup/readiness.d.ts +13 -0
- package/dist/lookup/readiness.d.ts.map +1 -0
- package/dist/lookup/readiness.js +57 -0
- package/dist/lookup/readiness.js.map +1 -0
- package/dist/lookup/resolve.d.ts +24 -0
- package/dist/lookup/resolve.d.ts.map +1 -0
- package/dist/lookup/resolve.js +201 -0
- package/dist/lookup/resolve.js.map +1 -0
- package/dist/lookup/store.d.ts +41 -0
- package/dist/lookup/store.d.ts.map +1 -0
- package/dist/lookup/store.js +74 -0
- package/dist/lookup/store.js.map +1 -0
- package/dist/model/access.d.ts +200 -0
- package/dist/model/access.d.ts.map +1 -0
- package/dist/model/access.js +125 -0
- package/dist/model/access.js.map +1 -0
- package/dist/model/artifact-members.d.ts +3 -0
- package/dist/model/artifact-members.d.ts.map +1 -0
- package/dist/model/artifact-members.js +38 -0
- package/dist/model/artifact-members.js.map +1 -0
- package/dist/model/composition.d.ts +47 -0
- package/dist/model/composition.d.ts.map +1 -0
- package/dist/model/composition.js +66 -0
- package/dist/model/composition.js.map +1 -0
- package/dist/model/domain.d.ts +51 -0
- package/dist/model/domain.d.ts.map +1 -0
- package/dist/model/domain.js +75 -0
- package/dist/model/domain.js.map +1 -0
- package/dist/model/duration.d.ts +31 -0
- package/dist/model/duration.d.ts.map +1 -0
- package/dist/model/duration.js +136 -0
- package/dist/model/duration.js.map +1 -0
- package/dist/model/errors.d.ts +58 -0
- package/dist/model/errors.d.ts.map +1 -0
- package/dist/model/errors.js +81 -0
- package/dist/model/errors.js.map +1 -0
- package/dist/model/evolution.d.ts +177 -0
- package/dist/model/evolution.d.ts.map +1 -0
- package/dist/model/evolution.js +5 -0
- package/dist/model/evolution.js.map +1 -0
- package/dist/model/expr-children.d.ts +15 -0
- package/dist/model/expr-children.d.ts.map +1 -0
- package/dist/model/expr-children.js +45 -0
- package/dist/model/expr-children.js.map +1 -0
- package/dist/model/guards.d.ts +9 -0
- package/dist/model/guards.d.ts.map +1 -0
- package/dist/model/guards.js +11 -0
- package/dist/model/guards.js.map +1 -0
- package/dist/model/input.d.ts +42 -0
- package/dist/model/input.d.ts.map +1 -0
- package/dist/model/input.js +26 -0
- package/dist/model/input.js.map +1 -0
- package/dist/model/integer.d.ts +14 -0
- package/dist/model/integer.d.ts.map +1 -0
- package/dist/model/integer.js +16 -0
- package/dist/model/integer.js.map +1 -0
- package/dist/model/intrinsic.d.ts +18 -0
- package/dist/model/intrinsic.d.ts.map +1 -0
- package/dist/model/intrinsic.js +21 -0
- package/dist/model/intrinsic.js.map +1 -0
- package/dist/model/layout.d.ts +129 -0
- package/dist/model/layout.d.ts.map +1 -0
- package/dist/model/layout.js +2 -0
- package/dist/model/layout.js.map +1 -0
- package/dist/model/media.d.ts +33 -0
- package/dist/model/media.d.ts.map +1 -0
- package/dist/model/media.js +86 -0
- package/dist/model/media.js.map +1 -0
- package/dist/model/members.generated.d.ts +11 -0
- package/dist/model/members.generated.d.ts.map +1 -0
- package/dist/model/members.generated.js +71 -0
- package/dist/model/members.generated.js.map +1 -0
- package/dist/model/row-address.d.ts +27 -0
- package/dist/model/row-address.d.ts.map +1 -0
- package/dist/model/row-address.js +146 -0
- package/dist/model/row-address.js.map +1 -0
- package/dist/model/schema.d.ts +108 -0
- package/dist/model/schema.d.ts.map +1 -0
- package/dist/model/schema.js +2 -0
- package/dist/model/schema.js.map +1 -0
- package/dist/model/shape.d.ts +193 -0
- package/dist/model/shape.d.ts.map +1 -0
- package/dist/model/shape.js +2 -0
- package/dist/model/shape.js.map +1 -0
- package/dist/model/time.d.ts +61 -0
- package/dist/model/time.d.ts.map +1 -0
- package/dist/model/time.js +110 -0
- package/dist/model/time.js.map +1 -0
- package/dist/model/types.d.ts +1329 -0
- package/dist/model/types.d.ts.map +1 -0
- package/dist/model/types.js +424 -0
- package/dist/model/types.js.map +1 -0
- package/dist/model/values.d.ts +91 -0
- package/dist/model/values.d.ts.map +1 -0
- package/dist/model/values.js +195 -0
- package/dist/model/values.js.map +1 -0
- package/dist/model/wire.d.ts +356 -0
- package/dist/model/wire.d.ts.map +1 -0
- package/dist/model/wire.js +1504 -0
- package/dist/model/wire.js.map +1 -0
- package/dist/offline/index.d.ts +374 -0
- package/dist/offline/index.d.ts.map +1 -0
- package/dist/offline/index.js +422 -0
- package/dist/offline/index.js.map +1 -0
- package/dist/testing.d.ts +30 -0
- package/dist/testing.d.ts.map +1 -0
- package/dist/testing.js +42 -0
- package/dist/testing.js.map +1 -0
- package/dist/version.d.ts +30 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +116 -0
- package/dist/version.js.map +1 -0
- package/package.json +98 -3
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import type { CompiledRule, ExprNode, FieldRef, GateReport, Outcome, RuleResult, ScreenReport, Severity, Undetermined, WireValue } from '../../model/types.js';
|
|
2
|
+
import type { ReadRef } from '../../graph/index.js';
|
|
3
|
+
import type { BudgetExceededError } from '../budget.js';
|
|
4
|
+
import type { EvaluationState } from './state.js';
|
|
5
|
+
/** What one rule body produced: its result and any gate or screen section it owns. */
|
|
6
|
+
export interface RuleBody {
|
|
7
|
+
readonly result: RuleResult;
|
|
8
|
+
readonly gate?: {
|
|
9
|
+
readonly gateId: string;
|
|
10
|
+
readonly report: GateReport;
|
|
11
|
+
};
|
|
12
|
+
readonly screen?: {
|
|
13
|
+
readonly screenId: string;
|
|
14
|
+
readonly report: ScreenReport;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* The rule's own decision, before a gate policy weighs a read-only refusal, was undecided.
|
|
18
|
+
*
|
|
19
|
+
* A `warn` gate states `PASS` for a composed `UNKNOWN`, so the report's status no longer says
|
|
20
|
+
* whether the rule decided anything. This is the fact readiness needs when the rule also read a
|
|
21
|
+
* value the server holds (`RULES-2.1.1`).
|
|
22
|
+
*/
|
|
23
|
+
readonly undecided?: true;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* The status and value fields an undetermined computed value carries.
|
|
27
|
+
*
|
|
28
|
+
* The report states the fact once: `kind` says a value was computed and `status` says it is
|
|
29
|
+
* undetermined, so a consumer derives what it needs instead of reading a second flag that
|
|
30
|
+
* could disagree with the status. Every unproduced computed value is built here.
|
|
31
|
+
*/
|
|
32
|
+
export declare function computedUndetermined(sentinel: Undetermined): {
|
|
33
|
+
readonly status: Outcome;
|
|
34
|
+
readonly extra: {
|
|
35
|
+
readonly value: null;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* Records one alternative's cost refusal against its rule, at most once for the rule.
|
|
40
|
+
*
|
|
41
|
+
* An item rule offers the same alternatives for every failing row, so the refusal would repeat
|
|
42
|
+
* per row. The first one names the budget and the dimension; the rest add nothing a reader can
|
|
43
|
+
* act on. The refusal arrives with the alternatives result rather than through module state, so
|
|
44
|
+
* it is this evaluation's and cannot be inherited by a later one.
|
|
45
|
+
*/
|
|
46
|
+
export declare function recordAlternativeBudget(state: EvaluationState, rule: CompiledRule, error: BudgetExceededError): void;
|
|
47
|
+
/** The result fields every rule outcome carries. */
|
|
48
|
+
export declare function baseResult(state: EvaluationState, rule: CompiledRule, status: Outcome, severity: Severity, params: Readonly<Record<string, WireValue>> | undefined): RuleResult;
|
|
49
|
+
/** A rule the engine could not evaluate: `UNKNOWN` plus an `ENGINE_ERROR` diagnostic. */
|
|
50
|
+
export declare function failedResult(state: EvaluationState, rule: CompiledRule): RuleResult;
|
|
51
|
+
/** A result with no message parameters, for a rule whose expression did not run. */
|
|
52
|
+
export declare function outcomeResult(state: EvaluationState, rule: CompiledRule, status: Outcome): RuleResult;
|
|
53
|
+
/**
|
|
54
|
+
* The field references one result states, with the row named for a read the item scope
|
|
55
|
+
* made.
|
|
56
|
+
*/
|
|
57
|
+
export declare function fieldRefsOf(state: EvaluationState, readRefs: readonly ReadRef[]): readonly FieldRef[];
|
|
58
|
+
/**
|
|
59
|
+
* Where a message's parameters belong, so a dropped payload records its cause against its owner.
|
|
60
|
+
*
|
|
61
|
+
* A rule states its own parameters; a declared option states the parameters of the sentence its
|
|
62
|
+
* unavailable code speaks. Both are message payload, so one reader decides what a payload may
|
|
63
|
+
* state, and the owner is only where a refusal is attributed.
|
|
64
|
+
*/
|
|
65
|
+
export interface PayloadOwner {
|
|
66
|
+
/** The rule the payload belongs to, when a rule states it. */
|
|
67
|
+
readonly ruleId?: string;
|
|
68
|
+
/** The artifact path the parameters were authored at, so a refusal names the member. */
|
|
69
|
+
readonly at: string;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Whether delivery withholds the value one reference names, `[ACCESS-1.3.4]`.
|
|
73
|
+
*
|
|
74
|
+
* The answer weighs every declaration the target sits under and the row it belongs to, exactly
|
|
75
|
+
* as the write guard and a writer's reported value do. It is the delivery question, never
|
|
76
|
+
* `mayRead`: `allowMaskedRead` lifts a mask for expression reads and never for delivery.
|
|
77
|
+
*/
|
|
78
|
+
export declare function deliveryWithheld(state: EvaluationState, ref: FieldRef): boolean;
|
|
79
|
+
/**
|
|
80
|
+
* Runs `visit` with one delivery resolver installed on every binder scope in force.
|
|
81
|
+
*
|
|
82
|
+
* A row scope is built before the payload, alternative or condition that reads it, so the
|
|
83
|
+
* reader's disclosure taint recorded the array read before any of their marks. The resolver
|
|
84
|
+
* restores that fact for a scope the host can no longer see: the binder asks it whether the
|
|
85
|
+
* member a read names is delivered but withheld, and a consumer that would quote the read
|
|
86
|
+
* drops it.
|
|
87
|
+
*
|
|
88
|
+
* The row keys are resolved before `visit` runs, so the read that names them cannot enter the
|
|
89
|
+
* window a caller is about to mark. An array whose identity cannot name the row it is reading
|
|
90
|
+
* falls back to `currentRowKey`, the row the caller states it is judging; when neither can name
|
|
91
|
+
* the row the read is stated withheld rather than answered field-wide, because a field-wide answer
|
|
92
|
+
* could permit quoting a value a row-scoped rule withholds.
|
|
93
|
+
*/
|
|
94
|
+
export declare function withScopedDelivery<T>(state: EvaluationState, visit: () => T, currentRowKey?: string | number | undefined): T;
|
|
95
|
+
/** One message parameter list, or `undefined` when the payload cannot be stated. */
|
|
96
|
+
export declare function paramsOf(state: EvaluationState, nodes: Readonly<Record<string, ExprNode>> | undefined, owner: PayloadOwner): Readonly<Record<string, WireValue>> | undefined;
|
|
97
|
+
//# sourceMappingURL=result.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"result.d.ts","sourceRoot":"","sources":["../../../src/eval/rule/result.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAEV,YAAY,EACZ,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,OAAO,EACP,UAAU,EACV,YAAY,EACZ,QAAQ,EACR,YAAY,EACZ,SAAS,EACV,MAAM,sBAAsB,CAAC;AAI9B,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAEpD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAGxD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAGlD,sFAAsF;AACtF,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;IAC5B,QAAQ,CAAC,IAAI,CAAC,EAAE;QAAE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAA;KAAE,CAAC;IACzE,QAAQ,CAAC,MAAM,CAAC,EAAE;QAAE,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAA;KAAE,CAAC;IAC/E;;;;;;OAMG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,IAAI,CAAC;CAC3B;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,YAAY,GAAG;IAC5D,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,KAAK,EA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A+B,GAC/D,CAAC,CAiDH;AAmDD,oFAAoF;AACpF,wBAAgB,QAAQ,CACtB,KAAK,EAAE,eAAe,EACtB,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,GAAG,SAAS,EACrD,KAAK,EAAE,YAAY,GAClB,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,GAAG,SAAS,CAyDjD"}
|
|
@@ -0,0 +1,347 @@
|
|
|
1
|
+
import { diagnosticDoc } from '../../expr/diagnostics.js';
|
|
2
|
+
import { AxiomError } from '../../model/errors.js';
|
|
3
|
+
import { isUndetermined } from '../../model/types.js';
|
|
4
|
+
import { toWireValue } from '../../model/wire.js';
|
|
5
|
+
import { fieldKey, permitsReadOf } from '../access/projection.js';
|
|
6
|
+
import { recordEngineError } from './diagnostics.js';
|
|
7
|
+
/**
|
|
8
|
+
* The status and value fields an undetermined computed value carries.
|
|
9
|
+
*
|
|
10
|
+
* The report states the fact once: `kind` says a value was computed and `status` says it is
|
|
11
|
+
* undetermined, so a consumer derives what it needs instead of reading a second flag that
|
|
12
|
+
* could disagree with the status. Every unproduced computed value is built here.
|
|
13
|
+
*/
|
|
14
|
+
export function computedUndetermined(sentinel) {
|
|
15
|
+
return { status: sentinel.undetermined, extra: { value: null } };
|
|
16
|
+
}
|
|
17
|
+
/** The rule's recorded behaviour hash. */
|
|
18
|
+
function ruleHashOf(state, rule) {
|
|
19
|
+
const hash = state.prepared.ruleHashes.get(rule);
|
|
20
|
+
if (hash === undefined) {
|
|
21
|
+
throw new AxiomError('ENGINE_ERROR', `rule ${rule.ruleId} has no recorded hash`, rule.ruleId);
|
|
22
|
+
}
|
|
23
|
+
return hash;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Records one alternative's cost refusal against its rule, at most once for the rule.
|
|
27
|
+
*
|
|
28
|
+
* An item rule offers the same alternatives for every failing row, so the refusal would repeat
|
|
29
|
+
* per row. The first one names the budget and the dimension; the rest add nothing a reader can
|
|
30
|
+
* act on. The refusal arrives with the alternatives result rather than through module state, so
|
|
31
|
+
* it is this evaluation's and cannot be inherited by a later one.
|
|
32
|
+
*/
|
|
33
|
+
export function recordAlternativeBudget(state, rule, error) {
|
|
34
|
+
const recorded = state.diagnostics.some((diagnostic) => diagnostic.code === 'COST_BUDGET_EXCEEDED' && diagnostic.ruleId === rule.ruleId);
|
|
35
|
+
if (!recorded)
|
|
36
|
+
recordEngineError(state, rule.ruleId, error);
|
|
37
|
+
}
|
|
38
|
+
/** The result fields every rule outcome carries. */
|
|
39
|
+
export function baseResult(state, rule, status, severity, params) {
|
|
40
|
+
return {
|
|
41
|
+
ruleId: rule.ruleId,
|
|
42
|
+
ruleHash: ruleHashOf(state, rule),
|
|
43
|
+
kind: rule.kind,
|
|
44
|
+
scope: rule.scope,
|
|
45
|
+
severity,
|
|
46
|
+
evaluateOn: rule.evaluateOn,
|
|
47
|
+
status,
|
|
48
|
+
...(rule.messageKey === undefined ? {} : { messageKey: rule.messageKey }),
|
|
49
|
+
...(params === undefined ? {} : { params }),
|
|
50
|
+
...(state.currentRowKey === undefined ? {} : { rowKey: state.currentRowKey }),
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
/** A rule the engine could not evaluate: `UNKNOWN` plus an `ENGINE_ERROR` diagnostic. */
|
|
54
|
+
export function failedResult(state, rule) {
|
|
55
|
+
const result = baseResult(state, rule, 'UNKNOWN', rule.severity ?? 'block', undefined);
|
|
56
|
+
// A computed field the engine could not produce is undetermined, not absent: the host
|
|
57
|
+
// must not treat its current value as computed.
|
|
58
|
+
if (rule.kind === 'compute' || rule.kind === 'defaultCompute') {
|
|
59
|
+
return { ...result, value: null };
|
|
60
|
+
}
|
|
61
|
+
// A validate result must carry a message key; an artifact that omitted one is still
|
|
62
|
+
// reported, against the runtime catalogue rather than a fabricated key.
|
|
63
|
+
if (result.messageKey === undefined && rule.kind === 'validate') {
|
|
64
|
+
return { ...result, messageKey: diagnosticDoc('ENGINE_ERROR').messageKey };
|
|
65
|
+
}
|
|
66
|
+
return result;
|
|
67
|
+
}
|
|
68
|
+
/** A result with no message parameters, for a rule whose expression did not run. */
|
|
69
|
+
export function outcomeResult(state, rule, status) {
|
|
70
|
+
const fields = fieldRefsOf(state, state.prepared.ruleFields.get(rule) ?? []);
|
|
71
|
+
return {
|
|
72
|
+
...baseResult(state, rule, status, rule.severity ?? 'block', undefined),
|
|
73
|
+
...(fields.length === 0 ? {} : { fields }),
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* The field references one result states, with the row named for a read the item scope
|
|
78
|
+
* made.
|
|
79
|
+
*/
|
|
80
|
+
export function fieldRefsOf(state, readRefs) {
|
|
81
|
+
const rowKey = state.currentRowKey;
|
|
82
|
+
return readRefs.map((ref) => ref.rowScoped && rowKey !== undefined
|
|
83
|
+
? { fieldId: ref.fieldId, rowKey }
|
|
84
|
+
: { fieldId: ref.fieldId });
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* The declaration a message parameter's value is read against: its own wire shape.
|
|
88
|
+
*
|
|
89
|
+
* A parameter is message payload, not a field's value: the artifact does not declare a target
|
|
90
|
+
* for it, so the domain the expression carries is not a declaration to validate against. A
|
|
91
|
+
* computed quantity is exact and may carry more fractional digits than any one field's `scale`;
|
|
92
|
+
* reading it as `quantity` with the default scale would drop a legal payload. What the report
|
|
93
|
+
* promises is `WireValue` membership, and `toWireValue` performs exactly that read through
|
|
94
|
+
* `copyRestricted` plus the shape this returns, so `-0`, a float, an unsafe integer and an
|
|
95
|
+
* unpaired surrogate are refused while every canonical object, list and scalar is admitted.
|
|
96
|
+
*/
|
|
97
|
+
function payloadDeclaration(value) {
|
|
98
|
+
if (value === null || typeof value === 'string')
|
|
99
|
+
return { primitive: 'string' };
|
|
100
|
+
if (typeof value === 'boolean')
|
|
101
|
+
return { primitive: 'boolean' };
|
|
102
|
+
if (typeof value === 'number')
|
|
103
|
+
return { primitive: 'integer' };
|
|
104
|
+
return Array.isArray(value) ? { primitive: 'array' } : { primitive: 'record' };
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Whether delivery withholds the value one reference names, `[ACCESS-1.3.4]`.
|
|
108
|
+
*
|
|
109
|
+
* The answer weighs every declaration the target sits under and the row it belongs to, exactly
|
|
110
|
+
* as the write guard and a writer's reported value do. It is the delivery question, never
|
|
111
|
+
* `mayRead`: `allowMaskedRead` lifts a mask for expression reads and never for delivery.
|
|
112
|
+
*/
|
|
113
|
+
export function deliveryWithheld(state, ref) {
|
|
114
|
+
return withheldReference(state, ref.fieldId, ref.rowKey);
|
|
115
|
+
}
|
|
116
|
+
/** Whether delivery withholds one declared field, optionally for one row. */
|
|
117
|
+
function withheldReference(state, fieldId, rowKey) {
|
|
118
|
+
const walked = walkedDeclaration(state, fieldId);
|
|
119
|
+
if (walked === undefined)
|
|
120
|
+
return false;
|
|
121
|
+
return withheldDeclarations(state, walked.declared, rowKey);
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Whether any declaration on one path withholds delivery for this reader.
|
|
125
|
+
*
|
|
126
|
+
* The path is the answer `reader.walked` states, never a single `fieldId`: an intrinsic member
|
|
127
|
+
* such as `mime` is not a declared field, so asking the leaf alone would miss the masked array
|
|
128
|
+
* that holds it. The answer is the same conjunction the write guard and a writer's reported value
|
|
129
|
+
* use: a `visible` rule that excludes the field, a host redaction, or resolved access that does
|
|
130
|
+
* not permit the read for the row named.
|
|
131
|
+
*/
|
|
132
|
+
function withheldDeclarations(state, declared, rowKey) {
|
|
133
|
+
return declared.some((id) => withheldField(state, id, rowKey));
|
|
134
|
+
}
|
|
135
|
+
/** Whether one declaration withholds delivery, for a row or field-wide. */
|
|
136
|
+
function withheldField(state, fieldId, rowKey) {
|
|
137
|
+
// A `visible` rule whose effective `onHide` is `exclude` hides the field from the report and
|
|
138
|
+
// from delivery, exactly as a hidden access answer does (`MODEL-3.1.11`). The predicate is
|
|
139
|
+
// the same one the disclosure taint asks, so a payload and a read cannot disagree about it.
|
|
140
|
+
if (state.isWithheld(fieldId))
|
|
141
|
+
return true;
|
|
142
|
+
const at = rowKey === undefined ? { fieldId } : { fieldId, rowKey };
|
|
143
|
+
if (state.accessWindow.isRedacted(at))
|
|
144
|
+
return true;
|
|
145
|
+
return !permitsReadOf(state.accessWindow.accessFor(at), fieldKey(at), state.accessWindow.sessionWriteKeys);
|
|
146
|
+
}
|
|
147
|
+
/** The declarations a field id crosses, or `undefined` when none answers for it. */
|
|
148
|
+
function walkedDeclaration(state, fieldId) {
|
|
149
|
+
try {
|
|
150
|
+
return state.reader.walked(state.reader.declarationPathOf(fieldId));
|
|
151
|
+
}
|
|
152
|
+
catch (error) {
|
|
153
|
+
// A declaration no single path names has no delivery answer to state: the read it would
|
|
154
|
+
// guard already refused, so the caller's own check answers nothing rather than inventing one.
|
|
155
|
+
if (error instanceof AxiomError)
|
|
156
|
+
return undefined;
|
|
157
|
+
throw error;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Runs `visit` with one delivery resolver installed on every binder scope in force.
|
|
162
|
+
*
|
|
163
|
+
* A row scope is built before the payload, alternative or condition that reads it, so the
|
|
164
|
+
* reader's disclosure taint recorded the array read before any of their marks. The resolver
|
|
165
|
+
* restores that fact for a scope the host can no longer see: the binder asks it whether the
|
|
166
|
+
* member a read names is delivered but withheld, and a consumer that would quote the read
|
|
167
|
+
* drops it.
|
|
168
|
+
*
|
|
169
|
+
* The row keys are resolved before `visit` runs, so the read that names them cannot enter the
|
|
170
|
+
* window a caller is about to mark. An array whose identity cannot name the row it is reading
|
|
171
|
+
* falls back to `currentRowKey`, the row the caller states it is judging; when neither can name
|
|
172
|
+
* the row the read is stated withheld rather than answered field-wide, because a field-wide answer
|
|
173
|
+
* could permit quoting a value a row-scoped rule withholds.
|
|
174
|
+
*/
|
|
175
|
+
export function withScopedDelivery(state, visit, currentRowKey = state.currentRowKey) {
|
|
176
|
+
const scopes = state.evaluator.scopes;
|
|
177
|
+
if (scopes.length === 0)
|
|
178
|
+
return visit();
|
|
179
|
+
const keysByOrigin = new Map();
|
|
180
|
+
const keysFor = (origin) => {
|
|
181
|
+
if (keysByOrigin.has(origin))
|
|
182
|
+
return keysByOrigin.get(origin);
|
|
183
|
+
let keys;
|
|
184
|
+
try {
|
|
185
|
+
keys = state.reader.rowKeysOf(origin);
|
|
186
|
+
}
|
|
187
|
+
catch (error) {
|
|
188
|
+
// A list whose own read refused cannot name its rows here. The resolver uses the row the
|
|
189
|
+
// caller states it is judging, and withholds the read when that names none: a field-wide
|
|
190
|
+
// answer could permit quoting a row-scoped value a rule withholds.
|
|
191
|
+
if (!(error instanceof AxiomError))
|
|
192
|
+
throw error;
|
|
193
|
+
keys = undefined;
|
|
194
|
+
}
|
|
195
|
+
keysByOrigin.set(origin, keys);
|
|
196
|
+
return keys;
|
|
197
|
+
};
|
|
198
|
+
const previous = [];
|
|
199
|
+
// The `try` wraps the resolve-and-install loop as well as the visit: `rowKeysOf` can raise,
|
|
200
|
+
// and a resolver installed on an earlier scope must not survive a later scope's failure.
|
|
201
|
+
try {
|
|
202
|
+
for (const scope of scopes) {
|
|
203
|
+
const origin = scope.origin;
|
|
204
|
+
// A scope over an authored list names no declaration, so delivery asks nothing of it.
|
|
205
|
+
if (origin === undefined)
|
|
206
|
+
continue;
|
|
207
|
+
const keys = keysFor(origin);
|
|
208
|
+
previous.push({ scope, at: scope.delivery });
|
|
209
|
+
scope.delivery = (index, memberPath) => {
|
|
210
|
+
const rowKey = keys?.[index] ?? (index === scope.index ? currentRowKey : undefined);
|
|
211
|
+
if (rowKey === undefined) {
|
|
212
|
+
// A neighbour beyond the bound reads a decided empty value, so no row is asked of it.
|
|
213
|
+
if (index < 0 || index >= scope.elements.length)
|
|
214
|
+
return undefined;
|
|
215
|
+
// Neither the array's identity nor the row the caller states can name this read. A
|
|
216
|
+
// field-wide answer could permit quoting a value a row-scoped rule withholds, so the
|
|
217
|
+
// resolver fails closed instead of granting.
|
|
218
|
+
return [];
|
|
219
|
+
}
|
|
220
|
+
return withheldScopedRead(state, origin, rowKey, memberPath);
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
return visit();
|
|
224
|
+
}
|
|
225
|
+
finally {
|
|
226
|
+
for (const entry of previous) {
|
|
227
|
+
if (entry.at === undefined)
|
|
228
|
+
delete entry.scope.delivery;
|
|
229
|
+
else
|
|
230
|
+
entry.scope.delivery = entry.at;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
/**
|
|
235
|
+
* The member paths delivery withholds below one scoped read, relative to that read.
|
|
236
|
+
*
|
|
237
|
+
* An empty list states the read's own value is withheld (a lifted scalar mask); paths state
|
|
238
|
+
* withheld members of a delivered record or row payload. `undefined` states nothing is
|
|
239
|
+
* withheld, so the read may be quoted.
|
|
240
|
+
*/
|
|
241
|
+
function withheldScopedRead(state, origin, rowKey, memberPath) {
|
|
242
|
+
if (memberPath === '') {
|
|
243
|
+
const field = state.reader.index.fieldsByPath.get(origin);
|
|
244
|
+
if (field === undefined)
|
|
245
|
+
return undefined;
|
|
246
|
+
// The container's own delivery answer comes first: a member-less array (an array of
|
|
247
|
+
// `media_ref` or `money`, or a scalar list) has no declared fields, so walking descendants
|
|
248
|
+
// would answer "nothing withheld" for a value the container itself withholds.
|
|
249
|
+
if (withheldReference(state, field.fieldId, rowKey))
|
|
250
|
+
return [];
|
|
251
|
+
const paths = withheldDescendants(state, field, rowKey, '');
|
|
252
|
+
return paths.length === 0 ? undefined : paths;
|
|
253
|
+
}
|
|
254
|
+
const walked = state.reader.walked(`${origin}.${memberPath}`);
|
|
255
|
+
if (walked === undefined)
|
|
256
|
+
return undefined;
|
|
257
|
+
// Every declaration the path crosses is weighed, exactly as a read of the whole record is:
|
|
258
|
+
// an intrinsic member such as `mime` is not itself a declared field, so asking only the leaf
|
|
259
|
+
// would let a masked array deliver its payload anyway.
|
|
260
|
+
if (withheldDeclarations(state, walked.declared, rowKey))
|
|
261
|
+
return [];
|
|
262
|
+
const paths = withheldDescendants(state, walked.field, rowKey, '');
|
|
263
|
+
return paths.length === 0 ? undefined : paths;
|
|
264
|
+
}
|
|
265
|
+
/** The dotted paths below one declaration that delivery withholds, relative to it. */
|
|
266
|
+
function withheldDescendants(state, field, rowKey, prefix) {
|
|
267
|
+
const paths = [];
|
|
268
|
+
for (const member of field.fields ?? []) {
|
|
269
|
+
const path = prefix === '' ? member.fieldId : `${prefix}.${member.fieldId}`;
|
|
270
|
+
if (withheldReference(state, member.fieldId, rowKey))
|
|
271
|
+
paths.push(path);
|
|
272
|
+
else
|
|
273
|
+
paths.push(...withheldDescendants(state, member, rowKey, path));
|
|
274
|
+
}
|
|
275
|
+
return paths;
|
|
276
|
+
}
|
|
277
|
+
/** One message parameter list, or `undefined` when the payload cannot be stated. */
|
|
278
|
+
export function paramsOf(state, nodes, owner) {
|
|
279
|
+
if (nodes === undefined)
|
|
280
|
+
return undefined;
|
|
281
|
+
// Payload is not the rule's decision. Its reads still record diagnostics and disclosure taint,
|
|
282
|
+
// but must not become the missing or refused input that readiness attributes to the outcome.
|
|
283
|
+
state.reader.enterPayload();
|
|
284
|
+
try {
|
|
285
|
+
return withScopedDelivery(state, () => {
|
|
286
|
+
const mark = state.reader.taintMark();
|
|
287
|
+
const binderMark = state.evaluator.binderTaintMark();
|
|
288
|
+
const params = {};
|
|
289
|
+
for (const [name, node] of Object.entries(nodes)) {
|
|
290
|
+
let evaluated;
|
|
291
|
+
try {
|
|
292
|
+
evaluated = state.evaluator.evaluate(node);
|
|
293
|
+
}
|
|
294
|
+
catch (error) {
|
|
295
|
+
// A parameter is message payload, not the rule's outcome. An
|
|
296
|
+
// operand the engine could not evaluate makes the message unrenderable, so it is
|
|
297
|
+
// reported as a diagnostic and the payload is dropped. The verdict the rule's own
|
|
298
|
+
// expression already reached is not replaced by "the engine could not decide".
|
|
299
|
+
if (!(error instanceof AxiomError))
|
|
300
|
+
throw error;
|
|
301
|
+
recordPayloadCause(state, owner, error);
|
|
302
|
+
return undefined;
|
|
303
|
+
}
|
|
304
|
+
// A value this device does not hold makes the message unrenderable for the same
|
|
305
|
+
// reason, without turning a decided rule undecided.
|
|
306
|
+
if (evaluated.kind === 'absent' || isUndetermined(evaluated.value))
|
|
307
|
+
return undefined;
|
|
308
|
+
try {
|
|
309
|
+
params[name] = toWireValue(evaluated.value, `${owner.at}.${name}`, payloadDeclaration(evaluated.value));
|
|
310
|
+
}
|
|
311
|
+
catch (error) {
|
|
312
|
+
// A value outside `WireValue` cannot be sealed into a report: the restricted reader would
|
|
313
|
+
// refuse the body its own hash binds. The payload is message text, so the answer is no
|
|
314
|
+
// payload plus the cause, never a coerced value and never the rule's verdict.
|
|
315
|
+
if (!(error instanceof AxiomError))
|
|
316
|
+
throw error;
|
|
317
|
+
recordPayloadCause(state, owner, error);
|
|
318
|
+
return undefined;
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
// A parameter that read a value the report must withhold (a hidden, excluded field, or one
|
|
322
|
+
// whose resolved access withholds delivery) is the one place a report would quote it. A
|
|
323
|
+
// binder read is the same fact for a row scope built before this window; the parameter list
|
|
324
|
+
// is message payload, so the provenance-free answer is to state no payload rather than a
|
|
325
|
+
// partially redacted one.
|
|
326
|
+
if (state.reader.taintedSince(mark).length > 0 ||
|
|
327
|
+
state.evaluator.touchedBinderWithheld(binderMark)) {
|
|
328
|
+
return undefined;
|
|
329
|
+
}
|
|
330
|
+
return params;
|
|
331
|
+
});
|
|
332
|
+
}
|
|
333
|
+
finally {
|
|
334
|
+
state.reader.exitPayload();
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
/** Records why one parameter list was dropped, against the owner that stated it. */
|
|
338
|
+
function recordPayloadCause(state, owner, error) {
|
|
339
|
+
// A declared option's payload has no rule to carry a diagnostic, and it is read on the isolated
|
|
340
|
+
// evaluation that decides availability, whose diagnostics are discarded with it (`RULES-7.1.2`).
|
|
341
|
+
// The parameters are absent from the answer, which is the contract; there is no stream to report
|
|
342
|
+
// the cause on.
|
|
343
|
+
if (owner.ruleId === undefined)
|
|
344
|
+
return;
|
|
345
|
+
recordEngineError(state, owner.ruleId, error);
|
|
346
|
+
}
|
|
347
|
+
//# sourceMappingURL=result.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"result.js","sourceRoot":"","sources":["../../../src/eval/rule/result.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAcnD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAElD,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAKlE,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAiBrD;;;;;;GAMG;AACH,MAAM,UAAU,oBAAoB,CAAC,QAAsB;IAIzD,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,YAAY,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC;AACnE,CAAC;AAED,0CAA0C;AAC1C,SAAS,UAAU,CAAC,KAAsB,EAAE,IAAkB;IAC5D,MAAM,IAAI,GAAG,KAAK,CAAC,QAAQ,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACjD,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;QACvB,MAAM,IAAI,UAAU,CAAC,cAAc,EAAE,QAAQ,IAAI,CAAC,MAAM,uBAAuB,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;IAChG,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,uBAAuB,CACrC,KAAsB,EACtB,IAAkB,EAClB,KAA0B;IAE1B,MAAM,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CACpC,CAAC;gBACJ,CAAC;gBAAC,OAAO,KAAK,EAAE,CAAC;oBACf,0FAA0F;oBAC1F,uFAAuF;oBACvF,8EAA8E;oBAC9E,IAAI,CAAC,CAAC,KAAK,YAAY,UAAU,CAAC;wBAAE,MAAM,KAAK,CAAC;oBAChD,kBAAkB,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;oBACxC,OAAO,SAAS,CAAC;gBACnB,CAAC;YACH,CAAC;YACD,2FAA2F;YAC3F,wFAAwF;YACxF,4FAA4F;YAC5F,yFAAyF;YACzF,0BAA0B;YAC1B,IACE,KAAK,CAAC,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,MAAM,GAAG,CAAC;gBAC1C,KAAK,CAAC,SAAS,CAAC,qBAAqB,CAAC,UAAU,CAAC,EACjD,CAAC;gBACD,OAAO,SAAS,CAAC;YACnB,CAAC;YACD,OAAO,MAAM,CAAC;QAChB,CAAC,CAAC,CAAC;IACL,CAAC;YAAS,CAAC;QACT,KAAK,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC;IAC7B,CAAC;AACH,CAAC;AAED,oFAAoF;AACpF,SAAS,kBAAkB,CAAC,KAAsB,EAAE,KAAmB,EAAE,KAAiB;IACxF,gGAAgG;IAChG,iGAAiG;IACjG,iGAAiG;IACjG,gBAAgB;IAChB,IAAI,KAAK,CAAC,MAAM,KAAK,SAAS;QAAE,OAAO;IACvC,iBAAiB,CAAC,KAAK,EAAE,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AAChD,CAAC","sourcesContent":["import { diagnosticDoc } from '../../expr/diagnostics.js';\nimport { AxiomError } from '../../model/errors.js';\nimport type {\n CompiledField,\n CompiledRule,\n ExprNode,\n FieldRef,\n GateReport,\n Outcome,\n RuleResult,\n ScreenReport,\n Severity,\n Undetermined,\n WireValue,\n} from '../../model/types.js';\nimport { isUndetermined } from '../../model/types.js';\nimport type { WireDeclaration } from '../../model/wire.js';\nimport { toWireValue } from '../../model/wire.js';\nimport type { ReadRef } from '../../graph/index.js';\nimport { fieldKey, permitsReadOf } from '../access/projection.js';\nimport type { BudgetExceededError } from '../budget.js';\nimport type { BinderScope, ScopedDelivery } from '../expr/binder.js';\nimport type { Evaluated } from '../expr/value.js';\nimport type { EvaluationState } from './state.js';\nimport { recordEngineError } from './diagnostics.js';\n\n/** What one rule body produced: its result and any gate or screen section it owns. */\nexport interface RuleBody {\n readonly result: RuleResult;\n readonly gate?: { readonly gateId: string; readonly report: GateReport };\n readonly screen?: { readonly screenId: string; readonly report: ScreenReport };\n /**\n * The rule's own decision, before a gate policy weighs a read-only refusal, was undecided.\n *\n * A `warn` gate states `PASS` for a composed `UNKNOWN`, so the report's status no longer says\n * whether the rule decided anything. This is the fact readiness needs when the rule also read a\n * value the server holds (`RULES-2.1.1`).\n */\n readonly undecided?: true;\n}\n\n/**\n * The status and value fields an undetermined computed value carries.\n *\n * The report states the fact once: `kind` says a value was computed and `status` says it is\n * undetermined, so a consumer derives what it needs instead of reading a second flag that\n * could disagree with the status. Every unproduced computed value is built here.\n */\nexport function computedUndetermined(sentinel: Undetermined): {\n readonly status: Outcome;\n readonly extra: { readonly value: null };\n} {\n return { status: sentinel.undetermined, extra: { value: null } };\n}\n\n/** The rule's recorded behaviour hash. */\nfunction ruleHashOf(state: EvaluationState, rule: CompiledRule): string {\n const hash = state.prepared.ruleHashes.get(rule);\n if (hash === undefined) {\n throw new AxiomError('ENGINE_ERROR', `rule ${rule.ruleId} has no recorded hash`, rule.ruleId);\n }\n return hash;\n}\n\n/**\n * Records one alternative's cost refusal against its rule, at most once for the rule.\n *\n * An item rule offers the same alternatives for every failing row, so the refusal would repeat\n * per row. The first one names the budget and the dimension; the rest add nothing a reader can\n * act on. The refusal arrives with the alternatives result rather than through module state, so\n * it is this evaluation's and cannot be inherited by a later one.\n */\nexport function recordAlternativeBudget(\n state: EvaluationState,\n rule: CompiledRule,\n error: BudgetExceededError,\n): void {\n const recorded = state.diagnostics.some(\n (diagnostic) => diagnostic.code === 'COST_BUDGET_EXCEEDED' && diagnostic.ruleId === rule.ruleId,\n );\n if (!recorded) recordEngineError(state, rule.ruleId, error);\n}\n\n/** The result fields every rule outcome carries. */\nexport function baseResult(\n state: EvaluationState,\n rule: CompiledRule,\n status: Outcome,\n severity: Severity,\n params: Readonly<Record<string, WireValue>> | undefined,\n): RuleResult {\n return {\n ruleId: rule.ruleId,\n ruleHash: ruleHashOf(state, rule),\n kind: rule.kind,\n scope: rule.scope,\n severity,\n evaluateOn: rule.evaluateOn,\n status,\n ...(rule.messageKey === undefined ? {} : { messageKey: rule.messageKey }),\n ...(params === undefined ? {} : { params }),\n ...(state.currentRowKey === undefined ? {} : { rowKey: state.currentRowKey }),\n };\n}\n\n/** A rule the engine could not evaluate: `UNKNOWN` plus an `ENGINE_ERROR` diagnostic. */\nexport function failedResult(state: EvaluationState, rule: CompiledRule): RuleResult {\n const result = baseResult(state, rule, 'UNKNOWN', rule.severity ?? 'block', undefined);\n // A computed field the engine could not produce is undetermined, not absent: the host\n // must not treat its current value as computed.\n if (rule.kind === 'compute' || rule.kind === 'defaultCompute') {\n return { ...result, value: null };\n }\n // A validate result must carry a message key; an artifact that omitted one is still\n // reported, against the runtime catalogue rather than a fabricated key.\n if (result.messageKey === undefined && rule.kind === 'validate') {\n return { ...result, messageKey: diagnosticDoc('ENGINE_ERROR').messageKey };\n }\n return result;\n}\n\n/** A result with no message parameters, for a rule whose expression did not run. */\nexport function outcomeResult(\n state: EvaluationState,\n rule: CompiledRule,\n status: Outcome,\n): RuleResult {\n const fields = fieldRefsOf(state, state.prepared.ruleFields.get(rule) ?? []);\n return {\n ...baseResult(state, rule, status, rule.severity ?? 'block', undefined),\n ...(fields.length === 0 ? {} : { fields }),\n };\n}\n\n/**\n * The field references one result states, with the row named for a read the item scope\n * made.\n */\nexport function fieldRefsOf(\n state: EvaluationState,\n readRefs: readonly ReadRef[],\n): readonly FieldRef[] {\n const rowKey = state.currentRowKey;\n return readRefs.map(\n (ref): FieldRef =>\n ref.rowScoped && rowKey !== undefined\n ? { fieldId: ref.fieldId, rowKey }\n : { fieldId: ref.fieldId },\n );\n}\n\n/**\n * The declaration a message parameter's value is read against: its own wire shape.\n *\n * A parameter is message payload, not a field's value: the artifact does not declare a target\n * for it, so the domain the expression carries is not a declaration to validate against. A\n * computed quantity is exact and may carry more fractional digits than any one field's `scale`;\n * reading it as `quantity` with the default scale would drop a legal payload. What the report\n * promises is `WireValue` membership, and `toWireValue` performs exactly that read through\n * `copyRestricted` plus the shape this returns, so `-0`, a float, an unsafe integer and an\n * unpaired surrogate are refused while every canonical object, list and scalar is admitted.\n */\nfunction payloadDeclaration(value: unknown): WireDeclaration {\n if (value === null || typeof value === 'string') return { primitive: 'string' };\n if (typeof value === 'boolean') return { primitive: 'boolean' };\n if (typeof value === 'number') return { primitive: 'integer' };\n return Array.isArray(value) ? { primitive: 'array' } : { primitive: 'record' };\n}\n\n/**\n * Where a message's parameters belong, so a dropped payload records its cause against its owner.\n *\n * A rule states its own parameters; a declared option states the parameters of the sentence its\n * unavailable code speaks. Both are message payload, so one reader decides what a payload may\n * state, and the owner is only where a refusal is attributed.\n */\nexport interface PayloadOwner {\n /** The rule the payload belongs to, when a rule states it. */\n readonly ruleId?: string;\n /** The artifact path the parameters were authored at, so a refusal names the member. */\n readonly at: string;\n}\n\n/**\n * Whether delivery withholds the value one reference names, `[ACCESS-1.3.4]`.\n *\n * The answer weighs every declaration the target sits under and the row it belongs to, exactly\n * as the write guard and a writer's reported value do. It is the delivery question, never\n * `mayRead`: `allowMaskedRead` lifts a mask for expression reads and never for delivery.\n */\nexport function deliveryWithheld(state: EvaluationState, ref: FieldRef): boolean {\n return withheldReference(state, ref.fieldId, ref.rowKey);\n}\n\n/** Whether delivery withholds one declared field, optionally for one row. */\nfunction withheldReference(\n state: EvaluationState,\n fieldId: string,\n rowKey: string | number | undefined,\n): boolean {\n const walked = walkedDeclaration(state, fieldId);\n if (walked === undefined) return false;\n return withheldDeclarations(state, walked.declared, rowKey);\n}\n\n/**\n * Whether any declaration on one path withholds delivery for this reader.\n *\n * The path is the answer `reader.walked` states, never a single `fieldId`: an intrinsic member\n * such as `mime` is not a declared field, so asking the leaf alone would miss the masked array\n * that holds it. The answer is the same conjunction the write guard and a writer's reported value\n * use: a `visible` rule that excludes the field, a host redaction, or resolved access that does\n * not permit the read for the row named.\n */\nfunction withheldDeclarations(\n state: EvaluationState,\n declared: readonly string[],\n rowKey: string | number | undefined,\n): boolean {\n return declared.some((id) => withheldField(state, id, rowKey));\n}\n\n/** Whether one declaration withholds delivery, for a row or field-wide. */\nfunction withheldField(\n state: EvaluationState,\n fieldId: string,\n rowKey: string | number | undefined,\n): boolean {\n // A `visible` rule whose effective `onHide` is `exclude` hides the field from the report and\n // from delivery, exactly as a hidden access answer does (`MODEL-3.1.11`). The predicate is\n // the same one the disclosure taint asks, so a payload and a read cannot disagree about it.\n if (state.isWithheld(fieldId)) return true;\n const at: FieldRef = rowKey === undefined ? { fieldId } : { fieldId, rowKey };\n if (state.accessWindow.isRedacted(at)) return true;\n return !permitsReadOf(\n state.accessWindow.accessFor(at),\n fieldKey(at),\n state.accessWindow.sessionWriteKeys,\n );\n}\n\n/** The declarations a field id crosses, or `undefined` when none answers for it. */\nfunction walkedDeclaration(\n state: EvaluationState,\n fieldId: string,\n): { readonly declared: readonly string[]; readonly field: CompiledField } | undefined {\n try {\n return state.reader.walked(state.reader.declarationPathOf(fieldId));\n } catch (error) {\n // A declaration no single path names has no delivery answer to state: the read it would\n // guard already refused, so the caller's own check answers nothing rather than inventing one.\n if (error instanceof AxiomError) return undefined;\n throw error;\n }\n}\n\n/**\n * Runs `visit` with one delivery resolver installed on every binder scope in force.\n *\n * A row scope is built before the payload, alternative or condition that reads it, so the\n * reader's disclosure taint recorded the array read before any of their marks. The resolver\n * restores that fact for a scope the host can no longer see: the binder asks it whether the\n * member a read names is delivered but withheld, and a consumer that would quote the read\n * drops it.\n *\n * The row keys are resolved before `visit` runs, so the read that names them cannot enter the\n * window a caller is about to mark. An array whose identity cannot name the row it is reading\n * falls back to `currentRowKey`, the row the caller states it is judging; when neither can name\n * the row the read is stated withheld rather than answered field-wide, because a field-wide answer\n * could permit quoting a value a row-scoped rule withholds.\n */\nexport function withScopedDelivery<T>(\n state: EvaluationState,\n visit: () => T,\n currentRowKey: string | number | undefined = state.currentRowKey,\n): T {\n const scopes = state.evaluator.scopes;\n if (scopes.length === 0) return visit();\n const keysByOrigin = new Map<string, readonly (string | number)[] | undefined>();\n const keysFor = (origin: string): readonly (string | number)[] | undefined => {\n if (keysByOrigin.has(origin)) return keysByOrigin.get(origin);\n let keys: readonly (string | number)[] | undefined;\n try {\n keys = state.reader.rowKeysOf(origin);\n } catch (error) {\n // A list whose own read refused cannot name its rows here. The resolver uses the row the\n // caller states it is judging, and withholds the read when that names none: a field-wide\n // answer could permit quoting a row-scoped value a rule withholds.\n if (!(error instanceof AxiomError)) throw error;\n keys = undefined;\n }\n keysByOrigin.set(origin, keys);\n return keys;\n };\n const previous: { readonly scope: BinderScope; readonly at: ScopedDelivery | undefined }[] = [];\n // The `try` wraps the resolve-and-install loop as well as the visit: `rowKeysOf` can raise,\n // and a resolver installed on an earlier scope must not survive a later scope's failure.\n try {\n for (const scope of scopes) {\n const origin = scope.origin;\n // A scope over an authored list names no declaration, so delivery asks nothing of it.\n if (origin === undefined) continue;\n const keys = keysFor(origin);\n previous.push({ scope, at: scope.delivery });\n scope.delivery = (index, memberPath) => {\n const rowKey = keys?.[index] ?? (index === scope.index ? currentRowKey : undefined);\n if (rowKey === undefined) {\n // A neighbour beyond the bound reads a decided empty value, so no row is asked of it.\n if (index < 0 || index >= scope.elements.length) return undefined;\n // Neither the array's identity nor the row the caller states can name this read. A\n // field-wide answer could permit quoting a value a row-scoped rule withholds, so the\n // resolver fails closed instead of granting.\n return [];\n }\n return withheldScopedRead(state, origin, rowKey, memberPath);\n };\n }\n return visit();\n } finally {\n for (const entry of previous) {\n if (entry.at === undefined) delete entry.scope.delivery;\n else entry.scope.delivery = entry.at;\n }\n }\n}\n\n/**\n * The member paths delivery withholds below one scoped read, relative to that read.\n *\n * An empty list states the read's own value is withheld (a lifted scalar mask); paths state\n * withheld members of a delivered record or row payload. `undefined` states nothing is\n * withheld, so the read may be quoted.\n */\nfunction withheldScopedRead(\n state: EvaluationState,\n origin: string,\n rowKey: string | number | undefined,\n memberPath: string,\n): readonly string[] | undefined {\n if (memberPath === '') {\n const field = state.reader.index.fieldsByPath.get(origin);\n if (field === undefined) return undefined;\n // The container's own delivery answer comes first: a member-less array (an array of\n // `media_ref` or `money`, or a scalar list) has no declared fields, so walking descendants\n // would answer \"nothing withheld\" for a value the container itself withholds.\n if (withheldReference(state, field.fieldId, rowKey)) return [];\n const paths = withheldDescendants(state, field, rowKey, '');\n return paths.length === 0 ? undefined : paths;\n }\n const walked = state.reader.walked(`${origin}.${memberPath}`);\n if (walked === undefined) return undefined;\n // Every declaration the path crosses is weighed, exactly as a read of the whole record is:\n // an intrinsic member such as `mime` is not itself a declared field, so asking only the leaf\n // would let a masked array deliver its payload anyway.\n if (withheldDeclarations(state, walked.declared, rowKey)) return [];\n const paths = withheldDescendants(state, walked.field, rowKey, '');\n return paths.length === 0 ? undefined : paths;\n}\n\n/** The dotted paths below one declaration that delivery withholds, relative to it. */\nfunction withheldDescendants(\n state: EvaluationState,\n field: CompiledField,\n rowKey: string | number | undefined,\n prefix: string,\n): readonly string[] {\n const paths: string[] = [];\n for (const member of field.fields ?? []) {\n const path = prefix === '' ? member.fieldId : `${prefix}.${member.fieldId}`;\n if (withheldReference(state, member.fieldId, rowKey)) paths.push(path);\n else paths.push(...withheldDescendants(state, member, rowKey, path));\n }\n return paths;\n}\n\n/** One message parameter list, or `undefined` when the payload cannot be stated. */\nexport function paramsOf(\n state: EvaluationState,\n nodes: Readonly<Record<string, ExprNode>> | undefined,\n owner: PayloadOwner,\n): Readonly<Record<string, WireValue>> | undefined {\n if (nodes === undefined) return undefined;\n // Payload is not the rule's decision. Its reads still record diagnostics and disclosure taint,\n // but must not become the missing or refused input that readiness attributes to the outcome.\n state.reader.enterPayload();\n try {\n return withScopedDelivery(state, () => {\n const mark = state.reader.taintMark();\n const binderMark = state.evaluator.binderTaintMark();\n const params: Record<string, WireValue> = {};\n for (const [name, node] of Object.entries(nodes)) {\n let evaluated: Evaluated;\n try {\n evaluated = state.evaluator.evaluate(node);\n } catch (error) {\n // A parameter is message payload, not the rule's outcome. An\n // operand the engine could not evaluate makes the message unrenderable, so it is\n // reported as a diagnostic and the payload is dropped. The verdict the rule's own\n // expression already reached is not replaced by \"the engine could not decide\".\n if (!(error instanceof AxiomError)) throw error;\n recordPayloadCause(state, owner, error);\n return undefined;\n }\n // A value this device does not hold makes the message unrenderable for the same\n // reason, without turning a decided rule undecided.\n if (evaluated.kind === 'absent' || isUndetermined(evaluated.value)) return undefined;\n try {\n params[name] = toWireValue(\n evaluated.value,\n `${owner.at}.${name}`,\n payloadDeclaration(evaluated.value),\n );\n } catch (error) {\n // A value outside `WireValue` cannot be sealed into a report: the restricted reader would\n // refuse the body its own hash binds. The payload is message text, so the answer is no\n // payload plus the cause, never a coerced value and never the rule's verdict.\n if (!(error instanceof AxiomError)) throw error;\n recordPayloadCause(state, owner, error);\n return undefined;\n }\n }\n // A parameter that read a value the report must withhold (a hidden, excluded field, or one\n // whose resolved access withholds delivery) is the one place a report would quote it. A\n // binder read is the same fact for a row scope built before this window; the parameter list\n // is message payload, so the provenance-free answer is to state no payload rather than a\n // partially redacted one.\n if (\n state.reader.taintedSince(mark).length > 0 ||\n state.evaluator.touchedBinderWithheld(binderMark)\n ) {\n return undefined;\n }\n return params;\n });\n } finally {\n state.reader.exitPayload();\n }\n}\n\n/** Records why one parameter list was dropped, against the owner that stated it. */\nfunction recordPayloadCause(state: EvaluationState, owner: PayloadOwner, error: AxiomError): void {\n // A declared option's payload has no rule to carry a diagnostic, and it is read on the isolated\n // evaluation that decides availability, whose diagnostics are discarded with it (`RULES-7.1.2`).\n // The parameters are absent from the answer, which is the contract; there is no stream to report\n // the cause on.\n if (owner.ruleId === undefined) return;\n recordEngineError(state, owner.ruleId, error);\n}\n"]}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import type { CompiledRule, Diagnostic, EvaluationReport, ReportFacts, FieldRef } from '../../model/types.js';
|
|
2
|
+
import type { EvaluationEnv, EvaluationInput } from '../../model/access.js';
|
|
3
|
+
import type { CompiledSchema } from '../../model/schema.js';
|
|
4
|
+
import type { PresentationReads } from '../presentation-reads.js';
|
|
5
|
+
import type { ComputedValues } from '../reader.js';
|
|
6
|
+
import type { AccessWindow } from '../access/window.js';
|
|
7
|
+
import type { SnapshotAccess } from '../access/projection.js';
|
|
8
|
+
import type { EvaluationExplanation, RuleContribution } from '../report/assemble.js';
|
|
9
|
+
import type { EvaluationOptions } from './create-state.js';
|
|
10
|
+
import type { OptionAvailabilityBinding, RowCountEvaluation } from '../state/snapshot.js';
|
|
11
|
+
import type { UndecidedBinding } from '../undecided.js';
|
|
12
|
+
/**
|
|
13
|
+
* What a caller may hand one evaluation beyond its inputs, re-exported from where the state is
|
|
14
|
+
* built so one module owns the shape.
|
|
15
|
+
*/
|
|
16
|
+
export type { EvaluationOptions } from './create-state.js';
|
|
17
|
+
/**
|
|
18
|
+
* Refuses an artifact evaluated at a tier it did not travel to.
|
|
19
|
+
*
|
|
20
|
+
* A device artifact holds the compiler's deferred stub for every server-tier rule, so a host that
|
|
21
|
+
* evaluates it while claiming the server tier would credit each stub's marker as a decision the
|
|
22
|
+
* host never ran. The artifact states its target; a server host evaluates the server artifact
|
|
23
|
+
* instead, whose rules travelled intact.
|
|
24
|
+
*
|
|
25
|
+
* Every door that can answer without constructing an `Evaluation` (the presentation channel
|
|
26
|
+
* returns early for a layout-less artifact) calls this directly, so the pairing is refused before
|
|
27
|
+
* any rule is read rather than only where a full evaluation happens to be built.
|
|
28
|
+
*/
|
|
29
|
+
export declare function assertTierPairing(compiled: Pick<CompiledSchema, 'target'>, env: Pick<EvaluationEnv, 'tier'>): void;
|
|
30
|
+
/**
|
|
31
|
+
* The fields whose declared options state an availability condition.
|
|
32
|
+
*
|
|
33
|
+
* One answer per artifact, because the member list is immutable once parsed. A field inside an
|
|
34
|
+
* array carries its own condition and names itself, so the walk covers members as well as the
|
|
35
|
+
* fields the record holds once.
|
|
36
|
+
*/
|
|
37
|
+
export declare function conditionedAvailabilityFields(compiled: CompiledSchema): ReadonlySet<string>;
|
|
38
|
+
/** One evaluation's lifetime: it builds the reader and evaluator, and owns their state. */
|
|
39
|
+
export declare class Evaluation {
|
|
40
|
+
private readonly state;
|
|
41
|
+
constructor(compiled: CompiledSchema, input: EvaluationInput, env: EvaluationEnv, options?: EvaluationOptions);
|
|
42
|
+
/** The sealed report, evaluated once. */
|
|
43
|
+
run(): EvaluationReport;
|
|
44
|
+
/** Evaluates every rule and returns the report body, without canonicalising its digest. */
|
|
45
|
+
runBody(): ReportFacts;
|
|
46
|
+
/**
|
|
47
|
+
* The expected row count each `rowsFrom` array declares, `MODEL-2.1.22`.
|
|
48
|
+
*
|
|
49
|
+
* Evaluated after the body, so a count may read a writer's produced value. A count that is
|
|
50
|
+
* absent, `UNKNOWN`, `DEFERRED` or not an integer is undetermined; a negative value and one
|
|
51
|
+
* above the admitted ceiling are named refusals rather than a silently empty list. The engine
|
|
52
|
+
* derives the number and never creates a row.
|
|
53
|
+
*/
|
|
54
|
+
rowCounts(): ReadonlyMap<string, RowCountEvaluation>;
|
|
55
|
+
/**
|
|
56
|
+
* Every declared option's availability, evaluated once per record, `RULES-7.1.1`.
|
|
57
|
+
*
|
|
58
|
+
* Evaluated after the report, so every computed writer has produced its value, and on a
|
|
59
|
+
* dedicated evaluation of this one's access and writer overlay: a condition's reads and their
|
|
60
|
+
* diagnostics are the availability answer's, and neither may enter the sealed report the
|
|
61
|
+
* snapshot already assembled. An artifact whose options declare no condition costs nothing.
|
|
62
|
+
*
|
|
63
|
+
* `scope` names the declarations a session's change set could move, so a pass evaluates those
|
|
64
|
+
* conditions and carries the rest over from the state it derived from.
|
|
65
|
+
*/
|
|
66
|
+
optionAvailability(scope?: ReadonlySet<string>): ReadonlyMap<string, OptionAvailabilityBinding>;
|
|
67
|
+
/**
|
|
68
|
+
* Evaluates the selected rules and returns one contribution per rule that ran.
|
|
69
|
+
*
|
|
70
|
+
* This is the incremental seam a session uses: it produces the writers the selection reaches
|
|
71
|
+
* in dependency order, enters the selected visibility rules first, then evaluates the
|
|
72
|
+
* selection and every rule those evaluations pull in. Nothing is assembled and no existing
|
|
73
|
+
* contribution is touched, so the caller decides what to cache.
|
|
74
|
+
*/
|
|
75
|
+
evaluateRules(rules: readonly CompiledRule[]): readonly RuleContribution[];
|
|
76
|
+
/**
|
|
77
|
+
* Assembles the canonical report from contributions this session holds.
|
|
78
|
+
*
|
|
79
|
+
* A pass evaluates only the rules a change reaches; the untouched rules are replayed from
|
|
80
|
+
* the session's cache, so the report states every rule exactly as a full evaluation would.
|
|
81
|
+
*/
|
|
82
|
+
assemble(contributions: readonly RuleContribution[], unattributedDiagnostics?: readonly Diagnostic[]): EvaluationReport;
|
|
83
|
+
/** Assembles the report body a derivation consumes, leaving the digest to `assemble`. */
|
|
84
|
+
assembleBody(contributions: readonly RuleContribution[], unattributedDiagnostics?: readonly Diagnostic[]): ReportFacts;
|
|
85
|
+
/** Every field any rule of this evaluation considered, in first-read order. */
|
|
86
|
+
considered(): readonly FieldRef[];
|
|
87
|
+
/** The diagnostics this evaluation recorded outside any rule's own evaluation. */
|
|
88
|
+
unattributedDiagnostics(): readonly Diagnostic[];
|
|
89
|
+
/**
|
|
90
|
+
* The access answer this evaluation resolved: the projection its report
|
|
91
|
+
* renders and the session writes it applied, so a projection of this snapshot reads one
|
|
92
|
+
* answer instead of resolving the overlay a second time.
|
|
93
|
+
*/
|
|
94
|
+
snapshotAccess(): SnapshotAccess;
|
|
95
|
+
/** The access window this evaluation resolved, so a derived state reads the same answer. */
|
|
96
|
+
accessWindow(): AccessWindow;
|
|
97
|
+
/**
|
|
98
|
+
* Why each rule binding that came back `UNKNOWN` did, `RULES-2.1.1`.
|
|
99
|
+
*
|
|
100
|
+
* A full evaluation decides every declared rule, so this is the whole answer; a session that
|
|
101
|
+
* re-evaluated only a closure merges its own with the bindings it replayed.
|
|
102
|
+
*/
|
|
103
|
+
undecidedCauses(): ReadonlyMap<string, readonly UndecidedBinding[]>;
|
|
104
|
+
/** The writer entries that actually own values after the pass, including per-row entries. */
|
|
105
|
+
computedValues(): ComputedValues;
|
|
106
|
+
/** The fields a gate rule's own reads were refused, in read order. */
|
|
107
|
+
gateDenials(ruleId: string): readonly string[];
|
|
108
|
+
/**
|
|
109
|
+
* The declared fields a hidden layout section places, `MODEL-3.1.9`.
|
|
110
|
+
*
|
|
111
|
+
* The section predicates are evaluated through this evaluation's presentation channel, so a
|
|
112
|
+
* read they make stays out of the report and an undecided condition leaves the section
|
|
113
|
+
* visible. Readiness consumes the answer as it consumes a hidden field's.
|
|
114
|
+
*/
|
|
115
|
+
layoutHidden(): ReadonlySet<string>;
|
|
116
|
+
/** The audit trail of this evaluation's explain(): what each rule read and resolved. */
|
|
117
|
+
explanation(): EvaluationExplanation;
|
|
118
|
+
/**
|
|
119
|
+
* The presentation-only projection of this evaluation, `MODEL-3.1.11`.
|
|
120
|
+
*
|
|
121
|
+
* It prepares the computed overlay so a chrome read sees the same value a rule would, then
|
|
122
|
+
* answers field visibility, access and expression values from this evaluation's own reader.
|
|
123
|
+
* A caller uses a dedicated `Evaluation` for it: the reads this projection makes are recorded
|
|
124
|
+
* here and discarded with the evaluation, never appended to a report.
|
|
125
|
+
*/
|
|
126
|
+
presentation(): PresentationReads;
|
|
127
|
+
}
|
|
128
|
+
//# sourceMappingURL=runner.d.ts.map
|