@ai-ecoverse/slicc-bios 1.60.0 → 1.61.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.
Files changed (2) hide show
  1. package/README.md +8 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -482,6 +482,8 @@ A program picks a host by adding `runtime=extension`, `runtime=devtools`, or a l
482
482
 
483
483
  **No consent dialog.** A connection goes straight through once the hook has found a host; seven doesn't ask first. The once-per-session confirm from #138 was removed by Lars's decision W10. The Network panel shows the host in its browser automation line (`browser` on the network port, from `browserVia`): through the extension, through this browser's DevTools port (`devtools`), through a linked browser, or not available.
484
484
 
485
+ **Linked devices drive it too (`slicc <join-url> cdp`).** A linked slicc CLI can serve seven's browser as a local CDP endpoint on its own computer (see [Linked devices](#tailscale-proof-of-concept), *Browser control*). Each of its connections reaches the same `cdp` hook as a kernel program's, so it goes through the same guard: seven's own pages and the vault stay out of reach, and the guard's `slicc.route` hint names the host it picked. The hook takes `caller: { kind: 'device', id, name }` and hands it to its `observe` callback; seven's observer doesn't use it today, and the chip takes the device's name from the link. The caller changes nothing in routing, but the device asks with `here: true`: the automatic order stops at the browser seven runs in (the extension, the DevTools port, or a `seven: true` browser from a CLI on this computer) and never falls back to another linked computer's browser. A kernel program's automatic runtime is unchanged.
486
+
485
487
  When no host can drive a browser, `/json/list` and the WebSocket handshake answer `502` with `CDP host: no browser to drive: install slicc-extension, or link a computer with npx sliccy@next`. A runtime that isn't `extension`, `devtools` or a linked browser gets `CDP host: unknown runtime "<name>" (extension, devtools, …)`, listing the linked browsers. `/json/version` answers either way, since a hook is always offered.
486
488
 
487
489
  ### Tailscale (proof of concept)
@@ -529,6 +531,12 @@ seven can also join a tailnet, with a patched build of Tailscale's wasm client (
529
531
  - **Body:** it is passed on as text: JSON as the hub parsed it, or the original text when it wasn't JSON. A `{"raw": …}` body from a JSON request stays JSON.
530
532
  - **Retries:** an `idempotency-key` or `x-github-delivery` header becomes the delivery id, so a retry isn't delivered twice.
531
533
  - **No agent:** with no agent running, or a slicc-agent without page-side webhooks, the delivery is dropped with a warning. The hub has already answered the sender `202`.
