@ai-ecoverse/slicc-bios 2.6.0 → 2.6.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 +4 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -570,7 +570,7 @@ The choice is in `document.documentElement.dataset.transport`: `extension` or `p
|
|
|
570
570
|
|
|
571
571
|
Programs in the kernel drive a browser over the Chrome DevTools Protocol: `playwright-cli` and `curlwright` ([slicc-cdp](https://github.com/ai-ecoverse/slicc-cdp), in the base set) or anything else that reads `SLICC_CDP_URL`. The kernel's facade on `127.0.0.1:9222` takes connections only from programs inside the kernel. `playwright-cli route`, `route-list` and `unroute` (slicc-cdp ≥ 1.10.0) fulfil or change a tab's requests through `Fetch` on that tab's session while a command runs. A pattern that names a protected host is refused, and a request to a protected origin is never routed. slicc-cdp ≥ 1.11.2 keeps the protected origins out of reach on its own side too: `tab-list` leaves protected tabs out, a command that names one with `--tab` exits 1, `open` and `goto` refuse protected URLs, and a tab it touches can't load a protected document (a script, link, meta refresh or redirect into one gets Chrome's error page). It hands each one to the `cdp` hook that `os/cdp.js` gives `createKernel`, and the hook connects it to a host:
|
|
572
572
|
|
|
573
|
-
1. **[slicc-extension](https://github.com/ai-ecoverse/slicc-extension):** browser automation through the extension requires **7.10.0 or later**. When a supported extension defines `sliccExtension.cdp`, its `chrome.debugger` bridge drives the Chrome that seven runs in. Every program connection shares the page's one extension port. The hook gives each connection only the answers to its own commands and the events of the sessions it attached, and on close it detaches every session the connection attached.
|
|
573
|
+
1. **[slicc-extension](https://github.com/ai-ecoverse/slicc-extension):** browser automation through the extension requires **7.10.0 or later**. When a supported extension defines `sliccExtension.cdp`, its `chrome.debugger` bridge drives the Chrome that seven runs in. Every program connection shares the page's one extension port. The hook gives each connection only the answers to its own commands and the events of the sessions it attached, and on close it detaches every session the connection attached. A page with a cross-process iframe is placed through the extension's private frame list (`sliccExtension.frames(tabId)`, a version 2 reply with each frame's `kind`); until then paint, DOM, input and `Debugger` stay locked there. A failed (error) iframe counts as ordinary only when the extension marks it `errorProtected: false`, which slicc-extension does from **7.15.0** for a plain failed `http(s)` address that isn't protected and names no sign-in callback. So extensions before 7.15.0 lock a page with an error iframe, and from 7.15.0 only protected error frames lock it: `errorProtected` true, missing or anything but `false` keeps the lock, and a protected frame next to it revokes the page. The extension computes `errorProtected` itself from the failed URL (the protected origins and the sign-in markers `redirect_uri=`, `client_id=` and `/auth/callback`); only 7.15.0 and later send it, and a missing value, as from an older extension, counts as protected. Browser automation still needs only 7.10.0.
|
|
574
574
|
|
|
575
575
|
2. **The browser's own DevTools port:** a browser can offer a page of an origin it allows a CDP endpoint, as `crestDevTools.webSocketDebuggerUrl` (Crest does, on iOS and the Mac), and announce it with the `crestdevtools` event when it arrives after the page started. Seven reads the endpoint each time it connects, because it changes when the port reopens, and opens one socket per program connection, with flat sessions. It says `Slicc.action` first, which tells the browser this client dispatches its own input when none lands, so nothing is delivered twice. A port whose pages can't report child frames answers `Target.setAutoAttach` with *not found*. Seven passes that to the guard as the extension's refusal, so a page whose iframe the port reports stays locked for paint, DOM and input, and a page without one works.
|
|
576
576
|
|
|
@@ -601,7 +601,7 @@ Everything a kernel program, the agent or a linked CLI gets goes through `browse
|
|
|
601
601
|
|
|
602
602
|
A browser extension's frame inside an ordinary page, such as a password manager's autofill list, does not lock the tab once the linked CLI marks the owner iframe with `sliccExtensionFrame` (version 1). Without that marker the guard behaves as on main. The frame itself stays unattachable and unread, and its URL never appears in discovery, page reads, snapshots, accessibility trees or evaluate results as plain text: redaction is text-based, so an encoded form such as `btoa(iframe.src)` can still pass. The tab's own page stays readable and snapshottable. Screenshots and input are admitted only while every such frame is hidden (no layout box or `visibility: hidden`) and none holds focus through nested documents or shadow roots; when the marker omits `hidden`/`focused`, the guard's own live check must say the same. A screenshot taken while one became shown is thrown away. Opacity and off-screen position do not count as hidden. Whole-page captures and starting a screencast are refused while any extension frame is present; a running screencast is stopped or its later frames are dropped until the frame is gone. A frame from seven's own extension, and any other protected frame, still locks the whole tab. Real-Chrome C9.frame rows stay capability-gated off until a follow-up pins a slicc-cli release that emits the marker (expected after 1.61.12). A race between the visibility or focus check and the CDP reply is an accepted limit.
|
|
603
603
|
- **Hidden targets:** `Target.getTargets` and the target events leave protected targets out.
|
|
604
|
-
- **Iframes are judged by their ancestry:** an `iframe` target counts as protected when its own URL is protected, or when its parent is protected, held or protected in turn. A sandboxed `about:srcdoc` frame in seven's page (a sprinkle) and an ordinary frame nested in a vault page are protected this way. The guard learns the parent from Chrome's `parentId`, from the session the iframe attached under, and from the frame chain it has recorded (`parentFrameId` and `Page.frameAttached`). An iframe is protected when these sources disagree, or when none of them names a parent. A protected iframe is left out of `Target.getTargets` and discovery events, and `Target.getTargetInfo` and `Target.attachToTarget` naming it are refused. Before every command on an iframe session, the guard reads that whole ancestry again: if any target in it has turned protected or held, or Chrome has detached the session the iframe attached under, the command is refused and the session cut. When the guard cuts a session, it first cuts every iframe session under that session's target, including iframes attached directly from the browser session.
|
|
604
|
+
- **Iframes are judged by their ancestry:** an `iframe` target counts as protected when its own URL is protected, or when its parent is protected, held or protected in turn. A sandboxed `about:srcdoc` frame in seven's page (a sprinkle) and an ordinary frame nested in a vault page are protected this way. The guard learns the parent from Chrome's `parentId`, from the session the iframe attached under, and from the frame chain it has recorded (`parentFrameId` and `Page.frameAttached`). An iframe is protected when these sources disagree, or when none of them names a parent. A protected iframe is left out of `Target.getTargets` and discovery events, and `Target.getTargetInfo` and `Target.attachToTarget` naming it are refused. Before every command on an iframe session, the guard reads that whole ancestry again: if any target in it has turned protected or held, or Chrome has detached the session the iframe attached under, the command is refused and the session cut. When the guard cuts a session, it first cuts every iframe session under that session's target, including iframes attached directly from the browser session.
|
|
605
605
|
- **Workers are judged by their parents too:** a target that is not an iframe (a worker, a worker of a worker, any other child) counts as protected when Chrome's `parentId` names a target that is protected, held, or refused in turn, whatever the child's own URL, so a worker that a protected-URL iframe or one of seven's pages created can't be described, attached by id or listed. The guard walks the whole parent chain; a cycle, a missing parent or a chain deeper than 64 fails closed, and none of these holds a target. While a parent in that chain is a page the guard opened for `Target.createTarget` whose first commit hasn't landed (a tab with an opener), the child is refused after the same wait as for the page itself, and a shown worker whose creator chain reaches such a page refuses its commands.
|
|
606
606
|
- **Refused commands** answer an error: any command whose `targetId` or `frameId` is a protected target (the guard asks for the target's current URL first) (`Target.attachToTarget`, `activateTarget`, `closeTarget`, `getTargetInfo`, `Browser.getWindowForTarget` and the rest, with or without a session); any command whose `url`, origin (`origin`, `securityOrigin`, `ownerOrigin`, `topLevelSite`, `scopeURL` and the like), `storageKey`, `cacheId` or cookie `domain` is protected, at any depth of its parameters, which covers navigation, `IndexedDB.*`, `CacheStorage.*`, `DOMStorage.*`, `Storage.*`, `ServiceWorker.*` and cookie writes; `Network.clearBrowserCookies`, `Storage.clearCookies`, `ServiceWorker.stopAllWorkers`, `BackgroundService.clearEvents`, `Storage.getPrivateVerificationTokens` and `Tracing.start`, which reach every origin; `Network.loadNetworkResource`, which follows redirects the guard can't see; `IO.read` and `IO.close` on a stream the guard didn't hand out in an answer; a `ServiceWorker` command for a registration or version the guard hasn't shown; `Target.detachFromTarget` of a session the connection didn't attach; and every `Fetch.*` command without a tab session, so nothing can pause the whole browser. Free-form values such as `expression` or `headers` aren't searched.
|
|
607
607
|
- **Filtered answers and events:** cookie lists leave out cookies whose domain is protected and partitioned cookies under a protected site. `Storage`, `DOMStorage`, `IndexedDB`, `CacheStorage` and `BackgroundService` events that name a protected origin are dropped, and so are service worker registrations and versions on one.
|
|
@@ -626,7 +626,7 @@ A browser extension's frame inside an ordinary page, such as a password manager'
|
|
|
626
626
|
- **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.
|
|
627
627
|
- **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`).
|
|
628
628
|
|
|
629
|
-
- **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.
|
|
629
|
+
- **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 7.15.1 fake. 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.
|
|
630
630
|
|
|
631
631
|
**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.
|
|
632
632
|
- **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.
|
|
@@ -926,7 +926,7 @@ No test calls a real model. Every test serves an empty `packages/agent/` project
|
|
|
926
926
|
[`.github/workflows/ci.yml`](.github/workflows/ci.yml) is one caller of [slicc-shared-web's pipeline](https://github.com/ai-ecoverse/slicc-shared-web#pipeline), pinned to the release `@ai-ecoverse/slicc-shared-web` has in `devDependencies` (Renovate moves both in one PR). It runs on pull requests, the merge queue and pushes to `main`:
|
|
927
927
|
|
|
928
928
|
- **Pull requests:** after lint, the pipeline's `deploy` job publishes a `bb/**` branch's preview (see [Hosting](#hosting)); the tests and reviewers get its URL as `STAGING_URL`.
|
|
929
|
-
- **Pull requests and the merge queue:** lint, then every `test/integration/*.test.mjs` split by the last runs' JUnit timings over 12 pool shards (`ci / integration`), then on a pull request the Claude and Codex reviews (`ci / review`) with this repository's `review-prompt`. The shared guard vectors run as one file per path (devtools, extension, link), target group (`seven`, `vault`, `vault-x`, `apex` and the rest, `test/integration/guard-groups.mjs`) and detach variant (`lagging` or the others), 30 files of 2 to about 12 minutes, so the split can balance them. Each path's guard gets the route bios's browser hook gives it: none (`devtools`) over the DevTools port, the linked browser's own route for the link, and `{ kind: 'extension', version }` with the per-browser tab records and the extension's `frames()` for the extension. The run fails before any row if `Browser.getVersion` through the guard doesn't answer `slicc.route` equal to the path, and prints that answer as `GUARD-ROUTE`, and next to it `GUARD-FRAMES hook <path> {route, frames, version}`: the route, whether the guard got a `frames()` hook, and the extension version the page states. Every other test that builds a guard over an extension or linked transport passes the route the browser hook would, through `guardRoute` in `test/integration/guard-route.mjs` in Node or the page's own extension or linked browser route in the page, and `guard-route.test.mjs` fails when one doesn't. The fake extension states the version the real-extension tests run (`CURRENT_EXTENSION` in `test/integration/real-extension.mjs
|
|
929
|
+
- **Pull requests and the merge queue:** lint, then every `test/integration/*.test.mjs` split by the last runs' JUnit timings over 12 pool shards (`ci / integration`), then on a pull request the Claude and Codex reviews (`ci / review`) with this repository's `review-prompt`. The shared guard vectors run as one file per path (devtools, extension, link), target group (`seven`, `vault`, `vault-x`, `apex` and the rest, `test/integration/guard-groups.mjs`) and detach variant (`lagging` or the others), 30 files of 2 to about 12 minutes, so the split can balance them. Each path's guard gets the route bios's browser hook gives it: none (`devtools`) over the DevTools port, the linked browser's own route for the link, and `{ kind: 'extension', version }` with the per-browser tab records and the extension's `frames()` for the extension. The run fails before any row if `Browser.getVersion` through the guard doesn't answer `slicc.route` equal to the path, and prints that answer as `GUARD-ROUTE`, and next to it `GUARD-FRAMES hook <path> {route, frames, version}`: the route, whether the guard got a `frames()` hook, and the extension version the page states. Every other test that builds a guard over an extension or linked transport passes the route the browser hook would, through `guardRoute` in `test/integration/guard-route.mjs` in Node or the page's own extension or linked browser route in the page, and `guard-route.test.mjs` fails when one doesn't. The fake extension states the version the real-extension tests run (`CURRENT_EXTENSION` in `test/integration/real-extension.mjs`), which also puts the Debugger route (7.12.0 and later) under test, and answers `frames()` with the contract of ai-ecoverse/slicc-extension's `extension/cdp.js` (`frames()` and `frameReply()`): a version 2 reply with each frame's `kind`, and, only when every frame is ordinary, `rootFrameId`, the frame ids, the local frames and the cross-process owners (`frameId`, `backendNodeId`); an unsettled or failed list is refused with `slicc: refused: unsettled frame list`. Stating 7.15.0 or later it sends `errorProtected` on each error frame, computed from the failed URL as the extension does (`false` only for a plain `http(s)` address that isn't protected and has no `redirect_uri=`, `client_id=` or `/auth/callback` marker after up to 8 percent-decodes), and an error frame marked `false` counts as ordinary; then the extension route declares `errorFrameClass`, so C8.iframe-error runs there. Stating an older version (`OLDER_FAKE`, 7.12.2, the contract from v7.12.0 to v7.14.3) it refuses a list with an error frame, as those releases do, and `guard-extension-error-frame.test.mjs` keeps the lock row for it. `test/integration/fake-extension-frames.mjs` builds it from a separate browser-level connection, the way the extension's service worker reads outside the page's CDP stream. One difference: the real extension is called with a numeric tab id (`extension.frames(Number(targetId))` in `cdp.js`), while the fake's targets are Chrome target ids, so the harness passes the target id as it is. The frames-less limit row runs a fake at `MIN_EXTENSION_VERSION` (7.10.0) without `frames()`. The slicc CLI tests use `node_modules/.bin/slicc` (or `SLICC_CLI`).
|
|
930
930
|
- **`main`:** semantic-release publishes the npm package (see [The npm package](#the-npm-package)). When it releases, the pipeline's `after-release` publishes that version to seven, in the `production` environment (see [Hosting](#hosting)).
|
|
931
931
|
|
|
932
932
|
Require `ci / integration` and `ci / review`. There is no retry: a flaky test fails the run. The separate `vault drift` workflow is not required.
|