@ai-ecoverse/slicc-cdp 1.41.21 → 1.41.23
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 +2 -2
- package/bin/curlwright.wasm +0 -0
- package/bin/playwright-cli.wasm +0 -0
- package/package.json +3 -3
- package/src/cdp-client.js +3 -0
package/README.md
CHANGED
|
@@ -69,7 +69,7 @@ The web storage commands, `localstorage-list`, `-get`, `-set`, `-delete` and `-c
|
|
|
69
69
|
playwright-cli --cdp 9333 webmcp-polyfill --tab <targetId> --reload
|
|
70
70
|
```
|
|
71
71
|
|
|
72
|
-
The holder is a foreground process: keep stdin open, and close stdin to stop it. Its first stdout line is JSON with `event: "ready"`, `loaderId`, `mode`, `tab`, `late`, `reloaded` and measured `pauseMicros`. After later navigations, a `document-ready` JSON event identifies the current `loaderId` once the top document has loaded, every frame document the holder is waiting on, including cross-origin iframes in their own processes, has passed or failed the gate, and the holder has persisted its verified metadata; consumers should await this event before listing load-time tools. Ordinary CLI saves preserve holder-owned metadata, and listing refreshes it after verifying the current document. `--reload` is opt-in: it reloads only the selected tab so registration during page load sees the API. Without it, the shim installs into the already-loaded document and `late: true` warns that load-time registrations may have been missed. An existing native or page-provided API is not replaced. The shim's document and navigator aliases remain replaceable; the holder retains its registered tools through a private, random lexical bridge, not a page-callable binding.
|
|
72
|
+
The holder is a foreground process: keep stdin open, and close stdin to stop it. Its first stdout line is JSON with `event: "ready"`, `loaderId`, `mode`, `tab`, `late`, `reloaded` and measured `pauseMicros`. After later navigations, a `document-ready` JSON event identifies the current `loaderId` once the top document has loaded, every frame document the holder is waiting on, including cross-origin iframes in their own processes, has passed or failed the gate, and the holder has persisted its verified metadata; consumers should await this event before listing load-time tools. Ordinary CLI saves preserve holder-owned metadata, and listing refreshes it after verifying the current document. On native hosts and WASI, session and state files are published from unique private sibling files with atomic renames, so concurrent readers see a complete previous or new generation. `--reload` is opt-in: it reloads only the selected tab so registration during page load sees the API. Without it, the shim installs into the already-loaded document and `late: true` warns that load-time registrations may have been missed. An existing native or page-provided API is not replaced. The shim's document and navigator aliases remain replaceable; the holder retains its registered tools through a private, random lexical bridge, not a page-callable binding.
|
|
73
73
|
|
|
74
74
|
While the holder runs, a page that registers or unregisters tools after load, including in an admitted cross-origin iframe, produces a `tools-changed` JSON line:
|
|
75
75
|
|
|
@@ -260,7 +260,7 @@ What the clients need from a CDP backend, checked against the code by `crates/cd
|
|
|
260
260
|
- `Inspector.enable` (private guard only)
|
|
261
261
|
- `Fetch.*`
|
|
262
262
|
|
|
263
|
-
The guarded Rust client supports document-scoped operations, origin-scoped cookies and guarded interception. Persistent page capabilities that cannot be restricted to verified ordinary documents are refused before sending, including generic init scripts, bindings, page overrides and automatic debugger-waiting attachment. `Network.emulateNetworkConditions` is the one network override admitted, and only as Playwright's offline toggle on an ordinary page session. The dedicated WebMCP installer is the sole vetted-shim exception: it accepts a session, never client-provided source, and gates the pinned bytes on guard-owned document verification. The production method lifetime [inventory](crates/cdp-client/src/capability_inventory_test.rs) is checked against the CLI sources. The Node `CDPClient` is a raw CDP transport, not the guarded Rust client.
|
|
263
|
+
The guarded Rust client supports document-scoped operations, origin-scoped cookies and guarded interception. Persistent page capabilities that cannot be restricted to verified ordinary documents are refused before sending, including generic init scripts, bindings, page overrides and automatic debugger-waiting attachment. `Network.emulateNetworkConditions` is the one network override admitted, and only as Playwright's offline toggle on an ordinary page session. The dedicated WebMCP installer is the sole vetted-shim exception: it accepts a session, never client-provided source, and gates the pinned bytes on guard-owned document verification. The production method lifetime [inventory](crates/cdp-client/src/capability_inventory_test.rs) is checked against the CLI sources. The Node `CDPClient` is a raw CDP transport, not the guarded Rust client. Both clients send message IDs from 1 through 2^30 - 1 and refuse further sends when that range is exhausted; IDs never wrap.
|
|
264
264
|
|
|
265
265
|
### Session-level domains
|
|
266
266
|
|
package/bin/curlwright.wasm
CHANGED
|
Binary file
|
package/bin/playwright-cli.wasm
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-ecoverse/slicc-cdp",
|
|
3
|
-
"version": "1.41.
|
|
3
|
+
"version": "1.41.23",
|
|
4
4
|
"description": "SLICC's CDP layer: client, browser API, transports, HAR, and ARIA snapshot",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -69,8 +69,8 @@
|
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
71
|
"@ai-ecoverse/slicc-browsers": "1.18.15",
|
|
72
|
-
"@ai-ecoverse/slicc-kernel": "1.
|
|
73
|
-
"@ai-ecoverse/slicc-shared-web": "2.12.
|
|
72
|
+
"@ai-ecoverse/slicc-kernel": "1.167.2",
|
|
73
|
+
"@ai-ecoverse/slicc-shared-web": "2.12.4",
|
|
74
74
|
"@ai-ecoverse/wasm-bash": "5.3.0-23",
|
|
75
75
|
"@ai-ecoverse/wasm-coreutils": "9.12.0-15",
|
|
76
76
|
"@biomejs/biome": "2.5.15",
|
package/src/cdp-client.js
CHANGED
|
@@ -80,6 +80,9 @@ export class CDPClient {
|
|
|
80
80
|
if (this.#state !== 'connected' || !this.#ws) {
|
|
81
81
|
return Promise.reject(new Error('CDP client is not connected\n'));
|
|
82
82
|
}
|
|
83
|
+
if (this.#nextId >= 2 ** 30 - 1) {
|
|
84
|
+
return Promise.reject(new Error('CDP client message ID range exhausted\n'));
|
|
85
|
+
}
|
|
83
86
|
const id = ++this.#nextId;
|
|
84
87
|
const message = { id, method };
|
|
85
88
|
if (params !== undefined) message.params = params;
|