@ai-ecoverse/slicc 1.50.2 → 1.51.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 +37 -9
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
| `slicc browsers --json` | list running CDP endpoints and installed browsers, ranked |
|
|
22
22
|
| `slicc update [--check]` | replace this binary with the latest release (works now; see [Updates](#updates)) |
|
|
23
23
|
| `slicc install jerk` | install slicc-jerk into slicc's data folder (works now; see [Companion tools](#companion-tools)) |
|
|
24
|
+
| `slicc capabilities --json` | what this slicc offers a program that drives it: its commands, events and control ops (works now; see [Driving slicc from a program](#driving-slicc-from-a-program-slicc-capabilities)) |
|
|
24
25
|
|
|
25
26
|
## Install
|
|
26
27
|
|
|
@@ -294,7 +295,7 @@ Errors name the step that failed (`attestation identity: …`). A bundle from a
|
|
|
294
295
|
|
|
295
296
|
These checks come first, so `--check` refuses the same way and nothing asks GitHub.
|
|
296
297
|
|
|
297
|
-
Release builds outside npm and app bundles print a notice on stderr when a newer release exists: ``slicc X is available (you have Y); run `slicc update` ``. A go-installed release says ``run `go install github.com/ai-ecoverse/slicc-cli/cmd/slicc@latest` `` instead. The notice comes from a cache (`<user cache dir>/slicc/update-check-seven.json`; six's Go follower uses `update-check.json`, see [Coming from SLICC six](#coming-from-slicc-six)), and a background check refreshes it at most once every 24 hours, so no run waits on the check for more than 2 seconds. `--version`, `update`, and any command line with `--help`, `-h` or `-help` print no notice.
|
|
298
|
+
Release builds outside npm and app bundles print a notice on stderr when a newer release exists: ``slicc X is available (you have Y); run `slicc update` ``. A go-installed release says ``run `go install github.com/ai-ecoverse/slicc-cli/cmd/slicc@latest` `` instead. The notice comes from a cache (`<user cache dir>/slicc/update-check-seven.json`; six's Go follower uses `update-check.json`, see [Coming from SLICC six](#coming-from-slicc-six)), and a background check refreshes it at most once every 24 hours, so no run waits on the check for more than 2 seconds. `--version`, `capabilities`, `update`, and any command line with `--help`, `-h` or `-help` print no notice.
|
|
298
299
|
|
|
299
300
|
## Telemetry
|
|
300
301
|
|
|
@@ -302,7 +303,7 @@ Release builds (a plain `X.Y.Z` version, linked in or, for `go install`, from th
|
|
|
302
303
|
- `enter`, with the subcommand as `source`, from a fixed list (`abort`, `attach`, `browsers`, `follow`, `install`, `launch`, `open`, `pair`, `prompt`, `unpair`, `update`, `wait`, `watch`, `default` for no command (no arguments, or only flags), `join` for a bare join URL, otherwise `unknown`). No other argument is ever sent.
|
|
303
304
|
- `error`, for operational failures, from a fixed set of sources (`update`, `signal`, `link`, `browser`, `ssh`, `cdp`). Messages pass through go-optel's sanitizer, which strips URLs and paths.
|
|
304
305
|
|
|
305
|
-
`--version`, and any command line with `--help`, `-h` or `-help` (such as `slicc update --help`), send nothing, and development builds never configure a client.
|
|
306
|
+
`--version`, `capabilities`, and any command line with `--help`, `-h` or `-help` (such as `slicc update --help`), send nothing, and development builds never configure a client.
|
|
306
307
|
|
|
307
308
|
## Environment
|
|
308
309
|
|
|
@@ -323,6 +324,28 @@ Release builds (a plain `X.Y.Z` version, linked in or, for `go install`, from th
|
|
|
323
324
|
| `SLICC_LINK_URL` | inside seven only: the link facade's address, `tcp://127.0.0.1:<port>` (see [Inside seven](#inside-seven)) |
|
|
324
325
|
| `SLICC_USER_DATA_DIR`, `XDG_STATE_HOME` | read, as SLICC six reads them, only to find six's Chrome profile (see [Using SLICC six's Chrome profile](#using-slicc-sixs-chrome-profile)) |
|
|
325
326
|
|
|
327
|
+
## Driving slicc from a program: `slicc capabilities`
|
|
328
|
+
|
|
329
|
+
```
|
|
330
|
+
slicc capabilities [--json]
|
|
331
|
+
```
|
|
332
|
+
|
|
333
|
+
`slicc capabilities --json` is the handshake of a program that drives `slicc`, such as a native app: one JSON document on stdout, from the binary's own tables, so it describes exactly the `slicc` it came from. It reads no files, asks no network, sends no telemetry and prints no update notice, so it works the same inside an app bundle. Without `--json` it prints the version, the contract and a table of the commands.
|
|
334
|
+
|
|
335
|
+
```
|
|
336
|
+
{"schema":1,"version":"<slicc version>","contract":1,"commands":{"<name>":{"json":"document"|"events"|"none","vocabulary"?:"events"|"agent"}},"events":{"schema":1,"names":[…]},"agent":{"events":[…],"own":[…]},"control":{"v":1,"ops":["status",…]}}
|
|
337
|
+
```
|
|
338
|
+
|
|
339
|
+
- **`schema`:** the shape of this document, 1.
|
|
340
|
+
- **`version`:** the version `slicc --version` prints.
|
|
341
|
+
- **`contract`:** 1. It goes up only for a breaking change to a contract this document describes: a field or event that changes meaning or goes away. New commands, fields, events and ops leave it alone.
|
|
342
|
+
- **`commands`:** every command, keyed by name: `default` for `slicc` with no command, `follow`, `prompt`, `watch`, `wait` and `abort` (also after a join URL), `attach`, `open`, `pair`, `unpair`, `tray`, `browsers`, `launch`, `update`, `install`, `capabilities`, `version` and `help`. `json` says what `--json` prints: `document` (one JSON value), `events` (NDJSON, one event a line) or `none` (no `--json`). An `events` command has `vocabulary`: `events` for lines with `schema` and `event` (see [The default](#the-default-slicc) and [`slicc launch`](#slicc-launch---browser-id---profile-name---url-url---headless---no-seven-flags---json)), or `agent` for seven's agent events with `t` (see [`agent`](#agent-page-cap-agent-node--page)).
|
|
343
|
+
- **`events`:** `schema`, the `schema` every `event` line carries, and `names`, every `event` a `vocabulary: "events"` command can print, sorted.
|
|
344
|
+
- **`agent`:** `events`, the `t` of every agent event slicc knows, and `own`, the lines slicc itself adds to that stream (`settled`, see [Remote control](#remote-control-slicc-prompt-watch-wait-and-abort)).
|
|
345
|
+
- **`control`:** `v`, the version of the [control socket](#running-links-slicc-tray) protocol, and `ops`, the ops it answers.
|
|
346
|
+
|
|
347
|
+
A program reads `contract` and the names it needs, and treats anything it doesn't know as absent: an older `slicc` lacks the newer commands, events and ops, and a newer one may have more. `TestCapabilitiesNameEveryCommandEventAndOp` fails when a command, an event or a control op is added to the code without appearing here, and keeps the document's fixture, [`test/integration/testdata/native/capabilities.json`](test/integration/testdata/native/capabilities.json), in step with the binary.
|
|
348
|
+
|
|
326
349
|
## The default: `slicc`
|
|
327
350
|
|
|
328
351
|
```
|
|
@@ -381,7 +404,7 @@ The cdp list follows the browsers: an extra that stops answering is taken off th
|
|
|
381
404
|
| Esc | back, in the profile chooser |
|
|
382
405
|
| `q`, Ctrl-C | quit; in the dashboard, close down as described above |
|
|
383
406
|
|
|
384
|
-
**The dashboard** follows, in sections: BROWSERS (launched or attached, their CDP port, hosts seven or extra,
|
|
407
|
+
**The dashboard** follows, in sections: BROWSERS (launched or attached, their CDP port, hosts seven or extra, `gone` while one doesn't answer, and `unlisted` for an extra left off the cdp list because it has no browser session); SEVEN (the tab, the link state (`waiting for seven`, `connecting`, `linked` with its uptime, `reconnecting` after a link is lost, while slicc waits for seven to offer again, or `relinking` while new capabilities are applied), the policy summary, and stream counts per kind, open and total, never contents); CAPABILITIES (the network capabilities always offered, then `jerk`, `shell` with `ssh via <runner>`, `kernel` with its URL, or why it is off, and the shared folders); RECENT (the last status lines, links in green, losses in yellow, errors in red); and the update notice, which then isn't printed on stderr. Keys: `c` capabilities, `m` share a folder, `q` quit. `NO_COLOR` turns colors off.
|
|
385
408
|
|
|
386
409
|
**The dashboard after `Default browser`** links seven over loopback, as `slicc open` does, and opens the pairing URL in the default browser. In place of BROWSERS it shows `Default browser paired over loopback · no cdp hosts seven`; SEVEN starts with the pairing URL (a link where the terminal supports it, wrapped to the terminal's width, good once, for 10 minutes) until seven links, then `↵ for a URL to pair another seven`. The other sections are as above. Its capabilities are those of the command line: the capabilities screen and `m` aren't offered, so changing them means restarting slicc. Keys: `↵` a new pairing URL, `y` copies the URL to the clipboard (OSC 52), `q` quit.
|
|
387
410
|
|
|
@@ -807,7 +830,7 @@ Only browsers the user named are listed: the one seven runs in, `--cdp` and `--c
|
|
|
807
830
|
- **URLs slicc can't parse** count as protected wherever the node judges a URL the browser will load or has loaded. Chrome's parser and the node's (WHATWG) disagree at the edges: Chrome loads `http://exa mple.sliccy.ai/` as `http://exa%20mple.sliccy.ai/`, a `sliccy.ai` host that gets seven's cookies, and, in some versions, `http://<U+200D>.sliccy.ai/` as `http://xn--1ug.sliccy.ai/`, and the node's parser rejects all of those forms. So a command whose destination doesn't parse (`url` of `Target.createTarget`, `Page.navigate`, `Fetch.continueRequest`, `Network.continueInterceptedRequest`, `Network.loadNetworkResource` and `PWA.launch`, `installUrlOrOrigin` of `PWA.install`, the `url` of a cookie command or any of the `urls` of `Network.getCookies` and `Page.getCookies`, and a history entry's `url` or `userTypedURL`) is refused with `slicc: refused: slicc can't parse this URL, so it could be a protected page`. An empty URL is fine (`Target.createTarget` with `url: ""` opens `about:blank`). On the browser's side, a target, a main frame's `securityOrigin`, an execution context's `origin`, a request or WebSocket, and a service worker whose URL doesn't parse are protected like seven's: left out of listings (see Listing), not attachable, detached, hidden, their document loads failed and their requests stripped. The opaque origins `null` and `://` are not affected. A `blob:null/…` URL (a blob made on an opaque origin, such as a `data:` page or a sandboxed frame) is: its inner `null/…` doesn't parse, and slicc can't name the blob's creator, so it is protected too. URLs the node only reads, such as storage keys and script URLs, are unaffected. In what the page gets, a URL that doesn't parse is cut whole (to an empty string), because it has no origin to keep. The cost: a page on a host that Chrome accepts and WHATWG doesn't (an invalid `xn--` label, a joiner such as U+200D, a space or another forbidden code point), and Chrome's error page for one, is cut too, and navigating to it is refused. URLs Chrome rejects as well (`http://[::1`, `http://a:99999/`, `http://1.2.3.4.5/`) lose nothing: Chrome answers `Page.navigate` with `Cannot navigate to invalid URL`, and `Target.createTarget` with a tab that never loads a document.
|
|
808
831
|
- **Refused**, with `{"id":…,"sessionId"?:…,"error":{"code":-32000,"message":"slicc: refused: target is on seven's origin"}}`, never forwarded: `Target.createTarget`, `Page.navigate` and anything else whose `url` is protected (one that doesn't parse is refused with `slicc: refused: slicc can't parse this URL, so it could be a protected page`, see above); `Page.navigateToHistoryEntry` to an entry whose URL is protected (the node looks it up with `Page.getNavigationHistory`); `Target.attachToTarget`, `activateTarget`, `closeTarget`, `autoAttachRelated`, `Browser.getWindowForTarget` and any other command whose `targetId` or `frameId` is a protected target; and every command on a session whose target is protected, or became so. `Target.getTargetInfo` and `Target.detachFromTarget` stay allowed, except `Target.getTargetInfo` on a hidden target (see *Listing*).
|
|
809
832
|
- **Origins and storage.** A command whose `origin`, `securityOrigin`, `ownerOrigin`, `issuerOrigin`, `topLevelOrigin`, `topLevelSite`, `embeddedOrigin`, `requestingOrigin`, `scopeURL` or `manifestId` is protected, or whose `storageKey` or `cacheId` names seven's storage, is refused the same way. This covers `Storage.*`, `IndexedDB.*`, `CacheStorage.*`, `DOMStorage.*`, `FileSystem.*`, `ServiceWorker.*`, `PWA.*`, `Browser.setPermission` and `Browser.grantPermissions`. Free-form values (`expression`, `arguments`, `value`, `headers`, `postData` and the like) aren't searched.
|
|
810
|
-
- **Cookies.** `Network.getCookies`, `Network.getAllCookies`, `Storage.getCookies` and `Page.getCookies` answer without the cookies whose domain is protected (`sliccy.ai` and every subdomain, and each extra origin's host and its parents: cookies ignore ports), and without partitioned cookies whose `partitionKey.topLevelSite` is such a site. `Network.setCookie`, `setCookies`, `deleteCookies`, `Storage.setCookies` and `Page.deleteCookie` for such a domain, a URL on such a host, or a partition key under such a site, are refused with `slicc: refused: cookies on seven's origin`. So are `Network.clearBrowserCookies` and `Storage.clearCookies`, except in a browser context this stream created with `Target.createBrowserContext`.
|
|
833
|
+
- **Cookies.** `Network.getCookies`, `Network.getAllCookies`, `Storage.getCookies` and `Page.getCookies` answer without the cookies whose domain is protected (`sliccy.ai` and every subdomain, and each extra origin's host and its parents: cookies ignore ports), and, when the browser supplies partition data, without partitioned cookies whose `partitionKey.topLevelSite` is such a site (see "Where those promises stop" below). `Network.setCookie`, `setCookies`, `deleteCookies`, `Storage.setCookies` and `Page.deleteCookie` for such a domain, a URL on such a host, or a partition key under such a site, are refused with `slicc: refused: cookies on seven's origin`. So are `Network.clearBrowserCookies` and `Storage.clearCookies`, except in a browser context this stream created with `Target.createBrowserContext`.
|
|
811
834
|
- **Requests a page makes to seven.** For a request whose URL is protected, `Network.*` and `Fetch.*` events lose their `Cookie`, `Set-Cookie`, `Authorization` and `Proxy-Authorization` headers (in the header maps and as lines of the raw header texts, which otherwise stay, their URLs cut as everywhere) and their cookie lists, and `requestWillBeSentExtraInfo` drops seven's cookies from `associatedCookies` for any request. Chrome can send `requestWillBeSentExtraInfo` and `responseReceivedExtraInfo` before the event that names the request's URL, so the node holds them until the request is found to be protected, gets its response, finishes or fails (a WebSocket or WebTransport once it is created); one still held after 2 seconds is passed on stripped, as for a protected request. For a WebSocket, WebTransport or EventSource on a protected origin (`ws:` and `wss:` count as `http:` and `https:`), `webSocketWillSendHandshakeRequest`, `webSocketHandshakeResponseReceived`, `webSocketFrameError`, `eventSourceMessageReceived` and `dataReceived` are dropped. Reading such a request's body (`Network.getResponseBody`, `Fetch.getResponseBody`, `takeResponseBody…AsStream`, `Audits.getEncodedResponse` and the like) is refused. A request paused at the response stage whose response headers name a protected URL (an ordinary redirect into seven, say) counts as such a request too. `Fetch.continueRequest` and `Network.continueInterceptedRequest` with a `url` that the node has seen redirect into a protected origin on that target are refused with `slicc: refused: that URL redirects to seven's origin`. So is reading a stylesheet or script that came from a protected URL, directly or through a redirect: `Page.getResourceContent` and `Page.searchInResource` for its URL, and any command naming its `styleSheetId` or `scriptId`. CSS rules and styles from it reach the page with only their `styleSheetId` and `origin`. In a dedicated, shared or service worker, the node keeps its own guard session (Network only), and the worker's commands, `Runtime.runIfWaitingForDebugger` included, wait until that session's `Network.enable` answers, within the same bounds as a page's guard. A worker script other than the worker's own is readable only if that guard saw its whole redirect chain and none of it was protected; an import from before the guard attached, such as in a worker that was already running, is refused. In a page, a stylesheet or script loaded before the node attached to the tab has no redirect chain the node saw, so it stays readable even if it came through a redirect from a protected origin (a known residual). The node also checks the answer, because the page may ask before the node has seen the request. When `Network.getResponseBody`, `searchInResponseBody`, `streamResourceContent`, `getResponseBodyForInterception`, `takeResponseBodyForInterceptionAsStream`, `getRequestPostData`, `Fetch.getResponseBody`, `Fetch.takeResponseBodyAsStream` or `Audits.getEncodedResponse` answers, the node holds the answer until the request has a response (for `getRequestPostData`, until it is sent; for an intercepted request, until it is paused). If the request is protected by then, the answer is refused, and a stream it handed out is closed. If the node still hasn't seen the request after 2 seconds, the answer is refused with `slicc: refused: slicc hasn't seen this request, so it could be seven's`. `Network.replayXHR` is never forwarded: for a protected or unknown request it keeps the body-getter refusal; for a known ordinary request it is refused with `slicc: refused: Network.replayXHR follows redirects inside the browser, so it could send a request to seven's pages or the vault`. Chrome's native replay cannot classify each redirect before sending it. This does not block page-initiated fetches, XHR or subresources, including their redirects into protected origins; C5 allows those requests while the content and credential protections still apply. A URL override through `Fetch.continueRequest`, a redirect supplied through `Fetch.fulfillRequest` or `Fetch.continueResponse`, and `Fetch.continueWithAuth` make the request client-issued. The guard correlates its network ID on that target and fails a protected hop before sending it; an unmodified page continuation does not establish client ownership. Missing correlation, an unguarded worker or exhausted ownership tracking refuses the client mutation. `Network.continueInterceptedRequest` with `url` or `rawResponse` is always refused, whatever the destination; use Fetch instead. Chrome 156 removed `Network.setRequestInterception`, so its compatibility refusal has committed wire coverage rather than a native control. `IO.read` is refused, with `slicc: refused: slicc didn't hand out this stream, so it could be seven's`, unless the node passed that handle to the page in an allowed answer (`take…AsStream`, `Page.printToPDF`, or `IO.resolveBlob` as `blob:<uuid>`). - **Paused requests to seven.** A page session's own interception never gets to touch a request whose URL is protected, whatever its kind (a document, `fetch()`, XHR, an image or any other subresource), at either stage. The node keeps `Fetch.requestPaused`, `Fetch.authRequired` and the deprecated `Network.requestIntercepted` for such a request from the page and settles it itself:
|
|
812
835
|
- a document request is failed (`Fetch.failRequest` with `BlockedByClient`, or `Network.continueInterceptedRequest` with `errorReason: BlockedByClient`);
|
|
813
836
|
- any other request continues untouched (`Fetch.continueRequest`, or `Network.continueInterceptedRequest` with only its `interceptionId`);
|
|
@@ -827,11 +850,16 @@ Only browsers the user named are listed: the one seven runs in, `--cdp` and `--c
|
|
|
827
850
|
- the hold stays in place whatever any other session does, its interception, bypass and observation included, sessionless `Fetch` and `Network` commands too;
|
|
828
851
|
- `Input` stays in the main document and never reaches a child frame;
|
|
829
852
|
- `Page.getFrameTree` and `DOM.getDocument` list child frames by address, and never return a child frame's content;
|
|
830
|
-
-
|
|
853
|
+
- every frame the browser lists, nested ones included, has its `url` and `securityOrigin`, and the node checks an `unreachableUrl` only when one is sent;
|
|
831
854
|
- `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
855
|
- `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
|
|
856
|
+
- cookie answers carry a truthful `domain`, cookie writes go to their explicit destination and not the active tab, and `Network.getCookies` has its standard scope;
|
|
834
857
|
- target and history evidence is truthful, and `Target.createTarget` makes a fresh target with the given URL.
|
|
858
|
+
- **Where those promises stop.** The node can't close these:
|
|
859
|
+
- The address a browser reports isn't always what's loaded. A frame loaded before the browser's port opened isn't listed as protected and doesn't lock the target if it's nested in a cross-origin frame, or if it's a direct child that redirected into a protected origin. A direct blank child sent cross-origin stays listed as `about:blank` with `securityOrigin: "null"`, which passes as clean unless the browser also lists the protected address. Only the allowlist below covers these.
|
|
860
|
+
- `securityOrigin` is no separate check on such a browser, which may derive it from the frame's `url`, or from the page for a blank or `srcdoc` frame the page can reach. A frame that redirected shows the address it asked for.
|
|
861
|
+
- A browser with no partition API shows a third party's cookie partitioned under a protected site as an ordinary cookie.
|
|
862
|
+
- A default `Network.getCookies` can include an unlisted protected frame's cookies only if their `domain` isn't protected, since the `domain` filter removes the rest.
|
|
835
863
|
- 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
864
|
- 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
865
|
- **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.
|
|
@@ -880,9 +908,9 @@ Only browsers the user named are listed: the one seven runs in, `--cdp` and `--c
|
|
|
880
908
|
- **Listing.** `Target.getTargets`, `Target.getTargetInfo`, `Target.targetCreated` and `Target.targetInfoChanged` still show protected targets, so seven knows its tab exists, but their `url` and `title` are only the origin (`https://seven.sliccy.ai`, `chrome://settings`, `chrome-extension://<id>`, or `about:blank`), or only the scheme for a URL without a host (`file:`). A target whose URL slicc can't parse isn't listed at all, since it has no origin to show: `Target.getTargets` leaves it out, and its `targetCreated` and `targetInfoChanged` are dropped. A target of a `targetTypes` type (`browser_ui`) is never shown: `Target.getTargets` leaves it out, its `targetCreated`, `targetInfoChanged`, `targetDestroyed` and `targetCrashed` are dropped, and `Target.getTargetInfo` on its id is refused like any other command that names it. Service worker registrations and versions on a protected origin are left out of `ServiceWorker` events, and `Storage`, `DOMStorage` and `BackgroundService` events that name a protected origin are dropped.
|
|
881
909
|
- **Protected URLs in what the page gets.** In every event and result the page gets, a URL field that holds a protected URL is cut to its origin, at any depth: every key ending in `url`, `urls`, `origin` or `origins` (any case, so `documentURL`, `unreachableUrl` and `securityOrigin` too), `referrer`, `location`, `href` and `src`, and every header value in `headers`, `requestHeaders` and `responseHeaders`. That covers `Page.frameRequestedNavigation`, `Page.frameNavigated`, `Network.requestWillBeSent`, `Page.windowOpen`, `Page.getFrameTree` and the rest. Every other string (header values such as `Link` and `Refresh`, `headersText` and `requestHeadersText`, cookie and storage values, DOM attributes) keeps its text, but each protected URL inside it (a `scheme://` run up to whitespace, a quote, `<` or `>`, a URL that doesn't parse included, a percent-encoded run decoded repeatedly to a fixed point through at most five layers, and an unschemed protected `host[:port]/path` run) is cut to its origin (or host for an unschemed run); if percent-decoding still changes a string after five layers, the whole string is blanked, and next to a protected URL field every field ending in `Fragment` (`urlFragment` of a request or frame) is blanked to `""`, while ordinary URLs keep theirs, so a redirect from an ordinary page to seven's `/auth/callback?code=…` shows the page only seven's origin, wherever it names that URL. Unprotected URLs stay intact. Everything inside a `value`, `preview`, `customPreview`, `arguments` or `returnValue` (evaluation results and their previews) is left alone.
|
|
882
910
|
- **Limits.**
|
|
883
|
-
-
|
|
911
|
+
- On Chromium, the filter relies on 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.
|
|
884
912
|
- 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,
|
|
913
|
+
- **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, where what the allowlist can inspect is the main document, while document holds cover child frames too.
|
|
886
914
|
- 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.
|
|
887
915
|
- 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.
|
|
888
916
|
- The node's own setup connection (see [Local setup](#local-setup-slicc-attach)) is not a `cdp` stream and isn't filtered.
|
|
@@ -2147,7 +2175,7 @@ CI installs a pinned release: `go install github.com/ai-ecoverse/slicc-cli/cmd/s
|
|
|
2147
2175
|
|
|
2148
2176
|
## Development
|
|
2149
2177
|
|
|
2150
|
-
Go 1.26 and Node ≥ 24 (for the lint tools). `npm run build` writes `bin/slicc`. `npm run lint` runs the slicc lint tools, `gofmt`, `go mod tidy -diff`, `go vet` (also with `GOOS=darwin` and `GOOS=windows`, since CI tests on Linux only) and golangci-lint; `npm run lint:sh` runs shellcheck on `install.sh` and the scripts. `npm test` runs the integration tests in `test/integration/`, which build the binary and drive it; run `npm ci` first, since the [Inside seven](#inside-seven) tests need the pinned `@ai-ecoverse/slicc-kernel`. Unit tests stay next to the code and out of git (`npm run test:unit`). `go build` and `npm run build` link no version, so these binaries report `dev`. `npm run dist` cross-builds all six targets into `artifacts/release/` with `SHA256SUMS`, unsigned. `npm run npm:stage` then stages the npm packages into `dist/npm/`, and `npm run npm:check` packs them with `npm publish --dry-run`.
|
|
2178
|
+
Go 1.26 and Node ≥ 24 (for the lint tools). `npm run build` writes `bin/slicc`. `npm run lint` runs the slicc lint tools, `gofmt`, `go mod tidy -diff`, `go vet` (also with `GOOS=darwin` and `GOOS=windows`, since CI tests on Linux only) and golangci-lint; `npm run lint:sh` runs shellcheck on `install.sh` and the scripts. `npm test` runs the integration tests in `test/integration/`, which build the binary and drive it; run `npm ci` first, since the [Inside seven](#inside-seven) tests need the pinned `@ai-ecoverse/slicc-kernel`. Unit tests stay next to the code and out of git (`npm run test:unit`). `test/integration/testdata/native/` holds the fixtures of the contracts a native app relies on, each written by the integration test that checks it: run that test with `SLICC_FIXTURE_WRITE=1` to rewrite a fixture after a deliberate change, and commit the result. `go build` and `npm run build` link no version, so these binaries report `dev`. `npm run dist` cross-builds all six targets into `artifacts/release/` with `SHA256SUMS`, unsigned. `npm run npm:stage` then stages the npm packages into `dist/npm/`, and `npm run npm:check` packs them with `npm publish --dry-run`.
|
|
2151
2179
|
|
|
2152
2180
|
**CI.** `.github/workflows/ci.yml` is one caller of [slicc-shared-web's pipeline](https://github.com/ai-ecoverse/slicc-shared-web#pipeline), pinned at the release of the `@ai-ecoverse/slicc-shared-web` devDependency, with `secrets: inherit`. On pull requests and in the merge queue it runs `lint` (`npm run lint` with golangci-lint, pinned in `ci.yml` and installed into `$RUNNER_TEMP`, then `npm run lint:sh`), then `npm test` on four Linux shards of the pool, then on a pull request the Claude and Codex reviews with this repo's `review-prompt`. The checks to require are `ci / integration` and `ci / review`. A push to `main` runs lint and the release (see [Releases](#releases)); it runs no tests, since what reaches `main` passed the merge queue. macOS and Windows aren't tested on pull requests or in the merge queue: lint vets both, and platform code needs a local run there. `.github/workflows/windows.yml` runs `TestWindowsArgs` on `windows-latest` on each push to `main`; it isn't a required check, and a red run there needs a follow-up pull request. **Test shards.** `npm test` runs `scripts/test-shard.mjs ci/4 -race -count=1 -timeout 15m -v ./test/integration/...`. On the pipeline's shard `SLICC_TEST_SHARD` (0 to 3) it runs that shard's share of the top-level tests; without it (a local run) it runs them all. The split is greedy by measured time: `test/integration/shard-times.json` holds each top-level test's seconds on `linux`, each test goes to the shard with the least time so far, a test without a time counts as the median, and the last shard runs everything the others don't, so a new test still runs. `go test` gets the pipeline's own `NODE_OPTIONS` back (without its shard preload and JUnit reporter) and none of its `SLICC_TEST_*` variables. The script writes each top-level test's result to the shard's JUnit report (`SLICC_TEST_JUNIT`), which the pipeline's `integration` check counts: it fails when no test ran or one failed. It also fails a shard that selects no tests or whose `go test -v` runs none, and, when a shard hits its `-timeout`, names the test that was running and how long the finished ones took. `node scripts/shard-times.mjs --run <CI run id>` refreshes the times from a finished run's `test (<n>)` logs (`linux=<log file>` reads local `go test -v` output instead); commit the result when tests get much slower or faster. `TestEachCIShardFitsItsTimeout` fails when a shard adds up to more than three quarters of its `-timeout`, or when `timeout-minutes` leaves less than 5 minutes past it: then raise `shards` in `ci.yml` and the count in `npm test` together. The [guard vectors](https://github.com/ai-ecoverse/slicc-browsers#guard-vectors) run on every shard; `SLICC_GUARD_VECTORS=0` skips them locally. On macOS they leave out the C9 vectors (extension worlds; the `C9.` prefix that `guardSkippedOn` in `guardrunner_test.go` returns for `darwin`): there their unguarded control hung in Chrome itself ([#344](https://github.com/ai-ecoverse/slicc-cli/issues/344)). `TestCDPGuardVectorsSkipC9OnlyOnMacOS` keeps the skip to macOS, and `TestCDPHidesExtensionWorlds` covers the extension-world guard everywhere. **Node:** CI runs Node 26: on Node 24.21.0, V8 crashed the WASI kernel harness (`TestWasi*`) about once in a hundred runs on Windows and occasionally on Linux.
|
|
2153
2181
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-ecoverse/slicc",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.51.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.51.0",
|
|
22
|
+
"@ai-ecoverse/slicc-darwin-amd64": "1.51.0",
|
|
23
|
+
"@ai-ecoverse/slicc-linux-arm64": "1.51.0",
|
|
24
|
+
"@ai-ecoverse/slicc-linux-amd64": "1.51.0",
|
|
25
|
+
"@ai-ecoverse/slicc-windows-arm64": "1.51.0",
|
|
26
|
+
"@ai-ecoverse/slicc-windows-amd64": "1.51.0",
|
|
27
27
|
"@ai-ecoverse/slicc-jerk": "^1.3.9"
|
|
28
28
|
}
|
|
29
29
|
}
|