@ai-ecoverse/slicc 1.67.15 → 1.67.17
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
|
@@ -395,6 +395,7 @@ With `--json`, `attach`, `open`, `pair` (and `--default-browser`, which is `open
|
|
|
395
395
|
- `jerk`: `{"offered","seal"}`, the `jerk` and `jerk-seal` caps;
|
|
396
396
|
- `kernelPort?`: the local port of [kernel services](#kernel-services), when they are on.
|
|
397
397
|
- `link-lost`: `mode`, `reason?` when slicc or seven closed the link (`slicc is exiting`, seven's `bye` reason, `unlinked by <name>` with `code` `UNLINKED` on `follow`), or `message?` for a failure; `device?` on `open` and `pair`.
|
|
398
|
+
- `waiting`: `mode` (`cdp`), `reason`, `candidates` and `message`, on `attach` while the CDP setup waits for seven (see [Setup over CDP](#local-setup-slicc-attach)): `reason` `no-seven-tab` (`candidates` `0`) after 15 s without a seven tab, or when the tab slicc set up left seven and there is no other, and `no-ready-seven` when `candidates` seven tabs are open (the one slicc set up among them) and none has taken a `hello` for 5 s. `message` is the status line, for a person. It comes again only when `reason` or `candidates` change, and a `hello` that gets through clears it, so the next wait comes again; `linked` follows once seven offers. A program treats a `reason` it doesn't know by its `message`.
|
|
398
399
|
- `reconnecting`: `attempt`, `retryAt` (RFC 3339, UTC), `wait` (milliseconds), `reason?` and `code?` (the failure that led here, and the hub's code), on `follow` before each new dial. These are the `attempt`, `retryAt` and `code` of [`slicc tray --json`](#running-links-slicc-tray).
|
|
399
400
|
- `error`: `message`, `code?` (the hub's or seven's code, on `follow`), `mode?`, and `retryable`: `true` when slicc goes on by itself (`follow` reconnects, and an offer from seven that slicc can't answer leaves the run waiting for the next one), `false` when the run ends, with exit 1 (exit 2 for a bad `--origin` on `attach`).
|
|
400
401
|
- `credential`: `op`, `provider`, `leaseId`, `expiresAt?`, `by`, `upstream?`, for each credential lease this process serves over [`jerk`](#jerk-slicc-jerk-over-the-link): `op` `seal` (`by` `seven`) once a lease has gone to seven, `unseal` (`by` `seven`) once seven's `unseal` has dropped one, and `revoked` (`by` `host`) once the control socket's `unseal` has dropped one. `upstream` is `true` when jerk revoked the token at the provider and `false` when it didn't (a token jerk only read lives on there until it expires); it is left out when jerk doesn't say, as with a slicc-jerk older than 1.4.0. Never a credential, a scope or a rule.
|
|
@@ -443,7 +444,7 @@ slicc [--browser <id>]... [--cdp <url>]... [--page <url>] [--origin <origin>]...
|
|
|
443
444
|
- a running endpoint without one: slicc opens `--page` in a new tab (`Target.createTarget`) and attaches;
|
|
444
445
|
- an installed browser: slicc launches it as `slicc launch --url <page>` does, in its SLICC profile (`--profile`, or the one picked with `p`; default: the browser id), with the seven flags and prefs, and `--headless=new` with `--headless`, then attaches.
|
|
445
446
|
|
|
446
|
-
Without `--browser`, the first row of the ranking that can host seven is chosen, an endpoint slicc didn't launch included, but never one in SLICC six's profile. When that happens without the picker, slicc says so on stderr, for an endpoint that isn't in a SLICC profile and that no `--cdp` named: `slicc: using Google Chrome (profile default) at http://127.0.0.1:9222, which slicc didn't launch; opened a new seven tab. Use --browser or --cdp to choose another.` It says `found a seven tab` when one was open already. The profile is `default` for a browser's default user-data dir, the base name of the user-data dir otherwise, and left out (with its parentheses) when unknown. With `--json` the line comes as the `foreign-browser` event too. Picking a row in the picker, `--browser`, or a `--cdp` for that endpoint means the user chose it, and there is no notice. An Electron app can't host seven. Each further browser is an extra: an installed one is launched without a start page, and an endpoint is used as it is. Then the link is set up as for `slicc attach` (see [Local setup](#local-setup-slicc-attach)): over CDP with the browser that hosts seven,
|
|
447
|
+
Without `--browser`, the first row of the ranking that can host seven is chosen, an endpoint slicc didn't launch included, but never one in SLICC six's profile. When that happens without the picker, slicc says so on stderr, for an endpoint that isn't in a SLICC profile and that no `--cdp` named: `slicc: using Google Chrome (profile default) at http://127.0.0.1:9222, which slicc didn't launch; opened a new seven tab. Use --browser or --cdp to choose another.` It says `found a seven tab` when one was open already. The profile is `default` for a browser's default user-data dir, the base name of the user-data dir otherwise, and left out (with its parentheses) when unknown. With `--json` the line comes as the `foreign-browser` event too. Picking a row in the picker, `--browser`, or a `--cdp` for that endpoint means the user chose it, and there is no notice. An Electron app can't host seven. Each further browser is an extra: an installed one is launched without a start page, and an endpoint is used as it is. Then the link is set up as for `slicc attach` (see [Local setup](#local-setup-slicc-attach)): over CDP with the browser that hosts seven, on a page tab on an allowed origin that is ready to link. When this run launched that browser, the first link closes the other seven tabs there that show the same page (the same origin and path; for six's profile, any tab under `/7/` or `/os/`) and aren't ready to link, such as a seven tab Chrome restored from the last session next to the one slicc opened: seven runs in one tab per profile, and the extra tab only waits. slicc says `closed an extra seven tab that wasn't linked; seven runs in one tab per profile`. It never closes tabs in a browser it didn't launch.
|
|
447
448
|
|
|
448
449
|
**What the link offers:** `net` (tcp, resolve), `http`, `ws`, `udp`, and `cdp` with the browser that hosts seven (`seven: true`) and every extra, under the local policy with all of their debugging ports protected, and this machine's other debugging ports too (see [Network policy](#network-policy)); and kernel services on `--kernel-port` (default 80, or a spare port when this user can't have 80; `--no-kernel` turns them off) when seven offers `kernel-in` (see [Kernel services](#kernel-services)); and `ssh` only with `--runner` (see [SSH server](#ssh-server)); and `fs` with each `--mount` folder (see [Host folders](#host-folders)). seven gets full control of every listed browser, the one it runs in too. The `cdp` list (HELLO `browsers`) has only the browser that hosts seven and the extras picked with `--browser` or in the picker; the other browsers discovery found are never offered.
|
|
449
450
|
|
|
@@ -452,7 +453,7 @@ The cdp list follows the browsers: an extra that stops answering is taken off th
|
|
|
452
453
|
**Flags.**
|
|
453
454
|
- `--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`).
|
|
454
455
|
- `--cdp <url>`: also consider this CDP endpoint, as `slicc browsers --cdp`.
|
|
455
|
-
- `--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. Navigation outside those paths stops signalling, including same-document route changes (`history.pushState`, `history.replaceState`, or a hash change). Returning to either path links it again with a fresh hello and nonce, even in the same document. Route changes within the allowed paths keep the current link; iframe route changes do not affect it. It must be `http` or `https`, and its origin is accepted as a seven origin.
|
|
456
|
+
- `--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. Navigation outside those paths stops signalling, including same-document route changes (`history.pushState`, `history.replaceState`, or a hash change). Returning to either path links it again with a fresh hello and nonce, even in the same document. Route changes within the allowed paths keep the current link; iframe route changes do not affect it. With SLICC six's profile, a `--page` of `https://www.sliccy.ai` alone (no path, or `/`, and no query or fragment) means `https://www.sliccy.ai/7/`, with the same rules, since the bare origin is six's UI; a `--page` under `/7/` or `/os/` keeps those rules too and opens as given. It must be `http` or `https`, and its origin is accepted as a seven origin.
|
|
456
457
|
- `--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`.
|
|
457
458
|
- `--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)).
|
|
458
459
|
- `--headless`: launch browsers without a window.
|
|
@@ -498,6 +499,7 @@ The cdp list follows the browsers: an extra that stops answering is taken off th
|
|
|
498
499
|
- `credential`: `op`, `provider`, `leaseId`, `expiresAt?`, `by`, `upstream?`, as on [`attach`](#lifecycle-events---json-on-attach-open-pair-and-follow), for each credential lease this run seals, unseals or revokes over `jerk`.
|
|
499
500
|
- `mode`: `mode` (`loopback`) and `reason` (`no-browser`), when the run [falls back](#the-default-slicc) to the default browser. Then come `pairing`, `linked` and `link-lost` events (each `linked` and `link-lost` with `mode` and `device`, the page's fingerprint), and `closed` with `browsers: []`.
|
|
500
501
|
- `pairing`: `url`, a pairing URL, after `mode`.
|
|
502
|
+
- `waiting`: `reason`, `candidates` and `message`, as on [`attach`](#lifecycle-events---json-on-attach-open-pair-and-follow) but without `mode`, while slicc waits for a seven tab that is ready to link. Plain mode and the dashboard show `message`.
|
|
501
503
|
|
|
502
504
|
```
|
|
503
505
|
{"schema":1,"event":"discovered","entries":[…]}
|
|
@@ -650,7 +652,8 @@ slicc attach --cdp <url> [--cdp-extra <url>]... [--origin <origin>]... [--signal
|
|
|
650
652
|
- `--json`: NDJSON lifecycle events on stdout (see [Lifecycle events](#lifecycle-events---json-on-attach-open-pair-and-follow)). Not with `--signal stdio`, whose setup messages own stdout (exit 2).
|
|
651
653
|
|
|
652
654
|
**Setup over CDP.**
|
|
653
|
-
1. slicc picks
|
|
655
|
+
1. slicc picks a page tab whose URL has an allowed origin. With one such tab it takes that one. With more (seven runs in one tab per profile, so the others wait for that tab, as when Chrome restores a seven tab next to the one slicc opened), it attaches to each in turn, evaluates `[typeof globalThis.sliccLinkReceive === 'function', document.visibilityState === 'visible']` in it without adding a binding, detaches, and takes the first tab that is ready (`sliccLinkReceive` is a function), then a visible one, then the first. Until there is a tab it says `waiting for a seven tab` and watches for new tabs, also for a tab that navigates or redirects onto an allowed origin. 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.
|
|
656
|
+
- **A tab that isn't ready.** When the tab slicc set up has taken no `hello` for 5 s (no allowed main-frame context, or `sliccLinkReceive` still missing), slicc looks at the other tabs again, every 5 s until a `hello` gets through. It moves to another tab that is ready (`the seven tab isn't ready to link; moving to another seven tab that is`), or to any other seven tab once its own has left seven (`the seven tab left seven; moving to another seven tab`); the tab it leaves gets a `bye` with the reason `moved to another seven tab` when it had a `hello`. Otherwise it says why it waits (`the seven tab isn't ready to link yet; …`, or `<n> seven tabs are open and none is ready to link yet; …`), once for each new reason or number of tabs, and as the `waiting` event with `--json`. `SLICC_SEVEN_READY` (test-only, a Go duration) replaces the 5 s.
|
|
654
657
|
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>`.
|
|
655
658
|
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.
|
|
656
659
|
4. seven answers through `sliccLinkSend(JSON.stringify(message))`:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-ecoverse/slicc",
|
|
3
|
-
"version": "1.67.
|
|
3
|
+
"version": "1.67.17",
|
|
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.67.
|
|
22
|
-
"@ai-ecoverse/slicc-darwin-amd64": "1.67.
|
|
23
|
-
"@ai-ecoverse/slicc-linux-arm64": "1.67.
|
|
24
|
-
"@ai-ecoverse/slicc-linux-amd64": "1.67.
|
|
25
|
-
"@ai-ecoverse/slicc-windows-arm64": "1.67.
|
|
26
|
-
"@ai-ecoverse/slicc-windows-amd64": "1.67.
|
|
21
|
+
"@ai-ecoverse/slicc-darwin-arm64": "1.67.17",
|
|
22
|
+
"@ai-ecoverse/slicc-darwin-amd64": "1.67.17",
|
|
23
|
+
"@ai-ecoverse/slicc-linux-arm64": "1.67.17",
|
|
24
|
+
"@ai-ecoverse/slicc-linux-amd64": "1.67.17",
|
|
25
|
+
"@ai-ecoverse/slicc-windows-arm64": "1.67.17",
|
|
26
|
+
"@ai-ecoverse/slicc-windows-amd64": "1.67.17",
|
|
27
27
|
"@ai-ecoverse/slicc-jerk": "^1.9.1"
|
|
28
28
|
}
|
|
29
29
|
}
|