@azx-pbc/axiom-compiler 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 +415 -2
- package/dist/article.d.ts +12 -0
- package/dist/article.d.ts.map +1 -0
- package/dist/article.js +16 -0
- package/dist/article.js.map +1 -0
- package/dist/cli/args.d.ts +101 -0
- package/dist/cli/args.d.ts.map +1 -0
- package/dist/cli/args.js +158 -0
- package/dist/cli/args.js.map +1 -0
- package/dist/cli/check.d.ts +2 -0
- package/dist/cli/check.d.ts.map +1 -0
- package/dist/cli/check.js +33 -0
- package/dist/cli/check.js.map +1 -0
- package/dist/cli/compile.d.ts +2 -0
- package/dist/cli/compile.d.ts.map +1 -0
- package/dist/cli/compile.js +43 -0
- package/dist/cli/compile.js.map +1 -0
- package/dist/cli/count.d.ts +15 -0
- package/dist/cli/count.d.ts.map +1 -0
- package/dist/cli/count.js +21 -0
- package/dist/cli/count.js.map +1 -0
- package/dist/cli/dataset.d.ts +28 -0
- package/dist/cli/dataset.d.ts.map +1 -0
- package/dist/cli/dataset.js +115 -0
- package/dist/cli/dataset.js.map +1 -0
- package/dist/cli/diff.d.ts +2 -0
- package/dist/cli/diff.d.ts.map +1 -0
- package/dist/cli/diff.js +297 -0
- package/dist/cli/diff.js.map +1 -0
- package/dist/cli/explain.d.ts +2 -0
- package/dist/cli/explain.d.ts.map +1 -0
- package/dist/cli/explain.js +95 -0
- package/dist/cli/explain.js.map +1 -0
- package/dist/cli/fields.d.ts +11 -0
- package/dist/cli/fields.d.ts.map +1 -0
- package/dist/cli/fields.js +13 -0
- package/dist/cli/fields.js.map +1 -0
- package/dist/cli/main.d.ts +2 -0
- package/dist/cli/main.d.ts.map +1 -0
- package/dist/cli/main.js +40 -0
- package/dist/cli/main.js.map +1 -0
- package/dist/cli/read.d.ts +56 -0
- package/dist/cli/read.d.ts.map +1 -0
- package/dist/cli/read.js +179 -0
- package/dist/cli/read.js.map +1 -0
- package/dist/cli/render.d.ts +58 -0
- package/dist/cli/render.d.ts.map +1 -0
- package/dist/cli/render.js +422 -0
- package/dist/cli/render.js.map +1 -0
- package/dist/cli/schema.d.ts +28 -0
- package/dist/cli/schema.d.ts.map +1 -0
- package/dist/cli/schema.js +46 -0
- package/dist/cli/schema.js.map +1 -0
- package/dist/cli/suite-report.d.ts +18 -0
- package/dist/cli/suite-report.d.ts.map +1 -0
- package/dist/cli/suite-report.js +58 -0
- package/dist/cli/suite-report.js.map +1 -0
- package/dist/cli/suites.d.ts +25 -0
- package/dist/cli/suites.d.ts.map +1 -0
- package/dist/cli/suites.js +67 -0
- package/dist/cli/suites.js.map +1 -0
- package/dist/cli/terminal.d.ts +45 -0
- package/dist/cli/terminal.d.ts.map +1 -0
- package/dist/cli/terminal.js +119 -0
- package/dist/cli/terminal.js.map +1 -0
- package/dist/cli/test.d.ts +12 -0
- package/dist/cli/test.d.ts.map +1 -0
- package/dist/cli/test.js +199 -0
- package/dist/cli/test.js.map +1 -0
- package/dist/cli/usage.d.ts +15 -0
- package/dist/cli/usage.d.ts.map +1 -0
- package/dist/cli/usage.js +95 -0
- package/dist/cli/usage.js.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +51 -0
- package/dist/cli.js.map +1 -0
- package/dist/compile/artifact-members.d.ts +57 -0
- package/dist/compile/artifact-members.d.ts.map +1 -0
- package/dist/compile/artifact-members.js +130 -0
- package/dist/compile/artifact-members.js.map +1 -0
- package/dist/compile/artifact.d.ts +20 -0
- package/dist/compile/artifact.d.ts.map +1 -0
- package/dist/compile/artifact.js +87 -0
- package/dist/compile/artifact.js.map +1 -0
- package/dist/compile/compilation.d.ts +46 -0
- package/dist/compile/compilation.d.ts.map +1 -0
- package/dist/compile/compilation.js +4 -0
- package/dist/compile/compilation.js.map +1 -0
- package/dist/compile/computed.d.ts +22 -0
- package/dist/compile/computed.d.ts.map +1 -0
- package/dist/compile/computed.js +245 -0
- package/dist/compile/computed.js.map +1 -0
- package/dist/compile/condition-warnings.d.ts +12 -0
- package/dist/compile/condition-warnings.d.ts.map +1 -0
- package/dist/compile/condition-warnings.js +26 -0
- package/dist/compile/condition-warnings.js.map +1 -0
- package/dist/compile/conditions.d.ts +18 -0
- package/dist/compile/conditions.d.ts.map +1 -0
- package/dist/compile/conditions.js +22 -0
- package/dist/compile/conditions.js.map +1 -0
- package/dist/compile/cross-checks.d.ts +67 -0
- package/dist/compile/cross-checks.d.ts.map +1 -0
- package/dist/compile/cross-checks.js +238 -0
- package/dist/compile/cross-checks.js.map +1 -0
- package/dist/compile/datasets.d.ts +52 -0
- package/dist/compile/datasets.d.ts.map +1 -0
- package/dist/compile/datasets.js +183 -0
- package/dist/compile/datasets.js.map +1 -0
- package/dist/compile/dead-weight.d.ts +26 -0
- package/dist/compile/dead-weight.d.ts.map +1 -0
- package/dist/compile/dead-weight.js +244 -0
- package/dist/compile/dead-weight.js.map +1 -0
- package/dist/compile/declaration-rules.d.ts +54 -0
- package/dist/compile/declaration-rules.d.ts.map +1 -0
- package/dist/compile/declaration-rules.js +510 -0
- package/dist/compile/declaration-rules.js.map +1 -0
- package/dist/compile/declarations.d.ts +44 -0
- package/dist/compile/declarations.d.ts.map +1 -0
- package/dist/compile/declarations.js +160 -0
- package/dist/compile/declarations.js.map +1 -0
- package/dist/compile/document.d.ts +4 -0
- package/dist/compile/document.d.ts.map +1 -0
- package/dist/compile/document.js +13 -0
- package/dist/compile/document.js.map +1 -0
- package/dist/compile/expression.d.ts +38 -0
- package/dist/compile/expression.d.ts.map +1 -0
- package/dist/compile/expression.js +288 -0
- package/dist/compile/expression.js.map +1 -0
- package/dist/compile/hashes.d.ts +26 -0
- package/dist/compile/hashes.d.ts.map +1 -0
- package/dist/compile/hashes.js +96 -0
- package/dist/compile/hashes.js.map +1 -0
- package/dist/compile/item-targets.d.ts +12 -0
- package/dist/compile/item-targets.d.ts.map +1 -0
- package/dist/compile/item-targets.js +287 -0
- package/dist/compile/item-targets.js.map +1 -0
- package/dist/compile/messages.d.ts +8 -0
- package/dist/compile/messages.d.ts.map +1 -0
- package/dist/compile/messages.js +62 -0
- package/dist/compile/messages.js.map +1 -0
- package/dist/compile/option-availability.d.ts +51 -0
- package/dist/compile/option-availability.d.ts.map +1 -0
- package/dist/compile/option-availability.js +171 -0
- package/dist/compile/option-availability.js.map +1 -0
- package/dist/compile/option-codes.d.ts +27 -0
- package/dist/compile/option-codes.d.ts.map +1 -0
- package/dist/compile/option-codes.js +212 -0
- package/dist/compile/option-codes.js.map +1 -0
- package/dist/compile/references.d.ts +14 -0
- package/dist/compile/references.d.ts.map +1 -0
- package/dist/compile/references.js +126 -0
- package/dist/compile/references.js.map +1 -0
- package/dist/compile/rows-from.d.ts +27 -0
- package/dist/compile/rows-from.d.ts.map +1 -0
- package/dist/compile/rows-from.js +164 -0
- package/dist/compile/rows-from.js.map +1 -0
- package/dist/compile/rules.d.ts +58 -0
- package/dist/compile/rules.d.ts.map +1 -0
- package/dist/compile/rules.js +327 -0
- package/dist/compile/rules.js.map +1 -0
- package/dist/compile/suggestions.d.ts +52 -0
- package/dist/compile/suggestions.d.ts.map +1 -0
- package/dist/compile/suggestions.js +633 -0
- package/dist/compile/suggestions.js.map +1 -0
- package/dist/compile/targets.d.ts +22 -0
- package/dist/compile/targets.d.ts.map +1 -0
- package/dist/compile/targets.js +125 -0
- package/dist/compile/targets.js.map +1 -0
- package/dist/compile/types.d.ts +84 -0
- package/dist/compile/types.d.ts.map +1 -0
- package/dist/compile/types.js +2 -0
- package/dist/compile/types.js.map +1 -0
- package/dist/compile/warning.d.ts +45 -0
- package/dist/compile/warning.d.ts.map +1 -0
- package/dist/compile/warning.js +2 -0
- package/dist/compile/warning.js.map +1 -0
- package/dist/compile-yaml.d.ts +23 -0
- package/dist/compile-yaml.d.ts.map +1 -0
- package/dist/compile-yaml.js +30 -0
- package/dist/compile-yaml.js.map +1 -0
- package/dist/compile.d.ts +78 -0
- package/dist/compile.d.ts.map +1 -0
- package/dist/compile.js +372 -0
- package/dist/compile.js.map +1 -0
- package/dist/csv/limits.d.ts +43 -0
- package/dist/csv/limits.d.ts.map +1 -0
- package/dist/csv/limits.js +51 -0
- package/dist/csv/limits.js.map +1 -0
- package/dist/csv/scalar.d.ts +33 -0
- package/dist/csv/scalar.d.ts.map +1 -0
- package/dist/csv/scalar.js +77 -0
- package/dist/csv/scalar.js.map +1 -0
- package/dist/datasets/csv.d.ts +46 -0
- package/dist/datasets/csv.d.ts.map +1 -0
- package/dist/datasets/csv.js +293 -0
- package/dist/datasets/csv.js.map +1 -0
- package/dist/datasets/declaration.d.ts +16 -0
- package/dist/datasets/declaration.d.ts.map +1 -0
- package/dist/datasets/declaration.js +104 -0
- package/dist/datasets/declaration.js.map +1 -0
- package/dist/datasets/diagnostics.d.ts +65 -0
- package/dist/datasets/diagnostics.d.ts.map +1 -0
- package/dist/datasets/diagnostics.js +2 -0
- package/dist/datasets/diagnostics.js.map +1 -0
- package/dist/datasets/diff.d.ts +46 -0
- package/dist/datasets/diff.d.ts.map +1 -0
- package/dist/datasets/diff.js +84 -0
- package/dist/datasets/diff.js.map +1 -0
- package/dist/datasets/document.d.ts +12 -0
- package/dist/datasets/document.d.ts.map +1 -0
- package/dist/datasets/document.js +382 -0
- package/dist/datasets/document.js.map +1 -0
- package/dist/datasets/index.d.ts +43 -0
- package/dist/datasets/index.d.ts.map +1 -0
- package/dist/datasets/index.js +68 -0
- package/dist/datasets/index.js.map +1 -0
- package/dist/datasets/repair.d.ts +26 -0
- package/dist/datasets/repair.d.ts.map +1 -0
- package/dist/datasets/repair.js +60 -0
- package/dist/datasets/repair.js.map +1 -0
- package/dist/document-path.d.ts +62 -0
- package/dist/document-path.d.ts.map +1 -0
- package/dist/document-path.js +200 -0
- package/dist/document-path.js.map +1 -0
- package/dist/expr/boundary.d.ts +8 -0
- package/dist/expr/boundary.d.ts.map +1 -0
- package/dist/expr/boundary.js +243 -0
- package/dist/expr/boundary.js.map +1 -0
- package/dist/expr/compile-expr.d.ts +35 -0
- package/dist/expr/compile-expr.d.ts.map +1 -0
- package/dist/expr/compile-expr.js +66 -0
- package/dist/expr/compile-expr.js.map +1 -0
- package/dist/expr/deprecation.d.ts +23 -0
- package/dist/expr/deprecation.d.ts.map +1 -0
- package/dist/expr/deprecation.js +28 -0
- package/dist/expr/deprecation.js.map +1 -0
- package/dist/expr/diagnostics.d.ts +31 -0
- package/dist/expr/diagnostics.d.ts.map +1 -0
- package/dist/expr/diagnostics.js +34 -0
- package/dist/expr/diagnostics.js.map +1 -0
- package/dist/expr/lexer.d.ts +49 -0
- package/dist/expr/lexer.d.ts.map +1 -0
- package/dist/expr/lexer.js +277 -0
- package/dist/expr/lexer.js.map +1 -0
- package/dist/expr/lint-warnings.d.ts +11 -0
- package/dist/expr/lint-warnings.d.ts.map +1 -0
- package/dist/expr/lint-warnings.js +20 -0
- package/dist/expr/lint-warnings.js.map +1 -0
- package/dist/expr/lint.d.ts +41 -0
- package/dist/expr/lint.d.ts.map +1 -0
- package/dist/expr/lint.js +1034 -0
- package/dist/expr/lint.js.map +1 -0
- package/dist/expr/parse/aggregates.d.ts +13 -0
- package/dist/expr/parse/aggregates.d.ts.map +1 -0
- package/dist/expr/parse/aggregates.js +48 -0
- package/dist/expr/parse/aggregates.js.map +1 -0
- package/dist/expr/parse/budget.d.ts +11 -0
- package/dist/expr/parse/budget.d.ts.map +1 -0
- package/dist/expr/parse/budget.js +57 -0
- package/dist/expr/parse/budget.js.map +1 -0
- package/dist/expr/parse/grammar.d.ts +9 -0
- package/dist/expr/parse/grammar.d.ts.map +1 -0
- package/dist/expr/parse/grammar.js +699 -0
- package/dist/expr/parse/grammar.js.map +1 -0
- package/dist/expr/parse/literals.d.ts +20 -0
- package/dist/expr/parse/literals.d.ts.map +1 -0
- package/dist/expr/parse/literals.js +132 -0
- package/dist/expr/parse/literals.js.map +1 -0
- package/dist/expr/parse/stream.d.ts +60 -0
- package/dist/expr/parse/stream.d.ts.map +1 -0
- package/dist/expr/parse/stream.js +151 -0
- package/dist/expr/parse/stream.js.map +1 -0
- package/dist/expr/parser.d.ts +45 -0
- package/dist/expr/parser.d.ts.map +1 -0
- package/dist/expr/parser.js +110 -0
- package/dist/expr/parser.js.map +1 -0
- package/dist/expr/print/spell.d.ts +78 -0
- package/dist/expr/print/spell.d.ts.map +1 -0
- package/dist/expr/print/spell.js +592 -0
- package/dist/expr/print/spell.js.map +1 -0
- package/dist/expr/print.d.ts +20 -0
- package/dist/expr/print.d.ts.map +1 -0
- package/dist/expr/print.js +102 -0
- package/dist/expr/print.js.map +1 -0
- package/dist/expr/suggest.d.ts +26 -0
- package/dist/expr/suggest.d.ts.map +1 -0
- package/dist/expr/suggest.js +77 -0
- package/dist/expr/suggest.js.map +1 -0
- package/dist/expr/typecheck/aggregates.d.ts +8 -0
- package/dist/expr/typecheck/aggregates.d.ts.map +1 -0
- package/dist/expr/typecheck/aggregates.js +334 -0
- package/dist/expr/typecheck/aggregates.js.map +1 -0
- package/dist/expr/typecheck/arithmetic.d.ts +6 -0
- package/dist/expr/typecheck/arithmetic.d.ts.map +1 -0
- package/dist/expr/typecheck/arithmetic.js +258 -0
- package/dist/expr/typecheck/arithmetic.js.map +1 -0
- package/dist/expr/typecheck/arity.d.ts +38 -0
- package/dist/expr/typecheck/arity.d.ts.map +1 -0
- package/dist/expr/typecheck/arity.js +173 -0
- package/dist/expr/typecheck/arity.js.map +1 -0
- package/dist/expr/typecheck/calls.d.ts +6 -0
- package/dist/expr/typecheck/calls.d.ts.map +1 -0
- package/dist/expr/typecheck/calls.js +137 -0
- package/dist/expr/typecheck/calls.js.map +1 -0
- package/dist/expr/typecheck/comparison.d.ts +13 -0
- package/dist/expr/typecheck/comparison.d.ts.map +1 -0
- package/dist/expr/typecheck/comparison.js +200 -0
- package/dist/expr/typecheck/comparison.js.map +1 -0
- package/dist/expr/typecheck/compound.d.ts +24 -0
- package/dist/expr/typecheck/compound.d.ts.map +1 -0
- package/dist/expr/typecheck/compound.js +175 -0
- package/dist/expr/typecheck/compound.js.map +1 -0
- package/dist/expr/typecheck/context.d.ts +44 -0
- package/dist/expr/typecheck/context.d.ts.map +1 -0
- package/dist/expr/typecheck/context.js +2 -0
- package/dist/expr/typecheck/context.js.map +1 -0
- package/dist/expr/typecheck/datasets.d.ts +17 -0
- package/dist/expr/typecheck/datasets.d.ts.map +1 -0
- package/dist/expr/typecheck/datasets.js +136 -0
- package/dist/expr/typecheck/datasets.js.map +1 -0
- package/dist/expr/typecheck/digest.d.ts +7 -0
- package/dist/expr/typecheck/digest.d.ts.map +1 -0
- package/dist/expr/typecheck/digest.js +44 -0
- package/dist/expr/typecheck/digest.js.map +1 -0
- package/dist/expr/typecheck/fold.d.ts +41 -0
- package/dist/expr/typecheck/fold.d.ts.map +1 -0
- package/dist/expr/typecheck/fold.js +71 -0
- package/dist/expr/typecheck/fold.js.map +1 -0
- package/dist/expr/typecheck/gate-folds.d.ts +22 -0
- package/dist/expr/typecheck/gate-folds.d.ts.map +1 -0
- package/dist/expr/typecheck/gate-folds.js +40 -0
- package/dist/expr/typecheck/gate-folds.js.map +1 -0
- package/dist/expr/typecheck/guards.d.ts +6 -0
- package/dist/expr/typecheck/guards.d.ts.map +1 -0
- package/dist/expr/typecheck/guards.js +38 -0
- package/dist/expr/typecheck/guards.js.map +1 -0
- package/dist/expr/typecheck/member.d.ts +17 -0
- package/dist/expr/typecheck/member.d.ts.map +1 -0
- package/dist/expr/typecheck/member.js +46 -0
- package/dist/expr/typecheck/member.js.map +1 -0
- package/dist/expr/typecheck/money.d.ts +8 -0
- package/dist/expr/typecheck/money.d.ts.map +1 -0
- package/dist/expr/typecheck/money.js +49 -0
- package/dist/expr/typecheck/money.js.map +1 -0
- package/dist/expr/typecheck/numeric.d.ts +8 -0
- package/dist/expr/typecheck/numeric.d.ts.map +1 -0
- package/dist/expr/typecheck/numeric.js +84 -0
- package/dist/expr/typecheck/numeric.js.map +1 -0
- package/dist/expr/typecheck/operands.d.ts +27 -0
- package/dist/expr/typecheck/operands.d.ts.map +1 -0
- package/dist/expr/typecheck/operands.js +106 -0
- package/dist/expr/typecheck/operands.js.map +1 -0
- package/dist/expr/typecheck/paths.d.ts +21 -0
- package/dist/expr/typecheck/paths.d.ts.map +1 -0
- package/dist/expr/typecheck/paths.js +321 -0
- package/dist/expr/typecheck/paths.js.map +1 -0
- package/dist/expr/typecheck/records.d.ts +24 -0
- package/dist/expr/typecheck/records.d.ts.map +1 -0
- package/dist/expr/typecheck/records.js +53 -0
- package/dist/expr/typecheck/records.js.map +1 -0
- package/dist/expr/typecheck/sequences.d.ts +15 -0
- package/dist/expr/typecheck/sequences.d.ts.map +1 -0
- package/dist/expr/typecheck/sequences.js +55 -0
- package/dist/expr/typecheck/sequences.js.map +1 -0
- package/dist/expr/typecheck/strings.d.ts +8 -0
- package/dist/expr/typecheck/strings.d.ts.map +1 -0
- package/dist/expr/typecheck/strings.js +188 -0
- package/dist/expr/typecheck/strings.js.map +1 -0
- package/dist/expr/typecheck/temporal.d.ts +7 -0
- package/dist/expr/typecheck/temporal.d.ts.map +1 -0
- package/dist/expr/typecheck/temporal.js +80 -0
- package/dist/expr/typecheck/temporal.js.map +1 -0
- package/dist/expr/typecheck/types.d.ts +163 -0
- package/dist/expr/typecheck/types.d.ts.map +1 -0
- package/dist/expr/typecheck/types.js +404 -0
- package/dist/expr/typecheck/types.js.map +1 -0
- package/dist/expr/typecheck.d.ts +75 -0
- package/dist/expr/typecheck.d.ts.map +1 -0
- package/dist/expr/typecheck.js +242 -0
- package/dist/expr/typecheck.js.map +1 -0
- package/dist/expr/undecided.d.ts +13 -0
- package/dist/expr/undecided.d.ts.map +1 -0
- package/dist/expr/undecided.js +58 -0
- package/dist/expr/undecided.js.map +1 -0
- package/dist/expr/values/code-points.d.ts +13 -0
- package/dist/expr/values/code-points.d.ts.map +1 -0
- package/dist/expr/values/code-points.js +25 -0
- package/dist/expr/values/code-points.js.map +1 -0
- package/dist/expr/values/inline.d.ts +77 -0
- package/dist/expr/values/inline.d.ts.map +1 -0
- package/dist/expr/values/inline.js +404 -0
- package/dist/expr/values/inline.js.map +1 -0
- package/dist/expr/values/interval.d.ts +19 -0
- package/dist/expr/values/interval.d.ts.map +1 -0
- package/dist/expr/values/interval.js +1180 -0
- package/dist/expr/values/interval.js.map +1 -0
- package/dist/index.d.ts +163 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +128 -0
- package/dist/index.js.map +1 -0
- package/dist/ingest/document.d.ts +58 -0
- package/dist/ingest/document.d.ts.map +1 -0
- package/dist/ingest/document.js +83 -0
- package/dist/ingest/document.js.map +1 -0
- package/dist/ingest/yaml-document.d.ts +15 -0
- package/dist/ingest/yaml-document.d.ts.map +1 -0
- package/dist/ingest/yaml-document.js +42 -0
- package/dist/ingest/yaml-document.js.map +1 -0
- package/dist/ingest/yaml.d.ts +51 -0
- package/dist/ingest/yaml.d.ts.map +1 -0
- package/dist/ingest/yaml.js +340 -0
- package/dist/ingest/yaml.js.map +1 -0
- package/dist/layout/compile.d.ts +6 -0
- package/dist/layout/compile.d.ts.map +1 -0
- package/dist/layout/compile.js +224 -0
- package/dist/layout/compile.js.map +1 -0
- package/dist/layout/context.d.ts +12 -0
- package/dist/layout/context.d.ts.map +1 -0
- package/dist/layout/context.js +26 -0
- package/dist/layout/context.js.map +1 -0
- package/dist/layout/grammar.d.ts +34 -0
- package/dist/layout/grammar.d.ts.map +1 -0
- package/dist/layout/grammar.js +171 -0
- package/dist/layout/grammar.js.map +1 -0
- package/dist/layout/read.d.ts +54 -0
- package/dist/layout/read.d.ts.map +1 -0
- package/dist/layout/read.js +101 -0
- package/dist/layout/read.js.map +1 -0
- package/dist/layout/shape.d.ts +34 -0
- package/dist/layout/shape.d.ts.map +1 -0
- package/dist/layout/shape.js +149 -0
- package/dist/layout/shape.js.map +1 -0
- package/dist/messages/compile.d.ts +47 -0
- package/dist/messages/compile.d.ts.map +1 -0
- package/dist/messages/compile.js +202 -0
- package/dist/messages/compile.js.map +1 -0
- package/dist/messages/locale.d.ts +18 -0
- package/dist/messages/locale.d.ts.map +1 -0
- package/dist/messages/locale.js +33 -0
- package/dist/messages/locale.js.map +1 -0
- package/dist/messages/slots.d.ts +54 -0
- package/dist/messages/slots.d.ts.map +1 -0
- package/dist/messages/slots.js +137 -0
- package/dist/messages/slots.js.map +1 -0
- package/dist/overlay/compile-overlay.d.ts +29 -0
- package/dist/overlay/compile-overlay.d.ts.map +1 -0
- package/dist/overlay/compile-overlay.js +120 -0
- package/dist/overlay/compile-overlay.js.map +1 -0
- package/dist/overlay/compose.d.ts +26 -0
- package/dist/overlay/compose.d.ts.map +1 -0
- package/dist/overlay/compose.js +674 -0
- package/dist/overlay/compose.js.map +1 -0
- package/dist/overlay/types.d.ts +41 -0
- package/dist/overlay/types.d.ts.map +1 -0
- package/dist/overlay/types.js +2 -0
- package/dist/overlay/types.js.map +1 -0
- package/dist/publish/classify.d.ts +50 -0
- package/dist/publish/classify.d.ts.map +1 -0
- package/dist/publish/classify.js +85 -0
- package/dist/publish/classify.js.map +1 -0
- package/dist/publish/environment.d.ts +15 -0
- package/dist/publish/environment.d.ts.map +1 -0
- package/dist/publish/environment.js +2 -0
- package/dist/publish/environment.js.map +1 -0
- package/dist/publish/migrations.d.ts +108 -0
- package/dist/publish/migrations.d.ts.map +1 -0
- package/dist/publish/migrations.js +166 -0
- package/dist/publish/migrations.js.map +1 -0
- package/dist/publish/observation.d.ts +29 -0
- package/dist/publish/observation.d.ts.map +1 -0
- package/dist/publish/observation.js +43 -0
- package/dist/publish/observation.js.map +1 -0
- package/dist/publish/readiness.d.ts +197 -0
- package/dist/publish/readiness.d.ts.map +1 -0
- package/dist/publish/readiness.js +239 -0
- package/dist/publish/readiness.js.map +1 -0
- package/dist/publish/vectors.d.ts +50 -0
- package/dist/publish/vectors.d.ts.map +1 -0
- package/dist/publish/vectors.js +306 -0
- package/dist/publish/vectors.js.map +1 -0
- package/dist/publish/verify.d.ts +146 -0
- package/dist/publish/verify.d.ts.map +1 -0
- package/dist/publish/verify.js +548 -0
- package/dist/publish/verify.js.map +1 -0
- package/dist/scenarios/branch.d.ts +36 -0
- package/dist/scenarios/branch.d.ts.map +1 -0
- package/dist/scenarios/branch.js +30 -0
- package/dist/scenarios/branch.js.map +1 -0
- package/dist/scenarios/capture.d.ts +89 -0
- package/dist/scenarios/capture.d.ts.map +1 -0
- package/dist/scenarios/capture.js +443 -0
- package/dist/scenarios/capture.js.map +1 -0
- package/dist/scenarios/classifier.d.ts +20 -0
- package/dist/scenarios/classifier.d.ts.map +1 -0
- package/dist/scenarios/classifier.js +88 -0
- package/dist/scenarios/classifier.js.map +1 -0
- package/dist/scenarios/credit.d.ts +33 -0
- package/dist/scenarios/credit.d.ts.map +1 -0
- package/dist/scenarios/credit.js +330 -0
- package/dist/scenarios/credit.js.map +1 -0
- package/dist/scenarios/csv.d.ts +34 -0
- package/dist/scenarios/csv.d.ts.map +1 -0
- package/dist/scenarios/csv.js +1047 -0
- package/dist/scenarios/csv.js.map +1 -0
- package/dist/scenarios/data-identity.d.ts +39 -0
- package/dist/scenarios/data-identity.d.ts.map +1 -0
- package/dist/scenarios/data-identity.js +28 -0
- package/dist/scenarios/data-identity.js.map +1 -0
- package/dist/scenarios/document.d.ts +148 -0
- package/dist/scenarios/document.d.ts.map +1 -0
- package/dist/scenarios/document.js +513 -0
- package/dist/scenarios/document.js.map +1 -0
- package/dist/scenarios/environment.d.ts +64 -0
- package/dist/scenarios/environment.d.ts.map +1 -0
- package/dist/scenarios/environment.js +106 -0
- package/dist/scenarios/environment.js.map +1 -0
- package/dist/scenarios/evidence.d.ts +128 -0
- package/dist/scenarios/evidence.d.ts.map +1 -0
- package/dist/scenarios/evidence.js +179 -0
- package/dist/scenarios/evidence.js.map +1 -0
- package/dist/scenarios/expectations.d.ts +63 -0
- package/dist/scenarios/expectations.d.ts.map +1 -0
- package/dist/scenarios/expectations.js +490 -0
- package/dist/scenarios/expectations.js.map +1 -0
- package/dist/scenarios/references.d.ts +15 -0
- package/dist/scenarios/references.d.ts.map +1 -0
- package/dist/scenarios/references.js +239 -0
- package/dist/scenarios/references.js.map +1 -0
- package/dist/scenarios/report.d.ts +216 -0
- package/dist/scenarios/report.d.ts.map +1 -0
- package/dist/scenarios/report.js +54 -0
- package/dist/scenarios/report.js.map +1 -0
- package/dist/scenarios/runner.d.ts +55 -0
- package/dist/scenarios/runner.d.ts.map +1 -0
- package/dist/scenarios/runner.js +205 -0
- package/dist/scenarios/runner.js.map +1 -0
- package/dist/scenarios/vocabulary.d.ts +19 -0
- package/dist/scenarios/vocabulary.d.ts.map +1 -0
- package/dist/scenarios/vocabulary.js +56 -0
- package/dist/scenarios/vocabulary.js.map +1 -0
- package/dist/schema/catalogue.d.ts +54 -0
- package/dist/schema/catalogue.d.ts.map +1 -0
- package/dist/schema/catalogue.js +221 -0
- package/dist/schema/catalogue.js.map +1 -0
- package/dist/schema/check.d.ts +22 -0
- package/dist/schema/check.d.ts.map +1 -0
- package/dist/schema/check.js +30 -0
- package/dist/schema/check.js.map +1 -0
- package/dist/schema/closed.d.ts +19 -0
- package/dist/schema/closed.d.ts.map +1 -0
- package/dist/schema/closed.js +33 -0
- package/dist/schema/closed.js.map +1 -0
- package/dist/schema/collapse.d.ts +27 -0
- package/dist/schema/collapse.d.ts.map +1 -0
- package/dist/schema/collapse.js +143 -0
- package/dist/schema/collapse.js.map +1 -0
- package/dist/schema/controls.d.ts +46 -0
- package/dist/schema/controls.d.ts.map +1 -0
- package/dist/schema/controls.js +75 -0
- package/dist/schema/controls.js.map +1 -0
- package/dist/schema/dataset-declaration.d.ts +11 -0
- package/dist/schema/dataset-declaration.d.ts.map +1 -0
- package/dist/schema/dataset-declaration.js +11 -0
- package/dist/schema/dataset-declaration.js.map +1 -0
- package/dist/schema/declaration-warnings.d.ts +14 -0
- package/dist/schema/declaration-warnings.d.ts.map +1 -0
- package/dist/schema/declaration-warnings.js +77 -0
- package/dist/schema/declaration-warnings.js.map +1 -0
- package/dist/schema/declarations.d.ts +41 -0
- package/dist/schema/declarations.d.ts.map +1 -0
- package/dist/schema/declarations.js +1299 -0
- package/dist/schema/declarations.js.map +1 -0
- package/dist/schema/diagnostic.d.ts +118 -0
- package/dist/schema/diagnostic.d.ts.map +1 -0
- package/dist/schema/diagnostic.js +39 -0
- package/dist/schema/diagnostic.js.map +1 -0
- package/dist/schema/document.d.ts +93 -0
- package/dist/schema/document.d.ts.map +1 -0
- package/dist/schema/document.js +507 -0
- package/dist/schema/document.js.map +1 -0
- package/dist/schema/fields.d.ts +11 -0
- package/dist/schema/fields.d.ts.map +1 -0
- package/dist/schema/fields.js +265 -0
- package/dist/schema/fields.js.map +1 -0
- package/dist/schema/gates.d.ts +4 -0
- package/dist/schema/gates.d.ts.map +1 -0
- package/dist/schema/gates.js +68 -0
- package/dist/schema/gates.js.map +1 -0
- package/dist/schema/located.d.ts +27 -0
- package/dist/schema/located.d.ts.map +1 -0
- package/dist/schema/located.js +56 -0
- package/dist/schema/located.js.map +1 -0
- package/dist/schema/measurement.d.ts +9 -0
- package/dist/schema/measurement.d.ts.map +1 -0
- package/dist/schema/measurement.js +38 -0
- package/dist/schema/measurement.js.map +1 -0
- package/dist/schema/member-wording.d.ts +35 -0
- package/dist/schema/member-wording.d.ts.map +1 -0
- package/dist/schema/member-wording.js +286 -0
- package/dist/schema/member-wording.js.map +1 -0
- package/dist/schema/metaschema.d.ts +20 -0
- package/dist/schema/metaschema.d.ts.map +1 -0
- package/dist/schema/metaschema.js +476 -0
- package/dist/schema/metaschema.js.map +1 -0
- package/dist/schema/pointer.d.ts +31 -0
- package/dist/schema/pointer.d.ts.map +1 -0
- package/dist/schema/pointer.js +73 -0
- package/dist/schema/pointer.js.map +1 -0
- package/dist/schema/primary.d.ts +29 -0
- package/dist/schema/primary.d.ts.map +1 -0
- package/dist/schema/primary.js +48 -0
- package/dist/schema/primary.js.map +1 -0
- package/dist/schema/publish-vector.d.ts +17 -0
- package/dist/schema/publish-vector.d.ts.map +1 -0
- package/dist/schema/publish-vector.js +34 -0
- package/dist/schema/publish-vector.js.map +1 -0
- package/dist/schema/repair.d.ts +34 -0
- package/dist/schema/repair.d.ts.map +1 -0
- package/dist/schema/repair.js +163 -0
- package/dist/schema/repair.js.map +1 -0
- package/dist/schema/schema-v1.generated.d.ts +14 -0
- package/dist/schema/schema-v1.generated.d.ts.map +1 -0
- package/dist/schema/schema-v1.generated.js +7089 -0
- package/dist/schema/schema-v1.generated.js.map +1 -0
- package/dist/schema/screens.d.ts +4 -0
- package/dist/schema/screens.d.ts.map +1 -0
- package/dist/schema/screens.js +28 -0
- package/dist/schema/screens.js.map +1 -0
- package/dist/schema/test-values.d.ts +12 -0
- package/dist/schema/test-values.d.ts.map +1 -0
- package/dist/schema/test-values.js +97 -0
- package/dist/schema/test-values.js.map +1 -0
- package/dist/schema/unions.d.ts +46 -0
- package/dist/schema/unions.d.ts.map +1 -0
- package/dist/schema/unions.js +131 -0
- package/dist/schema/unions.js.map +1 -0
- package/dist/schema/validate-yaml.d.ts +14 -0
- package/dist/schema/validate-yaml.d.ts.map +1 -0
- package/dist/schema/validate-yaml.js +17 -0
- package/dist/schema/validate-yaml.js.map +1 -0
- package/dist/schema/validate.d.ts +46 -0
- package/dist/schema/validate.d.ts.map +1 -0
- package/dist/schema/validate.js +186 -0
- package/dist/schema/validate.js.map +1 -0
- package/dist/testing.d.ts +21 -0
- package/dist/testing.d.ts.map +1 -0
- package/dist/testing.js +28 -0
- package/dist/testing.js.map +1 -0
- package/dist/vocabulary.d.ts +6 -0
- package/dist/vocabulary.d.ts.map +1 -0
- package/dist/vocabulary.js +26 -0
- package/dist/vocabulary.js.map +1 -0
- package/package.json +66 -3
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import type { Tier } from '@azx-pbc/axiom-runtime';
|
|
2
|
+
import type { DeclaredEnvironment } from './document.js';
|
|
3
|
+
/**
|
|
4
|
+
* The environment a scenario, a vector or a run actually judged under.
|
|
5
|
+
*
|
|
6
|
+
* A publish report states a run-level environment, but a scenario's own `given` may override any
|
|
7
|
+
* member of it. The suite report therefore commits the baseline it started from and each
|
|
8
|
+
* scenario commits the environment its evaluation used, so no report claims a tier, record date
|
|
9
|
+
* or capability set the run did not judge. The three members are exactly what an evaluation can
|
|
10
|
+
* read (`tier` decides whether a server rule defers, `recordDate` is the host's date,
|
|
11
|
+
* `capabilities` answers `has_cap`); the access version travels through the resolved overlay and
|
|
12
|
+
* the table pins through `lookups`.
|
|
13
|
+
*
|
|
14
|
+
* `tier` always has an effective value — a caller that names none gets `DEFAULT_EVIDENCE_TIER` — while
|
|
15
|
+
* `recordDate` and `capabilities` are omitted when no declaration named them. `capabilities` is
|
|
16
|
+
* a set, so it is committed sorted and duplicate-free: two callers that list the same flags in
|
|
17
|
+
* another order state the same environment.
|
|
18
|
+
*/
|
|
19
|
+
export interface CommittedEnvironment {
|
|
20
|
+
/** The tier the evaluation judged at; a server rule defers on a device. */
|
|
21
|
+
readonly tier: Tier;
|
|
22
|
+
/** The host's local record date, present exactly when the evaluation declared one. */
|
|
23
|
+
readonly recordDate?: string;
|
|
24
|
+
/** The declared capability flags, sorted and duplicate-free, present exactly when declared. */
|
|
25
|
+
readonly capabilities?: readonly string[];
|
|
26
|
+
}
|
|
27
|
+
/** The normalized environment one declaration states, with absent members omitted. */
|
|
28
|
+
export declare function normalizeEnvironment(declared: DeclaredEnvironment): CommittedEnvironment;
|
|
29
|
+
/**
|
|
30
|
+
* The digest of one committed environment.
|
|
31
|
+
*
|
|
32
|
+
* A stored run can hand its environment to a replay, and an environment edited beside a stored
|
|
33
|
+
* digest no longer matches it. Two runs that differ only in an environment member nobody read
|
|
34
|
+
* are two decisions taken in two environments, and say so.
|
|
35
|
+
*/
|
|
36
|
+
export declare function environmentHashOf(environment: CommittedEnvironment): string;
|
|
37
|
+
/** The run-level environment, or the one declaration that stops it being stated. */
|
|
38
|
+
export type RunEnvironment = {
|
|
39
|
+
readonly ok: true;
|
|
40
|
+
readonly environment: CommittedEnvironment;
|
|
41
|
+
} | {
|
|
42
|
+
readonly ok: false;
|
|
43
|
+
/** The document location to report; the caller's baseline when no suite stated it. */
|
|
44
|
+
readonly path?: string;
|
|
45
|
+
readonly detail: string;
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* The environment one run judges under: the caller's declaration, completed by the suites'.
|
|
49
|
+
*
|
|
50
|
+
* A verification runs several suites beside one artifact, and one report states one
|
|
51
|
+
* environment, so every declaration a run carries must agree about each member it names. A
|
|
52
|
+
* member declared twice with two values is a contradiction rather than a precedence question:
|
|
53
|
+
* the run cannot state which record date it judged, and preferring one suite's would bind the
|
|
54
|
+
* report to an environment the other suite's evidence was not executed under.
|
|
55
|
+
*
|
|
56
|
+
* The caller's environment is the baseline; a suite that states nothing contributes nothing, and
|
|
57
|
+
* the run tier defaults to `DEFAULT_EVIDENCE_TIER` because that is the artifact the evidence is executed
|
|
58
|
+
* against (`RULES-3.1.2`). A scenario may still override a member for its own evaluation; the
|
|
59
|
+
* suite report commits that per-scenario environment rather than letting the run claim it.
|
|
60
|
+
*/
|
|
61
|
+
export declare function resolveRunEnvironment(declared: DeclaredEnvironment | undefined, suites: readonly {
|
|
62
|
+
readonly defaults: DeclaredEnvironment;
|
|
63
|
+
}[]): RunEnvironment;
|
|
64
|
+
//# sourceMappingURL=environment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"environment.d.ts","sourceRoot":"","sources":["../../src/scenarios/environment.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAEzD;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,oBAAoB;IACnC,2EAA2E;IAC3E,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC;IACpB,sFAAsF;IACtF,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,+FAA+F;IAC/F,QAAQ,CAAC,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC3C;AAOD,sFAAsF;AACtF,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,mBAAmB,GAAG,oBAAoB,CAkBxF;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,oBAAoB,GAAG,MAAM,CAE3E;AAED,oFAAoF;AACpF,MAAM,MAAM,cAAc,GACtB;IAAE,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC;IAAC,QAAQ,CAAC,WAAW,EAAE,oBAAoB,CAAA;CAAE,GACjE;IACE,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC;IACnB,sFAAsF;IACtF,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB,CAAC;AAEN;;;;;;;;;;;;;GAaG;AACH,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,mBAAmB,GAAG,SAAS,EACzC,MAAM,EAAE,SAAS;IAAE,QAAQ,CAAC,QAAQ,EAAE,mBAAmB,CAAA;CAAE,EAAE,GAC5D,cAAc,CA0DhB"}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { canonicalHash, canonicalizeRestricted, compareCodePoints, DEFAULT_EVIDENCE_TIER, isTier, } from '@azx-pbc/axiom-runtime';
|
|
2
|
+
import { AxiomError } from '@azx-pbc/axiom-runtime';
|
|
3
|
+
/** The canonical capabilities of one declaration: the set, in code-point order. */
|
|
4
|
+
function canonicalCapabilities(values) {
|
|
5
|
+
return [...new Set(values)].sort(compareCodePoints);
|
|
6
|
+
}
|
|
7
|
+
/** The normalized environment one declaration states, with absent members omitted. */
|
|
8
|
+
export function normalizeEnvironment(declared) {
|
|
9
|
+
const { capabilities } = declared;
|
|
10
|
+
// Every door that accepts a declaration resolves it first, so a value outside the pair here is
|
|
11
|
+
// a violated invariant rather than something to rewrite: a report that quietly answered a tier
|
|
12
|
+
// the declaration did not state would name an environment the run never judged.
|
|
13
|
+
const tier = declared.tier ?? DEFAULT_EVIDENCE_TIER;
|
|
14
|
+
if (!isTier(tier)) {
|
|
15
|
+
throw new AxiomError('ENGINE_ERROR', `\`${String(tier)}\` is not a tier: a run judges at \`server\` or \`client\``, '$.tier');
|
|
16
|
+
}
|
|
17
|
+
return {
|
|
18
|
+
tier,
|
|
19
|
+
...(declared.recordDate === undefined ? {} : { recordDate: declared.recordDate }),
|
|
20
|
+
...(capabilities === undefined ? {} : { capabilities: canonicalCapabilities(capabilities) }),
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* The digest of one committed environment.
|
|
25
|
+
*
|
|
26
|
+
* A stored run can hand its environment to a replay, and an environment edited beside a stored
|
|
27
|
+
* digest no longer matches it. Two runs that differ only in an environment member nobody read
|
|
28
|
+
* are two decisions taken in two environments, and say so.
|
|
29
|
+
*/
|
|
30
|
+
export function environmentHashOf(environment) {
|
|
31
|
+
return canonicalHash(environment);
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* The environment one run judges under: the caller's declaration, completed by the suites'.
|
|
35
|
+
*
|
|
36
|
+
* A verification runs several suites beside one artifact, and one report states one
|
|
37
|
+
* environment, so every declaration a run carries must agree about each member it names. A
|
|
38
|
+
* member declared twice with two values is a contradiction rather than a precedence question:
|
|
39
|
+
* the run cannot state which record date it judged, and preferring one suite's would bind the
|
|
40
|
+
* report to an environment the other suite's evidence was not executed under.
|
|
41
|
+
*
|
|
42
|
+
* The caller's environment is the baseline; a suite that states nothing contributes nothing, and
|
|
43
|
+
* the run tier defaults to `DEFAULT_EVIDENCE_TIER` because that is the artifact the evidence is executed
|
|
44
|
+
* against (`RULES-3.1.2`). A scenario may still override a member for its own evaluation; the
|
|
45
|
+
* suite report commits that per-scenario environment rather than letting the run claim it.
|
|
46
|
+
*/
|
|
47
|
+
export function resolveRunEnvironment(declared, suites) {
|
|
48
|
+
const declarations = [
|
|
49
|
+
...(declared === undefined ? [] : [{ entry: declared, path: '$.environment' }]),
|
|
50
|
+
...suites.flatMap((suite, index) => suite.defaults === undefined
|
|
51
|
+
? []
|
|
52
|
+
: [{ entry: suite.defaults, path: `$.suites[${String(index)}].defaults` }]),
|
|
53
|
+
];
|
|
54
|
+
// A tier is a closed pair even when a JavaScript caller bypassed the type. Refusing it
|
|
55
|
+
// before it can be committed keeps a report from naming a tier no evaluation knows.
|
|
56
|
+
for (const { entry, path } of declarations) {
|
|
57
|
+
if (entry.tier !== undefined && !isTier(entry.tier)) {
|
|
58
|
+
return {
|
|
59
|
+
ok: false,
|
|
60
|
+
path: `${path}.tier`,
|
|
61
|
+
detail: `\`${String(entry.tier)}\` is not a tier: a run judges at \`server\` or \`client\``,
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
const tiers = distinct(declarations.flatMap(({ entry }) => (entry.tier === undefined ? [] : [entry.tier])));
|
|
66
|
+
if (tiers.length > 1)
|
|
67
|
+
return contradiction('tier', tiers);
|
|
68
|
+
const dates = distinct(declarations.flatMap(({ entry }) => (entry.recordDate === undefined ? [] : [entry.recordDate])));
|
|
69
|
+
if (dates.length > 1)
|
|
70
|
+
return contradiction('record date', dates);
|
|
71
|
+
const capabilitySets = distinct(declarations.flatMap(({ entry }) => entry.capabilities === undefined
|
|
72
|
+
? []
|
|
73
|
+
: [canonicalizeRestricted(canonicalCapabilities(entry.capabilities))]));
|
|
74
|
+
if (capabilitySets.length > 1) {
|
|
75
|
+
return {
|
|
76
|
+
ok: false,
|
|
77
|
+
detail: `the run and its suites declare different capability sets (${capabilitySets.join(', ')}), so one report cannot state the environment it judged`,
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
const [tier] = tiers;
|
|
81
|
+
const [date] = dates;
|
|
82
|
+
const capabilities = declarations.find(({ entry }) => entry.capabilities !== undefined)?.entry
|
|
83
|
+
.capabilities;
|
|
84
|
+
return {
|
|
85
|
+
ok: true,
|
|
86
|
+
environment: normalizeEnvironment({
|
|
87
|
+
...(tier === undefined ? {} : { tier }),
|
|
88
|
+
...(date === undefined ? {} : { recordDate: date }),
|
|
89
|
+
...(capabilities === undefined ? {} : { capabilities }),
|
|
90
|
+
}),
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
/** The distinct texts of a member's declarations, in code-point order. */
|
|
94
|
+
function distinct(values) {
|
|
95
|
+
return [...new Set(values)].sort(compareCodePoints);
|
|
96
|
+
}
|
|
97
|
+
/** The refusal one member's contradictory declarations state. */
|
|
98
|
+
function contradiction(member, values) {
|
|
99
|
+
return {
|
|
100
|
+
ok: false,
|
|
101
|
+
detail: `the run and its suites declare different ${member}s (${values
|
|
102
|
+
.map((value) => `\`${value}\``)
|
|
103
|
+
.join(', ')}), so one report cannot state the environment it judged`,
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
//# sourceMappingURL=environment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"environment.js","sourceRoot":"","sources":["../../src/scenarios/environment.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,sBAAsB,EACtB,iBAAiB,EACjB,qBAAqB,EACrB,MAAM,GACP,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AA6BpD,mFAAmF;AACnF,SAAS,qBAAqB,CAAC,MAAyB;IACtD,OAAO,CAAC,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;AACtD,CAAC;AAED,sFAAsF;AACtF,MAAM,UAAU,oBAAoB,CAAC,QAA6B;IAChE,MAAM,EAAE,YAAY,EAAE,GAAG,QAAQ,CAAC;IAClC,+FAA+F;IAC/F,+FAA+F;IAC/F,gFAAgF;IAChF,MAAM,IAAI,GAAG,QAAQ,CAAC,IAAI,IAAI,qBAAqB,CAAC;IACpD,IAAI,CAAC,M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vE,CAAC;AACJ,CAAC","sourcesContent":["import {\n canonicalHash,\n canonicalizeRestricted,\n compareCodePoints,\n DEFAULT_EVIDENCE_TIER,\n isTier,\n} from '@azx-pbc/axiom-runtime';\nimport { AxiomError } from '@azx-pbc/axiom-runtime';\nimport type { Tier } from '@azx-pbc/axiom-runtime';\nimport type { DeclaredEnvironment } from './document.js';\n\n/**\n * The environment a scenario, a vector or a run actually judged under.\n *\n * A publish report states a run-level environment, but a scenario's own `given` may override any\n * member of it. The suite report therefore commits the baseline it started from and each\n * scenario commits the environment its evaluation used, so no report claims a tier, record date\n * or capability set the run did not judge. The three members are exactly what an evaluation can\n * read (`tier` decides whether a server rule defers, `recordDate` is the host's date,\n * `capabilities` answers `has_cap`); the access version travels through the resolved overlay and\n * the table pins through `lookups`.\n *\n * `tier` always has an effective value — a caller that names none gets `DEFAULT_EVIDENCE_TIER` — while\n * `recordDate` and `capabilities` are omitted when no declaration named them. `capabilities` is\n * a set, so it is committed sorted and duplicate-free: two callers that list the same flags in\n * another order state the same environment.\n */\nexport interface CommittedEnvironment {\n /** The tier the evaluation judged at; a server rule defers on a device. */\n readonly tier: Tier;\n /** The host's local record date, present exactly when the evaluation declared one. */\n readonly recordDate?: string;\n /** The declared capability flags, sorted and duplicate-free, present exactly when declared. */\n readonly capabilities?: readonly string[];\n}\n\n/** The canonical capabilities of one declaration: the set, in code-point order. */\nfunction canonicalCapabilities(values: readonly string[]): readonly string[] {\n return [...new Set(values)].sort(compareCodePoints);\n}\n\n/** The normalized environment one declaration states, with absent members omitted. */\nexport function normalizeEnvironment(declared: DeclaredEnvironment): CommittedEnvironment {\n const { capabilities } = declared;\n // Every door that accepts a declaration resolves it first, so a value outside the pair here is\n // a violated invariant rather than something to rewrite: a report that quietly answered a tier\n // the declaration did not state would name an environment the run never judged.\n const tier = declared.tier ?? DEFAULT_EVIDENCE_TIER;\n if (!isTier(tier)) {\n throw new AxiomError(\n 'ENGINE_ERROR',\n `\\`${String(tier)}\\` is not a tier: a run judges at \\`server\\` or \\`client\\``,\n '$.tier',\n );\n }\n return {\n tier,\n ...(declared.recordDate === undefined ? {} : { recordDate: declared.recordDate }),\n ...(capabilities === undefined ? {} : { capabilities: canonicalCapabilities(capabilities) }),\n };\n}\n\n/**\n * The digest of one committed environment.\n *\n * A stored run can hand its environment to a replay, and an environment edited beside a stored\n * digest no longer matches it. Two runs that differ only in an environment member nobody read\n * are two decisions taken in two environments, and say so.\n */\nexport function environmentHashOf(environment: CommittedEnvironment): string {\n return canonicalHash(environment);\n}\n\n/** The run-level environment, or the one declaration that stops it being stated. */\nexport type RunEnvironment =\n | { readonly ok: true; readonly environment: CommittedEnvironment }\n | {\n readonly ok: false;\n /** The document location to report; the caller's baseline when no suite stated it. */\n readonly path?: string;\n readonly detail: string;\n };\n\n/**\n * The environment one run judges under: the caller's declaration, completed by the suites'.\n *\n * A verification runs several suites beside one artifact, and one report states one\n * environment, so every declaration a run carries must agree about each member it names. A\n * member declared twice with two values is a contradiction rather than a precedence question:\n * the run cannot state which record date it judged, and preferring one suite's would bind the\n * report to an environment the other suite's evidence was not executed under.\n *\n * The caller's environment is the baseline; a suite that states nothing contributes nothing, and\n * the run tier defaults to `DEFAULT_EVIDENCE_TIER` because that is the artifact the evidence is executed\n * against (`RULES-3.1.2`). A scenario may still override a member for its own evaluation; the\n * suite report commits that per-scenario environment rather than letting the run claim it.\n */\nexport function resolveRunEnvironment(\n declared: DeclaredEnvironment | undefined,\n suites: readonly { readonly defaults: DeclaredEnvironment }[],\n): RunEnvironment {\n const declarations: readonly {\n readonly entry: DeclaredEnvironment;\n readonly path: string;\n }[] = [\n ...(declared === undefined ? [] : [{ entry: declared, path: '$.environment' }]),\n ...suites.flatMap((suite, index) =>\n suite.defaults === undefined\n ? []\n : [{ entry: suite.defaults, path: `$.suites[${String(index)}].defaults` }],\n ),\n ];\n // A tier is a closed pair even when a JavaScript caller bypassed the type. Refusing it\n // before it can be committed keeps a report from naming a tier no evaluation knows.\n for (const { entry, path } of declarations) {\n if (entry.tier !== undefined && !isTier(entry.tier)) {\n return {\n ok: false,\n path: `${path}.tier`,\n detail: `\\`${String(entry.tier)}\\` is not a tier: a run judges at \\`server\\` or \\`client\\``,\n };\n }\n }\n const tiers = distinct(\n declarations.flatMap(({ entry }) => (entry.tier === undefined ? [] : [entry.tier])),\n );\n if (tiers.length > 1) return contradiction('tier', tiers);\n const dates = distinct(\n declarations.flatMap(({ entry }) => (entry.recordDate === undefined ? [] : [entry.recordDate])),\n );\n if (dates.length > 1) return contradiction('record date', dates);\n const capabilitySets = distinct(\n declarations.flatMap(({ entry }) =>\n entry.capabilities === undefined\n ? []\n : [canonicalizeRestricted(canonicalCapabilities(entry.capabilities))],\n ),\n );\n if (capabilitySets.length > 1) {\n return {\n ok: false,\n detail: `the run and its suites declare different capability sets (${capabilitySets.join(\n ', ',\n )}), so one report cannot state the environment it judged`,\n };\n }\n const [tier] = tiers;\n const [date] = dates;\n const capabilities = declarations.find(({ entry }) => entry.capabilities !== undefined)?.entry\n .capabilities;\n return {\n ok: true,\n environment: normalizeEnvironment({\n ...(tier === undefined ? {} : { tier }),\n ...(date === undefined ? {} : { recordDate: date }),\n ...(capabilities === undefined ? {} : { capabilities }),\n }),\n };\n}\n\n/** The distinct texts of a member's declarations, in code-point order. */\nfunction distinct<T extends string>(values: readonly T[]): readonly T[] {\n return [...new Set(values)].sort(compareCodePoints);\n}\n\n/** The refusal one member's contradictory declarations state. */\nfunction contradiction(member: string, values: readonly string[]): RunEnvironment {\n return {\n ok: false,\n detail: `the run and its suites declare different ${member}s (${values\n .map((value) => `\\`${value}\\``)\n .join(', ')}), so one report cannot state the environment it judged`,\n };\n}\n"]}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import type { CompiledRule, CompiledSchema, Diagnostic, EvaluationInput, FormFieldState, FormGateState, FormScreenState, FormSnapshot, FormState, GateItemResult, RuleResult } from '@azx-pbc/axiom-runtime';
|
|
2
|
+
/**
|
|
3
|
+
* What one scenario's assertions are judged against, and how it is read once.
|
|
4
|
+
*
|
|
5
|
+
* One evaluation produces the report, the access answer, the writer overlay and the derived form
|
|
6
|
+
* state; this module turns those into the indexes every judgement reads, so a scenario of thirty
|
|
7
|
+
* assertions walks the rules and results once rather than thirty times.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* What one scenario's submission projects to.
|
|
11
|
+
*
|
|
12
|
+
* A refusal is an answer, not a failure: a record whose signature would travel without a value it
|
|
13
|
+
* covers has no submission, and a suite asserts that with `exportRefused`. Any other error is a
|
|
14
|
+
* programmer error and reaches the caller.
|
|
15
|
+
*/
|
|
16
|
+
export type SubmissionProjection = {
|
|
17
|
+
readonly kind: 'values';
|
|
18
|
+
readonly values: Readonly<Record<string, unknown>>;
|
|
19
|
+
} | {
|
|
20
|
+
readonly kind: 'refused';
|
|
21
|
+
readonly code: string;
|
|
22
|
+
};
|
|
23
|
+
/** Everything one scenario's assertions are judged against. */
|
|
24
|
+
export interface ScenarioEvidence {
|
|
25
|
+
readonly compiled: CompiledSchema;
|
|
26
|
+
readonly input: EvaluationInput;
|
|
27
|
+
readonly snapshot: FormSnapshot;
|
|
28
|
+
readonly state: FormState;
|
|
29
|
+
}
|
|
30
|
+
/** The projection of one evaluation's submission, from the snapshot the evaluation already holds. */
|
|
31
|
+
export declare function projectScenarioSubmission(evidence: ScenarioEvidence): SubmissionProjection;
|
|
32
|
+
/** Everything one judgement reads, indexed from one evaluation. */
|
|
33
|
+
export interface ScenarioFacts {
|
|
34
|
+
readonly compiled: CompiledSchema;
|
|
35
|
+
readonly results: ReadonlyMap<string, readonly RuleResult[]>;
|
|
36
|
+
readonly fields: ReadonlyMap<string, FormFieldState>;
|
|
37
|
+
readonly gates: ReadonlyMap<string, FormGateState>;
|
|
38
|
+
readonly screens: ReadonlyMap<string, FormScreenState>;
|
|
39
|
+
readonly computed: FormSnapshot['computed'];
|
|
40
|
+
readonly state: FormState;
|
|
41
|
+
readonly projection: SubmissionProjection;
|
|
42
|
+
readonly diagnostics: readonly Diagnostic[];
|
|
43
|
+
}
|
|
44
|
+
/** The indexes one evaluation's assertions read. */
|
|
45
|
+
export declare function factsOf(evidence: ScenarioEvidence, projection: SubmissionProjection): ScenarioFacts;
|
|
46
|
+
/** One rule's results, which an item-scoped rule states once per row. */
|
|
47
|
+
export declare function resultsOf(facts: ScenarioFacts, ruleId: string): readonly RuleResult[];
|
|
48
|
+
/** The artifact's declaration of one rule, when it declares it. */
|
|
49
|
+
export declare function ruleOf(facts: ScenarioFacts, ruleId: string): CompiledRule | undefined;
|
|
50
|
+
/** One gate item's result, when the report states it. */
|
|
51
|
+
export declare function itemOf(facts: ScenarioFacts, gateId: string, itemId: string): GateItemResult | undefined;
|
|
52
|
+
/** The index every result is read through, keyed by the rule that produced it. */
|
|
53
|
+
export declare function indexResults(results: readonly RuleResult[]): ReadonlyMap<string, readonly RuleResult[]>;
|
|
54
|
+
/** Whether a rule raised `ENGINE_ERROR`, which leaves its reported outcome unproven. */
|
|
55
|
+
export declare function hasEngineError(facts: ScenarioFacts, ruleId: string): boolean;
|
|
56
|
+
/**
|
|
57
|
+
* The one field-scope writer of a target, or `undefined` when no rule or several rules write it.
|
|
58
|
+
*
|
|
59
|
+
* A compiled artifact refuses two writers of one target, so "several" is a hand-built artifact's
|
|
60
|
+
* shape rather than an author's.
|
|
61
|
+
*/
|
|
62
|
+
export declare function writerOf(facts: ScenarioFacts, fieldId: string): CompiledRule | undefined;
|
|
63
|
+
/** Every field-scope writer of one target, in declaration order. */
|
|
64
|
+
export declare function writersOf(facts: ScenarioFacts, fieldId: string): readonly CompiledRule[];
|
|
65
|
+
/**
|
|
66
|
+
* Every field-scope writer of one target, read from the artifact alone.
|
|
67
|
+
*
|
|
68
|
+
* The same answer a caller with facts asks, for a consumer that holds only the artifact — a
|
|
69
|
+
* publish report counting an attempt against the rule a `computed` target names, for example —
|
|
70
|
+
* so "who writes this field" has one derivation rather than two.
|
|
71
|
+
*/
|
|
72
|
+
export declare function writerRulesOf(compiled: CompiledSchema, fieldId: string): readonly CompiledRule[];
|
|
73
|
+
/** The row one result states, as a suffix a failure message names. */
|
|
74
|
+
export declare function atRow(result: RuleResult | undefined): string;
|
|
75
|
+
/**
|
|
76
|
+
* Where a submission projection carries one field, or why no export assertion can address it.
|
|
77
|
+
*
|
|
78
|
+
* A record member travels inside its container's object, so the projection carries it at the
|
|
79
|
+
* path its declaration nests it at. A field inside a list is carried once per row, and an
|
|
80
|
+
* export assertion states no row key, so no path addresses one.
|
|
81
|
+
*/
|
|
82
|
+
export type ProjectionPath = {
|
|
83
|
+
readonly kind: 'path';
|
|
84
|
+
readonly path: readonly string[];
|
|
85
|
+
} | {
|
|
86
|
+
readonly kind: 'under_list';
|
|
87
|
+
} | {
|
|
88
|
+
readonly kind: 'undeclared';
|
|
89
|
+
};
|
|
90
|
+
/** The path one declared field's value takes in a submission projection. */
|
|
91
|
+
export declare function projectionPathOf(compiled: CompiledSchema, fieldId: string): ProjectionPath;
|
|
92
|
+
/**
|
|
93
|
+
* Whether the submission carries one declared field, or `undefined` when the projection cannot
|
|
94
|
+
* say.
|
|
95
|
+
*
|
|
96
|
+
* The projection is the one authority for what a record exports — access, `onHide` and signature
|
|
97
|
+
* coverage already decided it — so a consumer that must not reach a withheld value asks this
|
|
98
|
+
* rather than re-deriving the policy. `true` means the field is present in the submission,
|
|
99
|
+
* `false` means it is not, and `undefined` means the field has no addressable path: the
|
|
100
|
+
* projection itself refused (a signature that would travel without a value it binds), the field
|
|
101
|
+
* sits inside a list and is carried per row, or the artifact does not declare it.
|
|
102
|
+
*/
|
|
103
|
+
export declare function submissionCarries(compiled: CompiledSchema, projection: SubmissionProjection, fieldId: string): boolean | undefined;
|
|
104
|
+
/** The value one writer states, as the submission can be asked whether it carries it. */
|
|
105
|
+
export type ValueSubject = {
|
|
106
|
+
readonly kind: 'field';
|
|
107
|
+
readonly fieldId: string;
|
|
108
|
+
} | {
|
|
109
|
+
readonly kind: 'row';
|
|
110
|
+
readonly arrayFieldId: string;
|
|
111
|
+
readonly memberId: string;
|
|
112
|
+
};
|
|
113
|
+
/**
|
|
114
|
+
* The value one rule produces, when its kind states one.
|
|
115
|
+
*
|
|
116
|
+
* An item-scoped writer states one value per row, under the member it names on each row; every
|
|
117
|
+
* other writer states its declared field.
|
|
118
|
+
*/
|
|
119
|
+
export declare function valueSubjectOf(rule: CompiledRule | undefined): ValueSubject | undefined;
|
|
120
|
+
/**
|
|
121
|
+
* Whether the submission carries one produced value, or `undefined` when it cannot say.
|
|
122
|
+
*
|
|
123
|
+
* A row-scoped writer's value is carried only when *every* projected row holds its member: a
|
|
124
|
+
* projection that withholds it on any row is one where the observed row may be a row the record
|
|
125
|
+
* does not export, and a diagnostic that printed the value could print a withheld one.
|
|
126
|
+
*/
|
|
127
|
+
export declare function submissionCarriesValue(compiled: CompiledSchema, projection: SubmissionProjection, subject: ValueSubject): boolean | undefined;
|
|
128
|
+
//# sourceMappingURL=evidence.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"evidence.d.ts","sourceRoot":"","sources":["../../src/scenarios/evidence.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAEV,YAAY,EACZ,cAAc,EACd,UAAU,EACV,eAAe,EACf,cAAc,EACd,aAAa,EACb,eAAe,EACf,YAAY,EACZ,SAAS,EACT,cAAc,EACd,UAAU,EAEX,MAAM,wBAAwB,CAAC;AAEhC;;;;;;GAMG;AAEH;;;;;;GAMG;AACH,MAAM,MAAM,oBAAoB,GAC5B;IAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAA;CAAE,GAC/E;IAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAExD,+DAA+D;AAC/D,MAAM,WAAW,gBAAgB;IAC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UAAU,EAAE,oBAAoB,EAChC,OAAO,EAAE,MAAM,GACd,OAAO,GAAG,SAAS,CAUrB;AAED,yFAAyF;AACzF,MAAM,MAAM,YAAY,GACpB;IAAE,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GACpD;IAAE,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC;AAEvF;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,YAAY,GAAG,SAAS,GAAG,YAAY,GAAG,SAAS,CAQvF;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,cAAc,EACxB,UAAU,EAAE,oBAAoB,EAChC,OAAO,EAAE,YAAY,GACpB,OAAO,GAAG,SAAS,CAYrB"}
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import { AxiomError, isRecord, projectSubmission } from '@azx-pbc/axiom-runtime';
|
|
2
|
+
/** The projection of one evaluation's submission, from the snapshot the evaluation already holds. */
|
|
3
|
+
export function projectScenarioSubmission(evidence) {
|
|
4
|
+
const snapshot = {
|
|
5
|
+
report: evidence.snapshot.report,
|
|
6
|
+
access: evidence.snapshot.access.snapshotAccess(),
|
|
7
|
+
};
|
|
8
|
+
try {
|
|
9
|
+
return {
|
|
10
|
+
kind: 'values',
|
|
11
|
+
values: projectSubmission(evidence.compiled, evidence.input, snapshot),
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
catch (cause) {
|
|
15
|
+
if (!(cause instanceof AxiomError) || cause.code !== 'SIGNATURE_COVER_EXCLUDED')
|
|
16
|
+
throw cause;
|
|
17
|
+
return { kind: 'refused', code: cause.code };
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
/** The indexes one evaluation's assertions read. */
|
|
21
|
+
export function factsOf(evidence, projection) {
|
|
22
|
+
return {
|
|
23
|
+
compiled: evidence.compiled,
|
|
24
|
+
results: indexResults(evidence.snapshot.report.rules),
|
|
25
|
+
fields: new Map(evidence.state.fields.map((field) => [field.fieldId, field])),
|
|
26
|
+
gates: new Map(evidence.state.gates.map((gate) => [gate.gateId, gate])),
|
|
27
|
+
screens: new Map(evidence.state.screens.map((screen) => [screen.screenId, screen])),
|
|
28
|
+
computed: evidence.snapshot.computed,
|
|
29
|
+
state: evidence.state,
|
|
30
|
+
projection,
|
|
31
|
+
diagnostics: evidence.snapshot.report.diagnostics,
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
/** One rule's results, which an item-scoped rule states once per row. */
|
|
35
|
+
export function resultsOf(facts, ruleId) {
|
|
36
|
+
return facts.results.get(ruleId) ?? [];
|
|
37
|
+
}
|
|
38
|
+
/** The artifact's declaration of one rule, when it declares it. */
|
|
39
|
+
export function ruleOf(facts, ruleId) {
|
|
40
|
+
return (facts.compiled.rules ?? []).find((rule) => rule.ruleId === ruleId);
|
|
41
|
+
}
|
|
42
|
+
/** One gate item's result, when the report states it. */
|
|
43
|
+
export function itemOf(facts, gateId, itemId) {
|
|
44
|
+
return facts.gates.get(gateId)?.items.find((item) => item.itemId === itemId);
|
|
45
|
+
}
|
|
46
|
+
/** The index every result is read through, keyed by the rule that produced it. */
|
|
47
|
+
export function indexResults(results) {
|
|
48
|
+
const index = new Map();
|
|
49
|
+
for (const result of results) {
|
|
50
|
+
const list = index.get(result.ruleId);
|
|
51
|
+
if (list === undefined)
|
|
52
|
+
index.set(result.ruleId, [result]);
|
|
53
|
+
else
|
|
54
|
+
list.push(result);
|
|
55
|
+
}
|
|
56
|
+
return index;
|
|
57
|
+
}
|
|
58
|
+
/** Whether a rule raised `ENGINE_ERROR`, which leaves its reported outcome unproven. */
|
|
59
|
+
export function hasEngineError(facts, ruleId) {
|
|
60
|
+
return facts.diagnostics.some((diagnostic) => diagnostic.code === 'ENGINE_ERROR' && diagnostic.ruleId === ruleId);
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* The one field-scope writer of a target, or `undefined` when no rule or several rules write it.
|
|
64
|
+
*
|
|
65
|
+
* A compiled artifact refuses two writers of one target, so "several" is a hand-built artifact's
|
|
66
|
+
* shape rather than an author's.
|
|
67
|
+
*/
|
|
68
|
+
export function writerOf(facts, fieldId) {
|
|
69
|
+
const writers = writersOf(facts, fieldId);
|
|
70
|
+
return writers.length === 1 ? writers[0] : undefined;
|
|
71
|
+
}
|
|
72
|
+
/** Every field-scope writer of one target, in declaration order. */
|
|
73
|
+
export function writersOf(facts, fieldId) {
|
|
74
|
+
return writerRulesOf(facts.compiled, fieldId);
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Every field-scope writer of one target, read from the artifact alone.
|
|
78
|
+
*
|
|
79
|
+
* The same answer a caller with facts asks, for a consumer that holds only the artifact — a
|
|
80
|
+
* publish report counting an attempt against the rule a `computed` target names, for example —
|
|
81
|
+
* so "who writes this field" has one derivation rather than two.
|
|
82
|
+
*/
|
|
83
|
+
export function writerRulesOf(compiled, fieldId) {
|
|
84
|
+
return (compiled.rules ?? []).filter((rule) => rule.scope !== 'item' &&
|
|
85
|
+
rule.fieldId === fieldId &&
|
|
86
|
+
(rule.kind === 'compute' || rule.kind === 'defaultCompute'));
|
|
87
|
+
}
|
|
88
|
+
/** The row one result states, as a suffix a failure message names. */
|
|
89
|
+
export function atRow(result) {
|
|
90
|
+
return result?.rowKey === undefined ? '' : ` at row ${String(result.rowKey)}`;
|
|
91
|
+
}
|
|
92
|
+
/** The path one declared field's value takes in a submission projection. */
|
|
93
|
+
export function projectionPathOf(compiled, fieldId) {
|
|
94
|
+
const visit = (members, prefix, underList) => {
|
|
95
|
+
for (const member of members) {
|
|
96
|
+
const path = [...prefix, member.fieldId];
|
|
97
|
+
if (member.fieldId === fieldId) {
|
|
98
|
+
return underList ? { kind: 'under_list' } : { kind: 'path', path };
|
|
99
|
+
}
|
|
100
|
+
if (member.fields === undefined)
|
|
101
|
+
continue;
|
|
102
|
+
const found = visit(member.fields, path, underList || member.primitive === 'array');
|
|
103
|
+
if (found !== undefined)
|
|
104
|
+
return found;
|
|
105
|
+
}
|
|
106
|
+
return undefined;
|
|
107
|
+
};
|
|
108
|
+
return visit(compiled.fields, [], false) ?? { kind: 'undeclared' };
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Whether the submission carries one declared field, or `undefined` when the projection cannot
|
|
112
|
+
* say.
|
|
113
|
+
*
|
|
114
|
+
* The projection is the one authority for what a record exports — access, `onHide` and signature
|
|
115
|
+
* coverage already decided it — so a consumer that must not reach a withheld value asks this
|
|
116
|
+
* rather than re-deriving the policy. `true` means the field is present in the submission,
|
|
117
|
+
* `false` means it is not, and `undefined` means the field has no addressable path: the
|
|
118
|
+
* projection itself refused (a signature that would travel without a value it binds), the field
|
|
119
|
+
* sits inside a list and is carried per row, or the artifact does not declare it.
|
|
120
|
+
*/
|
|
121
|
+
export function submissionCarries(compiled, projection, fieldId) {
|
|
122
|
+
if (projection.kind !== 'values')
|
|
123
|
+
return undefined;
|
|
124
|
+
const located = projectionPathOf(compiled, fieldId);
|
|
125
|
+
if (located.kind !== 'path')
|
|
126
|
+
return undefined;
|
|
127
|
+
let node = projection.values;
|
|
128
|
+
for (const step of located.path) {
|
|
129
|
+
if (!isRecord(node) || !Object.hasOwn(node, step))
|
|
130
|
+
return false;
|
|
131
|
+
node = node[step];
|
|
132
|
+
}
|
|
133
|
+
return true;
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* The value one rule produces, when its kind states one.
|
|
137
|
+
*
|
|
138
|
+
* An item-scoped writer states one value per row, under the member it names on each row; every
|
|
139
|
+
* other writer states its declared field.
|
|
140
|
+
*/
|
|
141
|
+
export function valueSubjectOf(rule) {
|
|
142
|
+
if (rule === undefined)
|
|
143
|
+
return undefined;
|
|
144
|
+
if (rule.kind !== 'compute' && rule.kind !== 'defaultCompute')
|
|
145
|
+
return undefined;
|
|
146
|
+
if (rule.fieldId === undefined)
|
|
147
|
+
return undefined;
|
|
148
|
+
if (rule.scope !== 'item')
|
|
149
|
+
return { kind: 'field', fieldId: rule.fieldId };
|
|
150
|
+
return rule.targetFieldId === undefined
|
|
151
|
+
? undefined
|
|
152
|
+
: { kind: 'row', arrayFieldId: rule.fieldId, memberId: rule.targetFieldId };
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Whether the submission carries one produced value, or `undefined` when it cannot say.
|
|
156
|
+
*
|
|
157
|
+
* A row-scoped writer's value is carried only when *every* projected row holds its member: a
|
|
158
|
+
* projection that withholds it on any row is one where the observed row may be a row the record
|
|
159
|
+
* does not export, and a diagnostic that printed the value could print a withheld one.
|
|
160
|
+
*/
|
|
161
|
+
export function submissionCarriesValue(compiled, projection, subject) {
|
|
162
|
+
if (subject.kind === 'field')
|
|
163
|
+
return submissionCarries(compiled, projection, subject.fieldId);
|
|
164
|
+
if (projection.kind !== 'values')
|
|
165
|
+
return undefined;
|
|
166
|
+
const located = projectionPathOf(compiled, subject.arrayFieldId);
|
|
167
|
+
if (located.kind !== 'path')
|
|
168
|
+
return undefined;
|
|
169
|
+
let node = projection.values;
|
|
170
|
+
for (const step of located.path) {
|
|
171
|
+
if (!isRecord(node) || !Object.hasOwn(node, step))
|
|
172
|
+
return false;
|
|
173
|
+
node = node[step];
|
|
174
|
+
}
|
|
175
|
+
if (!Array.isArray(node))
|
|
176
|
+
return undefined;
|
|
177
|
+
return node.every((row) => isRecord(row) && Object.hasOwn(row, subject.memberId));
|
|
178
|
+
}
|
|
179
|
+
//# sourceMappingURL=evidence.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"evidence.js","sourceRoot":"","sources":["../../src/scenarios/evidence.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AA4CjF,qGAAqG;AAC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,CAAC;IACnD,MAAM,OAAO,GAAG,gBAAgB,CAAC,QAAQ,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC;IACjE,IAAI,OAAO,CAAC,IAAI,KAAK,MAAM;QAAE,OAAO,SAAS,CAAC;IAC9C,IAAI,IAAI,GAAY,UAAU,CAAC,MAAM,CAAC;IACtC,KAAK,MAAM,IAAI,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;QAChC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC;YAAE,OAAO,KAAK,CAAC;QAChE,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC;IACpB,CAAC;IACD,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC;QAAE,OAAO,SAAS,CAAC;IAC3C,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;AACpF,CAAC","sourcesContent":["import { AxiomError, isRecord, projectSubmission } from '@azx-pbc/axiom-runtime';\nimport type {\n CompiledField,\n CompiledRule,\n CompiledSchema,\n Diagnostic,\n EvaluationInput,\n FormFieldState,\n FormGateState,\n FormScreenState,\n FormSnapshot,\n FormState,\n GateItemResult,\n RuleResult,\n SubmissionSnapshot,\n} from '@azx-pbc/axiom-runtime';\n\n/**\n * What one scenario's assertions are judged against, and how it is read once.\n *\n * One evaluation produces the report, the access answer, the writer overlay and the derived form\n * state; this module turns those into the indexes every judgement reads, so a scenario of thirty\n * assertions walks the rules and results once rather than thirty times.\n */\n\n/**\n * What one scenario's submission projects to.\n *\n * A refusal is an answer, not a failure: a record whose signature would travel without a value it\n * covers has no submission, and a suite asserts that with `exportRefused`. Any other error is a\n * programmer error and reaches the caller.\n */\nexport type SubmissionProjection =\n | { readonly kind: 'values'; readonly values: Readonly<Record<string, unknown>> }\n | { readonly kind: 'refused'; readonly code: string };\n\n/** Everything one scenario's assertions are judged against. */\nexport interface ScenarioEvidence {\n readonly compiled: CompiledSchema;\n readonly input: EvaluationInput;\n readonly snapshot: FormSnapshot;\n readonly state: FormState;\n}\n\n/** The projection of one evaluation's submission, from the snapshot the evaluation already holds. */\nexport function projectScenarioSubmission(evidence: ScenarioEvidence): SubmissionProjection {\n const snapshot: SubmissionSnapshot = {\n report: evidence.snapshot.report,\n access: evidence.snapshot.access.snapshotAccess(),\n };\n try {\n return {\n kind: 'values',\n values: projectSubmission(evidence.compiled, evidence.input, snapshot),\n };\n } catch (cause) {\n if (!(cause instanceof AxiomError) || cause.code !== 'SIGNATURE_COVER_EXCLUDED') throw cause;\n return { kind: 'refused', code: cause.code };\n }\n}\n\n/** Everything one judgement reads, indexed from one evaluation. */\nexport interface ScenarioFacts {\n readonly compiled: CompiledSchema;\n readonly results: ReadonlyMap<string, readonly RuleResult[]>;\n readonly fields: ReadonlyMap<string, FormFieldState>;\n readonly gates: ReadonlyMap<string, FormGateState>;\n readonly screens: ReadonlyMap<string, FormScreenState>;\n readonly computed: FormSnapshot['computed'];\n readonly state: FormState;\n readonly projection: SubmissionProjection;\n readonly diagnostics: readonly Diagnostic[];\n}\n\n/** The indexes one evaluation's assertions read. */\nexport function factsOf(\n evidence: ScenarioEvidence,\n projection: SubmissionProjection,\n): ScenarioFacts {\n return {\n compiled: evidence.compiled,\n results: indexResults(evidence.snapshot.report.rules),\n fields: new Map(evidence.state.fields.map((field) => [field.fieldId, field] as const)),\n gates: new Map(evidence.state.gates.map((gate) => [gate.gateId, gate] as const)),\n screens: new Map(evidence.state.screens.map((screen) => [screen.screenId, screen] as const)),\n computed: evidence.snapshot.computed,\n state: evidence.state,\n projection,\n diagnostics: evidence.snapshot.report.diagnostics,\n };\n}\n\n/** One rule's results, which an item-scoped rule states once per row. */\nexport function resultsOf(facts: ScenarioFacts, ruleId: string): readonly RuleResult[] {\n return facts.results.get(ruleId) ?? [];\n}\n\n/** The artifact's declaration of one rule, when it declares it. */\nexport function ruleOf(facts: ScenarioFacts, ruleId: string): CompiledRule | undefined {\n return (facts.compiled.rules ?? []).find((rule) => rule.ruleId === ruleId);\n}\n\n/** One gate item's result, when the report states it. */\nexport function itemOf(\n facts: ScenarioFacts,\n gateId: string,\n itemId: string,\n): GateItemResult | undefined {\n return facts.gates.get(gateId)?.items.find((item) => item.itemId === itemId);\n}\n\n/** The index every result is read through, keyed by the rule that produced it. */\nexport function indexResults(\n results: readonly RuleResult[],\n): ReadonlyMap<string, readonly RuleResult[]> {\n const index = new Map<string, RuleResult[]>();\n for (const result of results) {\n const list = index.get(result.ruleId);\n if (list === undefined) index.set(result.ruleId, [result]);\n else list.push(result);\n }\n return index;\n}\n\n/** Whether a rule raised `ENGINE_ERROR`, which leaves its reported outcome unproven. */\nexport function hasEngineError(facts: ScenarioFacts, ruleId: string): boolean {\n return facts.diagnostics.some(\n (diagnostic) => diagnostic.code === 'ENGINE_ERROR' && diagnostic.ruleId === ruleId,\n );\n}\n\n/**\n * The one field-scope writer of a target, or `undefined` when no rule or several rules write it.\n *\n * A compiled artifact refuses two writers of one target, so \"several\" is a hand-built artifact's\n * shape rather than an author's.\n */\nexport function writerOf(facts: ScenarioFacts, fieldId: string): CompiledRule | undefined {\n const writers = writersOf(facts, fieldId);\n return writers.length === 1 ? writers[0] : undefined;\n}\n\n/** Every field-scope writer of one target, in declaration order. */\nexport function writersOf(facts: ScenarioFacts, fieldId: string): readonly CompiledRule[] {\n return writerRulesOf(facts.compiled, fieldId);\n}\n\n/**\n * Every field-scope writer of one target, read from the artifact alone.\n *\n * The same answer a caller with facts asks, for a consumer that holds only the artifact — a\n * publish report counting an attempt against the rule a `computed` target names, for example —\n * so \"who writes this field\" has one derivation rather than two.\n */\nexport function writerRulesOf(compiled: CompiledSchema, fieldId: string): readonly CompiledRule[] {\n return (compiled.rules ?? []).filter(\n (rule) =>\n rule.scope !== 'item' &&\n rule.fieldId === fieldId &&\n (rule.kind === 'compute' || rule.kind === 'defaultCompute'),\n );\n}\n\n/** The row one result states, as a suffix a failure message names. */\nexport function atRow(result: RuleResult | undefined): string {\n return result?.rowKey === undefined ? '' : ` at row ${String(result.rowKey)}`;\n}\n\n/**\n * Where a submission projection carries one field, or why no export assertion can address it.\n *\n * A record member travels inside its container's object, so the projection carries it at the\n * path its declaration nests it at. A field inside a list is carried once per row, and an\n * export assertion states no row key, so no path addresses one.\n */\nexport type ProjectionPath =\n | { readonly kind: 'path'; readonly path: readonly string[] }\n | { readonly kind: 'under_list' }\n | { readonly kind: 'undeclared' };\n\n/** The path one declared field's value takes in a submission projection. */\nexport function projectionPathOf(compiled: CompiledSchema, fieldId: string): ProjectionPath {\n const visit = (\n members: readonly CompiledField[],\n prefix: readonly string[],\n underList: boolean,\n ): ProjectionPath | undefined => {\n for (const member of members) {\n const path = [...prefix, member.fieldId];\n if (member.fieldId === fieldId) {\n return underList ? { kind: 'under_list' } : { kind: 'path', path };\n }\n if (member.fields === undefined) continue;\n const found = visit(member.fields, path, underList || member.primitive === 'array');\n if (found !== undefined) return found;\n }\n return undefined;\n };\n return visit(compiled.fields, [], false) ?? { kind: 'undeclared' };\n}\n\n/**\n * Whether the submission carries one declared field, or `undefined` when the projection cannot\n * say.\n *\n * The projection is the one authority for what a record exports — access, `onHide` and signature\n * coverage already decided it — so a consumer that must not reach a withheld value asks this\n * rather than re-deriving the policy. `true` means the field is present in the submission,\n * `false` means it is not, and `undefined` means the field has no addressable path: the\n * projection itself refused (a signature that would travel without a value it binds), the field\n * sits inside a list and is carried per row, or the artifact does not declare it.\n */\nexport function submissionCarries(\n compiled: CompiledSchema,\n projection: SubmissionProjection,\n fieldId: string,\n): boolean | undefined {\n if (projection.kind !== 'values') return undefined;\n const located = projectionPathOf(compiled, fieldId);\n if (located.kind !== 'path') return undefined;\n let node: unknown = projection.values;\n for (const step of located.path) {\n if (!isRecord(node) || !Object.hasOwn(node, step)) return false;\n node = node[step];\n }\n return true;\n}\n\n/** The value one writer states, as the submission can be asked whether it carries it. */\nexport type ValueSubject =\n | { readonly kind: 'field'; readonly fieldId: string }\n | { readonly kind: 'row'; readonly arrayFieldId: string; readonly memberId: string };\n\n/**\n * The value one rule produces, when its kind states one.\n *\n * An item-scoped writer states one value per row, under the member it names on each row; every\n * other writer states its declared field.\n */\nexport function valueSubjectOf(rule: CompiledRule | undefined): ValueSubject | undefined {\n if (rule === undefined) return undefined;\n if (rule.kind !== 'compute' && rule.kind !== 'defaultCompute') return undefined;\n if (rule.fieldId === undefined) return undefined;\n if (rule.scope !== 'item') return { kind: 'field', fieldId: rule.fieldId };\n return rule.targetFieldId === undefined\n ? undefined\n : { kind: 'row', arrayFieldId: rule.fieldId, memberId: rule.targetFieldId };\n}\n\n/**\n * Whether the submission carries one produced value, or `undefined` when it cannot say.\n *\n * A row-scoped writer's value is carried only when *every* projected row holds its member: a\n * projection that withholds it on any row is one where the observed row may be a row the record\n * does not export, and a diagnostic that printed the value could print a withheld one.\n */\nexport function submissionCarriesValue(\n compiled: CompiledSchema,\n projection: SubmissionProjection,\n subject: ValueSubject,\n): boolean | undefined {\n if (subject.kind === 'field') return submissionCarries(compiled, projection, subject.fieldId);\n if (projection.kind !== 'values') return undefined;\n const located = projectionPathOf(compiled, subject.arrayFieldId);\n if (located.kind !== 'path') return undefined;\n let node: unknown = projection.values;\n for (const step of located.path) {\n if (!isRecord(node) || !Object.hasOwn(node, step)) return false;\n node = node[step];\n }\n if (!Array.isArray(node)) return undefined;\n return node.every((row) => isRecord(row) && Object.hasOwn(row, subject.memberId));\n}\n"]}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type { Observation, RuleKind, RuleResult, ScreenOutcome } from '@azx-pbc/axiom-runtime';
|
|
2
|
+
import type { ScenarioAssertion } from './document.js';
|
|
3
|
+
import type { ScenarioFacts } from './evidence.js';
|
|
4
|
+
import type { AssertionTarget } from './report.js';
|
|
5
|
+
/**
|
|
6
|
+
* Whether one assertion holds, and what the run stated instead when it did not.
|
|
7
|
+
*
|
|
8
|
+
* Judgement is one walk over the facts, one variant per assertion kind, so a failure names the
|
|
9
|
+
* fact that did not hold rather than a generic mismatch. Credit is a separate question —
|
|
10
|
+
* `credit.ts` — because a passing assertion can be true without proving anything about a rule.
|
|
11
|
+
*/
|
|
12
|
+
/** Whether one assertion held. A failed one states what was observed instead. */
|
|
13
|
+
type Verdict = {
|
|
14
|
+
readonly passed: true;
|
|
15
|
+
} | {
|
|
16
|
+
readonly passed: false;
|
|
17
|
+
readonly detail: string;
|
|
18
|
+
};
|
|
19
|
+
/** What one assertion names and whether it held. */
|
|
20
|
+
export interface Judgement {
|
|
21
|
+
readonly target: AssertionTarget;
|
|
22
|
+
readonly verdict: Verdict;
|
|
23
|
+
}
|
|
24
|
+
/** Judges one assertion against one evaluation's facts. */
|
|
25
|
+
export declare function judgeAssertion(facts: ScenarioFacts, assertion: ScenarioAssertion): Judgement;
|
|
26
|
+
/**
|
|
27
|
+
* What one rule's observation is compared against, reduced to the facts a comparison reads.
|
|
28
|
+
*
|
|
29
|
+
* A vector and a scenario assertion ask the same question of the same evaluation, so both hand
|
|
30
|
+
* this one shape to `compareObservation` rather than each deciding how a screen section, a row
|
|
31
|
+
* fold or a value is read.
|
|
32
|
+
*/
|
|
33
|
+
export interface ObservedRule {
|
|
34
|
+
/** The rule the artifact declares; `undefined` only for a hand-assembled artifact. */
|
|
35
|
+
readonly kind: RuleKind | undefined;
|
|
36
|
+
/** The rule's results, which an item-scoped rule states once per row. */
|
|
37
|
+
readonly results: readonly RuleResult[];
|
|
38
|
+
/**
|
|
39
|
+
* The screen outcome the derived state reports, or `undefined` when the report carries no
|
|
40
|
+
* section. A declared screen's state defaults an absent section to `UNKNOWN`; that default is
|
|
41
|
+
* applied here so the two paths that compare an expectation cannot answer it differently.
|
|
42
|
+
*/
|
|
43
|
+
readonly screen: ScreenOutcome | undefined;
|
|
44
|
+
/**
|
|
45
|
+
* Whether the submission withholds this rule's produced value, so a failure must not print it.
|
|
46
|
+
*
|
|
47
|
+
* A writer's result is not the record's to export when access, a redaction or an `onHide`
|
|
48
|
+
* policy keeps it out, and the diagnostic a failed verdict carries is stored in a report beside
|
|
49
|
+
* the digest of that evidence (`publish/verify.ts`). The value is compared either way; only its
|
|
50
|
+
* spelling is withheld.
|
|
51
|
+
*/
|
|
52
|
+
readonly withheld?: boolean;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* What the run states instead of the expected observation, or `undefined` when it agrees.
|
|
56
|
+
*
|
|
57
|
+
* One comparator for an embedded vector and a scenario assertion: the row that decided a fold is
|
|
58
|
+
* the one a failure names, a writer's value is compared over every row it produced, and a screen
|
|
59
|
+
* with no reported section reads as the `UNKNOWN` the derived state reports.
|
|
60
|
+
*/
|
|
61
|
+
export declare function compareObservation(ruleId: string, rule: ObservedRule, observation: Observation): string | undefined;
|
|
62
|
+
export {};
|
|
63
|
+
//# sourceMappingURL=expectations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"expectations.d.ts","sourceRoot":"","sources":["../../src/scenarios/expectations.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAEV,WAAW,EACX,QAAQ,EACR,UAAU,EACV,aAAa,EACd,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAavD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD;;;;;;GAMG;AAEH,iFAAiF;AACjF,KAAK,OAAO,GAAG;IAAE,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAA;CAAE,GAAG;IAAE,QAAQ,CAAC,MAAM,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAE/F,oDAAoD;AACpD,MAAM,WAAW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