import { MountBackend } from '@struktoai/mirage-core/types'; import type { Workspace } from '@struktoai/mirage-core/workspace/workspace/workspace'; /** * FSKit mounts only under /Volumes. Anywhere else the mount fails with an * opaque driver error, so the rule is enforced up front rather than * discovered at run time (github.com/strukto-ai/mirage#82). */ export declare const FSKIT_MOUNT_ROOT = "/Volumes"; /** * Coerce a user-supplied backend name into a MountBackend. * * Missing means vfs, everywhere: an absent `backend` in YAML, `undefined` * here, and the `MountSpecOptions` default all resolve to the same thing. * Callers that need a kernel mount say so explicitly rather than relying on * this function to reinterpret an absent value. */ export declare function resolveBackend(value?: string | null): MountBackend; /** Reject a backend that registers nothing with the kernel. */ export declare function requireKernelBackend(backend: MountBackend): void; /** * Reject a backend the current platform cannot serve. * * FSKit works from TypeScript: `fuse.node` links `/usr/local/lib/ * libfuse.2.dylib` by absolute path (the `libosxfuse.2.dylib` it ships is a * stub with that install name), so on a machine with macFUSE 5.x the * `backend=fskit` option reaches the same libfuse Python uses. Verified * with a live mount; see examples/typescript/fuse/fskit.ts. */ export declare function checkPlatform(backend: MountBackend): void; /** Reject a mountpoint the backend cannot mount on. */ export declare function checkMountpoint(backend: MountBackend, mountpoint: string): void; /** * Mounts under `rootPrefix` whose files cannot be sized without reading * them. Mirrors Python's `Ops.unsized_mounts`. */ export declare function unsizedMounts(ws: Workspace, rootPrefix?: string): [string, string][]; /** * Warn when an fskit mount will serve size-unknown files as empty. * * FSKit drives reads from the size the filesystem reports and has no * `direct_io` escape hatch, so a resource that cannot size a file without * fetching it reports 0, the kernel issues no reads, and every such file * comes back empty with exit code 0 (verified on a live fskit mount: the * read clamp is pinned at lookup-time size and never refreshed). The mount * proceeds anyway: per-backend size push-down is closing this gap, so the * degraded mounts are named loudly here rather than refused. */ export declare function checkSizes(backend: MountBackend, ws: Workspace, rootPrefix?: string): void; /** * Mounts that accept writes, in mount resolution order. Mirrors Python's * `Ops.writable_mounts`. */ export declare function writableMounts(ws: Workspace, rootPrefix?: string): [string, string][]; /** * Warn when an fskit mount accepts writes the shim may corrupt. * * Measured on live fskit mounts and pinned in `integ/fuse/truth_fskit.json`: the * macFUSE FSKit shim flushes pages a file did not already have (a new file, * an empty file, a truncate-then-write) as NUL bytes of the right length, * and appended regions arrive intact or zeroed depending on cache state. * Metadata ops (create, mkdir, rename, unlink) are reliable. The writer sees * no error either way, so the corruption is silent; the mount proceeds with * a warning naming the writable mounts. */ export declare function checkWrites(backend: MountBackend, ws: Workspace, rootPrefix?: string): void; /** * Resolve a backend for a kernel mount and run every guard it implies. * * One entry point, so a new mount path cannot pick up fskit support while * silently skipping the macOS, /Volumes, or size checks. */ export declare function prepareBackend(value: string | undefined, ws?: Workspace, mountpoint?: string, rootPrefix?: string): MountBackend; //# sourceMappingURL=backend.d.ts.map