UNPKG

@code-yeongyu/senpi

Version:

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

26 lines • 1.65 kB
import type { SDKMessage } from "./sdk-boundary.ts"; import type { AnthropicSubscriptionSessionEntry, AnthropicSubscriptionSessionRegistry } from "./session-registry.ts"; import type { ActiveTurn } from "./session-turn-types.ts"; export declare function deliver(entry: AnthropicSubscriptionSessionEntry, turn: ActiveTurn, message: SDKMessage): void; /** * Claude Code echoes a submitted prompt before that turn's first API call, on the same ordered stream, * so events ahead of our replay belong to a turn it is already running (an autonomous turn or a * background subagent). Only main-thread events are held, as a bounded courtesy for an early event; a * segment that outgrows the caps is another turn's and is dropped until that turn ends (senpi#2192). */ export declare function bufferBeforeReplay(registry: AnthropicSubscriptionSessionRegistry, entry: AnthropicSubscriptionSessionEntry, turn: ActiveTurn, message: Extract<SDKMessage, { type: "stream_event"; }>): void; export declare function endForeignTurnBeforeReplay(turn: ActiveTurn): void; export declare function claimTurn(entry: AnthropicSubscriptionSessionEntry, turn: ActiveTurn): SDKMessage[]; export declare function isReplayFor(message: SDKMessage, uuid: string): boolean; export declare function isAutonomousResult(message: Extract<SDKMessage, { type: "result"; }>): boolean; export declare function isForeignResult(message: Extract<SDKMessage, { type: "result"; }>, turn: ActiveTurn): boolean; export declare function resultMatchesTurn(message: Extract<SDKMessage, { type: "result"; }>, turn: ActiveTurn): boolean; //# sourceMappingURL=session-turn-claim.d.ts.map