UNPKG

@code-yeongyu/senpi

Version:

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

27 lines • 1.42 kB
import { type CompactContentStore, type LeafId } from "./compact-content-store.ts"; /** Persistent append tree: positive refs are leaves, negative refs are nodes, zero is empty. */ export declare class CompactTextRoots { private readonly nodes; private readonly pending; private readonly store; private next; constructor(store: CompactContentStore); get residentNodes(): number; /** One owned dependency root; callers retain their existing references. */ own(refs: readonly LeafId[]): LeafId; units(id: LeafId): number; isCommitted(id: LeafId): boolean; /** Transfers one live root and one newly owned bounded leaf into the new root. */ append(root: LeafId, text: string, structured?: boolean): LeafId; /** Iterative, so a value owner chain of any depth (S03b-4) is released on the same bounded stack. */ adjust(id: LeafId, live: number, pins: number): void; /** Bounded UTF-16 result and bounded leaf/tail count, checked before any I/O. */ read(root: LeafId, tail: string, offset: number, units: number, maxLeaves?: number, valid?: () => void): Promise<string>; private node; /** Compatibility assembly visits actual leaves, including short append-only delta leaves. */ chunks(root: LeafId, valid: () => void): AsyncGenerator<string>; private appendLeaf; private height; private join; } //# sourceMappingURL=compact-text-roots.d.ts.map