@ai-ecoverse/slicc-cdp 1.39.1 → 1.39.3

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
@@ -109,10 +109,16 @@ The holder retains its observing CDP session. A `dialog-opened` event supplies `
109
109
  - 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.
110
110
  - `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.
111
111
  - `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.
112
- - 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.
112
+ - 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, send the trusted wheel and switch back, the same way as the other input commands (see [Input on background tabs](#input-on-background-tabs)). 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.
113
113
  - Errors go to stderr without the `### Error` heading, as for the other commands.
114
114
  - `--` ends the options, so `mousewheel -- 0 -100` scrolls up.
115
115
 
116
+ ### Input on background tabs
117
+
118
+ Headed Chrome doesn't deliver trusted input to a tab it isn't showing, and playwright-cli's tabs usually stay in the background next to seven's. So `click`, `dblclick`, `hover`, `type` and `press` check from an isolated world which events reached the page. If Chrome dropped them, the same events are dispatched in place to the element under the point, or to the focused element, without bringing the tab forward. The page then sees them with `isTrusted: false`: there is no user activation, `:hover` doesn't change, and `click` is dispatched just after the command returns, so a dialog it opens doesn't block it. `type` needs a focused editable element. `press` handles printable keys, `Enter`, `Escape`, `Backspace` and `Delete` in place.
119
+
120
+ Only when that can't work (another key, focus inside a frame, or nothing at the point) does it bring the tab to the front, send the input again, check that it arrived and switch back to the tab that was in front. The guard does the switching. It reads which tab is visible from isolated worlds of the ordinary tabs in the window, and switches back to seven's tab only when no ordinary tab there was visible and seven's is the one protected tab in that window. A tab alone in its window is brought forward with nothing to switch back. It refuses, so that no tab is activated, when the vault, another protected or unknown tab could have been in front, when a protected tab is in another window, or when the window is minimized. The error names `tab-select --foreground`. Input that still doesn't arrive fails with an error rather than reporting success.
121
+
116
122
  ## Page tools
117
123
 
118
124
  `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:
@@ -195,6 +201,7 @@ What the clients need from a CDP backend, checked against the code by `crates/cd
195
201
  - `Target.closeTarget` (`crates/playwright-cli/src/browser.rs` `close_target`)
196
202
  - `Target.activateTarget` (`crates/playwright-cli/src/browser.rs` `activate`)
197
203
  - `Browser.getVersion` (`crates/playwright-cli/src/webmcp.rs` `chrome_major_version`)
204
+ - `Browser.getWindowForTarget` (`crates/cdp-client/src/front.rs` `front_window`)
198
205
  - `Slicc.action` (`crates/playwright-cli/src/action.rs` `begin`)
199
206
 
200
207
  ### Browser-level events
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-ecoverse/slicc-cdp",
3
- "version": "1.39.1",
3
+ "version": "1.39.3",
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.11",
72
- "@ai-ecoverse/slicc-kernel": "1.151.0",
73
- "@ai-ecoverse/slicc-shared-web": "2.11.2",
72
+ "@ai-ecoverse/slicc-kernel": "1.152.2",
73
+ "@ai-ecoverse/slicc-shared-web": "2.11.3",
74
74
  "@biomejs/biome": "2.5.15",
75
75
  "lefthook": "2.2.2",
76
76
  "semantic-release": "25.0.9"