import { runDaemon } from './daemon'; export declare const LOG_PATH: string; /** * Boot capture for the detached launcher (wscript/VBS chain). Kept SEPARATE * from LOG_PATH: the daemon's own `log()` appends to LOG_PATH, so pointing the * launcher's stdout capture at the same file duplicated every line in * ~/.teamshare/daemon.log. This file only holds output emitted before the * daemon's logger is up (module-load failures, native ABI crashes). */ export declare const LAUNCH_LOG_PATH: string; export declare const AUTOSTART_TASK_NAME = "TeamShareBridge"; /** Reads the pid file and returns the live daemon pid, or null. */ export declare function runningPid(): number | null; /** * `start`: spawns the daemon detached (stdio -> ~/.teamshare/daemon.log) and * records the pid. `daemon` stays the foreground alias for debugging. * * IMP-9xx zombie takeover: a pid-file hit alone no longer refuses to start - * the instance must also answer /ping. Alive-but-wedged daemons (network * stack wedged, event loop stuck) are killed and replaced so `start` always * yields a WORKING daemon. */ export declare function startDaemon(port?: number): { started: boolean; pid?: number; message: string; }; /** * Watchdog supervisor (IMP-9xx): runs FOREVER under the autostart task and * revives a dead/wedged daemon no matter who started it last (CLI, vbs, * previous task instance). Cheap: one localhost /ping probe per tick. */ export declare function runSupervisor(intervalMs?: number): void; /** `stop`: terminates the live daemon and clears the pid file. */ export declare function stopDaemon(): { stopped: boolean; message: string; }; /** `restart`: stop + start. */ export declare function restartDaemon(port?: number): { message: string; }; /** Registers (on) or removes (off) the login autostart for this platform. */ export declare function setAutostart(enabled: boolean): { ok: boolean; message: string; }; /** Whether autostart is registered for this platform. */ export declare function autostartStatus(): boolean; /** * Default-on watchdog (2026-09): every bridge install gets the autostart * supervisor unless the user opted out with `autostart off`. Runs as a * detached `autostart on` child so the calling CLI never blocks on the * Windows scheduled-task registration (up to ~60s of powershell). Cheap * sync pre-checks (marker + status) keep this a no-op on the common path. */ export declare function ensureAutostartDefault(): void; /** Keep the daemon entry import for callers that run in-process. */ export { runDaemon };