diff --git a/.github/justfile b/.github/justfile index 347e41e..0249a46 100644 --- a/.github/justfile +++ b/.github/justfile @@ -23,7 +23,7 @@ _step recipe: just {{recipe}} fi -# The full gate: checks, the cross-host pairing matrix, the deltic +# The full gate: checks, the cross-host pairing matrix, the polyengine # endpoint exam, and the measured-claims bench. The execution-model # probes are NOT here: what they assert about the host's async ABI is # now asserted by the endpoint surface itself on both hosts (see the @@ -35,5 +35,5 @@ checks: @just gha::_step validate-wit @just gha::_step test @just gha::_step matrix - @just gha::_step exam-deltic + @just gha::_step exam-polyengine @just gha::_step bench diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 583199a..9ba36fc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,7 +32,7 @@ jobs: # rust-toolchain.toml; `rustup show` installs exactly those. run: rustup show active-toolchain || rustup toolchain install - - name: Install Deno (the deltic host; stock, no flags) + - name: Install Deno (the polyengine host; stock, no flags) uses: denoland/setup-deno@v2 with: deno-version: "2.9.5" diff --git a/.github/workflows/jsr-publish.yml b/.github/workflows/jsr-publish.yml index d3d2804..4c1fef3 100644 --- a/.github/workflows/jsr-publish.yml +++ b/.github/workflows/jsr-publish.yml @@ -1,4 +1,4 @@ -# Publish @polymorph/iroh (host-deltic) to JSR: build the endpoint +# Publish @polymorph/iroh (host-polyengine) to JSR: build the endpoint # component from this tree, embed it as the package's base64 asset # module, and publish. # @@ -28,6 +28,6 @@ jobs: - name: Build and embed the endpoint component run: | cargo build -p iroh-endpoint --target wasm32-wasip2 --release - deno run --allow-read=target --allow-write=host-deltic/src/endpoint_component.ts scripts/embed-endpoint-component.ts + deno run --allow-read=target --allow-write=host-polyengine/src/endpoint_component.ts scripts/embed-endpoint-component.ts - run: deno publish --allow-dirty - working-directory: host-deltic + working-directory: host-polyengine diff --git a/.gitignore b/.gitignore index 46d63b7..b130fb4 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,4 @@ node_modules /experiments/iroh-relay-ws/host/dist /experiments/iroh-blobs/host/dist /experiments/ping-demo/web/site -/host-deltic/src/endpoint_component.ts +/host-polyengine/src/endpoint_component.ts diff --git a/AGENTS.md b/AGENTS.md index 3e54c3f..a47a122 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -61,7 +61,7 @@ record (and usually an issue to resolve), not a refactor. is a PR to the sibling. - **Anything browser-hosted must stay browser-compatible**: host-side JS uses only standard browser APIs (`crypto.subtle`, `RTCPeerConnection`, - `WebSocket`); Deno (via `host-deltic/`) is just the current runner. + `WebSocket`); Deno (via `host-polyengine/`) is just the current runner. - **Divergence between targets is resolved, not accumulated.** Apply the webcrypto sibling's portability ladder in order: design it out; enhance the deficient implementation (never crypto, never key-material diff --git a/Cargo.lock b/Cargo.lock index 5bef178..3cb400f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -158,7 +158,7 @@ version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc" dependencies = [ - "windows-sys 0.61.2", + "windows-sys 0.60.2", ] [[package]] @@ -169,7 +169,7 @@ checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d" dependencies = [ "anstyle", "once_cell_polyfill", - "windows-sys 0.61.2", + "windows-sys 0.60.2", ] [[package]] @@ -525,7 +525,7 @@ dependencies = [ "cap-primitives", "cap-std", "io-lifetimes 3.0.1", - "windows-sys 0.61.2", + "windows-sys 0.60.2", ] [[package]] @@ -542,7 +542,7 @@ dependencies = [ "maybe-owned", "rustix", "rustix-linux-procfs", - "windows-sys 0.61.2", + "windows-sys 0.60.2", "winx", ] @@ -1596,7 +1596,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -3390,7 +3390,7 @@ version = "0.50.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5" dependencies = [ - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -3879,7 +3879,7 @@ dependencies = [ [[package]] name = "polymorph-tls" version = "0.1.0" -source = "git+https://github.com/polymorph-components/polymorph-tls.git?rev=e6f244c2136a1fdc8bd836aab05572620c3d3df4#e6f244c2136a1fdc8bd836aab05572620c3d3df4" +source = "git+https://github.com/polymorph-components/polymorph-tls.git?rev=ab4f88367b838f07a64ea64cfcfd5e03f494ea35#ab4f88367b838f07a64ea64cfcfd5e03f494ea35" dependencies = [ "polymorph-tls-profile", "rustls", @@ -3890,7 +3890,7 @@ dependencies = [ [[package]] name = "polymorph-tls-profile" version = "0.1.0" -source = "git+https://github.com/polymorph-components/polymorph-tls.git?rev=e6f244c2136a1fdc8bd836aab05572620c3d3df4#e6f244c2136a1fdc8bd836aab05572620c3d3df4" +source = "git+https://github.com/polymorph-components/polymorph-tls.git?rev=ab4f88367b838f07a64ea64cfcfd5e03f494ea35#ab4f88367b838f07a64ea64cfcfd5e03f494ea35" dependencies = [ "ed25519-dalek 3.0.0", "rustls", @@ -3900,7 +3900,7 @@ dependencies = [ [[package]] name = "polymorph-tls-quic" version = "0.1.0" -source = "git+https://github.com/polymorph-components/polymorph-tls.git?rev=e6f244c2136a1fdc8bd836aab05572620c3d3df4#e6f244c2136a1fdc8bd836aab05572620c3d3df4" +source = "git+https://github.com/polymorph-components/polymorph-tls.git?rev=ab4f88367b838f07a64ea64cfcfd5e03f494ea35#ab4f88367b838f07a64ea64cfcfd5e03f494ea35" dependencies = [ "aead 0.6.1", "aes 0.9.2", @@ -3924,7 +3924,7 @@ dependencies = [ [[package]] name = "polymorph-webcrypto-core" version = "0.1.0" -source = "git+https://github.com/polymorph-components/polymorph-webcrypto.git?rev=227d075a9f306764029dd6762fdab73c6cfc893f#227d075a9f306764029dd6762fdab73c6cfc893f" +source = "git+https://github.com/polymorph-components/polymorph-webcrypto.git?rev=422796bd4ca8450fc527415b7cc60ea8ab1b36ff#422796bd4ca8450fc527415b7cc60ea8ab1b36ff" dependencies = [ "aes 0.8.4", "aes-gcm 0.10.3", @@ -3956,7 +3956,7 @@ dependencies = [ [[package]] name = "polymorph-webcrypto-guest" version = "0.1.0" -source = "git+https://github.com/polymorph-components/polymorph-webcrypto.git?rev=227d075a9f306764029dd6762fdab73c6cfc893f#227d075a9f306764029dd6762fdab73c6cfc893f" +source = "git+https://github.com/polymorph-components/polymorph-webcrypto.git?rev=422796bd4ca8450fc527415b7cc60ea8ab1b36ff#422796bd4ca8450fc527415b7cc60ea8ab1b36ff" dependencies = [ "futures", "wit-bindgen 0.59.0", @@ -3965,7 +3965,7 @@ dependencies = [ [[package]] name = "polymorph-webcrypto-wasmtime" version = "0.1.0" -source = "git+https://github.com/polymorph-components/polymorph-webcrypto.git?rev=227d075a9f306764029dd6762fdab73c6cfc893f#227d075a9f306764029dd6762fdab73c6cfc893f" +source = "git+https://github.com/polymorph-components/polymorph-webcrypto.git?rev=422796bd4ca8450fc527415b7cc60ea8ab1b36ff#422796bd4ca8450fc527415b7cc60ea8ab1b36ff" dependencies = [ "futures", "mea", @@ -4226,7 +4226,7 @@ dependencies = [ "libc", "log", "socket2", - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -4892,7 +4892,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys", - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -4969,7 +4969,7 @@ dependencies = [ "security-framework", "security-framework-sys", "webpki-root-certs", - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -5123,7 +5123,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b55fb86dfd3a2f5f76ea78310a88f96c4ea21a3031f8d212443d56123fd0521" dependencies = [ "libc", - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -5355,7 +5355,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3d1e2c7f27f8d4cb10542a02c49005dbd6e93095799d6f3be745fae9f8fedd4" dependencies = [ "libc", - "windows-sys 0.61.2", + "windows-sys 0.60.2", ] [[package]] @@ -5534,7 +5534,7 @@ dependencies = [ "getrandom 0.4.3", "once_cell", "rustix", - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -6559,7 +6559,7 @@ dependencies = [ [[package]] name = "wasmtime-webrtc-datachannels" version = "0.1.0" -source = "git+https://github.com/polymorph-components/polymorph-webrtc-datachannels.git?rev=0f991407c2698577df3d117789024c14be250bd6#0f991407c2698577df3d117789024c14be250bd6" +source = "git+https://github.com/polymorph-components/polymorph-webrtc-datachannels.git?rev=42f76c988c3356e62abf33af6a04f1daf8f0839c#42f76c988c3356e62abf33af6a04f1daf8f0839c" dependencies = [ "anyhow", "async-trait", @@ -6573,7 +6573,7 @@ dependencies = [ [[package]] name = "wasmtime-websocket" version = "0.1.0" -source = "git+https://github.com/polymorph-components/polymorph-websocket.git?rev=7c364c593d51a977f5f267711b06d0fb18cfc068#7c364c593d51a977f5f267711b06d0fb18cfc068" +source = "git+https://github.com/polymorph-components/polymorph-websocket.git?rev=563aa33fc214920e80a2fec6019e91a127969a7a#563aa33fc214920e80a2fec6019e91a127969a7a" dependencies = [ "futures", "rustls", @@ -6738,7 +6738,7 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index da60957..0c636a0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,12 +16,12 @@ publish = false # Sibling crates are consumed as git dependencies pinned at a commit, per # the siblings' own release practice; bumped deliberately. [workspace.dependencies] -polymorph-tls-profile = { git = "https://github.com/polymorph-components/polymorph-tls.git", rev = "e6f244c2136a1fdc8bd836aab05572620c3d3df4" } -polymorph-tls-quic = { git = "https://github.com/polymorph-components/polymorph-tls.git", rev = "e6f244c2136a1fdc8bd836aab05572620c3d3df4" } -polymorph-webcrypto-guest = { git = "https://github.com/polymorph-components/polymorph-webcrypto.git", rev = "227d075a9f306764029dd6762fdab73c6cfc893f" } -polymorph-webcrypto-wasmtime = { git = "https://github.com/polymorph-components/polymorph-webcrypto.git", rev = "227d075a9f306764029dd6762fdab73c6cfc893f" } -wasmtime-webrtc-datachannels = { git = "https://github.com/polymorph-components/polymorph-webrtc-datachannels.git", rev = "0f991407c2698577df3d117789024c14be250bd6" } -wasmtime-websocket = { git = "https://github.com/polymorph-components/polymorph-websocket.git", rev = "7c364c593d51a977f5f267711b06d0fb18cfc068" } +polymorph-tls-profile = { git = "https://github.com/polymorph-components/polymorph-tls.git", rev = "ab4f88367b838f07a64ea64cfcfd5e03f494ea35" } +polymorph-tls-quic = { git = "https://github.com/polymorph-components/polymorph-tls.git", rev = "ab4f88367b838f07a64ea64cfcfd5e03f494ea35" } +polymorph-webcrypto-guest = { git = "https://github.com/polymorph-components/polymorph-webcrypto.git", rev = "422796bd4ca8450fc527415b7cc60ea8ab1b36ff" } +polymorph-webcrypto-wasmtime = { git = "https://github.com/polymorph-components/polymorph-webcrypto.git", rev = "422796bd4ca8450fc527415b7cc60ea8ab1b36ff" } +wasmtime-webrtc-datachannels = { git = "https://github.com/polymorph-components/polymorph-webrtc-datachannels.git", rev = "42f76c988c3356e62abf33af6a04f1daf8f0839c" } +wasmtime-websocket = { git = "https://github.com/polymorph-components/polymorph-websocket.git", rev = "563aa33fc214920e80a2fec6019e91a127969a7a" } [profile.release] lto = true diff --git a/README.md b/README.md index a0d0e98..9a7fb31 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ Everything here is **unstable** (0.x), but [releases](../../releases) are **caret-honest**: within a minor line they stay backward-compatible, and anything breaking bumps the minor. Consumption is pinned at a release's commit — sibling checkouts and vendored WIT at pinned release commits, -the release-pinned deltic/JSR graph — and bumped deliberately. +the release-pinned polyengine/JSR graph — and bumped deliberately. ## What iroh is, layer by layer @@ -207,8 +207,8 @@ superseded it; the history is in the git log.) while a UDP path finds the true one. - **Every pairing exercised, plus upstream interop**: the Wasmtime host (`host-wasmtime/`, the sibling host crates) runs authenticated - echoes on every wire through the stock relay, and the deltic JS host - (`host-deltic/`) runs the same surface on stock Deno. + echoes on every wire through the stock relay, and the polyengine JS host + (`host-polyengine/`) runs the same surface on stock Deno. To run it: build the components, hosts, and the upstream relay, then hand the server's printed endpoint ID to the client @@ -249,12 +249,12 @@ task per bound endpoint owns all I/O, and wake-ups are event-driven in both directions — resource methods kick the pump to flush their mutations and park on wakers the pump fires (cross-task wakeups ride wit-bindgen's `inter-task-wakeup` channel, delivered by both hosts). -The JS host for this surface is `host-deltic/`: it drives the endpoint -component runtime-linked under [deltic](https://github.com/lann/deltic) +The JS host for this surface is `host-polyengine/`: it drives the endpoint +component runtime-linked under [polyengine](https://github.com/polymorph-components/polyengine) on stock Deno (no transpile step, no engine flag) — the jco host this repository ran previously blocked on an upstream jco scheduler defect -(the detached-pump shape deltic's scheduler serves instead) and has -retired. `just exam-deltic` runs +(the detached-pump shape polyengine's scheduler serves instead) and has +retired. `just exam-polyengine` runs its seven-scenario endpoint exam — bind + identity (including the no-UDP profile's `not-supported`), relay echo, the WebRTC upgrade, the issue #10 concurrency rows as passing assertions, the stream @@ -263,8 +263,8 @@ terminal outcomes, idle survival, and teardown. `just matrix` runs every claimed pairing — the composed endpoint demo on every wire, cross-relay and upstream interop included, plus the surface's negative probes — against stock `iroh-relay` servers; `just -bench` gates the measured claims; `just exam-deltic` gates the -deltic-hosted endpoint surface; `just ci` is the full gate. `just +bench` gates the measured claims; `just exam-polyengine` gates the +polyengine-hosted endpoint surface; `just ci` is the full gate. `just interop-prod` (manual, internet-dependent) checks the production relays. @@ -279,7 +279,7 @@ Tracked as issues; the headline ones: attribution and reachability probing, the native half of address discovery. - The jco browser leg (issue #10): resolved by moving the JS host to - deltic (`host-deltic/`), which serves the detached-pump shape jco's + polyengine (`host-polyengine/`), which serves the detached-pump shape jco's scheduler could not; the jco host and its scheduler-defect workarounds have retired. Root cause and partial upstream fix attempts remain recorded on lann/jco#11 and PR #27 for reference. diff --git a/experiments/iroh-blobs/host/browser.html b/experiments/iroh-blobs/host/browser.html index bef8d34..1f18e5e 100644 --- a/experiments/iroh-blobs/host/browser.html +++ b/experiments/iroh-blobs/host/browser.html @@ -1,6 +1,6 @@ diff --git a/experiments/iroh-blobs/host/package.json b/experiments/iroh-blobs/host/package.json index 2c1c643..b1bff7b 100644 --- a/experiments/iroh-blobs/host/package.json +++ b/experiments/iroh-blobs/host/package.json @@ -3,7 +3,7 @@ "version": "0.0.1", "private": true, "type": "module", - "description": "Spike host harness deps: Playwright for the browser leg (the drivers themselves run on Deno under deltic).", + "description": "Spike host harness deps: Playwright for the browser leg (the drivers themselves run on Deno under polyengine).", "scripts": { "test:browser": "node browser-test.mjs" }, diff --git a/experiments/iroh-blobs/host/run.ts b/experiments/iroh-blobs/host/run.ts index 44478ae..58ead52 100644 --- a/experiments/iroh-blobs/host/run.ts +++ b/experiments/iroh-blobs/host/run.ts @@ -3,10 +3,10 @@ // WebRTC). The guest prints its own results; this driver adds a // watchdog and the shim/bridge counters. // -// Runs on stock Deno; the translator is `@deltic/translator`'s packaged +// Runs on stock Deno; the translator is `@polyengine/translator`'s packaged // asset, loaded through the module graph. -import { defaultTranslator } from "@deltic/translator"; +import { defaultTranslator } from "@polyengine/translator"; import { stats } from "./sockets.ts"; import { bridgeStats } from "./bridge.ts"; import { webrtcStats } from "./webrtc-bridge.ts"; diff --git a/experiments/iroh-blobs/run.sh b/experiments/iroh-blobs/run.sh index ac16e79..20d8f9c 100755 --- a/experiments/iroh-blobs/run.sh +++ b/experiments/iroh-blobs/run.sh @@ -1,8 +1,9 @@ #!/usr/bin/env bash +#!/usr/bin/env bash # Runs the iroh-blobs spike end to end: the pinned iroh-relay binary -# (scripts/setup.sh), then the deltic host on stock Deno driving the +# (scripts/setup.sh), then the polyengine host on stock Deno driving the # wasip2 guest — runtime-linked, no transpile step; the translator ships -# in the pinned @deltic/translator package. +# in the pinned @polyengine/translator package. # Reuses an already-running relay on 127.0.0.1:3340; kills only what it # started. set -euo pipefail diff --git a/experiments/iroh-relay-ws/host/bridge.ts b/experiments/iroh-relay-ws/host/bridge.ts index 307538c..fdc3eae 100644 --- a/experiments/iroh-relay-ws/host/bridge.ts +++ b/experiments/iroh-relay-ws/host/bridge.ts @@ -1,6 +1,6 @@ // The websocket bridge: turns the guest's synthetic datagrams (see // iroh-relay's wasi `datagram_pipe.rs`) into real websocket connections -// through the polymorph-websocket sibling's deltic host module — the +// through the polymorph-websocket sibling's polyengine host module — the // same browser-first code that serves the WIT package's host half, // running here as a plain library over the standard `WebSocket` global. // @@ -13,7 +13,7 @@ // Connections are keyed by the guest socket that carries them (one relay // connection = one synthetic socket = one websocket). -import { Websocket } from "../../../.deps/websocket/js/deltic/websocket.ts"; +import { Websocket } from "../../../.deps/websocket/js/polyengine/websocket.ts"; import type { OutgoingDatagram, UdpSocket } from "./sockets.ts"; import { pushDatagram, registerBridge } from "./sockets.ts"; import { describeErr } from "./errors.ts"; diff --git a/experiments/iroh-relay-ws/host/browser.html b/experiments/iroh-relay-ws/host/browser.html index 30818f1..524bd07 100644 --- a/experiments/iroh-relay-ws/host/browser.html +++ b/experiments/iroh-relay-ws/host/browser.html @@ -1,6 +1,6 @@ diff --git a/experiments/iroh-relay-ws/host/deno.json b/experiments/iroh-relay-ws/host/deno.json index 6556733..4011568 100644 --- a/experiments/iroh-relay-ws/host/deno.json +++ b/experiments/iroh-relay-ws/host/deno.json @@ -1,19 +1,19 @@ { - "//": "MODULE-IDENTITY CONSTRAINT: deltic's wasi package and the sibling deltic host modules (.deps/{websocket,webrtc}) import @deltic/runtime/embedder by bare specifier internally; this file maps that specifier ONCE for the whole module graph, so `instanceof ComponentException` holds across every boundary. This is the ONE deno config for all three experiments (iroh-relay-ws, iroh-blobs, ping-demo): the others pass --config pointing here. deltic arrives as exact-pinned JSR releases (caret-honest upstream: within a minor line releases stay compatible, breaking bumps the minor; per-commit `-pre.g` prereleases exist between releases — pin exactly; @deltic/translator ships the translator wasm for the SAME commit); the version matches host-deltic/deno.json by repo convention (exam-deltic asserts it; see host-deltic/README.md, 'The pin'). minimumDependencyAge keeps Deno's default supply-chain gate for everything else while letting same-day @deltic publishes resolve. The npm mappings serve the webrtc module's bare specifiers under Deno; a browser build resolves the RTCPeerConnection global instead. compilerOptions.lib carries dom next to deno.ns so the browser entries (browser-entry.ts, ping-demo's demo.ts/overlay.ts) type-check in the same graph as the Deno drivers.", + "//": "MODULE-IDENTITY CONSTRAINT: polyengine's wasi package and the sibling polyengine host modules (.deps/{websocket,webrtc}) import @polyengine/runtime/embedder by bare specifier internally; this file maps that specifier ONCE for the whole module graph, so `instanceof ComponentException` holds across every boundary. This is the ONE deno config for all three experiments (iroh-relay-ws, iroh-blobs, ping-demo): the others pass --config pointing here. polyengine arrives as exact-pinned JSR releases (caret-honest upstream: within a minor line releases stay compatible, breaking bumps the minor; per-commit `-pre.g` prereleases exist between releases — pin exactly; @polyengine/translator ships the translator wasm for the SAME commit); the version matches host-polyengine/deno.json by repo convention (exam-polyengine asserts it; see host-polyengine/README.md, 'The pin'). minimumDependencyAge keeps Deno's default supply-chain gate for everything else while letting same-day @polyengine publishes resolve. The npm mappings serve the webrtc module's bare specifiers under Deno; a browser build resolves the RTCPeerConnection global instead. compilerOptions.lib carries dom next to deno.ns so the browser entries (browser-entry.ts, ping-demo's demo.ts/overlay.ts) type-check in the same graph as the Deno drivers.", "nodeModulesDir": "auto", "minimumDependencyAge": { "age": "P1D", - "exclude": ["jsr:@deltic/*"] + "exclude": ["jsr:@polyengine/*"] }, "compilerOptions": { "lib": ["dom", "dom.iterable", "dom.asynciterable", "deno.ns"] }, "imports": { - "@deltic/runtime/embedder": "jsr:@deltic/runtime@0.2.0/embedder", - "@deltic/runtime/shim": "jsr:@deltic/runtime@0.2.0/shim", - "@deltic/translator": "jsr:@deltic/translator@0.2.0", - "@deltic/wasi": "jsr:@deltic/wasi@0.2.0", - "@deltic/wasi/io": "jsr:@deltic/wasi@0.2.0/io", + "@polyengine/runtime/embedder": "jsr:@polyengine/runtime@0.3.0/embedder", + "@polyengine/runtime/shim": "jsr:@polyengine/runtime@0.3.0/shim", + "@polyengine/translator": "jsr:@polyengine/translator@0.3.0", + "@polyengine/wasi": "jsr:@polyengine/wasi@0.3.0", + "@polyengine/wasi/io": "jsr:@polyengine/wasi@0.3.0/io", "node-datachannel": "npm:node-datachannel@0.32.3", "node-datachannel/polyfill": "npm:node-datachannel@0.32.3/polyfill", "werift": "npm:werift@0.22.2" diff --git a/experiments/iroh-relay-ws/host/deno.lock b/experiments/iroh-relay-ws/host/deno.lock index 48ae1a2..6a53f13 100644 --- a/experiments/iroh-relay-ws/host/deno.lock +++ b/experiments/iroh-relay-ws/host/deno.lock @@ -1,36 +1,36 @@ { "version": "5", "specifiers": { - "jsr:@deltic/protocol@0.2": "0.2.0", - "jsr:@deltic/runtime@0.2": "0.2.0", - "jsr:@deltic/runtime@0.2.0": "0.2.0", - "jsr:@deltic/translator@0.2.0": "0.2.0", - "jsr:@deltic/wasi@0.2.0": "0.2.0", + "jsr:@polyengine/protocol@0.1": "0.1.0", + "jsr:@polyengine/runtime@0.3": "0.3.0", + "jsr:@polyengine/runtime@0.3.0": "0.3.0", + "jsr:@polyengine/translator@0.3.0": "0.3.0", + "jsr:@polyengine/wasi@0.3.0": "0.3.0", "npm:node-datachannel@0.32.3": "0.32.3", "npm:playwright@^1.62.1": "1.62.1", "npm:werift@0.22.2": "0.22.2" }, "jsr": { - "@deltic/protocol@0.2.0": { - "integrity": "028be6a3623c5e910598aa7a199209b85e8931ae484ac7f6638d610ddb0e19fa" + "@polyengine/protocol@0.1.0": { + "integrity": "0c97f34166f22ba55e7b084148df96e47aebe47cd9dd13930057759c9161bb1c" }, - "@deltic/runtime@0.2.0": { - "integrity": "cf8b0bdd9e6bc4488ba78cc91661103bfcbd78f5a5c4ff99132799618a9db4bb", + "@polyengine/runtime@0.3.0": { + "integrity": "97d7648c104dd0f08b4d10e1ed0117ab0cb5243db68c139f1f3df25755ed4e60", "dependencies": [ - "jsr:@deltic/protocol" + "jsr:@polyengine/protocol" ] }, - "@deltic/translator@0.2.0": { - "integrity": "8104b54e2acdccfd75f5ddc941d72b581e7defbbe31c05bbc66598d2df7a34f9", + "@polyengine/translator@0.3.0": { + "integrity": "1d9fcd09d360850bc08927ed1cf8124d50a0fed09ed8c80f354a6d3aedfcad25", "dependencies": [ - "jsr:@deltic/runtime@0.2" + "jsr:@polyengine/runtime@0.3" ] }, - "@deltic/wasi@0.2.0": { - "integrity": "82c76d4fda0a1c9238a91f8ebc7fdbac952a03aa06d4a2a820213df2654f5c24", + "@polyengine/wasi@0.3.0": { + "integrity": "991adfdd39f795f94bba91a523322b88d45ff42800669b5b472356676e3c97e7", "dependencies": [ - "jsr:@deltic/protocol", - "jsr:@deltic/runtime@0.2" + "jsr:@polyengine/protocol", + "jsr:@polyengine/runtime@0.3" ] } }, @@ -60,8 +60,8 @@ "@noble/hashes@1.8.0": { "integrity": "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A==" }, - "@peculiar/asn1-cms@2.8.0": { - "integrity": "sha512-NgekZOrSJFSBFLFoLfwePguAWAx7z1+f2TEsWFUMyiqqfntZ4+S/S5hzqME3q4pCA0iOsFKdwiQ35dwY24eVqA==", + "@peculiar/asn1-cms@2.9.4": { + "integrity": "sha512-cben7oxmQsUGZqotus7yt0srYdncOT6RNWcTQ77T2RFOXejYVYkXadrfePdRcrVpO9K95IRLKKglG2k38jKXuw==", "dependencies": [ "@peculiar/asn1-schema", "@peculiar/asn1-x509", @@ -70,8 +70,8 @@ "tslib@2.8.1" ] }, - "@peculiar/asn1-csr@2.8.0": { - "integrity": "sha512-akbF8+uvleHs8sejNPQxwmVFuInAg6FMNHOwMILXfP518YfFJwdR3jr6oNUPOaEJfuEhn/vkNOCIT6ASUd4mbg==", + "@peculiar/asn1-csr@2.9.4": { + "integrity": "sha512-xd4YN4vpRjkDAQWVfZZkeu12IEND7DOpkqaHSIHxZl1uggUNa9Ju0QxY2jHvDAS9pP0zhRBytg8ifsnGo3V0jw==", "dependencies": [ "@peculiar/asn1-schema", "@peculiar/asn1-x509", @@ -79,8 +79,8 @@ "tslib@2.8.1" ] }, - "@peculiar/asn1-ecc@2.8.0": { - "integrity": "sha512-ohwlk+u9Rv2NOAY1c6MfHj45ATVF8R1DUN/WCgABiRtLi2ZftlZWZX7KvpAbU8v9xPcmoILfELeEABj/rn18AQ==", + "@peculiar/asn1-ecc@2.9.4": { + "integrity": "sha512-JJXefFshRAuVAjWQo/39bkg1ywc1VaiO44S8RRC+Ykvf/u2KDmYffoDb0ZBPCR5uJy4AGKQhl8mX+Q8ShcWaXQ==", "dependencies": [ "@peculiar/asn1-schema", "@peculiar/asn1-x509", @@ -88,8 +88,8 @@ "tslib@2.8.1" ] }, - "@peculiar/asn1-pfx@2.8.0": { - "integrity": "sha512-5yof1ytoB++RQtaFbqSUJ8pxDJtZT6vbVqZ8XoJ61ph7UjNVvfFwAilnCodqkNsAodpy13gDhoxZXw00pghnyg==", + "@peculiar/asn1-pfx@2.9.4": { + "integrity": "sha512-khuGzHTzNzk4GDlIBEILyIs6Lce0yn0ZBdoI9v93kmNncfZRhD+AQ5ODFqdhvoE8cMJF/JMTQ8yA+t1D14kqCw==", "dependencies": [ "@peculiar/asn1-cms", "@peculiar/asn1-pkcs8", @@ -99,8 +99,8 @@ "tslib@2.8.1" ] }, - "@peculiar/asn1-pkcs8@2.8.0": { - "integrity": "sha512-qAKXtLpBEw9LqhKpjw3ajZSXlBur+ipW+y2ivVBQAG6F6qRx94yO+1ZR4mvw+YaCfKSaOzLeYEzsPaBp4SJELA==", + "@peculiar/asn1-pkcs8@2.9.4": { + "integrity": "sha512-duRdotlUx9eDZe6QrQpQKl61RbWykCHBCkKayP8V8XdEFwlKHZ8qGGDMyS6Pye7OX7nLFttTTpRkJeet78ckwQ==", "dependencies": [ "@peculiar/asn1-schema", "@peculiar/asn1-x509", @@ -108,8 +108,8 @@ "tslib@2.8.1" ] }, - "@peculiar/asn1-pkcs9@2.8.0": { - "integrity": "sha512-b5nDWCnkV60+cQ141D6sVVwK9nz64R5n3zSVnklGd+ECdkW2Ol3U1a6yYFlalpSOaD557yuJB64A+q42jG7lUQ==", + "@peculiar/asn1-pkcs9@2.9.4": { + "integrity": "sha512-kaL4cNxBpdQE2dKlyZBqz4ygCrwffO+8wfoxTEqM1Z8RadvCeELBRzcv0dzM8aY9azHMwODO5nxU65zXmhToOQ==", "dependencies": [ "@peculiar/asn1-cms", "@peculiar/asn1-pfx", @@ -121,8 +121,8 @@ "tslib@2.8.1" ] }, - "@peculiar/asn1-rsa@2.8.0": { - "integrity": "sha512-zHEUlCqB2mk7x2lxDwHHJy7hWZOPdGHVlsmITWKB5/PbQo61atbu9PJ/0r9dQNMwFzbKPXZ8uK8/91eUhRznSg==", + "@peculiar/asn1-rsa@2.9.4": { + "integrity": "sha512-pZ96eD1PptovcWQ/GSmuNFXd/7EQJNlKfDaNCyE2rx3W0v6QFelkzquVqRSRyyDXXCYD69ZXJDzZ8GhIiQzKoA==", "dependencies": [ "@peculiar/asn1-schema", "@peculiar/asn1-x509", @@ -130,16 +130,16 @@ "tslib@2.8.1" ] }, - "@peculiar/asn1-schema@2.8.0": { - "integrity": "sha512-7YT0U/ze0tF2QOBbE15gKZwy5tvgGyLRiRHLzhlbOpf7BT032oBSd0haZqXn5W6l26WLlu3dyxzjM+2638/z2Q==", + "@peculiar/asn1-schema@2.9.4": { + "integrity": "sha512-GjzePcT9Iw8NzeOPf73iNS9xM+TBhd/FilAfP+RQGkTMQJTVWtytN3JHJACCjf/ABNau5S7mS3g+DcuxmRgYEg==", "dependencies": [ "@peculiar/utils", "asn1js", "tslib@2.8.1" ] }, - "@peculiar/asn1-x509-attr@2.8.0": { - "integrity": "sha512-tHjkfS/qhMnmrlB2J9NhflQlQ7In3khO3CfmVrriOlpTeErY9ZIKOso1hQ5JQiyrJ7ShvqVPk7E5fQmbclkSKA==", + "@peculiar/asn1-x509-attr@2.9.4": { + "integrity": "sha512-ehQXbpQaQYycgu8OrvigwSPTFfVRcu0ECNYCWw+yzBp02Lw5paRqzzhUpfOgO2K38+WfFZuEz/0RPtam5g0OMg==", "dependencies": [ "@peculiar/asn1-schema", "@peculiar/asn1-x509", @@ -147,8 +147,8 @@ "tslib@2.8.1" ] }, - "@peculiar/asn1-x509@2.8.0": { - "integrity": "sha512-N0CMuhWUzsWEVq6F1q9X6+VKUnWzSW+cSVg+aPaGGwDdbFoFWTYgin5MHwXgpWd6y9COMBxnfy/Qc+Xc7F0Zwg==", + "@peculiar/asn1-x509@2.9.4": { + "integrity": "sha512-CxhBo/RdEbMMob7T31ZdQjGuoyRFLVwrDzTn25bihzBasRg9kRm/0IxIPvhgQtcK/9dNcO1XQL2fuPugwELL0Q==", "dependencies": [ "@peculiar/asn1-schema", "@peculiar/utils", @@ -325,8 +325,8 @@ "lodash@4.18.1": { "integrity": "sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q==" }, - "mediabunny@1.53.0": { - "integrity": "sha512-RjWe9yJr9MPvb6kX4gSu54fZD2w1yf6RyCS0Jmgaml+fFSqEr7+XuASXoRxSqJxgc+wIe+7TujXWcyj3evJ3Bg==", + "mediabunny@1.55.1": { + "integrity": "sha512-JDdTEUOw9g6Ey8eWc2Ei63GmRGtGTJoE56SE7CHikwzS8i9xpsWcve4bEiUw47d4j49L3r7MXDFsH/5oZIhjBw==", "dependencies": [ "@types/dom-mediacapture-transform", "@types/dom-webcodecs" @@ -383,9 +383,6 @@ "wrappy" ] }, - "p-cancelable@2.1.1": { - "integrity": "sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg==" - }, "playwright-core@1.62.1": { "integrity": "sha512-wPYSwEBJY9GHraISXqyqtx0na0LpO3XEX7jNDhntbex7tzUS7kLnZsOlFruFJB4Hi/rhDMjXGqHewDZ68nYZVw==", "bin": true @@ -456,9 +453,6 @@ "reflect-metadata@0.2.2": { "integrity": "sha512-urBwgfrvVP/eAyXx4hluJivBKzuEbSQs9rKWCrCkbSxNv8mxPcUZKeuoF3Uy4mJl3Lwprp6yy5/39VWigZ4K6Q==" }, - "rx.mini@1.4.0": { - "integrity": "sha512-8w5cSc1mwNja7fl465DXOkVvIOkpvh2GW4jo31nAIvX4WTXCsRnKJGUfiDBzWtYRInEcHAUYIZfzusjIrea8gA==" - }, "safe-buffer@5.2.1": { "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" }, @@ -557,18 +551,11 @@ "tweetnacl" ] }, - "werift-ice@0.2.2": { - "integrity": "sha512-td52pHp+JmFnUn5jfDr/SSNO0dMCbknhuPdN1tFp9cfRj5jaktN63qnAdUuZC20QCC3ETWdsOthcm+RalHpFCQ==", + "werift-ice@0.2.3": { + "integrity": "sha512-k000fIaw8w2D4Xv5EvW6b5h4faJx8p4D8HPuDzRiGTx6UrLv2BuvUkC60LNqxlDf9o3zh90Hx1WZoHbhuw9keA==", "dependencies": [ - "@shinyoshiaki/jspack", - "buffer-crc32", "debug", - "int64-buffer", - "ip", - "lodash", - "multicast-dns", - "p-cancelable", - "rx.mini" + "multicast-dns" ] }, "werift-rtp@0.8.9": { @@ -621,9 +608,9 @@ }, "workspace": { "dependencies": [ - "jsr:@deltic/runtime@0.2.0", - "jsr:@deltic/translator@0.2.0", - "jsr:@deltic/wasi@0.2.0", + "jsr:@polyengine/runtime@0.3.0", + "jsr:@polyengine/translator@0.3.0", + "jsr:@polyengine/wasi@0.3.0", "npm:node-datachannel@0.32.3", "npm:werift@0.22.2" ], diff --git a/experiments/iroh-relay-ws/host/errors.ts b/experiments/iroh-relay-ws/host/errors.ts index 5ac5c15..98306be 100644 --- a/experiments/iroh-relay-ws/host/errors.ts +++ b/experiments/iroh-relay-ws/host/errors.ts @@ -1,8 +1,8 @@ -// Render an error for a log line, unwrapping deltic's branded +// Render an error for a log line, unwrapping polyengine's branded // `ComponentException<{kind, value?}>` payloads (the sibling host modules // throw these). -import { ComponentException } from "@deltic/runtime/embedder"; +import { ComponentException } from "@polyengine/runtime/embedder"; export function describeErr(err: unknown): string { if (err instanceof ComponentException) { diff --git a/experiments/iroh-relay-ws/host/harness.ts b/experiments/iroh-relay-ws/host/harness.ts index b0062c7..51881a0 100644 --- a/experiments/iroh-relay-ws/host/harness.ts +++ b/experiments/iroh-relay-ws/host/harness.ts @@ -1,22 +1,22 @@ -// Shared host wiring for the upstream-iroh spikes under deltic: artifact +// Shared host wiring for the upstream-iroh spikes under polyengine: artifact // translation, the WASI import record, and the guest `run` entry point. // // Platform-portable core: byte loading (filesystem vs fetch) stays in the // drivers (run.ts, browser-entry.ts); everything here uses standard // globals only. // -// MODULE-IDENTITY CONSTRAINT (host-deltic/README.md "Module identity"): -// deltic's wasi package and this package import `@deltic/runtime/embedder` +// MODULE-IDENTITY CONSTRAINT (host-polyengine/README.md "Module identity"): +// polyengine's wasi package and this package import `@polyengine/runtime/embedder` // by bare specifier; the `deno.json` next to this file maps that // specifier once for the whole module graph, so there is exactly one // `ComponentException` module instance and `instanceof` holds across every // boundary — including the branded errors sockets.ts throws. -import type { ComponentArtifacts } from "@deltic/runtime/embedder"; -import { artifactsFromEnvelope, instantiate } from "@deltic/runtime/embedder"; -import type { Translator } from "@deltic/runtime/shim"; -import { wasi } from "@deltic/wasi"; -import { OutputStream } from "@deltic/wasi/io"; +import type { ComponentArtifacts } from "@polyengine/runtime/embedder"; +import { artifactsFromEnvelope, instantiate } from "@polyengine/runtime/embedder"; +import type { Translator } from "@polyengine/runtime/shim"; +import { wasi } from "@polyengine/wasi"; +import { OutputStream } from "@polyengine/wasi/io"; import { syntheticNetImports } from "./sockets.ts"; /** Reconstitute build-time-translated artifacts (embedder-api A4). */ @@ -50,7 +50,7 @@ export interface GuestOptions { } /** - * The full import record for the spike guests: deltic's wasi() + * The full import record for the spike guests: polyengine's wasi() * baseline (whose A5 parking kernel serves poll/clock suspension), the * synthetic network fragment (sockets.ts), and stdio routed to the * console line-buffered. @@ -71,7 +71,7 @@ export function guestImports(options: GuestOptions): Record { * * `artifacts` is anything `instantiate` accepts (embedder-api A3): the * translated `ComponentArtifacts`, or `{ componentBytes, translator }` - * with `@deltic/translator`'s instance for in-process translation. jspi + * with `@polyengine/translator`'s instance for in-process translation. jspi * mode is selected by the wasi package's own `suspending()` markers (the A5 * kernel); no explicit option is needed. */ diff --git a/experiments/iroh-relay-ws/host/package.json b/experiments/iroh-relay-ws/host/package.json index 51aa6f7..d64acd3 100644 --- a/experiments/iroh-relay-ws/host/package.json +++ b/experiments/iroh-relay-ws/host/package.json @@ -3,7 +3,7 @@ "version": "0.0.1", "private": true, "type": "module", - "description": "Spike host harness deps: Playwright for the browser leg (the drivers themselves run on Deno under deltic).", + "description": "Spike host harness deps: Playwright for the browser leg (the drivers themselves run on Deno under polyengine).", "scripts": { "test:browser": "node browser-test.mjs" }, diff --git a/experiments/iroh-relay-ws/host/run.ts b/experiments/iroh-relay-ws/host/run.ts index fc57ee1..8e22594 100644 --- a/experiments/iroh-relay-ws/host/run.ts +++ b/experiments/iroh-relay-ws/host/run.ts @@ -2,10 +2,10 @@ // two-endpoint relay echo + WebRTC migration. The guest prints its own // results; this driver adds a watchdog and the shim/bridge counters. // -// Runs on stock Deno; the translator is `@deltic/translator`'s packaged +// Runs on stock Deno; the translator is `@polyengine/translator`'s packaged // asset, loaded through the module graph. -import { defaultTranslator } from "@deltic/translator"; +import { defaultTranslator } from "@polyengine/translator"; import { stats } from "./sockets.ts"; import { bridgeStats } from "./bridge.ts"; import { webrtcStats } from "./webrtc-bridge.ts"; diff --git a/experiments/iroh-relay-ws/host/sockets.ts b/experiments/iroh-relay-ws/host/sockets.ts index 04caa0d..1628c51 100644 --- a/experiments/iroh-relay-ws/host/sockets.ts +++ b/experiments/iroh-relay-ws/host/sockets.ts @@ -1,5 +1,5 @@ -// The synthetic WASI network for the upstream-iroh spikes, in deltic's -// embedder conventions (deltic contracts/embedder-api.md). +// The synthetic WASI network for the upstream-iroh spikes, in polyengine's +// embedder conventions (polyengine contracts/embedder-api.md). // // Descendant of the jco spike shim (which descended from the udp-wake // probe, PR #18): multiple synthetic UDP sockets — one per relay @@ -7,7 +7,7 @@ // to host-side bridges by well-known port (bridge.ts, webrtc-bridge.ts) // or by full synthetic destination address (the issue #26 overlay). // -// Parking is deltic's, not this module's: the wasi package's kernel (embedder-api +// Parking is polyengine's, not this module's: the wasi package's kernel (embedder-api // A5) serves `wasi:io/poll` and the clock subscriptions with real // suspension, and its `Pollable` is publicly constructible as the interop // seam — this module only mints `new Pollable(ready, wait)` over its @@ -22,8 +22,8 @@ // Environment-portable: standard globals only; works under Deno and in // browsers. -import { ComponentException } from "@deltic/runtime/embedder"; -import { Pollable } from "@deltic/wasi/io"; +import { ComponentException } from "@polyengine/runtime/embedder"; +import { Pollable } from "@polyengine/wasi/io"; // --------------------------------------------------------------------------- // instrumentation @@ -330,7 +330,7 @@ export class ResolveAddressStream { /** * The synthetic-network provider fragment (track keys), spread next to - * deltic's `wasi(...)`, whose A5 kernel serves `wasi:io/poll` and + * polyengine's `wasi(...)`, whose A5 kernel serves `wasi:io/poll` and * the clock subscriptions these sockets' pollables park under. */ export function syntheticNetImports(): Record { diff --git a/experiments/iroh-relay-ws/host/translate.ts b/experiments/iroh-relay-ws/host/translate.ts index 718ce4e..8674bd3 100644 --- a/experiments/iroh-relay-ws/host/translate.ts +++ b/experiments/iroh-relay-ws/host/translate.ts @@ -1,5 +1,5 @@ -// Build-time translation (deltic embedder-api A4): component in, envelope -// out. The translator is `@deltic/translator`'s packaged asset — the same +// Build-time translation (polyengine embedder-api A4): component in, envelope +// out. The translator is `@polyengine/translator`'s packaged asset — the same // pinned release as the runtime, so the envelope's plan format matches // what the pages' `artifactsFromEnvelope` expects by construction. // @@ -10,7 +10,7 @@ // translate.ts import { dirname } from "node:path"; -import { defaultTranslator } from "@deltic/translator"; +import { defaultTranslator } from "@polyengine/translator"; const [input, output] = Deno.args; if (!input || !output) { diff --git a/experiments/iroh-relay-ws/host/webrtc-bridge.ts b/experiments/iroh-relay-ws/host/webrtc-bridge.ts index 38e87b5..899aa28 100644 --- a/experiments/iroh-relay-ws/host/webrtc-bridge.ts +++ b/experiments/iroh-relay-ws/host/webrtc-bridge.ts @@ -1,6 +1,6 @@ // The WebRTC overlay bridge: assigns each registered endpoint a synthetic // IP address, and carries datagrams for that address over real data -// channels through the polymorph-webrtc-datachannels sibling's deltic +// channels through the polymorph-webrtc-datachannels sibling's polyengine // host module (node-datachannel's W3C polyfill under Deno, the browser // global in a browser). The guest runs stock iroh IP transports; the // synthetic address enters iroh through `Endpoint::add_external_addr`, @@ -30,7 +30,7 @@ import { DataChannelOptions, PeerConnection, PeerConnectionConfig, -} from "../../../.deps/webrtc/deltic-impl/src/webrtc.ts"; +} from "../../../.deps/webrtc/polyengine-impl/src/webrtc.ts"; import type { IpSocketAddress, OutgoingDatagram, UdpSocket } from "./sockets.ts"; import { pushDatagram, diff --git a/experiments/iroh-relay-ws/run.sh b/experiments/iroh-relay-ws/run.sh index d192ec3..3a117f7 100755 --- a/experiments/iroh-relay-ws/run.sh +++ b/experiments/iroh-relay-ws/run.sh @@ -1,8 +1,9 @@ #!/usr/bin/env bash +#!/usr/bin/env bash # Runs the iroh-relay-ws spike end to end: the pinned iroh-relay binary -# (scripts/setup.sh), then the deltic host on stock Deno driving the +# (scripts/setup.sh), then the polyengine host on stock Deno driving the # wasip2 guest — runtime-linked, no transpile step; the translator ships -# inside the pinned @deltic/translator package. Reuses an already-running +# inside the pinned @polyengine/translator package. Reuses an already-running # relay on 127.0.0.1:3340; kills only what it started. set -euo pipefail cd "$(dirname "$0")" diff --git a/experiments/ping-demo/build.sh b/experiments/ping-demo/build.sh index c9d8977..d797efa 100755 --- a/experiments/ping-demo/build.sh +++ b/experiments/ping-demo/build.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# Builds the ping demo into web/site/: guest component (cargo), deltic +# Builds the ping demo into web/site/: guest component (cargo), polyengine # build-time translation (A4 envelope), and the bundled page — the site # must be self-contained (GitHub Pages, and COEP blocks anything # cross-origin without CORP anyway). Runtime host layer (sockets, bridge, @@ -17,9 +17,9 @@ GUEST_WASM=guest/target/wasm32-wasip2/release/ping-demo-guest.wasm rm -rf "$SITE" mkdir -p "$SITE" -# Build-time translation (deltic embedder-api A4): produces the +# Build-time translation (polyengine embedder-api A4): produces the # component-plus-plan envelope the page fetches at runtime. The -# translator is @deltic/translator's packaged asset at the same pinned +# translator is @polyengine/translator's packaged asset at the same pinned # release as the runtime the bundle carries, so the envelope's plan # format matches by construction. deno run --config "$SPIKE_HOST/deno.json" --frozen --allow-read --allow-write \ diff --git a/experiments/ping-demo/web/demo.ts b/experiments/ping-demo/web/demo.ts index e4a7618..79cb0f2 100644 --- a/experiments/ping-demo/web/demo.ts +++ b/experiments/ping-demo/web/demo.ts @@ -506,7 +506,7 @@ try { setStatus("error", `guest failed: ${err}`) ); } catch (err) { - // Feature-probe only: deltic's jspi types are module-scoped (no global + // Feature-probe only: polyengine's jspi types are module-scoped (no global // WebAssembly augmentation), so read the property untyped. const jspi = typeof (WebAssembly as { Suspending?: unknown }).Suspending === "function"; setStatus( diff --git a/experiments/ping-demo/web/overlay.ts b/experiments/ping-demo/web/overlay.ts index 8be6d25..5905ff7 100644 --- a/experiments/ping-demo/web/overlay.ts +++ b/experiments/ping-demo/web/overlay.ts @@ -23,7 +23,7 @@ import { DataChannelOptions, PeerConnection, PeerConnectionConfig, -} from "../../../.deps/webrtc/deltic-impl/src/webrtc.ts"; +} from "../../../.deps/webrtc/polyengine-impl/src/webrtc.ts"; import type { IpSocketAddress, OutgoingDatagram, UdpSocket } from "../../iroh-relay-ws/host/sockets.ts"; import { pushDatagram, diff --git a/host-deltic/deno.json b/host-deltic/deno.json deleted file mode 100644 index 52bab74..0000000 --- a/host-deltic/deno.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "name": "@polymorph/iroh", - "version": "0.2.0", - "license": "Apache-2.0", - "exports": { ".": "./src/mod.ts" }, - "//": "MODULE-IDENTITY CONSTRAINT: deltic's wasi package and the sibling @polymorph host modules import @deltic/runtime/embedder by bare specifier internally. Every dependency constraint here is a caret range on one minor line (published-package convention, deltic's own precedent), so a consumer's resolver dedupes the whole family onto ONE @deltic/runtime module instance and `instanceof ComponentException` holds across every boundary; deno.lock carries integrity, --frozen enforced in the repo. The exam gate (justfile: exam-deltic) asserts the repo's deno.locks resolve to one @deltic version and pipes the resolved graph through scripts/deltic-identity-gate.ts (one runtime module, no raw URLs). src/endpoint_component.ts is GENERATED by `just build-components` (gitignored; the publish workflow regenerates it) — the packaged endpoint component, base64 in the module graph. minimumDependencyAge keeps Deno's default supply-chain gate for everything else while letting same-day @deltic/@polymorph publishes resolve.", - "nodeModulesDir": "auto", - "minimumDependencyAge": { - "age": "P1D", - "exclude": ["jsr:@deltic/*", "jsr:@polymorph/*"] - }, - "imports": { - "@deltic/runtime/embedder": "jsr:@deltic/runtime@^0.2.0/embedder", - "@deltic/translator": "jsr:@deltic/translator@^0.2.0", - "@deltic/wasi": "jsr:@deltic/wasi@^0.2.0", - "@polymorph/webcrypto": "jsr:@polymorph/webcrypto@^0.2.0", - "@polymorph/websocket": "jsr:@polymorph/websocket@^0.2.0", - "@polymorph/webrtc-datachannels": "jsr:@polymorph/webrtc-datachannels@^0.2.0" - }, - "publish": { - "exclude": ["src/run-endpoint.ts", "src/scenario.ts", "src/repo.ts", "!src/endpoint_component.ts"] - }, - "tasks": { - "check": "deno check src", - "exam": "deno run -A src/run-endpoint.ts" - } -} diff --git a/host-deltic/README.md b/host-polyengine/README.md similarity index 69% rename from host-deltic/README.md rename to host-polyengine/README.md index 2060878..8abd97c 100644 --- a/host-deltic/README.md +++ b/host-polyengine/README.md @@ -1,15 +1,15 @@ -# `host-deltic` — the deltic host: the endpoint surface on stock Deno +# `host-polyengine` — the polyengine host: the endpoint surface on stock Deno The endpoint component runtime-linked under -[deltic](https://github.com/lann/deltic): no transpile step, no generated +[polyengine](https://github.com/polymorph-components/polyengine): no transpile step, no generated tree, no engine flag. This is the JS-host leg of the endpoint surface that issue #10 blocked under jco — the detached pump task holding -in-flight relay imports across export calls is exactly the shape deltic's +in-flight relay imports across export calls is exactly the shape polyengine's scheduler serves. The jco host (`host-jco/`) ran this repository's demos alongside this exam until it retired in favor of this host (see git history); this is now the repository's only JS host. -The sibling repositories' own deltic host modules supply the non-WASI +The sibling repositories' own polyengine host modules supply the non-WASI imports, consumed from JSR by caret constraint (the lockfile pins the resolved versions): @@ -19,17 +19,17 @@ resolved versions): | `polymorph:webrtc-datachannels/connections` | `jsr:@polymorph/webrtc-datachannels` | | `polymorph:webcrypto/*` | `jsr:@polymorph/webcrypto` | | `wasi:sockets/types` | `src/sockets.ts` — fail-on-call stubs (the browser profile; see its header) | -| everything WASI | deltic's `@deltic/wasi` package | +| everything WASI | polyengine's `@polyengine/wasi` package | ## The exam ```sh -just exam-deltic +just exam-polyengine ``` builds the endpoint component and the stock relay, installs the leg's pinned module graph + the `node-datachannel` addon -(`just deltic-setup`, idempotent), fetches the sha256-pinned translator +(`just polyengine-setup`, idempotent), fetches the sha256-pinned translator release asset, and runs `src/run-endpoint.ts` — five scenarios: 1. **bind + identity** — `identity-generate` → `new @@ -53,38 +53,38 @@ borrowed`); panic counts are reported per attempt. The hazard is the guest's and is latent on every host. ## The pin -deltic and the sibling host modules arrive from JSR under caret -constraints on one minor line (`jsr:@deltic/*@^0.1.0`, -`jsr:@polymorph/*@^0.1.0`); `deno.lock` pins the resolved versions and -carries integrity, enforced with `--frozen`. `@deltic/translator` ships +polyengine and the sibling host modules arrive from JSR under caret +constraints on one minor line (`jsr:@polyengine/*@^0.3.0`, +`jsr:@polymorph/*@^0.3.0`); `deno.lock` pins the resolved versions and +carries integrity, enforced with `--frozen`. `@polyengine/translator` ships the translator wasm for the same commit as the runtime, so the plan-format coupling between runtime and translator is self-consistent inside each graph by construction — there is no separate asset pin and -no fetch step. `minimumDependencyAge` exempts `jsr:@deltic/*` and +no fetch step. `minimumDependencyAge` exempts `jsr:@polyengine/*` and `jsr:@polymorph/*` from Deno's default 24-hour supply-chain gate so same-day releases resolve; everything else keeps the default. `experiments/iroh-relay-ws/host/deno.json` (the upstream-iroh spikes' -shared config) exact-pins the same deltic packages; the `exam-deltic` -recipe asserts both `deno.lock`s resolve to one deltic version. +shared config) exact-pins the same polyengine packages; the `exam-polyengine` +recipe asserts both `deno.lock`s resolve to one polyengine version. To bump: adjust the constraints (a new minor line) or just delete the -`deno.lock` files (within the line), re-run `just deltic-setup` and +`deno.lock` files (within the line), re-run `just polyengine-setup` and `deno install --allow-scripts=npm:node-datachannel` in `experiments/iroh-relay-ws/host/` to regenerate them, and commit the diff. ## Module identity -deltic's wasi package and the sibling host modules import -`@deltic/runtime/embedder` by bare specifier internally, each resolved +polyengine's wasi package and the sibling host modules import +`@polyengine/runtime/embedder` by bare specifier internally, each resolved through its own package manifest. Identity rests on every manifest in the graph carrying a constraint the resolver can satisfy with ONE -`@deltic/runtime` version, so it dedupes to one +`@polyengine/runtime` version, so it dedupes to one `ComponentException`/`Stream` module instance — caret constraints on one minor line guarantee that; an exact pin outside every other manifest's range (or a raw-URL embedder module) splits the graph, and `instanceof ComponentException` silently stops holding across that -boundary. Two gates in `just exam-deltic` keep it true: the lock check -(this repo's `deno.lock`s resolve to one deltic version) and -`scripts/deltic-identity-gate.ts` (the RESOLVED run-endpoint graph -carries exactly one `@deltic/runtime` and no raw URLs). +boundary. Two gates in `just exam-polyengine` keep it true: the lock check +(this repo's `deno.lock`s resolve to one polyengine version) and +`scripts/polyengine-identity-gate.ts` (the RESOLVED run-endpoint graph +carries exactly one `@polyengine/runtime` and no raw URLs). diff --git a/host-polyengine/deno.json b/host-polyengine/deno.json new file mode 100644 index 0000000..e059fda --- /dev/null +++ b/host-polyengine/deno.json @@ -0,0 +1,27 @@ +{ + "name": "@polymorph/iroh", + "version": "0.3.0", + "license": "Apache-2.0", + "exports": { ".": "./src/mod.ts" }, + "//": "MODULE-IDENTITY CONSTRAINT: polyengine's wasi package and the sibling @polymorph host modules import @polyengine/runtime/embedder by bare specifier internally. Every dependency constraint here is a caret range on one minor line (published-package convention, polyengine's own precedent), so a consumer's resolver dedupes the whole family onto ONE @polyengine/runtime module instance and `instanceof ComponentException` holds across every boundary; deno.lock carries integrity, --frozen enforced in the repo. The exam gate (justfile: exam-polyengine) asserts the repo's deno.locks resolve to one @polyengine version and pipes the resolved graph through scripts/polyengine-identity-gate.ts (one runtime module, no raw URLs). src/endpoint_component.ts is GENERATED by `just build-components` (gitignored; the publish workflow regenerates it) — the packaged endpoint component, base64 in the module graph. minimumDependencyAge keeps Deno's default supply-chain gate for everything else while letting same-day @polyengine/@polymorph publishes resolve.", + "nodeModulesDir": "auto", + "minimumDependencyAge": { + "age": "P1D", + "exclude": ["jsr:@polyengine/*", "jsr:@polymorph/*"] + }, + "imports": { + "@polyengine/runtime/embedder": "jsr:@polyengine/runtime@^0.3.0/embedder", + "@polyengine/translator": "jsr:@polyengine/translator@^0.3.0", + "@polyengine/wasi": "jsr:@polyengine/wasi@^0.3.0", + "@polymorph/webcrypto": "jsr:@polymorph/webcrypto@^0.3.0", + "@polymorph/websocket": "jsr:@polymorph/websocket@^0.3.0", + "@polymorph/webrtc-datachannels": "jsr:@polymorph/webrtc-datachannels@^0.3.0" + }, + "publish": { + "exclude": ["src/run-endpoint.ts", "src/scenario.ts", "src/repo.ts", "!src/endpoint_component.ts"] + }, + "tasks": { + "check": "deno check src", + "exam": "deno run -A src/run-endpoint.ts" + } +} diff --git a/host-deltic/deno.lock b/host-polyengine/deno.lock similarity index 82% rename from host-deltic/deno.lock rename to host-polyengine/deno.lock index 2b2ec45..c14c9e7 100644 --- a/host-deltic/deno.lock +++ b/host-polyengine/deno.lock @@ -1,57 +1,57 @@ { "version": "5", "specifiers": { - "jsr:@deltic/protocol@0.2": "0.2.0", - "jsr:@deltic/runtime@0.2": "0.2.0", - "jsr:@deltic/translator@0.2": "0.2.0", - "jsr:@deltic/wasi@0.2": "0.2.0", - "jsr:@polymorph/webcrypto@0.2": "0.2.0", - "jsr:@polymorph/webrtc-datachannels@0.2": "0.2.0", - "jsr:@polymorph/websocket@0.2": "0.2.0", + "jsr:@polyengine/protocol@0.1": "0.1.0", + "jsr:@polyengine/runtime@0.3": "0.3.0", + "jsr:@polyengine/translator@0.3": "0.3.0", + "jsr:@polyengine/wasi@0.3": "0.3.0", + "jsr:@polymorph/webcrypto@0.3": "0.3.0", + "jsr:@polymorph/webrtc-datachannels@0.3": "0.3.0", + "jsr:@polymorph/websocket@0.3": "0.3.0", "npm:node-datachannel@0.32.3": "0.32.3", "npm:werift@0.22.2": "0.22.2" }, "jsr": { - "@deltic/protocol@0.2.0": { - "integrity": "028be6a3623c5e910598aa7a199209b85e8931ae484ac7f6638d610ddb0e19fa" + "@polyengine/protocol@0.1.0": { + "integrity": "0c97f34166f22ba55e7b084148df96e47aebe47cd9dd13930057759c9161bb1c" }, - "@deltic/runtime@0.2.0": { - "integrity": "cf8b0bdd9e6bc4488ba78cc91661103bfcbd78f5a5c4ff99132799618a9db4bb", + "@polyengine/runtime@0.3.0": { + "integrity": "97d7648c104dd0f08b4d10e1ed0117ab0cb5243db68c139f1f3df25755ed4e60", "dependencies": [ - "jsr:@deltic/protocol" + "jsr:@polyengine/protocol" ] }, - "@deltic/translator@0.2.0": { - "integrity": "8104b54e2acdccfd75f5ddc941d72b581e7defbbe31c05bbc66598d2df7a34f9", + "@polyengine/translator@0.3.0": { + "integrity": "1d9fcd09d360850bc08927ed1cf8124d50a0fed09ed8c80f354a6d3aedfcad25", "dependencies": [ - "jsr:@deltic/runtime" + "jsr:@polyengine/runtime" ] }, - "@deltic/wasi@0.2.0": { - "integrity": "82c76d4fda0a1c9238a91f8ebc7fdbac952a03aa06d4a2a820213df2654f5c24", + "@polyengine/wasi@0.3.0": { + "integrity": "991adfdd39f795f94bba91a523322b88d45ff42800669b5b472356676e3c97e7", "dependencies": [ - "jsr:@deltic/protocol", - "jsr:@deltic/runtime" + "jsr:@polyengine/protocol", + "jsr:@polyengine/runtime" ] }, - "@polymorph/webcrypto@0.2.0": { - "integrity": "96040c9d662f6698ba9aba944cba461a43d4b71898abd24e3923044d1095f53a", + "@polymorph/webcrypto@0.3.0": { + "integrity": "0708409c1f36c091da7c60ee62db6416f8968c92acc92f8a192e9e9ee55f2569", "dependencies": [ - "jsr:@deltic/runtime" + "jsr:@polyengine/runtime" ] }, - "@polymorph/webrtc-datachannels@0.2.0": { - "integrity": "85595bb9ad880dff8ae16f595de6e68ce1097ed2c0941ab95ee4a87afb89f8b3", + "@polymorph/webrtc-datachannels@0.3.0": { + "integrity": "576bcbe4b1053e7d27ac9f8b2d2f61e979987a749b226cc09db328f837b32675", "dependencies": [ - "jsr:@deltic/runtime", + "jsr:@polyengine/runtime", "npm:node-datachannel", "npm:werift" ] }, - "@polymorph/websocket@0.2.0": { - "integrity": "c8c0e03aa307c529911d0d4c03a2739f251c8278bddf1e7e0e57fda01bf258cb", + "@polymorph/websocket@0.3.0": { + "integrity": "23c92ed2ccda31ca66cad1ac9cbcf87473ccac7ae9a2b82fcb3486d5af97bbcd", "dependencies": [ - "jsr:@deltic/runtime" + "jsr:@polyengine/runtime" ] } }, @@ -81,8 +81,8 @@ "@noble/hashes@1.8.0": { "integrity": "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A==" }, - "@peculiar/asn1-cms@2.8.0": { - "integrity": "sha512-NgekZOrSJFSBFLFoLfwePguAWAx7z1+f2TEsWFUMyiqqfntZ4+S/S5hzqME3q4pCA0iOsFKdwiQ35dwY24eVqA==", + "@peculiar/asn1-cms@2.9.4": { + "integrity": "sha512-cben7oxmQsUGZqotus7yt0srYdncOT6RNWcTQ77T2RFOXejYVYkXadrfePdRcrVpO9K95IRLKKglG2k38jKXuw==", "dependencies": [ "@peculiar/asn1-schema", "@peculiar/asn1-x509", @@ -91,8 +91,8 @@ "tslib@2.8.1" ] }, - "@peculiar/asn1-csr@2.8.0": { - "integrity": "sha512-akbF8+uvleHs8sejNPQxwmVFuInAg6FMNHOwMILXfP518YfFJwdR3jr6oNUPOaEJfuEhn/vkNOCIT6ASUd4mbg==", + "@peculiar/asn1-csr@2.9.4": { + "integrity": "sha512-xd4YN4vpRjkDAQWVfZZkeu12IEND7DOpkqaHSIHxZl1uggUNa9Ju0QxY2jHvDAS9pP0zhRBytg8ifsnGo3V0jw==", "dependencies": [ "@peculiar/asn1-schema", "@peculiar/asn1-x509", @@ -100,8 +100,8 @@ "tslib@2.8.1" ] }, - "@peculiar/asn1-ecc@2.8.0": { - "integrity": "sha512-ohwlk+u9Rv2NOAY1c6MfHj45ATVF8R1DUN/WCgABiRtLi2ZftlZWZX7KvpAbU8v9xPcmoILfELeEABj/rn18AQ==", + "@peculiar/asn1-ecc@2.9.4": { + "integrity": "sha512-JJXefFshRAuVAjWQo/39bkg1ywc1VaiO44S8RRC+Ykvf/u2KDmYffoDb0ZBPCR5uJy4AGKQhl8mX+Q8ShcWaXQ==", "dependencies": [ "@peculiar/asn1-schema", "@peculiar/asn1-x509", @@ -109,8 +109,8 @@ "tslib@2.8.1" ] }, - "@peculiar/asn1-pfx@2.8.0": { - "integrity": "sha512-5yof1ytoB++RQtaFbqSUJ8pxDJtZT6vbVqZ8XoJ61ph7UjNVvfFwAilnCodqkNsAodpy13gDhoxZXw00pghnyg==", + "@peculiar/asn1-pfx@2.9.4": { + "integrity": "sha512-khuGzHTzNzk4GDlIBEILyIs6Lce0yn0ZBdoI9v93kmNncfZRhD+AQ5ODFqdhvoE8cMJF/JMTQ8yA+t1D14kqCw==", "dependencies": [ "@peculiar/asn1-cms", "@peculiar/asn1-pkcs8", @@ -120,8 +120,8 @@ "tslib@2.8.1" ] }, - "@peculiar/asn1-pkcs8@2.8.0": { - "integrity": "sha512-qAKXtLpBEw9LqhKpjw3ajZSXlBur+ipW+y2ivVBQAG6F6qRx94yO+1ZR4mvw+YaCfKSaOzLeYEzsPaBp4SJELA==", + "@peculiar/asn1-pkcs8@2.9.4": { + "integrity": "sha512-duRdotlUx9eDZe6QrQpQKl61RbWykCHBCkKayP8V8XdEFwlKHZ8qGGDMyS6Pye7OX7nLFttTTpRkJeet78ckwQ==", "dependencies": [ "@peculiar/asn1-schema", "@peculiar/asn1-x509", @@ -129,8 +129,8 @@ "tslib@2.8.1" ] }, - "@peculiar/asn1-pkcs9@2.8.0": { - "integrity": "sha512-b5nDWCnkV60+cQ141D6sVVwK9nz64R5n3zSVnklGd+ECdkW2Ol3U1a6yYFlalpSOaD557yuJB64A+q42jG7lUQ==", + "@peculiar/asn1-pkcs9@2.9.4": { + "integrity": "sha512-kaL4cNxBpdQE2dKlyZBqz4ygCrwffO+8wfoxTEqM1Z8RadvCeELBRzcv0dzM8aY9azHMwODO5nxU65zXmhToOQ==", "dependencies": [ "@peculiar/asn1-cms", "@peculiar/asn1-pfx", @@ -142,8 +142,8 @@ "tslib@2.8.1" ] }, - "@peculiar/asn1-rsa@2.8.0": { - "integrity": "sha512-zHEUlCqB2mk7x2lxDwHHJy7hWZOPdGHVlsmITWKB5/PbQo61atbu9PJ/0r9dQNMwFzbKPXZ8uK8/91eUhRznSg==", + "@peculiar/asn1-rsa@2.9.4": { + "integrity": "sha512-pZ96eD1PptovcWQ/GSmuNFXd/7EQJNlKfDaNCyE2rx3W0v6QFelkzquVqRSRyyDXXCYD69ZXJDzZ8GhIiQzKoA==", "dependencies": [ "@peculiar/asn1-schema", "@peculiar/asn1-x509", @@ -151,16 +151,16 @@ "tslib@2.8.1" ] }, - "@peculiar/asn1-schema@2.8.0": { - "integrity": "sha512-7YT0U/ze0tF2QOBbE15gKZwy5tvgGyLRiRHLzhlbOpf7BT032oBSd0haZqXn5W6l26WLlu3dyxzjM+2638/z2Q==", + "@peculiar/asn1-schema@2.9.4": { + "integrity": "sha512-GjzePcT9Iw8NzeOPf73iNS9xM+TBhd/FilAfP+RQGkTMQJTVWtytN3JHJACCjf/ABNau5S7mS3g+DcuxmRgYEg==", "dependencies": [ "@peculiar/utils", "asn1js", "tslib@2.8.1" ] }, - "@peculiar/asn1-x509-attr@2.8.0": { - "integrity": "sha512-tHjkfS/qhMnmrlB2J9NhflQlQ7In3khO3CfmVrriOlpTeErY9ZIKOso1hQ5JQiyrJ7ShvqVPk7E5fQmbclkSKA==", + "@peculiar/asn1-x509-attr@2.9.4": { + "integrity": "sha512-ehQXbpQaQYycgu8OrvigwSPTFfVRcu0ECNYCWw+yzBp02Lw5paRqzzhUpfOgO2K38+WfFZuEz/0RPtam5g0OMg==", "dependencies": [ "@peculiar/asn1-schema", "@peculiar/asn1-x509", @@ -168,8 +168,8 @@ "tslib@2.8.1" ] }, - "@peculiar/asn1-x509@2.8.0": { - "integrity": "sha512-N0CMuhWUzsWEVq6F1q9X6+VKUnWzSW+cSVg+aPaGGwDdbFoFWTYgin5MHwXgpWd6y9COMBxnfy/Qc+Xc7F0Zwg==", + "@peculiar/asn1-x509@2.9.4": { + "integrity": "sha512-CxhBo/RdEbMMob7T31ZdQjGuoyRFLVwrDzTn25bihzBasRg9kRm/0IxIPvhgQtcK/9dNcO1XQL2fuPugwELL0Q==", "dependencies": [ "@peculiar/asn1-schema", "@peculiar/utils", @@ -341,8 +341,8 @@ "lodash@4.18.1": { "integrity": "sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q==" }, - "mediabunny@1.53.0": { - "integrity": "sha512-RjWe9yJr9MPvb6kX4gSu54fZD2w1yf6RyCS0Jmgaml+fFSqEr7+XuASXoRxSqJxgc+wIe+7TujXWcyj3evJ3Bg==", + "mediabunny@1.55.1": { + "integrity": "sha512-JDdTEUOw9g6Ey8eWc2Ei63GmRGtGTJoE56SE7CHikwzS8i9xpsWcve4bEiUw47d4j49L3r7MXDFsH/5oZIhjBw==", "dependencies": [ "@types/dom-mediacapture-transform", "@types/dom-webcodecs" @@ -399,9 +399,6 @@ "wrappy" ] }, - "p-cancelable@2.1.1": { - "integrity": "sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg==" - }, "prebuild-install@7.1.3": { "integrity": "sha512-8Mf2cbV7x1cXPUILADGI3wuhfqWvtiLA1iclTDbFRZkgRQS0NqsPZphna9V+HyTEadheuPmjaJMsbzKQFOzLug==", "dependencies": [ @@ -458,9 +455,6 @@ "reflect-metadata@0.2.2": { "integrity": "sha512-urBwgfrvVP/eAyXx4hluJivBKzuEbSQs9rKWCrCkbSxNv8mxPcUZKeuoF3Uy4mJl3Lwprp6yy5/39VWigZ4K6Q==" }, - "rx.mini@1.4.0": { - "integrity": "sha512-8w5cSc1mwNja7fl465DXOkVvIOkpvh2GW4jo31nAIvX4WTXCsRnKJGUfiDBzWtYRInEcHAUYIZfzusjIrea8gA==" - }, "safe-buffer@5.2.1": { "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" }, @@ -559,18 +553,11 @@ "tweetnacl" ] }, - "werift-ice@0.2.2": { - "integrity": "sha512-td52pHp+JmFnUn5jfDr/SSNO0dMCbknhuPdN1tFp9cfRj5jaktN63qnAdUuZC20QCC3ETWdsOthcm+RalHpFCQ==", + "werift-ice@0.2.3": { + "integrity": "sha512-k000fIaw8w2D4Xv5EvW6b5h4faJx8p4D8HPuDzRiGTx6UrLv2BuvUkC60LNqxlDf9o3zh90Hx1WZoHbhuw9keA==", "dependencies": [ - "@shinyoshiaki/jspack", - "buffer-crc32", "debug", - "int64-buffer", - "ip", - "lodash", - "multicast-dns", - "p-cancelable", - "rx.mini" + "multicast-dns" ] }, "werift-rtp@0.8.9": { @@ -623,12 +610,12 @@ }, "workspace": { "dependencies": [ - "jsr:@deltic/runtime@0.2", - "jsr:@deltic/translator@0.2", - "jsr:@deltic/wasi@0.2", - "jsr:@polymorph/webcrypto@0.2", - "jsr:@polymorph/webrtc-datachannels@0.2", - "jsr:@polymorph/websocket@0.2" + "jsr:@polyengine/runtime@0.3", + "jsr:@polyengine/translator@0.3", + "jsr:@polyengine/wasi@0.3", + "jsr:@polymorph/webcrypto@0.3", + "jsr:@polymorph/webrtc-datachannels@0.3", + "jsr:@polymorph/websocket@0.3" ] } } diff --git a/host-deltic/src/harness.ts b/host-polyengine/src/harness.ts similarity index 92% rename from host-deltic/src/harness.ts rename to host-polyengine/src/harness.ts index bc00c90..c6b467e 100644 --- a/host-deltic/src/harness.ts +++ b/host-polyengine/src/harness.ts @@ -4,19 +4,19 @@ // Everything here is host wiring; the exam scenarios in `run-endpoint.ts` // (repo-internal) carry the verdicts. `bindEndpoint(...)` mirrors the jco // host's retired `iroh.Endpoint.bind(...)` driving shape over -// `instantiate` + the deltic embedder facade. +// `instantiate` + the polyengine embedder facade. // -// MODULE-IDENTITY CONSTRAINT: deltic's wasi package and the sibling host -// modules import `@deltic/runtime/embedder` by bare specifier internally; +// MODULE-IDENTITY CONSTRAINT: polyengine's wasi package and the sibling host +// modules import `@polyengine/runtime/embedder` by bare specifier internally; // this package's `deno.json` and the sibling packages' manifests all -// carry caret constraints on one `@deltic/runtime` minor line, so a +// carry caret constraints on one `@polyengine/runtime` minor line, so a // consumer's resolver dedupes them onto one module instance and // `instanceof ComponentException`/`Stream` holds across every boundary. -import { defaultTranslator } from "@deltic/translator"; -import type { ComponentArtifacts } from "@deltic/runtime/embedder"; -import { instantiate, ComponentException } from "@deltic/runtime/embedder"; -import { wasi } from "@deltic/wasi"; +import { defaultTranslator } from "@polyengine/translator"; +import type { ComponentArtifacts } from "@polyengine/runtime/embedder"; +import { instantiate, ComponentException } from "@polyengine/runtime/embedder"; +import { wasi } from "@polyengine/wasi"; import { webcryptoImports } from "@polymorph/webcrypto"; import { websocketImports } from "@polymorph/websocket"; import { webrtcImports } from "@polymorph/webrtc-datachannels"; @@ -63,7 +63,7 @@ async function translate(bytes: Uint8Array): Promise { * permission — but the multi-MiB module evaluates only when the packaged * default is actually used. * - * The translator is `@deltic/translator`'s packaged asset — the same + * The translator is `@polyengine/translator`'s packaged asset — the same * pinned release as the runtime, loaded through the module graph * (permission-free on Deno), so there is no fetch step and no * plan-format skew to guard against. @@ -111,7 +111,7 @@ export interface EndpointInstance { } /** - * Stand up one component instance of the endpoint, with the sibling deltic + * Stand up one component instance of the endpoint, with the sibling polyengine * host modules supplying every non-WASI import. * * Import fragments are built FRESH per instance: the host modules' resource diff --git a/host-deltic/src/mod.ts b/host-polyengine/src/mod.ts similarity index 90% rename from host-deltic/src/mod.ts rename to host-polyengine/src/mod.ts index 8c35adb..484a8ca 100644 --- a/host-deltic/src/mod.ts +++ b/host-polyengine/src/mod.ts @@ -1,9 +1,9 @@ /** * @polymorph/iroh — the iroh endpoint as a WebAssembly component, - * runtime-linked under deltic. + * runtime-linked under polyengine. * * `newEndpointInstance()` stands up one endpoint instance over the sibling - * `@polymorph` deltic host modules — webcrypto (identity keys), websocket + * `@polymorph` polyengine host modules — webcrypto (identity keys), websocket * (relay transport), webrtc-datachannels (direct browser paths) — plus a * browser-profile `wasi:sockets` provider whose UDP surface answers * `not-supported` (the endpoint binds no socket when `udp-bind-addr` is diff --git a/host-deltic/src/repo.ts b/host-polyengine/src/repo.ts similarity index 98% rename from host-deltic/src/repo.ts rename to host-polyengine/src/repo.ts index 9c739e0..850004f 100644 --- a/host-deltic/src/repo.ts +++ b/host-polyengine/src/repo.ts @@ -4,7 +4,7 @@ // this — consumers use the packaged endpoint component (or pass their own // bytes) and bring their own relay. -// This file sits at host-deltic/src/repo.ts, so the repo root is two +// This file sits at host-polyengine/src/repo.ts, so the repo root is two // levels up. const ROOT = new URL("../../", import.meta.url); diff --git a/host-deltic/src/run-endpoint.ts b/host-polyengine/src/run-endpoint.ts similarity index 98% rename from host-deltic/src/run-endpoint.ts rename to host-polyengine/src/run-endpoint.ts index d69c373..6331f98 100644 --- a/host-deltic/src/run-endpoint.ts +++ b/host-polyengine/src/run-endpoint.ts @@ -1,5 +1,5 @@ -// The iroh endpoint exam on the deltic host: the endpoint COMPONENT -// runtime-linked under stock Deno, with the sibling repositories' deltic +// The iroh endpoint exam on the polyengine host: the endpoint COMPONENT +// runtime-linked under stock Deno, with the sibling repositories' polyengine // host modules supplying every non-WASI import — no transpile step, no // generated tree, no engine flag. // @@ -9,7 +9,7 @@ // delivered); the jco host has since retired, and this file's driving // logic is what its held-ready driver would have used. // -// just exam-deltic +// just exam-polyengine // // `--unstable-net` is not needed by anything here today (see src/sockets.ts: // the browser profile binds no UDP socket and the exam asserts zero @@ -33,9 +33,9 @@ // other tasks (`connect`, `accept`, `open-bi`, …) all park in `wait_until`, // whose first act is `shared.borrow_mut()` — which panics `RefCell already // borrowed`, aborting the guest with an `unreachable` trap. The hazard is -// latent on every host; deltic reaches it more often because a resolved +// latent on every host; polyengine reaches it more often because a resolved // task that blocks mid-frame releases the instance's exclusivity there (a -// documented wasmtime-tracking divergence, deltic +// documented wasmtime-tracking divergence, polyengine // runtime/src/jspi/bridge.ts), so a parked poller can interleave with the // signing window. // @@ -74,7 +74,7 @@ async function newEndpointInstance( ...options, }); } -import { ComponentException } from "@deltic/runtime/embedder"; +import { ComponentException } from "@polyengine/runtime/embedder"; import { resetUdpCallLog, udpCallLog } from "./sockets.ts"; import type { CloseInfo, @@ -472,7 +472,7 @@ async function echoRoundtrip(conn: Connection, sconn: Connection, what: string): async function main(): Promise { installPanicWatchdog(); - console.log("iroh endpoint exam (deltic / stock Deno)"); + console.log("iroh endpoint exam (polyengine / stock Deno)"); const relay = await startRelay(); try { diff --git a/host-deltic/src/scenario.ts b/host-polyengine/src/scenario.ts similarity index 100% rename from host-deltic/src/scenario.ts rename to host-polyengine/src/scenario.ts diff --git a/host-deltic/src/sockets.ts b/host-polyengine/src/sockets.ts similarity index 95% rename from host-deltic/src/sockets.ts rename to host-polyengine/src/sockets.ts index 1327668..d834a66 100644 --- a/host-deltic/src/sockets.ts +++ b/host-polyengine/src/sockets.ts @@ -23,10 +23,10 @@ // socket. Scenario 1 asserts exactly that. // // A direct-path leg (real UDP over `Deno.listenDatagram`) is the natural -// extension once deltic's wasi package grows p3 `wasi:sockets` providers -// (lann/deltic#4); this file is where that provider would be wired. +// extension once polyengine's wasi package grows p3 `wasi:sockets` providers +// (polymorph-components/polyengine#4); this file is where that provider would be wired. -import { ComponentException } from "@deltic/runtime/embedder"; +import { ComponentException } from "@polyengine/runtime/embedder"; /** `wasi:sockets/types@0.3.0`'s `ip-address-family` enum. */ export type IpAddressFamily = "ipv4" | "ipv6"; diff --git a/host-deltic/src/types.ts b/host-polyengine/src/types.ts similarity index 97% rename from host-deltic/src/types.ts rename to host-polyengine/src/types.ts index 8209408..857a93f 100644 --- a/host-deltic/src/types.ts +++ b/host-polyengine/src/types.ts @@ -1,6 +1,6 @@ // A hand-written TS facade for `polymorph:iroh/endpoint@0.1.0`, transcribed -// from this repository's WIT (wit/iroh.wit) under the deltic embedder -// conventions (contracts/embedder-api.md in the deltic repository): +// from this repository's WIT (wit/iroh.wit) under the polyengine embedder +// conventions (contracts/embedder-api.md in the polyengine repository): // // * resource -> PascalCase class, methods camelCase, statics static // * every export is Promise-shaped; `result` in RETURN position diff --git a/justfile b/justfile index c2306b5..1858fe9 100644 --- a/justfile +++ b/justfile @@ -18,9 +18,9 @@ build-components: cargo build -p iroh-endpoint -p iroh-endpoint-demo -p iroh-exec-model-guest --target wasm32-wasip2 --release mkdir -p target/components wac plug target/wasm32-wasip2/release/iroh_endpoint_demo.wasm --plug target/wasm32-wasip2/release/iroh_endpoint.wasm -o target/components/iroh-demo.wasm - # @polymorph/iroh's generated asset module (gitignored): host-deltic's + # @polymorph/iroh's generated asset module (gitignored): host-polyengine's # `deno check src` and the jsr publish need it on disk. - deno run --allow-read=target --allow-write=host-deltic/src/endpoint_component.ts scripts/embed-endpoint-component.ts + deno run --allow-read=target --allow-write=host-polyengine/src/endpoint_component.ts scripts/embed-endpoint-component.ts # Build the Wasmtime host binary the gates drive, and the native # interop peer. The exec-model probe driver is deliberately NOT here: @@ -76,42 +76,42 @@ probes: build-components matrix: build ./scripts/matrix.sh -# The deltic host's module graph + the node-datachannel addon (whose +# The polyengine host's module graph + the node-datachannel addon (whose # install script needs an explicit grant). Idempotent. -deltic-setup: - cd host-deltic && deno install --frozen --allow-scripts=npm:node-datachannel +polyengine-setup: + cd host-polyengine && deno install --frozen --allow-scripts=npm:node-datachannel -# The endpoint exam on the deltic host: the endpoint component +# The endpoint exam on the polyengine host: the endpoint component # runtime-linked under stock Deno — bind + identity, relay echo, WebRTC # upgrade, the issue #10 concurrency rows, teardown. See -# host-deltic/README.md. -exam-deltic: build-components deltic-setup +# host-polyengine/README.md. +exam-polyengine: build-components polyengine-setup #!/usr/bin/env bash set -euo pipefail - # One RESOLVED deltic version repo-wide (host-deltic/README.md "The + # One RESOLVED polyengine version repo-wide (host-polyengine/README.md "The # pin"): the exam is the natural fail-loud point, replacing the - # retired fetch-translator gate. host-deltic's published manifest + # retired fetch-translator gate. host-polyengine's published manifest # carries caret ranges, so specifier strings no longer pin identity; - # what module identity needs is that every @deltic/* package (except - # @deltic/protocol, versioned independently) RESOLVES to the same + # what module identity needs is that every @polyengine/* package (except + # @polyengine/protocol, versioned independently) RESOLVES to the same # version across both deno.locks — a translator/runtime split is # exactly the plan-format skew (or double-runtime WitError identity # break) the packaged translator exists to rule out. - v=$(jq -r '.jsr | keys[]' host-deltic/deno.lock \ + v=$(jq -r '.jsr | keys[]' host-polyengine/deno.lock \ experiments/iroh-relay-ws/host/deno.lock \ - | grep '^@deltic/' | grep -v '^@deltic/protocol@' \ + | grep '^@polyengine/' | grep -v '^@polyengine/protocol@' \ | sed 's/.*@//' | sort -u) if [ "$(printf '%s\n' "$v" | wc -l)" != 1 ]; then - echo "deltic pin drift across deno.locks: $v" >&2 + echo "polyengine pin drift across deno.locks: $v" >&2 exit 1 fi # ...and the RESOLVED graph must agree: one embedder instance, no raw # URLs (a sibling module's own config can silently split module # identity in a way no config grep catches; see the gate script). - deno info --json --config host-deltic/deno.json host-deltic/src/run-endpoint.ts \ - | deno run scripts/deltic-identity-gate.ts - timeout 600 deno run -A --config host-deltic/deno.json --frozen \ - host-deltic/src/run-endpoint.ts + deno info --json --config host-polyengine/deno.json host-polyengine/src/run-endpoint.ts \ + | deno run scripts/polyengine-identity-gate.ts + timeout 600 deno run -A --config host-polyengine/deno.json --frozen \ + host-polyengine/src/run-endpoint.ts # The measured-claims gate: per-wire latency/throughput medians, # asserted against budgets (issue #4). @@ -126,11 +126,11 @@ interop-prod: build # The upstream-iroh-over-relay spike (issue #14): the unmodified iroh # crate (upstream main + the wasi-enablement patch branches, from the # lann/iroh and lann/net-tools polymorph-iroh branches) as a wasip2 -# component, runtime-linked under deltic on stock Deno — relay-only -# bootstrap over the polymorph-websocket sibling's deltic module, then +# component, runtime-linked under polyengine on stock Deno — relay-only +# bootstrap over the polymorph-websocket sibling's polyengine module, then # live migration onto a WebRTC data channel through the synthetic-address # overlay (issue #26). Research probe attached to the issue, so manual: -# not part of `ci`. The host's sibling deltic module imports await the +# not part of `ci`. The host's sibling polyengine module imports await the # JSR migration (issue #83). iroh-relay-ws: cd experiments/iroh-relay-ws/guest && cargo build --release diff --git a/scripts/embed-endpoint-component.ts b/scripts/embed-endpoint-component.ts index 6ed698f..c27b97f 100644 --- a/scripts/embed-endpoint-component.ts +++ b/scripts/embed-endpoint-component.ts @@ -1,7 +1,7 @@ // Embed the built endpoint component as @polymorph/iroh's asset module: // // target/wasm32-wasip2/release/iroh_endpoint.wasm -// -> host-deltic/src/endpoint_component.ts (gitignored, GENERATED) +// -> host-polyengine/src/endpoint_component.ts (gitignored, GENERATED) // // Run by `just build-components` and by the jsr-publish workflow. Base64 // in a TypeScript module keeps the bytes inside the statically-analyzable @@ -10,11 +10,11 @@ // raw-imports flag. // // deno run --allow-read=target \ -// --allow-write=host-deltic/src/endpoint_component.ts \ +// --allow-write=host-polyengine/src/endpoint_component.ts \ // scripts/embed-endpoint-component.ts const WASM = "target/wasm32-wasip2/release/iroh_endpoint.wasm"; -const OUT = "host-deltic/src/endpoint_component.ts"; +const OUT = "host-polyengine/src/endpoint_component.ts"; const wasm = await Deno.readFile(WASM); let bin = ""; diff --git a/scripts/matrix.sh b/scripts/matrix.sh index 6e09de4..b2e061b 100755 --- a/scripts/matrix.sh +++ b/scripts/matrix.sh @@ -105,8 +105,8 @@ run_pair() { # per-component execution slot serialized whole task lifetimes, so the # detached pump task (alive with in-flight imports across export calls) # deadlocked every later export call (lann/jco#11, fix attempts in -# lann/jco PR #27). host-deltic runs this surface under stock Deno -# instead (see host-deltic/README.md); `just exam-deltic` is its gate. +# lann/jco PR #27). host-polyengine runs this surface under stock Deno +# instead (see host-polyengine/README.md); `just exam-polyengine` is its gate. run_pair "endpoint-relay-wasmtime-wasmtime" \ timeout 120 "$EHOST" "$COMPOSED_WASM" --role server --relay "$RELAY_URL" \ diff --git a/scripts/deltic-identity-gate.ts b/scripts/polyengine-identity-gate.ts similarity index 53% rename from scripts/deltic-identity-gate.ts rename to scripts/polyengine-identity-gate.ts index 0ac7d9b..77c2fa3 100644 --- a/scripts/deltic-identity-gate.ts +++ b/scripts/polyengine-identity-gate.ts @@ -1,17 +1,17 @@ -// The deltic module-identity assert (host-deltic/README.md "Module +// The polyengine module-identity assert (host-polyengine/README.md "Module // identity"): the run-endpoint graph must contain exactly ONE -// @deltic/runtime version and ZERO raw.githubusercontent modules. +// @polyengine/runtime version and ZERO raw.githubusercontent modules. // // The failure this guards (seen live before the sibling pins converged on -// one deltic release): a sibling host module's own -// package-shaped deno.json mapped @deltic/runtime/embedder to a raw +// one polyengine release): a sibling host module's own +// package-shaped deno.json mapped @polyengine/runtime/embedder to a raw // pinned-tag URL, so the graph carried TWO embedder module instances and // `instanceof ComponentException` silently stopped holding across that sibling's // boundary. Config greps can't see this — only the resolved graph can — // so the exam pipes `deno info --json` through this assert. // -// deno info --json --config host-deltic/deno.json \ -// host-deltic/src/run-endpoint.ts | deno run scripts/deltic-identity-gate.ts +// deno info --json --config host-polyengine/deno.json \ +// host-polyengine/src/run-endpoint.ts | deno run scripts/polyengine-identity-gate.ts const g = JSON.parse(await new Response(Deno.stdin.readable).text()); const raw = g.modules.filter((m: { specifier: string }) => m.specifier.includes("raw.githubusercontent") @@ -19,16 +19,16 @@ const raw = g.modules.filter((m: { specifier: string }) => const vers = new Set( g.modules .map((m: { specifier: string }) => - m.specifier.match(/jsr\.io\/@deltic\/runtime\/([^/]+)\//)?.[1] + m.specifier.match(/jsr\.io\/@polyengine\/runtime\/([^/]+)\//)?.[1] ) .filter(Boolean), ); if (raw.length || vers.size !== 1) { console.error( - `deltic module identity violated: ${raw.length} raw-URL module(s), ` + - `@deltic/runtime versions=[${[...vers].join(", ")}] (want exactly one, no raw URLs)`, + `polyengine module identity violated: ${raw.length} raw-URL module(s), ` + + `@polyengine/runtime versions=[${[...vers].join(", ")}] (want exactly one, no raw URLs)`, ); for (const m of raw.slice(0, 5)) console.error(` raw: ${m.specifier}`); Deno.exit(1); } -console.log(`deltic module identity: one runtime (${[...vers][0]}), no raw URLs`); +console.log(`polyengine module identity: one runtime (${[...vers][0]}), no raw URLs`);