@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 @@
|
|
|
1
|
+
{"version":3,"file":"runner.d.ts","sourceRoot":"","sources":["../../../src/eval/rule/runner.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAEV,YAAY,EACZ,UAAU,EACV,gBAAgB,EAChB,WAAW,EAEX,QAAQ,EAGT,MAAM,sBAAsB,CAAC;AAE9B,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC5E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAG5D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAS9D,OAAO,KAAK,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAIrF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAK3D,OAAO,KAAK,EAAE,yBAAyB,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1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,WAAW,CAEb;IAED,+EAA+E;IAC/E,UAAU,IAAI,SAAS,QAAQ,EAAE,CAEhC;IAED,kFAAkF;IAClF,uBAAuB,IAAI,SAAS,UAAU,EAAE,CAI/C;IAED;;;;OAIG;IACH,cAAc,IAAI,cAAc,CAE/B;IAED,4FAA4F;IAC5F,YAAY,IAAI,YAAY,CAE3B;IAED;;;;;OAKG;IACH,eAAe,IAAI,WAAW,CAAC,MAAM,EAAE,SAAS,gBAAgB,EAAE,CAAC,CAElE;IAED,6FAA6F;IAC7F,cAAc,IAAI,cAAc,CAE/B;IAED,sEAAsE;IACtE,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,CAE7C;IAED;;;;;;OAMG;IACH,YAAY,IAAI,WAAW,CAAC,MAAM,CAAC,CAOlC;IAED,wFAAwF;IACxF,WAAW,IAAI,qBAAqB,CAEnC;IAED;;;;;;;OAOG;IACH,YAAY,IAAI,iBAAiB,CAqDhC;CACF"}
|
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
import { AxiomError } from '../../model/errors.js';
|
|
2
|
+
import { isSafeInteger } from '../../model/integer.js';
|
|
3
|
+
import { effectiveTier } from '../../model/access.js';
|
|
4
|
+
import { isUndetermined, ROW_COUNT_CEILING } from '../../model/types.js';
|
|
5
|
+
import { assembleBody, assembleReport, evaluateContributions, explanationOf, runBody, runReport, } from '../report/assemble.js';
|
|
6
|
+
import { prepareComputed, prepareWriters } from './compute.js';
|
|
7
|
+
import { evaluateRuleOnce } from './execution.js';
|
|
8
|
+
import { createEvaluationState } from './create-state.js';
|
|
9
|
+
import { isFieldVisible } from './visibility.js';
|
|
10
|
+
import { declaresSectionVisibility, layoutHiddenFields } from '../layout-visibility.js';
|
|
11
|
+
import { evaluateOptionAvailability } from '../option-availability.js';
|
|
12
|
+
/**
|
|
13
|
+
* Refuses an artifact evaluated at a tier it did not travel to.
|
|
14
|
+
*
|
|
15
|
+
* A device artifact holds the compiler's deferred stub for every server-tier rule, so a host that
|
|
16
|
+
* evaluates it while claiming the server tier would credit each stub's marker as a decision the
|
|
17
|
+
* host never ran. The artifact states its target; a server host evaluates the server artifact
|
|
18
|
+
* instead, whose rules travelled intact.
|
|
19
|
+
*
|
|
20
|
+
* Every door that can answer without constructing an `Evaluation` (the presentation channel
|
|
21
|
+
* returns early for a layout-less artifact) calls this directly, so the pairing is refused before
|
|
22
|
+
* any rule is read rather than only where a full evaluation happens to be built.
|
|
23
|
+
*/
|
|
24
|
+
export function assertTierPairing(compiled, env) {
|
|
25
|
+
if (compiled.target === 'client' && effectiveTier(env) === 'server') {
|
|
26
|
+
throw new AxiomError('ENGINE_ERROR', 'a client artifact cannot be evaluated at the server tier: its server-tier rules are ' +
|
|
27
|
+
'deferred stubs, so a verdict would answer a check that never ran; ' +
|
|
28
|
+
'evaluate the server artifact', '$.target');
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Whether any declared option states an availability condition.
|
|
33
|
+
*
|
|
34
|
+
* The walk depends only on the compiled artifact, so it is one answer per artifact rather than one
|
|
35
|
+
* scan per pass, per evaluation isolate and per session.
|
|
36
|
+
*/
|
|
37
|
+
const CONDITIONED_AVAILABILITY = new WeakMap();
|
|
38
|
+
/**
|
|
39
|
+
* The fields whose declared options state an availability condition.
|
|
40
|
+
*
|
|
41
|
+
* One answer per artifact, because the member list is immutable once parsed. A field inside an
|
|
42
|
+
* array carries its own condition and names itself, so the walk covers members as well as the
|
|
43
|
+
* fields the record holds once.
|
|
44
|
+
*/
|
|
45
|
+
export function conditionedAvailabilityFields(compiled) {
|
|
46
|
+
const cached = CONDITIONED_AVAILABILITY.get(compiled);
|
|
47
|
+
if (cached !== undefined)
|
|
48
|
+
return cached;
|
|
49
|
+
const found = new Set();
|
|
50
|
+
const visit = (fields) => {
|
|
51
|
+
for (const field of fields) {
|
|
52
|
+
if ((field.options ?? []).some((option) => option.availableWhen !== undefined)) {
|
|
53
|
+
found.add(field.fieldId);
|
|
54
|
+
}
|
|
55
|
+
if (field.fields !== undefined)
|
|
56
|
+
visit(field.fields);
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
visit(compiled.fields);
|
|
60
|
+
CONDITIONED_AVAILABILITY.set(compiled, found);
|
|
61
|
+
return found;
|
|
62
|
+
}
|
|
63
|
+
function declaresOptionAvailability(compiled) {
|
|
64
|
+
return conditionedAvailabilityFields(compiled).size > 0;
|
|
65
|
+
}
|
|
66
|
+
/** One evaluation's lifetime: it builds the reader and evaluator, and owns their state. */
|
|
67
|
+
export class Evaluation {
|
|
68
|
+
state;
|
|
69
|
+
constructor(compiled, input, env, options = {}) {
|
|
70
|
+
assertTierPairing(compiled, env);
|
|
71
|
+
this.state = createEvaluationState(compiled, input, env, options);
|
|
72
|
+
}
|
|
73
|
+
/** The sealed report, evaluated once. */
|
|
74
|
+
run() {
|
|
75
|
+
return runReport(this.state);
|
|
76
|
+
}
|
|
77
|
+
/** Evaluates every rule and returns the report body, without canonicalising its digest. */
|
|
78
|
+
runBody() {
|
|
79
|
+
return runBody(this.state);
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* The expected row count each `rowsFrom` array declares, `MODEL-2.1.22`.
|
|
83
|
+
*
|
|
84
|
+
* Evaluated after the body, so a count may read a writer's produced value. A count that is
|
|
85
|
+
* absent, `UNKNOWN`, `DEFERRED` or not an integer is undetermined; a negative value and one
|
|
86
|
+
* above the admitted ceiling are named refusals rather than a silently empty list. The engine
|
|
87
|
+
* derives the number and never creates a row.
|
|
88
|
+
*/
|
|
89
|
+
rowCounts() {
|
|
90
|
+
const counts = new Map();
|
|
91
|
+
for (const field of this.state.compiled.fields) {
|
|
92
|
+
if (field.primitive !== 'array' || field.rowsFrom === undefined)
|
|
93
|
+
continue;
|
|
94
|
+
let evaluated;
|
|
95
|
+
try {
|
|
96
|
+
evaluated = this.state.evaluator.evaluate(field.rowsFrom);
|
|
97
|
+
}
|
|
98
|
+
catch {
|
|
99
|
+
counts.set(field.fieldId, { kind: 'undetermined' });
|
|
100
|
+
continue;
|
|
101
|
+
}
|
|
102
|
+
if (evaluated.kind === 'absent') {
|
|
103
|
+
counts.set(field.fieldId, { kind: 'undetermined' });
|
|
104
|
+
continue;
|
|
105
|
+
}
|
|
106
|
+
const value = evaluated.value;
|
|
107
|
+
if (isUndetermined(value) || value === null || typeof value !== 'number') {
|
|
108
|
+
counts.set(field.fieldId, { kind: 'undetermined' });
|
|
109
|
+
continue;
|
|
110
|
+
}
|
|
111
|
+
if (!isSafeInteger(value)) {
|
|
112
|
+
counts.set(field.fieldId, { kind: 'refused', reason: 'integer', value });
|
|
113
|
+
continue;
|
|
114
|
+
}
|
|
115
|
+
if (value < 0)
|
|
116
|
+
counts.set(field.fieldId, { kind: 'refused', reason: 'negative', value });
|
|
117
|
+
else if (value > ROW_COUNT_CEILING)
|
|
118
|
+
counts.set(field.fieldId, { kind: 'refused', reason: 'ceiling', value });
|
|
119
|
+
else
|
|
120
|
+
counts.set(field.fieldId, { kind: 'expected', expected: value });
|
|
121
|
+
}
|
|
122
|
+
return counts;
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Every declared option's availability, evaluated once per record, `RULES-7.1.1`.
|
|
126
|
+
*
|
|
127
|
+
* Evaluated after the report, so every computed writer has produced its value, and on a
|
|
128
|
+
* dedicated evaluation of this one's access and writer overlay: a condition's reads and their
|
|
129
|
+
* diagnostics are the availability answer's, and neither may enter the sealed report the
|
|
130
|
+
* snapshot already assembled. An artifact whose options declare no condition costs nothing.
|
|
131
|
+
*
|
|
132
|
+
* `scope` names the declarations a session's change set could move, so a pass evaluates those
|
|
133
|
+
* conditions and carries the rest over from the state it derived from.
|
|
134
|
+
*/
|
|
135
|
+
optionAvailability(scope) {
|
|
136
|
+
if (!declaresOptionAvailability(this.state.compiled))
|
|
137
|
+
return new Map();
|
|
138
|
+
return evaluateOptionAvailability(this.state.isolate(), scope);
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Evaluates the selected rules and returns one contribution per rule that ran.
|
|
142
|
+
*
|
|
143
|
+
* This is the incremental seam a session uses: it produces the writers the selection reaches
|
|
144
|
+
* in dependency order, enters the selected visibility rules first, then evaluates the
|
|
145
|
+
* selection and every rule those evaluations pull in. Nothing is assembled and no existing
|
|
146
|
+
* contribution is touched, so the caller decides what to cache.
|
|
147
|
+
*/
|
|
148
|
+
evaluateRules(rules) {
|
|
149
|
+
const selected = new Set(rules);
|
|
150
|
+
const order = this.state.prepared.computedOrder;
|
|
151
|
+
if (order === undefined)
|
|
152
|
+
this.state.computedUnorderable = true;
|
|
153
|
+
else
|
|
154
|
+
prepareWriters(this.state, order.filter((rule) => selected.has(rule)), (rule) => evaluateRuleOnce(this.state, rule));
|
|
155
|
+
return evaluateContributions(this.state, rules);
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* Assembles the canonical report from contributions this session holds.
|
|
159
|
+
*
|
|
160
|
+
* A pass evaluates only the rules a change reaches; the untouched rules are replayed from
|
|
161
|
+
* the session's cache, so the report states every rule exactly as a full evaluation would.
|
|
162
|
+
*/
|
|
163
|
+
assemble(contributions, unattributedDiagnostics = []) {
|
|
164
|
+
return assembleReport(this.state, contributions, unattributedDiagnostics);
|
|
165
|
+
}
|
|
166
|
+
/** Assembles the report body a derivation consumes, leaving the digest to `assemble`. */
|
|
167
|
+
assembleBody(contributions, unattributedDiagnostics = []) {
|
|
168
|
+
return assembleBody(this.state, contributions, unattributedDiagnostics);
|
|
169
|
+
}
|
|
170
|
+
/** Every field any rule of this evaluation considered, in first-read order. */
|
|
171
|
+
considered() {
|
|
172
|
+
return this.state.reader.considered();
|
|
173
|
+
}
|
|
174
|
+
/** The diagnostics this evaluation recorded outside any rule's own evaluation. */
|
|
175
|
+
unattributedDiagnostics() {
|
|
176
|
+
return this.state.diagnostics.filter((diagnostic) => !this.state.diagnosticOwners.has(diagnostic));
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* The access answer this evaluation resolved: the projection its report
|
|
180
|
+
* renders and the session writes it applied, so a projection of this snapshot reads one
|
|
181
|
+
* answer instead of resolving the overlay a second time.
|
|
182
|
+
*/
|
|
183
|
+
snapshotAccess() {
|
|
184
|
+
return this.state.reader.snapshotAccess();
|
|
185
|
+
}
|
|
186
|
+
/** The access window this evaluation resolved, so a derived state reads the same answer. */
|
|
187
|
+
accessWindow() {
|
|
188
|
+
return this.state.accessWindow;
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* Why each rule binding that came back `UNKNOWN` did, `RULES-2.1.1`.
|
|
192
|
+
*
|
|
193
|
+
* A full evaluation decides every declared rule, so this is the whole answer; a session that
|
|
194
|
+
* re-evaluated only a closure merges its own with the bindings it replayed.
|
|
195
|
+
*/
|
|
196
|
+
undecidedCauses() {
|
|
197
|
+
return this.state.reader.undecidedCauses();
|
|
198
|
+
}
|
|
199
|
+
/** The writer entries that actually own values after the pass, including per-row entries. */
|
|
200
|
+
computedValues() {
|
|
201
|
+
return this.state.computed;
|
|
202
|
+
}
|
|
203
|
+
/** The fields a gate rule's own reads were refused, in read order. */
|
|
204
|
+
gateDenials(ruleId) {
|
|
205
|
+
return this.state.gateDenialsByRule.get(ruleId) ?? [];
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* The declared fields a hidden layout section places, `MODEL-3.1.9`.
|
|
209
|
+
*
|
|
210
|
+
* The section predicates are evaluated through this evaluation's presentation channel, so a
|
|
211
|
+
* read they make stays out of the report and an undecided condition leaves the section
|
|
212
|
+
* visible. Readiness consumes the answer as it consumes a hidden field's.
|
|
213
|
+
*/
|
|
214
|
+
layoutHidden() {
|
|
215
|
+
if (!declaresSectionVisibility(this.state.compiled))
|
|
216
|
+
return new Set();
|
|
217
|
+
// A dedicated evaluation for the presentation channel, as `evaluatePresentation` uses: the
|
|
218
|
+
// reads a section predicate makes must not enter the report this evaluation already
|
|
219
|
+
// assembled, and its diagnostics must not join this one's.
|
|
220
|
+
const presentation = new Evaluation(this.state.compiled, this.state.input, this.state.env);
|
|
221
|
+
return layoutHiddenFields(this.state.compiled, presentation.presentation());
|
|
222
|
+
}
|
|
223
|
+
/** The audit trail of this evaluation's explain(): what each rule read and resolved. */
|
|
224
|
+
explanation() {
|
|
225
|
+
return explanationOf(this.state);
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* The presentation-only projection of this evaluation, `MODEL-3.1.11`.
|
|
229
|
+
*
|
|
230
|
+
* It prepares the computed overlay so a chrome read sees the same value a rule would, then
|
|
231
|
+
* answers field visibility, access and expression values from this evaluation's own reader.
|
|
232
|
+
* A caller uses a dedicated `Evaluation` for it: the reads this projection makes are recorded
|
|
233
|
+
* here and discarded with the evaluation, never appended to a report.
|
|
234
|
+
*/
|
|
235
|
+
presentation() {
|
|
236
|
+
prepareComputed(this.state, (rule) => evaluateRuleOnce(this.state, rule));
|
|
237
|
+
const state = this.state;
|
|
238
|
+
// One chrome expression spends its own node allowance, so a long layout never charges the
|
|
239
|
+
// rules that ran before it.
|
|
240
|
+
const evaluate = (node) => {
|
|
241
|
+
const previous = state.evaluator.beginRule();
|
|
242
|
+
try {
|
|
243
|
+
return state.evaluator.evaluate(node);
|
|
244
|
+
}
|
|
245
|
+
finally {
|
|
246
|
+
state.evaluator.endRule(previous);
|
|
247
|
+
}
|
|
248
|
+
};
|
|
249
|
+
return {
|
|
250
|
+
fieldVisible: (fieldId) => isFieldVisible(state, fieldId),
|
|
251
|
+
fieldHidden: (fieldId) => {
|
|
252
|
+
const path = state.reader.declarationPathOf(fieldId);
|
|
253
|
+
return (state.reader
|
|
254
|
+
.walked(path)
|
|
255
|
+
?.declared.some((id) => state.reader.accessFor({ fieldId: id }) === 'hidden') ?? true);
|
|
256
|
+
},
|
|
257
|
+
outcomeOf: (node) => {
|
|
258
|
+
const withheldMark = state.reader.taintMark();
|
|
259
|
+
try {
|
|
260
|
+
const evaluated = evaluate(node);
|
|
261
|
+
// A visible rule does not stop an expression reading a withheld value, but chrome is
|
|
262
|
+
// output just like a report payload: a value delivery withholds must not decide what
|
|
263
|
+
// is shown.
|
|
264
|
+
if (state.reader.taintedSince(withheldMark).length > 0)
|
|
265
|
+
return 'UNKNOWN';
|
|
266
|
+
return state.evaluator.statusOf(evaluated);
|
|
267
|
+
}
|
|
268
|
+
catch (error) {
|
|
269
|
+
// Chrome fails visible: an undecided or failed predicate never hides the form.
|
|
270
|
+
if (!(error instanceof AxiomError))
|
|
271
|
+
throw error;
|
|
272
|
+
return 'UNKNOWN';
|
|
273
|
+
}
|
|
274
|
+
},
|
|
275
|
+
valueOf: (node) => {
|
|
276
|
+
const withheldMark = state.reader.taintMark();
|
|
277
|
+
try {
|
|
278
|
+
const evaluated = evaluate(node);
|
|
279
|
+
if (evaluated.kind === 'absent' || isUndetermined(evaluated.value))
|
|
280
|
+
return undefined;
|
|
281
|
+
if (state.reader.taintedSince(withheldMark).length > 0)
|
|
282
|
+
return undefined;
|
|
283
|
+
return evaluated.value;
|
|
284
|
+
}
|
|
285
|
+
catch (error) {
|
|
286
|
+
// A readout that cannot be evaluated renders as absent rather than as a default; the
|
|
287
|
+
// channel is isolated, so there is no report to carry the engine error to.
|
|
288
|
+
if (!(error instanceof AxiomError))
|
|
289
|
+
throw error;
|
|
290
|
+
return undefined;
|
|
291
|
+
}
|
|
292
|
+
},
|
|
293
|
+
};
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
//# sourceMappingURL=runner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runner.js","sourceRoot":"","sources":["../../../src/eval/rule/runner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAYvD,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAGtD,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAMzE,OAAO,EACL,YAAY,EAC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AC3E,IAAI,CAAC,CAAC,KAAK,YAAY,UAAU,CAAC;wBAAE,MAAM,KAAK,CAAC;oBAChD,OAAO,SAAS,CAAC;gBACnB,CAAC;YACH,CAAC;SACF,CAAC;IACJ,CAAC;CACF","sourcesContent":["import { AxiomError } from '../../model/errors.js';\nimport { isSafeInteger } from '../../model/integer.js';\nimport type {\n CompiledField,\n CompiledRule,\n Diagnostic,\n EvaluationReport,\n ReportFacts,\n ExprNode,\n FieldRef,\n Outcome,\n WireValue,\n} from '../../model/types.js';\nimport { effectiveTier } from '../../model/access.js';\nimport type { EvaluationEnv, EvaluationInput } from '../../model/access.js';\nimport type { CompiledSchema } from '../../model/schema.js';\nimport { isUndetermined, ROW_COUNT_CEILING } from '../../model/types.js';\nimport type { Evaluated } from '../expression.js';\nimport type { PresentationReads } from '../presentation-reads.js';\nimport type { ComputedValues } from '../reader.js';\nimport type { AccessWindow } from '../access/window.js';\nimport type { SnapshotAccess } from '../access/projection.js';\nimport {\n assembleBody,\n assembleReport,\n evaluateContributions,\n explanationOf,\n runBody,\n runReport,\n} from '../report/assemble.js';\nimport type { EvaluationExplanation, RuleContribution } from '../report/assemble.js';\nimport { prepareComputed, prepareWriters } from './compute.js';\nimport { evaluateRuleOnce } from './execution.js';\nimport { createEvaluationState } from './create-state.js';\nimport type { EvaluationOptions } from './create-state.js';\nimport type { EvaluationState } from './state.js';\nimport { isFieldVisible } from './visibility.js';\nimport { declaresSectionVisibility, layoutHiddenFields } from '../layout-visibility.js';\nimport { evaluateOptionAvailability } from '../option-availability.js';\nimport type { OptionAvailabilityBinding, RowCountEvaluation } from '../state/snapshot.js';\nimport type { UndecidedBinding } from '../undecided.js';\n\n/**\n * What a caller may hand one evaluation beyond its inputs, re-exported from where the state is\n * built so one module owns the shape.\n */\nexport type { EvaluationOptions } from './create-state.js';\n\n/**\n * Refuses an artifact evaluated at a tier it did not travel to.\n *\n * A device artifact holds the compiler's deferred stub for every server-tier rule, so a host that\n * evaluates it while claiming the server tier would credit each stub's marker as a decision the\n * host never ran. The artifact states its target; a server host evaluates the server artifact\n * instead, whose rules travelled intact.\n *\n * Every door that can answer without constructing an `Evaluation` (the presentation channel\n * returns early for a layout-less artifact) calls this directly, so the pairing is refused before\n * any rule is read rather than only where a full evaluation happens to be built.\n */\nexport function assertTierPairing(\n compiled: Pick<CompiledSchema, 'target'>,\n env: Pick<EvaluationEnv, 'tier'>,\n): void {\n if (compiled.target === 'client' && effectiveTier(env) === 'server') {\n throw new AxiomError(\n 'ENGINE_ERROR',\n 'a client artifact cannot be evaluated at the server tier: its server-tier rules are ' +\n 'deferred stubs, so a verdict would answer a check that never ran; ' +\n 'evaluate the server artifact',\n '$.target',\n );\n }\n}\n\n/**\n * Whether any declared option states an availability condition.\n *\n * The walk depends only on the compiled artifact, so it is one answer per artifact rather than one\n * scan per pass, per evaluation isolate and per session.\n */\nconst CONDITIONED_AVAILABILITY: WeakMap<CompiledSchema, ReadonlySet<string>> = new WeakMap();\n\n/**\n * The fields whose declared options state an availability condition.\n *\n * One answer per artifact, because the member list is immutable once parsed. A field inside an\n * array carries its own condition and names itself, so the walk covers members as well as the\n * fields the record holds once.\n */\nexport function conditionedAvailabilityFields(compiled: CompiledSchema): ReadonlySet<string> {\n const cached = CONDITIONED_AVAILABILITY.get(compiled);\n if (cached !== undefined) return cached;\n const found = new Set<string>();\n const visit = (fields: readonly CompiledField[]): void => {\n for (const field of fields) {\n if ((field.options ?? []).some((option) => option.availableWhen !== undefined)) {\n found.add(field.fieldId);\n }\n if (field.fields !== undefined) visit(field.fields);\n }\n };\n visit(compiled.fields);\n CONDITIONED_AVAILABILITY.set(compiled, found);\n return found;\n}\n\nfunction declaresOptionAvailability(compiled: CompiledSchema): boolean {\n return conditionedAvailabilityFields(compiled).size > 0;\n}\n\n/** One evaluation's lifetime: it builds the reader and evaluator, and owns their state. */\nexport class Evaluation {\n private readonly state: EvaluationState;\n\n constructor(\n compiled: CompiledSchema,\n input: EvaluationInput,\n env: EvaluationEnv,\n options: EvaluationOptions = {},\n ) {\n assertTierPairing(compiled, env);\n this.state = createEvaluationState(compiled, input, env, options);\n }\n\n /** The sealed report, evaluated once. */\n run(): EvaluationReport {\n return runReport(this.state);\n }\n\n /** Evaluates every rule and returns the report body, without canonicalising its digest. */\n runBody(): ReportFacts {\n return runBody(this.state);\n }\n\n /**\n * The expected row count each `rowsFrom` array declares, `MODEL-2.1.22`.\n *\n * Evaluated after the body, so a count may read a writer's produced value. A count that is\n * absent, `UNKNOWN`, `DEFERRED` or not an integer is undetermined; a negative value and one\n * above the admitted ceiling are named refusals rather than a silently empty list. The engine\n * derives the number and never creates a row.\n */\n rowCounts(): ReadonlyMap<string, RowCountEvaluation> {\n const counts = new Map<string, RowCountEvaluation>();\n for (const field of this.state.compiled.fields) {\n if (field.primitive !== 'array' || field.rowsFrom === undefined) continue;\n let evaluated;\n try {\n evaluated = this.state.evaluator.evaluate(field.rowsFrom);\n } catch {\n counts.set(field.fieldId, { kind: 'undetermined' });\n continue;\n }\n if (evaluated.kind === 'absent') {\n counts.set(field.fieldId, { kind: 'undetermined' });\n continue;\n }\n const value = evaluated.value;\n if (isUndetermined(value) || value === null || typeof value !== 'number') {\n counts.set(field.fieldId, { kind: 'undetermined' });\n continue;\n }\n if (!isSafeInteger(value)) {\n counts.set(field.fieldId, { kind: 'refused', reason: 'integer', value });\n continue;\n }\n if (value < 0) counts.set(field.fieldId, { kind: 'refused', reason: 'negative', value });\n else if (value > ROW_COUNT_CEILING)\n counts.set(field.fieldId, { kind: 'refused', reason: 'ceiling', value });\n else counts.set(field.fieldId, { kind: 'expected', expected: value });\n }\n return counts;\n }\n\n /**\n * Every declared option's availability, evaluated once per record, `RULES-7.1.1`.\n *\n * Evaluated after the report, so every computed writer has produced its value, and on a\n * dedicated evaluation of this one's access and writer overlay: a condition's reads and their\n * diagnostics are the availability answer's, and neither may enter the sealed report the\n * snapshot already assembled. An artifact whose options declare no condition costs nothing.\n *\n * `scope` names the declarations a session's change set could move, so a pass evaluates those\n * conditions and carries the rest over from the state it derived from.\n */\n optionAvailability(scope?: ReadonlySet<string>): ReadonlyMap<string, OptionAvailabilityBinding> {\n if (!declaresOptionAvailability(this.state.compiled)) return new Map();\n return evaluateOptionAvailability(this.state.isolate(), scope);\n }\n\n /**\n * Evaluates the selected rules and returns one contribution per rule that ran.\n *\n * This is the incremental seam a session uses: it produces the writers the selection reaches\n * in dependency order, enters the selected visibility rules first, then evaluates the\n * selection and every rule those evaluations pull in. Nothing is assembled and no existing\n * contribution is touched, so the caller decides what to cache.\n */\n evaluateRules(rules: readonly CompiledRule[]): readonly RuleContribution[] {\n const selected = new Set(rules);\n const order = this.state.prepared.computedOrder;\n if (order === undefined) this.state.computedUnorderable = true;\n else\n prepareWriters(\n this.state,\n order.filter((rule) => selected.has(rule)),\n (rule) => evaluateRuleOnce(this.state, rule),\n );\n return evaluateContributions(this.state, rules);\n }\n\n /**\n * Assembles the canonical report from contributions this session holds.\n *\n * A pass evaluates only the rules a change reaches; the untouched rules are replayed from\n * the session's cache, so the report states every rule exactly as a full evaluation would.\n */\n assemble(\n contributions: readonly RuleContribution[],\n unattributedDiagnostics: readonly Diagnostic[] = [],\n ): EvaluationReport {\n return assembleReport(this.state, contributions, unattributedDiagnostics);\n }\n\n /** Assembles the report body a derivation consumes, leaving the digest to `assemble`. */\n assembleBody(\n contributions: readonly RuleContribution[],\n unattributedDiagnostics: readonly Diagnostic[] = [],\n ): ReportFacts {\n return assembleBody(this.state, contributions, unattributedDiagnostics);\n }\n\n /** Every field any rule of this evaluation considered, in first-read order. */\n considered(): readonly FieldRef[] {\n return this.state.reader.considered();\n }\n\n /** The diagnostics this evaluation recorded outside any rule's own evaluation. */\n unattributedDiagnostics(): readonly Diagnostic[] {\n return this.state.diagnostics.filter(\n (diagnostic) => !this.state.diagnosticOwners.has(diagnostic),\n );\n }\n\n /**\n * The access answer this evaluation resolved: the projection its report\n * renders and the session writes it applied, so a projection of this snapshot reads one\n * answer instead of resolving the overlay a second time.\n */\n snapshotAccess(): SnapshotAccess {\n return this.state.reader.snapshotAccess();\n }\n\n /** The access window this evaluation resolved, so a derived state reads the same answer. */\n accessWindow(): AccessWindow {\n return this.state.accessWindow;\n }\n\n /**\n * Why each rule binding that came back `UNKNOWN` did, `RULES-2.1.1`.\n *\n * A full evaluation decides every declared rule, so this is the whole answer; a session that\n * re-evaluated only a closure merges its own with the bindings it replayed.\n */\n undecidedCauses(): ReadonlyMap<string, readonly UndecidedBinding[]> {\n return this.state.reader.undecidedCauses();\n }\n\n /** The writer entries that actually own values after the pass, including per-row entries. */\n computedValues(): ComputedValues {\n return this.state.computed;\n }\n\n /** The fields a gate rule's own reads were refused, in read order. */\n gateDenials(ruleId: string): readonly string[] {\n return this.state.gateDenialsByRule.get(ruleId) ?? [];\n }\n\n /**\n * The declared fields a hidden layout section places, `MODEL-3.1.9`.\n *\n * The section predicates are evaluated through this evaluation's presentation channel, so a\n * read they make stays out of the report and an undecided condition leaves the section\n * visible. Readiness consumes the answer as it consumes a hidden field's.\n */\n layoutHidden(): ReadonlySet<string> {\n if (!declaresSectionVisibility(this.state.compiled)) return new Set<string>();\n // A dedicated evaluation for the presentation channel, as `evaluatePresentation` uses: the\n // reads a section predicate makes must not enter the report this evaluation already\n // assembled, and its diagnostics must not join this one's.\n const presentation = new Evaluation(this.state.compiled, this.state.input, this.state.env);\n return layoutHiddenFields(this.state.compiled, presentation.presentation());\n }\n\n /** The audit trail of this evaluation's explain(): what each rule read and resolved. */\n explanation(): EvaluationExplanation {\n return explanationOf(this.state);\n }\n\n /**\n * The presentation-only projection of this evaluation, `MODEL-3.1.11`.\n *\n * It prepares the computed overlay so a chrome read sees the same value a rule would, then\n * answers field visibility, access and expression values from this evaluation's own reader.\n * A caller uses a dedicated `Evaluation` for it: the reads this projection makes are recorded\n * here and discarded with the evaluation, never appended to a report.\n */\n presentation(): PresentationReads {\n prepareComputed(this.state, (rule) => evaluateRuleOnce(this.state, rule));\n const state = this.state;\n // One chrome expression spends its own node allowance, so a long layout never charges the\n // rules that ran before it.\n const evaluate = (node: ExprNode): Evaluated => {\n const previous = state.evaluator.beginRule();\n try {\n return state.evaluator.evaluate(node);\n } finally {\n state.evaluator.endRule(previous);\n }\n };\n return {\n fieldVisible: (fieldId: string): boolean => isFieldVisible(state, fieldId),\n fieldHidden: (fieldId: string): boolean => {\n const path = state.reader.declarationPathOf(fieldId);\n return (\n state.reader\n .walked(path)\n ?.declared.some((id) => state.reader.accessFor({ fieldId: id }) === 'hidden') ?? true\n );\n },\n outcomeOf: (node: ExprNode): Outcome => {\n const withheldMark = state.reader.taintMark();\n try {\n const evaluated = evaluate(node);\n // A visible rule does not stop an expression reading a withheld value, but chrome is\n // output just like a report payload: a value delivery withholds must not decide what\n // is shown.\n if (state.reader.taintedSince(withheldMark).length > 0) return 'UNKNOWN';\n return state.evaluator.statusOf(evaluated);\n } catch (error) {\n // Chrome fails visible: an undecided or failed predicate never hides the form.\n if (!(error instanceof AxiomError)) throw error;\n return 'UNKNOWN';\n }\n },\n valueOf: (node: ExprNode): WireValue | undefined => {\n const withheldMark = state.reader.taintMark();\n try {\n const evaluated = evaluate(node);\n if (evaluated.kind === 'absent' || isUndetermined(evaluated.value)) return undefined;\n if (state.reader.taintedSince(withheldMark).length > 0) return undefined;\n return evaluated.value;\n } catch (error) {\n // A readout that cannot be evaluated renders as absent rather than as a default; the\n // channel is isolated, so there is no report to carry the engine error to.\n if (!(error instanceof AxiomError)) throw error;\n return undefined;\n }\n },\n };\n }\n}\n"]}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { CompiledRule, ScreenReason, ScreenReport } from '../../model/types.js';
|
|
2
|
+
import type { ReadMark } from '../denials.js';
|
|
3
|
+
import type { EvaluationState } from './state.js';
|
|
4
|
+
/**
|
|
5
|
+
* The screen section a device reports for a screen only the server decides. `DEFERRED` is
|
|
6
|
+
* the one outcome the device can state honestly, and it carries no reasons because the
|
|
7
|
+
* device ran nothing that could produce one.
|
|
8
|
+
*/
|
|
9
|
+
export declare function deferredScreen(rule: CompiledRule): {
|
|
10
|
+
screenId: string;
|
|
11
|
+
report: ScreenReport;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* The reasons a screen states, from the two origins `[RULES-2.1.3]` allows.
|
|
15
|
+
*
|
|
16
|
+
* An authored reason is a value the artifact stores: it is reported when the author's own
|
|
17
|
+
* condition decided true. An engine reason is derived here from the diagnostics the screen's
|
|
18
|
+
* decision recorded — a stale table, a refused read, an expression it could not complete — so
|
|
19
|
+
* it is never stored twice. The authored reasons come first, in declaration order, and a
|
|
20
|
+
* reason both origins state is stated once.
|
|
21
|
+
*/
|
|
22
|
+
export declare function screenReasons(declared: readonly ScreenReason[], derived: readonly ScreenReason[]): readonly ScreenReason[];
|
|
23
|
+
/**
|
|
24
|
+
* The reasons the engine itself produced while deciding the screen.
|
|
25
|
+
*
|
|
26
|
+
* A reason is a cause the engine recorded — projected to the raw `{ code, messageKey,
|
|
27
|
+
* params }` a report may state. A screen whose expression simply evaluated `false`, or could
|
|
28
|
+
* not read a missing value, has no cause to state: nothing went wrong, so the rule's own
|
|
29
|
+
* message is the whole explanation.
|
|
30
|
+
*/
|
|
31
|
+
export declare function derivedScreenReasons(state: EvaluationState, rule: CompiledRule, diagnosticMark: number, readMark: ReadMark): readonly ScreenReason[];
|
|
32
|
+
//# sourceMappingURL=screen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"screen.d.ts","sourceRoot":"","sources":["../../../src/eval/rule/screen.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACrF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,YAAY,GAAG;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,YAAY,CAAA;CAAE,CAE7F;AAeD;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAC3B,QAAQ,EAAE,SAAS,YAAY,EAAE,EACjC,OAAO,EAAE,SAAS,YAAY,EAAE,GAC/B,SAAS,YAAY,EAAE,CAEzB;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,eAAe,EACtB,IAAI,EAAE,YAAY,EAClB,cAAc,EAAE,MAAM,EACtB,QAAQ,EAAE,QAAQ,GACjB,SAAS,YAAY,EAAE,CAyBzB"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { canonicalizeRestricted } from '../../canonical/jcs.js';
|
|
2
|
+
import { diagnosticDoc } from '../../expr/diagnostics.js';
|
|
3
|
+
/**
|
|
4
|
+
* The screen section a device reports for a screen only the server decides. `DEFERRED` is
|
|
5
|
+
* the one outcome the device can state honestly, and it carries no reasons because the
|
|
6
|
+
* device ran nothing that could produce one.
|
|
7
|
+
*/
|
|
8
|
+
export function deferredScreen(rule) {
|
|
9
|
+
return { screenId: rule.ruleId, report: { outcome: 'DEFERRED', reasons: [] } };
|
|
10
|
+
}
|
|
11
|
+
/** Reasons without repeats, keeping the first statement of each. */
|
|
12
|
+
function dedupeReasons(reasons) {
|
|
13
|
+
const seen = new Set();
|
|
14
|
+
const kept = [];
|
|
15
|
+
for (const reason of reasons) {
|
|
16
|
+
const token = canonicalizeRestricted(reason);
|
|
17
|
+
if (seen.has(token))
|
|
18
|
+
continue;
|
|
19
|
+
seen.add(token);
|
|
20
|
+
kept.push(reason);
|
|
21
|
+
}
|
|
22
|
+
return kept;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* The reasons a screen states, from the two origins `[RULES-2.1.3]` allows.
|
|
26
|
+
*
|
|
27
|
+
* An authored reason is a value the artifact stores: it is reported when the author's own
|
|
28
|
+
* condition decided true. An engine reason is derived here from the diagnostics the screen's
|
|
29
|
+
* decision recorded — a stale table, a refused read, an expression it could not complete — so
|
|
30
|
+
* it is never stored twice. The authored reasons come first, in declaration order, and a
|
|
31
|
+
* reason both origins state is stated once.
|
|
32
|
+
*/
|
|
33
|
+
export function screenReasons(declared, derived) {
|
|
34
|
+
return dedupeReasons([...declared, ...derived]);
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* The reasons the engine itself produced while deciding the screen.
|
|
38
|
+
*
|
|
39
|
+
* A reason is a cause the engine recorded — projected to the raw `{ code, messageKey,
|
|
40
|
+
* params }` a report may state. A screen whose expression simply evaluated `false`, or could
|
|
41
|
+
* not read a missing value, has no cause to state: nothing went wrong, so the rule's own
|
|
42
|
+
* message is the whole explanation.
|
|
43
|
+
*/
|
|
44
|
+
export function derivedScreenReasons(state, rule, diagnosticMark, readMark) {
|
|
45
|
+
const reasons = [];
|
|
46
|
+
for (const diagnostic of state.diagnostics.slice(diagnosticMark)) {
|
|
47
|
+
if (state.relevanceDiagnostics.has(diagnostic))
|
|
48
|
+
continue;
|
|
49
|
+
// A cause recorded while another rule was evaluating belongs to that rule: the rule
|
|
50
|
+
// `rule_ok` pulled in, or a `visible` rule answering `is_relevant`. Its result and explain
|
|
51
|
+
// trail carry it, and it is stated once in the report's own stream. Counting it here made
|
|
52
|
+
// the reasons depend on whether that rule had already run, so the screen's section — and
|
|
53
|
+
// `reportHash` — moved with declaration order.
|
|
54
|
+
const owner = state.diagnosticOwners.get(diagnostic);
|
|
55
|
+
if (owner !== undefined && owner !== rule)
|
|
56
|
+
continue;
|
|
57
|
+
if (diagnostic.ruleId !== undefined && diagnostic.ruleId !== rule.ruleId)
|
|
58
|
+
continue;
|
|
59
|
+
reasons.push({
|
|
60
|
+
code: diagnostic.code,
|
|
61
|
+
messageKey: diagnostic.messageKey,
|
|
62
|
+
...(diagnostic.params === undefined ? {} : { params: diagnostic.params }),
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
// A refusal is reported once per field, so the screen's own read of a masked field may be a
|
|
66
|
+
// cache hit with no diagnostic behind it. The denial belongs to the read, so it is stated
|
|
67
|
+
// from what this screen's reads observed rather than from what the diagnostic stream holds.
|
|
68
|
+
if (state.reader.deniedSince(readMark, rule.ruleId).length > 0) {
|
|
69
|
+
reasons.push({ code: 'ACCESS_DENIED', messageKey: diagnosticDoc('ACCESS_DENIED').messageKey });
|
|
70
|
+
}
|
|
71
|
+
return reasons;
|
|
72
|
+
}
|
|
73
|
+
//# sourceMappingURL=screen.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"screen.js","sourceRoot":"","sources":["../../../src/eval/rule/screen.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAK1D;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAAC,IAAkB;IAC/C,OAAO,EAAE,QAAQ,EAAE,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE,CAAC;AACjF,CAAC;AAED,oEAAoE;AACpE,SAAS,aAAa,CAAC,OAAgC;IACrD,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAC;IAC/B,MAAM,IAAI,GAAmB,EAAE,CAAC;IAChC,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;QAC7B,MAAM,KAAK,GAAG,sBAAsB,CAAC,MAAM,CAAC,CAAC;QAC7C,IAAI,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC;YAAE,SAAS;QAC9B,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QAChB,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACpB,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,aAAa,CAC3B,QAAiC,EACjC,OAAgC;IAEhC,OAA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,CAAC,CAAC,UAAU,EAAE,CAAC,CAAC;IACjG,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC","sourcesContent":["import { canonicalizeRestricted } from '../../canonical/jcs.js';\nimport { diagnosticDoc } from '../../expr/diagnostics.js';\nimport type { CompiledRule, ScreenReason, ScreenReport } from '../../model/types.js';\nimport type { ReadMark } from '../denials.js';\nimport type { EvaluationState } from './state.js';\n\n/**\n * The screen section a device reports for a screen only the server decides. `DEFERRED` is\n * the one outcome the device can state honestly, and it carries no reasons because the\n * device ran nothing that could produce one.\n */\nexport function deferredScreen(rule: CompiledRule): { screenId: string; report: ScreenReport } {\n return { screenId: rule.ruleId, report: { outcome: 'DEFERRED', reasons: [] } };\n}\n\n/** Reasons without repeats, keeping the first statement of each. */\nfunction dedupeReasons(reasons: readonly ScreenReason[]): readonly ScreenReason[] {\n const seen = new Set<string>();\n const kept: ScreenReason[] = [];\n for (const reason of reasons) {\n const token = canonicalizeRestricted(reason);\n if (seen.has(token)) continue;\n seen.add(token);\n kept.push(reason);\n }\n return kept;\n}\n\n/**\n * The reasons a screen states, from the two origins `[RULES-2.1.3]` allows.\n *\n * An authored reason is a value the artifact stores: it is reported when the author's own\n * condition decided true. An engine reason is derived here from the diagnostics the screen's\n * decision recorded — a stale table, a refused read, an expression it could not complete — so\n * it is never stored twice. The authored reasons come first, in declaration order, and a\n * reason both origins state is stated once.\n */\nexport function screenReasons(\n declared: readonly ScreenReason[],\n derived: readonly ScreenReason[],\n): readonly ScreenReason[] {\n return dedupeReasons([...declared, ...derived]);\n}\n\n/**\n * The reasons the engine itself produced while deciding the screen.\n *\n * A reason is a cause the engine recorded — projected to the raw `{ code, messageKey,\n * params }` a report may state. A screen whose expression simply evaluated `false`, or could\n * not read a missing value, has no cause to state: nothing went wrong, so the rule's own\n * message is the whole explanation.\n */\nexport function derivedScreenReasons(\n state: EvaluationState,\n rule: CompiledRule,\n diagnosticMark: number,\n readMark: ReadMark,\n): readonly ScreenReason[] {\n const reasons: ScreenReason[] = [];\n for (const diagnostic of state.diagnostics.slice(diagnosticMark)) {\n if (state.relevanceDiagnostics.has(diagnostic)) continue;\n // A cause recorded while another rule was evaluating belongs to that rule: the rule\n // `rule_ok` pulled in, or a `visible` rule answering `is_relevant`. Its result and explain\n // trail carry it, and it is stated once in the report's own stream. Counting it here made\n // the reasons depend on whether that rule had already run, so the screen's section — and\n // `reportHash` — moved with declaration order.\n const owner = state.diagnosticOwners.get(diagnostic);\n if (owner !== undefined && owner !== rule) continue;\n if (diagnostic.ruleId !== undefined && diagnostic.ruleId !== rule.ruleId) continue;\n reasons.push({\n code: diagnostic.code,\n messageKey: diagnostic.messageKey,\n ...(diagnostic.params === undefined ? {} : { params: diagnostic.params }),\n });\n }\n // A refusal is reported once per field, so the screen's own read of a masked field may be a\n // cache hit with no diagnostic behind it. The denial belongs to the read, so it is stated\n // from what this screen's reads observed rather than from what the diagnostic stream holds.\n if (state.reader.deniedSince(readMark, rule.ruleId).length > 0) {\n reasons.push({ code: 'ACCESS_DENIED', messageKey: diagnosticDoc('ACCESS_DENIED').messageKey });\n }\n return reasons;\n}\n"]}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import type { ProvenanceLedger } from '../../lookup/pass.js';
|
|
2
|
+
import type { CompiledRule, Diagnostic, EvaluationReport, GateReport, ReportFacts, RuleResult, ScreenReport } from '../../model/types.js';
|
|
3
|
+
import type { EvaluationEnv, EvaluationInput } from '../../model/access.js';
|
|
4
|
+
import type { CompiledSchema } from '../../model/schema.js';
|
|
5
|
+
import type { AccessWindow } from '../access/window.js';
|
|
6
|
+
import type { ComputedOverlay } from '../computed.js';
|
|
7
|
+
import type { ExpressionEvaluator } from '../expression.js';
|
|
8
|
+
import type { RecordReader } from '../reader.js';
|
|
9
|
+
import type { PreparedSchema } from './prepare.js';
|
|
10
|
+
/** What one artifact rule contributed to a report: one result per row, or one per rule. */
|
|
11
|
+
export interface RuleEvaluation {
|
|
12
|
+
readonly results: readonly RuleResult[];
|
|
13
|
+
readonly gate?: {
|
|
14
|
+
readonly gateId: string;
|
|
15
|
+
readonly report: GateReport;
|
|
16
|
+
};
|
|
17
|
+
readonly screen?: {
|
|
18
|
+
readonly screenId: string;
|
|
19
|
+
readonly report: ScreenReport;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* One evaluation's mutable state.
|
|
24
|
+
*
|
|
25
|
+
* The state is the seam between the runner that owns an evaluation's lifetime and the
|
|
26
|
+
* families that execute one rule: provenance, diagnostics, memoised outcomes and the rule
|
|
27
|
+
* currently in force are one evaluation's, so they travel together and never outlive it.
|
|
28
|
+
*/
|
|
29
|
+
export interface EvaluationState {
|
|
30
|
+
readonly compiled: CompiledSchema;
|
|
31
|
+
readonly env: EvaluationEnv;
|
|
32
|
+
readonly prepared: PreparedSchema;
|
|
33
|
+
readonly reader: RecordReader;
|
|
34
|
+
/** The checked record and host facts this evaluation was opened with. */
|
|
35
|
+
readonly input: EvaluationInput;
|
|
36
|
+
/**
|
|
37
|
+
* Whether a `visible` rule leaves one field on screen.
|
|
38
|
+
*
|
|
39
|
+
* The admission folds use it to skip a rule whose subject the respondent cannot correct
|
|
40
|
+
* (`RULES-2.1.10`). It is the `visible`-rule half of relevance only: the access overlay is a
|
|
41
|
+
* disclosure decision, and a row-level restriction must not erase a rule about the array that
|
|
42
|
+
* holds it.
|
|
43
|
+
*/
|
|
44
|
+
readonly isVisible: (fieldId: string) => boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Whether one field is hidden *and* excluded from delivery, `MODEL-3.1.11`.
|
|
47
|
+
*
|
|
48
|
+
* A `visible` rule can hide a field whose effective `onHide` is `exclude`, which is the one
|
|
49
|
+
* visibility answer delivery may not state. The predicate is the disclosure taint's own, so a
|
|
50
|
+
* message payload and a read cannot disagree about whether a value may be quoted.
|
|
51
|
+
*/
|
|
52
|
+
readonly isWithheld: (fieldId: string) => boolean;
|
|
53
|
+
/** The one access answer this evaluation resolved, so the report and every read share it. */
|
|
54
|
+
readonly accessWindow: AccessWindow;
|
|
55
|
+
readonly evaluator: ExpressionEvaluator;
|
|
56
|
+
readonly diagnostics: Diagnostic[];
|
|
57
|
+
/**
|
|
58
|
+
* Every lookup's provenance this evaluation resolved, deduplicated and canonically
|
|
59
|
+
* ordered, with each entry attributed to the rule that made it.
|
|
60
|
+
*/
|
|
61
|
+
readonly provenance: ProvenanceLedger;
|
|
62
|
+
/** One rule's outcome for this evaluation, so `rule_ok` never evaluates it twice. */
|
|
63
|
+
readonly ruleOutcomes: Map<CompiledRule, RuleEvaluation>;
|
|
64
|
+
/** The rules currently being evaluated, so a `rule_ok` cycle fails closed. */
|
|
65
|
+
readonly rulesInProgress: Set<CompiledRule>;
|
|
66
|
+
report: EvaluationReport | undefined;
|
|
67
|
+
/** The assembled body, cached for a derivation that never asks for the digest. */
|
|
68
|
+
body: ReportFacts | undefined;
|
|
69
|
+
/** The diagnostics recorded under the rule currently evaluating, for `explain()`. */
|
|
70
|
+
currentDiagnostics: Diagnostic[] | undefined;
|
|
71
|
+
readonly ruleDiagnostics: Map<string, readonly Diagnostic[]>;
|
|
72
|
+
/** The rule a body is being evaluated for, so its provenance and diagnostics stay its own. */
|
|
73
|
+
currentRule: CompiledRule | undefined;
|
|
74
|
+
/**
|
|
75
|
+
* The row a body is being evaluated for: results and diagnostics built
|
|
76
|
+
* while it is set name that row, so no row's answer can be reported against another.
|
|
77
|
+
*/
|
|
78
|
+
currentRowKey: string | number | undefined;
|
|
79
|
+
/**
|
|
80
|
+
* The diagnostics a `visible` rule recorded while it was evaluated to answer an
|
|
81
|
+
* `is_relevant` question. They stay in the report — they are facts about
|
|
82
|
+
* the record — but they belong to that rule's evaluation, not to the rule that asked, so the
|
|
83
|
+
* sections a gate and a screen project from the diagnostics raised during their own body
|
|
84
|
+
* leave them out. Counting them would let the
|
|
85
|
+
* declaration order of two unrelated rules decide a gate's verdict.
|
|
86
|
+
*/
|
|
87
|
+
readonly relevanceDiagnostics: Set<Diagnostic>;
|
|
88
|
+
/**
|
|
89
|
+
* The rule each diagnostic was recorded under, when one was in force. A rule pulled in by
|
|
90
|
+
* `rule_ok` records its own causes (a missing table, a refused read) while the asking screen
|
|
91
|
+
* is the rule in the report's loop, so a screen reads this to keep another rule's cause out of
|
|
92
|
+
* the reasons it states. Without it the screen's reasons depended on whether that rule had
|
|
93
|
+
* already been evaluated when the screen ran.
|
|
94
|
+
*/
|
|
95
|
+
readonly diagnosticOwners: Map<Diagnostic, CompiledRule>;
|
|
96
|
+
/**
|
|
97
|
+
* The fields each gate rule's own reads were refused, so an accepted override can waive the
|
|
98
|
+
* refusal it approved and nothing else.
|
|
99
|
+
*/
|
|
100
|
+
readonly gateDenialsByRule: Map<string, readonly string[]>;
|
|
101
|
+
/** Whether the rule being evaluated answers a relevance question rather than the report. */
|
|
102
|
+
answeringRelevance: boolean;
|
|
103
|
+
/**
|
|
104
|
+
* The fields whose hidden state is being resolved, so a `visible` rule that reads the field
|
|
105
|
+
* it hides meets this guard and leaves the field visible instead of recursing.
|
|
106
|
+
*/
|
|
107
|
+
readonly visibilityInProgress: Set<string>;
|
|
108
|
+
/** The computed values this evaluation resolved, written once in dependency order. */
|
|
109
|
+
readonly computed: ComputedOverlay;
|
|
110
|
+
/** Whether the writer pre-pass has run, so it runs once per evaluation. */
|
|
111
|
+
computedPrepared: boolean;
|
|
112
|
+
/**
|
|
113
|
+
* Whether the values in this evaluation are still being produced. While they are, no
|
|
114
|
+
* `visible` rule may be evaluated: a visibility rule can read a computed field, and asking
|
|
115
|
+
* it before the writers have run would memoise its answer against a base value. A writer
|
|
116
|
+
* therefore sees every field as visible, the same fail-open answer a rule that is `UNKNOWN`
|
|
117
|
+
* gives `is_relevant`.
|
|
118
|
+
*/
|
|
119
|
+
resolvingWriters: boolean;
|
|
120
|
+
/** Whether the artifact's graph has no writer order, so every writer fails closed. */
|
|
121
|
+
computedUnorderable: boolean;
|
|
122
|
+
/**
|
|
123
|
+
* Called once for each rule this evaluation actually computes, so a session's pass trace
|
|
124
|
+
* counts evaluations rather than reporting a private counter no test can see.
|
|
125
|
+
*/
|
|
126
|
+
readonly onRuleEvaluated?: ((ruleId: string) => void) | undefined;
|
|
127
|
+
/**
|
|
128
|
+
* A second evaluation of this one's inputs, access answer and writer overlay.
|
|
129
|
+
*
|
|
130
|
+
* Its reader, considered fields, refusals, provenance and diagnostics are its own, so work that
|
|
131
|
+
* is not itself a decision about the record — an option's availability condition, a rule's
|
|
132
|
+
* alternatives — is evaluated there and discarded with it instead of entering this report
|
|
133
|
+
* (`RULES-7.1.2`).
|
|
134
|
+
*/
|
|
135
|
+
readonly isolate: () => EvaluationState;
|
|
136
|
+
}
|
|
137
|
+
//# sourceMappingURL=state.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../../src/eval/rule/state.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,KAAK,EACV,YAAY,EACZ,UAAU,EACV,gBAAgB,EAChB,UAAU,EACV,WAAW,EACX,UAAU,EACV,YAAY,EACb,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC5E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAEnD,2FAA2F;AAC3F,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,OAAO,EAAE,SAAS,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