universal-physics-tensor 0.28.0 → 0.30.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.
- package/bin/upt.mjs +9 -830
- package/dist/bridges/be52-mercury-confrontation.d.ts +72 -0
- package/dist/bridges/be52-mercury-confrontation.d.ts.map +1 -0
- package/dist/bridges/be52-mercury-confrontation.js +67 -0
- package/dist/bridges/be52-mercury-confrontation.js.map +1 -0
- package/dist/bridges/confrontation-coverage.d.ts +15 -0
- package/dist/bridges/confrontation-coverage.d.ts.map +1 -1
- package/dist/bridges/confrontation-coverage.js +9 -1
- package/dist/bridges/confrontation-coverage.js.map +1 -1
- package/dist/bridges/descriptor.d.ts +54 -0
- package/dist/bridges/descriptor.d.ts.map +1 -0
- package/dist/bridges/descriptor.js +67 -0
- package/dist/bridges/descriptor.js.map +1 -0
- package/dist/bridges/equations/_be-helpers.d.ts +1 -2
- package/dist/bridges/equations/_be-helpers.d.ts.map +1 -1
- package/dist/bridges/equations/_be-helpers.js +3 -3
- package/dist/bridges/equations/_be-helpers.js.map +1 -1
- package/dist/bridges/equations/be-20-vacuum-energy.d.ts +1 -1
- package/dist/bridges/equations/be-20-vacuum-energy.d.ts.map +1 -1
- package/dist/bridges/equations/be-20-vacuum-energy.js +5 -3
- package/dist/bridges/equations/be-20-vacuum-energy.js.map +1 -1
- package/dist/bridges/equations/be-21-kss-bound.d.ts +1 -1
- package/dist/bridges/equations/be-21-kss-bound.js +1 -1
- package/dist/bridges/equations/be-25-iit-phi.d.ts +12 -16
- package/dist/bridges/equations/be-25-iit-phi.d.ts.map +1 -1
- package/dist/bridges/equations/be-25-iit-phi.js +12 -16
- package/dist/bridges/equations/be-25-iit-phi.js.map +1 -1
- package/dist/bridges/equations/be-26-dna-tunneling.d.ts +6 -6
- package/dist/bridges/equations/be-26-dna-tunneling.js +6 -6
- package/dist/bridges/equations/be-40-composite-higgs.d.ts +9 -7
- package/dist/bridges/equations/be-40-composite-higgs.d.ts.map +1 -1
- package/dist/bridges/equations/be-40-composite-higgs.js +9 -7
- package/dist/bridges/equations/be-40-composite-higgs.js.map +1 -1
- package/dist/bridges/equations/be-50-wheeler-feynman.d.ts +0 -34
- package/dist/bridges/equations/be-50-wheeler-feynman.d.ts.map +1 -1
- package/dist/bridges/equations/be-50-wheeler-feynman.js +1 -1
- package/dist/bridges/equations/be-50-wheeler-feynman.js.map +1 -1
- package/dist/canonical/entries/_l1-build.d.ts +4 -5
- package/dist/canonical/entries/_l1-build.d.ts.map +1 -1
- package/dist/canonical/entries/_l1-build.js +3 -11
- package/dist/canonical/entries/_l1-build.js.map +1 -1
- package/dist/canonical/entries/atomic.d.ts +6 -5
- package/dist/canonical/entries/atomic.d.ts.map +1 -1
- package/dist/canonical/entries/atomic.js +61 -1
- package/dist/canonical/entries/atomic.js.map +1 -1
- package/dist/canonical/entries/dimensional-classics.d.ts.map +1 -1
- package/dist/canonical/entries/dimensional-classics.js +1 -10
- package/dist/canonical/entries/dimensional-classics.js.map +1 -1
- package/dist/canonical/entries/electromagnetism.d.ts.map +1 -1
- package/dist/canonical/entries/electromagnetism.js +49 -1
- package/dist/canonical/entries/electromagnetism.js.map +1 -1
- package/dist/canonical/entries/relativity.d.ts +0 -3
- package/dist/canonical/entries/relativity.d.ts.map +1 -1
- package/dist/canonical/entries/relativity.js +51 -3
- package/dist/canonical/entries/relativity.js.map +1 -1
- package/dist/canonical/entries/thermo-nuclear-cosmo.d.ts +7 -4
- package/dist/canonical/entries/thermo-nuclear-cosmo.d.ts.map +1 -1
- package/dist/canonical/entries/thermo-nuclear-cosmo.js +117 -1
- package/dist/canonical/entries/thermo-nuclear-cosmo.js.map +1 -1
- package/dist/canonical/linkage.d.ts +5 -0
- package/dist/canonical/linkage.d.ts.map +1 -1
- package/dist/canonical/linkage.js +54 -24
- package/dist/canonical/linkage.js.map +1 -1
- package/dist/canonical/registry.d.ts +6 -1
- package/dist/canonical/registry.d.ts.map +1 -1
- package/dist/canonical/registry.js +6 -5
- package/dist/canonical/registry.js.map +1 -1
- package/dist/cli/args.d.ts +23 -0
- package/dist/cli/args.d.ts.map +1 -0
- package/dist/cli/args.js +74 -0
- package/dist/cli/args.js.map +1 -0
- package/dist/cli/command.d.ts +46 -0
- package/dist/cli/command.d.ts.map +1 -0
- package/dist/cli/command.js +51 -0
- package/dist/cli/command.js.map +1 -0
- package/dist/cli/commands/_discovery-opts.d.ts +16 -0
- package/dist/cli/commands/_discovery-opts.d.ts.map +1 -0
- package/dist/cli/commands/_discovery-opts.js +33 -0
- package/dist/cli/commands/_discovery-opts.js.map +1 -0
- package/dist/cli/commands/audit.d.ts +3 -0
- package/dist/cli/commands/audit.d.ts.map +1 -0
- package/dist/cli/commands/audit.js +71 -0
- package/dist/cli/commands/audit.js.map +1 -0
- package/dist/cli/commands/candidates.d.ts +3 -0
- package/dist/cli/commands/candidates.d.ts.map +1 -0
- package/dist/cli/commands/candidates.js +46 -0
- package/dist/cli/commands/candidates.js.map +1 -0
- package/dist/cli/commands/canonical.d.ts +3 -0
- package/dist/cli/commands/canonical.d.ts.map +1 -0
- package/dist/cli/commands/canonical.js +38 -0
- package/dist/cli/commands/canonical.js.map +1 -0
- package/dist/cli/commands/connectors.d.ts +3 -0
- package/dist/cli/commands/connectors.d.ts.map +1 -0
- package/dist/cli/commands/connectors.js +51 -0
- package/dist/cli/commands/connectors.js.map +1 -0
- package/dist/cli/commands/coverage.d.ts +3 -0
- package/dist/cli/commands/coverage.d.ts.map +1 -0
- package/dist/cli/commands/coverage.js +39 -0
- package/dist/cli/commands/coverage.js.map +1 -0
- package/dist/cli/commands/derive.d.ts +3 -0
- package/dist/cli/commands/derive.d.ts.map +1 -0
- package/dist/cli/commands/derive.js +143 -0
- package/dist/cli/commands/derive.js.map +1 -0
- package/dist/cli/commands/discover.d.ts +3 -0
- package/dist/cli/commands/discover.d.ts.map +1 -0
- package/dist/cli/commands/discover.js +137 -0
- package/dist/cli/commands/discover.js.map +1 -0
- package/dist/cli/commands/eval.d.ts +3 -0
- package/dist/cli/commands/eval.d.ts.map +1 -0
- package/dist/cli/commands/eval.js +64 -0
- package/dist/cli/commands/eval.js.map +1 -0
- package/dist/cli/commands/explain.d.ts +3 -0
- package/dist/cli/commands/explain.d.ts.map +1 -0
- package/dist/cli/commands/explain.js +81 -0
- package/dist/cli/commands/explain.js.map +1 -0
- package/dist/cli/commands/index.d.ts +21 -0
- package/dist/cli/commands/index.d.ts.map +1 -0
- package/dist/cli/commands/index.js +21 -0
- package/dist/cli/commands/index.js.map +1 -0
- package/dist/cli/commands/map.d.ts +3 -0
- package/dist/cli/commands/map.d.ts.map +1 -0
- package/dist/cli/commands/map.js +245 -0
- package/dist/cli/commands/map.js.map +1 -0
- package/dist/cli/commands/predict.d.ts +3 -0
- package/dist/cli/commands/predict.d.ts.map +1 -0
- package/dist/cli/commands/predict.js +54 -0
- package/dist/cli/commands/predict.js.map +1 -0
- package/dist/cli/commands/priority.d.ts +3 -0
- package/dist/cli/commands/priority.d.ts.map +1 -0
- package/dist/cli/commands/priority.js +63 -0
- package/dist/cli/commands/priority.js.map +1 -0
- package/dist/cli/commands/recover.d.ts +3 -0
- package/dist/cli/commands/recover.d.ts.map +1 -0
- package/dist/cli/commands/recover.js +51 -0
- package/dist/cli/commands/recover.js.map +1 -0
- package/dist/cli/commands/symbolic.d.ts +3 -0
- package/dist/cli/commands/symbolic.d.ts.map +1 -0
- package/dist/cli/commands/symbolic.js +110 -0
- package/dist/cli/commands/symbolic.js.map +1 -0
- package/dist/cli/errors.d.ts +14 -0
- package/dist/cli/errors.d.ts.map +1 -0
- package/dist/cli/errors.js +20 -0
- package/dist/cli/errors.js.map +1 -0
- package/dist/cli/graphs.d.ts +16 -0
- package/dist/cli/graphs.d.ts.map +1 -0
- package/dist/cli/graphs.js +30 -0
- package/dist/cli/graphs.js.map +1 -0
- package/dist/cli/main.d.ts +33 -0
- package/dist/cli/main.d.ts.map +1 -0
- package/dist/cli/main.js +219 -0
- package/dist/cli/main.js.map +1 -0
- package/dist/cli/output.d.ts +19 -0
- package/dist/cli/output.d.ts.map +1 -0
- package/dist/cli/output.js +57 -0
- package/dist/cli/output.js.map +1 -0
- package/dist/cli/version.d.ts +11 -0
- package/dist/cli/version.d.ts.map +1 -0
- package/dist/cli/version.js +16 -0
- package/dist/cli/version.js.map +1 -0
- package/dist/cli-api.d.ts +28 -0
- package/dist/cli-api.d.ts.map +1 -0
- package/dist/cli-api.js +31 -0
- package/dist/cli-api.js.map +1 -0
- package/dist/composition/bridge-analysis.d.ts +13 -15
- package/dist/composition/bridge-analysis.d.ts.map +1 -1
- package/dist/composition/bridge-analysis.js +54 -39
- package/dist/composition/bridge-analysis.js.map +1 -1
- package/dist/composition/bridge-prediction.d.ts +4 -3
- package/dist/composition/bridge-prediction.d.ts.map +1 -1
- package/dist/composition/compose-symbolic.d.ts.map +1 -1
- package/dist/composition/compose-symbolic.js +12 -0
- package/dist/composition/compose-symbolic.js.map +1 -1
- package/dist/composition/discovery.d.ts.map +1 -1
- package/dist/composition/discovery.js +40 -12
- package/dist/composition/discovery.js.map +1 -1
- package/dist/composition/edges/_catalog-helpers.d.ts +34 -0
- package/dist/composition/edges/_catalog-helpers.d.ts.map +1 -0
- package/dist/composition/edges/_catalog-helpers.js +75 -0
- package/dist/composition/edges/_catalog-helpers.js.map +1 -0
- package/dist/composition/edges/calibration.d.ts.map +1 -1
- package/dist/composition/edges/calibration.js +1 -1
- package/dist/composition/edges/calibration.js.map +1 -1
- package/dist/composition/edges/catalog-condensed-matter.d.ts +64 -0
- package/dist/composition/edges/catalog-condensed-matter.d.ts.map +1 -0
- package/dist/composition/edges/catalog-condensed-matter.js +226 -0
- package/dist/composition/edges/catalog-condensed-matter.js.map +1 -0
- package/dist/composition/edges/catalog-fields.d.ts +68 -0
- package/dist/composition/edges/catalog-fields.d.ts.map +1 -0
- package/dist/composition/edges/catalog-fields.js +206 -0
- package/dist/composition/edges/catalog-fields.js.map +1 -0
- package/dist/composition/edges/catalog-full.d.ts +5 -263
- package/dist/composition/edges/catalog-full.d.ts.map +1 -1
- package/dist/composition/edges/catalog-full.js +9 -959
- package/dist/composition/edges/catalog-full.js.map +1 -1
- package/dist/composition/edges/catalog-gravitation-cosmology.d.ts +80 -0
- package/dist/composition/edges/catalog-gravitation-cosmology.d.ts.map +1 -0
- package/dist/composition/edges/catalog-gravitation-cosmology.js +245 -0
- package/dist/composition/edges/catalog-gravitation-cosmology.js.map +1 -0
- package/dist/composition/edges/catalog-quantum.d.ts +85 -0
- package/dist/composition/edges/catalog-quantum.d.ts.map +1 -0
- package/dist/composition/edges/catalog-quantum.js +252 -0
- package/dist/composition/edges/catalog-quantum.js.map +1 -0
- package/dist/composition/expr-simplify.d.ts +2 -6
- package/dist/composition/expr-simplify.d.ts.map +1 -1
- package/dist/composition/expr-simplify.js +1 -1
- package/dist/composition/expr-simplify.js.map +1 -1
- package/dist/composition/expr-subst.d.ts +2 -1
- package/dist/composition/expr-subst.d.ts.map +1 -1
- package/dist/composition/proposed-bridges.d.ts +4 -4
- package/dist/composition/proposed-bridges.d.ts.map +1 -1
- package/dist/composition/proposed-bridges.js +1 -3
- package/dist/composition/proposed-bridges.js.map +1 -1
- package/dist/composition/quantities/_dims.d.ts +35 -0
- package/dist/composition/quantities/_dims.d.ts.map +1 -0
- package/dist/composition/quantities/_dims.js +45 -0
- package/dist/composition/quantities/_dims.js.map +1 -0
- package/dist/composition/quantities/common.d.ts +69 -0
- package/dist/composition/quantities/common.d.ts.map +1 -0
- package/dist/composition/quantities/common.js +200 -0
- package/dist/composition/quantities/common.js.map +1 -0
- package/dist/composition/quantities/condensed-matter.d.ts +63 -0
- package/dist/composition/quantities/condensed-matter.d.ts.map +1 -0
- package/dist/composition/quantities/condensed-matter.js +185 -0
- package/dist/composition/quantities/condensed-matter.js.map +1 -0
- package/dist/composition/quantities/fields.d.ts +59 -0
- package/dist/composition/quantities/fields.d.ts.map +1 -0
- package/dist/composition/quantities/fields.js +171 -0
- package/dist/composition/quantities/fields.js.map +1 -0
- package/dist/composition/quantities/gravitation-cosmology.d.ts +67 -0
- package/dist/composition/quantities/gravitation-cosmology.d.ts.map +1 -0
- package/dist/composition/quantities/gravitation-cosmology.js +199 -0
- package/dist/composition/quantities/gravitation-cosmology.js.map +1 -0
- package/dist/composition/quantities/quantum.d.ts +61 -0
- package/dist/composition/quantities/quantum.d.ts.map +1 -0
- package/dist/composition/quantities/quantum.js +178 -0
- package/dist/composition/quantities/quantum.js.map +1 -0
- package/dist/composition/quantities.d.ts +5 -263
- package/dist/composition/quantities.d.ts.map +1 -1
- package/dist/composition/quantities.js +7 -983
- package/dist/composition/quantities.js.map +1 -1
- package/dist/composition/retrodiction.d.ts.map +1 -1
- package/dist/composition/retrodiction.js +15 -3
- package/dist/composition/retrodiction.js.map +1 -1
- package/dist/composition/symbolic-constants.d.ts +3 -2
- package/dist/composition/symbolic-constants.d.ts.map +1 -1
- package/dist/core/tensor.d.ts +6 -0
- package/dist/core/tensor.d.ts.map +1 -1
- package/dist/core/tensor.js +6 -0
- package/dist/core/tensor.js.map +1 -1
- package/dist/diff/bridge-ast-gradient.js +1 -1
- package/dist/diff/bridge-ast-gradient.js.map +1 -1
- package/dist/diff/bridge-gradient.d.ts.map +1 -1
- package/dist/diff/bridge-gradient.js +15 -4
- package/dist/diff/bridge-gradient.js.map +1 -1
- package/dist/dimensional/algebra.d.ts +24 -0
- package/dist/dimensional/algebra.d.ts.map +1 -1
- package/dist/dimensional/algebra.js +31 -5
- package/dist/dimensional/algebra.js.map +1 -1
- package/dist/dimensional/ast-builders.d.ts +25 -0
- package/dist/dimensional/ast-builders.d.ts.map +1 -0
- package/dist/dimensional/ast-builders.js +27 -0
- package/dist/dimensional/ast-builders.js.map +1 -0
- package/dist/dimensional/ast-types.d.ts +193 -0
- package/dist/dimensional/ast-types.d.ts.map +1 -0
- package/dist/dimensional/ast-types.js +20 -0
- package/dist/dimensional/ast-types.js.map +1 -0
- package/dist/dimensional/buckingham.d.ts.map +1 -1
- package/dist/dimensional/buckingham.js +7 -4
- package/dist/dimensional/buckingham.js.map +1 -1
- package/dist/dimensional/connection-validators.d.ts +3 -38
- package/dist/dimensional/connection-validators.d.ts.map +1 -1
- package/dist/dimensional/connection-validators.js.map +1 -1
- package/dist/dimensional/connection.d.ts.map +1 -1
- package/dist/dimensional/connection.js +9 -0
- package/dist/dimensional/connection.js.map +1 -1
- package/dist/dimensional/curvature-composite.d.ts +2 -1
- package/dist/dimensional/curvature-composite.d.ts.map +1 -1
- package/dist/dimensional/curvature-invariants.d.ts +2 -11
- package/dist/dimensional/curvature-invariants.d.ts.map +1 -1
- package/dist/dimensional/curvature-invariants.js.map +1 -1
- package/dist/dimensional/curvature.d.ts +5 -24
- package/dist/dimensional/curvature.d.ts.map +1 -1
- package/dist/dimensional/curvature.js.map +1 -1
- package/dist/dimensional/dimension-inference.d.ts.map +1 -1
- package/dist/dimensional/dimension-inference.js +11 -5
- package/dist/dimensional/dimension-inference.js.map +1 -1
- package/dist/dimensional/einstein-equation.d.ts +2 -11
- package/dist/dimensional/einstein-equation.d.ts.map +1 -1
- package/dist/dimensional/einstein-equation.js.map +1 -1
- package/dist/dimensional/killing-validators.d.ts +2 -19
- package/dist/dimensional/killing-validators.d.ts.map +1 -1
- package/dist/dimensional/killing-validators.js.map +1 -1
- package/dist/dimensional/metric-validators.d.ts +5 -39
- package/dist/dimensional/metric-validators.d.ts.map +1 -1
- package/dist/dimensional/metric-validators.js.map +1 -1
- package/dist/dimensional/stress-energy-validators.d.ts +2 -21
- package/dist/dimensional/stress-energy-validators.d.ts.map +1 -1
- package/dist/dimensional/stress-energy-validators.js.map +1 -1
- package/dist/dimensional/tensor.d.ts +2 -32
- package/dist/dimensional/tensor.d.ts.map +1 -1
- package/dist/dimensional/tensor.js.map +1 -1
- package/dist/dimensional/validator.d.ts +12 -58
- package/dist/dimensional/validator.d.ts.map +1 -1
- package/dist/dimensional/validator.js +12 -9
- package/dist/dimensional/validator.js.map +1 -1
- package/dist/dimensional/weyl-validators.d.ts +2 -18
- package/dist/dimensional/weyl-validators.d.ts.map +1 -1
- package/dist/dimensional/weyl-validators.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/numerical/be37-covariant-eikonal.d.ts +12 -11
- package/dist/numerical/be37-covariant-eikonal.d.ts.map +1 -1
- package/dist/numerical/be37-covariant-eikonal.js +23 -8
- package/dist/numerical/be37-covariant-eikonal.js.map +1 -1
- package/dist/numerical/christoffel-flat.d.ts +10 -1
- package/dist/numerical/christoffel-flat.d.ts.map +1 -1
- package/dist/numerical/christoffel-flat.js +11 -2
- package/dist/numerical/christoffel-flat.js.map +1 -1
- package/dist/numerical/curvature-lowering-helpers.d.ts +4 -1
- package/dist/numerical/curvature-lowering-helpers.d.ts.map +1 -1
- package/dist/numerical/curvature-lowering-helpers.js +72 -14
- package/dist/numerical/curvature-lowering-helpers.js.map +1 -1
- package/dist/numerical/engine-registry.d.ts.map +1 -1
- package/dist/numerical/engine-registry.js +11 -0
- package/dist/numerical/engine-registry.js.map +1 -1
- package/dist/numerical/float64-engine.d.ts.map +1 -1
- package/dist/numerical/float64-engine.js +20 -28
- package/dist/numerical/float64-engine.js.map +1 -1
- package/dist/numerical/formula-dimension.d.ts.map +1 -1
- package/dist/numerical/formula-dimension.js +1 -1
- package/dist/numerical/formula-dimension.js.map +1 -1
- package/dist/numerical/formula.d.ts +0 -2
- package/dist/numerical/formula.d.ts.map +1 -1
- package/dist/numerical/formula.js +7 -3
- package/dist/numerical/formula.js.map +1 -1
- package/dist/numerical/geodesic-integrator.d.ts +6 -1
- package/dist/numerical/geodesic-integrator.d.ts.map +1 -1
- package/dist/numerical/geodesic-integrator.js +14 -6
- package/dist/numerical/geodesic-integrator.js.map +1 -1
- package/dist/numerical/gl4-integrator.d.ts.map +1 -1
- package/dist/numerical/gl4-integrator.js +106 -43
- package/dist/numerical/gl4-integrator.js.map +1 -1
- package/dist/numerical/lowering.d.ts.map +1 -1
- package/dist/numerical/lowering.js +8 -5
- package/dist/numerical/lowering.js.map +1 -1
- package/dist/numerical/null-ic.d.ts +4 -3
- package/dist/numerical/null-ic.d.ts.map +1 -1
- package/dist/numerical/null-ic.js +4 -3
- package/dist/numerical/null-ic.js.map +1 -1
- package/dist/numerical/perihelion-finder.d.ts.map +1 -1
- package/dist/numerical/perihelion-finder.js +15 -1
- package/dist/numerical/perihelion-finder.js.map +1 -1
- package/dist/numerical/quadrature.d.ts +3 -2
- package/dist/numerical/quadrature.d.ts.map +1 -1
- package/dist/numerical/quadrature.js +8 -1
- package/dist/numerical/quadrature.js.map +1 -1
- package/dist/numerical/weyl-lowering.d.ts.map +1 -1
- package/dist/numerical/weyl-lowering.js +28 -2
- package/dist/numerical/weyl-lowering.js.map +1 -1
- package/package.json +3 -2
- package/dist/canonical/entries/l1-gravity-thermo.d.ts +0 -12
- package/dist/canonical/entries/l1-gravity-thermo.d.ts.map +0 -1
- package/dist/canonical/entries/l1-gravity-thermo.js +0 -165
- package/dist/canonical/entries/l1-gravity-thermo.js.map +0 -1
- package/dist/canonical/entries/l1-quantum-em.d.ts +0 -10
- package/dist/canonical/entries/l1-quantum-em.d.ts.map +0 -1
- package/dist/canonical/entries/l1-quantum-em.js +0 -141
- package/dist/canonical/entries/l1-quantum-em.js.map +0 -1
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Typed error classes for the UPT CLI.
|
|
3
|
+
*
|
|
4
|
+
* `UsageError` signals a malformed invocation (bad flags, missing values,
|
|
5
|
+
* unknown flags) — callers map it to exit code 2. `CliError` signals a
|
|
6
|
+
* runtime failure within an otherwise well-formed invocation — exit code 1.
|
|
7
|
+
*/
|
|
8
|
+
export class UsageError extends Error {
|
|
9
|
+
constructor(message) {
|
|
10
|
+
super(message);
|
|
11
|
+
this.name = 'UsageError';
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
export class CliError extends Error {
|
|
15
|
+
constructor(message) {
|
|
16
|
+
super(message);
|
|
17
|
+
this.name = 'CliError';
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/cli/errors.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,OAAO,UAAW,SAAQ,KAAK;IACnC,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,YAAY,CAAC;IAC3B,CAAC;CACF;AAED,MAAM,OAAO,QAAS,SAAQ,KAAK;IACjC,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,UAAU,CAAC;IACzB,CAAC;CACF"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared `--source=catalog|canonical|both` graph resolution — replaces
|
|
3
|
+
* `bin/upt.mjs`'s `resolveGraph` (lines 53-67). Every analysis command
|
|
4
|
+
* (`discover` / `candidates` / `map` / ...) that accepts `--source` calls
|
|
5
|
+
* this once to get the graph + a human-readable label for its banner.
|
|
6
|
+
*/
|
|
7
|
+
import type { BridgeEdge } from '../composition/edge.js';
|
|
8
|
+
import type { ParsedArgs } from './args.js';
|
|
9
|
+
import type { CommandCtx } from './command.js';
|
|
10
|
+
export type SourceName = 'catalog' | 'canonical' | 'both';
|
|
11
|
+
export declare function resolveGraph(api: CommandCtx['api'], flags: ParsedArgs['flags']): {
|
|
12
|
+
graph: BridgeEdge[];
|
|
13
|
+
label: string;
|
|
14
|
+
source: SourceName;
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=graphs.d.ts.map
|
|
@@ -0,0 +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,UAAU,EAAE,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,UAAU,CAAA;CAAE,CAsB5D"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared `--source=catalog|canonical|both` graph resolution — replaces
|
|
3
|
+
* `bin/upt.mjs`'s `resolveGraph` (lines 53-67). Every analysis command
|
|
4
|
+
* (`discover` / `candidates` / `map` / ...) that accepts `--source` calls
|
|
5
|
+
* this once to get the graph + a human-readable label for its banner.
|
|
6
|
+
*/
|
|
7
|
+
import { CliError } from './errors.js';
|
|
8
|
+
export function resolveGraph(api, flags) {
|
|
9
|
+
const values = flags.get('source');
|
|
10
|
+
const src = values && values.length > 0 ? values[values.length - 1] : 'catalog';
|
|
11
|
+
switch (src) {
|
|
12
|
+
case 'catalog':
|
|
13
|
+
return { graph: [...api.CATALOG_GRAPH], label: 'catalog (44-bridge)', source: 'catalog' };
|
|
14
|
+
case 'canonical':
|
|
15
|
+
return {
|
|
16
|
+
graph: [...api.CANONICAL_GRAPH],
|
|
17
|
+
label: 'canonical (standard-physics L-layer, bridges excluded)',
|
|
18
|
+
source: 'canonical',
|
|
19
|
+
};
|
|
20
|
+
case 'both':
|
|
21
|
+
return {
|
|
22
|
+
graph: [...api.CATALOG_GRAPH, ...api.CANONICAL_GRAPH],
|
|
23
|
+
label: 'catalog + canonical',
|
|
24
|
+
source: 'both',
|
|
25
|
+
};
|
|
26
|
+
default:
|
|
27
|
+
throw new CliError(`upt: unknown --source='${src}' (expected: catalog | canonical | both)`);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=graphs.js.map
|
|
@@ -0,0 +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,EAAE,KAAK,EAAE,CAAC,GAAG,GAAG,CAAC,aAAa,CAAC,EAAE,KAAK,EAAE,qBAAqB,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC;QAC5F,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,EAAE,CAAC,GAAG,GAAG,CAAC,aAAa,EAAE,GAAG,GAAG,CAAC,eAAe,CAAC;gBACrD,KAAK,EAAE,qBAAqB;gBAC5B,MAAM,EAAE,MAAM;aACf,CAAC;QACJ;YACE,MAAM,IAAI,QAAQ,CAAC,0BAA0B,GAAG,0CAA0C,CAAC,CAAC;IAChG,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Verb-first dispatcher for the UPT CLI — `upt <command> [args...]`.
|
|
3
|
+
*
|
|
4
|
+
* Owns: top-level `help`/`version` handling, the no-args demo, unknown-verb
|
|
5
|
+
* exit-2 contract, and per-command dispatch (parse -> run -> map thrown
|
|
6
|
+
* UsageError/CliError to the documented exit codes). Individual commands are
|
|
7
|
+
* plain data (see `command.ts`) registered via `registerCommand`; this file
|
|
8
|
+
* never special-cases a command by name, so later tasks add commands without
|
|
9
|
+
* touching `runCli`'s body.
|
|
10
|
+
*
|
|
11
|
+
* `main.ts` is the one place that imports the real `cli-api.js` barrel and
|
|
12
|
+
* wires `out`/`err`/`write` to real stdio — every `Command.run` receives
|
|
13
|
+
* those as an injected `CommandCtx`, never reaching for `process.*` itself,
|
|
14
|
+
* which is what makes commands testable in-process against `dist/cli/*.js`.
|
|
15
|
+
*/
|
|
16
|
+
import './commands/index.js';
|
|
17
|
+
/** Writer surface `runCli` needs. In production these wrap `process.stdout`/
|
|
18
|
+
* `process.stderr` with exact `console.log`/`console.error` semantics; tests
|
|
19
|
+
* pass a capturing stand-in as the optional second argument. Kept as an
|
|
20
|
+
* unexported inline shape (not part of the CLI's public surface). */
|
|
21
|
+
type Io = {
|
|
22
|
+
out: (line?: string) => void;
|
|
23
|
+
err: (line?: string) => void;
|
|
24
|
+
write: (s: string) => void;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Verb-first CLI entry point. `argv` is the command + its arguments (NOT
|
|
28
|
+
* `process.argv` — callers slice off the node/script prefix themselves, as
|
|
29
|
+
* `bin/upt.mjs` did with `process.argv.slice(2)`).
|
|
30
|
+
*/
|
|
31
|
+
export declare function runCli(argv: string[], io?: Io): Promise<number>;
|
|
32
|
+
export {};
|
|
33
|
+
//# sourceMappingURL=main.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/cli/main.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAQH,OAAO,qBAAqB,CAAC;AAE7B;;;qEAGqE;AACrE,KAAK,EAAE,GAAG;IACR,GAAG,EAAE,CAAC,IAAI,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7B,GAAG,EAAE,CAAC,IAAI,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7B,KAAK,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CAC5B,CAAC;AAwIF;;;;GAIG;AACH,wBAAsB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,GAAE,EAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAmEhF"}
|
package/dist/cli/main.js
ADDED
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Verb-first dispatcher for the UPT CLI — `upt <command> [args...]`.
|
|
3
|
+
*
|
|
4
|
+
* Owns: top-level `help`/`version` handling, the no-args demo, unknown-verb
|
|
5
|
+
* exit-2 contract, and per-command dispatch (parse -> run -> map thrown
|
|
6
|
+
* UsageError/CliError to the documented exit codes). Individual commands are
|
|
7
|
+
* plain data (see `command.ts`) registered via `registerCommand`; this file
|
|
8
|
+
* never special-cases a command by name, so later tasks add commands without
|
|
9
|
+
* touching `runCli`'s body.
|
|
10
|
+
*
|
|
11
|
+
* `main.ts` is the one place that imports the real `cli-api.js` barrel and
|
|
12
|
+
* wires `out`/`err`/`write` to real stdio — every `Command.run` receives
|
|
13
|
+
* those as an injected `CommandCtx`, never reaching for `process.*` itself,
|
|
14
|
+
* which is what makes commands testable in-process against `dist/cli/*.js`.
|
|
15
|
+
*/
|
|
16
|
+
import * as api from '../cli-api.js';
|
|
17
|
+
import { UsageError, CliError } from './errors.js';
|
|
18
|
+
import { parseArgs } from './args.js';
|
|
19
|
+
import { packageVersion } from './version.js';
|
|
20
|
+
import { resolveCommand } from './command.js';
|
|
21
|
+
// Side-effect import: registers every ported command (see commands/index.ts).
|
|
22
|
+
import './commands/index.js';
|
|
23
|
+
function stdoutLine(line) {
|
|
24
|
+
process.stdout.write((line ?? '') + '\n');
|
|
25
|
+
}
|
|
26
|
+
function stderrLine(line) {
|
|
27
|
+
process.stderr.write((line ?? '') + '\n');
|
|
28
|
+
}
|
|
29
|
+
function stdoutRaw(s) {
|
|
30
|
+
process.stdout.write(s);
|
|
31
|
+
}
|
|
32
|
+
const defaultIo = { out: stdoutLine, err: stderrLine, write: stdoutRaw };
|
|
33
|
+
const unknownCommandMessage = (name) => `Unknown command '${name}'. See \`upt help\`.`;
|
|
34
|
+
// Verbatim from bin/upt.mjs's `help()` (lines 71-179), plus two lines at the
|
|
35
|
+
// end documenting `upt version` and the global `--json` flag. Do NOT hand-edit
|
|
36
|
+
// tests/cli/golden/help.txt against this — that golden pins the OLD bin/upt.mjs
|
|
37
|
+
// and is only regenerated in Task 8, once main.ts becomes the live CLI.
|
|
38
|
+
const HELP_TEXT = `upt — Universal Physics Tensor bridge-inference CLI
|
|
39
|
+
|
|
40
|
+
Usage:
|
|
41
|
+
upt explain <quantity> [name=value | name] ...
|
|
42
|
+
Explain how the graph determines a quantity: the identifiability
|
|
43
|
+
verdict, recovered value, derivation chains, and whether the inputs
|
|
44
|
+
are dimensionally sufficient.
|
|
45
|
+
e.g. upt explain hawking-temperature mass=1.989e30
|
|
46
|
+
|
|
47
|
+
upt priority
|
|
48
|
+
Triage the speculative bridges by structural DECIDABILITY against
|
|
49
|
+
established physics (Tiers 1-3). NOT a credibility ranking.
|
|
50
|
+
|
|
51
|
+
upt audit
|
|
52
|
+
Try to derive every built-in bridge equation by dimensions: which
|
|
53
|
+
re-derive as a recognized monomial (with the prefactor recovered),
|
|
54
|
+
which are decoys, which are dimensionally open.
|
|
55
|
+
|
|
56
|
+
upt map [--source=catalog|canonical|both] [--format=text|mermaid|dot|svg]
|
|
57
|
+
[--proposed] [--out=PATH] [--equation "TARGET = EXPR"]
|
|
58
|
+
Map how the equations LINK: connected components (clusters) of the
|
|
59
|
+
graph by shared quantities, the anchored core, the link hubs, and
|
|
60
|
+
the isolated tail.
|
|
61
|
+
--format=mermaid|dot|svg emits the VISUAL map (quantities = nodes,
|
|
62
|
+
equations = junctions colored by status, one subgraph per component).
|
|
63
|
+
text (default) is the unchanged linkage printout. svg renders the dot
|
|
64
|
+
layout via the optional @viz-js/viz peer (npm i @viz-js/viz; or pipe
|
|
65
|
+
dot through "dot -Tsvg"). --proposed overlays the unadjudicated
|
|
66
|
+
identity-consequence relations (gray dashed). --out writes to a file
|
|
67
|
+
(default stdout).
|
|
68
|
+
--equation "TARGET = EXPR" injects YOUR OWN equation as a violet 'user'
|
|
69
|
+
node and reports where it lands (which cluster / shared quantities), with
|
|
70
|
+
a "did you mean?" hint for names that miss the catalog vocabulary. Use
|
|
71
|
+
underscores for multi-word quantities (photon_energy -> photon-energy).
|
|
72
|
+
e.g. upt map --equation "period = 2*pi*sqrt(length/gravity)"
|
|
73
|
+
|
|
74
|
+
upt candidates [--source=catalog|canonical|both]
|
|
75
|
+
Propose candidate cross-cluster links (quantities of the same
|
|
76
|
+
dimension in different clusters) for PHYSICIST REVIEW — a
|
|
77
|
+
coincidence-heavy surface, not discovered bridges.
|
|
78
|
+
|
|
79
|
+
upt predict
|
|
80
|
+
Project the catalog onto the (scale × force) regime plane and rank
|
|
81
|
+
the EMPTY regime cells as undiscovered-connection hypotheses
|
|
82
|
+
(triadic closure). Makes the namesake tensor operational. Review
|
|
83
|
+
surface, not discovered bridges.
|
|
84
|
+
|
|
85
|
+
upt discover [--source=catalog|canonical|both]
|
|
86
|
+
VET the link candidates through the inference suite: hypothesise
|
|
87
|
+
each identification a≡b and test whether it merges disconnected
|
|
88
|
+
physics, unlocks quantities, and stays numerically consistent.
|
|
89
|
+
Ranks promising / inert / contradictory.
|
|
90
|
+
--source=canonical runs the funnel on the standard-physics L-layer
|
|
91
|
+
ALONE (bridges excluded) — new candidates from established physics,
|
|
92
|
+
and a self-consistency check (expect 0 contradictory).
|
|
93
|
+
--derive emits, for each 'promising' identification, the ONE algebraic
|
|
94
|
+
relation it implies (monomial elimination) as an UNADJUDICATED, math-only
|
|
95
|
+
proposal — NOT a bridge (Part-VI §XXVII-B). Pairs with --source=canonical.
|
|
96
|
+
--max-orders=N tunes the magnitude-clash threshold (default 3); looser N
|
|
97
|
+
keeps more candidates 'promising', tighter N falsifies more as clashes.
|
|
98
|
+
--anchor=k=v[,k2=v2] overrides the numeric anchor (default mass=M_sun)
|
|
99
|
+
for the consistency/closure check. Both reshape the candidate pool that
|
|
100
|
+
--derive consumes.
|
|
101
|
+
|
|
102
|
+
upt connectors
|
|
103
|
+
Of the 20 ISOLATED bridges, which could connect to the anchored
|
|
104
|
+
core via a same-dimension identification? The structural frontier —
|
|
105
|
+
same-kind connectors are the motivated set for physicist review.
|
|
106
|
+
|
|
107
|
+
upt coverage
|
|
108
|
+
Audit the catalog's empirical grounding — which bridges are
|
|
109
|
+
data-confronted vs graph-computable vs encoded-only vs thin — to
|
|
110
|
+
target the physicist review. Fabricates nothing.
|
|
111
|
+
|
|
112
|
+
upt canonical
|
|
113
|
+
List the canonical-equation registry — the standard-physics L-layer
|
|
114
|
+
(textbook "answer key") with each entry's fidelity (L0/L1/L2),
|
|
115
|
+
domain, and bridge partners, plus the coverage gap.
|
|
116
|
+
|
|
117
|
+
upt recover
|
|
118
|
+
Validate bridges against standard physics: classify each bridge↔
|
|
119
|
+
canonical link as restates-canonical (F4 circularity — NOT a
|
|
120
|
+
discovery), recovers (undeclared structural match), or
|
|
121
|
+
dimensional-only.
|
|
122
|
+
|
|
123
|
+
upt symbolic [--simplify]
|
|
124
|
+
Compose bridges' SYMBOLIC (AST) forms, not just their numeric
|
|
125
|
+
evaluators (the Observable contract). Shows the CT-1 / CT-1b chains
|
|
126
|
+
composed by substitution, dimensionally validated and evaluable.
|
|
127
|
+
With --simplify, folds the composed AST via MathTS (k_B cancels),
|
|
128
|
+
re-validated dimensionally + numerically.
|
|
129
|
+
|
|
130
|
+
upt eval "<formula>" name=value ...
|
|
131
|
+
Evaluate YOUR OWN scalar formula (safe — arithmetic only). Knows
|
|
132
|
+
pi/tau and sqrt/exp/ln/sin/...; any other name must be supplied.
|
|
133
|
+
e.g. upt eval "hbar*c^3/(8*pi*G*M*k_B)" hbar=1.054571817e-34 \\
|
|
134
|
+
c=299792458 G=6.6743e-11 M=1.989e30 k_B=1.380649e-23
|
|
135
|
+
|
|
136
|
+
upt derive <target:dim> <var:dim> ... [--formula "<expr>"]
|
|
137
|
+
Derive YOUR OWN equation's dimensional form. <dim> is a named
|
|
138
|
+
dimension (length, time, mass, velocity, ...), a constant (hbar, c,
|
|
139
|
+
G, k_B, e), or explicit (L^3.M^-1.T^-2). With --formula, also verify
|
|
140
|
+
it and recover the dimensionless prefactor.
|
|
141
|
+
e.g. upt derive period:time length:length gravity:acceleration \\
|
|
142
|
+
--formula "2*pi*sqrt(length/gravity)"
|
|
143
|
+
|
|
144
|
+
upt help Show this message.
|
|
145
|
+
|
|
146
|
+
Run with no arguments for a short demo.
|
|
147
|
+
|
|
148
|
+
upt version Show the installed CLI/package version.
|
|
149
|
+
--json Global flag: emit a machine-readable JSON envelope instead of
|
|
150
|
+
text (where the command supports it).`;
|
|
151
|
+
/**
|
|
152
|
+
* Verb-first CLI entry point. `argv` is the command + its arguments (NOT
|
|
153
|
+
* `process.argv` — callers slice off the node/script prefix themselves, as
|
|
154
|
+
* `bin/upt.mjs` did with `process.argv.slice(2)`).
|
|
155
|
+
*/
|
|
156
|
+
export async function runCli(argv, io = defaultIo) {
|
|
157
|
+
const { out, err, write } = io;
|
|
158
|
+
try {
|
|
159
|
+
const [cmd, ...rest] = argv;
|
|
160
|
+
if (cmd === undefined) {
|
|
161
|
+
// Byte-identical to bin/upt.mjs's `case undefined` (lines 861-865): a
|
|
162
|
+
// banner line, then dispatch to the registered `explain` + `priority`
|
|
163
|
+
// commands with their historical demo arguments.
|
|
164
|
+
out('upt — bridge-inference CLI. Demo (run `upt help` for usage):');
|
|
165
|
+
const explainCmd = resolveCommand('explain');
|
|
166
|
+
if (!explainCmd) {
|
|
167
|
+
throw new CliError("upt: the demo needs the 'explain' command, which is not registered yet");
|
|
168
|
+
}
|
|
169
|
+
const explainArgs = parseArgs('explain', ['hawking-temperature', 'mass=1.989e30'], explainCmd.flags);
|
|
170
|
+
const explainCtx = { args: explainArgs, api, out, err, write };
|
|
171
|
+
const explainStatus = await explainCmd.run(explainCtx);
|
|
172
|
+
if (explainStatus !== 0)
|
|
173
|
+
return explainStatus;
|
|
174
|
+
const priorityCmd = resolveCommand('priority');
|
|
175
|
+
if (!priorityCmd) {
|
|
176
|
+
throw new CliError("upt: the demo needs the 'priority' command, which is not registered yet");
|
|
177
|
+
}
|
|
178
|
+
const priorityArgs = parseArgs('priority', [], priorityCmd.flags);
|
|
179
|
+
const priorityCtx = { args: priorityArgs, api, out, err, write };
|
|
180
|
+
return await priorityCmd.run(priorityCtx);
|
|
181
|
+
}
|
|
182
|
+
if (cmd === 'help' || cmd === '--help' || cmd === '-h') {
|
|
183
|
+
const target = rest[0];
|
|
184
|
+
if (target !== undefined) {
|
|
185
|
+
const command = resolveCommand(target);
|
|
186
|
+
if (!command)
|
|
187
|
+
throw new UsageError(unknownCommandMessage(target));
|
|
188
|
+
out(command.help);
|
|
189
|
+
return 0;
|
|
190
|
+
}
|
|
191
|
+
out(HELP_TEXT);
|
|
192
|
+
return 0;
|
|
193
|
+
}
|
|
194
|
+
if (cmd === 'version' || cmd === '--version' || cmd === '-v') {
|
|
195
|
+
out(packageVersion());
|
|
196
|
+
return 0;
|
|
197
|
+
}
|
|
198
|
+
const command = resolveCommand(cmd);
|
|
199
|
+
if (!command) {
|
|
200
|
+
err(unknownCommandMessage(cmd));
|
|
201
|
+
return 2;
|
|
202
|
+
}
|
|
203
|
+
const parsed = parseArgs(command.name, rest, command.flags);
|
|
204
|
+
const ctx = { args: parsed, api, out, err, write };
|
|
205
|
+
return await command.run(ctx);
|
|
206
|
+
}
|
|
207
|
+
catch (e) {
|
|
208
|
+
if (e instanceof UsageError) {
|
|
209
|
+
err(e.message);
|
|
210
|
+
return 2;
|
|
211
|
+
}
|
|
212
|
+
if (e instanceof CliError) {
|
|
213
|
+
err(e.message);
|
|
214
|
+
return 1;
|
|
215
|
+
}
|
|
216
|
+
throw e;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
//# sourceMappingURL=main.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"main.js","sourceRoot":"","sources":["../../src/cli/main.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,GAAG,MAAM,eAAe,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAmB,MAAM,cAAc,CAAC;AAC/D,8EAA8E;AAC9E,OAAO,qBAAqB,CAAC;AAY7B,SAAS,UAAU,CAAC,IAAa;IAC/B,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC;AAC5C,CAAC;AAED,SAAS,UAAU,CAAC,IAAa;IAC/B,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC;AAC5C,CAAC;AAED,SAAS,SAAS,CAAC,CAAS;IAC1B,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AAC1B,CAAC;AAED,MAAM,SAAS,GAAO,EAAE,GAAG,EAAE,UAAU,EAAE,GAAG,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC;AAE7E,MAAM,qBAAqB,GAAG,CAAC,IAAY,EAAU,EAAE,CAAC,oBAAoB,IAAI,sBAAsB,CAAC;AAEvG,6EAA6E;AAC7E,+EAA+E;AAC/E,gFAAgF;AAChF,wEAAwE;AACxE,MAAM,SAAS,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wDAgHsC,CAAC;AAEzD;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,MAAM,CAAC,IAAc,EAAE,KAAS,SAAS;IAC7D,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC;IAE/B,IAAI,CAAC;QACH,MAAM,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC;QAE5B,IAAI,GAAG,KAAK,SAAS,EAAE,CAAC;YACtB,sEAAsE;YACtE,sEAAsE;YACtE,iDAAiD;YACjD,GAAG,CAAC,8DAA8D,CAAC,CAAC;YAEpE,MAAM,UAAU,GAAG,cAAc,CAAC,SAAS,CAAC,CAAC;YAC7C,IAAI,CAAC,UAAU,EAAE,CAAC;gBAChB,MAAM,IAAI,QAAQ,CAAC,wEAAwE,CAAC,CAAC;YAC/F,CAAC;YACD,MAAM,WAAW,GAAG,SAAS,CAAC,SAAS,EAAE,CAAC,qBAAqB,EAAE,eAAe,CAAC,EAAE,UAAU,CAAC,KAAK,CAAC,CAAC;YACrG,MAAM,UAAU,GAAe,EAAE,IAAI,EAAE,WAAW,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC;YAC3E,MAAM,aAAa,GAAG,MAAM,UAAU,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;YACvD,IAAI,aAAa,KAAK,CAAC;gBAAE,OAAO,aAAa,CAAC;YAE9C,MAAM,WAAW,GAAG,cAAc,CAAC,UAAU,CAAC,CAAC;YAC/C,IAAI,CAAC,WAAW,EAAE,CAAC;gBACjB,MAAM,IAAI,QAAQ,CAAC,yEAAyE,CAAC,CAAC;YAChG,CAAC;YACD,MAAM,YAAY,GAAG,SAAS,CAAC,UAAU,EAAE,EAAE,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;YAClE,MAAM,WAAW,GAAe,EAAE,IAAI,EAAE,YAAY,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC;YAC7E,OAAO,MAAM,WAAW,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;QAC5C,CAAC;QAED,IAAI,GAAG,KAAK,MAAM,IAAI,GAAG,KAAK,QAAQ,IAAI,GAAG,KAAK,IAAI,EAAE,CAAC;YACvD,MAAM,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;YACvB,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;gBACzB,MAAM,OAAO,GAAG,cAAc,CAAC,MAAM,CAAC,CAAC;gBACvC,IAAI,CAAC,OAAO;oBAAE,MAAM,IAAI,UAAU,CAAC,qBAAqB,CAAC,MAAM,CAAC,CAAC,CAAC;gBAClE,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;gBAClB,OAAO,CAAC,CAAC;YACX,CAAC;YACD,GAAG,CAAC,SAAS,CAAC,CAAC;YACf,OAAO,CAAC,CAAC;QACX,CAAC;QAED,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,WAAW,IAAI,GAAG,KAAK,IAAI,EAAE,CAAC;YAC7D,GAAG,CAAC,cAAc,EAAE,CAAC,CAAC;YACtB,OAAO,CAAC,CAAC;QACX,CAAC;QAED,MAAM,OAAO,GAAG,cAAc,CAAC,GAAG,CAAC,CAAC;QACpC,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,GAAG,CAAC,qBAAqB,CAAC,GAAG,CAAC,CAAC,CAAC;YAChC,OAAO,CAAC,CAAC;QACX,CAAC;QAED,MAAM,MAAM,GAAG,SAAS,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;QAC5D,MAAM,GAAG,GAAe,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC;QAC/D,OAAO,MAAM,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAChC,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,IAAI,CAAC,YAAY,UAAU,EAAE,CAAC;YAC5B,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;YACf,OAAO,CAAC,CAAC;QACX,CAAC;QACD,IAAI,CAAC,YAAY,QAAQ,EAAE,CAAC;YAC1B,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;YACf,OAAO,CAAC,CAAC;QACX,CAAC;QACD,MAAM,CAAC,CAAC;IACV,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* JSON output envelope for the UPT CLI.
|
|
3
|
+
*
|
|
4
|
+
* Physics results genuinely contain non-finite numbers (e.g. `anchoring:
|
|
5
|
+
* Infinity` in the priority board). `JSON.stringify` silently turns those
|
|
6
|
+
* into `null`, which is indistinguishable from an absent value. `sanitize`
|
|
7
|
+
* deep-copies a value into a JSON-safe shape first, encoding NaN/Infinity
|
|
8
|
+
* as explicit strings so round-tripping through JSON preserves them.
|
|
9
|
+
*/
|
|
10
|
+
export interface JsonEnvelope {
|
|
11
|
+
command: string;
|
|
12
|
+
source?: 'catalog' | 'canonical' | 'both';
|
|
13
|
+
options?: Record<string, unknown>;
|
|
14
|
+
epistemics?: string;
|
|
15
|
+
result: unknown;
|
|
16
|
+
}
|
|
17
|
+
export declare function sanitize(v: unknown): unknown;
|
|
18
|
+
export declare function emitJson(env: JsonEnvelope, write?: (s: string) => void): void;
|
|
19
|
+
//# sourceMappingURL=output.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"output.d.ts","sourceRoot":"","sources":["../../src/cli/output.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,MAAM,CAAC;IAC1C,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,wBAAgB,QAAQ,CAAC,CAAC,EAAE,OAAO,GAAG,OAAO,CA2C5C;AAED,wBAAgB,QAAQ,CAAC,GAAG,EAAE,YAAY,EAAE,KAAK,GAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAqC,GAAG,IAAI,CAE7G"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* JSON output envelope for the UPT CLI.
|
|
3
|
+
*
|
|
4
|
+
* Physics results genuinely contain non-finite numbers (e.g. `anchoring:
|
|
5
|
+
* Infinity` in the priority board). `JSON.stringify` silently turns those
|
|
6
|
+
* into `null`, which is indistinguishable from an absent value. `sanitize`
|
|
7
|
+
* deep-copies a value into a JSON-safe shape first, encoding NaN/Infinity
|
|
8
|
+
* as explicit strings so round-tripping through JSON preserves them.
|
|
9
|
+
*/
|
|
10
|
+
export function sanitize(v) {
|
|
11
|
+
if (typeof v === 'number') {
|
|
12
|
+
if (Number.isNaN(v))
|
|
13
|
+
return 'NaN';
|
|
14
|
+
if (v === Infinity)
|
|
15
|
+
return 'Infinity';
|
|
16
|
+
if (v === -Infinity)
|
|
17
|
+
return '-Infinity';
|
|
18
|
+
return v;
|
|
19
|
+
}
|
|
20
|
+
if (typeof v === 'function') {
|
|
21
|
+
// Caller decides how to represent "no value here" (omit vs. null) based
|
|
22
|
+
// on context (object key vs. array slot); signal via undefined and let
|
|
23
|
+
// the array/object branches below handle it.
|
|
24
|
+
return undefined;
|
|
25
|
+
}
|
|
26
|
+
if (Array.isArray(v)) {
|
|
27
|
+
const out = [];
|
|
28
|
+
for (const item of v) {
|
|
29
|
+
const sanitized = sanitize(item);
|
|
30
|
+
out.push(typeof item === 'function' ? null : sanitized);
|
|
31
|
+
}
|
|
32
|
+
return out;
|
|
33
|
+
}
|
|
34
|
+
if (v instanceof Map) {
|
|
35
|
+
const out = {};
|
|
36
|
+
for (const [key, value] of v) {
|
|
37
|
+
if (typeof value === 'function')
|
|
38
|
+
continue;
|
|
39
|
+
out[String(key)] = sanitize(value);
|
|
40
|
+
}
|
|
41
|
+
return out;
|
|
42
|
+
}
|
|
43
|
+
if (v !== null && typeof v === 'object') {
|
|
44
|
+
const out = {};
|
|
45
|
+
for (const [key, value] of Object.entries(v)) {
|
|
46
|
+
if (value === undefined || typeof value === 'function')
|
|
47
|
+
continue;
|
|
48
|
+
out[key] = sanitize(value);
|
|
49
|
+
}
|
|
50
|
+
return out;
|
|
51
|
+
}
|
|
52
|
+
return v;
|
|
53
|
+
}
|
|
54
|
+
export function emitJson(env, write = (s) => process.stdout.write(s)) {
|
|
55
|
+
write(JSON.stringify(sanitize(env), null, 2) + '\n');
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=output.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"output.js","sourceRoot":"","sources":["../../src/cli/output.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAUH,MAAM,UAAU,QAAQ,CAAC,CAAU;IACjC,IAAI,OAAO,CAAC,KAAK,QAAQ,EAAE,CAAC;QAC1B,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;YAAE,OAAO,KAAK,CAAC;QAClC,IAAI,CAAC,KAAK,QAAQ;YAAE,OAAO,UAAU,CAAC;QACtC,IAAI,CAAC,KAAK,CAAC,QAAQ;YAAE,OAAO,WAAW,CAAC;QACxC,OAAO,CAAC,CAAC;IACX,CAAC;IAED,IAAI,OAAO,CAAC,KAAK,UAAU,EAAE,CAAC;QAC5B,wEAAwE;QACxE,uEAAuE;QACvE,6CAA6C;QAC7C,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC;QACrB,MAAM,GAAG,GAAc,EAAE,CAAC;QAC1B,KAAK,MAAM,IAAI,IAAI,CAAC,EAAE,CAAC;YACrB,MAAM,SAAS,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;YACjC,GAAG,CAAC,IAAI,CAAC,OAAO,IAAI,KAAK,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;QAC1D,CAAC;QACD,OAAO,GAAG,CAAC;IACb,CAAC;IAED,IAAI,CAAC,YAAY,GAAG,EAAE,CAAC;QACrB,MAAM,GAAG,GAA4B,EAAE,CAAC;QACxC,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;YAC7B,IAAI,OAAO,KAAK,KAAK,UAAU;gBAAE,SAAS;YAC1C,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;QACrC,CAAC;QACD,OAAO,GAAG,CAAC;IACb,CAAC;IAED,IAAI,CAAC,KAAK,IAAI,IAAI,OAAO,CAAC,KAAK,QAAQ,EAAE,CAAC;QACxC,MAAM,GAAG,GAA4B,EAAE,CAAC;QACxC,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC;YAC7C,IAAI,KAAK,KAAK,SAAS,IAAI,OAAO,KAAK,KAAK,UAAU;gBAAE,SAAS;YACjE,GAAG,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;QAC7B,CAAC;QACD,OAAO,GAAG,CAAC;IACb,CAAC;IAED,OAAO,CAAC,CAAC;AACX,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,GAAiB,EAAE,QAA6B,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;IACrG,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;AACvD,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Runtime package-version lookup for the UPT CLI (`upt --version`, etc.).
|
|
3
|
+
*
|
|
4
|
+
* Reads `package.json` relative to this module's own location rather than
|
|
5
|
+
* importing a generated constant, so it stays correct without a build step
|
|
6
|
+
* re-stamping a version string. From `dist/cli/version.js`, `../../package.json`
|
|
7
|
+
* resolves to the package root in both the dev checkout and the installed
|
|
8
|
+
* npm layout (`dist/` ships as part of the published package).
|
|
9
|
+
*/
|
|
10
|
+
export declare function packageVersion(): string;
|
|
11
|
+
//# sourceMappingURL=version.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/cli/version.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,wBAAgB,cAAc,IAAI,MAAM,CAIvC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Runtime package-version lookup for the UPT CLI (`upt --version`, etc.).
|
|
3
|
+
*
|
|
4
|
+
* Reads `package.json` relative to this module's own location rather than
|
|
5
|
+
* importing a generated constant, so it stays correct without a build step
|
|
6
|
+
* re-stamping a version string. From `dist/cli/version.js`, `../../package.json`
|
|
7
|
+
* resolves to the package root in both the dev checkout and the installed
|
|
8
|
+
* npm layout (`dist/` ships as part of the published package).
|
|
9
|
+
*/
|
|
10
|
+
import { readFileSync } from 'node:fs';
|
|
11
|
+
export function packageVersion() {
|
|
12
|
+
const pkgPath = new URL('../../package.json', import.meta.url);
|
|
13
|
+
const pkg = JSON.parse(readFileSync(pkgPath, 'utf8'));
|
|
14
|
+
return pkg.version;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=version.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/cli/version.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC,MAAM,UAAU,cAAc;IAC5B,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,oBAAoB,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC/D,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,OAAO,EAAE,MAAM,CAAC,CAAwB,CAAC;IAC7E,OAAO,GAAG,CAAC,OAAO,CAAC;AACrB,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI-facing barrel — the single stable entrypoint `bin/upt.mjs` imports.
|
|
3
|
+
*
|
|
4
|
+
* The CLI needs a handful of `@internal` analysis/composition/canonical
|
|
5
|
+
* functions that are deliberately NOT on the public surface (so they are not in
|
|
6
|
+
* the root `index.ts`). Previously `bin/upt.mjs` reached into ~10 deep `dist/`
|
|
7
|
+
* module paths to get them, coupling the CLI to the internal file layout — any
|
|
8
|
+
* module move silently broke the CLI. This barrel re-exports everything the CLI
|
|
9
|
+
* uses from one place, so layout changes touch only this file and `bin/upt.mjs`
|
|
10
|
+
* imports a single `dist/cli-api.js`.
|
|
11
|
+
*
|
|
12
|
+
* @internal — a CLI-support barrel; NOT re-exported from the root index, so it
|
|
13
|
+
* stays off the consumer-facing public surface.
|
|
14
|
+
*
|
|
15
|
+
* @module cli-api
|
|
16
|
+
*/
|
|
17
|
+
export { explainQuantity, CATALOG_GRAPH, CANONICAL_GRAPH, M_SUN_KG, composeSymbolic, be42Edge, be16Edge, lawSchwarzschildRadius, be42ViaRsEdge, format, buildVizModel, renderDotToSvg, equationLanding, analyzeUserEquation, buckinghamPi, dimensionallyDetermines, } from './index.js';
|
|
18
|
+
export { bridgePriority, attemptDerivation, dimensionalFreedom, linkageMap, proposeLinkCandidates, proposeOrphanConnectors, } from './composition/bridge-analysis.js';
|
|
19
|
+
export { getFormulaParser, getFormulaParserKind, getFormulaDimensionChecker, } from './numerical/formula-registry.js';
|
|
20
|
+
export { parseDimensionSpec } from './dimensional/dimension-spec.js';
|
|
21
|
+
export { predictMissingBridges } from './composition/bridge-prediction.js';
|
|
22
|
+
export { rankDiscoveries } from './composition/discovery.js';
|
|
23
|
+
export { auditCoverage } from './bridges/confrontation-coverage.js';
|
|
24
|
+
export { simplifyObservable } from './composition/expr-simplify.js';
|
|
25
|
+
export { CANONICAL_EQUATIONS, bridgesWithoutCanonicalPartner, } from './canonical/registry.js';
|
|
26
|
+
export { scanLinkages } from './canonical/linkage.js';
|
|
27
|
+
export { deriveProposedBridges } from './composition/proposed-bridges.js';
|
|
28
|
+
//# sourceMappingURL=cli-api.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli-api.d.ts","sourceRoot":"","sources":["../src/cli-api.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,EACL,eAAe,EACf,aAAa,EACb,eAAe,EACf,QAAQ,EACR,eAAe,EACf,QAAQ,EACR,QAAQ,EACR,sBAAsB,EACtB,aAAa,EACb,MAAM,EACN,aAAa,EACb,cAAc,EACd,eAAe,EACf,mBAAmB,EACnB,YAAY,EACZ,uBAAuB,GACxB,MAAM,YAAY,CAAC;AAGpB,OAAO,EACL,cAAc,EACd,iBAAiB,EACjB,kBAAkB,EAClB,UAAU,EACV,qBAAqB,EACrB,uBAAuB,GACxB,MAAM,kCAAkC,CAAC;AAG1C,OAAO,EACL,gBAAgB,EAChB,oBAAoB,EACpB,0BAA0B,GAC3B,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EACL,mBAAmB,EACnB,8BAA8B,GAC/B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC"}
|
package/dist/cli-api.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI-facing barrel — the single stable entrypoint `bin/upt.mjs` imports.
|
|
3
|
+
*
|
|
4
|
+
* The CLI needs a handful of `@internal` analysis/composition/canonical
|
|
5
|
+
* functions that are deliberately NOT on the public surface (so they are not in
|
|
6
|
+
* the root `index.ts`). Previously `bin/upt.mjs` reached into ~10 deep `dist/`
|
|
7
|
+
* module paths to get them, coupling the CLI to the internal file layout — any
|
|
8
|
+
* module move silently broke the CLI. This barrel re-exports everything the CLI
|
|
9
|
+
* uses from one place, so layout changes touch only this file and `bin/upt.mjs`
|
|
10
|
+
* imports a single `dist/cli-api.js`.
|
|
11
|
+
*
|
|
12
|
+
* @internal — a CLI-support barrel; NOT re-exported from the root index, so it
|
|
13
|
+
* stays off the consumer-facing public surface.
|
|
14
|
+
*
|
|
15
|
+
* @module cli-api
|
|
16
|
+
*/
|
|
17
|
+
// Public-API symbols (already on the root surface).
|
|
18
|
+
export { explainQuantity, CATALOG_GRAPH, CANONICAL_GRAPH, M_SUN_KG, composeSymbolic, be42Edge, be16Edge, lawSchwarzschildRadius, be42ViaRsEdge, format, buildVizModel, renderDotToSvg, equationLanding, analyzeUserEquation, buckinghamPi, dimensionallyDetermines, } from './index.js';
|
|
19
|
+
// Internal analysis surface (bridge-analysis.ts).
|
|
20
|
+
export { bridgePriority, attemptDerivation, dimensionalFreedom, linkageMap, proposeLinkCandidates, proposeOrphanConnectors, } from './composition/bridge-analysis.js';
|
|
21
|
+
// Other internal modules the CLI drives.
|
|
22
|
+
export { getFormulaParser, getFormulaParserKind, getFormulaDimensionChecker, } from './numerical/formula-registry.js';
|
|
23
|
+
export { parseDimensionSpec } from './dimensional/dimension-spec.js';
|
|
24
|
+
export { predictMissingBridges } from './composition/bridge-prediction.js';
|
|
25
|
+
export { rankDiscoveries } from './composition/discovery.js';
|
|
26
|
+
export { auditCoverage } from './bridges/confrontation-coverage.js';
|
|
27
|
+
export { simplifyObservable } from './composition/expr-simplify.js';
|
|
28
|
+
export { CANONICAL_EQUATIONS, bridgesWithoutCanonicalPartner, } from './canonical/registry.js';
|
|
29
|
+
export { scanLinkages } from './canonical/linkage.js';
|
|
30
|
+
export { deriveProposedBridges } from './composition/proposed-bridges.js';
|
|
31
|
+
//# sourceMappingURL=cli-api.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli-api.js","sourceRoot":"","sources":["../src/cli-api.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,oDAAoD;AACpD,OAAO,EACL,eAAe,EACf,aAAa,EACb,eAAe,EACf,QAAQ,EACR,eAAe,EACf,QAAQ,EACR,QAAQ,EACR,sBAAsB,EACtB,aAAa,EACb,MAAM,EACN,aAAa,EACb,cAAc,EACd,eAAe,EACf,mBAAmB,EACnB,YAAY,EACZ,uBAAuB,GACxB,MAAM,YAAY,CAAC;AAEpB,kDAAkD;AAClD,OAAO,EACL,cAAc,EACd,iBAAiB,EACjB,kBAAkB,EAClB,UAAU,EACV,qBAAqB,EACrB,uBAAuB,GACxB,MAAM,kCAAkC,CAAC;AAE1C,yCAAyC;AACzC,OAAO,EACL,gBAAgB,EAChB,oBAAoB,EACpB,0BAA0B,GAC3B,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EACL,mBAAmB,EACnB,8BAA8B,GAC/B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC"}
|
|
@@ -31,8 +31,8 @@ import type { BridgeEdge } from './edge.js';
|
|
|
31
31
|
*/
|
|
32
32
|
export declare function dimensionalFreedom(e: BridgeEdge): number;
|
|
33
33
|
/** The outcome of trying to derive a bridge dimensionally + verify it. */
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
type DerivationStatus = 'derived' | 'decoy' | 'open' | 'no-samples';
|
|
35
|
+
interface DerivationResult {
|
|
36
36
|
readonly status: DerivationStatus;
|
|
37
37
|
readonly subset?: readonly string[];
|
|
38
38
|
readonly monomial?: Readonly<Record<string, number>>;
|
|
@@ -52,11 +52,11 @@ export declare function attemptDerivation(e: BridgeEdge): DerivationResult;
|
|
|
52
52
|
*/
|
|
53
53
|
export declare function anchoringDistance(edges: readonly BridgeEdge[], e: BridgeEdge): number;
|
|
54
54
|
/** How grounded the equation is, as a structural signal. */
|
|
55
|
-
|
|
55
|
+
type Grounding = 'grounded' | 'empirical' | 'decoy' | 'open';
|
|
56
56
|
/** Review-priority tier (1 = highest structural decidability). */
|
|
57
|
-
|
|
57
|
+
type Tier = 1 | 2 | 3;
|
|
58
58
|
/** One bridge's triage profile. */
|
|
59
|
-
|
|
59
|
+
interface BridgePriorityEntry {
|
|
60
60
|
readonly id: string;
|
|
61
61
|
readonly beId: number | null;
|
|
62
62
|
readonly status: string;
|
|
@@ -77,7 +77,7 @@ export interface BridgePriorityEntry {
|
|
|
77
77
|
*/
|
|
78
78
|
export declare function bridgePriority(edges: readonly BridgeEdge[]): BridgePriorityEntry[];
|
|
79
79
|
/** One connected cluster of equations linked by shared quantities. */
|
|
80
|
-
|
|
80
|
+
interface LinkageCluster {
|
|
81
81
|
/** Edge ids in this cluster. */
|
|
82
82
|
readonly edges: readonly string[];
|
|
83
83
|
readonly size: number;
|
|
@@ -89,7 +89,7 @@ export interface LinkageCluster {
|
|
|
89
89
|
readonly hubs: readonly string[];
|
|
90
90
|
}
|
|
91
91
|
/** The catalog's linkage structure. */
|
|
92
|
-
|
|
92
|
+
interface LinkageMap {
|
|
93
93
|
/** Clusters, largest first. */
|
|
94
94
|
readonly clusters: readonly LinkageCluster[];
|
|
95
95
|
readonly componentCount: number;
|
|
@@ -99,12 +99,9 @@ export interface LinkageMap {
|
|
|
99
99
|
readonly compositions: number;
|
|
100
100
|
}
|
|
101
101
|
/**
|
|
102
|
-
*
|
|
103
|
-
*
|
|
104
|
-
* `
|
|
105
|
-
* anchored core hubbed on a few quantities, plus thematic clusters and a
|
|
106
|
-
* long isolated tail. A descriptive structural map, NOT a credibility
|
|
107
|
-
* signal (see bridgePriority's caveat). Internal — not on the public
|
|
102
|
+
* The full linkage map: the {@link clusterMap} structure plus the (O(E²))
|
|
103
|
+
* pairwise-composition count. Only `upt map`'s headline needs the count, so
|
|
104
|
+
* everything else calls `clusterMap` directly. Internal — not on the public
|
|
108
105
|
* surface (mirrors the rest of bridge-analysis).
|
|
109
106
|
*/
|
|
110
107
|
export declare function linkageMap(edges: readonly BridgeEdge[]): LinkageMap;
|
|
@@ -145,7 +142,7 @@ export declare function proposeLinkCandidates(edges: readonly BridgeEdge[]): Lin
|
|
|
145
142
|
* bridge and the OTHER on an anchored-cluster bridge — accepting it would
|
|
146
143
|
* connect orphaned physics to the established core.
|
|
147
144
|
*/
|
|
148
|
-
|
|
145
|
+
interface OrphanConnector {
|
|
149
146
|
/** The isolated bridge's edge id (the orphan). */
|
|
150
147
|
readonly orphanEdge: string;
|
|
151
148
|
/** The orphan-side quantity. */
|
|
@@ -162,7 +159,7 @@ export interface OrphanConnector {
|
|
|
162
159
|
readonly sharedToken: string | null;
|
|
163
160
|
}
|
|
164
161
|
/** Orphan-connector report. */
|
|
165
|
-
|
|
162
|
+
interface OrphanConnectorReport {
|
|
166
163
|
/** Connectors, same-kind first then by orphan id. */
|
|
167
164
|
readonly connectors: readonly OrphanConnector[];
|
|
168
165
|
/** Of those, the same-kind subset count (the motivated set). */
|
|
@@ -186,4 +183,5 @@ export interface OrphanConnectorReport {
|
|
|
186
183
|
* radius). A REVIEW SURFACE only — Part-VI §XXVII-B. Internal.
|
|
187
184
|
*/
|
|
188
185
|
export declare function proposeOrphanConnectors(edges: readonly BridgeEdge[]): OrphanConnectorReport;
|
|
186
|
+
export {};
|
|
189
187
|
//# sourceMappingURL=bridge-analysis.d.ts.map
|