Skip to main content

Module vault_handlers

Module vault_handlers 

Source
Expand description

The Vault’s routes (docs/specs/SPEC_VAULT_PANE_AGENTS_USE_SECRETS_UNSEEN_2026_10_19.md §5.4).

  • POST /api/v1/host/vault: everything the pane does, relayed by the host. X-Host-Token must be the host’s IPC token, which agents never see: the instance auth key every agent holds isn’t enough, so no agent can read a tail, or plant, change or delete an entry.
  • GET /api/v1/vault: for agents, each entry’s id, label, kind and section. No value, tail, field or grant.
  • POST /api/v1/vault/request: an agent asks the person for a new entry and waits for the answer: the new entry’s id, or declined.
  • POST /api/v1/vault/generate: an agent creates an entry whose value the Vault makes; it gets the id back, never the value.

Structs§

GenerateBody 🔒
HistoryBody 🔒
ListBody 🔒
RequestBody 🔒

Constants§

DEFAULT_WAIT 🔒
MAX_WAIT 🔒
ON_SCREEN_MS 🔒
How long one “a Vault pane is showing” note lasts: the pane renews it every 10 seconds while shown, so a crashed window doesn’t hold it.

Functions§

answered 🔒
The answer to a request, with its id.
asking_agent 🔒
Who the request says is asking, and its pane: the agent whose token or signature verified (a container agent has a token and no signing key), else a plain “not a verified agent”.
check_share_target 🔒
A share names an agent this computer has, and a Vault the agent may use: a login in a Vault closed to it would not be offered, so the person is told to open the Vault first (A5).
chosen_card 🔒
The card the person picked for a whole-card fill: one of the request’s own choices (the preselected one when they picked none), never an id the agent or the page made up. “Always” is never for an expired card. None for any other use, and for a no.
entry_ops 🔒
The host ops on Vaults and on an entry’s earlier values.
error 🔒
export 🔒
The host’s export to the file the person chose: the entries named (all when none is), in the format asked for. The answer’s links_only is what was written, not what was asked for: the dialog says “no value” on this word.
export_to 🔒
file_path 🔒
The file the host chose, which must be an absolute path.
handle_host_vault 🔒
POST /api/v1/host/vault: the pane’s operations, from the host only.
handle_vault_generate 🔒
POST /api/v1/vault/generate: a new entry whose value the Vault makes (SPEC_VAULT_GENERATE_CAPTURE_AND_BROWSER_SIGNINS_2026_10_28.md §4.1). The person isn’t asked: the value is no secret of theirs, nobody has seen it, and using it later asks as every use does. The answer names the entry, never the value.
handle_vault_history 🔒
POST /api/v1/vault/history: an entry’s history (who did what, when, under which version, and why), for an entry in a Vault the proven agent may use. It holds no value (docs/specs/SPEC_VAULT_PARITY_ENTRY_HISTORY_REASONS_AND_IMPORT_2026_11_06.md §5.3).
handle_vault_list 🔒
GET /api/v1/vault: the entries an agent can name. Reads no value, so it never touches the keychain.
handle_vault_list_for 🔒
POST /api/v1/vault/list: the entries of the Vaults the proven agent may use. An agent that doesn’t prove who it is sees only the Vaults open to every agent, as GET /api/v1/vault does.
handle_vault_on_screen 🔒
GET /api/v1/vault/on_screen: whether any AgentMux on this computer shows a Vault pane now. UI window refuses to capture AgentMux windows while one does (SPEC_VAULT_PANE_AGENTS_USE_SECRETS_UNSEEN_2026_10_19.md §5.3).
handle_vault_request 🔒
POST /api/v1/vault/request: ask the person for a new entry; answer when they save or dismiss it, or when the wait runs out (the request stays open in the Vault, and the agent finds the entry with list later).
hold_use 🔒
The person is reading or acting in a use’s prompt: its countdown holds (SPEC_VAULT_REQUESTS_AS_CARDS_IN_THE_AGENT_PANE_2026_11_01.md §5, “Hold”). Only the host’s route reaches it, like the answer itself.
host_op 🔒
One operation of the pane’s route, by name.
import_commit 🔒
import_commit: writes what the person previewed. vault (a name or an id) is where the new entries go; Personal when left out. profile is the browser profile a browser export’s logins with a site belong to (personal when left out): they go to its sign-in Vault, which is where the browser offers them from.
kept 🔒
What AgentMux already keeps in the keychain, managed elsewhere: named, never read (§5.2 “Kept by AgentMux”).
on_screen_key 🔒
A pane’s key among the AgentMux instances that share the identity store: this srv and the pane.
op_answer_use 🔒
The person’s answer to an agent’s use of an entry (spec section 6.4).
op_create 🔒
A new entry, which may fill an agent’s request.
op_decline_request 🔒
op_grants 🔒
Who may use which entry without asking, with no value and no key: Warden’s view of the standing permissions, which must not make the OS ask for the key.
op_import_inspect 🔒
op_list 🔒
op_on_screen 🔒
A pane says it is showing (or no longer is). Only the host can say so: an agent clearing it could then capture the window. Each pane has its own note, so one pane hiding can’t clear another’s.
op_revoke_grant 🔒
publish 🔒
Tells every UI the Vault or its requests changed. Carries no entry.
publish_change 🔒
publish without the sign-in pages: for a change to an entry no sign-in page lists (an account’s key).
shape_error 🔒
A malformed entry or change, said without serde’s own message, which can quote the value it couldn’t read.
share_list 🔒
What the pane shows of an entry’s shares: each agent it is shared with (or every agent), how often it signed in with the login and when it last did, and the agents the person can still share it with. Never a value: the sign-ins are read from the entry’s history, and an agent is named by its permanent uid, which is its definition’s id.
text_arg 🔒
A string field of an operation’s body, empty when it is not there.
vault_agents 🔒
Who may use a Vault, from a host op’s body: agents is all, none, or named with agent_ids.

Type Aliases§

OpResult 🔒
What an operation answers: the data, and whether it changed what the panes show.
Store 🔒