@code-yeongyu/senpi
Version:
Coding agent CLI with read, bash, edit, write tools and session management
47 lines • 1.99 kB
TypeScript
/**
* A legacy view frozen at one cut and read one frame at a time by a peer's baseline barrier (R3.C6.4). The
* reader retains no array of generated frames; `release` ends the read on every path and is idempotent.
*/
export interface LegacyViewCursor {
/** True when the frozen view has no frame at all: an attach installs no barrier and releases it at once. */
readonly empty: boolean;
next(): Promise<string | undefined>;
release(): void;
}
/** The frames of one view: how many, and each one derived on demand from the frozen source. */
export type FrozenFrames = {
readonly count: number;
readonly frame: (index: number) => string;
};
/**
* A cursor over frames the owner releases once. `source` runs on the first read (`next` or `empty`): an owner that
* fixes the view at the freeze passes the frames it already built, one that fixes it at the read passes a thunk.
*/
export declare class FrozenFramesCursor implements LegacyViewCursor {
private index;
private released;
private frames;
private readonly source;
private readonly onRelease;
constructor(source: () => FrozenFrames, onRelease: () => void);
get empty(): boolean;
next(): Promise<string | undefined>;
release(): void;
private read;
}
/**
* A cursor whose frames are produced one at a time by an async generator over a frozen source (the compact
* current-state view). `empty` is decided synchronously by the owner from the frozen roots, so an attach with
* nothing to deliver installs no barrier; the generator starts on the first read.
*/
export declare class GeneratedFramesCursor implements LegacyViewCursor {
readonly empty: boolean;
private frames;
private released;
private readonly source;
private readonly onRelease;
constructor(empty: boolean, source: () => AsyncGenerator<string>, onRelease: () => void);
next(): Promise<string | undefined>;
release(): void;
}
//# sourceMappingURL=legacy-view-cursor.d.ts.map