universal-physics-tensor 0.5.0 → 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.
Files changed (401) hide show
  1. package/README.md +66 -105
  2. package/dist/bridges/catalog-adapter.d.ts +116 -0
  3. package/dist/bridges/catalog-adapter.d.ts.map +1 -0
  4. package/dist/bridges/catalog-adapter.js +302 -0
  5. package/dist/bridges/catalog-adapter.js.map +1 -0
  6. package/dist/bridges/equations/_be-helpers.d.ts +145 -0
  7. package/dist/bridges/equations/_be-helpers.d.ts.map +1 -0
  8. package/dist/bridges/equations/_be-helpers.js +179 -0
  9. package/dist/bridges/equations/_be-helpers.js.map +1 -0
  10. package/dist/bridges/equations/be-11-decoherence-master.d.ts +1 -2
  11. package/dist/bridges/equations/be-11-decoherence-master.d.ts.map +1 -1
  12. package/dist/bridges/equations/be-11-decoherence-master.js +9 -20
  13. package/dist/bridges/equations/be-11-decoherence-master.js.map +1 -1
  14. package/dist/bridges/equations/be-12-coherence-length.d.ts +7 -1
  15. package/dist/bridges/equations/be-12-coherence-length.d.ts.map +1 -1
  16. package/dist/bridges/equations/be-12-coherence-length.js +8 -16
  17. package/dist/bridges/equations/be-12-coherence-length.js.map +1 -1
  18. package/dist/bridges/equations/be-13-einstein-trace.d.ts +51 -3
  19. package/dist/bridges/equations/be-13-einstein-trace.d.ts.map +1 -1
  20. package/dist/bridges/equations/be-13-einstein-trace.js +74 -17
  21. package/dist/bridges/equations/be-13-einstein-trace.js.map +1 -1
  22. package/dist/bridges/equations/be-14-ryu-takayanagi.d.ts +10 -4
  23. package/dist/bridges/equations/be-14-ryu-takayanagi.d.ts.map +1 -1
  24. package/dist/bridges/equations/be-14-ryu-takayanagi.js +6 -17
  25. package/dist/bridges/equations/be-14-ryu-takayanagi.js.map +1 -1
  26. package/dist/bridges/equations/be-15-emergence.d.ts +7 -1
  27. package/dist/bridges/equations/be-15-emergence.d.ts.map +1 -1
  28. package/dist/bridges/equations/be-15-emergence.js +12 -22
  29. package/dist/bridges/equations/be-15-emergence.js.map +1 -1
  30. package/dist/bridges/equations/be-16-landauer.d.ts +7 -1
  31. package/dist/bridges/equations/be-16-landauer.d.ts.map +1 -1
  32. package/dist/bridges/equations/be-16-landauer.js +5 -13
  33. package/dist/bridges/equations/be-16-landauer.js.map +1 -1
  34. package/dist/bridges/equations/be-17-einstein-cartan.d.ts +26 -13
  35. package/dist/bridges/equations/be-17-einstein-cartan.d.ts.map +1 -1
  36. package/dist/bridges/equations/be-17-einstein-cartan.js +28 -31
  37. package/dist/bridges/equations/be-17-einstein-cartan.js.map +1 -1
  38. package/dist/bridges/equations/be-18-higgs-mass.d.ts +7 -1
  39. package/dist/bridges/equations/be-18-higgs-mass.d.ts.map +1 -1
  40. package/dist/bridges/equations/be-18-higgs-mass.js +5 -16
  41. package/dist/bridges/equations/be-18-higgs-mass.js.map +1 -1
  42. package/dist/bridges/equations/be-19-quantum-bounce.d.ts +38 -3
  43. package/dist/bridges/equations/be-19-quantum-bounce.d.ts.map +1 -1
  44. package/dist/bridges/equations/be-19-quantum-bounce.js +69 -20
  45. package/dist/bridges/equations/be-19-quantum-bounce.js.map +1 -1
  46. package/dist/bridges/equations/be-20-vacuum-energy.d.ts +20 -1
  47. package/dist/bridges/equations/be-20-vacuum-energy.d.ts.map +1 -1
  48. package/dist/bridges/equations/be-20-vacuum-energy.js +36 -15
  49. package/dist/bridges/equations/be-20-vacuum-energy.js.map +1 -1
  50. package/dist/bridges/equations/be-21-kss-bound.d.ts +2 -0
  51. package/dist/bridges/equations/be-21-kss-bound.d.ts.map +1 -1
  52. package/dist/bridges/equations/be-21-kss-bound.js +4 -10
  53. package/dist/bridges/equations/be-21-kss-bound.js.map +1 -1
  54. package/dist/bridges/equations/be-22-topological-entanglement.d.ts +6 -9
  55. package/dist/bridges/equations/be-22-topological-entanglement.d.ts.map +1 -1
  56. package/dist/bridges/equations/be-22-topological-entanglement.js +9 -21
  57. package/dist/bridges/equations/be-22-topological-entanglement.js.map +1 -1
  58. package/dist/bridges/equations/be-23-syk-planckian.d.ts +7 -1
  59. package/dist/bridges/equations/be-23-syk-planckian.d.ts.map +1 -1
  60. package/dist/bridges/equations/be-23-syk-planckian.js +11 -25
  61. package/dist/bridges/equations/be-23-syk-planckian.js.map +1 -1
  62. package/dist/bridges/equations/be-24-foerster-fret.d.ts +7 -1
  63. package/dist/bridges/equations/be-24-foerster-fret.d.ts.map +1 -1
  64. package/dist/bridges/equations/be-24-foerster-fret.js +8 -16
  65. package/dist/bridges/equations/be-24-foerster-fret.js.map +1 -1
  66. package/dist/bridges/equations/be-25-iit-phi.d.ts +7 -1
  67. package/dist/bridges/equations/be-25-iit-phi.d.ts.map +1 -1
  68. package/dist/bridges/equations/be-25-iit-phi.js +12 -16
  69. package/dist/bridges/equations/be-25-iit-phi.js.map +1 -1
  70. package/dist/bridges/equations/be-25-orch-or.d.ts +6 -3
  71. package/dist/bridges/equations/be-25-orch-or.d.ts.map +1 -1
  72. package/dist/bridges/equations/be-25-orch-or.js +8 -17
  73. package/dist/bridges/equations/be-25-orch-or.js.map +1 -1
  74. package/dist/bridges/equations/be-26-dna-tunneling.d.ts +6 -3
  75. package/dist/bridges/equations/be-26-dna-tunneling.d.ts.map +1 -1
  76. package/dist/bridges/equations/be-26-dna-tunneling.js +11 -26
  77. package/dist/bridges/equations/be-26-dna-tunneling.js.map +1 -1
  78. package/dist/bridges/equations/be-27-effective-temperature.d.ts +7 -1
  79. package/dist/bridges/equations/be-27-effective-temperature.d.ts.map +1 -1
  80. package/dist/bridges/equations/be-27-effective-temperature.js +8 -16
  81. package/dist/bridges/equations/be-27-effective-temperature.js.map +1 -1
  82. package/dist/bridges/equations/be-28-onsager-entropy-production.d.ts +7 -1
  83. package/dist/bridges/equations/be-28-onsager-entropy-production.d.ts.map +1 -1
  84. package/dist/bridges/equations/be-28-onsager-entropy-production.js +9 -13
  85. package/dist/bridges/equations/be-28-onsager-entropy-production.js.map +1 -1
  86. package/dist/bridges/equations/be-29-jarzynski.d.ts +7 -1
  87. package/dist/bridges/equations/be-29-jarzynski.d.ts.map +1 -1
  88. package/dist/bridges/equations/be-29-jarzynski.js +8 -13
  89. package/dist/bridges/equations/be-29-jarzynski.js.map +1 -1
  90. package/dist/bridges/equations/be-30-flm-first-law.d.ts +11 -2
  91. package/dist/bridges/equations/be-30-flm-first-law.d.ts.map +1 -1
  92. package/dist/bridges/equations/be-30-flm-first-law.js +10 -21
  93. package/dist/bridges/equations/be-30-flm-first-law.js.map +1 -1
  94. package/dist/bridges/equations/be-31-causal-set-bd.d.ts +7 -1
  95. package/dist/bridges/equations/be-31-causal-set-bd.d.ts.map +1 -1
  96. package/dist/bridges/equations/be-31-causal-set-bd.js +11 -25
  97. package/dist/bridges/equations/be-31-causal-set-bd.js.map +1 -1
  98. package/dist/bridges/equations/be-32-quantum-reference-frame.d.ts +6 -9
  99. package/dist/bridges/equations/be-32-quantum-reference-frame.d.ts.map +1 -1
  100. package/dist/bridges/equations/be-32-quantum-reference-frame.js +8 -18
  101. package/dist/bridges/equations/be-32-quantum-reference-frame.js.map +1 -1
  102. package/dist/bridges/equations/be-33-hertz-millis.d.ts +53 -28
  103. package/dist/bridges/equations/be-33-hertz-millis.d.ts.map +1 -1
  104. package/dist/bridges/equations/be-33-hertz-millis.js +55 -51
  105. package/dist/bridges/equations/be-33-hertz-millis.js.map +1 -1
  106. package/dist/bridges/equations/be-34-kibble-zurek.d.ts +6 -3
  107. package/dist/bridges/equations/be-34-kibble-zurek.d.ts.map +1 -1
  108. package/dist/bridges/equations/be-34-kibble-zurek.js +15 -26
  109. package/dist/bridges/equations/be-34-kibble-zurek.js.map +1 -1
  110. package/dist/bridges/equations/be-35-conformal-bootstrap.d.ts +6 -9
  111. package/dist/bridges/equations/be-35-conformal-bootstrap.d.ts.map +1 -1
  112. package/dist/bridges/equations/be-35-conformal-bootstrap.js +9 -21
  113. package/dist/bridges/equations/be-35-conformal-bootstrap.js.map +1 -1
  114. package/dist/bridges/equations/be-36-gw-speed-bound.d.ts +7 -1
  115. package/dist/bridges/equations/be-36-gw-speed-bound.d.ts.map +1 -1
  116. package/dist/bridges/equations/be-36-gw-speed-bound.js +5 -13
  117. package/dist/bridges/equations/be-36-gw-speed-bound.js.map +1 -1
  118. package/dist/bridges/equations/be-37-shapiro-delay.d.ts +4 -2
  119. package/dist/bridges/equations/be-37-shapiro-delay.d.ts.map +1 -1
  120. package/dist/bridges/equations/be-37-shapiro-delay.js +22 -37
  121. package/dist/bridges/equations/be-37-shapiro-delay.js.map +1 -1
  122. package/dist/bridges/equations/be-38-mond.d.ts +7 -1
  123. package/dist/bridges/equations/be-38-mond.d.ts.map +1 -1
  124. package/dist/bridges/equations/be-38-mond.js +9 -19
  125. package/dist/bridges/equations/be-38-mond.js.map +1 -1
  126. package/dist/bridges/equations/be-39-asymptotic-safety.d.ts +66 -2
  127. package/dist/bridges/equations/be-39-asymptotic-safety.d.ts.map +1 -1
  128. package/dist/bridges/equations/be-39-asymptotic-safety.js +128 -20
  129. package/dist/bridges/equations/be-39-asymptotic-safety.js.map +1 -1
  130. package/dist/bridges/equations/be-40-composite-higgs.d.ts +7 -1
  131. package/dist/bridges/equations/be-40-composite-higgs.d.ts.map +1 -1
  132. package/dist/bridges/equations/be-40-composite-higgs.js +10 -22
  133. package/dist/bridges/equations/be-40-composite-higgs.js.map +1 -1
  134. package/dist/bridges/equations/be-41-swampland.d.ts +6 -3
  135. package/dist/bridges/equations/be-41-swampland.d.ts.map +1 -1
  136. package/dist/bridges/equations/be-41-swampland.js +11 -23
  137. package/dist/bridges/equations/be-41-swampland.js.map +1 -1
  138. package/dist/bridges/equations/be-42-hawking-temperature.d.ts +2 -0
  139. package/dist/bridges/equations/be-42-hawking-temperature.d.ts.map +1 -1
  140. package/dist/bridges/equations/be-42-hawking-temperature.js +5 -13
  141. package/dist/bridges/equations/be-42-hawking-temperature.js.map +1 -1
  142. package/dist/bridges/equations/be-43-er-epr.d.ts +7 -1
  143. package/dist/bridges/equations/be-43-er-epr.d.ts.map +1 -1
  144. package/dist/bridges/equations/be-43-er-epr.js +5 -13
  145. package/dist/bridges/equations/be-43-er-epr.js.map +1 -1
  146. package/dist/bridges/equations/be-44-soft-hair.d.ts +7 -1
  147. package/dist/bridges/equations/be-44-soft-hair.d.ts.map +1 -1
  148. package/dist/bridges/equations/be-44-soft-hair.js +5 -13
  149. package/dist/bridges/equations/be-44-soft-hair.js.map +1 -1
  150. package/dist/bridges/equations/be-45-tcc.d.ts +7 -1
  151. package/dist/bridges/equations/be-45-tcc.d.ts.map +1 -1
  152. package/dist/bridges/equations/be-45-tcc.js +10 -22
  153. package/dist/bridges/equations/be-45-tcc.js.map +1 -1
  154. package/dist/bridges/equations/be-46-multiverse-measure.d.ts +7 -1
  155. package/dist/bridges/equations/be-46-multiverse-measure.d.ts.map +1 -1
  156. package/dist/bridges/equations/be-46-multiverse-measure.js +9 -19
  157. package/dist/bridges/equations/be-46-multiverse-measure.js.map +1 -1
  158. package/dist/bridges/equations/be-47-bbn-dark-sector.d.ts +7 -1
  159. package/dist/bridges/equations/be-47-bbn-dark-sector.d.ts.map +1 -1
  160. package/dist/bridges/equations/be-47-bbn-dark-sector.js +14 -16
  161. package/dist/bridges/equations/be-47-bbn-dark-sector.js.map +1 -1
  162. package/dist/bridges/equations/be-48-grw-localization.d.ts +7 -1
  163. package/dist/bridges/equations/be-48-grw-localization.d.ts.map +1 -1
  164. package/dist/bridges/equations/be-48-grw-localization.js +15 -20
  165. package/dist/bridges/equations/be-48-grw-localization.js.map +1 -1
  166. package/dist/bridges/equations/be-49-quantum-darwinism.d.ts +7 -1
  167. package/dist/bridges/equations/be-49-quantum-darwinism.d.ts.map +1 -1
  168. package/dist/bridges/equations/be-49-quantum-darwinism.js +10 -22
  169. package/dist/bridges/equations/be-49-quantum-darwinism.js.map +1 -1
  170. package/dist/bridges/equations/be-50-wheeler-feynman.d.ts +42 -12
  171. package/dist/bridges/equations/be-50-wheeler-feynman.d.ts.map +1 -1
  172. package/dist/bridges/equations/be-50-wheeler-feynman.js +84 -20
  173. package/dist/bridges/equations/be-50-wheeler-feynman.js.map +1 -1
  174. package/dist/bridges/equations/be-53-yang-mills-beta.d.ts +158 -0
  175. package/dist/bridges/equations/be-53-yang-mills-beta.d.ts.map +1 -0
  176. package/dist/bridges/equations/be-53-yang-mills-beta.js +175 -0
  177. package/dist/bridges/equations/be-53-yang-mills-beta.js.map +1 -0
  178. package/dist/bridges/equations/be-54-randall-sundrum-brane.d.ts +117 -0
  179. package/dist/bridges/equations/be-54-randall-sundrum-brane.d.ts.map +1 -0
  180. package/dist/bridges/equations/be-54-randall-sundrum-brane.js +213 -0
  181. package/dist/bridges/equations/be-54-randall-sundrum-brane.js.map +1 -0
  182. package/dist/bridges/gravitational-lensing.d.ts +13 -2
  183. package/dist/bridges/gravitational-lensing.d.ts.map +1 -1
  184. package/dist/bridges/gravitational-lensing.js +17 -6
  185. package/dist/bridges/gravitational-lensing.js.map +1 -1
  186. package/dist/bridges/index.d.ts +40 -1
  187. package/dist/bridges/index.d.ts.map +1 -1
  188. package/dist/bridges/index.js +130 -48
  189. package/dist/bridges/index.js.map +1 -1
  190. package/dist/bridges/perihelion-precession-labeled.d.ts +46 -0
  191. package/dist/bridges/perihelion-precession-labeled.d.ts.map +1 -0
  192. package/dist/bridges/perihelion-precession-labeled.js +54 -0
  193. package/dist/bridges/perihelion-precession-labeled.js.map +1 -0
  194. package/dist/bridges/perihelion-precession.d.ts +18 -3
  195. package/dist/bridges/perihelion-precession.d.ts.map +1 -1
  196. package/dist/bridges/perihelion-precession.js +22 -8
  197. package/dist/bridges/perihelion-precession.js.map +1 -1
  198. package/dist/core/axes-registry.d.ts +67 -0
  199. package/dist/core/axes-registry.d.ts.map +1 -0
  200. package/dist/core/axes-registry.js +75 -0
  201. package/dist/core/axes-registry.js.map +1 -0
  202. package/dist/core/cell.d.ts +176 -0
  203. package/dist/core/cell.d.ts.map +1 -0
  204. package/dist/core/cell.js +166 -0
  205. package/dist/core/cell.js.map +1 -0
  206. package/dist/core/constants.d.ts +50 -0
  207. package/dist/core/constants.d.ts.map +1 -0
  208. package/dist/core/constants.js +50 -0
  209. package/dist/core/constants.js.map +1 -0
  210. package/dist/core/flux-rules.d.ts +176 -0
  211. package/dist/core/flux-rules.d.ts.map +1 -0
  212. package/dist/core/flux-rules.js +329 -0
  213. package/dist/core/flux-rules.js.map +1 -0
  214. package/dist/core/labeled-tensor.d.ts +143 -0
  215. package/dist/core/labeled-tensor.d.ts.map +1 -0
  216. package/dist/core/labeled-tensor.js +275 -0
  217. package/dist/core/labeled-tensor.js.map +1 -0
  218. package/dist/core/regime-registry.d.ts +169 -0
  219. package/dist/core/regime-registry.d.ts.map +1 -0
  220. package/dist/core/regime-registry.js +174 -0
  221. package/dist/core/regime-registry.js.map +1 -0
  222. package/dist/core/regime-rule-install.d.ts +26 -0
  223. package/dist/core/regime-rule-install.d.ts.map +1 -0
  224. package/dist/core/regime-rule-install.js +90 -0
  225. package/dist/core/regime-rule-install.js.map +1 -0
  226. package/dist/core/regimes-builtins.d.ts +22 -0
  227. package/dist/core/regimes-builtins.d.ts.map +1 -0
  228. package/dist/core/regimes-builtins.js +96 -0
  229. package/dist/core/regimes-builtins.js.map +1 -0
  230. package/dist/core/tensor.d.ts +112 -0
  231. package/dist/core/tensor.d.ts.map +1 -1
  232. package/dist/core/tensor.js +366 -0
  233. package/dist/core/tensor.js.map +1 -1
  234. package/dist/core/types.d.ts +7 -2
  235. package/dist/core/types.d.ts.map +1 -1
  236. package/dist/core/types.js.map +1 -1
  237. package/dist/core/universal-index.d.ts +97 -0
  238. package/dist/core/universal-index.d.ts.map +1 -0
  239. package/dist/core/universal-index.js +70 -0
  240. package/dist/core/universal-index.js.map +1 -0
  241. package/dist/diff/bridge-gradient.d.ts +94 -0
  242. package/dist/diff/bridge-gradient.d.ts.map +1 -0
  243. package/dist/diff/bridge-gradient.js +83 -0
  244. package/dist/diff/bridge-gradient.js.map +1 -0
  245. package/dist/diff/bridge-specs.d.ts +68 -0
  246. package/dist/diff/bridge-specs.d.ts.map +1 -0
  247. package/dist/diff/bridge-specs.js +96 -0
  248. package/dist/diff/bridge-specs.js.map +1 -0
  249. package/dist/dimensional/bridge-check.d.ts.map +1 -1
  250. package/dist/dimensional/bridge-check.js +8 -0
  251. package/dist/dimensional/bridge-check.js.map +1 -1
  252. package/dist/dimensional/connection-validators.d.ts +13 -6
  253. package/dist/dimensional/connection-validators.d.ts.map +1 -1
  254. package/dist/dimensional/connection-validators.js +1 -1
  255. package/dist/dimensional/connection-validators.js.map +1 -1
  256. package/dist/dimensional/curvature-composite.d.ts +90 -0
  257. package/dist/dimensional/curvature-composite.d.ts.map +1 -0
  258. package/dist/dimensional/curvature-composite.js +57 -0
  259. package/dist/dimensional/curvature-composite.js.map +1 -0
  260. package/dist/dimensional/curvature-invariants.d.ts +90 -0
  261. package/dist/dimensional/curvature-invariants.d.ts.map +1 -0
  262. package/dist/dimensional/curvature-invariants.js +64 -0
  263. package/dist/dimensional/curvature-invariants.js.map +1 -0
  264. package/dist/dimensional/curvature.d.ts +82 -41
  265. package/dist/dimensional/curvature.d.ts.map +1 -1
  266. package/dist/dimensional/curvature.js +19 -11
  267. package/dist/dimensional/curvature.js.map +1 -1
  268. package/dist/dimensional/einstein-equation.d.ts +126 -0
  269. package/dist/dimensional/einstein-equation.d.ts.map +1 -0
  270. package/dist/dimensional/einstein-equation.js +122 -0
  271. package/dist/dimensional/einstein-equation.js.map +1 -0
  272. package/dist/dimensional/field-equation-helpers.d.ts +82 -0
  273. package/dist/dimensional/field-equation-helpers.d.ts.map +1 -0
  274. package/dist/dimensional/field-equation-helpers.js +123 -0
  275. package/dist/dimensional/field-equation-helpers.js.map +1 -0
  276. package/dist/dimensional/friedmann-equation.d.ts +148 -0
  277. package/dist/dimensional/friedmann-equation.d.ts.map +1 -0
  278. package/dist/dimensional/friedmann-equation.js +150 -0
  279. package/dist/dimensional/friedmann-equation.js.map +1 -0
  280. package/dist/dimensional/gauge-field.d.ts +182 -0
  281. package/dist/dimensional/gauge-field.d.ts.map +1 -0
  282. package/dist/dimensional/gauge-field.js +134 -0
  283. package/dist/dimensional/gauge-field.js.map +1 -0
  284. package/dist/dimensional/killing-validators.d.ts +94 -0
  285. package/dist/dimensional/killing-validators.d.ts.map +1 -0
  286. package/dist/dimensional/killing-validators.js +66 -0
  287. package/dist/dimensional/killing-validators.js.map +1 -0
  288. package/dist/dimensional/klein-gordon-equation.d.ts +113 -0
  289. package/dist/dimensional/klein-gordon-equation.d.ts.map +1 -0
  290. package/dist/dimensional/klein-gordon-equation.js +98 -0
  291. package/dist/dimensional/klein-gordon-equation.js.map +1 -0
  292. package/dist/dimensional/rg-flow.d.ts +156 -0
  293. package/dist/dimensional/rg-flow.d.ts.map +1 -0
  294. package/dist/dimensional/rg-flow.js +150 -0
  295. package/dist/dimensional/rg-flow.js.map +1 -0
  296. package/dist/dimensional/stress-energy-validators.d.ts +74 -0
  297. package/dist/dimensional/stress-energy-validators.d.ts.map +1 -0
  298. package/dist/dimensional/stress-energy-validators.js +47 -0
  299. package/dist/dimensional/stress-energy-validators.js.map +1 -0
  300. package/dist/dimensional/tensor-trace.d.ts +128 -0
  301. package/dist/dimensional/tensor-trace.d.ts.map +1 -0
  302. package/dist/dimensional/tensor-trace.js +95 -0
  303. package/dist/dimensional/tensor-trace.js.map +1 -0
  304. package/dist/dimensional/tensor.d.ts +6 -8
  305. package/dist/dimensional/tensor.d.ts.map +1 -1
  306. package/dist/dimensional/tensor.js +3 -1
  307. package/dist/dimensional/tensor.js.map +1 -1
  308. package/dist/dimensional/validator-registry.d.ts +90 -0
  309. package/dist/dimensional/validator-registry.d.ts.map +1 -0
  310. package/dist/dimensional/validator-registry.js +131 -0
  311. package/dist/dimensional/validator-registry.js.map +1 -0
  312. package/dist/dimensional/validator.d.ts +12 -2
  313. package/dist/dimensional/validator.d.ts.map +1 -1
  314. package/dist/dimensional/validator.js +60 -75
  315. package/dist/dimensional/validator.js.map +1 -1
  316. package/dist/dimensional/weyl-validators.d.ts +84 -0
  317. package/dist/dimensional/weyl-validators.d.ts.map +1 -0
  318. package/dist/dimensional/weyl-validators.js +84 -0
  319. package/dist/dimensional/weyl-validators.js.map +1 -0
  320. package/dist/index.d.ts +38 -0
  321. package/dist/index.d.ts.map +1 -1
  322. package/dist/index.js +45 -0
  323. package/dist/index.js.map +1 -1
  324. package/dist/numerical/be37-covariant-eikonal.d.ts +37 -2
  325. package/dist/numerical/be37-covariant-eikonal.d.ts.map +1 -1
  326. package/dist/numerical/be37-covariant-eikonal.js +51 -14
  327. package/dist/numerical/be37-covariant-eikonal.js.map +1 -1
  328. package/dist/numerical/christoffel-flat.d.ts +49 -0
  329. package/dist/numerical/christoffel-flat.d.ts.map +1 -0
  330. package/dist/numerical/christoffel-flat.js +86 -0
  331. package/dist/numerical/christoffel-flat.js.map +1 -0
  332. package/dist/numerical/curvature-lowering-helpers.d.ts +76 -57
  333. package/dist/numerical/curvature-lowering-helpers.d.ts.map +1 -1
  334. package/dist/numerical/curvature-lowering-helpers.js +203 -64
  335. package/dist/numerical/curvature-lowering-helpers.js.map +1 -1
  336. package/dist/numerical/derivative-lowering.d.ts +67 -0
  337. package/dist/numerical/derivative-lowering.d.ts.map +1 -0
  338. package/dist/numerical/derivative-lowering.js +243 -0
  339. package/dist/numerical/derivative-lowering.js.map +1 -0
  340. package/dist/numerical/einstein-equation.d.ts +106 -0
  341. package/dist/numerical/einstein-equation.d.ts.map +1 -0
  342. package/dist/numerical/einstein-equation.js +172 -0
  343. package/dist/numerical/einstein-equation.js.map +1 -0
  344. package/dist/numerical/engine-registry.js +4 -4
  345. package/dist/numerical/engine-registry.js.map +1 -1
  346. package/dist/numerical/geodesic-integrator.d.ts +7 -4
  347. package/dist/numerical/geodesic-integrator.d.ts.map +1 -1
  348. package/dist/numerical/geodesic-integrator.js +5 -1
  349. package/dist/numerical/geodesic-integrator.js.map +1 -1
  350. package/dist/numerical/gl4-integrator.d.ts +57 -9
  351. package/dist/numerical/gl4-integrator.d.ts.map +1 -1
  352. package/dist/numerical/gl4-integrator.js +63 -16
  353. package/dist/numerical/gl4-integrator.js.map +1 -1
  354. package/dist/numerical/killing.d.ts +157 -0
  355. package/dist/numerical/killing.d.ts.map +1 -0
  356. package/dist/numerical/killing.js +242 -0
  357. package/dist/numerical/killing.js.map +1 -0
  358. package/dist/numerical/kretschmann.d.ts +62 -0
  359. package/dist/numerical/kretschmann.d.ts.map +1 -0
  360. package/dist/numerical/kretschmann.js +88 -0
  361. package/dist/numerical/kretschmann.js.map +1 -0
  362. package/dist/numerical/lowering-utils.d.ts +47 -0
  363. package/dist/numerical/lowering-utils.d.ts.map +1 -0
  364. package/dist/numerical/lowering-utils.js +64 -0
  365. package/dist/numerical/lowering-utils.js.map +1 -0
  366. package/dist/numerical/lowering.d.ts +1 -29
  367. package/dist/numerical/lowering.d.ts.map +1 -1
  368. package/dist/numerical/lowering.js +226 -415
  369. package/dist/numerical/lowering.js.map +1 -1
  370. package/dist/numerical/mathts-engine.js +8 -8
  371. package/dist/numerical/mathts-engine.js.map +1 -1
  372. package/dist/numerical/metric-inverse.d.ts.map +1 -1
  373. package/dist/numerical/metric-inverse.js +28 -0
  374. package/dist/numerical/metric-inverse.js.map +1 -1
  375. package/dist/numerical/null-ic.d.ts +40 -0
  376. package/dist/numerical/null-ic.d.ts.map +1 -0
  377. package/dist/numerical/null-ic.js +50 -0
  378. package/dist/numerical/null-ic.js.map +1 -0
  379. package/dist/numerical/null-ray-integrator.d.ts +3 -2
  380. package/dist/numerical/null-ray-integrator.d.ts.map +1 -1
  381. package/dist/numerical/null-ray-integrator.js +6 -3
  382. package/dist/numerical/null-ray-integrator.js.map +1 -1
  383. package/dist/numerical/painleve-gullstrand-metric.d.ts +74 -0
  384. package/dist/numerical/painleve-gullstrand-metric.d.ts.map +1 -0
  385. package/dist/numerical/painleve-gullstrand-metric.js +121 -0
  386. package/dist/numerical/painleve-gullstrand-metric.js.map +1 -0
  387. package/dist/numerical/pderiv.d.ts +35 -3
  388. package/dist/numerical/pderiv.d.ts.map +1 -1
  389. package/dist/numerical/pderiv.js +47 -12
  390. package/dist/numerical/pderiv.js.map +1 -1
  391. package/dist/numerical/perihelion-finder.d.ts +57 -0
  392. package/dist/numerical/perihelion-finder.d.ts.map +1 -1
  393. package/dist/numerical/perihelion-finder.js +57 -0
  394. package/dist/numerical/perihelion-finder.js.map +1 -1
  395. package/dist/numerical/tensor-engine.d.ts +2 -2
  396. package/dist/numerical/tensor-engine.d.ts.map +1 -1
  397. package/dist/numerical/weyl-lowering.d.ts +60 -0
  398. package/dist/numerical/weyl-lowering.d.ts.map +1 -0
  399. package/dist/numerical/weyl-lowering.js +111 -0
  400. package/dist/numerical/weyl-lowering.js.map +1 -0
  401. 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. Different slots may hold quantities of different physical dimensions (e.g., a Lagrangian density and a decoherence rate) and cannot be summed numerically. See [Part I §1.2](docs/specification/Part-I.md) for the formal treatment.
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–50). Part III covers algorithmic implementation.
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-50 across condensed matter, quantum biology, emergent spacetime
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
- v0.4.5 baseline results are recorded in [`docs/architecture/benchmarks.md`](docs/architecture/benchmarks.md).
167
- These are **correctness-first baselines, not optimization targets** — no threshold
168
- gates in v0.4.5. Thresholds and comparative analysis are v0.5.0 scope.
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.4.5 (released 2026-05-17). Refactor + benchmark scaffold release.
173
- Dead-code removal (4 deprecated/unused exports), `Float64Tensor` visibility cleanup,
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.4.5refactor + benchmark baselines (2026-05-17)
177
+ ### v0.6.0Einstein 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 (see `npm test`) |
182
+ | Test suite | **1693** passing (179 files, 1 skip + 1 todo) |
185
183
  | `tsc --noEmit` | clean |
