@code-yeongyu/senpi
Version:
Coding agent CLI with read, bash, edit, write tools and session management
19 lines • 1.32 kB
TypeScript
import type { FileIdentity } from "./session-transcript-journal.ts";
/** Capture the owning descriptor, never a later file at its pathname. The caller keeps it open until this settles. */
export declare function captureFileIdentity(fd: number, path: string): Promise<FileIdentity | undefined>;
/** Transfer a synchronous writer/reader's descriptor to the once-per-lifecycle asynchronous capture. */
export declare function captureAndCloseFileIdentity(fd: number, path: string): Promise<FileIdentity | undefined>;
/** A loader's entries and identity must come from the same descriptor, including discovery preloads. */
export declare const loadedFileIdentities: WeakMap<object, Promise<FileIdentity | undefined>>;
/**
* A base's content fingerprint (RULING-72): SHA-256 over the domain tag, NUL, then each counted entry line (UTF-8, as
* read; skipped blank and malformed lines excluded) and LF, fed one line at a time in the pass that reads the file.
*/
export declare class BaseContentHash {
private readonly hash;
line(text: string): void;
digest(): string;
}
/** The content fingerprint of the lines a capturing load read, or a rewrite wrote, keyed like `loadedFileIdentities`. */
export declare const loadedContentFingerprints: WeakMap<object, string>;
//# sourceMappingURL=session-file-identity.d.ts.map