@ai-ecoverse/slicc-browsers 1.55.0 → 1.56.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
@@ -1,13 +1,13 @@
1
1
  # slicc-browsers
2
2
 
3
- SLICC drives Chromium over the Chrome DevTools Protocol (CDP). Its Go module, Rust crate and npm package share one version: a browser catalog, four vector sets and their schemas for finding, selecting and launching browsers and testing CDP guards.
3
+ SLICC drives Chromium over the Chrome DevTools Protocol (CDP). Go, Rust and npm share one version: a catalog, four vector sets and schemas for discovery, selection, launch and CDP guard tests.
4
4
 
5
5
  | who | uses it for |
6
6
  | --- | --- |
7
7
  | [slicc-cli](https://github.com/ai-ecoverse/slicc-cli) (Go) | `slicc browsers`, `slicc launch`, and its CDP relay's guard |
8
8
  | [slicc-cdp](https://github.com/ai-ecoverse/slicc-cdp) (Rust, also `wasm32-wasip1`) | `playwright-cli list` and `open`, and its guard |
9
9
  | [slicc-agent](https://github.com/ai-ecoverse/slicc-agent) | refusing protected origins in its browser tools |
10
- | [slicc-bios](https://github.com/ai-ecoverse/slicc-bios), [slicc-extension](https://github.com/ai-ecoverse/slicc-extension) | their CDP guards, tested against the guard vectors |
10
+ | [slicc-bios](https://github.com/ai-ecoverse/slicc-bios), [slicc-extension](https://github.com/ai-ecoverse/slicc-extension) | CDP guard conformance |
11
11
 
12
12
  ## What's inside
13
13
 
@@ -37,7 +37,7 @@ chrome, ok := c.Browser("chrome")
37
37
  rank := c.Priority("chrome")
38
38
  ```
39
39
 
40
- The files are embedded, so nothing is read from disk at run time.
40
+ Embedded data needs no runtime disk access.
41
41
  - `Default()` parses the embedded catalog once and panics if it can't, which CI rules out; `Load()` returns the error instead, and `Parse(b)` reads another copy.
42
42
  - `Corpus()`, `Protected()`, `Guard()` and `DebuggerStage1()` return the vectors as typed structs.
43
43
  - `CatalogJSON()`, `CorpusJSON()`, `ProtectedJSON()`, `GuardVectorsJSON()`, `DebuggerStage1JSON()` and the `…SchemaJSON()` functions return the raw files.
@@ -107,7 +107,7 @@ SLICC six launches Chrome in its own profile (`profiles.six` lists the roots per
107
107
 
108
108
  ## The corpus
109
109
 
110
- Each case in `corpus/<case>/` is a fake machine: a home directory, `DevToolsActivePort` files, fake `/json/version` and `/json/list` answers, a fake process list, `--cdp` URLs and installed browsers. `expected.json` holds the ranked list it must produce. `case.json`'s `needs` say what a program must support to run the case, and a program skips cases it can't run.
110
+ `corpus/<case>/` models a machine: home, `DevToolsActivePort` files, `/json/version` and `/json/list` replies, process list, `--cdp` URLs and installed browsers. `expected.json` gives the ranking. Skip a case if the program lacks a capability listed in its `needs` in `case.json`.
111
111
 
112
112
  For each case, a test harness:
113
113
  1. writes the case's files into a temporary home;
@@ -115,7 +115,7 @@ For each case, a test harness:
115
115
  3. feeds it the fake process list, and routes every HTTP request and TCP dial to the fakes;
116
116
  4. compares the result with `expected.json`.
117
117
 
118
- Both libraries come with helpers for this:
118
+ Go and Rust helpers:
119
119
 
120
120
  ```go
121
121
  cases, _ := sliccbrowsers.Corpus()
@@ -153,7 +153,7 @@ Browser control must never navigate to, open, attach to, or read cookies or stor
153
153
  - **the browser's own privileged pages**: `chrome://` and other Chromium browsers' equivalents, `devtools://`, `chrome-extension://` (home to password managers and wallets), `file://` and Chrome's UI targets, bar the new tab page;
154
154
  - **a program's extra seven origins**.
155
155
 
156
- Targets use their own URL and origin (even inherited), not parent, opener or history. Unknown origins alone are ordinary; unparseable URLs are protected. Protected or unparseable failures and failed inherited-origin reads seal reads and captures. Sealed pages stay listed, attachable and navigable; sealed iframes are tree placeholders. Guards drop sealed content events, even on prior subscriptions, and reduce failed URLs to origins in metadata and Page/Network events. Refusal: `slicc: refused: target is on seven's origin`.
156
+ Targets use their own URL and origin (even inherited), not parent, opener or history. Unknown origins alone are ordinary; unparseable URLs are protected. Protected or unparseable failures and failed inherited-origin reads seal reads and captures. Sealed pages stay listed, attachable and navigable; sealed iframes are tree placeholders. Stock subscriptions stay open; guards drop sealed content events, including replay. Failed URLs show only origins in metadata and Page/Network events. After failed origin reads, dialogs stay dismissible but textless; Network keeps bare origins, no headers or payloads. Request and response bodies stay unreadable. Refusal: `slicc: refused: target is on seven's origin`.
157
157
 
158
158
  Guards withhold protected frames, not their ordinary page. Report mixed state from capture to release: screenshots and screencasts show Seven but blank other protected boxes; refuse PDFs needing blanking.
159
159
 
@@ -216,14 +216,15 @@ await fixture.close();
216
216
 
217
217
  You supply:
218
218
  - **a guarded client** per row: your guard's CDP connection, with `send(method, params, sessionId)`, `waitEvent(predicate, ms)` and an `events` array;
219
- - **an unguarded observer**: a direct CDP connection to the same browser, which runs the controls and checks liveness;
219
+ - **unguarded observer**: direct CDP on the same browser for controls and liveness;
220
220
  - **origins**: the fixture server reachable as seven, the vault, an ordinary site, and for some rows a cross-site ordinary `{cross}` (e.g. `cross.test`). Point those hostnames at it with Chrome's `--host-resolver-rules`, so tests never touch the real seven;
221
- - **capabilities**: what your transport can do. A row that needs something you don't declare is skipped as `not-supported:<capability>`.
221
+ - **capabilities**: undeclared prerequisites skip the row or witness as `not-supported:<capability>`.
222
222
 
223
223
  | capability | means the transport can |
224
224
  | --- | --- |
225
225
  | `rawCdp` | expose raw CDP commands and sessions (default true; false marks the report and skips raw rows; an all-skipped page API run is incomplete) |
226
226
  | `autoAttach` | auto-attach to child targets |
227
+ | `persistentSubscriptions` | admit persistent domains and scoped bindings on ordinary pages |
227
228
  | `protectedFrameDrivable` | keeps an ordinary page drivable while it holds a protected iframe; only that iframe is withheld |
228
229
  | `iframeAutoAttach` | auto-attach non-tab child targets (out-of-process iframes) under a page session |
229
230
  | `errorFrameClass` | tell whether a failed (error) iframe was loading a protected URL, without being given the URL |
package/catalog.json CHANGED
@@ -802,6 +802,10 @@
802
802
  "Page.setLifecycleEventsEnabled",
803
803
  "Page.setWebLifecycleState",
804
804
  "Page.handleJavaScriptDialog",
805
+ "Emulation.setDeviceMetricsOverride",
806
+ "Emulation.setTouchEmulationEnabled",
807
+ "Emulation.setFocusEmulationEnabled",
808
+ "Emulation.setEmulatedMedia",
805
809
  "Target.attachToTarget",
806
810
  "Target.detachFromTarget",
807
811
  "Target.closeTarget",
@@ -809,6 +813,15 @@
809
813
  "Target.getTargetInfo",
810
814
  "Target.activateTarget",
811
815
  "Target.setDiscoverTargets",
816
+ "Runtime.enable",
817
+ "Network.enable",
818
+ "Log.enable",
819
+ "DOM.enable",
820
+ "CSS.enable",
821
+ "Performance.enable",
822
+ "Audits.enable",
823
+ "Runtime.runIfWaitingForDebugger",
824
+ "Target.setAutoAttach",
812
825
  "Page.enable",
813
826
  "Fetch.enable",
814
827
  "Page.disable",
@@ -826,6 +839,7 @@
826
839
  "DOMSnapshot.disable",
827
840
  "Overlay.disable"
828
841
  ],
842
+ "sealedPreloadSources": ["", "//# sourceURL=pptr:internal"],
829
843
  "sealedEvents": [
830
844
  "Page.screencastFrame",
831
845
  "Runtime.*",
@@ -841,6 +855,7 @@
841
855
  "IndexedDB.*",
842
856
  "Animation.*",
843
857
  "Audits.*",
858
+ "Performance.*",
844
859
  "Media.*",
845
860
  "DOMSnapshot.*"
846
861
  ],