@descix/frqtl-node 0.6.0-p0.1 → 0.6.0-p0.2
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/CLAUDE.md +1 -1
- package/LICENSE.md +664 -0
- package/README.md +1 -1
- package/dist/dist-manifest.json +125 -125
- package/dist/fat/pkg-node/egpt_wasm.js +7 -7
- package/dist/fat/pkg-node/egpt_wasm_bg.wasm +0 -0
- package/dist/fat/pkg-node/package.json +1 -1
- package/dist/frqtl/compat/providers/wasm-engine.js +29 -31
- package/dist/frqtl/compat/providers/wasm-load-browser.js +2 -2
- package/dist/frqtl/compat/renderer/RenderFamily.js +1 -2
- package/dist/frqtl/compat/renderer/RenderMesh.js +2 -3
- package/dist/frqtl/compat/renderer/RenderShape.js +1 -1
- package/dist/frqtl/compat/renderer/captureStill-common.js +1 -2
- package/dist/frqtl/compat/renderer/display-slot.js +1 -1
- package/dist/frqtl/compat/renderer/providers/p5-provider.js +5 -5
- package/dist/frqtl/compat/renderer/providers/three-camera-contract.js +1 -1
- package/dist/frqtl/compat/renderer/providers/three-camera-geometry.js +4 -4
- package/dist/frqtl/compat/renderer/providers/three-provider.js +23 -27
- package/dist/frqtl/compat/renderer/renderCapabilities-common.js +2 -2
- package/dist/frqtl/compat/renderer/renderer-provider-contract.js +1 -1
- package/dist/frqtl/compat/vendor.js +2 -2
- package/dist/frqtl/objects/FrqtlApp.js +22 -24
- package/dist/frqtl/objects/ObjectFactory.js +1 -2
- package/dist/frqtl/objects/constants/WallBehaviors.js +5 -5
- package/dist/frqtl/objects/geometry/SlabFace.js +6 -6
- package/dist/frqtl/objects/instruments/capture-host.js +2 -2
- package/dist/frqtl/objects/instruments/capture.js +4 -5
- package/dist/frqtl/objects/instruments/hosted-eyes.js +3 -4
- package/dist/frqtl/objects/objects/DirectedTunnel.js +10 -11
- package/dist/frqtl/objects/objects/LightSource.js +22 -25
- package/dist/frqtl/objects/objects/QuantumEmitter.js +14 -14
- package/dist/frqtl/objects/objects/Tube.js +14 -14
- package/dist/frqtl/objects/objects/absorbRadiation.js +12 -13
- package/dist/frqtl/objects/objects/actionCompiler.js +52 -52
- package/dist/frqtl/objects/objects/controlAction.js +2 -2
- package/dist/frqtl/objects/objects/controlBind.js +2 -2
- package/dist/frqtl/objects/objects/directedRedirectProgram.js +3 -3
- package/dist/frqtl/objects/objects/emitterProgram.js +9 -9
- package/dist/frqtl/objects/objects/frqtl-control-slider.js +3 -3
- package/dist/frqtl/objects/objects/frqtl-control-sync.js +9 -9
- package/dist/frqtl/objects/objects/frqtl-control-widgets.js +2 -2
- package/dist/frqtl/objects/objects/frqtl-control-write-queue.js +2 -2
- package/dist/frqtl/objects/objects/makeControlsForObject.js +25 -29
- package/dist/frqtl/objects/objects/makeControlsForRenderSurface.js +2 -2
- package/dist/frqtl/objects/objects/slitLinerScatter.js +8 -10
- package/dist/frqtl/objects/objects/sustainedSource.js +15 -16
- package/dist/frqtl/objects/objects/tagger.js +2 -2
- package/dist/frqtl/objects/schema/engine-scopes.js +11 -12
- package/dist/frqtl/objects/schema/index.js +6 -6
- package/dist/frqtl/objects/schema/scopes.js +10 -10
- package/dist/frqtl/objects/setup/_collisionMatrixLanes.js +1 -1
- package/dist/frqtl/objects/setup/setupBlackbodySubstrate.js +1 -1
- package/dist/frqtl/objects/setup/setupCollisionMatrix.js +3 -3
- package/dist/frqtl/objects/setup/setupConeEmitter3D.js +7 -8
- package/dist/frqtl/objects/setup/setupDoubleSlit.js +20 -21
- package/dist/frqtl/objects/setup/setupFxSmoke.js +1 -1
- package/dist/frqtl/objects/setup/setupLightSourceLab.js +23 -26
- package/dist/frqtl/objects/setup/setupSphereEmitter3D.js +39 -40
- package/dist/frqtl/objects/setup/setupTunnelLab.js +17 -19
- package/dist/frqtl/objects/setup/setupTunnelPointExit.js +1 -1
- package/dist/frqtl/objects/setup/setupWaveInterference.js +4 -5
- package/dist/frqtl/objects/v1-replacements.js +0 -1
- package/dist/frqtl/parts/CameraControls.js +5 -5
- package/dist/frqtl/parts/CameraPath.js +1 -1
- package/dist/frqtl/parts/CollisionActions.js +2 -3
- package/dist/frqtl/parts/CollisionTypes.js +1 -2
- package/dist/frqtl/parts/DetectorWall.js +10 -10
- package/dist/frqtl/parts/FrqtlControlsPanel.js +11 -11
- package/dist/frqtl/parts/FrqtlVision.js +1 -1
- package/dist/frqtl/parts/GraphingDetectorWall.js +3 -4
- package/dist/frqtl/parts/LargeObject.js +7 -8
- package/dist/frqtl/parts/LightColor.js +2 -2
- package/dist/frqtl/parts/LiveChart.js +1 -1
- package/dist/frqtl/parts/LogicGate.js +4 -7
- package/dist/frqtl/parts/OvenBox.js +1 -2
- package/dist/frqtl/parts/PointSource.js +10 -11
- package/dist/frqtl/parts/SlitLightSource.js +6 -6
- package/dist/frqtl/parts/SlitScreen.js +14 -14
- package/dist/frqtl/parts/SphereEmitter.js +24 -24
- package/dist/frqtl/parts/Tunnel.js +17 -17
- package/dist/frqtl/parts/Wall.js +17 -17
- package/dist/frqtl/scenes/dse-one-emitter.js +1 -1
- package/dist/frqtl/scenes/dse-one-slit.js +2 -2
- package/dist/frqtl/scenes/dse-photoelectric.js +3 -3
- package/dist/frqtl/scenes/dse-tunnel-rebuild.js +5 -6
- package/dist/frqtl/scenes/dse-two-emitters.js +1 -1
- package/dist/frqtl/scenes/dse-two-slits.js +2 -2
- package/dist/frqtl/scenes/laser-buildup.js +1 -1
- package/dist/frqtl/scenes/mirror-3d.js +4 -4
- package/dist/frqtl/scenes/mirror-route.js +9 -9
- package/dist/frqtl/scenes/mirror.js +1 -1
- package/dist/frqtl/scenes/self-interference.js +1 -1
- package/dist/frqtl/scenes/smoking-gun.js +1 -1
- package/dist/frqtl/scenes/sun.js +2 -2
- package/dist/shim/bundle/frqnb.js +3 -3
- package/dist/shim/bundle/index.js +1 -1
- package/dist/shim/bundle/manifest.js +2 -2
- package/dist/shim/bundle/zip.js +1 -1
- package/dist/shim/controls/index.js +14 -14
- package/dist/shim/controls/registry.js +3 -3
- package/dist/shim/engine/artifact-shell.js +1 -2
- package/dist/shim/engine/router.js +15 -17
- package/dist/shim/expr/ast-schema.js +5 -5
- package/dist/shim/field-descriptor/index.js +7 -8
- package/dist/shim/frame-data/index.js +3 -3
- package/dist/shim/index.js +4 -4
- package/dist/shim/notebook/canvas-guard.js +1 -1
- package/dist/shim/notebook/catalog.js +2 -2
- package/dist/shim/notebook/format.js +26 -26
- package/dist/shim/notebook/kernel.js +3 -4
- package/dist/shim/notebook/knob.js +0 -1
- package/dist/shim/notebook/module-resolver.js +6 -6
- package/dist/shim/notebook/produced-bindings.js +1 -1
- package/dist/shim/notebook/setup-builder.js +9 -12
- package/dist/shim/notebook/vendor-importmap.js +1 -1
- package/dist/shim/notebook/view-builder.js +1 -1
- package/dist/shim/notebook/view-ctx.js +1 -1
- package/dist/shim/notebook/warmup.js +2 -2
- package/dist/shim/page-params/index.js +8 -9
- package/dist/shim/registry/copy-gate.js +1 -1
- package/dist/shim/registry/exhibits.js +4 -4
- package/dist/shim/registry/experiments.js +3 -3
- package/dist/shim/registry/walkthrough.js +21 -24
- package/dist/shim/render/render-stages.js +2 -2
- package/dist/shim/render/sun-look.js +2 -2
- package/dist/shim/rpc/index.js +2 -2
- package/dist/shim/runtime/index.js +12 -12
- package/dist/shim/storage/modules.js +8 -8
- package/llms.txt +2 -2
- package/package.json +4 -3
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
/* Copyright 2023-2026 by Essam Abadir */
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* WALKTHROUGH — the ordered "Walk-through" rung registry
|
|
5
|
-
* (ws-experiments-walkthrough Bite 3a; CEO ruling Q-CEO-2 + architect ruling A/B/C;
|
|
6
|
-
* re-authored to addObject form in Bite 4b — architect ruling 3).
|
|
4
|
+
* WALKTHROUGH — the ordered "Walk-through" rung registry (rungs in addObject form).
|
|
7
5
|
*
|
|
8
6
|
* An ORDERED array of rung recipes surfaced as a "Walk-through" group in STUDIO's
|
|
9
7
|
* experiment dropdown. Each rung loads via the blank-page load-by-eval path exactly
|
|
10
8
|
* like a saved project — the SAME array is the SINGLE authority for BOTH the
|
|
11
9
|
* dropdown group AND the `walkthrough:<id>` lookup (no parallel id→source map, no
|
|
12
|
-
* switch statement
|
|
10
|
+
* switch statement).
|
|
13
11
|
*
|
|
14
12
|
* A rung row carries the PATH of its scene, never its text: each scene is ONE sketch
|
|
15
13
|
* file, `lib/frqtl/scenes/<file>.js` — a dual-mode `buildExperiment(exp)` module that
|
|
@@ -40,7 +38,7 @@
|
|
|
40
38
|
* walkthrough load path with the effective bag (a reload — the same
|
|
41
39
|
* pattern as `?engine=`).
|
|
42
40
|
*
|
|
43
|
-
* ── The mode-aware recipe form (S3/W2
|
|
41
|
+
* ── The mode-aware recipe form (S3/W2) ────────────────────────────────────────
|
|
44
42
|
* A multi-mode rung has exactly ONE `source`. A mode selects the RENDERER the host boots
|
|
45
43
|
* (`renderState.renderer`); the scene reads the booted display once, before its world, and
|
|
46
44
|
* makes the matching world (`three` ⇒ exp.createScene, else exp.createCanvas) — its
|
|
@@ -50,7 +48,7 @@
|
|
|
50
48
|
* `z`/`depth`, ordinary Walls for the z-collimators, camera on the renderState) so
|
|
51
49
|
* a built scene codegens to concrete, mode-PINNED state and survives Restart.
|
|
52
50
|
*
|
|
53
|
-
* ── The recipe form (
|
|
51
|
+
* ── The recipe form (addObject, codegen-round-trippable) ──────────────────────
|
|
54
52
|
* Rungs are OBJECT recipes: each body states the WORLD first, in its co-init call
|
|
55
53
|
* (`exp.createCanvas(W, H, setupSphereEmitter3D.worldCfg(SRC))`) and then calls
|
|
56
54
|
* `exp.addObject('SphereEmitter', SRC)` with the SAME bag — a PART never inits the
|
|
@@ -63,9 +61,9 @@
|
|
|
63
61
|
* ── Layer 2: physics behavior ────────────────────────────────────────────────
|
|
64
62
|
* Zero new physics (canonical-bench SU1) — every rung composes already-goldened
|
|
65
63
|
* engine behaviors via the shared sphere-emitter sugar. Each rung un-degenerates ONE
|
|
66
|
-
* already-present input of the previous (
|
|
64
|
+
* already-present input of the previous (Q-THEO-1: strictly compositional).
|
|
67
65
|
* The addObject builder forwards the opts VERBATIM to setupSphereEmitter3D, so the
|
|
68
|
-
* physics/visual is BYTE-IDENTICAL to the
|
|
66
|
+
* physics/visual is BYTE-IDENTICAL to the earlier factory-call rungs.
|
|
69
67
|
*/
|
|
70
68
|
|
|
71
69
|
'use strict';
|
|
@@ -100,8 +98,8 @@ var THREE_RENDER_STATE = {
|
|
|
100
98
|
renderer: 'three',
|
|
101
99
|
camera: { orbit: null, preset: 'rooftop' }
|
|
102
100
|
};
|
|
103
|
-
// Sun: 3D + the sun's look. The render VALUES are owned by lib/shim/render/sun-look.js (
|
|
104
|
-
// exported FX bag); the camera is this row's own view, verbatim from
|
|
101
|
+
// Sun: 3D + the sun's look. The render VALUES are owned by lib/shim/render/sun-look.js (an
|
|
102
|
+
// exported FX bag); the camera is this row's own view, verbatim from an exported renderState.
|
|
105
103
|
var SUN_RENDER_STATE = {
|
|
106
104
|
renderer: 'three',
|
|
107
105
|
camera: { orbit: { azimuth: 32.978, elevation: 45, distance: 2873.68 }, preset: null },
|
|
@@ -140,7 +138,7 @@ export var WALKTHROUGH = [
|
|
|
140
138
|
source: 'scenes/self-interference.js'
|
|
141
139
|
},
|
|
142
140
|
{
|
|
143
|
-
// POSITION
|
|
141
|
+
// POSITION (provisional): placed here because
|
|
144
142
|
// Self-Interference is its closest physics sibling — the same banded fan, reached by
|
|
145
143
|
// building an apparatus instead of by launching an omni source. Using the letter-suffix
|
|
146
144
|
// idiom the 6A/6B/6C rungs already establish, so NO existing rung is renumbered.
|
|
@@ -213,10 +211,10 @@ export var WALKTHROUGH = [
|
|
|
213
211
|
source: 'scenes/sun.js',
|
|
214
212
|
renderState: SUN_RENDER_STATE
|
|
215
213
|
},
|
|
216
|
-
// ── Collision Lab (
|
|
214
|
+
// ── Collision Lab (W1) — the wall-collision primitives,
|
|
217
215
|
// built on the first-class v2 Wall. Scaffolds for interactive tuning (drag /
|
|
218
|
-
// rotate / select / save)
|
|
219
|
-
//
|
|
216
|
+
// rotate / select / save) that confirm the base object + control behaviors
|
|
217
|
+
// work bug-free. SU1 — the Walls add zero physics.
|
|
220
218
|
{
|
|
221
219
|
id: 'cl1a-mirror',
|
|
222
220
|
title: '1A · Mirror',
|
|
@@ -299,7 +297,7 @@ export var WALKTHROUGH = [
|
|
|
299
297
|
{ id: '2d', label: '2D' }
|
|
300
298
|
]
|
|
301
299
|
},
|
|
302
|
-
// ── Collision Lab · 3D (Z2
|
|
300
|
+
// ── Collision Lab · 3D (Z2) — 1A/1B/1C driven in a 3D scene:
|
|
303
301
|
// a VOLUMETRIC (is2D:false) emitter + a 3D WALL SLAB (depth → a real z-slab, rendered
|
|
304
302
|
// as a BoxGeometry) + the THREE renderer/perspective camera (renderState). The walls'
|
|
305
303
|
// z-slabs CONTAIN z=0 (near<0<far) so the beam/spray — emitted at z=0 — collides. The
|
|
@@ -342,8 +340,7 @@ export var WALKTHROUGH = [
|
|
|
342
340
|
source: 'scenes/counting-wall-3d.js',
|
|
343
341
|
renderState: THREE_RENDER_STATE
|
|
344
342
|
},
|
|
345
|
-
// ── DSE
|
|
346
|
-
// 2026-07-26) — THE double-slit (on the Tunnel object, the single canonical
|
|
343
|
+
// ── DSE — THE double-slit (on the Tunnel object, the single canonical
|
|
347
344
|
// double-slit) then the photoelectric experiment, both on the full new
|
|
348
345
|
// component set. Letter prefixes are DROPPED: the group label carries the
|
|
349
346
|
// family, and the ids are the stable contract.
|
|
@@ -384,9 +381,9 @@ export var WALKTHROUGH = [
|
|
|
384
381
|
modes: [
|
|
385
382
|
{
|
|
386
383
|
id: '3d', label: '3D',
|
|
387
|
-
// FIRST-CONTACT FRAMING
|
|
388
|
-
//
|
|
389
|
-
//
|
|
384
|
+
// FIRST-CONTACT FRAMING: the camera stands BEHIND the emitter, facing the
|
|
385
|
+
// slit wall slightly rotated, so the interference builds up partially
|
|
386
|
+
// visible and invites the viewer to move the camera.
|
|
390
387
|
//
|
|
391
388
|
// DERIVED FROM THE SCENE, not tuned against a picture. The camera sits at
|
|
392
389
|
// target + d·(cos el·sin az, sin el, cos el·cos az)
|
|
@@ -481,7 +478,7 @@ export var WALKTHROUGH = [
|
|
|
481
478
|
'absorb/radiate drip (the emergent-probability threshold comes later).',
|
|
482
479
|
source: 'scenes/dse-photoelectric.js'
|
|
483
480
|
},
|
|
484
|
-
// ── The canonical-leg pair
|
|
481
|
+
// ── The canonical-leg pair. The competence baseline: no
|
|
485
482
|
// barrier, no slits, the plate ON the leg the ring formula was written for,
|
|
486
483
|
// and the graph a DSE researcher actually looks at first. 2D only — one
|
|
487
484
|
// declared world each, no mode strip (a physics variant is a recipe
|
|
@@ -627,7 +624,7 @@ export var WALKTHROUGH = [
|
|
|
627
624
|
}
|
|
628
625
|
];
|
|
629
626
|
|
|
630
|
-
// ── The mode contract (S3/W2
|
|
627
|
+
// ── The mode contract (S3/W2) ────────────────────────────────────────────────
|
|
631
628
|
|
|
632
629
|
/**
|
|
633
630
|
* walkthroughModes(rung) — the rung's declared mode list, ALWAYS an array.
|
|
@@ -726,7 +723,7 @@ export function effectiveRenderState(rung, modeId) {
|
|
|
726
723
|
return normalizeSavedRenderState(merged);
|
|
727
724
|
}
|
|
728
725
|
|
|
729
|
-
// ── First contact
|
|
726
|
+
// ── First contact ────────────────────────────────────────────────────────────
|
|
730
727
|
|
|
731
728
|
/**
|
|
732
729
|
* FIRST_CONTACT_WALKTHROUGH_ID — the rung STUDIO opens on with no deep link.
|
|
@@ -775,7 +772,7 @@ export function walkthroughById(id) {
|
|
|
775
772
|
}
|
|
776
773
|
});
|
|
777
774
|
|
|
778
|
-
// ── is3D normalization (E-W0a
|
|
775
|
+
// ── is3D normalization (E-W0a; mode-aware S3/W2) ─────────────────────────────
|
|
779
776
|
// STUDIO must read ONE `is3D` field for a selection regardless of whether it came
|
|
780
777
|
// from the gallery registry (experiments.js `is3D`) or a walkthrough rung. A rung's
|
|
781
778
|
// 3D-ness is ALREADY declared by its (possibly mode-merged) `renderState.renderer` —
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
* transform-plugin registry, that is the failure mode this contract exists to prevent —
|
|
30
30
|
* a new render transform lands as registered data on its stage's EXISTING surface, never
|
|
31
31
|
* as bespoke provider code and never as a new uber-registry
|
|
32
|
-
* (
|
|
32
|
+
* (RENDERER_CONTRACT §9).
|
|
33
33
|
*
|
|
34
34
|
* ── Layer 1: API contract ───────────────────────────────────────────────────
|
|
35
35
|
*
|
|
@@ -411,7 +411,7 @@ function _posInt(v, name) {
|
|
|
411
411
|
// SNAPSHOTS.
|
|
412
412
|
//
|
|
413
413
|
// Snapshotting (rather than ratifying a fresh-per-tick guarantee with the engine-boundary
|
|
414
|
-
// owner) is the
|
|
414
|
+
// owner) is the chosen design because it buys the SECOND property too: the snapshot is plain
|
|
415
415
|
// data, hence JSON-safe, which is the prerequisite for any on-disk corpus row.
|
|
416
416
|
|
|
417
417
|
/**
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* lib/shim/render/sun-look.js — the ONE owner of the SUN's look: its render-option bag.
|
|
5
5
|
*
|
|
6
|
-
* The values are the FINAL FX bag EXACTLY as
|
|
6
|
+
* The values are the FINAL FX bag EXACTLY as played and captured in an export session
|
|
7
7
|
* (new_sun.png is the primary oracle; sun.png stays the historical dense reference), verbatim from
|
|
8
|
-
*
|
|
8
|
+
* the exported renderState. They are in the write door's shape — a BAG, what
|
|
9
9
|
* `runner.setRenderOptions(bag)` takes — and every key is a capability the three renderer declares.
|
|
10
10
|
*
|
|
11
11
|
* SunLook.SUN_RENDER — the sun's whole look (rung r8-sun's render rows).
|
package/dist/shim/rpc/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/* Copyright 2023-2026 by Essam Abadir */
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* lib/shim/rpc — the request/response call() primitive (
|
|
5
|
-
*
|
|
4
|
+
* lib/shim/rpc — the request/response call() primitive (gym-controls-as-sugar
|
|
5
|
+
* Layer-A follow-up; gate 5 charter —
|
|
6
6
|
* "the reqId/pending/timeout request/response-call()-over-postMessage pattern
|
|
7
7
|
* is promoted to a SHIM PRIMITIVE the moment a second consumer needs it").
|
|
8
8
|
*
|
|
@@ -71,7 +71,7 @@ var _router = null;
|
|
|
71
71
|
// The realm's module instances, set when ensureEngine resolves (engine-stack-boot.js REALM_MODULES).
|
|
72
72
|
var _realm = null;
|
|
73
73
|
|
|
74
|
-
// Single-executor guard (P1
|
|
74
|
+
// Single-executor guard (P1).
|
|
75
75
|
// Runtime.init() may be called multiple times (StrictMode double-mount,
|
|
76
76
|
// remounts, preset switches). The Bus 'run:request' executor
|
|
77
77
|
// must be registered EXACTLY ONCE — extra registrations multiply execution count.
|
|
@@ -125,7 +125,7 @@ var _renderObj = {
|
|
|
125
125
|
* - SUGAR GETTERS (PointSource, LargeObject, CollisionTypes, …) — the library
|
|
126
126
|
* sugar objects, reached HERE so a user-code setup MODULE never imports
|
|
127
127
|
* `lib/frqtl/objects` (cross-arrow veto) and never reads window.* itself
|
|
128
|
-
* (
|
|
128
|
+
* (B1; build-gate B). The module takes
|
|
129
129
|
* this object as a passed `frqtl` param and destructures the sugar from it.
|
|
130
130
|
*
|
|
131
131
|
* EVERY member that reads a game-layer global goes through `_sugar(name)` — the ONE
|
|
@@ -319,7 +319,7 @@ function init(opts) {
|
|
|
319
319
|
_eagerMath = _ensureMathSdk();
|
|
320
320
|
}
|
|
321
321
|
|
|
322
|
-
// P1
|
|
322
|
+
// P1: dedup the run:request executor.
|
|
323
323
|
// If a previous handler is registered (e.g. StrictMode double-mount or a
|
|
324
324
|
// remount), remove it first so there is
|
|
325
325
|
// always EXACTLY ONE executor on this event — never two.
|
|
@@ -373,7 +373,7 @@ function run(opts) {
|
|
|
373
373
|
}
|
|
374
374
|
}
|
|
375
375
|
|
|
376
|
-
// P2
|
|
376
|
+
// P2: one derived backend header per run. Shows WHICH math
|
|
377
377
|
// backend executes — derived from MathBackendRegistry, never hardcoded — emitted
|
|
378
378
|
// ONCE per run:request execution so duplicate-execution bugs are immediately
|
|
379
379
|
// visible (N headers = N executions). The math lane emits it after ensureMath
|
|
@@ -568,7 +568,7 @@ function _runMathModule(code, sdk, sourceUrl) {
|
|
|
568
568
|
* This is a DIRECT ASYNC CALL — NOT routed through run()/_runRequestHandler,
|
|
569
569
|
* and it adds ZERO Bus listeners. It emits NO `cell:run`/`cell:result` events.
|
|
570
570
|
* That is THE constraint (binding veto #1) that keeps it clear of the
|
|
571
|
-
*
|
|
571
|
+
* The stacked-handler bug: the single `run:request` executor
|
|
572
572
|
* registered in init() is the only Bus execution path; runCell sits beside it
|
|
573
573
|
* as a plain callable the kernel invokes per cell.
|
|
574
574
|
*
|
|
@@ -587,7 +587,7 @@ function _runMathModule(code, sdk, sourceUrl) {
|
|
|
587
587
|
* writes plain statements + a `return { name: value, … }`; resolved `inputs`
|
|
588
588
|
* are injected as a named object and as `caps`.
|
|
589
589
|
*
|
|
590
|
-
* CELL-AS-MODULE (
|
|
590
|
+
* CELL-AS-MODULE (B2): when the cell body has a top-level
|
|
591
591
|
* `import`, it is instead compiled as a blob ES module whose relative `./x.js`
|
|
592
592
|
* specifiers resolve to the notebook's OWN user-code module cells via the IN-MEMORY
|
|
593
593
|
* blob closure (`spec.modules` = { name → source }, threaded by the kernel). The
|
|
@@ -642,7 +642,7 @@ function _cellCaps(lane, sdk, displayFn) {
|
|
|
642
642
|
|
|
643
643
|
// Tee console.log/warn/error into the IDE console pane for the duration of a cell
|
|
644
644
|
// run. A notebook js cell's console.log/warn/error must all reach the cell's rich
|
|
645
|
-
// ConsolePane
|
|
645
|
+
// ConsolePane, each at its OWN level — log→info, warn→warn,
|
|
646
646
|
// error→error — so the ConsolePane's level filters/badges are meaningful.
|
|
647
647
|
//
|
|
648
648
|
// Reentrancy guard (SHARED across all three teed methods) mirrors _runMathModule:
|
|
@@ -679,7 +679,7 @@ function _installConsoleTee() {
|
|
|
679
679
|
|
|
680
680
|
/* ── cell-as-module: the notebook-local in-memory blob resolver (B2) ──────────
|
|
681
681
|
*
|
|
682
|
-
* THE LOAD-BEARING CHANGE (
|
|
682
|
+
* THE LOAD-BEARING CHANGE (build-gate C +
|
|
683
683
|
* VETO-CLASS constraint #1). When a cell body contains an `import`, it cannot run
|
|
684
684
|
* through `new Function` (module syntax is illegal there). It is compiled as a
|
|
685
685
|
* blob ES module instead. The PURE closure logic (path math, specifier rewrite,
|
|
@@ -735,7 +735,7 @@ function _runCellAsModule(code, id, modules, caps, inputs) {
|
|
|
735
735
|
* @property {Function} [display] — structured-output sink (pane-supplied DOM writer).
|
|
736
736
|
* @property {boolean} [forceModulePath=false]
|
|
737
737
|
* Force the cell-as-module (blob) routing regardless of what the `hasImport`
|
|
738
|
-
* text-sniff would decide (
|
|
738
|
+
* text-sniff would decide (C15).
|
|
739
739
|
* The synthesis authorities that KNOW their own template needs the module path
|
|
740
740
|
* (`setup-builder.js`'s synthesized builder, whose module reference is now a
|
|
741
741
|
* body-level DYNAMIC `import(...)` the line-start sniff cannot see) set this
|
|
@@ -797,7 +797,7 @@ function runCell(spec) {
|
|
|
797
797
|
// kernel threads per run (fresh — never cached Runtime state). Drives the
|
|
798
798
|
// cell-as-module closure when the cell body imports a notebook-local module.
|
|
799
799
|
var modules = spec.modules || {};
|
|
800
|
-
// C15
|
|
800
|
+
// C15: an explicit signal from
|
|
801
801
|
// a synthesis authority that ALREADY KNOWS its template needs the module-blob
|
|
802
802
|
// path — bypasses the hasImport() text-sniff entirely for this call. See the
|
|
803
803
|
// RunCellSpec.forceModulePath doc above for why the sniff itself is NOT widened.
|
|
@@ -926,7 +926,7 @@ function _failMathRealm(err) {
|
|
|
926
926
|
* entry (sdk/egpt-math-sdk `dist-entry.js`, served at the site's
|
|
927
927
|
* `./pub/<build>/egpt-math-sdk/index.js` in the static build) registers its wasm provider ONLY into its private facade
|
|
928
928
|
* slot (`wasm-facade.js` `_setActiveWasmProvider`). To keep the JS math core OUT
|
|
929
|
-
* of the published bundle (
|
|
929
|
+
* of the published bundle (the WASM-only publish rule) it deliberately
|
|
930
930
|
* NEVER imports `lib/egpt/js/model/backend/*`, so it CANNOT register into the registry
|
|
931
931
|
* this Runtime uses — and in a built app its bundled registry copy would be a
|
|
932
932
|
* DIFFERENT module instance across the dynamic-import boundary anyway. Result:
|
|
@@ -934,7 +934,7 @@ function _failMathRealm(err) {
|
|
|
934
934
|
* "'wasm-math' is not registered", rejecting the eager load so the notebook pane
|
|
935
935
|
* never mounted. (The DEV source entry `sdk-entry.js` registers into the SAME
|
|
936
936
|
* shared source-instance itself, which is why dev never hit this — the dist IDE
|
|
937
|
-
* shell was dead until
|
|
937
|
+
* shell was dead until the static site exercised this path.)
|
|
938
938
|
*
|
|
939
939
|
* FIX: the sdk EXPOSES its provider (`sdk.mathBackendProvider`, a plain
|
|
940
940
|
* contract-conformant object); the Runtime — the SOLE owner of
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
* (a walk-through rung) resolves that window global. `[]`/absent
|
|
26
26
|
* for an ordinary saved project (DX-3, the rung-source ferry).
|
|
27
27
|
* renderState: object|null — v3+. Studio's Save realignment
|
|
28
|
-
* (
|
|
28
|
+
* (Studio Controls Realignment §2.6) capture bag —
|
|
29
29
|
* everything the .js recipe itself does NOT round-trip:
|
|
30
30
|
* renderer/seed (load-time), render capability
|
|
31
31
|
* values + camera + backdrop visibility + bind-backed
|
|
@@ -44,10 +44,10 @@
|
|
|
44
44
|
* read without error and default to `kind:'frqtl'` (R6 binding: must never
|
|
45
45
|
* throw on legacy envelopes). The `kind` field is the ONLY new field (AM-2).
|
|
46
46
|
*
|
|
47
|
-
* v2 → v3: `renderState` field added (
|
|
48
|
-
*
|
|
47
|
+
* v2 → v3: `renderState` field added (Studio Controls Realignment §2.6,
|
|
48
|
+
* S6). Legacy v1/v2 envelopes (no `renderState` field) are read without
|
|
49
49
|
* error and default to `renderState: null` (R6 extended) — a saved project
|
|
50
|
-
* from before
|
|
50
|
+
* from before S6 simply replays with NO render/camera/page-control
|
|
51
51
|
* state (byte-identical to its own pre-S6 behavior), never a throw.
|
|
52
52
|
*
|
|
53
53
|
* ── Namespace ──────────────────────────────────────────────────────────────
|
|
@@ -147,12 +147,12 @@ function _validateModule(mod) {
|
|
|
147
147
|
* v1 → v2: default `kind` to `'frqtl'` when the field is absent.
|
|
148
148
|
* R6 (binding): this must NEVER throw on legacy v1 envelopes.
|
|
149
149
|
*
|
|
150
|
-
* v2 → v3: default `renderState` to `null` when the field is absent
|
|
151
|
-
* Studio Controls Realignment §2.6,
|
|
150
|
+
* v2 → v3: default `renderState` to `null` when the field is absent
|
|
151
|
+
* (Studio Controls Realignment §2.6, S6). R6 extended: never throw on
|
|
152
152
|
* a legacy v1/v2 envelope with no `renderState` field.
|
|
153
153
|
*
|
|
154
|
-
* v3 → v4: default `scripts` to `[]` when the field is absent (
|
|
155
|
-
*
|
|
154
|
+
* v3 → v4: default `scripts` to `[]` when the field is absent (DX-3 —
|
|
155
|
+
* the rung-source ferry). R6 extended again: never throw on
|
|
156
156
|
* a legacy envelope with no `scripts` field (an ordinary saved project has none).
|
|
157
157
|
*
|
|
158
158
|
* @param {object} mod Raw object from storage.
|
package/llms.txt
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# @descix/frqtl-node
|
|
2
2
|
|
|
3
3
|
> The FRQTL physics engine (compiled Rust → WASM) for node: the same modules as @descix/frqtl-web, plus
|
|
4
|
-
> `bootNode` and the hosted eyes. Pre-release 0.6.0-p0.
|
|
4
|
+
> `bootNode` and the hosted eyes. Pre-release 0.6.0-p0.2 on npm dist-tag `next`. Node ≥ 22.12.
|
|
5
5
|
|
|
6
6
|
- Install: `npm install @descix/frqtl-node@next`
|
|
7
7
|
- `import { bootNode, Wall } from '@descix/frqtl-node'` (require() works too); `await bootNode()` → the engine handle.
|
|
8
8
|
- `./eyes`: `openHostedEyes({ sceneRecord, sceneSource: { kind: 'project', files, entry }, pageUrl })`.
|
|
9
9
|
- `./project`: `linkProject` links a scene file against this package's own copy.
|
|
10
10
|
- `./register`: `node --import @descix/frqtl-node/register scene.mjs` resolves a scene's `@descix/frqtl-web/...` imports to this package.
|
|
11
|
-
- Full agent guide: https://cdn.jsdelivr.net/npm/@descix/frqtl-node@0.6.0-p0.
|
|
11
|
+
- Full agent guide: https://cdn.jsdelivr.net/npm/@descix/frqtl-node@0.6.0-p0.2/CLAUDE.md
|
|
12
12
|
- Acceptance is visual; no CLI ships. No account, credits or tokens are needed.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@descix/frqtl-node",
|
|
3
|
-
"version": "0.6.0-p0.
|
|
3
|
+
"version": "0.6.0-p0.2",
|
|
4
4
|
"description": "FRQTL for node \u2014 the discrete fractal physics engine (compiled Rust \u2192 WASM), its parts as ES modules, the node engine door (bootNode) and the hosted eyes.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -29,7 +29,8 @@
|
|
|
29
29
|
"dist",
|
|
30
30
|
"README.md",
|
|
31
31
|
"llms.txt",
|
|
32
|
-
"CLAUDE.md"
|
|
32
|
+
"CLAUDE.md",
|
|
33
|
+
"LICENSE.md"
|
|
33
34
|
],
|
|
34
35
|
"scripts": {
|
|
35
36
|
"build": "node build.js",
|
|
@@ -56,7 +57,7 @@
|
|
|
56
57
|
"descix"
|
|
57
58
|
],
|
|
58
59
|
"author": "Essam Abadir",
|
|
59
|
-
"license": "SEE LICENSE IN LICENSE",
|
|
60
|
+
"license": "SEE LICENSE IN LICENSE.md",
|
|
60
61
|
"dependencies": {
|
|
61
62
|
"playwright": "1.61.0"
|
|
62
63
|
},
|