@code-yeongyu/senpi
Version:
Coding agent CLI with read, bash, edit, write tools and session management
41 lines • 1.98 kB
TypeScript
import type { AdmissionIdentity, Answer, Produced } from "./compact-admission-types.ts";
import { type AdmissionRow as Row } from "./compact-admission-storage.ts";
export { CompactAdmissionError } from "./compact-admission-error.ts";
export { ADMISSION_LIMITS } from "./compact-admission-storage.ts";
/** Host-owned epoch index. Hash-file lookup is bounded by one <=131,584-byte row; hot results are never history. */
export declare class CompactAdmissions {
private readonly epochs;
private readonly limits;
/** Whether a finished admission still routes a stream of its socket epoch; such a row is never evicted. */
private readonly routed;
private readonly losses;
private retiredOverflow;
status(): {
abandoned: number;
releaseFailed: number;
retiredOverflow: number;
};
/** RULING-113 residual: an unmarked forgotten ID runs as a fresh open (RULING-125 marks retries), so the first loss is logged. */
private overflowRetired;
private end;
constructor(limits?: Readonly<{
entries: number;
bytes: number;
}>, routed?: (socketEpoch: string, admissionId: string) => boolean);
private key;
private epoch;
private serial;
run(identity: AdmissionIdentity, produce: (signal: AbortSignal) => Promise<Produced>): Promise<Answer>;
pending(socketEpoch: string, admissionId: string): Promise<boolean>;
cancel(socketEpoch: string, admissionId: string): Promise<"cancelled" | "already_complete" | "unknown">;
/** Resolve an accepted or cancelled late result through the same epoch index, with no second history. */
result(socketEpoch: string, admissionId: string): Promise<{
state: Row["state"];
answer: Answer;
} | undefined>;
forgetPeer(socketEpoch: string): Promise<void>;
endConnection(peer: string): void;
forgetConnection(peer: string): Promise<void>;
dispose(): Promise<void>;
}
//# sourceMappingURL=compact-admissions.d.ts.map