@ai-ecoverse/slicc-bios 2.8.0 → 2.8.2
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
|
@@ -542,13 +542,13 @@ Programs ask seven's page for what only a page can do through the kernel's `/dev
|
|
|
542
542
|
- **Before the body:** the same switch, the same refusals and the same gesture check as `serve.publish`, with "Publish a snapshot of /home/site (2 files, 1.8 KiB) at a public URL for 7 days?" (dismissed texts `the request to publish the snapshot was dismissed`, `nobody answered the request to publish the snapshot within 60 s`).
|
|
543
543
|
- **Upload:** the page mints `{servedRoot, entryPath, allowLive: false, ttlMs}` with the controller token, keeps the hub's `uploadToken` in memory only, reads the body file by file and `PUT`s each to `…/preview/<token>/file?path=<path>` with the upload token and its `Content-Type`, four at a time, reporting `uploaded 12 of 40 files` through `request.progress`, then `POST`s `…/finalize`. On `*.sliccy.ai` both go through sliccy-ai's same-origin proxy ([sliccy-ai#162](https://github.com/ai-ecoverse/sliccy-ai/pull/162)).
|
|
544
544
|
- **The reply:** one line `{"url","previewToken","trayId"?,"expiresAt","files","bytes"}` (`expiresAt` is the finalize time plus `ttlMs`, in ms since the epoch).
|
|
545
|
-
- **Failures** answer at once, without reading the rest of the body, and stop whatever was minted on the hub. A body that breaks the rules, or whose files and bytes don't add up to exactly `files` and `bytes`, is `EIO`, `bad snapshot body: <what>`. A refusal the hub answered is the reply line of `serve.publish` with `"during": "mint"`, `"upload"` (and its `"path"`) or `"finalize"`. A hub that can't be reached is `EIO`. A program that goes away
|
|
545
|
+
- **Failures** answer at once, without reading the rest of the body, and stop whatever was minted on the hub. A body that breaks the rules, or whose files and bytes don't add up to exactly `files` and `bytes`, is `EIO`, `bad snapshot body: <what>`. A refusal the hub answered is the reply line of `serve.publish` with `"during": "mint"`, `"upload"` (and its `"path"`) or `"finalize"`. A hub that can't be reached is `EIO`. A program that goes away before the page has written its reply aborts the request, and the snapshot is stopped on the hub, even when its finalize was in flight and succeeds (#1801); once the reply is written, the snapshot stays, since `serve` may have read it.
|
|
546
546
|
- **Kept:** a finalized snapshot outlives the page, so seven keeps `{previewToken, url, root?, entry?, since, expiresAt, uid, trayId, files, bytes}` in `localStorage` (`slicc-os.snapshots`, out of every program's reach) until it expires or is stopped, and the boot sweep leaves persistent previews alone.
|
|
547
547
|
- **Whose:** each preview keeps the uid of the process that published it.
|
|
548
548
|
- **`serve.list`:** one JSON line per preview of the caller's uid (every one for root): a live one as `{previewToken, url, root?, port, entry?, since}`, a snapshot as `{previewToken, url, root?, entry?, since, mode: "persistent", expiresAt}` (times in ms since the epoch), and an empty reply when there are none.
|
|
549
|
-
- **`serve.stop`** (`{"kind":"serve.stop","previewToken":"…"}`, an empty reply): ends a live preview's `serve.publish` reply with `stopped with serve --stop`, or forgets a kept snapshot, 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`.
|
|
549
|
+
- **`serve.stop`** (`{"kind":"serve.stop","previewToken":"…"}`, an empty reply): ends a live preview's `serve.publish` reply with `stopped with serve --stop`, or forgets a kept snapshot once the hub has revoked it (a stop that fails keeps it, so it can be stopped again), 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`.
|
|
550
550
|
- **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.
|
|
551
|
-
- **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. `test/integration/previews-snapshot.test.mjs` sends `serve.snapshot` bodies from the terminal to a fake tray hub: three files (a 70 000-byte binary among them) uploaded with the upload token and their types and finalized, the reply, `serve.list` before and after a reload
|
|
551
|
+
- **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. `test/integration/previews-snapshot.test.mjs` sends `serve.snapshot` bodies from the terminal to a fake tray hub: three files (a 70 000-byte binary among them) uploaded with the upload token and their types and finalized, the reply, `serve.list` before and after a reload whose boot sweep revokes an orphan and not the snapshot, an upload the hub refuses (`during: "upload"` with its path, then stopped), a body that announces fewer bytes than it carries (`EIO`, stopped), a mint refused with `PREVIEW_LIMIT`, a program killed while the hub holds its finalize (the finalize is released once the program is gone from `ps`; the snapshot is stopped and not kept), the switch off, a `serve.stop` the hub fails (non-zero, and `serve.list` still shows the snapshot), and a second `serve.stop`, after which the hub no longer serves it and `localStorage` keeps nothing.
|
|
552
552
|
- Kinds seven doesn't list (`open.file`, `open.download`, `open.reveal`, `clipboard.read`) are `ENOTSUP` before the page sees them.
|
|
553
553
|
|
|
554
554
|
### Composer recording
|
|
@@ -640,7 +640,7 @@ A browser extension's frame inside an ordinary page, such as a password manager'
|
|
|
640
640
|
- **Another extension's frame in the tab:** while another browser extension has a frame in a tab, such as iCloud Passwords' autofill list after a username field is focused, Chrome refuses slicc-extension's debugger there (`Cannot access a chrome-extension:// URL of different extension`), and it may detach the debugger the moment the frame appears. When the guard's own attach to that tab fails this way, the program's `Target.attachToTarget` gets slicc-extension's refusal (*another browser extension has a frame in this tab…*), not *the guard couldn't keep seven's pages…*. The guard's watch on a tab that failed, or that Chrome detached, is started again at the program's next `Target.attachToTarget`, with the same `Fetch` arm, placement and checks as a new tab, so the tab works again as soon as the frame is gone (focusing an ordinary field removes iCloud's), without a reload. A watch that failed because the tab is protected, or one that saw a protected document, isn't started again.
|
|
641
641
|
- **Linked browsers:** a linked computer's own `slicc` at **1.64.0 or later** admits the same stock-client setup calls on its link guard, so with that CLI the link route declares `stockSetup` (and `forwardAudit`) and stock Playwright and Puppeteer drive ordinary pages through bios's guard and the link guard in series, as a remote device. An older linked CLI keeps its own refusal texts and cannot open those pages; the stock-client link-route test skips when the pinned `@ai-ecoverse/slicc` is older than 1.64.0. The link route does not declare `syntheticAutoAttach` (the link guard delivers tab targets natively). Puppeteer reads cross-site iframes on this route too: each iframe target is judged like a page (see the stock clients' setup above). With slicc 1.67.4, `C3.tab-attach` and `C3.tab-iframe-leak` pass on the link route with no stated waiver. `C3.protected-service-worker` skips on every bios route (`not-supported:secureOrigin`).
|
|
642
642
|
|
|
643
|
-
- **Known limit:** slicc-extension 7.12.0 and later expose `sliccExtension.frames(tabId)`, and seven hands it to the guard, so an ordinary page with a cross-site iframe is placed and stays drivable. An older extension (7.10.0 and 7.11.x, which seven still supports) has no `frames()`, so the guard can't place the cross-site child and fails closed: the page stays locked for paint, DOM, CSS, accessibility and input, while Runtime reads still work. Once the cross-site frame is gone, the page is drivable again. `guard-paint-extension-frameless.test.mjs` asserts that limit. Extensions before 7.15.0 lock a page with an error iframe on the extension route the same way: they report the failed frame only as `kind: 'error'`, without `errorProtected`, so the guard keeps the lock. From 7.15.0 only protected error frames lock: an error entry with `errorProtected: false` counts as ordinary and the page is placed, while `true`, missing or anything else keeps the lock, and a protected frame next to it revokes the page. `guard-extension-error-frame.test.mjs` keeps the lock row for the older fake (`OLDER_FAKE`, 7.12.2) and the place and lock rows for the
|
|
643
|
+
- **Known limit:** slicc-extension 7.12.0 and later expose `sliccExtension.frames(tabId)`, and seven hands it to the guard, so an ordinary page with a cross-site iframe is placed and stays drivable. An older extension (7.10.0 and 7.11.x, which seven still supports) has no `frames()`, so the guard can't place the cross-site child and fails closed: the page stays locked for paint, DOM, CSS, accessibility and input, while Runtime reads still work. Once the cross-site frame is gone, the page is drivable again. `guard-paint-extension-frameless.test.mjs` asserts that limit. Extensions before 7.15.0 lock a page with an error iframe on the extension route the same way: they report the failed frame only as `kind: 'error'`, without `errorProtected`, so the guard keeps the lock. From 7.15.0 only protected error frames lock: an error entry with `errorProtected: false` counts as ordinary and the page is placed, while `true`, missing or anything else keeps the lock, and a protected frame next to it revokes the page. `guard-extension-error-frame.test.mjs` keeps the lock row for the older fake (`OLDER_FAKE`, 7.12.2) and the place and lock rows for the fake at the current extension version (`CURRENT_EXTENSION`). The shared vectors gate `C8.iframe-error` on that capability (`errorFrameClass`, slicc-browsers 1.27.3): the DevTools and link paths declare it and run the row, and the extension path declares it when the fake states 7.15.0 or later (`sendsErrorProtected`), so C8.iframe-error runs there with both variants while a protected error iframe stays locked.
|
|
644
644
|
|
|
645
645
|
**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 cannot scrub a page's own content. The owner holds it before sign-in starts. A held tab and its descendants are not listed, attached, auto-attached or reported to a program on any origin until they close. bios's own tests and real-Chrome rows check the hold; the shared `C7.sign-in-hold` vectors of slicc-browsers can't measure it until the sign-in hooks (slicc-browsers#318) ship, so the guard-set harness declares `signInHold` false until then, and #1641 sets it true with the hooks.
|
|
646
646
|
- **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 (slicc-extension, a DevTools port, and a `seven: true` browser from a CLI linked on this computer), holds it, and only then is the popup sent to the IdP. slicc-cli's link guard shows seven's own popup to bios as plain `about:blank`, without the marker, so on a linked browser the owner goes by a baseline instead. Before it opens the popup, the sign-in asks the owner for a baseline (`{ type: 'base', marker }`). The owner lists every linked browser and keeps the ids it saw for that marker. Only then does it answer `based`, and only then does the sign-in open the popup. Its hold ask then says `based: true` and `expect: 1`, the number of popups the sign-in opened. On each linked browser, the owner holds, as soon as it sees them, every page on `about:blank` that one of seven's or the vault's pages opened and that wasn't in the baseline. Every listing it takes starts after `window.open` has returned. It answers `held` only when two listings in a row show the same new pages, the number of new pages it has seen in all equals `expect`, and all of them are held. If it sees more new pages than that, such as a blank another seven page opened at the same moment, it can't tell which one is the sign-in. It keeps them all held and answers `unheld`, so the sign-in stops before the IdP, and trying again works. If it sees fewer by the end of the hold's 5 s, it answers `unheld` too. `held` means the owner holds as many new pages as the sign-in opened, not that the popup is one of them: a blank another seven page opened, listed alone in two listings in a row while the popup isn't listed yet, gets `held` too. So when a linked browser took part in the ask, a `held` answer also puts the sign-in in flight, as a linked flight. The flight rule for it applies only on linked browsers: while a linked flight is on, the watcher and the sweep on a linked browser, and a program's guard on the link route, hold for life every page that one of seven's or the vault's pages opened, cross-origin pages included, as soon as they see it. A program's guard on slicc-extension and a DevTools port honours a `none` flight, as the watcher and sweep there do, but a linked flight changes nothing on those hosts, so a tab seven opens there, noopener included, stays listed and drivable as before, and their sign-in tabs are held by the marker. So the popup is held on whatever page it is first seen on: the authorize URL, a landing page IMS redirected to before anything listed it, or the login page. That doesn't depend on its URL naming seven's client id or callback, and its later pages (login, MFA, consent) stay held. The other page's blank that got the answer stays held as well: a hold is never released (#754), and the opener rules hold a protected `about:blank` anyway. A protected `about:blank` page that was already open, such as a leftover vault, MCP or sprinkle popup, is no longer taken for the sign-in, and the sign-in's hold doesn't take it. The owner takes one baseline at a time: the next sign-in's baseline waits until the previous sign-in's hold is answered, or 5 s after its baseline when no hold came, so an overlapping sign-in's baseline already lists the earlier popup. The sign-in fails closed in each of these cases: no `based` answer within 6 s while bios sees a host; a linked browser the owner couldn't list at the baseline, or one that wasn't there then; a baseline that was lost or expired; no new protected `about:blank` within the 5 s. Each says it couldn't keep the window out of reach. The marker hosts (slicc-extension, a DevTools port) still go by the marker, as before, and ignore the baseline. A hold ask without `based`, such as the agent's MCP OAuth and device-code popups, still holds every protected `about:blank` page on a linked browser, as before. The sweep, the watcher and the guard then treat a held tab on a linked browser as on the other hosts: it isn't listed, attached or read on any later page until it closes. 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 in flight too, as before: that flight counts on every host, for the watcher and the sweep. A flight is kept per marker in `localStorage` (`slicc-os.sign-in-flight`, so a reload keeps it) for at most 11 minutes, with whether it is linked. An older bios's plain number still counts on every host; an entry that doesn't say whether it is linked counts as linked. The reverse doesn't hold: an older bios still running in another seven tab can't read the new entries and sees no flight, which only matters while tabs of both versions are open during an update. Seven's sign-in ends its own flight when it ends (its token, an error, Cancel or the timeout), so one sign-in ending doesn't end another's, in this tab or another. 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.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-ecoverse/slicc-bios",
|
|
3
|
-
"version": "2.8.
|
|
3
|
+
"version": "2.8.2",
|
|
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",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@ai-ecoverse/slicc": "1.69.4",
|
|
53
53
|
"@ai-ecoverse/slicc-browsers": "1.27.3",
|
|
54
|
-
"@ai-ecoverse/slicc-cdp": "2.1.
|
|
54
|
+
"@ai-ecoverse/slicc-cdp": "2.1.10",
|
|
55
55
|
"@ai-ecoverse/slicc-kernel": "1.191.4",
|
|
56
56
|
"@ai-ecoverse/slicc-shared-web": "2.16.1",
|
|
57
57
|
"@ai-ecoverse/slicc-spectrum": "2.19.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": "8.
|
|
6
|
+
"@ai-ecoverse/slicc-agent": "8.2.0",
|
|
7
7
|
"@ai-ecoverse/slicc-kernel": "1.191.4"
|
|
8
8
|
}
|
|
9
9
|
}
|
|
@@ -14,16 +14,16 @@ importers:
|
|
|
14
14
|
.:
|
|
15
15
|
dependencies:
|
|
16
16
|
'@ai-ecoverse/slicc-agent':
|
|
17
|
-
specifier: 8.
|
|
18
|
-
version: 8.
|
|
17
|
+
specifier: 8.2.0
|
|
18
|
+
version: 8.2.0(@ai-ecoverse/slicc-kernel@1.191.4)(@aws-sdk/credential-provider-node@3.972.84)(@smithy/signature-v4@5.7.4)
|
|
19
19
|
'@ai-ecoverse/slicc-kernel':
|
|
20
20
|
specifier: 1.191.4
|
|
21
21
|
version: 1.191.4
|
|
22
22
|
|
|
23
23
|
packages:
|
|
24
24
|
|
|
25
|
-
'@ai-ecoverse/slicc-agent@8.
|
|
26
|
-
resolution: {integrity: sha512-
|
|
25
|
+
'@ai-ecoverse/slicc-agent@8.2.0':
|
|
26
|
+
resolution: {integrity: sha512-oYxpilJDwmEC8DhzDgqG5gXH6n/HH93sZbBjOVd0Mw+Dyce+iCY3nmc2YeVFCSVMpOohvCOWrR1a2wCDm8QsQQ==}
|
|
27
27
|
engines: {node: '>=24'}
|
|
28
28
|
peerDependencies:
|
|
29
29
|
'@ai-ecoverse/slicc-kernel': '>=1.172.2 <2'
|
|
@@ -343,7 +343,7 @@ packages:
|
|
|
343
343
|
|
|
344
344
|
snapshots:
|
|
345
345
|
|
|
346
|
-
'@ai-ecoverse/slicc-agent@8.
|
|
346
|
+
'@ai-ecoverse/slicc-agent@8.2.0(@ai-ecoverse/slicc-kernel@1.191.4)(@aws-sdk/credential-provider-node@3.972.84)(@smithy/signature-v4@5.7.4)':
|
|
347
347
|
dependencies:
|
|
348
348
|
'@ai-ecoverse/slicc-kernel': 1.191.4
|
|
349
349
|
'@aws-sdk/middleware-websocket': 3.972.54
|