@ai-ecoverse/slicc-bios 1.63.4 → 1.64.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 CHANGED
@@ -401,18 +401,20 @@ Programs ask seven's page for what only a page can do through the kernel's `/dev
401
401
  - **Gestures:** a request from a terminal tag (`{ kind: 'user', where: 'terminal:…' }`) in a tab that has just had a keystroke or click (`navigator.userActivation.isActive`) goes ahead at once. Any other request, the agent's always, waits for seven's own prompt: Cancel, or 60 s without an answer, refuses it with `EACCES`, and a signal or closed request withdraws the prompt. A session (its uid and tags) has at most one prompt up: another request from it meanwhile is refused with `EACCES`, `another request is waiting for you`. After a Cancel or a timeout the session rests for 10 s: its requests are refused with the dismissed text and no prompt, unless they come typed in an active tab. Withdrawing or timing out the prompt gives focus back to what had it.
402
402
  - **`open.url`** (`{"kind":"open.url","url":"…"}`, an empty reply) opens the URL in a new tab with `noopener,noreferrer`; `background` is ignored. Refusals, all `EACCES`, with this first line: `that isn't a URL`; `seven opens only http and https URLs` (`javascript:`, `data:`, `blob:`, `file:` and the rest); `seven doesn't open its own pages or the vault for a program` (the guard's protected origins: seven's own origin, `*.sliccy.ai` and the vault); `the request to open the page was dismissed`; `nobody answered the request to open the page within 60 s`. For example: `printf '{"kind":"open.url","url":"%s"}\n' "$url" | cat > /dev/embedder`.
403
403
  - **Tool modules** (capture, audio, devices) export the kernel's hook object `{ kinds, handle }`. `plugged(hook, prompts, extra, guard)` wraps one: only kinds seven lists and gives a prompt for reach it, and its `handle` runs only after seven's gesture check (or, for a capture, the capture steps below), with the request plus seven's `extra`. A module is a pinned, gated dependency in the base set, since it runs as seven.
404
- - **Capture** (`capture.screen`, `audio.record`, and an `audio.transcribe` that listens, the same ones that get "Use the microphone?" below; `captures()` in `src/seed/requests.js`) goes through four steps in this order, and each one can refuse with `EACCES` before the next:
405
- 1. **The off switch** (`src/seed/switches.js`, `switches.add({ key, label, off() }) → { on() }`): Settings lists Camera, Microphone and Screen (and Serial ports, see below) under "Capture and devices" (spectrum's `switches` port), all on by default. They are kept in the page's `localStorage` (`slicc-os.switches`), outside the kernel's file system, so no program can flip one, and every tab follows a change through the `storage` event. When the page can't write that storage, the switch still changes in this tab and still ends what is live. A request whose kind is switched off is refused at once with `<what> capture is off in seven's settings` (a screen recording with the microphone needs both). Microphone covers every request that opens the microphone: `audio.record` and a listening `audio.transcribe` (Web Speech, or an engine that gets no audio in its body); probes, status, warm-up and listing microphones don't open it and still answer. Turning one off ends every live capture under it, in every tab, and a request still waiting for the agent, the prompt or its click is refused once the wait ends. Camera has nothing to guard yet.
406
- 2. **Consent:** for `capture.screen` and `audio.record`, seven asks the agent with `approveCapture({ kind, options, stamp, label? }, { signal, where? })` (`label` is the microphone's name when seven can read it from `enumerateDevices()`; `where` names a linked device as for sudo). `once` or `always` goes on; `deny`, or `{ answer: 'deny', message }`, refuses with the message (`the request to capture was denied` without one). The agent answers `once` for any run no guest started and asks the guest's seat for one a guest started (see slicc-agent's README). When it can't answer (`EAGAIN`: not running, restarting, too old to have the method, kernel users off, or a guest seat without tool review), seven shows its own prompt, as before: "Capture the screen?" or "Use the microphone?", with Choose or Record and Cancel. Any other failure refuses with `the agent couldn't answer the request to capture`. A listening `audio.transcribe` isn't a capture kind for the agent, so it keeps seven's own "Use the microphone?" prompt.
407
- 3. **The click** (`src/seed/clicks.js`, `clicks.ask({ kind, detail: { what, program }, asker, title, body, action, signal }) → Promise<void>`): after the agent's `once`, a command typed in an active tab goes straight on, and so does a microphone recording when the browser's microphone permission is `granted`. A state of `denied` refuses at once with `microphone permission is blocked for this site`. Otherwise a click in seven's tab can't be avoided (Chrome's picker always needs one, and so does the browser's own microphone prompt), and seven shows a click request (`kind: 'click'`, spectrum's `ClickApproval`) in the approvals dialog: "Choose what to share?" with **Choose what to share**, or "Allow the microphone?" with **Allow microphone**, and Cancel. The program gets `waiting for a click in seven's tab: choose what to share` (or `allow the microphone`) on standard error first. The click resolves inside its own user activation, so `getDisplayMedia` and `getUserMedia` run in it. Cancel refuses with the dismissed text, and 5 minutes without a click with `nobody clicked within 5 min`; the gesture rules hold (one at a time per session, 10 s of rest after a Cancel or a timeout). The tab that answers the request holds the click; seven's other tabs show it with `here: false` ("Click in seven's tab.") and can only cancel it. While the tab is hidden, its title starts with `● `, and seven raises a system notification when the site already may (it never asks for that permission). Linked follower devices aren't told yet.
408
- 4. **The indicator** (`src/seed/live.js`, `live.add({ kind, label, what, asker, since, action: { label, run } }) → remove()`): while the request runs (the wait for a click doesn't count), spectrum's `live` port shows a chip, "Recording screen", "Taking a photo" (a screen still) or "Recording microphone" (a listening transcribe too), with who asked (the cone, `a terminal` or `a program`) and **Stop**, in every tab of this seven. Stop ends the request: a screen recording ends as if Chrome's Stop sharing were pressed and a microphone recording or a Web Speech listen stops, so the program gets the end of the file and finalizes it; a still or a request still starting fails with `stopped in seven`. The chip goes when the request ends, however it ends. Linked follower devices don't see it yet.
409
- 5. **A listing of microphones** (`audio.record` with `devices`) gets the consent, but no switch, no click and no chip, since it doesn't open the microphone.
404
+ - **Capture** (`capture.screen`, `capture.camera`, `audio.record`, and an `audio.transcribe` that listens, the same ones that get "Use the microphone?" below; `captures()` in `src/seed/requests.js`) goes through four steps in this order, and each one can refuse with `EACCES` before the next:
405
+ 1. **The off switch** (`src/seed/switches.js`, `switches.add({ key, label, off() }) → { on() }`): Settings lists Camera, Microphone and Screen (and Serial ports, see below) under "Capture and devices" (spectrum's `switches` port), all on by default. They are kept in the page's `localStorage` (`slicc-os.switches`), outside the kernel's file system, so no program can flip one, and every tab follows a change through the `storage` event. When the page can't write that storage, the switch still changes in this tab and still ends what is live. A request whose kind is switched off is refused at once with `<what> capture is off in seven's settings` (a screen or camera recording with the microphone needs both). Microphone covers every request that opens the microphone: `audio.record` and a listening `audio.transcribe` (Web Speech, or an engine that gets no audio in its body); probes, status, warm-up and listing microphones don't open it and still answer. Camera covers `capture.camera`; listing devices (`capture.devices`) opens none and still answers. Turning one off ends every live capture under it, in every tab (Microphone ends a camera recording with the microphone too), and a request still waiting for the agent, the prompt or its click is refused once the wait ends.
406
+ 2. **Consent:** for `capture.screen`, `capture.camera` and `audio.record`, seven asks the agent with `approveCapture({ kind, options, stamp, label? }, { signal, where? })` (`label` is the camera's or the microphone's name when seven can read it from `enumerateDevices()`; `where` names a linked device as for sudo). `once` or `always` goes on; `deny`, or `{ answer: 'deny', message }`, refuses with the message (`the request to capture was denied` without one). The agent answers `once` for any run no guest started and asks the guest's seat for one a guest started (see slicc-agent's README). When it can't answer (`EAGAIN`: not running, restarting, too old to have the method, kernel users off, or a guest seat without tool review), seven shows its own prompt, as before: "Capture the screen?", "Take a photo?", "Record the camera?" (or "Record the camera and microphone?", with "for up to N seconds" when `duration` is positive) or "Use the microphone?", with Choose, Take photo or Record and Cancel. Any other failure refuses with `the agent couldn't answer the request to capture`. A listening `audio.transcribe` isn't a capture kind for the agent, so it keeps seven's own "Use the microphone?" prompt.
407
+ 3. **The click** (`src/seed/clicks.js`, `clicks.ask({ kind, detail: { what, program }, asker, title, body, action, signal }) → Promise<void>`): after the agent's `once`, a command typed in an active tab goes straight on, and so does a camera or microphone recording when the browser's permission for every device it opens (`camera`, `microphone`) is `granted`. A state of `denied` refuses at once with `camera permission is blocked for this site` (or `microphone`). Otherwise a click in seven's tab can't be avoided (Chrome's picker always needs one, and so does the browser's own camera or microphone prompt), and seven shows a click request (`kind: 'click'`, spectrum's `ClickApproval`) in the approvals dialog: "Choose what to share?" with **Choose what to share**, "Allow the camera?" with **Allow camera** (one item, "Allow the camera and microphone?" with **Allow camera and microphone**, when a camera recording takes the microphone too), or "Allow the microphone?" with **Allow microphone**, and Cancel. The program gets `waiting for a click in seven's tab: choose what to share` (or `allow the camera`, `allow the camera and microphone`, `allow the microphone`) on standard error first. The click resolves inside its own user activation, so `getDisplayMedia` and `getUserMedia` run in it. Cancel refuses with the dismissed text, and 5 minutes without a click with `nobody clicked within 5 min`; the gesture rules hold (one at a time per session, 10 s of rest after a Cancel or a timeout). The tab that answers the request holds the click; seven's other tabs show it with `here: false` ("Click in seven's tab.") and can only cancel it. While the tab is hidden, its title starts with `● `, and seven raises a system notification when the site already may (it never asks for that permission). Linked follower devices aren't told yet.
408
+ 4. **The indicator** (`src/seed/live.js`, `live.add({ kind, label, what, asker, since, action: { label, run } }) → remove()`): while the request runs (the wait for a click doesn't count), spectrum's `live` port shows a chip, "Recording screen", "Recording camera" (`with microphone` when it takes the microphone), "Taking a photo" (a screen or camera still) or "Recording microphone" (a listening transcribe too), with who asked (the cone, `a terminal` or `a program`) and **Stop**, in every tab of this seven. Stop ends the request: a screen or camera recording ends as if Chrome's Stop sharing were pressed and a microphone recording or a Web Speech listen stops, so the program gets the end of the file and finalizes it; a still or a request still starting fails with `stopped in seven`. The chip goes when the request ends, however it ends. Linked follower devices don't see it yet.
409
+ 5. **A listing of devices** (`audio.record` with `devices`, and `capture.devices` for cameras and microphones) gets none of the four: no switch, no consent, no click and no chip, and no prompt either. Listing opens no device and captures nothing (contract §1), and the labels stay empty until the site holds a grant, so a program learns no more than `enumerateDevices()` tells any page.
410
410
  - **`capture.screen`** (`screencapture`, `@ai-ecoverse/slicc-capture/page`): the same gesture check as `open.url`, with the prompt "Capture the screen?". The prompt's action is Choose, and Chrome's picker comes next. The module captures only through seven's `request.display(constraints)`, which calls `getDisplayMedia` with `audio: false` unless a video request has `system: true` (`-A`), when it asks for `audio: true` and the prompt names "your screen and its sound"; Chrome's picker still lets the user decide whether to share sound. `selfBrowserSurface: 'exclude'`, `surfaceSwitching: 'exclude'` and `preferCurrentTab: false` always apply. A video request with `microphone: true` (`-g`) or a device ID (`-G`) also names the microphone in the same prompt, with "for up to N seconds" when `duration` is positive. It follows the same rule as `audio.record`. Cancel opens neither device. Only after that check does seven supply a guarded `request.userMedia` for the default or exact named microphone, with no camera request. When the picked surface's capture handle is seven's or the vault's (`slicc-vault`; every seven page sets `setCaptureHandleConfig({ handle: 'slicc-seven', exposeOrigin: true })` for its own origin, first thing at boot), or its origin is protected, seven stops every track and refuses with `EACCES`, `seven doesn't capture its own pages or the vault`. For a tab, seven waits up to 1 s for a handle that arrives after the capture starts. A tab whose handle is still missing, or any surface Chrome doesn't name as a window or a screen, is refused too (`seven can't tell this tab isn't its own or the vault's (it sets no capture handle), so it doesn't capture it; share a window or the screen`): Chrome hides handles in off-the-record profiles, and an older vault sets none, so a missing handle can't prove the tab is safe. That costs every ordinary tab that sets no capture handle, which is most of them; share a window or the screen to capture one. A captured tab that navigates to a page without a handle is stopped the same way. Seven watches for handle changes from the moment the capture starts, so a change during that wait isn't lost. The same holds while the capture is live: when the captured tab's handle changes to seven's, a protected one or none (`capturehandlechange`), seven stops every track, ends the module's capture and refuses, even if a frame was already taken. A cross-origin navigation clears the handle first, so a tab that navigates to seven is usually refused with the missing-handle text. A window or a whole screen that shows seven, and a protected page that sets no capture handle, are the user's choice in the picker. The vault's top-level pages set `slicc-vault` for seven's production origins (slicc-vault ≥ 1.17.0), so they're refused too. A local seven gets no handle from vault-preview. A page that paints before it sets its capture handle can land in a frame taken in that moment, before seven sees the handle. The dismissed texts are `the request to capture the screen was dismissed` and `nobody answered the request to capture the screen within 60 s`.
411
+ - **`capture.camera`** (`media -f avfoundation -i 0`, `@ai-ecoverse/slicc-capture/page`): a still (`type` `image/png`, `image/jpeg` or `image/webp`) or a recording (`video/webm`, `video/mp4`), optionally with the microphone (`microphone: true` or a device ID), through the capture steps above. The module opens the camera only through seven's `request.userMedia(constraints)`, which takes one call per request of exactly `{ video, audio? }`: `video` is `true` or holds only `deviceId` (`{ exact }`, the request's `device`, which must look like a device ID) and `width`, `height`, `frameRate` (a positive number, `{ ideal }` or `{ exact }`); `audio` is present only for a recording with the microphone, as `true` or `{ deviceId: { exact } }` for the request's `microphone`. Any other key, shape or device, or a second call, is refused with `EACCES`, `seven doesn't answer this camera request`, before `getUserMedia` runs. It runs only after the switches, the consent and the click, checks the Camera (and Microphone) switch once more, and stops every track and fails when the request was aborted while the camera opened. The dismissed texts are `the request to use the camera was dismissed` and `nobody answered the request to use the camera within 60 s`.
412
+ - **`capture.devices`** (`media -f avfoundation -list_devices true -i ""`): the module lists cameras and microphones from `enumerateDevices()` (labels are empty until the site holds a grant). It opens nothing, so it gets no prompt, no switch and no chip.
411
413
  - **`clipboard.write`** (`{"kind":"clipboard.write","type":"image/png"}`, the bytes as the body, an empty reply; `screencapture -c`): `src/seed/clipboard.js` writes one `ClipboardItem` of `image/png`, `text/plain` or `text/html`, with `/dev/clipboard`'s focus rule and refusal text. Other types are `ENOTSUP`. The body is read up to 16 MB; beyond that seven cancels the rest and fails with `EIO`, `seven copies at most 16 MB to the clipboard`.
412
414
  - **Audio** (`afplay`, `chime`, `say`, `hear`, `@ai-ecoverse/slicc-audio/page`; kinds `audio.play`, `audio.say`, `audio.voices`, `audio.record`, `audio.transcribe`):
413
415
  - **Sound and speech:** `audio.play` ("Play a sound?") and `audio.say` ("Speak aloud?") get the same gesture check as `open.url`.
414
416
  - **The microphone:** `audio.record`, and every `audio.transcribe` except a probe or a `whisper` one that sends its own audio, ask "Use the microphone?" on every request, unless the request comes typed in an active tab; for `audio.record` that prompt is the fallback of the capture steps above. When the request carries a positive `seconds`, the prompt says how long ("…record from your microphone for up to 5 seconds"). Cancel leaves the microphone unopened.
415
- - **No prompt:** `audio.voices`; `audio.say` status and warm-up; `audio.transcribe` status, warm-up and supported-language probes; and a `whisper` transcribe of bytes the program sends. Listing microphones (`audio.record` with `devices`) asks like any recording. For `whisper`, seven reads the start of the request's body to see whether it carries audio. Web Speech (`webspeech`) always listens to the microphone and ignores any bytes, so it's always asked, and so is an unknown or missing engine.
417
+ - **No prompt:** `audio.voices`; `audio.say` status and warm-up; `audio.transcribe` status, warm-up and supported-language probes; and a `whisper` transcribe of bytes the program sends. Listing microphones (`audio.record` with `devices`) opens none and asks nothing, as the capture steps above say. For `whisper`, seven reads the start of the request's body to see whether it carries audio. Web Speech (`webspeech`) always listens to the microphone and ignores any bytes, so it's always asked, and so is an unknown or missing engine.
416
418
  - **Stopping:** an abort (a signal, or the program closing the request) stops a recording at once.
417
419
  - **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.
418
420
  - **Serial ports** (`serial`, `@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` and `serial.control` 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 or set its signals. 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).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-ecoverse/slicc-bios",
3
- "version": "1.63.4",
3
+ "version": "1.64.1",
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",
@@ -49,7 +49,7 @@
49
49
  "format": "biome check --write ."
50
50
  },
51
51
  "devDependencies": {
52
- "@ai-ecoverse/slicc": "1.64.0",
52
+ "@ai-ecoverse/slicc": "1.64.1",
53
53
  "@ai-ecoverse/slicc-browsers": "1.21.1",
54
54
  "@ai-ecoverse/slicc-cdp": "1.47.2",
55
55
  "@ai-ecoverse/slicc-kernel": "1.176.1",
@@ -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": "7.24.0",
6
+ "@ai-ecoverse/slicc-agent": "7.26.0",
7
7
  "@ai-ecoverse/slicc-kernel": "1.176.1"
8
8
  }
9
9
  }
@@ -14,8 +14,8 @@ importers:
14
14
  .:
15
15
  dependencies:
16
16
  '@ai-ecoverse/slicc-agent':
17
- specifier: 7.24.0
18
- version: 7.24.0(@ai-ecoverse/slicc-kernel@1.176.1)(@aws-sdk/credential-provider-node@3.972.84)(@smithy/signature-v4@5.7.4)
17
+ specifier: 7.26.0
18
+ version: 7.26.0(@ai-ecoverse/slicc-kernel@1.176.1)(@aws-sdk/credential-provider-node@3.972.84)(@smithy/signature-v4@5.7.4)
19
19
  '@ai-ecoverse/slicc-kernel':
20
20
  specifier: 1.176.1
21
21
  version: 1.176.1
@@ -25,8 +25,8 @@ packages:
25
25
  '@ai-ecoverse/jerk-oauth@1.4.2':
26
26
  resolution: {integrity: sha512-XenbL8KPm7uAABy6eNl8COekMwHyWNaT7kGnaDN9VKjWCRvx2qoYgSSWbYy2fqRVqiYFZRbANDlXAEw6DGOuNA==}
27
27
 
28
- '@ai-ecoverse/slicc-agent@7.24.0':
29
- resolution: {integrity: sha512-etrDdnq+DrhFFJkFFSSgczTTbOq3MG2WUKNdjkdAkPF4fQGBtCxdcM66mHfd5m4IMZB6Ztx89juu56MvcX/cJQ==}
28
+ '@ai-ecoverse/slicc-agent@7.26.0':
29
+ resolution: {integrity: sha512-BGa8xqwRfyXAmuFIT+yDQDFmBCBFs5Fcfc0yT08dRJVciiZGAUtDUP8/LDCNyILRAJpuWvzolPg7+e76DjuXEA==}
30
30
  engines: {node: '>=24'}
31
31
  peerDependencies:
32
32
  '@ai-ecoverse/slicc-kernel': '>=1.172.2 <2'
@@ -351,7 +351,7 @@ snapshots:
351
351
 
352
352
  '@ai-ecoverse/jerk-oauth@1.4.2': {}
353
353
 
354
- '@ai-ecoverse/slicc-agent@7.24.0(@ai-ecoverse/slicc-kernel@1.176.1)(@aws-sdk/credential-provider-node@3.972.84)(@smithy/signature-v4@5.7.4)':
354
+ '@ai-ecoverse/slicc-agent@7.26.0(@ai-ecoverse/slicc-kernel@1.176.1)(@aws-sdk/credential-provider-node@3.972.84)(@smithy/signature-v4@5.7.4)':
355
355
  dependencies:
356
356
  '@ai-ecoverse/slicc-kernel': 1.176.1
357
357
  '@ai-ecoverse/slicc-vault': 1.24.0