Skip to main content

Module shares

Module shares 

Source
Expand description

Shares: a login the person lets an agent’s own browser profile use (docs/specs/SPEC_VAULT_AGENTS_ENTER_CREDENTIALS_WHEREVER_ASKED_2026_11_16.md §5).

A login’s shared field lists the agents by permanent uid, comma separated, or holds * for every agent. Only the person writes it (inspect::person_only refuses an agent’s update of it). It changes nothing else about the entry. A share lets the agent ask: each first use is still approved as a Browser signin is (browser_signin.rs).

A sign-in for a site’s HTTP prompt or a proxy (A11) is shared the same way. The browser answers that prompt itself, in the agent’s own profile (signins::find_shared); the person is asked at each use unless they chose “Always” for it, which is kept under prompt_grant_key.

Structs§

Ask
What an agent’s Vault share asks the person, as the card shows it: the login, its site and its user name masked. created_at binds it to this login: one deleted and made again is another.

Enums§

Asked
What plan_ask found.

Constants§

ASKED_TO_BE_SHARED
The history action of an agent’s request to be given a login.
EVERY_AGENT
In SHARED: every agent.
SHARED
The login field that lists the agents (by uid) an entry is shared with.

Functions§

add
Share entry id with who (an agent’s uid, or EVERY_AGENT), as the person: a login saved for a site. Returns false when it already was.
answers_prompt
Whether a login with these fields is a sign-in for a site’s HTTP prompt (it names a realm) or for a proxy: the browser answers that prompt itself, and such a login is never typed into a form.
check_shareable
Whether an entry of kind with these fields can be shared: a login saved for a site. One for a site’s HTTP prompt or a proxy is shared too (answers_prompt): the browser answers the prompt with it, and it is typed into no form.
end_always
Ends every “Always” who holds for entry id through a share: an agent’s uid, or for EVERY_AGENT those of every agent the entry is no longer shared with.
forget_agent
Agent uid is gone: its shares go, and the “Always” it held with them (A9).
grant_asked
The person allowed ask: shares the login with the agent uid, if it is still the login they were shown.
grant_asked_always
The person answered “Always” to ask for an HTTP-prompt sign-in: grant_asked, and the browser then answers the prompt in the agent’s own profile without asking again. Only a login that answers a prompt has this: a form login’s “Always” is given at its first signin, never with the share (A6).
grant_prefix
What an “Always” the person gave uid for a shared login starts with: grant_key in browser_signin.rs names the agent by uid for a shared login, never by a name.
is_field
Whether name is the share field of a kind entry. It is not among the kind’s listed fields, which are what the Vault pane’s forms offer: a share is made with the Share button, never typed as a field.
listed
Who fields are shared with: agent uids, or EVERY_AGENT.
names
Whether fields are shared with the agent whose permanent uid is uid.
note_ask
The history line of an ask that did not end in a share: outcome is denied, expired or the like.
plan_ask
Every check of an agent’s Vault share, with nothing written: the reason, that the agent may use the entry (anything else is “no entry”), that it is a login that can be shared, and that it is not shared with the agent already. uid is the agent’s permanent uid, proven by the caller: an agent asks for a share for itself only.
prompt_always
Whether the person gave agent uid an “Always” for the shared HTTP-prompt sign-in row, used in profile: the login is still shared with it and still names the site and realm the “Always” was given for.
prompt_grant_key
The key the person’s “Always” for a shared HTTP-prompt sign-in is kept under: grant_prefix, so it is listed and ended as any sign-in’s “Always” is, then the agent’s own browser profile and the origin, kind of prompt and realm the person was shown. A login whose site or realm is edited afterwards has another key, so its next use asks again (A6); no form sign-in’s key ends this way, so neither kind of “Always” stands for the other.
remove
Stop sharing entry id with who. Ends the “Always” the agent holds for it and returns whether a share was removed.