universal-physics-tensor 0.47.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (591) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +396 -383
  3. package/bin/upt.mjs +28 -22
  4. package/dist/atlas/benchmark/hybrid-retrieval.d.ts +108 -0
  5. package/dist/atlas/benchmark/hybrid-retrieval.d.ts.map +1 -0
  6. package/dist/atlas/benchmark/hybrid-retrieval.js +241 -0
  7. package/dist/atlas/benchmark/hybrid-retrieval.js.map +1 -0
  8. package/dist/atlas/catalog-formal-ref.d.ts +24 -0
  9. package/dist/atlas/catalog-formal-ref.d.ts.map +1 -0
  10. package/dist/atlas/catalog-formal-ref.js +36 -0
  11. package/dist/atlas/catalog-formal-ref.js.map +1 -0
  12. package/dist/atlas/composition-table.d.ts +11 -46
  13. package/dist/atlas/composition-table.d.ts.map +1 -1
  14. package/dist/atlas/composition-table.js +7 -124
  15. package/dist/atlas/composition-table.js.map +1 -1
  16. package/dist/atlas/conventions.d.ts +4 -58
  17. package/dist/atlas/conventions.d.ts.map +1 -1
  18. package/dist/atlas/conventions.js +3 -88
  19. package/dist/atlas/conventions.js.map +1 -1
  20. package/dist/atlas/derive-evidence.d.ts +50 -3
  21. package/dist/atlas/derive-evidence.d.ts.map +1 -1
  22. package/dist/atlas/derive-evidence.js +73 -4
  23. package/dist/atlas/derive-evidence.js.map +1 -1
  24. package/dist/atlas/diffusion/bridges-closure.d.ts.map +1 -1
  25. package/dist/atlas/diffusion/bridges-closure.js +5 -1
  26. package/dist/atlas/diffusion/bridges-closure.js.map +1 -1
  27. package/dist/atlas/index.d.ts +9 -7
  28. package/dist/atlas/index.d.ts.map +1 -1
  29. package/dist/atlas/index.js +6 -5
  30. package/dist/atlas/index.js.map +1 -1
  31. package/dist/atlas/oscillators/bridges-exact.d.ts.map +1 -1
  32. package/dist/atlas/oscillators/bridges-exact.js +6 -0
  33. package/dist/atlas/oscillators/bridges-exact.js.map +1 -1
  34. package/dist/atlas/oscillators/bridges-limits.d.ts +2 -0
  35. package/dist/atlas/oscillators/bridges-limits.d.ts.map +1 -1
  36. package/dist/atlas/oscillators/bridges-limits.js +20 -19
  37. package/dist/atlas/oscillators/bridges-limits.js.map +1 -1
  38. package/dist/atlas/oscillators/limit-witnesses.d.ts +93 -0
  39. package/dist/atlas/oscillators/limit-witnesses.d.ts.map +1 -0
  40. package/dist/atlas/oscillators/limit-witnesses.js +152 -0
  41. package/dist/atlas/oscillators/limit-witnesses.js.map +1 -0
  42. package/dist/atlas/oscillators/models.d.ts +2 -1
  43. package/dist/atlas/oscillators/models.d.ts.map +1 -1
  44. package/dist/atlas/oscillators/models.js +4 -3
  45. package/dist/atlas/oscillators/models.js.map +1 -1
  46. package/dist/atlas/oscillators/norm-transport-witness.d.ts +37 -0
  47. package/dist/atlas/oscillators/norm-transport-witness.d.ts.map +1 -0
  48. package/dist/atlas/oscillators/norm-transport-witness.js +58 -0
  49. package/dist/atlas/oscillators/norm-transport-witness.js.map +1 -0
  50. package/dist/atlas/oscillators/norm-transport.d.ts +44 -0
  51. package/dist/atlas/oscillators/norm-transport.d.ts.map +1 -0
  52. package/dist/atlas/oscillators/norm-transport.js +66 -0
  53. package/dist/atlas/oscillators/norm-transport.js.map +1 -0
  54. package/dist/atlas/oscillators/norms.d.ts +11 -0
  55. package/dist/atlas/oscillators/norms.d.ts.map +1 -0
  56. package/dist/atlas/oscillators/norms.js +11 -0
  57. package/dist/atlas/oscillators/norms.js.map +1 -0
  58. package/dist/atlas/oscillators/pendulum-motion.d.ts +38 -0
  59. package/dist/atlas/oscillators/pendulum-motion.d.ts.map +1 -0
  60. package/dist/atlas/oscillators/pendulum-motion.js +122 -0
  61. package/dist/atlas/oscillators/pendulum-motion.js.map +1 -0
  62. package/dist/atlas/oscillators/phase-carriage.d.ts +38 -0
  63. package/dist/atlas/oscillators/phase-carriage.d.ts.map +1 -0
  64. package/dist/atlas/oscillators/phase-carriage.js +96 -0
  65. package/dist/atlas/oscillators/phase-carriage.js.map +1 -0
  66. package/dist/atlas/oscillators/phase-translation.d.ts +46 -0
  67. package/dist/atlas/oscillators/phase-translation.d.ts.map +1 -0
  68. package/dist/atlas/oscillators/phase-translation.js +178 -0
  69. package/dist/atlas/oscillators/phase-translation.js.map +1 -0
  70. package/dist/atlas/oscillators/position-translation.d.ts +59 -0
  71. package/dist/atlas/oscillators/position-translation.d.ts.map +1 -0
  72. package/dist/atlas/oscillators/position-translation.js +254 -0
  73. package/dist/atlas/oscillators/position-translation.js.map +1 -0
  74. package/dist/atlas/path-bound.d.ts +126 -9
  75. package/dist/atlas/path-bound.d.ts.map +1 -1
  76. package/dist/atlas/path-bound.js +372 -23
  77. package/dist/atlas/path-bound.js.map +1 -1
  78. package/dist/atlas/physjs-ref.d.ts +112 -0
  79. package/dist/atlas/physjs-ref.d.ts.map +1 -0
  80. package/dist/atlas/physjs-ref.js +842 -0
  81. package/dist/atlas/physjs-ref.js.map +1 -0
  82. package/dist/atlas/regime.d.ts +12 -136
  83. package/dist/atlas/regime.d.ts.map +1 -1
  84. package/dist/atlas/regime.js +8 -254
  85. package/dist/atlas/regime.js.map +1 -1
  86. package/dist/atlas/serialize.d.ts.map +1 -1
  87. package/dist/atlas/serialize.js +25 -0
  88. package/dist/atlas/serialize.js.map +1 -1
  89. package/dist/atlas/translation-registry.d.ts +22 -0
  90. package/dist/atlas/translation-registry.d.ts.map +1 -0
  91. package/dist/atlas/translation-registry.js +31 -0
  92. package/dist/atlas/translation-registry.js.map +1 -0
  93. package/dist/atlas/translation.d.ts +116 -0
  94. package/dist/atlas/translation.d.ts.map +1 -0
  95. package/dist/atlas/translation.js +34 -0
  96. package/dist/atlas/translation.js.map +1 -0
  97. package/dist/atlas/types.d.ts +74 -240
  98. package/dist/atlas/types.d.ts.map +1 -1
  99. package/dist/atlas/types.js +5 -37
  100. package/dist/atlas/types.js.map +1 -1
  101. package/dist/atlas/waves/bridges-closure.d.ts.map +1 -1
  102. package/dist/atlas/waves/bridges-closure.js +4 -0
  103. package/dist/atlas/waves/bridges-closure.js.map +1 -1
  104. package/dist/atlas/waves/bridges.d.ts.map +1 -1
  105. package/dist/atlas/waves/bridges.js +3 -0
  106. package/dist/atlas/waves/bridges.js.map +1 -1
  107. package/dist/atlas/waves/models.js +1 -1
  108. package/dist/atlas/waves/models.js.map +1 -1
  109. package/dist/atlas/witness-dominance.d.ts +50 -0
  110. package/dist/atlas/witness-dominance.d.ts.map +1 -0
  111. package/dist/atlas/witness-dominance.js +86 -0
  112. package/dist/atlas/witness-dominance.js.map +1 -0
  113. package/dist/atlas/witness-specs.d.ts +30 -0
  114. package/dist/atlas/witness-specs.d.ts.map +1 -1
  115. package/dist/atlas/witness-specs.js +107 -0
  116. package/dist/atlas/witness-specs.js.map +1 -1
  117. package/dist/bridges/be53-yang-mills-confrontation.d.ts +81 -0
  118. package/dist/bridges/be53-yang-mills-confrontation.d.ts.map +1 -0
  119. package/dist/bridges/be53-yang-mills-confrontation.js +110 -0
  120. package/dist/bridges/be53-yang-mills-confrontation.js.map +1 -0
  121. package/dist/bridges/confrontations.d.ts +1 -1
  122. package/dist/bridges/confrontations.d.ts.map +1 -1
  123. package/dist/bridges/confrontations.js +291 -3
  124. package/dist/bridges/confrontations.js.map +1 -1
  125. package/dist/bridges/equations/be-13-einstein-trace.d.ts +2 -3
  126. package/dist/bridges/equations/be-13-einstein-trace.d.ts.map +1 -1
  127. package/dist/bridges/equations/be-13-einstein-trace.js +2 -3
  128. package/dist/bridges/equations/be-13-einstein-trace.js.map +1 -1
  129. package/dist/bridges/equations/be-38-mond.d.ts +7 -5
  130. package/dist/bridges/equations/be-38-mond.d.ts.map +1 -1
  131. package/dist/bridges/equations/be-38-mond.js +7 -5
  132. package/dist/bridges/equations/be-38-mond.js.map +1 -1
  133. package/dist/bridges/equations/be-53-yang-mills-beta.d.ts +21 -0
  134. package/dist/bridges/equations/be-53-yang-mills-beta.d.ts.map +1 -1
  135. package/dist/bridges/equations/be-53-yang-mills-beta.js +12 -0
  136. package/dist/bridges/equations/be-53-yang-mills-beta.js.map +1 -1
  137. package/dist/bridges/evaluator-inputs.d.ts +21 -0
  138. package/dist/bridges/evaluator-inputs.d.ts.map +1 -0
  139. package/dist/bridges/evaluator-inputs.js +75 -0
  140. package/dist/bridges/evaluator-inputs.js.map +1 -0
  141. package/dist/bridges/evaluators.d.ts +38 -0
  142. package/dist/bridges/evaluators.d.ts.map +1 -1
  143. package/dist/bridges/evaluators.js +41 -15
  144. package/dist/bridges/evaluators.js.map +1 -1
  145. package/dist/bridges/gravitational-lensing.d.ts +1 -1
  146. package/dist/bridges/gravitational-lensing.js +1 -1
  147. package/dist/bridges/index.d.ts +1 -1
  148. package/dist/bridges/index.d.ts.map +1 -1
  149. package/dist/bridges/index.js +13 -13
  150. package/dist/bridges/index.js.map +1 -1
  151. package/dist/bridges/observations/types.d.ts +110 -2
  152. package/dist/bridges/observations/types.d.ts.map +1 -1
  153. package/dist/bridges/observations/types.js +29 -0
  154. package/dist/bridges/observations/types.js.map +1 -1
  155. package/dist/bridges/perihelion-precession.d.ts +1 -1
  156. package/dist/bridges/perihelion-precession.js +1 -1
  157. package/dist/canonical/canonical-equation.d.ts +1 -1
  158. package/dist/canonical/canonical-equation.d.ts.map +1 -1
  159. package/dist/canonical/entries/atomic.d.ts.map +1 -1
  160. package/dist/canonical/entries/atomic.js +32 -10
  161. package/dist/canonical/entries/atomic.js.map +1 -1
  162. package/dist/canonical/entries/dimensional-classics.js +2 -2
  163. package/dist/canonical/entries/dimensional-classics.js.map +1 -1
  164. package/dist/canonical/entries/mechanics.d.ts.map +1 -1
  165. package/dist/canonical/entries/mechanics.js +10 -6
  166. package/dist/canonical/entries/mechanics.js.map +1 -1
  167. package/dist/canonical/entries/relativity.d.ts.map +1 -1
  168. package/dist/canonical/entries/relativity.js +41 -8
  169. package/dist/canonical/entries/relativity.js.map +1 -1
  170. package/dist/canonical/entries/thermo-nuclear-cosmo.js +5 -5
  171. package/dist/canonical/entries/thermo-nuclear-cosmo.js.map +1 -1
  172. package/dist/canonical/linkage.d.ts.map +1 -1
  173. package/dist/canonical/linkage.js +14 -8
  174. package/dist/canonical/linkage.js.map +1 -1
  175. package/dist/canonical/normal-form.d.ts +17 -0
  176. package/dist/canonical/normal-form.d.ts.map +1 -1
  177. package/dist/canonical/normal-form.js +21 -4
  178. package/dist/canonical/normal-form.js.map +1 -1
  179. package/dist/cases/brownian-sphere.d.ts +68 -0
  180. package/dist/cases/brownian-sphere.d.ts.map +1 -0
  181. package/dist/cases/brownian-sphere.js +353 -0
  182. package/dist/cases/brownian-sphere.js.map +1 -0
  183. package/dist/cases/damped-resonator.d.ts +23 -0
  184. package/dist/cases/damped-resonator.d.ts.map +1 -0
  185. package/dist/cases/damped-resonator.js +224 -0
  186. package/dist/cases/damped-resonator.js.map +1 -0
  187. package/dist/cases/index.d.ts +11 -0
  188. package/dist/cases/index.d.ts.map +1 -0
  189. package/dist/cases/index.js +29 -0
  190. package/dist/cases/index.js.map +1 -0
  191. package/dist/cases/kepler-rv.d.ts +13 -0
  192. package/dist/cases/kepler-rv.d.ts.map +1 -0
  193. package/dist/cases/kepler-rv.js +168 -0
  194. package/dist/cases/kepler-rv.js.map +1 -0
  195. package/dist/cases/lumped-cooling.d.ts +46 -0
  196. package/dist/cases/lumped-cooling.d.ts.map +1 -0
  197. package/dist/cases/lumped-cooling.js +261 -0
  198. package/dist/cases/lumped-cooling.js.map +1 -0
  199. package/dist/cases/quadrature.d.ts +14 -0
  200. package/dist/cases/quadrature.d.ts.map +1 -0
  201. package/dist/cases/quadrature.js +41 -0
  202. package/dist/cases/quadrature.js.map +1 -0
  203. package/dist/cases/resistor-noise.d.ts +14 -0
  204. package/dist/cases/resistor-noise.d.ts.map +1 -0
  205. package/dist/cases/resistor-noise.js +210 -0
  206. package/dist/cases/resistor-noise.js.map +1 -0
  207. package/dist/cases/skin-depth.d.ts +21 -0
  208. package/dist/cases/skin-depth.d.ts.map +1 -0
  209. package/dist/cases/skin-depth.js +174 -0
  210. package/dist/cases/skin-depth.js.map +1 -0
  211. package/dist/cases/types.d.ts +115 -0
  212. package/dist/cases/types.d.ts.map +1 -0
  213. package/dist/cases/types.js +20 -0
  214. package/dist/cases/types.js.map +1 -0
  215. package/dist/cli/commands/_atlas-map.d.ts +409 -0
  216. package/dist/cli/commands/_atlas-map.d.ts.map +1 -0
  217. package/dist/cli/commands/_atlas-map.js +1014 -0
  218. package/dist/cli/commands/_atlas-map.js.map +1 -0
  219. package/dist/cli/commands/_atlas-route.d.ts +111 -0
  220. package/dist/cli/commands/_atlas-route.d.ts.map +1 -0
  221. package/dist/cli/commands/_atlas-route.js +140 -0
  222. package/dist/cli/commands/_atlas-route.js.map +1 -0
  223. package/dist/cli/commands/_discovery-opts.d.ts.map +1 -1
  224. package/dist/cli/commands/_discovery-opts.js +10 -1
  225. package/dist/cli/commands/_discovery-opts.js.map +1 -1
  226. package/dist/cli/commands/atlas.d.ts +20 -0
  227. package/dist/cli/commands/atlas.d.ts.map +1 -1
  228. package/dist/cli/commands/atlas.js +333 -19
  229. package/dist/cli/commands/atlas.js.map +1 -1
  230. package/dist/cli/commands/audit.d.ts.map +1 -1
  231. package/dist/cli/commands/audit.js +14 -5
  232. package/dist/cli/commands/audit.js.map +1 -1
  233. package/dist/cli/commands/axes.js +4 -4
  234. package/dist/cli/commands/candidates.d.ts.map +1 -1
  235. package/dist/cli/commands/candidates.js +6 -5
  236. package/dist/cli/commands/candidates.js.map +1 -1
  237. package/dist/cli/commands/canonical.d.ts.map +1 -1
  238. package/dist/cli/commands/canonical.js +41 -12
  239. package/dist/cli/commands/canonical.js.map +1 -1
  240. package/dist/cli/commands/confront.d.ts.map +1 -1
  241. package/dist/cli/commands/confront.js +210 -28
  242. package/dist/cli/commands/confront.js.map +1 -1
  243. package/dist/cli/commands/connectors.d.ts.map +1 -1
  244. package/dist/cli/commands/connectors.js +11 -10
  245. package/dist/cli/commands/connectors.js.map +1 -1
  246. package/dist/cli/commands/coverage.js +3 -3
  247. package/dist/cli/commands/derive.d.ts.map +1 -1
  248. package/dist/cli/commands/derive.js +22 -10
  249. package/dist/cli/commands/derive.js.map +1 -1
  250. package/dist/cli/commands/discover.d.ts.map +1 -1
  251. package/dist/cli/commands/discover.js +149 -32
  252. package/dist/cli/commands/discover.js.map +1 -1
  253. package/dist/cli/commands/eval.d.ts.map +1 -1
  254. package/dist/cli/commands/eval.js +76 -17
  255. package/dist/cli/commands/eval.js.map +1 -1
  256. package/dist/cli/commands/evaluate.d.ts +30 -0
  257. package/dist/cli/commands/evaluate.d.ts.map +1 -1
  258. package/dist/cli/commands/evaluate.js +440 -25
  259. package/dist/cli/commands/evaluate.js.map +1 -1
  260. package/dist/cli/commands/explain.d.ts.map +1 -1
  261. package/dist/cli/commands/explain.js +38 -11
  262. package/dist/cli/commands/explain.js.map +1 -1
  263. package/dist/cli/commands/frontier.d.ts +3 -0
  264. package/dist/cli/commands/frontier.d.ts.map +1 -0
  265. package/dist/cli/commands/frontier.js +28 -0
  266. package/dist/cli/commands/frontier.js.map +1 -0
  267. package/dist/cli/commands/ground.d.ts.map +1 -1
  268. package/dist/cli/commands/ground.js +37 -12
  269. package/dist/cli/commands/ground.js.map +1 -1
  270. package/dist/cli/commands/index.d.ts +5 -0
  271. package/dist/cli/commands/index.d.ts.map +1 -1
  272. package/dist/cli/commands/index.js +5 -0
  273. package/dist/cli/commands/index.js.map +1 -1
  274. package/dist/cli/commands/map.d.ts +8 -0
  275. package/dist/cli/commands/map.d.ts.map +1 -1
  276. package/dist/cli/commands/map.js +401 -64
  277. package/dist/cli/commands/map.js.map +1 -1
  278. package/dist/cli/commands/metric.d.ts +3 -0
  279. package/dist/cli/commands/metric.d.ts.map +1 -0
  280. package/dist/cli/commands/metric.js +136 -0
  281. package/dist/cli/commands/metric.js.map +1 -0
  282. package/dist/cli/commands/path.d.ts +109 -1
  283. package/dist/cli/commands/path.d.ts.map +1 -1
  284. package/dist/cli/commands/path.js +1019 -109
  285. package/dist/cli/commands/path.js.map +1 -1
  286. package/dist/cli/commands/predict.d.ts.map +1 -1
  287. package/dist/cli/commands/predict.js +6 -5
  288. package/dist/cli/commands/predict.js.map +1 -1
  289. package/dist/cli/commands/priority.d.ts.map +1 -1
  290. package/dist/cli/commands/priority.js +4 -3
  291. package/dist/cli/commands/priority.js.map +1 -1
  292. package/dist/cli/commands/probe.d.ts +7 -0
  293. package/dist/cli/commands/probe.d.ts.map +1 -1
  294. package/dist/cli/commands/probe.js +234 -52
  295. package/dist/cli/commands/probe.js.map +1 -1
  296. package/dist/cli/commands/recover.d.ts.map +1 -1
  297. package/dist/cli/commands/recover.js +17 -6
  298. package/dist/cli/commands/recover.js.map +1 -1
  299. package/dist/cli/commands/regime.d.ts +1 -1
  300. package/dist/cli/commands/regime.d.ts.map +1 -1
  301. package/dist/cli/commands/regime.js +134 -33
  302. package/dist/cli/commands/regime.js.map +1 -1
  303. package/dist/cli/commands/retrieve.d.ts +3 -0
  304. package/dist/cli/commands/retrieve.d.ts.map +1 -0
  305. package/dist/cli/commands/retrieve.js +65 -0
  306. package/dist/cli/commands/retrieve.js.map +1 -0
  307. package/dist/cli/commands/search.d.ts +3 -0
  308. package/dist/cli/commands/search.d.ts.map +1 -0
  309. package/dist/cli/commands/search.js +70 -0
  310. package/dist/cli/commands/search.js.map +1 -0
  311. package/dist/cli/commands/symbolic.d.ts.map +1 -1
  312. package/dist/cli/commands/symbolic.js +112 -21
  313. package/dist/cli/commands/symbolic.js.map +1 -1
  314. package/dist/cli/commands/testplan.d.ts +3 -0
  315. package/dist/cli/commands/testplan.d.ts.map +1 -0
  316. package/dist/cli/commands/testplan.js +131 -0
  317. package/dist/cli/commands/testplan.js.map +1 -0
  318. package/dist/cli/conventions.d.ts +22 -0
  319. package/dist/cli/conventions.d.ts.map +1 -0
  320. package/dist/cli/conventions.js +48 -0
  321. package/dist/cli/conventions.js.map +1 -0
  322. package/dist/cli/euler-guard.d.ts +9 -0
  323. package/dist/cli/euler-guard.d.ts.map +1 -0
  324. package/dist/cli/euler-guard.js +11 -0
  325. package/dist/cli/euler-guard.js.map +1 -0
  326. package/dist/cli/eval-numbers.d.ts +26 -0
  327. package/dist/cli/eval-numbers.d.ts.map +1 -0
  328. package/dist/cli/eval-numbers.js +49 -0
  329. package/dist/cli/eval-numbers.js.map +1 -0
  330. package/dist/cli/expr-print.d.ts +25 -0
  331. package/dist/cli/expr-print.d.ts.map +1 -0
  332. package/dist/cli/expr-print.js +123 -0
  333. package/dist/cli/expr-print.js.map +1 -0
  334. package/dist/cli/graphs.d.ts +26 -0
  335. package/dist/cli/graphs.d.ts.map +1 -1
  336. package/dist/cli/graphs.js +19 -0
  337. package/dist/cli/graphs.js.map +1 -1
  338. package/dist/cli/main.d.ts +4 -10
  339. package/dist/cli/main.d.ts.map +1 -1
  340. package/dist/cli/main.js +370 -167
  341. package/dist/cli/main.js.map +1 -1
  342. package/dist/cli/map-evidence.d.ts +47 -0
  343. package/dist/cli/map-evidence.d.ts.map +1 -0
  344. package/dist/cli/map-evidence.js +53 -0
  345. package/dist/cli/map-evidence.js.map +1 -0
  346. package/dist/cli/output.d.ts +21 -1
  347. package/dist/cli/output.d.ts.map +1 -1
  348. package/dist/cli/output.js +5 -1
  349. package/dist/cli/output.js.map +1 -1
  350. package/dist/{composition → cli}/poster-source.d.ts +3 -2
  351. package/dist/cli/poster-source.d.ts.map +1 -0
  352. package/dist/{composition → cli}/poster-source.js +2 -1
  353. package/dist/cli/poster-source.js.map +1 -0
  354. package/dist/cli/record-reach.d.ts +44 -0
  355. package/dist/cli/record-reach.d.ts.map +1 -0
  356. package/dist/cli/record-reach.js +228 -0
  357. package/dist/cli/record-reach.js.map +1 -0
  358. package/dist/cli/record-tables.d.ts +38 -0
  359. package/dist/cli/record-tables.d.ts.map +1 -0
  360. package/dist/cli/record-tables.js +110 -0
  361. package/dist/cli/record-tables.js.map +1 -0
  362. package/dist/cli/record.d.ts +141 -0
  363. package/dist/cli/record.d.ts.map +1 -0
  364. package/dist/cli/record.js +612 -0
  365. package/dist/cli/record.js.map +1 -0
  366. package/dist/cli/search-index.d.ts +56 -0
  367. package/dist/cli/search-index.d.ts.map +1 -0
  368. package/dist/cli/search-index.js +190 -0
  369. package/dist/cli/search-index.js.map +1 -0
  370. package/dist/cli/statuses.d.ts +25 -0
  371. package/dist/cli/statuses.d.ts.map +1 -0
  372. package/dist/cli/statuses.js +276 -0
  373. package/dist/cli/statuses.js.map +1 -0
  374. package/dist/cli/version.d.ts +8 -0
  375. package/dist/cli/version.d.ts.map +1 -1
  376. package/dist/cli/version.js +32 -1
  377. package/dist/cli/version.js.map +1 -1
  378. package/dist/cli-api.d.ts +33 -15
  379. package/dist/cli-api.d.ts.map +1 -1
  380. package/dist/cli-api.js +31 -11
  381. package/dist/cli-api.js.map +1 -1
  382. package/dist/composition/bridge-analysis.d.ts.map +1 -1
  383. package/dist/composition/bridge-analysis.js +2 -1
  384. package/dist/composition/bridge-analysis.js.map +1 -1
  385. package/dist/composition/canonical-compare.d.ts +36 -11
  386. package/dist/composition/canonical-compare.d.ts.map +1 -1
  387. package/dist/composition/canonical-compare.js +424 -56
  388. package/dist/composition/canonical-compare.js.map +1 -1
  389. package/dist/composition/canonical-graph.d.ts +2 -2
  390. package/dist/composition/canonical-graph.js +3 -3
  391. package/dist/composition/canonical-graph.js.map +1 -1
  392. package/dist/composition/canonical-prefactors.d.ts +24 -1
  393. package/dist/composition/canonical-prefactors.d.ts.map +1 -1
  394. package/dist/composition/canonical-prefactors.js +97 -1
  395. package/dist/composition/canonical-prefactors.js.map +1 -1
  396. package/dist/composition/compose-symbolic.js +1 -1
  397. package/dist/composition/compose-symbolic.js.map +1 -1
  398. package/dist/composition/compose.d.ts.map +1 -1
  399. package/dist/composition/compose.js +17 -9
  400. package/dist/composition/compose.js.map +1 -1
  401. package/dist/composition/composition-recovery.d.ts +47 -0
  402. package/dist/composition/composition-recovery.d.ts.map +1 -0
  403. package/dist/composition/composition-recovery.js +77 -0
  404. package/dist/composition/composition-recovery.js.map +1 -0
  405. package/dist/composition/consequence.d.ts +39 -0
  406. package/dist/composition/consequence.d.ts.map +1 -1
  407. package/dist/composition/consequence.js +37 -0
  408. package/dist/composition/consequence.js.map +1 -1
  409. package/dist/composition/discovery.d.ts +20 -0
  410. package/dist/composition/discovery.d.ts.map +1 -1
  411. package/dist/composition/discovery.js +27 -5
  412. package/dist/composition/discovery.js.map +1 -1
  413. package/dist/composition/edge.d.ts +1 -1
  414. package/dist/composition/edge.d.ts.map +1 -1
  415. package/dist/composition/edge.js.map +1 -1
  416. package/dist/composition/edges/_catalog-helpers.d.ts +4 -0
  417. package/dist/composition/edges/_catalog-helpers.d.ts.map +1 -1
  418. package/dist/composition/edges/_catalog-helpers.js +15 -0
  419. package/dist/composition/edges/_catalog-helpers.js.map +1 -1
  420. package/dist/composition/edges/calibration.d.ts.map +1 -1
  421. package/dist/composition/edges/calibration.js +57 -0
  422. package/dist/composition/edges/calibration.js.map +1 -1
  423. package/dist/composition/edges/catalog-fields.d.ts.map +1 -1
  424. package/dist/composition/edges/catalog-fields.js +2 -1
  425. package/dist/composition/edges/catalog-fields.js.map +1 -1
  426. package/dist/composition/edges/catalog-gravitation-cosmology.d.ts.map +1 -1
  427. package/dist/composition/edges/catalog-gravitation-cosmology.js +2 -1
  428. package/dist/composition/edges/catalog-gravitation-cosmology.js.map +1 -1
  429. package/dist/composition/edges/catalog-quantum.d.ts.map +1 -1
  430. package/dist/composition/edges/catalog-quantum.js +26 -0
  431. package/dist/composition/edges/catalog-quantum.js.map +1 -1
  432. package/dist/composition/edges/catalog-tranche.d.ts.map +1 -1
  433. package/dist/composition/edges/catalog-tranche.js +2 -1
  434. package/dist/composition/edges/catalog-tranche.js.map +1 -1
  435. package/dist/composition/expr-eval.d.ts.map +1 -1
  436. package/dist/composition/expr-eval.js +4 -1
  437. package/dist/composition/expr-eval.js.map +1 -1
  438. package/dist/composition/expr-simplify.js +1 -1
  439. package/dist/composition/expr-simplify.js.map +1 -1
  440. package/dist/composition/frontier-account.d.ts +78 -0
  441. package/dist/composition/frontier-account.d.ts.map +1 -0
  442. package/dist/composition/frontier-account.js +127 -0
  443. package/dist/composition/frontier-account.js.map +1 -0
  444. package/dist/composition/graph-viz.d.ts +7 -22
  445. package/dist/composition/graph-viz.d.ts.map +1 -1
  446. package/dist/composition/graph-viz.js +4 -27
  447. package/dist/composition/graph-viz.js.map +1 -1
  448. package/dist/composition/grounding.d.ts +49 -0
  449. package/dist/composition/grounding.d.ts.map +1 -1
  450. package/dist/composition/grounding.js +38 -0
  451. package/dist/composition/grounding.js.map +1 -1
  452. package/dist/composition/index.d.ts +0 -2
  453. package/dist/composition/index.d.ts.map +1 -1
  454. package/dist/composition/index.js +1 -1
  455. package/dist/composition/index.js.map +1 -1
  456. package/dist/composition/probe/expression-gaps.d.ts +27 -0
  457. package/dist/composition/probe/expression-gaps.d.ts.map +1 -0
  458. package/dist/composition/probe/expression-gaps.js +47 -0
  459. package/dist/composition/probe/expression-gaps.js.map +1 -0
  460. package/dist/composition/probe/frontier.d.ts +2 -1
  461. package/dist/composition/probe/frontier.d.ts.map +1 -1
  462. package/dist/composition/probe/frontier.js +3 -2
  463. package/dist/composition/probe/frontier.js.map +1 -1
  464. package/dist/composition/probe/index.d.ts +4 -1
  465. package/dist/composition/probe/index.d.ts.map +1 -1
  466. package/dist/composition/probe/index.js +3 -1
  467. package/dist/composition/probe/index.js.map +1 -1
  468. package/dist/composition/probe/pipeline.d.ts +2 -0
  469. package/dist/composition/probe/pipeline.d.ts.map +1 -1
  470. package/dist/composition/probe/pipeline.js +6 -2
  471. package/dist/composition/probe/pipeline.js.map +1 -1
  472. package/dist/composition/probe/problem.d.ts +7 -0
  473. package/dist/composition/probe/problem.d.ts.map +1 -1
  474. package/dist/composition/probe/problem.js +15 -5
  475. package/dist/composition/probe/problem.js.map +1 -1
  476. package/dist/composition/probe/search-budget.d.ts.map +1 -1
  477. package/dist/composition/probe/search-budget.js +6 -2
  478. package/dist/composition/probe/search-budget.js.map +1 -1
  479. package/dist/composition/probe/study.d.ts +340 -0
  480. package/dist/composition/probe/study.d.ts.map +1 -0
  481. package/dist/composition/probe/study.js +1519 -0
  482. package/dist/composition/probe/study.js.map +1 -0
  483. package/dist/composition/proposed-bridges.js +1 -1
  484. package/dist/composition/proposed-bridges.js.map +1 -1
  485. package/dist/composition/quantities.d.ts +4 -16
  486. package/dist/composition/quantities.d.ts.map +1 -1
  487. package/dist/composition/quantities.js +4 -16
  488. package/dist/composition/quantities.js.map +1 -1
  489. package/dist/composition/retrodiction.d.ts.map +1 -1
  490. package/dist/composition/retrodiction.js +6 -2
  491. package/dist/composition/retrodiction.js.map +1 -1
  492. package/dist/composition/uncertainty.d.ts +1 -1
  493. package/dist/composition/uncertainty.d.ts.map +1 -1
  494. package/dist/composition/user-equation.d.ts +87 -14
  495. package/dist/composition/user-equation.d.ts.map +1 -1
  496. package/dist/composition/user-equation.js +266 -59
  497. package/dist/composition/user-equation.js.map +1 -1
  498. package/dist/core/constants.d.ts +9 -4
  499. package/dist/core/constants.d.ts.map +1 -1
  500. package/dist/core/constants.js +9 -4
  501. package/dist/core/constants.js.map +1 -1
  502. package/dist/core/types.d.ts +1 -1
  503. package/dist/core/types.d.ts.map +1 -1
  504. package/dist/core/types.js +2 -1
  505. package/dist/core/types.js.map +1 -1
  506. package/dist/dimensional/curvature.d.ts +7 -56
  507. package/dist/dimensional/curvature.d.ts.map +1 -1
  508. package/dist/dimensional/curvature.js +7 -76
  509. package/dist/dimensional/curvature.js.map +1 -1
  510. package/dist/dimensional/dimension-spec.d.ts +7 -1
  511. package/dist/dimensional/dimension-spec.d.ts.map +1 -1
  512. package/dist/dimensional/dimension-spec.js +131 -3
  513. package/dist/dimensional/dimension-spec.js.map +1 -1
  514. package/dist/dimensional/formula-names.d.ts +30 -0
  515. package/dist/dimensional/formula-names.d.ts.map +1 -0
  516. package/dist/dimensional/formula-names.js +37 -0
  517. package/dist/dimensional/formula-names.js.map +1 -0
  518. package/dist/dimensional/natural-units.d.ts +33 -0
  519. package/dist/dimensional/natural-units.d.ts.map +1 -0
  520. package/dist/dimensional/natural-units.js +58 -0
  521. package/dist/dimensional/natural-units.js.map +1 -0
  522. package/dist/{composition → dimensional}/symbolic-constants.d.ts +21 -2
  523. package/dist/dimensional/symbolic-constants.d.ts.map +1 -0
  524. package/dist/dimensional/symbolic-constants.js +116 -0
  525. package/dist/dimensional/symbolic-constants.js.map +1 -0
  526. package/dist/dimensional/unit-convention.d.ts +30 -0
  527. package/dist/dimensional/unit-convention.d.ts.map +1 -0
  528. package/dist/dimensional/unit-convention.js +60 -0
  529. package/dist/dimensional/unit-convention.js.map +1 -0
  530. package/dist/dimensional/units.d.ts +43 -0
  531. package/dist/dimensional/units.d.ts.map +1 -0
  532. package/dist/dimensional/units.js +197 -0
  533. package/dist/dimensional/units.js.map +1 -0
  534. package/dist/index.d.ts +8 -4
  535. package/dist/index.d.ts.map +1 -1
  536. package/dist/index.js +7 -3
  537. package/dist/index.js.map +1 -1
  538. package/dist/numerical/bianchi-residual.d.ts +55 -0
  539. package/dist/numerical/bianchi-residual.d.ts.map +1 -0
  540. package/dist/numerical/bianchi-residual.js +79 -0
  541. package/dist/numerical/bianchi-residual.js.map +1 -0
  542. package/dist/numerical/binding-value.d.ts +67 -0
  543. package/dist/numerical/binding-value.d.ts.map +1 -0
  544. package/dist/numerical/binding-value.js +347 -0
  545. package/dist/numerical/binding-value.js.map +1 -0
  546. package/dist/numerical/connection-lowering-helpers.d.ts.map +1 -1
  547. package/dist/numerical/connection-lowering-helpers.js +13 -26
  548. package/dist/numerical/connection-lowering-helpers.js.map +1 -1
  549. package/dist/numerical/curvature-lowering-helpers.d.ts.map +1 -1
  550. package/dist/numerical/curvature-lowering-helpers.js +9 -0
  551. package/dist/numerical/curvature-lowering-helpers.js.map +1 -1
  552. package/dist/numerical/float64-engine.d.ts.map +1 -1
  553. package/dist/numerical/float64-engine.js +23 -16
  554. package/dist/numerical/float64-engine.js.map +1 -1
  555. package/dist/numerical/formula-dimension.d.ts +7 -0
  556. package/dist/numerical/formula-dimension.d.ts.map +1 -1
  557. package/dist/numerical/formula-dimension.js +23 -6
  558. package/dist/numerical/formula-dimension.js.map +1 -1
  559. package/dist/numerical/formula-mathts.d.ts.map +1 -1
  560. package/dist/numerical/formula-mathts.js +68 -6
  561. package/dist/numerical/formula-mathts.js.map +1 -1
  562. package/dist/numerical/formula.d.ts +27 -0
  563. package/dist/numerical/formula.d.ts.map +1 -1
  564. package/dist/numerical/formula.js +68 -6
  565. package/dist/numerical/formula.js.map +1 -1
  566. package/dist/numerical/spacetime-metrics.d.ts +243 -0
  567. package/dist/numerical/spacetime-metrics.d.ts.map +1 -0
  568. package/dist/numerical/spacetime-metrics.js +1056 -0
  569. package/dist/numerical/spacetime-metrics.js.map +1 -0
  570. package/dist/relations/composition-table.d.ts +61 -0
  571. package/dist/relations/composition-table.d.ts.map +1 -0
  572. package/dist/relations/composition-table.js +140 -0
  573. package/dist/relations/composition-table.js.map +1 -0
  574. package/dist/relations/conventions.d.ts +63 -0
  575. package/dist/relations/conventions.d.ts.map +1 -0
  576. package/dist/relations/conventions.js +93 -0
  577. package/dist/relations/conventions.js.map +1 -0
  578. package/dist/relations/regime.d.ts +159 -0
  579. package/dist/relations/regime.d.ts.map +1 -0
  580. package/dist/relations/regime.js +304 -0
  581. package/dist/relations/regime.js.map +1 -0
  582. package/dist/relations/types.d.ts +259 -0
  583. package/dist/relations/types.d.ts.map +1 -0
  584. package/dist/relations/types.js +37 -0
  585. package/dist/relations/types.js.map +1 -0
  586. package/package.json +166 -163
  587. package/dist/composition/poster-source.d.ts.map +0 -1
  588. package/dist/composition/poster-source.js.map +0 -1
  589. package/dist/composition/symbolic-constants.d.ts.map +0 -1
  590. package/dist/composition/symbolic-constants.js +0 -65
  591. package/dist/composition/symbolic-constants.js.map +0 -1
