@code-yeongyu/senpi
Version:
Coding agent CLI with read, bash, edit, write tools and session management
20 lines • 1.2 kB
TypeScript
/**
* What a file watch proves about its target before it exists: the parent directory is reachable and is
* the one the permission check approved, and the target (when present) is a regular file, not a
* symlink, whose identity holds across the checks. A missing target is allowed (a create watch).
* Identity is derived without open(2) on the parent, so neither side can block on a wedged mount.
*/
import type { Stats } from "node:fs";
import { type FileHandle } from "node:fs/promises";
import type { PendingFileRegistration, RegistrationGuard } from "./file-monitor-guard.ts";
import type { RegisterFileMonitorOptions } from "./file-monitor-record.ts";
export interface WatchTarget {
readonly path: string;
readonly parent: string;
readonly approvedParent: string;
readonly initial: Stats | null;
readonly initialHandle: FileHandle | undefined;
}
/** Throws the registration's error; the caller ends the pending registration. */
export declare function proveWatchTarget(guard: RegistrationGuard, pending: PendingFileRegistration, options: RegisterFileMonitorOptions, isDisposed: () => boolean): Promise<WatchTarget>;
//# sourceMappingURL=file-monitor-registration.d.ts.map