@code-yeongyu/senpi
Version:
Coding agent CLI with read, bash, edit, write tools and session management
37 lines • 1.68 kB
TypeScript
import type { LaunchApi, LaunchContainment, LaunchLifetime, LaunchOrigin } from "./protocol.ts";
/** Where a generation's ledger lives under a session's tool-child directory; the server writes it, the child reads it. */
export declare function generationLedgerPath(dir: string, generation: number): string;
export interface DescendantEntry {
readonly launchId: string;
readonly generation: number;
readonly origin: LaunchOrigin;
readonly api: LaunchApi;
readonly containment: LaunchContainment;
readonly lifetime: LaunchLifetime;
readonly pid?: number;
readonly pgid?: number;
readonly leaderStart?: string;
readonly atMs: number;
}
export declare class DescendantsLedger {
#private;
constructor(path: string);
get path(): string;
entries(): DescendantEntry[];
append(entry: DescendantEntry): Promise<void>;
/** Entries a previous server instance left behind (crash recovery). A torn final line is ignored. */
static readPersisted(path: string): Promise<DescendantEntry[]>;
remove(): Promise<void>;
}
/** Append-only record of every barrier frame, for diagnostics and the QA driver. Not fsynced. */
export declare class LaunchLog {
#private;
constructor(path: string);
get path(): string;
/** Records the log could not write; the log is diagnostic, so a failed write is counted, never thrown. */
get failedWrites(): number;
settled(): Promise<void>;
/** Appends in order. Never rejects: one failed write neither poisons later records nor what awaits settled(). */
record(record: Readonly<Record<string, unknown>>): Promise<void>;
}
//# sourceMappingURL=descendants.d.ts.map