/**
 * Per-project daemon entry. Owns the event loop for triggered skill runs.
 *
 * Lifecycle (in order):

 *   1. Boot the unified skill pipeline (legacy loaders + bundle loader +
 *      registrar).
 *   2. Build registries (ToolManager, CustomCommandLoader, SubagentLoader)
 *      and register the loaded skills.
 *   3. Wire the EventRouter through the BackpressureDispatcher into the
 *      SkillDispatcher.
 *   4. Start event sources (file watcher + cron) and the IPC server.
 *   5. Write the lockfile, trap SIGTERM/SIGINT for clean shutdown.
 *
 * The daemon does not draw a TUI - the IPC socket is its surface. The
 * `onActivity` callback writes a log line and fires the OS notification.
 *
 * See `agents/2026-05-20-skills-unification-plan.md` step 19.
 */
import { type ActivityListener, type Checkpointer, type ExecutorFactory } from '../skills/dispatcher.js';
export interface DaemonOptions {
    projectRoot: string;
    /** Optional built-in bundle directory shipped with Nanocoder. */
    builtInBundleRoot?: string;
    /**
     * Factory the dispatcher uses to build a per-run subagent executor.
     * Production wiring supplies the real one (wraps `SubagentExecutor`);
     * the daemon spec injects a stub so it can verify wiring without
     * standing up an LLM client.
     */
    buildExecutor: ExecutorFactory;
    checkpointer?: Checkpointer;
    /**
     * Override the activity listener. If omitted, the daemon's default
     * fires the `triggeredRunComplete` OS notification and broadcasts via
     * IPC.
     */
    onActivity?: ActivityListener;
}
export interface DaemonHandle {
    stop(): Promise<void>;
}
/**
 * Boot the daemon. Returns a handle for graceful shutdown. The lockfile
 * is written on successful boot and removed on shutdown.
 *
 * Throws if a live daemon is already running for this project (stale
 * lockfiles are reaped automatically).
 */
export declare function startDaemon(opts: DaemonOptions): Promise<DaemonHandle>;
//# sourceMappingURL=daemon.d.ts.map