@ai-ecoverse/slicc 1.60.2 → 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.
- package/README.md +6 -3
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -418,7 +418,7 @@ The cdp list follows the browsers: an extra that stops answering is taken off th
|
|
|
418
418
|
**Flags.**
|
|
419
419
|
- `--browser <id>`: an id from `slicc browsers` (an installed id such as `chrome`, or `cdp:<host>:<port>`), or a name, case-insensitively. Repeatable: the first hosts seven, the others are extras. Without it, the best match that can host seven. An endpoint in SLICC six's profile is refused (`<id> is SLICC six's Chrome; only --profile six uses it`).
|
|
420
420
|
- `--cdp <url>`: also consider this CDP endpoint, as `slicc browsers --cdp`.
|
|
421
|
-
- `--page <url>`: the seven page, default `https://seven.sliccy.ai
|
|
421
|
+
- `--page <url>`: the seven page, default `https://seven.sliccy.ai/`, or `https://www.sliccy.ai/7/` when SLICC six's profile hosts seven (`--profile six`, or the six row in the picker), since that is where six upgrades in place: it offers the upgrade, or boots seven on `www.sliccy.ai` once the profile has upgraded. In that case slicc links only a tab under `https://www.sliccy.ai/7/` or `/os/`, and opens `/7/` when there is none: a `seven.sliccy.ai` tab left from an earlier run, or six's own UI elsewhere on `www.sliccy.ai`, is left alone. It must be `http` or `https`, and its origin is accepted as a seven origin.
|
|
422
422
|
- `--origin`, `--name`, `--allow`, `--deny`, `--expose-debug-port`, `--kernel-port`, `--no-kernel`, `--no-jerk`, `--mount`, and the compute flags `--runner`, `--shell`, `--eval`, `--eval-quiet`, `--sftp`, `--no-sftp`: as for `slicc attach`. Without `--runner` there is no `ssh`.
|
|
423
423
|
- `--profile <name>`: the SLICC profile for a launched browser that hosts seven. `--profile six` and `--profile six:<port>` use SLICC six's own Chrome profile instead, without the picker (see [Using SLICC six's Chrome profile](#using-slicc-sixs-chrome-profile)).
|
|
424
424
|
- `--headless`: launch browsers without a window.
|
|
@@ -615,7 +615,7 @@ slicc attach --cdp <url> [--cdp-extra <url>]... [--origin <origin>]... [--signal
|
|
|
615
615
|
|
|
616
616
|
**Setup over CDP.**
|
|
617
617
|
1. slicc picks the first page tab whose URL has an allowed origin. Until there is one it says `waiting for a seven tab` and watches for new tabs. After 15 s without one it says `still no seven tab` and what to do: a browser can hide seven's own tab from debugging clients, and then this setup can't work, so link through the tray ([Remote setup](#remote-setup-slicc-join-url-follow)). `SLICC_SEVEN_QUIET` (test-only, a Go duration) replaces the 15 s. A `Target.createTarget` refused by such a browser ends plain `slicc` with the same advice.
|
|
618
|
-
2. It attaches, grants the tab's origin `local-network-access`, `local-network` and `loopback-network` with `Browser.setPermission` (best effort), calls `Runtime.addBinding { name: "sliccLinkSend" }`, then `Runtime.enable
|
|
618
|
+
2. It attaches, calls `Inspector.enable` (answered by the browser even when the tab's renderer is gone, so a crashed tab shows up as `Inspector.targetCrashed` before anything waits on the renderer), grants the tab's origin `local-network-access`, `local-network` and `loopback-network` with `Browser.setPermission` (best effort), calls `Runtime.addBinding { name: "sliccLinkSend" }`, then `Runtime.enable`, and says `found seven at <origin>`.
|
|
619
619
|
3. For each new default execution context of the main frame whose origin is allowed, slicc mints a nonce (16 random bytes, base64url). It then calls `globalThis.sliccLinkReceive({ "t": "hello", "v": 1, "nonce", "node" })` in that context. `node` is a random id per `slicc` process (16 random bytes, base64url), the same in every hello and HELLO of that process, so seven can tell a second `slicc` on the same browser (a `slicc prompt --cdp …` next to the bridge) from a restart of the same one. The call is retried every 100 ms to 1 s until `sliccLinkReceive` is a function.
|
|
620
620
|
4. seven answers through `sliccLinkSend(JSON.stringify(message))`:
|
|
621
621
|
- `{ "t": "offer", "nonce", "sdp" }`;
|
|
@@ -631,6 +631,8 @@ slicc attach --cdp <url> [--cdp-extra <url>]... [--origin <origin>]... [--signal
|
|
|
631
631
|
- A navigation or reload ends the link, and the next allowed context starts the setup again with a new nonce.
|
|
632
632
|
- A closed tab ends the link, and slicc waits for another seven tab.
|
|
633
633
|
- A tab that closes while slicc attaches to it doesn't stop slicc: each setup call has 10 s, and when the tab is gone slicc looks for another seven tab.
|
|
634
|
+
- A crashed tab (`Target.targetCrashed`, or `Inspector.targetCrashed` on slicc's session) isn't a closed one: slicc says `seven tab crashed`, ends the link with that reason, and doesn't set up again on the dead page, whose renderer would never answer. It reloads the tab with `Page.reload` (`reloading the seven tab`) and sets up again once the browser reports `Inspector.targetReloadedAfterCrash`, or after 30 s. A tab that is running again by the time slicc looks is set up without a reload. slicc reloads at most 3 times in 5 minutes; after that it says `the seven tab keeps crashing. Reload it and slicc links it again` and waits until someone reloads the tab, closes it, or opens another seven tab, which it then prefers.
|
|
635
|
+
- A setup that fails while the browser connection is up doesn't stop slicc either: a call that times out or fails on a tab that is still there is tried again from the start after 1 s, doubling to 30 s, with `couldn't link the seven tab (<error>), trying again in <wait>`. A setup that succeeds resets the wait. Only a lost browser connection, or slicc stopping, ends the setup; then `slicc` (the default) ends as when the browser closes, `attach` exits 1, and agent commands stop with the error.
|
|
634
636
|
|
|
635
637
|
**Setup over stdio** (`--signal stdio`), for a test harness that owns CDP itself:
|
|
636
638
|
- The same messages go as NDJSON: slicc writes `hello`, `answer`, `candidate` and `bye` lines to stdout, and reads `offer`, `candidate` and `bye` lines from stdin. Messages with another nonce are ignored.
|
|
@@ -1543,7 +1545,7 @@ The wire protocol between seven (the page) and `slicc` (the node), v1. seven's s
|
|
|
1543
1545
|
Used when the node already holds a CDP connection to the browser that runs seven. No key in a URL, and nothing listening on loopback.
|
|
1544
1546
|
|
|
1545
1547
|
1. The node finds the seven target. That's a page target whose main-frame origin is allowed, using the same origin rule as slicc-node's gate: `https://<label>.sliccy.ai` other than the service hosts in slicc-browsers' `seven.excludedLabels`, plus any `--origin`.
|
|
1546
|
-
2. It attaches (`flatten: true`), calls `
|
|
1548
|
+
2. It attaches (`flatten: true`), calls `Inspector.enable`, `Runtime.addBinding { name: "sliccLinkSend" }` and `Runtime.enable`.
|
|
1547
1549
|
3. It sends `{ "t": "hello", "v": 1, "nonce": "<base64url 16 bytes>", "node": "<random per-process id>" }` (see [§5.11](#511-agent-page-cap-agent-node--page-remote-control) for how the page uses `node`) by calling `Runtime.evaluate` on `globalThis.sliccLinkReceive?.(<json>)`.
|
|
1548
1550
|
4. The page answers through the binding, `sliccLinkSend(<json>)`, with:
|
|
1549
1551
|
- `{ "t": "offer", "nonce", "sdp" }`
|
|
@@ -1558,6 +1560,7 @@ Rules:
|
|
|
1558
1560
|
- **Hello delivery** is retried until both `globalThis.sliccLinkReceive` and the `sliccLinkSend` binding exist in the main frame's context. The node calls `addBinding` again when the binding is missing (seen on macOS around the about:blank → page swap). The page should also check that `sliccLinkSend` exists before calling it.
|
|
1559
1561
|
- **On exit** the node sends `bye`.
|
|
1560
1562
|
- **Navigating or reloading seven drops the link.** The node runs the setup again when a new allowed context appears.
|
|
1563
|
+
- **A crashed seven tab is reloaded.** On `Target.targetCrashed` or `Inspector.targetCrashed` the node drops the link and reloads the tab with `Page.reload`, at most 3 times in 5 minutes, then runs the setup again once the tab is back. The page gets a fresh `hello` as after any reload.
|
|
1561
1564
|
- **ICE:** host candidates only. There's no STUN or TURN, since both peers are on the same machine.
|
|
1562
1565
|
- Chrome hides host candidates behind mDNS (`<uuid>.local`), so the node resolves them (pion `MulticastDNSMode` query-only).
|
|
1563
1566
|
- **Candidates:** a `candidate` message carries `RTCIceCandidateInit` JSON (`candidate.toJSON()`: `candidate`, `sdpMid`, `sdpMLineIndex`, `usernameFragment`), and `null` once gathering ends.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-ecoverse/slicc",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.61.0",
|
|
4
4
|
"description": "SLICC's command line for seven: links a machine's network, compute and browsers to seven over WebRTC",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -18,12 +18,12 @@
|
|
|
18
18
|
"node": ">=18"
|
|
19
19
|
},
|
|
20
20
|
"optionalDependencies": {
|
|
21
|
-
"@ai-ecoverse/slicc-darwin-arm64": "1.
|
|
22
|
-
"@ai-ecoverse/slicc-darwin-amd64": "1.
|
|
23
|
-
"@ai-ecoverse/slicc-linux-arm64": "1.
|
|
24
|
-
"@ai-ecoverse/slicc-linux-amd64": "1.
|
|
25
|
-
"@ai-ecoverse/slicc-windows-arm64": "1.
|
|
26
|
-
"@ai-ecoverse/slicc-windows-amd64": "1.
|
|
21
|
+
"@ai-ecoverse/slicc-darwin-arm64": "1.61.0",
|
|
22
|
+
"@ai-ecoverse/slicc-darwin-amd64": "1.61.0",
|
|
23
|
+
"@ai-ecoverse/slicc-linux-arm64": "1.61.0",
|
|
24
|
+
"@ai-ecoverse/slicc-linux-amd64": "1.61.0",
|
|
25
|
+
"@ai-ecoverse/slicc-windows-arm64": "1.61.0",
|
|
26
|
+
"@ai-ecoverse/slicc-windows-amd64": "1.61.0",
|
|
27
27
|
"@ai-ecoverse/slicc-jerk": "^1.4.0"
|
|
28
28
|
}
|
|
29
29
|
}
|