/** * ADR-510 §2.4 — `ruflo doctor --component headless-plugins`: do ruflo mods * actually run under `claude -p` on this machine? * * Runs `claude -p --plugin-dir --output-format stream-json * --verbose "reply ok"` in a throwaway project that has a `.claude-flow/` * directory, then reports: * - whether the init event lists ruflo-mods from that folder; * - whether `plugin_errors` is empty (Claude Code omits the key when none); * - whether the mod's session heartbeat (`.claude-flow/mods/session.json`) * was written — the proof that its function hooks ran. * * The runner is injectable so tests never spawn `claude` or need a key. * Without any model credential the check is skipped (warn), never spawned. */ import { type PluginPaths } from './plugin-paths.js'; export declare const HEADLESS_TIMEOUT_MS = 60000; export declare const HEARTBEAT: string; export interface HeadlessRun { exitCode: number | null; stdout: string; stderr: string; timedOut?: boolean; } export type HeadlessRunner = (argv: string[], env: NodeJS.ProcessEnv, cwd: string, timeoutMs: number) => Promise; export interface HeadlessCheck { name: string; status: 'pass' | 'warn' | 'fail'; message: string; fix?: string; } export interface HeadlessCheckDeps { runner?: HeadlessRunner; resolve?: () => PluginPaths; env?: NodeJS.ProcessEnv; home?: string; /** Throwaway project dir factory (must be removable afterwards). */ makeProject?: () => string; exists?: (path: string) => boolean; timeoutMs?: number; model?: string; } export declare const spawnHeadless: HeadlessRunner; /** A model credential Claude Code could use; without one the check would only fail on auth. */ export declare function hasModelCredential(env: NodeJS.ProcessEnv, configDir: string, exists?: (p: string) => boolean): boolean; interface InitEvent { plugins?: Array<{ name?: string; path?: string; source?: string; }>; plugin_errors?: unknown[]; } /** The `system/init` event of a stream-json run, if any. */ export declare function findInitEvent(stdout: string): InitEvent | null; export declare function checkHeadlessPlugins(deps?: HeadlessCheckDeps): Promise; export {}; //# sourceMappingURL=headless-check.d.ts.map