FORGE KUI / docs

KUI DevTools and CDP

A familiar debugging interface shape with a different runtime and scope. See what can be reused and what needs adaptation.

Version 3.61.7

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.

Where KUI and CDP overlap
WorkflowKUI DevToolsChrome CDP
RuntimeKUI 原生窗口、HTML/CSS、可选 LuaChromium/Blink pages and browser process
Discovery & connectionLoopback HTTP `/json` + token WebSocketRemote debugging endpoints + WebSocket
Elements & CSSDOM, computed styles, matched rules, box model, live editsBroader DOM/CSS domains and browser style model
Script debuggingLua evaluation, breakpoints, stack and variables; scripting engine requiredJavaScript/V8 debugging
NetworkResource states for scripts, styles and imagesRequests, responses, timing and broader network domain
PerformanceKUI frame stages, invalidation, node work and available resource metricsBrowser rendering and runtime profiling/tracing domains
AutomationInput, screenshots, screencast and MCP tools; selected CDP aliasesBroader 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.