import fs from 'node:fs'; import type { ChildProcess, SpawnOptions } from 'node:child_process'; import type { GuardianLifecycleEvent, GuardianRegistration, GuardianState, GuardianStopResult } from './types.js'; type FsLike = Pick; type SpawnLike = (command: string, args: string[], options: SpawnOptions) => ChildProcess; type EnsureGuardianArgs = { homeDir: string; nodeBin: string; cliEntryPath: string; env: NodeJS.ProcessEnv; fetchImpl: typeof fetch; spawn: SpawnLike; sleep: (ms: number) => Promise; fsImpl?: FsLike; }; type RegisterGuardianArgs = { homeDir: string; fetchImpl: typeof fetch; registration: GuardianRegistration; fsImpl?: FsLike; }; type StopGuardianArgs = { homeDir: string; fetchImpl: typeof fetch; sleep: (ms: number) => Promise; fsImpl?: FsLike; }; type ReportGuardianLifecycleArgs = { homeDir: string; fetchImpl: typeof fetch; event: GuardianLifecycleEvent; fsImpl?: FsLike; }; export declare function ensureGuardianDaemon(args: EnsureGuardianArgs): Promise; export declare function registerGuardianProcess(args: RegisterGuardianArgs): Promise; export declare function stopGuardianDaemon(args: StopGuardianArgs): Promise; export declare function reportGuardianLifecycleEvent(args: ReportGuardianLifecycleArgs): Promise; export {};