Expand description
Where this CLI keeps its files, and where releases before the visdom
naming kept them.
Everything new is written under .visdom/ (in a repository or workspace
folder) and visdom/ (in the user’s config and state directories). The
older .tracevault/ and tracevault/ locations are still read: each
file is looked for in the new place first, then in the old one, so an
installation made by an earlier release keeps working without a migration
step. Nothing is moved on its own — an earlier tracevault still on PATH
keeps finding its files — except by init, which carries the old files
over (see commands::relocate).
Constants§
- LEGACY_
REPO_ DIR - What
REPO_DIRwas called before. - LEGACY_
TRACING_ CONFIG - The tracing config’s file name in the legacy directories.
- LEGACY_
USER_ DIR - What
USER_DIRwas called before. - REPO_
DIR - The directory in a repository (or workspace folder).
- TRACING_
CONFIG - The tracing config’s file name.
config.tomlin the same directories is thevisdomlauncher’s own (agent, tracing mode, gateway). - USER_
DIR - The directory under the user’s config and state directories.
Functions§
- existing_
or_ new newunless onlylegacyexists: the path to read, or to keep using for something that is already there.- existing_
or_ twin path, or itslegacy_twinwhenpathdoes not exist and the twin does: the file to read.- existing_
sessions_ dirs - Every sessions directory under
rootthat exists, the new one first. - existing_
tracing_ config root’s tracing config to read: the new file, else the legacy one.- existing_
user_ tracing_ config - The user’s tracing config to read under
user_dir:tracing.toml, else the legacy directory’sconfig.toml. - has_
repo_ dir - Whether
rootholds this CLI’s directory under either name. - is_
set_ up - Whether
roothas been set up for tracing: a legacy.tracevault/, or a.visdom/with more in it than theconfig.tomla team commits for thevisdomlauncher — a checkout that only carries that file has not been. - legacy_
repo_ dir <root>/.tracevault.- legacy_
sessions_ dir .tracevault/sessionsunderroot.- legacy_
sibling - The legacy directory beside a user-level directory:
<base>/tracevaultfor<base>/visdom.Nonefor a directory with another name (an injected one, as tests use), which has no legacy sibling. - legacy_
tracing_ config root’s tracing config as an earlier release wrote it:.tracevault/config.toml.- legacy_
twin - Where an earlier release would have kept the file or directory
path: the same path with its.visdomcomponent spelled.tracevault, or — for a file directly in avisdomuser directory — the one in thetracevaultdirectory beside it.Nonefor a path that is in neither. - legacy_
user_ sessions_ dir - The legacy state directory matching a user-level sessions directory:
<state>/tracevault/sessionsfor<state>/visdom/sessions.Nonefor a directory laid out differently (an injected one). - repo_
dir <root>/.visdom.- repo_
path relinsideroot’s directory: under.visdom/unless it exists only under.tracevault/.- session_
dir - The directory of session
idunderroot:.visdom/sessions/<id>, or the session’s.tracevault/sessions/<id>when an earlier release started it there — a session keeps one directory for its whole life. - session_
dir_ root - The project root a session directory (
<root>/.visdom/sessions/<id>, or the legacy spelling) lives under.Nonewhen the layout does not match. - session_
entries - Every entry of
sessions_dirand of the legacy directory beside it. - sessions_
dir - Where new sessions under
rootare kept:.visdom/sessions. - tracing_
config - Where
root’s tracing config is written:.visdom/tracing.toml. - user_
dir_ in - The user-level directory under
base(a config or state directory). - user_
path nameinside the user-level directoryuser_dir, or inside the legacy directory beside it when it exists only there.- user_
path_ renamed nameinside the user-level directoryuser_dir, or — when it exists only there —legacy_nameinside the legacy directory beside it.- with_
legacy_ sessions sessions_dir(a checkout’s.visdom/sessions) and, when there is one, the.tracevault/sessionsbeside it: every directory to scan for the checkout’s sessions. A directory laid out differently is scanned alone.