kdeps-listeners-browser_cdp
v1.0.0Tab events from a running Chrome over the DevTools Protocol: runs the workflow once each time a tab opens or its URL or title changes. The event is the tab: input('url'), input('title'), input('targetId'), input('type'). Start Chrome with --remote-debugging-port=9222, or set KDEPS_BROWSER_CDP_URL. Drive a page with the browser component.
set listeners / shelf workflow
LLM context: none - kdeps uses it without sending it to the model
Where it runs
Part of the listeners set, used in workflow and agent mode. Ready-made event sources for deploy.input.listen: a Telegram poll, Slack Socket Mode and the Discord Gateway, each one transport block in YAML.
- a workflow names a listener under deploy.input.listen
- the listener is read from the listeners set when kdeps run startslisteners/browser_cdp
- its transport (poll, websocket, ...) starts
- each event runs the workflow once
Loaded by: kdeps (agent loop), kdeps run, kdeps exec
In the code: kdeps (agent loop)listen.WakeAddrslisten.readListenerAsset
Install
A kdeps asset: installed with the first-run profile that includes its set, or the first time a command needs it, and updated without a new release.
Also installs what it requires, when missing or older: tools/browser_cdp_open.
Pin a version with kdeps install listeners/browser_cdp@<version>.
Contents
Tab events from a running Chrome over the DevTools Protocol: runs the workflow once each time a tab opens or its URL or title changes. The event is the tab: input('url'), input('title'), input('targetId'), input('type'). Start Chrome with --remote-debugging-port=9222, or set KDEPS_BROWSER_CDP_URL. Drive a page with the browser component.
- kdeps
- >=3.6.0
requires:
tools/browser_cdp_open: ""
websocket:
open:
tool: browser_cdp_open
url: "{{.open.webSocketDebuggerUrl}}"
send:
- '{"id":1,"method":"Target.setDiscoverTargets","params":{"discover":true}}'
on:
- when: '{{if and (or (eq .msg.method "Target.targetCreated") (eq .msg.method
"Target.targetInfoChanged")) (eq .msg.params.targetInfo.type
"page")}}y{{end}}'
emit: "{{json .msg.params.targetInfo}}"
version: 1.0.0
kdeps: ">=3.6.0"
description: 'Tab events from a running Chrome over the DevTools Protocol: runs the workflow once each time a tab opens or its URL or title changes. The event is the tab: input(''url''), input(''title''), input(''targetId''), input(''type''). Start Chrome with --remote-debugging-port=9222, or set KDEPS_BROWSER_CDP_URL. Drive a page with the browser component.'
requires:
tools/browser_cdp_open: ""
websocket:
# /json/version hands out the browser's websocket URL; it changes when Chrome restarts.
open:
tool: browser_cdp_open
url: '{{.open.webSocketDebuggerUrl}}'
send:
# Report every target (tab, worker, extension); the rules keep pages only.
- '{"id":1,"method":"Target.setDiscoverTargets","params":{"discover":true}}'
on:
- when: '{{if and (or (eq .msg.method "Target.targetCreated") (eq .msg.method "Target.targetInfoChanged")) (eq .msg.params.targetInfo.type "page")}}y{{end}}'
emit: '{{json .msg.params.targetInfo}}'
Versions
| Version | Published | Status | Source |
|---|---|---|---|
| 1.0.0 | 11/28/2026 | active | GitHub v1.0.0 |
Details
- Author
- kdeps
- License
- Apache-2.0
- Latest Version
- 1.0.0
- Published
- 11/28/2026