Interface SandboxMount

A filesystem mount available to the sandbox, mirrored from the host window.

Mounts appear on demand — call openSettings for this app's own settings, or mountSpace / requestMount to mount a Firestore-backed "space". Read or subscribe to the set, then access the files through the fs module at the mount's path.

interface SandboxMount {
    id?: string;
    mode?: "ro" | "rw";
    name?: string;
    path: string;
    rules?: MountRule[];
    type: string;
}

Hierarchy (View Summary)

Properties

id?: string

Optional stable identifier (the spaceId, for spaces).

mode?: "ro" | "rw"

Access mode of the granted view: 'rw' (read-write) or 'ro' (read-only). A live role downgrade re-announces the same mount with mode: 'ro'; apps observing onMountsChange see the change and writes start failing EROFS. Absent on the primary repo mount (treated as read-write).

name?: string

Human-readable label for the mount — the space's display name, or the repo label for the primary working-tree mount (R3-69). Use this to show users and agents what a mount is: the path (/mnt/{hash}) and id (the spaceId) are opaque, and space names are not unique, so neither alone tells you which filesystem you're looking at. Absent when the host can't resolve a name (older host, or a name it never learned) — fall back to id/path.

path: string

Absolute path where the mount is reachable (e.g. /spaces/{id}).

rules?: MountRule[]

The granted scopes of this mount (plan 12 §8.7 / §F): each {subtree, mode} is a path prefix you hold and at what access, at the mount's backend-natural paths. Use it to reason about per-path writability — which subtree is rw — WITHOUT probing EROFS. A single whole-mount grant is [{ subtree: '/', mode }]. Absent on the primary repo mount and on an older host that doesn't report it.

type: string

Backend kind, e.g. 'firestore'.