function ensureRunning
ensureRunning(): Promise<boolean>

Ensures a daemon is reachable for the current cwd. Returns true if one was already running or was successfully spawned; false on spawn timeout. Silent — intended for the cli.ts auto-spawn path where the spawn is incidental to the run.

// Defined, not invoked: pings the daemon socket and may spawn a real process.
async function warmDaemon(): Promise<boolean> {
  return await ensureRunning(); // true → a daemon is reachable for this cwd
}

Return Type

Promise<boolean>

Usage

import { ensureRunning } from "lib/commands/daemon/index.ts";