UNPKG

@code-yeongyu/senpi

Version:

Coding agent CLI with read, bash, edit, write tools and session management

33 lines • 1.97 kB
export type MountEntry = { readonly dev: string; readonly on: string; readonly type: string; }; export type MountSnapshot = { readonly mounts: MountEntry[]; /** A rejected line or a missing root entry: the snapshot confirms nothing. */ readonly degraded: boolean; readonly rejected: string[]; /** Mount points listed more than once where the table's order does not say which mount is visible. */ readonly ambiguous: string[]; }; /** * darwin `mount` line `<dev> on <mountpoint> (<type>[, opts...])`, parsed from the RIGHT: the type * parenthetical is the last `(...)` at end of line and cannot contain parentheses; the mount point is * everything between the FIRST ` on ` and it (device names never contain ` on `; mount points may). */ export declare function parseDarwinMountLine(line: string): MountEntry | undefined; /** linux `/proc/self/mounts` line `<dev> <mountpoint> <type> <opts> <dump> <pass>`, octal-escaped. */ export declare function parseLinuxMountLine(line: string): MountEntry | undefined; /** * Every line parsed and validated, or the snapshot is DEGRADED and confirms nothing: a rejected line or * a missing root entry degrades it. A mount point listed more than once keeps its LAST line: on linux * `/proc/self/mounts` lists mounts in attach order, so that line is the mount visible at the point * (stacked mounts are ordinary on systemd hosts). darwin `mount` carries no such ordering contract, so a * repeated point is recorded as ambiguous there and the detector confirms nothing beneath it. * On linux a mount whose point lies under a mount attached LATER is hidden by it (the table keeps listing * it), so it is dropped: paths beneath it are judged by the mount actually visible there. */ export declare function parseMountTable(text: string, platform?: string): MountSnapshot; export declare function readMountTable(platform?: string): MountSnapshot; //# sourceMappingURL=mount-table.d.ts.map