universal-physics-tensor 10.0.0 → 12.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (835) hide show
  1. package/README.md +39 -36
  2. package/bin/upt.mjs +13 -1
  3. package/data/applied-cases.json +1892 -0
  4. package/data/applied-cases.schema.json +194 -0
  5. package/data/atlas/atlas.json +25 -25
  6. package/data/atlas/atlas.jsonld +1 -1
  7. package/data/atlas/diffusion.json +6 -6
  8. package/data/atlas/oscillators.json +7 -7
  9. package/data/atlas/waves.json +14 -14
  10. package/data/atlas/witness-results.json +11 -11
  11. package/data/bridge-catalog.json +389 -230
  12. package/data/bridge-catalog.schema.json +45 -7
  13. package/data/units.json +6 -25
  14. package/dist/atlas/applicability.d.ts.map +1 -1
  15. package/dist/atlas/applicability.js +21 -15
  16. package/dist/atlas/applicability.js.map +1 -1
  17. package/dist/atlas/benchmark/hybrid-retrieval.d.ts +9 -1
  18. package/dist/atlas/benchmark/hybrid-retrieval.d.ts.map +1 -1
  19. package/dist/atlas/benchmark/hybrid-retrieval.js +15 -13
  20. package/dist/atlas/benchmark/hybrid-retrieval.js.map +1 -1
  21. package/dist/atlas/benchmark/loader.js +2 -2
  22. package/dist/atlas/benchmark/loader.js.map +1 -1
  23. package/dist/atlas/benchmark/stats.d.ts +2 -2
  24. package/dist/atlas/benchmark/stats.d.ts.map +1 -1
  25. package/dist/atlas/benchmark/stats.js +9 -15
  26. package/dist/atlas/benchmark/stats.js.map +1 -1
  27. package/dist/atlas/catalog-formal-ref.d.ts +26 -3
  28. package/dist/atlas/catalog-formal-ref.d.ts.map +1 -1
  29. package/dist/atlas/catalog-formal-ref.js +52 -5
  30. package/dist/atlas/catalog-formal-ref.js.map +1 -1
  31. package/dist/atlas/chain-pipeline.d.ts.map +1 -1
  32. package/dist/atlas/chain-pipeline.js +7 -8
  33. package/dist/atlas/chain-pipeline.js.map +1 -1
  34. package/dist/atlas/diffusion/bridges-closure.d.ts +0 -4
  35. package/dist/atlas/diffusion/bridges-closure.d.ts.map +1 -1
  36. package/dist/atlas/diffusion/bridges-closure.js +8 -12
  37. package/dist/atlas/diffusion/bridges-closure.js.map +1 -1
  38. package/dist/atlas/diffusion/bridges.d.ts.map +1 -1
  39. package/dist/atlas/diffusion/bridges.js +27 -39
  40. package/dist/atlas/diffusion/bridges.js.map +1 -1
  41. package/dist/atlas/diffusion/dimensions.d.ts +6 -14
  42. package/dist/atlas/diffusion/dimensions.d.ts.map +1 -1
  43. package/dist/atlas/diffusion/dimensions.js +8 -16
  44. package/dist/atlas/diffusion/dimensions.js.map +1 -1
  45. package/dist/atlas/diffusion/models.d.ts +3 -3
  46. package/dist/atlas/diffusion/models.d.ts.map +1 -1
  47. package/dist/atlas/diffusion/models.js +5 -10
  48. package/dist/atlas/diffusion/models.js.map +1 -1
  49. package/dist/atlas/diffusion/numerics.d.ts +16 -4
  50. package/dist/atlas/diffusion/numerics.d.ts.map +1 -1
  51. package/dist/atlas/diffusion/numerics.js +38 -24
  52. package/dist/atlas/diffusion/numerics.js.map +1 -1
  53. package/dist/atlas/link-prediction.d.ts +106 -3
  54. package/dist/atlas/link-prediction.d.ts.map +1 -1
  55. package/dist/atlas/link-prediction.js +212 -66
  56. package/dist/atlas/link-prediction.js.map +1 -1
  57. package/dist/atlas/oscillators/bridges-coarse.d.ts.map +1 -1
  58. package/dist/atlas/oscillators/bridges-coarse.js +7 -11
  59. package/dist/atlas/oscillators/bridges-coarse.js.map +1 -1
  60. package/dist/atlas/oscillators/bridges-exact.d.ts.map +1 -1
  61. package/dist/atlas/oscillators/bridges-exact.js +6 -7
  62. package/dist/atlas/oscillators/bridges-exact.js.map +1 -1
  63. package/dist/atlas/oscillators/bridges-limits.d.ts +3 -16
  64. package/dist/atlas/oscillators/bridges-limits.d.ts.map +1 -1
  65. package/dist/atlas/oscillators/bridges-limits.js +23 -34
  66. package/dist/atlas/oscillators/bridges-limits.js.map +1 -1
  67. package/dist/atlas/oscillators/dimensions.d.ts +9 -21
  68. package/dist/atlas/oscillators/dimensions.d.ts.map +1 -1
  69. package/dist/atlas/oscillators/dimensions.js +9 -21
  70. package/dist/atlas/oscillators/dimensions.js.map +1 -1
  71. package/dist/atlas/oscillators/limit-witnesses.d.ts +2 -2
  72. package/dist/atlas/oscillators/limit-witnesses.d.ts.map +1 -1
  73. package/dist/atlas/oscillators/limit-witnesses.js +17 -15
  74. package/dist/atlas/oscillators/limit-witnesses.js.map +1 -1
  75. package/dist/atlas/oscillators/models.d.ts.map +1 -1
  76. package/dist/atlas/oscillators/models.js +2 -6
  77. package/dist/atlas/oscillators/models.js.map +1 -1
  78. package/dist/atlas/oscillators/pendulum-motion.d.ts +29 -6
  79. package/dist/atlas/oscillators/pendulum-motion.d.ts.map +1 -1
  80. package/dist/atlas/oscillators/pendulum-motion.js +60 -40
  81. package/dist/atlas/oscillators/pendulum-motion.js.map +1 -1
  82. package/dist/atlas/oscillators/phase-translation.d.ts +0 -11
  83. package/dist/atlas/oscillators/phase-translation.d.ts.map +1 -1
  84. package/dist/atlas/oscillators/phase-translation.js +3 -4
  85. package/dist/atlas/oscillators/phase-translation.js.map +1 -1
  86. package/dist/atlas/oscillators/position-translation.d.ts +68 -7
  87. package/dist/atlas/oscillators/position-translation.d.ts.map +1 -1
  88. package/dist/atlas/oscillators/position-translation.js +123 -12
  89. package/dist/atlas/oscillators/position-translation.js.map +1 -1
  90. package/dist/atlas/oscillators/rejections.d.ts +0 -2
  91. package/dist/atlas/oscillators/rejections.d.ts.map +1 -1
  92. package/dist/atlas/oscillators/rejections.js +0 -7
  93. package/dist/atlas/oscillators/rejections.js.map +1 -1
  94. package/dist/atlas/physjs-entries.generated.d.ts +35 -25
  95. package/dist/atlas/physjs-entries.generated.d.ts.map +1 -1
  96. package/dist/atlas/physjs-entries.generated.js +37 -25
  97. package/dist/atlas/physjs-entries.generated.js.map +1 -1
  98. package/dist/atlas/physjs-ref.d.ts +34 -31
  99. package/dist/atlas/physjs-ref.d.ts.map +1 -1
  100. package/dist/atlas/physjs-ref.js +55 -53
  101. package/dist/atlas/physjs-ref.js.map +1 -1
  102. package/dist/atlas/physjs-reviewed.d.ts +1 -1
  103. package/dist/atlas/physjs-reviewed.js +15 -15
  104. package/dist/atlas/physjs-reviewed.js.map +1 -1
  105. package/dist/atlas/poster/statements.d.ts +0 -19
  106. package/dist/atlas/poster/statements.d.ts.map +1 -1
  107. package/dist/atlas/poster/statements.js +1 -1
  108. package/dist/atlas/poster/statements.js.map +1 -1
  109. package/dist/atlas/proof-target.d.ts +1 -1
  110. package/dist/atlas/proof-target.js +1 -1
  111. package/dist/atlas/proof-target.js.map +1 -1
  112. package/dist/atlas/regime.d.ts +1 -1
  113. package/dist/atlas/regime.d.ts.map +1 -1
  114. package/dist/atlas/regime.js +1 -1
  115. package/dist/atlas/regime.js.map +1 -1
  116. package/dist/atlas/text-overlap.d.ts +23 -0
  117. package/dist/atlas/text-overlap.d.ts.map +1 -0
  118. package/dist/atlas/text-overlap.js +41 -0
  119. package/dist/atlas/text-overlap.js.map +1 -0
  120. package/dist/atlas/waves/bridges-closure.d.ts.map +1 -1
  121. package/dist/atlas/waves/bridges-closure.js +2 -6
  122. package/dist/atlas/waves/bridges-closure.js.map +1 -1
  123. package/dist/atlas/waves/bridges.d.ts.map +1 -1
  124. package/dist/atlas/waves/bridges.js +32 -48
  125. package/dist/atlas/waves/bridges.js.map +1 -1
  126. package/dist/atlas/waves/models.d.ts +5 -6
  127. package/dist/atlas/waves/models.d.ts.map +1 -1
  128. package/dist/atlas/waves/models.js +7 -13
  129. package/dist/atlas/waves/models.js.map +1 -1
  130. package/dist/atlas/waves/numerics.d.ts.map +1 -1
  131. package/dist/atlas/waves/numerics.js +10 -3
  132. package/dist/atlas/waves/numerics.js.map +1 -1
  133. package/dist/atlas/witness-numeric.d.ts +30 -0
  134. package/dist/atlas/witness-numeric.d.ts.map +1 -1
  135. package/dist/atlas/witness-numeric.js +53 -0
  136. package/dist/atlas/witness-numeric.js.map +1 -1
  137. package/dist/atlas/witness-specs.d.ts.map +1 -1
  138. package/dist/atlas/witness-specs.js +19 -0
  139. package/dist/atlas/witness-specs.js.map +1 -1
  140. package/dist/atlas/witness-symbolic.d.ts +75 -3
  141. package/dist/atlas/witness-symbolic.d.ts.map +1 -1
  142. package/dist/atlas/witness-symbolic.js +116 -10
  143. package/dist/atlas/witness-symbolic.js.map +1 -1
  144. package/dist/bridges/catalog-load.d.ts.map +1 -1
  145. package/dist/bridges/catalog-load.js +13 -8
  146. package/dist/bridges/catalog-load.js.map +1 -1
  147. package/dist/bridges/catalog-types.d.ts +26 -2
  148. package/dist/bridges/catalog-types.d.ts.map +1 -1
  149. package/dist/bridges/catalog-types.js +11 -1
  150. package/dist/bridges/catalog-types.js.map +1 -1
  151. package/dist/bridges/evaluation-errors.d.ts +31 -1
  152. package/dist/bridges/evaluation-errors.d.ts.map +1 -1
  153. package/dist/bridges/evaluation-errors.js +20 -2
  154. package/dist/bridges/evaluation-errors.js.map +1 -1
  155. package/dist/bridges/evaluator-inputs.d.ts.map +1 -1
  156. package/dist/bridges/evaluator-inputs.js +7 -5
  157. package/dist/bridges/evaluator-inputs.js.map +1 -1
  158. package/dist/bridges/evaluators.d.ts.map +1 -1
  159. package/dist/bridges/evaluators.js +27 -12
  160. package/dist/bridges/evaluators.js.map +1 -1
  161. package/dist/bridges/expr-parse.d.ts +11 -0
  162. package/dist/bridges/expr-parse.d.ts.map +1 -1
  163. package/dist/bridges/expr-parse.js +14 -5
  164. package/dist/bridges/expr-parse.js.map +1 -1
  165. package/dist/bridges/holds.d.ts +35 -3
  166. package/dist/bridges/holds.d.ts.map +1 -1
  167. package/dist/bridges/holds.js +117 -23
  168. package/dist/bridges/holds.js.map +1 -1
  169. package/dist/bridges/notices.d.ts.map +1 -1
  170. package/dist/bridges/notices.js +5 -5
  171. package/dist/bridges/notices.js.map +1 -1
  172. package/dist/bridges/relation-eval.d.ts +4 -4
  173. package/dist/bridges/relation-eval.d.ts.map +1 -1
  174. package/dist/bridges/relation-eval.js +15 -16
  175. package/dist/bridges/relation-eval.js.map +1 -1
  176. package/dist/bridges/sensitivity.d.ts.map +1 -1
  177. package/dist/bridges/sensitivity.js +3 -3
  178. package/dist/bridges/sensitivity.js.map +1 -1
  179. package/dist/bridges/validity.d.ts +33 -0
  180. package/dist/bridges/validity.d.ts.map +1 -0
  181. package/dist/bridges/validity.js +67 -0
  182. package/dist/bridges/validity.js.map +1 -0
  183. package/dist/canonical/entries/atomic.js +1 -3
  184. package/dist/canonical/entries/atomic.js.map +1 -1
  185. package/dist/canonical/entries/condensed-matter.d.ts.map +1 -1
  186. package/dist/canonical/entries/condensed-matter.js +4 -5
  187. package/dist/canonical/entries/condensed-matter.js.map +1 -1
  188. package/dist/canonical/entries/dimensional-classics.d.ts.map +1 -1
  189. package/dist/canonical/entries/dimensional-classics.js +3 -4
  190. package/dist/canonical/entries/dimensional-classics.js.map +1 -1
  191. package/dist/canonical/entries/electromagnetism.d.ts.map +1 -1
  192. package/dist/canonical/entries/electromagnetism.js +4 -10
  193. package/dist/canonical/entries/electromagnetism.js.map +1 -1
  194. package/dist/canonical/entries/fluids-waves.d.ts.map +1 -1
  195. package/dist/canonical/entries/fluids-waves.js +3 -7
  196. package/dist/canonical/entries/fluids-waves.js.map +1 -1
  197. package/dist/canonical/entries/mechanics.d.ts.map +1 -1
  198. package/dist/canonical/entries/mechanics.js +4 -6
  199. package/dist/canonical/entries/mechanics.js.map +1 -1
  200. package/dist/canonical/entries/nonmonomial.d.ts.map +1 -1
  201. package/dist/canonical/entries/nonmonomial.js +9 -17
  202. package/dist/canonical/entries/nonmonomial.js.map +1 -1
  203. package/dist/canonical/entries/relativity.d.ts.map +1 -1
  204. package/dist/canonical/entries/relativity.js +6 -6
  205. package/dist/canonical/entries/relativity.js.map +1 -1
  206. package/dist/canonical/entries/thermo-nuclear-cosmo.d.ts.map +1 -1
  207. package/dist/canonical/entries/thermo-nuclear-cosmo.js +6 -10
  208. package/dist/canonical/entries/thermo-nuclear-cosmo.js.map +1 -1
  209. package/dist/canonical/fixed-points.d.ts +94 -0
  210. package/dist/canonical/fixed-points.d.ts.map +1 -0
  211. package/dist/canonical/fixed-points.js +81 -0
  212. package/dist/canonical/fixed-points.js.map +1 -0
  213. package/dist/canonical/linkage.d.ts.map +1 -1
  214. package/dist/canonical/linkage.js +25 -44
  215. package/dist/canonical/linkage.js.map +1 -1
  216. package/dist/canonical/normal-form.d.ts.map +1 -1
  217. package/dist/canonical/normal-form.js +5 -11
  218. package/dist/canonical/normal-form.js.map +1 -1
  219. package/dist/canonical/structural.d.ts +21 -21
  220. package/dist/canonical/structural.d.ts.map +1 -1
  221. package/dist/canonical/structural.js +40 -19
  222. package/dist/canonical/structural.js.map +1 -1
  223. package/dist/cases/catalog-checks.d.ts +10 -0
  224. package/dist/cases/catalog-checks.d.ts.map +1 -0
  225. package/dist/cases/catalog-checks.js +241 -0
  226. package/dist/cases/catalog-checks.js.map +1 -0
  227. package/dist/cases/catalog.d.ts +83 -0
  228. package/dist/cases/catalog.d.ts.map +1 -0
  229. package/dist/cases/catalog.js +118 -0
  230. package/dist/cases/catalog.js.map +1 -0
  231. package/dist/cases/engine.d.ts +13 -0
  232. package/dist/cases/engine.d.ts.map +1 -0
  233. package/dist/cases/engine.js +179 -0
  234. package/dist/cases/engine.js.map +1 -0
  235. package/dist/cases/index.d.ts.map +1 -1
  236. package/dist/cases/index.js +5 -7
  237. package/dist/cases/index.js.map +1 -1
  238. package/dist/cases/methods.d.ts +215 -0
  239. package/dist/cases/methods.d.ts.map +1 -0
  240. package/dist/cases/methods.js +743 -0
  241. package/dist/cases/methods.js.map +1 -0
  242. package/dist/cases/quadrature.d.ts +7 -9
  243. package/dist/cases/quadrature.d.ts.map +1 -1
  244. package/dist/cases/quadrature.js +28 -32
  245. package/dist/cases/quadrature.js.map +1 -1
  246. package/dist/cases/types.d.ts +12 -0
  247. package/dist/cases/types.d.ts.map +1 -1
  248. package/dist/cases/types.js.map +1 -1
  249. package/dist/cli/args.d.ts +25 -1
  250. package/dist/cli/args.d.ts.map +1 -1
  251. package/dist/cli/args.js +30 -8
  252. package/dist/cli/args.js.map +1 -1
  253. package/dist/cli/bindings.d.ts.map +1 -1
  254. package/dist/cli/bindings.js +5 -4
  255. package/dist/cli/bindings.js.map +1 -1
  256. package/dist/cli/command.d.ts +11 -1
  257. package/dist/cli/command.d.ts.map +1 -1
  258. package/dist/cli/command.js.map +1 -1
  259. package/dist/cli/commands/_atlas-map.d.ts +0 -9
  260. package/dist/cli/commands/_atlas-map.d.ts.map +1 -1
  261. package/dist/cli/commands/_atlas-map.js +8 -18
  262. package/dist/cli/commands/_atlas-map.js.map +1 -1
  263. package/dist/cli/commands/_atlas-route.d.ts.map +1 -1
  264. package/dist/cli/commands/_atlas-route.js +6 -2
  265. package/dist/cli/commands/_atlas-route.js.map +1 -1
  266. package/dist/cli/commands/_discovery-opts.d.ts +1 -0
  267. package/dist/cli/commands/_discovery-opts.d.ts.map +1 -1
  268. package/dist/cli/commands/_discovery-opts.js +9 -9
  269. package/dist/cli/commands/_discovery-opts.js.map +1 -1
  270. package/dist/cli/commands/atlas.d.ts.map +1 -1
  271. package/dist/cli/commands/atlas.js +8 -5
  272. package/dist/cli/commands/atlas.js.map +1 -1
  273. package/dist/cli/commands/audit.d.ts.map +1 -1
  274. package/dist/cli/commands/audit.js +8 -1
  275. package/dist/cli/commands/audit.js.map +1 -1
  276. package/dist/cli/commands/axes.d.ts.map +1 -1
  277. package/dist/cli/commands/axes.js +20 -1
  278. package/dist/cli/commands/axes.js.map +1 -1
  279. package/dist/cli/commands/confront.d.ts.map +1 -1
  280. package/dist/cli/commands/confront.js +8 -14
  281. package/dist/cli/commands/confront.js.map +1 -1
  282. package/dist/cli/commands/derive.d.ts.map +1 -1
  283. package/dist/cli/commands/derive.js +22 -22
  284. package/dist/cli/commands/derive.js.map +1 -1
  285. package/dist/cli/commands/discover.d.ts.map +1 -1
  286. package/dist/cli/commands/discover.js +122 -73
  287. package/dist/cli/commands/discover.js.map +1 -1
  288. package/dist/cli/commands/eval.d.ts.map +1 -1
  289. package/dist/cli/commands/eval.js +1 -0
  290. package/dist/cli/commands/eval.js.map +1 -1
  291. package/dist/cli/commands/evaluate.d.ts.map +1 -1
  292. package/dist/cli/commands/evaluate.js +67 -39
  293. package/dist/cli/commands/evaluate.js.map +1 -1
  294. package/dist/cli/commands/explain.d.ts.map +1 -1
  295. package/dist/cli/commands/explain.js +24 -3
  296. package/dist/cli/commands/explain.js.map +1 -1
  297. package/dist/cli/commands/ground.d.ts.map +1 -1
  298. package/dist/cli/commands/ground.js +7 -1
  299. package/dist/cli/commands/ground.js.map +1 -1
  300. package/dist/cli/commands/map.d.ts.map +1 -1
  301. package/dist/cli/commands/map.js +84 -11
  302. package/dist/cli/commands/map.js.map +1 -1
  303. package/dist/cli/commands/metric.d.ts.map +1 -1
  304. package/dist/cli/commands/metric.js +12 -9
  305. package/dist/cli/commands/metric.js.map +1 -1
  306. package/dist/cli/commands/path.d.ts +10 -0
  307. package/dist/cli/commands/path.d.ts.map +1 -1
  308. package/dist/cli/commands/path.js +25 -3
  309. package/dist/cli/commands/path.js.map +1 -1
  310. package/dist/cli/commands/probe.d.ts.map +1 -1
  311. package/dist/cli/commands/probe.js +59 -16
  312. package/dist/cli/commands/probe.js.map +1 -1
  313. package/dist/cli/commands/regime.d.ts.map +1 -1
  314. package/dist/cli/commands/regime.js +1 -0
  315. package/dist/cli/commands/regime.js.map +1 -1
  316. package/dist/cli/commands/retrieve.d.ts.map +1 -1
  317. package/dist/cli/commands/retrieve.js +1 -0
  318. package/dist/cli/commands/retrieve.js.map +1 -1
  319. package/dist/cli/commands/search.d.ts.map +1 -1
  320. package/dist/cli/commands/search.js +1 -0
  321. package/dist/cli/commands/search.js.map +1 -1
  322. package/dist/cli/commands/symbolic.d.ts.map +1 -1
  323. package/dist/cli/commands/symbolic.js +19 -28
  324. package/dist/cli/commands/symbolic.js.map +1 -1
  325. package/dist/cli/commands/testplan.d.ts.map +1 -1
  326. package/dist/cli/commands/testplan.js +4 -2
  327. package/dist/cli/commands/testplan.js.map +1 -1
  328. package/dist/cli/determination.d.ts +1 -0
  329. package/dist/cli/determination.d.ts.map +1 -1
  330. package/dist/cli/determination.js.map +1 -1
  331. package/dist/cli/expr-print.d.ts +0 -2
  332. package/dist/cli/expr-print.d.ts.map +1 -1
  333. package/dist/cli/expr-print.js +7 -31
  334. package/dist/cli/expr-print.js.map +1 -1
  335. package/dist/cli/flag-help.d.ts +1 -0
  336. package/dist/cli/flag-help.d.ts.map +1 -1
  337. package/dist/cli/flag-help.js +1 -0
  338. package/dist/cli/flag-help.js.map +1 -1
  339. package/dist/cli/graphs.d.ts +2 -0
  340. package/dist/cli/graphs.d.ts.map +1 -1
  341. package/dist/cli/graphs.js +1 -0
  342. package/dist/cli/graphs.js.map +1 -1
  343. package/dist/cli/main.d.ts +8 -0
  344. package/dist/cli/main.d.ts.map +1 -1
  345. package/dist/cli/main.js +19 -3
  346. package/dist/cli/main.js.map +1 -1
  347. package/dist/cli/numeric-flag.d.ts +12 -0
  348. package/dist/cli/numeric-flag.d.ts.map +1 -0
  349. package/dist/cli/numeric-flag.js +44 -0
  350. package/dist/cli/numeric-flag.js.map +1 -0
  351. package/dist/cli/output.d.ts +28 -0
  352. package/dist/cli/output.d.ts.map +1 -1
  353. package/dist/cli/output.js +23 -0
  354. package/dist/cli/output.js.map +1 -1
  355. package/dist/cli/record-reach.js +2 -2
  356. package/dist/cli/record-reach.js.map +1 -1
  357. package/dist/cli/record-tables.d.ts.map +1 -1
  358. package/dist/cli/record-tables.js +6 -5
  359. package/dist/cli/record-tables.js.map +1 -1
  360. package/dist/cli/record.d.ts +1 -5
  361. package/dist/cli/record.d.ts.map +1 -1
  362. package/dist/cli/record.js +9 -8
  363. package/dist/cli/record.js.map +1 -1
  364. package/dist/cli/search-index.d.ts.map +1 -1
  365. package/dist/cli/search-index.js +7 -6
  366. package/dist/cli/search-index.js.map +1 -1
  367. package/dist/cli/statuses.d.ts +0 -2
  368. package/dist/cli/statuses.d.ts.map +1 -1
  369. package/dist/cli/statuses.js +12 -9
  370. package/dist/cli/statuses.js.map +1 -1
  371. package/dist/cli/stored-results.d.ts +7 -0
  372. package/dist/cli/stored-results.d.ts.map +1 -0
  373. package/dist/cli/stored-results.js +23 -0
  374. package/dist/cli/stored-results.js.map +1 -0
  375. package/dist/cli/version.d.ts +1 -0
  376. package/dist/cli/version.d.ts.map +1 -1
  377. package/dist/cli/version.js +8 -5
  378. package/dist/cli/version.js.map +1 -1
  379. package/dist/cli-api.d.ts +36 -5
  380. package/dist/cli-api.d.ts.map +1 -1
  381. package/dist/cli-api.js +30 -4
  382. package/dist/cli-api.js.map +1 -1
  383. package/dist/composition/algebraic-equivalence.d.ts +43 -0
  384. package/dist/composition/algebraic-equivalence.d.ts.map +1 -0
  385. package/dist/composition/algebraic-equivalence.js +115 -0
  386. package/dist/composition/algebraic-equivalence.js.map +1 -0
  387. package/dist/composition/axes.d.ts +0 -6
  388. package/dist/composition/axes.d.ts.map +1 -1
  389. package/dist/composition/axes.js +6 -6
  390. package/dist/composition/axes.js.map +1 -1
  391. package/dist/composition/axis-audit.d.ts +47 -20
  392. package/dist/composition/axis-audit.d.ts.map +1 -1
  393. package/dist/composition/axis-audit.js +82 -9
  394. package/dist/composition/axis-audit.js.map +1 -1
  395. package/dist/composition/bridge-analysis.d.ts +17 -0
  396. package/dist/composition/bridge-analysis.d.ts.map +1 -1
  397. package/dist/composition/bridge-analysis.js +102 -55
  398. package/dist/composition/bridge-analysis.js.map +1 -1
  399. package/dist/composition/canonical-compare.d.ts +40 -0
  400. package/dist/composition/canonical-compare.d.ts.map +1 -1
  401. package/dist/composition/canonical-compare.js +122 -24
  402. package/dist/composition/canonical-compare.js.map +1 -1
  403. package/dist/composition/canonical-graph.d.ts +3 -3
  404. package/dist/composition/canonical-graph.d.ts.map +1 -1
  405. package/dist/composition/canonical-graph.js +11 -38
  406. package/dist/composition/canonical-graph.js.map +1 -1
  407. package/dist/composition/canonical-json.js +2 -2
  408. package/dist/composition/canonical-json.js.map +1 -1
  409. package/dist/composition/catalog-graph.d.ts.map +1 -1
  410. package/dist/composition/catalog-graph.js +2 -5
  411. package/dist/composition/catalog-graph.js.map +1 -1
  412. package/dist/composition/chain-candidate.d.ts +8 -0
  413. package/dist/composition/chain-candidate.d.ts.map +1 -1
  414. package/dist/composition/chain-candidate.js +9 -2
  415. package/dist/composition/chain-candidate.js.map +1 -1
  416. package/dist/composition/chain-match.d.ts +6 -3
  417. package/dist/composition/chain-match.d.ts.map +1 -1
  418. package/dist/composition/chain-match.js +4 -1
  419. package/dist/composition/chain-match.js.map +1 -1
  420. package/dist/composition/chain-result.d.ts.map +1 -1
  421. package/dist/composition/chain-result.js +2 -14
  422. package/dist/composition/chain-result.js.map +1 -1
  423. package/dist/composition/compose-symbolic.d.ts.map +1 -1
  424. package/dist/composition/compose-symbolic.js +3 -2
  425. package/dist/composition/compose-symbolic.js.map +1 -1
  426. package/dist/composition/compose.d.ts.map +1 -1
  427. package/dist/composition/compose.js +13 -5
  428. package/dist/composition/compose.js.map +1 -1
  429. package/dist/composition/composition-recovery.d.ts.map +1 -1
  430. package/dist/composition/composition-recovery.js +4 -7
  431. package/dist/composition/composition-recovery.js.map +1 -1
  432. package/dist/composition/consequence.d.ts +15 -5
  433. package/dist/composition/consequence.d.ts.map +1 -1
  434. package/dist/composition/consequence.js +6 -4
  435. package/dist/composition/consequence.js.map +1 -1
  436. package/dist/composition/discovery.d.ts +129 -9
  437. package/dist/composition/discovery.d.ts.map +1 -1
  438. package/dist/composition/discovery.js +171 -67
  439. package/dist/composition/discovery.js.map +1 -1
  440. package/dist/composition/edge.d.ts +21 -2
  441. package/dist/composition/edge.d.ts.map +1 -1
  442. package/dist/composition/edge.js +23 -1
  443. package/dist/composition/edge.js.map +1 -1
  444. package/dist/composition/enumerate.d.ts.map +1 -1
  445. package/dist/composition/enumerate.js +18 -3
  446. package/dist/composition/enumerate.js.map +1 -1
  447. package/dist/composition/evaluate-relation.d.ts +35 -11
  448. package/dist/composition/evaluate-relation.d.ts.map +1 -1
  449. package/dist/composition/evaluate-relation.js +60 -39
  450. package/dist/composition/evaluate-relation.js.map +1 -1
  451. package/dist/composition/explain.d.ts +3 -12
  452. package/dist/composition/explain.d.ts.map +1 -1
  453. package/dist/composition/explain.js +7 -20
  454. package/dist/composition/explain.js.map +1 -1
  455. package/dist/composition/expr-eval.d.ts +1 -1
  456. package/dist/composition/expr-eval.d.ts.map +1 -1
  457. package/dist/composition/expr-eval.js +6 -15
  458. package/dist/composition/expr-eval.js.map +1 -1
  459. package/dist/composition/expr-simplify.d.ts +26 -14
  460. package/dist/composition/expr-simplify.d.ts.map +1 -1
  461. package/dist/composition/expr-simplify.js +64 -72
  462. package/dist/composition/expr-simplify.js.map +1 -1
  463. package/dist/composition/formula-shape.d.ts +23 -4
  464. package/dist/composition/formula-shape.d.ts.map +1 -1
  465. package/dist/composition/formula-shape.js +57 -17
  466. package/dist/composition/formula-shape.js.map +1 -1
  467. package/dist/composition/graph-structure.d.ts +98 -0
  468. package/dist/composition/graph-structure.d.ts.map +1 -0
  469. package/dist/composition/graph-structure.js +167 -0
  470. package/dist/composition/graph-structure.js.map +1 -0
  471. package/dist/composition/graph-viz-svg.d.ts.map +1 -1
  472. package/dist/composition/graph-viz-svg.js +1 -1
  473. package/dist/composition/graph-viz-svg.js.map +1 -1
  474. package/dist/composition/graph-viz.d.ts.map +1 -1
  475. package/dist/composition/graph-viz.js +8 -37
  476. package/dist/composition/graph-viz.js.map +1 -1
  477. package/dist/composition/grounding.d.ts.map +1 -1
  478. package/dist/composition/grounding.js +19 -7
  479. package/dist/composition/grounding.js.map +1 -1
  480. package/dist/composition/identifiability.d.ts +91 -4
  481. package/dist/composition/identifiability.d.ts.map +1 -1
  482. package/dist/composition/identifiability.js +363 -6
  483. package/dist/composition/identifiability.js.map +1 -1
  484. package/dist/composition/index.d.ts +8 -4
  485. package/dist/composition/index.d.ts.map +1 -1
  486. package/dist/composition/index.js +3 -2
  487. package/dist/composition/index.js.map +1 -1
  488. package/dist/composition/mathts-quiet.d.ts +7 -8
  489. package/dist/composition/mathts-quiet.d.ts.map +1 -1
  490. package/dist/composition/mathts-quiet.js +7 -16
  491. package/dist/composition/mathts-quiet.js.map +1 -1
  492. package/dist/composition/mathts-scalar-symbols.d.ts.map +1 -1
  493. package/dist/composition/mathts-scalar-symbols.js +2 -1
  494. package/dist/composition/mathts-scalar-symbols.js.map +1 -1
  495. package/dist/composition/own-equation-magnitude.d.ts +95 -0
  496. package/dist/composition/own-equation-magnitude.d.ts.map +1 -0
  497. package/dist/composition/own-equation-magnitude.js +270 -0
  498. package/dist/composition/own-equation-magnitude.js.map +1 -0
  499. package/dist/composition/probe/backend-protocol.d.ts +3 -0
  500. package/dist/composition/probe/backend-protocol.d.ts.map +1 -1
  501. package/dist/composition/probe/backend-protocol.js.map +1 -1
  502. package/dist/composition/probe/candidate-store.d.ts +1 -0
  503. package/dist/composition/probe/candidate-store.d.ts.map +1 -1
  504. package/dist/composition/probe/candidate-store.js +1 -0
  505. package/dist/composition/probe/candidate-store.js.map +1 -1
  506. package/dist/composition/probe/corpus.d.ts +8 -4
  507. package/dist/composition/probe/corpus.d.ts.map +1 -1
  508. package/dist/composition/probe/corpus.js +23 -12
  509. package/dist/composition/probe/corpus.js.map +1 -1
  510. package/dist/composition/probe/dataset.d.ts +18 -0
  511. package/dist/composition/probe/dataset.d.ts.map +1 -1
  512. package/dist/composition/probe/dataset.js +95 -50
  513. package/dist/composition/probe/dataset.js.map +1 -1
  514. package/dist/composition/probe/experiment-design.d.ts +7 -1
  515. package/dist/composition/probe/experiment-design.d.ts.map +1 -1
  516. package/dist/composition/probe/experiment-design.js +44 -24
  517. package/dist/composition/probe/experiment-design.js.map +1 -1
  518. package/dist/composition/probe/falsify.d.ts +2 -0
  519. package/dist/composition/probe/falsify.d.ts.map +1 -1
  520. package/dist/composition/probe/falsify.js +2 -0
  521. package/dist/composition/probe/falsify.js.map +1 -1
  522. package/dist/composition/probe/fit.d.ts +7 -0
  523. package/dist/composition/probe/fit.d.ts.map +1 -1
  524. package/dist/composition/probe/fit.js +46 -22
  525. package/dist/composition/probe/fit.js.map +1 -1
  526. package/dist/composition/probe/frontier.d.ts.map +1 -1
  527. package/dist/composition/probe/frontier.js +33 -15
  528. package/dist/composition/probe/frontier.js.map +1 -1
  529. package/dist/composition/probe/generator.d.ts +30 -1
  530. package/dist/composition/probe/generator.d.ts.map +1 -1
  531. package/dist/composition/probe/generator.js +58 -36
  532. package/dist/composition/probe/generator.js.map +1 -1
  533. package/dist/composition/probe/index.d.ts +14 -0
  534. package/dist/composition/probe/index.d.ts.map +1 -1
  535. package/dist/composition/probe/index.js +6 -0
  536. package/dist/composition/probe/index.js.map +1 -1
  537. package/dist/composition/probe/limits.d.ts +25 -1
  538. package/dist/composition/probe/limits.d.ts.map +1 -1
  539. package/dist/composition/probe/limits.js +53 -11
  540. package/dist/composition/probe/limits.js.map +1 -1
  541. package/dist/composition/probe/pipeline.d.ts +5 -0
  542. package/dist/composition/probe/pipeline.d.ts.map +1 -1
  543. package/dist/composition/probe/pipeline.js +73 -24
  544. package/dist/composition/probe/pipeline.js.map +1 -1
  545. package/dist/composition/probe/power-law.d.ts +121 -0
  546. package/dist/composition/probe/power-law.d.ts.map +1 -0
  547. package/dist/composition/probe/power-law.js +251 -0
  548. package/dist/composition/probe/power-law.js.map +1 -0
  549. package/dist/composition/probe/problem.d.ts +8 -4
  550. package/dist/composition/probe/problem.d.ts.map +1 -1
  551. package/dist/composition/probe/problem.js +177 -49
  552. package/dist/composition/probe/problem.js.map +1 -1
  553. package/dist/composition/probe/report.js +1 -1
  554. package/dist/composition/probe/report.js.map +1 -1
  555. package/dist/composition/probe/residual.d.ts +7 -1
  556. package/dist/composition/probe/residual.d.ts.map +1 -1
  557. package/dist/composition/probe/residual.js +10 -7
  558. package/dist/composition/probe/residual.js.map +1 -1
  559. package/dist/composition/probe/run-manifest.d.ts +1 -0
  560. package/dist/composition/probe/run-manifest.d.ts.map +1 -1
  561. package/dist/composition/probe/run-manifest.js.map +1 -1
  562. package/dist/composition/probe/scalar-search.d.ts +50 -0
  563. package/dist/composition/probe/scalar-search.d.ts.map +1 -0
  564. package/dist/composition/probe/scalar-search.js +169 -0
  565. package/dist/composition/probe/scalar-search.js.map +1 -0
  566. package/dist/composition/probe/scoring.d.ts +1 -0
  567. package/dist/composition/probe/scoring.d.ts.map +1 -1
  568. package/dist/composition/probe/scoring.js.map +1 -1
  569. package/dist/composition/probe/structure.d.ts +82 -17
  570. package/dist/composition/probe/structure.d.ts.map +1 -1
  571. package/dist/composition/probe/structure.js +129 -55
  572. package/dist/composition/probe/structure.js.map +1 -1
  573. package/dist/composition/probe/study.d.ts +31 -9
  574. package/dist/composition/probe/study.d.ts.map +1 -1
  575. package/dist/composition/probe/study.js +235 -184
  576. package/dist/composition/probe/study.js.map +1 -1
  577. package/dist/composition/probe/t-tail.d.ts +16 -0
  578. package/dist/composition/probe/t-tail.d.ts.map +1 -0
  579. package/dist/composition/probe/t-tail.js +29 -0
  580. package/dist/composition/probe/t-tail.js.map +1 -0
  581. package/dist/composition/probe/types.d.ts +3 -0
  582. package/dist/composition/probe/types.d.ts.map +1 -1
  583. package/dist/composition/probe/types.js.map +1 -1
  584. package/dist/composition/proposed-bridges.d.ts +52 -12
  585. package/dist/composition/proposed-bridges.d.ts.map +1 -1
  586. package/dist/composition/proposed-bridges.js +107 -60
  587. package/dist/composition/proposed-bridges.js.map +1 -1
  588. package/dist/composition/quantity-clusters.d.ts +48 -0
  589. package/dist/composition/quantity-clusters.d.ts.map +1 -0
  590. package/dist/composition/quantity-clusters.js +98 -0
  591. package/dist/composition/quantity-clusters.js.map +1 -0
  592. package/dist/composition/rational-exponent.d.ts +40 -0
  593. package/dist/composition/rational-exponent.d.ts.map +1 -0
  594. package/dist/composition/rational-exponent.js +65 -0
  595. package/dist/composition/rational-exponent.js.map +1 -0
  596. package/dist/composition/representative-values.d.ts +22 -0
  597. package/dist/composition/representative-values.d.ts.map +1 -1
  598. package/dist/composition/representative-values.js +29 -0
  599. package/dist/composition/representative-values.js.map +1 -1
  600. package/dist/composition/retrodiction.d.ts +15 -0
  601. package/dist/composition/retrodiction.d.ts.map +1 -1
  602. package/dist/composition/retrodiction.js +12 -4
  603. package/dist/composition/retrodiction.js.map +1 -1
  604. package/dist/composition/user-equation.d.ts +1 -0
  605. package/dist/composition/user-equation.d.ts.map +1 -1
  606. package/dist/composition/user-equation.js +3 -2
  607. package/dist/composition/user-equation.js.map +1 -1
  608. package/dist/core/assignment.d.ts +19 -0
  609. package/dist/core/assignment.d.ts.map +1 -0
  610. package/dist/core/assignment.js +19 -0
  611. package/dist/core/assignment.js.map +1 -0
  612. package/dist/core/compare.d.ts +32 -0
  613. package/dist/core/compare.d.ts.map +1 -0
  614. package/dist/core/compare.js +46 -0
  615. package/dist/core/compare.js.map +1 -0
  616. package/dist/core/constants.d.ts +42 -41
  617. package/dist/core/constants.d.ts.map +1 -1
  618. package/dist/core/constants.js +71 -51
  619. package/dist/core/constants.js.map +1 -1
  620. package/dist/core/data-file.d.ts +7 -0
  621. package/dist/core/data-file.d.ts.map +1 -1
  622. package/dist/core/data-file.js +17 -0
  623. package/dist/core/data-file.js.map +1 -1
  624. package/dist/core/format.d.ts +36 -0
  625. package/dist/core/format.d.ts.map +1 -0
  626. package/dist/core/format.js +39 -0
  627. package/dist/core/format.js.map +1 -0
  628. package/dist/core/hash.d.ts +14 -0
  629. package/dist/core/hash.d.ts.map +1 -0
  630. package/dist/core/hash.js +17 -0
  631. package/dist/core/hash.js.map +1 -0
  632. package/dist/core/json-schema.d.ts +2 -0
  633. package/dist/core/json-schema.d.ts.map +1 -1
  634. package/dist/core/json-schema.js +14 -13
  635. package/dist/core/json-schema.js.map +1 -1
  636. package/dist/core/labeled-tensor.d.ts.map +1 -1
  637. package/dist/core/labeled-tensor.js +0 -8
  638. package/dist/core/labeled-tensor.js.map +1 -1
  639. package/dist/core/mathts-read.d.ts +25 -0
  640. package/dist/core/mathts-read.d.ts.map +1 -0
  641. package/dist/core/mathts-read.js +51 -0
  642. package/dist/core/mathts-read.js.map +1 -0
  643. package/dist/core/tensor.d.ts.map +1 -1
  644. package/dist/core/tensor.js +24 -0
  645. package/dist/core/tensor.js.map +1 -1
  646. package/dist/core/types.d.ts +5 -5
  647. package/dist/diff/bridge-ast-gradient.d.ts +27 -23
  648. package/dist/diff/bridge-ast-gradient.d.ts.map +1 -1
  649. package/dist/diff/bridge-ast-gradient.js +75 -173
  650. package/dist/diff/bridge-ast-gradient.js.map +1 -1
  651. package/dist/diff/bridge-gradient.d.ts +19 -6
  652. package/dist/diff/bridge-gradient.d.ts.map +1 -1
  653. package/dist/diff/bridge-gradient.js +19 -11
  654. package/dist/diff/bridge-gradient.js.map +1 -1
  655. package/dist/diff/bridge-specs.d.ts.map +1 -1
  656. package/dist/diff/bridge-specs.js +3 -0
  657. package/dist/diff/bridge-specs.js.map +1 -1
  658. package/dist/dimensional/algebra.d.ts +18 -0
  659. package/dist/dimensional/algebra.d.ts.map +1 -1
  660. package/dist/dimensional/algebra.js +41 -1
  661. package/dist/dimensional/algebra.js.map +1 -1
  662. package/dist/dimensional/ast-builders.d.ts +7 -0
  663. package/dist/dimensional/ast-builders.d.ts.map +1 -1
  664. package/dist/dimensional/ast-builders.js +11 -0
  665. package/dist/dimensional/ast-builders.js.map +1 -1
  666. package/dist/dimensional/ast-leaves.d.ts +81 -0
  667. package/dist/dimensional/ast-leaves.d.ts.map +1 -0
  668. package/dist/dimensional/ast-leaves.js +146 -0
  669. package/dist/dimensional/ast-leaves.js.map +1 -0
  670. package/dist/dimensional/ast-types.d.ts +15 -0
  671. package/dist/dimensional/ast-types.d.ts.map +1 -1
  672. package/dist/dimensional/ast-types.js.map +1 -1
  673. package/dist/dimensional/buckingham.d.ts.map +1 -1
  674. package/dist/dimensional/buckingham.js +15 -27
  675. package/dist/dimensional/buckingham.js.map +1 -1
  676. package/dist/dimensional/constant-rows.js +9 -9
  677. package/dist/dimensional/constant-rows.js.map +1 -1
  678. package/dist/dimensional/curvature-composite.d.ts +1 -1
  679. package/dist/dimensional/curvature-composite.js.map +1 -1
  680. package/dist/dimensional/dimension-inference.d.ts.map +1 -1
  681. package/dist/dimensional/dimension-inference.js +1 -2
  682. package/dist/dimensional/dimension-inference.js.map +1 -1
  683. package/dist/dimensional/errors.d.ts +1 -1
  684. package/dist/dimensional/errors.d.ts.map +1 -1
  685. package/dist/dimensional/errors.js +1 -15
  686. package/dist/dimensional/errors.js.map +1 -1
  687. package/dist/dimensional/exact-scale.d.ts +24 -11
  688. package/dist/dimensional/exact-scale.d.ts.map +1 -1
  689. package/dist/dimensional/exact-scale.js +122 -130
  690. package/dist/dimensional/exact-scale.js.map +1 -1
  691. package/dist/dimensional/gauge-field.d.ts.map +1 -1
  692. package/dist/dimensional/gauge-field.js +2 -2
  693. package/dist/dimensional/gauge-field.js.map +1 -1
  694. package/dist/dimensional/hyphen-names.d.ts +12 -2
  695. package/dist/dimensional/hyphen-names.d.ts.map +1 -1
  696. package/dist/dimensional/hyphen-names.js +44 -19
  697. package/dist/dimensional/hyphen-names.js.map +1 -1
  698. package/dist/dimensional/mathts-unit-delegation.d.ts +29 -0
  699. package/dist/dimensional/mathts-unit-delegation.d.ts.map +1 -0
  700. package/dist/dimensional/mathts-unit-delegation.js +187 -0
  701. package/dist/dimensional/mathts-unit-delegation.js.map +1 -0
  702. package/dist/dimensional/mathts-unit-wrapper.d.ts +33 -0
  703. package/dist/dimensional/mathts-unit-wrapper.d.ts.map +1 -0
  704. package/dist/dimensional/mathts-unit-wrapper.js +190 -0
  705. package/dist/dimensional/mathts-unit-wrapper.js.map +1 -0
  706. package/dist/dimensional/metric.d.ts.map +1 -1
  707. package/dist/dimensional/metric.js +0 -1
  708. package/dist/dimensional/metric.js.map +1 -1
  709. package/dist/dimensional/scalar-lowering.d.ts +21 -0
  710. package/dist/dimensional/scalar-lowering.d.ts.map +1 -0
  711. package/dist/dimensional/scalar-lowering.js +45 -0
  712. package/dist/dimensional/scalar-lowering.js.map +1 -0
  713. package/dist/dimensional/symbolic-constants.d.ts +9 -0
  714. package/dist/dimensional/symbolic-constants.d.ts.map +1 -1
  715. package/dist/dimensional/symbolic-constants.js +13 -1
  716. package/dist/dimensional/symbolic-constants.js.map +1 -1
  717. package/dist/dimensional/types.d.ts +36 -0
  718. package/dist/dimensional/types.d.ts.map +1 -1
  719. package/dist/dimensional/types.js +45 -7
  720. package/dist/dimensional/types.js.map +1 -1
  721. package/dist/dimensional/unit-data.d.ts +5 -1
  722. package/dist/dimensional/unit-data.d.ts.map +1 -1
  723. package/dist/dimensional/unit-data.js +30 -6
  724. package/dist/dimensional/unit-data.js.map +1 -1
  725. package/dist/dimensional/units.d.ts +2 -0
  726. package/dist/dimensional/units.d.ts.map +1 -1
  727. package/dist/dimensional/units.js +59 -3
  728. package/dist/dimensional/units.js.map +1 -1
  729. package/dist/dimensional/validator.d.ts +2 -0
  730. package/dist/dimensional/validator.d.ts.map +1 -1
  731. package/dist/dimensional/validator.js.map +1 -1
  732. package/dist/index.d.ts +9 -3
  733. package/dist/index.d.ts.map +1 -1
  734. package/dist/index.js +10 -4
  735. package/dist/index.js.map +1 -1
  736. package/dist/numerical/christoffel-flat.d.ts.map +1 -1
  737. package/dist/numerical/christoffel-flat.js +3 -2
  738. package/dist/numerical/christoffel-flat.js.map +1 -1
  739. package/dist/numerical/connection-lowering-helpers.d.ts +3 -1
  740. package/dist/numerical/connection-lowering-helpers.d.ts.map +1 -1
  741. package/dist/numerical/connection-lowering-helpers.js +11 -15
  742. package/dist/numerical/connection-lowering-helpers.js.map +1 -1
  743. package/dist/numerical/covariant-eikonal.d.ts.map +1 -1
  744. package/dist/numerical/covariant-eikonal.js +34 -11
  745. package/dist/numerical/covariant-eikonal.js.map +1 -1
  746. package/dist/numerical/curvature-lowering-helpers.js +3 -2
  747. package/dist/numerical/curvature-lowering-helpers.js.map +1 -1
  748. package/dist/numerical/errors.d.ts.map +1 -1
  749. package/dist/numerical/errors.js +0 -3
  750. package/dist/numerical/errors.js.map +1 -1
  751. package/dist/numerical/finite-difference.d.ts +22 -0
  752. package/dist/numerical/finite-difference.d.ts.map +1 -0
  753. package/dist/numerical/finite-difference.js +27 -0
  754. package/dist/numerical/finite-difference.js.map +1 -0
  755. package/dist/numerical/geodesic-integrator.d.ts.map +1 -1
  756. package/dist/numerical/geodesic-integrator.js +22 -14
  757. package/dist/numerical/geodesic-integrator.js.map +1 -1
  758. package/dist/numerical/geometrized.d.ts.map +1 -1
  759. package/dist/numerical/geometrized.js +0 -1
  760. package/dist/numerical/geometrized.js.map +1 -1
  761. package/dist/numerical/mathts-engine.d.ts.map +1 -1
  762. package/dist/numerical/mathts-engine.js +10 -24
  763. package/dist/numerical/mathts-engine.js.map +1 -1
  764. package/dist/numerical/metric-inverse.d.ts.map +1 -1
  765. package/dist/numerical/metric-inverse.js +83 -46
  766. package/dist/numerical/metric-inverse.js.map +1 -1
  767. package/dist/numerical/null-ray-integrator.d.ts +2 -1
  768. package/dist/numerical/null-ray-integrator.d.ts.map +1 -1
  769. package/dist/numerical/null-ray-integrator.js +12 -12
  770. package/dist/numerical/null-ray-integrator.js.map +1 -1
  771. package/dist/numerical/painleve-gullstrand-metric.js +2 -2
  772. package/dist/numerical/painleve-gullstrand-metric.js.map +1 -1
  773. package/dist/numerical/pderiv.d.ts.map +1 -1
  774. package/dist/numerical/pderiv.js +2 -6
  775. package/dist/numerical/pderiv.js.map +1 -1
  776. package/dist/numerical/perihelion-finder.d.ts +0 -36
  777. package/dist/numerical/perihelion-finder.d.ts.map +1 -1
  778. package/dist/numerical/perihelion-finder.js +41 -87
  779. package/dist/numerical/perihelion-finder.js.map +1 -1
  780. package/dist/numerical/quadrature.d.ts.map +1 -1
  781. package/dist/numerical/quadrature.js +11 -13
  782. package/dist/numerical/quadrature.js.map +1 -1
  783. package/dist/numerical/rk4-trajectory.d.ts +10 -0
  784. package/dist/numerical/rk4-trajectory.d.ts.map +1 -0
  785. package/dist/numerical/rk4-trajectory.js +37 -0
  786. package/dist/numerical/rk4-trajectory.js.map +1 -0
  787. package/dist/numerical/schwarzschild.d.ts +14 -0
  788. package/dist/numerical/schwarzschild.d.ts.map +1 -0
  789. package/dist/numerical/schwarzschild.js +17 -0
  790. package/dist/numerical/schwarzschild.js.map +1 -0
  791. package/dist/numerical/spacetime-metrics.d.ts +12 -0
  792. package/dist/numerical/spacetime-metrics.d.ts.map +1 -1
  793. package/dist/numerical/spacetime-metrics.js +72 -56
  794. package/dist/numerical/spacetime-metrics.js.map +1 -1
  795. package/dist/numerical/statistics.d.ts +24 -0
  796. package/dist/numerical/statistics.d.ts.map +1 -0
  797. package/dist/numerical/statistics.js +52 -0
  798. package/dist/numerical/statistics.js.map +1 -0
  799. package/dist/numerical/strides.d.ts +3 -2
  800. package/dist/numerical/strides.d.ts.map +1 -1
  801. package/dist/numerical/strides.js +3 -10
  802. package/dist/numerical/strides.js.map +1 -1
  803. package/dist/numerical/tensor-engine.d.ts +21 -0
  804. package/dist/numerical/tensor-engine.d.ts.map +1 -1
  805. package/dist/numerical/tensor-engine.js +12 -0
  806. package/dist/numerical/tensor-engine.js.map +1 -1
  807. package/dist/relations/regime.d.ts +10 -0
  808. package/dist/relations/regime.d.ts.map +1 -1
  809. package/dist/relations/regime.js +18 -1
  810. package/dist/relations/regime.js.map +1 -1
  811. package/package.json +9 -12
  812. package/dist/cases/brownian-sphere.d.ts +0 -68
  813. package/dist/cases/brownian-sphere.d.ts.map +0 -1
  814. package/dist/cases/brownian-sphere.js +0 -354
  815. package/dist/cases/brownian-sphere.js.map +0 -1
  816. package/dist/cases/damped-resonator.d.ts +0 -23
  817. package/dist/cases/damped-resonator.d.ts.map +0 -1
  818. package/dist/cases/damped-resonator.js +0 -224
  819. package/dist/cases/damped-resonator.js.map +0 -1
  820. package/dist/cases/kepler-rv.d.ts +0 -13
  821. package/dist/cases/kepler-rv.d.ts.map +0 -1
  822. package/dist/cases/kepler-rv.js +0 -172
  823. package/dist/cases/kepler-rv.js.map +0 -1
  824. package/dist/cases/lumped-cooling.d.ts +0 -46
  825. package/dist/cases/lumped-cooling.d.ts.map +0 -1
  826. package/dist/cases/lumped-cooling.js +0 -261
  827. package/dist/cases/lumped-cooling.js.map +0 -1
  828. package/dist/cases/resistor-noise.d.ts +0 -14
  829. package/dist/cases/resistor-noise.d.ts.map +0 -1
  830. package/dist/cases/resistor-noise.js +0 -215
  831. package/dist/cases/resistor-noise.js.map +0 -1
  832. package/dist/cases/skin-depth.d.ts +0 -21
  833. package/dist/cases/skin-depth.d.ts.map +0 -1
  834. package/dist/cases/skin-depth.js +0 -174
  835. package/dist/cases/skin-depth.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"map.js","sourceRoot":"","sources":["../../../src/cli/commands/map.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAExC,OAAO,EAAE,eAAe,EAAiC,MAAM,eAAe,CAAC;AAC/E,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AACrE,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,QAAQ,EAAE,iBAAiB,EAAE,eAAe,EAAoB,MAAM,cAAc,CAAC;AACxH,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACvE,OAAO,EAAE,qBAAqB,EAAsB,MAAM,qBAAqB,CAAC;AAChF,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,KAAK,QAAQ,MAAM,iBAAiB,CAAC;AAU5C,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AA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AAI,CAAC,EAAE,CAAC,CAAC;QAC1C,GAAG,CAAC,gBAAgB,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;QACxC,GAAG,CAAC,mBAAmB,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAChD,CAAC;IACD,GAAG,CAAC,iBAAiB,CAAC,CAAC,QAAQ,CAAC,MAAM,4CAA4C,CAAC,CAAC;IACpF,GAAG,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACxE,GAAG,CAAC,iFAAiF,CAAC,CAAC;IACvF,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED,MAAM,CAAC,MAAM,OAAO,GAAY;IAC9B,IAAI,EAAE,KAAK;IACX,OAAO,EAAE,CAAC,SAAS,CAAC;IACpB,KAAK,EAAE,KAAK;IACZ,IAAI,EAAE,WAAW,CAAC,IAAI,EAAE,KAAK,CAAC;IAC9B,OAAO,EAAE,0EAA0E;IACnF,OAAO,EAAE,yDAAyD;IAClE,KAAK,EAAE,SAAS;IAChB,GAAG;CACJ,CAAC;AAEF,eAAe,CAAC,OAAO,CAAC,CAAC","sourcesContent":["/**\n * `upt map` — how the equations LINK: the text linkage map, the visual\n * (mermaid/dot/svg) physics map, and the `--equation` user-junction\n * injection. Transposed verbatim from bin/upt.mjs's `proposedJunctions()`/\n * `analyzeEquation()`/`printEquationReport()`/`mapCmd()` (lines 387-545),\n * plus `--json` and the `--json`/`--format` conflict guard.\n *\n * `parseEquationFlag` is REPLACED by the `either`-style `--equation` FlagSpec\n * (`args.ts` already extracts `--equation=...` or `--equation \"...\"` into\n * `flags.get('equation')`). `parseDiscoveryOpts` moved to `_discovery-opts.ts`\n * — the old CLI's `proposedJunctions` fed `map`'s raw args through it\n * (bin/upt.mjs line 392), so `--proposed` shares `discover`'s\n * `--max-orders`/`--anchor` validation here too.\n */\nimport { writeFileSync } from 'node:fs';\nimport type { FlagSpec, ParsedArgs } from '../args.js';\nimport { registerCommand, type Command, type CommandCtx } from '../command.js';\nimport { commandHelp, JSON_FLAG, sourceFlag } from '../flag-help.js';\nimport { resolveGraph, coreAnchor, coreLine, groundTruthAnchor, groundTruthLine, type AnchorScope } from '../graphs.js';\nimport { emitJson } from '../output.js';\nimport { publishedUrl } from '../published-url.js';\nimport { UsageError, CliError, EXIT_CHECK_FAILED } from '../errors.js';\nimport { classifyDetermination, type Determination } from '../determination.js';\nimport { parseDiscoveryOpts } from './_discovery-opts.js';\nimport * as atlasMap from './_atlas-map.js';\nimport type {\n BridgeEdge,\n CanonicalComparison,\n EquationAnalysis,\n EvidenceTag,\n RelationType,\n VizJunction,\n VizModel,\n} from '../../cli-api.js';\nimport { canonicalCheckFailed, conventionLines } from '../conventions.js';\nimport type { UnitMode } from '../../cli-api.js';\nimport { withCatalogEvidence } from '../map-evidence.js';\nimport { DISCOVER_MAX_ORDERS_DEFAULT } from '../library-defaults.js';\n\n/** `--around` reaches this many shared-quantity hops when `--depth` is not given, and at most this many when it is. */\nconst DEFAULT_DEPTH = 1;\nconst MAX_DEPTH = 10;\n\nconst FLAGS: FlagSpec[] = [\n sourceFlag('both', 'Which graph to draw: catalog, canonical, or both. This command defaults to both.'),\n { name: '--format', valueStyle: 'attached', description: 'Output form: text, mermaid, dot, or svg. svg needs the optional @viz-js/viz peer.', defaultValue: 'text' },\n { name: '--out', valueStyle: 'attached', description: 'Write the report to PATH instead of stdout.' },\n { name: '--max-orders', valueStyle: 'attached', description: 'Magnitude-clash threshold for the --proposed overlay.', defaultValue: DISCOVER_MAX_ORDERS_DEFAULT },\n { name: '--anchor', valueStyle: 'attached', repeatable: true, description: 'Override a numeric anchor as k=v for the --proposed overlay.', defaultValue: 'mass=M_sun' },\n { name: '--proposed', valueStyle: 'none', description: 'Overlay unadjudicated identity-consequence relations.' },\n { name: '--relation', valueStyle: 'attached', description: 'Keep atlas edges whose recorded relation is TYPE.' },\n { name: '--evidence', valueStyle: 'attached', description: 'Keep atlas edges whose derived evidence set contains TAG.' },\n { name: '--around', valueStyle: 'either', description: 'Keep edges within --depth shared-quantity hops of QUANTITY.' },\n { name: '--depth', valueStyle: 'attached', description: 'Hop count for --around.', defaultValue: String(DEFAULT_DEPTH) },\n { name: '--route', valueStyle: 'either', description: 'Map the atlas route FROM,TO instead of the equation graph.' },\n { name: '--all-routes', valueStyle: 'none', description: 'With --route, list every simple route, shortest first.' },\n { name: '--max-routes', valueStyle: 'attached', description: `Cap on --all-routes. The maximum accepted is ${atlasMap.MAX_ROUTES_CEILING}.`, defaultValue: String(atlasMap.DEFAULT_MAX_ROUTES) },\n { name: '--family', valueStyle: 'either', description: 'Map one atlas family by name.' },\n { name: '--observable', valueStyle: 'either', description: 'Map bridges whose recorded text names this observable.' },\n { name: '--stored', valueStyle: 'none', description: `Derive evidence from ${publishedUrl('data/atlas/witness-results.json')}. When the file is absent (a checkout or install without data/), the command names --run.` },\n { name: '--run', valueStyle: 'none', description: 'Run the shown bridges\\' in-process witnesses now. Exit 3 if one is refuted.' },\n // optionalValue: a bare trailing --equation stores '' so the empty-check in\n // run() owns the diagnostic (old-CLI fidelity: bin/upt.mjs did `a[i+1] ?? ''`\n // and let mapCmd emit `upt: --equation requires \"TARGET = EXPR\"`, exit 2).\n { name: '--equation', valueStyle: 'either', optionalValue: true, description: 'Inject TARGET = EXPR as a user node and report where it lands.' },\n { name: '--equation-only', valueStyle: 'none', description: 'Print only the equation verdict. Errors when --equation is missing.' },\n { name: '--verbose', valueStyle: 'none', description: 'With --equation, also print the linkage map.' },\n { name: '--bind-short', valueStyle: 'none', description: 'Bind a one-letter catalog name in --equation. Without it, those names are reported and not bound.' },\n { name: '--natural', valueStyle: 'none', description: 'Set ħ = c = 1 when a dimension difference is a power of those constants.' },\n { name: '--geometrized', valueStyle: 'none', description: 'With the natural-unit rules, also set G = 1.' },\n JSON_FLAG,\n];\n\nconst HELP = `upt map [--source=catalog|canonical|both] [--format=text|mermaid|dot|svg]\n [--proposed [--anchor=k=v,...] [--max-orders=N]] [--out=PATH]\n [--equation \"TARGET = EXPR\" [--equation-only] [--verbose] [--bind-short]\n [--natural] [--geometrized]] [--around=QUANTITY [--depth=N]]\n [--relation=TYPE] [--evidence=TAG] [--route=FROM,TO [--all-routes\n [--max-routes=N]]] [--family=NAME] [--observable=NAME] [--stored | --run]\n Map how the equations LINK: connected components (clusters) of the\n graph by shared quantities, the anchored core, the link hubs, and\n the isolated tail.\n --source defaults to 'both' (catalog + canonical) — a pure\n connectivity question gets the honest, all-known-physics answer by\n default; --source=catalog shows the bridge-catalog view alone.\n --out=PATH writes whatever form was asked for (text, --json or a\n visual format) to PATH instead of stdout; an empty PATH exits 1.\n --format=mermaid|dot|svg emits the VISUAL map (quantities = nodes,\n equations = junctions colored by status, one subgraph per component).\n text (default) is the unchanged linkage printout. svg renders the dot\n layout via the optional @viz-js/viz peer (npm i @viz-js/viz; or pipe\n dot through \"dot -Tsvg\"). --proposed overlays the unadjudicated\n identity-consequence relations (gray dashed); --anchor and --max-orders\n tune the discovery funnel that derives them, as in \\`upt discover\\`.\n --out writes to a file (default stdout).\n --equation \"TARGET = EXPR\" injects YOUR OWN equation as a violet 'user'\n node, dimensionally checks it, compares with the canonical registry, and\n reports nearest equations by shared-quantity overlap (not a full edge\n dump). Multi-word names may use underscores or catalog hyphens\n (planck_length / planck-length). Unknown names get a \"did you mean?\",\n and a registered constant of the inferred dimension (sigma → sigma_sb).\n A catalog target whose dimension depends on an unresolved name exits 3\n and does not quote that placeholder, unless a canonical comparison agreed.\n A one-letter catalog name (a, r, …) is reported and not bound; --bind-short\n binds it. The alias T → temperature still binds.\n An all-constant right-hand side (the Planck length) is compared at the\n SI constant values when its target is a catalog quantity.\n With --equation, the default is the verdict only. --verbose prints the\n linkage map after it. --equation-only is the same verdict and errors\n when --equation is missing (with --json: no \"linkage\" field).\n A bare e in the formula is the elementary charge. E is energy.\n Euler's number is exp(x), for example exp(1). The name euler is refused.\n --natural sets ħ = c = 1 for a dimension difference that is a power of\n those constants; --geometrized also allows powers of G. The SI default\n still refuses rest_energy = mass.\n --relation=TYPE keeps only edges whose recorded Atlas relation is that\n type; --evidence=TAG keeps only edges whose evidence set, DERIVED from\n the catalog row at read time, contains that tag.\n ⚠ Filtering changes what a missing overlay means: unfiltered, an edge\n with no overlay is KEPT; filtered, it is DROPPED, because nothing shows\n it satisfies the filter. Those drops are counted and printed separately\n from the edges that simply did not match — an unaudited graph must not\n render as a complete answer.\n --around=QUANTITY [--depth=N] keeps only the edges within N\n shared-quantity hops of QUANTITY (default ${DEFAULT_DEPTH}: the edges that use it),\n in every output form, and prints how many of the source's edges it\n kept: the others are omitted from the view, not absent from the graph.\n --route=FROM,TO and --family=NAME map the ATLAS instead: models and\n the recorded bridges between them, not shared quantities. --route\n shows the route \\`upt path\\` reports, each bridge's relation,\n assumptions, regime, bound and derived evidence, the composition\n step by step (and where the table yields no composite claim), and\n the equations each model records. --family shows one family's\n models, its bridges, the bridges from other families that touch it,\n and its rejections; --relation/--evidence filter its bridges, and a\n bridge whose tag depends on witness results is counted as undecided,\n not as a mismatch. A model's equations are only those its\n canonicalRefs record; nothing is inferred from shared quantities.\n --route=FROM,TO --all-routes lists every simple route (no model\n visited twice), shortest first, each with its composition and route\n claim, and counts the claims; --max-routes=N (default ${atlasMap.DEFAULT_MAX_ROUTES}, at most\n ${atlasMap.MAX_ROUTES_CEILING}) bounds the list, and a list cut short says so and says up to\n which bridge count it is complete.\n --observable=NAME maps the bridges whose RECORDED preserves text, or\n declared bound translation, names that observable (a whole-word text\n match, nothing inferred), lists apart those recording it as NOT\n preserved, and counts the bridges that record nothing about it;\n --relation/--evidence filter it as they filter a family.\n --stored derives evidence from the committed witness results\n (${publishedUrl('data/atlas/witness-results.json')}; it ships in data/),\n labelled with the last commit that touched it; --run runs the shown\n bridges' in-process registered witnesses now (exit 3 if any is\n refuted). Either resolves a tag once its witnesses have results; a\n witness with no result leaves it undecided, and checked, refuted and\n unresolved are counted apart.\n Every atlas view states how many of the atlas's models and bridges it\n shows, in text, --json and --format=mermaid|dot|svg.\n e.g. upt map --relation=derivation --source=both\n upt map --around=temperature --depth=2 --source=catalog\n upt map --route=model-pendulum,model-lc\n upt map --route=model-string,model-dalembert --all-routes --stored\n upt map --family=oscillators --evidence=formally-proved\n upt map --observable=frequency --run`;\n\n/**\n * The edges within `depth` shared-quantity hops of `quantity`: hop 1 is every\n * edge that has it as a source or target, and each further hop adds the edges\n * sharing a quantity with one already kept.\n * @internal\n */\nexport function neighbourhood(graph: readonly BridgeEdge[], quantity: string, depth: number): BridgeEdge[] {\n const names = (e: BridgeEdge): string[] => [...e.sources.map((q) => q.name), e.target.name];\n const reached = new Set([quantity]);\n const kept = new Set<BridgeEdge>();\n for (let hop = 0; hop < depth; hop++) {\n const frontier = graph.filter((e) => !kept.has(e) && names(e).some((n) => reached.has(n)));\n if (frontier.length === 0) break;\n for (const e of frontier) {\n kept.add(e);\n for (const n of names(e)) reached.add(n);\n }\n }\n return graph.filter((e) => kept.has(e));\n}\n\nconst RELATION_TYPES: readonly RelationType[] = [\n 'derivation',\n 'exact-equivalence',\n 'restriction',\n 'approximation',\n 'coarse-graining',\n 'analytic-continuation',\n 'structural-analogy',\n 'deformation-quantization',\n];\n\nconst EVIDENCE_TAGS: readonly EvidenceTag[] = [\n 'proposed',\n 'reviewed',\n 'dimension-checked',\n 'convention-checked',\n 'symbolically-checked',\n 'numerically-supported',\n 'formally-proved',\n 'formally-proved-property',\n 'formally-proved-cross-check',\n 'empirically-supported',\n 'contradicted',\n 'unresolved',\n];\n\n/** Last value of an `attached` flag, or undefined when the flag is absent. */\nfunction lastValue(flags: ParsedArgs['flags'], name: string): string | undefined {\n const v = flags.get(name);\n return v && v.length > 0 ? v[v.length - 1] : undefined;\n}\n\n/** Validate one filter value against its vocabulary. A bad value is a CliError\n * (exit 1); an unknown FLAG is the parser's UsageError (exit 2). */\nfunction parseFilter<T extends string>(\n raw: string | undefined,\n allowed: readonly T[],\n flag: string,\n): T | undefined {\n if (raw === undefined) return undefined;\n if (!allowed.includes(raw as T)) {\n throw new CliError(`upt: unknown ${flag}='${raw}' (expected: ${allowed.join(' | ')})`);\n }\n return raw as T;\n}\n\n// Convert the derived identity-consequence proposals into viz junctions\n// (gray-dashed, status 'proposed'). The library never imports proposed-bridges;\n// the CLI does the conversion, keeping the epistemic firewall intact.\nfunction proposedJunctions(\n api: CommandCtx['api'],\n graph: readonly BridgeEdge[],\n flags: ParsedArgs['flags']\n): VizJunction[] {\n const opts = parseDiscoveryOpts(api, flags);\n const ranked = api.rankDiscoveries(graph, opts);\n return api.deriveProposedBridges(ranked).map((p) => ({\n id: p.id,\n label: p.id,\n status: 'proposed' as const,\n sources: (p.governing || []).map((g) => g.name),\n target: p.target.name,\n }));\n}\n\n// Build the catalog quantity name→dimension map for the chosen graph, then run\n// the (testable) library analysis: parse + dimensional validation + \"did you\n// mean?\" hints. The library owns the physics (constants' dimensions, inference);\n// the CLI only formats.\nasync function analyzeEquation(\n api: CommandCtx['api'],\n equation: string,\n graph: readonly BridgeEdge[],\n options?: { readonly bindShortNames?: boolean; readonly units?: Exclude<UnitMode, 'si'> },\n): Promise<{ user: EquationAnalysis; comparisons: CanonicalComparison[] }> {\n const catalogDims = new Map<string, import('../../dimensional/types.js').Dimension>();\n for (const e of graph) {\n for (const q of [...e.sources, e.target]) catalogDims.set(q.name, q.dim);\n }\n const user = await api.analyzeUserEquation(equation, catalogDims, options);\n // Dimensions cannot see a prefactor: compare with the canonical equation the\n // user's one restates, when the registry holds one (persona finding L2).\n const comparisons = user.parseError\n ? []\n : await api.compareUserEquation(equation, catalogDims, {\n bindShortNames: options?.bindShortNames,\n ...(options?.units === undefined ? {} : { constantOverrides: api.naturalConstantOverrides(options.units) }),\n });\n return { user, comparisons };\n}\n\nfunction unresolvedNames(user: EquationAnalysis): string[] {\n const placeholderNames = [\n ...(user.placeholders ?? []),\n ...(user.shortBindings ?? []).filter((b) => b.bound === false).map((b) => b.name),\n ];\n return [...new Set([...(user.hints ?? []).map((h) => h.name), ...placeholderNames])];\n}\n\n/** The exit `upt derive` uses for the same question. */\nfunction equationDetermination(\n user: EquationAnalysis,\n comparisons: readonly CanonicalComparison[],\n): Determination {\n const unresolved = unresolvedNames(user);\n const asked = user.targetDimension != null;\n return classifyDetermination({\n asked,\n agrees: comparisons.some((c) => c.kind === 'agrees'),\n checkFailed:\n (user.consistent === false && unresolved.length === 0) || canonicalCheckFailed(comparisons),\n notUnique: false,\n unresolved,\n });\n}\n\nfunction tainted(user: EquationAnalysis): boolean {\n return unresolvedNames(user).length > 0;\n}\n\n// Print the dimensional verdict, where the equation landed, and any hints.\n// `out` is ctx.out (text mode → stdout) or ctx.err (visual → stderr).\nfunction printEquationReport(\n api: CommandCtx['api'],\n model: VizModel,\n user: EquationAnalysis,\n out: (line?: string) => void,\n comparisons: readonly CanonicalComparison[] = [],\n): void {\n out('');\n const unresolved = unresolvedNames(user);\n const verdict = equationDetermination(user, comparisons);\n if (user.consistent === true) {\n out(` ✓ dimensionally consistent: ${api.format(user.rhsDimension!)}`);\n } else if (verdict.report === 'not-established') {\n const names = unresolved.map((n) => `'${n}'`).join(', ');\n out(\n ` · NOT ESTABLISHED: ${names} ${unresolved.length > 1 ? 'have' : 'has'} no catalog dimension, ` +\n 'so the right-hand side dimension was not established and is not reported.',\n );\n } else if (verdict.report === 'established' && unresolved.length > 0) {\n // A canonical agreement ran. The placeholder dimension is not that result.\n } else if (user.consistent === false) {\n out(\n ` ⚠ dimensional MISMATCH: RHS is ${api.format(user.rhsDimension!)} but the target is ${api.format(\n user.targetDimension!\n )}`\n );\n } else if (user.rhsDimension && (user.placeholders ?? []).length > 0) {\n const names = user.placeholders.map((n) => `'${n}'`).join(', ');\n out(\n ` · UNKNOWN: ${names} ${user.placeholders.length === 1 ? 'was' : 'were'} taken as dimensionless. ` +\n 'That is not the dimension of the formula, and the target is not a bound catalog name, so nothing was checked',\n );\n } else if (user.rhsDimension) {\n out(` · RHS dimension: ${api.format(user.rhsDimension)} (target not in the catalog, so no comparison)`);\n }\n for (const line of api.describeKnownRelation(comparisons, user.junction.target, [...user.junction.sources])) {\n out(` ${line}`);\n }\n for (const line of conventionLines(comparisons.map((c) => c.id))) out(` ${line}`);\n if (user.naturalNote) out(` ${user.naturalNote}`);\n const L = api.equationLanding(model, 'user-equation');\n if (L.isolated) {\n out(' ⚠ your equation is ISOLATED — it shares no quantity with this graph.');\n } else {\n out(\n ` ● your equation joins ${L.anchored ? 'the ANCHORED cluster' : 'a cluster'} of ${L.clusterSize} via {${L.sharedQuantities.join(', ')}}`\n );\n // W3/I3: do not dump ~100 edge ids — that made shared length/temperature look\n // like a physics claim. Summarise nearest equations by shared-quantity overlap.\n for (const line of api.formatConnectedSummary(model, L)) out(line);\n }\n for (const h of user.hints ?? []) {\n if (!h.suggestions.length) {\n out(` ⚠ '${h.name}' did not match a catalog quantity (run \\`upt canonical\\` for the vocabulary).`);\n } else if (h.byDimension) {\n out(` ⚠ '${h.name}' is unknown — by its inferred dimension, did you mean: ${h.suggestions.join(', ')}?`);\n } else {\n out(` ⚠ '${h.name}' did not match a catalog quantity — did you mean: ${h.suggestions.join(', ')}?`);\n }\n // Persona finding L5: `sigma` for the Stefan–Boltzmann constant `sigma_sb`.\n if ((h.constants ?? []).length > 0) {\n const list = h.constants!.join(', ');\n out(\n ` '${h.name}' has the inferred dimension of the registered constant${h.constants!.length > 1 ? 's' : ''} ${list}; ` +\n 'write that name to use its SI value',\n );\n }\n }\n // Persona finding W6: a one-letter name binds to whatever the catalog calls that letter.\n for (const b of user.shortBindings ?? []) {\n const users = model.junctions\n .filter((j) => j.id !== 'user-equation' && (j.target === b.quantity || j.sources.includes(b.quantity)))\n .map((j) => j.id)\n .sort();\n const shown = users.slice(0, 3).join(', ') + (users.length > 3 ? `, +${users.length - 3} more` : '');\n const used = users.length > 0 ? ` (used by ${shown})` : '';\n if (b.bound === false) {\n out(\n ` · '${b.name}' matches the catalog quantity ${b.quantity} ${api.format(b.dim)}${used}, a one-letter name, and is not bound. ` +\n 'Pass --bind-short to bind it, or write the full name you meant',\n );\n } else {\n out(\n ` · '${b.name}' is bound to the catalog quantity ${b.quantity} ${api.format(b.dim)}, a one-letter name` +\n `${used}; if you meant another quantity, write its full name`,\n );\n }\n }\n}\n\n/** Flags that shape the equation graph, and so mean nothing on an atlas view. */\nconst GRAPH_ONLY_FLAGS = ['source', 'around', 'depth', 'equation', 'equation-only', 'proposed', 'max-orders', 'anchor'] as const;\n\n/** Flags that only an atlas view reads. */\nconst ATLAS_ONLY_FLAGS = ['all-routes', 'max-routes', 'stored', 'run'] as const;\n\nasync function runAtlasView(\n ctx: CommandCtx,\n route: string | undefined,\n family: string | undefined,\n observable: string | undefined,\n): Promise<number> {\n const { args, api, err, write } = ctx;\n const chosen = [route !== undefined, family !== undefined, observable !== undefined].filter(Boolean).length;\n if (chosen > 1) throw new CliError('upt map: pick one atlas view: --route, --family or --observable');\n const view = route !== undefined ? '--route' : family !== undefined ? '--family' : '--observable';\n const stray = GRAPH_ONLY_FLAGS.filter((f) => args.flags.has(f));\n if (stray.length > 0) {\n throw new CliError(\n `upt map: ${view} maps the atlas, not the equation graph; ${stray.map((f) => `--${f}`).join(', ')} do${stray.length === 1 ? 'es' : ''} not apply`,\n );\n }\n const relation = parseFilter(lastValue(args.flags, 'relation'), RELATION_TYPES, '--relation');\n const evidence = parseFilter(lastValue(args.flags, 'evidence'), EVIDENCE_TAGS, '--evidence');\n if (route !== undefined && (relation !== undefined || evidence !== undefined)) {\n throw new CliError('upt map: a route is composed whole, so --relation/--evidence do not filter it; filter a family view instead (--family=NAME)');\n }\n const allRoutes = args.flags.has('all-routes');\n if (allRoutes && route === undefined) throw new CliError('upt map: --all-routes needs --route=FROM,TO');\n const maxRaw = lastValue(args.flags, 'max-routes');\n if (maxRaw !== undefined && !allRoutes) throw new CliError('upt map: --max-routes needs --all-routes');\n const maxRoutes = maxRaw === undefined ? atlasMap.DEFAULT_MAX_ROUTES : Number(maxRaw);\n if (!Number.isInteger(maxRoutes) || maxRoutes < 1 || maxRoutes > atlasMap.MAX_ROUTES_CEILING) {\n throw new CliError(`upt map: --max-routes=${maxRaw} must be an integer from 1 to ${atlasMap.MAX_ROUTES_CEILING}`);\n }\n if (args.flags.has('stored') && args.flags.has('run')) {\n throw new CliError('upt map: pick one witness-results source: --stored (the committed artifact) or --run (run now)');\n }\n const fmt = lastValue(args.flags, 'format') ?? 'text';\n const isJson = args.flags.has('json');\n if (isJson && fmt !== 'text') throw new UsageError('upt: pick one output form: --json or --format');\n if (!['text', 'mermaid', 'dot', 'svg'].includes(fmt)) {\n throw new CliError(`upt: unknown --format='${fmt}' (expected: text | mermaid | dot | svg)`);\n }\n\n const filter = {\n ...(relation !== undefined ? { relation } : {}),\n ...(evidence !== undefined ? { evidence } : {}),\n };\n const endpoints = route === undefined ? null : atlasMap.parseRoute(route);\n const build = (results: atlasMap.WitnessResults | null): atlasMap.AtlasView =>\n endpoints !== null\n ? allRoutes\n ? atlasMap.buildRoutesView(api, ...endpoints, maxRoutes, results)\n : atlasMap.buildRouteView(api, ...endpoints, results)\n : family !== undefined\n ? atlasMap.buildFamilyView(api, family, filter, results)\n : atlasMap.buildObservableView(api, observable!, filter, results);\n let results: atlasMap.WitnessResults | null = null;\n if (args.flags.has('stored')) results = atlasMap.loadStoredResults();\n else if (args.flags.has('run')) {\n // Unfiltered first: a filter's verdict depends on the results, so every candidate bridge is run.\n const candidates =\n endpoints === null\n ? atlasMap.bridgeIdsOf(family !== undefined ? atlasMap.buildFamilyView(api, family, {}) : atlasMap.buildObservableView(api, observable!, {}))\n : atlasMap.bridgeIdsOf(build(null));\n results = await atlasMap.runResults(api, candidates);\n }\n const v = build(results);\n const exitCode = results?.mode === 'run' && results.rows.some((r) => r.status === 'refuted') ? EXIT_CHECK_FAILED : 0;\n\n if (isJson) {\n emitJson({ command: 'map', source: 'atlas', result: v }, write);\n return exitCode;\n }\n if (fmt === 'text') {\n const lines =\n v.view === 'route'\n ? atlasMap.routeText(v)\n : v.view === 'routes'\n ? atlasMap.routesText(v)\n : v.view === 'family'\n ? atlasMap.familyText(v)\n : atlasMap.observableText(v);\n for (const line of lines) ctx.out(line);\n return exitCode;\n }\n let src: string;\n if (fmt === 'svg') {\n try {\n src = await api.renderDotToSvg(atlasMap.toDot(v));\n } catch (e) {\n throw new CliError(e && (e as Error).message ? (e as Error).message : String(e));\n }\n } else {\n src = fmt === 'mermaid' ? atlasMap.toMermaid(v) : atlasMap.toDot(v);\n }\n const path = lastValue(args.flags, 'out');\n if (path !== undefined) {\n if (!path) throw new CliError('upt: --out= requires a non-empty PATH');\n try {\n writeFileSync(path, src);\n } catch (e) {\n throw new CliError(`upt map: ${(e as Error).message}`);\n }\n err(`upt: wrote ${fmt} to ${path}`);\n } else {\n write(src);\n }\n err(`upt: ${atlasMap.viewLegend(v)}`);\n return exitCode;\n}\n\n/**\n * `--out=PATH` holds for every output form. A visual form writes its diagram\n * source (handled by the branch that renders it); the text report and the\n * `--json` envelope are captured here and written whole, so stdout stays\n * empty and the file holds exactly what stdout would have carried. An empty\n * PATH exits 1 in every form.\n */\nasync function run(ctx: CommandCtx): Promise<number> {\n const path = lastValue(ctx.args.flags, 'out');\n const fmt = lastValue(ctx.args.flags, 'format') ?? 'text';\n if (path === undefined || fmt !== 'text') return runReport(ctx);\n if (!path) throw new CliError('upt: --out= requires a non-empty PATH');\n let captured = '';\n const code = await runReport({\n ...ctx,\n out: (line?: string) => {\n captured += (line ?? '') + '\\n';\n },\n write: (s: string) => {\n captured += s;\n },\n });\n try {\n writeFileSync(path, captured);\n } catch (e) {\n throw new CliError(`upt map: ${(e as Error).message}`);\n }\n ctx.err(`upt: wrote ${ctx.args.flags.has('json') ? 'json' : 'text'} to ${path}`);\n return code;\n}\n\nasync function runReport(ctx: CommandCtx): Promise<number> {\n const { args, api, out, err, write } = ctx;\n const route = lastValue(args.flags, 'route');\n const family = lastValue(args.flags, 'family');\n const observable = lastValue(args.flags, 'observable');\n if (route !== undefined || family !== undefined || observable !== undefined) return runAtlasView(ctx, route, family, observable);\n const atlasOnly = ATLAS_ONLY_FLAGS.filter((f) => args.flags.has(f));\n if (atlasOnly.length > 0) {\n throw new CliError(\n `upt map: ${atlasOnly.map((f) => `--${f}`).join(', ')} appl${atlasOnly.length === 1 ? 'ies' : 'y'} to an atlas view ` +\n '(--route, --family or --observable), not to the equation graph',\n );\n }\n // map asks a pure connectivity question, so it defaults to --source=both\n // (catalog + canonical) rather than graphs.ts's catalog fallback used by\n // the other --source commands (e.g. discover, which keeps catalog).\n const sourceFlags = args.flags.has('source') ? args.flags : new Map(args.flags).set('source', ['both']);\n const { graph: wholeGraph, label, source } = resolveGraph(api, sourceFlags);\n\n const around = lastValue(args.flags, 'around');\n const depthRaw = lastValue(args.flags, 'depth');\n if (depthRaw !== undefined && around === undefined) throw new CliError('upt map: --depth needs --around');\n let focus: { around: string; depth: number; kept: number; of: number } | null = null;\n let fullGraph = wholeGraph;\n if (around !== undefined) {\n const depth = depthRaw === undefined ? DEFAULT_DEPTH : Number(depthRaw);\n if (!Number.isInteger(depth) || depth < 1 || depth > MAX_DEPTH) throw new CliError(`upt map: --depth=${depthRaw} must be an integer from 1 to ${MAX_DEPTH}`);\n const known = new Set(wholeGraph.flatMap((e) => [...e.sources.map((q) => q.name), e.target.name]));\n const name = api.resolveQuantityName(around, known);\n if (name === null) {\n const near = api.suggestQuantities(around, known);\n throw new CliError(\n `upt map: '${around}' is not a quantity of the ${label} graph` + (near.length > 0 ? `; did you mean: ${near.join(', ')}?` : ''),\n );\n }\n fullGraph = neighbourhood(wholeGraph, name, depth);\n focus = { around: name, depth, kept: fullGraph.length, of: wholeGraph.length };\n }\n const focusLine =\n focus === null\n ? null\n : `focused: ${focus.kept} of ${focus.of} edges within ${focus.depth} hop(s) of '${focus.around}' [${label}]; ` +\n 'the rest are omitted from this view, not absent from the graph';\n // The two overlay filters. Parsed BEFORE anything else is computed so a bad\n // value costs nothing and always exits 1.\n const relation = parseFilter(lastValue(args.flags, 'relation'), RELATION_TYPES, '--relation');\n const evidence = parseFilter(lastValue(args.flags, 'evidence'), EVIDENCE_TAGS, '--evidence');\n const filterOpts = withCatalogEvidence({\n ...(relation !== undefined ? { relation } : {}),\n ...(evidence !== undefined ? { evidence } : {}),\n });\n // The TEXT and JSON paths filter the edge list here, because `linkageMap`\n // consumes edges. The VISUAL path hands `buildVizModel` the FULL graph with\n // the same options, so the model also judges the --proposed / --equation\n // overlay junctions, which are not edges and which `filterEdges` cannot see.\n // One predicate, two callers: they cannot disagree about what a filter\n // selects, only about how much they were asked to count.\n const { kept: graph, stats: edgeStats } = api.filterEdges(fullGraph, filterOpts);\n // Audit I3: what \"anchored\" means here, and the discovery ground truth when --proposed ran the funnel.\n const anchor: AnchorScope = {\n core: coreAnchor(graph),\n ...(args.flags.has('proposed') ? { groundTruth: groundTruthAnchor(api, parseDiscoveryOpts(api, args.flags)) } : {}),\n };\n const edgeLegend = api.formatFilterLegend(edgeStats);\n\n const fmtValues = args.flags.get('format');\n const fmt = fmtValues && fmtValues.length > 0 ? fmtValues[fmtValues.length - 1] : 'text';\n const isJson = args.flags.has('json');\n\n if (isJson && fmt !== 'text') {\n throw new UsageError('upt: pick one output form: --json or --format');\n }\n\n // --equation injects a user-supplied \"TARGET = EXPR\" as a 'user' junction.\n let user: EquationAnalysis | null = null;\n let comparisons: CanonicalComparison[] = [];\n const equationValues = args.flags.get('equation');\n const equation = equationValues && equationValues.length > 0 ? equationValues[equationValues.length - 1] : null;\n // Persona finding L7: the verdict alone, without the linkage map after it.\n const equationOnly = args.flags.has('equation-only');\n if (equationOnly && equation == null) throw new UsageError('upt map: --equation-only needs --equation \"TARGET = EXPR\"');\n if (equationOnly && fmt !== 'text') {\n throw new UsageError(`upt map: --equation-only prints the verdict as text or --json; it does not apply to --format=${fmt}`);\n }\n if (equation != null) {\n if (!equation.trim()) {\n throw new UsageError('upt: --equation requires \"TARGET = EXPR\"');\n }\n try {\n const units: Exclude<UnitMode, 'si'> | undefined = args.flags.has('geometrized')\n ? 'geometrized'\n : args.flags.has('natural')\n ? 'natural'\n : undefined;\n if (args.flags.has('geometrized') && args.flags.has('natural')) {\n throw new UsageError('upt map: pick one unit mode: --natural (ħ = c = 1) or --geometrized (ħ = c = G = 1)');\n }\n ({ user, comparisons } = await analyzeEquation(api, equation, graph, {\n bindShortNames: args.flags.has('bind-short'),\n ...(units === undefined ? {} : { units }),\n })); // throws UserEquationError on malformed structure\n } catch (e) {\n throw new UsageError('upt: ' + (e && (e as Error).message ? (e as Error).message : String(e)));\n }\n if (user.parseError) {\n throw new UsageError('upt: ' + user.parseError); // dimensionally malformed RHS\n }\n }\n\n // The same classification `upt derive` uses. A canonical agreement stays 0.\n // A catalog target that was not established exits 3. An unbound target stays 0.\n const exitCode = user === null ? 0 : equationDetermination(user, comparisons).exit;\n\n // Ranked from the UNFILTERED graph: the proposal set is a property of the\n // whole catalog, and the model then judges each overlay junction under the\n // same filter as every other junction. Computed once for every output form.\n const proposed: VizJunction[] | null = args.flags.has('proposed') ? proposedJunctions(api, wholeGraph, args.flags) : null;\n const overlay = (extra: VizJunction[]): VizJunction[] => [...(proposed ?? []), ...extra];\n\n if (isJson) {\n const linkage = api.linkageMap(graph);\n let landing: ReturnType<typeof api.equationLanding> | undefined;\n let userEquation: Record<string, unknown> | undefined;\n if (user) {\n const model = api.buildVizModel(fullGraph, {\n title: `UPT physics map — ${label}`,\n extraJunctions: overlay([user.junction]),\n ...filterOpts,\n });\n landing = api.equationLanding(model, 'user-equation');\n userEquation = {\n equation: user.junction.label,\n consistent: tainted(user) ? null : user.consistent,\n rhsDimension: tainted(user) ? null : user.rhsDimension,\n targetDimension: user.targetDimension,\n hints: user.hints,\n shortBindings: user.shortBindings,\n ...(user.placeholders.length === 0 ? {} : { placeholders: user.placeholders }),\n canonicalComparisons: comparisons,\n catalogEdges: api.matchingCatalogEdges(user.junction.target, [...user.junction.sources]),\n };\n }\n emitJson(\n {\n command: 'map',\n source,\n anchor,\n result: {\n ...(equation != null && (equationOnly || !args.flags.has('verbose')) ? {} : { linkage }),\n ...(proposed === null ? {} : { proposed: proposed.map((p) => ({ id: p.id, target: p.target, sources: p.sources })) }),\n ...(edgeLegend !== null ? { filter: edgeStats } : {}),\n ...(focus !== null ? { focus } : {}),\n ...(user ? { landing, userEquation } : {}),\n },\n },\n write\n );\n return exitCode;\n }\n\n if (fmt === 'mermaid' || fmt === 'dot' || fmt === 'svg') {\n const extraJunctions = overlay(user ? [user.junction] : []);\n const model = api.buildVizModel(fullGraph, {\n title: `UPT physics map — ${label}`,\n extraJunctions,\n ...filterOpts,\n });\n // svg is the dot layout rendered by the optional @viz-js/viz peer.\n let src: string;\n if (fmt === 'svg') {\n try {\n src = await api.renderDotToSvg(model.toDot());\n } catch (e) {\n throw new CliError(e && (e as Error).message ? (e as Error).message : String(e));\n }\n } else {\n src = fmt === 'mermaid' ? model.toMermaid() : model.toDot();\n }\n const outValues = args.flags.get('out');\n if (outValues && outValues.length > 0) {\n const path = outValues[outValues.length - 1];\n if (!path) {\n throw new CliError('upt: --out= requires a non-empty PATH');\n }\n try {\n writeFileSync(path, src);\n } catch (e) {\n throw new CliError(`upt map: ${(e as Error).message}`);\n }\n err(`upt: wrote ${fmt} (${model.junctions.length} junctions, ${model.clusters.length} clusters) to ${path}`);\n } else {\n write(src);\n }\n // Legend and landing report go to stderr so stdout/--out stays pure diagram\n // source. The diagram itself also carries the legend (see `buildVizModel`).\n if (focusLine !== null) err(`upt: ${focusLine}`);\n if (model.filterLegend !== null) err(`upt: ${model.filterLegend}`);\n if (user) printEquationReport(api, model, user, err, comparisons);\n return exitCode;\n }\n if (fmt !== 'text') {\n throw new CliError(`upt: unknown --format='${fmt}' (expected: text | mermaid | dot | svg)`);\n }\n\n // --equation: the verdict on the user's equation is the answer asked for, so it\n // comes BEFORE the linkage map, not after ~45 lines of it (persona finding N4).\n if (user) {\n const model = api.buildVizModel(fullGraph, {\n title: `UPT physics map — ${label}`,\n extraJunctions: overlay([user.junction]),\n ...filterOpts,\n });\n out(`\\nYour equation: ${user.junction.label}`);\n printEquationReport(api, model, user, out, comparisons);\n if (equationOnly || !args.flags.has('verbose')) return exitCode;\n }\n\n const m = api.linkageMap(graph);\n const mix = (s: Readonly<Record<string, number>>) =>\n Object.entries(s)\n .map(([k, v]) => `${v} ${k}`)\n .join(', ');\n out(`\\nLinkage map — how the equations connect via shared quantities [source: ${label}]`);\n out(`(${m.componentCount} components over ${graph.length} edges; ${m.compositions} compose into chains)`);\n out(` ${coreLine(anchor.core!)}`);\n if (anchor.groundTruth) out(` proposals: ${groundTruthLine(anchor.groundTruth)}`);\n if (proposed !== null) {\n // The overlay the visual forms draw, listed here: an unadjudicated identity consequence is a\n // proposal, never a catalog edge. Each names its target and the quantities it would relate.\n out(` proposed relations (${proposed.length}, unadjudicated identity consequences; not catalog edges):`);\n for (const p of proposed) {\n // No free input: every governing quantity of the derived relation is a registered constant.\n const sources = p.sources.length === 0 ? '{} (no sources: every input is a registered constant)' : `{${p.sources.join(', ')}}`;\n out(` ${p.id}: ${p.target} ← ${sources}`);\n }\n if (proposed.length === 0) out(' (none at this anchor and --max-orders)');\n }\n out('');\n if (focusLine !== null) out(` ${focusLine}`);\n if (edgeLegend !== null) out(` ${edgeLegend}`);\n for (const c of m.clusters.filter((x) => x.size > 1)) {\n out(` ● cluster of ${c.size}${c.anchored ? ' [ANCHORED to known physics]' : ''}`);\n out(` edges: ${c.edges.join(', ')}`);\n out(` status: ${mix(c.statusMix)}`);\n out(` link hubs: ${c.hubs.join(', ')}\\n`);\n }\n out(` ○ isolated (${m.isolated.length}) — share no quantity with any other edge:`);\n out(` ${m.isolated.length === 0 ? 'none' : m.isolated.join(', ')}`);\n out('\\n (a structural map — shared-quantity connectivity, NOT a credibility signal)');\n return exitCode;\n}\n\nexport const command: Command = {\n name: 'map',\n aliases: ['linkage'],\n flags: FLAGS,\n help: commandHelp(HELP, FLAGS),\n summary: 'Show how equations link, or where your own equation lands on that graph.',\n example: 'upt map --equation \"period = 2*pi*sqrt(length/gravity)\"',\n group: 'explore',\n run,\n};\n\nregisterCommand(command);\n"]}
