@ai-ecoverse/slicc-bios 2.4.3 → 2.4.4
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
|
@@ -435,6 +435,51 @@ Seven keeps its secrets in the vault, a separate origin (`@ai-ecoverse/slicc-vau
|
|
|
435
435
|
- **Egress:** token refreshes use the same selected transport with a manual redirect policy, never a native-fetch fallback. An incapable route or redirect is refused; the response returns only to the vault. A `GET` or `HEAD` (GitHub Copilot's token exchange) goes out without a body. Request bodies are zeroed after use, and requests are not logged.
|
|
436
436
|
- **Adobe IMS:** with agent ≥ 4.0.0, `login('adobe', …)` opens its popup before anything else, then seals the token as `{ kind: 'model', provider: 'adobe', name: 'ADOBE_IMS_TOKEN', source: 'oauth:adobe', expiresAt }` (the redirect's `expires_in` is in seconds, 86399 for a day) and resolves `{ sealed: true }`, so the token never reaches spectrum or the agent. IMS gives no refresh token: an expired token means signing in again, which replaces the record and keeps its placeholder. Agents before 4.0.0 get the token as before.
|
|
437
437
|
|
|
438
|
+
## Devices
|
|
439
|
+
|
|
440
|
+
Seven can talk to hardware you plug in or pair: serial ports (Arduino, ESP32, routers), USB devices, HID devices (vendor keyboards, sensors, macro pads) and Bluetooth Low Energy devices. It works in Chromium-based desktop browsers (Chrome, Edge, Opera); Firefox, Safari and every browser on iOS answer `ENOTSUP` for these commands. You and your agents use the same commands, and nothing needs setting up: the groups and switches below are in place from the first boot. How each kind is wired, with its kinds, policies and exact messages, is under [Requests from programs](#requests-from-programs-devembedder), and every command's flags are in [slicc-devices' README](https://github.com/ai-ecoverse/slicc-devices#readme).
|
|
441
|
+
|
|
442
|
+
### What each device kind does
|
|
443
|
+
|
|
444
|
+
- **Serial** (`serial`, and the device files `/dev/ttyUSB*` and `/dev/ttyACM*`): talk to a board or modem: `serial request`, `serial open serial1 --baud 115200`, `serial read`, `serial write`, `serial console`. Programs such as `cat`, `stty`, `screen`, `picocom` and Python's pyserial use the same port through its device file.
|
|
445
|
+
- **ESP flashing** (`esptool`): read chip info from ESP32 and ESP8266 boards and flash them.
|
|
446
|
+
- **USB** (`usb`): raw USB: `usb request`, `usb open`, `usb claim`, bulk and interrupt transfers (`usb transfer-in`, `usb transfer-out`) and control transfers (`usb control-in`, `usb control-out`). Chrome keeps its protected interface classes, such as HID and audio, to itself.
|
|
447
|
+
- **HID** (`hid`): vendor-defined HID devices: `hid request`, `hid watch` (input reports), `hid send` (output reports), `hid query`, and feature reports (`hid feature-send`, `hid feature-get`). Chrome refuses keyboards, mice and its other protected usages.
|
|
448
|
+
- **Bluetooth LE** (`ble`): seven is a GATT client: `ble request --service heart_rate`, `ble services`, `ble read`, `ble notify`, `ble write`. There is no scanning, no peripheral role and no Bluetooth Classic, and after a page reload a device may have to be chosen again.
|
|
449
|
+
|
|
450
|
+
### Choosing a device
|
|
451
|
+
|
|
452
|
+
The only prompt is the browser's own device chooser. When you type `serial request` (or `usb request`, `hid request`, `ble request`) in a seven terminal, the chooser opens right away. When an agent or a script asks, seven shows "Choose a serial port" (or a USB, HID or Bluetooth device), and the chooser opens when you click **Choose…**. Cancel, or no click within 5 minutes, refuses the request. While seven's tab is in the background, its title starts with `● `. Once a device is chosen, using it asks nothing more: the groups below decide the rest.
|
|
453
|
+
|
|
454
|
+
### Groups and sudo
|
|
455
|
+
|
|
456
|
+
Devices follow the Linux rule: members of the device's group read, and writing needs root, which for an agent means `sudo`.
|
|
457
|
+
- **`dialout`** (serial ports and their device files): members list, choose, open, read, read the modem lines and close a port, and open its device file for reading (`stty -F` included). `sudo` is needed to write, to set DTR, RTS or break, to open the device file for writing (as `screen`, `picocom` and pyserial do) and for `esptool`.
|
|
458
|
+
- **`plugdev`** (USB and HID): members list, choose, open and close a device, claim and release a USB interface, and read (`usb transfer-in`, `hid watch`). `sudo` is needed for anything sent to a device: `usb transfer-out`, `usb control-in`, `usb control-out`, `usb select-config`, `usb reset`, `usb clear-halt`, `hid send`, `hid query`, `hid feature-send` and `hid feature-get`.
|
|
459
|
+
- **`bluetooth`** (Bluetooth LE): members list, choose, connect, disconnect, read services and values, and follow notifications. `sudo` is needed for `ble write`.
|
|
460
|
+
|
|
461
|
+
Your own terminals are root. Agents, the cone and its scoops, are in all three groups, so they can look and read by default. To write, an agent runs `sudo usb transfer-out …` (and so on), and sudo's judge decides, as for any other command. Scoops have no `sudo`, so they read and can't write.
|
|
462
|
+
|
|
463
|
+
A USB claim belongs to whoever made it, even across `sudo`: when an agent claims an interface and then runs `sudo usb transfer-out`, the transfer is that agent's. Two agents can't hold the same interface at once; the second is told who holds it, and `usb claim --wait` queues for it.
|
|
464
|
+
|
|
465
|
+
### Settings switches and the chip
|
|
466
|
+
|
|
467
|
+
Seven's Settings has one switch per kind, next to Camera, Microphone and Screen: **Serial ports**, **USB devices**, **HID devices** and **Bluetooth devices**, all on by default. Turning one off refuses every command of that kind (`USB devices are off in seven's settings`, and so on), closes whatever is open (a serial port is hung up, a USB or HID device closed, a Bluetooth device disconnected, a running `esptool` stopped), and ends reads, watches and notifications that were running.
|
|
468
|
+
|
|
469
|
+
While a device is open, the live list shows a chip such as "Serial port open" with `serial1`, "USB device open" with `usb1 (0x2341:0x0043 Arduino Uno)`, "HID device open" or "Bluetooth device connected" with `ble1 (Polar H10)`, with who is using it (the cone, a terminal or a program) and for how long. **Close** on the chip closes the device at once: a running read ends, and later requests fail with an error that says it was closed in seven.
|
|
470
|
+
|
|
471
|
+
### Errors you may see
|
|
472
|
+
|
|
473
|
+
- **`EACCES`:** you aren't in the device's group, the command writes and needs `sudo`, the chooser was cancelled or nobody clicked, the switch is off, or Chrome refused a protected device or service.
|
|
474
|
+
- **`EBUSY`:** a USB or HID device is open in another tab or program, a USB interface is claimed by someone else, a serial port is in use by `esptool` or held by its device file and the `serial` command at once, or a Bluetooth characteristic already has a notifier.
|
|
475
|
+
- **`ENOTSUP`:** this browser has no Web Serial, WebUSB, WebHID or Web Bluetooth, or the Bluetooth adapter is off.
|
|
476
|
+
- **`ENOENT`:** the handle (`serial9`, `usb9`, …) isn't one this tab knows.
|
|
477
|
+
- **`EIO`:** the device went away, it was closed in seven, a serial port is open in another tab or program, or the browser reported a transfer error, whose message is the browser's own.
|
|
478
|
+
|
|
479
|
+
### What is not included
|
|
480
|
+
|
|
481
|
+
Device files for USB (`/dev/bus/usb`, so libusb) and HID (`/dev/hidraw*`) and for Bluetooth, Bluetooth scanning and Bluetooth Classic, MIDI, and using a linked machine's devices from seven.
|
|
482
|
+
|
|
438
483
|
## Requests from programs (`/dev/embedder`)
|
|
439
484
|
|
|
440
485
|
Programs ask seven's page for what only a page can do through the kernel's `/dev/embedder` (slicc-kernel ≥ 1.153.0, #1527). `src/seed/requests.js`'s `pageRequests()` is the one hook seven gives the kernel. Seven owns the list of kinds and their policies (`KINDS`), and every answer goes through the checks seven owns, whoever wrote the handler.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-ecoverse/slicc-bios",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.4",
|
|
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.27.3",
|
|
54
54
|
"@ai-ecoverse/slicc-cdp": "2.1.0",
|
|
55
55
|
"@ai-ecoverse/slicc-kernel": "1.191.2",
|
|
56
|
-
"@ai-ecoverse/slicc-shared-web": "2.16.
|
|
56
|
+
"@ai-ecoverse/slicc-shared-web": "2.16.1",
|
|
57
57
|
"@ai-ecoverse/slicc-spectrum": "2.19.4",
|
|
58
58
|
"@ai-ecoverse/slicc-vault": "1.29.1",
|
|
59
59
|
"@biomejs/biome": "2.6.7",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"@ai-ecoverse/slicc-audio": "1.2.0",
|
|
10
10
|
"@ai-ecoverse/slicc-browsers": "1.27.3",
|
|
11
11
|
"@ai-ecoverse/slicc-capture": "1.5.0",
|
|
12
|
-
"@ai-ecoverse/slicc-devices": "1.6.
|
|
12
|
+
"@ai-ecoverse/slicc-devices": "1.6.2",
|
|
13
13
|
"@ai-ecoverse/slicc-kernel": "1.191.2",
|
|
14
14
|
"@ai-ecoverse/slicc-spectrum": "2.19.4",
|
|
15
15
|
"@ai-ecoverse/wasi-fnox": "1.48.0-1",
|
|
@@ -62,9 +62,9 @@
|
|
|
62
62
|
}
|
|
63
63
|
},
|
|
64
64
|
"node_modules/@ai-ecoverse/slicc-devices": {
|
|
65
|
-
"version": "1.6.
|
|
66
|
-
"resolved": "https://registry.npmjs.org/@ai-ecoverse/slicc-devices/-/slicc-devices-1.6.
|
|
67
|
-
"integrity": "sha512-
|
|
65
|
+
"version": "1.6.2",
|
|
66
|
+
"resolved": "https://registry.npmjs.org/@ai-ecoverse/slicc-devices/-/slicc-devices-1.6.2.tgz",
|
|
67
|
+
"integrity": "sha512-OWckpdk+zVelZJxlNGMRi72yB5hsAOosQWiLPCO1KQFLSNoM4h6DmGg8O4TalmQO9KYHt19B/TmGJoNCYRQs8g==",
|
|
68
68
|
"license": "Apache-2.0",
|
|
69
69
|
"dependencies": {
|
|
70
70
|
"esptool-js": "0.7.1"
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"@ai-ecoverse/slicc-audio": "1.2.0",
|
|
7
7
|
"@ai-ecoverse/slicc-browsers": "1.27.3",
|
|
8
8
|
"@ai-ecoverse/slicc-capture": "1.5.0",
|
|
9
|
-
"@ai-ecoverse/slicc-devices": "1.6.
|
|
9
|
+
"@ai-ecoverse/slicc-devices": "1.6.2",
|
|
10
10
|
"@ai-ecoverse/slicc-kernel": "1.191.2",
|
|
11
11
|
"@ai-ecoverse/slicc-spectrum": "2.19.4",
|
|
12
12
|
"@ai-ecoverse/wasi-fnox": "1.48.0-1",
|
|
@@ -18,8 +18,8 @@ importers:
|
|
|
18
18
|
specifier: 1.5.0
|
|
19
19
|
version: 1.5.0
|
|
20
20
|
'@ai-ecoverse/slicc-devices':
|
|
21
|
-
specifier: 1.6.
|
|
22
|
-
version: 1.6.
|
|
21
|
+
specifier: 1.6.2
|
|
22
|
+
version: 1.6.2
|
|
23
23
|
'@ai-ecoverse/slicc-kernel':
|
|
24
24
|
specifier: 1.191.2
|
|
25
25
|
version: 1.191.2
|
|
@@ -61,8 +61,8 @@ packages:
|
|
|
61
61
|
engines: {node: '>=24', slicc-kernel: '>=1.153.0'}
|
|
62
62
|
hasBin: true
|
|
63
63
|
|
|
64
|
-
'@ai-ecoverse/slicc-devices@1.6.
|
|
65
|
-
resolution: {integrity: sha512-
|
|
64
|
+
'@ai-ecoverse/slicc-devices@1.6.2':
|
|
65
|
+
resolution: {integrity: sha512-OWckpdk+zVelZJxlNGMRi72yB5hsAOosQWiLPCO1KQFLSNoM4h6DmGg8O4TalmQO9KYHt19B/TmGJoNCYRQs8g==}
|
|
66
66
|
engines: {node: '>=24', slicc-kernel: '>=1.183.0'}
|
|
67
67
|
|
|
68
68
|
'@ai-ecoverse/slicc-kernel@1.191.2':
|
|
@@ -268,7 +268,7 @@ snapshots:
|
|
|
268
268
|
|
|
269
269
|
'@ai-ecoverse/slicc-capture@1.5.0': {}
|
|
270
270
|
|
|
271
|
-
'@ai-ecoverse/slicc-devices@1.6.
|
|
271
|
+
'@ai-ecoverse/slicc-devices@1.6.2':
|
|
272
272
|
dependencies:
|
|
273
273
|
esptool-js: 0.7.1
|
|
274
274
|
|