Skip to content

DesktopCdpTransportConfig

Configuration for the CDP transport.

Import:

import type { DesktopCdpTransportConfig } from 'obsidian-integration-testing';

Signature:

export interface DesktopCdpTransportConfig

Properties

PropertyTypeDescription
cdpHost?stringCDP host. Defaults to 'localhost'.
cdpPort?numberCDP port for **attach** mode (the --remote-debugging-port the running Obsidian was launched with). In owned-instance mode this is ignored — a free port is chosen at launch.
commandTimeoutInMilliseconds?numberTimeout in milliseconds for individual CDP commands.

A test's closure travels as one Runtime.evaluate command, so this is also the desktop per-eval cap. The default is DEFAULT_EVAL_CAP_IN_MILLISECONDS, exported from the package root — import it rather than restating the number, so a closure sized against the cap follows it if it ever moves.
configDirectory?stringThe vault's config folder override (Obsidian's *Override config folder*), e.g. '.obsidian-desktop'. When set, the owned instance boots to the starter screen, writes <vaultId>-config into that renderer's localStorage, and only then opens the vault over the vault-open IPC — the override is read once, during the vault renderer's own setup, so it has to exist before that window is created. The opened vault's actual app.vault.configDir is then read back, and a mismatch throws ConfigDirectoryFallbackError. Only meaningful in owned mode.
deadBootGraceInMilliseconds?numberGrace window in milliseconds for fast-failing a dead boot of the owned instance (empty <body> with no window.app after the renderer reached document.readyState 'complete'). Defaults to DEFAULT_DEAD_BOOT_GRACE_IN_MILLISECONDS. 0 disables fast-fail.
isHarnessOwnedInstance?booleanWhen attaching (i.e. cdpPort is set), marks the target as a **harness-owned, already-prepared** instance. Suppresses the user-scope vault-registration preflight, since the owned instance's vault lives in an isolated user-data config rather than the user-scope registry.
isObsidianAppVisible?booleanWhether the owned Obsidian window is shown on screen. When false (the default), the owned instance is launched with keep-alive Chromium flags and its window is moved off-screen after launch. Only meaningful in owned mode; attach mode never touches the (user's) window.
ownedInstance?OwnedInstanceConfigWhen set, the transport launches and owns an isolated Obsidian instance instead of attaching to a running one. This is the default desktop mode.
shouldDisableSandbox?booleanWhether to launch the owned instance with Chromium's sandbox disabled (--no-sandbox). Needed to boot on Linux without a correctly-configured setuid chrome-sandbox helper (e.g. an extracted portable shell, or CI as a non-root user); harmless on Windows/macOS. Only meaningful in owned mode.
shouldThrowOnSilentAsarFallback?booleanWhether a post-boot **silent asar fallback** (the running app version differs from the swapped-in pin) fails fast with SilentAsarFallbackError. The verdict is always computed and surfaced via DesktopCdpTransport.getAsarFallback; this gates only the throw. Only meaningful in owned mode running a swapped-in asar.
shouldWarnOnCompatibilityIssues?booleanWhether the post-boot runtime-Electron compatibility nag warning is emitted when the live Electron is below the app's recommended minimum. The verdict is always computed and surfaced via DesktopCdpTransport.getElectronCompatibility; this only gates the log. Only meaningful in owned mode.