UNPKG

@code-yeongyu/senpi

Version:

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

30 lines • 1.98 kB
import type { SDKMessage, SDKUserMessage } from "./sdk-boundary.ts"; import { type ContinuityBinding } from "./session-reattach.ts"; import { type AnthropicSubscriptionSessionEntry } from "./session-registry.ts"; type StagedContinuityDecision = { emit(): void; }; /** * Runs `admit` once the session's previous turn and pending model switch have settled. `admit` awaits, and a switch * issued meanwhile would otherwise run while this turn does (senpi#6412 review), so admission repeats until no switch * other than the one already awaited is pending; a switch issued after admission applies to the next turn. Each wait * keeps its own admission bound and the abort signal. */ export declare function admitSettledTurn<T>(sessionId: string, signal: AbortSignal | undefined, admit: () => Promise<T>): Promise<T>; /** Claude Code's wording for a fork point absent from its transcript; the captured id is the dead one. */ export declare const RESUME_MESSAGE_MISSING: RegExp; export declare function createSessionTurnAttempt(entry: AnthropicSubscriptionSessionEntry, message: SDKUserMessage["message"], hashes: readonly string[], signal: AbortSignal | undefined, staged: StagedContinuityDecision, /** * The binding this process held for the session before this attempt (`getBinding`). It is the last * binding recorded, which usually names the account that last answered, but not always: a retry * checkpoint from an unanswered attempt, the entry kept when a session closes, a resumed lineage and * a binding restored from the session file on restart are recorded the same way, so it can name an * account whose latest attempt went unanswered. Undefined when nothing has been recorded since the * session started, forked or lost its binding (for example on compaction or divergence). */ servedLineage?: ContinuityBinding): { messages: AsyncGenerator<SDKMessage, any, any>; discard: () => void; }; export {}; //# sourceMappingURL=session-turn-attempt.d.ts.map