@ai-ecoverse/slicc 1.49.37 → 1.50.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 +39 -8
  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`.
@@ -551,7 +553,7 @@ slicc attach --cdp <url> [--cdp-extra <url>]... [--origin <origin>]... [--signal
551
553
  - `--no-jerk`: don't offer this machine's slicc-jerk (caps `jerk` and `jerk-seal`, see [`jerk`](#jerk-slicc-jerk-over-the-link)).
552
554
 
553
555
  **Setup over CDP.**
554
- 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.
556
+ 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.
555
557
  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`.
556
558
  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.
557
559
  4. seven answers through `sliccLinkSend(JSON.stringify(message))`:
@@ -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
 
@@ -777,8 +780,10 @@ A page RESET or a closed link kills the jerk it started.
777
780
 
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
 
783
+ **What a browser must offer.** The filter below needs the browser to pause requests and to report targets on a session of the node's own, so a `cdp` stream needs `Target.attachToBrowserTarget`, and every page it touches needs `Fetch.enable` to take the node's URL patterns and really pause what matches. When `attach`, `follow` or plain `slicc` adds a browser, the node opens one socket and calls `Target.attachToBrowserTarget`. A `wsOnly` browser is skipped, since that is Chrome's opt-in debugging of a running browser, where a socket can raise a consent dialog for a connection that's already gone, so it opens no socket until a stream does. A browser that answers `-32601` isn't listed: slicc says `seven can't drive this browser through slicc`, or logs it in plain `slicc`, and the link goes on without it, without the `cdp` cap when it was the only one. A socket that fails or doesn't answer within 2 s doesn't count, and the stream decides. A browser that has the session but refuses `Fetch.enable` on a page gets `slicc can't keep seven's origin out of this target` on that page. An acknowledgment has to mean a real pause: measured against a browser that acknowledged `Fetch.enable` without pausing, a script's `location = …` into a protected origin loaded it, and a `Runtime.evaluate` racing the commit read the protected page before the node saw it move.
784
+
780
785
  **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`.
786
+ - `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
787
  - 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
788
  - `name` and `version` come from the endpoint's `/json/version`, as in `slicc browsers`.
784
789
  - `seven: true` marks the browser that hosts this seven tab (`attach --cdp`).
@@ -814,6 +819,28 @@ Only browsers the user named are listed: the one seven runs in, `--cdp` and `--c
814
819
  - **Navigation by other means.** A script's `location = …`, a link, `window.open` or a server redirect isn't a command the node can refuse, so the node guards the network instead.
815
820
  - A target the stream attached to (`Target.attachToTarget`, or auto-attach that reached the page) or created (`Target.createTarget`) is *touched*, for as long as the stream is open, even after the page detached. That includes every tab the browser opens while the stream auto-attaches to new tabs.
816
821
  - On each touched page, iframe, background page or webview target the node attaches a session of its own, which the page never sees. On it, the node enables `Fetch` for document requests to protected hosts (`resourceType: Document`, request stage), and `Network` with `Network.setBypassServiceWorker`, so a service worker can't hand out a document without a request.
