universal-physics-tensor 0.5.1 → 0.7.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 +66 -105
- package/dist/bridges/catalog-adapter.d.ts +116 -0
- package/dist/bridges/catalog-adapter.d.ts.map +1 -0
- package/dist/bridges/catalog-adapter.js +302 -0
- package/dist/bridges/catalog-adapter.js.map +1 -0
- package/dist/bridges/equations/_be-helpers.d.ts +145 -0
- package/dist/bridges/equations/_be-helpers.d.ts.map +1 -0
- package/dist/bridges/equations/_be-helpers.js +179 -0
- package/dist/bridges/equations/_be-helpers.js.map +1 -0
- package/dist/bridges/equations/be-11-decoherence-master.d.ts +1 -2
- package/dist/bridges/equations/be-11-decoherence-master.d.ts.map +1 -1
- package/dist/bridges/equations/be-11-decoherence-master.js +9 -20
- package/dist/bridges/equations/be-11-decoherence-master.js.map +1 -1
- package/dist/bridges/equations/be-12-coherence-length.d.ts +7 -1
- package/dist/bridges/equations/be-12-coherence-length.d.ts.map +1 -1
- package/dist/bridges/equations/be-12-coherence-length.js +8 -16
- package/dist/bridges/equations/be-12-coherence-length.js.map +1 -1
- package/dist/bridges/equations/be-13-einstein-trace.d.ts +51 -3
- package/dist/bridges/equations/be-13-einstein-trace.d.ts.map +1 -1
- package/dist/bridges/equations/be-13-einstein-trace.js +74 -17
- package/dist/bridges/equations/be-13-einstein-trace.js.map +1 -1
- package/dist/bridges/equations/be-14-ryu-takayanagi.d.ts +10 -4
- package/dist/bridges/equations/be-14-ryu-takayanagi.d.ts.map +1 -1
- package/dist/bridges/equations/be-14-ryu-takayanagi.js +6 -17
- package/dist/bridges/equations/be-14-ryu-takayanagi.js.map +1 -1
- package/dist/bridges/equations/be-15-emergence.d.ts +7 -1
- package/dist/bridges/equations/be-15-emergence.d.ts.map +1 -1
- package/dist/bridges/equations/be-15-emergence.js +12 -22
- package/dist/bridges/equations/be-15-emergence.js.map +1 -1
- package/dist/bridges/equations/be-16-landauer.d.ts +7 -1
- package/dist/bridges/equations/be-16-landauer.d.ts.map +1 -1
- package/dist/bridges/equations/be-16-landauer.js +5 -13
- package/dist/bridges/equations/be-16-landauer.js.map +1 -1
- package/dist/bridges/equations/be-17-einstein-cartan.d.ts +26 -13
- package/dist/bridges/equations/be-17-einstein-cartan.d.ts.map +1 -1
- package/dist/bridges/equations/be-17-einstein-cartan.js +28 -31
- package/dist/bridges/equations/be-17-einstein-cartan.js.map +1 -1
- package/dist/bridges/equations/be-18-higgs-mass.d.ts +7 -1
- package/dist/bridges/equations/be-18-higgs-mass.d.ts.map +1 -1
- package/dist/bridges/equations/be-18-higgs-mass.js +5 -16
- package/dist/bridges/equations/be-18-higgs-mass.js.map +1 -1
- package/dist/bridges/equations/be-19-quantum-bounce.d.ts +38 -3
- package/dist/bridges/equations/be-19-quantum-bounce.d.ts.map +1 -1
- package/dist/bridges/equations/be-19-quantum-bounce.js +69 -20
- package/dist/bridges/equations/be-19-quantum-bounce.js.map +1 -1
- package/dist/bridges/equations/be-20-vacuum-energy.d.ts +20 -1
- package/dist/bridges/equations/be-20-vacuum-energy.d.ts.map +1 -1
- package/dist/bridges/equations/be-20-vacuum-energy.js +36 -15
- package/dist/bridges/equations/be-20-vacuum-energy.js.map +1 -1
- package/dist/bridges/equations/be-21-kss-bound.d.ts +2 -0
- package/dist/bridges/equations/be-21-kss-bound.d.ts.map +1 -1
- package/dist/bridges/equations/be-21-kss-bound.js +4 -10
- package/dist/bridges/equations/be-21-kss-bound.js.map +1 -1
- package/dist/bridges/equations/be-22-topological-entanglement.d.ts +6 -9
- package/dist/bridges/equations/be-22-topological-entanglement.d.ts.map +1 -1
- package/dist/bridges/equations/be-22-topological-entanglement.js +9 -21
- package/dist/bridges/equations/be-22-topological-entanglement.js.map +1 -1
- package/dist/bridges/equations/be-23-syk-planckian.d.ts +7 -1
- package/dist/bridges/equations/be-23-syk-planckian.d.ts.map +1 -1
- package/dist/bridges/equations/be-23-syk-planckian.js +11 -25
- package/dist/bridges/equations/be-23-syk-planckian.js.map +1 -1
- package/dist/bridges/equations/be-24-foerster-fret.d.ts +7 -1
- package/dist/bridges/equations/be-24-foerster-fret.d.ts.map +1 -1
- package/dist/bridges/equations/be-24-foerster-fret.js +8 -16
- package/dist/bridges/equations/be-24-foerster-fret.js.map +1 -1
- package/dist/bridges/equations/be-25-iit-phi.d.ts +7 -1
- package/dist/bridges/equations/be-25-iit-phi.d.ts.map +1 -1
- package/dist/bridges/equations/be-25-iit-phi.js +12 -16
- package/dist/bridges/equations/be-25-iit-phi.js.map +1 -1
- package/dist/bridges/equations/be-25-orch-or.d.ts +6 -3
- package/dist/bridges/equations/be-25-orch-or.d.ts.map +1 -1
- package/dist/bridges/equations/be-25-orch-or.js +8 -17
- package/dist/bridges/equations/be-25-orch-or.js.map +1 -1
- package/dist/bridges/equations/be-26-dna-tunneling.d.ts +6 -3
- package/dist/bridges/equations/be-26-dna-tunneling.d.ts.map +1 -1
- package/dist/bridges/equations/be-26-dna-tunneling.js +11 -26
- package/dist/bridges/equations/be-26-dna-tunneling.js.map +1 -1
- package/dist/bridges/equations/be-27-effective-temperature.d.ts +7 -1
- package/dist/bridges/equations/be-27-effective-temperature.d.ts.map +1 -1
- package/dist/bridges/equations/be-27-effective-temperature.js +8 -16
- package/dist/bridges/equations/be-27-effective-temperature.js.map +1 -1
- package/dist/bridges/equations/be-28-onsager-entropy-production.d.ts +7 -1
- package/dist/bridges/equations/be-28-onsager-entropy-production.d.ts.map +1 -1
- package/dist/bridges/equations/be-28-onsager-entropy-production.js +9 -13
- package/dist/bridges/equations/be-28-onsager-entropy-production.js.map +1 -1
- package/dist/bridges/equations/be-29-jarzynski.d.ts +7 -1
- package/dist/bridges/equations/be-29-jarzynski.d.ts.map +1 -1
- package/dist/bridges/equations/be-29-jarzynski.js +8 -13
- package/dist/bridges/equations/be-29-jarzynski.js.map +1 -1
- package/dist/bridges/equations/be-30-flm-first-law.d.ts +11 -2
- package/dist/bridges/equations/be-30-flm-first-law.d.ts.map +1 -1
- package/dist/bridges/equations/be-30-flm-first-law.js +10 -21
- package/dist/bridges/equations/be-30-flm-first-law.js.map +1 -1
- package/dist/bridges/equations/be-31-causal-set-bd.d.ts +7 -1
- package/dist/bridges/equations/be-31-causal-set-bd.d.ts.map +1 -1
- package/dist/bridges/equations/be-31-causal-set-bd.js +11 -25
- package/dist/bridges/equations/be-31-causal-set-bd.js.map +1 -1
- package/dist/bridges/equations/be-32-quantum-reference-frame.d.ts +6 -9
- package/dist/bridges/equations/be-32-quantum-reference-frame.d.ts.map +1 -1
- package/dist/bridges/equations/be-32-quantum-reference-frame.js +8 -18
- package/dist/bridges/equations/be-32-quantum-reference-frame.js.map +1 -1
- package/dist/bridges/equations/be-33-hertz-millis.d.ts +53 -28
- package/dist/bridges/equations/be-33-hertz-millis.d.ts.map +1 -1
- package/dist/bridges/equations/be-33-hertz-millis.js +55 -51
- package/dist/bridges/equations/be-33-hertz-millis.js.map +1 -1
- package/dist/bridges/equations/be-34-kibble-zurek.d.ts +6 -3
- package/dist/bridges/equations/be-34-kibble-zurek.d.ts.map +1 -1
- package/dist/bridges/equations/be-34-kibble-zurek.js +15 -26
- package/dist/bridges/equations/be-34-kibble-zurek.js.map +1 -1
- package/dist/bridges/equations/be-35-conformal-bootstrap.d.ts +6 -9
- package/dist/bridges/equations/be-35-conformal-bootstrap.d.ts.map +1 -1
- package/dist/bridges/equations/be-35-conformal-bootstrap.js +9 -21
- package/dist/bridges/equations/be-35-conformal-bootstrap.js.map +1 -1
- package/dist/bridges/equations/be-36-gw-speed-bound.d.ts +7 -1
- package/dist/bridges/equations/be-36-gw-speed-bound.d.ts.map +1 -1
- package/dist/bridges/equations/be-36-gw-speed-bound.js +5 -13
- package/dist/bridges/equations/be-36-gw-speed-bound.js.map +1 -1
- package/dist/bridges/equations/be-37-shapiro-delay.d.ts +4 -2
- package/dist/bridges/equations/be-37-shapiro-delay.d.ts.map +1 -1
- package/dist/bridges/equations/be-37-shapiro-delay.js +15 -28
- package/dist/bridges/equations/be-37-shapiro-delay.js.map +1 -1
- package/dist/bridges/equations/be-38-mond.d.ts +7 -1
- package/dist/bridges/equations/be-38-mond.d.ts.map +1 -1
- package/dist/bridges/equations/be-38-mond.js +9 -19
- package/dist/bridges/equations/be-38-mond.js.map +1 -1
- package/dist/bridges/equations/be-39-asymptotic-safety.d.ts +66 -2
- package/dist/bridges/equations/be-39-asymptotic-safety.d.ts.map +1 -1
- package/dist/bridges/equations/be-39-asymptotic-safety.js +128 -20
- package/dist/bridges/equations/be-39-asymptotic-safety.js.map +1 -1
- package/dist/bridges/equations/be-40-composite-higgs.d.ts +7 -1
- package/dist/bridges/equations/be-40-composite-higgs.d.ts.map +1 -1
- package/dist/bridges/equations/be-40-composite-higgs.js +10 -22
- package/dist/bridges/equations/be-40-composite-higgs.js.map +1 -1
- package/dist/bridges/equations/be-41-swampland.d.ts +6 -3
- package/dist/bridges/equations/be-41-swampland.d.ts.map +1 -1
- package/dist/bridges/equations/be-41-swampland.js +11 -23
- package/dist/bridges/equations/be-41-swampland.js.map +1 -1
- package/dist/bridges/equations/be-42-hawking-temperature.d.ts +2 -0
- package/dist/bridges/equations/be-42-hawking-temperature.d.ts.map +1 -1
- package/dist/bridges/equations/be-42-hawking-temperature.js +5 -13
- package/dist/bridges/equations/be-42-hawking-temperature.js.map +1 -1
- package/dist/bridges/equations/be-43-er-epr.d.ts +7 -1
- package/dist/bridges/equations/be-43-er-epr.d.ts.map +1 -1
- package/dist/bridges/equations/be-43-er-epr.js +5 -13
- package/dist/bridges/equations/be-43-er-epr.js.map +1 -1
- package/dist/bridges/equations/be-44-soft-hair.d.ts +7 -1
- package/dist/bridges/equations/be-44-soft-hair.d.ts.map +1 -1
- package/dist/bridges/equations/be-44-soft-hair.js +5 -13
- package/dist/bridges/equations/be-44-soft-hair.js.map +1 -1
- package/dist/bridges/equations/be-45-tcc.d.ts +7 -1
- package/dist/bridges/equations/be-45-tcc.d.ts.map +1 -1
- package/dist/bridges/equations/be-45-tcc.js +10 -22
- package/dist/bridges/equations/be-45-tcc.js.map +1 -1
- package/dist/bridges/equations/be-46-multiverse-measure.d.ts +7 -1
- package/dist/bridges/equations/be-46-multiverse-measure.d.ts.map +1 -1
- package/dist/bridges/equations/be-46-multiverse-measure.js +9 -19
- package/dist/bridges/equations/be-46-multiverse-measure.js.map +1 -1
- package/dist/bridges/equations/be-47-bbn-dark-sector.d.ts +7 -1
- package/dist/bridges/equations/be-47-bbn-dark-sector.d.ts.map +1 -1
- package/dist/bridges/equations/be-47-bbn-dark-sector.js +14 -16
- package/dist/bridges/equations/be-47-bbn-dark-sector.js.map +1 -1
- package/dist/bridges/equations/be-48-grw-localization.d.ts +7 -1
- package/dist/bridges/equations/be-48-grw-localization.d.ts.map +1 -1
- package/dist/bridges/equations/be-48-grw-localization.js +15 -20
- package/dist/bridges/equations/be-48-grw-localization.js.map +1 -1
- package/dist/bridges/equations/be-49-quantum-darwinism.d.ts +7 -1
- package/dist/bridges/equations/be-49-quantum-darwinism.d.ts.map +1 -1
- package/dist/bridges/equations/be-49-quantum-darwinism.js +10 -22
- package/dist/bridges/equations/be-49-quantum-darwinism.js.map +1 -1
- package/dist/bridges/equations/be-50-wheeler-feynman.d.ts +42 -12
- package/dist/bridges/equations/be-50-wheeler-feynman.d.ts.map +1 -1
- package/dist/bridges/equations/be-50-wheeler-feynman.js +84 -20
- package/dist/bridges/equations/be-50-wheeler-feynman.js.map +1 -1
- package/dist/bridges/equations/be-53-yang-mills-beta.d.ts +158 -0
- package/dist/bridges/equations/be-53-yang-mills-beta.d.ts.map +1 -0
- package/dist/bridges/equations/be-53-yang-mills-beta.js +175 -0
- package/dist/bridges/equations/be-53-yang-mills-beta.js.map +1 -0
- package/dist/bridges/equations/be-54-randall-sundrum-brane.d.ts +117 -0
- package/dist/bridges/equations/be-54-randall-sundrum-brane.d.ts.map +1 -0
- package/dist/bridges/equations/be-54-randall-sundrum-brane.js +213 -0
- package/dist/bridges/equations/be-54-randall-sundrum-brane.js.map +1 -0
- package/dist/bridges/index.d.ts +40 -1
- package/dist/bridges/index.d.ts.map +1 -1
- package/dist/bridges/index.js +130 -48
- package/dist/bridges/index.js.map +1 -1
- package/dist/bridges/perihelion-precession-labeled.d.ts +46 -0
- package/dist/bridges/perihelion-precession-labeled.d.ts.map +1 -0
- package/dist/bridges/perihelion-precession-labeled.js +54 -0
- package/dist/bridges/perihelion-precession-labeled.js.map +1 -0
- package/dist/core/axes-registry.d.ts +67 -0
- package/dist/core/axes-registry.d.ts.map +1 -0
- package/dist/core/axes-registry.js +75 -0
- package/dist/core/axes-registry.js.map +1 -0
- package/dist/core/cell.d.ts +176 -0
- package/dist/core/cell.d.ts.map +1 -0
- package/dist/core/cell.js +166 -0
- package/dist/core/cell.js.map +1 -0
- package/dist/core/flux-rules.d.ts +176 -0
- package/dist/core/flux-rules.d.ts.map +1 -0
- package/dist/core/flux-rules.js +329 -0
- package/dist/core/flux-rules.js.map +1 -0
- package/dist/core/labeled-tensor.d.ts +143 -0
- package/dist/core/labeled-tensor.d.ts.map +1 -0
- package/dist/core/labeled-tensor.js +275 -0
- package/dist/core/labeled-tensor.js.map +1 -0
- package/dist/core/regime-registry.d.ts +169 -0
- package/dist/core/regime-registry.d.ts.map +1 -0
- package/dist/core/regime-registry.js +174 -0
- package/dist/core/regime-registry.js.map +1 -0
- package/dist/core/regime-rule-install.d.ts +26 -0
- package/dist/core/regime-rule-install.d.ts.map +1 -0
- package/dist/core/regime-rule-install.js +90 -0
- package/dist/core/regime-rule-install.js.map +1 -0
- package/dist/core/regimes-builtins.d.ts +22 -0
- package/dist/core/regimes-builtins.d.ts.map +1 -0
- package/dist/core/regimes-builtins.js +96 -0
- package/dist/core/regimes-builtins.js.map +1 -0
- package/dist/core/tensor.d.ts +112 -0
- package/dist/core/tensor.d.ts.map +1 -1
- package/dist/core/tensor.js +366 -0
- package/dist/core/tensor.js.map +1 -1
- package/dist/core/types.d.ts +7 -2
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/types.js.map +1 -1
- package/dist/core/universal-index.d.ts +97 -0
- package/dist/core/universal-index.d.ts.map +1 -0
- package/dist/core/universal-index.js +70 -0
- package/dist/core/universal-index.js.map +1 -0
- package/dist/diff/bridge-gradient.d.ts +94 -0
- package/dist/diff/bridge-gradient.d.ts.map +1 -0
- package/dist/diff/bridge-gradient.js +83 -0
- package/dist/diff/bridge-gradient.js.map +1 -0
- package/dist/diff/bridge-specs.d.ts +68 -0
- package/dist/diff/bridge-specs.d.ts.map +1 -0
- package/dist/diff/bridge-specs.js +96 -0
- package/dist/diff/bridge-specs.js.map +1 -0
- package/dist/dimensional/bridge-check.d.ts.map +1 -1
- package/dist/dimensional/bridge-check.js +8 -0
- package/dist/dimensional/bridge-check.js.map +1 -1
- package/dist/dimensional/connection-validators.d.ts +12 -5
- package/dist/dimensional/connection-validators.d.ts.map +1 -1
- package/dist/dimensional/connection-validators.js.map +1 -1
- package/dist/dimensional/curvature-composite.d.ts +90 -0
- package/dist/dimensional/curvature-composite.d.ts.map +1 -0
- package/dist/dimensional/curvature-composite.js +57 -0
- package/dist/dimensional/curvature-composite.js.map +1 -0
- package/dist/dimensional/curvature-invariants.d.ts +90 -0
- package/dist/dimensional/curvature-invariants.d.ts.map +1 -0
- package/dist/dimensional/curvature-invariants.js +64 -0
- package/dist/dimensional/curvature-invariants.js.map +1 -0
- package/dist/dimensional/curvature.d.ts +46 -30
- package/dist/dimensional/curvature.d.ts.map +1 -1
- package/dist/dimensional/curvature.js.map +1 -1
- package/dist/dimensional/einstein-equation.d.ts +126 -0
- package/dist/dimensional/einstein-equation.d.ts.map +1 -0
- package/dist/dimensional/einstein-equation.js +122 -0
- package/dist/dimensional/einstein-equation.js.map +1 -0
- package/dist/dimensional/field-equation-helpers.d.ts +82 -0
- package/dist/dimensional/field-equation-helpers.d.ts.map +1 -0
- package/dist/dimensional/field-equation-helpers.js +123 -0
- package/dist/dimensional/field-equation-helpers.js.map +1 -0
- package/dist/dimensional/friedmann-equation.d.ts +148 -0
- package/dist/dimensional/friedmann-equation.d.ts.map +1 -0
- package/dist/dimensional/friedmann-equation.js +150 -0
- package/dist/dimensional/friedmann-equation.js.map +1 -0
- package/dist/dimensional/gauge-field.d.ts +182 -0
- package/dist/dimensional/gauge-field.d.ts.map +1 -0
- package/dist/dimensional/gauge-field.js +134 -0
- package/dist/dimensional/gauge-field.js.map +1 -0
- package/dist/dimensional/killing-validators.d.ts +94 -0
- package/dist/dimensional/killing-validators.d.ts.map +1 -0
- package/dist/dimensional/killing-validators.js +66 -0
- package/dist/dimensional/killing-validators.js.map +1 -0
- package/dist/dimensional/klein-gordon-equation.d.ts +113 -0
- package/dist/dimensional/klein-gordon-equation.d.ts.map +1 -0
- package/dist/dimensional/klein-gordon-equation.js +98 -0
- package/dist/dimensional/klein-gordon-equation.js.map +1 -0
- package/dist/dimensional/rg-flow.d.ts +156 -0
- package/dist/dimensional/rg-flow.d.ts.map +1 -0
- package/dist/dimensional/rg-flow.js +150 -0
- package/dist/dimensional/rg-flow.js.map +1 -0
- package/dist/dimensional/stress-energy-validators.d.ts +74 -0
- package/dist/dimensional/stress-energy-validators.d.ts.map +1 -0
- package/dist/dimensional/stress-energy-validators.js +47 -0
- package/dist/dimensional/stress-energy-validators.js.map +1 -0
- package/dist/dimensional/tensor-trace.d.ts +128 -0
- package/dist/dimensional/tensor-trace.d.ts.map +1 -0
- package/dist/dimensional/tensor-trace.js +95 -0
- package/dist/dimensional/tensor-trace.js.map +1 -0
- package/dist/dimensional/tensor.d.ts +6 -8
- package/dist/dimensional/tensor.d.ts.map +1 -1
- package/dist/dimensional/tensor.js +3 -1
- package/dist/dimensional/tensor.js.map +1 -1
- package/dist/dimensional/validator-registry.d.ts +90 -0
- package/dist/dimensional/validator-registry.d.ts.map +1 -0
- package/dist/dimensional/validator-registry.js +131 -0
- package/dist/dimensional/validator-registry.js.map +1 -0
- package/dist/dimensional/validator.d.ts +12 -2
- package/dist/dimensional/validator.d.ts.map +1 -1
- package/dist/dimensional/validator.js +60 -75
- package/dist/dimensional/validator.js.map +1 -1
- package/dist/dimensional/weyl-validators.d.ts +84 -0
- package/dist/dimensional/weyl-validators.d.ts.map +1 -0
- package/dist/dimensional/weyl-validators.js +84 -0
- package/dist/dimensional/weyl-validators.js.map +1 -0
- package/dist/index.d.ts +37 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +41 -0
- package/dist/index.js.map +1 -1
- package/dist/numerical/be37-covariant-eikonal.d.ts +19 -0
- package/dist/numerical/be37-covariant-eikonal.d.ts.map +1 -1
- package/dist/numerical/be37-covariant-eikonal.js +29 -9
- package/dist/numerical/be37-covariant-eikonal.js.map +1 -1
- package/dist/numerical/christoffel-flat.d.ts +49 -0
- package/dist/numerical/christoffel-flat.d.ts.map +1 -0
- package/dist/numerical/christoffel-flat.js +86 -0
- package/dist/numerical/christoffel-flat.js.map +1 -0
- package/dist/numerical/curvature-lowering-helpers.d.ts +49 -57
- package/dist/numerical/curvature-lowering-helpers.d.ts.map +1 -1
- package/dist/numerical/curvature-lowering-helpers.js +109 -4
- package/dist/numerical/curvature-lowering-helpers.js.map +1 -1
- package/dist/numerical/derivative-lowering.d.ts +67 -0
- package/dist/numerical/derivative-lowering.d.ts.map +1 -0
- package/dist/numerical/derivative-lowering.js +243 -0
- package/dist/numerical/derivative-lowering.js.map +1 -0
- package/dist/numerical/einstein-equation.d.ts +106 -0
- package/dist/numerical/einstein-equation.d.ts.map +1 -0
- package/dist/numerical/einstein-equation.js +172 -0
- package/dist/numerical/einstein-equation.js.map +1 -0
- package/dist/numerical/geodesic-integrator.d.ts +7 -4
- package/dist/numerical/geodesic-integrator.d.ts.map +1 -1
- package/dist/numerical/geodesic-integrator.js +5 -1
- package/dist/numerical/geodesic-integrator.js.map +1 -1
- package/dist/numerical/gl4-integrator.d.ts +4 -2
- package/dist/numerical/gl4-integrator.d.ts.map +1 -1
- package/dist/numerical/gl4-integrator.js +24 -8
- package/dist/numerical/gl4-integrator.js.map +1 -1
- package/dist/numerical/killing.d.ts +157 -0
- package/dist/numerical/killing.d.ts.map +1 -0
- package/dist/numerical/killing.js +242 -0
- package/dist/numerical/killing.js.map +1 -0
- package/dist/numerical/kretschmann.d.ts +62 -0
- package/dist/numerical/kretschmann.d.ts.map +1 -0
- package/dist/numerical/kretschmann.js +88 -0
- package/dist/numerical/kretschmann.js.map +1 -0
- package/dist/numerical/lowering-utils.d.ts +47 -0
- package/dist/numerical/lowering-utils.d.ts.map +1 -0
- package/dist/numerical/lowering-utils.js +64 -0
- package/dist/numerical/lowering-utils.js.map +1 -0
- package/dist/numerical/lowering.d.ts +1 -29
- package/dist/numerical/lowering.d.ts.map +1 -1
- package/dist/numerical/lowering.js +219 -415
- package/dist/numerical/lowering.js.map +1 -1
- package/dist/numerical/null-ic.d.ts +40 -0
- package/dist/numerical/null-ic.d.ts.map +1 -0
- package/dist/numerical/null-ic.js +50 -0
- package/dist/numerical/null-ic.js.map +1 -0
- package/dist/numerical/null-ray-integrator.d.ts +3 -2
- package/dist/numerical/null-ray-integrator.d.ts.map +1 -1
- package/dist/numerical/painleve-gullstrand-metric.d.ts +74 -0
- package/dist/numerical/painleve-gullstrand-metric.d.ts.map +1 -0
- package/dist/numerical/painleve-gullstrand-metric.js +121 -0
- package/dist/numerical/painleve-gullstrand-metric.js.map +1 -0
- package/dist/numerical/pderiv.d.ts +17 -9
- package/dist/numerical/pderiv.d.ts.map +1 -1
- package/dist/numerical/pderiv.js +6 -3
- package/dist/numerical/pderiv.js.map +1 -1
- package/dist/numerical/perihelion-finder.d.ts +30 -0
- package/dist/numerical/perihelion-finder.d.ts.map +1 -1
- package/dist/numerical/perihelion-finder.js +30 -0
- package/dist/numerical/perihelion-finder.js.map +1 -1
- package/dist/numerical/tensor-engine.d.ts +2 -2
- package/dist/numerical/tensor-engine.d.ts.map +1 -1
- package/dist/numerical/weyl-lowering.d.ts +60 -0
- package/dist/numerical/weyl-lowering.d.ts.map +1 -0
- package/dist/numerical/weyl-lowering.js +111 -0
- package/dist/numerical/weyl-lowering.js.map +1 -0
- package/package.json +9 -7
package/README.md
CHANGED
|
@@ -113,7 +113,7 @@ Where:
|
|
|
113
113
|
- **B** (Bridges): Off-diagonal equations connecting regimes
|
|
114
114
|
- **E** (Emergence): Higher-order correlations producing emergent phenomena
|
|
115
115
|
|
|
116
|
-
> **Note on notation:** the "+" here denotes disjoint union of catalog entries (each tensor slot holds content of exactly one category), not algebraic addition.
|
|
116
|
+
> **Note on notation:** the "+" here denotes disjoint union of catalog entries (each tensor slot holds content of exactly one category), not algebraic addition. The type system enforces this disjointness via the `Cell` discriminated union in [`src/core/cell.ts`](src/core/cell.ts); `UniversalTensor.populatedCells()` is the canonical way to enumerate the populated catalog as typed `Cell` values. See also [Part I §1.2](docs/specification/Part-I.md) for the spec-level treatment. Different slots may hold quantities of different physical dimensions (e.g., a Lagrangian density and a decoherence rate) and cannot be summed numerically.
|
|
117
117
|
|
|
118
118
|
### Bridge Equations
|
|
119
119
|
|
|
@@ -131,7 +131,7 @@ Bridge equations connect different physical regimes:
|
|
|
131
131
|
- Universal Emergence Equation
|
|
132
132
|
- Complexity-Entropy Production Relation
|
|
133
133
|
|
|
134
|
-
See [Part I](docs/specification/Part-I.md) and [Part II](docs/specification/Part-II.md) of the formal specification for the complete bridge equation catalog (Bridge Equations 11–
|
|
134
|
+
See [Part I](docs/specification/Part-I.md) and [Part II](docs/specification/Part-II.md) of the formal specification for the complete bridge equation catalog (Bridge Equations 11–52). Part III covers algorithmic implementation.
|
|
135
135
|
|
|
136
136
|
## Documentation
|
|
137
137
|
|
|
@@ -139,7 +139,7 @@ See [Part I](docs/specification/Part-I.md) and [Part II](docs/specification/Part
|
|
|
139
139
|
Complete theoretical foundation of the Universal Physics Tensor Framework:
|
|
140
140
|
|
|
141
141
|
- **[Part I: Foundation & Mathematical Framework](docs/specification/Part-I.md)** - Tensor structure, Π = L + B + E decomposition, Bridge Equations 11-20
|
|
142
|
-
- **[Part II: Extended Bridge Equation Catalog](docs/specification/Part-II.md)** - Bridge Equations 21-
|
|
142
|
+
- **[Part II: Extended Bridge Equation Catalog](docs/specification/Part-II.md)** - Bridge Equations 21-52 across condensed matter, quantum biology, emergent spacetime
|
|
143
143
|
- **[Part III: Computational Implementation](docs/specification/Part-III.md)** - Algorithms, information-theoretic bounds, ML integration
|
|
144
144
|
- **[Part IV: Validation & Implications](docs/specification/Part-IV.md)** - Experimental pathways, philosophical implications, applications
|
|
145
145
|
- **[Part V: Advanced Mathematics & Protocols](docs/specification/Part-V.md)** - Category theory extensions, validation protocols, algorithmic analysis
|
|
@@ -163,106 +163,85 @@ npm run bench # interactive run (median, p99, ops/sec)
|
|
|
163
163
|
npm run bench:ci # verbose run for CI log capture
|
|
164
164
|
```
|
|
165
165
|
|
|
166
|
-
|
|
167
|
-
These are **correctness-first baselines, not optimization targets
|
|
168
|
-
|
|
166
|
+
Baseline results are recorded in [`docs/architecture/benchmarks.md`](docs/architecture/benchmarks.md).
|
|
167
|
+
These are **correctness-first baselines, not optimization targets**. Comparative
|
|
168
|
+
analysis has since landed: v0.6.0's BR-2 `christoffelFn` flat-array refactor
|
|
169
|
+
delivered a measured **5-6× RK4 geodesic-integrator speedup** (see [CHANGELOG](CHANGELOG.md)).
|
|
169
170
|
|
|
170
171
|
## Development Status
|
|
171
172
|
|
|
172
|
-
**Current Version:** v0.
|
|
173
|
-
|
|
174
|
-
`flattenNA` JSDoc fix, bridge-test helper consolidation across 39 files (+84 LOC net),
|
|
175
|
-
and `bench/` infrastructure with AD + BE-37 eikonal + Schwarzschild geodesic baseline
|
|
176
|
-
benchmarks. No new features, no bridge work, no breaking changes. See
|
|
173
|
+
**Current Version:** v0.6.0 (released 2026-05-20). Einstein field equation
|
|
174
|
+
closure + curvature classification + Shapiro investigation. See
|
|
177
175
|
[CHANGELOG](CHANGELOG.md) for full details.
|
|
178
176
|
|
|
179
|
-
### v0.
|
|
177
|
+
### v0.6.0 — Einstein field equation closure + curvature classification (2026-05-20)
|
|
180
178
|
|
|
181
179
|
| Metric | Value |
|
|
182
180
|
|---|---|
|
|
183
181
|
| Bridge catalog | **42 / 42** (IDs 11-52, unchanged from v0.4.0) |
|
|
184
|
-
| Test suite | passing (
|
|
182
|
+
| Test suite | **1693** passing (179 files, 1 skip + 1 todo) |
|
|
185
183
|
| `tsc --noEmit` | clean |
|
|
186
|
-
|
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
**
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
`Float64ReferenceEngine`
|
|
223
|
-
|
|
224
|
-
numerical
|
|
225
|
-
BE-37 Shapiro-delay eikonal end-to-end
|
|
226
|
-
|
|
227
|
-
### ✅
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
**Final invariants:**
|
|
242
|
-
|
|
243
|
-
| Metric | Value |
|
|
184
|
+
| Breaking changes | `christoffelFn` / `schwarzschildChristoffelFn` now return `Float64Array(64)` (λ-major) instead of nested `number[4][4][4]`; `pderivNumericalFn` default `order` flipped `2 → 4` |
|
|
185
|
+
|
|
186
|
+
36 tasks across 4 phases:
|
|
187
|
+
|
|
188
|
+
- **Killing-vector machinery** — `KillingVectorNode` + `ConservedChargeNode`
|
|
189
|
+
AST kinds; `verifyKillingEquation` and `evaluateConservedCharge` — the first
|
|
190
|
+
structural encoding of a continuous symmetry and its Noether charge.
|
|
191
|
+
- **Einstein field equation closure** — `StressEnergyTensorNode`,
|
|
192
|
+
`CosmologicalConstantNode`, `EinsteinFieldEquationNode`, plus
|
|
193
|
+
`validateEinsteinFieldEquation` / `evaluateEinsteinEquationResidual`. Closes
|
|
194
|
+
the gap BE-17's docstring had documented as impossible: matter-coupled
|
|
195
|
+
`G_μν = κ T_μν` is now structurally encodable alongside the vacuum case.
|
|
196
|
+
- **Curvature classification** — `WeylTensorNode`, `KretschmannScalarNode`,
|
|
197
|
+
`computeKretschmann`, and the `CurvatureCompositeNode<K,S>` factory extracted
|
|
198
|
+
from the now-five-instance curvature pattern (`CURVATURE_KIND_REGISTRY`
|
|
199
|
+
provides introspection across curvature node kinds).
|
|
200
|
+
- **Release-prep** — BR-2 `christoffelFn` flat-array refactor (BREAKING; **5-6×
|
|
201
|
+
RK4 speedup**), `pderivNumericalFn` 4th-order default, and the PC-1.5 Shapiro
|
|
202
|
+
residual-floor investigation (`docs/architecture/pc-1.5-shapiro-residual-floor.md`).
|
|
203
|
+
|
|
204
|
+
**Honest framing:** Per Decision #9, no bridge status pins were promoted from
|
|
205
|
+
`speculative` → `established` — structural encoding is necessary but not
|
|
206
|
+
sufficient; observational grounding must be established independently.
|
|
207
|
+
|
|
208
|
+
### Release history
|
|
209
|
+
|
|
210
|
+
Earlier milestones (full detail in [CHANGELOG](CHANGELOG.md)):
|
|
211
|
+
|
|
212
|
+
- **v0.5.1** (2026-05-19) — stability/hygiene patch; constants canonicalization,
|
|
213
|
+
diagnostic-warning propagation through the curvature pipeline.
|
|
214
|
+
- **v0.5.0** (2026-05-18) — GR foundations: GL4 symplectic integrator, bisection
|
|
215
|
+
perihelion finder, `RiemannTensorNode`, `ricci`/`einstein`/`bianchiResidual`
|
|
216
|
+
helpers, BE-52 Mercury and BE-37 Shapiro activations.
|
|
217
|
+
- **v0.4.5/v0.4.6** (2026-05-17/18) — refactor + benchmark scaffold;
|
|
218
|
+
`bench/` infrastructure with correctness-first baselines.
|
|
219
|
+
- **v0.4.0** (2026-05-15) — connection layer (Christoffel),
|
|
220
|
+
automatic differentiation (`Float64ReferenceEngine` + `MathTSEngine`),
|
|
221
|
+
bridges BE-51/BE-52 added (catalog 40 → 42).
|
|
222
|
+
- **v0.3.5** (2026-05-14) — numerical-contraction backend: `TensorEngine`
|
|
223
|
+
interface, AST→engine lowering, BE-37 Shapiro-delay eikonal end-to-end.
|
|
224
|
+
|
|
225
|
+
### ✅ Milestone — catalog closed at 40/40 (v0.1.0, 2026-05-12)
|
|
226
|
+
|
|
227
|
+
> Historical snapshot of the v0.1.0 catalog-closure event. Counts below are
|
|
228
|
+
> v0.1.0-era figures, not current state — see the v0.6.0 table above for
|
|
229
|
+
> current numbers (42 bridges, 1693 tests).
|
|
230
|
+
|
|
231
|
+
First tagged release; the Tier-5 AST encoding rollout reached **full coverage**
|
|
232
|
+
with the Wave Z arc (commits `9cb299f` through `b358257`). Every bridge in
|
|
233
|
+
`src/bridges/index.ts` had a non-null `dimensional_signature`, an AST module in
|
|
234
|
+
`src/bridges/equations/`, a numerical evaluator with input-validation guards,
|
|
235
|
+
and per-bridge encoding tests. SemVer applies from this release onward.
|
|
236
|
+
|
|
237
|
+
| Metric (v0.1.0) | Value |
|
|
244
238
|
|---|---|
|
|
245
239
|
| AST encodings | **40 / 40** |
|
|
246
240
|
| `dimensional_signature === null` count | 0 |
|
|
247
241
|
| `status === 'invalid'` count | 0 |
|
|
248
|
-
| `tractability_class === 'undefined'` count | 0 |
|
|
249
242
|
| Test suite | **1161 / 1161** passing across 68 files |
|
|
250
243
|
| Status distribution | 6 established · 31 speculative · 3 highly-speculative · 0 invalid |
|
|
251
244
|
|
|
252
|
-
**Catalog:** 40 bridge equations indexed in `src/bridges/index.ts`, each
|
|
253
|
-
with structured `KnownIssue` records (severity / description / fixable),
|
|
254
|
-
references, dependencies, and disposition status. Spec ↔ index drift
|
|
255
|
-
guard: `tests/bridges/spec-vs-index.test.ts` asserts every audit-marker
|
|
256
|
-
in the spec markdown has a matching entry.
|
|
257
|
-
|
|
258
|
-
**Dimensional analyzer** (`src/dimensional/`): operator-blind scalar AST
|
|
259
|
-
with primitives `symbol | op (* / + - ^) | integral | derivative`. 22
|
|
260
|
-
named SI dimensions with round-trip `format()`. Validator hardening: `^`
|
|
261
|
-
arity guard, switch-exhaustiveness `never` arm, integral / derivative
|
|
262
|
-
shape guards, informative violation diagnostics. `inferDimensionForBridge`
|
|
263
|
-
consults `EXPECTED_DIMENSION_BY_BRIDGE` for cross-checking; the lookup
|
|
264
|
-
table now has 40 entries (one per encoded bridge).
|
|
265
|
-
|
|
266
245
|
**Encoding patterns established during the rollout:** typed-stubs for
|
|
267
246
|
transcendentals and operator-valued interiors (log/exp/tensor
|
|
268
247
|
contractions absorbed into single dimensioned symbols);
|
|
@@ -275,28 +254,10 @@ canonical literature forms while preserving the bridge label
|
|
|
275
254
|
(precedent: BE-25 Penrose-Hameroff → IIT Φ_max; Wave Z applied this
|
|
276
255
|
to BE-16 → Landauer, BE-37 → Shapiro delay, BE-28 → Onsager σ).
|
|
277
256
|
|
|
278
|
-
**Catalog round-trip invariant:** every entry's encoded RHS validates
|
|
279
|
-
back to its registered `dimensional_signature` via
|
|
280
|
-
`tests/bridges/dimensional-signature-catalog.test.ts`. All 40 entries
|
|
281
|
-
are signature-populated and round-trip-verified.
|
|
282
|
-
|
|
283
257
|
**Cross-LLM validation:** the three highest-stakes Wave-Z reformulations
|
|
284
258
|
(BE-16 Landauer, BE-37 Shapiro, BE-28 Onsager — all promoted from
|
|
285
259
|
`status='invalid'`) were independently cross-validated by both OpenAI
|
|
286
|
-
o3 and Gemini Pro.
|
|
287
|
-
The BE-28 Onsager relabeling carries a prominent `⚠ CRITICAL WARNING`
|
|
288
|
-
in its module docstring: the encoded `σ = Σᵢ Jᵢ Xᵢ` is the *definiendum*
|
|
289
|
-
of MEPP, not the variational maximization principle itself.
|
|
290
|
-
|
|
291
|
-
**Test suite:** 1161 tests across 68 files, including property-style
|
|
292
|
-
sweeps, limit identities, honest-archaeology disposition pins, and
|
|
293
|
-
catalog-wide round-trip invariants. `npm test` runs the full suite in
|
|
294
|
-
~15 s on a modern dev box; typecheck is clean.
|
|
295
|
-
|
|
296
|
-
**Planning artifacts** in `docs/planning/`: Tier-5 encoding triage memo
|
|
297
|
-
(refreshed 2026-05-11 with Wave Z closure record), BE-37 VSL
|
|
298
|
-
disposition brief, dimensionless-stub convention doc, Bridge
|
|
299
|
-
Remediation Plan (R0-R5 audit chain), v0.1.0 release procedure.
|
|
260
|
+
o3 and Gemini Pro.
|
|
300
261
|
|
|
301
262
|
### Planned (post-closure)
|
|
302
263
|
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Catalog adapter: ingests the 42-entry `BRIDGE_EQUATIONS` array into
|
|
3
|
+
* the v0.7-p2 sparse semantic catalog as `BridgeCell` values.
|
|
4
|
+
*
|
|
5
|
+
* Phase 3 of v0.7 Proposal 2 (Sparse Semantic Catalog).
|
|
6
|
+
*
|
|
7
|
+
* Two entry points:
|
|
8
|
+
*
|
|
9
|
+
* `catalogToCells(entries)` — pure mapping `BridgeEquationEntry[]
|
|
10
|
+
* → BridgeCell[]`. Filters out entries that would fail the
|
|
11
|
+
* legacy `addBridge` validation (e.g. `bridges: ['unknown',
|
|
12
|
+
* 'unknown']` collapses to identical empty `source`/`target`).
|
|
13
|
+
*
|
|
14
|
+
* `scanCatalog(entries)` — best-effort variant: builds candidates,
|
|
15
|
+
* runs Rule 1 (dimensional consistency), returns a
|
|
16
|
+
* `CatalogIngestionReport` without throwing. Caller decides
|
|
17
|
+
* what to do with the diagnostics.
|
|
18
|
+
*
|
|
19
|
+
* `ingestCatalog(tensor, entries)` — strict variant: two-pass
|
|
20
|
+
* collect-then-commit (Decision #11). If Rule 1 reports any
|
|
21
|
+
* errors, throws `CatalogIngestionError(report)` and the
|
|
22
|
+
* tensor is untouched. Otherwise calls `tensor.addCell` for
|
|
23
|
+
* each candidate.
|
|
24
|
+
*
|
|
25
|
+
* Rule 1 (Dimensional Consistency) operates on
|
|
26
|
+
* `BridgeEquationEntry`, NOT on `Cell` (Decision #3, resolves
|
|
27
|
+
* Adam-V3). It reads `entry.dimensional_signature` directly.
|
|
28
|
+
*
|
|
29
|
+
* @module bridges/catalog-adapter
|
|
30
|
+
*/
|
|
31
|
+
import type { BridgeEquationEntry } from './index.js';
|
|
32
|
+
import type { BridgeCell } from '../core/cell.js';
|
|
33
|
+
import type { UniversalTensor } from '../core/tensor.js';
|
|
34
|
+
import type { FluxDiagnostic, FluxReport } from '../core/flux-rules.js';
|
|
35
|
+
/**
|
|
36
|
+
* Per-entry summary of the catalog ingestion attempt.
|
|
37
|
+
*
|
|
38
|
+
* @public
|
|
39
|
+
*/
|
|
40
|
+
export interface CatalogEntryStatus {
|
|
41
|
+
readonly bridgeId: number;
|
|
42
|
+
readonly name: string;
|
|
43
|
+
/** True iff the entry would be (or was) submitted to `addCell`. */
|
|
44
|
+
readonly submitted: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Diagnostics from Rule 1 (dimensional consistency) for this entry.
|
|
47
|
+
* `undefined` means the entry passed Rule 1 cleanly.
|
|
48
|
+
*/
|
|
49
|
+
readonly diagnostic?: FluxDiagnostic;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Aggregate report returned by `scanCatalog` / `ingestCatalog`. The
|
|
53
|
+
* diagnostics surface Rule 1 results; `unsubmitted` lists entries
|
|
54
|
+
* that the adapter filtered out before submission (typically
|
|
55
|
+
* `'unknown' → 'unknown'` bridges that would fail the legacy
|
|
56
|
+
* `addBridge` source !== target check).
|
|
57
|
+
*
|
|
58
|
+
* @public
|
|
59
|
+
*/
|
|
60
|
+
export interface CatalogIngestionReport {
|
|
61
|
+
readonly entries: ReadonlyArray<CatalogEntryStatus>;
|
|
62
|
+
readonly errors: ReadonlyArray<FluxDiagnostic>;
|
|
63
|
+
readonly warnings: ReadonlyArray<FluxDiagnostic>;
|
|
64
|
+
readonly info: ReadonlyArray<FluxDiagnostic>;
|
|
65
|
+
/** Bridge IDs the adapter filtered out before submission. */
|
|
66
|
+
readonly unsubmitted: ReadonlyArray<number>;
|
|
67
|
+
/** Cells that PASSED Rule 1 and would be submitted (or were). */
|
|
68
|
+
readonly submitted: ReadonlyArray<BridgeCell>;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Thrown by `ingestCatalog` when Rule 1 reports any errors. The
|
|
72
|
+
* caller can inspect `report` for per-entry diagnostics.
|
|
73
|
+
*
|
|
74
|
+
* @public
|
|
75
|
+
*/
|
|
76
|
+
export declare class CatalogIngestionError extends Error {
|
|
77
|
+
readonly report: CatalogIngestionReport;
|
|
78
|
+
constructor(report: CatalogIngestionReport);
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Pure mapper from `BridgeEquationEntry` (legacy catalog shape) to
|
|
82
|
+
* `BridgeCell` (v0.7 typed Cell variant). Filters out entries whose
|
|
83
|
+
* `bridges: [from, to]` collapses to an identical source/target
|
|
84
|
+
* (typically `['unknown', 'unknown']`) — those would fail the
|
|
85
|
+
* legacy `addBridge` validation. The filtering decision is surfaced
|
|
86
|
+
* via the `unsubmitted` array in `CatalogIngestionReport`.
|
|
87
|
+
*
|
|
88
|
+
* @public
|
|
89
|
+
*/
|
|
90
|
+
export declare function catalogToCells(entries: ReadonlyArray<BridgeEquationEntry>): ReadonlyArray<BridgeCell>;
|
|
91
|
+
/**
|
|
92
|
+
* Best-effort catalog scan: builds candidates, runs Rule 1 per
|
|
93
|
+
* entry, returns a `CatalogIngestionReport`. Does NOT mutate any
|
|
94
|
+
* tensor and does NOT throw.
|
|
95
|
+
*
|
|
96
|
+
* @public
|
|
97
|
+
*/
|
|
98
|
+
export declare function scanCatalog(entries: ReadonlyArray<BridgeEquationEntry>): CatalogIngestionReport;
|
|
99
|
+
/**
|
|
100
|
+
* Strict catalog ingestion: two-pass collect-then-commit per
|
|
101
|
+
* Decision #11. If Rule 1 reports any errors, throws
|
|
102
|
+
* `CatalogIngestionError(report)` and the tensor is untouched.
|
|
103
|
+
* Otherwise calls `tensor.addCell` for each filterable candidate.
|
|
104
|
+
*
|
|
105
|
+
* @public
|
|
106
|
+
*/
|
|
107
|
+
export declare function ingestCatalog(tensor: UniversalTensor, entries: ReadonlyArray<BridgeEquationEntry>): CatalogIngestionReport;
|
|
108
|
+
/**
|
|
109
|
+
* Bridge-level FluxReport summary, derived from a
|
|
110
|
+
* `CatalogIngestionReport`. Used by consumers that want the
|
|
111
|
+
* flux-rule report shape rather than the catalog-specific report.
|
|
112
|
+
*
|
|
113
|
+
* @public
|
|
114
|
+
*/
|
|
115
|
+
export declare function ingestionReportToFluxReport(report: CatalogIngestionReport): FluxReport;
|
|
116
|
+
//# sourceMappingURL=catalog-adapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog-adapter.d.ts","sourceRoot":"","sources":["../../src/bridges/catalog-adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,KAAK,EACV,mBAAmB,EACpB,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,UAAU,EAAkB,MAAM,iBAAiB,CAAC;AAClE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,KAAK,EACV,cAAc,EACd,UAAU,EACX,MAAM,uBAAuB,CAAC;AAS/B;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,mEAAmE;IACnE,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B;;;OAGG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,cAAc,CAAC;CACtC;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC,kBAAkB,CAAC,CAAC;IACpD,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC,cAAc,CAAC,CAAC;IAC/C,QAAQ,CAAC,QAAQ,EAAE,aAAa,CAAC,cAAc,CAAC,CAAC;IACjD,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC,cAAc,CAAC,CAAC;IAC7C,6DAA6D;IAC7D,QAAQ,CAAC,WAAW,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IAC5C,iEAAiE;IACjE,QAAQ,CAAC,SAAS,EAAE,aAAa,CAAC,UAAU,CAAC,CAAC;CAC/C;AAED;;;;;GAKG;AACH,qBAAa,qBAAsB,SAAQ,KAAK;IAC9C,SAAgB,MAAM,EAAE,sBAAsB,CAAC;gBAEnC,MAAM,EAAE,sBAAsB;CAS3C;AAuDD;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAC5B,OAAO,EAAE,aAAa,CAAC,mBAAmB,CAAC,GAC1C,aAAa,CAAC,UAAU,CAAC,CAO3B;AAgHD;;;;;;GAMG;AACH,wBAAgB,WAAW,CACzB,OAAO,EAAE,aAAa,CAAC,mBAAmB,CAAC,GAC1C,sBAAsB,CAuCxB;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAC3B,MAAM,EAAE,eAAe,EACvB,OAAO,EAAE,aAAa,CAAC,mBAAmB,CAAC,GAC1C,sBAAsB,CASxB;AAED;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,sBAAsB,GAC7B,UAAU,CAYZ"}
|
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Catalog adapter: ingests the 42-entry `BRIDGE_EQUATIONS` array into
|
|
3
|
+
* the v0.7-p2 sparse semantic catalog as `BridgeCell` values.
|
|
4
|
+
*
|
|
5
|
+
* Phase 3 of v0.7 Proposal 2 (Sparse Semantic Catalog).
|
|
6
|
+
*
|
|
7
|
+
* Two entry points:
|
|
8
|
+
*
|
|
9
|
+
* `catalogToCells(entries)` — pure mapping `BridgeEquationEntry[]
|
|
10
|
+
* → BridgeCell[]`. Filters out entries that would fail the
|
|
11
|
+
* legacy `addBridge` validation (e.g. `bridges: ['unknown',
|
|
12
|
+
* 'unknown']` collapses to identical empty `source`/`target`).
|
|
13
|
+
*
|
|
14
|
+
* `scanCatalog(entries)` — best-effort variant: builds candidates,
|
|
15
|
+
* runs Rule 1 (dimensional consistency), returns a
|
|
16
|
+
* `CatalogIngestionReport` without throwing. Caller decides
|
|
17
|
+
* what to do with the diagnostics.
|
|
18
|
+
*
|
|
19
|
+
* `ingestCatalog(tensor, entries)` — strict variant: two-pass
|
|
20
|
+
* collect-then-commit (Decision #11). If Rule 1 reports any
|
|
21
|
+
* errors, throws `CatalogIngestionError(report)` and the
|
|
22
|
+
* tensor is untouched. Otherwise calls `tensor.addCell` for
|
|
23
|
+
* each candidate.
|
|
24
|
+
*
|
|
25
|
+
* Rule 1 (Dimensional Consistency) operates on
|
|
26
|
+
* `BridgeEquationEntry`, NOT on `Cell` (Decision #3, resolves
|
|
27
|
+
* Adam-V3). It reads `entry.dimensional_signature` directly.
|
|
28
|
+
*
|
|
29
|
+
* @module bridges/catalog-adapter
|
|
30
|
+
*/
|
|
31
|
+
import { EXPECTED_DIMENSION_BY_BRIDGE } from '../dimensional/bridge-check.js';
|
|
32
|
+
import { format } from '../dimensional/algebra.js';
|
|
33
|
+
/**
|
|
34
|
+
* Thrown by `ingestCatalog` when Rule 1 reports any errors. The
|
|
35
|
+
* caller can inspect `report` for per-entry diagnostics.
|
|
36
|
+
*
|
|
37
|
+
* @public
|
|
38
|
+
*/
|
|
39
|
+
export class CatalogIngestionError extends Error {
|
|
40
|
+
report;
|
|
41
|
+
constructor(report) {
|
|
42
|
+
super(`CatalogIngestionError: ${report.errors.length} dimensional-consistency ` +
|
|
43
|
+
`error(s) in ${report.entries.length} catalog entries. ` +
|
|
44
|
+
`First error: ${report.errors[0]?.message ?? '(none)'}`);
|
|
45
|
+
this.name = 'CatalogIngestionError';
|
|
46
|
+
this.report = report;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
// ---------------------------------------------------------------------------
|
|
50
|
+
// Internal: confidence + scale mapping
|
|
51
|
+
// ---------------------------------------------------------------------------
|
|
52
|
+
/**
|
|
53
|
+
* Map the catalog's `BridgeEquationStatus` string vocabulary onto
|
|
54
|
+
* the `CellConfidence` vocabulary used by `BridgeCell`. The two
|
|
55
|
+
* vocabularies are nearly aligned — only the `'invalid'` arm differs
|
|
56
|
+
* (catalog allows it; CellConfidence excludes it per the design).
|
|
57
|
+
*
|
|
58
|
+
* @internal
|
|
59
|
+
*/
|
|
60
|
+
function statusToCellConfidence(status) {
|
|
61
|
+
switch (status) {
|
|
62
|
+
case 'established': return 'established';
|
|
63
|
+
case 'speculative': return 'speculative';
|
|
64
|
+
case 'highly-speculative': return 'highly-speculative';
|
|
65
|
+
case 'invalid':
|
|
66
|
+
// 'invalid' catalog entries should not become cells; the
|
|
67
|
+
// adapter callers filter on isActiveStatus first. If we ever
|
|
68
|
+
// reach here, downgrade to 'highly-speculative' (safest).
|
|
69
|
+
return 'highly-speculative';
|
|
70
|
+
default:
|
|
71
|
+
return 'highly-speculative';
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Translate a free-form catalog `bridges` axis label (e.g.
|
|
76
|
+
* `'classical'`, `'quantum'`, `'unknown'`) to a `PhysicalScale`
|
|
77
|
+
* value or `undefined`. The four-element `PhysicalScale` union is
|
|
78
|
+
* exhaustive; anything else (including the `'unknown'` sentinel)
|
|
79
|
+
* maps to `undefined` — making `source`/`target` an empty
|
|
80
|
+
* `TensorIndices` whose serialized key is `''`.
|
|
81
|
+
*
|
|
82
|
+
* @internal
|
|
83
|
+
*/
|
|
84
|
+
function labelToScale(label) {
|
|
85
|
+
switch (label) {
|
|
86
|
+
case 'quantum':
|
|
87
|
+
case 'mesoscopic':
|
|
88
|
+
case 'classical':
|
|
89
|
+
case 'cosmological':
|
|
90
|
+
return label;
|
|
91
|
+
default:
|
|
92
|
+
return undefined;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
// ---------------------------------------------------------------------------
|
|
96
|
+
// Mapping: BridgeEquationEntry → BridgeCell
|
|
97
|
+
// ---------------------------------------------------------------------------
|
|
98
|
+
/**
|
|
99
|
+
* Pure mapper from `BridgeEquationEntry` (legacy catalog shape) to
|
|
100
|
+
* `BridgeCell` (v0.7 typed Cell variant). Filters out entries whose
|
|
101
|
+
* `bridges: [from, to]` collapses to an identical source/target
|
|
102
|
+
* (typically `['unknown', 'unknown']`) — those would fail the
|
|
103
|
+
* legacy `addBridge` validation. The filtering decision is surfaced
|
|
104
|
+
* via the `unsubmitted` array in `CatalogIngestionReport`.
|
|
105
|
+
*
|
|
106
|
+
* @public
|
|
107
|
+
*/
|
|
108
|
+
export function catalogToCells(entries) {
|
|
109
|
+
const out = [];
|
|
110
|
+
for (const entry of entries) {
|
|
111
|
+
const cell = entryToBridgeCell(entry);
|
|
112
|
+
if (cell !== null)
|
|
113
|
+
out.push(cell);
|
|
114
|
+
}
|
|
115
|
+
return out;
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Internal: build a `BridgeCell` from a single entry, returning
|
|
119
|
+
* `null` if the entry is filterable (identical source/target after
|
|
120
|
+
* label translation).
|
|
121
|
+
*
|
|
122
|
+
* @internal
|
|
123
|
+
*/
|
|
124
|
+
function entryToBridgeCell(entry) {
|
|
125
|
+
const [fromLabel, toLabel] = entry.bridges;
|
|
126
|
+
const fromScale = labelToScale(fromLabel);
|
|
127
|
+
const toScale = labelToScale(toLabel);
|
|
128
|
+
const source = fromScale ? { scale: fromScale } : {};
|
|
129
|
+
const target = toScale ? { scale: toScale } : {};
|
|
130
|
+
// Filter out entries whose source and target are both empty (the
|
|
131
|
+
// 'unknown' -> 'unknown' case at HEAD). Legacy `addBridge` rejects
|
|
132
|
+
// them with a TypeError; the adapter surfaces them via
|
|
133
|
+
// `unsubmitted`.
|
|
134
|
+
if (source.scale === undefined &&
|
|
135
|
+
target.scale === undefined) {
|
|
136
|
+
return null;
|
|
137
|
+
}
|
|
138
|
+
// Equation: use formula_latex if non-empty, else a placeholder.
|
|
139
|
+
const equation = entry.formula_latex && entry.formula_latex.length > 0
|
|
140
|
+
? entry.formula_latex
|
|
141
|
+
: `(no LaTeX provided for BE-${entry.id})`;
|
|
142
|
+
return {
|
|
143
|
+
kind: 'bridge',
|
|
144
|
+
id: `BE-${entry.id}`,
|
|
145
|
+
name: entry.name,
|
|
146
|
+
equation,
|
|
147
|
+
confidence: statusToCellConfidence(entry.status),
|
|
148
|
+
source,
|
|
149
|
+
target,
|
|
150
|
+
validated: entry.status === 'established',
|
|
151
|
+
description: entry.notes.length > 0 ? entry.notes.slice(0, 200) : entry.name,
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
// ---------------------------------------------------------------------------
|
|
155
|
+
// Rule 1 — Dimensional Consistency (ERROR tier per Decision #3)
|
|
156
|
+
// ---------------------------------------------------------------------------
|
|
157
|
+
/**
|
|
158
|
+
* Fires per-entry. Returns one of:
|
|
159
|
+
* - undefined (no diagnostic): entry passes Rule 1.
|
|
160
|
+
* - 'error' diagnostic: dimensional_signature is structurally null,
|
|
161
|
+
* or non-null but does not match the expected dimension from
|
|
162
|
+
* `EXPECTED_DIMENSION_BY_BRIDGE`.
|
|
163
|
+
* - 'info' diagnostic: no expected entry for this bridge ID (the
|
|
164
|
+
* EXPECTED_DIMENSION_BY_BRIDGE table covers 40 of 42 bridges
|
|
165
|
+
* per Phase 0 Task 0.3); we can't enforce, but we record the
|
|
166
|
+
* gap.
|
|
167
|
+
*
|
|
168
|
+
* @internal
|
|
169
|
+
*/
|
|
170
|
+
function checkDimensionalConsistency(entry) {
|
|
171
|
+
const cellId = `BE-${entry.id}`;
|
|
172
|
+
// Structural null check (Eve-R1 lesson — at HEAD this fires zero
|
|
173
|
+
// times; future catalog edits that introduce a null will surface
|
|
174
|
+
// immediately).
|
|
175
|
+
if (entry.dimensional_signature === null) {
|
|
176
|
+
return {
|
|
177
|
+
severity: 'error',
|
|
178
|
+
ruleName: 'dimensional-consistency',
|
|
179
|
+
cellId,
|
|
180
|
+
message: `BE-${entry.id} ('${entry.name}') has dimensional_signature: ` +
|
|
181
|
+
`null. Every active catalog entry must declare a structural ` +
|
|
182
|
+
`dimensional signature.`,
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
// Field-vs-expected comparison.
|
|
186
|
+
const expected = EXPECTED_DIMENSION_BY_BRIDGE.get(entry.id);
|
|
187
|
+
if (expected === undefined) {
|
|
188
|
+
return {
|
|
189
|
+
severity: 'info',
|
|
190
|
+
ruleName: 'dimensional-consistency',
|
|
191
|
+
cellId,
|
|
192
|
+
message: `BE-${entry.id} ('${entry.name}') has no entry in ` +
|
|
193
|
+
`EXPECTED_DIMENSION_BY_BRIDGE (40 of 42 covered at HEAD); ` +
|
|
194
|
+
`dimensional-consistency check skipped for this entry.`,
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
const expectedFormatted = format(expected);
|
|
198
|
+
if (entry.dimensional_signature !== expectedFormatted) {
|
|
199
|
+
return {
|
|
200
|
+
severity: 'error',
|
|
201
|
+
ruleName: 'dimensional-consistency',
|
|
202
|
+
cellId,
|
|
203
|
+
message: `BE-${entry.id} ('${entry.name}') has dimensional_signature ` +
|
|
204
|
+
`'${entry.dimensional_signature}' but EXPECTED_DIMENSION_BY_BRIDGE ` +
|
|
205
|
+
`says '${expectedFormatted}'. Catalog and expectation disagree.`,
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
return undefined;
|
|
209
|
+
}
|
|
210
|
+
// ---------------------------------------------------------------------------
|
|
211
|
+
// Public entry points
|
|
212
|
+
// ---------------------------------------------------------------------------
|
|
213
|
+
/**
|
|
214
|
+
* Best-effort catalog scan: builds candidates, runs Rule 1 per
|
|
215
|
+
* entry, returns a `CatalogIngestionReport`. Does NOT mutate any
|
|
216
|
+
* tensor and does NOT throw.
|
|
217
|
+
*
|
|
218
|
+
* @public
|
|
219
|
+
*/
|
|
220
|
+
export function scanCatalog(entries) {
|
|
221
|
+
const statuses = [];
|
|
222
|
+
const errors = [];
|
|
223
|
+
const warnings = [];
|
|
224
|
+
const info = [];
|
|
225
|
+
const unsubmitted = [];
|
|
226
|
+
const submitted = [];
|
|
227
|
+
for (const entry of entries) {
|
|
228
|
+
const diagnostic = checkDimensionalConsistency(entry);
|
|
229
|
+
const cell = entryToBridgeCell(entry);
|
|
230
|
+
const submittable = cell !== null;
|
|
231
|
+
if (!submittable)
|
|
232
|
+
unsubmitted.push(entry.id);
|
|
233
|
+
else
|
|
234
|
+
submitted.push(cell);
|
|
235
|
+
if (diagnostic) {
|
|
236
|
+
switch (diagnostic.severity) {
|
|
237
|
+
case 'error':
|
|
238
|
+
errors.push(diagnostic);
|
|
239
|
+
break;
|
|
240
|
+
case 'warning':
|
|
241
|
+
warnings.push(diagnostic);
|
|
242
|
+
break;
|
|
243
|
+
case 'info':
|
|
244
|
+
info.push(diagnostic);
|
|
245
|
+
break;
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
statuses.push({
|
|
249
|
+
bridgeId: entry.id,
|
|
250
|
+
name: entry.name,
|
|
251
|
+
submitted: submittable,
|
|
252
|
+
...(diagnostic ? { diagnostic } : {}),
|
|
253
|
+
});
|
|
254
|
+
}
|
|
255
|
+
return {
|
|
256
|
+
entries: statuses,
|
|
257
|
+
errors,
|
|
258
|
+
warnings,
|
|
259
|
+
info,
|
|
260
|
+
unsubmitted,
|
|
261
|
+
submitted,
|
|
262
|
+
};
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* Strict catalog ingestion: two-pass collect-then-commit per
|
|
266
|
+
* Decision #11. If Rule 1 reports any errors, throws
|
|
267
|
+
* `CatalogIngestionError(report)` and the tensor is untouched.
|
|
268
|
+
* Otherwise calls `tensor.addCell` for each filterable candidate.
|
|
269
|
+
*
|
|
270
|
+
* @public
|
|
271
|
+
*/
|
|
272
|
+
export function ingestCatalog(tensor, entries) {
|
|
273
|
+
const report = scanCatalog(entries);
|
|
274
|
+
if (report.errors.length > 0) {
|
|
275
|
+
throw new CatalogIngestionError(report);
|
|
276
|
+
}
|
|
277
|
+
for (const cell of report.submitted) {
|
|
278
|
+
tensor.addCell(cell);
|
|
279
|
+
}
|
|
280
|
+
return report;
|
|
281
|
+
}
|
|
282
|
+
/**
|
|
283
|
+
* Bridge-level FluxReport summary, derived from a
|
|
284
|
+
* `CatalogIngestionReport`. Used by consumers that want the
|
|
285
|
+
* flux-rule report shape rather than the catalog-specific report.
|
|
286
|
+
*
|
|
287
|
+
* @public
|
|
288
|
+
*/
|
|
289
|
+
export function ingestionReportToFluxReport(report) {
|
|
290
|
+
const diagnostics = [
|
|
291
|
+
...report.errors,
|
|
292
|
+
...report.warnings,
|
|
293
|
+
...report.info,
|
|
294
|
+
];
|
|
295
|
+
return {
|
|
296
|
+
diagnostics,
|
|
297
|
+
errorCount: report.errors.length,
|
|
298
|
+
warningCount: report.warnings.length,
|
|
299
|
+
infoCount: report.info.length,
|
|
300
|
+
};
|
|
301
|
+
}
|
|
302
|
+
//# sourceMappingURL=catalog-adapter.js.map
|