UNPKG

@code-yeongyu/senpi

Version:

Coding agent CLI with read, bash, edit, write tools and session management

40 lines • 1.91 kB
import type { AnthropicSubscriptionAuthLane } from "./options.ts"; import type { Options } from "./sdk-boundary.ts"; import { type ContinuityBinding } from "./session-reattach.ts"; import type { AnthropicSubscriptionSessionEntry } from "./session-registry.ts"; type CheckpointLookup = { binding: ContinuityBinding; currentHashes: readonly string[]; cwd: string | undefined; authLane: AnthropicSubscriptionAuthLane; }; /** * The newest mapped boundary strictly before `binding.sentCount` that lies inside the * hash-proven prefix AND exists in the SDK transcript of the same session as a top-level * assistant. Never guesses the transcript's latest assistant: only boundaries this * lineage mapped are candidates. The config-dir lane (per-account transcript roots) and * an unreadable or foreign transcript fail closed (senpi#1973); the claude-cli lane reads * the shared root its account dirs link to (senpi#4436). */ export declare function earlierVerifiedCheckpoint(input: CheckpointLookup): Promise<ContinuityBinding | undefined>; export type RecoveringReattachInput = { binding: ContinuityBinding; atUuid?: string; options: Options; signal?: AbortSignal; currentHashes: readonly string[]; authLane: AnthropicSubscriptionAuthLane; }; /** * Reattaches at the decided boundary. When Claude Code rejects the fork point as absent * from its transcript, forks at the next earlier verified boundary instead of re-sending * the whole conversation; every retry strictly lowers the boundary index. Any other * failure, an abort, no verified candidate, or the attempt cap rethrows so the caller * still reports the fallback. */ export declare function reattachRecoveringCheckpoint(input: RecoveringReattachInput): Promise<{ entry: AnthropicSubscriptionSessionEntry; from: number; }>; export {}; //# sourceMappingURL=session-checkpoint-recovery.d.ts.map