import { JsonLineRpcClient } from "../jsonline-rpc.js"; import type { AdapterHealth, CancelResult, CapabilityReport, CliAdapter, LaunchProfile, NativeEvent, NativeSession, PromptInput } from "../types.js"; import { type AcpAgentCapabilities, type AcpImplementationInfo, type AcpSessionUpdate } from "./protocol.js"; export interface AcpV1AdapterOptions { handshakeTimeoutMs?: number; closeGraceMs?: number; killGraceMs?: number; now?: () => Date; idFactory?: (kind: "instance" | "binding") => string; } type AcpAdapterId = string; /** * ACP v1 client kernel shared by the Grok and Kimi adapters. * * GroupX v0.1 requires the native CLI to run unrestricted. This kernel never * exposes or resolves an approval flow: an unexpected native interaction is * cancelled at the wire boundary and fails the current turn. */ export declare abstract class AcpV1Adapter implements CliAdapter { #private; readonly adapterId: AcpAdapterId; readonly actorId: string; protected constructor(adapterId: AcpAdapterId, actorId: string, argvTail: readonly string[], options?: AcpV1AdapterOptions); /** Adapter-specific session configuration that must succeed before start/resume returns. */ protected configureSession(_client: JsonLineRpcClient, _nativeSessionId: string, _timeoutMs: number): Promise; /** Adapter-specific read-only checks that must pass before spawning. */ protected preflightLaunch(_input: LaunchProfile): Promise; /** * Adapter-specific effective capabilities used for the current session. * The raw initialize response remains the capability-reporting source. */ protected effectiveCapabilities(capabilities: AcpAgentCapabilities, _agentInfo: AcpImplementationInfo | undefined): AcpAgentCapabilities; /** Narrow classifier for explicit native/managed policy blocks. */ protected isNativePolicyBlock(error: unknown): boolean; probe(): Promise; start(input: LaunchProfile): Promise; resume(input: LaunchProfile & { nativeSessionId: string; }): Promise; prompt(session: NativeSession, input: PromptInput): AsyncIterable; cancel(session: NativeSession, nativeTurnId: string): Promise; /** Returns and clears protocol replay notifications observed during the last session/load. */ takeLoadReplay(session: NativeSession): AcpSessionUpdate[]; close(session: NativeSession): Promise; health(): AdapterHealth; } export {}; //# sourceMappingURL=acp-v1-adapter.d.ts.map