@ai-ecoverse/slicc-bios 1.72.8 → 1.72.9
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 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -433,7 +433,7 @@ Programs ask seven's page for what only a page can do through the kernel's `/dev
|
|
|
433
433
|
- **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.
|
|
434
434
|
- **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:
|
|
435
435
|
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.
|
|
436
|
-
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.
|
|
436
|
+
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`, and so does an agent that hasn't answered within 6 minutes (`ANSWER_MS`, the 5 minutes an approval waits for a person plus 60 s, so a working agent's own expiry answers first): seven then aborts the signal it handed the agent, opens nothing and shows no prompt of its own, and ignores a later answer. While the agent hasn't answered after 1 s, the program gets one line on stderr, `waiting for the agent to 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.
|
|
437
437
|
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.
|
|
438
438
|
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`. Linked follower devices don't see it yet.
|
|
439
439
|
- **The ended chip:** a capture that ends normally (a still delivered, a recording at its `duration`, by Stop or by Chrome's Stop sharing) keeps its chip for 3 s, ended (spectrum's `endedAt`: a neutral dot and "Ended" in place of the timer) and in the past tense: "Recorded screen", "Recorded camera", "Recorded microphone" or "Took a photo", with **Dismiss**, which takes it away at once (`live.add`'s `remove()` has `remove.end(label)` for this). A screen or camera capture ends once every track seven handed the module (the screen's microphone too) is `ended`, so a duration-limited recording whose reply the program hasn't read to the end yet shows as ended once the recording stops, not once the program has read it (#1476); a recording seven can't see the tracks of (the microphone) ends when its reply is read to the end. An ended chip is out of the switch's reach (turning a switch off leaves it), and a new capture adds its own chip next to it. A capture that fails, is cancelled, or whose request closes first loses its chip at once, and so does one a switch turns off or the screen guards stop mid-recording.
|