import { type ActorCompletionReason, type ActorPersonaRef, type ActorStatus, type ActorTrace } from "./actor-contract.js"; export type ClaudeResultSubtype = "success" | "error_during_execution" | "error_max_turns" | "error_max_budget_usd" | "error_max_structured_output_retries"; export type ClaudeContentBlock = { type: "text"; text: string; } | { type: "thinking"; thinking: string; } | { type: "tool_use"; id: string; name: string; } | { type: "tool_result"; tool_use_id: string; is_error?: boolean; }; export type ClaudeMessage = { type: "system"; subtype: string; session_id?: string; model?: string; } | { type: "assistant"; message: { content: ClaudeContentBlock[]; }; } | { type: "user"; message: { content: ClaudeContentBlock[] | string; }; } | { type: "result"; subtype: ClaudeResultSubtype; is_error?: boolean; duration_ms?: number; num_turns?: number; session_id?: string; total_cost_usd?: number; usage?: { input_tokens?: number; output_tokens?: number; }; result?: string; }; export interface ClaudeSessionResult { messages: ClaudeMessage[]; startedAt: string; completedAt: string; providerVersion?: string; } export declare function claudeResultSubtypeToStatus(subtype: ClaudeResultSubtype): ActorStatus; export declare function claudeStatusToCompletionReason(status: ActorStatus): ActorCompletionReason; /** * Map a Claude Agent SDK session into the provider-neutral ActorTrace. Pure and * side-effect-free; mirrors codexResultToActorTrace / piSessionToActorTrace. The * persona reference is supplied by the harness. */ export declare function claudeSessionToActorTrace(session: ClaudeSessionResult, persona: ActorPersonaRef): ActorTrace; export type ClaudeQueryFn = (args: { prompt: string; options: Record; }) => AsyncIterable; export interface ClaudeAgentSessionOptions { cwd: string; runRoot: string; prompt: string; persona: ActorPersonaRef; timeoutMs: number; model?: string; maxTurns?: number; systemPrompt?: string; queryFn?: ClaudeQueryFn; loadQueryFn?: () => Promise; } export interface ClaudeAgentSessionResult { status: ActorStatus; reason: string; durationMs: number; trace: ActorTrace; session: ClaudeSessionResult; transcriptPath: string; tracePath: string; eventsPath: string; tail: string; } /** * Drive a Claude Agent SDK session (or an injected fake) and write the three * provider-neutral evidence artifacts, mirroring runCodexAppServerSession. The * mapping is delegated to the pure claudeSessionToActorTrace. A load failure or * timeout still produces a (failed/timed_out) bundle rather than throwing. */ export declare function runClaudeAgentSession(options: ClaudeAgentSessionOptions): Promise;