/**
 * LLM calls for workflow steps via Claude Code subprocess.
 *
 * Spawns `claude --print` as a child process with the resolved prompt.
 * Claude Code handles its own OAuth authentication internally — no
 * credential reading, token refresh, or API endpoint logic needed here.
 * This is the same mechanism the admin chat uses (claude-agent.ts).
 *
 *   VALIDATE PROMPT
 *     │
 *     ├─ empty → throw (no silent fallback)
 *     │
 *     v
 *   SPAWN claude --print --model <model> --max-turns 1
 *     │
 *     ├─ ENOENT (not in PATH) → throw
 *     ├─ non-zero exit → throw with stderr
 *     ├─ timeout → SIGTERM → throw
 *     ├─ empty stdout → throw
 *     └─ stdout text → return
 *
 * probeLlmHealth() shares the same spawn path with a trivial "pong"
 * prompt and a shorter timeout. Used as the pre-flight check before
 * executing workflow LLM steps (Task 74 — graceful degradation).
 */
interface SpawnedChildLike {
    stdout: {
        on(event: "data", cb: (chunk: Buffer) => void): void;
    };
    stderr: {
        on(event: "data", cb: (chunk: Buffer) => void): void;
    };
    on(event: "close", cb: (code: number | null) => void): void;
    on(event: "error", cb: (err: Error) => void): void;
    kill(signal?: string): void;
}
type SpawnFn = (cmd: string, args: string[], opts: unknown) => SpawnedChildLike;
export interface LlmCallParams {
    prompt: string;
    model: string;
    maxTokens?: number;
    timeoutMs: number;
    /**
     * Optional spawn function override — used only by tests to inject a
     * fake child process. Production callers must omit this.
     */
    _spawn?: SpawnFn;
}
export interface ProbeLlmHealthParams {
    model: string;
    /** Probe timeout — defaults to 10 seconds. */
    timeoutMs?: number;
    /** Test-only spawn injection. */
    _spawn?: SpawnFn;
}
export interface ProbeResult {
    ok: boolean;
    latencyMs: number;
    /** Set when ok is false. One-line error summary suitable for logs and
     *  substitution into fallback template `{{_error}}`. */
    error?: string;
}
/**
 * Read the account's adminModel from account.json.
 * Returns the model ID string, or null if the config can't be read.
 */
export declare function readAdminModel(platformRoot: string, accountId: string): string | null;
/**
 * Execute a one-shot LLM call by spawning Claude Code.
 *
 * Returns the model's text response. The caller is responsible for
 * parsing the response (JSON or raw text) via parseStepOutput().
 */
export declare function executeLlmCall(params: LlmCallParams): Promise<string>;
/**
 * Lightweight pre-flight probe for LLM availability.
 *
 * Spawns `claude --print` with a trivial prompt ("pong") and a short
 * timeout. Any failure mode that would cause a real LLM step to fail
 * (missing binary, dead OAuth token, Anthropic outage, network partition)
 * also fails this probe — it is the strongest available signal short
 * of running the real workflow.
 *
 * Called at most once per workflow run, only when the workflow contains
 * at least one LLM step. Per-step spawn failures mid-run are handled
 * separately by the workflow-execute convergence arm.
 *
 *   SUCCESS  →  { ok: true, latencyMs }
 *   FAILURE  →  { ok: false, latencyMs, error: one-line summary }
 */
export declare function probeLlmHealth(params: ProbeLlmHealthParams): Promise<ProbeResult>;
export {};
//# sourceMappingURL=llm-call.d.ts.map