Skip to content

transport-desktop-cdp

Desktop CDP transport — evaluates expressions via Chrome DevTools Protocol over WebSocket and manages vaults via Electron IPC.

Two modes: - Owned (default): the transport launches and owns an isolated Obsidian instance against a temporary --user-data-directory on a free --remote-debugging-port, never touching the user’s Obsidian. Supports version pinning via the user-data asar. - Attach: when an explicit CDP port is configured, the transport connects to an already-running Obsidian on that port.

It connects to page targets, sends Runtime.evaluate commands, and routes to the correct vault target using getBasePath() probing.

Requirements: Node.js 22+ (uses built-in WebSocket and fetch globals).

ClassDescription
DesktopCdpTransportTransport that communicates with Desktop Obsidian via Chrome DevTools Protocol. Connects to Obsidian’s CDP WebSocket endpoint, sends Runtime.evaluate commands, and routes expressions to the correct vault target.
InterfaceDescription
DesktopCdpTransportConfigConfiguration for the CDP transport.
OwnedInstanceAsarAn asar to provision into a harness-owned instance’s user-data directory before launch.
OwnedInstanceConfigConfiguration for a harness-owned, isolated Obsidian instance. When present, the transport launches and owns its own Obsidian process against an isolated user-data directory instead of attaching to a running instance.