534
+ - **Browser control (`cdp-in`):** the page's HELLO to every CLI link, local and remote, offers `cdp-in` when seven can serve the kind; a seven follower's HELLO doesn't. It says the page understands the kind, not that the device may use it. The CLI opens `OPEN { kind: 'cdp' }` on a channel of its own (an even, node-opened id, so it never meets the page-opened `cdp` of shared browsers), and the page checks, on every OPEN and in this order:
535
+ 1. **The off switch** *Browser control from linked devices* (`remote-browser` on the `switches` port), on by default because each device's grant is off by default. Off refuses with `EACCES: browser control from linked devices is off in seven's settings`, and turning it off resets every open `cdp` stream with that text.
536
+ 2. **The device's Browser grant:** the `browser` access in Linked devices (`setAccess(id, 'browser', on)`), off by default, kept per device certificate in `slicc-os.devices` and cleared by unlinking it, like Control. It doesn't turn View on. A CLI on this computer that isn't paired has it fixed on (`access: { control: true, browser: true, fixed: true }`), a remote CLI's row shows `access: { control, browser }`, a paired one follows its own access, and seven followers have no `browser` key. Without it: `EACCES: browser control from this device is off; turn on Browser for it in seven's Linked devices`. Turning it off, or unlinking the device, resets the device's streams with `EACCES: the owner took this access back`. Any link that isn't a CLI gets `EACCES`, and a device with 16 `cdp` streams open gets `EMFILE: too many browser connections from this device` for the next.
537
+ 3. **This browser:** the page calls `browserControl().hook({ caller, here: true })`, the kernel's own hook (see [Browser automation](#browser-automation)). `here` limits it to the browser seven runs in: slicc-extension, the browser's DevTools port, or a browser that hosts this seven (`seven: true`) shared by a CLI on this computer, and never another linked computer's browser, which kernel programs can still reach. `seven: true` is what the CLI claims, so a remote link's claim doesn't count here. Its failure is `ENOENT: <its message>`, for example `ENOENT: no browser to drive: install slicc-extension, or link a computer with npx sliccy@next`.
538
+
539
+ The page then sends `Browser.getVersion` on the guarded connection as id `-2`, answers OPENED `{ version }` with its result (and the guard's `slicc.route` hint), and keeps that one answer off the stream. After OPENED nothing is held back: a client's own command with id `-2` and its answer pass both ways. Both directions carry `u32` big-endian length plus one UTF-8 CDP JSON message of at most 64 MiB, passed as they are: no ids or sessions are rewritten. A longer message is `EMSGSIZE`, and an END inside one is `EPROTO`. Bytes from the node are credited as the page reads each chunk, so a message can be larger than the window; toward the node, messages wait while the window is full, up to 64 MiB per stream, then `ENOBUFS`. The node's END closes the connection, then the page ends the stream; the connection closing on its own is `ECONNRESET: <reason>`, and an unlink or a dropped link ends the streams with the link. While a device has a `cdp` stream open, the `live` port shows one item for it, `{ kind: 'cdp', label: 'Driving this browser', asker: <its name as Linked devices shows it, without control characters and at most 128 characters> }`, with **Stop**, which resets that device's streams with `ECONNRESET: stopped in seven`. Stop, the switch going off and the grant being revoked (or the device unlinked) take the item away at once, also while it only lingers, and a stream the device opens after that shows a new one. When the device's last stream ends on its own (its END, or the connection closing), the item stays 5 s, so discovery's short streams don't make it flicker.
532
540
  - **Remote control (`agent`):** a linked CLI can prompt, watch and stop seven's agent (`slicc prompt`, `slicc watch`, `slicc abort`). The page offers cap `agent` to a CLI on this computer always, and to a remote device only after **Control** is turned on for it in Linked devices. That setting is kept per device certificate and cleared by unlinking it. Any other link's agent OPEN gets `EACCES`.
533
541
  - Each `OPEN { kind: 'agent', op }` goes to the agent of the tab that runs the kernel, on its active cone, through slicc-agent's `remoteControl`. `prompt` answers OPENED with how the prompt was delivered (or `RESET EBUSY` for `whenBusy: 'reject'` while busy), then streams NDJSON events from the prompt's own `user` event to its `end` line. A prompt over about 60 KiB comes as `length` bytes after an empty OPENED, and the first line then says how it was delivered. `watch` answers with the transcript `head` (and `gap` when `since` is gone), then streams events. A `watch` OPEN with `busy: true` (`slicc wait`, `slicc prompt --allsettled`) also asks the agent whether it has anything left to do: OPENED then carries `busy: true | false`, and a `{"t":"busy","busy","why"?}` line follows each time that changes. `abort` answers `{ aborted }`.
534
542
  - `inventory` (slicc-cli's `slicc agents`, slicc-agent ≥ 7.12.0) answers OPENED with a snapshot of that cone's agents and its live scoops, and with `watch: true` it streams a whole new one as `{"t":"inventory",…}` on each change, at most one every 250 ms, the latest always sent, and the current one again every 30 s; the timers run only while such a stream is open. Each snapshot is `{ v: 1, instance, seq, changedAt, reportedAt, counts, agents }`, built field by field from slicc-agent's, so nothing else gets through: at most 256 agents, and a `provider` or `model` over 128 characters is left out. One line is written at a time; a change while one waits for the CLI to read only marks the latest snapshot to go next. `instance.id` is 16 random bytes minted once per profile into `slicc-os.inventory`, with a second random key beside it that never leaves the page; `instance.name` is the HELLO's name. An agent's `id` and `parent` are the first 16 bytes of HMAC-SHA-256 under that key of slicc-agent's registry id, so they stay the same for the profile and carry no scoop or cone name. An agent without the inventory answers `EOPNOTSUPP: this agent has no inventory`, and a tab without the agent, a follower included, `EOPNOTSUPP: the agent is not running`. Watching agents doesn't count as **Watching**.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-ecoverse/slicc-bios",
3
- "version": "1.60.0",
3
+ "version": "1.61.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",