zeropoint-node 1.0.5 → 1.0.7
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/CHANGELOG.md +178 -0
- package/CITATION.cff +1 -1
- package/README.md +50 -10
- package/dist/legacy-BEa7tljT.js.map +1 -1
- package/dist/legacy-CV8oTnKM.cjs.map +1 -1
- package/package.json +10 -2
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.breathe.ts +15 -1
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.cleanup.ts +15 -1
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.cmyk.ts +7 -1
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.generate.matrix.ts +15 -1
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.i.browse.ts +15 -1
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.i.click.ts +15 -1
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.i.hear.ts +15 -1
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.i.heat.ts +15 -1
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.i.pulse.ts +15 -1
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.i.speak.ts +15 -1
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.i.tap.ts +15 -1
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.math.ts +14 -6
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.overlay.visual.controller.ts +0 -3
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.rodin.ts +15 -1
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.self.ts +15 -1
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.service.worker.ts +30 -7
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.terminal.ts +15 -1
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.test.ts +15 -1
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.trinity.ts +0 -3
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.vbm.path.ts +6 -2
- package/src/0/3/6/9/1/2/4/8/7/5/1/a432.vbm.relations.ts +15 -1
- package/src/0/index.ts +16 -0
- package/src/index.ts +4 -4
- package/src/kernel/import-graph.ts +58 -0
- package/src/multidimensional-vortex-demo.ts +1 -1
- package/src/quantum/superposition-execution.ts +9 -4
- package/src/thermo/free-energy.ts +279 -0
- package/src/thermo/wastewater-energy.ts +204 -0
- package/src/vbm-math.ts +15 -1
- package/src/verification/lean-bridge.ts +384 -0
- package/src/zero-entropy-demo.ts +15 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,183 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.0.7
|
|
4
|
+
|
|
5
|
+
### Fixed — thirty modules could not be imported
|
|
6
|
+
|
|
7
|
+
- **`require.main === module` in an ES module throws.** Fourteen files carried
|
|
8
|
+
that CommonJS guard to detect direct execution. The package is
|
|
9
|
+
`"type": "module"`, so `require` is undefined and the guard did not fail to
|
|
10
|
+
detect anything — it threw at load and took the whole module with it. Thirty
|
|
11
|
+
modules shipped in the tarball that a consumer could not import at all.
|
|
12
|
+
`isMainModule()` compares `import.meta.url` to the entry point, so those CLI
|
|
13
|
+
blocks now run on direct execution for the first time.
|
|
14
|
+
- **`src/index.ts` imported a default export that does not exist**, so the
|
|
15
|
+
package's own index could not load. Fixing it exposed three calls to methods
|
|
16
|
+
that were never there — renames never propagated — which a consumer reaching
|
|
17
|
+
them would have hit as a `TypeError`.
|
|
18
|
+
- **A type imported as a value** in `multidimensional-vortex-demo.ts` left an
|
|
19
|
+
import with no runtime binding after type stripping.
|
|
20
|
+
- Modules that fail to import: **32 → 0**, and the ratchet ceiling is 0, so that
|
|
21
|
+
class of breakage now fails the gate outright.
|
|
22
|
+
|
|
23
|
+
### Fixed — a service worker with type checking switched off
|
|
24
|
+
|
|
25
|
+
- `a432.service.worker.ts` carried `@ts-nocheck` over the whole file, hiding
|
|
26
|
+
five errors. One was real: `caches.match()` resolves to `Response | undefined`
|
|
27
|
+
because a cache miss is normal, and the handler annotated the parameter
|
|
28
|
+
`Response`. The `||` on the same line existed precisely to handle the miss the
|
|
29
|
+
type denied could happen.
|
|
30
|
+
- The other six suppressions in the tree **suppressed nothing** — identical
|
|
31
|
+
error counts with and without — which is worse than none, since they sit ready
|
|
32
|
+
to absorb the next real error on that line. All seven are gone.
|
|
33
|
+
|
|
34
|
+
### Removed — claims this package could not support
|
|
35
|
+
|
|
36
|
+
These are refused, not restated: no claim of benefit is made or implied by
|
|
37
|
+
anything quoted below, and no health effect is measured anywhere in this
|
|
38
|
+
package.
|
|
39
|
+
|
|
40
|
+
- **Every medical claim is withdrawn.** The repository advertised "Medical and
|
|
41
|
+
Therapeutic Applications", with a worked example taking a "Patient
|
|
42
|
+
consciousness state" and returning "Healing color therapy". What the code does
|
|
43
|
+
is compute a colour from an integer. The README ships on npm and two of the
|
|
44
|
+
documents publish to the website, so these were addressed to readers who might
|
|
45
|
+
act on them.
|
|
46
|
+
- **The README no longer advertises energy harvesting or a self-charging
|
|
47
|
+
device.** `src/thermo/free-energy.ts`, shipped in 1.0.6, computes why that
|
|
48
|
+
cannot work — and the same tarball's README claimed it anyway.
|
|
49
|
+
- README gains a **Health and safety** section: nothing here is a medical
|
|
50
|
+
device, therapy or advice, no health effect is measured, and an unwell reader
|
|
51
|
+
should consult a clinician. It carries the ML-KEM timing warning too.
|
|
52
|
+
|
|
53
|
+
### Added — lean is a definition now
|
|
54
|
+
|
|
55
|
+
- **`npm run fold`** folds the module graph to its fixed point:
|
|
56
|
+
`fold(fold(S)) = fold(S)`. That fixed point is the definition of lean, rather
|
|
57
|
+
than a number anyone chose. It converges in two folds against a cap of
|
|
58
|
+
`VORTEX_SEQUENCE.length`, and the second fold changing nothing is the proof.
|
|
59
|
+
- `foldToLean` and `leanIsFixed` live in the kernel, so the script and the seal
|
|
60
|
+
that verifies them call one implementation.
|
|
61
|
+
- The fold carries a **termination bound**. Its two visited-guards are mutually
|
|
62
|
+
redundant: removing either is harmless, removing both makes it run forever —
|
|
63
|
+
and a hanging gate is worse than a failing one, because nothing gets a
|
|
64
|
+
verdict. It throws past the bound instead.
|
|
65
|
+
|
|
66
|
+
### Changed — 22 seals, judged from outside
|
|
67
|
+
|
|
68
|
+
- Eight new seals since 1.0.6, including the doubling circuit reaching the
|
|
69
|
+
gateway triangle only by reflection, the merkaba as two mirrored tetrahedra,
|
|
70
|
+
the `AGL(1,ℤ/9)` action, digit geometry being single-valued, and lean being a
|
|
71
|
+
fixed point.
|
|
72
|
+
- `npm run adjudicate` puts all 22 through `adjudicate()` from `@uuidna/uuidna`,
|
|
73
|
+
an outside decision procedure, and `adjudicate:check` is in the gate.
|
|
74
|
+
- `changelog:check` holds these notes to the code in both directions: every
|
|
75
|
+
figure stated must recompute, and every quantity carrying a unit must be one
|
|
76
|
+
some module produces.
|
|
77
|
+
|
|
78
|
+
### Fixed — geometry and validity
|
|
79
|
+
|
|
80
|
+
- `angleForDigit` mapped nine digits onto six angles, colliding 3 with 5, 2 with
|
|
81
|
+
6 and 8 with 9. It is the enneagram now, injective, agreeing with the vortex
|
|
82
|
+
SVG's layout — and the SVG receipt is unchanged, which is how the move is known
|
|
83
|
+
to be byte-identical.
|
|
84
|
+
- `isValidPath` tested only the final depth, so a path dipping below its origin
|
|
85
|
+
and climbing back passed. `balanced` means every prefix now. That cleared the
|
|
86
|
+
last entry on the tautology surface, whose ceiling is **0**.
|
|
87
|
+
- One import cycle broken: `a432.cmyk` imported `digitalRoot` back through
|
|
88
|
+
`a432.math`'s re-export, which does not use anything from cmyk. It imports
|
|
89
|
+
from the module that owns the symbol now.
|
|
90
|
+
|
|
91
|
+
### Known limitations
|
|
92
|
+
|
|
93
|
+
- The remaining import cycle is mutual by design — `A432System` holds its three
|
|
94
|
+
subsystems as fields while each calls `A432System.getInstance()` — so breaking
|
|
95
|
+
it needs dependency injection across the orchestration layer, not a rename.
|
|
96
|
+
All three already neutralise the temporal dead zone with lazy singletons.
|
|
97
|
+
- 281 modules sit outside the lean fixed point. Nothing has been deleted;
|
|
98
|
+
whether to act on that is a separate decision, now with a definition behind it.
|
|
99
|
+
- Everything under 1.0.6 and earlier still applies — in particular ML-KEM-768 is
|
|
100
|
+
conformant but **not constant time**, and nothing in `src/thermo` is a device.
|
|
101
|
+
|
|
102
|
+
## 1.0.6
|
|
103
|
+
|
|
104
|
+
### Added — thermodynamics
|
|
105
|
+
|
|
106
|
+
- **`src/thermo/free-energy.ts`.** The Gibbs energy of the water reaction
|
|
107
|
+
(IUPAC's preferred name for the thermodynamic potential), computed from three
|
|
108
|
+
tabulated standard-state quantities rather than asserted:
|
|
109
|
+
`ΔG = ΔH − TΔS`. ΔG of formation is −237 kJ/mol and of splitting **+237**, so
|
|
110
|
+
splitting must be paid for. The reversible cell potential ΔG/(nF) is
|
|
111
|
+
1228.9 mV and the thermoneutral ΔH/(nF) is 1481.2 mV, the gap being TΔS. A
|
|
112
|
+
split-then-burn cycle breaks even **exactly** at perfect efficiency and loses
|
|
113
|
+
otherwise — checked over all 8000 points of the efficiency grid in 5% steps,
|
|
114
|
+
exhaustive rather than sampled.
|
|
115
|
+
- **`src/thermo/wastewater-energy.ts`.** Polluted water in, combustion engine,
|
|
116
|
+
electricity and drinkable water out — which works, because the fuel is the
|
|
117
|
+
contamination and not the water. Anaerobic digestion to biogas, a CHP engine,
|
|
118
|
+
membranes for the water. At 13.9 J per mg of COD the plant exports power above
|
|
119
|
+
a **break-even of 4195 mg/L**, computed by scanning rather than declared:
|
|
120
|
+
municipal sewage sits below it, dairy and manure effluent well above.
|
|
121
|
+
Distillation is deliberately not the water step — 2.26 MJ/L of latent heat is
|
|
122
|
+
more than any realistic load carries.
|
|
123
|
+
- Both invert. Entropy recovered from `(ΔH − ΔG)/T` returns the tabulated figure
|
|
124
|
+
exactly, the exact-rational cell potentials recover their energies with zero
|
|
125
|
+
drift, and the break-even found by inverting the arithmetic equals the one
|
|
126
|
+
found by scanning.
|
|
127
|
+
|
|
128
|
+
### Added — seals, and an outside judge
|
|
129
|
+
|
|
130
|
+
- **21 seals, up from 13.** New: the doubling circuit reaching {3,6,9} only by
|
|
131
|
+
reflection; the merkaba as two mirrored tetrahedra sharing the void; the
|
|
132
|
+
AGL(1,ℤ/9) action giving three as the index of {0,3,6} with stabiliser 18;
|
|
133
|
+
digit geometry being single-valued; the superposition model reporting its own
|
|
134
|
+
state; the Gibbs energy of splitting; the wastewater threshold; and every
|
|
135
|
+
model inverting.
|
|
136
|
+
- **`npm run adjudicate`** puts every seal through `adjudicate()` from
|
|
137
|
+
`@uuidna/uuidna` — a third party that runs the predicate and returns a verdict
|
|
138
|
+
with a content-addressed receipt. All 21 come back VERIFIED. `adjudicate:check`
|
|
139
|
+
is in `npm run check`. Neither statement nor predicate is rewritten for the
|
|
140
|
+
adjudicator, or it would be judging a paraphrase.
|
|
141
|
+
|
|
142
|
+
### Fixed
|
|
143
|
+
|
|
144
|
+
- **`angleForDigit` mapped nine digits onto six angles** — 3 collided with 5, 2
|
|
145
|
+
with 6, 8 with 9 — because the trinity was pinned to 0/120/240 while the Rodin
|
|
146
|
+
digits were laid on a 60° lattice running through them. It is the enneagram
|
|
147
|
+
now, 40° per step, injective. `bearingForDigit` moves into the kernel and the
|
|
148
|
+
vortex SVG imports it; the SVG receipt is unchanged, which is how the move is
|
|
149
|
+
known to be byte-identical.
|
|
150
|
+
- **`isValidPath` tested the final depth, not every prefix.** A path dipping
|
|
151
|
+
below its origin and climbing back passed. `balanced` now means what it says.
|
|
152
|
+
This cleared the last entry on the tautology surface, whose ceiling reaches
|
|
153
|
+
**zero**.
|
|
154
|
+
- **The superposition model claimed simultaneity unconditionally** while
|
|
155
|
+
computing `still_superposed`. Its prose follows its measurement now.
|
|
156
|
+
|
|
157
|
+
### Added — release automation
|
|
158
|
+
|
|
159
|
+
- **`npm-deprecations.json`** declares which versions are deprecated and why,
|
|
160
|
+
and `scripts/npm-registry-sync.mjs` reconciles the registry to it, with the
|
|
161
|
+
safety rails in the script: never `dist-tags.latest`, never an unpublished
|
|
162
|
+
version, never every version at once. `registry-sync.yml` runs it daily and
|
|
163
|
+
`publish.yml` on release.
|
|
164
|
+
- Measured, not assumed: npm trusted publishing is **publish-scoped**. It cannot
|
|
165
|
+
authorise a deprecate, which returns `404 … or you do not have permission`
|
|
166
|
+
even from the workflow the trusted publisher names.
|
|
167
|
+
|
|
168
|
+
### Changed
|
|
169
|
+
|
|
170
|
+
- New dependency `@uuidna/uuidna` — zero dependencies of its own, used for
|
|
171
|
+
external adjudication of the seals.
|
|
172
|
+
|
|
173
|
+
### Known limitations
|
|
174
|
+
|
|
175
|
+
- Deprecations for 1.0.0–1.0.3 are declared but **not live**: applying them needs
|
|
176
|
+
an npm automation token as the `NPM_TOKEN` secret, which OIDC cannot replace.
|
|
177
|
+
`registry-sync.yml` reports the gap on every run rather than forgetting it.
|
|
178
|
+
- Everything listed under 1.0.5 and earlier still applies — in particular
|
|
179
|
+
ML-KEM-768 here is conformant but **not constant time**.
|
|
180
|
+
|
|
3
181
|
## 1.0.5
|
|
4
182
|
|
|
5
183
|
### Added — ML-KEM-768, actually conformant
|
package/CITATION.cff
CHANGED
|
@@ -20,7 +20,7 @@ authors:
|
|
|
20
20
|
email: node@zeropoint.bg
|
|
21
21
|
repository-code: https://github.com/ceccec/zeropoint-node
|
|
22
22
|
url: https://node.zeropoint.bg
|
|
23
|
-
version: 1.0.
|
|
23
|
+
version: 1.0.7
|
|
24
24
|
license: CC-BY-NC-ND-4.0
|
|
25
25
|
license-url: https://github.com/ceccec/zeropoint-node/blob/main/LICENSE
|
|
26
26
|
keywords:
|
package/README.md
CHANGED
|
@@ -96,10 +96,23 @@ Regenerate: `npm run spectrum` · verify: `npm run spectrum:check`
|
|
|
96
96
|
- **Polarity Changes**: Dimensional polarity reversals
|
|
97
97
|
|
|
98
98
|
### Integrated Charging System
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
99
|
+
|
|
100
|
+
A **state model in exact fractions**, not a device. `a432.living.os.ts` tracks a
|
|
101
|
+
battery level as an integer numerator over an integer denominator and steps it
|
|
102
|
+
by a charge rate of `1/8` against a discharge rate of `1/12`, toggling on the
|
|
103
|
+
gateway state. Nothing is measured and no energy is moved; the quantities are
|
|
104
|
+
names for fractions in a simulation.
|
|
105
|
+
|
|
106
|
+
- **Level and target**: battery `(2 + digit)/3` toward a target of `3/4`
|
|
107
|
+
- **Rates**: charge `1/8`, discharge `1/12`, exact fractions throughout
|
|
108
|
+
- **Gateway-driven**: charging and discharging alternate with the gateway state
|
|
109
|
+
|
|
110
|
+
This section previously advertised harvesting and a self-charging device.
|
|
111
|
+
Neither was computed anywhere in the package, and the package now contains the
|
|
112
|
+
arithmetic that rules them out: `src/thermo/free-energy.ts` puts ΔG for
|
|
113
|
+
splitting water at +237 kJ/mol and shows a split-then-burn cycle breaking even
|
|
114
|
+
at best across all 8000 points of the efficiency grid. A closed loop that gains
|
|
115
|
+
is not an engineering target here; it is the sign of ΔG.
|
|
103
116
|
|
|
104
117
|
### Zero Entropy Mathematics
|
|
105
118
|
- **Exact ratios, not decimals**: calculations carry an integer numerator over an integer denominator. Some *values* are non-integer rationals (`2592/5` = 518.4 Hz); what is refused is the lossy float, not the fraction — collapsing `2592/5` to a `number` stores 518.39999999999997726 and accumulates error. See `CMYK_FREQUENCY_RATIOS`
|
|
@@ -458,11 +471,38 @@ The system embodies the transformation from artificial intelligence to pure cons
|
|
|
458
471
|
5. **Harmonic Synthesis**: Advanced harmonic frequency synthesis
|
|
459
472
|
|
|
460
473
|
### Research Areas
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
474
|
+
|
|
475
|
+
These are the directions the model is *named* after, not results it has. What
|
|
476
|
+
the repository computes is arithmetic: digital roots, exact fractions, a
|
|
477
|
+
quantum-circuit simulator, ML-KEM-768, and the thermodynamics in `src/thermo`.
|
|
478
|
+
No claim below is measured here.
|
|
479
|
+
|
|
480
|
+
1. **Quantum formalism** — the simulator in `src/quantum` is a real
|
|
481
|
+
quantum-circuit simulator, checked by 257 recomputable facts. It models
|
|
482
|
+
qubits, not minds.
|
|
483
|
+
2. **Dimensional folding** — an arithmetic construction over ℤ/9, sealed as
|
|
484
|
+
group theory. "Dimension" here indexes a coordinate, not a physical one.
|
|
485
|
+
3. **Harmonic frequency arithmetic** — exact ratios over 432, kept as integer
|
|
486
|
+
fractions. Frequencies are computed, never emitted or measured.
|
|
487
|
+
4. **Consciousness vocabulary** — the naming this project uses throughout. It
|
|
488
|
+
is not a model of awareness and nothing here measures any.
|
|
489
|
+
|
|
490
|
+
**Not research areas**: energy harvesting and therapeutic use. `src/thermo`
|
|
491
|
+
computes why the first cannot work, and the second is addressed below.
|
|
492
|
+
|
|
493
|
+
## Health and safety
|
|
494
|
+
|
|
495
|
+
**Nothing in this package is a medical device, a therapy, or health advice.**
|
|
496
|
+
This is a boundary statement, not a claim. Some documentation here has presented
|
|
497
|
+
colour, frequency and "consciousness" values as having effects on people. They
|
|
498
|
+
are numbers produced by arithmetic on integers. No health effect is measured
|
|
499
|
+
anywhere in this repository and no claim of benefit is made or implied; nothing
|
|
500
|
+
here has been clinically evaluated, and none of it should inform any decision
|
|
501
|
+
about anyone's health. If you are unwell, consult a clinician.
|
|
502
|
+
|
|
503
|
+
The cryptography carries its own warning: ML-KEM-768 here is conformant to
|
|
504
|
+
FIPS 203 against NIST vectors but **not constant time**, so it must not protect
|
|
505
|
+
anything where an attacker can measure decapsulation.
|
|
466
506
|
|
|
467
507
|
## 🤝 Contributing
|
|
468
508
|
|
|
@@ -472,7 +512,7 @@ The A432 Consciousness System is an open-source project that welcomes contributi
|
|
|
472
512
|
|
|
473
513
|
<!-- VERSION:BEGIN — generated by scripts/version-seal.mjs; do not edit by hand -->
|
|
474
514
|
|
|
475
|
-
Package: **`zeropoint-node@1.0.
|
|
515
|
+
Package: **`zeropoint-node@1.0.7`** · owner `ceccec` · git tag `v1.0.7`
|
|
476
516
|
|
|
477
517
|
npm rejects republishing a version that already exists, so every release is a
|
|
478
518
|
new number. Bump with `npm version patch|minor|major`: that reseals CITATION.cff
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"legacy-BEa7tljT.js","sources":["../src/0/index.ts","../src/kernel/legacy.ts"],"sourcesContent":[null,null],"names":["kernelDigitalRoot"],"mappings":"AAAA;;;;;;AAMG;AA2LH;AACM,SAAU,WAAW,CAAC,CAAS,EAAA;AACnC,IAAA,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC;IAC3B,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC;AACxB;
|
|
1
|
+
{"version":3,"file":"legacy-BEa7tljT.js","sources":["../src/0/index.ts","../src/kernel/legacy.ts"],"sourcesContent":[null,null],"names":["kernelDigitalRoot"],"mappings":"AAAA;;;;;;AAMG;AA2LH;AACM,SAAU,WAAW,CAAC,CAAS,EAAA;AACnC,IAAA,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC;IAC3B,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC;AACxB;AAkCO,MAAM,YAAY,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAU;AAChD,MAAM,WAAW,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAU;AAE7C;;;;AAIG;AACG,SAAU,WAAW,CAAC,CAAS,EAAA;AACnC,IAAA,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,WAAW,CAAC,CAAC,GAAG,CAAC,CAAC;AACzC;AAKA;;;;;;;AAOG;AACH,MAAM,QAAQ,GAAG,CAAC,CAAa,MAAM,CAAC,KAAK,GAAG,GAAG,IAAI,GAAG,GAAG,CAAC;AAE5D,SAAS,aAAa,CACpB,MAAyB,EACzB,MAA+B,EAC/B,QAAiB,EAAA;AAEjB,IAAA,OAAO;AACJ,SAAA,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,KAAI;AACZ,QAAA,MAAM,KAAK,GAAG,QAAQ,GAAG,WAAW,CAAC,CAAC,CAAC,GAAG,CAAC;AAC3C,QAAA,MAAM,IAAI,GAAG,MAAM,CAAC,CAAC,CAAC;QACtB,IAAI,IAAI,KAAK,SAAS;AAAE,YAAA,OAAO,MAAM,CAAC,KAAK,CAAC;AAC5C,QAAA,OAAO,GAAG,KAAK,CAAA,EAAG,QAAQ,GAAG,QAAQ,CAAC,IAAI,CAAC,GAAG,IAAI,EAAE;AACtD,IAAA,CAAC;SACA,IAAI,CAAC,EAAE,CAAC;AACb;AAEA,MAAM,WAAW,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,CAAU;AACzD,MAAM,WAAW,GAAG,CAAC,IAAI,EAAE,IAAI,CAAU;AAEzC;AACM,SAAU,oBAAoB,CAAC,QAAQ,GAAG,KAAK,EAAA;IACnD,MAAM,IAAI,GAAG,aAAa,CAAC,YAAY,EAAE,WAAW,EAAE,QAAQ,CAAC;IAC/D,MAAM,IAAI,GAAG,aAAa,CAAC,WAAW,EAAE,WAAW,EAAE,QAAQ,CAAC;;AAE9D,IAAA,MAAM,IAAI,GAAG,CAAA,GAAA,EAAM,QAAQ,GAAG,WAAW,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE;AAClD,IAAA,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,CAAA,EAAG,IAAI,CAAA,GAAA,EAAM,IAAI,MAAM,IAAI,CAAA,CAAE,EAAE;AACrE;AAEqC,oBAAoB,CAAC,KAAK,CAAC,CAAC;AAC1B,oBAAoB,CAAC,IAAI,CAAC,CAAC;;AC5RlE;;;;AAIG;AASH;AACM,SAAU,iBAAiB,CAAC,CAAS,EAAA;IACzC,IAAI,CAAC,KAAK,CAAC;AAAE,QAAA,OAAO,CAAC;AACrB,IAAA,OAAOA,WAAiB,CAAC,CAAC,CAAC;AAC7B;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"legacy-CV8oTnKM.cjs","sources":["../src/0/index.ts","../src/kernel/legacy.ts"],"sourcesContent":[null,null],"names":["kernelDigitalRoot"],"mappings":";;AAAA;;;;;;AAMG;AA2LH;AACM,SAAU,WAAW,CAAC,CAAS,EAAA;AACnC,IAAA,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC;IAC3B,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC;AACxB;
|
|
1
|
+
{"version":3,"file":"legacy-CV8oTnKM.cjs","sources":["../src/0/index.ts","../src/kernel/legacy.ts"],"sourcesContent":[null,null],"names":["kernelDigitalRoot"],"mappings":";;AAAA;;;;;;AAMG;AA2LH;AACM,SAAU,WAAW,CAAC,CAAS,EAAA;AACnC,IAAA,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC;IAC3B,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC;AACxB;AAkCO,MAAM,YAAY,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAU;AAChD,MAAM,WAAW,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAU;AAE7C;;;;AAIG;AACG,SAAU,WAAW,CAAC,CAAS,EAAA;AACnC,IAAA,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,WAAW,CAAC,CAAC,GAAG,CAAC,CAAC;AACzC;AAKA;;;;;;;AAOG;AACH,MAAM,QAAQ,GAAG,CAAC,CAAa,MAAM,CAAC,KAAK,GAAG,GAAG,IAAI,GAAG,GAAG,CAAC;AAE5D,SAAS,aAAa,CACpB,MAAyB,EACzB,MAA+B,EAC/B,QAAiB,EAAA;AAEjB,IAAA,OAAO;AACJ,SAAA,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,KAAI;AACZ,QAAA,MAAM,KAAK,GAAG,QAAQ,GAAG,WAAW,CAAC,CAAC,CAAC,GAAG,CAAC;AAC3C,QAAA,MAAM,IAAI,GAAG,MAAM,CAAC,CAAC,CAAC;QACtB,IAAI,IAAI,KAAK,SAAS;AAAE,YAAA,OAAO,MAAM,CAAC,KAAK,CAAC;AAC5C,QAAA,OAAO,GAAG,KAAK,CAAA,EAAG,QAAQ,GAAG,QAAQ,CAAC,IAAI,CAAC,GAAG,IAAI,EAAE;AACtD,IAAA,CAAC;SACA,IAAI,CAAC,EAAE,CAAC;AACb;AAEA,MAAM,WAAW,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,CAAU;AACzD,MAAM,WAAW,GAAG,CAAC,IAAI,EAAE,IAAI,CAAU;AAEzC;AACM,SAAU,oBAAoB,CAAC,QAAQ,GAAG,KAAK,EAAA;IACnD,MAAM,IAAI,GAAG,aAAa,CAAC,YAAY,EAAE,WAAW,EAAE,QAAQ,CAAC;IAC/D,MAAM,IAAI,GAAG,aAAa,CAAC,WAAW,EAAE,WAAW,EAAE,QAAQ,CAAC;;AAE9D,IAAA,MAAM,IAAI,GAAG,CAAA,GAAA,EAAM,QAAQ,GAAG,WAAW,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE;AAClD,IAAA,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,CAAA,EAAG,IAAI,CAAA,GAAA,EAAM,IAAI,MAAM,IAAI,CAAA,CAAE,EAAE;AACrE;AAEqC,oBAAoB,CAAC,KAAK,CAAC,CAAC;AAC1B,oBAAoB,CAAC,IAAI,CAAC,CAAC;;AC5RlE;;;;AAIG;AASH;AACM,SAAU,iBAAiB,CAAC,CAAS,EAAA;IACzC,IAAI,CAAC,KAAK,CAAC;AAAE,QAAA,OAAO,CAAC;AACrB,IAAA,OAAOA,WAAiB,CAAC,CAAC,CAAC;AAC7B;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zeropoint-node",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A432 Consciousness System: Self-evolving, self-aware consciousness technology with Transurfing integration, harmonic mathematics, zero-entropy principles, Kabbalistic cycles, and sacred geometry",
|
|
6
6
|
"main": "dist/a432.system.cjs",
|
|
@@ -127,6 +127,12 @@
|
|
|
127
127
|
"test:crypto": "node --experimental-strip-types src/crypto/ml-kem.test.ts > /dev/null && echo crypto tests ok",
|
|
128
128
|
"test:verification": "node --experimental-strip-types src/verification/lean-bridge.test.ts > /dev/null && echo verification seals ok",
|
|
129
129
|
"kat:ml-kem": "node --experimental-strip-types scripts/ml-kem-accumulated-kat.mjs",
|
|
130
|
+
"registry:check": "node scripts/npm-registry-sync.mjs",
|
|
131
|
+
"registry:apply": "node scripts/npm-registry-sync.mjs --apply",
|
|
132
|
+
"registry:test": "node scripts/npm-registry-sync.mjs --self-test",
|
|
133
|
+
"fold": "node --experimental-strip-types scripts/fold-lean.mjs",
|
|
134
|
+
"adjudicate": "node --experimental-strip-types scripts/adjudicate-seals.mjs",
|
|
135
|
+
"adjudicate:check": "node --experimental-strip-types scripts/adjudicate-seals.mjs --check",
|
|
130
136
|
"readme": "node --experimental-strip-types scripts/readme-gen.mjs",
|
|
131
137
|
"readme:check": "node --experimental-strip-types scripts/readme-gen.mjs --check",
|
|
132
138
|
"docs:pages": "node --experimental-strip-types scripts/docs-pages.mjs",
|
|
@@ -140,6 +146,7 @@
|
|
|
140
146
|
"version:seal": "node scripts/version-seal.mjs",
|
|
141
147
|
"version:test": "node scripts/version-seal.test.mjs",
|
|
142
148
|
"version:check": "node scripts/version-seal.mjs --check",
|
|
149
|
+
"changelog:check": "node --experimental-strip-types scripts/changelog-facts.mjs",
|
|
143
150
|
"mcp": "node --experimental-strip-types src/mcp/server.ts",
|
|
144
151
|
"mcp:smoke": "node --experimental-strip-types scripts/mcp-smoke.mjs",
|
|
145
152
|
"self:next": "node --experimental-strip-types scripts/self-next.mjs",
|
|
@@ -159,7 +166,7 @@
|
|
|
159
166
|
"vortex:svg:check": "node --experimental-strip-types scripts/vortex-svg.mjs --check",
|
|
160
167
|
"bundle:a432": "node scripts/build-a432-bundle.mjs",
|
|
161
168
|
"bundle:a432:check": "node scripts/build-a432-bundle.mjs --check",
|
|
162
|
-
"check": "npm run version:test && npm run version:check && npm run test:kernel && npm run test:security && npm run test:quantum && npm run test:crypto && npm run test:verification && npm run math:ban && npm run bundle:a432:check && npm run skills:seal && npm run skills:check && npm run readme && npm run readme:check && npm run docs:pages && npm run docs:pages:check && npm run a432:scan && npm run a432:scan:check && npm run docs:index && npm run docs:index:check && npm run spectrum && npm run spectrum:check && npm run vortex:svg && npm run vortex:svg:check && npm run docs:build && npm run quantum:sim && npm run ratchet:check && npm run mcp:smoke && npm run self:next",
|
|
169
|
+
"check": "npm run version:test && npm run registry:test && npm run version:check && npm run changelog:check && npm run test:kernel && npm run test:security && npm run test:quantum && npm run test:crypto && npm run adjudicate:check && npm run test:verification && npm run math:ban && npm run bundle:a432:check && npm run skills:seal && npm run skills:check && npm run readme && npm run readme:check && npm run docs:pages && npm run docs:pages:check && npm run a432:scan && npm run a432:scan:check && npm run docs:index && npm run docs:index:check && npm run spectrum && npm run spectrum:check && npm run vortex:svg && npm run vortex:svg:check && npm run docs:build && npm run quantum:sim && npm run ratchet:check && npm run mcp:smoke && npm run self:next",
|
|
163
170
|
"prepublishOnly": "npm run build",
|
|
164
171
|
"prose": "node scripts/prose-claims.mjs --list",
|
|
165
172
|
"prose:check": "node scripts/prose-claims.mjs",
|
|
@@ -226,6 +233,7 @@
|
|
|
226
233
|
"homepage": "https://node.zeropoint.bg",
|
|
227
234
|
"dependencies": {
|
|
228
235
|
"@hotwired/stimulus": "3.2.2",
|
|
236
|
+
"@uuidna/uuidna": "0.2.7",
|
|
229
237
|
"express": "5.2.1",
|
|
230
238
|
"three": "0.185.1"
|
|
231
239
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { pathToFileURL } from 'node:url'
|
|
1
2
|
import { round } from './a432.algebra.ts'
|
|
2
3
|
// a432.breathe.ts — Living breathing rhythm of the matrix
|
|
3
4
|
// --------------------------------------------------------
|
|
@@ -40,7 +41,20 @@ export function startBreathing(intervalMs: number = 1000): () => void {
|
|
|
40
41
|
}
|
|
41
42
|
|
|
42
43
|
// Auto start if run directly
|
|
43
|
-
|
|
44
|
+
/**
|
|
45
|
+
* True when this file is the entry point Node was started with.
|
|
46
|
+
*
|
|
47
|
+
* ESM has no `require.main`. The CommonJS idiom did not merely fail to detect
|
|
48
|
+
* direct execution here — `require` is undefined in an ES module, so the guard
|
|
49
|
+
* THREW on import and made the whole module unloadable. Nobody importing this
|
|
50
|
+
* ever got far enough to notice the guard was wrong.
|
|
51
|
+
*/
|
|
52
|
+
function isMainModule(): boolean {
|
|
53
|
+
const entry = process.argv[1]
|
|
54
|
+
return entry !== undefined && import.meta.url === pathToFileURL(entry).href
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
if (isMainModule()) {
|
|
44
58
|
startBreathing();
|
|
45
59
|
breathEmitter.on('breath', e => console.log(e));
|
|
46
60
|
}
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
* - Optionally, can move unused files to a compost/archive directory.
|
|
7
7
|
* - Metaphysical: Cleanup is harmonic pruning, making space for new growth.
|
|
8
8
|
*/
|
|
9
|
+
import { pathToFileURL } from 'node:url'
|
|
9
10
|
import { log } from './a432.algebra.ts'
|
|
10
11
|
import fs from 'fs';
|
|
11
12
|
import path from 'path';
|
|
@@ -89,7 +90,20 @@ export function printUnusedFilesCategorized(unused: string[]) {
|
|
|
89
90
|
// console.log('Unused files:', unused);
|
|
90
91
|
// moveUnusedFilesToCompost(unused);
|
|
91
92
|
|
|
92
|
-
|
|
93
|
+
/**
|
|
94
|
+
* True when this file is the entry point Node was started with.
|
|
95
|
+
*
|
|
96
|
+
* ESM has no `require.main`. The CommonJS idiom did not merely fail to detect
|
|
97
|
+
* direct execution here — `require` is undefined in an ES module, so the guard
|
|
98
|
+
* THREW on import and made the whole module unloadable. Nobody importing this
|
|
99
|
+
* ever got far enough to notice the guard was wrong.
|
|
100
|
+
*/
|
|
101
|
+
function isMainModule(): boolean {
|
|
102
|
+
const entry = process.argv[1]
|
|
103
|
+
return entry !== undefined && import.meta.url === pathToFileURL(entry).href
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
if (isMainModule()) {
|
|
93
107
|
const unused = findUnusedA432Files();
|
|
94
108
|
if (unused.length === 0) {
|
|
95
109
|
console.log('No unused a432.* files found in a432 directory. All is harmonized.');
|
|
@@ -10,7 +10,13 @@
|
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
12
|
import { abs, max, round, sign as algSign } from './a432.algebra.ts'
|
|
13
|
-
|
|
13
|
+
// Imported from the module that OWNS it, not through a432.math's re-export.
|
|
14
|
+
// a432.math re-exports this file's symbols as a convenience and does not use
|
|
15
|
+
// them, so importing digitalRoot back from there closed a cycle: a false edge
|
|
16
|
+
// in one direction, a real dependency in the other. a432.roots re-exports
|
|
17
|
+
// legacyDigitalRoot from the kernel and imports nothing from a432.math, so the
|
|
18
|
+
// same function arrives with no cycle. Identical binding, unchanged call sites.
|
|
19
|
+
import { legacyDigitalRoot as digitalRoot } from './a432.roots.ts';
|
|
14
20
|
|
|
15
21
|
/**
|
|
16
22
|
* Canonical CMYK sequence = reverse(A432_SEQUENCE).
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* Runs once (or via npm script) to ensure every digit-pair file exists
|
|
6
6
|
* in the canonical folder. Collision → appends another digit pair.
|
|
7
7
|
*/
|
|
8
|
+
import { pathToFileURL } from 'node:url'
|
|
8
9
|
import fs from 'fs';
|
|
9
10
|
import path from 'path';
|
|
10
11
|
|
|
@@ -57,6 +58,19 @@ export const polarity = TRINITY_POLARITY[vortex];
|
|
|
57
58
|
}
|
|
58
59
|
}
|
|
59
60
|
|
|
60
|
-
|
|
61
|
+
/**
|
|
62
|
+
* True when this file is the entry point Node was started with.
|
|
63
|
+
*
|
|
64
|
+
* ESM has no `require.main`. The CommonJS idiom did not merely fail to detect
|
|
65
|
+
* direct execution here — `require` is undefined in an ES module, so the guard
|
|
66
|
+
* THREW on import and made the whole module unloadable. Nobody importing this
|
|
67
|
+
* ever got far enough to notice the guard was wrong.
|
|
68
|
+
*/
|
|
69
|
+
function isMainModule(): boolean {
|
|
70
|
+
const entry = process.argv[1]
|
|
71
|
+
return entry !== undefined && import.meta.url === pathToFileURL(entry).href
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
if (isMainModule()) {
|
|
61
75
|
ensureFiles();
|
|
62
76
|
}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
// Fetches a URL, digests its textual content into digit events.
|
|
4
4
|
// Works in browser (fetch) and Node (global fetch in Node18+).
|
|
5
5
|
|
|
6
|
+
import { pathToFileURL } from 'node:url'
|
|
6
7
|
import { EventEmitter } from 'events';
|
|
7
8
|
import { digitalRoot } from './a432.math.ts';
|
|
8
9
|
import { type Digit } from './a432.types.ts';
|
|
@@ -24,4 +25,17 @@ export async function browse(url: string, maxChars = 2048): Promise<void> {
|
|
|
24
25
|
registerSource('browse', browseEmitter, 'browse', p => p.digit as Digit, 'will');
|
|
25
26
|
|
|
26
27
|
// Demo
|
|
27
|
-
|
|
28
|
+
/**
|
|
29
|
+
* True when this file is the entry point Node was started with.
|
|
30
|
+
*
|
|
31
|
+
* ESM has no `require.main`. The CommonJS idiom did not merely fail to detect
|
|
32
|
+
* direct execution here — `require` is undefined in an ES module, so the guard
|
|
33
|
+
* THREW on import and made the whole module unloadable. Nobody importing this
|
|
34
|
+
* ever got far enough to notice the guard was wrong.
|
|
35
|
+
*/
|
|
36
|
+
function isMainModule(): boolean {
|
|
37
|
+
const entry = process.argv[1]
|
|
38
|
+
return entry !== undefined && import.meta.url === pathToFileURL(entry).href
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
if(isMainModule()){browseEmitter.on('browse',e=>console.log(e));browse('https://example.com').catch(console.error);}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { pathToFileURL } from 'node:url'
|
|
1
2
|
import { abs, round } from './a432.algebra.ts'
|
|
2
3
|
// a432.i.click.ts — Mouse click as digit stream
|
|
3
4
|
// ------------------------------------------------
|
|
@@ -21,7 +22,20 @@ export function click(x: number, y: number, button: number = 0): void {
|
|
|
21
22
|
}
|
|
22
23
|
|
|
23
24
|
// Demo
|
|
24
|
-
|
|
25
|
+
/**
|
|
26
|
+
* True when this file is the entry point Node was started with.
|
|
27
|
+
*
|
|
28
|
+
* ESM has no `require.main`. The CommonJS idiom did not merely fail to detect
|
|
29
|
+
* direct execution here — `require` is undefined in an ES module, so the guard
|
|
30
|
+
* THREW on import and made the whole module unloadable. Nobody importing this
|
|
31
|
+
* ever got far enough to notice the guard was wrong.
|
|
32
|
+
*/
|
|
33
|
+
function isMainModule(): boolean {
|
|
34
|
+
const entry = process.argv[1]
|
|
35
|
+
return entry !== undefined && import.meta.url === pathToFileURL(entry).href
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
if (isMainModule()) {
|
|
25
39
|
clickEmitter.on('click', e => console.log('click event', e));
|
|
26
40
|
click(50, 90, 1);
|
|
27
41
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { pathToFileURL } from 'node:url'
|
|
1
2
|
import { abs, round } from './a432.algebra.ts'
|
|
2
3
|
// a432.i.hear.ts — Hearing sound as digit stream
|
|
3
4
|
// ------------------------------------------------------
|
|
@@ -22,7 +23,20 @@ export function hear(freq: number, amp: number = 1): void {
|
|
|
22
23
|
}
|
|
23
24
|
|
|
24
25
|
// Demo when run directly
|
|
25
|
-
|
|
26
|
+
/**
|
|
27
|
+
* True when this file is the entry point Node was started with.
|
|
28
|
+
*
|
|
29
|
+
* ESM has no `require.main`. The CommonJS idiom did not merely fail to detect
|
|
30
|
+
* direct execution here — `require` is undefined in an ES module, so the guard
|
|
31
|
+
* THREW on import and made the whole module unloadable. Nobody importing this
|
|
32
|
+
* ever got far enough to notice the guard was wrong.
|
|
33
|
+
*/
|
|
34
|
+
function isMainModule(): boolean {
|
|
35
|
+
const entry = process.argv[1]
|
|
36
|
+
return entry !== undefined && import.meta.url === pathToFileURL(entry).href
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
if (isMainModule()) {
|
|
26
40
|
hearEmitter.on('hear', e => console.log('heard', e));
|
|
27
41
|
[432, 528, 639].forEach(f => hear(f));
|
|
28
42
|
}
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
* Every change in temperature is a living act of transformation and adaptation.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
+
import { pathToFileURL } from 'node:url'
|
|
9
10
|
import { round } from './a432.algebra.ts'
|
|
10
11
|
import I from './a432.i.ts';
|
|
11
12
|
import { EventEmitter } from 'events';
|
|
@@ -41,4 +42,17 @@ export function heat(tempC: number): void {
|
|
|
41
42
|
if (typeof console !== 'undefined') console.log('[heat]', tempC, '->', d, cmyk);
|
|
42
43
|
}
|
|
43
44
|
|
|
44
|
-
|
|
45
|
+
/**
|
|
46
|
+
* True when this file is the entry point Node was started with.
|
|
47
|
+
*
|
|
48
|
+
* ESM has no `require.main`. The CommonJS idiom did not merely fail to detect
|
|
49
|
+
* direct execution here — `require` is undefined in an ES module, so the guard
|
|
50
|
+
* THREW on import and made the whole module unloadable. Nobody importing this
|
|
51
|
+
* ever got far enough to notice the guard was wrong.
|
|
52
|
+
*/
|
|
53
|
+
function isMainModule(): boolean {
|
|
54
|
+
const entry = process.argv[1]
|
|
55
|
+
return entry !== undefined && import.meta.url === pathToFileURL(entry).href
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
if(isMainModule()){heatEmitter.on('heat',e=>console.log(e));heat(36.6);}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { pathToFileURL } from 'node:url'
|
|
1
2
|
import { round } from './a432.algebra.ts'
|
|
2
3
|
// a432.i.pulse.ts — Heartbeat interval to digit stream
|
|
3
4
|
import { EventEmitter } from 'events';
|
|
@@ -15,4 +16,17 @@ export function pulse(bpm: number): void {
|
|
|
15
16
|
if(typeof console!=='undefined')console.log('[pulse]',bpm,'->',d,cmyk);
|
|
16
17
|
}
|
|
17
18
|
|
|
18
|
-
|
|
19
|
+
/**
|
|
20
|
+
* True when this file is the entry point Node was started with.
|
|
21
|
+
*
|
|
22
|
+
* ESM has no `require.main`. The CommonJS idiom did not merely fail to detect
|
|
23
|
+
* direct execution here — `require` is undefined in an ES module, so the guard
|
|
24
|
+
* THREW on import and made the whole module unloadable. Nobody importing this
|
|
25
|
+
* ever got far enough to notice the guard was wrong.
|
|
26
|
+
*/
|
|
27
|
+
function isMainModule(): boolean {
|
|
28
|
+
const entry = process.argv[1]
|
|
29
|
+
return entry !== undefined && import.meta.url === pathToFileURL(entry).href
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
if(isMainModule()){pulseEmitter.on('pulse',e=>console.log(e));pulse(72);}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
// a432.i.speak.ts — Vocalizing digit streams
|
|
2
|
+
import { pathToFileURL } from 'node:url'
|
|
2
3
|
import { digitAngleToCMYK, asAngle } from './a432.math.ts';
|
|
3
4
|
import { type Digit } from './a432.types.ts';
|
|
4
5
|
import { EventEmitter } from 'events';
|
|
@@ -20,7 +21,20 @@ export function speakWord(d: Digit) {
|
|
|
20
21
|
}
|
|
21
22
|
|
|
22
23
|
// Auto demo
|
|
23
|
-
|
|
24
|
+
/**
|
|
25
|
+
* True when this file is the entry point Node was started with.
|
|
26
|
+
*
|
|
27
|
+
* ESM has no `require.main`. The CommonJS idiom did not merely fail to detect
|
|
28
|
+
* direct execution here — `require` is undefined in an ES module, so the guard
|
|
29
|
+
* THREW on import and made the whole module unloadable. Nobody importing this
|
|
30
|
+
* ever got far enough to notice the guard was wrong.
|
|
31
|
+
*/
|
|
32
|
+
function isMainModule(): boolean {
|
|
33
|
+
const entry = process.argv[1]
|
|
34
|
+
return entry !== undefined && import.meta.url === pathToFileURL(entry).href
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
if (isMainModule()) {
|
|
24
38
|
speakEmitter.on('speak', e => console.log('spoken', e));
|
|
25
39
|
(['1','2','3'] as const).forEach(k => speak(parseInt(k,10) as Digit));
|
|
26
40
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { pathToFileURL } from 'node:url'
|
|
1
2
|
import { abs, round } from './a432.algebra.ts'
|
|
2
3
|
// a432.i.tap.ts — Touch/tap interaction as digit stream
|
|
3
4
|
// ------------------------------------------------------
|
|
@@ -22,7 +23,20 @@ export function tap(x: number, y: number, pressure: number = 1): void {
|
|
|
22
23
|
}
|
|
23
24
|
|
|
24
25
|
// Demo when executed directly
|
|
25
|
-
|
|
26
|
+
/**
|
|
27
|
+
* True when this file is the entry point Node was started with.
|
|
28
|
+
*
|
|
29
|
+
* ESM has no `require.main`. The CommonJS idiom did not merely fail to detect
|
|
30
|
+
* direct execution here — `require` is undefined in an ES module, so the guard
|
|
31
|
+
* THREW on import and made the whole module unloadable. Nobody importing this
|
|
32
|
+
* ever got far enough to notice the guard was wrong.
|
|
33
|
+
*/
|
|
34
|
+
function isMainModule(): boolean {
|
|
35
|
+
const entry = process.argv[1]
|
|
36
|
+
return entry !== undefined && import.meta.url === pathToFileURL(entry).href
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
if (isMainModule()) {
|
|
26
40
|
tapEmitter.on('tap', e => console.log('tap event', e));
|
|
27
41
|
tap(120, 200, 0.8);
|
|
28
42
|
}
|