• Open a typed, mount-anchored filesystem view (SDK_FS_SURFACE_SPEC §2.1). Pure-client: resolves the ambient ZenFS once (sandboxFs) and binds it to mount.path, so you read/write with paths RELATIVE to the mount root — you cannot accidentally name a path outside your grant (a ../absolute path throws invalid-path; the host chroot is the real enforcer).

    import { mountSpace } from '@immediately-run/sdk';
    import { openFs } from '@immediately-run/sdk/fs';
    const fs = openFs(await mountSpace({ spaceId }));
    const text = await fs.readFile('notes/idea.mdx', 'utf8');
    if (fs.canWrite('notes/idea.mdx')) await fs.writeFile('notes/idea.mdx', text);

    Throws FsError unavailable if the sandbox fs is not present (plain local vite dev / before boot — gate with fsAvailable; under vite dev the @immediately-run/dev-fs plugin >= 0.5.0 provides it, see sandboxFs). Per-op failures throw FsError with a mapped .code (not-found, read-only, …).

    Parameters

    Returns MountFs