186
- | Benchmark suites | 4 (sanity, AD, BE-37 eikonal, Schwarzschild geodesic) |
187
- | Breaking changes | none |
188
-
189
- **Honest framing:** This is a pure refactor + benchmark scaffold release.
190
- LOC delta across the bridge-test migration is +84 net (helper file +81 LOC;
191
- migration across 39 files is +3 LOC net). Benchmarks establish correctness-first
192
- baselines for v0.5.0+ comparison not optimization wins.
193
-
194
- **Deferred to v0.5.0:** Faraday-cascade BREAKING changes, symplectic
195
- geodesic integrator + bisection perihelion finder, benchmark threshold
196
- gates, Three.js viz.
197
-
198
- ### v0.4.0connection layer + AD + 2 new bridges (2026-05-15)
199
-
200
- | Metric | Value |
201
- |---|---|
202
- | Bridge catalog | **42 / 42** (IDs 11-52) |
203
- | Test suite | passing (see `npm test`) |
204
- | `tsc --noEmit` | clean |
205
- | New public-surface entries | 11 (`christoffel`, `CovariantDerivativeNode`, `integrateGeodesic`, `evaluateGravitationalLensing`, `evaluatePerihelionPrecession`, `evaluateBE37CovariantEikonalNumerical`, `hasAutogradSupport`, `EngineCapabilityError`, `DuplicateCoordinateWarning`, `ForwardGradResult`, `ReverseGradResult`) |
206
- | AD engines | `Float64ReferenceEngine` + `MathTSEngine` (both pass identical conformance suite) |
207
- | Default engine | `MathTSEngine` when optional deps installed; degrades to `Float64ReferenceEngine` with `console.warn` |
208
-
209
- **Honest framing:** Both engines run the same naive O(n) algorithms in
210
- v0.4.0; the MathTSEngine-default flip is a dep-shape + code-path-signal
211
- change, not a performance win. MathTSEngine becomes default because that
212
- is where the AD capability lives.
213
-
214
- **Deferred to v0.5.0:** Faraday-cascade BREAKING changes, symplectic
215
- geodesic integrator + bisection perihelion finder (needed for
216
- RK4-cross-validation of Mercury's Δφ 5.02e-7 rad/orbit), Three.js
217
- viz.
218
-
219
- ### ✅ Numerical backend (v0.3.5, 2026-05-14)
220
-
221
- Numerical-contraction backend: `TensorEngine` interface +
222
- `Float64ReferenceEngine` (zero-dep, default) + `MathTSEngine` (backed
223
- by `@danielsimonjr/mathts-tensor`). ASTengine lowering, two-way
224
- numerical partial derivatives, `InverseMetricInconsistencyWarning`,
225
- BE-37 Shapiro-delay eikonal end-to-end to ±1e-9 relative error.
226
-
227
- ### ✅ Catalog closed at 40/40 (v0.1.0, 2026-05-12)
228
-
229
- First tagged release; transitions the project out
230
- of pre-formalization to a stable scaffold. SemVer applies from this
231
- release onward.
232
-
233
- ### Catalog closed at 40/40 (master `b358257`, 2026-05-11)
234
-
235
- The Tier-5 AST encoding rollout reached **full coverage** with the
236
- Wave Z arc (commits `9cb299f` through `b358257`). Every bridge in
237
- `src/bridges/index.ts` has a non-null `dimensional_signature`, an AST
238
- module in `src/bridges/equations/`, a numerical evaluator with
239
- input-validation guards, and per-bridge encoding tests.
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-
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. Both reasoners agreed on the verdict for all three.
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