@ai-ecoverse/slicc 1.67.3 → 1.67.5

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 +5 -5
  2. package/package.json +7 -7
package/README.md CHANGED
@@ -918,7 +918,7 @@ Only browsers the user named are listed: the one seven runs in, `--cdp` and `--c
918
918
  - **Debugger (Stage 1).** One session per target on each relay stream owns the debugger. Only `Debugger.enable`, `setInstrumentationBreakpoint`, `disable`, `removeBreakpoint` for that owner's breakpoints, and `resume` at a published pause are admitted, on an ordinary target whose navigation guard is ready and whose reachable frames and worlds are placed and ordinary. Every other `Debugger.*`, `DOMDebugger.*` and `EventBreakpoints.*` command is refused with `slicc: refused: debugger methods other than enable, disable, setInstrumentationBreakpoint, removeBreakpoint and resume could read or run code in seven's pages or an extension's world, so the guard doesn't allow them`, including `setBreakpointByUrl`, stepping, `DOMDebugger.getEventListeners`, `getScriptSource` and `evaluateOnCallFrame`. Debugger events are not forwarded as they arrive: `scriptParsed` and `scriptFailedToParse` are held, and only the verified pause's script records, including every validated async and parent-stack script it references, are published before it; `breakpointResolved` and unrelated Debugger events are suppressed. Each `Debugger.paused` is held while the guard checks the current frame tree and the pause's context and document generation. An instrumentation pause is converted privately to a normal pause; instrumentation from an evaluation or a context already published in that document resumes privately. Only a verified ordinary pause and its scripts reach the owner. Bookkeeping for an admitted `enable` or `setInstrumentationBreakpoint` reply survives a document-only generation change, but a safety revocation still invalidates it. A verified batch that fits the stream window can wait for available credit without holding the output or guard lock. After waiting, a fresh frame-tree read orders the proof after queued browser events, then ownership, generation, root loader, contexts and admission are rechecked before a single atomic write within the original pause deadline. Failed proof, revocation or expired credit waits resume privately without publication. Anything protected, stale, unplaced or unverified resumes privately and publishes nothing. A frame-tree read has a 2 s bound; every owned pause has a 5 s deadline, after which the guard resumes it. [§5.8](#58-cdp-cap-cdp-page--node) has the ownership and publication rules.
919
919
  - **Debugger memory.** All sessions on one relay share a 64 MiB retained-byte limit for script records, script identifiers and held pause data. A session that would exceed it drops its records, resumes its pause privately and refuses further Debugger work until a document change or a safety revocation clears the latch. A same-document admission failure (such as a hidden world or protected frame), or loss of the published pause’s context proof, also clears it; admission still has to become safe before work is admitted again. Commit and drop release its bytes.
920
920
  - **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.
921
- - **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`, `autoAttachRelated`, `Browser.getWindowForTarget` and any other command whose `targetId` or `frameId` is a protected target (except `Target.closeTarget` on a protected `page` or `tab` that this stream created, touched, or opened after the touch — a popup or tab whose `Target.targetCreated` saw an opener or openerFrame this stream had already touched (`navTargets`) or already marked stream-opened; that decision is made once at creation and never walks the opener chain at close time, so a vault or seven tab the user opened from a page before this stream attached to that page stays refused even after the attach; for example attaching and navigating or restoring onto a protected origin, including a sticky error page: that close is forwarded so seven can dismiss a leftover it itself produced; closing a protected tab this stream never touched or opened, the vault tab and seven's other tabs included, the link's own seven page when slicc itself set up the link over CDP in that browser (the tab `slicc attach` / default mode signalled through — `attach --signal stdio`, loopback, and tray/`follow --cdp` have no host page the guard tracks, even when `--cdp` points at a browser that hosts seven), the browser target, workers and every other non-page/tab type stay refused); 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*).
921
+ - **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`, `autoAttachRelated`, `Browser.getWindowForTarget` and any other command whose `targetId` or `frameId` is a protected target (except `Target.closeTarget` on a protected `page` or `tab` that this stream created, touched, or opened after the touch — a popup or tab whose `Target.targetCreated` saw an opener or openerFrame this stream had already touched (`navTargets`) or already marked stream-opened; that decision is made once at creation and never walks the opener chain at close time, so a vault or seven tab the user opened from a page before this stream attached to that page stays refused even after the attach; for example attaching and navigating or restoring onto a protected origin, including a sticky error page: that close is forwarded so seven can dismiss a leftover it itself produced, except a live seven-UI page (a catalog seven origin or a guard extra origin under `/os/`, other than `/os/callback.html`) or a vault page (`vault.sliccy.ai` and `vault-*` previews, every path), in any spelling the protect package already judges (view-source wrapping, a `blob:` minted by such an origin, userinfo, and an inheriting URL such as `about:blank` whose security origin or kept latch is such a page), and except while a navigation's in-flight destination is unknown or such a URL, or while the committed document is still such a URL (unknown in-flight destination refuses close even when the committed document is ordinary; before that refusal the close path fetches a fresh frame tree, and a snapshot that shows Chrome's error page for a protected URL with no later navigation request is treated as a recorded error page and stays closable); closing a protected tab this stream never touched or opened, a live vault or seven-UI tab even when this stream touched it, the link's own seven page when slicc itself set up the link over CDP in that browser (the tab `slicc attach` / default mode signalled through — `attach --signal stdio`, loopback, and tray/`follow --cdp` have no host page the guard tracks, even when `--cdp` points at a browser that hosts seven), the browser target, workers and every other non-page/tab type stay refused); 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*).
922
922
  - **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.
