@ai-ecoverse/slicc-browsers 1.42.0 → 1.44.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,6 @@
1
1
  # slicc-browsers
2
2
 
3
- The browser knowledge SLICC's tools share. SLICC drives Chromium over the Chrome DevTools Protocol (CDP), and several programs in different languages must agree on facts:
4
-
5
- - which browsers exist, where they are installed, and how to launch them for SLICC;
6
- - how to find a browser that is already running with a debugging port, and which one to pick;
7
- - which origins browser control must never touch, starting with seven and the vault;
8
- - how to prove a CDP guard keeps clients away from them.
9
-
10
- One catalog, four vector sets and schemas, shared as a Go module, Rust crate and npm package at one version.
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.
11
4
 
12
5
  | who | uses it for |
13
6
  | --- | --- |
@@ -84,9 +77,11 @@ npm install @ai-ecoverse/slicc-browsers
84
77
 
85
78
  Everything except `./fixture` runs in a browser as well as in Node. `protected.mjs` and `seven.mjs` import nothing, so an extension or a service worker can ship either file on its own.
86
79
 
87
- ## The catalog
80
+ ## Engine
88
81
 
89
- `catalog.json` holds everything a program needs to know about browsers:
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`. JS and Go run the same import-free wasm (under 512 KiB). Bindings check ABI 1; only incompatible request or answer changes bump it. Treat errors as refusals.
83
+
84
+ ## The catalog
90
85
 
91
86
  - **Browsers.** Chrome, Edge, Brave, Opera, Vivaldi, Arc, Atlas, Dia and their pre-release channels, Chrome for Testing and Chromium, **in priority order**.
92
87
  - **Electron apps**: known apps by bundle id, and the ones that block remote debugging.
@@ -102,13 +97,11 @@ The catalog is `"schema": 1`. Minor releases only add fields; changing or removi
102
97
 
103
98
  A program lists the browsers it can attach to, from four sources: `DevToolsActivePort` files in known user-data dirs and SLICC profiles, `--cdp` URLs, a port probe, and the process list. It ranks the endpoints, adds the installed browsers it could launch, and prints the list in the shape of [`schema/browsers.schema.json`](schema/browsers.schema.json). Seven's tabs are reported by origin only, never with a path, query or title.
104
99
 
105
- ### The process source
106
-
107
- The process scan finds browsers that something else started with `--remote-debugging-port`. The exact parsing rules are in `catalog.json`'s `discovery.process` and the corpus's `process-*` cases.
100
+ The process scan finds other programs’ `--remote-debugging-port` browsers; see `discovery.process` and the `process-*` corpus cases.
108
101
 
109
102
  ### SLICC six's profiles
110
103
 
111
- SLICC six, the previous generation, launches Chrome in a profile of its own. Discovery lists such an endpoint, marks it `six: true` and ranks it last, but **never picks it by itself**. Only an explicit request uses it. The roots per OS are in `catalog.json`'s `profiles.six`.
104
+ SLICC six launches Chrome in its own profile (`profiles.six` lists the roots per OS). Discovery marks these endpoints `six: true`, ranks them last and selects them **only on explicit request**.
112
105
 
113
106
  ## The corpus
114
107
 
@@ -176,8 +169,6 @@ guard.target({ url: 'about:blank', opener: 'protected' });
176
169
 
177
170
  It also offers `storageKey(key)` and `unparseable(text)`. A Go or Rust implementation needs a WHATWG URL parser, not `net/url`, and must pass every vector in `protected.json`.
178
171
 
179
- Credential origins (`catalog.credentialOrigins`) withhold cookie/storage export and refuse writes; pages stay drivable. Not covered hosts and Domain=.adobe.com stay exportable; see catalog + C7 notes.
180
-
181
172
  ## Guard vectors
182
173
 
183
174
  A guard sits between a CDP client and the browser and keeps the client away from protected origins. `guard-vectors.json` holds the attacks every guard must pass.
@@ -262,11 +253,12 @@ To find out what a vector checks, read it in `guard-vectors.json`: each one list
262
253
 
263
254
  ## Development
264
255
 
265
- You need Go 1.26, Rust stable with `wasm32-wasip1`, Node 24+, and Chrome or Chromium for the browser tests: they take `CHROME_PATH`, or Chrome for Testing from `npx slicc-cdp install-browser`, and run headless unless `CI` is set (`SLICC_HEADLESS=1` or `0` overrides).
256
+ Use Go 1.26, rustup (see `rust-toolchain.toml`), Node 24+ and Chrome/Chromium (`CHROME_PATH` or `npx slicc-cdp install-browser`). Browser tests run headless outside CI; override with `SLICC_HEADLESS=1` or `0`.
266
257
 
267
258
  | command | what it does |
268
259
  | --- | --- |
269
260
  | `npm run corpus` | rebuilds `corpus.json` from `corpus/` |
261
+ | `npm run engine` | rebuilds both artifacts on Linux; on macOS use `-- --out-dir <scratch>` for a non-release build |
270
262
  | `npm run validate` | checks every file against its schema and the rules a schema can't express, and runs `protected.json` through `protected.mjs` |
271
263
  | `npm run lint` | the JavaScript, Go and Rust linters and formatters, and a `wasm32-wasip1` check of each feature |
272
264
  | `npm test` | every file in `test/integration/`: validation, the Node, Go and Rust tests, and the reference runner against real Chromium with no guard, where every control must pass and every protection must fail |
package/catalog.json CHANGED
@@ -705,6 +705,7 @@
705
705
  "protectedOrigins": {
706
706
  "domains": ["sliccy.ai"],
707
707
  "hosts": ["vault.sliccy.ai"],
708
+ "keptOrigins": ["https://lease-pilot.sliccy.ai"],
708
709
  "schemes": ["https", "http"],
709
710
  "innerSchemes": ["blob", "filesystem", "view-source"],
710
711
  "anySchemes": ["devtools"],