@ai-ecoverse/slicc 1.49.27 → 1.49.29

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 +4 -3
  2. package/package.json +7 -7
package/README.md CHANGED
@@ -847,7 +847,7 @@ Only browsers the user named are listed: the one seven runs in, `--cdp` and `--c
847
847
  - **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.
848
848
 
849
849
  - **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.
850
- - **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, and a run whose `://` is percent-encoded in whole or in part, such as `scheme%3A%2F%2F` or `scheme%3A//`, up to those or a raw `&`, decoded once; a doubly encoded one isn't decoded) is cut to its origin, 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.
850
+ - **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.
851
851
  - **Limits.**
852
852
  - 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.
853
853
  - 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.
@@ -1702,16 +1702,17 @@ On a [§1.3](#13-local-setup-without-cdp-loopback-signalling) loopback link, `un
1702
1702
  - **Privileged browser pages** (≥ 1.8.0) count as protected origins: every URL in `protectedSchemes` (`chrome:`, `chrome-untrusted:`, `chrome-extension:`, `devtools:`, `file:`, from 1.8.5 `chrome-search:`, `chrome-native:`, `chrome-distiller:`, `isolated-app:`, `chrome-experimental-site-token-provider:`, `externalfile:` and `content:`, `edge:`, `brave:`, `opera:`, `vivaldi:`, `arc:`) except the new tab pages in `schemeExceptions`, and never `chrome-error:`; `view-source:`, `blob:` and `filesystem:` by what they wrap; `about:` aliases as the `chrome://` URL they become (`aboutScheme`). Targets of a `targetTypes` type (`browser_ui`) are protected whatever their URL, and never listed or announced to the page. The refusal text is the same.
1703
1703
  - **URLs that don't parse** (WHATWG) count as protected wherever the node judges a URL the browser will load or has loaded: a command's destination (`Target.createTarget`, `Page.navigate`, `Fetch.continueRequest`, `Network.continueInterceptedRequest`, `Network.loadNetworkResource`, `PWA.launch`, `PWA.install`, cookie commands' `url` or `urls`, history entries) is refused with `slicc: refused: slicc can't parse this URL, so it could be a protected page`, and a target, main frame, execution context, request, WebSocket or service worker the browser reports on such a URL is redacted, refused, detached or hidden like seven's. An empty URL and the opaque origins `null` and `://` are not affected (a `blob:null/…` URL is: its inner `null/…` doesn't parse), and a target on such a URL isn't listed at all, and URLs the node only reads (storage keys, script URLs) keep "unparseable isn't protected", and in what the page gets such a URL is cut whole. Chrome canonicalises some URLs WHATWG rejects (`http://exa mple.sliccy.ai/` → `http://exa%20mple.sliccy.ai/`, U+200D → `xn--1ug`, invalid `xn--` labels), so this is what keeps those `sliccy.ai` hosts protected. The cost: pages on such exotic hosts, and Chrome's error pages for them, are cut even when they aren't protected. The rule and its refusal come from slicc-browsers' catalog (`protectedOrigins.unparseable` and `unparseableRefusal`, ≥ 1.10.0). [`cdp` (browser control)](#cdp-browser-control) has the details.
1704
1704
  - **In targets the stream touched** (attached to or created): the node fails every protected document load with `net::ERR_BLOCKED_BY_CLIENT`, so instrumentation installed before a navigation can never run in a protected document. That covers redirects, service-worker-served navigations and the page's own Fetch interception.
1705
- - **Redirects into protected URLs:** a protected URL that reaches the page inside any string it gets, such as a redirect's `Location`, `Link` or `Refresh` header or a `headersText` line, plain or percent-encoded once (doubly encoded nesting isn't decoded), is cut to its origin, and its `urlFragment` is blanked; unprotected URLs stay intact. A stylesheet or script whose URL, or any hop of whose redirect chain (as the node's own guard session saw it on that target, compared in WHATWG form without the fragment), is protected can't be read: `Page.getResourceContent` and `Page.searchInResource` for such a URL (or one that doesn't parse), and any command naming such a `styleSheetId` or `scriptId` (`CSS.getStyleSheetText`, `Debugger.getScriptSource`, `searchInContent` and the rest), are refused with `slicc: refused: the response came from seven's origin`, and the CSS rules and styles from such a stylesheet reach the page with only their `styleSheetId` and `origin`. `Network.loadNetworkResource` (Chrome follows its redirects with the user's cookies) and `Page.captureSnapshot` (it serialises every frame) are refused on every session. [`cdp` (browser control)](#cdp-browser-control) has the details.
1705
+ - **Redirects into protected URLs:** a protected URL that reaches the page inside any string it gets, such as a redirect's `Location`, `Link` or `Refresh` header or a `headersText` line, plain, unschemed (`host[:port]/path`) or percent-encoded (decoded repeatedly to a fixed point through at most five layers), is cut to its origin or unschemed host; a string that still changes after five decoding layers is blanked in full, and its `urlFragment` is blanked; unprotected URLs stay intact. A stylesheet or script whose URL, or any hop of whose redirect chain (as the node's own guard session saw it on that target, compared in WHATWG form without the fragment), is protected can't be read: `Page.getResourceContent` and `Page.searchInResource` for such a URL (or one that doesn't parse), and any command naming such a `styleSheetId` or `scriptId` (`CSS.getStyleSheetText`, `Debugger.getScriptSource`, `searchInContent` and the rest), are refused with `slicc: refused: the response came from seven's origin`, and the CSS rules and styles from such a stylesheet reach the page with only their `styleSheetId` and `origin`. `Network.loadNetworkResource` (Chrome follows its redirects with the user's cookies) and `Page.captureSnapshot` (it serialises every frame) are refused on every session. [`cdp` (browser control)](#cdp-browser-control) has the details.
1706
1706
  - **Workers:** a touched dedicated, shared or service worker gets a guard session too (Network only, to see its imports' redirect chains), and its commands wait for it the same way, except `Runtime.runIfWaitingForDebugger` on a shared or service worker, which goes ahead so the worker can't stall on its own guard; its imports from before the guard was ready then count as unseen and can't be read. A worker script other than the worker's own whose chain that guard didn't see, or which touched a protected URL, can't be read. In pages, scripts and stylesheets loaded before the node attached are a known residual.
1707
1707
  - **CDP command ids:** ids at or above `0x70000000` (1879048192) belong to the CLI and are refused from clients. `0x40000000` (2^30) through `0x6FFFFFFF` is reserved for seven's (bios) guard; other clients use ids below 2^30.
1708
1708
  - **Waiting for that guard:** page commands on a touched target's session wait while the node sets its guard up there. The wait fails closed after 30 s without progress (an answer or event on that target's own guard session, or the answer to the node's attach to it; answers and events elsewhere on the stream don't count) or 5 min in all, whichever comes first, and the refusal names the bound. At most 4096 commands or 64 MiB wait on a stream; more is `RESET ENOBUFS`.
1709
1709
  - **Sessions the node doesn't know:** a page command whose `sessionId` the node hasn't seen on this stream (in a `Target.attachedToTarget`, in the answer to the page's `Target.attachToTarget` or `Target.attachToBrowserTarget`, or its own) is held, not forwarded, until the session appears, and is then decided as usual. Only messages on that session id count as progress. The same bounds and caps apply, and the refusal is `slicc: refused: slicc doesn't know which target this session belongs to: …`, naming the bound. A session that detached is refused at once, without the suffix. Commands without a `sessionId` are unaffected.
1710
1710
  - **Auto-attached targets with no URL yet** (OOPIFs, popups) are held until the URL is known, then detached if protected. After 10 s with no URL they are treated as protected. The node's own setup connection ([§1.1](#11-local-setup-over-cdp)) isn't a `cdp` stream and is the one exception. [`cdp` (browser control)](#cdp-browser-control) has the details.
1711
- - **Protection follows the target's own effective origin. Execution contexts on a protected origin are hidden, not cut,** unless the context is the target's own main-frame default context; that one still cuts the target as above. The typical case is an extension's content-script isolated world (`chrome-extension://<id>`) on an ordinary page. The page stays usable, and the hidden world is invisible and out of reach.
1711
+ - **Protection follows the target's own effective origin. Execution contexts on a protected origin are hidden, not cut,** unless the context is the target's own main-frame default context; that one still cuts the target as above. The typical case is an extension's content-script isolated world (`chrome-extension://<id>`) on an ordinary page. The page stays usable, and the hidden world is invisible and out of reach. A page that also holds a protected frame (below) loses the frame-scoped and rendering commands listed there.
1712
1712
  - **Hidden:** the node learns every context of a touched target on its own guard session, whatever the page enabled. It drops these events from the stream: the world's `Runtime.executionContextCreated` and `executionContextDestroyed`, its `consoleAPICalled`, `exceptionThrown` and `bindingCalled`, and `Debugger.scriptParsed`/`scriptFailedToParse` for scripts in it. It also drops `Debugger.breakpointResolved` in those scripts. A `Debugger.paused` whose top frame is in the world is dropped, and the node resumes the target. The world's frames lower in the stack are removed from the call frames.
1713
1713
  - **Refused** with `slicc: refused: that execution context belongs to a browser extension`: any command that names the world through a `contextId` or `executionContextId`, `uniqueContextId`, an `executionContextName` the world has, a remote `objectId` or `*ObjectId` (call arguments included) or `callFrameId` whose injected-script part is the world, or the `scriptId` of a script in it. So `Runtime.evaluate`, `callFunctionOn`, `compileScript`, `runScript`, `globalLexicalScopeNames`, `queryObjects`, `getProperties`, `addBinding`, `Debugger.evaluateOnCallFrame`, `setVariableValue`, `setScriptSource` and `DOM.resolveNode` there are all refused. The default world, and isolated worlds the page creates itself, are unaffected. A `uniqueContextId`, or a numeric `contextId` or `executionContextId`, on a target's session that names no live context the node has seen announced on that target, on its guard session or the page's (say one from a closed tab or another live tab, or a guess), is refused with `slicc: refused: that execution context is not exposed`, rather than passed to Chrome. `Runtime.addBinding` is refused on every relay session as a document-persistent command, regardless of its context selector.
1714
1714
  - **Lifetime:** a hidden world is forgotten only when Chrome reports it gone (`executionContextDestroyed`, or `executionContextsCleared` on a session that reported it), never to make room. A target with more than 4096 live hidden worlds is refused every command there that names an execution context, object, call frame, script or context name, until its contexts are cleared. Seen contexts follow the same lifetime and bound; once a target passes 4096, contexts announced after that are refused as not exposed until its contexts are cleared, even if some are destroyed in between.
1715
+ - **Protected frames in the page's own process:** a default execution context on a protected origin whose frame isn't the target's main frame, such as an `about:blank` or `srcdoc` child that inherits seven's origin, marks the whole target as holding a protected frame. So does a target past the 4096-hidden-world bound, or a hidden default context reported without a `frameId`. While that holds, the node refuses with `slicc: refused: target is on seven's origin` every command that names that frame's `frameId`; every `DOM`, `DOMSnapshot`, `Accessibility` and `Input` command except `enable` and `disable`; `Page.getFrameTree`, `getResourceTree`, `getResourceContent`, `captureSnapshot`, `printToPDF`, `captureScreenshot` and `startScreencast`; the `LayerTree` snapshot commands (`makeSnapshot`, `loadSnapshot`, `replaySnapshot`, `profileSnapshot`, `snapshotCommandLog`); `HeadlessExperimental.beginFrame`; and `Cast.startTabMirroring`. A screencast already running when that state begins is stopped (`Page.stopScreencast` on the page's session), and its `Page.screencastFrame` events are dropped until the page starts a new cast, which works again only once the state has ended. A screenshot, layer replay, profile, command log or begin-frame answer that arrives after the state began is replaced with the same refusal. The state ends when Chrome reports the frame's context gone or the contexts cleared. Meanwhile a document that inherits its origin from one of the target's in-process child frames is refused; [`cdp` (browser control)](#cdp-browser-control) has the rules for inherited documents and their openers. A protected iframe target in another process also puts its page ancestor in this state, including an ordinary-origin iframe target whose renderer holds a protected local frame. The node resolves its `parentFrameId` from main-frame target ids, observed frame ids and execution-context frame ids; for preloaded frames it also reads frame trees through private sessions. Those internal answers and session attach/detach events are not forwarded to the client. An unresolved or missing parent locks every page target in the same browser context until ownership is resolved. The parent lock belongs to the root document the iframe is in: a new root document releases the old one's frames, which may stay frozen in the back/forward cache, and restoring that document locks the page again at once. When the node didn't see which document a protected iframe directly under the page belongs to, it asks Chrome privately which element owns the frame. Only Chrome's explicit answer that the frame isn't there releases the lock, until the root document changes or the frame attaches again; any other answer, or none, keeps it. The lock also ends when the iframe target goes away or ceases to be protected, including when its protected local-frame state ends. The rest of the page stays drivable, with the event filtering above: navigation, `Runtime` in the default world, `Network`, `Fetch` and the other domains.
1715
1716
  - **Heap profiling:** a page's heap snapshot covers its whole renderer, other worlds included. So on page, iframe, background page and webview sessions every `HeapProfiler` command except `enable`, `disable`, `collectGarbage` and `getHeapObjectId` is refused with `slicc: refused: HeapProfiler reads the page's whole renderer, browser extensions' worlds included`, whether or not an extension is there.
1716
1717
  - **Breakpoint conditions** run in whatever world the script belongs to, and a breakpoint by URL outlives reloads. So on those sessions a `Debugger.setBreakpointByUrl` with a `condition` needs a non-empty `url`, which can't name a protected script (see above). One by `urlRegex` or `scriptHash` or with an empty `url` is refused with `slicc: refused: a breakpoint condition that could run in a browser extension's world needs a url naming the page's own script`. Breakpoints without a condition are allowed; a pause they cause in a hidden world is resumed out of sight.
1717
1718
  - **Profiles, coverage, stacks and initiators** can name any script in the isolate. So the node scrubs every message it sends the page, events and command results alike, outside opaque values (`value`, `preview`, `customPreview`, `arguments`, `returnValue`). Any `callFrames` list loses the frames on a protected URL or in a hidden world's script. That covers console, exception, pause, async, node-creation and initiator stacks, whatever the method. A coverage or type-profile list (entries with `scriptId` and `functions` or `entries`) also loses its entries for scripts without a URL. A profile node's `callFrame` in such a script becomes `(program)` and loses its `positionTicks`. An `initiator` on a protected `url` loses that `url` and its position.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-ecoverse/slicc",
3
- "version": "1.49.27",
3
+ "version": "1.49.29",
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.27",
22
- "@ai-ecoverse/slicc-darwin-amd64": "1.49.27",
23
- "@ai-ecoverse/slicc-linux-arm64": "1.49.27",
24
- "@ai-ecoverse/slicc-linux-amd64": "1.49.27",
25
- "@ai-ecoverse/slicc-windows-arm64": "1.49.27",
26
- "@ai-ecoverse/slicc-windows-amd64": "1.49.27",
21
+ "@ai-ecoverse/slicc-darwin-arm64": "1.49.29",
22
+ "@ai-ecoverse/slicc-darwin-amd64": "1.49.29",
23
+ "@ai-ecoverse/slicc-linux-arm64": "1.49.29",
24
+ "@ai-ecoverse/slicc-linux-amd64": "1.49.29",
25
+ "@ai-ecoverse/slicc-windows-arm64": "1.49.29",
26
+ "@ai-ecoverse/slicc-windows-amd64": "1.49.29",
27
27
  "@ai-ecoverse/slicc-jerk": "^1.3.0"
28
28
  }
29
29
  }