Expand description
Where a migration looks: the AgentMux root and every install on it, read from the disk rather than from the running instance, so every channel and version is covered, running or not (S2’s “all channels and versions”).
Structs§
- Home
- The AgentMux root a migration works on.
- Install
- One channel, or one dev checkout: what it shares across its versions.
- Version
Data - One version’s data directory.
Functions§
- fold
- A name as every key table folds it.
- has_
agent_ slugs - Whether an
objects.dbhas agent slugs to read; one older thandb_agents.slug(ordb_agentsitself) holds none. - has_
column - in_tx
- Run
fin oneBEGIN IMMEDIATEtransaction: committed if it returnsOk, rolled back otherwise. - open_ro
- A database opened to read, never to change: no schema step, no pragma that writes.
- open_rw
- A database opened to write, as it is: an existing file only, and no
schema step. Another version’s
objects.dbmust not be upgraded by opening it throughStore::open. - owner_
only - Make
pathowner-only on Unix: 0700 for a folder, 0600 for a file. On Windows it keeps the per-user ACL of the profile it lives in. - place
<install>or<install>@<version>, for reports.- table_
exists - write_
file - Write
bytestopaththrough a temporary file beside it and a rename, never wider than the file it replaces. On Unix the temporary file is created owner-only (0600) from the start, so the bytes are never readable by others for a moment. A file being replaced then keeps its own mode, except a.mcp.json, which holds signing keys and is always 0600, as AgentMux writes it (Workdir::write(.., owner_only = true)); a new file stays 0600. On Windows the file takes its folder’s ACL, as every write throughWorkdirdoes: the profile’s per-user ACL.