923
923
  - **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`.
924
924
  - **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:
@@ -980,7 +980,7 @@ Only browsers the user named are listed: the one seven runs in, `--cdp` and `--c
980
980
  - In touched targets, service workers are bypassed for every request, not only for protected ones.
981
981
  - The guard covers every frame that shares the touched target's process. A cross-site iframe's navigation pauses in its parent's target, before the iframe becomes a target of its own, with the frame's id as `frameId` (the id the iframe target gets later). A popup's request pauses in the popup's target, with its `targetId` as `frameId`. A redirect into a protected origin pauses again at the request stage, with `redirectedRequestId`, even when the first URL didn't match.
982
982
  - The page's own `Fetch.enable` on a page session still works. Chrome chains the interceptors of a target's sessions, the most recently enabled first, so the page's interceptor could see a protected document's request before the node's does, or after the node failed it, at the response stage. The node fails such a request itself, and the page never sees it (see *Paused requests to seven* above).
983
- - When a target commits a protected origin all the same (see the limits below), the node sees it arrive (`Target.targetInfoChanged`) only after the browser committed it. The node then detaches every page session on the target, drops their events and results, and refuses further commands on them; the page gets `Target.detachedFromTarget`. A browser-level `Target.closeTarget` naming that protected `page` or `tab` is still forwarded when this stream created, touched, or opened it after the touch (see *Refused*); closing the page this link is attached to, or any protected tab this stream never touched or opened, stays refused.
983
+ - When a target commits a protected origin all the same (see the limits below), the node sees it arrive (`Target.targetInfoChanged`) only after the browser committed it. The node then detaches every page session on the target, drops their events and results, and refuses further commands on them; the page gets `Target.detachedFromTarget`. A browser-level `Target.closeTarget` naming that protected `page` or `tab` is still forwarded when this stream created, touched, or opened it after the touch (see *Refused*), unless its current or in-flight URL is a live seven-UI or vault page; closing the page this link is attached to, any protected tab this stream never touched or opened, or a touched live seven-UI or vault tab, stays refused.
984
984
  - **Error pages.** A request the node failed (or any failed load) leaves the target on Chrome's error page, which the browser still reports under the protected URL it failed to load. The error page holds no content from that URL, so it doesn't lock the target. But it does name the URL (its reload button and `loadTimeData` carry the full failed URL, which after a server redirect can hold a secret the page never saw). So from the commit (`Page.frameNavigated` with a protected `unreachableUrl`) until the next commit, a page session on the target may only:
985
985
  - navigate (not to a `javascript:` URL, which `Page.navigate` refuses everywhere with `slicc: refused: Page.navigate to a javascript: URL runs script in the page; use Runtime.evaluate`), reload (but not with a `scriptToEvaluateOnLoad`, which would run in the reloaded error page), stop, close and bring it to front (`Page.navigate`, `reload`, `stopLoading`, `close`, `bringToFront`, `navigateToHistoryEntry`);
