/** * Daemon Process Manager * Issue #96: npm install CLI support * Issue #125: Added .env loading and security warnings * SF-1: SRP - Process management only (PID handling delegated to PidManager) */ import { DaemonStatus, StartOptions } from '../types'; import { ServerEnv } from './server-url'; /** * Daemon manager for background server process */ export declare class DaemonManager { private pidManager; private logger; private envPath?; private effectiveEnv?; /** * @param pidFilePath - PID file for this server * @param envPath - Issue #1266: the worktree .env this server runs with, so getStatus() * reports the port it actually listens on; omit for the main server */ constructor(pidFilePath: string, envPath?: string); /** * The configuration this server runs with, with .env taking precedence over exported * variables exactly as start() hands it to the child process (Issue #1266). * * Read once per manager: a .env cannot change within a single CLI invocation, and reading * it again would emit dotenv's banner a second time. */ getEffectiveEnv(): ServerEnv; /** * Start daemon process * Issue #125: Load .env file and add security warnings * @returns Process ID of the started daemon * @throws Error if already running */ start(options: StartOptions): Promise; /** * Stop daemon process * @param force Use SIGKILL instead of SIGTERM * @returns true if stopped successfully, false if not running */ stop(force?: boolean): Promise; /** * Get daemon status * @returns Status object or null if no PID file */ getStatus(): Promise; /** * Check if daemon is running */ isRunning(): Promise; /** * Wait for process to exit */ private waitForExit; } //# sourceMappingURL=daemon.d.ts.map