pub async fn init_workspace(
dir: &Path,
project_name: &str,
server_url: Option<&str>,
) -> Result<WorkspaceInit, Error>Expand description
tracevault init --workspace --project <name> (VIS-1256): bind every
session started under dir to one project, with no per-session step.
Meant for an umbrella directory that is not itself a repo (e.g. a folder
of checkouts), so it does not require git. It creates dir/.visdom/
if missing — the stream hook’s resolve_project_root ancestor walk then
finds it from any non-git directory below — resolves project_name to its
id ONCE against the server, and writes project_id + project_name. The
hook reads that id locally: no network call per event. No repo_id is
written; an existing config’s other keys are kept, and a legacy
default_project is dropped (the new project_id supersedes it).
Installs no hooks: an umbrella directory is covered by a global install
(tracevault init --global). Refused inside a git repo below its root:
the hook would read the repo root’s config, never this one.