@ai-ecoverse/slicc-bios 1.69.1 → 1.70.1

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
@@ -65,7 +65,7 @@ The kernel's root is the OPFS root, so any file a kernel process writes, such as
65
65
  - the aliases `/auth/callback` (→ `/os/callback.html`, only on an origin of seven's own) and `/oauth/mcp-callback` (→ the agent's `dist/oauth/mcp-callback.html`), the node builtin stubs under `/__slicc/node/`, and `/os/manifest.json`, a redirect to the BIOS's `manifest.json`, so the manifest's relative icons and `start_url` resolve in the BIOS's folder;
66
66
  - bios's own files, in the BIOS's folder (`index.html`, `bios.js`, `bios.css`, `installer.js`, `sw.js`, `manifest.json`, and `sw/`, `seed/`, `packages/` and `icons/`), and `/fonts/`, which always come from the network, even when OPFS has a file of that name.
67
67
 
68
- The live content also carries `Content-Security-Policy: frame-ancestors 'self'` and `X-Frame-Options: SAMEORIGIN`, so only seven's own pages can frame it. That leaves no clickjacking and no framed captures of seven by another site. The hosting sends the same headers for the files it serves itself (sliccy-ai#22).
68
+ The live content also carries `Content-Security-Policy: frame-ancestors 'self'` and `X-Frame-Options: SAMEORIGIN`, so only seven's own pages can frame it. The one exception is `/os/` itself, which slicc-extension's side panel may frame too (see [In slicc-extension's side panel](#in-slicc-extensions-side-panel)). That leaves no clickjacking and no framed captures of seven by another site. The hosting sends the same headers for the files it serves itself (sliccy-ai#22).
69
69
 
70
70
  Seven's documents are never kept in the back/forward cache. The service worker sends every HTML document it serves from OPFS (seven's own pages and sandboxed files alike), and the BIOS page when it's a document navigation, with `Permissions-Policy: unload=(self)` and `Cache-Control: no-store`. The BIOS page, `/os/` (`os/start.js`, which stays import-free so an uncontrolled `/os/` still reaches the BIOS) and the guest page (`os/join.js`) each keep an `unload` listener, and Chrome doesn't cache a page with one (`UnloadHandlerExistsInMainFrame`). As a belt, a page that is restored anyway (`pageshow` with `persisted`) reloads itself. `no-store` alone doesn't keep a page out of the cache on current Chrome, which restores no-store pages unless cookies change. `bfcache.test.mjs` goes back to `/os/` from another page and fails with *BFCache exclusion lost: only the guard protects seven now* if Chrome restores it or stops naming the unload handler.
71
71
 
@@ -98,7 +98,7 @@ On a shared origin, the BIOS moves SLICC 6 into seven in this browser once, afte
98
98
  - **Moving:** the BIOS frames `/upgrade-to-seven.html` hidden, on the same origin. The page starts on load, stops six's tabs and posts `{ type: 'slicc-six-upgrade', … }` to its parent. The BIOS listens only to messages whose `origin` is its own and whose `source` is that frame. Progress shows under the question: *Stopping SLICC 6 tabs…*, then *Reading files: 120 of 1,240* (`reading` counts the files under `/slicc-fs` it reads) and *Writing the export: 3 of 9* (`writing` counts the entries it writes, `manifest.json` last); two minutes without a message fail the move.
99
99
  - **Success** (`done: true`, `exportId`, `dir = /slicc-v6-upgrade/<exportId>/`): while the frame still holds six's `slicc-six-kernel` lock, the BIOS sets `slicc-os.six = upgraded` and `slicc-os.six-import = <dir>`, sets the cookie `__Host-slicc-six-retired` (`Path=/`, `Secure`, `SameSite=Strict`), unregisters every service worker under `/preview/`, and removes every other directory under `/slicc-v6-upgrade/` (interrupted runs). Only then does the frame go, so a six tab opened in between sees the marker and stays down.
100
100
  - **Failure** (`error`) removes the frame and sets nothing, so six keeps working. The BIOS shows the error with **Try again** and **Not now**.
101
- - **Retired:** every later BIOS boot sets the cookie and unregisters `/preview/` again, and so does every start of `/os/` while the marker is set (`/` no longer reaches the BIOS). That also renews the cookie, which Chrome keeps for at most 400 days. The service worker answers a navigation to `/` (whatever its query, so six's extension's `?slicc=leader&ext=…` and `?cherry=1&ui-only=1` too) with a redirect to `/os/` once the cookie is set, reading it with `cookieStore` on every such navigation. Only a window can set that cookie: kernel processes run in dedicated workers, which have neither `document.cookie` nor `cookieStore`. The extension's leader tab then shows seven; its side panel can't show `/os/` in its frame, so it just stops working. It always passes `/upgrade-to-seven.html` and `/assets/*` to the network on a shared origin, even when OPFS has files there: on www, `/assets/` belongs to SLICC 6 (its exporter's hashed chunks), so seven keeps nothing of its own there, and a kernel process can't plant an exporter page or script for the BIOS to frame.
101
+ - **Retired:** every later BIOS boot sets the cookie and unregisters `/preview/` again, and so does every start of `/os/` while the marker is set (`/` no longer reaches the BIOS). That also renews the cookie, which Chrome keeps for at most 400 days. The service worker answers a navigation to `/` (whatever its query, so six's extension's `?slicc=leader&ext=…` and `?cherry=1&ui-only=1` too) with a redirect to `/os/` once the cookie is set, reading it with `cookieStore` on every such navigation. Only a window can set that cookie: kernel processes run in dedicated workers, which have neither `document.cookie` nor `cookieStore`. The extension's leader tab then shows seven, and its side panel shows `/os/` as a follower (see [In slicc-extension's side panel](#in-slicc-extensions-side-panel)). It always passes `/upgrade-to-seven.html` and `/assets/*` to the network on a shared origin, even when OPFS has files there: on www, `/assets/` belongs to SLICC 6 (its exporter's hashed chunks), so seven keeps nothing of its own there, and a kernel process can't plant an exporter page or script for the BIOS to frame.
102
102
  - **Opening seven:** after an upgrade on exactly `www.sliccy.ai`, each boot renews `slicc-home=www` (`Domain=sliccy.ai`, `Path=/`, `Secure`, `SameSite=Lax`, 400 days). Only a top-level BIOS on exactly `seven.sliccy.ai` follows it to `https://www.sliccy.ai/7/`, keeping the fragment, and only if its own OPFS `os/` directory is absent. Other cookie values and hosts are ignored. `?stay` clears the cookie, removes the flag and boots here.
103
103
  - **The import:** once the agent runs on `/os/`, `os/six.js` hands `slicc-os.six-import` to it with `control.importProfile({ inPlace })`. The agent moves the files out of `/slicc-fs`, and deletes the directory on success; the key goes then. An import that fails or throws keeps the key and shows a notice, and the next start tries again. Closing the notice hides it until the next start; its **Stop trying** drops the key, so seven stops trying and leaves SLICC 6's files where they are (in `/slicc-fs` and the export directory). A key whose directory has no readable `manifest.json` stays too, with the same notice, and nothing moves; only leftover directories that no key names are ignored. Tabs take turns under the Web Lock `slicc-os.six-import` and read the key again once they hold it.
104
104
 
@@ -234,6 +234,14 @@ Each tab picks its own cone. A follower can't mount folders, since the kernel's
234
234
 
235
235
  **When the owner closes, reloads or crashes,** the first waiting tab gets the lock and becomes the owner in place: it starts a kernel and the agent, which resumes from SQLite. Terminals in every tab print `[the tab running SLICC closed; starting a new shell]` and open a new shell on the new kernel. Anything typed meanwhile goes to the new shell once it has printed its prompt, so it shows once.
236
236
 
237
+ **In slicc-extension's side panel.** Once slicc-extension's leader tab on `www.sliccy.ai` shows seven, the extension frames `https://www.sliccy.ai/os/` in its side panel (ai-ecoverse/slicc-extension#361).
238
+ - **Who may frame it:** the service worker sends `/os/` itself (`/os/index.html`, the OPFS UI page) with `frame-ancestors 'self' chrome-extension://akjjllgokmbgpbdbmafpiefnhidlmbgf`, the Web Store build's id. Chrome ignores `X-Frame-Options` when `frame-ancestors` is there. Every other response keeps `frame-ancestors 'self'`: the UI's other files, `/node_modules/`, `/opt/agent/`, sandboxed OPFS files, the BIOS and the callback.
239
+ - **Why that's safe:** an extension's id is the hash of its public key, and slicc-extension's manifest pins it with `key`, so no other extension, and no web page, gets that origin. Its pages are local extension pages, not web content, so no site can overlay or frame them to clickjack seven. An unpacked copy carrying the same `key` is something only the browser's owner can load.
240
+ - **Shared storage:** Chrome gives a site framed by an extension page with host access its top-level storage, so the panel reaches the same service worker, OPFS, switchboard and Web Locks as seven's tabs.
241
+ - **Always a follower:** the frame isn't cross-origin isolated, so it can't run a kernel. When `os/tabs.js` finds that the page's only ancestor is that extension (`inPanel()`), `claim()` never asks for the `slicc-agent` lock: it follows the owner, and when the owner closes it waits for another tab to take over instead of taking over itself. It sets no capture handle, which Chrome allows only in a top-level page.
242
+ - **What it tells the extension:** `{ type: 'slicc-seven-panel', role, stalled, skew }`, posted to the extension's origin whenever `model.tabs` changes. The extension shows the frame once `role` is `follower`; it reads `connecting` while no tab owns the kernel.
243
+ - **Tests:** `extension-panel.test.mjs` boots seven, frames `/os/` from a fixture extension that has slicc-extension's key, runs a command in the panel's terminal on the owner's kernel, closes the owner, and checks that the panel neither holds nor asks for the lock and follows the next tab that boots. It also checks that another extension and a cross-origin page get Chrome's error page in place of `/os/`. `sandbox.test.mjs` and `address.test.mjs` pin the policies of `/os/` and of the paths next to it.
244
+
237
245
  **`model.tabs`** says what this tab is:
238
246
  - `role`: `owner`, `follower`, `connecting`, or `alone` (without SharedWorker, a second tab shows only "SLICC is open in another tab");
239
247
  - `stalled`: the owner hasn't answered for 5 s, typically because Chrome froze it;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-ecoverse/slicc-bios",
3
- "version": "1.69.1",
3
+ "version": "1.70.1",
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",
@@ -49,13 +49,13 @@
49
49
  "format": "biome check --write ."
50
50
  },
51
51
  "devDependencies": {
52
- "@ai-ecoverse/slicc": "1.67.1",
52
+ "@ai-ecoverse/slicc": "1.67.3",
53
53
  "@ai-ecoverse/slicc-browsers": "1.23.0",
54
54
  "@ai-ecoverse/slicc-cdp": "1.48.10",
55
55
  "@ai-ecoverse/slicc-kernel": "1.179.0",
56
56
  "@ai-ecoverse/slicc-shared-web": "2.14.2",
57
57
  "@ai-ecoverse/slicc-spectrum": "2.11.2",
58
- "@ai-ecoverse/slicc-vault": "1.25.2",
58
+ "@ai-ecoverse/slicc-vault": "1.25.3",
59
59
  "@biomejs/biome": "2.6.5",
60
60
  "aws4fetch": "1.0.20",
61
61
  "es-module-lexer": "3.0.4",
@@ -3,7 +3,7 @@
3
3
  "private": true,
4
4
  "description": "SLICC's agent, which the UI installs with pnpm in the background into /opt/agent in OPFS",
5
5
  "dependencies": {
6
- "@ai-ecoverse/slicc-agent": "7.30.0",
6
+ "@ai-ecoverse/slicc-agent": "7.31.0",
7
7
  "@ai-ecoverse/slicc-kernel": "1.179.0"
8
8
  }
9
9
  }
@@ -14,8 +14,8 @@ importers:
14
14
  .:
15
15
  dependencies:
16
16
  '@ai-ecoverse/slicc-agent':
17
- specifier: 7.30.0
18
- version: 7.30.0(@ai-ecoverse/slicc-kernel@1.179.0)(@aws-sdk/credential-provider-node@3.972.84)(@smithy/signature-v4@5.7.4)
17
+ specifier: 7.31.0
18
+ version: 7.31.0(@ai-ecoverse/slicc-kernel@1.179.0)(@aws-sdk/credential-provider-node@3.972.84)(@smithy/signature-v4@5.7.4)
19
19
  '@ai-ecoverse/slicc-kernel':
20
20
  specifier: 1.179.0
21
21
  version: 1.179.0
@@ -25,8 +25,8 @@ packages:
25
25
  '@ai-ecoverse/jerk-oauth@1.9.1':
26
26
  resolution: {integrity: sha512-br/yGRwJr9Ah58B8FMr6RGadIJfYm6y/qbUuHKYDEEmwYoiLXqEX6X8cuyZJwWBjggqdIqr4Im+4zZXlmi2q4Q==}
27
27
 
28
- '@ai-ecoverse/slicc-agent@7.30.0':
29
- resolution: {integrity: sha512-sciZ/2kl+TNVFOjd4dwvjsYtiU2vjT4mMYPxGOLjeVtM7Qd9sVYtAYpkoEFik2VR1cVArpTb1iOfwVrAFuyfQg==}
28
+ '@ai-ecoverse/slicc-agent@7.31.0':
29
+ resolution: {integrity: sha512-LMgAvxWgM7q1fec0Gt+oyq6tl+ySOeb0YVjPvxeqTQZwNYUF6lNIC2/+en1NBaUMqp5XDEa2dcpU6CYb0z0+bA==}
30
30
  engines: {node: '>=24'}
31
31
  peerDependencies:
32
32
  '@ai-ecoverse/slicc-kernel': '>=1.172.2 <2'
@@ -43,8 +43,8 @@ packages:
43
43
  resolution: {integrity: sha512-HZ5qVnVez4B2UTP+UrHbYg6GnHJjpT09byt/HHJ8Y0IRk13q5Oj8rFFCme+R0T5h42ZlmwaNVI+n77VtSaCtuA==}
44
44
  engines: {node: '>=24'}
45
45
 
46
- '@ai-ecoverse/slicc-vault@1.25.2':
47
- resolution: {integrity: sha512-IoR/ALqnJzdbA6hnQ4CwbPGseqJvtBsjrENGPJ8RniD4Um5wJjfseEpM7rP2ZN+GnjL/PQicfuVKXl9isbe9Lg==}
46
+ '@ai-ecoverse/slicc-vault@1.25.3':
47
+ resolution: {integrity: sha512-ZxG6XRVRWLrm3CcTibFIt3OHGs9oO6H/5IS/Sq+ZIoZCuqMKF1hi5PvVK8HCEMyVfFylKusUGFDKnN9NT4iV9g==}
48
48
  engines: {node: '>=24'}
49
49
 
50
50
  '@anthropic-ai/sdk@0.129.0':
@@ -351,10 +351,10 @@ snapshots:
351
351
 
352
352
  '@ai-ecoverse/jerk-oauth@1.9.1': {}
353
353
 
354
- '@ai-ecoverse/slicc-agent@7.30.0(@ai-ecoverse/slicc-kernel@1.179.0)(@aws-sdk/credential-provider-node@3.972.84)(@smithy/signature-v4@5.7.4)':
354
+ '@ai-ecoverse/slicc-agent@7.31.0(@ai-ecoverse/slicc-kernel@1.179.0)(@aws-sdk/credential-provider-node@3.972.84)(@smithy/signature-v4@5.7.4)':
355
355
  dependencies:
356
356
  '@ai-ecoverse/slicc-kernel': 1.179.0
357
- '@ai-ecoverse/slicc-vault': 1.25.2
357
+ '@ai-ecoverse/slicc-vault': 1.25.3
358
358
  '@aws-sdk/middleware-websocket': 3.972.54
359
359
  '@earendil-works/chord': 1.5.0
360
360
  '@earendil-works/pi-ai': 1.5.0(@aws-sdk/credential-provider-node@3.972.84)(@smithy/signature-v4@5.7.4)
@@ -381,7 +381,7 @@ snapshots:
381
381
 
382
382
  '@ai-ecoverse/slicc-scrub@1.1.0': {}
383
383
 
384
- '@ai-ecoverse/slicc-vault@1.25.2':
384
+ '@ai-ecoverse/slicc-vault@1.25.3':
385
385
  dependencies:
386
386
  '@ai-ecoverse/jerk-oauth': 1.9.1
387
387
  '@ai-ecoverse/slicc-scrub': 1.1.0