Expand description
A key a setting names as vault:<entry id> instead of holding it: srv’s own reader of a service key
(voice input’s Groq key, and the other settings keys the same way when they move). The value is read
inside srv at the moment of the call, goes into one outgoing request, and is never written to
settings.json, a log or the renderer. The spelling is the one endpoint_key resolves for an agent’s
launch environment.
The grant lives on the entry, not in the settings file. settings.json only names an entry; what lets
a setting read it is a grant kept in the Vault (setting:<key> in db_vault_grants, bound to the entry
it was given to), made by the Settings picker (the person’s choice) or by AgentMux’s own move of a plain
key. So a file edit that points a setting at another entry reads nothing: the entry has no grant for it.
The person sees it under the entry in the Vault and can take it back there. One entry per setting:
allowing an entry takes the setting’s grant off every other entry, each removal recorded, so the file
alone can never point the setting back at an entry chosen before. A read records the use, once every
few minutes per entry, not once per call.
Constants§
- AGENTMUX
- Who is named in the Activity for what AgentMux does on its own, as opposed to the person.
- ALLOWED
- The activity line for the grant.
- GRANT_
PREFIX - What a grant on an entry starts with when it lets a setting read the entry:
setting:<settings key>. - NOT_
AVAILABLE - The one answer for a missing entry, an entry of another kind, an entry the setting was not allowed to read and a Vault that could not be opened, so a setting’s error never says which entries exist; the reason is in srv’s log.
- PREFIX
- What a setting’s value starts with when it names a Vault entry.
- SETTINGS
- The settings that may name a Vault entry. A grant for any other name is refused.
- USED
- The activity line for a use, listed with the other uses of a value.
- WITHDRAWN
- The activity line for a grant taken off an entry because another entry was allowed for the setting.
Functions§
- allow
- Lets
settingread entryid, recorded underwho: the person’s choice in Settings, or AgentMux’s own move of a key that sat in the file. Only anapi-keyentry, and only for a setting that is on the list. One entry per setting: the setting’s grant comes off every other entry, each removal recorded underwho. - entry_
of - The entry id a setting value names, when it is a
vault:<id>reference. - grant_
for - The grant that lets
settingread an entry. - keep
- Keeps
valueas a newapi-keyentry labelledlabelin the Personal Vault and returns its id. - move_
setting - Moves a key that sits in settings.json as plain text into the Vault: keeps it as an
api-keyentry labelledlabel, then haswritereplace the setting with itsvault:<id>reference and set<setting>Moved(so Settings can say so once).currentis the setting’s value as the file has it. Returns the new entry’s id, orNonewhen there was nothing to move (unset, blank, or already a reference). Whether it already ran is read from the value alone, never from a marker. Whenwritefails the new entry is deleted again and the plain key stays where it was, so a later start tries again and nothing is kept twice. - present
- Whether the Vault has an
api-keyentry with this id thatsettingmay read. Opens nothing. - read
- The entry’s value for
setting, recorded as a use bywhoforwhat("voice input"). Only an entry thatsettingwas allowed to read: the setting file’s word alone is not enough. - reference
- The setting value that names entry
id. - setting_
of_ grant - The setting a grant on an entry is for, when it is one.