universal-physics-tensor 11.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 (287) hide show
  1. package/README.md +36 -34
  2. package/data/applied-cases.json +1892 -0
  3. package/data/applied-cases.schema.json +194 -0
  4. package/data/atlas/atlas.json +21 -21
  5. package/data/atlas/atlas.jsonld +1 -1
  6. package/data/atlas/diffusion.json +5 -5
  7. package/data/atlas/oscillators.json +7 -7
  8. package/data/atlas/waves.json +11 -11
  9. package/data/bridge-catalog.json +20 -4
  10. package/data/units.json +6 -25
  11. package/dist/atlas/benchmark/stats.d.ts.map +1 -1
  12. package/dist/atlas/benchmark/stats.js +6 -20
  13. package/dist/atlas/benchmark/stats.js.map +1 -1
  14. package/dist/atlas/physjs-entries.generated.d.ts +13 -4
  15. package/dist/atlas/physjs-entries.generated.d.ts.map +1 -1
  16. package/dist/atlas/physjs-entries.generated.js +15 -4
  17. package/dist/atlas/physjs-entries.generated.js.map +1 -1
  18. package/dist/atlas/physjs-reviewed.js +2 -2
  19. package/dist/atlas/physjs-reviewed.js.map +1 -1
  20. package/dist/cases/catalog-checks.d.ts +10 -0
  21. package/dist/cases/catalog-checks.d.ts.map +1 -0
  22. package/dist/cases/catalog-checks.js +241 -0
  23. package/dist/cases/catalog-checks.js.map +1 -0
  24. package/dist/cases/catalog.d.ts +83 -0
  25. package/dist/cases/catalog.d.ts.map +1 -0
  26. package/dist/cases/catalog.js +118 -0
  27. package/dist/cases/catalog.js.map +1 -0
  28. package/dist/cases/engine.d.ts +13 -0
  29. package/dist/cases/engine.d.ts.map +1 -0
  30. package/dist/cases/engine.js +179 -0
  31. package/dist/cases/engine.js.map +1 -0
  32. package/dist/cases/index.d.ts.map +1 -1
  33. package/dist/cases/index.js +5 -7
  34. package/dist/cases/index.js.map +1 -1
  35. package/dist/cases/methods.d.ts +215 -0
  36. package/dist/cases/methods.d.ts.map +1 -0
  37. package/dist/cases/methods.js +743 -0
  38. package/dist/cases/methods.js.map +1 -0
  39. package/dist/cases/types.d.ts +12 -0
  40. package/dist/cases/types.d.ts.map +1 -1
  41. package/dist/cases/types.js.map +1 -1
  42. package/dist/cli/args.d.ts +2 -0
  43. package/dist/cli/args.d.ts.map +1 -1
  44. package/dist/cli/args.js.map +1 -1
  45. package/dist/cli/command.d.ts +3 -0
  46. package/dist/cli/command.d.ts.map +1 -1
  47. package/dist/cli/command.js.map +1 -1
  48. package/dist/cli/commands/_discovery-opts.d.ts +1 -0
  49. package/dist/cli/commands/_discovery-opts.d.ts.map +1 -1
  50. package/dist/cli/commands/_discovery-opts.js +1 -0
  51. package/dist/cli/commands/_discovery-opts.js.map +1 -1
  52. package/dist/cli/commands/discover.d.ts.map +1 -1
  53. package/dist/cli/commands/discover.js +116 -71
  54. package/dist/cli/commands/discover.js.map +1 -1
  55. package/dist/cli/commands/evaluate.js +2 -2
  56. package/dist/cli/commands/evaluate.js.map +1 -1
  57. package/dist/cli/commands/explain.d.ts.map +1 -1
  58. package/dist/cli/commands/explain.js +22 -2
  59. package/dist/cli/commands/explain.js.map +1 -1
  60. package/dist/cli/commands/ground.d.ts.map +1 -1
  61. package/dist/cli/commands/ground.js +6 -1
  62. package/dist/cli/commands/ground.js.map +1 -1
  63. package/dist/cli/commands/map.d.ts.map +1 -1
  64. package/dist/cli/commands/map.js +9 -6
  65. package/dist/cli/commands/map.js.map +1 -1
  66. package/dist/cli/determination.d.ts +1 -0
  67. package/dist/cli/determination.d.ts.map +1 -1
  68. package/dist/cli/determination.js.map +1 -1
  69. package/dist/cli/flag-help.d.ts +1 -0
  70. package/dist/cli/flag-help.d.ts.map +1 -1
  71. package/dist/cli/flag-help.js +1 -0
  72. package/dist/cli/flag-help.js.map +1 -1
  73. package/dist/cli/graphs.d.ts +2 -0
  74. package/dist/cli/graphs.d.ts.map +1 -1
  75. package/dist/cli/graphs.js +1 -0
  76. package/dist/cli/graphs.js.map +1 -1
  77. package/dist/cli/main.d.ts +1 -0
  78. package/dist/cli/main.d.ts.map +1 -1
  79. package/dist/cli/main.js +1 -0
  80. package/dist/cli/main.js.map +1 -1
  81. package/dist/cli/output.d.ts +8 -0
  82. package/dist/cli/output.d.ts.map +1 -1
  83. package/dist/cli/output.js +8 -0
  84. package/dist/cli/output.js.map +1 -1
  85. package/dist/cli/statuses.d.ts.map +1 -1
  86. package/dist/cli/statuses.js +12 -2
  87. package/dist/cli/statuses.js.map +1 -1
  88. package/dist/cli/version.d.ts +1 -0
  89. package/dist/cli/version.d.ts.map +1 -1
  90. package/dist/cli/version.js +1 -0
  91. package/dist/cli/version.js.map +1 -1
  92. package/dist/cli-api.d.ts +2 -0
  93. package/dist/cli-api.d.ts.map +1 -1
  94. package/dist/cli-api.js +2 -0
  95. package/dist/cli-api.js.map +1 -1
  96. package/dist/composition/canonical-graph.d.ts +2 -2
  97. package/dist/composition/canonical-graph.js +2 -2
  98. package/dist/composition/canonical-graph.js.map +1 -1
  99. package/dist/composition/consequence.d.ts +15 -5
  100. package/dist/composition/consequence.d.ts.map +1 -1
  101. package/dist/composition/consequence.js +6 -4
  102. package/dist/composition/consequence.js.map +1 -1
  103. package/dist/composition/discovery.d.ts +78 -14
  104. package/dist/composition/discovery.d.ts.map +1 -1
  105. package/dist/composition/discovery.js +73 -23
  106. package/dist/composition/discovery.js.map +1 -1
  107. package/dist/composition/expr-eval.d.ts +1 -1
  108. package/dist/composition/expr-eval.d.ts.map +1 -1
  109. package/dist/composition/expr-eval.js +4 -4
  110. package/dist/composition/expr-eval.js.map +1 -1
  111. package/dist/composition/expr-simplify.d.ts +10 -14
  112. package/dist/composition/expr-simplify.d.ts.map +1 -1
  113. package/dist/composition/expr-simplify.js +49 -52
  114. package/dist/composition/expr-simplify.js.map +1 -1
  115. package/dist/composition/grounding.d.ts.map +1 -1
  116. package/dist/composition/grounding.js +19 -7
  117. package/dist/composition/grounding.js.map +1 -1
  118. package/dist/composition/mathts-quiet.d.ts +4 -6
  119. package/dist/composition/mathts-quiet.d.ts.map +1 -1
  120. package/dist/composition/mathts-quiet.js +4 -14
  121. package/dist/composition/mathts-quiet.js.map +1 -1
  122. package/dist/composition/own-equation-magnitude.d.ts +95 -0
  123. package/dist/composition/own-equation-magnitude.d.ts.map +1 -0
  124. package/dist/composition/own-equation-magnitude.js +270 -0
  125. package/dist/composition/own-equation-magnitude.js.map +1 -0
  126. package/dist/composition/probe/backend-protocol.d.ts +3 -0
  127. package/dist/composition/probe/backend-protocol.d.ts.map +1 -1
  128. package/dist/composition/probe/backend-protocol.js.map +1 -1
  129. package/dist/composition/probe/candidate-store.d.ts +1 -0
  130. package/dist/composition/probe/candidate-store.d.ts.map +1 -1
  131. package/dist/composition/probe/candidate-store.js +1 -0
  132. package/dist/composition/probe/candidate-store.js.map +1 -1
  133. package/dist/composition/probe/corpus.d.ts +4 -2
  134. package/dist/composition/probe/corpus.d.ts.map +1 -1
  135. package/dist/composition/probe/corpus.js +3 -3
  136. package/dist/composition/probe/corpus.js.map +1 -1
  137. package/dist/composition/probe/dataset.d.ts +1 -0
  138. package/dist/composition/probe/dataset.d.ts.map +1 -1
  139. package/dist/composition/probe/dataset.js.map +1 -1
  140. package/dist/composition/probe/experiment-design.d.ts +2 -0
  141. package/dist/composition/probe/experiment-design.d.ts.map +1 -1
  142. package/dist/composition/probe/experiment-design.js.map +1 -1
  143. package/dist/composition/probe/falsify.d.ts +2 -0
  144. package/dist/composition/probe/falsify.d.ts.map +1 -1
  145. package/dist/composition/probe/falsify.js.map +1 -1
  146. package/dist/composition/probe/fit.d.ts +1 -0
  147. package/dist/composition/probe/fit.d.ts.map +1 -1
  148. package/dist/composition/probe/fit.js.map +1 -1
  149. package/dist/composition/probe/generator.d.ts +3 -0
  150. package/dist/composition/probe/generator.d.ts.map +1 -1
  151. package/dist/composition/probe/generator.js +5 -6
  152. package/dist/composition/probe/generator.js.map +1 -1
  153. package/dist/composition/probe/limits.d.ts +1 -0
  154. package/dist/composition/probe/limits.d.ts.map +1 -1
  155. package/dist/composition/probe/limits.js.map +1 -1
  156. package/dist/composition/probe/pipeline.d.ts +5 -0
  157. package/dist/composition/probe/pipeline.d.ts.map +1 -1
  158. package/dist/composition/probe/pipeline.js +64 -21
  159. package/dist/composition/probe/pipeline.js.map +1 -1
  160. package/dist/composition/probe/power-law.d.ts.map +1 -1
  161. package/dist/composition/probe/power-law.js +3 -7
  162. package/dist/composition/probe/power-law.js.map +1 -1
  163. package/dist/composition/probe/problem.d.ts +1 -0
  164. package/dist/composition/probe/problem.d.ts.map +1 -1
  165. package/dist/composition/probe/problem.js.map +1 -1
  166. package/dist/composition/probe/residual.d.ts +1 -0
  167. package/dist/composition/probe/residual.d.ts.map +1 -1
  168. package/dist/composition/probe/residual.js +1 -0
  169. package/dist/composition/probe/residual.js.map +1 -1
  170. package/dist/composition/probe/run-manifest.d.ts +1 -0
  171. package/dist/composition/probe/run-manifest.d.ts.map +1 -1
  172. package/dist/composition/probe/run-manifest.js.map +1 -1
  173. package/dist/composition/probe/scalar-search.d.ts +50 -0
  174. package/dist/composition/probe/scalar-search.d.ts.map +1 -0
  175. package/dist/composition/probe/scalar-search.js +169 -0
  176. package/dist/composition/probe/scalar-search.js.map +1 -0
  177. package/dist/composition/probe/scoring.d.ts +1 -0
  178. package/dist/composition/probe/scoring.d.ts.map +1 -1
  179. package/dist/composition/probe/scoring.js.map +1 -1
  180. package/dist/composition/probe/study.d.ts +2 -2
  181. package/dist/composition/probe/study.d.ts.map +1 -1
  182. package/dist/composition/probe/study.js +6 -10
  183. package/dist/composition/probe/study.js.map +1 -1
  184. package/dist/composition/probe/t-tail.d.ts +3 -4
  185. package/dist/composition/probe/t-tail.d.ts.map +1 -1
  186. package/dist/composition/probe/t-tail.js +7 -10
  187. package/dist/composition/probe/t-tail.js.map +1 -1
  188. package/dist/composition/proposed-bridges.d.ts +11 -2
  189. package/dist/composition/proposed-bridges.d.ts.map +1 -1
  190. package/dist/composition/proposed-bridges.js +7 -5
  191. package/dist/composition/proposed-bridges.js.map +1 -1
  192. package/dist/composition/rational-exponent.d.ts +2 -2
  193. package/dist/composition/rational-exponent.d.ts.map +1 -1
  194. package/dist/composition/rational-exponent.js +4 -4
  195. package/dist/composition/rational-exponent.js.map +1 -1
  196. package/dist/composition/representative-values.d.ts.map +1 -1
  197. package/dist/composition/representative-values.js +6 -0
  198. package/dist/composition/representative-values.js.map +1 -1
  199. package/dist/composition/retrodiction.d.ts +15 -0
  200. package/dist/composition/retrodiction.d.ts.map +1 -1
  201. package/dist/composition/retrodiction.js +10 -3
  202. package/dist/composition/retrodiction.js.map +1 -1
  203. package/dist/composition/user-equation.d.ts +1 -0
  204. package/dist/composition/user-equation.d.ts.map +1 -1
  205. package/dist/composition/user-equation.js +1 -0
  206. package/dist/composition/user-equation.js.map +1 -1
  207. package/dist/core/constants.d.ts +12 -11
  208. package/dist/core/constants.d.ts.map +1 -1
  209. package/dist/core/constants.js +24 -21
  210. package/dist/core/constants.js.map +1 -1
  211. package/dist/diff/bridge-ast-gradient.d.ts +27 -23
  212. package/dist/diff/bridge-ast-gradient.d.ts.map +1 -1
  213. package/dist/diff/bridge-ast-gradient.js +75 -173
  214. package/dist/diff/bridge-ast-gradient.js.map +1 -1
  215. package/dist/dimensional/ast-types.d.ts +15 -0
  216. package/dist/dimensional/ast-types.d.ts.map +1 -1
  217. package/dist/dimensional/ast-types.js.map +1 -1
  218. package/dist/dimensional/curvature-composite.d.ts +1 -1
  219. package/dist/dimensional/curvature-composite.js.map +1 -1
  220. package/dist/dimensional/exact-scale.d.ts +41 -11
  221. package/dist/dimensional/exact-scale.d.ts.map +1 -1
  222. package/dist/dimensional/exact-scale.js +115 -123
  223. package/dist/dimensional/exact-scale.js.map +1 -1
  224. package/dist/dimensional/mathts-unit-delegation.d.ts +29 -0
  225. package/dist/dimensional/mathts-unit-delegation.d.ts.map +1 -0
  226. package/dist/dimensional/mathts-unit-delegation.js +187 -0
  227. package/dist/dimensional/mathts-unit-delegation.js.map +1 -0
  228. package/dist/dimensional/mathts-unit-wrapper.d.ts +33 -0
  229. package/dist/dimensional/mathts-unit-wrapper.d.ts.map +1 -0
  230. package/dist/dimensional/mathts-unit-wrapper.js +190 -0
  231. package/dist/dimensional/mathts-unit-wrapper.js.map +1 -0
  232. package/dist/dimensional/scalar-lowering.d.ts +21 -0
  233. package/dist/dimensional/scalar-lowering.d.ts.map +1 -0
  234. package/dist/dimensional/scalar-lowering.js +45 -0
  235. package/dist/dimensional/scalar-lowering.js.map +1 -0
  236. package/dist/dimensional/unit-data.d.ts +5 -1
  237. package/dist/dimensional/unit-data.d.ts.map +1 -1
  238. package/dist/dimensional/unit-data.js +28 -4
  239. package/dist/dimensional/unit-data.js.map +1 -1
  240. package/dist/dimensional/units.d.ts +2 -0
  241. package/dist/dimensional/units.d.ts.map +1 -1
  242. package/dist/dimensional/units.js +59 -3
  243. package/dist/dimensional/units.js.map +1 -1
  244. package/dist/dimensional/validator.d.ts +2 -0
  245. package/dist/dimensional/validator.d.ts.map +1 -1
  246. package/dist/dimensional/validator.js.map +1 -1
  247. package/dist/index.js.map +1 -1
  248. package/dist/numerical/connection-lowering-helpers.d.ts +3 -1
  249. package/dist/numerical/connection-lowering-helpers.d.ts.map +1 -1
  250. package/dist/numerical/connection-lowering-helpers.js +11 -15
  251. package/dist/numerical/connection-lowering-helpers.js.map +1 -1
  252. package/dist/numerical/pderiv.d.ts.map +1 -1
  253. package/dist/numerical/pderiv.js +2 -6
  254. package/dist/numerical/pderiv.js.map +1 -1
  255. package/dist/numerical/quadrature.js +3 -3
  256. package/dist/numerical/quadrature.js.map +1 -1
  257. package/dist/numerical/statistics.js +1 -1
  258. package/dist/numerical/statistics.js.map +1 -1
  259. package/dist/numerical/strides.d.ts +3 -2
  260. package/dist/numerical/strides.d.ts.map +1 -1
  261. package/dist/numerical/strides.js +3 -10
  262. package/dist/numerical/strides.js.map +1 -1
  263. package/package.json +9 -12
  264. package/dist/cases/brownian-sphere.d.ts +0 -68
  265. package/dist/cases/brownian-sphere.d.ts.map +0 -1
  266. package/dist/cases/brownian-sphere.js +0 -355
  267. package/dist/cases/brownian-sphere.js.map +0 -1
  268. package/dist/cases/damped-resonator.d.ts +0 -23
  269. package/dist/cases/damped-resonator.d.ts.map +0 -1
  270. package/dist/cases/damped-resonator.js +0 -221
  271. package/dist/cases/damped-resonator.js.map +0 -1
  272. package/dist/cases/kepler-rv.d.ts +0 -13
  273. package/dist/cases/kepler-rv.d.ts.map +0 -1
  274. package/dist/cases/kepler-rv.js +0 -173
  275. package/dist/cases/kepler-rv.js.map +0 -1
  276. package/dist/cases/lumped-cooling.d.ts +0 -51
  277. package/dist/cases/lumped-cooling.d.ts.map +0 -1
  278. package/dist/cases/lumped-cooling.js +0 -259
  279. package/dist/cases/lumped-cooling.js.map +0 -1
  280. package/dist/cases/resistor-noise.d.ts +0 -14
  281. package/dist/cases/resistor-noise.d.ts.map +0 -1
  282. package/dist/cases/resistor-noise.js +0 -215
  283. package/dist/cases/resistor-noise.js.map +0 -1
  284. package/dist/cases/skin-depth.d.ts +0 -17
  285. package/dist/cases/skin-depth.d.ts.map +0 -1
  286. package/dist/cases/skin-depth.js +0 -170
  287. 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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;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 { 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.\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/** 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: 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 ...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 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 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
+ {"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,MAA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M,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,MAAM,aAAa,GAAG,cAAc,CAAC,SAAS,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;IACpE,IAAI,aAAa,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC7B,GAAG,CAAC,EAAE,CAAC,CAAC;QACR,KAAK,MAAM,IAAI,IAAI,aAAa;YAAE,GAAG,CAAC,IAAI,CAAC,CAAC;IAC9C,CAAC;IACD,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 { 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"]}
@@ -24,6 +24,7 @@ interface DeterminationInput {
24
24
  /** Names filled in rather than resolved. Empty when the command did not look any up. */
25
25
  readonly unresolved: readonly string[];
26
26
  }