@@ -0,0 +1,56 @@
1
+ /**
2
+ * The word index behind `upt search`, shared with `upt explain`'s NOT COVERED answer (audit I5).
3
+ *
4
+ * It indexes every registry the CLI exposes by WORD: names, ids, symbols, genuine aliases
5
+ * (`resolveToCatalogName`) and catalog-bridge descriptions. An equal dimension is never a match: a
6
+ * radius is not a wavelength, and angular frequency is not frequency, even where the two share a
7
+ * dimension.
8
+ *
9
+ * A word of one or two letters is a symbol, not an English word: it matches a quantity symbol, an
10
+ * alias or a whole id segment exactly, and never a stray letter inside a description.
11
+ */
12
+ import type { CommandCtx } from './command.js';
13
+ /** The registry a search-index entry comes from. */
14
+ export type SearchKind = 'catalog-bridge' | 'canonical-equation' | 'atlas-model' | 'atlas-bridge' | 'quantity' | 'applied-case';
15
+ export declare const SEARCH_SECTIONS: readonly (readonly [SearchKind, string])[];
16
+ /** A searchable field: its label, its words, and the exact strings a short word may equal. */
17
+ interface Field {
18
+ readonly label: string;
19
+ readonly text: string;
20
+ readonly exact?: readonly string[];
21
+ }
22
+ /** One indexed record: its registry, its id, the line `upt search` prints, the command that shows it, and its searchable fields. */
23
+ export interface SearchEntry {
24
+ readonly kind: SearchKind;
25
+ readonly id: string;
26
+ readonly line: string;
27
+ readonly command: string;
28
+ readonly commandLabel: string;
29
+ readonly note?: string;
30
+ readonly fields: readonly Field[];
31
+ }
32
+ /** An entry that matched every query word, the fields it matched in, and the alias that resolved it, if one did. */
33
+ export interface SearchMatch {
34
+ readonly entry: SearchEntry;
35
+ readonly matchedIn: readonly string[];
36
+ readonly alias?: string;
37
+ }
38
+ export declare const STOP_WORDS: ReadonlySet<string>;
39
+ export declare const fold: (s: string) => string;
40
+ /** Index every registry the CLI exposes, including applied cases. */
41
+ export declare function buildSearchIndex(api: CommandCtx['api']): SearchEntry[];
42
+ /** Every entry of `index` that EVERY word of `significant` matches, name and id matches first. */
43
+ export declare function matchEveryWord(api: CommandCtx['api'], index: readonly SearchEntry[], significant: readonly string[]): SearchMatch[];
44
+ /**
45
+ * What `upt search` finds for the words of a name that is not a quantity (`schrodinger-equation`):
46
+ * the name splits on `-`, `_` and spaces, stop words drop, and the words are searched together. When
47
+ * no entry matches every word, the largest set of the words that some entry does match is used
48
+ * instead, the one with the fewest matches when sets tie (so the rarer word `schrodinger` beats the
49
+ * common word `equation`). Returns `null` when no word matches anything. At most six words are tried.
50
+ */
51
+ export declare function searchNameWords(api: CommandCtx['api'], name: string): {
52
+ readonly words: readonly string[];
53
+ readonly matches: readonly SearchMatch[];
54
+ } | null;
55
+ export {};
56
+ //# sourceMappingURL=search-index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search-index.d.ts","sourceRoot":"","sources":["../../src/cli/search-index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,oDAAoD;AACpD,MAAM,MAAM,UAAU,GAClB,gBAAgB,GAChB,oBAAoB,GACpB,aAAa,GACb,cAAc,GACd,UAAU,GACV,cAAc,CAAC;AAEnB,eAAO,MAAM,eAAe,EAAE,SAAS,CAAC,SAAS,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC,EAOrE,CAAC;AAEF,8FAA8F;AAC9F,UAAU,KAAK;IACb,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACpC;AAED,oIAAoI;AACpI,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAC1B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,SAAS,KAAK,EAAE,CAAC;CACnC;AAED,oHAAoH;AACpH,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC;IAC5B,QAAQ,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,CAAC;IACtC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,eAAO,MAAM,UAAU,EAAE,WAAW,CAAC,MAAM,CAAoD,CAAC;AAEhG,eAAO,MAAM,IAAI,MAAO,MAAM,KAAG,MAAiE,CAAC;AAenG,qEAAqE;AACrE,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,UAAU,CAAC,KAAK,CAAC,GAAG,WAAW,EAAE,CA+GtE;AAED,kGAAkG;AAClG,wBAAgB,cAAc,CAC5B,GAAG,EAAE,UAAU,CAAC,KAAK,CAAC,EACtB,KAAK,EAAE,SAAS,WAAW,EAAE,EAC7B,WAAW,EAAE,SAAS,MAAM,EAAE,GAC7B,WAAW,EAAE,CA6Bf;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAC7B,GAAG,EAAE,UAAU,CAAC,KAAK,CAAC,EACtB,IAAI,EAAE,MAAM,GACX;IAAE,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,SAAS,WAAW,EAAE,CAAA;CAAE,GAAG,IAAI,CAmBxF"}
@@ -0,0 +1,190 @@
1
+ export const SEARCH_SECTIONS = [
2
+ ['catalog-bridge', 'catalog bridges'],
3
+ ['canonical-equation', 'canonical equations'],
4
+ ['atlas-model', 'atlas models'],
5
+ ['atlas-bridge', 'atlas bridges'],
6
+ ['quantity', 'quantities'],
7
+ ['applied-case', 'applied cases'],
8
+ ];
9
+ export const STOP_WORDS = new Set(['of', 'the', 'and', 'for', 'in', 'an']);
10
+ export const fold = (s) => s.normalize('NFD').replace(/\p{M}/gu, '').toLowerCase();
11
+ const words = (s) => fold(s).split(/[^\p{L}\p{N}]+/u).filter((w) => w.length > 0);
12
+ /** The fields of `e` that `q` matches, or `null` when it matches none. */
13
+ function matchWord(q, e) {
14
+ const short = q.length <= 2;
15
+ const fq = fold(q);
16
+ const hit = e.fields.filter((f) => short
17
+ ? (f.exact ?? []).includes(q) || (f.label === 'id' && words(f.text).includes(fq))
18
+ : words(f.text).some((w) => w.startsWith(fq)));
19
+ return hit.length === 0 ? null : hit.map((f) => f.label);
20
+ }
21
+ /** Index every registry the CLI exposes, including applied cases. */
22
+ export function buildSearchIndex(api) {
23
+ const entries = [];
24
+ const fmt = api.format;
25
+ for (const b of api.BRIDGE_EQUATIONS) {
26
+ const ev = api.BRIDGE_EVALUATORS.get(b.id);
27
+ entries.push({
28
+ kind: 'catalog-bridge',
29
+ id: `be-${b.id}`,
30
+ line: `be-${b.id} ${b.name} [${b.status}]`,
31
+ command: ev === undefined ? `upt explain be-${b.id}` : `upt evaluate be-${b.id} ${ev.inputKeys.map((k) => `${k}=…`).join(' ')}`,
32
+ commandLabel: ev === undefined ? 'no evaluator; route' : 'evaluate',
33
+ ...(ev === undefined
34
+ ? {}
35
+ : { note: `units: ${ev.parameters.map((p) => `${p.key} in ${p.unit || 'dimensionless'}`).join(', ')}; a value may carry its own unit` }),
36
+ fields: [
37
+ { label: 'id', text: `be ${b.id}`, exact: [`be-${b.id}`] },
38
+ { label: 'name', text: b.name },
39
+ { label: 'description', text: b.context ?? '' },
40
+ ],
41
+ });
42
+ }
43
+ for (const c of api.CANONICAL_EQUATIONS) {
44
+ const t = c.dimensional.target;
45
+ const inputs = c.dimensional.governing.map((g) => `${g.name} ${fmt(g.dim)}`).join(', ');
46
+ entries.push({
47
+ kind: 'canonical-equation',
48
+ id: c.id,
49
+ line: `${c.id} ${c.name} — target ${t.name} ${fmt(t.dim)}; inputs: ${inputs || 'none'}`,
50
+ command: `upt explain ${t.name} --source=canonical`,
51
+ commandLabel: 'inspect',
52
+ fields: [
53
+ { label: 'id', text: c.id, exact: [c.id] },
54
+ { label: 'name', text: c.name },
55
+ { label: 'variables', text: [t.name, ...c.dimensional.governing.map((g) => g.name)].join(' ') },
56
+ ],
57
+ });
58
+ }
59
+ for (const f of api.ATLAS_FAMILIES) {
60
+ for (const m of f.models) {
61
+ entries.push({
62
+ kind: 'atlas-model',
63
+ id: m.id,
64
+ line: `${m.id} [${f.family}]`,
65
+ command: `upt regime ${f.family} · upt path ${m.id} <to-model>`,
66
+ commandLabel: 'inspect',
67
+ fields: [{ label: 'id', text: m.id, exact: [m.id] }],
68
+ });
69
+ }
70
+ for (const b of f.bridges) {
71
+ entries.push({
72
+ kind: 'atlas-bridge',
73
+ id: b.id,
74
+ line: `${b.id} ${b.relation} [${f.family}]: ${b.premises.join(' + ')} → ${b.conclusion}`,
75
+ command: `upt atlas ${b.id}`,
76
+ commandLabel: 'inspect',
77
+ fields: [
78
+ { label: 'id', text: b.id, exact: [b.id] },
79
+ { label: 'models', text: [...b.premises, b.conclusion].join(' ') },
80
+ ],
81
+ });
82
+ }
83
+ }
84
+ // A quantity keeps every dimension it carries in every graph that names it,
85
+ // so a name used with two dimensions shows both rather than one silently.
86
+ const quantities = new Map();
87
+ const addQ = (q, graph) => {
88
+ const cur = quantities.get(q.name) ?? { symbols: new Set(), dims: new Set(), graphs: new Set() };
89
+ cur.symbols.add(q.symbol);
90
+ cur.dims.add(fmt(q.dim));
91
+ cur.graphs.add(graph);
92
+ quantities.set(q.name, cur);
93
+ };
94
+ for (const [graph, edges] of [['catalog', api.CATALOG_GRAPH], ['canonical', api.CANONICAL_GRAPH]]) {
95
+ for (const e of edges) {
96
+ for (const s of e.sources)
97
+ addQ(s, graph);
98
+ addQ(e.target, graph);
99
+ }
100
+ }
101
+ for (const c of api.APPLIED_CASES.values()) {
102
+ entries.push({
103
+ kind: 'applied-case',
104
+ id: c.id,
105
+ line: `${c.id} ${c.title}`,
106
+ command: `upt evaluate ${c.id}`,
107
+ commandLabel: 'evaluate',
108
+ fields: [
109
+ { label: 'id', text: c.id, exact: [c.id] },
110
+ { label: 'name', text: c.title },
111
+ ],
112
+ });
113
+ }
114
+ for (const [name, q] of quantities) {
115
+ const graphs = [...q.graphs];
116
+ entries.push({
117
+ kind: 'quantity',
118
+ id: name,
119
+ line: `${name} ${[...q.dims].join(' / ')} — symbol ${[...q.symbols].join(', ')}; in: ${graphs.join(', ')}`,
120
+ command: `upt explain ${name} --source=${graphs.length === 2 ? 'both' : graphs[0]}`,
121
+ commandLabel: 'inspect',
122
+ fields: [
123
+ { label: 'name', text: name, exact: [name] },
124
+ { label: 'symbol', text: [...q.symbols].join(' '), exact: [...q.symbols] },
125
+ ],
126
+ });
127
+ }
128
+ return entries;
129
+ }
130
+ /** Every entry of `index` that EVERY word of `significant` matches, name and id matches first. */
131
+ export function matchEveryWord(api, index, significant) {
132
+ const quantityNames = new Set(index.filter((e) => e.kind === 'quantity').map((e) => e.id));
133
+ const aliasTargets = new Map();
134
+ for (const q of significant) {
135
+ const resolved = api.resolveToCatalogName(q, quantityNames);
136
+ if (resolved !== null && resolved !== q)
137
+ aliasTargets.set(resolved, q);
138
+ }
139
+ const matches = [];
140
+ for (const e of index) {
141
+ const alias = e.kind === 'quantity' ? aliasTargets.get(e.id) : undefined;
142
+ const labels = new Set();
143
+ let all = true;
144
+ for (const q of significant) {
145
+ const hit = alias === q ? ['alias'] : matchWord(q, e);
146
+ if (hit === null) {
147
+ all = false;
148
+ break;
149
+ }
150
+ for (const l of hit)
151
+ labels.add(l);
152
+ }
153
+ if (!all)
154
+ continue;
155
+ const order = e.fields.map((f) => f.label).concat('alias');
156
+ matches.push({ entry: e, matchedIn: order.filter((l) => labels.has(l)), ...(alias === undefined ? {} : { alias }) });
157
+ }
158
+ // A match on a name or id reads before one found only in a description.
159
+ const rank = (m) => m.matchedIn.includes('id') || (m.matchedIn.includes('name') && !m.matchedIn.includes('description')) ? 0 : 1;
160
+ return matches.sort((a, b) => rank(a) - rank(b));
161
+ }
162
+ /**
163
+ * What `upt search` finds for the words of a name that is not a quantity (`schrodinger-equation`):
164
+ * the name splits on `-`, `_` and spaces, stop words drop, and the words are searched together. When
165
+ * no entry matches every word, the largest set of the words that some entry does match is used
166
+ * instead, the one with the fewest matches when sets tie (so the rarer word `schrodinger` beats the
167
+ * common word `equation`). Returns `null` when no word matches anything. At most six words are tried.
168
+ */
169
+ export function searchNameWords(api, name) {
170
+ const all = name.split(/[-_\s]+/).filter((w) => w.length > 0 && !STOP_WORDS.has(fold(w))).slice(0, 6);
171
+ if (all.length === 0)
172
+ return null;
173
+ const index = buildSearchIndex(api);
174
+ let best = null;
175
+ for (let mask = (1 << all.length) - 1; mask > 0; mask--) {
176
+ const subset = all.filter((_, i) => (mask & (1 << i)) !== 0);
177
+ if (best !== null && subset.length < best.words.length)
178
+ continue;
179
+ const matches = matchEveryWord(api, index, subset);
180
+ if (matches.length === 0)
181
+ continue;
182
+ if (best === null ||
183
+ subset.length > best.words.length ||
184
+ (subset.length === best.words.length && matches.length < best.matches.length)) {
185
+ best = { words: subset, matches };
186
+ }
187
+ }
188
+ return best;
189
+ }
190
+ //# sourceMappingURL=search-index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search-index.js","sourceRoot":"","sources":["../../src/cli/search-index.ts"],"names":[],"mappings":"AAsBA,MAAM,CAAC,MAAM,eAAe,GAA+C;IACzE,CAAC,gBAAgB,EAAE,iBAAiB,CAAC;IACrC,CAAC,oBAAoB,EAAE,qBAAqB,CAAC;IAC7C,CAAC,aAAa,EAAE,cAAc,CAAC;IAC/B,CAAC,cAAc,EAAE,eAAe,CAAC;IACjC,CAAC,UAAU,EAAE,YAAY,CAAC;IAC1B,CAAC,cAAc,EAAE,eAAe,CAAC;CAClC,CAAC;AA2BF,MAAM,CAAC,MAAM,UAAU,GAAwB,IAAI,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC;AAEhG,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,CAAS,EAAU,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,K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AAI,CAAC,OAAO,CAAC,MAAM,CAAC,EAC7E,CAAC;YACD,IAAI,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC;QACpC,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * The status words the CLI prints, defined once (audit I13).
3
+ *
4
+ * `upt help statuses` prints this table, and every `--json` envelope carries the definitions of the
5
+ * statuses its command can emit (`emitJson` adds them from here, so a command cannot omit them and no
6
+ * command keeps a private copy). A status a command prints but this table does not assign to it is a
7
+ * defect, which `tests/cli/statuses.test.ts` looks for in the commands' own output.
8
+ */
9
+ export interface StatusDefinition {
10
+ /** The key under `definitions` in a `--json` envelope. */
11
+ readonly key: string;
12
+ /** The words as the commands print them, text or JSON. */
13
+ readonly words: readonly string[];
14
+ readonly meaning: string;
15
+ /** The commands (envelope `command` names) that can emit it. */
16
+ readonly commands: readonly string[];
17
+ }
18
+ export declare const STATUS_GLOSSARY: readonly StatusDefinition[];
19
+ /** The definitions of the statuses `command` can emit, keyed as in the glossary. */
20
+ export declare function definitionsFor(command: string): Record<string, string>;
21
+ /** The glossary meaning of status `key`; throws on a key the glossary does not define. */
22
+ export declare function statusMeaning(key: string): string;
23
+ /** The text of `upt help statuses`: each status, its words, the commands that emit it, and its meaning. */
24
+ export declare function glossaryText(): string;
25
+ //# sourceMappingURL=statuses.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"statuses.d.ts","sourceRoot":"","sources":["../../src/cli/statuses.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,MAAM,WAAW,gBAAgB;IAC/B,0DAA0D;IAC1D,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,0DAA0D;IAC1D,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,gEAAgE;IAChE,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;CACtC;AAED,eAAO,MAAM,eAAe,EAAE,SAAS,gBAAgB,EAwQtD,CAAC;AAEF,oFAAoF;AACpF,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAItE;AAED,0FAA0F;AAC1F,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAIjD;AAED,2GAA2G;AAC3G,wBAAgB,YAAY,IAAI,MAAM,CAarC"}
@@ -0,0 +1,276 @@
1
+ /**
2
+ * The status words the CLI prints, defined once (audit I13).
3
+ *
4
+ * `upt help statuses` prints this table, and every `--json` envelope carries the definitions of the
5
+ * statuses its command can emit (`emitJson` adds them from here, so a command cannot omit them and no
6
+ * command keeps a private copy). A status a command prints but this table does not assign to it is a
7
+ * defect, which `tests/cli/statuses.test.ts` looks for in the commands' own output.
8
+ */
9
+ export const STATUS_GLOSSARY = [
10
+ {
11
+ key: 'valid',
12
+ words: ['valid'],
13
+ meaning: 'every machine inequality the record states was evaluated at the point and holds. Only a record ' +
14
+ 'that states at least one inequality can be valid; its prose premises are listed apart and were not checked',
15
+ commands: ['regime'],
16
+ },
17
+ {
18
+ key: 'vacuous',
19
+ words: ['VACUOUS', 'vacuous'],
20
+ meaning: 'the record states no machine inequality, so nothing was evaluated: not a pass, and not evidence ' +
21
+ 'that the record applies at the point',
22
+ commands: ['regime', 'path', 'atlas', 'map'],
23
+ },
24
+ {
25
+ key: 'unknown',
26
+ words: ['UNKNOWN', 'unknown', 'UNCHECKED', 'unchecked'],
27
+ meaning: 'a value the check needs was not supplied (or a search stopped at its budget), so the check did not ' +
28
+ 'run: a failure to confirm, never a pass and never a violation. It exits 0',
29
+ commands: ['regime', 'path', 'evaluate', 'map'],
30
+ },
31
+ {
32
+ key: 'violated',
33
+ words: ['VIOLATED', 'violated'],
34
+ meaning: 'a machine inequality (a regime, horizon or validity condition) was evaluated at the point and fails; ' +
35
+ 'no bound is claimed there',
36
+ commands: ['regime', 'path', 'evaluate'],
37
+ },
38
+ {
39
+ key: 'adequate',
40
+ words: ['ADEQUATE', 'adequate'],
41
+ meaning: 'every bound on the path is claimed at the point and its error, in the norm the tolerance is stated in, ' +
42
+ 'is within the tolerance',
43
+ commands: ['path'],
44
+ },
45
+ {
46
+ key: 'inadequate',
47
+ words: ['INADEQUATE', 'inadequate'],
48
+ meaning: 'the point is outside a regime or past a horizon on the path, or the error exceeds the tolerance; exit 3',
49
+ commands: ['path'],
50
+ },
51
+ {
52
+ key: 'undetermined',
53
+ words: ['UNDETERMINED', 'undetermined'],
54
+ meaning: 'the point does not settle adequacy: a value is missing, the bound is in another norm with no declared ' +
55
+ 'translation, or an upper bound is past its horizon. It is not shown inadequate',
56
+ commands: ['path'],
57
+ },
58
+ {
59
+ key: 'neither',
60
+ words: ['NEITHER', 'neither'],
61
+ meaning: 'in a route-coverage grid, no encoded route claims a bound at this point: the parent model is the one ' +
62
+ 'to use there and no reduced-model number is given. It does not say the models disagree',
63
+ commands: ['path'],
64
+ },
65
+ {
66
+ key: 'unsettled',
67
+ words: ['UNSETTLED', 'unsettled'],
68
+ meaning: 'in a route-coverage grid, a coordinate or t was not supplied, so whether a route covers the point is not settled',
69
+ commands: ['path'],
70
+ },
71
+ {
72
+ key: 'no-composite-claim',
73
+ words: ['no composite claim', 'no-claim', 'no-composite-claim'],
74
+ meaning: 'the composition table yields no relation for two steps of the route (a silent cell). The route claims no ' +
75
+ 'error and exits 0. A missing Lipschitz constant, an undeclared norm and an unmapped cross-family norm are ' +
76
+ 'other refusals, counted apart from this one',
77
+ commands: ['path', 'map'],
78
+ },
79
+ {
80
+ key: 'missing-lipschitz',
81
+ words: ['missing-lipschitz'],
82
+ meaning: 'a step that is not last states no Lipschitz constant, so the error after it is unbounded. No bound is ' +
83
+ 'claimed. It exits 0. It is not a silent composition-table cell',
84
+ commands: ['path'],
85
+ },
86
+ {
87
+ key: 'norm-not-stated',
88
+ words: ['norm-not-stated'],
89
+ meaning: 'an exact step declares no norm transport for the running norm and the direction the route crosses it. ' +
90
+ 'No bound is claimed. It exits 0',
91
+ commands: ['path'],
92
+ },
93
+ {
94
+ key: 'norm-mismatch',
95
+ words: ['norm-mismatch'],
96
+ meaning: 'two stated norms on one route are not the same norm, and no transport maps one to the other. No bound is ' +
97
+ 'claimed. It exits 0',
98
+ commands: ['path'],
99
+ },
100
+ {
101
+ key: 'cross-family-unmapped',
102
+ words: ['cross-family-unmapped'],
103
+ meaning: 'across model families a matching norm name is not a transport. No witnessed NormTransport carries the ' +
104
+ 'bound, so none is claimed. It exits 0. It is not a violated check',
105
+ commands: ['path'],
106
+ },
107
+ {
108
+ key: 'uniformity-unanalysed',
109
+ words: ['uniformity-unanalysed'],
110
+ meaning: 'a bound on the route does not state whether its error is uniform. No bound is claimed. It exits 0',
111
+ commands: ['path'],
112
+ },
113
+ {
114
+ key: 'decoy',
115
+ words: ['DECOY', 'decoy'],
116
+ meaning: 'a set of constants closes the dimensions, but its monomial does not reproduce the evaluator: a failed ' +
117
+ 'dimensional reconstruction, not a physical refutation of the formula',
118
+ commands: ['audit'],
119
+ },
120
+ {
121
+ key: 'adjudicated-decoy',
122
+ words: ['decoy'],
123
+ meaning: 'a recorded adjudication of the identification a ≡ b found a dimensional coincidence with no mechanism ' +
124
+ '(trivial and definitional identifications included). Folded out of the PROMISING list by default. Not ' +
125
+ 'the DECOY of `upt audit`, which is a failed dimensional reconstruction of a bridge',
126
+ commands: ['discover'],
127
+ },
128
+ {
129
+ key: 'entailed',
130
+ words: ['entailed'],
131
+ meaning: 'real physics that the canonical L-layer already carries, so not a new link. As a recorded adjudication ' +
132
+ 'verdict it folds the identification out of the PROMISING list by default; as a consequence signal it ' +
133
+ 'means the derived monomial has the same normal form, target and governing set as a canonical equation',
134
+ commands: ['discover'],
135
+ },
136
+ {
137
+ key: 'novel-consequence',
138
+ words: ['novel-consequence'],
139
+ meaning: 'the derived monomial consequence matches no canonical equation: unadjudicated, and not evidence that it holds',
140
+ commands: ['discover'],
141
+ },
142
+ {
143
+ key: 'inconclusive',
144
+ words: ['inconclusive'],
145
+ meaning: 'no monomial consequence could be derived, so nothing was compared',
146
+ commands: ['discover'],
147
+ },
148
+ {
149
+ key: 'genuine',
150
+ words: ['genuine'],
151
+ meaning: 'a recorded adjudication found the identification real physics and a new link',
152
+ commands: ['discover'],
153
+ },
154
+ {
155
+ key: 'deferred',
156
+ words: ['deferred'],
157
+ meaning: 'the identification was reviewed and consciously parked. An identification with no recorded adjudication ' +
158
+ 'was never reviewed, which is not the same',
159
+ commands: ['discover'],
160
+ },
161
+ {
162
+ key: 'not-covered',
163
+ words: ['NOT COVERED'],
164
+ meaning: 'the name is not a quantity of the selected graph (--source), so there is nothing to evaluate; the nearest ' +
165
+ 'names and what `upt search` finds are listed. It is not a statement about the physics',
166
+ commands: ['explain'],
167
+ },
168
+ {
169
+ key: 'promising',
170
+ words: ['PROMISING', 'promising'],
171
+ meaning: 'an identification a ≡ b that is numerically consistent, connects disconnected physics and unlocks at least ' +
172
+ 'one quantity: worth a physicist\'s review, not evidence that it holds',
173
+ commands: ['discover'],
174
+ },
175
+ {
176
+ key: 'inert',
177
+ words: ['INERT', 'inert'],
178
+ meaning: 'consistent but idle: a dimensional coincidence that connects nothing new and unlocks no quantity',
179
+ commands: ['discover'],
180
+ },
181
+ {
182
+ key: 'contradictory',
183
+ words: ['CONTRADICTORY', 'contradictory'],
184
+ meaning: 'the identification breaks the numerical consistency of the graph: a falsification within the graph',
185
+ commands: ['discover'],
186
+ },
187
+ {
188
+ key: 'magnitude-clash',
189
+ words: ['magnitude-clash'],
190
+ meaning: 'the two quantities\' representative values differ by more than the threshold of orders of magnitude: an ' +
191
+ 'independent falsification',
192
+ commands: ['discover'],
193
+ },
194
+ {
195
+ key: 'axis-clash',
196
+ words: ['axis-clash'],
197
+ meaning: 'the identification\'s stated scale or force regime labels disagree: a prior from catalog labels, no ' +
198
+ 'computation, never counted as a falsification',
199
+ commands: ['discover'],
200
+ },
201
+ {
202
+ key: 'reproduced',
203
+ words: ['reproduced'],
204
+ meaning: 'the replayed run gave the recorded exit code, stdout and stderr, byte for byte, and any file it wrote ' +
205
+ '(--out, written to a temporary path, never over the recorded one) has the recorded SHA-256',
206
+ commands: ['replay'],
207
+ },
208
+ {
209
+ key: 'differs',
210
+ words: ['differs', 'differ'],
211
+ meaning: 'the replayed run differs from the record: the stream (or the written file) and first differing line are ' +
212
+ 'named, with every changed version, parser, constant or module source and whether the command can reach it. Exit 3',
213
+ commands: ['replay'],
214
+ },
215
+ {
216
+ key: 'not-replayable',
217
+ words: ['not replayable', 'not-replayable'],
218
+ meaning: 'the entry is not re-run, or its replay is not compared: its line is malformed; it was to write a file and ' +
219
+ 'wrote none; it ran an external probe worker; a file it read (--problem, --data, --stored, ...) changed, ' +
220
+ 'vanished or appeared since recording, or was not hashed; or the recorded or the replayed probe search ' +
221
+ 'stopped on its wall-clock budget (time-limit). Nothing was compared',
222
+ commands: ['replay'],
223
+ },
224
+ {
225
+ key: 'checked',
226
+ words: ['checked'],
227
+ meaning: 'a witness ran in this invocation and its claim held',
228
+ commands: ['atlas', 'map', 'path'],
229
+ },
230
+ {
231
+ key: 'refuted',
232
+ words: ['refuted', 'REFUTED'],
233
+ meaning: 'a witness ran and its claim failed. On a negative control the wrong hypothesis is refuted, which is ' +
234
+ 'the control working. A refuted witness makes `--run` exit 3',
235
+ commands: ['atlas', 'map', 'path'],
236
+ },
237
+ {
238
+ key: 'unresolved',
239
+ words: ['unresolved'],
240
+ meaning: 'a witness did not run (its peer is absent, it timed out, its input did not parse) or ran and could not ' +
241
+ 'decide (a CAS difference that did not simplify to zero, no convergence). Not a refutation, and never ' +
242
+ 'counted with the refuted',
243
+ commands: ['atlas', 'map', 'path'],
244
+ },
245
+ ];
246
+ /** The definitions of the statuses `command` can emit, keyed as in the glossary. */
247
+ export function definitionsFor(command) {
248
+ const out = {};
249
+ for (const s of STATUS_GLOSSARY)
250
+ if (s.commands.includes(command))
251
+ out[s.key] = s.meaning;
252
+ return out;
253
+ }
254
+ /** The glossary meaning of status `key`; throws on a key the glossary does not define. */
255
+ export function statusMeaning(key) {
256
+ const s = STATUS_GLOSSARY.find((d) => d.key === key);
257
+ if (s === undefined)
258
+ throw new Error(`statuses: no status '${key}'`);
259
+ return s.meaning;
260
+ }
261
+ /** The text of `upt help statuses`: each status, its words, the commands that emit it, and its meaning. */
262
+ export function glossaryText() {
263
+ const lines = [
264
+ 'upt help statuses — the status words the commands print',
265
+ '',
266
+ 'Each --json envelope carries these definitions, under `definitions`, for the statuses its command',
267
+ 'can emit. A status that did not check anything never reads as a pass.',
268
+ '',
269
+ ];
270
+ for (const s of STATUS_GLOSSARY) {
271
+ lines.push(` ${s.words.join(' / ')} (${s.commands.map((c) => (c === 'replay' ? '--replay' : c)).join(', ')})`);
272
+ lines.push(` ${s.meaning}.`);
273
+ }
274
+ return lines.join('\n');
275
+ }
276
+ //# sourceMappingURL=statuses.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"statuses.js","sourceRoot":"","sources":["../../src/cli/statuses.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAYH,MAAM,CAAC,MAAM,eAAe,GAAgC;IAC1D;QACE,GAAG,EAAE,OAAO;QACZ,KAAK,EAAE,CAAC,OAAO,CAAC;QAChB,OAAO,EACL,iGAAiG;YACjG,4GAA4G;QAC9G,QAAQ,EAAE,CAAC,QAAQ,CAAC;KACrB;IACD;QACE,GAAG,EAAE,SAAS;QACd,KAAK,EAAE,CAAC,SAAS,EAAE,SAAS,CAAC;QAC7B,OAAO,EACL,kGAAkG;YAClG,sCAAsC;QACxC,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,CAAC;KAC7C;IACD;QACE,GAAG,EAAE,SAAS;QACd,KAAK,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,WAAW,CAAC;QACvD,OAAO,EACL,qGAAq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ACtC,CAAC;IACD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
@@ -8,4 +8,12 @@
8
8
  * npm layout (`dist/` ships as part of the published package).
