@code-yeongyu/senpi
Version:
Coding agent CLI with read, bash, edit, write tools and session management
35 lines • 1.48 kB
TypeScript
/** The base row table's budget: RULING-61's 8 MiB transcript ancestry budget (419,430 dense rows). */
export declare const BASE_ROW_TABLE_BYTES: number;
/** A line's byte span in the session file. */
export interface LineSpan {
readonly start: number;
readonly end: number;
}
/**
* One in-order pass over rows from an anchor: `record` fills the table at the open, `verify` checks a page's rows
* against it. `add` folds the next row in and reports whether it closed its group (checked whole in `verify`).
*/
export interface RowWalk {
readonly row: number;
readonly at: number;
readonly fileStart: number;
add(line: LineSpan, row: Buffer): boolean;
}
export declare class BaseRowTable {
readonly rowsPerAnchor: number;
readonly count: number;
private readonly anchors;
private readonly starts;
private readonly fileStarts;
private readonly hashes;
/** Where the last counted line ends: a file shorter than this is truncated under the cut. */
fileEnd: number;
constructor(count: number, budget?: number);
/** The table's charge against its budget: `20 x anchors + 8`. */
get tableBytes(): number;
/** The stamped stream's length, known once the open recorded every row. */
get length(): number;
/** A pass from the anchor at or before `offset` (the open records from 0). */
walk(offset: number, mode: "record" | "verify"): RowWalk;
}
//# sourceMappingURL=compact-recovery-base-index.d.ts.map