@ai-ecoverse/slicc-bios 1.59.1 → 1.60.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 CHANGED
@@ -398,12 +398,18 @@ Programs ask seven's page for what only a page can do through the kernel's `/dev
398
398
  - **Who answers:** the tab whose session started the process. The owner's `createKernel({ requests })` answers the page's own processes. Each tab's terminals attach with `attachKernel(port, { requests })` on a port the owner made with `connect({ requests: 'attach' })`. The agent's ports carry the owner page's hook (`kernel.connect({ tag, user, requests })`). A remote follower's shell, served by the leader, carries none, so its requests are `ENOTSUP` (`no page answers requests for this session`); they never open in the leader's browser.
399
399
  - **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.
400
400
  - **`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`.
401
- - **Tool modules** (capture, audio) export the kernel's hook object `{ kinds, handle }`. `plugged(hook, prompts, extra)` wraps one: only kinds seven lists and gives a prompt for reach it, and its `handle` runs only after seven's gesture check, with the request plus seven's `extra`. A module is a pinned, gated dependency in the base set, since it runs as seven.
402
- - **`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`: a command typed in an active tab can proceed, but the agent is always asked. 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`.
401
+ - **Tool modules** (capture, audio) 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.
402
+ - **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:
403
+ 1. **The off switch** (`src/seed/switches.js`, `switches.add({ key, label, off() }) → { on() }`): Settings lists Camera, Microphone and Screen 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.
404
+ 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.
405
+ 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.
406
+ 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.
407
+ 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.
408
+ - **`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`.
403
409
  - **`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`.
404
410
  - **Audio** (`afplay`, `chime`, `say`, `hear`, `@ai-ecoverse/slicc-audio/page`; kinds `audio.play`, `audio.say`, `audio.voices`, `audio.record`, `audio.transcribe`):
405
411
  - **Sound and speech:** `audio.play` ("Play a sound?") and `audio.say` ("Speak aloud?") get the same gesture check as `open.url`.
406
- - **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. When the request carries a positive `seconds`, the prompt says how long ("…record from your microphone for up to 5 seconds"). The agent is always asked. The browser's microphone permission lasts per origin after the first grant, so it isn't the gate; seven's prompt is. Cancel leaves the microphone unopened.
412
+ - **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.
407
413
  - **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.
408
414
  - **Stopping:** an abort (a signal, or the program closing the request) stops a recording at once.
409
415
  - **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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-ecoverse/slicc-bios",
3
- "version": "1.59.1",
3
+ "version": "1.60.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",
@@ -52,7 +52,7 @@
52
52
  "@ai-ecoverse/slicc": "1.63.0",
53
53
  "@ai-ecoverse/slicc-browsers": "1.20.3",
54
54
  "@ai-ecoverse/slicc-cdp": "1.47.0",
55
- "@ai-ecoverse/slicc-kernel": "1.175.1",
55
+ "@ai-ecoverse/slicc-kernel": "1.176.1",
56
56
  "@ai-ecoverse/slicc-shared-web": "2.13.10",
57
57
  "@ai-ecoverse/slicc-spectrum": "2.6.0",
58
58
  "@ai-ecoverse/slicc-vault": "1.24.0",
@@ -4,6 +4,6 @@
4
4
  "description": "SLICC's agent, which the UI installs with pnpm in the background into /opt/agent in OPFS",
5
5
  "dependencies": {
6
6
  "@ai-ecoverse/slicc-agent": "7.24.0",
7
- "@ai-ecoverse/slicc-kernel": "1.175.1"
7
+ "@ai-ecoverse/slicc-kernel": "1.176.1"
8
8
  }
9
9
  }
@@ -15,10 +15,10 @@ importers:
15
15
  dependencies:
16
16
  '@ai-ecoverse/slicc-agent':
17
17
  specifier: 7.24.0
18
- version: 7.24.0(@ai-ecoverse/slicc-kernel@1.175.1)(@aws-sdk/credential-provider-node@3.972.84)(@smithy/signature-v4@5.7.4)
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)
19
19
  '@ai-ecoverse/slicc-kernel':
20
- specifier: 1.175.1
21
- version: 1.175.1
20
+ specifier: 1.176.1
21
+ version: 1.176.1
22
22
 
23
23
  packages:
24
24
 
@@ -35,8 +35,8 @@ packages:
35
35
  '@ai-ecoverse/slicc-spectrum':
36
36
  optional: true
37
37
 
38
- '@ai-ecoverse/slicc-kernel@1.175.1':
39
- resolution: {integrity: sha512-QVxSOpYgh+yXqO1oXfzQXKz/nTYNjaGU2fQ8Vx8mKZe+6stx1ZuI81qJ+1vSrd7Gc3AkZd5KYQ8tYyEb9EKwzg==}
38
+ '@ai-ecoverse/slicc-kernel@1.176.1':
39
+ resolution: {integrity: sha512-fB+O3oVv0jsRpLzMb1tPY5BgcGJNtreqCTc4yhbtAgXULkorolVVdIqzYourpMFR/oi+43+RIPsZtnJOKOmTaA==}
40
40
  engines: {node: '>=26'}
41
41
 
42
42
  '@ai-ecoverse/slicc-scrub@1.1.0':
