@ai-ecoverse/slicc-bios 1.42.6 → 1.42.8
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
|
@@ -9,7 +9,7 @@ The page shows six boot steps as they run:
|
|
|
9
9
|
3. **Install packages from npm into OPFS** – the installer reads [`src/packages/package-lock.json`](src/packages/package-lock.json), the lockfile the BIOS ships with. It skips packages that name an `os` or `cpu` (native binaries such as esbuild's, which can't run in a browser). For every other locked package it downloads the tarball from `registry.npmjs.org` and checks its `integrity`, then unpacks it with the built-in `DecompressionStream` and [`modern-tar`](https://github.com/ayuhito/modern-tar) into OPFS at its lockfile path (`node_modules/…`), dropping `.` segments from entry names and skipping any entry with `..`. A package that is already there is rewritten in place, never emptied first: every file is overwritten whole (an OPFS write commits on close), the entry points come last: a command's wasm (and its variants), then its glue or script with `bin`, `main` and `exports` targets, then `package.json`, and only then do the files the new version no longer has go, so a running kernel or another tab never finds the package missing. While it unpacks, it hashes every file (SHA-256) and records the hashes in IndexedDB (see [Integrity](#integrity)). It also keeps each file's mode from the tarball, owned by root: once a package's files are in, it hands their paths and modes to the kernel's `writeMetadata` (`@ai-ecoverse/slicc-kernel/meta`, read from the installed kernel), in one batch per run, so an executable outside `bin/`, such as pnpm's `shims/i`, stays executable when the kernel checks modes. The seed's files are recorded as root's `0644`. A kernel without `/meta` skips this. A package installed before the kernel had `/meta` gets its modes once, on the first run with it: the installer fetches its tarball again, checks its integrity, reads the modes from the headers without unpacking, and marks the receipt (`modes: true`). A package installed or replaced later is marked when it's stamped. It also records a receipt in `var/lib/bios/`. A package whose recorded integrity matches the lockfile's and whose files are still there isn't downloaded again, so pinning a new version replaces just that package. Replacing a package keeps its nested `node_modules`, and packages the lockfile no longer lists are deleted along with their receipts and hashes. A package without recorded hashes is downloaded again, even with a receipt, so the first boot after integrity checks arrived downloads the base set once. Last, the installer copies the deployment's `package.json` and `pnpm-lock.yaml` to the OPFS root for pnpm, and the lockfile once more to `var/lib/slicc/pnpm-lock.yaml`, which records what is installed (see [Updates](#updates)).
|
|
10
10
|
4. **Add UI page to OPFS** – the installer copies `src/seed/` to `os/` in OPFS and records each file's hash. This is a stand-in until the UI ships as a downloadable asset.
|
|
11
11
|
5. **Intercept same-origin requests** – `sw.js`, a module service worker, answers in-scope requests from OPFS and passes everything else to the network (see [What the service worker serves](#what-the-service-worker-serves)). The code it serves from OPFS carries `Cross-Origin-Opener-Policy: same-origin`, `Cross-Origin-Embedder-Policy: require-corp` and `Cross-Origin-Resource-Policy: same-origin`, so the UI page and the workers it starts are cross-origin isolated. Scripts it serves get their bare imports resolved (see [Modules](#modules)).
|
|
12
|
-
6. **Serve UI from OPFS** – navigate to `os/` (keeping the URL fragment) with a cross-document view transition. That page imports [`@ai-ecoverse/slicc-kernel`](https://github.com/ai-ecoverse/slicc-kernel) and [`@ai-ecoverse/slicc-spectrum`](https://github.com/ai-ecoverse/slicc-spectrum) by name from `node_modules/` in OPFS, starts the kernel on the OPFS root and boots SLICC's UI, `<slicc-app>`, on spectrum's kernel model. The agent comes later, from its own pnpm project (see [Agent](#agent)). Commands come from the installed packages: `bash`, coreutils, `grep`, `sed`, findutils, `gawk`, `diff` (with `cmp`, `sdiff` and `diff3`), `patch`, `rg` (ripgrep), `jq`, `less`, `tree`, `tar` with `gzip`, `xz` and `bzip2` (and their `gunzip`, `zcat`, `unxz`, `xzcat`, `lzma`, `bunzip2` and `bzcat` names), `curl`, `mount`, `umount`, `clear`, `tput`, `tset`, `reset`, `pnpm` with its `npm` and `npx` shims, and `playwright-cli` and `curlwright` from slicc-cdp. The shell starts in `/home` as **root** (slicc-kernel ≥ 1.44.0 has users: `/etc/passwd` and `/etc/group` list root, nobody, sudo, users and nogroup), so the prompt ends in `#`, `whoami` and `id` say root, `ls -l` and `ps` show user names, and root's `HOME` is `/root` (mode 0700) with `PNPM_HOME=/usr/local/share/pnpm`. bash, coreutils, procps and git are the homescoop H1 rebuilds that know about users; older builds claimed uid 1000. `tar` forks the compressors for `-z`, `-J` and `-j` through `/bin/sh`. Hard links in archives aren't recreated, and there's no `--zstd`. xz is single-threaded: `-T` is accepted but has no effect.
|
|
12
|
+
6. **Serve UI from OPFS** – navigate to `os/` (keeping the URL fragment) with a cross-document view transition. That page imports [`@ai-ecoverse/slicc-kernel`](https://github.com/ai-ecoverse/slicc-kernel) and [`@ai-ecoverse/slicc-spectrum`](https://github.com/ai-ecoverse/slicc-spectrum) by name from `node_modules/` in OPFS, starts the kernel on the OPFS root and boots SLICC's UI, `<slicc-app>`, on spectrum's kernel model. The agent comes later, from its own pnpm project (see [Agent](#agent)). Commands come from the installed packages: `bash`, coreutils, `grep`, `sed`, findutils, `gawk`, `diff` (with `cmp`, `sdiff` and `diff3`), `patch`, `rg` (ripgrep), `jq`, `less`, `tree`, `tar` with `gzip`, `xz` and `bzip2` (and their `gunzip`, `zcat`, `unxz`, `xzcat`, `lzma`, `bunzip2` and `bzcat` names), `curl`, `mount`, `umount`, `clear`, `tput`, `tset`, `reset`, `pnpm` with its `npm` and `npx` shims, and `playwright-cli` and `curlwright` from slicc-cdp. The shell starts in `/home` as **root** (slicc-kernel ≥ 1.44.0 has users: `/etc/passwd` and `/etc/group` list root, nobody, sudo, users and nogroup), so the prompt ends in `#`, `whoami` and `id` say root, `ls -l` and `ps` show user names, and root's `HOME` is `/root` (mode 0700) with `PNPM_HOME=/usr/local/share/pnpm`. bash, coreutils, procps and git are the homescoop H1 rebuilds that know about users; older builds claimed uid 1000. `tar` forks the compressors for `-z`, `-J` and `-j` through `/bin/sh`. Hard links in archives aren't recreated, and there's no `--zstd`. xz is single-threaded: `-T` is accepted but has no effect. xz's `xzgrep`, `xzdiff` and `xzless` wrapper scripts are installed too, running seven's own grep, diff and less; gzip's `zgrep` and bzip2's `bzgrep`-style wrappers aren't. Whatever the shell writes stays in OPFS across reloads. The kernel terminates HTTPS with `wasm-tls-engine`, so `curl https://…` works over whichever transport is picked (see [Network](#network)). `wasm-git` is left out for its size (53 MB); it can come later through pnpm.
|
|
13
13
|
|
|
14
14
|
## What the service worker serves
|
|
15
15
|
|
|
@@ -346,6 +346,14 @@ Programs in the kernel drive a browser over the Chrome DevTools Protocol: `playw
|
|
|
346
346
|
- **Requests from protected documents:** a request whose URL, document, frame, initiator, `Referer` or `Origin` is protected never reaches the program. The guard continues its `Fetch` pause itself, drops its `Network` events, and refuses its bodies (`Network.getResponseBody`, `getRequestPostData`, `Fetch.getResponseBody` and the like). Bodies, `replayXHR` and `Fetch` replies for a request the guard hasn't seen are refused too. Extra-info events that come before their request wait up to 2 s for it, then are dropped.
|
|
347
347
|
- **Flat sessions only:** `Target.attachToTarget` and `Target.setAutoAttach` need `flatten: true`. `Target.sendMessageToTarget`, `Target.attachToBrowserTarget` and `Target.exposeDevToolsProtocol` are refused, so no command can be tunnelled past the guard.
|
|
348
348
|
|
|
349
|
+
**Sign-in tabs are held for life (#754).** A sign-in popup shows its token or code in its URL and on the IdP's pages, and the guard can't scrub a page's own content. So the owner tab holds every sign-in tab from the moment it opens. A held tab is never listed, attached, auto-attached or reported to a program on any origin, until it closes. Its events, `urlFragment` included, never reach the program.
|
|
350
|
+
- **Seven's own sign-in:** the popup opens on `about:blank#slicc-sign-in-<nonce>`. bios asks the owner over the `slicc-held` BroadcastChannel to hold it. The owner finds that target by its marker URL on each browser host, the extension and slicc-node, holds it, and only then is the popup sent to the IdP. The owner answers `held` once it has held the tab on every listed host, `none` when no host is listed, and `unheld` otherwise, including when a listed host can't be opened. On `unheld`, on `none` while bios sees a host, or on no answer within 6 s while a host is connected, the sign-in stops before the IdP and says so; it never goes on unheld. On `none`, the sign-in goes on, and the owner keeps it as in flight for 11 minutes (in `localStorage`, `slicc-os.sign-in-flight`, so a reload keeps it). Before any program gets a browser connection, the owner sweeps every host: it holds sign-in tabs still on `about:blank`, and while a sign-in is in flight, every page a protected page opened. So a host that connects in the middle of a sign-in never sees its tab.
|
|
351
|
+
- **The guard decides by itself, too:** a page that a held tab opened is held, on any URL, and so are its own popups in turn, and so are the frames and workers of a held tab (`parentId`). A page seven (or another protected page) opened with opener access (`canAccessOpener`), or that is still on `about:blank`, is held the first time any guard sees it.
|
|
352
|
+
- **Other sign-in tabs:** a watcher in the owner tab holds every page that a protected page (seven or the vault) opened and that is still on `about:blank`, and a popup that a held tab opens, such as the IdP's own. **Through slicc-node** it connects when the owner boots and takes target events, so it holds an unmarked popup from its creation, before any program has connected. **Through slicc-extension** it only polls every 250 ms once a program or a sign-in needs the browser, and the extension reports no opener access, so only marked popups are held reliably there: an unmarked popup that leaves `about:blank` before the next poll can be missed, and a program could then list it, URL and fragment included (a known gap). Seven's own Adobe sign-in carries the marker. The agent's MCP OAuth and device-code popups carry it only from the slicc-agent release with #550, which isn't pinned yet.
|
|
353
|
+
- **Kept:** held tab ids are kept in `localStorage` (`slicc-os.held-targets`, the 32 most recently held or seen again), so a reload of the owner keeps them.
|
|
354
|
+
- **The watcher's connections:** on slicc-extension it connects only once a program or a sign-in needs the browser. On slicc-node it connects when the owner boots, so an owner boot takes slicc-node's browser from another page driving it through the same slicc-node (a known, functional only). If another page then takes it back, the watcher doesn't fight it, and reconnects when the next program connects. Before any program gets a browser connection, the owner sweeps every host; if that listing fails, the program gets no connection, and no host connection is opened for it.
|
|
355
|
+
- **A tab only lent seven's protection** is one that seven opened with no opener access, or that inherited it only from about:blank. It becomes drivable once it commits an ordinary `http:`, `https:` or `data:` page, whether the program saw it at creation or later. Real protected origins stay protected for life, a `blob:` of seven's origin included.
|
|
356
|
+
|
|
349
357
|
A tab a program creates through the guard opens in the background, behind seven, unless it passes `background: false`. A program that needs seven to keep rendering should open tabs, the default, and not `newWindow`: even unfocused, a new window can cover seven's window, and Chrome then throttles seven ([slicc-extension#105](https://github.com/ai-ecoverse/slicc-extension/issues/105)).
|
|
350
358
|
|
|
351
359
|
A program picks a host by adding `runtime=extension` or `runtime=proxy` to the query of the URL it opens (`playwright-cli --runtime proxy`). With no runtime, the extension goes first. The hook never derives a URL from the request: it reaches only the extension's page global and the proxy the page already checked.
|
|
@@ -565,7 +573,7 @@ Seven certifies a gated package (slicc-kernel, slicc-cdp, slicc-clipboard, slicc
|
|
|
565
573
|
- **Automerge once CI is green:** Renovate turns on auto-merge, so a PR goes through the merge queue once its required checks, `ci / integration` and `ci / review`, are green (see [CI](#ci)). No bot writes to a Renovate branch: the shipped lockfiles are part of what seven certifies, so a certified pin needs no `certs.json` line.
|
|
566
574
|
- **Known breaks** are `packageRules` with `allowedVersions`, each with its reason and issue in `description`. Today the only one is wasi-pnpm skipping the deprecated 12.9.1-11 and 12.9.1-12 (homescoop#1128). wasm-bash's hold below 5.3.0-20 went with the pin of kernel 1.135.2, which has slicc-kernel#1146. bash 5.3.0-20 and later count as certified only with kernel 1.130.2 or later (homescoop#1230), and -21 declares `engines.slicc-kernel >=1.130.2`. `test/integration/renovate.test.mjs` checks the config, the gate and the queue in plain node.
|
|
567
575
|
|
|
568
|
-
`test/integration/sweep.test.mjs`, the base-set sweep, runs with the other integration tests. It boots the BIOS, checks that each base-set package in OPFS has the version `package-lock.json` pins, and runs every command its `slicc.commands` lists with `--version` or a trivial call under `timeout 60`, then real grep, egrep, sed -i, xz, jq, find, xargs, diff, cmp, patch, awk, gzip, bzip2 and tar work. Each command is its own subtest named `<package> · <call>`. The clipboard commands, `sccopy` and `scpaste` included, run `--help` (`xclip -help`). Known exits: `false` 1, `bunzip2`/`bzcat --version` 2 (upstream), `i --version` 2 (argument parsing; 126 is #495), and `chcon`/`runcon` 1 (listed by coreutils, not built: "unknown program"). `[` runs as bash's builtin, since `timeout` can't exec it.
|
|
576
|
+
`test/integration/sweep.test.mjs`, the base-set sweep, runs with the other integration tests. It boots the BIOS, checks that each base-set package in OPFS has the version `package-lock.json` pins, and runs every command its `slicc.commands` lists with `--version` or a trivial call under `timeout 60`, then real grep, egrep, sed -i, xz, xzgrep, jq, find, xargs, diff, cmp, patch, awk, gzip, bzip2 and tar work. Each command is its own subtest named `<package> · <call>`. The clipboard commands, `sccopy` and `scpaste` included, run `--help` (`xclip -help`). Known exits: `false` 1, `bunzip2`/`bzcat --version` 2 (upstream), `i --version` 2 (argument parsing; 126 is #495), and `chcon`/`runcon` 1 (listed by coreutils, not built: "unknown program"). `[` runs as bash's builtin, since `timeout` can't exec it.
|
|
569
577
|
|
|
570
578
|
### The npm package
|
|
571
579
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-ecoverse/slicc-bios",
|
|
3
|
-
"version": "1.42.
|
|
3
|
+
"version": "1.42.8",
|
|
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",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"@biomejs/biome": "2.5.15",
|
|
53
53
|
"es-module-lexer": "3.0.4",
|
|
54
54
|
"fake-indexeddb": "6.2.5",
|
|
55
|
-
"lefthook": "2.2.
|
|
55
|
+
"lefthook": "2.2.2",
|
|
56
56
|
"modern-tar": "0.8.6",
|
|
57
57
|
"monocart-coverage-reports": "2.13.2",
|
|
58
58
|
"semantic-release": "25.0.9",
|
|
@@ -15,10 +15,10 @@ importers:
|
|
|
15
15
|
dependencies:
|
|
16
16
|
'@ai-ecoverse/slicc-agent':
|
|
17
17
|
specifier: 6.18.3
|
|
18
|
-
version: 6.18.3(@ai-ecoverse/slicc-kernel@1.
|
|
18
|
+
version: 6.18.3(@ai-ecoverse/slicc-kernel@1.159.4)(@aws-sdk/credential-provider-node@3.972.84)(@smithy/signature-v4@5.7.4)(ws@8.22.0)
|
|
19
19
|
'@ai-ecoverse/slicc-kernel':
|
|
20
|
-
specifier: 1.
|
|
21
|
-
version: 1.
|
|
20
|
+
specifier: 1.159.4
|
|
21
|
+
version: 1.159.4
|
|
22
22
|
|
|
23
23
|
packages:
|
|
24
24
|
|
|
@@ -36,8 +36,8 @@ packages:
|
|
|
36
36
|
resolution: {integrity: sha512-WVaDUiZbd5nwG03+2WoQ8YA8ATC2mkx1DRCWpLuMFBNnyN0cd5IRoGF6KYNjMkXvBQCvZZxP+gwffrpmHYJ/cQ==}
|
|
37
37
|
engines: {node: '>=24'}
|
|
38
38
|
|
|
39
|
-
'@ai-ecoverse/slicc-kernel@1.
|
|
40
|
-
resolution: {integrity: sha512-
|
|
39
|
+
'@ai-ecoverse/slicc-kernel@1.159.4':
|
|
40
|
+
resolution: {integrity: sha512-LSiUILx2oUctYW7PCHSm3QmK+msLF0yqdwFW0n4Ihokzd7oWjnTeYt3MNzXMYnI5HkCbhYGUJNnKNFDqcAp4hg==}
|
|
41
41
|
engines: {node: '>=26'}
|
|
42
42
|
|
|
43
43
|
'@ai-ecoverse/slicc-vault@1.15.1':
|
|
@@ -346,10 +346,10 @@ packages:
|
|
|
346
346
|
|
|
347
347
|
snapshots:
|
|
348
348
|
|
|
349
|
-
'@ai-ecoverse/slicc-agent@6.18.3(@ai-ecoverse/slicc-kernel@1.
|
|
349
|
+
'@ai-ecoverse/slicc-agent@6.18.3(@ai-ecoverse/slicc-kernel@1.159.4)(@aws-sdk/credential-provider-node@3.972.84)(@smithy/signature-v4@5.7.4)(ws@8.22.0)':
|
|
350
350
|
dependencies:
|
|
351
351
|
'@ai-ecoverse/slicc-browsers': 1.9.2
|
|
352
|
-
'@ai-ecoverse/slicc-kernel': 1.
|
|
352
|
+
'@ai-ecoverse/slicc-kernel': 1.159.4
|
|
353
353
|
'@ai-ecoverse/slicc-vault': 1.15.1
|
|
354
354
|
'@aws-sdk/middleware-websocket': 3.972.54
|
|
355
355
|
'@earendil-works/chord': 1.3.0
|
|
@@ -372,7 +372,7 @@ snapshots:
|
|
|
372
372
|
|
|
373
373
|
'@ai-ecoverse/slicc-browsers@1.9.2': {}
|
|
374
374
|
|
|
375
|
-
'@ai-ecoverse/slicc-kernel@1.
|
|
375
|
+
'@ai-ecoverse/slicc-kernel@1.159.4': {}
|
|
376
376
|
|
|
377
377
|
'@ai-ecoverse/slicc-vault@1.15.1': {}
|
|
378
378
|
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"@ai-ecoverse/slicc-browsers": "1.18.1",
|
|
10
10
|
"@ai-ecoverse/slicc-cdp": "1.41.4",
|
|
11
11
|
"@ai-ecoverse/slicc-clipboard": "1.1.1",
|
|
12
|
-
"@ai-ecoverse/slicc-kernel": "1.
|
|
12
|
+
"@ai-ecoverse/slicc-kernel": "1.159.4",
|
|
13
13
|
"@ai-ecoverse/slicc-spectrum": "1.104.1",
|
|
14
14
|
"@ai-ecoverse/wasi-fnox": "1.40.0-1",
|
|
15
15
|
"@ai-ecoverse/wasi-pnpm": "12.9.1-21",
|
|
@@ -76,9 +76,9 @@
|
|
|
76
76
|
}
|
|
77
77
|
},
|
|
78
78
|
"node_modules/@ai-ecoverse/slicc-kernel": {
|
|
79
|
-
"version": "1.
|
|
80
|
-
"resolved": "https://registry.npmjs.org/@ai-ecoverse/slicc-kernel/-/slicc-kernel-1.
|
|
81
|
-
"integrity": "sha512-
|
|
79
|
+
"version": "1.159.4",
|
|
80
|
+
"resolved": "https://registry.npmjs.org/@ai-ecoverse/slicc-kernel/-/slicc-kernel-1.159.4.tgz",
|
|
81
|
+
"integrity": "sha512-LSiUILx2oUctYW7PCHSm3QmK+msLF0yqdwFW0n4Ihokzd7oWjnTeYt3MNzXMYnI5HkCbhYGUJNnKNFDqcAp4hg==",
|
|
82
82
|
"license": "Apache-2.0",
|
|
83
83
|
"engines": {
|
|
84
84
|
"node": ">=26"
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"@ai-ecoverse/slicc-browsers": "1.18.1",
|
|
7
7
|
"@ai-ecoverse/slicc-cdp": "1.41.4",
|
|
8
8
|
"@ai-ecoverse/slicc-clipboard": "1.1.1",
|
|
9
|
-
"@ai-ecoverse/slicc-kernel": "1.
|
|
9
|
+
"@ai-ecoverse/slicc-kernel": "1.159.4",
|
|
10
10
|
"@ai-ecoverse/slicc-spectrum": "1.104.1",
|
|
11
11
|
"@ai-ecoverse/wasi-fnox": "1.40.0-1",
|
|
12
12
|
"@ai-ecoverse/wasi-pnpm": "12.9.1-21",
|
|
@@ -18,8 +18,8 @@ importers:
|
|
|
18
18
|
specifier: 1.1.1
|
|
19
19
|
version: 1.1.1
|
|
20
20
|
'@ai-ecoverse/slicc-kernel':
|
|
21
|
-
specifier: 1.
|
|
22
|
-
version: 1.
|
|
21
|
+
specifier: 1.159.4
|
|
22
|
+
version: 1.159.4
|
|
23
23
|
'@ai-ecoverse/slicc-spectrum':
|
|
24
24
|
specifier: 1.104.1
|
|
25
25
|
version: 1.104.1
|
|
@@ -112,8 +112,8 @@ packages:
|
|
|
112
112
|
engines: {node: '>=24', slicc-kernel: '>=1.75.0'}
|
|
113
113
|
hasBin: true
|
|
114
114
|
|
|
115
|
-
'@ai-ecoverse/slicc-kernel@1.
|
|
116
|
-
resolution: {integrity: sha512-
|
|
115
|
+
'@ai-ecoverse/slicc-kernel@1.159.4':
|
|
116
|
+
resolution: {integrity: sha512-LSiUILx2oUctYW7PCHSm3QmK+msLF0yqdwFW0n4Ihokzd7oWjnTeYt3MNzXMYnI5HkCbhYGUJNnKNFDqcAp4hg==}
|
|
117
117
|
engines: {node: '>=26'}
|
|
118
118
|
|
|
119
119
|
'@ai-ecoverse/slicc-spectrum@1.104.1':
|
|
@@ -221,7 +221,7 @@ snapshots:
|
|
|
221
221
|
|
|
222
222
|
'@ai-ecoverse/slicc-clipboard@1.1.1': {}
|
|
223
223
|
|
|
224
|
-
'@ai-ecoverse/slicc-kernel@1.
|
|
224
|
+
'@ai-ecoverse/slicc-kernel@1.159.4': {}
|
|
225
225
|
|
|
226
226
|
'@ai-ecoverse/slicc-spectrum@1.104.1': {}
|
|
227
227
|
|