import type { AdapterBillingType, AdapterEnvironmentCheck, AdapterEnvironmentTestContext, AdapterEnvironmentTestResult, AdapterExecutionContext, AdapterExecutionResult } from "@penclipai/adapter-utils"; import type { AdapterExecutionTarget } from "@penclipai/adapter-utils/execution-target"; import type { AcpxEngineExecutorOptions, AcpxTerminalSessionFailure, AcpxTerminalFailureClassification } from "@penclipai/adapter-utils/acpx-engine/execute"; export type ClaudeExecutionEngine = "cli" | "acp"; export interface ClaudeEngineSelection { engine: ClaudeExecutionEngine; explicit: boolean; unavailableReason?: string; } type ClaudeEngineResolutionInput = Pick & Partial>; type ClaudeAcpExecutorOptions = Omit; type ClaudeAcpExecutor = (ctx: AdapterExecutionContext) => Promise; export declare function resolveClaudeExecutionEngine(config: Record): ClaudeEngineSelection; export declare function resolveClaudeExecutionEngineForRun(input: ClaudeEngineResolutionInput): Promise; export declare function buildClaudeAcpConfig(config: Record, inheritedEnv?: Record): Record; /** * Classify billing the same way the Claude CLI lane does so ACP runs land in * the cost ledger with a real provider/billingType instead of acpx/unknown. * Host env only counts for local execution targets; remote targets see just * the adapter-config env. */ export declare function resolveClaudeAcpBillingIdentity(ctx: Pick & Partial>): { provider: string; biller: string; billingType: AdapterBillingType; }; export declare function classifyClaudeTerminalSessionFailure(failure: AcpxTerminalSessionFailure, now: Date): AcpxTerminalFailureClassification | null; /** * Translate the generic acpx auth-required code into the Claude-specific code at * the claude-local boundary. The shared acpx engine reports the generic * `acpx_auth_required` code for every adapter. The user interface run gate reads * the Claude-specific `claude_auth_required` code, the same code the Claude CLI * lane emits. Without this translation the default ACP run never shows the login * prompt. Provider diagnostics stay intact; the generic terminal-access * fallback instead explains that Claude needs sign-in. */ export declare function mapClaudeAcpAuthErrorCode(result: AdapterExecutionResult): AdapterExecutionResult; export declare function createClaudeAcpExecutor(options?: ClaudeAcpExecutorOptions): ClaudeAcpExecutor; export declare function nodeVersionMeetsClaudeAcpMinimum(version?: string): boolean; /** * Probe the stored Claude login for the probed target on the ACP path. The ACP * engine and the Claude CLI share the same stored Claude login, so the probe * runs the `claude` command with a short hello turn. The probe runs against any * target: a local host, an SSH remote, or a sandbox. On a local target the * probe builds the child env and the executable from the shared * deny-by-default builder, so a hostile caller value can neither select the * executable nor reach the child. On a remote target the caller passes the * prepared `env`, so the probe reads the managed `CLAUDE_CONFIG_DIR` the same * way the CLI lane does. * * When the probe reports that login is required, the function returns the * auth-required checks. Only a sandbox target also gets the canonical * `adapter_auth_missing` code, so the user interface offers login for sandbox * targets only. * * The function keeps two signals distinct. It returns the auth-required check * only when the probe ran and login is required. It returns a separate warn * check when the probe could not run, timed out, or did not complete. It never * maps "probe could not run" to a silent pass. */ export declare function probeClaudeAcpSandboxLogin(input: { config: Record; target: AdapterExecutionTarget | null; env?: Record; }): Promise; export declare function testClaudeAcpEnvironment(ctx: AdapterEnvironmentTestContext): Promise; export {}; //# sourceMappingURL=acp.d.ts.map