Skip to content

BackgroundContext: the design notes Ganymede was built from, and the Jupyter ecosystem it fits into.

Multi-root named mounts ​

Status: implemented (#1010, #1011, #1012, #1013). Design note for #1008 (building on #845), unblocking ganymede-ui#465. See the roadmap and known gaps for current status.

A single Ganymede server can serve several filesystem folders as named mounts under one virtual root instead of running one embedded server per folder. This keeps one server process, one set of document rooms and file IDs, one kernel and session registry, and one MCP endpoint while allowing hosts like the iPhone, iPad, and Mac apps to attach and detach folders at runtime.

Decision and goals ​

In ganymede-ui#465, the iPhone and iPad sidebar needs to show the app's own container folder (On My iPhone › Ganymede) alongside user-picked folders, and the same capability is useful on Mac and for CLI workflows. Running named mounts inside ganymede core (Option 1) avoids multi-server coordination and URL shuffling on the frontend.

The design optimizes for four invariants:

  • Single-root backwards compatibility — a server started with one root directory (root_dir / --root-dir / default $HOME) keeps the exact flat namespace it has today with no extra path segment.
  • Mount-level containment — each mount behaves as its own sandboxed filesystem boundary; symlinks, .ganymede.toml walks, path normalization, and file-ID grants never leak across mounts or into unmounted host paths.
  • Live isolation across mounts — attaching or detaching one mount does not restart the server or close open rooms, watchers, or running kernels in other mounts.
  • Distinct from connected machines — filesystem mounts live inside /api/contents/<name>/... and manage local or security-scoped folders, whereas connected machines (/machines/{id}/... in Connected machines) proxy remote Ganymede servers.

Virtual root and path model ​

Two root modes: single-root vs multi-root ​

A server's root mode is fixed at startup so open URLs, document rooms, and stamps never shift paths mid-session:

  • Single-root mode (default) — when started with root_dir (or the default home directory) and no mounts configuration, FsContents serves that directory directly at "". Existing REST, CLI, FFI, and MCP behavior is unchanged, and runtime mount add/remove returns an error.
  • Multi-root mode — enabled when mounts is configured ([[mounts]] in config, "mounts" in FFI JSON even if [], --mount, or --multi-root). An embedded host such as the Apple app always starts in multi-root mode so folders can be attached and detached dynamically.

Layout under / and /api/contents ​

In multi-root mode, / (API path "") is a virtual read-only directory whose entries are the active mounts:

  • GET /api/contents ("") — returns a synthetic directory model with type: "directory", path: "", name: "", writable: false, format: "json", mimetype: null, size: null, deterministic created/last_modified timestamps (server start or latest mount timestamp), and content listing each mount sorted by name as a directory model (path: "<mount>", name: "<mount>", writable matching the mount's write mode). Passing ?content=0 returns metadata without the child array.
  • Mutations at "" and mount roots — creating files, notebooks, or directories at "" (POST /api/contents), overwriting "" (PUT), or renaming/deleting/replacing a mount directory itself (PATCH or DELETE /api/contents/<mount>) fails with 403 Forbidden. Mounts are added and removed only through the lifecycle API.
  • Inside a mount (<mount>/<rel>) — requests strip <mount>/ and delegate to that mount's FsContents instance, then re-prefix every returned path (including directory child entries and the Location header) with <mount>/ (or <mount> when <rel> is empty).
  • Same-mount rename vs cross-mount copy/rename — PATCH within one mount delegates cleanly, holding that mount's move lock and preserving FileIds and rooms. Cross-mount POST /api/contents/<dst>/<dir> with {"copy_from": "<src>/<rel>"} is supported when <dst> is writable, reading from <src> and creating an ungranted copy in <dst>. Cross-mount PATCH (renaming across distinct <src> and <dst>) fails with 400 BadRequest, because mounts have separate security scopes, FileIds roots, and grants; clients that offer cross-mount move compose copy plus delete explicitly.
  • Internal server writes, checkpoints, and redactions — POST /api/notebooks/run (run::copy_path) with "save": "copy" currently writes to runs/... (RUNS_DIR), which would fail at read-only ""; in multi-root mode it writes inside the notebook's own mount (<mount>/runs/<rel_stem>/<ts>.ipynb), failing with 403 / BadRequest if <mount> is read-only. When --checkpoint-dir is set across multiple mounts, each mount namespaces checkpoints under <checkpoint_dir>/<sha256(canonical_root)>/ (matching recovery::Store) so checkpoints never collide and remain tied to the physical folder across mount renames or standalone openings. server_redactions / publish_redactions (routes.rs, used by mcp.rs) collects every mounted root path (both configured and canonicalized) so published HTML never leaks any mount's local directory.
  • /files/{*path} and /nbconvert/{format}/{*path} — both read through AppState::contents (open_file / get), so <mount>/<rel> resolves through the routing Contents layer with no per-route special cases. Requesting /files/ or /files/<mount> fails as a directory request does today.
  • ganymede:// links and relative paths — inside a notebook or document directory, relative URLs stay inside the notebook's mount while root-anchored paths (/api/contents/<mount>/..., /files/<mount>/...) address across mounts. On Apple hosts, ganymede://open?folder=<name>&file=<rel> (and new / run links targeting a mount path) resolves <name> directly to "<mount>/<rel>" when mounted, or asks the bookmark host to attach the folder via runtime add_mount without restarting the server. OS paths in ganymede://open?path=... canonicalize via std::fs::canonicalize (for case-preserving APFS/Windows matching) and match against canonicalized mounted roots by longest prefix.

Mount naming and non-overlapping validation ​

  • Valid mount names — a mount <name> must be a single path segment accepted by ApiPath::parse (non-empty, not . or .., no /, \, \0, or :), must not start with . (avoiding hidden-file filtering and .ipynb_checkpoints / .virtual_documents collisions), and must be unique case-insensitively across active mounts so APFS/Windows case folding cannot shadow names.
  • Non-overlapping disk directories — every mount disk directory must exist and canonicalize cleanly (std::fs::canonicalize). No mount's canonical path may equal, contain, or lie inside another active mount's canonical path (a == b || a.starts_with(b) || b.starts_with(a)). Overlapping mounts would give one physical file two API paths, two file IDs, and two collaborative rooms racing on saves (especially unsafe on iOS, where advisory room locks are disabled).

Document rooms, file IDs, recovery, and .ganymede.toml ​

Inspecting ganymede-server's collaboration layer shows why rooms should be coordinated by one Collab router holding per-mount state rather than one synthetic root:

  • Per-mount FileIds, Stamps, and move_lock — FileIds keys rows by (canonical_root, rel_api_path) in ganymede_file_ids.db. Keeping one FileIds handle, Stamps, and move_lock per mount keyed by that mount's canonical disk directory preserves continuity when the same folder is opened standalone via ganymede serve <folder> or edited by ganymede grant, keeps moved_in_other_roots / removed_in_other_roots working, and stops filesystem moves in one mount from blocking room opens in another. Every path-addressed Collab method — including Collab::delete_if_unchanged, Collab::room_in_use, Collab::open_notebook, and Collab::fileid_id — must split <mount>/<rel> and use the mount's canonical root / FileIds handle instead of relying on collab.root() returning None.
  • Shared UUID routing for rooms and file IDs — WebSocket room joins (/api/collaboration/room/{room}), kernel cell execution (document_id on /api/kernels/{id}/execute), /api/fileid/path, and GET/DELETE /api/collaboration/recovery/{id} do not carry <mount> in their URL. Collab maintains one shared rooms map and an index from room_id / file_id to its owning mount, while path-addressed calls (PUT /api/collaboration/session/{*path}, /api/fileid/id, save, rename, delete) split <mount> first. GET /api/collaboration/rooms merges active rooms across all mounts with virtual "<mount>/<rel>" paths sorted by path.
  • Shared Watcher and crash recovery — Watcher already tracks watched directories by canonical OS PathBuf, so one watcher serves all mounts. Under recovery::Store, writes already record meta.file on disk; each mount holds a recovery view keyed by its canonical disk root, and claimed tries active mounts so crash copies written either standalone or under multi-root reappear under "<mount>/<rel>". Unfiltered GET /api/collaboration/recovery aggregates active mounts' recovery entries and skips unmounted stores.
  • .ganymede.toml boundary — folder::default_kernel(root, dir) takes (mount_disk_root, rel_dir) so folder kernel config stops at the mount root and never walks into parent host directories.

Security and path traversal ​

Normalization and mount-boundary containment ​

  • .. and lexical validation — ApiPath::parse and normalize_api_path validate the full virtual path before routing, rejecting \0 (400 BadRequest), \, leading /, . and .. components, and Windows drive prefixes (404 OutsideRoot). The mount segment undergoes the same check plus the non-hidden . restriction.
  • Symlink containment per mount — inside a mount, FsContents enforces resolves_under(canonical_mount_root, os_path) (canonicalizing the target or its deepest existing ancestor). A symlink inside mount A whose target resolves outside A's canonical directory fails with 404 OutsideRoot — even if the target lies inside another mount B. Checkpoints, .ganymede.toml traversal, directory listings (dir_model), and terminal cwd resolution enforce the same per-mount canonical prefix check.
  • Canonical overlap checks — runtime and startup validation canonicalizes candidate mount directories before overlap comparison, preventing a symlink alias from registering a duplicate view of an existing mount.

Per-notebook [host] grants across mounts ​

  • Server [host] defaults — HostConfig (read, edit_self, run) remains global server config evaluated in virtual path space ("" grants all active mounts; narrower defaults such as read = ["Shared"] scope to that mount or subtree).
  • Per-notebook stored Grant isolation and normalization — per-notebook overrides live in ganymede_file_ids.db keyed by (canonical_mount_root, rel_path) so ganymede grant works offline per folder. Because a standalone grant storing read = [""] meant "this folder" rather than "every sibling folder mounted later", and because normalize_api_path today strips leading / unconditionally, storage and HTTP translation must preserve an explicit distinction:
    • Storage grammar (GrantPath) — FileIds / Grant entries parse a single optional leading / before normalizing the remainder: GrantPath::MountRelative(norm) for unprefixed strings ("" -> owning <mount>, "data/raw" -> <mount>/data/raw) and GrantPath::ServerWide(norm) for leading-/ strings ("/" -> virtual root "", "/<other>/<rel>" -> <other>/<rel>). Calling raw normalize_api_path directly on a stored grant path would strip / and corrupt the scope, so HostApi::grant_from only normalizes after splitting the prefix.
    • HTTP and CLI boundary — HTTP GET /api/host/grants/{*path} returns unified virtual API paths ("" for whole server, <mount> for own mount root, <mount>/<sub>, <other>/<sub>), and PUT /api/host/grants/<mount>/<rel> translates incoming virtual paths before storing: <mount> -> "", <mount>/<sub> -> "<sub>", "" -> "/", and "<other>/..." -> "/<other>/...". Offline ganymede grant keeps mount-relative normalization so pre-existing standalone grants stay sandboxed inside their own folder when mounted into a multi-root server.
  • Virtual evaluation and HostApi::resolved — server [host] defaults, resolved per-notebook Grant entries, may_enter, may_read, and may_run (including cross-mount prefix intersection during nested runs) all evaluate in virtual path space. HostApi::may_enter allows entering "" while filtering each child mount through the caller's effective grant so ungranted mounts stay hidden in list("") and search. HostApi::resolved splits <mount>/<rel>, canonicalizes inside that mount's FsContents, returns None on any symlink escape outside <mount>, and re-prefixes <mount>/ before grant prefix checks.

Write-observer and event paths ​

  • Native callback (WriteObserverFn / ganymede_server_set_write_observer) — each mount's Stamping wrapper shares the server's Arc<WriteObserver> and passes the file's canonical OS Path (<mount_disk_root>/<rel>) with before/after stamps. Native ledgers such as iOS KeptAnswers and device permission tables remain invariant to mount names and consistent with AppKernels.
  • Event stream (WriteEvent on /api/events/subscribe) — Stamping passes the full virtual API path "<mount>/<rel>" for WriteEvent.path so clients listening over WebSocket can match /api/contents and open tabs across mounts.

Lifecycle API ​

Adding or removing a mount at runtime must leave open rooms, watchers, file stamps, and running kernels in all other mounts undisturbed.

CLI and config ​

  • Config (ganymede.toml / config_file.rs / FFI JSON) — add mounts: Option<Vec<MountSpec>> to Config (with deny_unknown_fields), where each entry is:
toml
[[mounts]]
name = "Ganymede"
path = "/path/to/ganymede"

[[mounts]]
name = "Work"
path = "/path/to/work"
read_only = false
  • Distinguishing defaulted $HOME vs explicit root_dir — today Config::root_dir (config.rs) is PathBuf populated by Default ($HOME), so {"mounts": []} in FFI JSON or [[mounts]] in ganymede.toml would otherwise carry a defaulted root_dir. Track explicit root_dir presence at deserialization (or represent Config::root_dir as Option<PathBuf> internally with $HOME default applied only in single-root mode) so config_file::set, TOML startup, and FFI reject explicit root_dir + mounts together without falsely conflicting against the fallback home directory.
  • CLI (ganymede serve / serve.rs) — add repeatable --mount <name>=<path> and --multi-root (to start multi-root mode with zero initial mounts before dynamic attachment). Combining explicit root_dir / --root-dir with mounts / --mount / --multi-root fails validation. Update config::root_is_set and config::require_root to accept mounts.is_some() without requiring root_dir, and skip cfg.root_dir.canonicalize() in serve.rs when running in multi-root mode so --multi-root and "mounts": [] succeed even when $HOME is unset or absent.

Embedded host (ganymede-ffi) ​

Mirroring the existing ganymede_server_add_machine / ganymede.h ABI (no <stdbool.h>, error-returning mutators return int with 0 on success and nonzero with *error_out freed via ganymede_string_free):

  • Startup (ganymede_server_start) — accepts "mounts": [{"name": ..., "path": ..., "read_only": ...}] in its JSON config; passing "mounts": [] enables multi-root mode with no folders mounted yet.
  • Runtime functions (callable from any thread on a multi-root server; returning nonzero with *error_out on single-root servers):
    • int ganymede_server_add_mount(GanymedeServer *server, const char *name, const char *path, int read_only, char **error_out) — validates name and non-overlapping canonical path, opens FileIds and Stamps, inserts the mount atomically into the shared registry, and returns 0 on success.
    • int ganymede_server_remove_mount(GanymedeServer *server, const char *name, char **error_out) — gracefully detaches the named mount (protocol below), returning 0 on success or nonzero with *error_out on unknown mount, single-root mode, or flush failure.
    • char *ganymede_server_mounts(const GanymedeServer *server) — returns JSON array [{"name": ..., "path": ..., "writable": ...}], freed via ganymede_string_free.
  • iOS security-scoped bookmark contract:
    • Attach: app calls url.startAccessingSecurityScopedResource() before calling ganymede_server_add_mount so canonicalization and FileIds succeed under sandbox access.
    • Detach: app calls ganymede_server_remove_mount and waits for it to return before calling url.stopAccessingSecurityScopedResource(). That ensures dirty rooms flush, in-flight Stamping / run_notebook writes drain, and watchers release OS file descriptors before access ends.

HTTP lifecycle and security boundary ​

  • Read-only listing (GET /api/mounts and GET /api/contents) — authenticated HTTP clients can discover mounted folders from GET /api/contents and an optional read-only GET /api/mounts returning [{"name": ..., "writable": ...}]. HTTP responses never include raw OS filesystem paths (path on disk).
  • No HTTP mount mutation — HTTP endpoints (POST/DELETE /api/mounts) are intentionally not exposed to set arbitrary host filesystem paths. Any client holding a server token (browser tab, connected machine, or kernel helper) could otherwise mount /Users/... or / over HTTP, mirroring why remote machines have no HTTP mutation routes and host grants keep native selection out of band. On iOS/macOS, mounts change only via ganymede-ffi; if CLI dynamic mount/unmount is added later, it belongs on a per-instance, PID-scoped local control path (alongside ganymede-kernels-<pid>.sock or SIGHUP config reload) rather than the HTTP listener or a global singleton socket.

Graceful unmount without dropping other mounts ​

remove_mount(name) executes in order without blocking or restarting other mounts:

  1. Transition to draining (hide publicly, keep internal handle) — remove <name> from public /api/contents, /api/collaboration/session, and new room join dispatch so new client requests immediately return 404 NotFound, while moving its FsContents, FileIds, and Stamps handle into an internal draining slot so open rooms can still flush and restamp to disk without hitting 404.
  2. Flush, drain writes, and close that mount's rooms — iterate active rooms owned by <name>: flush dirty edits through the internal mount handle (writing a recovery copy via recovery::Store only if writing to disk fails), send WebSocket close to those rooms' clients, drop their Watcher handles so OS directory descriptors close, and wait for in-flight Stamping detached tasks and POST /api/notebooks/run (run_notebook) tasks on <name> to drain.
  3. Stop that mount's sessions, kernels, and terminals — shut down kernels and sessions whose path matches path == name || path.starts_with("<name>/") (path_under(path, name).is_some()), including transient run_notebook kernels and PTYs rooted inside <name>, and wait for process exit so no child holds working-directory FDs inside the unmounted folder, then drop the internal draining handle. Sessions, rooms, and kernels in other mounts continue running untouched.
  4. Emit root change — broadcast a mount-change event on /api/events/subscribe (on both add_mount and remove_mount) so open sidebars refresh the virtual / listing without reloading the page. Because ws::events (ws.rs) currently reads WriteObserver::events and uses receiver count (WriteObserver::is_set()) to gate file-stamp collection, multiplex a dedicated mount-event broadcast channel inside ws::events so mount listeners do not inflate WriteObserver stamping.

Kernels, terminals, LSP, and MCP ​

Kernels (ganymede-api) ​

KernelManagerConfig currently accepts one root_dir: PathBuf and passes it to ganymede_contents::kernel_cwd(&root_dir, path) and session_name. In multi-root mode, replace the static path with a dynamic root resolver callback/trait backed by the live mount registry:

  • Notebook/session kernel (path = Some("<mount>/<rel>")) — resolves <mount> to <mount_disk_root> and computes kernel_cwd(&mount_disk_root, rel), confining symlink/missing-dir fallbacks to <mount_disk_root> and setting JPY_SESSION_NAME to the resolved path under <mount_disk_root>.
  • Pathless or mountless kernel (path = None, "", or unrecognized prefix) — resolves to the first active mount's disk directory (or fails cleanly with 400 BadRequest when zero mounts are registered, rather than falling back to /). Falling back on an unrecognized first segment preserves compatibility with remote clients such as VS Code's Jupyter extension, which creates sessions with synthetic local-style paths like Untitled-1-jvsc-<uuid>.ipynb (validation/vscode.cjs), matching how single-root kernel_cwd falls back to root_dir for non-existent paths.
  • Apple in-process kernels (RegisteredKernels / AppKernels) — ganymede-ui today resolves notebook paths under a single notebookRoot. In multi-root mode, KernelHost / AppKernels map <mount> to its mounted folder URL (while kernel launch_json.cwd carries the resolved OS directory).

Terminals (ganymede-terminals) ​

TerminalConfig today holds one root_dir: PathBuf, and TerminalManager::create sets the PTY's working directory (resolve_cwd) and JUPYTER_SERVER_ROOT. With a dynamic root resolver:

  • Relative or virtual cwd ("<mount>" or "<mount>/<rel>") resolves into <mount_disk_root>/<rel> with symlink containment inside <mount_disk_root> and sets JUPYTER_SERVER_ROOT to <mount_disk_root>.
  • Omitted or empty cwd uses the first active mount's disk directory (or refuses with 400 BadRequest when zero mounts exist).
  • Explicit OS cwd inside an active mount matches that mount's root for JUPYTER_SERVER_ROOT and rejects paths outside active mounts. (iOS disables terminals.)

Language servers (ganymede-lsp) and JupyterLab (lab.rs) ​

LspManager spawns servers rooted at one root_dir and creates <root_dir>/.virtual_documents, and Lab::page_config (lab.rs) emits serverRoot, rootUri, and virtualDocumentsUri derived from Lab::server_root. Virtual "" is read-only and has no single filesystem path, so .virtual_documents cannot live there: either isolate .virtual_documents under a per-instance (PID- or temp-scoped) server runtime directory with per-mount LSP workspaceFolders, or explicitly disable LSP and document the gap in known gaps in the initial PRs while keeping single-root Lab / LspManager unchanged.

MCP (ganymede mcp and /mcp) ​

  • Server discovery (jpserver-<pid>.json / server_info.rs) — add optional "mounts": [{"name": ..., "path": ...}]. Because legacy ganymede mcp (find_server in crates/ganymede-cli/src/mcp.rs) expects "root_dir" and would compute a wrong mountless DIR_META if given mount 0's path, omit "root_dir" (or skip setting a misleading single root) in multi-root ServerInfo while updating find_server to match cwd against each canonical mount "path" in "mounts" and compute DIR_META ("ganymede/dir") as "<mount.name>" or "<mount.name>/<subpath>". (find_own stays single-root or passes mount flags explicitly.) Rewrite jpserver-<pid>.json when runtime mounts change on CLI/desktop hosts where info files are active.
  • Virtual path scoping inside Notebooks (mcp.rs) — resolve_from and show_from already treat DIR_META = "Work/sub" as the working base directory for relative paths and leading / ("/Other/b.ipynb") to reach across mounts. Without DIR_META (direct /mcp), notebooks_list at "" lists active mounts and notebooks_search walks across all mounts unless narrowed by dir.
  • Removing single-root collab.root() assumptions (mcp.rs, routes.rs) — open_checked (Created { stamp } and root-banner text), notebook_paths (used by notebooks_search for canonical symlink deduplication), cell_snapshot (snapshot image paths), notebook_publish (" On disk: ..."), folder_kernel (.ganymede.toml), and routes.rs's server_redactions / publish_redactions must all resolve against the target path's owning mount (or all active mounts for redactions) instead of self.state.collab.root().

Standard Jupyter client compatibility and multiple instances ​

JupyterLab, VS Code, and other Jupyter clients ​

In single-root mode (the default), nothing changes on the wire or in behavior. In multi-root mode, all standard Jupyter Server REST and WebSocket endpoints (/api/contents, /api/kernels, /api/sessions, /api/kernelspecs, /api/terminals, /files, /nbconvert, /api/collaboration, /api/fileid) remain spec-compliant, using the same read-only virtual root (writable: false) model as Jupyter's HybridContentsManager. Additive Ganymede routes such as GET /api/mounts are ignored by standard clients.

Visible differences in multi-root mode:

  • JupyterLab — lists active mounts as top-level folders at /; once inside a mount, editing, saving, checkpoints, same-mount renames, copies, kernels, terminals, and live collaboration rooms work identically. Sitting at /, Launcher → New Notebook or upload sends POST /api/contents/ and gets 403 Forbidden until a mount folder is opened, and renaming or deleting a mount directory itself returns 403. Dragging a file between two mounts sends a cross-mount PATCH and gets 400 BadRequest (cross-mount copy works). jupyterlab-lsp is unavailable unless PR 3 adds per-instance .virtual_documents with multi-workspace folders, and runtime mount additions/removals appear in JupyterLab on its next file-browser refresh.
  • VS Code ("Existing Jupyter Server") — connecting by URL and token (/api/kernelspecs, /api/kernels, /api/sessions, channels, stdin, interrupt, restart) works unchanged (validation/vscode.cjs), because synthetic mountless session paths (*-jvsc-*.ipynb) fall back to the first active mount's disk directory when resolving kernel cwd.
  • jpserver-<pid>.json discovery — explicit URL + token clients (VS Code, JupyterLab, nb connect --server ... --token ...) are unaffected. External tools that auto-discover via jupyter server list expect a string root_dir field, so omitting root_dir in multi-root ServerInfo intentionally keeps legacy single-root auto-discovery from attaching with a wrong root while ganymede mcp reads mounts.

Running multiple Ganymede instances concurrently ​

Multi-root support introduces no singleton lock or fixed port: multiple Ganymede instances (single-root, multi-root, or mixed) can run side by side on the same machine by passing a unique --port (or --port 0 in tests):

  • Per-instance runtime files — jpserver-<pid>.json, jpserver-<pid>-open.html, ganymede-kernels-<pid>.sock, and any per-instance LSP .virtual_documents or future local control socket are PID- or temp-scoped and never collide across instances.
  • Per-instance overlap check and cross-instance safety — the non-overlapping mount check is enforced within one server instance, not globally across processes. Two separate instances on different ports may independently mount the same or overlapping folders: ganymede_file_ids.db keys rows by (canonical_root, rel_api_path), and room_lock.rs takes OS file locks keyed by the notebook's canonical disk path, so a second instance opening an already-locked notebook sees Acquire::Elsewhere and opens its room read-only instead of racing on autosaves. Tests needing complete isolation can also set separate JUPYTER_RUNTIME_DIR and GANYMEDE_DATA_DIR alongside unique --port values.

Implementation sequence ​

Each step below can land and pass CI independently on main without breaking single-root behavior:

  1. PR 1 (tlockney/ganymede): Virtual Contents router and config/CLI schema — mount validation (naming rules, case-insensitive uniqueness, canonical non-overlapping check), MultiRootContents wrapping per-mount FsContents with read-only "", cross-mount copy, 400 cross-mount rename, per-mount canonical-hash --checkpoint-dir isolation, explicit vs defaulted root_dir handling (config.rs, config_file.rs, serve.rs), Config::mounts, --mount / --multi-root flags, and ServerInfo::mounts.
  2. PR 2 (tlockney/ganymede): Per-mount Collab, FileIds, recovery, .ganymede.toml, HostApi, and WriteObserver — generalize Collab (including delete_if_unchanged, room_in_use, open_notebook, fileid_id) and Stamping to a mount table with shared rooms, shared Watcher, UUID room/file-id index, cross-mount recovery::Store claiming & unfiltered list aggregation, mount-scoped folder::default_kernel, <mount>/runs/... run copies, all-mount server_redactions / publish_redactions, GrantPath mount-relative vs leading-/ storage + HTTP translation + HostApi::resolved / may_enter, and dual OS/virtual paths in WriteObserver.
  3. PR 3 (tlockney/ganymede): Kernels, terminals, LSP/Lab, and MCP across mounts — dynamic root resolver in KernelManagerConfig and TerminalConfig, Lab::page_config / LspManager multi-root handling (and known-gaps.md entry if deferred), McpState mount lookups (open_checked, notebook_paths, cell_snapshot, notebook_publish, folder_kernel), and ganymede mcp find_server mount discovery.
  4. PR 4 (tlockney/ganymede): Runtime mount lifecycle and ganymede-ffi — thread-safe MountRegistry with draining state, graceful remove_mount flushing dirty rooms, draining Stamping / run_notebook writes, closing mount rooms/watchers/kernels (path_under) without disturbing other mounts, updating ServerInfo files when present, multiplexing add_mount / remove_mount events on /api/events/subscribe, read-only GET /api/mounts, and ganymede_server_add_mount / remove_mount / mounts (int 0/nonzero return) in ganymede-ffi.
  5. PR 5+ (tlockney/ganymede-ui#465): UI, bookmarks, ganymede:// links, and AppKernels — bump bundled ganymede / ganymede-ffi; update Sidebar.tsx (writable: false root behavior and section presentation), src/App.tsx / src/lib/examples.ts and AppModel.swift (addExamplesIfNeeded copying examples into "Ganymede"), AppModel.swift / ServerHost.swift / IPadChrome.swift (start in multi-root mode with Ganymede plus security-scoped folder bookmarks managed via ganymede-ffi), and AppKernels.swift / KernelHost.swift / LinkOpener.swift / AppURLHandler.swift / WebView.swift / ContentView.swift / NotebookIntents.swift (replace single serverRootFolder / notebookRoot assumptions with mount-aware folder resolution).

MIT license.