Skip to content

Releases: AndersCan/ekrooh

v0.4.0

Choose a tag to compare

@AndersCan AndersCan released this 16 Aug 17:54

v0.4.0 — on-device p2p peer-drive verification

This release hardens and extends the on-device p2p verification and closes the framework side of issue #41 ("Android bare-kit worklet cannot replicate a peer's drive").

Added

  • Peer-drive replication in the on-device p2p verify worklet (core/p2p-verify.core.ts, issue #41): the worklet now replicates a drive across two real peers over the local DHT — a creator announces its drive and serves it; a reader joins the topic client-only, opens the drive by key, ready()s it (the call the Android photo app timed out on), and reads a photo. This is the platform-level reproduction gate for "Android cannot replicate a peer's drive".
  • Android emulator p2p verify (examples/android-app): the reference app packs the worklet as p2p-verify.bundle and ships a P2PVerifyTest instrumentation test + a new android-emulator CI job. The Android gate runs in mode=self (self-reads — the "reverse direction" that always worked on Android); the full peer-drive replication gate runs on the macOS smoke (npm run smoke:p2p) and the iOS simulator.

Fixed (framework side of #41)

  • Verified the framework's Android bare-kit stack handles peer-drive reads (full peer-drive 308ms on an Android emulator), pointing the #41 timeout at the consumer's wiring rather than the runtime.

Notes

  • The Android emulator CI job uses a self-read smoke because real DHT peer discovery is not a stable gate under the software-rendered x86_64 CI emulator; the full peer-drive gate runs on macOS smoke + iOS simulator.

v0.2.0

Choose a tag to compare

@AndersCan AndersCan released this 13 Aug 21:17

Added

  • Backend → web push (@ekrooh/bare/runtime): createLoopbackPush(server, protocol) + LoopbackServer.push(frame) — server-initiated dispatch to the connected web layer (live galleries, sync status).
  • Custom HTTP routes (@ekrooh/bare/runtime): LoopbackServer.registerRoute(method, path, handler) runs before mount resolution, behind the auth gate; collectRequestBody is re-exported for POST handlers.
  • Consumer plugins: createWorkletRuntime({ plugins: [...] }) registers consumer plugin manifests after the canonical defaults (no more post-hoc registry mutation).

Fixed

  • getIPC() in plain Node: no longer throws a ReferenceError when neither BareKit nor Bare is defined — returns undefined, so createWorkletRuntime runs host-less in tests/desktop contexts.
  • Dev mode with a storage dir (auth: false): handoff.json is no longer written (previously a stale handoff appeared whenever storage was set, even with auth off).

v0.1.0-beta.1

v0.1.0-beta.1 Pre-release
Pre-release

Choose a tag to compare

@AndersCan AndersCan released this 13 Aug 04:37

First tagged release of the @less/bare framework: the boring bootstrap for
cross-platform apps on the Bare runtime. (An earlier 0.0.1 changelog draft
was never tagged — this entry absorbs it.)

Added

  • Binary wire protocol (@less/bare/core): framed envelopes
    (version, type, headerLen, JSON header, raw payload) with a canonical
    MessageProtocol codec, frame-size validation, and forward-compatible
    headers.
  • Plugin kernel: namespaced plugin manifests, DISPATCH / INVOKE_REQUEST
    / INVOKE_RESPONSE routing, deterministic ErrorCodes, host delegation.
  • Typed plugin authoring: EventSpec + definePlugin — one spec per event
    drives the manifest, the handler table, and the typed events.ts builders.
  • Unified loopback server (core/server/static-file-server.ts) serves the
    web app at / (SPA fallback), mounted media, and the framed-protocol
    WebSocket socket; byte-range (206) streaming, WS origin check, single-client
    policy, idle timeout.
  • Cookie auth: POST /login exchanges the injected window.__lessBareToken
    for an HttpOnly; SameSite=Lax bare_session cookie; X-Bare-Token/?token=
    remain as fallbacks for non-browser clients.
  • Port/token handoff: the worklet writes handoff.json into the host
    sandbox dir; hosts read it and load http://127.0.0.1:<port>/index.html.
  • Transports (@less/bare/transports): WebSocket (same-origin default,
    cookie bootstrap, reconnect with backoff, token fallback on rejected
    upgrade) and a deterministic mock.
  • Android host (io.less:bare-host on GitHub Packages): BareProtocol,
    HostIpcCoordinator, HostPluginRegistry; the Bare Kit runtime is packaged
    inside the self-contained AAR.
  • iOS host: Swift package BareHost (SPM, ships as source) — IPC
    coordinator, plugin registry; the reference app injects the token via a
    WKUserScript and loads the loopback page.
  • Reference implementation: examples/web (lit-html + nanostores),
    examples/android-app, examples/ios-app.
  • Testing contract: vitest unit tests (with a coverage floor),
    JUnit (Kotlin host), XCTest (Swift host), Playwright e2e against the mock
    transport, and CI (test.yml, playwright.yml, release.yml).
  • WS connection state machine: the WebSocket transport models
    idle/opening/connected/backoff/gaveUp as a mantaq Actor (exponential
    backoff, retry cap, ?token= fallback) — internal-only, never leaks into
    the public surface.
  • Multi-instance web test harness: a dev harness (harness.core) hosting
    N worklet instances behind a management server, with Playwright journeys
    (one tab per instance) asserting per-instance isolation + lifecycle.
  • iOS reference parity: real vendor.media picker/camera
    (PHPickerViewController + UIImagePickerController; simulator answers a
    deterministic "camera unavailable") and a generic permissions plugin
    (permissions.request / permissions.status) with real
    AVCaptureDevice.requestAccess for camera.
  • iOS p2p addons: udx-native, rocksdb-native, sodium-native (+ hypercore's
    quickbit/rabin/simdle and fs-native-extensions) linked via bare-link and
    verified running on the iOS simulator (P2PVerifyTest boots a worklet that
    exercises Corestore, Hyperdrive, and Hyperswarm).

Changed

  • npm ships compiled JS: @less/bare publishes dist/ (compiled ESM +
    type declarations via vp pack) — consumers never receive TypeScript source.
  • Permissions plugin contract: permissions.requestStorage is replaced by
    permissions.request(permission) / permissions.status(permission),
    both returning { permission, status }
    (granted | denied | notDetermined | unsupported).

Fixed

  • WS auth fallback: a WebSocket upgrade rejected despite a successful
    /login now retries with ?token= appended instead of retrying the same
    URL five times and dead-ending.
  • /login body decoding: Uint8Array chunks (bare-http1) are decoded
    byte-exact instead of being String()-ified (which joined bytes with commas).
  • Single-client WS policy: the refused second socket is rejected before the
    handshake — no misleading 101-then-close.
  • serveFile stream errors: an evicted file (spool LRU) no longer crashes
    the whole worklet — pre-flush ENOENT yields a clean 404 and a mid-stream
    error resets the response instead of surfacing an unhandled stream error.

Removed

  • Android bootstrap bridge and iOS WKWebView bridge transports; the
    BarePortMessenger, BareWebViewBridge, and BareAssetSchemeHandler
    relays were deleted.