986
986
  - read and reset its history and frame tree (`Page.getNavigationHistory`, `resetNavigationHistory`, `getFrameTree`) and set lifecycle events;
@@ -1000,7 +1000,7 @@ Only browsers the user named are listed: the one seven runs in, `--cdp` and `--c
1000
1000
  - **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]/` other than the four display admits above 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.
1001
1001
  - **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.
1002
1002
 
1003
- - **Listing.** The origin-only rule covers page and tab targets only. `Target.getTargets`, `Target.getTargetInfo`, `Target.targetCreated` and `Target.targetInfoChanged` still show protected page and tab 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 worker (`worker`, `shared_worker` or `service_worker`) is protected when its own URL is protected or a protected frame or target created it, including a `blob:` or `data:` URL and a worker auto-attached on an out-of-process iframe's session. Every `data:` worker created by a sub-frame stays hidden: only a `data:` worker whose creator is an ordinary target the guard already knows is ordinary. Once a worker is classified protected, that decision sticks for the worker's life even if its creator later navigates away or drops out of the frame map. That protected worker is not auto-attached and not listed at all: `Target.getTargets` leaves it out, its `targetCreated`, `targetInfoChanged` and `targetDestroyed` are dropped, and `Target.getTargetInfo` answers `No target with given id found`, the same answer an unknown target gets. An auto-attached worker whose URL and creator frame are not known yet is held the same way a page without a URL is: the page does not get `attachedToTarget`, the worker stays paused when `waitForDebuggerOnStart` was requested (so it does not run ahead of the decision), and it is left out of listings until its URL or that frame is known. Without `waitForDebuggerOnStart`, a held ordinary worker can run and emit early events (console, network) that the page never sees, because those events arrive while the session is still held; slicc-cdp accepts that for ordinary workers. Learning the creator frame decides the worker then, even when the worker was recorded first. If the creator is still unknown when the hold times out, the worker is resumed and detached without being shown. Detaching that page session, or turning auto-attach off on it (`autoAttach` false, `waitForDebuggerOnStart` false, `flatten` true, and no filter), does the same at once. `Target.attachToTarget` for a worker that is protected or still unresolved is refused. An ordinary worker the page learned outside listings (for example a `targetId` from `ServiceWorker.workerVersionUpdated`) may be attached by id even if it was never listed; `targetDestroyed` for a worker the page was never shown is still dropped until that attach or a listing shows it. 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.
1003
+ - **Listing.** The origin-only rule covers page and tab targets only. `Target.getTargets`, `Target.getTargetInfo`, `Target.targetCreated` and `Target.targetInfoChanged` still show protected page and tab 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:`). An iframe target is protected when its own URL is protected or when its `parentFrame`, or any ancestor frame or target, is a protected target or a protected recorded frame (from `Target.*` `parentFrameId`/`parentId` and `Page.frameAttached`/`frameNavigated`); once protected, that decision sticks for the iframe's life. A protected iframe is never listed, never answered by `Target.getTargetInfo`, never attachable, and commands that name it are refused. An auto-attached iframe whose parent target is not known yet, or whose parent target's navigation is still unresolved, is held the same way an unresolved worker is: left out of listings, not attached, and if the hold times out while that parent target is still unknown it is resumed and detached without being shown. Separately, an auto-attached iframe that still has no URL of its own stays held until that URL (or a protected decision from ancestry) is known; ancestry settling alone must not deliver a URL-less iframe. A missing `parentFrameId`/`parentId` is not treated as ordinary: the guard still walks recorded frame ancestry (`Page.frameAttached` / `frameNavigated` / the frame tree), and while that ancestry is unknown the iframe stays held or hidden from `Target.getTargets`, `Target.getTargetInfo`, target events and attach-by-id. Extension-frame targets (`chrome-extension://` iframes) keep the existing extension-frame rule from main: not auto-attached, answered by `Target.getTargetInfo` in redacted `about:blank` form, and gated for screenshot/Input; parent-protection only adds further hide (listings/`getTargetInfo` missing) when a parent or ancestor is protected, and never delivers or un-hides what that rule already keeps out of auto-attach. After an iframe was shown, protection still follows it: an explicit attach from the browser session is cut or refused as soon as its owner page or any ancestor turns protected or held, and on every command the guard checks both the target parent chain and the attaching session (if they disagree, the iframe is treated as protected). `parentFrameId` names a frame inside that parent, not a target; the guard resolves ancestry from the attach parent target and from recorded frames, and does not hold merely because `parentFrameId` is not a target id. A worker (`worker`, `shared_worker` or `service_worker`) is protected when its own URL is protected or a protected frame or target created it, including a `blob:` or `data:` URL and a worker auto-attached on an out-of-process iframe's session. Every `data:` worker created by a sub-frame stays hidden: for a `data:` worker every creator field must be a known ordinary target, and any sub-frame creator field (`openerFrame` or `parentFrame`) keeps it hidden, so only a `data:` worker whose sole creator is an ordinary target the guard already knows is ordinary is listed. Once a worker is classified protected, that decision sticks for the worker's life even if its creator later navigates away or drops out of the frame map. That protected worker is not auto-attached and not listed at all: `Target.getTargets` leaves it out, its `targetCreated`, `targetInfoChanged` and `targetDestroyed` are dropped, and `Target.getTargetInfo` answers `No target with given id found`, the same answer an unknown target gets. An auto-attached worker whose URL and creator frame are not known yet is held the same way a page without a URL is: the page does not get `attachedToTarget`, the worker stays paused when `waitForDebuggerOnStart` was requested (so it does not run ahead of the decision), and it is left out of listings until its URL or that frame is known. Without `waitForDebuggerOnStart`, a held ordinary worker can run and emit early events (console, network) that the page never sees, because those events arrive while the session is still held; slicc-cdp accepts that for ordinary workers. Learning the creator frame decides the worker then, even when the worker was recorded first. If the creator is still unknown when the hold times out, the worker is resumed and detached without being shown. Detaching that page session, or turning auto-attach off on it (`autoAttach` false, `waitForDebuggerOnStart` false, `flatten` true, and no filter), does the same at once. `Target.attachToTarget` for a worker that is protected or still unresolved is refused. An ordinary worker the page learned outside listings (for example a `targetId` from `ServiceWorker.workerVersionUpdated`) may be attached by id even if it was never listed; `targetDestroyed` for a worker the page was never shown is still dropped until that attach or a listing shows it. 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.
1004
1004
  - **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.
