import { execFile as execFileCallback } from "node:child_process"; import type { Readable, Writable } from "node:stream"; declare const execFile: typeof execFileCallback.__promisify__; export type ClaudeCodeParticipantRole = "watchdog" | "driver"; export interface ClaudeCodeSubscriptionStatus { loggedIn: boolean; authMethod?: string; apiProvider?: string; subscriptionType?: string; } export interface ClaudeCodeParticipantSession { sessionId?: string; resumeSessionId?: string; persist?: boolean; } export interface ClaudeCodeParticipantEvent { [key: string]: unknown; } export interface ClaudeCodeParticipantResult { exitCode: number; events: ClaudeCodeParticipantEvent[]; stderr: string; stderrTruncated: boolean; } export interface ClaudeCodeParticipantChild { stdin: Writable; stdout: Readable; stderr: Readable; kill(signal?: NodeJS.Signals): boolean; once(event: "error", listener: (error: Error) => void): unknown; once(event: "close", listener: (code: number | null, signal: NodeJS.Signals | null) => void): unknown; } export interface ClaudeCodeParticipantSpawnOptions { cwd: string; env: NodeJS.ProcessEnv; shell: false; stdio: ["pipe", "pipe", "pipe"]; } export type ClaudeCodeParticipantSpawn = (command: string, args: string[], options: ClaudeCodeParticipantSpawnOptions) => ClaudeCodeParticipantChild; export interface RunClaudeCodeParticipantOptions { role: ClaudeCodeParticipantRole; prompt: string; cwd: string; model?: string; session?: ClaudeCodeParticipantSession; /** Either the fixed CLI name or an absolute executable path for packaged apps. */ command?: string; signal?: AbortSignal; env?: NodeJS.ProcessEnv; maxEvents?: number; maxStreamBytes?: number; maxStderrBytes?: number; timeoutMs?: number; terminationGraceMs?: number; forceSettleMs?: number; onEvent?: (event: ClaudeCodeParticipantEvent) => void; preflight?: (context: ClaudeCodeParticipantPreflightContext) => Promise; spawnProcess?: ClaudeCodeParticipantSpawn; } export interface ClaudeCodeParticipantPreflightContext { command: string; env: NodeJS.ProcessEnv; } export declare class ClaudeCodeSubscriptionRequiredError extends Error { constructor(message: string); } export interface ClaudeCodeSubscriptionStatusOptions { command?: string; env?: NodeJS.ProcessEnv; execute?: typeof execFile; } export declare function readClaudeCodeSubscriptionStatus(options?: ClaudeCodeSubscriptionStatusOptions): Promise; export declare function runClaudeCodeParticipant(options: RunClaudeCodeParticipantOptions): Promise; export declare function buildClaudeCodeParticipantArgs(options: Pick): string[]; export declare const CLAUDE_CODE_PARTICIPANT_TESTED_VERSION = "2.1.208"; export {}; //# sourceMappingURL=claude-code-participant.d.ts.map