@ai-ecoverse/slicc-bios 1.72.10 → 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.
- package/README.md +1 -0
- package/package.json +1 -1
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.
|