@code-yeongyu/senpi
Version:
Coding agent CLI with read, bash, edit, write tools and session management
23 lines • 1.36 kB
TypeScript
import { type LockProbes } from "./extensions/builtin/terminal/lease-file.ts";
import type { SessionHolder } from "./session-hold-errors.ts";
/** The host generation a holder record names, as written by `holdSessionFile`. */
export interface HolderGeneration {
readonly host_instance?: string;
readonly host_daemon_dir?: string;
}
export interface SessionHolderProbes extends LockProbes {
/**
* Positive evidence that the holder's host generation has ended. Asked only about a holder whose pid
* is alive but whose start time cannot be compared, so a reused pid is not mistaken for it forever.
*/
readonly holderEnded?: (generation: HolderGeneration) => Promise<boolean>;
/** Report a held record whose owner start time cannot be read with `unproven: true` (an interactive take-over refuses those). */
readonly markUnproven?: boolean;
}
/**
* `fenceSession` advances the session file's write fence (senpi#3652). A holder released on `holderEnded` may only be
* frozen, so it is released only after the fence moved: if it resumes, its writes are refused. Without a fence, or when
* it cannot be written, the holder stands.
*/
export declare function liveHolders(dir: string, probes?: SessionHolderProbes, fenceSession?: () => Promise<void>): Promise<SessionHolder[]>;
//# sourceMappingURL=session-holder-records.d.ts.map