universal-physics-tensor 8.0.0 → 10.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +26 -21
- package/data/atlas/atlas.json +75 -64
- package/data/atlas/atlas.jsonld +1 -1
- package/data/atlas/diffusion.json +23 -22
- package/data/atlas/oscillators.json +21 -16
- package/data/atlas/waves.json +33 -28
- package/data/bridge-catalog.json +1356 -1791
- package/data/bridge-catalog.schema.json +789 -46
- package/data/quantities.json +280 -234
- package/data/quantities.schema.json +52 -0
- package/data/schemas/atlas-record.v0.json +184 -46
- package/data/units.json +1178 -0
- package/data/units.schema.json +124 -0
- package/dist/atlas/applicability.d.ts.map +1 -1
- package/dist/atlas/applicability.js +14 -3
- package/dist/atlas/applicability.js.map +1 -1
- package/dist/atlas/association.d.ts +1 -1
- package/dist/atlas/association.js.map +1 -1
- package/dist/atlas/benchmark/backend-shapes.d.ts.map +1 -1
- package/dist/atlas/benchmark/backend-shapes.js +5 -1
- package/dist/atlas/benchmark/backend-shapes.js.map +1 -1
- package/dist/atlas/benchmark/baselines.d.ts.map +1 -1
- package/dist/atlas/benchmark/baselines.js +8 -0
- package/dist/atlas/benchmark/baselines.js.map +1 -1
- package/dist/atlas/benchmark/hybrid-retrieval.d.ts +3 -2
- package/dist/atlas/benchmark/hybrid-retrieval.d.ts.map +1 -1
- package/dist/atlas/benchmark/hybrid-retrieval.js +16 -12
- package/dist/atlas/benchmark/hybrid-retrieval.js.map +1 -1
- package/dist/atlas/benchmark/leakage.js.map +1 -1
- package/dist/atlas/benchmark/loader.js.map +1 -1
- package/dist/atlas/benchmark/run-atlas.d.ts.map +1 -1
- package/dist/atlas/benchmark/run-atlas.js +14 -2
- package/dist/atlas/benchmark/run-atlas.js.map +1 -1
- package/dist/atlas/benchmark/stats.d.ts +1 -1
- package/dist/atlas/benchmark/stats.d.ts.map +1 -1
- package/dist/atlas/benchmark/stats.js +1 -1
- package/dist/atlas/benchmark/stats.js.map +1 -1
- package/dist/atlas/benchmark/study.js.map +1 -1
- package/dist/atlas/benchmark/types.js.map +1 -1
- package/dist/atlas/bridge-record.d.ts +4 -4
- package/dist/atlas/bridge-record.d.ts.map +1 -1
- package/dist/atlas/bridge-record.js +6 -6
- package/dist/atlas/bridge-record.js.map +1 -1
- package/dist/atlas/catalog-formal-ref.js.map +1 -1
- package/dist/atlas/chain-pipeline.d.ts +0 -11
- package/dist/atlas/chain-pipeline.d.ts.map +1 -1
- package/dist/atlas/chain-pipeline.js +5 -16
- package/dist/atlas/chain-pipeline.js.map +1 -1
- package/dist/atlas/composition-table.js.map +1 -1
- package/dist/atlas/conventions.js.map +1 -1
- package/dist/atlas/coverage.d.ts +2 -2
- package/dist/atlas/coverage.js.map +1 -1
- package/dist/atlas/derivation.js.map +1 -1
- package/dist/atlas/derive-evidence.d.ts +6 -4
- package/dist/atlas/derive-evidence.d.ts.map +1 -1
- package/dist/atlas/derive-evidence.js +7 -2
- package/dist/atlas/derive-evidence.js.map +1 -1
- package/dist/atlas/diffusion/bridges-closure.d.ts.map +1 -1
- package/dist/atlas/diffusion/bridges-closure.js +0 -5
- package/dist/atlas/diffusion/bridges-closure.js.map +1 -1
- package/dist/atlas/diffusion/bridges.d.ts.map +1 -1
- package/dist/atlas/diffusion/bridges.js +0 -3
- package/dist/atlas/diffusion/bridges.js.map +1 -1
- package/dist/atlas/diffusion/dimensions.js.map +1 -1
- package/dist/atlas/diffusion/index.d.ts +1 -1
- package/dist/atlas/diffusion/index.d.ts.map +1 -1
- package/dist/atlas/diffusion/index.js.map +1 -1
- package/dist/atlas/diffusion/models.js.map +1 -1
- package/dist/atlas/diffusion/numerics.js.map +1 -1
- package/dist/atlas/error-algebra.d.ts +6 -0
- package/dist/atlas/error-algebra.d.ts.map +1 -1
- package/dist/atlas/error-algebra.js +26 -0
- package/dist/atlas/error-algebra.js.map +1 -1
- package/dist/atlas/export.d.ts +18 -2
- package/dist/atlas/export.d.ts.map +1 -1
- package/dist/atlas/export.js +9 -3
- package/dist/atlas/export.js.map +1 -1
- package/dist/atlas/families.d.ts +19 -2
- package/dist/atlas/families.d.ts.map +1 -1
- package/dist/atlas/families.js +26 -3
- package/dist/atlas/families.js.map +1 -1
- package/dist/atlas/family.d.ts +27 -0
- package/dist/atlas/family.d.ts.map +1 -0
- package/dist/atlas/family.js +12 -0
- package/dist/atlas/family.js.map +1 -0
- package/dist/atlas/index.d.ts +3 -2
- package/dist/atlas/index.d.ts.map +1 -1
- package/dist/atlas/index.js +2 -1
- package/dist/atlas/index.js.map +1 -1
- package/dist/atlas/link-prediction.d.ts +1 -1
- package/dist/atlas/link-prediction.d.ts.map +1 -1
- package/dist/atlas/link-prediction.js.map +1 -1
- package/dist/atlas/model.js.map +1 -1
- package/dist/atlas/oscillators/bridges-coarse.d.ts.map +1 -1
- package/dist/atlas/oscillators/bridges-coarse.js +0 -1
- package/dist/atlas/oscillators/bridges-coarse.js.map +1 -1
- package/dist/atlas/oscillators/bridges-exact.d.ts.map +1 -1
- package/dist/atlas/oscillators/bridges-exact.js +0 -3
- package/dist/atlas/oscillators/bridges-exact.js.map +1 -1
- package/dist/atlas/oscillators/bridges-limits.d.ts.map +1 -1
- package/dist/atlas/oscillators/bridges-limits.js +0 -2
- package/dist/atlas/oscillators/bridges-limits.js.map +1 -1
- package/dist/atlas/oscillators/dimensions.js.map +1 -1
- package/dist/atlas/oscillators/index.d.ts +1 -16
- package/dist/atlas/oscillators/index.d.ts.map +1 -1
- package/dist/atlas/oscillators/index.js.map +1 -1
- package/dist/atlas/oscillators/limit-witnesses.js.map +1 -1
- package/dist/atlas/oscillators/models.js.map +1 -1
- package/dist/atlas/oscillators/norm-transport-witness.js.map +1 -1
- package/dist/atlas/oscillators/norm-transport.js.map +1 -1
- package/dist/atlas/oscillators/norms.js.map +1 -1
- package/dist/atlas/oscillators/pendulum-motion.js.map +1 -1
- package/dist/atlas/oscillators/phase-carriage.js.map +1 -1
- package/dist/atlas/oscillators/phase-translation.js.map +1 -1
- package/dist/atlas/oscillators/position-translation.js.map +1 -1
- package/dist/atlas/oscillators/rejections.js.map +1 -1
- package/dist/atlas/path-bound.js.map +1 -1
- package/dist/atlas/physjs-entries.generated.d.ts +1601 -220
- package/dist/atlas/physjs-entries.generated.d.ts.map +1 -1
- package/dist/atlas/physjs-entries.generated.js +1854 -345
- package/dist/atlas/physjs-entries.generated.js.map +1 -1
- package/dist/atlas/physjs-ref.d.ts +151 -117
- package/dist/atlas/physjs-ref.d.ts.map +1 -1
- package/dist/atlas/physjs-ref.js +244 -211
- package/dist/atlas/physjs-ref.js.map +1 -1
- package/dist/atlas/physjs-reviewed.d.ts +31 -0
- package/dist/atlas/physjs-reviewed.d.ts.map +1 -0
- package/dist/atlas/physjs-reviewed.js +194 -0
- package/dist/atlas/physjs-reviewed.js.map +1 -0
- package/dist/atlas/poster/associations.js.map +1 -1
- package/dist/atlas/poster/derivations.js.map +1 -1
- package/dist/atlas/poster/statements.js.map +1 -1
- package/dist/atlas/proof-target.d.ts +16 -8
- package/dist/atlas/proof-target.d.ts.map +1 -1
- package/dist/atlas/proof-target.js +34 -31
- package/dist/atlas/proof-target.js.map +1 -1
- package/dist/atlas/public.d.ts +2 -1
- package/dist/atlas/public.d.ts.map +1 -1
- package/dist/atlas/public.js +2 -1
- package/dist/atlas/public.js.map +1 -1
- package/dist/atlas/regime.js.map +1 -1
- package/dist/atlas/serialize.d.ts +18 -12
- package/dist/atlas/serialize.d.ts.map +1 -1
- package/dist/atlas/serialize.js +28 -18
- package/dist/atlas/serialize.js.map +1 -1
- package/dist/atlas/statement.js.map +1 -1
- package/dist/atlas/translation-registry.js.map +1 -1
- package/dist/atlas/translation.js.map +1 -1
- package/dist/atlas/types.d.ts +9 -2
- package/dist/atlas/types.d.ts.map +1 -1
- package/dist/atlas/types.js +1 -1
- package/dist/atlas/types.js.map +1 -1
- package/dist/atlas/waves/bridges-closure.d.ts.map +1 -1
- package/dist/atlas/waves/bridges-closure.js +0 -3
- package/dist/atlas/waves/bridges-closure.js.map +1 -1
- package/dist/atlas/waves/bridges.d.ts.map +1 -1
- package/dist/atlas/waves/bridges.js +0 -4
- package/dist/atlas/waves/bridges.js.map +1 -1
- package/dist/atlas/waves/index.d.ts +1 -1
- package/dist/atlas/waves/index.d.ts.map +1 -1
- package/dist/atlas/waves/index.js.map +1 -1
- package/dist/atlas/waves/models.js.map +1 -1
- package/dist/atlas/waves/numerics.js.map +1 -1
- package/dist/atlas/witness-artifact.js.map +1 -1
- package/dist/atlas/witness-dominance.d.ts +4 -3
- package/dist/atlas/witness-dominance.d.ts.map +1 -1
- package/dist/atlas/witness-dominance.js +15 -5
- package/dist/atlas/witness-dominance.js.map +1 -1
- package/dist/atlas/witness-numeric.d.ts +8 -4
- package/dist/atlas/witness-numeric.d.ts.map +1 -1
- package/dist/atlas/witness-numeric.js +27 -2
- package/dist/atlas/witness-numeric.js.map +1 -1
- package/dist/atlas/witness-result.d.ts +7 -1
- package/dist/atlas/witness-result.d.ts.map +1 -1
- package/dist/atlas/witness-result.js.map +1 -1
- package/dist/atlas/witness-specs.js.map +1 -1
- package/dist/atlas/witness-symbolic.js.map +1 -1
- package/dist/atlas/witnesses/quantum-support.js.map +1 -1
- package/dist/bridges/caller-table.d.ts +1 -1
- package/dist/bridges/caller-table.d.ts.map +1 -1
- package/dist/bridges/caller-table.js.map +1 -1
- package/dist/bridges/carrier-sign.d.ts.map +1 -1
- package/dist/bridges/carrier-sign.js +8 -3
- package/dist/bridges/carrier-sign.js.map +1 -1
- package/dist/bridges/catalog-adapter.d.ts +12 -3
- package/dist/bridges/catalog-adapter.d.ts.map +1 -1
- package/dist/bridges/catalog-adapter.js +22 -14
- package/dist/bridges/catalog-adapter.js.map +1 -1
- package/dist/bridges/catalog-load.d.ts +19 -2
- package/dist/bridges/catalog-load.d.ts.map +1 -1
- package/dist/bridges/catalog-load.js +233 -14
- package/dist/bridges/catalog-load.js.map +1 -1
- package/dist/bridges/catalog-types.d.ts +96 -27
- package/dist/bridges/catalog-types.d.ts.map +1 -1
- package/dist/bridges/catalog-types.js.map +1 -1
- package/dist/bridges/coefficient-statement.js +1 -5
- package/dist/bridges/coefficient-statement.js.map +1 -1
- package/dist/bridges/confrontation-coverage.js.map +1 -1
- package/dist/bridges/confrontations.d.ts +1 -1
- package/dist/bridges/confrontations.d.ts.map +1 -1
- package/dist/bridges/confrontations.js +1 -1
- package/dist/bridges/confrontations.js.map +1 -1
- package/dist/bridges/evaluation-errors.d.ts +89 -0
- package/dist/bridges/evaluation-errors.d.ts.map +1 -0
- package/dist/bridges/evaluation-errors.js +136 -0
- package/dist/bridges/evaluation-errors.js.map +1 -0
- package/dist/bridges/evaluator-inputs.d.ts +5 -3
- package/dist/bridges/evaluator-inputs.d.ts.map +1 -1
- package/dist/bridges/evaluator-inputs.js +24 -24
- package/dist/bridges/evaluator-inputs.js.map +1 -1
- package/dist/bridges/evaluators.d.ts +48 -8
- package/dist/bridges/evaluators.d.ts.map +1 -1
- package/dist/bridges/evaluators.js +173 -38
- package/dist/bridges/evaluators.js.map +1 -1
- package/dist/bridges/expr-parse.d.ts +38 -7
- package/dist/bridges/expr-parse.d.ts.map +1 -1
- package/dist/bridges/expr-parse.js +129 -156
- package/dist/bridges/expr-parse.js.map +1 -1
- package/dist/bridges/holds.d.ts +16 -8
- package/dist/bridges/holds.d.ts.map +1 -1
- package/dist/bridges/holds.js +130 -236
- package/dist/bridges/holds.js.map +1 -1
- package/dist/bridges/index.d.ts +15 -14
- package/dist/bridges/index.d.ts.map +1 -1
- package/dist/bridges/index.js +14 -15
- package/dist/bridges/index.js.map +1 -1
- package/dist/bridges/input-contract.d.ts +65 -0
- package/dist/bridges/input-contract.d.ts.map +1 -0
- package/dist/bridges/input-contract.js +97 -0
- package/dist/bridges/input-contract.js.map +1 -0
- package/dist/bridges/membership.d.ts +5 -3
- package/dist/bridges/membership.d.ts.map +1 -1
- package/dist/bridges/membership.js +5 -6
- package/dist/bridges/membership.js.map +1 -1
- package/dist/bridges/notices.d.ts +11 -0
- package/dist/bridges/notices.d.ts.map +1 -0
- package/dist/bridges/notices.js +22 -0
- package/dist/bridges/notices.js.map +1 -0
- package/dist/bridges/observations/types.js.map +1 -1
- package/dist/bridges/rejected.d.ts +11 -17
- package/dist/bridges/rejected.d.ts.map +1 -1
- package/dist/bridges/rejected.js +13 -68
- package/dist/bridges/rejected.js.map +1 -1
- package/dist/bridges/relation-eval.d.ts +5 -6
- package/dist/bridges/relation-eval.d.ts.map +1 -1
- package/dist/bridges/relation-eval.js +9 -38
- package/dist/bridges/relation-eval.js.map +1 -1
- package/dist/bridges/rhs-registry.js.map +1 -1
- package/dist/bridges/sensitivity.d.ts +11 -3
- package/dist/bridges/sensitivity.d.ts.map +1 -1
- package/dist/bridges/sensitivity.js +24 -10
- package/dist/bridges/sensitivity.js.map +1 -1
- package/dist/bridges/tensor-index.js.map +1 -1
- package/dist/bridges/types.d.ts +1 -7
- package/dist/bridges/types.d.ts.map +1 -1
- package/dist/bridges/types.js +1 -4
- package/dist/bridges/types.js.map +1 -1
- package/dist/canonical/canonical-equation.d.ts +31 -0
- package/dist/canonical/canonical-equation.d.ts.map +1 -1
- package/dist/canonical/canonical-equation.js.map +1 -1
- package/dist/canonical/dimensional-fields.js.map +1 -1
- package/dist/canonical/entries/_l1-build.js.map +1 -1
- package/dist/canonical/entries/atomic.d.ts.map +1 -1
- package/dist/canonical/entries/atomic.js +11 -1
- package/dist/canonical/entries/atomic.js.map +1 -1
- package/dist/canonical/entries/condensed-matter.d.ts.map +1 -1
- package/dist/canonical/entries/condensed-matter.js +7 -4
- package/dist/canonical/entries/condensed-matter.js.map +1 -1
- package/dist/canonical/entries/dimensional-classics.d.ts.map +1 -1
- package/dist/canonical/entries/dimensional-classics.js +50 -2
- package/dist/canonical/entries/dimensional-classics.js.map +1 -1
- package/dist/canonical/entries/electromagnetism.d.ts.map +1 -1
- package/dist/canonical/entries/electromagnetism.js +32 -2
- package/dist/canonical/entries/electromagnetism.js.map +1 -1
- package/dist/canonical/entries/fluids-waves.d.ts.map +1 -1
- package/dist/canonical/entries/fluids-waves.js +34 -0
- package/dist/canonical/entries/fluids-waves.js.map +1 -1
- package/dist/canonical/entries/mechanics.d.ts.map +1 -1
- package/dist/canonical/entries/mechanics.js +24 -0
- package/dist/canonical/entries/mechanics.js.map +1 -1
- package/dist/canonical/entries/nonmonomial.d.ts.map +1 -1
- package/dist/canonical/entries/nonmonomial.js +42 -24
- package/dist/canonical/entries/nonmonomial.js.map +1 -1
- package/dist/canonical/entries/relativity.d.ts.map +1 -1
- package/dist/canonical/entries/relativity.js +6 -0
- package/dist/canonical/entries/relativity.js.map +1 -1
- package/dist/canonical/entries/statistical-mechanics.d.ts.map +1 -1
- package/dist/canonical/entries/statistical-mechanics.js +24 -5
- package/dist/canonical/entries/statistical-mechanics.js.map +1 -1
- package/dist/canonical/entries/thermo-nuclear-cosmo.d.ts.map +1 -1
- package/dist/canonical/entries/thermo-nuclear-cosmo.js +15 -0
- package/dist/canonical/entries/thermo-nuclear-cosmo.js.map +1 -1
- package/dist/canonical/linkage.d.ts +29 -4
- package/dist/canonical/linkage.d.ts.map +1 -1
- package/dist/canonical/linkage.js +31 -29
- package/dist/canonical/linkage.js.map +1 -1
- package/dist/canonical/normal-form.d.ts +0 -8
- package/dist/canonical/normal-form.d.ts.map +1 -1
- package/dist/canonical/normal-form.js +17 -12
- package/dist/canonical/normal-form.js.map +1 -1
- package/dist/canonical/registry.js.map +1 -1
- package/dist/canonical/residual.js.map +1 -1
- package/dist/canonical/seed-l-layer.d.ts +7 -1
- package/dist/canonical/seed-l-layer.d.ts.map +1 -1
- package/dist/canonical/seed-l-layer.js +7 -1
- package/dist/canonical/seed-l-layer.js.map +1 -1
- package/dist/canonical/structural.d.ts +21 -0
- package/dist/canonical/structural.d.ts.map +1 -1
- package/dist/canonical/structural.js +24 -4
- package/dist/canonical/structural.js.map +1 -1
- package/dist/cases/brownian-sphere.js +4 -4
- package/dist/cases/brownian-sphere.js.map +1 -1
- package/dist/cases/damped-resonator.js +2 -2
- package/dist/cases/damped-resonator.js.map +1 -1
- package/dist/cases/index.d.ts +9 -2
- package/dist/cases/index.d.ts.map +1 -1
- package/dist/cases/index.js +26 -7
- package/dist/cases/index.js.map +1 -1
- package/dist/cases/kepler-rv.js +6 -6
- package/dist/cases/kepler-rv.js.map +1 -1
- package/dist/cases/lumped-cooling.js +1 -1
- package/dist/cases/lumped-cooling.js.map +1 -1
- package/dist/cases/quadrature.js.map +1 -1
- package/dist/cases/resistor-noise.js +3 -3
- package/dist/cases/resistor-noise.js.map +1 -1
- package/dist/cases/skin-depth.js.map +1 -1
- package/dist/cases/types.js.map +1 -1
- package/dist/cli/args.d.ts +7 -2
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +18 -2
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/bindings.d.ts +13 -0
- package/dist/cli/bindings.d.ts.map +1 -0
- package/dist/cli/bindings.js +32 -0
- package/dist/cli/bindings.js.map +1 -0
- package/dist/cli/closed-form-range.js.map +1 -1
- package/dist/cli/command.js.map +1 -1
- package/dist/cli/commands/_atlas-map.d.ts +3 -3
- package/dist/cli/commands/_atlas-map.d.ts.map +1 -1
- package/dist/cli/commands/_atlas-map.js +43 -18
- package/dist/cli/commands/_atlas-map.js.map +1 -1
- package/dist/cli/commands/_atlas-route.js.map +1 -1
- package/dist/cli/commands/_discovery-opts.d.ts +2 -1
- package/dist/cli/commands/_discovery-opts.d.ts.map +1 -1
- package/dist/cli/commands/_discovery-opts.js +48 -18
- package/dist/cli/commands/_discovery-opts.js.map +1 -1
- package/dist/cli/commands/atlas.d.ts.map +1 -1
- package/dist/cli/commands/atlas.js +7 -12
- package/dist/cli/commands/atlas.js.map +1 -1
- package/dist/cli/commands/audit.d.ts.map +1 -1
- package/dist/cli/commands/audit.js +13 -21
- package/dist/cli/commands/audit.js.map +1 -1
- package/dist/cli/commands/axes.js.map +1 -1
- package/dist/cli/commands/candidates.d.ts.map +1 -1
- package/dist/cli/commands/candidates.js +16 -8
- package/dist/cli/commands/candidates.js.map +1 -1
- package/dist/cli/commands/canonical.js.map +1 -1
- package/dist/cli/commands/chain.js +1 -1
- package/dist/cli/commands/chain.js.map +1 -1
- package/dist/cli/commands/confront.d.ts.map +1 -1
- package/dist/cli/commands/confront.js +22 -14
- package/dist/cli/commands/confront.js.map +1 -1
- package/dist/cli/commands/connectors.d.ts.map +1 -1
- package/dist/cli/commands/connectors.js +8 -9
- package/dist/cli/commands/connectors.js.map +1 -1
- package/dist/cli/commands/coverage.js.map +1 -1
- package/dist/cli/commands/derive.d.ts.map +1 -1
- package/dist/cli/commands/derive.js +50 -26
- package/dist/cli/commands/derive.js.map +1 -1
- package/dist/cli/commands/discover.d.ts.map +1 -1
- package/dist/cli/commands/discover.js +18 -13
- package/dist/cli/commands/discover.js.map +1 -1
- package/dist/cli/commands/eval.d.ts.map +1 -1
- package/dist/cli/commands/eval.js +29 -26
- package/dist/cli/commands/eval.js.map +1 -1
- package/dist/cli/commands/evaluate.d.ts +1 -35
- package/dist/cli/commands/evaluate.d.ts.map +1 -1
- package/dist/cli/commands/evaluate.js +99 -208
- package/dist/cli/commands/evaluate.js.map +1 -1
- package/dist/cli/commands/explain.d.ts.map +1 -1
- package/dist/cli/commands/explain.js +57 -45
- package/dist/cli/commands/explain.js.map +1 -1
- package/dist/cli/commands/frontier.js.map +1 -1
- package/dist/cli/commands/ground.d.ts.map +1 -1
- package/dist/cli/commands/ground.js +41 -11
- package/dist/cli/commands/ground.js.map +1 -1
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/commands/map.d.ts.map +1 -1
- package/dist/cli/commands/map.js +84 -92
- package/dist/cli/commands/map.js.map +1 -1
- package/dist/cli/commands/metric.d.ts.map +1 -1
- package/dist/cli/commands/metric.js +53 -15
- package/dist/cli/commands/metric.js.map +1 -1
- package/dist/cli/commands/path.js +4 -4
- package/dist/cli/commands/path.js.map +1 -1
- package/dist/cli/commands/predict.js.map +1 -1
- package/dist/cli/commands/priority.js.map +1 -1
- package/dist/cli/commands/probe.d.ts.map +1 -1
- package/dist/cli/commands/probe.js +50 -26
- package/dist/cli/commands/probe.js.map +1 -1
- package/dist/cli/commands/recover.js +1 -1
- package/dist/cli/commands/recover.js.map +1 -1
- package/dist/cli/commands/regime.d.ts +5 -4
- package/dist/cli/commands/regime.d.ts.map +1 -1
- package/dist/cli/commands/regime.js +25 -27
- package/dist/cli/commands/regime.js.map +1 -1
- package/dist/cli/commands/retrieve.d.ts.map +1 -1
- package/dist/cli/commands/retrieve.js +22 -14
- package/dist/cli/commands/retrieve.js.map +1 -1
- package/dist/cli/commands/search.d.ts.map +1 -1
- package/dist/cli/commands/search.js +8 -4
- package/dist/cli/commands/search.js.map +1 -1
- package/dist/cli/commands/symbolic.d.ts.map +1 -1
- package/dist/cli/commands/symbolic.js +14 -7
- package/dist/cli/commands/symbolic.js.map +1 -1
- package/dist/cli/commands/testplan.js +4 -4
- package/dist/cli/commands/testplan.js.map +1 -1
- package/dist/cli/conventions.d.ts +6 -7
- package/dist/cli/conventions.d.ts.map +1 -1
- package/dist/cli/conventions.js +19 -28
- package/dist/cli/conventions.js.map +1 -1
- package/dist/cli/determination.js.map +1 -1
- package/dist/cli/errors.js.map +1 -1
- package/dist/cli/euler-guard.d.ts +13 -2
- package/dist/cli/euler-guard.d.ts.map +1 -1
- package/dist/cli/euler-guard.js +17 -3
- package/dist/cli/euler-guard.js.map +1 -1
- package/dist/cli/eval-numbers.d.ts +4 -9
- package/dist/cli/eval-numbers.d.ts.map +1 -1
- package/dist/cli/eval-numbers.js +11 -41
- package/dist/cli/eval-numbers.js.map +1 -1
- package/dist/cli/expr-print.d.ts +29 -2
- package/dist/cli/expr-print.d.ts.map +1 -1
- package/dist/cli/expr-print.js +46 -2
- package/dist/cli/expr-print.js.map +1 -1
- package/dist/cli/flag-help.js.map +1 -1
- package/dist/cli/graphs.js.map +1 -1
- package/dist/cli/library-defaults.d.ts +19 -0
- package/dist/cli/library-defaults.d.ts.map +1 -0
- package/dist/cli/library-defaults.js +22 -0
- package/dist/cli/library-defaults.js.map +1 -0
- package/dist/cli/main.js +7 -3
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/map-evidence.js.map +1 -1
- package/dist/cli/output.d.ts +3 -6
- package/dist/cli/output.d.ts.map +1 -1
- package/dist/cli/output.js.map +1 -1
- package/dist/cli/published-url.d.ts +2 -0
- package/dist/cli/published-url.d.ts.map +1 -1
- package/dist/cli/published-url.js +5 -0
- package/dist/cli/published-url.js.map +1 -1
- package/dist/cli/record-reach.d.ts +6 -0
- package/dist/cli/record-reach.d.ts.map +1 -1
- package/dist/cli/record-reach.js +16 -10
- package/dist/cli/record-reach.js.map +1 -1
- package/dist/cli/record-tables.d.ts +2 -1
- package/dist/cli/record-tables.d.ts.map +1 -1
- package/dist/cli/record-tables.js +8 -3
- package/dist/cli/record-tables.js.map +1 -1
- package/dist/cli/record.d.ts.map +1 -1
- package/dist/cli/record.js +31 -12
- package/dist/cli/record.js.map +1 -1
- package/dist/cli/search-index.d.ts +5 -0
- package/dist/cli/search-index.d.ts.map +1 -1
- package/dist/cli/search-index.js +12 -1
- package/dist/cli/search-index.js.map +1 -1
- package/dist/cli/statuses.js.map +1 -1
- package/dist/cli/top-level-help.js.map +1 -1
- package/dist/cli/version.js.map +1 -1
- package/dist/cli-api.d.ts +57 -18
- package/dist/cli-api.d.ts.map +1 -1
- package/dist/cli-api.js +49 -21
- package/dist/cli-api.js.map +1 -1
- package/dist/composition/adjudication.d.ts +8 -30
- package/dist/composition/adjudication.d.ts.map +1 -1
- package/dist/composition/adjudication.js +15 -67
- package/dist/composition/adjudication.js.map +1 -1
- package/dist/composition/aliases.d.ts +1 -1
- package/dist/composition/aliases.d.ts.map +1 -1
- package/dist/composition/aliases.js +10 -20
- package/dist/composition/aliases.js.map +1 -1
- package/dist/composition/audit-coverage.d.ts +2 -0
- package/dist/composition/audit-coverage.d.ts.map +1 -1
- package/dist/composition/audit-coverage.js.map +1 -1
- package/dist/composition/axes.d.ts +12 -0
- package/dist/composition/axes.d.ts.map +1 -1
- package/dist/composition/axes.js +18 -6
- package/dist/composition/axes.js.map +1 -1
- package/dist/composition/axis-audit.js.map +1 -1
- package/dist/composition/bridge-analysis.d.ts +0 -14
- package/dist/composition/bridge-analysis.d.ts.map +1 -1
- package/dist/composition/bridge-analysis.js +66 -57
- package/dist/composition/bridge-analysis.js.map +1 -1
- package/dist/composition/bridge-prediction.d.ts +5 -1
- package/dist/composition/bridge-prediction.d.ts.map +1 -1
- package/dist/composition/bridge-prediction.js +12 -16
- package/dist/composition/bridge-prediction.js.map +1 -1
- package/dist/composition/buckingham-filter.js.map +1 -1
- package/dist/composition/canonical-compare.d.ts.map +1 -1
- package/dist/composition/canonical-compare.js +12 -2
- package/dist/composition/canonical-compare.js.map +1 -1
- package/dist/composition/canonical-graph.d.ts +15 -18
- package/dist/composition/canonical-graph.d.ts.map +1 -1
- package/dist/composition/canonical-graph.js +59 -85
- package/dist/composition/canonical-graph.js.map +1 -1
- package/dist/composition/canonical-json.js.map +1 -1
- package/dist/composition/canonical-prefactors.d.ts +10 -29
- package/dist/composition/canonical-prefactors.d.ts.map +1 -1
- package/dist/composition/canonical-prefactors.js +15 -202
- package/dist/composition/canonical-prefactors.js.map +1 -1
- package/dist/composition/catalog-graph.d.ts.map +1 -1
- package/dist/composition/catalog-graph.js +6 -20
- package/dist/composition/catalog-graph.js.map +1 -1
- package/dist/composition/chain-candidate.d.ts +2 -0
- package/dist/composition/chain-candidate.d.ts.map +1 -1
- package/dist/composition/chain-candidate.js +2 -0
- package/dist/composition/chain-candidate.js.map +1 -1
- package/dist/composition/chain-match.js.map +1 -1
- package/dist/composition/chain-regime.js.map +1 -1
- package/dist/composition/chain-result.js.map +1 -1
- package/dist/composition/compose-surface.js.map +1 -1
- package/dist/composition/compose-symbolic.js.map +1 -1
- package/dist/composition/compose.d.ts.map +1 -1
- package/dist/composition/compose.js +154 -36
- package/dist/composition/compose.js.map +1 -1
- package/dist/composition/composition-recovery.js.map +1 -1
- package/dist/composition/consequence.d.ts.map +1 -1
- package/dist/composition/consequence.js +15 -6
- package/dist/composition/consequence.js.map +1 -1
- package/dist/composition/consistency.js.map +1 -1
- package/dist/composition/descriptor.d.ts +1 -1
- package/dist/composition/descriptor.d.ts.map +1 -1
- package/dist/composition/descriptor.js.map +1 -1
- package/dist/composition/dimension-adjacency.js.map +1 -1
- package/dist/composition/discovery.d.ts +67 -7
- package/dist/composition/discovery.d.ts.map +1 -1
- package/dist/composition/discovery.js +83 -23
- package/dist/composition/discovery.js.map +1 -1
- package/dist/composition/edge.d.ts +19 -22
- package/dist/composition/edge.d.ts.map +1 -1
- package/dist/composition/edge.js +25 -28
- package/dist/composition/edge.js.map +1 -1
- package/dist/composition/enumerate.d.ts +2 -2
- package/dist/composition/enumerate.d.ts.map +1 -1
- package/dist/composition/enumerate.js.map +1 -1
- package/dist/composition/evaluate-relation.d.ts +29 -5
- package/dist/composition/evaluate-relation.d.ts.map +1 -1
- package/dist/composition/evaluate-relation.js +100 -72
- package/dist/composition/evaluate-relation.js.map +1 -1
- package/dist/composition/explain.d.ts +14 -4
- package/dist/composition/explain.d.ts.map +1 -1
- package/dist/composition/explain.js +53 -19
- package/dist/composition/explain.js.map +1 -1
- package/dist/composition/expr-eval.d.ts.map +1 -1
- package/dist/composition/expr-eval.js +2 -1
- package/dist/composition/expr-eval.js.map +1 -1
- package/dist/composition/expr-simplify.d.ts.map +1 -1
- package/dist/composition/expr-simplify.js +9 -39
- package/dist/composition/expr-simplify.js.map +1 -1
- package/dist/composition/expr-subst.js.map +1 -1
- package/dist/composition/formula-shape.d.ts +9 -0
- package/dist/composition/formula-shape.d.ts.map +1 -1
- package/dist/composition/formula-shape.js +54 -0
- package/dist/composition/formula-shape.js.map +1 -1
- package/dist/composition/frontier-account.d.ts +3 -2
- package/dist/composition/frontier-account.d.ts.map +1 -1
- package/dist/composition/frontier-account.js +7 -3
- package/dist/composition/frontier-account.js.map +1 -1
- package/dist/composition/graph-viz-svg.js.map +1 -1
- package/dist/composition/graph-viz.js.map +1 -1
- package/dist/composition/grounding.js.map +1 -1
- package/dist/composition/identifiability.js.map +1 -1
- package/dist/composition/index.d.ts +9 -5
- package/dist/composition/index.d.ts.map +1 -1
- package/dist/composition/index.js +7 -4
- package/dist/composition/index.js.map +1 -1
- package/dist/composition/mathts-quiet.d.ts +28 -0
- package/dist/composition/mathts-quiet.d.ts.map +1 -0
- package/dist/composition/mathts-quiet.js +56 -0
- package/dist/composition/mathts-quiet.js.map +1 -0
- package/dist/composition/mathts-scalar-symbols.d.ts.map +1 -1
- package/dist/composition/mathts-scalar-symbols.js +18 -34
- package/dist/composition/mathts-scalar-symbols.js.map +1 -1
- package/dist/composition/not-composable-seeds.d.ts +3 -1
- package/dist/composition/not-composable-seeds.d.ts.map +1 -1
- package/dist/composition/not-composable-seeds.js +2 -0
- package/dist/composition/not-composable-seeds.js.map +1 -1
- package/dist/composition/probe/backend-protocol.js.map +1 -1
- package/dist/composition/probe/candidate-store.js.map +1 -1
- package/dist/composition/probe/corpus.js.map +1 -1
- package/dist/composition/probe/dataset.js.map +1 -1
- package/dist/composition/probe/experiment-design.js.map +1 -1
- package/dist/composition/probe/expression-gaps.js.map +1 -1
- package/dist/composition/probe/falsify.d.ts +14 -3
- package/dist/composition/probe/falsify.d.ts.map +1 -1
- package/dist/composition/probe/falsify.js +14 -27
- package/dist/composition/probe/falsify.js.map +1 -1
- package/dist/composition/probe/fingerprint.js.map +1 -1
- package/dist/composition/probe/fit.d.ts +1 -1
- package/dist/composition/probe/fit.d.ts.map +1 -1
- package/dist/composition/probe/fit.js +2 -1
- package/dist/composition/probe/fit.js.map +1 -1
- package/dist/composition/probe/frontier.js.map +1 -1
- package/dist/composition/probe/generator.js.map +1 -1
- package/dist/composition/probe/index.d.ts +4 -2
- package/dist/composition/probe/index.d.ts.map +1 -1
- package/dist/composition/probe/index.js +4 -2
- package/dist/composition/probe/index.js.map +1 -1
- package/dist/composition/probe/limits.js.map +1 -1
- package/dist/composition/probe/metadata.js.map +1 -1
- package/dist/composition/probe/pipeline.d.ts +5 -0
- package/dist/composition/probe/pipeline.d.ts.map +1 -1
- package/dist/composition/probe/pipeline.js +13 -6
- package/dist/composition/probe/pipeline.js.map +1 -1
- package/dist/composition/probe/problem.d.ts +8 -0
- package/dist/composition/probe/problem.d.ts.map +1 -1
- package/dist/composition/probe/problem.js +78 -12
- package/dist/composition/probe/problem.js.map +1 -1
- package/dist/composition/probe/report.js.map +1 -1
- package/dist/composition/probe/residual.js.map +1 -1
- package/dist/composition/probe/run-manifest.js +2 -2
- package/dist/composition/probe/run-manifest.js.map +1 -1
- package/dist/composition/probe/scoring.d.ts +2 -1
- package/dist/composition/probe/scoring.d.ts.map +1 -1
- package/dist/composition/probe/scoring.js +21 -7
- package/dist/composition/probe/scoring.js.map +1 -1
- package/dist/composition/probe/search-budget.js.map +1 -1
- package/dist/composition/probe/serialize.js.map +1 -1
- package/dist/composition/probe/structure.js.map +1 -1
- package/dist/composition/probe/study.d.ts +4 -3
- package/dist/composition/probe/study.d.ts.map +1 -1
- package/dist/composition/probe/study.js +5 -3
- package/dist/composition/probe/study.js.map +1 -1
- package/dist/composition/probe/types.d.ts +3 -1
- package/dist/composition/probe/types.d.ts.map +1 -1
- package/dist/composition/probe/types.js +2 -0
- package/dist/composition/probe/types.js.map +1 -1
- package/dist/composition/proposed-bridges.d.ts +11 -4
- package/dist/composition/proposed-bridges.d.ts.map +1 -1
- package/dist/composition/proposed-bridges.js +14 -6
- package/dist/composition/proposed-bridges.js.map +1 -1
- package/dist/composition/quantities.d.ts +0 -4
- package/dist/composition/quantities.d.ts.map +1 -1
- package/dist/composition/quantities.js +5 -5
- package/dist/composition/quantities.js.map +1 -1
- package/dist/composition/quantity.d.ts +18 -2
- package/dist/composition/quantity.d.ts.map +1 -1
- package/dist/composition/quantity.js +35 -6
- package/dist/composition/quantity.js.map +1 -1
- package/dist/composition/representative-values.js.map +1 -1
- package/dist/composition/retrodiction.d.ts +18 -0
- package/dist/composition/retrodiction.d.ts.map +1 -1
- package/dist/composition/retrodiction.js +37 -7
- package/dist/composition/retrodiction.js.map +1 -1
- package/dist/composition/uncertainty.js.map +1 -1
- package/dist/composition/user-equation.d.ts +11 -7
- package/dist/composition/user-equation.d.ts.map +1 -1
- package/dist/composition/user-equation.js +24 -26
- package/dist/composition/user-equation.js.map +1 -1
- package/dist/core/axes-registry.d.ts +8 -5
- package/dist/core/axes-registry.d.ts.map +1 -1
- package/dist/core/axes-registry.js.map +1 -1
- package/dist/core/cell.js.map +1 -1
- package/dist/core/constants.d.ts +35 -12
- package/dist/core/constants.d.ts.map +1 -1
- package/dist/core/constants.js +46 -15
- package/dist/core/constants.js.map +1 -1
- package/dist/core/data-file.d.ts +27 -0
- package/dist/core/data-file.d.ts.map +1 -0
- package/dist/core/data-file.js +48 -0
- package/dist/core/data-file.js.map +1 -0
- package/dist/core/flux-rules.js +1 -1
- package/dist/core/flux-rules.js.map +1 -1
- package/dist/core/json-schema.d.ts +27 -0
- package/dist/core/json-schema.d.ts.map +1 -0
- package/dist/core/json-schema.js +177 -0
- package/dist/core/json-schema.js.map +1 -0
- package/dist/core/labeled-tensor.d.ts +6 -1
- package/dist/core/labeled-tensor.d.ts.map +1 -1
- package/dist/core/labeled-tensor.js +18 -8
- package/dist/core/labeled-tensor.js.map +1 -1
- package/dist/core/regime-registry.d.ts +6 -2
- package/dist/core/regime-registry.d.ts.map +1 -1
- package/dist/core/regime-registry.js.map +1 -1
- package/dist/core/regime-rule-install.js.map +1 -1
- package/dist/core/regimes-builtins.js.map +1 -1
- package/dist/core/tensor.d.ts +7 -4
- package/dist/core/tensor.d.ts.map +1 -1
- package/dist/core/tensor.js +40 -8
- package/dist/core/tensor.js.map +1 -1
- package/dist/core/types.d.ts +3 -2
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/types.js +16 -14
- package/dist/core/types.js.map +1 -1
- package/dist/core/universal-index.js.map +1 -1
- package/dist/diff/bridge-ast-gradient.d.ts +4 -5
- package/dist/diff/bridge-ast-gradient.d.ts.map +1 -1
- package/dist/diff/bridge-ast-gradient.js +16 -23
- package/dist/diff/bridge-ast-gradient.js.map +1 -1
- package/dist/diff/bridge-gradient.d.ts +24 -80
- package/dist/diff/bridge-gradient.d.ts.map +1 -1
- package/dist/diff/bridge-gradient.js +21 -98
- package/dist/diff/bridge-gradient.js.map +1 -1
- package/dist/diff/bridge-specs.d.ts +18 -6
- package/dist/diff/bridge-specs.d.ts.map +1 -1
- package/dist/diff/bridge-specs.js +17 -5
- package/dist/diff/bridge-specs.js.map +1 -1
- package/dist/dimensional/algebra.js.map +1 -1
- package/dist/dimensional/ast-builders.d.ts +5 -4
- package/dist/dimensional/ast-builders.d.ts.map +1 -1
- package/dist/dimensional/ast-builders.js +6 -5
- package/dist/dimensional/ast-builders.js.map +1 -1
- package/dist/dimensional/ast-types.js.map +1 -1
- package/dist/dimensional/bridge-check.d.ts.map +1 -1
- package/dist/dimensional/bridge-check.js +3 -5
- package/dist/dimensional/bridge-check.js.map +1 -1
- package/dist/dimensional/buckingham.js.map +1 -1
- package/dist/dimensional/connection-validators.d.ts +2 -1
- package/dist/dimensional/connection-validators.d.ts.map +1 -1
- package/dist/dimensional/connection-validators.js.map +1 -1
- package/dist/dimensional/connection.js.map +1 -1
- package/dist/dimensional/constant-rows.d.ts +54 -0
- package/dist/dimensional/constant-rows.d.ts.map +1 -0
- package/dist/dimensional/constant-rows.js +115 -0
- package/dist/dimensional/constant-rows.js.map +1 -0
- package/dist/dimensional/constants.d.ts +7 -17
- package/dist/dimensional/constants.d.ts.map +1 -1
- package/dist/dimensional/constants.js +12 -21
- package/dist/dimensional/constants.js.map +1 -1
- package/dist/dimensional/curvature-composite.js.map +1 -1
- package/dist/dimensional/curvature-invariants.js.map +1 -1
- package/dist/dimensional/curvature.js.map +1 -1
- package/dist/dimensional/dimension-inference.js.map +1 -1
- package/dist/dimensional/dimension-spec.d.ts +21 -6
- package/dist/dimensional/dimension-spec.d.ts.map +1 -1
- package/dist/dimensional/dimension-spec.js +150 -160
- package/dist/dimensional/dimension-spec.js.map +1 -1
- package/dist/dimensional/einstein-equation.js.map +1 -1
- package/dist/dimensional/errors.d.ts +3 -1
- package/dist/dimensional/errors.d.ts.map +1 -1
- package/dist/dimensional/errors.js +2 -2
- package/dist/dimensional/errors.js.map +1 -1
- package/dist/dimensional/exact-scale.d.ts +79 -0
- package/dist/dimensional/exact-scale.d.ts.map +1 -0
- package/dist/dimensional/exact-scale.js +222 -0
- package/dist/dimensional/exact-scale.js.map +1 -0
- package/dist/dimensional/field-equation-helpers.js.map +1 -1
- package/dist/dimensional/formula-names.d.ts +13 -12
- package/dist/dimensional/formula-names.d.ts.map +1 -1
- package/dist/dimensional/formula-names.js +28 -51
- package/dist/dimensional/formula-names.js.map +1 -1
- package/dist/dimensional/fresh-label.js.map +1 -1
- package/dist/dimensional/friedmann-equation.d.ts +3 -3
- package/dist/dimensional/friedmann-equation.js +3 -3
- package/dist/dimensional/friedmann-equation.js.map +1 -1
- package/dist/dimensional/gauge-field.d.ts +2 -3
- package/dist/dimensional/gauge-field.d.ts.map +1 -1
- package/dist/dimensional/gauge-field.js +0 -1
- package/dist/dimensional/gauge-field.js.map +1 -1
- package/dist/dimensional/hyphen-names.d.ts.map +1 -1
- package/dist/dimensional/hyphen-names.js +8 -0
- package/dist/dimensional/hyphen-names.js.map +1 -1
- package/dist/dimensional/killing-validators.js.map +1 -1
- package/dist/dimensional/klein-gordon-equation.js.map +1 -1
- package/dist/dimensional/metric-validators.d.ts +2 -1
- package/dist/dimensional/metric-validators.d.ts.map +1 -1
- package/dist/dimensional/metric-validators.js.map +1 -1
- package/dist/dimensional/metric.js.map +1 -1
- package/dist/dimensional/natural-units.js.map +1 -1
- package/dist/dimensional/quantity-registry.d.ts +23 -1
- package/dist/dimensional/quantity-registry.d.ts.map +1 -1
- package/dist/dimensional/quantity-registry.js +55 -18
- package/dist/dimensional/quantity-registry.js.map +1 -1
- package/dist/dimensional/rg-flow.js.map +1 -1
- package/dist/dimensional/stress-energy-validators.js.map +1 -1
- package/dist/dimensional/symbolic-constants.d.ts +63 -19
- package/dist/dimensional/symbolic-constants.d.ts.map +1 -1
- package/dist/dimensional/symbolic-constants.js +114 -92
- package/dist/dimensional/symbolic-constants.js.map +1 -1
- package/dist/dimensional/tensor-trace.js.map +1 -1
- package/dist/dimensional/tensor.js.map +1 -1
- package/dist/dimensional/types.js.map +1 -1
- package/dist/dimensional/unit-convention.d.ts +0 -2
- package/dist/dimensional/unit-convention.d.ts.map +1 -1
- package/dist/dimensional/unit-convention.js +2 -2
- package/dist/dimensional/unit-convention.js.map +1 -1
- package/dist/dimensional/unit-data.d.ts +70 -0
- package/dist/dimensional/unit-data.d.ts.map +1 -0
- package/dist/dimensional/unit-data.js +139 -0
- package/dist/dimensional/unit-data.js.map +1 -0
- package/dist/dimensional/units.d.ts +87 -24
- package/dist/dimensional/units.d.ts.map +1 -1
- package/dist/dimensional/units.js +290 -295
- package/dist/dimensional/units.js.map +1 -1
- package/dist/dimensional/validator-registry.js.map +1 -1
- package/dist/dimensional/validator.d.ts +0 -16
- package/dist/dimensional/validator.d.ts.map +1 -1
- package/dist/dimensional/validator.js +65 -29
- package/dist/dimensional/validator.js.map +1 -1
- package/dist/dimensional/weyl-validators.js.map +1 -1
- package/dist/index.d.ts +65 -18
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +19 -24
- package/dist/index.js.map +1 -1
- package/dist/numerical/bianchi-residual.js.map +1 -1
- package/dist/numerical/binding-value.d.ts +32 -7
- package/dist/numerical/binding-value.d.ts.map +1 -1
- package/dist/numerical/binding-value.js +218 -209
- package/dist/numerical/binding-value.js.map +1 -1
- package/dist/numerical/christoffel-flat.js.map +1 -1
- package/dist/numerical/connection-lowering-helpers.js.map +1 -1
- package/dist/numerical/covariant-eikonal.d.ts.map +1 -1
- package/dist/numerical/covariant-eikonal.js +2 -2
- package/dist/numerical/covariant-eikonal.js.map +1 -1
- package/dist/numerical/curvature-lowering-helpers.d.ts +20 -0
- package/dist/numerical/curvature-lowering-helpers.d.ts.map +1 -1
- package/dist/numerical/curvature-lowering-helpers.js +6 -3
- package/dist/numerical/curvature-lowering-helpers.js.map +1 -1
- package/dist/numerical/derivative-lowering.js.map +1 -1
- package/dist/numerical/einstein-equation.js.map +1 -1
- package/dist/numerical/engine-registry.js.map +1 -1
- package/dist/numerical/errors.d.ts +7 -3
- package/dist/numerical/errors.d.ts.map +1 -1
- package/dist/numerical/errors.js +5 -5
- package/dist/numerical/errors.js.map +1 -1
- package/dist/numerical/evaluator-uncertainty.d.ts +34 -0
- package/dist/numerical/evaluator-uncertainty.d.ts.map +1 -0
- package/dist/numerical/evaluator-uncertainty.js +134 -0
- package/dist/numerical/evaluator-uncertainty.js.map +1 -0
- package/dist/numerical/formula-contract.d.ts +67 -7
- package/dist/numerical/formula-contract.d.ts.map +1 -1
- package/dist/numerical/formula-contract.js +68 -42
- package/dist/numerical/formula-contract.js.map +1 -1
- package/dist/numerical/formula-dimension.d.ts +17 -7
- package/dist/numerical/formula-dimension.d.ts.map +1 -1
- package/dist/numerical/formula-dimension.js +120 -44
- package/dist/numerical/formula-dimension.js.map +1 -1
- package/dist/numerical/formula-mathts.d.ts.map +1 -1
- package/dist/numerical/formula-mathts.js +10 -3
- package/dist/numerical/formula-mathts.js.map +1 -1
- package/dist/numerical/formula-registry.d.ts +13 -3
- package/dist/numerical/formula-registry.d.ts.map +1 -1
- package/dist/numerical/formula-registry.js +7 -2
- package/dist/numerical/formula-registry.js.map +1 -1
- package/dist/numerical/geodesic-integrator.js.map +1 -1
- package/dist/numerical/geometrized.js.map +1 -1
- package/dist/numerical/gl4-integrator.d.ts +28 -27
- package/dist/numerical/gl4-integrator.d.ts.map +1 -1
- package/dist/numerical/gl4-integrator.js +44 -45
- package/dist/numerical/gl4-integrator.js.map +1 -1
- package/dist/numerical/grid-field.js.map +1 -1
- package/dist/numerical/index.js.map +1 -1
- package/dist/numerical/input-validation.d.ts +3 -6
- package/dist/numerical/input-validation.d.ts.map +1 -1
- package/dist/numerical/input-validation.js +4 -8
- package/dist/numerical/input-validation.js.map +1 -1
- package/dist/numerical/killing.d.ts +8 -5
- package/dist/numerical/killing.d.ts.map +1 -1
- package/dist/numerical/killing.js.map +1 -1
- package/dist/numerical/klein-gordon.js.map +1 -1
- package/dist/numerical/kretschmann.js.map +1 -1
- package/dist/numerical/lowering-utils.js.map +1 -1
- package/dist/numerical/lowering.d.ts.map +1 -1
- package/dist/numerical/lowering.js +7 -17
- package/dist/numerical/lowering.js.map +1 -1
- package/dist/numerical/mathts-engine.d.ts.map +1 -1
- package/dist/numerical/mathts-engine.js +11 -6
- package/dist/numerical/mathts-engine.js.map +1 -1
- package/dist/numerical/metric-inverse.js.map +1 -1
- package/dist/numerical/null-ic.js.map +1 -1
- package/dist/numerical/null-ray-integrator.js +4 -4
- package/dist/numerical/null-ray-integrator.js.map +1 -1
- package/dist/numerical/painleve-gullstrand-metric.js.map +1 -1
- package/dist/numerical/pderiv.d.ts.map +1 -1
- package/dist/numerical/pderiv.js +9 -2
- package/dist/numerical/pderiv.js.map +1 -1
- package/dist/numerical/perihelion-finder.js.map +1 -1
- package/dist/numerical/quadrature.d.ts +5 -2
- package/dist/numerical/quadrature.d.ts.map +1 -1
- package/dist/numerical/quadrature.js +20 -3
- package/dist/numerical/quadrature.js.map +1 -1
- package/dist/numerical/spacetime-metrics.d.ts +17 -19
- package/dist/numerical/spacetime-metrics.d.ts.map +1 -1
- package/dist/numerical/spacetime-metrics.js +158 -250
- package/dist/numerical/spacetime-metrics.js.map +1 -1
- package/dist/numerical/strides.js.map +1 -1
- package/dist/numerical/tensor-engine.d.ts +9 -5
- package/dist/numerical/tensor-engine.d.ts.map +1 -1
- package/dist/numerical/tensor-engine.js.map +1 -1
- package/dist/numerical/types.js.map +1 -1
- package/dist/numerical/weyl-lowering.js.map +1 -1
- package/dist/relations/category.js.map +1 -1
- package/dist/relations/composition-table.d.ts +4 -4
- package/dist/relations/composition-table.js +4 -4
- package/dist/relations/composition-table.js.map +1 -1
- package/dist/relations/conventions.js.map +1 -1
- package/dist/relations/domain-regimes.js.map +1 -1
- package/dist/relations/regime-registration.js.map +1 -1
- package/dist/relations/regime-vocabularies.js.map +1 -1
- package/dist/relations/regime.d.ts +18 -8
- package/dist/relations/regime.d.ts.map +1 -1
- package/dist/relations/regime.js +26 -14
- package/dist/relations/regime.js.map +1 -1
- package/dist/relations/types.d.ts +26 -6
- package/dist/relations/types.d.ts.map +1 -1
- package/dist/relations/types.js +15 -3
- package/dist/relations/types.js.map +1 -1
- package/package.json +10 -14
- package/dist/bridges/registry.d.ts +0 -60
- package/dist/bridges/registry.d.ts.map +0 -1
- package/dist/bridges/registry.js +0 -87
- package/dist/bridges/registry.js.map +0 -1
- package/dist/cli/poster-source.d.ts +0 -154
- package/dist/cli/poster-source.d.ts.map +0 -1
- package/dist/cli/poster-source.js +0 -184
- package/dist/cli/poster-source.js.map +0 -1
package/dist/core/constants.d.ts
CHANGED
|
@@ -1,27 +1,32 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Canonical CODATA 2018 + SI-defined physical constants for UPT
|
|
2
|
+
* Canonical CODATA 2018 + SI-defined physical constants for UPT.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
* numerical, dimensional, and bridge layers.
|
|
6
|
-
*
|
|
7
|
-
* `src/bridges/`, and `tests/fixtures/` — see audit `PC-1` in
|
|
8
|
-
* `docs/architecture/archive/v0.5.1-audit.md`.
|
|
4
|
+
* The one owner of every fundamental physical constant used across the
|
|
5
|
+
* numerical, dimensional, and bridge layers; `tests/core/constants-owner.test.ts`
|
|
6
|
+
* fails on a second copy of any of these decimals elsewhere under `src/`.
|
|
9
7
|
*
|
|
10
8
|
* Values use:
|
|
11
9
|
* • Exact-SI definitions (`C_SI`, `H_SI`, `K_B_SI`, `E_SI`) where the
|
|
12
10
|
* 2019 SI redefinition fixed their values exactly.
|
|
13
11
|
* • `HBAR_SI` is the exact quotient `H_SI / (2π)`, not the truncated CODATA display.
|
|
14
12
|
* • CODATA 2018 best estimates for measured constants (`G_SI`, `ALPHA`, Planck units).
|
|
15
|
-
* • Planck 2018 best estimate for `H0_SI
|
|
13
|
+
* • Planck 2018 best estimate for `H0_SI`, in SI through the unit table's parsec.
|
|
16
14
|
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
15
|
+
* This file is the one owner of every value. `PhysicalConstants` in
|
|
16
|
+
* `src/core/types.ts` and the constant registry in
|
|
17
|
+
* `src/dimensional/symbolic-constants.ts` are projections of it, and a test
|
|
18
|
+
* refuses a CODATA literal anywhere else under `src/`. A unit is the unit
|
|
19
|
+
* table's: `H0_SI` reads the parsec from `data/units.json` rather than
|
|
20
|
+
* restating it, so the Hubble rate here and `67.4 km/s/Mpc` read through the
|
|
21
|
+
* unit table are one number.
|
|
19
22
|
*
|
|
20
23
|
* @module core/constants
|
|
21
24
|
* @public
|
|
22
25
|
*/
|
|
23
26
|
/** Speed of light in vacuum (m/s). Exact SI definition since 1983. */
|
|
24
27
|
export declare const C_SI = 299792458;
|
|
28
|
+
/** Rydberg constant R∞ (infinite nuclear mass), CODATA 2018: 10 973 731.568 160(21) m⁻¹. */
|
|
29
|
+
export declare const R_INF_SI = 10973731.56816;
|
|
25
30
|
/** Newtonian gravitational constant (m³ kg⁻¹ s⁻²). CODATA 2018. */
|
|
26
31
|
export declare const G_SI = 6.6743e-11;
|
|
27
32
|
/** Planck constant (J·s). Exact SI definition since 2019. */
|
|
@@ -33,12 +38,20 @@ export declare const H_SI = 6.62607015e-34;
|
|
|
33
38
|
* CODATA 2018 values, which were computed from the truncated display.
|
|
34
39
|
*/
|
|
35
40
|
export declare const HBAR_SI: number;
|
|
41
|
+
/** The CODATA 2018 display value of ħ: {@link HBAR_SI} truncated. Kept so the difference is computed, not typed. @internal */
|
|
42
|
+
export declare const HBAR_CODATA_DISPLAY = 1.054571817e-34;
|
|
36
43
|
/** Boltzmann constant (J/K). Exact SI definition since 2019. */
|
|
37
44
|
export declare const K_B_SI = 1.380649e-23;
|
|
38
45
|
/** Elementary charge (C). Exact SI definition since 2019. */
|
|
39
46
|
export declare const E_SI = 1.602176634e-19;
|
|
40
47
|
/** Fine-structure constant α (dimensionless). CODATA 2018. */
|
|
41
48
|
export declare const ALPHA = 0.0072973525693;
|
|
49
|
+
/** Vacuum permittivity ε₀ (F/m). CODATA 2018. @internal */
|
|
50
|
+
export declare const EPS0_SI = 8.8541878128e-12;
|
|
51
|
+
/** Vacuum permeability μ₀ = 1/(ε₀ c²) (H/m), from ε₀ and the exact c. @internal */
|
|
52
|
+
export declare const MU0_SI: number;
|
|
53
|
+
/** Stefan–Boltzmann constant σ (W m⁻² K⁻⁴). CODATA 2018. @internal */
|
|
54
|
+
export declare const SIGMA_SB_SI = 5.670374419e-8;
|
|
42
55
|
/** Planck mass √(ℏc/G) (kg). CODATA 2018. */
|
|
43
56
|
export declare const M_P_SI = 2.176434e-8;
|
|
44
57
|
/** Planck length √(ℏG/c³) (m). CODATA 2018. */
|
|
@@ -49,7 +62,10 @@ export declare const T_P_SI = 5.391247e-44;
|
|
|
49
62
|
* Hubble parameter H₀ (s⁻¹).
|
|
50
63
|
*
|
|
51
64
|
* Planck 2018 TT,TE,EE+lowE+lensing best estimate: 67.4 km/s/Mpc, converted
|
|
52
|
-
*
|
|
65
|
+
* with the parsec of the unit table (`data/units.json`, 648000/π au), so it is
|
|
66
|
+
* the value `convertValue('67.4km/s/Mpc', 'Hz')` reads: one Hubble rate,
|
|
67
|
+
* 2.1842852410855023e-18 s⁻¹. The unit table is the one place the parsec is
|
|
68
|
+
* written; this module reads it rather than restating it.
|
|
53
69
|
*/
|
|
54
70
|
export declare const H0_SI: number;
|
|
55
71
|
/**
|
|
@@ -67,6 +83,8 @@ export declare const VON_KLITZING_SI: number;
|
|
|
67
83
|
export declare const JOSEPHSON_CONSTANT_SI: number;
|
|
68
84
|
/** Lorenz number L = (π²/3) (k_B/e)² (W Ω K⁻²). */
|
|
69
85
|
export declare const LORENZ_NUMBER_SI: number;
|
|
86
|
+
/** Euler–Mascheroni constant γ. The BCS gap is π k_B T_c / e^γ; the formula name is `euler_gamma`. */
|
|
87
|
+
export declare const EULER_GAMMA = 0.5772156649015329;
|
|
70
88
|
/** Weak-coupling BCS gap ratio 2Δ(0)/(k_B T_c) = 2π e^{−γ}. */
|
|
71
89
|
export declare const BCS_GAP_RATIO: number;
|
|
72
90
|
/** Lane-Emden n=3 dimensionless radius used by the white-dwarf mass. */
|
|
@@ -84,8 +102,13 @@ export declare const THOMSON_CROSS_SECTION_SI = 6.6524587321e-29;
|
|
|
84
102
|
* @public
|
|
85
103
|
*/
|
|
86
104
|
export declare const GM_SUN_SI = 132712440000000000000;
|
|
87
|
-
/**
|
|
88
|
-
|
|
105
|
+
/**
|
|
106
|
+
* The solar mass (kg) that reproduces {@link GM_SUN_SI} with {@link G_SI}:
|
|
107
|
+
* the double `GM_SUN_SI / G_SI`. The unit `Msun_iau` and the registry name
|
|
108
|
+
* `Msun_iau` both read this one value.
|
|
109
|
+
* @internal
|
|
110
|
+
*/
|
|
111
|
+
export declare const M_SUN_IAU_SI: number;
|
|
89
112
|
/**
|
|
90
113
|
* Electron mass (kg), CODATA 2018. Added for the v0.11 namespacing
|
|
91
114
|
* gate's criterion-3 pin (λ_T of an electron at the Hawking
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/core/constants.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/core/constants.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAIH,sEAAsE;AACtE,eAAO,MAAM,IAAI,YAAY,CAAC;AAC9B,4FAA4F;AAC5F,eAAO,MAAM,QAAQ,iBAAiB,CAAC;AAEvC,mEAAmE;AACnE,eAAO,MAAM,IAAI,aAAc,CAAC;AAEhC,6DAA6D;AAC7D,eA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tC;;;;;GAKG;AACH,eAAO,MAAM,YAAY,QAAmB,CAAC;AAE7C;;;;;GAKG;AACH,eAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC;;;;GAIG;AACH,eAAO,MAAM,WAAW,oBAAoB,CAAC;AAE7C;;;GAGG;AACH,eAAO,MAAM,MAAM,iBAAgB,CAAC;AAEpC;;;GAGG;AACH,eAAO,MAAM,UAAU,QAAgB,CAAC;AAExC;;;;GAIG;AACH,eAAO,MAAM,SAAS,iBAAiB,CAAC;AAExC;;;;;GAKG;AACH,eAAO,MAAM,MAAM,mBAAoB,CAAC"}
|
package/dist/core/constants.js
CHANGED
|
@@ -1,27 +1,33 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Canonical CODATA 2018 + SI-defined physical constants for UPT
|
|
2
|
+
* Canonical CODATA 2018 + SI-defined physical constants for UPT.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
* numerical, dimensional, and bridge layers.
|
|
6
|
-
*
|
|
7
|
-
* `src/bridges/`, and `tests/fixtures/` — see audit `PC-1` in
|
|
8
|
-
* `docs/architecture/archive/v0.5.1-audit.md`.
|
|
4
|
+
* The one owner of every fundamental physical constant used across the
|
|
5
|
+
* numerical, dimensional, and bridge layers; `tests/core/constants-owner.test.ts`
|
|
6
|
+
* fails on a second copy of any of these decimals elsewhere under `src/`.
|
|
9
7
|
*
|
|
10
8
|
* Values use:
|
|
11
9
|
* • Exact-SI definitions (`C_SI`, `H_SI`, `K_B_SI`, `E_SI`) where the
|
|
12
10
|
* 2019 SI redefinition fixed their values exactly.
|
|
13
11
|
* • `HBAR_SI` is the exact quotient `H_SI / (2π)`, not the truncated CODATA display.
|
|
14
12
|
* • CODATA 2018 best estimates for measured constants (`G_SI`, `ALPHA`, Planck units).
|
|
15
|
-
* • Planck 2018 best estimate for `H0_SI
|
|
13
|
+
* • Planck 2018 best estimate for `H0_SI`, in SI through the unit table's parsec.
|
|
16
14
|
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
15
|
+
* This file is the one owner of every value. `PhysicalConstants` in
|
|
16
|
+
* `src/core/types.ts` and the constant registry in
|
|
17
|
+
* `src/dimensional/symbolic-constants.ts` are projections of it, and a test
|
|
18
|
+
* refuses a CODATA literal anywhere else under `src/`. A unit is the unit
|
|
19
|
+
* table's: `H0_SI` reads the parsec from `data/units.json` rather than
|
|
20
|
+
* restating it, so the Hubble rate here and `67.4 km/s/Mpc` read through the
|
|
21
|
+
* unit table are one number.
|
|
19
22
|
*
|
|
20
23
|
* @module core/constants
|
|
21
24
|
* @public
|
|
22
25
|
*/
|
|
26
|
+
import { checkedDataFile } from './data-file.js';
|
|
23
27
|
/** Speed of light in vacuum (m/s). Exact SI definition since 1983. */
|
|
24
28
|
export const C_SI = 299792458;
|
|
29
|
+
/** Rydberg constant R∞ (infinite nuclear mass), CODATA 2018: 10 973 731.568 160(21) m⁻¹. */
|
|
30
|
+
export const R_INF_SI = 10973731.56816;
|
|
25
31
|
/** Newtonian gravitational constant (m³ kg⁻¹ s⁻²). CODATA 2018. */
|
|
26
32
|
export const G_SI = 6.67430e-11;
|
|
27
33
|
/** Planck constant (J·s). Exact SI definition since 2019. */
|
|
@@ -33,25 +39,45 @@ export const H_SI = 6.62607015e-34;
|
|
|
33
39
|
* CODATA 2018 values, which were computed from the truncated display.
|
|
34
40
|
*/
|
|
35
41
|
export const HBAR_SI = H_SI / (2 * Math.PI);
|
|
42
|
+
/** The CODATA 2018 display value of ħ: {@link HBAR_SI} truncated. Kept so the difference is computed, not typed. @internal */
|
|
43
|
+
export const HBAR_CODATA_DISPLAY = 1.054571817e-34;
|
|
36
44
|
/** Boltzmann constant (J/K). Exact SI definition since 2019. */
|
|
37
45
|
export const K_B_SI = 1.380649e-23;
|
|
38
46
|
/** Elementary charge (C). Exact SI definition since 2019. */
|
|
39
47
|
export const E_SI = 1.602176634e-19;
|
|
40
48
|
/** Fine-structure constant α (dimensionless). CODATA 2018. */
|
|
41
49
|
export const ALPHA = 7.2973525693e-3;
|
|
50
|
+
/** Vacuum permittivity ε₀ (F/m). CODATA 2018. @internal */
|
|
51
|
+
export const EPS0_SI = 8.8541878128e-12;
|
|
52
|
+
/** Vacuum permeability μ₀ = 1/(ε₀ c²) (H/m), from ε₀ and the exact c. @internal */
|
|
53
|
+
export const MU0_SI = 1 / (EPS0_SI * C_SI * C_SI);
|
|
54
|
+
/** Stefan–Boltzmann constant σ (W m⁻² K⁻⁴). CODATA 2018. @internal */
|
|
55
|
+
export const SIGMA_SB_SI = 5.670374419e-8;
|
|
42
56
|
/** Planck mass √(ℏc/G) (kg). CODATA 2018. */
|
|
43
57
|
export const M_P_SI = 2.176434e-8;
|
|
44
58
|
/** Planck length √(ℏG/c³) (m). CODATA 2018. */
|
|
45
59
|
export const L_P_SI = 1.616255e-35;
|
|
46
60
|
/** Planck time √(ℏG/c⁵) (s). CODATA 2018. */
|
|
47
61
|
export const T_P_SI = 5.391247e-44;
|
|
62
|
+
/** The `scale` of the `symbol` row in `data/units.json`, which must be a plain decimal (metres for a length). */
|
|
63
|
+
function unitTableDecimal(symbol) {
|
|
64
|
+
const file = checkedDataFile('units.json');
|
|
65
|
+
const scale = file.units.find((row) => row.symbols.includes(symbol))?.scale;
|
|
66
|
+
const value = scale === undefined ? Number.NaN : Number(scale);
|
|
67
|
+
if (!Number.isFinite(value))
|
|
68
|
+
throw new Error(`data/units.json: the '${symbol}' row must state a decimal scale (got ${scale ?? 'no row'})`);
|
|
69
|
+
return value;
|
|
70
|
+
}
|
|
48
71
|
/**
|
|
49
72
|
* Hubble parameter H₀ (s⁻¹).
|
|
50
73
|
*
|
|
51
74
|
* Planck 2018 TT,TE,EE+lowE+lensing best estimate: 67.4 km/s/Mpc, converted
|
|
52
|
-
*
|
|
75
|
+
* with the parsec of the unit table (`data/units.json`, 648000/π au), so it is
|
|
76
|
+
* the value `convertValue('67.4km/s/Mpc', 'Hz')` reads: one Hubble rate,
|
|
77
|
+
* 2.1842852410855023e-18 s⁻¹. The unit table is the one place the parsec is
|
|
78
|
+
* written; this module reads it rather than restating it.
|
|
53
79
|
*/
|
|
54
|
-
export const H0_SI = 67.4e3 /
|
|
80
|
+
export const H0_SI = 67.4e3 / (1e6 * unitTableDecimal('pc'));
|
|
55
81
|
/**
|
|
56
82
|
* Solar mass (kg). IAU 2015 nominal value rounded to the
|
|
57
83
|
* repo-conventional literal (used by the BE-42 docstring, the
|
|
@@ -67,8 +93,8 @@ export const VON_KLITZING_SI = H_SI / (E_SI * E_SI);
|
|
|
67
93
|
export const JOSEPHSON_CONSTANT_SI = (2 * E_SI) / H_SI;
|
|
68
94
|
/** Lorenz number L = (π²/3) (k_B/e)² (W Ω K⁻²). */
|
|
69
95
|
export const LORENZ_NUMBER_SI = (Math.PI ** 2 / 3) * (K_B_SI / E_SI) ** 2;
|
|
70
|
-
/** Euler
|
|
71
|
-
const EULER_GAMMA = 0.5772156649015329;
|
|
96
|
+
/** Euler–Mascheroni constant γ. The BCS gap is π k_B T_c / e^γ; the formula name is `euler_gamma`. */
|
|
97
|
+
export const EULER_GAMMA = 0.5772156649015329;
|
|
72
98
|
/** Weak-coupling BCS gap ratio 2Δ(0)/(k_B T_c) = 2π e^{−γ}. */
|
|
73
99
|
export const BCS_GAP_RATIO = (2 * Math.PI) / Math.exp(EULER_GAMMA);
|
|
74
100
|
/** Lane-Emden n=3 dimensionless radius used by the white-dwarf mass. */
|
|
@@ -86,8 +112,13 @@ export const THOMSON_CROSS_SECTION_SI = 6.6524587321e-29;
|
|
|
86
112
|
* @public
|
|
87
113
|
*/
|
|
88
114
|
export const GM_SUN_SI = 1.3271244e20;
|
|
89
|
-
/**
|
|
90
|
-
|
|
115
|
+
/**
|
|
116
|
+
* The solar mass (kg) that reproduces {@link GM_SUN_SI} with {@link G_SI}:
|
|
117
|
+
* the double `GM_SUN_SI / G_SI`. The unit `Msun_iau` and the registry name
|
|
118
|
+
* `Msun_iau` both read this one value.
|
|
119
|
+
* @internal
|
|
120
|
+
*/
|
|
121
|
+
export const M_SUN_IAU_SI = GM_SUN_SI / G_SI;
|
|
91
122
|
/**
|
|
92
123
|
* Electron mass (kg), CODATA 2018. Added for the v0.11 namespacing
|
|
93
124
|
* gate's criterion-3 pin (λ_T of an electron at the Hawking
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/core/constants.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,sEAAsE;AACtE,MAAM,CAAC,MAAM,IAAI,GAAG,SAAS,CAAC;AAE9B,mEAAmE;AACnE,MAAM,CAAC,MAAM,IAAI,GAAG,WAAW,CAAC;AAEhC,6DAA6D;AAC7D,MAAM,CAAC,MAAM,IAAI,GAAG,cAAc,CAAC;AAEnC;;;;;GAKG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC;AAE5C,gEAAgE;AAChE,MAAM,CAAC,MAAM,MAAM,GAAG,YAAY,CAAC;AAEnC,6DAA6D;AAC7D,MAAM,CAAC,MAAM,IAAI,GAAG,eAAe,CAAC;AAEpC,8DAA8D;AAC9D,MAAM,CAAC,MAAM,KAAK,GAAG,eAAe,CAAC;AAErC,6CAA6C;AAC7C,MAAM,CAAC,MAAM,MAAM,GAAG,WAAW,CAAC;AAElC,+CAA+C;AAC/C,MAAM,CAAC,MAAM,MAAM,GAAG,YAAY,CAAC;AAEnC,6CAA6C;AAC7C,MAAM,CAAC,MAAM,MAAM,GAAG,YAAY,CAAC;AAEnC;;;;;GAKG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,MAAM,GAAG,SAAS,CAAC;AAExC;;;;;GAKG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,QAAQ,CAAC;AAEjC,mEAAmE;AACnE,MAAM,CAAC,MAAM,QAAQ,GAAG,QAAQ,CAAC;AAEjC,8CAA8C;AAC9C,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI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C/D,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;AAEnE,wEAAwE;AACxE,MAAM,CAAC,MAAM,iBAAiB,GAAG,OAAO,CAAC;AAEzC,kCAAkC;AAClC,MAAM,CAAC,MAAM,wBAAwB,GAAG,gBAAgB,CAAC;AAEzD;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,YAAY,CAAC;AAEtC;;;;;GAKG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,SAAS,GAAG,IAAI,CAAC;AAE7C;;;;;GAKG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,gBAAgB,CAAC;AAEvC;;;;GAIG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,iBAAiB,CAAC;AAE7C;;;GAGG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,aAAa,CAAC;AAEpC;;;GAGG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,GAAG,IAAI,CAAC;AAExC;;;;GAIG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,cAAc,CAAC;AAExC;;;;;GAKG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,iBAAiB,CAAC","sourcesContent":["/**\n * Canonical CODATA 2018 + SI-defined physical constants for UPT.\n *\n * The one owner of every fundamental physical constant used across the\n * numerical, dimensional, and bridge layers; `tests/core/constants-owner.test.ts`\n * fails on a second copy of any of these decimals elsewhere under `src/`.\n *\n * Values use:\n * • Exact-SI definitions (`C_SI`, `H_SI`, `K_B_SI`, `E_SI`) where the\n * 2019 SI redefinition fixed their values exactly.\n * • `HBAR_SI` is the exact quotient `H_SI / (2π)`, not the truncated CODATA display.\n * • CODATA 2018 best estimates for measured constants (`G_SI`, `ALPHA`, Planck units).\n * • Planck 2018 best estimate for `H0_SI`, in SI through the unit table's parsec.\n *\n * This file is the one owner of every value. `PhysicalConstants` in\n * `src/core/types.ts` and the constant registry in\n * `src/dimensional/symbolic-constants.ts` are projections of it, and a test\n * refuses a CODATA literal anywhere else under `src/`. A unit is the unit\n * table's: `H0_SI` reads the parsec from `data/units.json` rather than\n * restating it, so the Hubble rate here and `67.4 km/s/Mpc` read through the\n * unit table are one number.\n *\n * @module core/constants\n * @public\n */\n\nimport { checkedDataFile } from './data-file.js';\n\n/** Speed of light in vacuum (m/s). Exact SI definition since 1983. */\nexport const C_SI = 299792458;\n/** Rydberg constant R∞ (infinite nuclear mass), CODATA 2018: 10 973 731.568 160(21) m⁻¹. */\nexport const R_INF_SI = 10973731.56816;\n\n/** Newtonian gravitational constant (m³ kg⁻¹ s⁻²). CODATA 2018. */\nexport const G_SI = 6.67430e-11;\n\n/** Planck constant (J·s). Exact SI definition since 2019. */\nexport const H_SI = 6.62607015e-34;\n\n/**\n * Reduced Planck constant h/(2π) (J·s). Exact, from the 2019 SI definition of\n * h. The CODATA display `1.054571817e-34` is that quotient truncated; it is\n * smaller by a relative `6.127e-10`. Planck units below stay the published\n * CODATA 2018 values, which were computed from the truncated display.\n */\nexport const HBAR_SI = H_SI / (2 * Math.PI);\n\n/** The CODATA 2018 display value of ħ: {@link HBAR_SI} truncated. Kept so the difference is computed, not typed. @internal */\nexport const HBAR_CODATA_DISPLAY = 1.054571817e-34;\n\n/** Boltzmann constant (J/K). Exact SI definition since 2019. */\nexport const K_B_SI = 1.380649e-23;\n\n/** Elementary charge (C). Exact SI definition since 2019. */\nexport const E_SI = 1.602176634e-19;\n\n/** Fine-structure constant α (dimensionless). CODATA 2018. */\nexport const ALPHA = 7.2973525693e-3;\n\n/** Vacuum permittivity ε₀ (F/m). CODATA 2018. @internal */\nexport const EPS0_SI = 8.8541878128e-12;\n\n/** Vacuum permeability μ₀ = 1/(ε₀ c²) (H/m), from ε₀ and the exact c. @internal */\nexport const MU0_SI = 1 / (EPS0_SI * C_SI * C_SI);\n\n/** Stefan–Boltzmann constant σ (W m⁻² K⁻⁴). CODATA 2018. @internal */\nexport const SIGMA_SB_SI = 5.670374419e-8;\n\n/** Planck mass √(ℏc/G) (kg). CODATA 2018. */\nexport const M_P_SI = 2.176434e-8;\n\n/** Planck length √(ℏG/c³) (m). CODATA 2018. */\nexport const L_P_SI = 1.616255e-35;\n\n/** Planck time √(ℏG/c⁵) (s). CODATA 2018. */\nexport const T_P_SI = 5.391247e-44;\n\n/** The `scale` of the `symbol` row in `data/units.json`, which must be a plain decimal (metres for a length). */\nfunction unitTableDecimal(symbol: string): number {\n const file = checkedDataFile('units.json') as { readonly units: readonly { readonly symbols: readonly string[]; readonly scale: string }[] };\n const scale = file.units.find((row) => row.symbols.includes(symbol))?.scale;\n const value = scale === undefined ? Number.NaN : Number(scale);\n if (!Number.isFinite(value)) throw new Error(`data/units.json: the '${symbol}' row must state a decimal scale (got ${scale ?? 'no row'})`);\n return value;\n}\n\n/**\n * Hubble parameter H₀ (s⁻¹).\n *\n * Planck 2018 TT,TE,EE+lowE+lensing best estimate: 67.4 km/s/Mpc, converted\n * with the parsec of the unit table (`data/units.json`, 648000/π au), so it is\n * the value `convertValue('67.4km/s/Mpc', 'Hz')` reads: one Hubble rate,\n * 2.1842852410855023e-18 s⁻¹. The unit table is the one place the parsec is\n * written; this module reads it rather than restating it.\n */\nexport const H0_SI = 67.4e3 / (1e6 * unitTableDecimal('pc'));\n\n/**\n * Solar mass (kg). IAU 2015 nominal value rounded to the\n * repo-conventional literal (used by the BE-42 docstring, the\n * bridge-gradient tests, and the v0.8.0 calibration edges).\n * @public\n */\nexport const M_SUN_SI = 1.989e30;\n\n/** Solar mass in kilograms. The same value as {@link M_SUN_SI}. */\nexport const M_SUN_KG = M_SUN_SI;\n\n/** von Klitzing constant R_K = h/e² (ohm). */\nexport const VON_KLITZING_SI = H_SI / (E_SI * E_SI);\n\n/** Josephson constant K_J = 2e/h (Hz/V). */\nexport const JOSEPHSON_CONSTANT_SI = (2 * E_SI) / H_SI;\n\n/** Lorenz number L = (π²/3) (k_B/e)² (W Ω K⁻²). */\nexport const LORENZ_NUMBER_SI = (Math.PI ** 2 / 3) * (K_B_SI / E_SI) ** 2;\n\n/** Euler–Mascheroni constant γ. The BCS gap is π k_B T_c / e^γ; the formula name is `euler_gamma`. */\nexport const EULER_GAMMA = 0.5772156649015329;\n\n/** Weak-coupling BCS gap ratio 2Δ(0)/(k_B T_c) = 2π e^{−γ}. */\nexport const BCS_GAP_RATIO = (2 * Math.PI) / Math.exp(EULER_GAMMA);\n\n/** Lane-Emden n=3 dimensionless radius used by the white-dwarf mass. */\nexport const LANE_EMDEN_OMEGA3 = 2.01824;\n\n/** Thomson cross section (m²). */\nexport const THOMSON_CROSS_SECTION_SI = 6.6524587321e-29;\n\n/**\n * Nominal solar gravitational parameter (GM)☉ (m³ s⁻²), IAU 2015 Resolution B3.\n *\n * The product GM☉ is known to about 10 significant digits, while G alone is\n * known to about 5, so a confrontation that needs GM☉ takes this value rather\n * than `G_SI × M_SUN_SI`: that product is 3.0e-4 too high, five times the VLBI\n * 1σ on the solar-limb deflection. A mass that some evaluator requires in kg\n * is `GM_SUN_SI / G_SI`, which reproduces G·M = GM☉ exactly.\n * @public\n */\nexport const GM_SUN_SI = 1.3271244e20;\n\n/**\n * The solar mass (kg) that reproduces {@link GM_SUN_SI} with {@link G_SI}:\n * the double `GM_SUN_SI / G_SI`. The unit `Msun_iau` and the registry name\n * `Msun_iau` both read this one value.\n * @internal\n */\nexport const M_SUN_IAU_SI = GM_SUN_SI / G_SI;\n\n/**\n * Electron mass (kg), CODATA 2018. Added for the v0.11 namespacing\n * gate's criterion-3 pin (λ_T of an electron at the Hawking\n * temperature — see the Adam vet A-5).\n * @public\n */\nexport const M_E_SI = 9.1093837015e-31;\n\n/**\n * Proton mass (kg). CODATA 2018. Shared by the Eddington evaluator and\n * `upt eval` (`m_p`, `m_proton`). Not the Planck mass `M_P_SI`.\n * @internal\n */\nexport const M_PROTON_SI = 1.67262192369e-27;\n\n/**\n * Avogadro constant (mol⁻¹). Exact in the 2019 SI.\n * @internal\n */\nexport const N_A_SI = 6.02214076e23;\n\n/**\n * Faraday constant (C·mol⁻¹), `N_A * e`.\n * @internal\n */\nexport const FARADAY_SI = N_A_SI * E_SI;\n\n/**\n * Wien displacement-law constant b = λ_max·T (m·K). CODATA 2018.\n *\n * @public\n */\nexport const B_WIEN_SI = 2.897771955e-3;\n\n/**\n * Unified atomic mass unit (kg). CODATA 2018 atomic mass constant.\n * One value for the Chandrasekhar evaluator and the symbolic constant `m_u`.\n * Kept off the package barrel: callers use `m_u` in the symbolic registry.\n * @internal\n */\nexport const M_U_SI = 1.66053906660e-27;\n"]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The packaged data files under `data/`, read and checked against their schemas.
|
|
3
|
+
*
|
|
4
|
+
* Every data file the library loads has a schema beside it, named by one
|
|
5
|
+
* convention (`units.json` → `units.schema.json`), and is checked against it
|
|
6
|
+
* with {@link schemaProblems} when it loads, so a malformed file fails at load
|
|
7
|
+
* with every problem listed instead of failing later where a field is read.
|
|
8
|
+
* A file two modules read is parsed and checked once per process.
|
|
9
|
+
*
|
|
10
|
+
* @module core/data-file
|
|
11
|
+
*/
|
|
12
|
+
import { type JsonSchema } from './json-schema.js';
|
|
13
|
+
/** The schema file of `file`: `units.json` → `units.schema.json`. @internal */
|
|
14
|
+
export declare function schemaFileOf(file: string): string;
|
|
15
|
+
/** The text of `data/<file>`. @internal */
|
|
16
|
+
export declare function dataText(file: string): string;
|
|
17
|
+
/** The schema of `data/<file>`, parsed. @internal */
|
|
18
|
+
export declare function dataSchema(file: string): JsonSchema;
|
|
19
|
+
/**
|
|
20
|
+
* `text`, the contents of `data/<file>`, parsed and checked against `schema`.
|
|
21
|
+
* Throws listing every problem. A test passes a broken copy.
|
|
22
|
+
* @internal
|
|
23
|
+
*/
|
|
24
|
+
export declare function parseDataFile(file: string, text: string, schema: JsonSchema): unknown;
|
|
25
|
+
/** `data/<file>`, parsed and checked against its schema, once per process. @internal */
|
|
26
|
+
export declare function checkedDataFile(file: string): unknown;
|
|
27
|
+
//# sourceMappingURL=data-file.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-file.d.ts","sourceRoot":"","sources":["../../src/core/data-file.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAKH,OAAO,EAAkB,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAInE,+EAA+E;AAC/E,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEjD;AAED,2CAA2C;AAC3C,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE7C;AAED,qDAAqD;AACrD,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,CAEnD;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,GAAG,OAAO,CAKrF;AAID,wFAAwF;AACxF,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAGrD"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The packaged data files under `data/`, read and checked against their schemas.
|
|
3
|
+
*
|
|
4
|
+
* Every data file the library loads has a schema beside it, named by one
|
|
5
|
+
* convention (`units.json` → `units.schema.json`), and is checked against it
|
|
6
|
+
* with {@link schemaProblems} when it loads, so a malformed file fails at load
|
|
7
|
+
* with every problem listed instead of failing later where a field is read.
|
|
8
|
+
* A file two modules read is parsed and checked once per process.
|
|
9
|
+
*
|
|
10
|
+
* @module core/data-file
|
|
11
|
+
*/
|
|
12
|
+
import { readFileSync } from 'node:fs';
|
|
13
|
+
import { dirname, join } from 'node:path';
|
|
14
|
+
import { fileURLToPath } from 'node:url';
|
|
15
|
+
import { schemaProblems } from './json-schema.js';
|
|
16
|
+
const DATA_DIR = join(dirname(fileURLToPath(import.meta.url)), '../../data');
|
|
17
|
+
/** The schema file of `file`: `units.json` → `units.schema.json`. @internal */
|
|
18
|
+
export function schemaFileOf(file) {
|
|
19
|
+
return file.replace(/\.json$/, '.schema.json');
|
|
20
|
+
}
|
|
21
|
+
/** The text of `data/<file>`. @internal */
|
|
22
|
+
export function dataText(file) {
|
|
23
|
+
return readFileSync(join(DATA_DIR, file), 'utf8');
|
|
24
|
+
}
|
|
25
|
+
/** The schema of `data/<file>`, parsed. @internal */
|
|
26
|
+
export function dataSchema(file) {
|
|
27
|
+
return JSON.parse(dataText(schemaFileOf(file)));
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* `text`, the contents of `data/<file>`, parsed and checked against `schema`.
|
|
31
|
+
* Throws listing every problem. A test passes a broken copy.
|
|
32
|
+
* @internal
|
|
33
|
+
*/
|
|
34
|
+
export function parseDataFile(file, text, schema) {
|
|
35
|
+
const value = JSON.parse(text);
|
|
36
|
+
const problems = schemaProblems(schema, value);
|
|
37
|
+
if (problems.length > 0)
|
|
38
|
+
throw new Error(`data/${file} does not match data/${schemaFileOf(file)}:\n${problems.join('\n')}`);
|
|
39
|
+
return value;
|
|
40
|
+
}
|
|
41
|
+
const checked = new Map();
|
|
42
|
+
/** `data/<file>`, parsed and checked against its schema, once per process. @internal */
|
|
43
|
+
export function checkedDataFile(file) {
|
|
44
|
+
if (!checked.has(file))
|
|
45
|
+
checked.set(file, parseDataFile(file, dataText(file), dataSchema(file)));
|
|
46
|
+
return checked.get(file);
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=data-file.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-file.js","sourceRoot":"","sources":["../../src/core/data-file.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,E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AAG,CAAC,IAAI,EAAE,aAAa,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACjG,OAAO,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AAC3B,CAAC","sourcesContent":["/**\n * The packaged data files under `data/`, read and checked against their schemas.\n *\n * Every data file the library loads has a schema beside it, named by one\n * convention (`units.json` → `units.schema.json`), and is checked against it\n * with {@link schemaProblems} when it loads, so a malformed file fails at load\n * with every problem listed instead of failing later where a field is read.\n * A file two modules read is parsed and checked once per process.\n *\n * @module core/data-file\n */\n\nimport { readFileSync } from 'node:fs';\nimport { dirname, join } from 'node:path';\nimport { fileURLToPath } from 'node:url';\nimport { schemaProblems, type JsonSchema } from './json-schema.js';\n\nconst DATA_DIR = join(dirname(fileURLToPath(import.meta.url)), '../../data');\n\n/** The schema file of `file`: `units.json` → `units.schema.json`. @internal */\nexport function schemaFileOf(file: string): string {\n return file.replace(/\\.json$/, '.schema.json');\n}\n\n/** The text of `data/<file>`. @internal */\nexport function dataText(file: string): string {\n return readFileSync(join(DATA_DIR, file), 'utf8');\n}\n\n/** The schema of `data/<file>`, parsed. @internal */\nexport function dataSchema(file: string): JsonSchema {\n return JSON.parse(dataText(schemaFileOf(file))) as JsonSchema;\n}\n\n/**\n * `text`, the contents of `data/<file>`, parsed and checked against `schema`.\n * Throws listing every problem. A test passes a broken copy.\n * @internal\n */\nexport function parseDataFile(file: string, text: string, schema: JsonSchema): unknown {\n const value: unknown = JSON.parse(text);\n const problems = schemaProblems(schema, value);\n if (problems.length > 0) throw new Error(`data/${file} does not match data/${schemaFileOf(file)}:\\n${problems.join('\\n')}`);\n return value;\n}\n\nconst checked = new Map<string, unknown>();\n\n/** `data/<file>`, parsed and checked against its schema, once per process. @internal */\nexport function checkedDataFile(file: string): unknown {\n if (!checked.has(file)) checked.set(file, parseDataFile(file, dataText(file), dataSchema(file)));\n return checked.get(file);\n}\n"]}
|
package/dist/core/flux-rules.js
CHANGED
|
@@ -175,7 +175,7 @@ function checkEmergenceCoordinate(cell) {
|
|
|
175
175
|
return { ok: true };
|
|
176
176
|
}
|
|
177
177
|
// ---------------------------------------------------------------------------
|
|
178
|
-
// Rule 3 — Causality (
|
|
178
|
+
// Rule 3 — Causality (ERROR tier)
|
|
179
179
|
// ---------------------------------------------------------------------------
|
|
180
180
|
/**
|
|
181
181
|
* Pure dispatcher for Rule 3 over the `Cell` discriminated union.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flux-rules.js","sourceRoot":"","sources":["../../src/core/flux-rules.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AA0CH;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,OAAO,kBAAmB,SAAQ,KAAK;IAC3B,QAAQ,CAAe;IACvB,MAAM,CAAS;IAE/B,YAAY,QAAsB,EAAE,MAAc,EAAE,OAAe;QACjE,KAAK,CAAC,aAAa,QAAQ,wBAAwB,MAAM,MAAM,OAAO,EAAE,CAAC,CAAC;QAC1E,IAAI,CAAC,IAAI,GAAG,oBAAoB,CAAC;QACjC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;CACF;AAmDD,8EAA8E;AAC9E,oEAAoE;AACpE,8EAA8E;AAE9E;;;;;GAKG;AACH,MAAM,WAAW,GAAiC;IAChD,SAAS;IACT,YAAY;IACZ,WAAW;IACX,cAAc;CACf,CAAC;AAEF,SAAS,UAAU,CAAC,CAAgB;IAClC,OAAO,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;AAChC,CAAC;AAED;;;;;;GAMG;AACH,SAAS,aAAa,CACpB,GAAkB,EAClB,GAAkB;IAElB,MAAM,CAAC,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC;IAC1B,MAAM,CAAC,GAAG,UAAU,CAAC,GAAG,CAAC,CA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;;;GAKG;AACH,SAAS,sBAAsB,CAAC,IAAU;IACxC,IAAI,oBAAoB;QAAE,OAAO,oBAAoB,CAAC,IAAI,CAAC,CAAC;IAC5D,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC;AACtB,CAAC","sourcesContent":["/**\n * Flux-rule scaffolding for v0.7 Proposal 2 — Sparse Semantic Catalog.\n *\n * Defines:\n * - `FluxRuleKind` discriminated tag (@internal)\n * - `FluxRule`, `FluxRuleResult` registry shapes (@internal)\n * - `FluxDiagnostic`, `FluxReport` consumer shapes (@public)\n * - `FluxViolationError` (@public) thrown on ERROR-tier rule failures\n * - Rule 2 (L/B/E coordinate matching) and Rule 3 (Causality) — pure\n * functions over `Cell` / `BridgeCell`\n * - `runRules(cell, rules)` dispatcher with `_exhaustive: never`\n *\n * Rule 1 (Dimensional Consistency) ships in Phase 3 alongside the\n * catalog adapter — it operates on `BridgeEquationEntry`, not `Cell`,\n * per Decision #3 (resolves Adam-V3).\n *\n * Design: docs/planning/v0.7-Proposal-2-Design.md (redraft commit\n * 01632b5). Decisions #5, #6, #8 are load-bearing here.\n *\n * @module core/flux-rules\n */\n\nimport type {\n Cell,\n BridgeCell,\n LawCell,\n EmergenceCell,\n} from './cell.js';\nimport type { PhysicalScale } from './types.js';\n\n// ---------------------------------------------------------------------------\n// Public types (consumer-facing)\n// ---------------------------------------------------------------------------\n\n/**\n * A single rule-evaluation outcome surfaced to consumers via\n * `fluxDiagnostics()` or `FluxViolationError`. Severity follows the\n * info/warning/error tiering pinned in the design.\n *\n * @public\n */\nexport interface FluxDiagnostic {\n readonly severity: 'info' | 'warning' | 'error';\n readonly ruleName: FluxRuleKind;\n readonly cellId: string;\n readonly message: string;\n}\n\n/**\n * Aggregated report returned by `runRules()` / consumer-facing\n * `fluxDiagnostics()`. Per-tier counts are pre-computed for cheap\n * consumer-side branching.\n *\n * @public\n */\nexport interface FluxReport {\n readonly diagnostics: ReadonlyArray<FluxDiagnostic>;\n readonly errorCount: number;\n readonly warningCount: number;\n readonly infoCount: number;\n}\n\n/**\n * Thrown from `UniversalTensor.addCell` (Phase 2) when a Rule 2\n * (L/B/E coordinate-matching) violation fires. Rule 2 is ERROR-tier:\n * a `BridgeCell` with `source === target`, a `LawCell` with empty\n * `scales × forces`, or an `EmergenceCell` with `indices.length < 2`\n * fail-atomic.\n *\n * Rule 3 (Causality) is ERROR-tier as of v0.10.0 (user decision\n * 2026-06-11, promoted from the v0.7 WARNING tier after verifying the\n * live 23-cell submittable catalog has zero reverse arrows): a\n * `BridgeCell` whose source scale is COARSER than its target\n * (reverse of the canonical emergence direction) now fail-atomics.\n * Suppression for a deliberate reverse bridge goes through the\n * `causalityWhitelist` (entries earn their place via design review).\n *\n * @public\n */\nexport class FluxViolationError extends Error {\n public readonly ruleName: FluxRuleKind;\n public readonly cellId: string;\n\n constructor(ruleName: FluxRuleKind, cellId: string, message: string) {\n super(`FluxRule '${ruleName}' violated for cell '${cellId}': ${message}`);\n this.name = 'FluxViolationError';\n this.ruleName = ruleName;\n this.cellId = cellId;\n }\n}\n\n// ---------------------------------------------------------------------------\n// Internal types (registry implementation detail)\n// ---------------------------------------------------------------------------\n\n/**\n * Discriminated tag for the in-tree flux rules. Adding a new rule\n * kind forces a compile-time update to every `switch` over this\n * union via the `_exhaustive: never` discipline.\n *\n * - v0.7 (P2): `'dimensional-consistency' | 'lbe-coordinate' | 'causality'`\n * - v0.8 (P5): adds `'regime-consistency'` — fires from `addCell`\n * when a cell's attached regimes contradict the cell's coordinate\n * axes (e.g., a `LawCell` with `scales: ['classical']` attached\n * to a `quantum` regime via `attachRegimesToCell`).\n *\n * @internal — coupled to the registry's dispatch shape; not part of\n * the v0.7 public-API contract.\n */\nexport type FluxRuleKind =\n | 'dimensional-consistency'\n | 'lbe-coordinate'\n | 'causality'\n | 'regime-consistency';\n\n/**\n * Result returned by a single rule's `check()` body. `ok: true` means\n * the rule passed; `ok: false` means the rule violated. A diagnostic\n * may be attached on either path (`'info'` diagnostics ride with\n * `ok: true`; `'warning'` and `'error'` diagnostics ride with\n * `ok: false`).\n *\n * @internal\n */\nexport interface FluxRuleResult {\n readonly ok: boolean;\n readonly diagnostic?: FluxDiagnostic;\n}\n\n/**\n * A registered rule. The `check()` body is a pure function over\n * `Cell` (or a sub-variant if the rule only fires on one `kind`).\n *\n * @internal\n */\nexport interface FluxRule {\n readonly kind: FluxRuleKind;\n readonly check: (cell: Cell) => FluxRuleResult;\n}\n\n// ---------------------------------------------------------------------------\n// SCALE_ARROW — the partial-order on `PhysicalScale` used by Rule 3\n// ---------------------------------------------------------------------------\n\n/**\n * Ordered list of scales from finest to coarsest. The index encodes\n * the partial-order: lower index = finer (quantum), higher index =\n * coarser (cosmological). Used by Rule 3 (Causality) to classify\n * bridge direction as forward / lateral / reverse.\n */\nconst SCALE_ORDER: ReadonlyArray<PhysicalScale> = [\n 'quantum',\n 'mesoscopic',\n 'classical',\n 'cosmological',\n];\n\nfunction scaleIndex(s: PhysicalScale): number {\n return SCALE_ORDER.indexOf(s);\n}\n\n/**\n * Classify a bridge direction by source/target scale. `'reverse'` =\n * coarser→finer (e.g., classical→quantum), `'forward'` =\n * finer→coarser (the canonical emergent direction), `'lateral'` =\n * same scale. Per Decision #5, `'reverse'` triggers a warning\n * diagnostic.\n */\nfunction classifyArrow(\n src: PhysicalScale,\n dst: PhysicalScale,\n): 'forward' | 'lateral' | 'reverse' {\n const i = scaleIndex(src);\n const j = scaleIndex(dst);\n if (i === j) return 'lateral';\n return i < j ? 'forward' : 'reverse';\n}\n\n/**\n * Private per-cell-ID suppression list for Rule 3 (Causality). Empty\n * in v0.7; entries earn their place via design review (Decision #5\n * — the original \"timeReversalAnnotation: true\" on BridgeCell was\n * rejected as public-type contamination per Eve-R12).\n */\nconst causalityWhitelist: ReadonlySet<string> = new Set();\n\n// ---------------------------------------------------------------------------\n// Rule 2 — L/B/E coordinate matching (ERROR tier)\n// ---------------------------------------------------------------------------\n\n/**\n * Pure dispatcher for Rule 2 over the `Cell` discriminated union.\n * The three arms enforce the cell-shape invariants:\n *\n * - `LawCell` is diagonal: `scales × forces` cross-product must be\n * non-empty.\n * - `BridgeCell` is off-diagonal: `source !== target` by at least\n * one axis (already enforced by the legacy `addBridge` —\n * Rule 2 piggybacks for registry exhaustiveness).\n * - `EmergenceCell` spans multi-coordinate: `indices.length >= 2`.\n *\n * @internal\n */\nexport function checkLBECoordinate(cell: Cell): FluxRuleResult {\n switch (cell.kind) {\n case 'law':\n return checkLawCoordinate(cell);\n case 'bridge':\n return checkBridgeCoordinate(cell);\n case 'emergence':\n return checkEmergenceCoordinate(cell);\n default: {\n const _exhaustive: never = cell;\n void _exhaustive;\n throw new Error(`checkLBECoordinate: unknown cell kind`);\n }\n }\n}\n\nfunction checkLawCoordinate(cell: LawCell): FluxRuleResult {\n if (cell.scales.length === 0 || cell.forces.length === 0) {\n return {\n ok: false,\n diagnostic: {\n severity: 'error',\n ruleName: 'lbe-coordinate',\n cellId: cell.id,\n message:\n `LawCell '${cell.id}' has empty scales × forces cross-product ` +\n `(scales=[${cell.scales.join(',')}], forces=[${cell.forces.join(',')}]). ` +\n `A law must occupy at least one (scale, force) coordinate.`,\n },\n };\n }\n return { ok: true };\n}\n\nfunction checkBridgeCoordinate(cell: BridgeCell): FluxRuleResult {\n // A BridgeCell must differ between source and target on at least one\n // populated axis. The legacy `addBridge` at tensor.ts:217-226 already\n // enforces this; we re-implement here for registry exhaustiveness.\n const s = cell.source;\n const t = cell.target;\n const same =\n s.scale === t.scale &&\n s.force === t.force &&\n s.symmetry === t.symmetry &&\n s.information === t.information &&\n s.dimension === t.dimension &&\n s.topology === t.topology;\n if (same) {\n return {\n ok: false,\n diagnostic: {\n severity: 'error',\n ruleName: 'lbe-coordinate',\n cellId: cell.id,\n message:\n `BridgeCell '${cell.id}' has identical source and target ` +\n `coordinates. A bridge must connect two distinct regime axes.`,\n },\n };\n }\n return { ok: true };\n}\n\nfunction checkEmergenceCoordinate(cell: EmergenceCell): FluxRuleResult {\n if (cell.indices.length < 2) {\n return {\n ok: false,\n diagnostic: {\n severity: 'error',\n ruleName: 'lbe-coordinate',\n cellId: cell.id,\n message:\n `EmergenceCell '${cell.id}' has only ${cell.indices.length} ` +\n `index group(s); emergence requires at least 2 (higher-order ` +\n `correlations span multiple coordinates).`,\n },\n };\n }\n return { ok: true };\n}\n\n// ---------------------------------------------------------------------------\n// Rule 3 — Causality (ERROR tier)\n// ---------------------------------------------------------------------------\n\n/**\n * Pure dispatcher for Rule 3 over the `Cell` discriminated union.\n * Rule 3 only fires on `'bridge'`; the other arms always pass.\n *\n * Body for the bridge arm per Decision #5:\n * 1. Read `src = cell.source.scale`, `dst = cell.target.scale`.\n * 2. If either is `undefined`, emit `'info'` (\"scale-unspecified\n * skip\"); the rule still passes (`ok: true`).\n * 3. If `arrow = classifyArrow(src, dst) === 'reverse'`, FAIL with\n * an `'error'` diagnostic (ERROR tier as of v0.10.0 — promoted\n * from the v0.7 WARNING tier, user decision 2026-06-11).\n * 4. Suppression via the private `causalityWhitelist` (empty in\n * v0.7).\n *\n * @internal\n */\nexport function checkCausality(cell: Cell): FluxRuleResult {\n if (cell.kind !== 'bridge') return { ok: true };\n if (causalityWhitelist.has(cell.id)) return { ok: true };\n\n const src = cell.source.scale;\n const dst = cell.target.scale;\n if (src === undefined || dst === undefined) {\n return {\n ok: true,\n diagnostic: {\n severity: 'info',\n ruleName: 'causality',\n cellId: cell.id,\n message: `scale axis unspecified; causality check skipped`,\n },\n };\n }\n\n const arrow = classifyArrow(src, dst);\n if (arrow === 'reverse') {\n return {\n // ERROR tier as of v0.10.0 (promoted from the v0.7 WARNING tier\n // per user decision 2026-06-11; live catalog verified clean —\n // 23/23 submittable cells pass, zero reverse arrows). Deliberate\n // reverse bridges go through causalityWhitelist.\n ok: false,\n diagnostic: {\n severity: 'error',\n ruleName: 'causality',\n cellId: cell.id,\n message:\n `BridgeCell '${cell.id}' goes ${src}→${dst} (coarser→finer); ` +\n `the canonical emergence direction is finer→coarser. ` +\n `Add the cell id to the causality whitelist (design review) ` +\n `if the reverse direction is deliberate.`,\n },\n };\n }\n return { ok: true };\n}\n\n// ---------------------------------------------------------------------------\n// Registry dispatcher\n// ---------------------------------------------------------------------------\n\n/**\n * Run a set of rules against a single `cell` and aggregate the\n * diagnostics into a `FluxReport`. Pure function — no I/O, no\n * shared-state mutation.\n *\n * The switch over `FluxRuleKind` is exhaustive via the\n * `_exhaustive: never` default arm (Decision #8). Adding a new rule\n * kind forces a compile-time update here AND at every consumer\n * site that branches on `FluxRuleKind`.\n *\n * @internal\n */\nexport function runRules(\n cell: Cell,\n rules: ReadonlyArray<FluxRule>,\n): FluxReport {\n const diagnostics: FluxDiagnostic[] = [];\n let errorCount = 0;\n let warningCount = 0;\n let infoCount = 0;\n\n for (const rule of rules) {\n // Exhaustive dispatch on rule.kind. Even though `check` is the\n // same shape across kinds, branching here gives us the\n // compile-time guarantee that every kind is handled — a new\n // FluxRuleKind variant forces a compile error.\n let result: FluxRuleResult;\n switch (rule.kind) {\n case 'dimensional-consistency':\n result = rule.check(cell);\n break;\n case 'lbe-coordinate':\n result = rule.check(cell);\n break;\n case 'causality':\n result = rule.check(cell);\n break;\n case 'regime-consistency':\n result = rule.check(cell);\n break;\n default: {\n const _exhaustive: never = rule.kind;\n void _exhaustive;\n throw new Error(`runRules: unknown rule kind`);\n }\n }\n\n if (result.diagnostic) {\n diagnostics.push(result.diagnostic);\n switch (result.diagnostic.severity) {\n case 'error': errorCount++; break;\n case 'warning': warningCount++; break;\n case 'info': infoCount++; break;\n }\n }\n }\n\n return {\n diagnostics,\n errorCount,\n warningCount,\n infoCount,\n };\n}\n\n/**\n * The two v0.7 in-tree rules registered for Phase 2 `addCell`\n * dispatch. Rule 1 (Dimensional Consistency) is NOT here — it\n * operates on `BridgeEquationEntry`, not `Cell`, and ships in\n * Phase 3 alongside the catalog adapter.\n *\n * @internal\n */\nexport const V07_CELL_RULES: ReadonlyArray<FluxRule> = [\n { kind: 'lbe-coordinate', check: checkLBECoordinate },\n { kind: 'causality', check: checkCausality },\n { kind: 'regime-consistency', check: checkRegimeConsistency },\n];\n\n// ---------------------------------------------------------------------------\n// Rule 4 — Regime Consistency (v0.8 P5 Phase 4, WARNING tier)\n// ---------------------------------------------------------------------------\n\n// Lazy import dance — regime-registry is in the same dir, so a static\n// import would force regime-registry to load any time flux-rules\n// loads. Phase 4 keeps that decoupled via a registered-callable\n// pattern: P5's regime module registers its rule via\n// `installRegimeConsistencyRule` below at module-load.\n\ntype RegimeRuleBody = (cell: Cell) => FluxRuleResult;\n\nlet registeredRegimeRule: RegimeRuleBody | null = null;\n\n/**\n * Install P5's regime-consistency rule body. Called by\n * `src/core/regime-rule-install.ts` at its module load. If P5's\n * module is never imported, the regime check stays a no-op\n * (returns `ok: true` silently).\n *\n * @internal\n */\nexport function installRegimeConsistencyRule(body: RegimeRuleBody): void {\n registeredRegimeRule = body;\n}\n\n/**\n * Pure dispatcher for Rule 4 over `Cell`. Delegates to the body\n * installed by P5 if present; otherwise a permissive no-op.\n *\n * @internal\n */\nfunction checkRegimeConsistency(cell: Cell): FluxRuleResult {\n if (registeredRegimeRule) return registeredRegimeRule(cell);\n return { ok: true };\n}\n"]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A JSON Schema reader for the keyword subset the repository's data schemas use.
|
|
3
|
+
*
|
|
4
|
+
* The library adds no runtime dependency for this, so the schema a data file
|
|
5
|
+
* names is checked here, at load, and not only by a test. A keyword outside
|
|
6
|
+
* the subset is an error in the schema, not a keyword silently ignored, so a
|
|
7
|
+
* schema cannot state a rule this reader does not enforce.
|
|
8
|
+
*
|
|
9
|
+
* Subset: `type` (a name or an array of names), `required`, `properties`,
|
|
10
|
+
* `additionalProperties` (boolean or schema), `propertyNames`, `items`,
|
|
11
|
+
* `minItems`, `maxItems`, `uniqueItems`, `minLength`, `pattern`, `minimum`,
|
|
12
|
+
* `enum`, `const`, `if`/`then`/`else`, and `$ref` to `#/$defs/<name>` or `#/definitions/<name>`. `$schema`, `$id`, `$defs`,
|
|
13
|
+
* `title` and `description` are annotations.
|
|
14
|
+
*
|
|
15
|
+
* @module core/json-schema
|
|
16
|
+
*/
|
|
17
|
+
/** A JSON Schema document or subschema, as parsed from JSON. @internal */
|
|
18
|
+
export type JsonSchema = {
|
|
19
|
+
readonly [keyword: string]: unknown;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Every place `value` breaks `schema`, as `$.path: reason` lines. Empty when it conforms.
|
|
23
|
+
* Throws when the schema uses a keyword outside the subset.
|
|
24
|
+
* @internal
|
|
25
|
+
*/
|
|
26
|
+
export declare function schemaProblems(schema: JsonSchema, value: unknown): string[];
|
|
27
|
+
//# sourceMappingURL=json-schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"json-schema.d.ts","sourceRoot":"","sources":["../../src/core/json-schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,0EAA0E;AAC1E,MAAM,MAAM,UAAU,GAAG;IAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE,CAAC;AAkJjE;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,OAAO,GAAG,MAAM,EAAE,CAI3E"}
|