UNPKG

@struktoai/mirage-core

Version:

A Unified Virtual Filesystem For AI Agents

22 lines • 920 B
import { ByteSpool } from './spool.ts'; import type { ByteSource } from './types.ts'; /** Replay variable-length records without retaining their byte offsets in RAM. */ export declare class RecordSpool { readonly data: ByteSpool; readonly index: ByteSpool; count: number; constructor(memoryLimit?: number); append(record: Uint8Array): Promise<void>; private addEntry; indexDelimited(separator: number): Promise<void>; window(index: number): Promise<[number, number]>; read(index: number): Promise<Uint8Array>; stream(index: number): AsyncGenerator<Uint8Array>; close(): Promise<void>; } /** * The records `separator` ends across `sources` read back to back, byte for * byte; the last one may lack it. Mirrors Python's delimited. */ export declare function delimited(sources: ByteSource[], separator: number): Promise<RecordSpool>; //# sourceMappingURL=record_spool.d.ts.map