1
+ {"version":3,"file":"map.js","sourceRoot":"","sources":["../../../src/cli/commands/map.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAExC,OAAO,EAAE,eAAe,EAAiC,MAAM,eAAe,CAAC;AAC/E,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AACrE,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,QAAQ,EAAE,iBAAiB,EAAE,eAAe,EAAoB,MAAM,cAAc,CAAC;AACxH,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,qBAAqB,EAAsB,MAAM,qBAAqB,CAAC;AAChF,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,KAAK,QAAQ,MAAM,iBAAiB,CAAC;AAa5C,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAE1E,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AAErE,uHAAuH;AACvH,MAAM,aAAa,GAAG,CAAC,CAAC;AACxB,MAAM,SAAS,GAAG,EAAE,CAAC;AAErB,MAAM,KAAK,GAAe;IACxB,UAAU,CAAC,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,EAAE,CAAC,SAAS,CAAC;IACpB,KAAK,EAAE,KAAK;IACZ,IAAI,EAAE,WAAW,CAAC,IAAI,EAAE,KAAK,CAAC;IAC9B,OAAO,EAAE,0EAA0E;IACnF,OAAO,EAAE,yDAAyD;IAClE,KAAK,EAAE,SAAS;IAChB,GAAG;CACJ,CAAC;AAEF,eAAe,CAAC,OAAO,CAAC,CAAC","sourcesContent":["/**\n * `upt map` — how the equations LINK: the text linkage map, the visual\n * (mermaid/dot/svg) physics map, and the `--equation` user-junction\n * injection. Transposed verbatim from bin/upt.mjs's `proposedJunctions()`/\n * `analyzeEquation()`/`printEquationReport()`/`mapCmd()` (lines 387-545),\n * plus `--json` and the `--json`/`--format` conflict guard.\n *\n * `parseEquationFlag` is REPLACED by the `either`-style `--equation` FlagSpec\n * (`args.ts` already extracts `--equation=...` or `--equation \"...\"` into\n * `flags.get('equation')`). `parseDiscoveryOpts` moved to `_discovery-opts.ts`\n * — the old CLI's `proposedJunctions` fed `map`'s raw args through it\n * (bin/upt.mjs line 392), so `--proposed` shares `discover`'s\n * `--max-orders`/`--anchor` validation here too.\n */\nimport { writeFileSync } from 'node:fs';\nimport type { FlagSpec, ParsedArgs } from '../args.js';\nimport { registerCommand, type Command, type CommandCtx } from '../command.js';\nimport { commandHelp, JSON_FLAG, sourceFlag } from '../flag-help.js';\nimport { resolveGraph, coreAnchor, coreLine, groundTruthAnchor, groundTruthLine, type AnchorScope } from '../graphs.js';\nimport { emitJson } from '../output.js';\nimport { publishedUrl } from '../published-url.js';\nimport { UsageError, CliError, EXIT_CHECK_FAILED } from '../errors.js';\nimport { integerFlag } from '../numeric-flag.js';\nimport { classifyDetermination, type Determination } from '../determination.js';\nimport { parseDiscoveryOpts } from './_discovery-opts.js';\nimport * as atlasMap from './_atlas-map.js';\nimport type {\n BridgeEdge,\n CanonicalComparison,\n CommunityReport,\n DerivationCycle,\n EquationAnalysis,\n EvidenceTag,\n HubRank,\n RelationType,\n VizJunction,\n VizModel,\n} from '../../cli-api.js';\nimport { canonicalCheckFailed, conventionLines } from '../conventions.js';\nimport type { UnitMode } from '../../cli-api.js';\nimport { withCatalogEvidence } from '../map-evidence.js';\nimport { DISCOVER_MAX_ORDERS_DEFAULT } from '../library-defaults.js';\n\n/** `--around` reaches this many shared-quantity hops when `--depth` is not given, and at most this many when it is. */\nconst DEFAULT_DEPTH = 1;\nconst MAX_DEPTH = 10;\n\nconst FLAGS: FlagSpec[] = [\n sourceFlag('both', 'Which graph to draw: catalog, canonical, or both. This command defaults to both.'),\n { name: '--format', valueStyle: 'attached', description: 'Output form: text, mermaid, dot, or svg. svg needs the optional @viz-js/viz peer.', defaultValue: 'text' },\n { name: '--out', valueStyle: 'attached', description: 'Write the report to PATH instead of stdout.' },\n { name: '--max-orders', valueStyle: 'attached', description: 'Magnitude-clash threshold for the --proposed overlay.', defaultValue: DISCOVER_MAX_ORDERS_DEFAULT },\n { name: '--anchor', valueStyle: 'attached', repeatable: true, description: 'Override a numeric anchor as k=v for the --proposed overlay.', defaultValue: 'mass=M_sun' },\n { name: '--proposed', valueStyle: 'none', description: 'Overlay unadjudicated identity-consequence relations.' },\n { name: '--relation', valueStyle: 'attached', description: 'Keep atlas edges whose recorded relation is TYPE.' },\n { name: '--evidence', valueStyle: 'attached', description: 'Keep atlas edges whose derived evidence set contains TAG.' },\n { name: '--around', valueStyle: 'either', description: 'Keep edges within --depth shared-quantity hops of QUANTITY.' },\n { name: '--depth', valueStyle: 'attached', description: 'Hop count for --around.', defaultValue: String(DEFAULT_DEPTH) },\n { name: '--route', valueStyle: 'either', description: 'Map the atlas route FROM,TO instead of the equation graph.' },\n { name: '--all-routes', valueStyle: 'none', description: 'With --route, list every simple route, shortest first.' },\n { name: '--max-routes', valueStyle: 'attached', description: `Cap on --all-routes. The maximum accepted is ${atlasMap.MAX_ROUTES_CEILING}.`, defaultValue: String(atlasMap.DEFAULT_MAX_ROUTES) },\n { name: '--family', valueStyle: 'either', description: 'Map one atlas family by name.' },\n { name: '--observable', valueStyle: 'either', description: 'Map bridges whose recorded text names this observable.' },\n { name: '--stored', valueStyle: 'none', description: `Derive evidence from ${publishedUrl('data/atlas/witness-results.json')}. When the file is absent (a checkout or install without data/), the command names --run.` },\n { name: '--run', valueStyle: 'none', description: 'Run the shown bridges\\' in-process witnesses now. Exit 3 if one is refuted.' },\n // optionalValue: a bare trailing --equation stores '' so the empty-check in\n // run() owns the diagnostic (old-CLI fidelity: bin/upt.mjs did `a[i+1] ?? ''`\n // and let mapCmd emit `upt: --equation requires \"TARGET = EXPR\"`, exit 2).\n { name: '--equation', valueStyle: 'either', optionalValue: true, description: 'Inject TARGET = EXPR as a user node and report where it lands.' },\n { name: '--equation-only', valueStyle: 'none', description: 'Print only the equation verdict. Errors when --equation is missing.' },\n { name: '--verbose', valueStyle: 'none', description: 'With --equation, also print the linkage map.' },\n { name: '--bind-short', valueStyle: 'none', description: 'Bind a one-letter catalog name in --equation. Without it, those names are reported and not bound.' },\n { name: '--natural', valueStyle: 'none', description: 'Set ħ = c = 1 when a dimension difference is a power of those constants.' },\n { name: '--geometrized', valueStyle: 'none', description: 'With the natural-unit rules, also set G = 1.' },\n { name: '--communities', valueStyle: 'none', description: 'Also print the layout communities (Louvain, heuristic) of the largest component. A drawing aid, not physics.' },\n { name: '--cycles', valueStyle: 'none', description: 'Also print the derivation cycles: strongly connected components of the directed source→target quantity graph.' },\n { name: '--rank-hubs', valueStyle: 'none', description: 'Also rank quantities by betweenness centrality (normalised). Computed only when asked.' },\n JSON_FLAG,\n];\n\n/** How many hubs `--rank-hubs` prints in text; `--json` carries every quantity. */\nconst HUBS_SHOWN = 10;\n\n/** Flags that add a structure section to the text and --json forms, and mean nothing on a diagram. */\nconst STRUCTURE_FLAGS = ['communities', 'cycles', 'rank-hubs'] as const;\n\nconst HELP = `upt map [--source=catalog|canonical|both] [--format=text|mermaid|dot|svg]\n [--proposed [--anchor=k=v,...] [--max-orders=N]] [--out=PATH]\n [--equation \"TARGET = EXPR\" [--equation-only] [--verbose] [--bind-short]\n [--natural] [--geometrized]] [--around=QUANTITY [--depth=N]]\n [--relation=TYPE] [--evidence=TAG] [--route=FROM,TO [--all-routes\n [--max-routes=N]]] [--family=NAME] [--observable=NAME] [--stored | --run]\n Map how the equations LINK: connected components (clusters) of the\n graph by shared quantities, the anchored core, the link hubs, and\n the isolated tail.\n --source defaults to 'both' (catalog + canonical) — a pure\n connectivity question gets the honest, all-known-physics answer by\n default; --source=catalog shows the bridge-catalog view alone.\n --out=PATH writes whatever form was asked for (text, --json or a\n visual format) to PATH instead of stdout; an empty PATH exits 1.\n --format=mermaid|dot|svg emits the VISUAL map (quantities = nodes,\n equations = junctions colored by status, one subgraph per component).\n text (default) is the unchanged linkage printout. svg renders the dot\n layout via the optional @viz-js/viz peer (npm i @viz-js/viz; or pipe\n dot through \"dot -Tsvg\"). --proposed overlays the unadjudicated\n identity-consequence relations (gray dashed); --anchor and --max-orders\n tune the discovery funnel that derives them, as in \\`upt discover\\`.\n --out writes to a file (default stdout).\n --equation \"TARGET = EXPR\" injects YOUR OWN equation as a violet 'user'\n node, dimensionally checks it, compares with the canonical registry, and\n reports nearest equations by shared-quantity overlap (not a full edge\n dump). Multi-word names may use underscores or catalog hyphens\n (planck_length / planck-length). Unknown names get a \"did you mean?\",\n and a registered constant of the inferred dimension (sigma → sigma_sb).\n A catalog target whose dimension depends on an unresolved name exits 3\n and does not quote that placeholder, unless a canonical comparison agreed.\n A one-letter catalog name (a, r, …) is reported and not bound; --bind-short\n binds it. The alias T → temperature still binds.\n An all-constant right-hand side (the Planck length) is compared at the\n SI constant values when its target is a catalog quantity.\n With --equation, the default is the verdict only. --verbose prints the\n linkage map after it. --equation-only is the same verdict and errors\n when --equation is missing (with --json: no \"linkage\" field).\n A bare e in the formula is the elementary charge. E is energy.\n Euler's number is exp(x), for example exp(1). The name euler is refused.\n --natural sets ħ = c = 1 for a dimension difference that is a power of\n those constants; --geometrized also allows powers of G. The SI default\n still refuses rest_energy = mass.\n --relation=TYPE keeps only edges whose recorded Atlas relation is that\n type; --evidence=TAG keeps only edges whose evidence set, DERIVED from\n the catalog row at read time, contains that tag.\n ⚠ Filtering changes what a missing overlay means: unfiltered, an edge\n with no overlay is KEPT; filtered, it is DROPPED, because nothing shows\n it satisfies the filter. Those drops are counted and printed separately\n from the edges that simply did not match — an unaudited graph must not\n render as a complete answer.\n --around=QUANTITY [--depth=N] keeps only the edges within N\n shared-quantity hops of QUANTITY (default ${DEFAULT_DEPTH}: the edges that use it),\n in every output form, and prints how many of the source's edges it\n kept: the others are omitted from the view, not absent from the graph.\n --route=FROM,TO and --family=NAME map the ATLAS instead: models and\n the recorded bridges between them, not shared quantities. --route\n shows the route \\`upt path\\` reports, each bridge's relation,\n assumptions, regime, bound and derived evidence, the composition\n step by step (and where the table yields no composite claim), and\n the equations each model records. --family shows one family's\n models, its bridges, the bridges from other families that touch it,\n and its rejections; --relation/--evidence filter its bridges, and a\n bridge whose tag depends on witness results is counted as undecided,\n not as a mismatch. A model's equations are only those its\n canonicalRefs record; nothing is inferred from shared quantities.\n --route=FROM,TO --all-routes lists every simple route (no model\n visited twice), shortest first, each with its composition and route\n claim, and counts the claims; --max-routes=N (default ${atlasMap.DEFAULT_MAX_ROUTES}, at most\n ${atlasMap.MAX_ROUTES_CEILING}) bounds the list, and a list cut short says so and says up to\n which bridge count it is complete.\n --observable=NAME maps the bridges whose RECORDED preserves text, or\n declared bound translation, names that observable (a whole-word text\n match, nothing inferred), lists apart those recording it as NOT\n preserved, and counts the bridges that record nothing about it;\n --relation/--evidence filter it as they filter a family.\n --stored derives evidence from the committed witness results\n (${publishedUrl('data/atlas/witness-results.json')}; it ships in data/),\n labelled with the last commit that touched it; --run runs the shown\n bridges' in-process registered witnesses now (exit 3 if any is\n refuted). Either resolves a tag once its witnesses have results; a\n witness with no result leaves it undecided, and checked, refuted and\n unresolved are counted apart.\n Every atlas view states how many of the atlas's models and bridges it\n shows, in text, --json and --format=mermaid|dot|svg.\n --communities, --cycles and --rank-hubs each add one section to the\n text report (and a key to --json); they do not apply to a diagram.\n --communities lists the layout communities (Louvain, heuristic) of the\n largest component: where a drawing may place quantities together, never\n a physics claim. --cycles lists the derivation cycles (strongly\n connected components of the directed source→target quantity graph),\n where over-determination lives. --rank-hubs ranks quantities by\n betweenness centrality (normalised; computed only when asked).\n e.g. upt map --relation=derivation --source=both\n upt map --around=temperature --depth=2 --source=catalog\n upt map --route=model-pendulum,model-lc\n upt map --route=model-string,model-dalembert --all-routes --stored\n upt map --family=oscillators --evidence=formally-proved\n upt map --observable=frequency --run`;\n\n/**\n * The edges within `depth` shared-quantity hops of `quantity`: hop 1 is every\n * edge that has it as a source or target, and each further hop adds the edges\n * sharing a quantity with one already kept.\n * @internal\n */\nexport function neighbourhood(graph: readonly BridgeEdge[], quantity: string, depth: number): BridgeEdge[] {\n const names = (e: BridgeEdge): string[] => [...e.sources.map((q) => q.name), e.target.name];\n const reached = new Set([quantity]);\n const kept = new Set<BridgeEdge>();\n for (let hop = 0; hop < depth; hop++) {\n const frontier = graph.filter((e) => !kept.has(e) && names(e).some((n) => reached.has(n)));\n if (frontier.length === 0) break;\n for (const e of frontier) {\n kept.add(e);\n for (const n of names(e)) reached.add(n);\n }\n }\n return graph.filter((e) => kept.has(e));\n}\n\nconst RELATION_TYPES: readonly RelationType[] = [\n 'derivation',\n 'exact-equivalence',\n 'restriction',\n 'approximation',\n 'coarse-graining',\n 'analytic-continuation',\n 'structural-analogy',\n 'deformation-quantization',\n];\n\nconst EVIDENCE_TAGS: readonly EvidenceTag[] = [\n 'proposed',\n 'reviewed',\n 'dimension-checked',\n 'convention-checked',\n 'symbolically-checked',\n 'numerically-supported',\n 'formally-proved',\n 'formally-proved-property',\n 'formally-proved-cross-check',\n 'empirically-supported',\n 'contradicted',\n 'unresolved',\n];\n\n/** Last value of an `attached` flag, or undefined when the flag is absent. */\nfunction lastValue(flags: ParsedArgs['flags'], name: string): string | undefined {\n const v = flags.get(name);\n return v && v.length > 0 ? v[v.length - 1] : undefined;\n}\n\n/** Validate one filter value against its vocabulary. A bad value is a CliError\n * (exit 1); an unknown FLAG is the parser's UsageError (exit 2). */\nfunction parseFilter<T extends string>(\n raw: string | undefined,\n allowed: readonly T[],\n flag: string,\n): T | undefined {\n if (raw === undefined) return undefined;\n if (!allowed.includes(raw as T)) {\n throw new CliError(`upt: unknown ${flag}='${raw}' (expected: ${allowed.join(' | ')})`);\n }\n return raw as T;\n}\n\n// Convert the derived identity-consequence proposals into viz junctions\n// (gray-dashed, status 'proposed'). The library never imports proposed-bridges;\n// the CLI does the conversion, keeping the epistemic firewall intact.\n// Each junction keeps whether the identification it came from had magnitude evidence (it was\n// `promising`, not `promising-unchecked`), so the list below and `--json` can say so.\ntype ProposedJunction = VizJunction & { readonly magnitudeEvidence: boolean };\nfunction proposedJunctions(\n api: CommandCtx['api'],\n graph: readonly BridgeEdge[],\n flags: ParsedArgs['flags']\n): ProposedJunction[] {\n const opts = parseDiscoveryOpts(api, flags);\n const ranked = api.rankDiscoveries(graph, opts);\n return api.deriveProposedBridges(ranked).map((p) => ({\n id: p.id,\n label: p.id,\n status: 'proposed' as const,\n sources: (p.governing || []).map((g) => g.name),\n target: p.target.name,\n magnitudeEvidence: p.derivedFrom.identification.magnitudeEvidence,\n }));\n}\n\n// Build the catalog quantity name→dimension map for the chosen graph, then run\n// the (testable) library analysis: parse + dimensional validation + \"did you\n// mean?\" hints. The library owns the physics (constants' dimensions, inference);\n// the CLI only formats.\nasync function analyzeEquation(\n api: CommandCtx['api'],\n equation: string,\n graph: readonly BridgeEdge[],\n options?: { readonly bindShortNames?: boolean; readonly units?: Exclude<UnitMode, 'si'> },\n): Promise<{ user: EquationAnalysis; comparisons: CanonicalComparison[] }> {\n const catalogDims = new Map<string, import('../../dimensional/types.js').Dimension>();\n for (const e of graph) {\n for (const q of [...e.sources, e.target]) catalogDims.set(q.name, q.dim);\n }\n const user = await api.analyzeUserEquation(equation, catalogDims, options);\n // Dimensions cannot see a prefactor: compare with the canonical equation the\n // user's one restates, when the registry holds one (persona finding L2).\n const comparisons = user.parseError\n ? []\n : await api.compareUserEquation(equation, catalogDims, {\n bindShortNames: options?.bindShortNames,\n ...(options?.units === undefined ? {} : { constantOverrides: api.naturalConstantOverrides(options.units) }),\n });\n return { user, comparisons };\n}\n\nfunction unresolvedNames(user: EquationAnalysis): string[] {\n const placeholderNames = [\n ...(user.placeholders ?? []),\n ...(user.shortBindings ?? []).filter((b) => b.bound === false).map((b) => b.name),\n ];\n return [...new Set([...(user.hints ?? []).map((h) => h.name), ...placeholderNames])];\n}\n\n/** The exit `upt derive` uses for the same question. */\nfunction equationDetermination(\n user: EquationAnalysis,\n comparisons: readonly CanonicalComparison[],\n): Determination {\n const unresolved = unresolvedNames(user);\n const asked = user.targetDimension != null;\n return classifyDetermination({\n asked,\n agrees: comparisons.some((c) => c.kind === 'agrees'),\n checkFailed:\n (user.consistent === false && unresolved.length === 0) || canonicalCheckFailed(comparisons),\n notUnique: false,\n unresolved,\n });\n}\n\nfunction tainted(user: EquationAnalysis): boolean {\n return unresolvedNames(user).length > 0;\n}\n\n// Print the dimensional verdict, where the equation landed, and any hints.\n// `out` is ctx.out (text mode → stdout) or ctx.err (visual → stderr).\nfunction printEquationReport(\n api: CommandCtx['api'],\n model: VizModel,\n user: EquationAnalysis,\n out: (line?: string) => void,\n comparisons: readonly CanonicalComparison[] = [],\n): void {\n out('');\n const unresolved = unresolvedNames(user);\n const verdict = equationDetermination(user, comparisons);\n if (user.consistent === true) {\n out(` ✓ dimensionally consistent: ${api.format(user.rhsDimension!)}`);\n } else if (verdict.report === 'not-established') {\n const names = unresolved.map((n) => `'${n}'`).join(', ');\n out(\n ` · NOT ESTABLISHED: ${names} ${unresolved.length > 1 ? 'have' : 'has'} no catalog dimension, ` +\n 'so the right-hand side dimension was not established and is not reported.',\n );\n } else if (verdict.report === 'established' && unresolved.length > 0) {\n // A canonical agreement ran. The placeholder dimension is not that result.\n } else if (user.consistent === false) {\n out(\n ` ⚠ dimensional MISMATCH: RHS is ${api.format(user.rhsDimension!)} but the target is ${api.format(\n user.targetDimension!\n )}`\n );\n } else if (user.rhsDimension && (user.placeholders ?? []).length > 0) {\n const names = user.placeholders.map((n) => `'${n}'`).join(', ');\n out(\n ` · UNKNOWN: ${names} ${user.placeholders.length === 1 ? 'was' : 'were'} taken as dimensionless. ` +\n 'That is not the dimension of the formula, and the target is not a bound catalog name, so nothing was checked',\n );\n } else if (user.rhsDimension) {\n out(` · RHS dimension: ${api.format(user.rhsDimension)} (target not in the catalog, so no comparison)`);\n }\n for (const line of api.describeKnownRelation(comparisons, user.junction.target, [...user.junction.sources])) {\n out(` ${line}`);\n }\n for (const line of conventionLines(comparisons.map((c) => c.id))) out(` ${line}`);\n if (user.naturalNote) out(` ${user.naturalNote}`);\n const L = api.equationLanding(model, 'user-equation');\n if (L.isolated) {\n out(' ⚠ your equation is ISOLATED — it shares no quantity with this graph.');\n } else {\n out(\n ` ● your equation joins ${L.anchored ? 'the ANCHORED cluster' : 'a cluster'} of ${L.clusterSize} via {${L.sharedQuantities.join(', ')}}`\n );\n // W3/I3: do not dump ~100 edge ids — that made shared length/temperature look\n // like a physics claim. Summarise nearest equations by shared-quantity overlap.\n for (const line of api.formatConnectedSummary(model, L)) out(line);\n }\n for (const h of user.hints ?? []) {\n if (!h.suggestions.length) {\n out(` ⚠ '${h.name}' did not match a catalog quantity (run \\`upt canonical\\` for the vocabulary).`);\n } else if (h.byDimension) {\n out(` ⚠ '${h.name}' is unknown — by its inferred dimension, did you mean: ${h.suggestions.join(', ')}?`);\n } else {\n out(` ⚠ '${h.name}' did not match a catalog quantity — did you mean: ${h.suggestions.join(', ')}?`);\n }\n // Persona finding L5: `sigma` for the Stefan–Boltzmann constant `sigma_sb`.\n if ((h.constants ?? []).length > 0) {\n const list = h.constants!.join(', ');\n out(\n ` '${h.name}' has the inferred dimension of the registered constant${h.constants!.length > 1 ? 's' : ''} ${list}; ` +\n 'write that name to use its SI value',\n );\n }\n }\n // Persona finding W6: a one-letter name binds to whatever the catalog calls that letter.\n for (const b of user.shortBindings ?? []) {\n const users = model.junctions\n .filter((j) => j.id !== 'user-equation' && (j.target === b.quantity || j.sources.includes(b.quantity)))\n .map((j) => j.id)\n .sort();\n const shown = users.slice(0, 3).join(', ') + (users.length > 3 ? `, +${users.length - 3} more` : '');\n const used = users.length > 0 ? ` (used by ${shown})` : '';\n if (b.bound === false) {\n out(\n ` · '${b.name}' matches the catalog quantity ${b.quantity} ${api.format(b.dim)}${used}, a one-letter name, and is not bound. ` +\n 'Pass --bind-short to bind it, or write the full name you meant',\n );\n } else {\n out(\n ` · '${b.name}' is bound to the catalog quantity ${b.quantity} ${api.format(b.dim)}, a one-letter name` +\n `${used}; if you meant another quantity, write its full name`,\n );\n }\n }\n}\n\n/** The opt-in structure sections, each present only when its flag was given. */\ninterface StructureSections {\n readonly communities?: CommunityReport;\n readonly cycles?: readonly DerivationCycle[];\n readonly hubs?: readonly HubRank[];\n}\n\n/** Compute only the sections asked for; `rankHubs` is the betweenness pass the default path never runs. */\nasync function structureSections(\n api: CommandCtx['api'],\n graph: readonly BridgeEdge[],\n flags: ParsedArgs['flags'],\n): Promise<StructureSections> {\n return {\n ...(flags.has('communities') ? { communities: api.communitiesOf(graph) } : {}),\n ...(flags.has('cycles') ? { cycles: api.derivationCycles(graph) } : {}),\n ...(flags.has('rank-hubs') ? { hubs: await api.rankHubs(graph) } : {}),\n };\n}\n\n/** The text of the structure sections, in flag order; empty when none was asked for. A number goes through `formatQuantity`. */\nfunction structureLines(s: StructureSections, formatQuantity: (value: number, digits?: number) => string): string[] {\n const lines: string[] = [];\n if (s.communities !== undefined) {\n const c = s.communities;\n lines.push(` ${c.method} of the largest component (${c.componentSize} quantities) — a drawing aid, not physics:`);\n if (c.communities.length === 0) lines.push(' none (the graph has no component)');\n c.communities.forEach((com, i) => lines.push(` ${i + 1}. (${com.size}) ${com.quantities.join(', ')}`));\n lines.push('');\n }\n if (s.cycles !== undefined) {\n const head = s.cycles.length === 0 ? 'none — the quantity graph is acyclic' : String(s.cycles.length);\n lines.push(` derivation cycles (strongly connected components of source→target, where over-determination lives): ${head}`);\n for (const cyc of s.cycles) lines.push(` {${cyc.quantities.join(', ')}} closed by ${cyc.edges.join(', ')}`);\n lines.push('');\n }\n if (s.hubs !== undefined) {\n const shown = Math.min(HUBS_SHOWN, s.hubs.length);\n lines.push(\n ` hubs by betweenness centrality (normalised; top ${shown} of ${s.hubs.length} quantities; a cut quantity of the drawing, not a central law):`,\n );\n for (const h of s.hubs.slice(0, shown)) lines.push(` ${h.quantity.padEnd(40)} ${formatQuantity(h.betweenness, 3)} (degree ${h.degree})`);\n lines.push('');\n }\n // Sections are separated by one blank line; the closing line of the report brings its own.\n while (lines.length > 0 && lines[lines.length - 1] === '') lines.pop();\n return lines;\n}\n\n/** Flags that shape the equation graph, and so mean nothing on an atlas view. */\nconst GRAPH_ONLY_FLAGS = ['source', 'around', 'depth', 'equation', 'equation-only', 'proposed', 'max-orders', 'anchor', ...STRUCTURE_FLAGS] as const;\n\n/** Flags that only an atlas view reads. */\nconst ATLAS_ONLY_FLAGS = ['all-routes', 'max-routes', 'stored', 'run'] as const;\n\nasync function runAtlasView(\n ctx: CommandCtx,\n route: string | undefined,\n family: string | undefined,\n observable: string | undefined,\n): Promise<number> {\n const { args, api, err, write } = ctx;\n const chosen = [route !== undefined, family !== undefined, observable !== undefined].filter(Boolean).length;\n if (chosen > 1) throw new CliError('upt map: pick one atlas view: --route, --family or --observable');\n const view = route !== undefined ? '--route' : family !== undefined ? '--family' : '--observable';\n const stray = GRAPH_ONLY_FLAGS.filter((f) => args.flags.has(f));\n if (stray.length > 0) {\n throw new CliError(\n `upt map: ${view} maps the atlas, not the equation graph; ${stray.map((f) => `--${f}`).join(', ')} do${stray.length === 1 ? 'es' : ''} not apply`,\n );\n }\n const relation = parseFilter(lastValue(args.flags, 'relation'), RELATION_TYPES, '--relation');\n const evidence = parseFilter(lastValue(args.flags, 'evidence'), EVIDENCE_TAGS, '--evidence');\n if (route !== undefined && (relation !== undefined || evidence !== undefined)) {\n throw new CliError('upt map: a route is composed whole, so --relation/--evidence do not filter it; filter a family view instead (--family=NAME)');\n }\n const allRoutes = args.flags.has('all-routes');\n if (allRoutes && route === undefined) throw new CliError('upt map: --all-routes needs --route=FROM,TO');\n const maxRaw = lastValue(args.flags, 'max-routes');\n if (maxRaw !== undefined && !allRoutes) throw new CliError('upt map: --max-routes needs --all-routes');\n // The grammar first (`0x10` is usage, exit 2); the 1..ceiling range after (exit 1).\n const maxRoutes = maxRaw === undefined ? atlasMap.DEFAULT_MAX_ROUTES : integerFlag('map', '--max-routes', maxRaw);\n if (maxRoutes < 1 || maxRoutes > atlasMap.MAX_ROUTES_CEILING) {\n throw new CliError(`upt map: --max-routes=${maxRaw} must be an integer from 1 to ${atlasMap.MAX_ROUTES_CEILING}`);\n }\n if (args.flags.has('stored') && args.flags.has('run')) {\n throw new CliError('upt map: pick one witness-results source: --stored (the committed artifact) or --run (run now)');\n }\n const fmt = lastValue(args.flags, 'format') ?? 'text';\n const isJson = args.flags.has('json');\n if (isJson && fmt !== 'text') throw new UsageError('upt: pick one output form: --json or --format');\n if (!['text', 'mermaid', 'dot', 'svg'].includes(fmt)) {\n throw new CliError(`upt: unknown --format='${fmt}' (expected: text | mermaid | dot | svg)`);\n }\n\n const filter = {\n ...(relation !== undefined ? { relation } : {}),\n ...(evidence !== undefined ? { evidence } : {}),\n };\n const endpoints = route === undefined ? null : atlasMap.parseRoute(route);\n const build = (results: atlasMap.WitnessResults | null): atlasMap.AtlasView =>\n endpoints !== null\n ? allRoutes\n ? atlasMap.buildRoutesView(api, ...endpoints, maxRoutes, results)\n : atlasMap.buildRouteView(api, ...endpoints, results)\n : family !== undefined\n ? atlasMap.buildFamilyView(api, family, filter, results)\n : atlasMap.buildObservableView(api, observable!, filter, results);\n let results: atlasMap.WitnessResults | null = null;\n if (args.flags.has('stored')) results = atlasMap.loadStoredResults();\n else if (args.flags.has('run')) {\n // Unfiltered first: a filter's verdict depends on the results, so every candidate bridge is run.\n const candidates =\n endpoints === null\n ? atlasMap.bridgeIdsOf(family !== undefined ? atlasMap.buildFamilyView(api, family, {}) : atlasMap.buildObservableView(api, observable!, {}))\n : atlasMap.bridgeIdsOf(build(null));\n results = await atlasMap.runResults(api, candidates);\n }\n const v = build(results);\n const exitCode = results?.mode === 'run' && results.rows.some((r) => r.status === 'refuted') ? EXIT_CHECK_FAILED : 0;\n\n if (isJson) {\n emitJson({ command: 'map', source: 'atlas', result: v }, write);\n return exitCode;\n }\n if (fmt === 'text') {\n const lines =\n v.view === 'route'\n ? atlasMap.routeText(v)\n : v.view === 'routes'\n ? atlasMap.routesText(v)\n : v.view === 'family'\n ? atlasMap.familyText(v)\n : atlasMap.observableText(v);\n for (const line of lines) ctx.out(line);\n return exitCode;\n }\n let src: string;\n if (fmt === 'svg') {\n try {\n src = await api.renderDotToSvg(atlasMap.toDot(v));\n } catch (e) {\n throw new CliError(e && (e as Error).message ? (e as Error).message : String(e));\n }\n } else {\n src = fmt === 'mermaid' ? atlasMap.toMermaid(v) : atlasMap.toDot(v);\n }\n const path = lastValue(args.flags, 'out');\n if (path !== undefined) {\n if (!path) throw new CliError('upt: --out= requires a non-empty PATH');\n try {\n writeFileSync(path, src);\n } catch (e) {\n throw new CliError(`upt map: ${(e as Error).message}`);\n }\n err(`upt: wrote ${fmt} to ${path}`);\n } else {\n write(src);\n }\n err(`upt: ${atlasMap.viewLegend(v)}`);\n return exitCode;\n}\n\n/**\n * `--out=PATH` holds for every output form. A visual form writes its diagram\n * source (handled by the branch that renders it); the text report and the\n * `--json` envelope are captured here and written whole, so stdout stays\n * empty and the file holds exactly what stdout would have carried. An empty\n * PATH exits 1 in every form.\n */\nasync function run(ctx: CommandCtx): Promise<number> {\n const path = lastValue(ctx.args.flags, 'out');\n const fmt = lastValue(ctx.args.flags, 'format') ?? 'text';\n if (path === undefined || fmt !== 'text') return runReport(ctx);\n if (!path) throw new CliError('upt: --out= requires a non-empty PATH');\n let captured = '';\n const code = await runReport({\n ...ctx,\n out: (line?: string) => {\n captured += (line ?? '') + '\\n';\n },\n write: (s: string) => {\n captured += s;\n },\n });\n try {\n writeFileSync(path, captured);\n } catch (e) {\n throw new CliError(`upt map: ${(e as Error).message}`);\n }\n ctx.err(`upt: wrote ${ctx.args.flags.has('json') ? 'json' : 'text'} to ${path}`);\n return code;\n}\n\nasync function runReport(ctx: CommandCtx): Promise<number> {\n const { args, api, out, err, write } = ctx;\n const route = lastValue(args.flags, 'route');\n const family = lastValue(args.flags, 'family');\n const observable = lastValue(args.flags, 'observable');\n if (route !== undefined || family !== undefined || observable !== undefined) return runAtlasView(ctx, route, family, observable);\n const atlasOnly = ATLAS_ONLY_FLAGS.filter((f) => args.flags.has(f));\n if (atlasOnly.length > 0) {\n throw new CliError(\n `upt map: ${atlasOnly.map((f) => `--${f}`).join(', ')} appl${atlasOnly.length === 1 ? 'ies' : 'y'} to an atlas view ` +\n '(--route, --family or --observable), not to the equation graph',\n );\n }\n // map asks a pure connectivity question, so it defaults to --source=both\n // (catalog + canonical) rather than graphs.ts's catalog fallback used by\n // the other --source commands (e.g. discover, which keeps catalog).\n const sourceFlags = args.flags.has('source') ? args.flags : new Map(args.flags).set('source', ['both']);\n const { graph: wholeGraph, label, source } = resolveGraph(api, sourceFlags);\n\n const around = lastValue(args.flags, 'around');\n const depthRaw = lastValue(args.flags, 'depth');\n if (depthRaw !== undefined && around === undefined) throw new CliError('upt map: --depth needs --around');\n let focus: { around: string; depth: number; kept: number; of: number } | null = null;\n let fullGraph = wholeGraph;\n if (around !== undefined) {\n // The grammar first (`1e1` is usage, exit 2); the 1..MAX_DEPTH range after (exit 1).\n const depth = depthRaw === undefined ? DEFAULT_DEPTH : integerFlag('map', '--depth', depthRaw);\n if (depth < 1 || depth > MAX_DEPTH) throw new CliError(`upt map: --depth=${depthRaw} must be an integer from 1 to ${MAX_DEPTH}`);\n const known = new Set(wholeGraph.flatMap((e) => [...e.sources.map((q) => q.name), e.target.name]));\n const name = api.resolveQuantityName(around, known);\n if (name === null) {\n const near = api.suggestQuantities(around, known);\n throw new CliError(\n `upt map: '${around}' is not a quantity of the ${label} graph` + (near.length > 0 ? `; did you mean: ${near.join(', ')}?` : ''),\n );\n }\n fullGraph = neighbourhood(wholeGraph, name, depth);\n focus = { around: name, depth, kept: fullGraph.length, of: wholeGraph.length };\n }\n const focusLine =\n focus === null\n ? null\n : `focused: ${focus.kept} of ${focus.of} edges within ${focus.depth} hop(s) of '${focus.around}' [${label}]; ` +\n 'the rest are omitted from this view, not absent from the graph';\n // The two overlay filters. Parsed BEFORE anything else is computed so a bad\n // value costs nothing and always exits 1.\n const relation = parseFilter(lastValue(args.flags, 'relation'), RELATION_TYPES, '--relation');\n const evidence = parseFilter(lastValue(args.flags, 'evidence'), EVIDENCE_TAGS, '--evidence');\n const filterOpts = withCatalogEvidence({\n ...(relation !== undefined ? { relation } : {}),\n ...(evidence !== undefined ? { evidence } : {}),\n });\n // The TEXT and JSON paths filter the edge list here, because `linkageMap`\n // consumes edges. The VISUAL path hands `buildVizModel` the FULL graph with\n // the same options, so the model also judges the --proposed / --equation\n // overlay junctions, which are not edges and which `filterEdges` cannot see.\n // One predicate, two callers: they cannot disagree about what a filter\n // selects, only about how much they were asked to count.\n const { kept: graph, stats: edgeStats } = api.filterEdges(fullGraph, filterOpts);\n // Audit I3: what \"anchored\" means here, and the discovery ground truth when --proposed ran the funnel.\n const anchor: AnchorScope = {\n core: coreAnchor(graph),\n ...(args.flags.has('proposed') ? { groundTruth: groundTruthAnchor(api, parseDiscoveryOpts(api, args.flags)) } : {}),\n };\n const edgeLegend = api.formatFilterLegend(edgeStats);\n\n const fmtValues = args.flags.get('format');\n const fmt = fmtValues && fmtValues.length > 0 ? fmtValues[fmtValues.length - 1] : 'text';\n const isJson = args.flags.has('json');\n\n if (isJson && fmt !== 'text') {\n throw new UsageError('upt: pick one output form: --json or --format');\n }\n const structureAsked = STRUCTURE_FLAGS.filter((f) => args.flags.has(f));\n if (structureAsked.length > 0 && fmt !== 'text') {\n const named = structureAsked.map((f) => `--${f}`).join(', ');\n throw new UsageError(\n `upt map: ${named} print${structureAsked.length === 1 ? 's' : ''} text or --json; ${structureAsked.length === 1 ? 'it does' : 'they do'} not apply to --format=${fmt}`,\n );\n }\n // Computed only when asked, over the same filtered edge list the linkage map reads.\n const structure = await structureSections(api, graph, args.flags);\n\n // --equation injects a user-supplied \"TARGET = EXPR\" as a 'user' junction.\n let user: EquationAnalysis | null = null;\n let comparisons: CanonicalComparison[] = [];\n const equationValues = args.flags.get('equation');\n const equation = equationValues && equationValues.length > 0 ? equationValues[equationValues.length - 1] : null;\n // Persona finding L7: the verdict alone, without the linkage map after it.\n const equationOnly = args.flags.has('equation-only');\n if (equationOnly && equation == null) throw new UsageError('upt map: --equation-only needs --equation \"TARGET = EXPR\"');\n if (equationOnly && fmt !== 'text') {\n throw new UsageError(`upt map: --equation-only prints the verdict as text or --json; it does not apply to --format=${fmt}`);\n }\n if (equation != null) {\n if (!equation.trim()) {\n throw new UsageError('upt: --equation requires \"TARGET = EXPR\"');\n }\n try {\n const units: Exclude<UnitMode, 'si'> | undefined = args.flags.has('geometrized')\n ? 'geometrized'\n : args.flags.has('natural')\n ? 'natural'\n : undefined;\n if (args.flags.has('geometrized') && args.flags.has('natural')) {\n throw new UsageError('upt map: pick one unit mode: --natural (ħ = c = 1) or --geometrized (ħ = c = G = 1)');\n }\n ({ user, comparisons } = await analyzeEquation(api, equation, graph, {\n bindShortNames: args.flags.has('bind-short'),\n ...(units === undefined ? {} : { units }),\n })); // throws UserEquationError on malformed structure\n } catch (e) {\n throw new UsageError('upt: ' + (e && (e as Error).message ? (e as Error).message : String(e)));\n }\n if (user.parseError) {\n throw new UsageError('upt: ' + user.parseError); // dimensionally malformed RHS\n }\n }\n\n // The same classification `upt derive` uses. A canonical agreement stays 0.\n // A catalog target that was not established exits 3. An unbound target stays 0.\n const exitCode = user === null ? 0 : equationDetermination(user, comparisons).exit;\n\n // Ranked from the UNFILTERED graph: the proposal set is a property of the\n // whole catalog, and the model then judges each overlay junction under the\n // same filter as every other junction. Computed once for every output form.\n const proposed: ProposedJunction[] | null = args.flags.has('proposed') ? proposedJunctions(api, wholeGraph, args.flags) : null;\n // The drawing reads a plain junction; the magnitude-evidence flag is the list's and `--json`'s.\n const drawn: VizJunction[] = (proposed ?? []).map((p) => ({ id: p.id, label: p.label, status: p.status, sources: p.sources, target: p.target }));\n const overlay = (extra: VizJunction[]): VizJunction[] => [...drawn, ...extra];\n\n if (isJson) {\n const linkage = api.linkageMap(graph);\n let landing: ReturnType<typeof api.equationLanding> | undefined;\n let userEquation: Record<string, unknown> | undefined;\n if (user) {\n const model = api.buildVizModel(fullGraph, {\n title: `UPT physics map — ${label}`,\n extraJunctions: overlay([user.junction]),\n ...filterOpts,\n });\n landing = api.equationLanding(model, 'user-equation');\n userEquation = {\n equation: user.junction.label,\n consistent: tainted(user) ? null : user.consistent,\n rhsDimension: tainted(user) ? null : user.rhsDimension,\n targetDimension: user.targetDimension,\n hints: user.hints,\n shortBindings: user.shortBindings,\n ...(user.placeholders.length === 0 ? {} : { placeholders: user.placeholders }),\n canonicalComparisons: comparisons,\n catalogEdges: api.matchingCatalogEdges(user.junction.target, [...user.junction.sources]),\n };\n }\n emitJson(\n {\n command: 'map',\n source,\n anchor,\n result: {\n ...(equation != null && (equationOnly || !args.flags.has('verbose')) ? {} : { linkage }),\n ...(proposed === null\n ? {}\n : { proposed: proposed.map((p) => ({ id: p.id, target: p.target, sources: p.sources, magnitudeEvidence: p.magnitudeEvidence })) }),\n ...(edgeLegend !== null ? { filter: edgeStats } : {}),\n ...(focus !== null ? { focus } : {}),\n ...(user ? { landing, userEquation } : {}),\n ...structure,\n },\n },\n write\n );\n return exitCode;\n }\n\n if (fmt === 'mermaid' || fmt === 'dot' || fmt === 'svg') {\n const extraJunctions = overlay(user ? [user.junction] : []);\n const model = api.buildVizModel(fullGraph, {\n title: `UPT physics map — ${label}`,\n extraJunctions,\n ...filterOpts,\n });\n // svg is the dot layout rendered by the optional @viz-js/viz peer.\n let src: string;\n if (fmt === 'svg') {\n try {\n src = await api.renderDotToSvg(model.toDot());\n } catch (e) {\n throw new CliError(e && (e as Error).message ? (e as Error).message : String(e));\n }\n } else {\n src = fmt === 'mermaid' ? model.toMermaid() : model.toDot();\n }\n const outValues = args.flags.get('out');\n if (outValues && outValues.length > 0) {\n const path = outValues[outValues.length - 1];\n if (!path) {\n throw new CliError('upt: --out= requires a non-empty PATH');\n }\n try {\n writeFileSync(path, src);\n } catch (e) {\n throw new CliError(`upt map: ${(e as Error).message}`);\n }\n err(`upt: wrote ${fmt} (${model.junctions.length} junctions, ${model.clusters.length} clusters) to ${path}`);\n } else {\n write(src);\n }\n // Legend and landing report go to stderr so stdout/--out stays pure diagram\n // source. The diagram itself also carries the legend (see `buildVizModel`).\n if (focusLine !== null) err(`upt: ${focusLine}`);\n if (model.filterLegend !== null) err(`upt: ${model.filterLegend}`);\n if (user) printEquationReport(api, model, user, err, comparisons);\n return exitCode;\n }\n if (fmt !== 'text') {\n throw new CliError(`upt: unknown --format='${fmt}' (expected: text | mermaid | dot | svg)`);\n }\n\n // --equation: the verdict on the user's equation is the answer asked for, so it\n // comes BEFORE the linkage map, not after ~45 lines of it (persona finding N4).\n if (user) {\n const model = api.buildVizModel(fullGraph, {\n title: `UPT physics map — ${label}`,\n extraJunctions: overlay([user.junction]),\n ...filterOpts,\n });\n out(`\\nYour equation: ${user.junction.label}`);\n printEquationReport(api, model, user, out, comparisons);\n if (equationOnly || !args.flags.has('verbose')) return exitCode;\n }\n\n const m = api.linkageMap(graph);\n const mix = (s: Readonly<Record<string, number>>) =>\n Object.entries(s)\n .map(([k, v]) => `${v} ${k}`)\n .join(', ');\n out(`\\nLinkage map — how the equations connect via shared quantities [source: ${label}]`);\n out(`(${m.componentCount} components over ${graph.length} edges; ${m.compositions} compose into chains)`);\n out(` ${coreLine(anchor.core!)}`);\n if (anchor.groundTruth) out(` proposals: ${groundTruthLine(anchor.groundTruth)}`);\n if (proposed !== null) {\n // The overlay the visual forms draw, listed here: an unadjudicated identity consequence is a\n // proposal, never a catalog edge. Each names its target and the quantities it would relate.\n out(` proposed relations (${proposed.length}, unadjudicated identity consequences; not catalog edges):`);\n for (const p of proposed) {\n // No free input: every governing quantity of the derived relation is a registered constant.\n const sources = p.sources.length === 0 ? '{} (no sources: every input is a registered constant)' : `{${p.sources.join(', ')}}`;\n const evidence = p.magnitudeEvidence ? '' : ' (from an identification with no magnitude evidence)';\n out(` ${p.id}: ${p.target} ← ${sources}${evidence}`);\n }\n if (proposed.length === 0) out(' (none at this anchor and --max-orders)');\n }\n out('');\n if (focusLine !== null) out(` ${focusLine}`);\n if (edgeLegend !== null) out(` ${edgeLegend}`);\n for (const c of m.clusters.filter((x) => x.size > 1)) {\n out(` ● cluster of ${c.size}${c.anchored ? ' [ANCHORED to known physics]' : ''}`);\n out(` edges: ${c.edges.join(', ')}`);\n out(` status: ${mix(c.statusMix)}`);\n out(` link hubs: ${c.hubs.join(', ')}\\n`);\n }\n out(` ○ isolated (${m.isolated.length}) — share no quantity with any other edge:`);\n out(` ${m.isolated.length === 0 ? 'none' : m.isolated.join(', ')}`);\n const structureText = structureLines(structure, api.formatQuantity);\n if (structureText.length > 0) {\n out('');\n for (const line of structureText) out(line);\n }\n out('\\n (a structural map — shared-quantity connectivity, NOT a credibility signal)');\n return exitCode;\n}\n\nexport const command: Command = {\n name: 'map',\n aliases: ['linkage'],\n flags: FLAGS,\n help: commandHelp(HELP, FLAGS),\n summary: 'Show how equations link, or where your own equation lands on that graph.',\n example: 'upt map --equation \"period = 2*pi*sqrt(length/gravity)\"',\n group: 'explore',\n run,\n};\n\nregisterCommand(command);\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"metric.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/metric.ts"],"names":[],"mappings":"AAUA,OAAO,EAAmB,KAAK,OAAO,EAAmB,MAAM,eAAe,CAAC;AA4L/E,eAAO,MAAM,OAAO,EAAE,OASrB,CAAC"}
1
+ {"version":3,"file":"metric.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/metric.ts"],"names":[],"mappings":"AAUA,OAAO,EAAmB,KAAK,OAAO,EAAmB,MAAM,eAAe,CAAC;AAgM/E,eAAO,MAAM,OAAO,EAAE,OAUrB,CAAC"}
@@ -37,16 +37,16 @@ function isMetric(s) {
37
37
  }
38
38
  /**
39
39
  * The metric library refuses a bad value (a non-positive mass, a point inside
40
- * the horizon, an unknown parameter, a start the integrator cannot take, a
41
- * parameter in the wrong unit) with `MetricMassError`, a `UnitError`, or a
42
- * plain `Error`. Each is a bad value, exit 1. Any other class (a TypeError, a
43
- * RangeError) is a defect and is not converted.
40
+ * the horizon, an unknown or repeated parameter, a start the integrator cannot
41
+ * take, a parameter in the wrong unit) with `MetricMassError`,
42
+ * `MetricValueError` or a `UnitError`. Each is a bad value, exit 1. Any other
43
+ * class (a plain `Error`, a TypeError, a RangeError) is a defect and is not
44
+ * converted.
44
45
  */
45
46
  function metricValueError(api, e) {
46
- if (e instanceof api.MetricMassError || e instanceof api.UnitError)
47
- return new CliError(`upt metric: ${e.message}`);
48
- if (e instanceof Error && e.constructor === Error)
47
+ if (e instanceof api.MetricMassError || e instanceof api.MetricValueError || e instanceof api.UnitError) {
49
48
  return new CliError(`upt metric: ${e.message}`);
49
+ }
50
50
  return e;
51
51
  }
52
52
  async function run(ctx) {
@@ -82,12 +82,14 @@ async function run(ctx) {
82
82
  const a = report.parameters.a ?? 0;
83
83
  const r = report.parameters.r;
84
84
  const theta = report.parameters.theta ?? Math.PI / 2;
85
+ // Reachable: `curvatureReport` refuses M ≤ 0, but G=0 (or a c that overflows) makes
86
+ // M_geom = G M / c² zero with M > 0, and a supplied r passes its own check.
85
87
  if (Mgeom === undefined || !(Mgeom > 0))
86
- throw new CliError('Kerr geodesic needs a positive mass');
88
+ throw new CliError('upt metric: Kerr geodesic needs a positive mass');
87
89
  const rOverM = (r ?? 10 * Mgeom) / Mgeom;
88
90
  const aOverM = a / Mgeom;
89
91
  if (!(Math.abs(aOverM) <= 1))
90
- throw new CliError('Kerr geodesic wants |a| ≤ GM/c²');
92
+ throw new CliError('upt metric: Kerr geodesic wants |a| ≤ GM/c²');
91
93
  const equatorial = Math.abs(theta - Math.PI / 2) < 1e-6;
92
94
  if (a === 0) {
93
95
  // At a = 0 the Kerr metric is Schwarzschild. The Boyer–Lindquist integrator refuses the
@@ -170,6 +172,7 @@ async function run(ctx) {
170
172
  export const command = {
171
173
  name: 'metric',
172
174
  aliases: ['curvature'],
175
+ positionals: { max: Infinity },
173
176
  flags: FLAGS,
174
177
  help: commandHelp(HELP, FLAGS),
175
178
  summary: 'Print Christoffel symbols and curvature scalars for one exact metric.',
@@ -1 +1 @@
1
- {"version":3,"file":"metric.js","sourceRoot":"","sources":["../../../src/cli/commands/metric.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,eAAe,EAAiC,MAAM,eAAe,CAAC;AAC/E,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAGlD,MAAM,KAAK,GAAe;IACxB,SAAS;IACT;QACE,IAAI,EAAE,YAAY;QAClB,UAAU,EAAE,MAAM;QAClB,WAAW,EAAE,oFAAoF;KAClG;CACF,CAAC;AAEF,MAAM,KAAK,GAAG,CAAC,WAAW,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,CAAU,CAAC;AAEtE,MAAM,IAAI,GAAG;;;;;;;;;;;;;;;;;;;wDAmB2C,CAAC;AAEzD,SAAS,QAAQ,CAAC,CAAqB;IACrC,OAAQ,KAA2B,CAAC,QAAQ,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;AACxD,CAAC;AAED;;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short Schwarzschild circular orbit, or a Kerr\n * geodesic. θ = π/2 is equatorial and circular. Any other θ is an inclined\n * spherical orbit with that polar turning point.\n *\n * @module cli/commands/metric\n */\nimport type { FlagSpec } from '../args.js';\nimport { registerCommand, type Command, type CommandCtx } from '../command.js';\nimport { commandHelp, JSON_FLAG } from '../flag-help.js';\nimport { emitJson } from '../output.js';\nimport { CliError, UsageError } from '../errors.js';\nimport { splitAssignments } from '../bindings.js';\nimport type { MetricId } from '../../cli-api.js';\n\nconst FLAGS: FlagSpec[] = [\n JSON_FLAG,\n {\n name: '--geodesic',\n valueStyle: 'none',\n description: 'Integrate a short Schwarzschild circular orbit, or a Kerr geodesic at the given θ.',\n },\n];\n\nconst NAMES = ['minkowski', 'schwarzschild', 'flrw', 'kerr'] as const;\n\nconst HELP = `upt metric <minkowski|schwarzschild|flrw|kerr> [key=value ...] [--geodesic] [--json]\n Christoffel symbols, the Ricci tensor, the Ricci scalar and the\n Kretschmann scalar of one exact metric. Alias: upt curvature.\n Signature of the line element is (-,+,+,+), the same mostly-plus\n signature as the canonical Einstein-equation metric node.\n Schwarzschild Kretschmann is checked against 48 G² M² / (c⁴ r⁶).\n FLRW prints the Friedmann equation including the curvature term\n −k c²/a² and Λ. Kerr Kretschmann uses the Boyer–Lindquist closed form.\n --geodesic integrates a short Schwarzschild circular orbit, or a Kerr\n geodesic (equatorial and circular at θ = π/2; inclined, with that\n polar turning point, at any other θ). Kerr's a is a length in metres;\n the report prints a/M = a/(GM/c²). A Ricci scalar that has a closed\n form is that form; a vacuum finite-difference residual is not listed\n as Ricci. A parameter is a number, a unit (M=1Msun, r=1km) or a\n constant expression (theta=pi/2). A bare number is already in the\n parameter's SI unit; a dimensioned quantity must match it.\n \\`upt help metric\\` describes every flag.\n e.g. upt metric schwarzschild M=1Msun r=1e8 theta=pi/2\n upt metric flrw k=1 t=2\n upt curvature kerr a=1000 r=1e8 theta=1.2`;\n\nfunction isMetric(s: string | undefined): s is MetricId {\n return (NAMES as readonly string[]).includes(s ?? '');\n}\n\n/**\n * The metric library refuses a bad value (a non-positive mass, a point inside\n * the horizon, an unknown parameter, a start the integrator cannot take, a\n * parameter in the wrong unit) with `MetricMassError`, a `UnitError`, or a\n * plain `Error`. Each is a bad value, exit 1. Any other class (a TypeError, a\n * RangeError) is a defect and is not converted.\n */\nfunction metricValueError(api: CommandCtx['api'], e: unknown): unknown {\n if (e instanceof api.MetricMassError || e instanceof api.UnitError) return new CliError(`upt metric: ${e.message}`);\n if (e instanceof Error && e.constructor === Error) return new CliError(`upt metric: ${e.message}`);\n return e;\n}\n\nasync function run(ctx: CommandCtx): Promise<number> {\n const { args, api, out } = ctx;\n const name = args.positionals[0];\n if (!isMetric(name)) {\n throw new UsageError(\n `upt metric needs one of ${NAMES.join(', ')}. See \\`upt help metric\\`.`,\n );\n }\n const pairs = args.positionals.slice(1);\n // A token with no `=` is usage (exit 2); a parameter given twice is refused (exit 1).\n splitAssignments('metric', pairs, 'key=value');\n let report;\n try {\n report = api.curvatureReport(name, pairs);\n } catch (e) {\n throw metricValueError(api, e);\n }\n let geodesic:\n | {\n readonly kind: 'circular' | 'inclined';\n readonly r0: number;\n readonly rEnd: number;\n readonly theta0?: number;\n readonly thetaEnd?: number;\n readonly phiAdvance: number;\n readonly steps: number;\n readonly E0?: number;\n readonly EEnd?: number;\n readonly L0?: number;\n readonly LEnd?: number;\n readonly Q0?: number;\n readonly QEnd?: number;\n readonly norm0?: number;\n readonly normEnd?: number;\n readonly note?: string;\n }\n | undefined;\n if (args.flags.has('geodesic')) {\n try {\n if (name === 'schwarzschild') {\n const M = report.parameters.M;\n const r = report.parameters.r;\n const orbit = api.schwarzschildCircularOrbit({\n ...(M === undefined ? {} : { M }),\n ...(r === undefined ? {} : { r }),\n });\n geodesic = { kind: 'circular', ...orbit };\n } else if (name === 'kerr') {\n const Mgeom = report.parameters.M_geom_m;\n const a = report.parameters.a ?? 0;\n const r = report.parameters.r;\n const theta = report.parameters.theta ?? Math.PI / 2;\n if (Mgeom === undefined || !(Mgeom > 0)) throw new CliError('Kerr geodesic needs a positive mass');\n const rOverM = (r ?? 10 * Mgeom) / Mgeom;\n const aOverM = a / Mgeom;\n if (!(Math.abs(aOverM) <= 1)) throw new CliError('Kerr geodesic wants |a| ≤ GM/c²');\n const equatorial = Math.abs(theta - Math.PI / 2) < 1e-6;\n if (a === 0) {\n // At a = 0 the Kerr metric is Schwarzschild. The Boyer–Lindquist integrator refuses the\n // circular start there (\"radial potential is negative at the start\"): the two terms of\n // its radial potential cancel to below its tolerance at a = 0, and only at a = 0. The\n // equatorial circular orbit is the Schwarzschild one and is integrated as that, so the\n // default parameters (a = 0) run. An inclined start has no Schwarzschild routine here.\n if (!equatorial) {\n throw new CliError(\n 'upt metric: at a = 0 an inclined Kerr orbit is a tilted Schwarzschild circular orbit, and this integrator needs a ≠ 0 for an inclined start; give a, or theta=pi/2',\n );\n }\n const M = report.parameters.M;\n geodesic = {\n kind: 'circular' as const,\n note: 'a = 0: the Kerr metric is Schwarzschild; the equatorial circular orbit is integrated by the Schwarzschild routine',\n ...api.schwarzschildCircularOrbit({ ...(M === undefined ? {} : { M }), ...(r === undefined ? {} : { r }) }),\n };\n } else {\n const shared = { M: Mgeom, aOverM, rOverM, fraction: 0.005, steps: 40 };\n geodesic =\n equatorial\n ? { kind: 'circular' as const, ...api.kerrEquatorialCircular(shared) }\n : {\n kind: 'inclined' as const,\n ...api.kerrGeodesic({\n ...shared,\n theta,\n ...api.kerrTurningPointOrbit({ M: Mgeom, aOverM, rOverM, theta }),\n mu2: 1,\n }),\n };\n }\n } else {\n throw new UsageError('upt metric: --geodesic is for schwarzschild or kerr.');\n }\n } catch (e) {\n if (e instanceof UsageError || e instanceof CliError) throw e;\n throw metricValueError(api, e);\n }\n }\n if (args.flags.has('json')) {\n emitJson({ command: 'metric', result: { ...report, ...(geodesic === undefined ? {} : { geodesic }) } }, ctx.write);\n return 0;\n }\n out(`\\n${report.metric} signature ${report.signature}`);\n out(` ${report.signatureNote}`);\n out(` coordinates ${report.coordinates}`);\n out(' parameters: ' + Object.entries(report.parameters).map(([k, v]) => `${k}=${v}`).join(' '));\n out(' point: ' + Object.entries(report.point).map(([k, v]) => `${k}=${v}`).join(' '));\n for (const note of report.notes) out(` ${note}`);\n out(' Christoffel (nonzero):');\n if (report.christoffel.length === 0) out(' (none)');\n for (const c of report.christoffel) out(` ${c.index} = ${c.value}`);\n out(' Ricci (nonzero):');\n if (report.ricci.length === 0) out(' (none)');\n for (const c of report.ricci) out(` ${c.index} = ${c.value}`);\n out(` Ricci scalar R = ${report.ricciScalar}`);\n out(` Kretschmann K = ${report.kretschmann}`);\n out(' closed form: ' + Object.entries(report.closedForm).map(([k, v]) => `${k}=${v}`).join(' '));\n if (geodesic) {\n const cons =\n geodesic.E0 === undefined\n ? ''\n : ` E ${geodesic.E0}→${geodesic.EEnd} L ${geodesic.L0}→${geodesic.LEnd} Q ${geodesic.Q0}→${geodesic.QEnd} norm ${geodesic.norm0}→${geodesic.normEnd}`;\n const polar =\n geodesic.theta0 === undefined ? '' : ` θ ${geodesic.theta0}→${geodesic.thetaEnd}`;\n const label = geodesic.kind === 'inclined' ? 'inclined orbit' : 'circular orbit';\n out(\n ` geodesic: ${label} r0=${geodesic.r0} rEnd=${geodesic.rEnd}${polar} Δφ=${geodesic.phiAdvance} over ${geodesic.steps} steps${cons}`,\n );\n if (geodesic.note !== undefined) out(` ${geodesic.note}`);\n }\n return 0;\n}\n\nexport const command: Command = {\n name: 'metric',\n aliases: ['curvature'],\n flags: FLAGS,\n help: commandHelp(HELP, FLAGS),\n summary: 'Print Christoffel symbols and curvature scalars for one exact metric.',\n example: 'upt metric schwarzschild M=1Msun r=1e8 theta=pi/2',\n group: 'evaluate',\n run,\n};\n\nregisterCommand(command);\n"]}
1
+ {"version":3,"file":"metric.js","sourceRoot":"","sources":["../../../src/cli/commands/metric.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,eAAe,EAAiC,MAAM,eAAe,CAAC;AAC/E,OAAO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C,KAAK,SAAS,IAAI,EAAE,CACrI,CAAC;QACF,IAAI,QAAQ,CAAC,IAAI,KAAK,SAAS;YAAE,GAAG,CAAC,OAAO,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC;IAC/D,CAAC;IACD,OAAO,CAAC,CAAC;AACX,CAAC;AAED,MAAM,CAAC,MAAM,OAAO,GAAY;IAC9B,IAAI,EAAE,QAAQ;IACd,OAAO,EAAE,CAAC,WAAW,CAAC;IACtB,WAAW,EAAE,EAAE,GAAG,EAAE,QAAQ,EAAE;IAC9B,KAAK,EAAE,KAAK;IACZ,IAAI,EAAE,WAAW,CAAC,IAAI,EAAE,KAAK,CAAC;IAC9B,OAAO,EAAE,uEAAuE;IAChF,OAAO,EAAE,mDAAmD;IAC5D,KAAK,EAAE,UAAU;IACjB,GAAG;CACJ,CAAC;AAEF,eAAe,CAAC,OAAO,CAAC,CAAC","sourcesContent":["/**\n * `upt metric` — Christoffel symbols and curvature scalars for a named metric.\n *\n * `--geodesic` integrates a short Schwarzschild circular orbit, or a Kerr\n * geodesic. θ = π/2 is equatorial and circular. Any other θ is an inclined\n * spherical orbit with that polar turning point.\n *\n * @module cli/commands/metric\n */\nimport type { FlagSpec } from '../args.js';\nimport { registerCommand, type Command, type CommandCtx } from '../command.js';\nimport { commandHelp, JSON_FLAG } from '../flag-help.js';\nimport { emitJson } from '../output.js';\nimport { CliError, UsageError } from '../errors.js';\nimport { splitAssignments } from '../bindings.js';\nimport type { MetricId } from '../../cli-api.js';\n\nconst FLAGS: FlagSpec[] = [\n JSON_FLAG,\n {\n name: '--geodesic',\n valueStyle: 'none',\n description: 'Integrate a short Schwarzschild circular orbit, or a Kerr geodesic at the given θ.',\n },\n];\n\nconst NAMES = ['minkowski', 'schwarzschild', 'flrw', 'kerr'] as const;\n\nconst HELP = `upt metric <minkowski|schwarzschild|flrw|kerr> [key=value ...] [--geodesic] [--json]\n Christoffel symbols, the Ricci tensor, the Ricci scalar and the\n Kretschmann scalar of one exact metric. Alias: upt curvature.\n Signature of the line element is (-,+,+,+), the same mostly-plus\n signature as the canonical Einstein-equation metric node.\n Schwarzschild Kretschmann is checked against 48 G² M² / (c⁴ r⁶).\n FLRW prints the Friedmann equation including the curvature term\n −k c²/a² and Λ. Kerr Kretschmann uses the Boyer–Lindquist closed form.\n --geodesic integrates a short Schwarzschild circular orbit, or a Kerr\n geodesic (equatorial and circular at θ = π/2; inclined, with that\n polar turning point, at any other θ). Kerr's a is a length in metres;\n the report prints a/M = a/(GM/c²). A Ricci scalar that has a closed\n form is that form; a vacuum finite-difference residual is not listed\n as Ricci. A parameter is a number, a unit (M=1Msun, r=1km) or a\n constant expression (theta=pi/2). A bare number is already in the\n parameter's SI unit; a dimensioned quantity must match it.\n \\`upt help metric\\` describes every flag.\n e.g. upt metric schwarzschild M=1Msun r=1e8 theta=pi/2\n upt metric flrw k=1 t=2\n upt curvature kerr a=1000 r=1e8 theta=1.2`;\n\nfunction isMetric(s: string | undefined): s is MetricId {\n return (NAMES as readonly string[]).includes(s ?? '');\n}\n\n/**\n * The metric library refuses a bad value (a non-positive mass, a point inside\n * the horizon, an unknown or repeated parameter, a start the integrator cannot\n * take, a parameter in the wrong unit) with `MetricMassError`,\n * `MetricValueError` or a `UnitError`. Each is a bad value, exit 1. Any other\n * class (a plain `Error`, a TypeError, a RangeError) is a defect and is not\n * converted.\n */\nfunction metricValueError(api: CommandCtx['api'], e: unknown): unknown {\n if (e instanceof api.MetricMassError || e instanceof api.MetricValueError || e instanceof api.UnitError) {\n return new CliError(`upt metric: ${e.message}`);\n }\n return e;\n}\n\nasync function run(ctx: CommandCtx): Promise<number> {\n const { args, api, out } = ctx;\n const name = args.positionals[0];\n if (!isMetric(name)) {\n throw new UsageError(\n `upt metric needs one of ${NAMES.join(', ')}. See \\`upt help metric\\`.`,\n );\n }\n const pairs = args.positionals.slice(1);\n // A token with no `=` is usage (exit 2); a parameter given twice is refused (exit 1).\n splitAssignments('metric', pairs, 'key=value');\n let report;\n try {\n report = api.curvatureReport(name, pairs);\n } catch (e) {\n throw metricValueError(api, e);\n }\n let geodesic:\n | {\n readonly kind: 'circular' | 'inclined';\n readonly r0: number;\n readonly rEnd: number;\n readonly theta0?: number;\n readonly thetaEnd?: number;\n readonly phiAdvance: number;\n readonly steps: number;\n readonly E0?: number;\n readonly EEnd?: number;\n readonly L0?: number;\n readonly LEnd?: number;\n readonly Q0?: number;\n readonly QEnd?: number;\n readonly norm0?: number;\n readonly normEnd?: number;\n readonly note?: string;\n }\n | undefined;\n if (args.flags.has('geodesic')) {\n try {\n if (name === 'schwarzschild') {\n const M = report.parameters.M;\n const r = report.parameters.r;\n const orbit = api.schwarzschildCircularOrbit({\n ...(M === undefined ? {} : { M }),\n ...(r === undefined ? {} : { r }),\n });\n geodesic = { kind: 'circular', ...orbit };\n } else if (name === 'kerr') {\n const Mgeom = report.parameters.M_geom_m;\n const a = report.parameters.a ?? 0;\n const r = report.parameters.r;\n const theta = report.parameters.theta ?? Math.PI / 2;\n // Reachable: `curvatureReport` refuses M ≤ 0, but G=0 (or a c that overflows) makes\n // M_geom = G M / c² zero with M > 0, and a supplied r passes its own check.\n if (Mgeom === undefined || !(Mgeom > 0)) throw new CliError('upt metric: Kerr geodesic needs a positive mass');\n const rOverM = (r ?? 10 * Mgeom) / Mgeom;\n const aOverM = a / Mgeom;\n if (!(Math.abs(aOverM) <= 1)) throw new CliError('upt metric: Kerr geodesic wants |a| ≤ GM/c²');\n const equatorial = Math.abs(theta - Math.PI / 2) < 1e-6;\n if (a === 0) {\n // At a = 0 the Kerr metric is Schwarzschild. The Boyer–Lindquist integrator refuses the\n // circular start there (\"radial potential is negative at the start\"): the two terms of\n // its radial potential cancel to below its tolerance at a = 0, and only at a = 0. The\n // equatorial circular orbit is the Schwarzschild one and is integrated as that, so the\n // default parameters (a = 0) run. An inclined start has no Schwarzschild routine here.\n if (!equatorial) {\n throw new CliError(\n 'upt metric: at a = 0 an inclined Kerr orbit is a tilted Schwarzschild circular orbit, and this integrator needs a ≠ 0 for an inclined start; give a, or theta=pi/2',\n );\n }\n const M = report.parameters.M;\n geodesic = {\n kind: 'circular' as const,\n note: 'a = 0: the Kerr metric is Schwarzschild; the equatorial circular orbit is integrated by the Schwarzschild routine',\n ...api.schwarzschildCircularOrbit({ ...(M === undefined ? {} : { M }), ...(r === undefined ? {} : { r }) }),\n };\n } else {\n const shared = { M: Mgeom, aOverM, rOverM, fraction: 0.005, steps: 40 };\n geodesic =\n equatorial\n ? { kind: 'circular' as const, ...api.kerrEquatorialCircular(shared) }\n : {\n kind: 'inclined' as const,\n ...api.kerrGeodesic({\n ...shared,\n theta,\n ...api.kerrTurningPointOrbit({ M: Mgeom, aOverM, rOverM, theta }),\n mu2: 1,\n }),\n };\n }\n } else {\n throw new UsageError('upt metric: --geodesic is for schwarzschild or kerr.');\n }\n } catch (e) {\n if (e instanceof UsageError || e instanceof CliError) throw e;\n throw metricValueError(api, e);\n }\n }\n if (args.flags.has('json')) {\n emitJson({ command: 'metric', result: { ...report, ...(geodesic === undefined ? {} : { geodesic }) } }, ctx.write);\n return 0;\n }\n out(`\\n${report.metric} signature ${report.signature}`);\n out(` ${report.signatureNote}`);\n out(` coordinates ${report.coordinates}`);\n out(' parameters: ' + Object.entries(report.parameters).map(([k, v]) => `${k}=${v}`).join(' '));\n out(' point: ' + Object.entries(report.point).map(([k, v]) => `${k}=${v}`).join(' '));\n for (const note of report.notes) out(` ${note}`);\n out(' Christoffel (nonzero):');\n if (report.christoffel.length === 0) out(' (none)');\n for (const c of report.christoffel) out(` ${c.index} = ${c.value}`);\n out(' Ricci (nonzero):');\n if (report.ricci.length === 0) out(' (none)');\n for (const c of report.ricci) out(` ${c.index} = ${c.value}`);\n out(` Ricci scalar R = ${report.ricciScalar}`);\n out(` Kretschmann K = ${report.kretschmann}`);\n out(' closed form: ' + Object.entries(report.closedForm).map(([k, v]) => `${k}=${v}`).join(' '));\n if (geodesic) {\n const cons =\n geodesic.E0 === undefined\n ? ''\n : ` E ${geodesic.E0}→${geodesic.EEnd} L ${geodesic.L0}→${geodesic.LEnd} Q ${geodesic.Q0}→${geodesic.QEnd} norm ${geodesic.norm0}→${geodesic.normEnd}`;\n const polar =\n geodesic.theta0 === undefined ? '' : ` θ ${geodesic.theta0}→${geodesic.thetaEnd}`;\n const label = geodesic.kind === 'inclined' ? 'inclined orbit' : 'circular orbit';\n out(\n ` geodesic: ${label} r0=${geodesic.r0} rEnd=${geodesic.rEnd}${polar} Δφ=${geodesic.phiAdvance} over ${geodesic.steps} steps${cons}`,\n );\n if (geodesic.note !== undefined) out(` ${geodesic.note}`);\n }\n return 0;\n}\n\nexport const command: Command = {\n name: 'metric',\n aliases: ['curvature'],\n positionals: { max: Infinity },\n flags: FLAGS,\n help: commandHelp(HELP, FLAGS),\n summary: 'Print Christoffel symbols and curvature scalars for one exact metric.',\n example: 'upt metric schwarzschild M=1Msun r=1e8 theta=pi/2',\n group: 'evaluate',\n run,\n};\n\nregisterCommand(command);\n"]}
@@ -21,6 +21,16 @@ type AtlasBridge = import('../../cli-api.js').AtlasBridge;
21
21
  type Bridges = readonly AtlasBridge[];
22
22
  type Translation = import('../../cli-api.js').ObservableTranslation;
23
23
  type Carriage = import('../../cli-api.js').ObservableCarriage;
24
+ /**
25
+ * A translation declared on a bridge that states no bound. A translation restates the bound's
26
+ * error in another observable, so it presupposes the bound; a bridge without one declaring a
27
+ * translation is a defect of the atlas record, not a user error, and this is not a `CliError`.
28
+ */
29
+ export declare class TranslationWithoutBoundError extends Error {
30
+ constructor(bridgeId: string, observable: string);
31
+ }
32
+ /** The first bridge's bound, which the translation `tr` presupposes. @internal */
33
+ export declare function translatedBound(bridges: Bridges, tr: Translation): NonNullable<AtlasBridge['bound']>;
24
34
  /**
25
35
  * Whether the path is adequate for a requested tolerance at one point: every
26
36
  * regime holds, every horizon holds at the given t, and the closed-form point
@@ -1 +1 @@
1
- {"version":3,"file":"path.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/path.ts"],"names":[],"mappings":"AA2B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