9
9
  */
10
10
  export declare function packageVersion(): string;
11
+ /** Installed version of each optional peer the package declares, `null` when absent. Reads the
12
+ * peer's own package.json from the resolution paths, because a peer's `exports` may not expose it. */
13
+ export declare function peerVersions(): Record<string, string | null>;
14
+ /**
15
+ * The active formula parser with the version that defines it (audit I4): the MathTS peer's
16
+ * version for `mathts`, this package's for `builtin`, whose parser ships in it.
17
+ */
18
+ export declare function formulaParserLabel(kind: 'mathts' | 'builtin'): string;
11
19
  //# sourceMappingURL=version.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/cli/version.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,wBAAgB,cAAc,IAAI,MAAM,CAIvC"}
1
+ {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/cli/version.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAMH,wBAAgB,cAAc,IAAI,MAAM,CAIvC;AAED;sGACsG;AACtG,wBAAgB,YAAY,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,CAiB5D;AAKD;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,QAAQ,GAAG,SAAS,GAAG,MAAM,CAIrE"}
@@ -7,10 +7,41 @@
7
7
  * resolves to the package root in both the dev checkout and the installed
8
8
  * npm layout (`dist/` ships as part of the published package).
9
9
  */
10
- import { readFileSync } from 'node:fs';
10
+ import { existsSync, readFileSync } from 'node:fs';
11
+ import { createRequire } from 'node:module';
12
+ import { join } from 'node:path';
11
13
  export function packageVersion() {
12
14
  const pkgPath = new URL('../../package.json', import.meta.url);
13
15
  const pkg = JSON.parse(readFileSync(pkgPath, 'utf8'));
14
16
  return pkg.version;
15
17
  }
18
+ /** Installed version of each optional peer the package declares, `null` when absent. Reads the
19
+ * peer's own package.json from the resolution paths, because a peer's `exports` may not expose it. */
20
+ export function peerVersions() {
21
+ const pkg = JSON.parse(readFileSync(new URL('../../package.json', import.meta.url), 'utf8'));
22
+ const require = createRequire(import.meta.url);
23
+ const peers = {};
24
+ for (const name of Object.keys(pkg.peerDependencies ?? {}).sort()) {
25
+ peers[name] = null;
26
+ for (const dir of require.resolve.paths(name) ?? []) {
27
+ const manifest = join(dir, name, 'package.json');
28
+ if (existsSync(manifest)) {
29
+ peers[name] = JSON.parse(readFileSync(manifest, 'utf8')).version ?? null;
30
+ break;
31
+ }
32
+ }
33
+ }
34
+ return peers;
35
+ }
36
+ /** The peer that backs the `mathts` formula parser. */
37
+ const MATHTS_PARSER_PEER = '@danielsimonjr/mathts-functions';
38
+ /**
39
+ * The active formula parser with the version that defines it (audit I4): the MathTS peer's
40
+ * version for `mathts`, this package's for `builtin`, whose parser ships in it.
41
+ */
42
+ export function formulaParserLabel(kind) {
43
+ return kind === 'mathts'
44
+ ? `mathts (${MATHTS_PARSER_PEER} ${peerVersions()[MATHTS_PARSER_PEER] ?? 'version unknown'})`
45
+ : `builtin (universal-physics-tensor ${packageVersion()})`;
46
+ }
16
47
  //# sourceMappingURL=version.js.map