@code-yeongyu/senpi
Version:
Coding agent CLI with read, bash, edit, write tools and session management
28 lines • 1.33 kB
TypeScript
/**
* What a page cursor binds (RULING-62 Q2 A + (1)): the asking peer incarnation and routing session, the token, its
* generation and the component. None of it travels in the cursor; the cursor's authenticator is computed over it, so
* a cursor presented under any other binding is simply unknown.
*/
export interface CursorBinding {
readonly socketEpoch: string;
readonly sessionId: string;
readonly tokenId: string;
readonly generation: number;
readonly componentRef: string;
}
/** Where a cursor continues: the ordinal of the page it was minted with and the next raw byte offset. */
export interface CursorPosition {
readonly ordinal: number;
readonly offset: number;
}
/**
* Opaque bounded page cursors (RULING-62 Q2 A): `<version>:<ordinal>:<offset>:<mac>`, an allow-listed ASCII id of at
* most 128 bytes whose authenticator covers the binding and the position. `open` checks length and grammar before any
* MAC work and compares authenticators in constant time; it answers the position or undefined, never why.
*/
export declare class RecoveryCursors {
private readonly authenticate;
mint(binding: CursorBinding, position: CursorPosition): string;
open(cursor: string, binding: CursorBinding): CursorPosition | undefined;
}
//# sourceMappingURL=compact-recovery-cursor.d.ts.map