27
+ /** The exit code, report and gap of one derive or map determination. */
27
28
  export interface Determination {
28
29
  readonly exit: 0 | typeof EXIT_CHECK_FAILED;
29
30
  readonly report: 'established' | 'nothing-checked' | 'check-failed' | 'not-established';
@@ -1 +1 @@
1
- {"version":3,"file":"determination.d.ts","sourceRoot":"","sources":["../../src/cli/determination.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhD,UAAU,kBAAkB;IAC1B,6EAA6E;IAC7E,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,8FAA8F;IAC9F,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,yFAAyF;IACzF,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAC9B,yDAAyD;IACzD,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,wFAAwF;IACxF,QAAQ,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;CACxC;AAED,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,IAAI,EAAE,CAAC,GAAG,OAAO,iBAAiB,CAAC;IAC5C,QAAQ,CAAC,MAAM,EAAE,aAAa,GAAG,iBAAiB,GAAG,cAAc,GAAG,iBAAiB,CAAC;IACxF,gEAAgE;IAChE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;CACtB;AAED,+CAA+C;AAC/C,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,kBAAkB,GAAG,aAAa,CAY9E"}
1
+ {"version":3,"file":"determination.d.ts","sourceRoot":"","sources":["../../src/cli/determination.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhD,UAAU,kBAAkB;IAC1B,6EAA6E;IAC7E,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,8FAA8F;IAC9F,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,yFAAyF;IACzF,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAC9B,yDAAyD;IACzD,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,wFAAwF;IACxF,QAAQ,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;CACxC;AAED,wEAAwE;AACxE,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,IAAI,EAAE,CAAC,GAAG,OAAO,iBAAiB,CAAC;IAC5C,QAAQ,CAAC,MAAM,EAAE,aAAa,GAAG,iBAAiB,GAAG,cAAc,GAAG,iBAAiB,CAAC;IACxF,gEAAgE;IAChE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;CACtB;AAED,+CAA+C;AAC/C,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,kBAAkB,GAAG,aAAa,CAY9E"}
@@ -1 +1 @@
1
- {"version":3,"file":"determination.js","sourceRoot":"","sources":["../../src/cli/determination.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAsBhD,+CAA+C;AAC/C,MAAM,UAAU,qBAAqB,CAAC,KAAyB;IAC7D,IAAI,KAAK,CAAC,MAAM;QAAE,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,aAAa,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC;IACrE,IAAI,KAAK,CAAC,WAAW;QAAE,OAAO,EAAE,IAAI,EAAE,iBAAiB,EAAE,MAAM,EAAE,cAAc,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC;IAC3F,MAAM,UAAU,GAAG,CAAC,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC;IAClD,IAAI,KAAK,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,SAAS,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,EAAE,CAAC;QAC9D,MAAM,GAAG,GAAG,KAAK,CAAC,SAAS;YACzB,CAAC,CAAC,4BAA4B;YAC9B,CAAC,CAAC,cAAc,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;QAC/D,OAAO,EAAE,IAAI,EAAE,iBAAiB,EAAE,MAAM,EAAE,iBAAiB,EAAE,GAAG,EAAE,CAAC;IACrE,CAAC;IACD,IAAI,KAAK,CAAC,KAAK;QAAE,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,aAAa,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC;IACpE,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,iBAAiB,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC;AACzD,CAAC","sourcesContent":["/**\n * One exit for a result the user asked to have determined.\n *\n * Derive and map used to decide separately, and both treated \"not\n * established\" as success. A canonical agreement is a check that passed.\n * A check that ran and failed, a non-unique monomial, and a catalog\n * target whose dimension was computed through an unresolved name are\n * exit 3. A target that was not a bound catalog name, with no comparison,\n * stays exit 0.\n *\n * @module cli/determination\n * @internal\n */\n\nimport { EXIT_CHECK_FAILED } from './errors.js';\n\ninterface DeterminationInput {\n /** The user named a bound catalog target, or asked derive for a monomial. */\n readonly asked: boolean;\n /** A canonical comparison agreed, including when some other name has no catalog dimension. */\n readonly agrees: boolean;\n /** A check ran on resolved names and failed, or a canonical comparison is a mismatch. */\n readonly checkFailed: boolean;\n /** The governing set does not determine one monomial. */\n readonly notUnique: boolean;\n /** Names filled in rather than resolved. Empty when the command did not look any up. */\n readonly unresolved: readonly string[];\n}\n\nexport interface Determination {\n readonly exit: 0 | typeof EXIT_CHECK_FAILED;\n readonly report: 'established' | 'nothing-checked' | 'check-failed' | 'not-established';\n /** Why a determination was not established. Empty otherwise. */\n readonly gap: string;\n}\n\n/** The exit derive and map share. @internal */\nexport function classifyDetermination(input: DeterminationInput): Determination {\n if (input.agrees) return { exit: 0, report: 'established', gap: '' };\n if (input.checkFailed) return { exit: EXIT_CHECK_FAILED, report: 'check-failed', gap: '' };\n const unresolved = [...new Set(input.unresolved)];\n if (input.asked && (input.notUnique || unresolved.length > 0)) {\n const gap = input.notUnique\n ? 'the monomial is not unique'\n : `unresolved ${unresolved.map((n) => `'${n}'`).join(', ')}`;\n return { exit: EXIT_CHECK_FAILED, report: 'not-established', gap };\n }\n if (input.asked) return { exit: 0, report: 'established', gap: '' };\n return { exit: 0, report: 'nothing-checked', gap: '' };\n}\n"]}
1
+ {"version":3,"file":"determination.js","sourceRoot":"","sources":["../../src/cli/determination.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAuBhD,+CAA+C;AAC/C,MAAM,UAAU,qBAAqB,CAAC,KAAyB;IAC7D,IAAI,KAAK,CAAC,MAAM;QAAE,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,aAAa,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC;IACrE,IAAI,KAAK,CAAC,WAAW;QAAE,OAAO,EAAE,IAAI,EAAE,iBAAiB,EAAE,MAAM,EAAE,cAAc,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC;IAC3F,MAAM,UAAU,GAAG,CAAC,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC;IAClD,IAAI,KAAK,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,SAAS,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,EAAE,CAAC;QAC9D,MAAM,GAAG,GAAG,KAAK,CAAC,SAAS;YACzB,CAAC,CAAC,4BAA4B;YAC9B,CAAC,CAAC,cAAc,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;QAC/D,OAAO,EAAE,IAAI,EAAE,iBAAiB,EAAE,MAAM,EAAE,iBAAiB,EAAE,GAAG,EAAE,CAAC;IACrE,CAAC;IACD,IAAI,KAAK,CAAC,KAAK;QAAE,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,aAAa,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC;IACpE,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,iBAAiB,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC;AACzD,CAAC","sourcesContent":["/**\n * One exit for a result the user asked to have determined.\n *\n * Derive and map used to decide separately, and both treated \"not\n * established\" as success. A canonical agreement is a check that passed.\n * A check that ran and failed, a non-unique monomial, and a catalog\n * target whose dimension was computed through an unresolved name are\n * exit 3. A target that was not a bound catalog name, with no comparison,\n * stays exit 0.\n *\n * @module cli/determination\n * @internal\n */\n\nimport { EXIT_CHECK_FAILED } from './errors.js';\n\ninterface DeterminationInput {\n /** The user named a bound catalog target, or asked derive for a monomial. */\n readonly asked: boolean;\n /** A canonical comparison agreed, including when some other name has no catalog dimension. */\n readonly agrees: boolean;\n /** A check ran on resolved names and failed, or a canonical comparison is a mismatch. */\n readonly checkFailed: boolean;\n /** The governing set does not determine one monomial. */\n readonly notUnique: boolean;\n /** Names filled in rather than resolved. Empty when the command did not look any up. */\n readonly unresolved: readonly string[];\n}\n\n/** The exit code, report and gap of one derive or map determination. */\nexport interface Determination {\n readonly exit: 0 | typeof EXIT_CHECK_FAILED;\n readonly report: 'established' | 'nothing-checked' | 'check-failed' | 'not-established';\n /** Why a determination was not established. Empty otherwise. */\n readonly gap: string;\n}\n\n/** The exit derive and map share. @internal */\nexport function classifyDetermination(input: DeterminationInput): Determination {\n if (input.agrees) return { exit: 0, report: 'established', gap: '' };\n if (input.checkFailed) return { exit: EXIT_CHECK_FAILED, report: 'check-failed', gap: '' };\n const unresolved = [...new Set(input.unresolved)];\n if (input.asked && (input.notUnique || unresolved.length > 0)) {\n const gap = input.notUnique\n ? 'the monomial is not unique'\n : `unresolved ${unresolved.map((n) => `'${n}'`).join(', ')}`;\n return { exit: EXIT_CHECK_FAILED, report: 'not-established', gap };\n }\n if (input.asked) return { exit: 0, report: 'established', gap: '' };\n return { exit: 0, report: 'nothing-checked', gap: '' };\n}\n"]}
@@ -21,6 +21,7 @@ export declare const BUILTIN_VERBS: readonly {
21
21
  example: string;
22
22
  group: 'utilities';
23
23
  }[];
24
+ /** The usage heading of one flag, showing how its value is written. */
24
25
  export declare function flagHeading(flag: FlagSpec): string;
25
26
  /** The Flags block a command's help string ends with. Empty when the command takes no flags. */
26
27
  export declare function renderFlagCatalog(flags: readonly FlagSpec[], heading?: string): string;
@@ -1 +1 @@
1
- {"version":3,"file":"flag-help.d.ts","sourceRoot":"","sources":["../../src/cli/flag-help.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAE1C,gFAAgF;AAChF,eAAO,MAAM,SAAS,EAAE,QAIvB,CAAC;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AM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,WAAW,CAAC;CACpB,EAaA,CAAC;AAEF,uEAAuE;AACvE,wBAAgB,WAAW,CAAC,IAAI,EAAE,QAAQ,GAAG,MAAM,CAgBlD;AAED,gGAAgG;AAChG,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,SAAS,QAAQ,EAAE,EAAE,OAAO,SAAW,GAAG,MAAM,CAYxF;AAED,wFAAwF;AACxF,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,QAAQ,EAAE,GAAG,MAAM,CAG7E;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,QAAQ,EAAE,GAAG,MAAM,EAAE,CAEpF"}
@@ -66,6 +66,7 @@ export const BUILTIN_VERBS = [
66
66
  group: 'utilities',
67
67
  },
68
68
  ];
69
+ /** The usage heading of one flag, showing how its value is written. */
69
70
  export function flagHeading(flag) {
70
71
  const repeat = flag.repeatable ? ' (repeatable)' : '';
71
72
  switch (flag.valueStyle) {
@@ -1 +1 @@
1
- {"version":3,"file":"flag-help.js","sourceRoot":"","sources":["../../src/cli/flag-help.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,gFAAgF;AAChF,MAAM,CAAC,MAAM,SAAS,GAAa;IACjC,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE,MAAM;IAClB,WAAW,EAAE,6DAA6D;CAC3E,CAAC;AAEF;;;GAGG;AACH,MAAM,UAAU,UAAU,CAAC,YAAoB,EAAE,MAAc;IAC7D,OAAO;QACL,IAAI,EAAE,UAAU;QAChB,UAAU,EAAE,UAAU;QACtB,WAAW,EAAE,MAAM;QACnB,YAAY;KACb,CAAC;AACJ,CAAC;AAED,2EAA2E;AAC3E,MAAM,CAAC,MAAM,YAAY,GAAwB;IAC/C;QACE,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE,MA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,CAAC,IAAI,CAAC,WAAW,KAAK,SAAS,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC7H,CAAC","sourcesContent":["/**\n * Flag text for `upt help` and for `docs/CLI.md`.\n *\n * The parser reads `FlagSpec` (`args.ts`). This module renders the same\n * objects. A command's help string is `commandHelp(prose, flags)`, so the\n * Flags section cannot list a different set than the parser accepts.\n */\n\nimport type { FlagSpec } from './args.js';\n\n/** `--json` on a data-bearing command. The same object is the global option. */\nexport const JSON_FLAG: FlagSpec = {\n name: '--json',\n valueStyle: 'none',\n description: 'Write a JSON envelope to stdout instead of the text report.',\n};\n\n/**\n * `--source=VALUE` for a graph command.\n * `detail` is the sentence; `defaultValue` is what the command uses when the flag is absent.\n */\nexport function sourceFlag(defaultValue: string, detail: string): FlagSpec {\n return {\n name: '--source',\n valueStyle: 'attached',\n description: detail,\n defaultValue,\n };\n}\n\n/** Dispatcher options. `main.ts` accepts these before the command name. */\nexport const GLOBAL_FLAGS: readonly FlagSpec[] = [\n {\n name: '--help',\n valueStyle: 'none',\n description:\n 'Show this command list, or `upt help <command>` for one command. `-h` is the same. `upt <command> --help` prints that command.',\n },\n {\n name: '--version',\n valueStyle: 'none',\n description: 'Print the package version as one semver line and exit. `-v` and `upt version` are the same. Neither takes --json.',\n },\n JSON_FLAG,\n {\n name: '--record',\n valueStyle: 'attached',\n description:\n 'Run the following command unchanged and append one JSONL entry to FILE: arguments, stdout, stderr, exit code, versions, and hashes. A failed run is recorded too.',\n },\n {\n name: '--replay',\n valueStyle: 'attached',\n description:\n 'Re-run every entry of FILE and report reproduced, differs, or not replayable. Takes no command. `--json` after it selects the JSON report. Exit 0 when every entry is reproduced and unchanged, 3 when any differs, 1 otherwise.',\n },\n {\n name: '--show-record',\n valueStyle: 'attached',\n description: 'Print FILE as a transcript and run nothing. Takes no command. `--json` after it selects the JSON report.',\n },\n];\n\nexport const BUILTIN_VERBS: readonly {\n name: string;\n summary: string;\n example: string;\n group: 'utilities';\n}[] = [\n {\n name: 'help',\n summary: 'Show every command, or one command\\'s usage and flags. `upt help statuses` defines the status words.',\n example: 'upt help eval',\n group: 'utilities',\n },\n {\n name: 'version',\n summary: 'Print the installed package version as one semver line.',\n example: 'upt version',\n group: 'utilities',\n },\n];\n\nexport function flagHeading(flag: FlagSpec): string {\n const repeat = flag.repeatable ? ' (repeatable)' : '';\n switch (flag.valueStyle) {\n case 'none':\n return `${flag.name}${repeat}`;\n case 'attached':\n return `${flag.name}=VALUE${repeat}`;\n case 'next':\n return `${flag.name} VALUE${repeat}`;\n case 'either':\n return `${flag.name}=VALUE${repeat} (or ${flag.name} VALUE)`;\n default: {\n const _never: never = flag.valueStyle;\n return _never;\n }\n }\n}\n\n/** The Flags block a command's help string ends with. Empty when the command takes no flags. */\nexport function renderFlagCatalog(flags: readonly FlagSpec[], heading = 'Flags:'): string {\n if (flags.length === 0) return '';\n const lines = [heading];\n for (const flag of flags) {\n if (flag.description === undefined || flag.description.trim() === '') {\n throw new Error(`flag ${flag.name} has no description`);\n }\n lines.push(` ${flagHeading(flag)}`);\n const def = flag.defaultValue === undefined ? '' : ` Default: ${flag.defaultValue}.`;\n lines.push(` ${flag.description}${def}`);\n }\n return lines.join('\\n');\n}\n\n/** Prose plus the flag catalog. The catalog is the spec; the prose is the narrative. */\nexport function commandHelp(prose: string, flags: readonly FlagSpec[]): string {\n const catalog = renderFlagCatalog(flags);\n return catalog === '' ? prose : `${prose}\\n${catalog}`;\n}\n\n/**\n * Flags whose description is missing from `help`.\n * A command that forgot `commandHelp` fails here. A description that is present does not.\n */\nexport function undocumentedFlags(help: string, flags: readonly FlagSpec[]): string[] {\n return flags.filter((flag) => flag.description === undefined || !help.includes(flag.description)).map((flag) => flag.name);\n}\n"]}
1
+ {"version":3,"file":"flag-help.js","sourceRoot":"","sources":["../../src/cli/fl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,WAAW,GAAG,GAAG,EAAE,CAAC,CAAC;IAClD,CAAC;IACD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC;AAED,wFAAwF;AACxF,MAAM,UAAU,WAAW,CAAC,KAAa,EAAE,KAA0B;IACnE,MAAM,OAAO,GAAG,iBAAiB,CAAC,KAAK,CAAC,CAAC;IACzC,OAAO,OAAO,KAAK,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,KAAK,OAAO,EAAE,CAAC;AACzD,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,iBAAiB,CAAC,IAAY,EAAE,KAA0B;IACxE,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,KAAK,SAAS,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC7H,CAAC","sourcesContent":["/**\n * Flag text for `upt help` and for `docs/CLI.md`.\n *\n * The parser reads `FlagSpec` (`args.ts`). This module renders the same\n * objects. A command's help string is `commandHelp(prose, flags)`, so the\n * Flags section cannot list a different set than the parser accepts.\n */\n\nimport type { FlagSpec } from './args.js';\n\n/** `--json` on a data-bearing command. The same object is the global option. */\nexport const JSON_FLAG: FlagSpec = {\n name: '--json',\n valueStyle: 'none',\n description: 'Write a JSON envelope to stdout instead of the text report.',\n};\n\n/**\n * `--source=VALUE` for a graph command.\n * `detail` is the sentence; `defaultValue` is what the command uses when the flag is absent.\n */\nexport function sourceFlag(defaultValue: string, detail: string): FlagSpec {\n return {\n name: '--source',\n valueStyle: 'attached',\n description: detail,\n defaultValue,\n };\n}\n\n/** Dispatcher options. `main.ts` accepts these before the command name. */\nexport const GLOBAL_FLAGS: readonly FlagSpec[] = [\n {\n name: '--help',\n valueStyle: 'none',\n description:\n 'Show this command list, or `upt help <command>` for one command. `-h` is the same. `upt <command> --help` prints that command.',\n },\n {\n name: '--version',\n valueStyle: 'none',\n description: 'Print the package version as one semver line and exit. `-v` and `upt version` are the same. Neither takes --json.',\n },\n JSON_FLAG,\n {\n name: '--record',\n valueStyle: 'attached',\n description:\n 'Run the following command unchanged and append one JSONL entry to FILE: arguments, stdout, stderr, exit code, versions, and hashes. A failed run is recorded too.',\n },\n {\n name: '--replay',\n valueStyle: 'attached',\n description:\n 'Re-run every entry of FILE and report reproduced, differs, or not replayable. Takes no command. `--json` after it selects the JSON report. Exit 0 when every entry is reproduced and unchanged, 3 when any differs, 1 otherwise.',\n },\n {\n name: '--show-record',\n valueStyle: 'attached',\n description: 'Print FILE as a transcript and run nothing. Takes no command. `--json` after it selects the JSON report.',\n },\n];\n\nexport const BUILTIN_VERBS: readonly {\n name: string;\n summary: string;\n example: string;\n group: 'utilities';\n}[] = [\n {\n name: 'help',\n summary: 'Show every command, or one command\\'s usage and flags. `upt help statuses` defines the status words.',\n example: 'upt help eval',\n group: 'utilities',\n },\n {\n name: 'version',\n summary: 'Print the installed package version as one semver line.',\n example: 'upt version',\n group: 'utilities',\n },\n];\n\n/** The usage heading of one flag, showing how its value is written. */\nexport function flagHeading(flag: FlagSpec): string {\n const repeat = flag.repeatable ? ' (repeatable)' : '';\n switch (flag.valueStyle) {\n case 'none':\n return `${flag.name}${repeat}`;\n case 'attached':\n return `${flag.name}=VALUE${repeat}`;\n case 'next':\n return `${flag.name} VALUE${repeat}`;\n case 'either':\n return `${flag.name}=VALUE${repeat} (or ${flag.name} VALUE)`;\n default: {\n const _never: never = flag.valueStyle;\n return _never;\n }\n }\n}\n\n/** The Flags block a command's help string ends with. Empty when the command takes no flags. */\nexport function renderFlagCatalog(flags: readonly FlagSpec[], heading = 'Flags:'): string {\n if (flags.length === 0) return '';\n const lines = [heading];\n for (const flag of flags) {\n if (flag.description === undefined || flag.description.trim() === '') {\n throw new Error(`flag ${flag.name} has no description`);\n }\n lines.push(` ${flagHeading(flag)}`);\n const def = flag.defaultValue === undefined ? '' : ` Default: ${flag.defaultValue}.`;\n lines.push(` ${flag.description}${def}`);\n }\n return lines.join('\\n');\n}\n\n/** Prose plus the flag catalog. The catalog is the spec; the prose is the narrative. */\nexport function commandHelp(prose: string, flags: readonly FlagSpec[]): string {\n const catalog = renderFlagCatalog(flags);\n return catalog === '' ? prose : `${prose}\\n${catalog}`;\n}\n\n/**\n * Flags whose description is missing from `help`.\n * A command that forgot `commandHelp` fails here. A description that is present does not.\n */\nexport function undocumentedFlags(help: string, flags: readonly FlagSpec[]): string[] {\n return flags.filter((flag) => flag.description === undefined || !help.includes(flag.description)).map((flag) => flag.name);\n}\n"]}
@@ -7,7 +7,9 @@
7
7
  import type { BridgeEdge } from '../composition/edge.js';
8
8
  import type { ParsedArgs } from './args.js';
9
9
  import type { CommandCtx } from './command.js';
10
+ /** The graph that a command reads, as chosen by its `--source` flag. */
10
11
  export type SourceName = 'catalog' | 'canonical' | 'both';
12
+ /** Resolve the `--source` flag to graph edges, a banner label and the source name. */
11
13
  export declare function resolveGraph(api: CommandCtx['api'], flags: ParsedArgs['flags']): {
12
14
  graph: BridgeEdge[];
13
15
  label: string;
@@ -1 +1 @@
1
- {"version":3,"file":"graphs.d.ts","sourceRoot":"","sources":["../../src/cli/graphs.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG/C,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,WAAW,GAAG,MAAM,CAAC;AAE1D,wBAAgB,YAAY,CAC1B,GAAG,EAAE,UAAU,CAAC,KAAK,CAAC,EACtB,KAAK,EAAE,UAAU,CAAC,OAAO,CAAC,GACzB;IAAE,KAAK,EAAE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WAAW,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC,GAAG,MAAM,CAGlF;AAED,kFAAkF;AAClF,wBAAgB,QAAQ,CAAC,CAAC,EAAE,WAAW,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,GAAG,MAAM,CAEpE"}
@@ -5,6 +5,7 @@
5
5
  * this once to get the graph + a human-readable label for its banner.
6
6
  */
7
7
  import { CliError } from './errors.js';
8
+ /** Resolve the `--source` flag to graph edges, a banner label and the source name. */
8
9
  export function resolveGraph(api, flags) {
9
10
  const values = flags.get('source');
10
11
  const src = values && values.length > 0 ? values[values.length - 1] : 'catalog';
@@ -1 +1 @@
1
- {"version":3,"file":"graphs.js","sourceRoot":"","sources":["../../src/cli/graphs.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAIvC,MAAM,UAAU,YAAY,CAC1B,GAAsB,EACtB,KAA0B;IAE1B,MAAM,MAAM,GAAG,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IACnC,MAAM,GAAG,GAAG,MAAM,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAEhF,QAAQ,GAAG,EAAE,CAAC;QACZ,KAAK,SAAS;YACZ,OAAO;gBACL,KAAK,EAAE,CAAC,GAAG,GAAG,CAAC,aAAa,CAAC;gBAC7B,KAAK,EAAE,YAAY,GAAG,CAAC,gBAAgB,CAAC,MAAM,UAAU;gBACxD,MAAM,EAAE,SAAS;aAClB,CAAC;QACJ,KAAK,WAAW;YACd,OAAO;gBACL,KAAK,EAAE,CAAC,GAAG,GAAG,CAAC,eAAe,CAAC;gBAC/B,KAAK,EAAE,wDAAwD;gBAC/D,MAAM,EAAE,WAAW;aACpB,CAAC;QACJ,KAAK,MAAM;YACT,OAAO;gBACL,KAAK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M,UAAU,QAAQ,CAAC,CAAmC;IAC1D,OAAO,2DAA2D,CAAC,CAAC,gBAAgB,0CAA0C,CAAC,CAAC,KAAK,gBAAgB,CAAC;AACxJ,CAAC","sourcesContent":["/**\n * Shared `--source=catalog|canonical|both` graph resolution — replaces\n * `bin/upt.mjs`'s `resolveGraph` (lines 53-67). Every analysis command\n * (`discover` / `candidates` / `map` / ...) that accepts `--source` calls\n * this once to get the graph + a human-readable label for its banner.\n */\n\nimport type { BridgeEdge } from '../composition/edge.js';\nimport type { ParsedArgs } from './args.js';\nimport type { CommandCtx } from './command.js';\nimport { CliError } from './errors.js';\n\nexport type SourceName = 'catalog' | 'canonical' | 'both';\n\nexport function resolveGraph(\n api: CommandCtx['api'],\n flags: ParsedArgs['flags']\n): { graph: BridgeEdge[]; label: string; source: SourceName } {\n const values = flags.get('source');\n const src = values && values.length > 0 ? values[values.length - 1] : 'catalog';\n\n switch (src) {\n case 'catalog':\n return {\n graph: [...api.CATALOG_GRAPH],\n label: `catalog (${api.BRIDGE_EQUATIONS.length}-bridge)`,\n source: 'catalog',\n };\n case 'canonical':\n return {\n graph: [...api.CANONICAL_GRAPH],\n label: 'canonical (standard-physics L-layer, bridges excluded)',\n source: 'canonical',\n };\n case 'both':\n return {\n graph: [...api.CATALOG_GRAPH, ...api.CANONICAL_GRAPH],\n label: 'catalog + canonical',\n source: 'both',\n };\n default:\n throw new CliError(`upt: unknown --source='${src}' (expected: catalog | canonical | both)`);\n }\n}\n\n/**\n * What a result is anchored to (audit I3), printed beside the source in text and carried as the\n * envelope's `anchor` in `--json`. Two different anchors exist and are never merged:\n * `groundTruth` is the discovery funnel's known values (`--anchor=k=v`, default one solar mass);\n * `core` is the set of established-confidence edges that \"anchored\" means in a linkage view.\n */\nexport interface AnchorScope {\n readonly groundTruth?: { readonly values: Readonly<Record<string, number>>; readonly isDefault: boolean };\n readonly core?: { readonly establishedEdges: number; readonly edges: number };\n}\n\n/** The discovery ground truth a result is relative to: the `--anchor` values when given, else the default. */\nexport function groundTruthAnchor(\n api: CommandCtx['api'],\n opts: { readonly groundTruth?: Readonly<Record<string, number>> },\n): NonNullable<AnchorScope['groundTruth']> {\n return opts.groundTruth === undefined\n ? { values: { ...api.ANCHOR_DEFAULT }, isDefault: true }\n : { values: { ...opts.groundTruth }, isDefault: false };\n}\n\n/** The established core of `graph`: its established-confidence edge count beside its edge count. */\nexport function coreAnchor(graph: readonly BridgeEdge[]): NonNullable<AnchorScope['core']> {\n return { establishedEdges: graph.filter((e) => e.confidence === 'established').length, edges: graph.length };\n}\n\n/** The text line naming the ground-truth anchor and whether it is the default. */\nexport function groundTruthLine(a: NonNullable<AnchorScope['groundTruth']>): string {\n const values = Object.entries(a.values).map(([k, v]) => `${k}=${v}`).join(', ');\n return `anchor: ${values}${a.isDefault ? ' (the default; --anchor=k=v replaces it)' : ' (from --anchor)'}`;\n}\n\n/** The text line stating what \"anchored\" means for a graph's established core. */\nexport function coreLine(a: NonNullable<AnchorScope['core']>): string {\n return `anchored core: the clusters holding at least one of the ${a.establishedEdges} established-confidence edge(s) of the ${a.edges} in this graph`;\n}"]}
1
+ {"version":3,"file":"graphs.js","sourceRoot":"","sources":["../../src/cli/graphs.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAKvC,sFAAsF;AACtF,MAAM,UAAU,YAAY,CAC1B,GAAsB,EACtB,KAA0B;IAE1B,MAAM,MAAM,GAAG,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IACnC,MAAM,GAAG,GAAG,MAAM,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAEhF,QAAQ,GAAG,EAAE,CAAC;QACZ,KAAK,SAAS;YACZ,OAAO;gBACL,KAAK,EAAE,CAAC,GAAG,GAAG,CAAC,aA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M,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAChF,OAAO,WAAW,MAAM,GAAG,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,0CAA0C,CAAC,CAAC,CAAC,kBAAkB,EAAE,CAAC;AAC7G,CAAC;AAED,kFAAkF;AAClF,MAAM,UAAU,QAAQ,CAAC,CAAmC;IAC1D,OAAO,2DAA2D,CAAC,CAAC,gBAAgB,0CAA0C,CAAC,CAAC,KAAK,gBAAgB,CAAC;AACxJ,CAAC","sourcesContent":["/**\n * Shared `--source=catalog|canonical|both` graph resolution — replaces\n * `bin/upt.mjs`'s `resolveGraph` (lines 53-67). Every analysis command\n * (`discover` / `candidates` / `map` / ...) that accepts `--source` calls\n * this once to get the graph + a human-readable label for its banner.\n */\n\nimport type { BridgeEdge } from '../composition/edge.js';\nimport type { ParsedArgs } from './args.js';\nimport type { CommandCtx } from './command.js';\nimport { CliError } from './errors.js';\n\n/** The graph that a command reads, as chosen by its `--source` flag. */\nexport type SourceName = 'catalog' | 'canonical' | 'both';\n\n/** Resolve the `--source` flag to graph edges, a banner label and the source name. */\nexport function resolveGraph(\n api: CommandCtx['api'],\n flags: ParsedArgs['flags']\n): { graph: BridgeEdge[]; label: string; source: SourceName } {\n const values = flags.get('source');\n const src = values && values.length > 0 ? values[values.length - 1] : 'catalog';\n\n switch (src) {\n case 'catalog':\n return {\n graph: [...api.CATALOG_GRAPH],\n label: `catalog (${api.BRIDGE_EQUATIONS.length}-bridge)`,\n source: 'catalog',\n };\n case 'canonical':\n return {\n graph: [...api.CANONICAL_GRAPH],\n label: 'canonical (standard-physics L-layer, bridges excluded)',\n source: 'canonical',\n };\n case 'both':\n return {\n graph: [...api.CATALOG_GRAPH, ...api.CANONICAL_GRAPH],\n label: 'catalog + canonical',\n source: 'both',\n };\n default:\n throw new CliError(`upt: unknown --source='${src}' (expected: catalog | canonical | both)`);\n }\n}\n\n/**\n * What a result is anchored to (audit I3), printed beside the source in text and carried as the\n * envelope's `anchor` in `--json`. Two different anchors exist and are never merged:\n * `groundTruth` is the discovery funnel's known values (`--anchor=k=v`, default one solar mass);\n * `core` is the set of established-confidence edges that \"anchored\" means in a linkage view.\n */\nexport interface AnchorScope {\n readonly groundTruth?: { readonly values: Readonly<Record<string, number>>; readonly isDefault: boolean };\n readonly core?: { readonly establishedEdges: number; readonly edges: number };\n}\n\n/** The discovery ground truth a result is relative to: the `--anchor` values when given, else the default. */\nexport function groundTruthAnchor(\n api: CommandCtx['api'],\n opts: { readonly groundTruth?: Readonly<Record<string, number>> },\n): NonNullable<AnchorScope['groundTruth']> {\n return opts.groundTruth === undefined\n ? { values: { ...api.ANCHOR_DEFAULT }, isDefault: true }\n : { values: { ...opts.groundTruth }, isDefault: false };\n}\n\n/** The established core of `graph`: its established-confidence edge count beside its edge count. */\nexport function coreAnchor(graph: readonly BridgeEdge[]): NonNullable<AnchorScope['core']> {\n return { establishedEdges: graph.filter((e) => e.confidence === 'established').length, edges: graph.length };\n}\n\n/** The text line naming the ground-truth anchor and whether it is the default. */\nexport function groundTruthLine(a: NonNullable<AnchorScope['groundTruth']>): string {\n const values = Object.entries(a.values).map(([k, v]) => `${k}=${v}`).join(', ');\n return `anchor: ${values}${a.isDefault ? ' (the default; --anchor=k=v replaces it)' : ' (from --anchor)'}`;\n}\n\n/** The text line stating what \"anchored\" means for a graph's established core. */\nexport function coreLine(a: NonNullable<AnchorScope['core']>): string {\n return `anchored core: the clusters holding at least one of the ${a.establishedEdges} established-confidence edge(s) of the ${a.edges} in this graph`;\n}"]}
@@ -22,5 +22,6 @@ import './commands/index.js';
22
22
  * A thrown value that is not an Error, or an Error with no message, prints as its string.
23
23
  */
24
24
  export declare function reportInternalError(error: unknown, io?: Pick<Io, 'err'>): number;
25
+ /** Run one `upt` invocation and return its exit code. */
25
26
  export declare function runCli(argv: string[], io?: Io): Promise<number>;
26
27
  //# sourceMappingURL=main.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/cli/main.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAUH,OAAO,EAA8C,KAAK,EAAE,EAAE,MAAM,aAAa,CAAC;AAElF,OAAO,qBAAqB,CAAC;AAuB7B;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE,GAAE,IAAI,CAAC,EAAE,EAAE,KAAK,CAAa,GAAG,MAAM,CAI3F;AAiBD,wBAAsB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,GAAE,EAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAoDhF"}
1
+ {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/cli/main.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAUH,OAAO,EAA8C,KAAK,EAAE,EAAE,MAAM,aAAa,CAAC;AAElF,OAAO,qBAAqB,CAAC;AAuB7B;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE,GAAE,IAAI,CAAC,EAAE,EAAE,KAAK,CAAa,GAAG,MAAM,CAI3F;AAiBD,yDAAyD;AACzD,wBAAsB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,GAAE,EAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAoDhF"}
package/dist/cli/main.js CHANGED
@@ -62,6 +62,7 @@ const GLOBAL_FILE_OPTION = /^--(record|replay|show-record)(?:=(.*))?$/;
62
62
  * own flag spec parses it. `upt <command> --help` prints that command.
63
63
  */
64
64
  const NO_JSON_VERBS = new Set(['help', '--help', '-h', 'version', '--version', '-v']);
65
+ /** Run one `upt` invocation and return its exit code. */
65
66
  export async function runCli(argv, io = defaultIo) {
66
67
  const files = {};
67
68
  let json = false;