@ai-ecoverse/slicc 1.49.37 → 1.49.38

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 +10 -6
  2. package/package.json +7 -7
package/README.md CHANGED
@@ -422,7 +422,9 @@ Lists running CDP endpoints and installed browsers, best match first. The browse
422
422
  - `DevToolsActivePort` files in the default user-data dirs of the browsers below, in each SLICC profile under the profiles dir (see `slicc launch`), in SLICC six's profiles (see [Using SLICC six's Chrome profile](#using-slicc-sixs-chrome-profile)), and on Linux in the flatpak (`~/.var/app/<id>/config/…`) and snap (`~/snap/chromium/common/chromium`) dirs. The file's port must answer `/json/version` with the websocket path on the file's second line, otherwise the file is stale and ignored. A file without a second line starting with `/` is ignored too.
423
423
  - `GET /json/version` on `127.0.0.1:9222` to `9229`.
424
424
  - The process list (`ps -ax -o pid= -o command=`; on Linux, when that command fails (missing, or a BusyBox `ps` without `-ax`), `/proc/<pid>/cmdline` of every numeric pid, its NUL-separated arguments joined by spaces; on Windows a process snapshot (`CreateToolhelp32Snapshot`, each process's command line from `NtQueryInformationProcess`), and only when that fails `Get-CimInstance Win32_Process` with `ProcessId` and `CommandLine`, as JSON, through PowerShell within 5 s): each process started with `--remote-debugging-port=<n>` or `--remote-debugging-port <n>`. Pid 0, `slicc` itself, and commands run by a wrapper (`node`, `npx`, `tsx`, `npm`, `open`, `bash`, `zsh`, `sh`, `csh`, `fish`, `dash`, `timeout`, `env`, `sudo`, `caffeinate`, `cmd`, `powershell`, `pwsh`) are skipped. Port 0 means the port is in the `DevToolsActivePort` of the process's `--user-data-dir` (its value runs to the next whitespace followed by `--` or to the end, so paths with spaces work, and a quoted value runs to the matching quote), checked as above; without one, or with one under a `slicc/profiles` folder that isn't one of six's profiles, the process is skipped. Any other port is asked for `/json/version` on `127.0.0.1`. The exact rules are in [slicc-browsers](https://github.com/ai-ecoverse/slicc-browsers#the-process-source).
425
- - Each `--cdp` URL: `http(s)://host:port`, `ws(s)://host:port/devtools/browser/<id>`, `host:port` or a bare port. One that doesn't answer is reported on stderr and left out; the exit status stays 0.
425
+ - Each `--cdp` URL: `http(s)://host:port`, `http(s)://host:port/<token>`, `ws(s)://host:port/devtools/browser/<id>`, `host:port` or a bare port. One that doesn't answer is reported on stderr and left out; the exit status stays 0.
426
+
427
+ **A token in the path.** Some browsers answer `/json/version`, `/json/list` and their socket only under a secret path, as `http://127.0.0.1:9227/<token>/json/version`, and refuse the port's root. slicc keeps the path of an `http(s)` URL, ignoring a trailing `/` and a trailing `/json/version`, `/json/list` or `/json`, and asks for each route under it. The path works like a password, so it is shown only where a program needs it to connect: `cdp` and `webSocketDebuggerUrl` in `--json`, and the same fields of `--json` events. The table, status lines, errors, `SLICC_DEBUG=1` diagnostics and what a `cdp` stream's RESET tells the page show `http://127.0.0.1:9227/…`. Such an endpoint is never found by the port probe, since its token can't be guessed: name it with `--cdp`.
426
428
 
427
429
  Endpoints are merged by host and port. A `DevToolsActivePort` file wins over `--cdp`, which wins over the process list, which wins over the port probe. For each endpoint, `/json/version` gives the name, version and `webSocketDebuggerUrl`, and `/json/list` gives the seven tabs: `page` targets whose origin is `https://<label>.sliccy.ai`, other than `www` (`:443` is the same origin, any other port isn't). An endpoint's `cdp` has its host in lower case, with `localhost` and `::1` written as `127.0.0.1`. A `DevToolsActivePort` whose port is open but serves no `/json/version` (Chrome's opt-in remote debugging of a running browser) is listed as `wsOnly`, with the websocket URL from the file and no tab check.
428
430
 
@@ -488,7 +490,7 @@ Endpoints are merged by host and port. A `DevToolsActivePort` file wins over `--
488
490
  ```
489
491
 
490
492
  - Entry: `id` (an installed id, or `cdp:<host>:<port>`), `kind` (`endpoint` or `installed`), `tier` (1–6), `name`, `version?`, and either `endpoint` or `installed`.
491
- - `endpoint`: `cdp` (the HTTP base URL), `webSocketDebuggerUrl`, `name`, `version?`, `product?` and `userAgent?` (from `/json/version`), `source` (`devtools-active-port`, `flag`, `process` or `probe`), `browser?` (the installed id whose user-data dir held the file), `userDataDir?` (the dir that held the file, or a process's `--user-data-dir`), `profile?` (the SLICC profile name), `wsOnly?`, `six?` (`true` for SLICC six's Chrome), `sevenOpen`, `sevenTabs` (always a list; each tab's `url` and `title` are its origin, as the CDP relay shows them).
493
+ - `endpoint`: `cdp` (the HTTP base URL, with its path when it has [a token](#browsers)), `webSocketDebuggerUrl`, `name`, `version?`, `product?` and `userAgent?` (from `/json/version`), `source` (`devtools-active-port`, `flag`, `process` or `probe`), `browser?` (the installed id whose user-data dir held the file), `userDataDir?` (the dir that held the file, or a process's `--user-data-dir`), `profile?` (the SLICC profile name), `wsOnly?`, `six?` (`true` for SLICC six's Chrome), `sevenOpen`, `sevenTabs` (always a list; each tab's `url` and `title` are its origin, as the CDP relay shows them).
492
494
  - `installed`: `id`, `name`, `engine` (`chromium` or `electron`), `channel?`, `version?`, `path` (the `.app`, executable or flatpak dir), `executable` (for a flatpak, the `flatpak` binary), `bundleId?`, `via?` (`snap` or `flatpak`), `package?` (the snap or flatpak id), `userDataDir?` (the browser's default), `debugSupport` (`supported`, `disabled` or `unknown`), `debugBuild?`.
493
495
 
494
496
  Without `--json`, the same list is a table: id, name, version, state and where. The state of six's Chrome ends with `SLICC six's profile`.
@@ -534,7 +536,7 @@ slicc attach --cdp <url> [--cdp-extra <url>]... [--origin <origin>]... [--signal
534
536
  `attach` links a seven that is open in a running CDP browser and serves the link until it is interrupted (`SIGINT`, `SIGTERM`), or until stdin closes with `--signal stdio`. Status lines go to stderr, and `SLICC_DEBUG=1` adds diagnostics, pion's included. pion never writes to stderr itself.
535
537
 
536
538
  **Flags.**
537
- - `--cdp`: the browser's endpoint. `http://host:port` is looked up through `GET /json/version`, and `ws://…` is used as is. slicc talks to the browser WebSocket only and attaches to the tab with `Target.attachToTarget { flatten: true }`. It names one browser; a second `--cdp` is an error. This browser is also listed for the [`cdp`](#cdp-browser-control) capability, with `seven: true`.
539
+ - `--cdp`: the browser's endpoint. `http://host:port`, with [a token path](#browsers) if the browser wants one, is looked up through `GET /json/version`, and `ws://…` is used as is. slicc talks to the browser WebSocket only and attaches to the tab with `Target.attachToTarget { flatten: true }`. It names one browser; a second `--cdp` is an error. This browser is also listed for the [`cdp`](#cdp-browser-control) capability, with `seven: true`.
538
540
  - `--cdp-extra`: another browser seven may drive over the link (repeatable), in any form `slicc browsers --cdp` takes. Each must answer when `attach` starts.
539
541
  - `--origin`: also accept seven on this origin (`scheme://host[:port]`), repeatable. `https://<label>.sliccy.ai` is always accepted, except `www`.
540
542
  - `--signal`: `cdp` (default) or `stdio`.
@@ -590,11 +592,12 @@ slicc --default-browser [the same flags]
590
592
  slicc unpair [<fingerprint> | --all]
591
593
  ```
592
594
 
593
- Link spec §1.3. These commands link a seven that runs in the browser you use every day (Chrome, Edge or Firefox; Safari is expected not to work until tested, see [§1.3](#13-local-setup-without-cdp-loopback-signalling)), without CDP or remote debugging, as slicc-node could. Only the setup is new: once the peer connection is up, the link is the same as for `slicc attach` (see [Link](#link)).
595
+ Link spec §1.3. These commands link a seven that runs in the browser you use every day (Chrome, Edge or Firefox; Safari and other WebKit browsers can't, see [§1.3](#13-local-setup-without-cdp-loopback-signalling)), without CDP or remote debugging, as slicc-node could. Only the setup is new: once the peer connection is up, the link is the same as for `slicc attach` (see [Link](#link)).
594
596
 
595
597
  - **`slicc open`**, and `slicc --default-browser` (the same command), print the pairing URL on stdout and open it in the default browser: `open` on macOS, `xdg-open` on Linux, and `rundll32 url.dll,FileProtocolHandler` on Windows. If that fails, slicc says `could not open the default browser (…); open the URL above yourself` and goes on.
596
598
  - **`slicc pair`** only prints the pairing URL, for a seven that's already open. Paste it into seven's address bar, or into its *Link this computer* field.
597
599
  - **Plain `slicc`** falls back to this mode by itself when it finds no SLICC profile and no CDP endpoint (see [The default](#the-default-slicc)).
600
+ - **When no browser answers:** 30 s after the first pairing URL, with no request yet, slicc says `no browser has reached slicc yet`, why WebKit browsers can't, and what to do instead. Only the first URL gets this line. `SLICC_PAIRING_QUIET` (test-only, a Go duration) replaces the 30 s.
598
601
  - Both serve links until `SIGINT` or `SIGTERM`, then exit 0. A listener that can't bind, or a missing config directory, exits 1, and bad flags exit 2. Status lines go to stderr, and `SLICC_DEBUG=1` adds diagnostics.
599
602
  - **Flags** are as for `slicc attach`: `--origin`, `--name`, `--allow`, `--deny`, `--expose-debug-port`, `--kernel-port`, `--no-kernel`, `--no-jerk`, `--mount` and the compute flags. `--page <url>` is the seven page to pair (default `https://seven.sliccy.ai/`), and its origin is accepted as a seven origin. `--default-browser` takes these flags too. The flags of `slicc` that pick or launch browsers (`--browser`, `--cdp`, `--profile`, `--headless`, `--yes`, `--plain`, `--json`) are errors here. A flag of SLICC six's points back to six, as for `slicc`.
600
603
 
@@ -778,7 +781,7 @@ A page RESET or a closed link kills the jerk it started.
778
781
  Only browsers the user named are listed: the one seven runs in, `--cdp` and `--cdp-extra` for `attach`, the extras picked with `--browser` or in the picker for `slicc`, and `--cdp` for `follow`. A browser discovery found but nobody picked is not.
779
782
 
780
783
  **HELLO** lists the browsers: `"browsers": [{ "id": "chrome", "name": "Chrome (headless)", "version": "154.0.8037.98", "seven": true }]`. Every entry has all four fields.
781
- - `id` is the browser kind, then `-2`, `-3`… for a second or third of the same kind. The kind comes from `/json/version`: `electron` for an Electron user agent, else by product `chrome` (also `HeadlessChrome`, and browsers such as Brave that report `Chrome`), `edge` (`Edg`), `opera` (`OPR`), else the product lower-cased, else `chromium`.
784
+ - `id` is the browser kind, then `-2`, `-3`… for a second or third of the same kind. The kind comes from `/json/version`: `electron` for an Electron user agent, else by product `chrome` (also `HeadlessChrome`, and browsers such as Brave that report `Chrome`), `edge` (`Edg`), `opera` (`OPR`), else the product lower-cased up to a `/` or `(`, else `chromium`. So `Crest (WebKit)` is `crest`.
782
785
  - An id keeps its meaning for the life of the node. A removed id is never given to another browser, and the same endpoint (CDP host and port) added again gets its old id back.
783
786
  - `name` and `version` come from the endpoint's `/json/version`, as in `slicc browsers`.
784
787
  - `seven: true` marks the browser that hosts this seven tab (`attach --cdp`).
@@ -1471,7 +1474,8 @@ The scenario: seven is open in the user's **everyday browser** (Chrome, Edge or
1471
1474
  **Local Network Access**
1472
1475
  - Chrome's LNA prompt appears on seven's first request to `127.0.0.1`. seven only makes loopback requests after a pairing [Link] click, or on load when it has a pin, so users who never pair are never prompted.
1473
1476
  - If the permission is denied, the page says how to allow it in site settings.
1474
- - **Mixed content:** `http://127.0.0.1` is potentially trustworthy, so Chrome, Edge and Firefox allow it from https pages; bios CI tests Chrome and Firefox. WebKit as tested (Playwright's build) blocks `http://127.0.0.1` and `http://localhost` from an https page as mixed content, so the request never reaches slicc and this setup doesn't work there. Safari is assumed to behave the same until it is checked on a real Safari. In such a browser the page says it can't pair there and offers the tray path ([§1.2](#12-remote-setup-over-the-tray-hub)), or Chrome, Edge or Firefox.
1477
+ - **Mixed content:** `http://127.0.0.1` is potentially trustworthy, so Chrome, Edge and Firefox allow it from https pages; bios CI tests Chrome and Firefox. WebKit doesn't. From an https page, `fetch` to `http://127.0.0.1` and `http://localhost` and a `ws://127.0.0.1` socket fail, and nothing reaches slicc, so this setup doesn't work there. Measured in Mobile Safari 27.0 on the iOS Simulator, where an `http` page reached the same listener, in a `WKWebView` app, where App Transport Security exceptions don't change it, and in Playwright's WebKit. Safari on macOS hasn't been measured. In such a browser the page says it can't pair there and offers the tray path ([§1.2](#12-remote-setup-over-the-tray-hub)), or Chrome, Edge or Firefox. slicc can't tell which browser a URL went to, so it [says the same](#linking-seven-in-your-everyday-browser) when nothing reaches it.
1478
+ - **Why the listener stays `http`:** `https://127.0.0.1` needs a certificate the browser trusts, and the node has only a self-signed one. Installing a root in the user's trust store is out of the question, and a certificate for a public name that resolves to loopback would put its private key in every copy of slicc. A `WKWebView` app can accept one server's certificate in its navigation delegate, but only for that app's own server: it has no way to learn a certificate from a pairing URL, and teaching it would let a page decide what its browser trusts.
1475
1479
 
1476
1480
  **The link in this mode**
1477
1481
  - **ICE:** host candidates on loopback only, as in [§1.1](#11-local-setup-over-cdp).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-ecoverse/slicc",
3
- "version": "1.49.37",
3
+ "version": "1.49.38",
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.49.37",
22
- "@ai-ecoverse/slicc-darwin-amd64": "1.49.37",
23
- "@ai-ecoverse/slicc-linux-arm64": "1.49.37",
24
- "@ai-ecoverse/slicc-linux-amd64": "1.49.37",
25
- "@ai-ecoverse/slicc-windows-arm64": "1.49.37",
26
- "@ai-ecoverse/slicc-windows-amd64": "1.49.37",
21
+ "@ai-ecoverse/slicc-darwin-arm64": "1.49.38",
22
+ "@ai-ecoverse/slicc-darwin-amd64": "1.49.38",
23
+ "@ai-ecoverse/slicc-linux-arm64": "1.49.38",
24
+ "@ai-ecoverse/slicc-linux-amd64": "1.49.38",
25
+ "@ai-ecoverse/slicc-windows-arm64": "1.49.38",
26
+ "@ai-ecoverse/slicc-windows-amd64": "1.49.38",
27
27
  "@ai-ecoverse/slicc-jerk": "^1.3.9"
28
28
  }
29
29
  }