@ai-ecoverse/slicc-browsers 1.54.0 → 1.55.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 +5 -5
- package/engine/builtins.mjs +1 -0
- package/engine/engine-js.mjs +1 -1
- package/engine/engine-wasm.mjs +1 -1
- package/engine/engine.wasm +0 -0
- package/guard-vectors.json +1 -1
- package/package.json +2 -2
- package/protected-js.mjs +1 -1
- package/protected.json +8 -0
- package/protected.mjs +1 -1
- package/schema/protected.schema.json +13 -0
package/README.md
CHANGED
|
@@ -13,12 +13,12 @@ SLICC drives Chromium over the Chrome DevTools Protocol (CDP). Its Go module, Ru
|
|
|
13
13
|
|
|
14
14
|
| file | what it is |
|
|
15
15
|
| --- | --- |
|
|
16
|
-
| [`catalog.json`](catalog.json) |
|
|
17
|
-
| [`corpus/`](corpus), `corpus.json` | discovery
|
|
16
|
+
| [`catalog.json`](catalog.json) | known Chromium browsers and Electron apps, with [discovery, ranking and launch rules](#the-catalog) |
|
|
17
|
+
| [`corpus/`](corpus), `corpus.json` | discovery fixtures: fake machines and their expected browser rankings |
|
|
18
18
|
| [`protected.json`](protected.json), [`protected.mjs`](protected.mjs) | protected-origin test vectors and the engine-backed JavaScript matcher |
|
|
19
19
|
| [`guard-vectors.json`](guard-vectors.json) | the CDP scenarios every guard must pass |
|
|
20
20
|
| [`debugger-stage1.json`](debugger-stage1.json) | shared Stage 1 debugger conformance data |
|
|
21
|
-
| [`guard-runner.mjs`](guard-runner.mjs), [`guard-driver.mjs`](guard-driver.mjs), [`fixture-server.mjs`](fixture-server.mjs) |
|
|
21
|
+
| [`guard-runner.mjs`](guard-runner.mjs), [`guard-driver.mjs`](guard-driver.mjs), [`fixture-server.mjs`](fixture-server.mjs) | reference guard runner, helpers and test server |
|
|
22
22
|
| [`schema/`](schema) | JSON Schema (2020-12) for each file above, and for the `--json` output of `slicc browsers` and `playwright-cli list` |
|
|
23
23
|
|
|
24
24
|
## Install
|
|
@@ -75,11 +75,11 @@ npm install @ai-ecoverse/slicc-browsers
|
|
|
75
75
|
| `./guard-runner`, `./guard-driver.mjs` | the guard vector runner and its helpers |
|
|
76
76
|
| `./fixture`, `./fixture-client` | the test server (Node only) and a client for a remote one |
|
|
77
77
|
|
|
78
|
-
Only `./fixture` requires Node. MV3
|
|
78
|
+
Only `./fixture` requires Node. MV3 pages using wasm need `'wasm-unsafe-eval'`. Use `./protected-js.mjs` or `./engine-js` where CSP forbids WebAssembly. Inject before page scripts to capture the original built-ins.
|
|
79
79
|
|
|
80
80
|
## Engine
|
|
81
81
|
|
|
82
|
-
One engine classifies origins, targets, cookie domains, storage keys and HAR URLs.
|
|
82
|
+
One engine classifies origins, targets, cookie domains, storage keys and HAR URLs. Rust: `slicc_browsers::engine::Engine::embedded()?` (feature `engine`). JS: `engine` or async `loadEngine` from `@ai-ecoverse/slicc-browsers/engine`. Go: `engine.Default()` in `github.com/ai-ecoverse/slicc-browsers/engine`. Default JS and Go share import-free wasm up to 1 MiB; macOS Go defaults to wazero’s interpreter for hardened runtimes. Bindings check ABI 1; only incompatible requests or answers bump it. Treat errors as refusals. Invalid extra origins fail configuration: use Rust’s `try_with_extra_origins`, not the lossy `with_extra_origins`. Go’s `NewChecked` validates eagerly. `refusal(key)` returns catalog text or errors on unknown keys.
|
|
83
83
|
|
|
84
84
|
An inheriting document’s origin is its default execution context’s `contextOrigin`.
|
|
85
85
|
|
package/engine/builtins.mjs
CHANGED
|
@@ -14,6 +14,7 @@ export const charCodeAt = method(String.prototype.charCodeAt);
|
|
|
14
14
|
export const wellFormed = method(String.prototype.toWellFormed);
|
|
15
15
|
export const startsWith = method(String.prototype.startsWith);
|
|
16
16
|
export const exec = method(RegExp.prototype.exec);
|
|
17
|
+
export const { isArray } = Array;
|
|
17
18
|
export const includes = method(Array.prototype.includes);
|
|
18
19
|
export const every = method(Array.prototype.every);
|
|
19
20
|
export const weakGet = method(WeakMap.prototype.get);
|