/** * Pre-first-turn resume probe for the Claude Agent SDK driver. * * A tier-1 native resume only hands its session id to the SDK inside the first * real turn, so the `jsonl_lost` outcome ("No conversation found") is invisible * until a turn is consumed. The runner shares the container filesystem with the * SDK, so a cheap `stat` of the on-disk JSONL transcript is an authoritative, * side-effect-free signal of whether the resume will find its history — no * probe query, no spurious model turn. * * @module */ /** * Outcome of {@link probeResumeTranscript}: whether the SDK transcript for a * requested tier-1 resume exists on disk. * * @category Resume probe */ export type ResumeProbeOutcome = "transcript_found" | "jsonl_lost"; /** * Resolve the Claude Code config directory — the parent of `projects/` — from * an explicit env map, the process environment, or the `~/.claude` default. * * The runner's probe and the claude-sdk driver share this one resolver, so they * agree as long as they see the same `CLAUDE_CONFIG_DIR`. Today they do: * `CLAUDE_CONFIG_DIR` is container-scoped and neither side threads a per-session * override through `config.env`, so both fall through to `process.env`. If a * future change ever set the driver's `config.env.CLAUDE_CONFIG_DIR` to a * divergent path, the reactive `resume_failed { jsonl_lost }` turn remains the * safety net. * * @category Resume probe */ export declare function resolveClaudeConfigDir(env?: Record): string; /** * Probe whether the SDK JSONL transcript for `sessionId` exists on disk. * * Non-null locator result → `transcript_found`; null → `jsonl_lost`; * `undefined` → outcome unknown (the probe exceeded its budget or errored). The * caller leaves the ack field ABSENT on `undefined` so the reactive * `resume_failed { jsonl_lost }` turn stays the safety net — a timed-out probe * must never masquerade as a genuine `jsonl_lost` and force a needless downgrade. * * `opts.timeoutMs` overrides {@link RESUME_PROBE_TIMEOUT_MS}; `opts.locate` * overrides the transcript locator (used by tests / alternate stores). * * @category Resume probe */ export declare function probeResumeTranscript(sessionId: string, opts?: { env?: Record; timeoutMs?: number; locate?: (configDir: string, sessionId: string) => Promise; }): Promise; //# sourceMappingURL=resume-probe.d.ts.map