UNPKG

@code-yeongyu/senpi

Version:

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

47 lines • 3.56 kB
import type { EventLeases } from "./compact-event-leases.ts"; import { CompactRequiredStreams } from "./compact-required-streams.ts"; import type { LegacyViewCursor } from "./legacy-view-cursor.ts"; import type { RecoveryPageRequests } from "./compact-recovery-requests.ts"; import type { RecoveryCheckpoints } from "./compact-recovery-state.ts"; import { SessionEventWriterLifecycle } from "./session-event-writer-lifecycle.ts"; /** The writer's recovery accessors (senpi#4272): legacy views, checkpoint tokens, page requests, peer epochs. */ export declare abstract class SessionEventWriterRecovery extends SessionEventWriterLifecycle { protected readonly required: CompactRequiredStreams; protected prepareDelivery(sessionId: string, record?: object): void; holdsAdmission(peer: string, admissionId: string, sessionId?: string): boolean; unregisterAdmission(peer: string, admissionId: string): void; ordinaryRoute(peer: string, sessionId: string): import("./compact-recovery-types.ts").RecoveryStreamState | undefined; registerSubscription(peer: string, admissionId: string, subscriptionId: string): void; private retireMirror; unregisterSubscription(peer: string, subscriptionId: string): void; isCompactSubscription(peer: string, admissionId: string, subscriptionId: string): boolean; registerAdmission(peer: string, admissionId: string, sessionId: string): void; installAdmissionBaseline(peer: string, cursor: LegacyViewCursor, live: () => boolean): void; /** Internal S14 source identity; callers must establish the requesting token's scoped claim first. */ recoveryLane(sessionId: string): import("./session-acceptance-lane.ts").SessionAcceptanceLane | undefined; /** Whether an admission still routes a stream of this peer incarnation: what `reset_stream` resolves (#5274). */ routesAdmission(socketEpoch: string, admissionId: string): boolean; /** * RULING-117: a completed open becomes this socket's one route to its session. Answers how to end the open it * replaces, only while that open still routes the session's stream; a retry of the same id replaces nothing. */ supersedeOpen(peer: string, sessionId: string, admissionId: string, end: () => Promise<void>): (() => Promise<void>) | undefined; /** * RULING-118: the socket stops holding the session (a detach), so its open's route retires and stops counting toward * the admission cap. A detach made by a request naming that admission (`close_session`) retires it only after the * request's reply is routed, so the reply and the records sealed before it keep the admission's tag. */ detachConnectionFromSession(id: string, sessionId: string): void; private routesStream; /** Legacy views frozen for a peer's baseline and not yet released (R3.C6.4 accounting). */ get openLegacyViews(): number; /** The checkpoint tokens frozen for peers' baselines and recoveries (S08a, R3.C1.5). */ get recoveryCheckpoints(): RecoveryCheckpoints; /** The page requests over those tokens (S11b, R4.B3); undefined with the compact-updates flag off. */ get recoveryPages(): RecoveryPageRequests | undefined; /** The ordinary-event leases (S13, R4.B6); undefined with the compact-updates flag off. */ get recoveryEvents(): EventLeases | undefined; /** The peer incarnation a registered connection is: what its tokens and cursors are bound to. */ socketEpochOf(id: string): string | undefined; } //# sourceMappingURL=session-event-writer-recovery.d.ts.map