@ai-ecoverse/slicc-bios 1.72.9 → 1.73.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.
Files changed (2) hide show
  1. package/README.md +2 -1
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -450,6 +450,7 @@ Programs ask seven's page for what only a page can do through the kernel's `/dev
450
450
  - **ortllama:** slicc-audio's optional `@ai-ecoverse/slicc-ortllama` isn't in the base set, because the BIOS installer skips lock entries marked `optional` and the in-place base update runs `pnpm install --no-optional`. So `afplay`, `chime` and the Web Speech engines work. The kokoro and whisper engines fail with `no server at http://11435.kernel.localhost (pnpm add -g @ai-ecoverse/slicc-ortllama, then ortllama serve --detach)` until an ortllama server runs in the kernel.
451
451
  - **Serial ports** (`serial` and `esptool`, `@ai-ecoverse/slicc-devices/page`, slicc-kernel ≥ 1.176.0; `src/seed/serial.js`): seven lists the module's kinds with the policies it exports. `serial.list`, `serial.request`, `serial.open`, `serial.read`, `serial.signals` and `serial.close` have `{ group: 'dialout', session: false }`, and `serial.write`, `serial.control` and `serial.esptool` have `{ session: false }`. So the kernel lets root and the members of `dialout` (every cone and scoop, see [Kernel users](#kernel-users)) use a port, and only root write to one, set its signals or run esptool on it. The person's terminals are root. An agent writes with `sudo serial write …`, which sudo's judge decides as for any command. Scoops have no `sudo`, so they read and can't write. Anyone else gets `EACCES` (`serial.write is not allowed for this user`) before the page sees the request. The module answers in the tab whose page answers the request, numbers ports `serial1`, `serial2`, … for that page's lifetime, and keeps what an open port sends in a 1 MiB buffer between reads (see slicc-devices' README).
452
452
  - **esptool** (slicc-devices ≥ 1.1.0): `serial.esptool` is root's only, because every esptool operation resets the chip and writes to it, so an agent runs `sudo esptool …` and sudo's judge decides, with no other prompt. A cone without sudo gets `EACCES` (`serial.esptool is not allowed for this user`) before the page sees the request. The page loads esptool-js only when a `serial.esptool` request comes, with a dynamic `import()` that seven's service worker serves from the installed `node_modules/esptool-js/bundle.js` in OPFS, so boot doesn't grow and nothing is fetched from the network. While it runs, the port shows as open, and Close or turning Serial ports off stops it; a write stopped that way leaves the chip in its bootloader, and the command says so.
453
+ - **Device nodes** (slicc-devices ≥ 1.2.1, slicc-kernel ≥ 1.183.0): every granted port is also a character device, `/dev/ttyUSB<n>` for the USB-UART bridges (FTDI, Silicon Labs, WCH, Prolific) and `/dev/ttyACM<n>` for every other port, with a `/dev/serial/by-id/usb-<vid>_<pid>-if00` link, so `cat`, `stty`, `screen`, `picocom` and pyserial use it unchanged. bios passes the module's `devices.open` to `createKernel({ devices })` and, once the device groups are in place, calls `devices.nodes(kernel)`, which adds and removes the nodes as ports are granted and go away (`serialPorts().nodes` in `os/serial.js`; a kernel without `kernel.devices` gets a console warning and no nodes). The nodes are `root:dialout 0640`: a `dialout` member (every cone and scoop) opens one for reading and may change its speed and framing (`stty -F`), and opening it for writing, which `screen`, `picocom` and pyserial do, needs root, so an agent uses `sudo`. Setting DTR, RTS or break needs a node opened for writing, so it is root's too, even where Linux would let any reader set them. A node and the `serial` command share the port and exclude each other. While a node is open, the chip reads `serial1 (/dev/ttyUSB0)`, and Close and the switch hang the open descriptor up.
453
454
  - **The click:** `serial.request` is the only kind that can ask, and the browser's chooser is the only prompt. 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 serial port` on standard error, and seven shows a click request (`clicks.ask` with `kind: 'device'` and `detail: { what: 'serial', program }`): "Choose a serial port", "<asker> wants to use a serial port. Click Choose, then pick it in the browser's list.", with **Choose…** and Cancel. Choose opens the chooser inside that click. Cancel refuses with `no serial port was chosen`, and 300 s without a click with `nobody clicked within 5 min`, both `EACCES`. The click's one-at-a-time and 10 s rest rules apply, and so do its hidden-tab notices.
454
455
  - **The indicator:** while a port is open, the live port shows "Serial port open", the handle and who opened it (the cone, `a terminal` or `a program`), with **Close**. Close closes the port in seven: a `serial read --follow` ends at end of file, and later requests fail with `EIO` (`serial1 was closed in seven`). The chip goes when the port closes, however it closes: `serial close`, Close, the switch, or unplugging.
455
456
  - **The switch:** "Serial ports" sits beside Camera, Microphone and Screen, on by default and kept in the same `slicc-os.switches`. Off refuses every `serial.*` kind with `serial ports are off in seven's settings` (`EACCES`), before the chooser or the port is touched, and turning it off closes every open port, in every tab. A `serial open` or a chooser still in flight when it turns off is refused the same way (slicc-devices ≥ 1.0.2): the port is closed again, and a port the browser granted meanwhile is listed closed, with nothing buffered, once the switch is back on.
