@ai-ecoverse/slicc-browsers 1.45.0 → 1.47.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 CHANGED
@@ -146,16 +146,16 @@ slicc-cli's `test/integration/corpus_test.go` is a complete harness.
146
146
 
147
147
  ## Protected origins
148
148
 
149
- Browser control must never navigate to, open, attach to, or read the cookies or storage of:
150
- - **seven and the vault**: every `sliccy.ai` host, on any port and scheme, and `vault.sliccy.ai` by name;
151
- - **the browser's own privileged pages**: `chrome://` and the other Chromium browsers' equivalents, `devtools://`, `chrome-extension://` (where password managers and wallets live), `file://`, and Chrome's own UI targets. The new tab page is the one exception;
149
+ Browser control must never navigate to, open, attach to, or read cookies or storage of:
150
+ - **seven and the vault**: `sliccy.ai` hosts one label deep, bar a few listed ones, over HTTP(S), any port; apex-domain cookies too, but not apex or deeper pages;
151
+ - **the browser's own privileged pages**: `chrome://` and other Chromium browsers' equivalents, `devtools://`, `chrome-extension://` (where password managers and wallets live), `file://`, and Chrome's own UI targets. The new tab page is the one exception;
152
152
  - **a program's extra seven origins**.
153
153
 
154
- URLs are judged the way the browser parses them, so `blob:`, `view-source:` and `about:` aliases, backslashes, encoded dots and full-width letters can't sneak past. A URL the guard can't parse counts as protected wherever the browser might load it. A tab that seven opened keeps seven's origin when it goes to `about:blank`. A refused call fails with `slicc: refused: target is on seven's origin`.
154
+ URLs are judged as the browser parses them, so `blob:`, `view-source:` and `about:` aliases, backslashes, encoded dots and full-width letters can't sneak past. A URL the guard can't parse counts as protected wherever the browser might load it. A tab seven opened keeps seven's origin on `about:blank`. A refused call fails with `slicc: refused: target is on seven's origin`.
155
155
 
156
- A browser extension's frame inside an ordinary page doesn't make the tab protected. The frame itself stays out of reach: it can't be attached or read, and its URL never appears in target discovery, page reads, snapshots, accessibility trees or evaluate results. The tab's own page can still be read and snapshotted. Screenshots and input are allowed only while every extension frame is hidden (no layout box or `visibility: hidden`) and none holds focus through nested documents or shadow roots; a screenshot taken while one became shown is thrown away. Opacity and position don't count as hidden. A race between the visibility or focus check and the CDP reply is accepted. Whole-page captures and starting a screencast are refused while any extension frame is in the tab; an active screencast is stopped or its frames dropped until the frame is gone. These refusals name the extension frame, not seven. A frame from the program's own extension, and any other protected frame, still makes the whole tab protected. `protectedOrigins.extensionFrames` lists the schemes, methods and refusals; `protected.mjs` offers `extensionFrame(url)`.
156
+ An extension's frame in an ordinary page doesn't make the tab protected. The frame stays out of reach: it can't be attached or read, and its URL never appears in target discovery, page reads, snapshots, accessibility trees or evaluate results. The tab's page can still be read and snapshotted. Screenshots and input are allowed only while every extension frame is hidden (no layout box or `visibility: hidden`) and none holds focus through nested documents or shadow roots; a screenshot taken as one became shown is dropped. Opacity and position don't count as hidden. A race between that check and the CDP reply is accepted. Whole-page captures and starting a screencast are refused while any extension frame is in the tab; an active screencast is stopped or its frames dropped until the frame is gone. These refusals name the extension frame, not seven. A frame of the program's own extension, or any other protected frame, still protects the whole tab. `protectedOrigins.extensionFrames` lists the schemes, methods and refusals; `protected.mjs` offers `extensionFrame(url)`.
157
157
 
