Why it looks like CDP
Chrome DevTools Protocol (CDP) groups commands and events into domains and serializes them as JSON. KUI also discovers targets over HTTP and exchanges id-based messages over WebSocket. Familiar names such as DOM, CSS, Page and Input help some clients connect. The shared shape does not make KUI a browser.
Compare by workflow
This comparison follows KUI’s current route table and the official CDP definition. Chromium domains change over time; check KUI methods against the SDK version you use.
| Workflow | KUI DevTools | Chrome CDP |
|---|---|---|
| Runtime | KUI 原生窗口、HTML/CSS、可选 Lua | Chromium/Blink pages and browser process |
| Discovery & connection | Loopback HTTP `/json` + token WebSocket | Remote debugging endpoints + WebSocket |
| Elements & CSS | DOM, computed styles, matched rules, box model, live edits | Broader DOM/CSS domains and browser style model |
| Script debugging | Lua evaluation, breakpoints, stack and variables; scripting engine required | JavaScript/V8 debugging |
| Network | Resource states for scripts, styles and images | Requests, responses, timing and broader network domain |
| Performance | KUI frame stages, invalidation, node work and available resource metrics | Browser rendering and runtime profiling/tracing domains |
| Automation | Input, screenshots, screencast and MCP tools; selected CDP aliases | Broader navigation, targets and network interception |
Methods you can reuse
Page.captureScreenshot maps to a KUI screenshot, while Runtime.evaluate maps to Lua evaluation. Methods such as DOM.getBoxModel and Input.dispatchMouseEvent also have similar entry points. Parameters or responses may align only in part, so check each method in your adapter. An enable call returning {} does not prove that its entire browser domain exists.
Adapting an existing CDP client
List the methods your client actually sends, then compare them with KUI’s protocol. Keep supported DOM/CSS, input and screenshot steps. Replace JavaScript evaluation with Lua or native host operations. Rewrite browser navigation, ServiceWorker, full Network, Target sessions and device emulation for the KUI app model. Verify the adapted workflow in a real window.
A precise compatibility claim
KUI exposes a CDP-style debugging protocol and selected methods with familiar names, plus KUI-specific rendering and Lua tools. It is not a complete CDP implementation. Claim compatibility with a Playwright, Puppeteer or other browser automation workflow only after testing the exact methods and scenario.
Something unclear?
Report an issue on this page →