universal-physics-tensor 0.47.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/README.md +396 -383
- package/bin/upt.mjs +28 -22
- package/dist/atlas/benchmark/hybrid-retrieval.d.ts +108 -0
- package/dist/atlas/benchmark/hybrid-retrieval.d.ts.map +1 -0
- package/dist/atlas/benchmark/hybrid-retrieval.js +241 -0
- package/dist/atlas/benchmark/hybrid-retrieval.js.map +1 -0
- package/dist/atlas/catalog-formal-ref.d.ts +24 -0
- package/dist/atlas/catalog-formal-ref.d.ts.map +1 -0
- package/dist/atlas/catalog-formal-ref.js +36 -0
- package/dist/atlas/catalog-formal-ref.js.map +1 -0
- package/dist/atlas/composition-table.d.ts +11 -46
- package/dist/atlas/composition-table.d.ts.map +1 -1
- package/dist/atlas/composition-table.js +7 -124
- package/dist/atlas/composition-table.js.map +1 -1
- package/dist/atlas/conventions.d.ts +4 -58
- package/dist/atlas/conventions.d.ts.map +1 -1
- package/dist/atlas/conventions.js +3 -88
- package/dist/atlas/conventions.js.map +1 -1
- package/dist/atlas/derive-evidence.d.ts +50 -3
- package/dist/atlas/derive-evidence.d.ts.map +1 -1
- package/dist/atlas/derive-evidence.js +73 -4
- package/dist/atlas/derive-evidence.js.map +1 -1
- package/dist/atlas/diffusion/bridges-closure.d.ts.map +1 -1
- package/dist/atlas/diffusion/bridges-closure.js +5 -1
- package/dist/atlas/diffusion/bridges-closure.js.map +1 -1
- package/dist/atlas/index.d.ts +9 -7
- package/dist/atlas/index.d.ts.map +1 -1
- package/dist/atlas/index.js +6 -5
- package/dist/atlas/index.js.map +1 -1
- package/dist/atlas/oscillators/bridges-exact.d.ts.map +1 -1
- package/dist/atlas/oscillators/bridges-exact.js +6 -0
- package/dist/atlas/oscillators/bridges-exact.js.map +1 -1
- package/dist/atlas/oscillators/bridges-limits.d.ts +2 -0
- package/dist/atlas/oscillators/bridges-limits.d.ts.map +1 -1
- package/dist/atlas/oscillators/bridges-limits.js +20 -19
- package/dist/atlas/oscillators/bridges-limits.js.map +1 -1
- package/dist/atlas/oscillators/limit-witnesses.d.ts +93 -0
- package/dist/atlas/oscillators/limit-witnesses.d.ts.map +1 -0
- package/dist/atlas/oscillators/limit-witnesses.js +152 -0
- package/dist/atlas/oscillators/limit-witnesses.js.map +1 -0
- package/dist/atlas/oscillators/models.d.ts +2 -1
- package/dist/atlas/oscillators/models.d.ts.map +1 -1
- package/dist/atlas/oscillators/models.js +4 -3
- package/dist/atlas/oscillators/models.js.map +1 -1
- package/dist/atlas/oscillators/norm-transport-witness.d.ts +37 -0
- package/dist/atlas/oscillators/norm-transport-witness.d.ts.map +1 -0
- package/dist/atlas/oscillators/norm-transport-witness.js +58 -0
- package/dist/atlas/oscillators/norm-transport-witness.js.map +1 -0
- package/dist/atlas/oscillators/norm-transport.d.ts +44 -0
- package/dist/atlas/oscillators/norm-transport.d.ts.map +1 -0
- package/dist/atlas/oscillators/norm-transport.js +66 -0
- package/dist/atlas/oscillators/norm-transport.js.map +1 -0
- package/dist/atlas/oscillators/norms.d.ts +11 -0
- package/dist/atlas/oscillators/norms.d.ts.map +1 -0
- package/dist/atlas/oscillators/norms.js +11 -0
- package/dist/atlas/oscillators/norms.js.map +1 -0
- package/dist/atlas/oscillators/pendulum-motion.d.ts +38 -0
- package/dist/atlas/oscillators/pendulum-motion.d.ts.map +1 -0
- package/dist/atlas/oscillators/pendulum-motion.js +122 -0
- package/dist/atlas/oscillators/pendulum-motion.js.map +1 -0
- package/dist/atlas/oscillators/phase-carriage.d.ts +38 -0
- package/dist/atlas/oscillators/phase-carriage.d.ts.map +1 -0
- package/dist/atlas/oscillators/phase-carriage.js +96 -0
- package/dist/atlas/oscillators/phase-carriage.js.map +1 -0
- package/dist/atlas/oscillators/phase-translation.d.ts +46 -0
- package/dist/atlas/oscillators/phase-translation.d.ts.map +1 -0
- package/dist/atlas/oscillators/phase-translation.js +178 -0
- package/dist/atlas/oscillators/phase-translation.js.map +1 -0
- package/dist/atlas/oscillators/position-translation.d.ts +59 -0
- package/dist/atlas/oscillators/position-translation.d.ts.map +1 -0
- package/dist/atlas/oscillators/position-translation.js +254 -0
- package/dist/atlas/oscillators/position-translation.js.map +1 -0
- package/dist/atlas/path-bound.d.ts +126 -9
- package/dist/atlas/path-bound.d.ts.map +1 -1
- package/dist/atlas/path-bound.js +372 -23
- package/dist/atlas/path-bound.js.map +1 -1
- package/dist/atlas/physjs-ref.d.ts +112 -0
- package/dist/atlas/physjs-ref.d.ts.map +1 -0
- package/dist/atlas/physjs-ref.js +842 -0
- package/dist/atlas/physjs-ref.js.map +1 -0
- package/dist/atlas/regime.d.ts +12 -136
- package/dist/atlas/regime.d.ts.map +1 -1
- package/dist/atlas/regime.js +8 -254
- package/dist/atlas/regime.js.map +1 -1
- package/dist/atlas/serialize.d.ts.map +1 -1
- package/dist/atlas/serialize.js +25 -0
- package/dist/atlas/serialize.js.map +1 -1
- package/dist/atlas/translation-registry.d.ts +22 -0
- package/dist/atlas/translation-registry.d.ts.map +1 -0
- package/dist/atlas/translation-registry.js +31 -0
- package/dist/atlas/translation-registry.js.map +1 -0
- package/dist/atlas/translation.d.ts +116 -0
- package/dist/atlas/translation.d.ts.map +1 -0
- package/dist/atlas/translation.js +34 -0
- package/dist/atlas/translation.js.map +1 -0
- package/dist/atlas/types.d.ts +74 -240
- package/dist/atlas/types.d.ts.map +1 -1
- package/dist/atlas/types.js +5 -37
- package/dist/atlas/types.js.map +1 -1
- package/dist/atlas/waves/bridges-closure.d.ts.map +1 -1
- package/dist/atlas/waves/bridges-closure.js +4 -0
- package/dist/atlas/waves/bridges-closure.js.map +1 -1
- package/dist/atlas/waves/bridges.d.ts.map +1 -1
- package/dist/atlas/waves/bridges.js +3 -0
- package/dist/atlas/waves/bridges.js.map +1 -1
- package/dist/atlas/waves/models.js +1 -1
- package/dist/atlas/waves/models.js.map +1 -1
- package/dist/atlas/witness-dominance.d.ts +50 -0
- package/dist/atlas/witness-dominance.d.ts.map +1 -0
- package/dist/atlas/witness-dominance.js +86 -0
- package/dist/atlas/witness-dominance.js.map +1 -0
- package/dist/atlas/witness-specs.d.ts +30 -0
- package/dist/atlas/witness-specs.d.ts.map +1 -1
- package/dist/atlas/witness-specs.js +107 -0
- package/dist/atlas/witness-specs.js.map +1 -1
- package/dist/bridges/be53-yang-mills-confrontation.d.ts +81 -0
- package/dist/bridges/be53-yang-mills-confrontation.d.ts.map +1 -0
- package/dist/bridges/be53-yang-mills-confrontation.js +110 -0
- package/dist/bridges/be53-yang-mills-confrontation.js.map +1 -0
- package/dist/bridges/confrontations.d.ts +1 -1
- package/dist/bridges/confrontations.d.ts.map +1 -1
- package/dist/bridges/confrontations.js +291 -3
- package/dist/bridges/confrontations.js.map +1 -1
- package/dist/bridges/equations/be-13-einstein-trace.d.ts +2 -3
- package/dist/bridges/equations/be-13-einstein-trace.d.ts.map +1 -1
- package/dist/bridges/equations/be-13-einstein-trace.js +2 -3
- package/dist/bridges/equations/be-13-einstein-trace.js.map +1 -1
- package/dist/bridges/equations/be-38-mond.d.ts +7 -5
- package/dist/bridges/equations/be-38-mond.d.ts.map +1 -1
- package/dist/bridges/equations/be-38-mond.js +7 -5
- package/dist/bridges/equations/be-38-mond.js.map +1 -1
- package/dist/bridges/equations/be-53-yang-mills-beta.d.ts +21 -0
- package/dist/bridges/equations/be-53-yang-mills-beta.d.ts.map +1 -1
- package/dist/bridges/equations/be-53-yang-mills-beta.js +12 -0
- package/dist/bridges/equations/be-53-yang-mills-beta.js.map +1 -1
- package/dist/bridges/evaluator-inputs.d.ts +21 -0
- package/dist/bridges/evaluator-inputs.d.ts.map +1 -0
- package/dist/bridges/evaluator-inputs.js +75 -0
- package/dist/bridges/evaluator-inputs.js.map +1 -0
- package/dist/bridges/evaluators.d.ts +38 -0
- package/dist/bridges/evaluators.d.ts.map +1 -1
- package/dist/bridges/evaluators.js +41 -15
- package/dist/bridges/evaluators.js.map +1 -1
- package/dist/bridges/gravitational-lensing.d.ts +1 -1
- package/dist/bridges/gravitational-lensing.js +1 -1
- package/dist/bridges/index.d.ts +1 -1
- package/dist/bridges/index.d.ts.map +1 -1
- package/dist/bridges/index.js +13 -13
- package/dist/bridges/index.js.map +1 -1
- package/dist/bridges/observations/types.d.ts +110 -2
- package/dist/bridges/observations/types.d.ts.map +1 -1
- package/dist/bridges/observations/types.js +29 -0
- package/dist/bridges/observations/types.js.map +1 -1
- package/dist/bridges/perihelion-precession.d.ts +1 -1
- package/dist/bridges/perihelion-precession.js +1 -1
- package/dist/canonical/canonical-equation.d.ts +1 -1
- package/dist/canonical/canonical-equation.d.ts.map +1 -1
- package/dist/canonical/entries/atomic.d.ts.map +1 -1
- package/dist/canonical/entries/atomic.js +32 -10
- package/dist/canonical/entries/atomic.js.map +1 -1
- package/dist/canonical/entries/dimensional-classics.js +2 -2
- package/dist/canonical/entries/dimensional-classics.js.map +1 -1
- package/dist/canonical/entries/mechanics.d.ts.map +1 -1
- package/dist/canonical/entries/mechanics.js +10 -6
- package/dist/canonical/entries/mechanics.js.map +1 -1
- package/dist/canonical/entries/relativity.d.ts.map +1 -1
- package/dist/canonical/entries/relativity.js +41 -8
- package/dist/canonical/entries/relativity.js.map +1 -1
- package/dist/canonical/entries/thermo-nuclear-cosmo.js +5 -5
- package/dist/canonical/entries/thermo-nuclear-cosmo.js.map +1 -1
- package/dist/canonical/linkage.d.ts.map +1 -1
- package/dist/canonical/linkage.js +14 -8
- package/dist/canonical/linkage.js.map +1 -1
- package/dist/canonical/normal-form.d.ts +17 -0
- package/dist/canonical/normal-form.d.ts.map +1 -1
- package/dist/canonical/normal-form.js +21 -4
- package/dist/canonical/normal-form.js.map +1 -1
- package/dist/cases/brownian-sphere.d.ts +68 -0
- package/dist/cases/brownian-sphere.d.ts.map +1 -0
- package/dist/cases/brownian-sphere.js +353 -0
- package/dist/cases/brownian-sphere.js.map +1 -0
- package/dist/cases/damped-resonator.d.ts +23 -0
- package/dist/cases/damped-resonator.d.ts.map +1 -0
- package/dist/cases/damped-resonator.js +224 -0
- package/dist/cases/damped-resonator.js.map +1 -0
- package/dist/cases/index.d.ts +11 -0
- package/dist/cases/index.d.ts.map +1 -0
- package/dist/cases/index.js +29 -0
- package/dist/cases/index.js.map +1 -0
- package/dist/cases/kepler-rv.d.ts +13 -0
- package/dist/cases/kepler-rv.d.ts.map +1 -0
- package/dist/cases/kepler-rv.js +168 -0
- package/dist/cases/kepler-rv.js.map +1 -0
- package/dist/cases/lumped-cooling.d.ts +46 -0
- package/dist/cases/lumped-cooling.d.ts.map +1 -0
- package/dist/cases/lumped-cooling.js +261 -0
- package/dist/cases/lumped-cooling.js.map +1 -0
- package/dist/cases/quadrature.d.ts +14 -0
- package/dist/cases/quadrature.d.ts.map +1 -0
- package/dist/cases/quadrature.js +41 -0
- package/dist/cases/quadrature.js.map +1 -0
- package/dist/cases/resistor-noise.d.ts +14 -0
- package/dist/cases/resistor-noise.d.ts.map +1 -0
- package/dist/cases/resistor-noise.js +210 -0
- package/dist/cases/resistor-noise.js.map +1 -0
- package/dist/cases/skin-depth.d.ts +21 -0
- package/dist/cases/skin-depth.d.ts.map +1 -0
- package/dist/cases/skin-depth.js +174 -0
- package/dist/cases/skin-depth.js.map +1 -0
- package/dist/cases/types.d.ts +115 -0
- package/dist/cases/types.d.ts.map +1 -0
- package/dist/cases/types.js +20 -0
- package/dist/cases/types.js.map +1 -0
- package/dist/cli/commands/_atlas-map.d.ts +409 -0
- package/dist/cli/commands/_atlas-map.d.ts.map +1 -0
- package/dist/cli/commands/_atlas-map.js +1014 -0
- package/dist/cli/commands/_atlas-map.js.map +1 -0
- package/dist/cli/commands/_atlas-route.d.ts +111 -0
- package/dist/cli/commands/_atlas-route.d.ts.map +1 -0
- package/dist/cli/commands/_atlas-route.js +140 -0
- package/dist/cli/commands/_atlas-route.js.map +1 -0
- package/dist/cli/commands/_discovery-opts.d.ts.map +1 -1
- package/dist/cli/commands/_discovery-opts.js +10 -1
- package/dist/cli/commands/_discovery-opts.js.map +1 -1
- package/dist/cli/commands/atlas.d.ts +20 -0
- package/dist/cli/commands/atlas.d.ts.map +1 -1
- package/dist/cli/commands/atlas.js +333 -19
- package/dist/cli/commands/atlas.js.map +1 -1
- package/dist/cli/commands/audit.d.ts.map +1 -1
- package/dist/cli/commands/audit.js +14 -5
- package/dist/cli/commands/audit.js.map +1 -1
- package/dist/cli/commands/axes.js +4 -4
- package/dist/cli/commands/candidates.d.ts.map +1 -1
- package/dist/cli/commands/candidates.js +6 -5
- package/dist/cli/commands/candidates.js.map +1 -1
- package/dist/cli/commands/canonical.d.ts.map +1 -1
- package/dist/cli/commands/canonical.js +41 -12
- package/dist/cli/commands/canonical.js.map +1 -1
- package/dist/cli/commands/confront.d.ts.map +1 -1
- package/dist/cli/commands/confront.js +210 -28
- package/dist/cli/commands/confront.js.map +1 -1
- package/dist/cli/commands/connectors.d.ts.map +1 -1
- package/dist/cli/commands/connectors.js +11 -10
- package/dist/cli/commands/connectors.js.map +1 -1
- package/dist/cli/commands/coverage.js +3 -3
- package/dist/cli/commands/derive.d.ts.map +1 -1
- package/dist/cli/commands/derive.js +22 -10
- package/dist/cli/commands/derive.js.map +1 -1
- package/dist/cli/commands/discover.d.ts.map +1 -1
- package/dist/cli/commands/discover.js +149 -32
- package/dist/cli/commands/discover.js.map +1 -1
- package/dist/cli/commands/eval.d.ts.map +1 -1
- package/dist/cli/commands/eval.js +76 -17
- package/dist/cli/commands/eval.js.map +1 -1
- package/dist/cli/commands/evaluate.d.ts +30 -0
- package/dist/cli/commands/evaluate.d.ts.map +1 -1
- package/dist/cli/commands/evaluate.js +440 -25
- package/dist/cli/commands/evaluate.js.map +1 -1
- package/dist/cli/commands/explain.d.ts.map +1 -1
- package/dist/cli/commands/explain.js +38 -11
- package/dist/cli/commands/explain.js.map +1 -1
- package/dist/cli/commands/frontier.d.ts +3 -0
- package/dist/cli/commands/frontier.d.ts.map +1 -0
- package/dist/cli/commands/frontier.js +28 -0
- package/dist/cli/commands/frontier.js.map +1 -0
- package/dist/cli/commands/ground.d.ts.map +1 -1
- package/dist/cli/commands/ground.js +37 -12
- package/dist/cli/commands/ground.js.map +1 -1
- package/dist/cli/commands/index.d.ts +5 -0
- package/dist/cli/commands/index.d.ts.map +1 -1
- package/dist/cli/commands/index.js +5 -0
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/commands/map.d.ts +8 -0
- package/dist/cli/commands/map.d.ts.map +1 -1
- package/dist/cli/commands/map.js +401 -64
- package/dist/cli/commands/map.js.map +1 -1
- package/dist/cli/commands/metric.d.ts +3 -0
- package/dist/cli/commands/metric.d.ts.map +1 -0
- package/dist/cli/commands/metric.js +136 -0
- package/dist/cli/commands/metric.js.map +1 -0
- package/dist/cli/commands/path.d.ts +109 -1
- package/dist/cli/commands/path.d.ts.map +1 -1
- package/dist/cli/commands/path.js +1019 -109
- package/dist/cli/commands/path.js.map +1 -1
- package/dist/cli/commands/predict.d.ts.map +1 -1
- package/dist/cli/commands/predict.js +6 -5
- package/dist/cli/commands/predict.js.map +1 -1
- package/dist/cli/commands/priority.d.ts.map +1 -1
- package/dist/cli/commands/priority.js +4 -3
- package/dist/cli/commands/priority.js.map +1 -1
- package/dist/cli/commands/probe.d.ts +7 -0
- package/dist/cli/commands/probe.d.ts.map +1 -1
- package/dist/cli/commands/probe.js +234 -52
- package/dist/cli/commands/probe.js.map +1 -1
- package/dist/cli/commands/recover.d.ts.map +1 -1
- package/dist/cli/commands/recover.js +17 -6
- package/dist/cli/commands/recover.js.map +1 -1
- package/dist/cli/commands/regime.d.ts +1 -1
- package/dist/cli/commands/regime.d.ts.map +1 -1
- package/dist/cli/commands/regime.js +134 -33
- package/dist/cli/commands/regime.js.map +1 -1
- package/dist/cli/commands/retrieve.d.ts +3 -0
- package/dist/cli/commands/retrieve.d.ts.map +1 -0
- package/dist/cli/commands/retrieve.js +65 -0
- package/dist/cli/commands/retrieve.js.map +1 -0
- package/dist/cli/commands/search.d.ts +3 -0
- package/dist/cli/commands/search.d.ts.map +1 -0
- package/dist/cli/commands/search.js +70 -0
- package/dist/cli/commands/search.js.map +1 -0
- package/dist/cli/commands/symbolic.d.ts.map +1 -1
- package/dist/cli/commands/symbolic.js +112 -21
- package/dist/cli/commands/symbolic.js.map +1 -1
- package/dist/cli/commands/testplan.d.ts +3 -0
- package/dist/cli/commands/testplan.d.ts.map +1 -0
- package/dist/cli/commands/testplan.js +131 -0
- package/dist/cli/commands/testplan.js.map +1 -0
- package/dist/cli/conventions.d.ts +22 -0
- package/dist/cli/conventions.d.ts.map +1 -0
- package/dist/cli/conventions.js +48 -0
- package/dist/cli/conventions.js.map +1 -0
- package/dist/cli/euler-guard.d.ts +9 -0
- package/dist/cli/euler-guard.d.ts.map +1 -0
- package/dist/cli/euler-guard.js +11 -0
- package/dist/cli/euler-guard.js.map +1 -0
- package/dist/cli/eval-numbers.d.ts +26 -0
- package/dist/cli/eval-numbers.d.ts.map +1 -0
- package/dist/cli/eval-numbers.js +49 -0
- package/dist/cli/eval-numbers.js.map +1 -0
- package/dist/cli/expr-print.d.ts +25 -0
- package/dist/cli/expr-print.d.ts.map +1 -0
- package/dist/cli/expr-print.js +123 -0
- package/dist/cli/expr-print.js.map +1 -0
- package/dist/cli/graphs.d.ts +26 -0
- package/dist/cli/graphs.d.ts.map +1 -1
- package/dist/cli/graphs.js +19 -0
- package/dist/cli/graphs.js.map +1 -1
- package/dist/cli/main.d.ts +4 -10
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/main.js +370 -167
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/map-evidence.d.ts +47 -0
- package/dist/cli/map-evidence.d.ts.map +1 -0
- package/dist/cli/map-evidence.js +53 -0
- package/dist/cli/map-evidence.js.map +1 -0
- package/dist/cli/output.d.ts +21 -1
- package/dist/cli/output.d.ts.map +1 -1
- package/dist/cli/output.js +5 -1
- package/dist/cli/output.js.map +1 -1
- package/dist/{composition → cli}/poster-source.d.ts +3 -2
- package/dist/cli/poster-source.d.ts.map +1 -0
- package/dist/{composition → cli}/poster-source.js +2 -1
- package/dist/cli/poster-source.js.map +1 -0
- package/dist/cli/record-reach.d.ts +44 -0
- package/dist/cli/record-reach.d.ts.map +1 -0
- package/dist/cli/record-reach.js +228 -0
- package/dist/cli/record-reach.js.map +1 -0
- package/dist/cli/record-tables.d.ts +38 -0
- package/dist/cli/record-tables.d.ts.map +1 -0
- package/dist/cli/record-tables.js +110 -0
- package/dist/cli/record-tables.js.map +1 -0
- package/dist/cli/record.d.ts +141 -0
- package/dist/cli/record.d.ts.map +1 -0
- package/dist/cli/record.js +612 -0
- package/dist/cli/record.js.map +1 -0
- package/dist/cli/search-index.d.ts +56 -0
- package/dist/cli/search-index.d.ts.map +1 -0
- package/dist/cli/search-index.js +190 -0
- package/dist/cli/search-index.js.map +1 -0
- package/dist/cli/statuses.d.ts +25 -0
- package/dist/cli/statuses.d.ts.map +1 -0
- package/dist/cli/statuses.js +276 -0
- package/dist/cli/statuses.js.map +1 -0
- package/dist/cli/version.d.ts +8 -0
- package/dist/cli/version.d.ts.map +1 -1
- package/dist/cli/version.js +32 -1
- package/dist/cli/version.js.map +1 -1
- package/dist/cli-api.d.ts +33 -15
- package/dist/cli-api.d.ts.map +1 -1
- package/dist/cli-api.js +31 -11
- package/dist/cli-api.js.map +1 -1
- package/dist/composition/bridge-analysis.d.ts.map +1 -1
- package/dist/composition/bridge-analysis.js +2 -1
- package/dist/composition/bridge-analysis.js.map +1 -1
- package/dist/composition/canonical-compare.d.ts +36 -11
- package/dist/composition/canonical-compare.d.ts.map +1 -1
- package/dist/composition/canonical-compare.js +424 -56
- package/dist/composition/canonical-compare.js.map +1 -1
- package/dist/composition/canonical-graph.d.ts +2 -2
- package/dist/composition/canonical-graph.js +3 -3
- package/dist/composition/canonical-graph.js.map +1 -1
- package/dist/composition/canonical-prefactors.d.ts +24 -1
- package/dist/composition/canonical-prefactors.d.ts.map +1 -1
- package/dist/composition/canonical-prefactors.js +97 -1
- package/dist/composition/canonical-prefactors.js.map +1 -1
- package/dist/composition/compose-symbolic.js +1 -1
- package/dist/composition/compose-symbolic.js.map +1 -1
- package/dist/composition/compose.d.ts.map +1 -1
- package/dist/composition/compose.js +17 -9
- package/dist/composition/compose.js.map +1 -1
- package/dist/composition/composition-recovery.d.ts +47 -0
- package/dist/composition/composition-recovery.d.ts.map +1 -0
- package/dist/composition/composition-recovery.js +77 -0
- package/dist/composition/composition-recovery.js.map +1 -0
- package/dist/composition/consequence.d.ts +39 -0
- package/dist/composition/consequence.d.ts.map +1 -1
- package/dist/composition/consequence.js +37 -0
- package/dist/composition/consequence.js.map +1 -1
- package/dist/composition/discovery.d.ts +20 -0
- package/dist/composition/discovery.d.ts.map +1 -1
- package/dist/composition/discovery.js +27 -5
- package/dist/composition/discovery.js.map +1 -1
- package/dist/composition/edge.d.ts +1 -1
- package/dist/composition/edge.d.ts.map +1 -1
- package/dist/composition/edge.js.map +1 -1
- package/dist/composition/edges/_catalog-helpers.d.ts +4 -0
- package/dist/composition/edges/_catalog-helpers.d.ts.map +1 -1
- package/dist/composition/edges/_catalog-helpers.js +15 -0
- package/dist/composition/edges/_catalog-helpers.js.map +1 -1
- package/dist/composition/edges/calibration.d.ts.map +1 -1
- package/dist/composition/edges/calibration.js +57 -0
- package/dist/composition/edges/calibration.js.map +1 -1
- package/dist/composition/edges/catalog-fields.d.ts.map +1 -1
- package/dist/composition/edges/catalog-fields.js +2 -1
- package/dist/composition/edges/catalog-fields.js.map +1 -1
- package/dist/composition/edges/catalog-gravitation-cosmology.d.ts.map +1 -1
- package/dist/composition/edges/catalog-gravitation-cosmology.js +2 -1
- package/dist/composition/edges/catalog-gravitation-cosmology.js.map +1 -1
- package/dist/composition/edges/catalog-quantum.d.ts.map +1 -1
- package/dist/composition/edges/catalog-quantum.js +26 -0
- package/dist/composition/edges/catalog-quantum.js.map +1 -1
- package/dist/composition/edges/catalog-tranche.d.ts.map +1 -1
- package/dist/composition/edges/catalog-tranche.js +2 -1
- package/dist/composition/edges/catalog-tranche.js.map +1 -1
- package/dist/composition/expr-eval.d.ts.map +1 -1
- package/dist/composition/expr-eval.js +4 -1
- package/dist/composition/expr-eval.js.map +1 -1
- package/dist/composition/expr-simplify.js +1 -1
- package/dist/composition/expr-simplify.js.map +1 -1
- package/dist/composition/frontier-account.d.ts +78 -0
- package/dist/composition/frontier-account.d.ts.map +1 -0
- package/dist/composition/frontier-account.js +127 -0
- package/dist/composition/frontier-account.js.map +1 -0
- package/dist/composition/graph-viz.d.ts +7 -22
- package/dist/composition/graph-viz.d.ts.map +1 -1
- package/dist/composition/graph-viz.js +4 -27
- package/dist/composition/graph-viz.js.map +1 -1
- package/dist/composition/grounding.d.ts +49 -0
- package/dist/composition/grounding.d.ts.map +1 -1
- package/dist/composition/grounding.js +38 -0
- package/dist/composition/grounding.js.map +1 -1
- package/dist/composition/index.d.ts +0 -2
- package/dist/composition/index.d.ts.map +1 -1
- package/dist/composition/index.js +1 -1
- package/dist/composition/index.js.map +1 -1
- package/dist/composition/probe/expression-gaps.d.ts +27 -0
- package/dist/composition/probe/expression-gaps.d.ts.map +1 -0
- package/dist/composition/probe/expression-gaps.js +47 -0
- package/dist/composition/probe/expression-gaps.js.map +1 -0
- package/dist/composition/probe/frontier.d.ts +2 -1
- package/dist/composition/probe/frontier.d.ts.map +1 -1
- package/dist/composition/probe/frontier.js +3 -2
- package/dist/composition/probe/frontier.js.map +1 -1
- package/dist/composition/probe/index.d.ts +4 -1
- package/dist/composition/probe/index.d.ts.map +1 -1
- package/dist/composition/probe/index.js +3 -1
- package/dist/composition/probe/index.js.map +1 -1
- package/dist/composition/probe/pipeline.d.ts +2 -0
- package/dist/composition/probe/pipeline.d.ts.map +1 -1
- package/dist/composition/probe/pipeline.js +6 -2
- package/dist/composition/probe/pipeline.js.map +1 -1
- package/dist/composition/probe/problem.d.ts +7 -0
- package/dist/composition/probe/problem.d.ts.map +1 -1
- package/dist/composition/probe/problem.js +15 -5
- package/dist/composition/probe/problem.js.map +1 -1
- package/dist/composition/probe/search-budget.d.ts.map +1 -1
- package/dist/composition/probe/search-budget.js +6 -2
- package/dist/composition/probe/search-budget.js.map +1 -1
- package/dist/composition/probe/study.d.ts +340 -0
- package/dist/composition/probe/study.d.ts.map +1 -0
- package/dist/composition/probe/study.js +1519 -0
- package/dist/composition/probe/study.js.map +1 -0
- package/dist/composition/proposed-bridges.js +1 -1
- package/dist/composition/proposed-bridges.js.map +1 -1
- package/dist/composition/quantities.d.ts +4 -16
- package/dist/composition/quantities.d.ts.map +1 -1
- package/dist/composition/quantities.js +4 -16
- package/dist/composition/quantities.js.map +1 -1
- package/dist/composition/retrodiction.d.ts.map +1 -1
- package/dist/composition/retrodiction.js +6 -2
- package/dist/composition/retrodiction.js.map +1 -1
- package/dist/composition/uncertainty.d.ts +1 -1
- package/dist/composition/uncertainty.d.ts.map +1 -1
- package/dist/composition/user-equation.d.ts +87 -14
- package/dist/composition/user-equation.d.ts.map +1 -1
- package/dist/composition/user-equation.js +266 -59
- package/dist/composition/user-equation.js.map +1 -1
- package/dist/core/constants.d.ts +9 -4
- package/dist/core/constants.d.ts.map +1 -1
- package/dist/core/constants.js +9 -4
- package/dist/core/constants.js.map +1 -1
- package/dist/core/types.d.ts +1 -1
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/types.js +2 -1
- package/dist/core/types.js.map +1 -1
- package/dist/dimensional/curvature.d.ts +7 -56
- package/dist/dimensional/curvature.d.ts.map +1 -1
- package/dist/dimensional/curvature.js +7 -76
- package/dist/dimensional/curvature.js.map +1 -1
- package/dist/dimensional/dimension-spec.d.ts +7 -1
- package/dist/dimensional/dimension-spec.d.ts.map +1 -1
- package/dist/dimensional/dimension-spec.js +131 -3
- package/dist/dimensional/dimension-spec.js.map +1 -1
- package/dist/dimensional/formula-names.d.ts +30 -0
- package/dist/dimensional/formula-names.d.ts.map +1 -0
- package/dist/dimensional/formula-names.js +37 -0
- package/dist/dimensional/formula-names.js.map +1 -0
- package/dist/dimensional/natural-units.d.ts +33 -0
- package/dist/dimensional/natural-units.d.ts.map +1 -0
- package/dist/dimensional/natural-units.js +58 -0
- package/dist/dimensional/natural-units.js.map +1 -0
- package/dist/{composition → dimensional}/symbolic-constants.d.ts +21 -2
- package/dist/dimensional/symbolic-constants.d.ts.map +1 -0
- package/dist/dimensional/symbolic-constants.js +116 -0
- package/dist/dimensional/symbolic-constants.js.map +1 -0
- package/dist/dimensional/unit-convention.d.ts +30 -0
- package/dist/dimensional/unit-convention.d.ts.map +1 -0
- package/dist/dimensional/unit-convention.js +60 -0
- package/dist/dimensional/unit-convention.js.map +1 -0
- package/dist/dimensional/units.d.ts +43 -0
- package/dist/dimensional/units.d.ts.map +1 -0
- package/dist/dimensional/units.js +197 -0
- package/dist/dimensional/units.js.map +1 -0
- package/dist/index.d.ts +8 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -3
- package/dist/index.js.map +1 -1
- package/dist/numerical/bianchi-residual.d.ts +55 -0
- package/dist/numerical/bianchi-residual.d.ts.map +1 -0
- package/dist/numerical/bianchi-residual.js +79 -0
- package/dist/numerical/bianchi-residual.js.map +1 -0
- package/dist/numerical/binding-value.d.ts +67 -0
- package/dist/numerical/binding-value.d.ts.map +1 -0
- package/dist/numerical/binding-value.js +347 -0
- package/dist/numerical/binding-value.js.map +1 -0
- package/dist/numerical/connection-lowering-helpers.d.ts.map +1 -1
- package/dist/numerical/connection-lowering-helpers.js +13 -26
- package/dist/numerical/connection-lowering-helpers.js.map +1 -1
- package/dist/numerical/curvature-lowering-helpers.d.ts.map +1 -1
- package/dist/numerical/curvature-lowering-helpers.js +9 -0
- package/dist/numerical/curvature-lowering-helpers.js.map +1 -1
- package/dist/numerical/float64-engine.d.ts.map +1 -1
- package/dist/numerical/float64-engine.js +23 -16
- package/dist/numerical/float64-engine.js.map +1 -1
- package/dist/numerical/formula-dimension.d.ts +7 -0
- package/dist/numerical/formula-dimension.d.ts.map +1 -1
- package/dist/numerical/formula-dimension.js +23 -6
- package/dist/numerical/formula-dimension.js.map +1 -1
- package/dist/numerical/formula-mathts.d.ts.map +1 -1
- package/dist/numerical/formula-mathts.js +68 -6
- package/dist/numerical/formula-mathts.js.map +1 -1
- package/dist/numerical/formula.d.ts +27 -0
- package/dist/numerical/formula.d.ts.map +1 -1
- package/dist/numerical/formula.js +68 -6
- package/dist/numerical/formula.js.map +1 -1
- package/dist/numerical/spacetime-metrics.d.ts +243 -0
- package/dist/numerical/spacetime-metrics.d.ts.map +1 -0
- package/dist/numerical/spacetime-metrics.js +1056 -0
- package/dist/numerical/spacetime-metrics.js.map +1 -0
- package/dist/relations/composition-table.d.ts +61 -0
- package/dist/relations/composition-table.d.ts.map +1 -0
- package/dist/relations/composition-table.js +140 -0
- package/dist/relations/composition-table.js.map +1 -0
- package/dist/relations/conventions.d.ts +63 -0
- package/dist/relations/conventions.d.ts.map +1 -0
- package/dist/relations/conventions.js +93 -0
- package/dist/relations/conventions.js.map +1 -0
- package/dist/relations/regime.d.ts +159 -0
- package/dist/relations/regime.d.ts.map +1 -0
- package/dist/relations/regime.js +304 -0
- package/dist/relations/regime.js.map +1 -0
- package/dist/relations/types.d.ts +259 -0
- package/dist/relations/types.d.ts.map +1 -0
- package/dist/relations/types.js +37 -0
- package/dist/relations/types.js.map +1 -0
- package/package.json +166 -163
- package/dist/composition/poster-source.d.ts.map +0 -1
- package/dist/composition/poster-source.js.map +0 -1
- package/dist/composition/symbolic-constants.d.ts.map +0 -1
- package/dist/composition/symbolic-constants.js +0 -65
- package/dist/composition/symbolic-constants.js.map +0 -1
package/dist/cli/commands/map.js
CHANGED
|
@@ -14,10 +14,14 @@
|
|
|
14
14
|
*/
|
|
15
15
|
import { writeFileSync } from 'node:fs';
|
|
16
16
|
import { registerCommand } from '../command.js';
|
|
17
|
-
import { resolveGraph } from '../graphs.js';
|
|
17
|
+
import { resolveGraph, coreAnchor, coreLine, groundTruthAnchor, groundTruthLine } from '../graphs.js';
|
|
18
18
|
import { emitJson } from '../output.js';
|
|
19
19
|
import { UsageError, CliError, EXIT_CHECK_FAILED } from '../errors.js';
|
|
20
20
|
import { parseDiscoveryOpts } from './_discovery-opts.js';
|
|
21
|
+
import * as atlasMap from './_atlas-map.js';
|
|
22
|
+
import { canonicalCheckFailed, conventionLines } from '../conventions.js';
|
|
23
|
+
import { naturalConstantOverrides } from '../../dimensional/natural-units.js';
|
|
24
|
+
import { withCatalogEvidence } from '../map-evidence.js';
|
|
21
25
|
const FLAGS = [
|
|
22
26
|
{ name: '--source', valueStyle: 'attached' },
|
|
23
27
|
{ name: '--format', valueStyle: 'attached' },
|
|
@@ -27,49 +31,143 @@ const FLAGS = [
|
|
|
27
31
|
{ name: '--proposed', valueStyle: 'none' },
|
|
28
32
|
{ name: '--relation', valueStyle: 'attached' },
|
|
29
33
|
{ name: '--evidence', valueStyle: 'attached' },
|
|
34
|
+
{ name: '--around', valueStyle: 'either' },
|
|
35
|
+
{ name: '--depth', valueStyle: 'attached' },
|
|
36
|
+
{ name: '--route', valueStyle: 'either' },
|
|
37
|
+
{ name: '--all-routes', valueStyle: 'none' },
|
|
38
|
+
{ name: '--max-routes', valueStyle: 'attached' },
|
|
39
|
+
{ name: '--family', valueStyle: 'either' },
|
|
40
|
+
{ name: '--observable', valueStyle: 'either' },
|
|
41
|
+
{ name: '--stored', valueStyle: 'none' },
|
|
42
|
+
{ name: '--run', valueStyle: 'none' },
|
|
30
43
|
// optionalValue: a bare trailing --equation stores '' so the empty-check in
|
|
31
44
|
// run() owns the diagnostic (old-CLI fidelity: bin/upt.mjs did `a[i+1] ?? ''`
|
|
32
45
|
// and let mapCmd emit `upt: --equation requires "TARGET = EXPR"`, exit 2).
|
|
33
46
|
{ name: '--equation', valueStyle: 'either', optionalValue: true },
|
|
47
|
+
{ name: '--equation-only', valueStyle: 'none' },
|
|
48
|
+
{ name: '--verbose', valueStyle: 'none' },
|
|
49
|
+
{ name: '--bind-short', valueStyle: 'none' },
|
|
50
|
+
{ name: '--natural', valueStyle: 'none' },
|
|
51
|
+
{ name: '--geometrized', valueStyle: 'none' },
|
|
34
52
|
{ name: '--json', valueStyle: 'none' },
|
|
35
53
|
];
|
|
36
|
-
const HELP = `upt map [--source=catalog|canonical|both|poster] [--format=text|mermaid|dot|svg]
|
|
37
|
-
[--proposed] [--
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
--
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
dot
|
|
58
|
-
|
|
59
|
-
(default
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
--
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
54
|
+
const HELP = `upt map [--source=catalog|canonical|both|poster] [--format=text|mermaid|dot|svg]
|
|
55
|
+
[--proposed [--anchor=k=v,...] [--max-orders=N]] [--out=PATH]
|
|
56
|
+
[--equation "TARGET = EXPR" [--equation-only] [--verbose] [--bind-short]
|
|
57
|
+
[--natural] [--geometrized]] [--around=QUANTITY [--depth=N]]
|
|
58
|
+
[--relation=TYPE] [--evidence=TAG] [--route=FROM,TO [--all-routes
|
|
59
|
+
[--max-routes=N]]] [--family=NAME] [--observable=NAME] [--stored | --run]
|
|
60
|
+
Map how the equations LINK: connected components (clusters) of the
|
|
61
|
+
graph by shared quantities, the anchored core, the link hubs, and
|
|
62
|
+
the isolated tail.
|
|
63
|
+
--source defaults to 'both' (catalog + canonical) — a pure
|
|
64
|
+
connectivity question gets the honest, all-known-physics answer by
|
|
65
|
+
default; --source=catalog shows the bridge-catalog view alone.
|
|
66
|
+
--source=poster draws the ATLAS PHASE 3 POSTER INDEX instead of the
|
|
67
|
+
bridge graph: nodes are STATEMENTS (including the hidden supporting
|
|
68
|
+
nodes — action principle, Noether, the full Maxwell system, the
|
|
69
|
+
Lorentz group, the central limit theorem) and boxes are DERIVATIONS
|
|
70
|
+
(premises in, conclusion out). Associations are drawn DASHED because
|
|
71
|
+
they assert no relation at all. It also reports any premise naming a
|
|
72
|
+
statement the registry does not define, and says so out loud when the
|
|
73
|
+
index is not registered in this build rather than printing an empty
|
|
74
|
+
map as an answer.
|
|
75
|
+
--format=mermaid|dot|svg emits the VISUAL map (quantities = nodes,
|
|
76
|
+
equations = junctions colored by status, one subgraph per component).
|
|
77
|
+
text (default) is the unchanged linkage printout. svg renders the dot
|
|
78
|
+
layout via the optional @viz-js/viz peer (npm i @viz-js/viz; or pipe
|
|
79
|
+
dot through "dot -Tsvg"). --proposed overlays the unadjudicated
|
|
80
|
+
identity-consequence relations (gray dashed); --anchor and --max-orders
|
|
81
|
+
tune the discovery funnel that derives them, as in \`upt discover\`.
|
|
82
|
+
--out writes to a file (default stdout).
|
|
83
|
+
--equation "TARGET = EXPR" injects YOUR OWN equation as a violet 'user'
|
|
84
|
+
node, dimensionally checks it, compares with the canonical registry, and
|
|
85
|
+
reports nearest equations by shared-quantity overlap (not a full edge
|
|
86
|
+
dump). Multi-word names may use underscores or catalog hyphens
|
|
87
|
+
(planck_length / planck-length). Unknown names get a "did you mean?",
|
|
88
|
+
and a registered constant of the inferred dimension (sigma → sigma_sb);
|
|
89
|
+
a one-letter catalog name (a, r, …) is reported and not bound; --bind-short
|
|
90
|
+
binds it. The alias T → temperature still binds.
|
|
91
|
+
An all-constant right-hand side (the Planck length) is compared at the
|
|
92
|
+
SI constant values when its target is a catalog quantity.
|
|
93
|
+
With --equation, the default is the verdict only. --verbose prints the
|
|
94
|
+
linkage map after it. --equation-only is the same verdict and errors
|
|
95
|
+
when --equation is missing (with --json: no "linkage" field).
|
|
96
|
+
A bare e in the formula is the elementary charge. E is energy.
|
|
97
|
+
Euler's number is exp(1) or euler.
|
|
98
|
+
--natural sets ħ = c = 1 for a dimension difference that is a power of
|
|
99
|
+
those constants; --geometrized also allows powers of G. The SI default
|
|
100
|
+
still refuses rest_energy = mass.
|
|
101
|
+
--relation=TYPE keeps only edges whose recorded Atlas relation is that
|
|
102
|
+
type; --evidence=TAG keeps only edges whose evidence set, DERIVED from
|
|
103
|
+
the catalog row at read time, contains that tag.
|
|
104
|
+
⚠ Filtering changes what a missing overlay means: unfiltered, an edge
|
|
105
|
+
with no overlay is KEPT; filtered, it is DROPPED, because nothing shows
|
|
106
|
+
it satisfies the filter. Those drops are counted and printed separately
|
|
107
|
+
from the edges that simply did not match — an unaudited graph must not
|
|
108
|
+
render as a complete answer.
|
|
109
|
+
--around=QUANTITY [--depth=N] keeps only the edges within N
|
|
110
|
+
shared-quantity hops of QUANTITY (default 1: the edges that use it),
|
|
111
|
+
in every output form, and prints how many of the source's edges it
|
|
112
|
+
kept: the others are omitted from the view, not absent from the graph.
|
|
113
|
+
--route=FROM,TO and --family=NAME map the ATLAS instead: models and
|
|
114
|
+
the recorded bridges between them, not shared quantities. --route
|
|
115
|
+
shows the route \`upt path\` reports, each bridge's relation,
|
|
116
|
+
assumptions, regime, bound and derived evidence, the composition
|
|
117
|
+
step by step (and where the table yields no composite claim), and
|
|
118
|
+
the equations each model records. --family shows one family's
|
|
119
|
+
models, its bridges, the bridges from other families that touch it,
|
|
120
|
+
and its rejections; --relation/--evidence filter its bridges, and a
|
|
121
|
+
bridge whose tag depends on witness results is counted as undecided,
|
|
122
|
+
not as a mismatch. A model's equations are only those its
|
|
123
|
+
canonicalRefs record; nothing is inferred from shared quantities.
|
|
124
|
+
--route=FROM,TO --all-routes lists every simple route (no model
|
|
125
|
+
visited twice), shortest first, each with its composition and route
|
|
126
|
+
claim, and counts the claims; --max-routes=N (default 20, at most
|
|
127
|
+
1000) bounds the list, and a list cut short says so and says up to
|
|
128
|
+
which bridge count it is complete.
|
|
129
|
+
--observable=NAME maps the bridges whose RECORDED preserves text, or
|
|
130
|
+
declared bound translation, names that observable (a whole-word text
|
|
131
|
+
match, nothing inferred), lists apart those recording it as NOT
|
|
132
|
+
preserved, and counts the bridges that record nothing about it;
|
|
133
|
+
--relation/--evidence filter it as they filter a family.
|
|
134
|
+
--stored derives evidence from the committed witness results
|
|
135
|
+
(data/atlas/witness-results.json; a repository file, not shipped),
|
|
136
|
+
labelled with the last commit that touched it; --run runs the shown
|
|
137
|
+
bridges' in-process registered witnesses now (exit 3 if any is
|
|
138
|
+
refuted). Either resolves a tag once its witnesses have results; a
|
|
139
|
+
witness with no result leaves it undecided, and checked, refuted and
|
|
140
|
+
unresolved are counted apart.
|
|
141
|
+
Every atlas view states how many of the atlas's models and bridges it
|
|
142
|
+
shows, in text, --json and --format=mermaid|dot|svg.
|
|
143
|
+
e.g. upt map --relation=derivation --source=both
|
|
144
|
+
upt map --around=temperature --depth=2 --source=catalog
|
|
145
|
+
upt map --route=model-pendulum,model-lc
|
|
146
|
+
upt map --route=model-string,model-dalembert --all-routes --stored
|
|
147
|
+
upt map --family=oscillators --evidence=formally-proved
|
|
148
|
+
upt map --observable=frequency --run`;
|
|
149
|
+
/**
|
|
150
|
+
* The edges within `depth` shared-quantity hops of `quantity`: hop 1 is every
|
|
151
|
+
* edge that has it as a source or target, and each further hop adds the edges
|
|
152
|
+
* sharing a quantity with one already kept.
|
|
153
|
+
* @internal
|
|
154
|
+
*/
|
|
155
|
+
export function neighbourhood(graph, quantity, depth) {
|
|
156
|
+
const names = (e) => [...e.sources.map((q) => q.name), e.target.name];
|
|
157
|
+
const reached = new Set([quantity]);
|
|
158
|
+
const kept = new Set();
|
|
159
|
+
for (let hop = 0; hop < depth; hop++) {
|
|
160
|
+
const frontier = graph.filter((e) => !kept.has(e) && names(e).some((n) => reached.has(n)));
|
|
161
|
+
if (frontier.length === 0)
|
|
162
|
+
break;
|
|
163
|
+
for (const e of frontier) {
|
|
164
|
+
kept.add(e);
|
|
165
|
+
for (const n of names(e))
|
|
166
|
+
reached.add(n);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
return graph.filter((e) => kept.has(e));
|
|
170
|
+
}
|
|
73
171
|
const RELATION_TYPES = [
|
|
74
172
|
'derivation',
|
|
75
173
|
'exact-equivalence',
|
|
@@ -88,6 +186,8 @@ const EVIDENCE_TAGS = [
|
|
|
88
186
|
'symbolically-checked',
|
|
89
187
|
'numerically-supported',
|
|
90
188
|
'formally-proved',
|
|
189
|
+
'formally-proved-property',
|
|
190
|
+
'formally-proved-cross-check',
|
|
91
191
|
'empirically-supported',
|
|
92
192
|
'contradicted',
|
|
93
193
|
'unresolved',
|
|
@@ -125,41 +225,71 @@ function proposedJunctions(api, graph, flags) {
|
|
|
125
225
|
// the (testable) library analysis: parse + dimensional validation + "did you
|
|
126
226
|
// mean?" hints. The library owns the physics (constants' dimensions, inference);
|
|
127
227
|
// the CLI only formats.
|
|
128
|
-
async function analyzeEquation(api, equation, graph) {
|
|
228
|
+
async function analyzeEquation(api, equation, graph, options) {
|
|
129
229
|
const catalogDims = new Map();
|
|
130
230
|
for (const e of graph) {
|
|
131
231
|
for (const q of [...e.sources, e.target])
|
|
132
232
|
catalogDims.set(q.name, q.dim);
|
|
133
233
|
}
|
|
134
|
-
const user = await api.analyzeUserEquation(equation, catalogDims);
|
|
234
|
+
const user = await api.analyzeUserEquation(equation, catalogDims, options);
|
|
135
235
|
// Dimensions cannot see a prefactor: compare with the canonical equation the
|
|
136
236
|
// user's one restates, when the registry holds one (persona finding L2).
|
|
137
|
-
const comparisons = user.parseError
|
|
237
|
+
const comparisons = user.parseError
|
|
238
|
+
? []
|
|
239
|
+
: await api.compareUserEquation(equation, catalogDims, {
|
|
240
|
+
bindShortNames: options?.bindShortNames,
|
|
241
|
+
...(options?.units === undefined ? {} : { constantOverrides: naturalConstantOverrides(options.units) }),
|
|
242
|
+
});
|
|
138
243
|
return { user, comparisons };
|
|
139
244
|
}
|
|
140
245
|
// Print the dimensional verdict, where the equation landed, and any hints.
|
|
141
246
|
// `out` is ctx.out (text mode → stdout) or ctx.err (visual → stderr).
|
|
142
247
|
function printEquationReport(api, model, user, out, comparisons = []) {
|
|
143
248
|
out('');
|
|
249
|
+
const placeholderNames = [
|
|
250
|
+
...(user.placeholders ?? []),
|
|
251
|
+
...(user.shortBindings ?? []).filter((b) => b.bound === false).map((b) => b.name),
|
|
252
|
+
];
|
|
253
|
+
const unresolved = [...new Set([...(user.hints ?? []).map((h) => h.name), ...placeholderNames])];
|
|
144
254
|
if (user.consistent === true) {
|
|
145
255
|
out(` ✓ dimensionally consistent: ${api.format(user.rhsDimension)}`);
|
|
146
256
|
}
|
|
257
|
+
else if (user.consistent === false && unresolved.length > 0) {
|
|
258
|
+
// An unknown name is checked as a dimensionless placeholder, so this mismatch is not a real
|
|
259
|
+
// check and does not fail the command (exit 0). Say so on the line itself (persona finding N3).
|
|
260
|
+
const names = unresolved.map((n) => `'${n}'`).join(', ');
|
|
261
|
+
out(` · UNKNOWN: RHS is ${api.format(user.rhsDimension)} but the target is ${api.format(user.targetDimension)}; ` +
|
|
262
|
+
`the mismatch involves the unresolved placeholder${unresolved.length > 1 ? 's' : ''} ${names} ` +
|
|
263
|
+
`(taken as dimensionless), so it is not a failed check`);
|
|
264
|
+
}
|
|
147
265
|
else if (user.consistent === false) {
|
|
148
266
|
out(` ⚠ dimensional MISMATCH: RHS is ${api.format(user.rhsDimension)} but the target is ${api.format(user.targetDimension)}`);
|
|
149
267
|
}
|
|
268
|
+
else if (user.rhsDimension && (user.placeholders ?? []).length > 0) {
|
|
269
|
+
const names = user.placeholders.map((n) => `'${n}'`).join(', ');
|
|
270
|
+
out(` · UNKNOWN: RHS is ${api.format(user.rhsDimension)} only because ${names} ` +
|
|
271
|
+
`${user.placeholders.length === 1 ? 'was' : 'were'} taken as dimensionless. ` +
|
|
272
|
+
'That is not the dimension of the formula, and the target is not a bound catalog name, so nothing was checked');
|
|
273
|
+
}
|
|
150
274
|
else if (user.rhsDimension) {
|
|
151
275
|
out(` · RHS dimension: ${api.format(user.rhsDimension)} (target not in the catalog, so no comparison)`);
|
|
152
276
|
}
|
|
153
277
|
for (const line of api.describeComparisons(comparisons))
|
|
154
278
|
out(` ${line}`);
|
|
279
|
+
for (const line of conventionLines(comparisons.map((c) => c.id)))
|
|
280
|
+
out(` ${line}`);
|
|
281
|
+
if (user.naturalNote)
|
|
282
|
+
out(` ${user.naturalNote}`);
|
|
155
283
|
const L = api.equationLanding(model, 'user-equation');
|
|
156
284
|
if (L.isolated) {
|
|
157
285
|
out(' ⚠ your equation is ISOLATED — it shares no quantity with this graph.');
|
|
158
286
|
}
|
|
159
287
|
else {
|
|
160
288
|
out(` ● your equation joins ${L.anchored ? 'the ANCHORED cluster' : 'a cluster'} of ${L.clusterSize} via {${L.sharedQuantities.join(', ')}}`);
|
|
161
|
-
|
|
162
|
-
|
|
289
|
+
// W3/I3: do not dump ~100 edge ids — that made shared length/temperature look
|
|
290
|
+
// like a physics claim. Summarise nearest equations by shared-quantity overlap.
|
|
291
|
+
for (const line of api.formatConnectedSummary(model, L))
|
|
292
|
+
out(line);
|
|
163
293
|
}
|
|
164
294
|
for (const h of user.hints ?? []) {
|
|
165
295
|
if (!h.suggestions.length) {
|
|
@@ -171,10 +301,152 @@ function printEquationReport(api, model, user, out, comparisons = []) {
|
|
|
171
301
|
else {
|
|
172
302
|
out(` ⚠ '${h.name}' did not match a catalog quantity — did you mean: ${h.suggestions.join(', ')}?`);
|
|
173
303
|
}
|
|
304
|
+
// Persona finding L5: `sigma` for the Stefan–Boltzmann constant `sigma_sb`.
|
|
305
|
+
if ((h.constants ?? []).length > 0) {
|
|
306
|
+
const list = h.constants.join(', ');
|
|
307
|
+
out(` '${h.name}' has the inferred dimension of the registered constant${h.constants.length > 1 ? 's' : ''} ${list}; ` +
|
|
308
|
+
'write that name to use its SI value');
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
// Persona finding W6: a one-letter name binds to whatever the catalog calls that letter.
|
|
312
|
+
for (const b of user.shortBindings ?? []) {
|
|
313
|
+
const users = model.junctions
|
|
314
|
+
.filter((j) => j.id !== 'user-equation' && (j.target === b.quantity || j.sources.includes(b.quantity)))
|
|
315
|
+
.map((j) => j.id)
|
|
316
|
+
.sort();
|
|
317
|
+
const shown = users.slice(0, 3).join(', ') + (users.length > 3 ? `, +${users.length - 3} more` : '');
|
|
318
|
+
const used = users.length > 0 ? ` (used by ${shown})` : '';
|
|
319
|
+
if (b.bound === false) {
|
|
320
|
+
out(` · '${b.name}' matches the catalog quantity ${b.quantity} ${api.format(b.dim)}${used}, a one-letter name, and is not bound. ` +
|
|
321
|
+
'Pass --bind-short to bind it, or write the full name you meant');
|
|
322
|
+
}
|
|
323
|
+
else {
|
|
324
|
+
out(` · '${b.name}' is bound to the catalog quantity ${b.quantity} ${api.format(b.dim)}, a one-letter name` +
|
|
325
|
+
`${used}; if you meant another quantity, write its full name`);
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
/** Flags that shape the equation graph, and so mean nothing on an atlas view. */
|
|
330
|
+
const GRAPH_ONLY_FLAGS = ['source', 'around', 'depth', 'equation', 'equation-only', 'proposed', 'max-orders', 'anchor'];
|
|
331
|
+
/** Flags that only an atlas view reads. */
|
|
332
|
+
const ATLAS_ONLY_FLAGS = ['all-routes', 'max-routes', 'stored', 'run'];
|
|
333
|
+
async function runAtlasView(ctx, route, family, observable) {
|
|
334
|
+
const { args, api, err, write } = ctx;
|
|
335
|
+
const chosen = [route !== undefined, family !== undefined, observable !== undefined].filter(Boolean).length;
|
|
336
|
+
if (chosen > 1)
|
|
337
|
+
throw new CliError('upt map: pick one atlas view: --route, --family or --observable');
|
|
338
|
+
const view = route !== undefined ? '--route' : family !== undefined ? '--family' : '--observable';
|
|
339
|
+
const stray = GRAPH_ONLY_FLAGS.filter((f) => args.flags.has(f));
|
|
340
|
+
if (stray.length > 0) {
|
|
341
|
+
throw new CliError(`upt map: ${view} maps the atlas, not the equation graph; ${stray.map((f) => `--${f}`).join(', ')} do${stray.length === 1 ? 'es' : ''} not apply`);
|
|
342
|
+
}
|
|
343
|
+
const relation = parseFilter(lastValue(args.flags, 'relation'), RELATION_TYPES, '--relation');
|
|
344
|
+
const evidence = parseFilter(lastValue(args.flags, 'evidence'), EVIDENCE_TAGS, '--evidence');
|
|
345
|
+
if (route !== undefined && (relation !== undefined || evidence !== undefined)) {
|
|
346
|
+
throw new CliError('upt map: a route is composed whole, so --relation/--evidence do not filter it; filter a family view instead (--family=NAME)');
|
|
347
|
+
}
|
|
348
|
+
const allRoutes = args.flags.has('all-routes');
|
|
349
|
+
if (allRoutes && route === undefined)
|
|
350
|
+
throw new CliError('upt map: --all-routes needs --route=FROM,TO');
|
|
351
|
+
const maxRaw = lastValue(args.flags, 'max-routes');
|
|
352
|
+
if (maxRaw !== undefined && !allRoutes)
|
|
353
|
+
throw new CliError('upt map: --max-routes needs --all-routes');
|
|
354
|
+
const maxRoutes = maxRaw === undefined ? atlasMap.DEFAULT_MAX_ROUTES : Number(maxRaw);
|
|
355
|
+
if (!Number.isInteger(maxRoutes) || maxRoutes < 1 || maxRoutes > atlasMap.MAX_ROUTES_CEILING) {
|
|
356
|
+
throw new CliError(`upt map: --max-routes=${maxRaw} must be an integer from 1 to ${atlasMap.MAX_ROUTES_CEILING}`);
|
|
357
|
+
}
|
|
358
|
+
if (args.flags.has('stored') && args.flags.has('run')) {
|
|
359
|
+
throw new CliError('upt map: pick one witness-results source: --stored (the committed artifact) or --run (run now)');
|
|
360
|
+
}
|
|
361
|
+
const fmt = lastValue(args.flags, 'format') ?? 'text';
|
|
362
|
+
const isJson = args.flags.has('json');
|
|
363
|
+
if (isJson && fmt !== 'text')
|
|
364
|
+
throw new UsageError('upt: pick one output form: --json or --format');
|
|
365
|
+
if (!['text', 'mermaid', 'dot', 'svg'].includes(fmt)) {
|
|
366
|
+
throw new CliError(`upt: unknown --format='${fmt}' (expected: text | mermaid | dot | svg)`);
|
|
367
|
+
}
|
|
368
|
+
const filter = {
|
|
369
|
+
...(relation !== undefined ? { relation } : {}),
|
|
370
|
+
...(evidence !== undefined ? { evidence } : {}),
|
|
371
|
+
};
|
|
372
|
+
const endpoints = route === undefined ? null : atlasMap.parseRoute(route);
|
|
373
|
+
const build = (results) => endpoints !== null
|
|
374
|
+
? allRoutes
|
|
375
|
+
? atlasMap.buildRoutesView(api, ...endpoints, maxRoutes, results)
|
|
376
|
+
: atlasMap.buildRouteView(api, ...endpoints, results)
|
|
377
|
+
: family !== undefined
|
|
378
|
+
? atlasMap.buildFamilyView(api, family, filter, results)
|
|
379
|
+
: atlasMap.buildObservableView(api, observable, filter, results);
|
|
380
|
+
let results = null;
|
|
381
|
+
if (args.flags.has('stored'))
|
|
382
|
+
results = atlasMap.loadStoredResults();
|
|
383
|
+
else if (args.flags.has('run')) {
|
|
384
|
+
// Unfiltered first: a filter's verdict depends on the results, so every candidate bridge is run.
|
|
385
|
+
const candidates = endpoints === null
|
|
386
|
+
? atlasMap.bridgeIdsOf(family !== undefined ? atlasMap.buildFamilyView(api, family, {}) : atlasMap.buildObservableView(api, observable, {}))
|
|
387
|
+
: atlasMap.bridgeIdsOf(build(null));
|
|
388
|
+
results = await atlasMap.runResults(api, candidates);
|
|
389
|
+
}
|
|
390
|
+
const v = build(results);
|
|
391
|
+
const exitCode = results?.mode === 'run' && results.rows.some((r) => r.status === 'refuted') ? EXIT_CHECK_FAILED : 0;
|
|
392
|
+
if (isJson) {
|
|
393
|
+
emitJson({ command: 'map', source: 'atlas', result: v }, write);
|
|
394
|
+
return exitCode;
|
|
395
|
+
}
|
|
396
|
+
if (fmt === 'text') {
|
|
397
|
+
const lines = v.view === 'route'
|
|
398
|
+
? atlasMap.routeText(v)
|
|
399
|
+
: v.view === 'routes'
|
|
400
|
+
? atlasMap.routesText(v)
|
|
401
|
+
: v.view === 'family'
|
|
402
|
+
? atlasMap.familyText(v)
|
|
403
|
+
: atlasMap.observableText(v);
|
|
404
|
+
for (const line of lines)
|
|
405
|
+
ctx.out(line);
|
|
406
|
+
return exitCode;
|
|
407
|
+
}
|
|
408
|
+
let src;
|
|
409
|
+
if (fmt === 'svg') {
|
|
410
|
+
try {
|
|
411
|
+
src = await api.renderDotToSvg(atlasMap.toDot(v));
|
|
412
|
+
}
|
|
413
|
+
catch (e) {
|
|
414
|
+
throw new CliError(e && e.message ? e.message : String(e));
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
else {
|
|
418
|
+
src = fmt === 'mermaid' ? atlasMap.toMermaid(v) : atlasMap.toDot(v);
|
|
419
|
+
}
|
|
420
|
+
const path = lastValue(args.flags, 'out');
|
|
421
|
+
if (path !== undefined) {
|
|
422
|
+
if (!path)
|
|
423
|
+
throw new CliError('upt: --out= requires a non-empty PATH');
|
|
424
|
+
try {
|
|
425
|
+
writeFileSync(path, src);
|
|
426
|
+
}
|
|
427
|
+
catch (e) {
|
|
428
|
+
throw new CliError(e.message);
|
|
429
|
+
}
|
|
430
|
+
err(`upt: wrote ${fmt} to ${path}`);
|
|
174
431
|
}
|
|
432
|
+
else {
|
|
433
|
+
write(src);
|
|
434
|
+
}
|
|
435
|
+
err(`upt: ${atlasMap.viewLegend(v)}`);
|
|
436
|
+
return exitCode;
|
|
175
437
|
}
|
|
176
438
|
async function run(ctx) {
|
|
177
439
|
const { args, api, out, err, write } = ctx;
|
|
440
|
+
const route = lastValue(args.flags, 'route');
|
|
441
|
+
const family = lastValue(args.flags, 'family');
|
|
442
|
+
const observable = lastValue(args.flags, 'observable');
|
|
443
|
+
if (route !== undefined || family !== undefined || observable !== undefined)
|
|
444
|
+
return runAtlasView(ctx, route, family, observable);
|
|
445
|
+
const atlasOnly = ATLAS_ONLY_FLAGS.filter((f) => args.flags.has(f));
|
|
446
|
+
if (atlasOnly.length > 0) {
|
|
447
|
+
throw new CliError(`upt map: ${atlasOnly.map((f) => `--${f}`).join(', ')} appl${atlasOnly.length === 1 ? 'ies' : 'y'} to an atlas view ` +
|
|
448
|
+
'(--route, --family or --observable), not to the equation graph');
|
|
449
|
+
}
|
|
178
450
|
// map asks a pure connectivity question, so it defaults to --source=both
|
|
179
451
|
// (catalog + canonical) rather than graphs.ts's catalog fallback used by
|
|
180
452
|
// the other --source commands (e.g. discover, which keeps catalog).
|
|
@@ -189,7 +461,32 @@ async function run(ctx) {
|
|
|
189
461
|
const resolved = posterMode
|
|
190
462
|
? { graph: [], label: 'poster (Atlas Phase 3 index)', source: 'poster' }
|
|
191
463
|
: resolveGraph(api, sourceFlags);
|
|
192
|
-
const { graph:
|
|
464
|
+
const { graph: wholeGraph, label, source } = resolved;
|
|
465
|
+
const around = lastValue(args.flags, 'around');
|
|
466
|
+
const depthRaw = lastValue(args.flags, 'depth');
|
|
467
|
+
if (depthRaw !== undefined && around === undefined)
|
|
468
|
+
throw new CliError('upt map: --depth needs --around');
|
|
469
|
+
let focus = null;
|
|
470
|
+
let fullGraph = wholeGraph;
|
|
471
|
+
if (around !== undefined) {
|
|
472
|
+
if (posterMode)
|
|
473
|
+
throw new CliError('upt map: --around focuses a quantity graph; the poster index has statements, not quantities');
|
|
474
|
+
const depth = depthRaw === undefined ? 1 : Number(depthRaw);
|
|
475
|
+
if (!Number.isInteger(depth) || depth < 1 || depth > 10)
|
|
476
|
+
throw new CliError(`upt map: --depth=${depthRaw} must be an integer from 1 to 10`);
|
|
477
|
+
const known = new Set(wholeGraph.flatMap((e) => [...e.sources.map((q) => q.name), e.target.name]));
|
|
478
|
+
const name = api.resolveToCatalogName(around, known);
|
|
479
|
+
if (name === null) {
|
|
480
|
+
const near = api.suggestQuantities(around, known);
|
|
481
|
+
throw new CliError(`upt map: '${around}' is not a quantity of the ${label} graph` + (near.length > 0 ? `; did you mean: ${near.join(', ')}?` : ''));
|
|
482
|
+
}
|
|
483
|
+
fullGraph = neighbourhood(wholeGraph, name, depth);
|
|
484
|
+
focus = { around: name, depth, kept: fullGraph.length, of: wholeGraph.length };
|
|
485
|
+
}
|
|
486
|
+
const focusLine = focus === null
|
|
487
|
+
? null
|
|
488
|
+
: `focused: ${focus.kept} of ${focus.of} edges within ${focus.depth} hop(s) of '${focus.around}' [${label}]; ` +
|
|
489
|
+
'the rest are omitted from this view, not absent from the graph';
|
|
193
490
|
// The poster's own report line: what it contributed, or why it contributed
|
|
194
491
|
// nothing (design note §6). Computed once; printed by every output form.
|
|
195
492
|
const posterValidation = posterMode ? api.validatePoster(api.POSTER_GRAPH) : null;
|
|
@@ -200,10 +497,10 @@ async function run(ctx) {
|
|
|
200
497
|
// value costs nothing and always exits 1.
|
|
201
498
|
const relation = parseFilter(lastValue(args.flags, 'relation'), RELATION_TYPES, '--relation');
|
|
202
499
|
const evidence = parseFilter(lastValue(args.flags, 'evidence'), EVIDENCE_TAGS, '--evidence');
|
|
203
|
-
const filterOpts = {
|
|
500
|
+
const filterOpts = withCatalogEvidence({
|
|
204
501
|
...(relation !== undefined ? { relation } : {}),
|
|
205
502
|
...(evidence !== undefined ? { evidence } : {}),
|
|
206
|
-
};
|
|
503
|
+
});
|
|
207
504
|
// The TEXT and JSON paths filter the edge list here, because `linkageMap`
|
|
208
505
|
// consumes edges. The VISUAL path hands `buildVizModel` the FULL graph with
|
|
209
506
|
// the same options, so the model also judges the --proposed / --equation
|
|
@@ -211,6 +508,13 @@ async function run(ctx) {
|
|
|
211
508
|
// One predicate, two callers: they cannot disagree about what a filter
|
|
212
509
|
// selects, only about how much they were asked to count.
|
|
213
510
|
const { kept: graph, stats: edgeStats } = api.filterEdges(fullGraph, filterOpts);
|
|
511
|
+
// Audit I3: what "anchored" means here, and the discovery ground truth when --proposed ran the funnel.
|
|
512
|
+
const anchor = posterMode
|
|
513
|
+
? null
|
|
514
|
+
: {
|
|
515
|
+
core: coreAnchor(graph),
|
|
516
|
+
...(args.flags.has('proposed') ? { groundTruth: groundTruthAnchor(api, parseDiscoveryOpts(args.flags)) } : {}),
|
|
517
|
+
};
|
|
214
518
|
const edgeLegend = api.formatFilterLegend(edgeStats);
|
|
215
519
|
const fmtValues = args.flags.get('format');
|
|
216
520
|
const fmt = fmtValues && fmtValues.length > 0 ? fmtValues[fmtValues.length - 1] : 'text';
|
|
@@ -223,12 +527,27 @@ async function run(ctx) {
|
|
|
223
527
|
let comparisons = [];
|
|
224
528
|
const equationValues = args.flags.get('equation');
|
|
225
529
|
const equation = equationValues && equationValues.length > 0 ? equationValues[equationValues.length - 1] : null;
|
|
530
|
+
// Persona finding L7: the verdict alone, without the linkage map after it.
|
|
531
|
+
const equationOnly = args.flags.has('equation-only');
|
|
532
|
+
if (equationOnly && equation == null)
|
|
533
|
+
throw new UsageError('upt map: --equation-only needs --equation "TARGET = EXPR"');
|
|
534
|
+
if (equationOnly && fmt !== 'text') {
|
|
535
|
+
throw new UsageError(`upt map: --equation-only prints the verdict as text or --json; it does not apply to --format=${fmt}`);
|
|
536
|
+
}
|
|
226
537
|
if (equation != null) {
|
|
227
538
|
if (!equation.trim()) {
|
|
228
539
|
throw new UsageError('upt: --equation requires "TARGET = EXPR"');
|
|
229
540
|
}
|
|
230
541
|
try {
|
|
231
|
-
|
|
542
|
+
const units = args.flags.has('geometrized')
|
|
543
|
+
? 'geometrized'
|
|
544
|
+
: args.flags.has('natural')
|
|
545
|
+
? 'natural'
|
|
546
|
+
: undefined;
|
|
547
|
+
({ user, comparisons } = await analyzeEquation(api, equation, graph, {
|
|
548
|
+
bindShortNames: args.flags.has('bind-short'),
|
|
549
|
+
...(units === undefined ? {} : { units }),
|
|
550
|
+
})); // throws UserEquationError on malformed structure
|
|
232
551
|
}
|
|
233
552
|
catch (e) {
|
|
234
553
|
throw new UsageError('upt: ' + (e && e.message ? e.message : String(e)));
|
|
@@ -242,15 +561,18 @@ async function run(ctx) {
|
|
|
242
561
|
// mismatch counts only when every name resolved: an unknown name is checked
|
|
243
562
|
// as a dimensionless placeholder, so its "mismatch" is not a real check.
|
|
244
563
|
const exitCode = user !== null &&
|
|
245
|
-
((user.consistent === false &&
|
|
246
|
-
|
|
564
|
+
((user.consistent === false &&
|
|
565
|
+
(user.hints ?? []).length === 0 &&
|
|
566
|
+
(user.placeholders ?? []).length === 0 &&
|
|
567
|
+
!(user.shortBindings ?? []).some((b) => b.bound === false)) ||
|
|
568
|
+
canonicalCheckFailed(comparisons))
|
|
247
569
|
? EXIT_CHECK_FAILED
|
|
248
570
|
: 0;
|
|
249
571
|
const overlay = (extra) => [
|
|
250
572
|
// Ranked from the UNFILTERED graph: the proposal set is a property of the
|
|
251
573
|
// whole catalog, and the model then judges each overlay junction under the
|
|
252
574
|
// same filter as every other junction.
|
|
253
|
-
...(args.flags.has('proposed') ? proposedJunctions(api,
|
|
575
|
+
...(args.flags.has('proposed') ? proposedJunctions(api, wholeGraph, args.flags) : []),
|
|
254
576
|
// The poster enters as an overlay for exactly the reason the design note
|
|
255
577
|
// gives: an overlay is FILTERED, clustered and legended like every other
|
|
256
578
|
// junction, so a poster source cannot quietly bypass --relation/--evidence.
|
|
@@ -274,16 +596,20 @@ async function run(ctx) {
|
|
|
274
596
|
rhsDimension: user.rhsDimension,
|
|
275
597
|
targetDimension: user.targetDimension,
|
|
276
598
|
hints: user.hints,
|
|
599
|
+
shortBindings: user.shortBindings,
|
|
600
|
+
...(user.placeholders.length === 0 ? {} : { placeholders: user.placeholders }),
|
|
277
601
|
canonicalComparisons: comparisons,
|
|
278
602
|
};
|
|
279
603
|
}
|
|
280
604
|
emitJson({
|
|
281
605
|
command: 'map',
|
|
282
606
|
source,
|
|
607
|
+
...(anchor !== null ? { anchor } : {}),
|
|
283
608
|
result: {
|
|
284
|
-
linkage,
|
|
609
|
+
...(equation != null && (equationOnly || !args.flags.has('verbose')) ? {} : { linkage }),
|
|
285
610
|
...(posterMode ? { poster: { note: posterNote, ...posterValidation } } : {}),
|
|
286
611
|
...(edgeLegend !== null ? { filter: edgeStats } : {}),
|
|
612
|
+
...(focus !== null ? { focus } : {}),
|
|
287
613
|
...(user ? { landing, userEquation } : {}),
|
|
288
614
|
},
|
|
289
615
|
}, write);
|
|
@@ -330,6 +656,8 @@ async function run(ctx) {
|
|
|
330
656
|
// source. The diagram itself also carries the legend (see `buildVizModel`).
|
|
331
657
|
if (posterNote !== null)
|
|
332
658
|
err(`upt: ${posterNote}`);
|
|
659
|
+
if (focusLine !== null)
|
|
660
|
+
err(`upt: ${focusLine}`);
|
|
333
661
|
if (model.filterLegend !== null)
|
|
334
662
|
err(`upt: ${model.filterLegend}`);
|
|
335
663
|
if (user)
|
|
@@ -345,7 +673,7 @@ async function run(ctx) {
|
|
|
345
673
|
extraJunctions: overlay(user ? [user.junction] : []),
|
|
346
674
|
...filterOpts,
|
|
347
675
|
});
|
|
348
|
-
out(`
|
|
676
|
+
out(`
|
|
349
677
|
Poster index — statements and the derivations between them [source: ${label}]`);
|
|
350
678
|
out(` ${posterNote}`);
|
|
351
679
|
out(` (${model.junctions.length} junctions over ${model.clusters.length} clusters; ` +
|
|
@@ -357,18 +685,37 @@ Poster index — statements and the derivations between them [source: ${label}]
|
|
|
357
685
|
out(` ⚠ '${d.derivation}' names '${d.missing}' as a ${d.role}, and nothing defines it.`);
|
|
358
686
|
}
|
|
359
687
|
if (user) {
|
|
360
|
-
out(`
|
|
688
|
+
out(`
|
|
361
689
|
Your equation: ${user.junction.label}`);
|
|
362
690
|
printEquationReport(api, model, user, out, comparisons);
|
|
363
691
|
}
|
|
364
692
|
return exitCode;
|
|
365
693
|
}
|
|
694
|
+
// --equation: the verdict on the user's equation is the answer asked for, so it
|
|
695
|
+
// comes BEFORE the linkage map, not after ~45 lines of it (persona finding N4).
|
|
696
|
+
if (user) {
|
|
697
|
+
const model = api.buildVizModel(fullGraph, {
|
|
698
|
+
title: `UPT physics map — ${label}`,
|
|
699
|
+
extraJunctions: overlay([user.junction]),
|
|
700
|
+
...filterOpts,
|
|
701
|
+
});
|
|
702
|
+
out(`\nYour equation: ${user.junction.label}`);
|
|
703
|
+
printEquationReport(api, model, user, out, comparisons);
|
|
704
|
+
if (equationOnly || !args.flags.has('verbose'))
|
|
705
|
+
return exitCode;
|
|
706
|
+
}
|
|
366
707
|
const m = api.linkageMap(graph);
|
|
367
708
|
const mix = (s) => Object.entries(s)
|
|
368
709
|
.map(([k, v]) => `${v} ${k}`)
|
|
369
710
|
.join(', ');
|
|
370
711
|
out(`\nLinkage map — how the equations connect via shared quantities [source: ${label}]`);
|
|
371
|
-
out(`(${m.componentCount} components over ${graph.length} edges; ${m.compositions} compose into chains)
|
|
712
|
+
out(`(${m.componentCount} components over ${graph.length} edges; ${m.compositions} compose into chains)`);
|
|
713
|
+
out(` ${coreLine(anchor.core)}`);
|
|
714
|
+
if (anchor.groundTruth)
|
|
715
|
+
out(` proposals: ${groundTruthLine(anchor.groundTruth)}`);
|
|
716
|
+
out('');
|
|
717
|
+
if (focusLine !== null)
|
|
718
|
+
out(` ${focusLine}`);
|
|
372
719
|
if (edgeLegend !== null)
|
|
373
720
|
out(` ${edgeLegend}`);
|
|
374
721
|
for (const c of m.clusters.filter((x) => x.size > 1)) {
|
|
@@ -380,16 +727,6 @@ Your equation: ${user.junction.label}`);
|
|
|
380
727
|
out(` ○ isolated (${m.isolated.length}) — share no quantity with any other edge:`);
|
|
381
728
|
out(` ${m.isolated.join(', ')}`);
|
|
382
729
|
out('\n (a structural map — shared-quantity connectivity, NOT a credibility signal)');
|
|
383
|
-
// --equation: where does the user's equation land in this graph?
|
|
384
|
-
if (user) {
|
|
385
|
-
const model = api.buildVizModel(fullGraph, {
|
|
386
|
-
title: `UPT physics map — ${label}`,
|
|
387
|
-
extraJunctions: overlay([user.junction]),
|
|
388
|
-
...filterOpts,
|
|
389
|
-
});
|
|
390
|
-
out(`\nYour equation: ${user.junction.label}`);
|
|
391
|
-
printEquationReport(api, model, user, out, comparisons);
|
|
392
|
-
}
|
|
393
730
|
return exitCode;
|
|
394
731
|
}
|
|
395
732
|
export const command = {
|