import type { ExternalAgentExecution, ExternalAgentKind } from '../../../agent-config/schema.js'; import type { ExternalAgentDriver, ExternalRuntimeCapabilities } from '../types.js'; import { type AcpRecord } from './json-rpc-client.js'; export interface AcpSpawnConfig { command: string; args: ReadonlyArray; env?: NodeJS.ProcessEnv; } export interface AcpDriverConfig { kind: ExternalAgentKind; label: string; transcriptProvider: string; defaultModelName: string; capabilities?: Partial; resolveSpawn: (cwd: string, execution?: ExternalAgentExecution) => AcpSpawnConfig; /** Resolve an installed executable path for probe checks; returns undefined if not installed. */ findExecutable?: (execution?: ExternalAgentExecution) => string | undefined; notFoundMessage: string; signInRequiredMessage: string; installHintCommand?: string; loginHintCommand?: string; /** Optional auth method id passed to `authenticate` (either eagerly or on -32000). */ authMethodId?: (execution?: ExternalAgentExecution) => string | undefined; /** Whether to call `authenticate` before `session/new` when authMethodId is available. */ authenticateEagerly?: boolean; /** Optional `_meta` payload attached to `session/new` / `session/resume` / `session/load`. */ buildSessionMeta?: (initializeResult: AcpRecord, instructions?: string) => AcpRecord | undefined; /** Optional stdout non-JSON line interceptor (e.g. Antigravity auth link). */ onNonJsonLine?: (line: string) => Error | undefined; /** Optional stderr line interceptor. */ onStderrLine?: (line: string) => Error | undefined; /** Optional error classifier for sign-in required failures. */ isSignInRequiredError?: (error: unknown) => boolean; /** Optional filter for internal tool calls that should not appear in transcript/UI. */ ignoreToolCall?: (update: AcpRecord) => boolean; } export declare function createAcpExternalDriver(config: AcpDriverConfig): ExternalAgentDriver;