158
- `catalog.json`'s `protectedOrigins` holds the rules, and `protected.json` the vectors: URLs, targets, cookie domains and storage keys, each with the expected answer. A target may carry `contextOrigin`, its default execution context's origin; the rule binds a live context origin too. Origins with leading whitespace or control characters are not exercised: browsers do not report them. `protected.mjs` is the reference implementation:
158
+ `catalog.json`'s `protectedOrigins` holds the rules, and `protected.json` the vectors: URLs, targets, cookie domains and storage keys, each with the expected answer. A target may carry `contextOrigin`, its default execution context's origin; the rule binds a live context origin too. Origins with leading whitespace or control characters are not exercised: browsers don't report them. `protected.mjs` is the reference implementation:
159
159
 
160
160
  ```js
161
161
  import catalog from '@ai-ecoverse/slicc-browsers' with { type: 'json' };
@@ -185,7 +185,7 @@ For stock Playwright, Puppeteer and raw CDP clients, a guard that declares `stoc
185
185
  - `Page.addScriptToEvaluateOnNewDocument` whose `source` matches `^(?:[ \t\n]|//[^\n\r\u2028\u2029]*)*$` on the whole string without the multiline flag (no code), with any `worldName` or `runImmediately`, and its removal;
186
186
  - exactly `Emulation.setFocusEmulationEnabled`, `setEmulatedMedia`, `setDeviceMetricsOverride` and `setTouchEmulationEnabled`;
187
187
  - `Page.createIsolatedWorld` on a frame the guard already classifies as ordinary: strip `grantUniveralAccess` and `contentSecurityPolicy`, return no `executionContextId` for any other frame; `Runtime.addBinding` scoped to such a world by a non-empty `executionContextName` or its `executionContextId`, with `Runtime.bindingCalled` only from those worlds;
188
- - `Target.setAutoAttach`: either narrow the filter to tab targets or hide per target; no protected-origin page, iframe (including ordinary-URL children of a protected parent) or worker may reach the client; pages under the tab are held like pages (same URL redaction in `targetInfo`); a transport that synthesizes it declares `syntheticAutoAttach`; A top-page `slicc: refused:` protects when ordinary tabs still work.
188
+ - `Target.setAutoAttach`: either narrow the filter to tab targets or hide per target; no protected-origin page, iframe or worker may reach the client; ordinary-origin children of a protected parent do reach it. A reported inherited origin is the frame’s own; pages under the tab are held like pages (same URL redaction in `targetInfo`); a transport that synthesizes it declares `syntheticAutoAttach`.
189
189
 
190
190
  The strip holds whether or not a given Chrome lets that world reach another origin. Code init scripts, main-world bindings and other overrides stay refused or harmless. Admitted display overrides and no-code init scripts must not remain in effect on a protected document — refuse that navigation, or clear them before it runs. Undeclared, they skip, never pass.
191
191
 
@@ -219,6 +219,7 @@ You supply:
219
219
  | capability | means the transport can |
220
220
  | --- | --- |
221
221
  | `autoAttach` | auto-attach to child targets |
222
+ | `protectedFrameDrivable` | keeps an ordinary page drivable while it holds a protected iframe; only that iframe is withheld |
222
223
  | `iframeAutoAttach` | auto-attach non-tab child targets (out-of-process iframes) under a page session |
223
224
  | `errorFrameClass` | tell whether a failed (error) iframe was loading a protected URL, without being given the URL |
224
225
  | `browserSession` | send `Target.*` and `Browser.*` on the browser session |
package/catalog.json CHANGED
@@ -703,9 +703,14 @@
703
703
  ]
704
704
  },
705
705
  "protectedOrigins": {
706
- "domains": ["sliccy.ai"],
706
+ "domains": [],
707
707
  "hosts": ["vault.sliccy.ai"],
708
- "keptOrigins": ["https://lease-pilot.sliccy.ai"],
708
+ "zones": [
709
+ {
710
+ "domain": "sliccy.ai",
711
+ "unprotectedLabels": ["get", "mcpcat", "echo", "lease-pilot"]
712
+ }
713
+ ],
709
714
  "schemes": ["https", "http"],
710
715
  "innerSchemes": ["blob", "filesystem", "view-source"],
711
716
  "anySchemes": ["devtools"],