@ai-ecoverse/slicc-bios 2.5.2 → 2.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -311,7 +311,7 @@ An agent's session database can migrate one way: from slicc-agent 7.0, pi-durabl
311
311
 
312
312
  **Release notes (slicc-spectrum#458):** each update check also gives the Kernel, UI, Agent and Tailscale rows a `releases` list from their GitHub repositories (`slicc-kernel`, `slicc-spectrum`, `slicc-agent`, `wasm-tailscale`), and each optional package one from the repository its npm version document names, when that is on GitHub ([`os/releases.js`](src/seed/releases.js)). A row gets the release it has installed and every newer one up to the version it offers, newest first, at most 30. Each release has its `version` (the tag without the `v`, or without the package's name in a shared repository such as homescoop), its `url` and its `notes`, the release body unchanged (the `<!-- cert-verify -->` block included, which spectrum turns into a Certified badge) up to 64 KB. Spectrum renders the notes; bios only fetches them. bios asks GitHub's unauthenticated API (`/repos/<repo>/releases?per_page=100`, page by page down to the installed version, at most 5 pages), without credentials, a referrer or any header but `Accept` and `If-None-Match`. It keeps each list in IndexedDB (`slicc-releases`) for a day and revalidates it with its ETag at every check, and GitHub doesn't count a 304 against its 60 requests an hour. A 403 or 429 backs off until `Retry-After`, the rate limit's reset or 15 minutes, and leaves `releases` out, so the row looks as it does without notes, with no error. The page sets no `connect-src`, so these requests need no change to its CSP.
313
313
 
314
- Below the system rows, Install / Update offers **Optional packages** (spectrum ≥ 1.42.0): tools that seven doesn't preinstall. Seven pins only what UI boot and the agent install need (Lars, 2026-10-21), so every catalog package comes at npm's `latest`, behind [the gate](#optional-packages). A release passes when npm's provenance shows its publisher's release workflow built it on `main`. homescoop publishes its packages (`wasm-*`, `wasi-*`, `wasix-*`) through its ladder. The other publishers are slicc-jsh, mcpcat, slicc-cli (wasi-slicc) and slicc-cdp (sliccy-browser), and the catalog names each one's repository and workflow in its `source`. The catalog, [`src/packages/optional/catalog.json`](src/packages/optional/catalog.json), lists each package by its npm name, with only what npm can't tell: its `id` and `label`, and optionally `requires` (other ids), `notes` (bios's own caveats, one line each, shown next to npm's description), `helpers` (commands to leave out of the list until homescoop marks them `helper: true`), `range` and `abi` (Python's, below), `source` (a publisher other than homescoop: its `repo` and the list of release `workflow`s it accepts) and `kind: "project"`. A project keeps its `description`, `commands` and `size`, since npm doesn't know it.
314
+ Below the system rows, Install / Update offers **Optional packages** (spectrum ≥ 1.42.0): tools that seven doesn't preinstall. Seven pins only what UI boot and the agent install need (Lars, 2026-10-21), so every catalog package comes at npm's `latest`, behind [the gate](#optional-packages). A release passes when npm's provenance shows its publisher's release workflow built it on `main`. homescoop publishes its packages (`wasm-*`, `wasi-*`, `wasix-*`) through its ladder. The other publishers are slicc-jsh, mcpcat, slicc-cli (wasi-slicc), slicc-cdp (sliccy-browser) and slicc-serve, and the catalog names each one's repository and workflow in its `source`. The catalog, [`src/packages/optional/catalog.json`](src/packages/optional/catalog.json), lists each package by its npm name, with only what npm can't tell: its `id` and `label`, and optionally `requires` (other ids), `notes` (bios's own caveats, one line each, shown next to npm's description), `helpers` (commands to leave out of the list until homescoop marks them `helper: true`), `range` and `abi` (Python's, below), `source` (a publisher other than homescoop: its `repo` and the list of release `workflow`s it accepts) and `kind: "project"`. A project keeps its `description`, `commands` and `size`, since npm doesn't know it.
315
315
 
316
316
  - **What npm tells (`os/packages.js`):** at boot, and at an update check at most every ten minutes, bios fetches each entry's version doc from the registry from the page (`https://registry.npmjs.org/<name>/latest`, which sends CORS `*`; the kernel's network path isn't needed), all in parallel and each with a 15-second timeout. It takes `version` (the row's `offered`), `description` (npm's text, verbatim), the commands (the keys of `slicc.commands`, without one marked `helper: true` or listed in `helpers`, and only names a shell can run), `dist.unpackedSize` (the row's `size`, now what the package unpacks to on disk, its own files only, so git reads 56 MB where the old tarball-based size read 19 MB; the row says `unpacked: true`) and `dist.integrity`. An entry with a `range` (Python's is `3.15.0`) takes the highest version in range from the abbreviated packument instead, where the range is matched against the upstream X.Y.Z with homescoop's `-N` build ignored, so `3.15.0` offers 3.15.0-3 but never a 3.15.1 or 3.16 (pydata's builds are for one Python ABI: homescoop keeps the ABI within one X.Y.Z, and its py-* ranges stop at the next patch). With `abi`, a version whose `slicc.python.abi` differs isn't offered.
317
317
  - **Cache:** the last good answer for each entry is kept in `var/lib/slicc/optional/npm.json`, so the panel works offline and shows at once at boot; a later fetch replaces it, an entry that fails keeps its cached answer, and holds only what the rows show. A passing provenance verdict is remembered only in the tab's memory, for the listing (never a refusal, never in OPFS, which kernel processes can write, and never for an install, which always asks npm again).
@@ -319,9 +319,9 @@ Below the system rows, Install / Update offers **Optional packages** (spectrum
319
319
  - **The gate** (one function, `gate()` in `os/packages.js`, for the panel's Install and Update, a user's Update and [Your packages](#your-packages)) checks every package in the lock pnpm made. Each must be one of:
320
320
  - an exact `name@version` with that integrity in the base set's lockfile (`src/packages/package-lock.json`) or `src/packages/certs.json`; or
321
321
  - an `@ai-ecoverse/*` package whose locked integrity equals the registry's `dist.integrity` for that exact version, and that npm's stored SLSA v1 provenance (`dist.attestations`, which bios trusts as npm stores it) binds to that integrity (its subject's sha512) and to its publisher's repository and release workflow at `refs/heads/main`. The publisher is bios's own, never read from npm:
322
- - a catalog entry's `source`: slicc-jsh's, mcpcat's and slicc-cli's (for wasi-slicc) own `release.yml`, or their `ci.yml` since they moved onto slicc-shared-web's pipeline, and slicc-cdp's `publish-sliccy-browser.yml` or `ci.yml` for sliccy-browser;
322
+ - a catalog entry's `source`: slicc-jsh's, mcpcat's and slicc-cli's (for wasi-slicc) own `release.yml`, or their `ci.yml` since they moved onto slicc-shared-web's pipeline, slicc-cdp's `publish-sliccy-browser.yml` or `ci.yml` for sliccy-browser, and slicc-serve's `ci.yml`;
323
323
  - otherwise homescoop's `ladder-build.yml` or `publish.yml` for the `wasm-*`, `wasi-*`, `wasix-*` and `py-*` packages;
324
- - and [`sources.json`](src/packages/optional/sources.json) for a publisher no catalog entry names: slicc-cdp (under sliccy-browser) and slicc-clipboard by their own `release.yml` or `ci.yml`, tzdata by homescoop's `ladder-build.yml`, and gh-upskill by its `ci.yml`. No npm dist-tag is read: a `certified` tag neither admits nor refuses a release.
324
+ - and [`sources.json`](src/packages/optional/sources.json) for a publisher no catalog entry names: slicc-cdp (under sliccy-browser) and slicc-clipboard by their own `release.yml` or `ci.yml`, tzdata by homescoop's `ladder-build.yml`, gh-upskill by its `ci.yml`, and slicc-serve's six platform packages (`@ai-ecoverse/slicc-serve-<os>-<cpu>`, `scserve` on a host, which pnpm locks as optional dependencies of `serve`) by slicc-serve's `ci.yml`. No npm dist-tag is read: a `certified` tag neither admits nor refuses a release.
325
325
 
326
326
  A release from another repository, another workflow or another ref (a maintenance branch, a tag) is refused, and so is a package with no publisher there.
327
327
  - A release npm marks deprecated is refused, with npm's message ("… is deprecated on npm: …"). An owner who wants a version refused deprecates it. That covers a `certs.json` exact match too, unless the base set's lockfile ships that version: bios asks npm for it, and refuses it when npm deprecates it or doesn't have it. wasi-slicc 1.44.4 and everything before 1.44.1 are refused this way.
@@ -329,7 +329,7 @@ Below the system rows, Install / Update offers **Optional packages** (spectrum
329
329
  - Anything that isn't `@ai-ecoverse/*` and isn't in the base set is refused; homescoop packages have no third-party dependencies.
330
330
  - **Listing:** each entry's latest goes through the same rules (with its exact `dependencies`) when it's fetched. If latest fails, bios walks back through older versions (in range, not deprecated, at most five; a version whose doc is broken is skipped) and offers the newest that passes, with `newer: { version, reason }` naming latest's blocker. If none passes, the row is `withheld` with that reason, offers no Install or Update, and an installed copy keeps Remove.
331
331
 
332
- Today it offers git, the GitHub CLI, OpenSSH, `slicc` (see [Sevens this kernel follows](#network)), Python, the Python data tools (numpy, pandas and matplotlib), Node.js (slicc-jsh's `node` and `jsh`), `sliccy:browser` for `.jsh` scripts, Ruby, Perl, Biome, the PDF tools (poppler), qpdf, rsync, screen, SQLite, the BIND tools (`dig`, `host` and `nslookup`), websocat, ntfy, GnuPG, fnox, mcpcat (an MCP client), zip (Info-ZIP's `zip`, `unzip` and `zipinfo`), xxd (vim's hex dump, with `xxd -r`) and ImageMagick. zip's `unzip` refuses an entry whose name isn't UTF-8 (an old Latin-1 or CP437 archive without a Unicode path): it says `cannot create <name>` / `Illegal byte sequence`, extracts the other entries and exits 50, and `unzip -l` still lists the entry. It never extracts it under a changed name, and `unzip -p` still streams its bytes ([homescoop#1174](https://github.com/ai-ecoverse/homescoop/issues/1174)). ImageMagick is homescoop's HEIF build (`wasm-imagemagick-heif`, a superset of the plain build, which isn't offered), with `magick`, `convert`, `mogrify`, `identify` and `magick-open`, and it reads HEIC and AVIF. A failed write leaves an existing target as it was. Its known issues: writing over another user's 0666 file in a sticky directory such as `/tmp` fails with `Operation not permitted`, though writing your own files works ([homescoop#1258](https://github.com/ai-ecoverse/homescoop/issues/1258)); `.mpc` writes fail with `cache resources exhausted` ([homescoop#1208](https://github.com/ai-ecoverse/homescoop/issues/1208)); and the cert's coverage gaps, among them the no-encoder fallback and MPC's two-file write ([homescoop#1209](https://github.com/ai-ecoverse/homescoop/issues/1209)). sudo for `magick`, `convert` or `mogrify` is offered once, never always, since they write files. No two entries' npm `latest` provide the same command, so an install never shadows another entry's; `packages.test` checks that against npm's current `latest`.
332
+ Today it offers git, the GitHub CLI, OpenSSH, `slicc` (see [Sevens this kernel follows](#network)), Python, the Python data tools (numpy, pandas and matplotlib), Node.js (slicc-jsh's `node` and `jsh`), `sliccy:browser` for `.jsh` scripts, Ruby, Perl, Biome, the PDF tools (poppler), qpdf, rsync, screen, SQLite, the BIND tools (`dig`, `host` and `nslookup`), websocat, ntfy, GnuPG, fnox, mcpcat (an MCP client), zip (Info-ZIP's `zip`, `unzip` and `zipinfo`), xxd (vim's hex dump, with `xxd -r`), ImageMagick and `serve` (slicc-serve's `serve` and `scserve`, see [Public previews](#requests-from-programs-devembedder)). zip's `unzip` refuses an entry whose name isn't UTF-8 (an old Latin-1 or CP437 archive without a Unicode path): it says `cannot create <name>` / `Illegal byte sequence`, extracts the other entries and exits 50, and `unzip -l` still lists the entry. It never extracts it under a changed name, and `unzip -p` still streams its bytes ([homescoop#1174](https://github.com/ai-ecoverse/homescoop/issues/1174)). ImageMagick is homescoop's HEIF build (`wasm-imagemagick-heif`, a superset of the plain build, which isn't offered), with `magick`, `convert`, `mogrify`, `identify` and `magick-open`, and it reads HEIC and AVIF. A failed write leaves an existing target as it was. Its known issues: writing over another user's 0666 file in a sticky directory such as `/tmp` fails with `Operation not permitted`, though writing your own files works ([homescoop#1258](https://github.com/ai-ecoverse/homescoop/issues/1258)); `.mpc` writes fail with `cache resources exhausted` ([homescoop#1208](https://github.com/ai-ecoverse/homescoop/issues/1208)); and the cert's coverage gaps, among them the no-encoder fallback and MPC's two-file write ([homescoop#1209](https://github.com/ai-ecoverse/homescoop/issues/1209)). sudo for `magick`, `convert` or `mogrify` is offered once, never always, since they write files. No two entries' npm `latest` provide the same command, so an install never shadows another entry's; `packages.test` checks that against npm's current `latest`.
333
333
 
334
334
  - **Install** runs `pnpm add -g <package>@<version>` in the page's kernel, as a user would, under the Web Lock `slicc-optional`, so the commands work at once in every open shell. pnpm 12 gives each global add its own project under `$PNPM_HOME/global/v11/`; bios reads `PNPM_HOME` from the kernel's environment. Afterwards `os/packages.js` reads that project's `pnpm-lock.yaml`, and every package in it, the one added and each dependency, must pass [the gate](#optional-packages). A locked integrity that isn't the registry's for that version (drift) removes the package again and fails the row with *This version doesn't match the tested build*; any other refusal fails it with *Not offered: <reason>.* An Update that fails puts the version it had back (*… stays.*), and an install that fails removes the package, so nothing unchecked stays installed. A row with no version from npm installs nothing, and Install and Update ask npm for the offer again first, so they never act on the OPFS cache's version. An entry's `requires` (uv needs Python) are installed first. A package's kernel command always wins over the same package's Node `bin`. After each install and update, for every name that a package declares both in `slicc.commands` and in `bin`, bios replaces the link that pnpm made in root's `$PNPM_HOME/bin` with a symlink to `/usr/bin/<name>`, and removes it from a user's own `~/.local/share/pnpm/bin`, where the kernel then serves the user's own kernel command at that same path, but only when that link points into this package, so `mcpcat` runs `/usr/bin/mcpcat`, not a `#!/usr/bin/env node` script with no Node to run it, and a shell that already looked up `$PNPM_HOME/bin/mcpcat` keeps running the kernel command. Once the kernel command is gone (`pnpm remove -g`), the next pass removes such a symlink. A command chained right after the install in the same shell (`pnpm add -g mcpcat && mcpcat`) runs the kernel command at once too: since slicc-kernel 1.147.0 the kernel runs pnpm's Node shim for a package's own kernel command as that command (slicc-kernel#1453). Another package's bins are never touched, and a package with only a `bin` keeps it. A `pnpm add -g` typed in a shell gets the same pass: bios watches only the `bin` and `global` folders of root's `$PNPM_HOME` (`/usr/local/share/pnpm`) and of each user's `~/.local/share/pnpm`, and `/etc/passwd`, to add a user's when the user appears; about 50 ms after pnpm writes there, it runs that pass over the global's packages, as that user for a user's own global (bios#715). Each pnpm home runs one such pass at a time, and a write during or after one starts another only if that home's `bin` entries or installed packages differ from what the last pass started from, so a removal that changed nothing starts nothing. That's the usual case for a user's own kernel command whose file names its own package: the kernel serves it at that path, so `rm -f` returns 0 and it stays. A file that can't be removed warns once in the console, doesn't stop the pass for the home's other packages, and is tried again when something in that home changes. The panel's step waits only for a step already running on the same `bin`, never for another home's (bios#1153). `/opt/user` (Your packages) isn't affected: its bins are not on `PATH`. A certified catalog package's agent skills reach every cone the same way. After the install or update, for each folder its `package.json` lists in `pi.skills`, bios links each skill in it into `/usr/share/skills/<name>`, through the kernel and as root, so no cone can change what the agent loads. The folder has to resolve inside the package; the skill's folder name has to match `^[a-z0-9][a-z0-9-]*$` and equal its `SKILL.md` `name`; and it mustn't collide with a built-in or with an entry it didn't make. The skill files are made readable by everyone (`a+rX`). bios records its links in `var/lib/slicc/optional/<id>/skills`, removes the ones an update drops, and removes all of them on Remove. A skipped skill is logged and never fails the install. The agent's rule stands: it doesn't scan root's global pnpm, so a user's `pnpm add -g` can't add skills. A project entry also **updates** a required package that's older than the catalog's before it installs, since it runs on the catalog's version: the data tools override their own Python away, and their builds need the catalog's Python. A global add brings its own pinned dependencies, so it leaves an older required package as it is.
335
335
  - **Progress:** a row shows pnpm's package counts once pnpm counts more than one package. Before that, a single package, such as Python, still shows its download in bytes, from pnpm's `Downloading` lines (see [Agent](#agent)). Without either the bar is indeterminate.
@@ -523,6 +523,18 @@ Programs ask seven's page for what only a page can do through the kernel's `/dev
523
523
  - **The click:** `ble.request` is the only Bluetooth kind that can ask, as `hid.request` does: typed in an active tab it opens Chrome's chooser at once; otherwise the program gets `waiting for a click in seven's tab: choose a Bluetooth device` and seven shows a click request (`clicks.ask` with `kind: 'device'` and `detail: { what: 'ble', program }`): "Choose a Bluetooth device", "<asker> wants to use a Bluetooth device. Click Choose, then pick it in the browser's list.", with **Choose…** and Cancel. Cancel refuses with `no Bluetooth device was chosen` and 300 s without a click with `nobody clicked within 5 min`, both `EACCES`.
524
524
  - **The indicator:** while a device is connected, the live list shows "Bluetooth device connected", the handle with its name (`ble1 (Polar H10)`) and who connected it, with **Close**, which disconnects the device in seven and ends a `ble notify` on it. The chip goes when the device disconnects, however it ends: `ble disconnect`, Close, the switch, or the device going away.
525
525
  - **The switch:** "Bluetooth devices" sits after HID devices, on by default and kept in the same `slicc-os.switches`. Off refuses every `ble.*` kind with `Bluetooth devices are off in seven's settings` (`EACCES`), before the chooser or the device is touched, and turning it off disconnects every device, ends every `ble notify` with that error and refuses a request, a connect or a write still in flight.
526
+ - **Public previews** (`serve` and `scserve` from the catalog's [`@ai-ecoverse/slicc-serve`](https://github.com/ai-ecoverse/slicc-serve), [slicc-serve#6](https://github.com/ai-ecoverse/slicc-serve/issues/6); `src/seed/serve.js`): `serve` runs its static server on the kernel's loopback, or names a kernel server with `--port`, and asks the page to publish that port at a public capability URL through this seven's tray (see [Remote devices](#network)). The page then answers the tray hub's `preview.request` by fetching from the port (see [Kernel servers](#kernel-servers)). Nothing is uploaded: visitors get the files while the program that asked keeps its request open.
527
+ - **`serve.publish`** (`{"kind":"serve.publish","port":8400,"root":"~/site","entry":"docs/a.html","allowLive":true}`, no body): `port` is the kernel port (1 to 65535), `root` only names it in the prompt and the chip, `entry` is a path inside it (no leading `/`, no empty, `.` or `..` segment; `\` counts as `/`), and `allowLive` (default `true`) goes to the hub as it is; slicc-serve's README has [the contract](https://github.com/ai-ecoverse/slicc-serve#the-embedder-contract). The reply's first line is `{"url","previewToken","trayId"}`, and the reply stays open. When the program closes it, or a signal or its exit does, seven revokes the preview on the hub and writes nothing more. When seven ends it, it writes one more line, `{"stopped": <reason>}`, then ends the reply: `stopped in seven` (the chip's Stop), `stopped with serve --stop`, `revoked by the tray hub` (its `preview.revoked`), `public previews were switched off` (the switch below) or `seven lost its tray` (the tray seven leads now isn't the one it minted on).
528
+ - **A refusal the hub answered:** a mint whose status isn't 2xx (through the same-origin proxy, its `x-tray-status`) is the reply, not an errno, so `serve` can tell sign-in (exit 3) and limits (exit 4) from other failures: one line `{"error", "status", "code"?, "retryAfter"?, "signIn"?, "active"?, "limit"?}` and the end. `error` is the hub's, else `the tray hub answered <status>`; `code` is the hub's, and so are `active` and `limit` (the live previews in use and allowed, with `LIVE_PREVIEW_LIMIT`); `retryAfter` is its `Retry-After`; `signIn` is the hub's `signIn`, else a `Link` with `rel="login"`, else a redirect's target. A hub seven can't reach at all is `EIO` with the reason.
529
+ - **The prompt:** the same gesture check as `open.url`: a request typed in a terminal of an active tab goes ahead; any other, the agent's always, waits for "Publish ~/site at a public URL?" (or "the server on port 5173" without a root; "<asker> asks seven to publish ~/site at a public URL. Anyone with the link can open it while it is served.", **Publish** and Cancel). The dismissed texts are `the request to publish was dismissed` and `nobody answered the request to publish within 60 s`.
530
+ - **The switch:** "Public previews" in Settings, on by default and kept in `slicc-os.switches` like the capture switches. Off refuses `serve.publish` with `EACCES`, `public previews are off in seven's settings`, before the prompt and again after it, and turning it off revokes every live preview this seven serves.
531
+ - **The chip:** while a preview is live, every tab shows "Serving publicly", the root (or `port <n>`) and who asked, with **Stop**, which revokes it.
532
+ - **Minting:** the page posts `{ servedRoot: "/srv/serve/<32 hex>", entryPath: "<servedRoot>/<entry or index.html>", allowLive }` to the hub's `POST /api/tray/<trayId>/preview` with the controller token. The served root is only a name the hub compares: a fresh one per publish, never a path in seven's file system. Without `entry`, a visit to `index.html` goes to the port as `/`, and the URL the hub mints loses its trailing `index.html`, as on a host.
533
+ - **Whose:** each preview keeps the uid of the process that published it.
534
+ - **`serve.list`:** one JSON line per live preview of the caller's uid (every one for root), `{previewToken, url, root, port, entry?, since}` (`since` in ms since the epoch), and an empty reply when there are none.
535
+ - **`serve.stop`** (`{"kind":"serve.stop","previewToken":"…"}`, an empty reply): ends that preview's `serve.publish` reply with `stopped with serve --stop` and revokes it on the hub (`POST …/preview/stop`). A token seven doesn't hold is revoked on the tray all the same. One the hub doesn't know either, and a held preview of another uid for a caller who isn't root, is `ENOENT`, `the tray hub has no such preview`.
536
+ - **Refusals:** no tray hub (a seven off `*.sliccy.ai` without `slicc-os.tray-hub`) is `ENOTSUP`, `seven publishes previews only through its tray hub, and it has none here`; a tab that doesn't run the kernel (another seven tab of the same browser) is `ENOTSUP`, `seven publishes only from the tab that runs its kernel; run serve in that tab's terminal`; a tray not connected yet, a hub that can't be reached and a bad `port` or `entry` (`invalid port`, `invalid entry`) are `EIO` with the reason. The kinds' policies are `{}`: the kernel admits a process of the session's own uid, so a cone's agent publishes in its own session, and `sudo -u cone` in root's terminal is refused before the page sees it. A remote follower's shell has no page hook, so `serve` there is `ENOTSUP` before the page sees it.
537
+ - **Tests:** `test/integration/previews.test.mjs` publishes `httptest` on a fake tray hub from a raw `/dev/embedder` request, checks the mint, the chip, `serve.list`, a visit, a 404 from the server, a path outside the served root (403) and a root nobody serves (404), then ends a preview every way (the program killed, the chip's Stop, the hub's revoke, `serve.stop`, the switch, a reload) and checks each one is revoked with its `stopped` line, that a cone's session lists none of root's previews and can't stop one, and that a hub's 429 comes back as the reply's `error` line, while an orphan on the tray is revoked at boot and a persistent preview isn't. `test/integration/previews-serve.test.mjs` installs `serve` from the catalog, runs `serve --local` and publishes its port: text, a 300 000-byte binary file in seven chunks, ranges (a window, a suffix, an unsatisfiable one), a 404, a 25 MiB+1 file refused with 413 and an 8 MiB window of it.
526
538
  - Kinds seven doesn't list (`open.file`, `open.download`, `open.reveal`, `clipboard.read`) are `ENOTSUP` before the page sees them.
527
539
 
528
540
  ### Composer recording
@@ -777,6 +789,11 @@ seven can also join a tailnet, with a patched build of Tailscale's wasm client (
777
789
  - **Revoking:** the hub's `biscotto.revoked` (sent for a revoke from anywhere) and this page's own `revoke(id)` close every link of the seat at once; the agent ends the seat's Chord links and leaves nothing behind, and the hub refuses its token from then on (`INVALID_JOIN_CAPABILITY`). Seven doesn't rely on the hub for that: both also put the seat's id in a local deny list (`localStorage['slicc-os.revoked-seats']`, id → until), kept until the seat's own expiry, or 7 days when seven doesn't know it, and a join on a denied seat is refused with `UNTRUSTED` ("this guest seat was revoked") even if the hub let it through. When the hub's stop fails, `revoke` rejects with "Seven refuses this guest from now on, but the tray hub didn’t revoke the link: …", and the tab shows a warning notice (`guest-seat-stop:<id>`) with **Try again**, which retries the stop and goes once the hub takes it. The deny list stays either way.
778
790
  - **The guest's page:** opening the seat link boots the BIOS as usual (the base set and `/opt/agent` go into that browser's OPFS), then the BIOS goes straight to `os/join.html` for a `#seat` (and `os/start.js` sends one there too), a page that opts into the cross-document view transition inline, like `index.html`. That page is `<slicc-chat>` alone inside `.swc-theme` and `<sp-theme system="spectrum-two">`, with spectrum's stylesheet (`@ai-ecoverse/slicc-spectrum/swc.css`, spectrum ≥ 1.86.0: the pinned `@adobe/spectrum-wc` stylesheet with its tokens inlined), following the system's light or dark. It takes the seat URL from the fragment, removes it from the address bar and keeps it in `sessionStorage` (`slicc-os.seat`) for reloads of that tab only, installs `/opt/agent` like a follower, and dials the hub as `slicc-seven/1` with a fresh certificate each time, so a guest is never a device. It opens `pi`, calls slicc-agent's `connectGuest`, and shows `createAgentModel(guest)`, whose `seat` puts the chat in guest mode (with the assistant messages' `model` left out, since a guest gets no model list and the chat would show the raw id): the host's messages read "From the host", and the guest's messages wait for the seat's review. A dropped link reconnects. A revoked or expired seat, a refused port (`EACCES`) or another agent version (`EVERSION`) ends it: the page drops the chat, forgets the seat and says why ("This guest link isn’t valid any more.").
779
791
  - **Tests:** `test/integration/follow-guests.test.mjs` invites a guest from a real owner's Network panel against the fake hub, joins from a second browser, delivers an approved guest message, checks that a guest can't stop, abort, steer or reconfigure the cone (its message lands as a follow-up after the owner's run, never in it), can't reach sudo decisions, `connectAgent` or any other stream kind, that a follower sees the seat, and that Revoke closes the link at once and the link is refused after.
792
+ - **Public previews** (see [Public previews](#requests-from-programs-devembedder)): the tray tab is the leader the hub asks for every visit to a live preview, as SLICC 6's page was (`preview-request-handler.ts`), and slicc-serve's host relay is (`crates/serve-hub/src/relay.rs`). `os/tray.js` hands `preview.request`, `preview.revoked` and `preview.state` to `os/serve.js`, which answers in the tab that runs the kernel:
793
+ - **Each request:** `{ reqId, servedRoot, vfsPath, asText, range? }`. A `vfsPath` outside `servedRoot` (six's `isPathWithinServedRoot`: not absolute, a `.` or `..` segment, `%2e` in any case, or a served root of `/`) is `403`. A served root this seven doesn't serve is `404` `this preview is no longer served`. Otherwise the page sends `GET <path>` with the visitor's `Range` and `accept-encoding: identity` to the port through `kernel.loopbackFetch`; `<path>` is `vfsPath` without the served root, and `/` for the default entry. Same-origin redirects (to `<port>.kernel.localhost`, `127.0.0.1:<port>` or `localhost:<port>`) are followed up to 5 times, and the whole answer has 25 s.
794
+ - **The answer:** `preview.response` chunks of 64 KiB (`reqId`, `ok`, `mime`, `chunkIndex`, `totalChunks`, `content`, `encoding`, `status`, `size`, `range`), with the server's `Content-Type` (by the file name when it sends none). A `200` is UTF-8 when the hub asked for text and the bytes are UTF-8, base64 otherwise, and is refused with `413` `preview file exceeds 25 MiB limit` once it declares or sends more than 25 MiB. A `206` is always base64, carries `size` and `range` from its `Content-Range`, and is cut to 8 MiB, which the visitor's next range continues; an empty one is `416` with the size. A `416` keeps the size from `Content-Range: bytes */<size>`. Any other status is `ok: false` with the first 4 KiB of the body as `reason`, a port that doesn't answer `502` `nothing answers on kernel port <port>: …`, and one that hangs `504`.
795
+ - **Revoked and replayed:** `preview.revoked` ends that preview's `serve.publish` request (`revoked by the tray hub`), and `preview.state` (which the hub replays on every connect) is kept with the preview. A preview is live only while its request is, and a reload ends every kernel process, so at every `leader.connected`, at boot and after a reconnect, the page lists the tray's previews (`GET /api/tray/<trayId>/previews`) and revokes each live one under `/srv/serve/` that it doesn't serve, as slicc-serve's relay does after each connect. Persistent (`--ttl`) previews stay.
796
+ - **Routes:** mint, stop and list go to the hub with the controller token, through the sliccy-ai worker's same-origin proxy on `*.sliccy.ai` like the other tray routes.
780
797
  - **The tray:** its capabilities are kept in `localStorage` (`slicc-os.tray`), so the join URL survives reloads. A hub that forgot the tray gets a new one. The leader socket pings every 30 s and reconnects with backoff. Elsewhere (`localhost`, tests) the tray starts only when `localStorage['slicc-os.tray-hub']` names a hub.
781
798
  - **Kernel side:** the kernel gets one uplink and one route table, the union of what the active exits offer, pushed with `kernel.setRoutes`.
782
799
  - **Choosing an exit:** for each destination, an exit that claims it (a tailnet address or MagicDNS name) wins. Otherwise the default exit takes it: the one that offers a default route, for example Tailscale with an exit node. Otherwise HTTP stays on the picked transport, and raw connections are `ENETUNREACH`.
@@ -818,6 +835,8 @@ A server running inside the kernel (vite, `python -m http.server`, impeccable `l
818
835
  - The headers take longer than 30 s: `504` `sw: no answer from kernel port <port> for <path> in 30 s`.
819
836
  - After the headers, the 30 s applies to each chunk, not to the whole response. A stream that stays silent for 30 s is ended and its socket closed. `EventSource` reconnects by itself, so a server should send a comment line as a heartbeat. Chrome may also stop the service worker during a long stream, and `EventSource` reconnects then too.
820
837
 
838
+ - **Publishing one.** `serve DIR` and `serve --port <n>` publish a kernel server at a public URL (see [Public previews](#requests-from-programs-devembedder)). The tray relay reaches it with the same `kernel.loopbackFetch`, GET only and without the query string, which the hub doesn't carry.
839
+
821
840
  What doesn't work through the service worker:
822
841
 
823
842
  - **WebSockets.** A service worker never sees them, so `ws://<port>.kernel.localhost/` goes to the machine's port 80, and `ws://<port>.kernel.localhost:<kernel port>/` to the kernel port. Vite's HMR can't connect: the page loads and runs, but needs reloading by hand.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-ecoverse/slicc-bios",
3
- "version": "2.5.2",
3
+ "version": "2.6.0",
4
4
  "description": "Slim loader that boots SLICC into OPFS and serves the UI from there",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -160,5 +160,17 @@
160
160
  "@ai-ecoverse/wasm-xxd": {
161
161
  "id": "xxd",
162
162
  "label": "xxd"
163
+ },
164
+ "@ai-ecoverse/slicc-serve": {
165
+ "id": "serve",
166
+ "label": "serve (public previews)",
167
+ "source": {
168
+ "repo": "ai-ecoverse/slicc-serve",
169
+ "workflow": [".github/workflows/ci.yml"]
170
+ },
171
+ "notes": [
172
+ "serve DIR publishes a folder at a public URL through seven's tray hub while it runs; seven asks first unless you typed it in a terminal.",
173
+ "Visitors get GET requests only, without the query string."
174
+ ]
163
175
  }
164
176
  }
@@ -14,5 +14,29 @@
14
14
  "@ai-ecoverse/gh-upskill": {
15
15
  "repo": "ai-ecoverse/gh-upskill",
16
16
  "workflow": [".github/workflows/ci.yml"]
17
+ },
18
+ "@ai-ecoverse/slicc-serve-darwin-arm64": {
19
+ "repo": "ai-ecoverse/slicc-serve",
20
+ "workflow": [".github/workflows/ci.yml"]
21
+ },
22
+ "@ai-ecoverse/slicc-serve-darwin-x64": {
23
+ "repo": "ai-ecoverse/slicc-serve",
24
+ "workflow": [".github/workflows/ci.yml"]
25
+ },
26
+ "@ai-ecoverse/slicc-serve-linux-arm64": {
27
+ "repo": "ai-ecoverse/slicc-serve",
28
+ "workflow": [".github/workflows/ci.yml"]
29
+ },
30
+ "@ai-ecoverse/slicc-serve-linux-x64": {
31
+ "repo": "ai-ecoverse/slicc-serve",
32
+ "workflow": [".github/workflows/ci.yml"]
33
+ },
34
+ "@ai-ecoverse/slicc-serve-win32-arm64": {
35
+ "repo": "ai-ecoverse/slicc-serve",
36
+ "workflow": [".github/workflows/ci.yml"]
37
+ },
38
+ "@ai-ecoverse/slicc-serve-win32-x64": {
39
+ "repo": "ai-ecoverse/slicc-serve",
40
+ "workflow": [".github/workflows/ci.yml"]
17
41
  }
18
42
  }