1005
1005
  - **Limits.**
1006
1006
  - 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.
@@ -1014,7 +1014,7 @@ Only browsers the user named are listed: the one seven runs in, `--cdp` and `--c
1014
1014
 
1015
1015
  **`browsers` updates** (page cap `browsers`), node → page. When the list changes while a link is up and the page's HELLO has `browsers` in `caps`, the node opens `OPEN { "kind": "browsers", "browsers": [ … ] }` on the control channel with the full current list in HELLO's shape. It replaces the previous list; there are no deltas. The page answers OPENED `{}` and END, and the node sends END. Updates are sent one at a time per link, a change that comes while one is in flight is sent after it, with the list as it is then, and an update the page doesn't finish within 10 s is reset with `ETIMEDOUT`. A change between the HELLO and the link coming up is sent as an update right away.
1016
1016
 
1017
- `test/integration/testdata/link/link.js` is a page-side implementation of the link (framing, credit, both channel layouts, the violation rules, and `resolve` and raw-fetch helpers) that the integration tests run in Chrome against `slicc attach`. `cdp.js` next to it is a CDP client over `cdp` streams, `protect.js` probes the filter that keeps seven's origin and the browser's privileged pages out of reach, `guard.js` runs [slicc-browsers' guard vectors](https://github.com/ai-ecoverse/slicc-browsers#guard-vectors) through its `guard-runner.mjs`, with a second client straight to the test Chrome as the unguarded observer, every capability (`autoAttach`, `browserSession`, `browserContexts`, `chromeUrlsAttach`, since CDP over a DevTools port reaches `chrome://` pages, and `closeProtected`), and the runner's `settleScale` at 3 on Windows, 2 on macOS and 1 on Linux, and its `refusalScale` at the default 1 (a row still running after 3 minutes fails on its own with the CDP calls it was waiting for, and the test fails after 4 minutes without a finished row, naming each row in flight and its pending calls), `fs.js` an op-shaped client for `fs` streams (`call`, `list`, `read`, `write`, `watch`), `loopback.js` is the page side of [loopback signalling](#linking-seven-in-your-everyday-browser), and `page.js` answers `browsers` and `mounts` updates. Through `linkTest.loopback`, `page.js` pairs from the fragment (`confirm`), signals again (`signal`, `reconnect`), unlinks in-band (`unlink`) and posts raw requests (`post`), with an optional `?ports=<first>-<last>` scan range. `page.js` keeps one link per `node` id from the hello. For tray links (no hello `node`) it replaces an older link with the same fingerprint only when HELLO's `node` matches, as seven does. `agent.js` is a fake agent behind the page's `agent` cap: the tests queue scripted runs, emit transcript events, hold and release a run, reset watch streams, and turn the cap off. Loaded with `?kernel`, the test page lists `kernel-in` and answers `kernel` OPENs with `kernel.js`, a small HTTP and WebSocket echo server in the page.
1017
+ `test/integration/testdata/link/link.js` is a page-side implementation of the link (framing, credit, both channel layouts, the violation rules, and `resolve` and raw-fetch helpers) that the integration tests run in Chrome against `slicc attach`. `cdp.js` next to it is a CDP client over `cdp` streams, `protect.js` probes the filter that keeps seven's origin and the browser's privileged pages out of reach, `guard.js` runs [slicc-browsers' guard vectors](https://github.com/ai-ecoverse/slicc-browsers#guard-vectors) through its `guard-runner.mjs`, with a second client straight to the test Chrome as the unguarded observer, every capability (`autoAttach`, `browserSession`, `browserContexts`, `chromeUrlsAttach`, since CDP over a DevTools port reaches `chrome://` pages, and `closeProtected`), and when `errorPageVault` remaps the C8 error-page rows onto the vault, vault documents are never closable, so the vault-remapped restore leg expects `closeRefused`, and the runner's `settleScale` at 3 on Windows, 2 on macOS and 1 on Linux, and its `refusalScale` at the default 1 (a row still running after 3 minutes fails on its own with the CDP calls it was waiting for, and the test fails after 4 minutes without a finished row, naming each row in flight and its pending calls), `fs.js` an op-shaped client for `fs` streams (`call`, `list`, `read`, `write`, `watch`), `loopback.js` is the page side of [loopback signalling](#linking-seven-in-your-everyday-browser), and `page.js` answers `browsers` and `mounts` updates. Through `linkTest.loopback`, `page.js` pairs from the fragment (`confirm`), signals again (`signal`, `reconnect`), unlinks in-band (`unlink`) and posts raw requests (`post`), with an optional `?ports=<first>-<last>` scan range. `page.js` keeps one link per `node` id from the hello. For tray links (no hello `node`) it replaces an older link with the same fingerprint only when HELLO's `node` matches, as seven does. `agent.js` is a fake agent behind the page's `agent` cap: the tests queue scripted runs, emit transcript events, hold and release a run, reset watch streams, and turn the cap off. Loaded with `?kernel`, the test page lists `kernel-in` and answers `kernel` OPENs with `kernel.js`, a small HTTP and WebSocket echo server in the page.
1018
1018
 
1019
1019
  ### Kernel services
1020
1020
 
@@ -2631,7 +2631,7 @@ In the same process, probe ports, dirs and a process list passed in explicitly (
2631
2631
 
2632
2632
  **Port guard.** On CI (`CI` set), or with `SLICC_TEST_PORT_GUARD=1`, `TestMain` holds `127.0.0.1:9222` to `9229` (and `[::1]` where it can) for the whole run, and the run fails if anything connects to them, other than the one test that lends a port to its own fake browser. On CI a port it can't hold fails the run. Off CI it is off by default, so a developer's own Chrome on those ports is never touched; the guarded tests then skip.
2633
2633
 
2634
- **Protected-origin vectors.** `test/integration/testdata/link/protect.js` exports `protectVectors`, the attacks the relay must stop, in a shape other guards reuse: `{ id, setup, trigger, control: { origin: 'ordinary', expected }, expected }`. Each runs three times, through the relay, against the same server under three names: an ordinary origin (`ordinary.test`, the control, which must succeed), seven (an `--origin`) and the vault (`vault.sliccy.ai`). A run passes when its observations match `control.expected` or `expected`, and a vector whose control fails fails as a whole. The only run left out is the vault in the same-site iframe cases, since no unprotected page is same-site with a `sliccy.ai` host. The observations come from the test server's log of requests and of the beacons an injected init script sends, and from what the page's own CDP session saw. **Waivers on this head** (slicc-browsers 1.22.1; each waiver accepts only its documented failing leg): `C3.tab-attach` — guarded settle failure of `window.open` under main's empty-URL hold (runner folds that into `control: fail`, #260), not any other non-pass; stock Playwright/Puppeteer popup through the link guard stays green. Required green: `C3.popup`, `C3.tab-create`, `C3.tab-blank`, `C3.tab-protected`. The cases:
2634
+ **Protected-origin vectors.** `test/integration/testdata/link/protect.js` exports `protectVectors`, the attacks the relay must stop, in a shape other guards reuse: `{ id, setup, trigger, control: { origin: 'ordinary', expected }, expected }`. Each runs three times, through the relay, against the same server under three names: an ordinary origin (`ordinary.test`, the control, which must succeed), seven (an `--origin`) and the vault (`vault.sliccy.ai`). A run passes when its observations match `control.expected` or `expected`, and a vector whose control fails fails as a whole. The only run left out is the vault in the same-site iframe cases, since no unprotected page is same-site with a `sliccy.ai` host. The observations come from the test server's log of requests and of the beacons an injected init script sends, and from what the page's own CDP session saw. **Waivers on this head** (slicc-browsers 1.23.0; each waiver accepts only its documented failing leg): `C3.tab-attach` — guarded settle failure of `window.open` under main's empty-URL hold (runner folds that into `control: fail`, #260), not any other non-pass; stock Playwright/Puppeteer popup through the link guard stays green. Required green: `C3.popup`, `C3.tab-create`, `C3.tab-blank`, `C3.tab-protected`. The cases:
2635
2635
  - C1, an init script, then `location.href`;
2636
2636
  - C2, redirect chains through allowed hops (301, 302, 303, 307, 308, and a POST form through 307 and 308), and a chain that passes through the protected origin and back out;
2637
2637
  - C3, an instrumented popup that navigates itself, a popup opened on a redirect chain, and popups opened on a redirect chain or straight on the origin that never reach the page: not through auto-attach with or without `waitForDebuggerOnStart`, `Target.attachToTarget` or `activateTarget`, and not after they navigate to another path of the origin and the opener turns auto-attach on again; `Target.getTargetInfo` shows them without their path;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-ecoverse/slicc",
3
- "version": "1.67.3",
3
+ "version": "1.67.5",
4
4
  "description": "SLICC's command line for seven: links a machine's network, compute and browsers to seven over WebRTC",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -18,12 +18,12 @@
18
18
  "node": ">=18"
19
19
  },
20
20
  "optionalDependencies": {
21
- "@ai-ecoverse/slicc-darwin-arm64": "1.67.3",
22
- "@ai-ecoverse/slicc-darwin-amd64": "1.67.3",
23
- "@ai-ecoverse/slicc-linux-arm64": "1.67.3",
24
- "@ai-ecoverse/slicc-linux-amd64": "1.67.3",
25
- "@ai-ecoverse/slicc-windows-arm64": "1.67.3",
26
- "@ai-ecoverse/slicc-windows-amd64": "1.67.3",
21
+ "@ai-ecoverse/slicc-darwin-arm64": "1.67.5",
22
+ "@ai-ecoverse/slicc-darwin-amd64": "1.67.5",
23
+ "@ai-ecoverse/slicc-linux-arm64": "1.67.5",
24
+ "@ai-ecoverse/slicc-linux-amd64": "1.67.5",
25
+ "@ai-ecoverse/slicc-windows-arm64": "1.67.5",
26
+ "@ai-ecoverse/slicc-windows-amd64": "1.67.5",
27
27
  "@ai-ecoverse/slicc-jerk": "^1.9.1"
28
28
  }
29
29
  }