@ai-ecoverse/slicc-browsers 1.53.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 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) | every known Chromium browser and Electron app, and the rules for finding, ranking and launching them ([below](#the-catalog)) |
17
- | [`corpus/`](corpus), `corpus.json` | discovery conformance cases: a fake machine each, with the ranked browser list it must produce |
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) | a reference runner for the guard vectors, its helpers, and the test server they run against |
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 extension pages using wasm need `'wasm-unsafe-eval'`. Use `./protected-js.mjs` or `./engine-js` for page contexts whose CSP forbids WebAssembly. Inject the JS bundle before page scripts run so it can capture the original built-ins.
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. 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.
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
 
@@ -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);