@ai-ecoverse/slicc-browsers 1.52.0 → 1.53.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
@@ -79,7 +79,9 @@ Only `./fixture` requires Node. MV3 extension pages using wasm need `'wasm-unsaf
79
79
 
80
80
  ## Engine
81
81
 
82
- One rules engine classifies protected origins, targets, cookie domains, storage keys and HAR request URLs. Use Rust's `slicc_browsers::engine::Engine::embedded()?` (feature `engine`), import `engine` or async `loadEngine` from `@ai-ecoverse/slicc-browsers/engine` in JS, or call `engine.Default()` in Go's `github.com/ai-ecoverse/slicc-browsers/engine`. The default JS and Go bindings run the same import-free wasm (under 512 KiB); on macOS, Go defaults to wazero’s interpreter for hardened-runtime compatibility (wazero issue 2393). Bindings check ABI 1; only incompatible request or answer changes bump it. Treat errors as refusals. `refusal(key)` returns the shared text from `catalog.json`’s `refusals` or errors on an unknown key.
82
+ One engine classifies origins, targets, cookie domains, storage keys and HAR URLs. Use `slicc_browsers::engine::Engine::embedded()?` in Rust (feature `engine`), `engine` or async `loadEngine` from `@ai-ecoverse/slicc-browsers/engine` in JS, or `engine.Default()` in `github.com/ai-ecoverse/slicc-browsers/engine` in Go. Default JS and Go share import-free wasm (under 512 KiB); Go uses wazero’s interpreter by default on macOS for hardened runtimes (wazero issue 2393). Bindings check ABI 1; only incompatible requests or answers bump it. Treat errors as refusals. `refusal(key)` returns catalog text or errors on unknown keys.
83
+
84
+ An inheriting document’s origin is its default execution context’s `contextOrigin`.
83
85
 
84
86
  ## The catalog
85
87
 
@@ -91,7 +93,7 @@ One rules engine classifies protected origins, targets, cookie domains, storage
91
93
  - **Profiles and platforms**: where SLICC keeps its browser profiles, and the config dirs and registry keys per OS.
92
94
  - **Protected origins**: see [below](#protected-origins).
93
95
 
94
- The catalog uses schema 1. Minor releases only add fields; removing or changing fields requires schema 2 and a major release. slicc-cli has no browser tables: change `catalog.json`, release and bump the dependency.
96
+ Construct catalog and vector types by field name (Go) or with `..Default::default()` (Rust). Schema 1 grows additively; changing or removing fields requires schema 2 and a major. slicc-cli has no browser tables: change `catalog.json`, release and bump the dependency.
95
97
 
96
98
  ## Discovery
97
99
 
@@ -151,11 +153,11 @@ Browser control must never navigate to, open, attach to, or read cookies or stor
151
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;
152
154
  - **a program's extra seven origins**.
153
155
 
154
- Targets and frames use only their own URL and reported security origin (including inherited origins), never their parent, opener or history; unknown origins alone do not protect a target, but an unparseable URL does. Error documents are ordinary unless the failed URL is unparseable, and a protected failed URL is redacted to its origin. A refused call fails with `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. 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`.
155
157
 
156
- The engine withholds protected frames, not their ordinary page. Adapters report any mixed state from capture dispatch to release: screenshots and screencasts show Seven but blank other protected boxes; PDFs needing blanking are refused.
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.
157
159
 
158
- Foreign extension frames cannot be attached or read. Their URLs are hidden in discovery, snapshots, accessibility trees and evaluate results; the tab remains readable and can be snapshotted. Screenshots and input require every extension frame to be hidden (no layout box or `visibility: hidden`) and unfocused, including through nested documents or shadow roots. Opacity and position don’t count. Drop screenshots if a frame becomes visible; a race between the check and CDP reply is accepted. While a frame is present, refuse whole-page captures and new screencasts; stop active screencasts or drop their frames. Refusals name the extension frame, not seven. `protectedOrigins.extensionFrames` lists the schemes, methods and refusals; `protected.mjs` offers `extensionFrame(url)`.
160
+ Foreign extension frames cannot be attached or read. Discovery, snapshots, accessibility trees and evaluate results hide their URLs; the tab remains readable and snapshottable. Screenshots and input require all extension frames to be hidden (no layout box or `visibility: hidden`) and unfocused, even in nested documents or shadow roots. Opacity and position don’t count. Drop screenshots if a frame becomes visible; the check can race the CDP reply. While a frame is present, refuse whole-page captures and new screencasts; stop active casts or drop their frames. Refusals name the extension frame, not seven. `protectedOrigins.extensionFrames` lists schemes, methods and refusals; `protected.mjs` offers `extensionFrame(url)`.
159
161
 
160
162
  `catalog.json`’s `protectedOrigins` holds the rules. `protected.json` tests them across bindings. `protected.mjs` exposes the engine synchronously:
161
163
 
@@ -276,7 +278,7 @@ A new discovery behaviour gets a corpus case, and a new guard behaviour gets a g
276
278
 
277
279
  CI is [slicc-shared-web's pipeline](https://github.com/ai-ecoverse/slicc-shared-web#pipeline), called from `.github/workflows/ci.yml`. A pull request gets lint, then `npm test` split over shards by timing, then a Claude and a Codex review; the merge queue runs lint and the tests again. Tests run on Linux only.
278
280
 
279
- Every merge to `main` that warrants it is released by semantic-release as one version for all three packages. Pushed tags are never moved or deleted: a bad release is fixed by the next one.
281
+ semantic-release versions all three packages together on qualifying `main` merges. Never move or delete a pushed tag; fix a bad release in the next one.
280
282
 
281
283
  ## License
282
284
 
package/catalog.json CHANGED
@@ -791,6 +791,87 @@
791
791
  },
792
792
  "unparseable": "protected",
793
793
  "unparseableRefusal": "slicc: refused: slicc can't parse this URL, so it could be a protected page",
794
+ "sealedAllowed": [
795
+ "Page.navigate",
796
+ "Page.reload",
797
+ "Page.navigateToHistoryEntry",
798
+ "Page.stopLoading",
799
+ "Page.getNavigationHistory",
800
+ "Page.close",
801
+ "Page.bringToFront",
802
+ "Page.setLifecycleEventsEnabled",
803
+ "Page.setWebLifecycleState",
804
+ "Page.handleJavaScriptDialog",
805
+ "Target.attachToTarget",
806
+ "Target.detachFromTarget",
807
+ "Target.closeTarget",
808
+ "Target.getTargets",
809
+ "Target.getTargetInfo",
810
+ "Target.activateTarget",
811
+ "Target.setDiscoverTargets",
812
+ "Page.enable",
813
+ "Fetch.enable",
814
+ "Page.disable",
815
+ "Fetch.disable",
816
+ "Runtime.disable",
817
+ "DOM.disable",
818
+ "CSS.disable",
819
+ "Log.disable",
820
+ "Console.disable",
821
+ "Debugger.disable",
822
+ "DOMDebugger.disable",
823
+ "Accessibility.disable",
824
+ "LayerTree.disable",
825
+ "Network.disable",
826
+ "DOMSnapshot.disable",
827
+ "Overlay.disable"
828
+ ],
829
+ "sealedEvents": [
830
+ "Page.screencastFrame",
831
+ "Runtime.*",
832
+ "Debugger.*",
833
+ "DOM.*",
834
+ "CSS.*",
835
+ "Log.*",
836
+ "Console.*",
837
+ "Accessibility.*",
838
+ "Overlay.*",
839
+ "LayerTree.*",
840
+ "DOMStorage.*",
841
+ "IndexedDB.*",
842
+ "Animation.*",
843
+ "Audits.*",
844
+ "Media.*",
845
+ "DOMSnapshot.*"
846
+ ],
847
+ "sealedContent": [
848
+ "Runtime.evaluate",
849
+ "Runtime.callFunctionOn",
850
+ "Runtime.compileScript",
851
+ "Runtime.runScript",
852
+ "Runtime.awaitPromise",
853
+ "Runtime.getProperties",
854
+ "Runtime.queryObjects",
855
+ "Runtime.globalLexicalScopeNames",
856
+ "Debugger.*",
857
+ "DOMDebugger.*",
858
+ "DOM.*",
859
+ "CSS.*",
860
+ "DOMSnapshot.*",
861
+ "Accessibility.*",
862
+ "LayerTree.*",
863
+ "Overlay.*",
864
+ "Page.getResourceContent",
865
+ "Page.searchInResource",
866
+ "Page.captureSnapshot",
867
+ "Page.captureScreenshot",
868
+ "Page.printToPDF",
869
+ "Page.startScreencast",
870
+ "Page.screencastFrame",
871
+ "IO.read",
872
+ "Network.getResponseBody",
873
+ "Audits.getEncodedResponse"
874
+ ],
794
875
  "extensionWorlds": {
795
876
  "schemes": [
796
877
  "chrome-extension",