822
+ - **Browsers that can pause only documents**, such as Crest over `WKWebView`, say so twice, and the node takes neither as read:
823
+ - The refusal of those patterns carries `error.data: "documents-only"`. Any other error ends the setup, so Chrome never reaches this.
824
+ - The node then asks with `resourceType: Document`, and the answer must be `{ "holdsDocuments": true }`. An empty answer leaves the target refused: the node can't tell an acknowledgment from a pause, and one that acknowledged without pausing let a racing `Runtime.evaluate` read a protected page.
825
+ - **What `holdsDocuments` promises.** The node takes these on the browser's word and can't check them, so a browser that can't keep every one must not send it:
826
+ - each matching document, in any frame, waits for the node's answer, and one that gets no answer doesn't load, a child frame's history restore included, unless the browser reports it with `Page.frameNavigated`;
827
+ - the hold stays in place whatever any other session does, its interception, bypass and observation included, sessionless `Fetch` and `Network` commands too;
828
+ - `Input` stays in the main document and never reaches a child frame;
829
+ - `Page.getFrameTree` and `DOM.getDocument` list child frames by address, and never return a child frame's content;
830
+ - that frame evidence is complete and unambiguous: every frame in the tree, nested ones included, has its `url` and `securityOrigin`, and an `unreachableUrl` when it shows an error for one;
831
+ - `Runtime.callFunctionOn` and `Runtime.getProperties`, on any object including one for a frame's window, `Accessibility` and the other allowed `DOM` helpers stay in the main document and never cross into a child frame;
832
+ - `Runtime.evaluate` without a selector keeps the page's same-origin rules, and every evaluation world the browser admits keeps the origin boundary;
833
+ - cookie answers carry truthful `domain` and partition data, cookie writes go to their explicit destination and not the active tab, and `Network.getCookies` has its standard scope and request and body correlation;
834
+ - target and history evidence is truthful, and `Target.createTarget` makes a fresh target with the given URL.
835
+ - Such a target is *documents-only*. The node reads its frame tree during setup, once the hold is in place, and again after every `Page.frameNavigated`, restores included. Commands on the target wait for that answer, checked again as they're admitted, a `Page.navigateToHistoryEntry` after its history lookup too. A tree that lists a protected `url`, `securityOrigin` or `unreachableUrl` at any depth, that leaves out a `frame`, `url` or `securityOrigin`, or that doesn't arrive, within 10 s after a commit or the setup bounds during setup, locks the target as if it had protected history. What the browser lists is filtered like any other URL, so a protected frame's address reaches the page cut to its origin. A later protected frame is held and failed, which locks the target too. A command already running in the moment between a commit and the node hearing of it can still answer from the new main document, within the allowlist; an answer or error that arrives after the lock is dropped.
836
+ - An error from such a browser reaches the page with only its `code` and scrubbed `message`, so nothing the browser adds as `data` passes.
837
+ - **The one exception to "a protected frame's address never reaches the stream":** a value the page itself puts in a console argument or returns from a script, such as an iframe's `src`. The page already knows it, and Chrome behaves the same.
838
+ - Commands are refused by default, as a second layer, and these are allowed because they were measured on real Crest not to reach a preloaded protected iframe: navigation (`Page.navigate`, `reload`, `stopLoading`, `navigateToHistoryEntry`, `getNavigationHistory`, `getFrameTree`, `getLayoutMetrics`, `createIsolatedWorld`), `Runtime.evaluate`, `callFunctionOn`, `getProperties`, `releaseObject`, `releaseObjectGroup`, `DOM.getDocument`, `querySelector`, `querySelectorAll`, `describeNode`, `resolveNode`, `requestNode`, `getBoxModel`, `getContentQuads`, `focus`, `Accessibility.getFullAXTree`, `Input.dispatchMouseEvent`, `dispatchKeyEvent`, `insertText`, the cookie commands, `Network.enable`, and `enable` and `disable` of the other domains. Anything else is refused with `slicc: refused: slicc can't see inside this browser's frames, so it allows only the commands measured not to reach one; …`, screenshots and PDFs included: those did show the frame.
839
+ - A selector must name the main frame. `frameId` must be the target's, and `contextId`, `uniqueContextId` and `executionContextId` a context the browser reported for it. `executionContextName` and `pierce` are refused. `grantUniveralAccess` is removed from `Page.createIsolatedWorld` before it's forwarded, because `playwright-cli` always sends it and needs the world. Anything else gets `slicc: refused: slicc can't see inside this browser's frames, so a command can't name a frame or an execution context here`.
840
+ - A client's own guard must not reconfigure a hold that may be per tab, so the node answers it without forwarding: `Fetch.enable` with the one pattern `{ "urlPattern": "*", "resourceType": "Document", "requestStage": "Request" }`, `Fetch.disable`, and `Network.setBypassServiceWorker` with `bypass: true`. Other `Fetch` commands, `Network.disable` and `bypass: false` are refused.
841
+ - A session that isn't a guarded page's gets `Browser.getVersion`, `Browser.getWindowForTarget` and the target commands only.
842
+ - Every paused protected document locks the tab, whatever its `frameId`, from the moment the browser says `documents-only`, since these browsers share no convention for it.
843
+ - Client-issued requests (`Fetch.continueRequest` with `url`, and the other mutations) are refused there too, because later hops of such a request can't be paused.
817
844
  - The node fails each such request into a protected origin with `Fetch.failRequest` (`BlockedByClient`), and the target shows Chrome's error page instead. Every other request continues untouched. So a touched target never loads a protected document, and nothing the stream installed on it (`Fetch`, `Network`, emulation, overrides) ever runs in a protected document. Document-persistent scripts, bindings and CSP bypass are refused even on ordinary pages: `Page.addScriptToEvaluateOnNewDocument`, `Page.addScriptToEvaluateOnLoad`, `Runtime.addBinding` and `Page.setBypassCSP`. Their CDP error is `slicc: refused: scripts and bindings for later documents could run in seven’s pages or the vault, so the guard doesn’t allow them; run a script in the page you see with Runtime.evaluate instead`. They are never forwarded or answered with fake success; use `Runtime.evaluate` for the current document instead.
