@ai-ecoverse/slicc-cdp 1.37.1 → 1.38.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 +11 -0
- package/bin/curlwright.wasm +0 -0
- package/bin/playwright-cli.wasm +0 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -87,6 +87,17 @@ Only the hash-pinned shim can use the dedicated installer. Its inert pre-executi
|
|
|
87
87
|
|
|
88
88
|
`dialog-accept [prompt]` and `dialog-dismiss` are bounded live waits: start one before triggering an alert, confirm or prompt. It waits up to five seconds, verifies an observed ordinary main-frame dialog against the browser's current target and navigation history, then answers it. The dialog-only flat session never enables Network or Runtime or reads a renderer frame tree, so it can answer while a click is in flight. Protected, unknown, stale and subframe ownership are refused. A dialog already open before attachment is not answered; the error names the [foreground dialog holder follow-up #529](https://github.com/ai-ecoverse/slicc-cdp/issues/529).
|
|
89
89
|
|
|
90
|
+
`resize`, `keydown`, `keyup`, `mousemove`, `mousedown`, `mouseup`, `mousewheel` and `drop` take Microsoft's arguments, print its `### Ran Playwright code` lines and send Playwright's key definitions, buttons, coordinates and modifier masks. The deliberate differences:
|
|
91
|
+
|
|
92
|
+
- Every command is its own process, so the pointer position, held buttons and held keys are saved per tab in the session, and the next command continues from them as Playwright's `page.mouse` and `page.keyboard` do. Modifiers held with `keydown` apply to later key and mouse events. On a macOS browser `keydown` sends Playwright's editing commands; `ControlOrMeta` follows the browser's platform rather than the CLI's.
|
|
93
|
+
- Mouse commands first hit-test the whole pixels around the point with `DOM.getNodeForLocation` and refuse a point over an iframe, frame, object, embed or fenced frame, or inside a child frame. `keydown` and `keyup` refuse while focus is inside one of those or inside a closed shadow root. This keeps raw input out of protected and unverified frames.
|
|
94
|
+
- A native HTML drag that `mousedown` and `mousemove` start is not intercepted. `Input.setInterceptDrags` is a persistent capability the guard refuses, and an intercepted drag could not span separate commands. `drag` and `drop` cover element-to-element and external drops.
|
|
95
|
+
- `resize` sets the window with `Browser.setWindowBounds`, adding the measured difference between the window and the viewport, so the viewport becomes `<w>` by `<h>` and stays that size after the command exits. `Emulation.setDeviceMetricsOverride` is not used because Chrome clears it when the command's session detaches. Sizes must be whole numbers from 1 to 10000000. The guard admits the change only for the session's own window, with an ordinary current document and frame tree, and refuses it while any protected or unverifiable tab, frame or other window-capable target is open in the same browser profile, since a window resize reaches every tab in the window. Chrome's own `browser_ui` targets on `chrome://*.top-chrome/`, such as the omnibox popup of a headed window, are not tabs and are not counted.
|
|
96
|
+
- `drop` dispatches synthetic `dragenter`, `dragover` and `drop` events in the page, as Microsoft's does, rather than `Input.dispatchDragEvent`, whose file list makes the browser read paths itself. The CLI reads only the regular files named with `--path`, resolved against the working directory, refuses directories and other non-regular files, and caps them at 25 MiB in total. The wasm build reads the kernel's files with the same code. The printed locator is `locator('aria-ref=<ref>')`, not Playwright's generated one, only snapshot refs are accepted as targets, and MIME types come from a short built-in table.
|
|
97
|
+
- Chrome never acknowledges `Input.dispatchMouseEvent` `mouseWheel` in a background tab, and Playwright's pages are always visible. In a visible tab `mousewheel` sends the trusted wheel event. In a background tab it scrolls in place, without bringing the tab forward: from an isolated world it dispatches a cancelable, untrusted `WheelEvent` at the point to the element under it, and unless the page cancels that event, it scrolls the nearest ancestor that can scroll in each axis, or the page. Browser-level wheel effects such as Ctrl zoom, smooth scrolling and overscroll do not happen there. Only if that cannot run does `mousewheel` bring the tab to the front, as `tab-select --foreground` does, and only while no protected or unverifiable tab is open in the same browser profile, using the same guard check as `resize`, because activating a tab hides the tab that was in front. Otherwise it is refused and names `tab-select <index> --foreground`. `Input.synthesizeScrollGesture` is driven by the begin-frames a background tab does not get, and `Emulation.setFocusEmulationEnabled` and `Page.setWebLifecycleState` do not make a tab visible and are persistent capabilities the guard refuses, so none of them is used.
|
|
98
|
+
- Errors go to stderr without the `### Error` heading, as for the other commands.
|
|
99
|
+
- `--` ends the options, so `mousewheel -- 0 -100` scrolls up.
|
|
100
|
+
|
|
90
101
|
## Page tools
|
|
91
102
|
|
|
92
103
|
`generate-locator`, `highlight` and `network-state-set` take Microsoft's arguments and options and print its output and exit codes. `eval-file` and `fetch` are SLICC-only. Where they differ from Microsoft's, or from SLICC's own handlers:
|
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.
|
|
3
|
+
"version": "1.38.0",
|
|
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,7 +69,7 @@
|
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
71
|
"@ai-ecoverse/slicc-browsers": "1.18.11",
|
|
72
|
-
"@ai-ecoverse/slicc-kernel": "1.
|
|
72
|
+
"@ai-ecoverse/slicc-kernel": "1.150.1",
|
|
73
73
|
"@ai-ecoverse/slicc-shared-web": "2.11.2",
|
|
74
74
|
"@biomejs/biome": "2.5.15",
|
|
75
75
|
"lefthook": "2.2.2",
|