Expand description
Shared “standard namespace” composition for VFS consumers.
Prior to #634, cli::shell_handlers::handle_shell_tui and
tui::vfs::build_chat_vfs_namespace each hand-rolled the same
Namespace::new() + bind_mount(...) recipe: /srv/model,
/srv/registry (+ /worktree alias), /bin (static command listing +
discovered .tcl tool scripts), /env (session variables), and
/lang/tcl (the Tcl shell mount, whose driver gets a fork() snapshot of
the namespace taken before /lang/tcl itself is mounted so it never
observes itself). The two copies had already drifted — the TUI builder
was missing /srv/registry — so this module is now the single place that
recipe is defined. Callers add only what’s genuinely consumer-specific
(e.g. /lang/python, tracked separately in #632) around a call to
build_standard_namespace.
This is a pure assembly layer: it does not change any Subject/MAC
scoping semantics of the individual mounts (RemoteModelMount,
RemoteRegistryMount, TclMount) it wires together.
Per epic #809’s mount-point convention (“a mount point is a per-namespace
binding decision… the server never dictates the path”), this builder
does not itself choose where anything lands in the tree — every mount
path below is a required field on StandardNamespaceConfig that the
caller must supply. The CLI shell and TUI ChatApp callers both currently
pass the same literal paths (/srv/model, /srv/registry, /worktree,
/bin, /env, /lang/tcl), but that’s a coincidence of current
behavior, not something this module bakes in.
Structs§
- Standard
Namespace Config - Inputs that legitimately differ between the CLI shell and TUI ChatApp
call sites. Everything else about the recipe is fixed by
build_standard_namespace.
Functions§
- build_
standard_ namespace - Compose the standard VFS namespace shared by the CLI shell and TUI ChatApp namespace builders.