818
845
  - Before admitting content commands on a touched tab, the node reads fresh navigation history and target info on its own sessions. An uninitialized new tab also needs a fresh current-frame decision and a history retry. Missing evidence fails closed. If the tab's history has held a protected entry during this CDP stream, content commands stay refused, even after navigation away or a history reset. A blocked main-document request quarantines the tab before the node fails it. This includes script, DOM, input, screenshots, accessibility and target-session IO. Clean tabs keep their normal command path. CDP navigation still works; open a new tab to resume content commands. This conservative rule also applies to protected URLs that failed to load and to authorization flows that redirect through a protected callback.
819
846
  - Seven's own tab and its vault frame are never touched, because attaching to them is refused.
@@ -839,12 +866,14 @@ Only browsers the user named are listed: the one seven runs in, `--cdp` and `--c
839
866
  - enable or disable the `Page`, `Runtime`, `Target`, `Inspector`, `Network`, `Log` and `Fetch` domains, and settle its own interceptions (`Fetch.continueRequest`, `continueResponse`, `failRequest`, `fulfillRequest`, `continueWithAuth`, `Network.continueInterceptedRequest`), so a navigation away that the page intercepts never hangs;
840
867
  - and use `Target.setAutoAttach`, `detachFromTarget`, `closeTarget`, `getTargetInfo` and `activateTarget`.
841
868
 
842
- Anything else (`Runtime.evaluate`, `DOM.*`, snapshots, screenshots and so on) is refused with `slicc: refused: the target shows Chrome's error page for a protected URL, which names it; slicc only lets a page navigate, reload or close it`. Events on its sessions are filtered too: only `Target.*`, `Inspector.*`, `Network.*`, `Fetch.*`, the `Runtime` execution-context events and the `Page` navigation, loading, frame, lifecycle, window, download and interstitial events reach the page. So console messages, exceptions, `Log` entries, `DOM`, `CSS`, `Overlay` and `Debugger` events, and `Page.screencastFrame` (a screencast the page started before the tab failed would show the error page) are dropped. The node also remembers the last 16 protected URLs a target's error pages failed to load, and replaces each of them, as is and in its percent-encoded and decoded forms, with its origin in every string of every message on that target's sessions, opaque values (`value`, `preview`, `arguments`, `returnValue`) included. A command the page sent on the target's sessions before such a commit, other than the allowed ones above, can't answer from the error page either: if its answer arrives after the commit, the page gets `slicc: refused: the target committed Chrome's error page for a protected URL while this command ran, so slicc dropped its answer` instead (a screenshot, PDF or evaluation in flight would otherwise show the error page). Its URL and title are still redacted to the origin in listings and target events. Chrome's error pages for other URLs stay fully readable. The node tracks each touched target's main frame on its guard session (`Page.enable`): the last different-document commit (`Page.frameNavigated`) was an error page when its document is `chrome-error://chromewebdata/` (slicc-browsers' `errorPage.url`, whose `target` is `previous`) and it has an `unreachableUrl`, and that holds only while the target reports exactly that URL and no navigation is under way (`Page.frameStartedNavigating`, other than same-document, until its `Page.frameNavigated`, its document request's `Network.loadingFailed`, or the frame's `Page.frameStoppedLoading`, which also ends any doubt from an event the node couldn't read or from more than 64 navigations in flight, since nothing is in flight once the frame stops loading). Otherwise, or before the guard is ready, a protected URL locks the target as above. An error page neither locks nor unlocks: a target that was already protected stays so. An error page for a URL slicc can't parse is never exempt: it locks, as the unparseable rule says. That's stricter than slicc-browsers' `errorPage` rule, which exempts any URL's error page (nothing loaded there, so the unparseable case opens no hole the parseable one doesn't). slicc-browsers accepts it as over-protection, and no shared vector forces either answer.
869
+ Anything else (`Runtime.evaluate`, `DOM.*`, snapshots, screenshots and so on) is refused with `slicc: refused: the target shows Chrome's error page for a protected URL, which names it; slicc only lets a page navigate, reload or close it`. Events on its sessions are filtered too: only `Target.*`, `Inspector.*`, `Network.*`, `Fetch.*`, the `Runtime` execution-context events and the `Page` navigation, loading, frame, lifecycle, window, download and interstitial events reach the page. So console messages, exceptions, `Log` entries, `DOM`, `CSS`, `Overlay` and `Debugger` events, and `Page.screencastFrame` (a screencast the page started before the tab failed would show the error page) are dropped. The node also remembers the last 16 protected URLs a target's error pages failed to load, and replaces each of them, as is and in its percent-encoded and decoded forms, with its origin in every string of every message on that target's sessions, opaque values (`value`, `preview`, `arguments`, `returnValue`) included. A command the page sent on the target's sessions before such a commit, other than the allowed ones above, can't answer from the error page either: if its answer, an error included, arrives after the commit, the page gets `slicc: refused: the target committed Chrome's error page for a protected URL while this command ran, so slicc dropped its answer` instead (a screenshot, PDF or evaluation in flight would otherwise show the error page). Its URL and title are still redacted to the origin in listings and target events. Chrome's error pages for other URLs stay fully readable. The node tracks each touched target's main frame on its guard session (`Page.enable`): the last different-document commit (`Page.frameNavigated`) was an error page when its document is `chrome-error://chromewebdata/` (slicc-browsers' `errorPage.url`, whose `target` is `previous`) and it has an `unreachableUrl`, and that holds only while the target reports exactly that URL and no navigation is under way (`Page.frameStartedNavigating`, other than same-document, until its `Page.frameNavigated`, its document request's `Network.loadingFailed`, or the frame's `Page.frameStoppedLoading`, which also ends any doubt from an event the node couldn't read or from more than 64 navigations in flight, since nothing is in flight once the frame stops loading). Otherwise, or before the guard is ready, a protected URL locks the target as above. An error page neither locks nor unlocks: a target that was already protected stays so. An error page for a URL slicc can't parse is never exempt: it locks, as the unparseable rule says. That's stricter than slicc-browsers' `errorPage` rule, which exempts any URL's error page (nothing loaded there, so the unparseable case opens no hole the parseable one doesn't). slicc-browsers accepts it as over-protection, and no shared vector forces either answer.
843
870
  - **Auto-attach of targets without a URL.** A cross-site iframe can attach before its URL is known (`url: ""`, which stays empty while it waits for the debugger), and so can a `window.open` popup. So when an auto-attached session (one that doesn't answer the page's own `Target.attachToTarget`) is to a page or iframe target with an empty URL, the node holds it:
844
871
  - The page doesn't get its `attachedToTarget` yet, its events are dropped, and page commands on it are refused.
845
872
  - If the page asked for `waitForDebuggerOnStart`, the node runs `Runtime.runIfWaitingForDebugger` on it itself.
846
873
  - Once the target has a URL (`Target.targetInfoChanged`), a protected target's session is detached without the page seeing it. Otherwise the page gets `attachedToTarget` with the current `targetInfo` and `waitingForDebugger: false`. The target has already started, so a script the page adds for new documents in such a frame or popup misses its first one.
847
874
  - A target that has no URL after 10 s is treated as protected. A session that the node does forward makes the target touched (see above).
875
+ - **Page commands need a page's session,** for every browser, from the moment a stream opens. A command in a page's domain (`Page`, `Runtime`, `DOM`, `DOMSnapshot`, `Input`, `Accessibility`, `Emulation`, `CSS` and the rest) sent without a session, or on a browser session, is refused with `slicc: refused: this command needs a page's session; …`. Chrome answers those with `wasn't found` anyway, so only the error text changes. `Network` and `Memory` aren't among them: Chromium serves `Memory` at browser scope, and `Network` commands keep their own rules there. A documents-only browser refuses both once it has said so.
876
+ - **`Slicc.action`** is answered by the node on every browser and never forwarded. On a documents-only target, `Input` from a client that sent it is acknowledged and dropped too, because such a client checks `isTrusted` and dispatches its own events, so a second delivery would toggle a checkbox twice. A relay stream can't open on a page-level socket (`/devtools/page/<id>`), where Chrome answers `Target.attachToBrowserTarget` with `Not allowed`.
848
877
  - **Session-wide settings are refused on every relay session, including ordinary pages.** `Network.setExtraHTTPHeaders`, `Network.setUserAgentOverride`, `Emulation.setUserAgentOverride`, `Emulation.setLocaleOverride`, `Emulation.setTimezoneOverride`, `Network.setCacheDisabled`, `Network.emulateNetworkConditions`, `Network.emulateNetworkConditionsByRule`, `Network.overrideNetworkState`, `Network.setBlockedURLs`, and every method matching `/^Emulation\.(set|add|update|remove)[A-Z]/` receive `slicc: refused: settings for a whole session (headers, user agent, locale, time zone, cache, network conditions, blocked URLs, emulation) could reach seven’s pages or the vault, so the guard doesn’t allow them; change a request through Fetch instead`. These calls are never forwarded or answered with fake success.
849
878
  - **Browser-side inheriting navigation is refused.** `Page.navigate` to any `about:` URL, including `about:blank` and `about:srcdoc`, receives `slicc: refused: a browser-side navigation to about: gives the page the origin of whatever drives the browser, so the guard doesn’t send it; open a new tab on about:blank instead`. An absent or unparseable navigation URL receives the same error. Creating a fresh tab with `Target.createTarget` on `about:blank` remains available.
850
879
 
@@ -853,6 +882,7 @@ Only browsers the user named are listed: the one seven runs in, `--cdp` and `--c
853
882
  - **Limits.**
854
883
  - The filter relies on Chrome's site isolation. A seven frame inside a page of another site is a target of its own (`iframe`), which the node protects. Frame reads, DOM, paint and input on its page ancestor are locked too, including compound frames whose protected child shares an ordinary iframe's renderer. An iframe's lock belongs to its parent root document: a different root loader stops a cached document's frames from locking the new page, and restoring that loader locks again before content commands are answered. Without generation evidence the page stays locked, unless `DOM.getFrameOwner` on the node's private page session explicitly says a directly parented iframe is absent from the current document. Missing replies, ambiguous parents and other errors keep the lock; root commits, restores and frame attachments invalidate negative ownership evidence. A same-site frame shares its parent's process and isn't a target. Every `sliccy.ai` host is protected, so this only matters for an extra origin, such as one port of `127.0.0.1` framed by a page on another.
855
884
  - A document that arrives without a request isn't failed: a page restored from the back/forward cache, and a `blob:` or `filesystem:` URL of a protected origin (which only that origin can make). Targets with protected history are content-locked before commands can race a restore, regardless of delayed commit events. The node still detaches after a protected commit. Navigation initiated outside the stream after fresh evidence, including loads already in flight before the guard was installed, remains a limit; this does not authorize content commands on a quarantined target.
885
+ - **A browser that pauses documents through its navigation delegate** only pauses in a tab the stream touched, so a `window.open` onto a protected URL loads in the new tab before anyone can attach. The stream still can't reach it, since attaching to it is refused, and the page that opened it can't read across origins, but the request goes out with the user's cookies. Measured on Crest, which also reaches main frames only.
856
886
  - The network guard fails only `http` and `https` documents. Chrome itself keeps a web page from navigating to `chrome:`, `chrome-untrusted:`, `devtools:` and `file:` URLs, but not to an extension's web-accessible pages. A touched page that sends itself to one with a script or a link is detached after the commit, as above.
857
887
  - If the node loses its own session (`ECONNRESET: slicc lost track of the browser's targets`), it refuses every command and resets the stream unless the browser closes within 2 s.
858
888
  - The node's own setup connection (see [Local setup](#local-setup-slicc-attach)) is not a `cdp` stream and isn't filtered.
@@ -1471,7 +1501,8 @@ The scenario: seven is open in the user's **everyday browser** (Chrome, Edge or
1471
1501
  **Local Network Access**
1472
1502
  - 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
1503
  - 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.
1504
+ - **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.
1505
+ - **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
1506
 
1476
1507
  **The link in this mode**
1477
1508
  - **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.50.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.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.50.0",
22
+ "@ai-ecoverse/slicc-darwin-amd64": "1.50.0",
23
+ "@ai-ecoverse/slicc-linux-arm64": "1.50.0",
24
+ "@ai-ecoverse/slicc-linux-amd64": "1.50.0",
25
+ "@ai-ecoverse/slicc-windows-arm64": "1.50.0",
26
+ "@ai-ecoverse/slicc-windows-amd64": "1.50.0",
27
27
  "@ai-ecoverse/slicc-jerk": "^1.3.9"
28
28
  }
29
29
  }