function status
status(): Task<DaemonStatus, never>

Probes this project's daemon. An actual round-trip over the socket, not a look at the sentinel file, so a crashed daemon that left its files behind reports { running: false }.

import { status } from './daemon.ts';

// Defined, not invoked: opens a real socket connection.
async function uptimeMinutes() {
  const info = await status();
  return info.running ? Math.round((Date.now() - info.startedAt) / 60_000) : null;
}

Return Type

Usage

import { status } from "lib/api/daemon.ts";