@code-yeongyu/senpi
Version:
Coding agent CLI with read, bash, edit, write tools and session management
20 lines • 960 B
TypeScript
/**
* A file watch's registration window: every step races the registration deadline, so a wedged mount
* fails the registration instead of freezing the loop, and a late result is cleaned up (a handle opened
* after the deadline is closed). Finishing a pending registration either hands its capacity slot to
* the new watch or releases it.
*/
export interface PendingFileRegistration {
release: (() => void) | undefined;
readonly abort: AbortController;
readonly deadline: ReturnType<typeof setTimeout>;
settled: boolean;
}
export declare class RegistrationGuard {
#private;
open(release: (() => void) | undefined, timeoutMs: number): PendingFileRegistration;
finishAll(): void;
finish(pending: PendingFileRegistration, transfer?: boolean): void;
await<T>(pending: PendingFileRegistration, operation: Promise<T>, lateCleanup?: (value: T) => Promise<void>): Promise<T>;
}
//# sourceMappingURL=file-monitor-guard.d.ts.map