import type { BreakpointBackend, BreakpointBackendCapabilities, SubmitAnswerParams, SubmitBreakpointParams, WaitForAnswerOptions } from "../backend.js"; import type { Breakpoint, BreakpointPublicAnswer, ResponderProfile } from "../types.js"; export interface AgentMuxRunOptions { agent: string; prompt: string | string[]; model?: string; cwd?: string; timeout?: number; collectEvents?: boolean; tags?: string[]; approvalMode?: "yolo" | "prompt" | "deny"; nonInteractive?: boolean; } export interface AgentMuxRunError { readonly code: string; readonly message: string; readonly stderr: string; readonly recoverable: boolean; } export interface AgentMuxRunResult { readonly runId: string; readonly agent: string; readonly model: string | undefined; readonly sessionId: string | undefined; readonly text: string; readonly cost: unknown; readonly durationMs: number; readonly exitCode: number | null; readonly signal: string | null; readonly exitReason: "completed" | "aborted" | "interrupted" | "timeout" | "inactivity" | "turn_limit" | "crashed" | "killed"; readonly tokenUsage: unknown; readonly turnCount: number; readonly error: AgentMuxRunError | null; readonly events: Array>; readonly tags: string[]; } export interface AgentMuxRunHandleLike extends PromiseLike { readonly runId: string; readonly agent: string; readonly model: string | undefined; catch: Promise["catch"]; finally: Promise["finally"]; result(): Promise; abort(): Promise | void; } export interface AgentMuxClientLike { run(options: AgentMuxRunOptions): AgentMuxRunHandleLike; } export interface AgentMuxResponderBackendConfig { type?: "adapters"; agent?: string; adapter?: string; model?: string; cwd?: string; timeoutMs?: number; collectEvents?: boolean; tags?: string[]; approvalMode?: "yolo" | "prompt" | "deny"; nonInteractive?: boolean; client?: AgentMuxClientLike; clientFactory?: () => AgentMuxClientLike | Promise; } export declare class AgentMuxResponderBackendError extends Error { readonly code: string; readonly cause?: unknown; constructor(code: string, message: string, cause?: unknown); } export declare class AgentMuxResponderBackend implements BreakpointBackend { private readonly config; readonly name = "adapters"; private readonly breakpoints; private readonly client?; private readonly clientFactory?; constructor(config: AgentMuxResponderBackendConfig); capabilities(): BreakpointBackendCapabilities; submitBreakpoint(params: SubmitBreakpointParams): Promise; getBreakpoint(id: string): Promise; waitForAnswer(id: string, options?: WaitForAnswerOptions): Promise<{ answered: boolean; breakpoint: Breakpoint; answer?: BreakpointPublicAnswer; allAnswers: BreakpointPublicAnswer[]; resolution?: string; elapsedMs: number; }>; listPendingBreakpoints(responderId?: string): Promise; answerBreakpoint(id: string, answerParams: SubmitAnswerParams): Promise; cancelBreakpoint(id: string): Promise; listResponders(): Promise; private getClient; private awaitRunResult; private assertSuccessfulRun; private mapRunStartError; private createAnswer; private buildPrompt; private extractReferences; private createRunMetadata; } //# sourceMappingURL=adapters.d.ts.map