@@ -519,7 +520,7 @@ A browser extension's frame inside an ordinary page, such as a password manager'
519
520
  - `Page.createIsolatedWorld` on a frame the guard places as ordinary, always forwarded without `grantUniveralAccess` and `contentSecurityPolicy`, whatever the client asks. A frame that shows Chrome's error page for a refused document, or the guard's own blank, gets the "out of reach" refusal and no context.
520
521
  - Exactly `Emulation.setFocusEmulationEnabled`, `setEmulatedMedia`, `setDeviceMetricsOverride` and `setTouchEmulationEnabled`.
521
522
  - `Runtime.addBinding` scoped to an isolated world: a non-empty `executionContextName` (not a browser extension's world), or the `executionContextId` of an isolated world on an ordinary origin. `Runtime.bindingCalled` reaches the client only from such a world.
522
- - `Target.setAutoAttach` whose `filter` would admit tabs (Puppeteer's catch-all filters, `[{}]`) is forwarded with its filter narrowed to tab targets on the browser session (Chrome refuses a filter that allows both tabs and pages there) and to page targets on any other session, so a Puppeteer client gets its tab and page attachments and no frames or workers under them. For a kernel program, worker auto-attach is otherwise as before this change: a filter without tabs, slicc-cdp's dedicated-worker HAR capture (`[{type: "worker"}]`), shared and service worker filters and an omitted filter (Playwright's) are forwarded as sent, and the workers they attach are checked and shown as before. A remote device (a connection that comes in over the remote CDP stream, `caller.kind === 'device'`) gets no worker session on any route until #1515: over the DevTools port and the link, a filter that admits only worker types is refused (`NO_WORKERS`), an omitted filter goes out with the worker types excluded in front of Chrome's default, a filter that admits a worker type together with any other type is narrowed like a tab-admitting one, any worker attachment that reaches it anyway is cut (resumed, then detached) and never shown, `Target.attachToTarget` of a worker is refused, and workers are left out of its `Target.getTargets` and `Target.getTargetInfo` answers and its discovery events. So for a remote device Playwright's `page.workers()` is empty and Puppeteer gets no workers. On the extension route a worker-only filter reaches the extension unchanged and keeps its `NO_AUTO_ATTACH`, and so does a browser-wide call that admits neither tabs nor pages. A worker of a page that turns held or protected after it was shown to a kernel program is the same gap as before this change, tracked in #1516. Through the guard, Puppeteer reads same-site iframes only, on every route: the guard narrows the auto-attach rather than hiding cross-site frames one by one. A page the guard opens for `Target.createTarget` starts in the background unless the call asks otherwise, so seven stays in front, and the guard turns on focus emulation for it on its own session before the program sees it, so the page counts as focused and visible and renders; a program can still send its own `Emulation.setFocusEmulationEnabled`, one of the admitted display calls. Any other call, such as one asking for iframes only, is forwarded as it came. A `tab` target is judged by the page under it. It is cut if its own URL is protected, if that page is held (a sign-in), has a protected opener or a protected URL, and whenever that page's session is cut later. On the extension route the guard knows the page from the synthetic tab's id; over the DevTools port it learns it when the page attaches under the tab. Before every command on a tab session the guard reads the page under it again, and cuts the tab and refuses if that page is now held or protected, or the read doesn't answer. A tab's URL and title reach the program only in the answer to its own `Target.getTargetInfo` after such a fresh read showed an ordinary page; everywhere else (its attachment, `Target.getTargets`, discovery events) the tab's target info has no URL, title or opener. Until that page is placed as ordinary, a command that names the tab, such as `Target.closeTarget` or `Target.activateTarget`, is refused. A tab session takes only `Target.setAutoAttach`, `Runtime.runIfWaitingForDebugger` and `Target.getTargetInfo` about itself (another `targetId` is refused), and since it reads no page content it needs no content proof, so a new tab that has no URL yet still resumes. A tab with no URL yet doesn't count as protected for that alone; the pages under it are judged by their own URLs and are checked, held and cut like every other page.
523
+ - `Target.setAutoAttach` whose `filter` would admit tabs (Puppeteer's catch-all filters, `[{}]`) is forwarded with its filter narrowed to tab targets on the browser session (Chrome refuses a filter that allows both tabs and pages there) and to page targets on any other session, so a Puppeteer client gets its tab and page attachments and no frames or workers under them. For a kernel program over the DevTools port and the link, a filter without tabs, slicc-cdp's dedicated-worker HAR capture (`[{type: "worker"}]`), shared and service worker filters and an omitted filter (Playwright's) are forwarded as sent, and each worker they attach is judged by its own URL and by its creator: it is cut (resumed, then detached) and never shown if its URL is protected, if the session it attaches under is cut, not yet shown or unknown, if that session's target, its `parentId` or opener (and each of their openers and parents, including a parent session that is itself a worker) is held or protected, or if its creator frame is protected, which also covers a `data:` worker of a protected creator. A `data:` worker an ordinary page created stays shown. Holds raise no event, so every delivery for a worker (events, command answers, its own target events, bindings) re-checks the creator synchronously, with a cached verdict and no CDP call per worker event; a pending or failed verdict fails closed. Cutting a session also cuts every worker it created, and a worker target once cut for a creator reason stays cut if attached again on any session, browser-level included. `Target.getTargets` and discovery name a worker only when the client holds a shown session for it whose verdict is safe. A remote device (a connection that comes in over the remote CDP stream, `caller.kind === 'device'`) gets no worker session on any route until #1515: over the DevTools port and the link, a filter that admits only worker types is refused (`NO_WORKERS`), an omitted filter goes out with the worker types excluded in front of Chrome's default, a filter that admits a worker type together with any other type is narrowed like a tab-admitting one, any worker attachment that reaches it anyway is cut (resumed, then detached) and never shown, `Target.attachToTarget` of a worker is refused, and workers are left out of its `Target.getTargets` and `Target.getTargetInfo` answers and its discovery events. So for a remote device Playwright's `page.workers()` is empty and Puppeteer gets no workers. On the extension route a worker-only filter reaches the extension unchanged and keeps its `NO_AUTO_ATTACH`, and so does a browser-wide call that admits neither tabs nor pages. Through the guard, Puppeteer reads same-site iframes only, on every route: the guard narrows the auto-attach rather than hiding cross-site frames one by one. A page the guard opens for `Target.createTarget` starts in the background unless the call asks otherwise, so seven stays in front, and the guard turns on focus emulation for it on its own session before the program sees it, so the page counts as focused and visible and renders; a program can still send its own `Emulation.setFocusEmulationEnabled`, one of the admitted display calls. Any other call, such as one asking for iframes only, is forwarded as it came. A `tab` target is judged by the page under it. It is cut if its own URL is protected, if that page is held (a sign-in), has a protected opener or a protected URL, and whenever that page's session is cut later. On the extension route the guard knows the page from the synthetic tab's id; over the DevTools port it learns it when the page attaches under the tab. Before every command on a tab session the guard reads the page under it again, and cuts the tab and refuses if that page is now held or protected, or the read doesn't answer. A tab's URL and title reach the program only in the answer to its own `Target.getTargetInfo` after such a fresh read showed an ordinary page; everywhere else (its attachment, `Target.getTargets`, discovery events) the tab's target info has no URL, title or opener. Until that page is placed as ordinary, a command that names the tab, such as `Target.closeTarget` or `Target.activateTarget`, is refused. A tab session takes only `Target.setAutoAttach`, `Runtime.runIfWaitingForDebugger` and `Target.getTargetInfo` about itself (another `targetId` is refused), and since it reads no page content it needs no content proof, so a new tab that has no URL yet still resumes. A tab with no URL yet doesn't count as protected for that alone; the pages under it are judged by their own URLs and are checked, held and cut like every other page.
523
524
  - **Still refused, with the texts above:** init scripts with code (`addInitScript`, `evaluateOnNewDocument`), `Page.addScriptToEvaluateOnLoad`, `Page.setBypassCSP`, an unscoped or main-world `Runtime.addBinding` (`exposeFunction`), every other `Emulation.set*` (user agent, locale, time zone, geolocation and the rest) and the `Network` overrides, including the `Network.setCacheDisabled` that request interception (`route`, `setRequestInterception`) sends.
524
525
  - **Attachments before answers:** while a program has browser-wide page auto-attach on, `Target.createTarget` answers only after the new page's attachment has been shown or cut (at most 10 s), the order Chrome keeps and Playwright relies on.
525
526
  - **Admitted settings and the window before the arm:** the guard resumes a paused target only once its `Fetch` arm is in place, and from then on the target never commits a protected document (its `Document` request fails, and the session is cut first), so an admitted world or display override at most reaches Chrome's error page. A refused `Fetch.enable` cuts the target. Two windows are left. If the arm is still unanswered after 1 s, an ordinary target is resumed anyway, so it can't hang, and is unarmed until the arm lands. A program can also resume a paused tab itself before the page under it is armed. What covers both: the program's session stays hidden until the guard has placed the target, and a protected commit marks the target's proof uncertain, which refuses its pending reads, and cuts the session, so it is never shown. A vector row that times `Fetch.enable` against the resume comes before group 2.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-ecoverse/slicc-bios",
3
- "version": "1.72.9",
3
+ "version": "1.73.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",
@@ -53,7 +53,7 @@
53
53
  "@ai-ecoverse/slicc-browsers": "1.23.0",
54
54
  "@ai-ecoverse/slicc-cdp": "1.50.1",
55
55
  "@ai-ecoverse/slicc-kernel": "1.186.0",
56
- "@ai-ecoverse/slicc-shared-web": "2.14.2",
56
+ "@ai-ecoverse/slicc-shared-web": "2.14.4",
57
57
  "@ai-ecoverse/slicc-spectrum": "2.16.1",
58
58
  "@ai-ecoverse/slicc-vault": "1.26.0",
59
59
  "@biomejs/biome": "2.6.6",