@@ -351,9 +351,9 @@ 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.175.1)(@aws-sdk/credential-provider-node@3.972.84)(@smithy/signature-v4@5.7.4)':
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)':
355
355
  dependencies:
356
- '@ai-ecoverse/slicc-kernel': 1.175.1
356
+ '@ai-ecoverse/slicc-kernel': 1.176.1
357
357
  '@ai-ecoverse/slicc-vault': 1.24.0
358
358
  '@aws-sdk/middleware-websocket': 3.972.54
359
359
  '@earendil-works/chord': 1.5.0
@@ -377,7 +377,7 @@ snapshots:
377
377
  - ws
378
378
  - zod
379
379
 
380
- '@ai-ecoverse/slicc-kernel@1.175.1': {}
380
+ '@ai-ecoverse/slicc-kernel@1.176.1': {}
381
381
 
382
382
  '@ai-ecoverse/slicc-scrub@1.1.0': {}
383
383
 
@@ -9,7 +9,7 @@
9
9
  "@ai-ecoverse/slicc-audio": "1.1.6",
10
10
  "@ai-ecoverse/slicc-browsers": "1.20.3",
11
11
  "@ai-ecoverse/slicc-capture": "1.4.1",
12
- "@ai-ecoverse/slicc-kernel": "1.175.1",
12
+ "@ai-ecoverse/slicc-kernel": "1.176.1",
13
13
  "@ai-ecoverse/slicc-spectrum": "2.6.0",
14
14
  "@ai-ecoverse/wasi-fnox": "1.45.0-2",
15
15
  "@ai-ecoverse/wasi-pnpm": "12.9.1-21",
@@ -61,9 +61,9 @@
61
61
  }
62
62
  },
63
63
  "node_modules/@ai-ecoverse/slicc-kernel": {
64
- "version": "1.175.1",
65
- "resolved": "https://registry.npmjs.org/@ai-ecoverse/slicc-kernel/-/slicc-kernel-1.175.1.tgz",
66
- "integrity": "sha512-QVxSOpYgh+yXqO1oXfzQXKz/nTYNjaGU2fQ8Vx8mKZe+6stx1ZuI81qJ+1vSrd7Gc3AkZd5KYQ8tYyEb9EKwzg==",
64
+ "version": "1.176.1",
65
+ "resolved": "https://registry.npmjs.org/@ai-ecoverse/slicc-kernel/-/slicc-kernel-1.176.1.tgz",
66
+ "integrity": "sha512-fB+O3oVv0jsRpLzMb1tPY5BgcGJNtreqCTc4yhbtAgXULkorolVVdIqzYourpMFR/oi+43+RIPsZtnJOKOmTaA==",
67
67
  "license": "Apache-2.0",
68
68
  "engines": {
69
69
  "node": ">=26"
@@ -6,7 +6,7 @@
6
6
  "@ai-ecoverse/slicc-audio": "1.1.6",
7
7
  "@ai-ecoverse/slicc-browsers": "1.20.3",
8
8
  "@ai-ecoverse/slicc-capture": "1.4.1",
9
- "@ai-ecoverse/slicc-kernel": "1.175.1",
9
+ "@ai-ecoverse/slicc-kernel": "1.176.1",
10
10
  "@ai-ecoverse/slicc-spectrum": "2.6.0",
11
11
  "@ai-ecoverse/wasi-fnox": "1.45.0-2",
12
12
  "@ai-ecoverse/wasi-pnpm": "12.9.1-21",
@@ -18,8 +18,8 @@ importers:
18
18
  specifier: 1.4.1
19
19
  version: 1.4.1
20
20
  '@ai-ecoverse/slicc-kernel':
21
- specifier: 1.175.1
22
- version: 1.175.1
21
+ specifier: 1.176.1
22
+ version: 1.176.1
23
23
  '@ai-ecoverse/slicc-spectrum':
24
24
  specifier: 2.6.0
25
25
  version: 2.6.0
@@ -58,8 +58,8 @@ packages:
58
58
  engines: {node: '>=24', slicc-kernel: '>=1.153.0'}
59
59
  hasBin: true
60
60
 
61
- '@ai-ecoverse/slicc-kernel@1.175.1':
62
- resolution: {integrity: sha512-QVxSOpYgh+yXqO1oXfzQXKz/nTYNjaGU2fQ8Vx8mKZe+6stx1ZuI81qJ+1vSrd7Gc3AkZd5KYQ8tYyEb9EKwzg==}
61
+ '@ai-ecoverse/slicc-kernel@1.176.1':
62
+ resolution: {integrity: sha512-fB+O3oVv0jsRpLzMb1tPY5BgcGJNtreqCTc4yhbtAgXULkorolVVdIqzYourpMFR/oi+43+RIPsZtnJOKOmTaA==}
63
63
  engines: {node: '>=26'}
64
64
 
65
65
  '@ai-ecoverse/slicc-ortllama@1.28.0':
@@ -252,7 +252,7 @@ snapshots:
252
252
 
253
253
  '@ai-ecoverse/slicc-capture@1.4.1': {}
254
254
 
255
- '@ai-ecoverse/slicc-kernel@1.175.1': {}
255
+ '@ai-ecoverse/slicc-kernel@1.176.1': {}
256
256
 
257
257
  '@ai-ecoverse/slicc-ortllama@1.28.0':
258
258
  dependencies: