import { type ChildProcess } from 'node:child_process'; import type { DevinCallOptions } from './types.js'; export type DevinExecError = Error & { code?: string | number; /** Devin's `cognition.ai/errorKind` from a JSON-RPC error's data, when present. */ errorKind?: string; /** Session resolved during the call; lets error paths report it for resume. */ sessionId?: string; stderr?: string; signal?: NodeJS.Signals | null; }; export interface DevinProcessExit { code: number | null; signal: NodeJS.Signals | null; } export interface DevinAcpProcess { readonly child: ChildProcess; /** * Settles when the child exits. Resolves with the exit info on `exit` or * `close`, whichever comes first (`close` also waits for stdio to drain, * which a pipe-holding descendant can stall); rejects when spawning the * process or one of its stdio streams fails. */ readonly exited: Promise; stderrText(): string; stderrOverflowed(): boolean; /** * Exit info once the leader process dies — set on `exit` or `close`, * whichever arrives first. */ exitInfo(): DevinProcessExit | undefined; /** * Refresh the recorded detached-descendant process groups. Must be called * while the leader is alive; throttled internally. */ refreshDescendants(): void; terminate(): void; } export declare function createExecError(message: string, params?: { code?: string | number; errorKind?: string; sessionId?: string; stderr?: string; signal?: NodeJS.Signals | null; name?: string; }): DevinExecError; export declare function buildCloseErrorMessage(code: number | null, signal: NodeJS.Signals | null): string; export declare function spawnDevinAcp(args: string[], options: DevinCallOptions): DevinAcpProcess; //# sourceMappingURL=process.d.ts.map