Expand description
The application root (spec §7), config.toml strict reads (spec §17) and locked, atomic writes
(spec §18, §18.1).
Structs§
- AppRoot
- The directory holding
config.tomlandprofiles/. - Config
- The validated contents of
config.toml. - Mapping
- One
[repositories.'<root>']entry (SP3 design §6.1). - Reference
- A mapping field that names a profile (SP3 design §4.2).
Enums§
- Link
Outcome - What
linkdid. - Unlink
Outcome - What
unlinkdid.
Constants§
- CONFIG_
FILE 🔒 - HOME_
ENV - Environment variable that overrides the application root.
- LOCK_
FILE 🔒 - LOCK_
RETRY 🔒 - LOCK_
TIMEOUT 🔒 - TEMP_
PREFIX 🔒 - TEMP_
SUFFIX 🔒
Functions§
- acquire 🔒
- check_
case_ 🔒twins - Refuses a profile whose name differs from an existing
profiles/entry only in ASCII case (SP1 design §7.3). - child_
table 🔒 - The table at
keyinparent, created when missing: an inline table wheninline, otherwise an implicit standard table. - invalid 🔒
- is_
absolute_ 🔒key - Absolute in Unix form (
/…) or Windows form (C:\…,C:/…,\\…), whatever the host (SP3 design §6.1). - is_
host_ form_ key - Whether a stored key is in this host’s own absolute form:
/…on Unix, anything but/…on Windows (SP5b design §4). The other platform’s keys areforeign. - link
- Maps
repository(or onlyagentin it) toprofile(SP3 design §6.2). The caller has discoveredrepository. - link_
outcome 🔒 - locked
- Reads the configuration under the same exclusive lock as
update(spec §18, design §6.4). It does not create the root directory and does not sweep temp files: those are write-path side effects. - mapped 🔒
- The profile an entry maps at the field
agentselects. - parse 🔒
- profile_
name 🔒 - repository_
key 🔒 repositories.<key>with the key quoted as TOML would write it.- stored_
keys 🔒 - The stored
repositorieskeys of a validated document. - unlink
- Removes the mapping at the first of
keysthat has one at that field, under one lock (SP3 design §6.2).keysis never empty. - update
- Locked, atomic read-modify-write of
config.toml(spec §18, design §6.4). - update_
with 🔒 - validate 🔒
- Applies the strict schema (SP1 design §6.2, SP3 design §6.1) to a parsed document.
- validate_
agents 🔒 - validate_
repositories 🔒