Liking cljdoc? Tell your friends :D

com.blockether.spel.daemon

Background daemon that keeps a Playwright browser alive between CLI calls.

Listens on a Unix domain socket for JSON commands, executes them against the browser, and returns JSON responses. Each command is one JSON line; each response is one JSON line.

Usage: (start-daemon! {:session "default" :headless true}) ;; blocks (daemon-running? "default") ;; check (stop-daemon!) ;; cleanup

Background daemon that keeps a Playwright browser alive between CLI calls.

Listens on a Unix domain socket for JSON commands, executes them against
the browser, and returns JSON responses. Each command is one JSON line;
each response is one JSON line.

Usage:
  (start-daemon! {:session "default" :headless true})   ;; blocks
  (daemon-running? "default")                           ;; check
  (stop-daemon!)                                         ;; cleanup
raw docstring

daemon-running?clj

(daemon-running? session)

Checks if a daemon is running for the given session.

Checks if a daemon is running for the given session.
sourceraw docstring

discover-cdp-endpointclj

(discover-cdp-endpoint)

Auto-discovers a running Chrome's CDP endpoint. Checks DevToolsActivePort files first, then probes common ports (9222, 9229). Returns a CDP URL string (e.g. "http://127.0.0.1:9222") or throws ex-info.

Auto-discovers a running Chrome's CDP endpoint.
Checks DevToolsActivePort files first, then probes common ports (9222, 9229).
Returns a CDP URL string (e.g. "http://127.0.0.1:9222") or throws ex-info.
sourceraw docstring

flags-file-pathclj

(flags-file-path session)

Returns the launch flags persistence file path for a session.

Returns the launch flags persistence file path for a session.
sourceraw docstring

log-file-pathclj

(log-file-path session)

Returns the log file path for a session.

Returns the log file path for a session.
sourceraw docstring

pid-file-pathclj

(pid-file-path session)

Returns the PID file path for a session.

Returns the PID file path for a session.
sourceraw docstring

read-session-flagsclj

(read-session-flags session)

Reads persisted launch flags for a session from the flags file. Returns a map of flag-name->value, or empty map if file doesn't exist. Used by CLI to recover flags like --cdp without requiring them on every command.

Reads persisted launch flags for a session from the flags file.
Returns a map of flag-name->value, or empty map if file doesn't exist.
Used by CLI to recover flags like --cdp without requiring them on every command.
sourceraw docstring

socket-pathclj

(socket-path session)

Returns the Unix socket path for a session.

Returns the Unix socket path for a session.
sourceraw docstring

start-daemon!clj

(start-daemon! opts)

Starts the daemon server. Blocks until shutdown.

Params: opts - Map: :session - String (default 'default') :headless - Boolean (default true) :browser - String (optional, e.g. 'firefox', 'webkit') :cdp - String (optional, CDP endpoint URL)

Starts the daemon server. Blocks until shutdown.

Params:
`opts` - Map:
  :session  - String (default 'default')
  :headless - Boolean (default true)
  :browser  - String (optional, e.g. 'firefox', 'webkit')
  :cdp      - String (optional, CDP endpoint URL)
sourceraw docstring

stop-daemon!clj

(stop-daemon!)

Stops the daemon server and cleans up browser resources. Closes server socket first so new CLI invocations fail fast and start a fresh daemon. Only deletes PID/socket files if they still belong to THIS process (prevents nuking a replacement daemon's files).

Stops the daemon server and cleans up browser resources.
Closes server socket first so new CLI invocations fail fast and start
a fresh daemon. Only deletes PID/socket files if they still belong to
THIS process (prevents nuking a replacement daemon's files).
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close