Klav Atlas

klav-client

170 schemas in 30 files.

Mainmainfe8e2a0c8c24· 2026-12-05

Blast radius

4 direct · 1 transitive workspaces · 3 apps affected

What a change to these 170 schemas can reach, from workspace dependencies, imports, call sites, and protocol edges.

Affected apps (rust)
Contracts in its surface23 RPC

How an agent's use of an item went, for the app to say in words: «allowed by your policy», «approved once», «approved for 15 min», «inside the task “…”», «asked you» or «denied».

Framework
serde
Shape
›union7 members
| "policy"
| "approved_once"
| "approved_for"
| "task"
| "asked"
| "denied"
| "other"

«Who used it» for one item.

Framework
serde
Shape
›{5 fields }
item_id: ItemIdThe item.
reference?: stringIts reference on this device (`klav://…`), if this device has it.
trashed?: booleanIn the trash.
deleted?: booleanNot on this device any more (purged): shown as «(deleted)».
uses: ItemUse[]The agents' events about it, newest first.

One agent event about the item.

Framework
serde
Shape
›intersection2 parts
›& {4 fields }
how: HowHow it went.
lease_until?: numberWith [`How::ApprovedFor`]: when the approval ran out (Unix ms).
approved_at?: numberWith an approval: when the person decided it (Unix ms), so the app can say «approved for 15 min».
task?: stringWith [`How::Task`]: the task's title, in the agent's words.

What the agent hands to `klavd` (`agent_passkey_arm`).

Framework
serde
Shape
›{4 fields }
agent_id: AgentIdThe agent.
task_id: TaskIdThe task the server said covers it.
item_id: ItemIdThe login.
request: AgentRequestProofThe request the agent signed (`POST /v1/agent/access`).

An agent of the account, with what the person needs to decide.

Framework
serde
Shape
›{14 fields }
id: AgentIdAgent ID.
name: stringName the agent gave itself.
note?: stringFree-form note from the registration.
status: AgentStatusState.
pairing_code: stringThe six pairing words of its public key (spec §13.1).
created_at: numberRegistration time (Unix ms).
expires_at: numberUntil when a pending registration can be approved (Unix ms).
approved_at?: numberApproval time (Unix ms).
revoked_at?: numberRevocation time (Unix ms).
last_seen_at?: numberLast signed request (Unix ms, minute precision).
grant?: GrantViewThe current grant, verified against the account identity.
grant_error?: stringWhy the agent has a grant but `grant` is empty: this device cannot read it (a format it does not know, or a signature t…
paused?: AgentPausedThe pause in effect on it, its own or the account-wide one, as the server says (ADR 0033 §7).
credential_proxy?: booleanThe account's proxy setting names it (ADR 0036 §2, ADR 0051 §6.1): it gets credentials one by one (`klav proxy grant`),…

An item an environment's approval also covers (ADR 0032 §3.1).

Framework
serde
Shape
›{2 fields }
id: ItemIdThe item.
target: string`klav://…` by name when this device has it, else `item <ID>`.

An approval request as the person sees it.

Framework
serde
Shape
›{24 fields }
id: ApprovalIdID.
status: ApprovalStatusState.
agent_id: AgentIdThe agent.
agent: stringIts name.
permission: PermissionWhat it wants to do.
target: stringThe item (`klav://…`), or the project for `create`.
target_name?: stringThe target's name for one-line texts such as the Touch ID prompt: the item's title, or `vault/project` without an item.…
reason: stringWhy, in the agent's words.
domain?: stringHost it claims the value is for.
created_at: numberAsked at (Unix ms).
expires_at: numberDecide before (Unix ms).
lease_until?: numberApproved until (Unix ms; `0`: once).
task?: OutsideTaskThe agent's running task this request falls outside of («Outside the task», ADR 0021 §6), if it has one.
request_digest: string`SHA-256` (hex) of the exact request bytes this view was built from (ADR 0030 §5): deciding passes it back, and nothing…
mcp_tool?: stringThe MCP tool of a proxied call, according to the MCP server (ADR 0049 §5.4): only once it passed the tool grammar on th…
sandbox?: SandboxIdThe sandbox a proxied call is for, according to the proxy.
local_client?: stringThe local client a proxied call is for, according to the proxy: only once it passed the client grammar on this device.
security?: stringSet when the request breaks a rule the server should have enforced (ADR 0049 §5.4, T260): the card shows this fixed tex…
item_id?: ItemIdThe item the request is about, when it names one: which of the proxy's profiles a tool call goes through (ADR 0049 §5.4…
items?: ApprovalItem[]The other items this one approval covers, one access each (ADR 0032 §3.1): the protected items an environment's referen…
items_warning?: stringSet when the agent asked for an item the person's latest version of the environment does not reference, or this device …
always_asks?: booleanThe target always asks (ADR 0032 §3.1, §4.2): «Approve 15 min» and «Add to the task» are not offered, whatever the serv…
tunnel?: TunnelClaimA WebSocket tunnel's handshake through the credential proxy (ADR 0052 §3), from the proxy's signed claims: only once th…
pg?: PgApprovalA Postgres session or statement through the credential proxy (ADR 0052 §9.6): the claims, and the statement opened from…

What to grant.

Framework
serde
Shape
›{3 fields }
projects?: string[]Projects whose keys the agent receives: `vault/project`, a project name unique across vaults, or an ID.
vaults?: string[]Vaults whose current projects are all granted.
policy: PolicyThe policy. Vault and project selectors may use names: they are resolved to IDs before signing (the server never sees n…

A verified grant.

Framework
serde
Shape
›{9 fields }
version: numberGrant version (1 for the first approval).
issued_at: numberWhen it was signed (Unix ms).
projects: GrantedProjectView[]Granted projects.
items?: GrantedItemView[]Items granted one by one (a per-item grant, ADR 0036 §2).
profiles?: ProxyProfile[]Where each item's value may go (the proxy's profiles).
policy: PolicyThe policy (selectors by ID, as signed).
v?: numberThe payload format (`v`): 3 with sandbox issuers or a sandbox proxy.
issuers?: SandboxIssuer[]On the credential proxy's grant: the agents that may start sandboxes through it (ADR 0036 §4).
sandbox?: IssuerGrantOn an issuer's grant: the proxy it starts sandboxes at (`proxy: null` when the account has none it may use).

An item granted one by one, with its current title.

Framework
serde
Shape
›{4 fields }
vault_id: VaultIdVault ID.
project_id: ProjectIdProject ID, as signed.
item_id: ItemIdItem ID.
title: stringItem title (empty if this device no longer sees it).

A granted project with its current names.

Framework
serde
Shape
›{4 fields }
vault_id: VaultIdVault ID.
vault: stringVault name (empty if this device no longer sees it).
project_id: ProjectIdProject ID.
project: stringProject name (empty if this device no longer sees it).

What a WebSocket tunnel's handshake names (ADR 0052 §3): the tunnel host and the path under the signed prefix, both the proxy's word of what the sandbox asked for. Cleaned and capped for one line.

Framework
serde
Shape
›{3 fields }
upgrade: stringThe upgrade, `websocket`.
host: stringThe tunnel host.
path: stringThe path, without its query.

An agent's current egress pin, as the chain shows it.

Framework
serde
Shape
›{4 fields }
agent: AgentIdThe agent.
networks: string[]Its pinned networks in canonical text form.
at: numberWhen the person signed this pin (Unix ms).
seq: numberThe position of that decision in the chain.

A profile the person attached to a live sandbox in their signed decision on that sandbox's secret request (ADR 0053 §5, Q6 (a)).

Framework
serde
Shape
›{2 fields }
profile: stringThe proxy profile, as the decision signed it.
request_id: SecretRequestIdThe secret request whose decision attached it.

Where this device stands on the audit log (ADR 0033 §8.1: «Verified up to event #1234»).

Framework
serde
Shape
›{2 fields }
events: numberThe last event this device downloaded (0: none yet).
verified?: numberThe last event this device verified (`klav log verify`), if any.

Filters for [`Unlocked::audit_log`].

Framework
serde
Shape
›{11 fields }
item?: stringAn item (reference or query, resolved on this device).
agent?: stringAn agent (name or ID).
vault?: stringA vault (name or ID).
since?: numberFrom this time (Unix ms).
until?: numberUntil this time (Unix ms).
alerts?: booleanOnly events with alerts.
task?: stringA task (ID, or a unique prefix of 6+ characters).
permissions?: Permission[]Only events with one of these permissions (ADR 0033 §8.1).
outcomes?: string[]Only events with one of these outcomes: `allow`, `ask` and `deny` from the policy, `approve` and `deny` from a decision.
text?: stringOnly events whose item (its reference, with the title, resolved on this device), agent, reason or site contain this tex…
limit?: numberAt most this many events, the newest that pass the other filters. An older `klavd` ignores it: the caller cuts what it …

An event ready to show.

Framework
serde
Shape
›{25 fields }
seq: numberPosition.
at: numberTime (Unix ms).
actor: string`you`, or the agent's name. Tell them apart by [`Self::by_agent`], never by this text: an agent may be called `you`.
by_agent?: booleanAn agent wrote the event (its actor kind is `agent`), not the person. Absent from an older `klavd`'s answers: `false`.
agent_id?: AgentIdThe agent involved.
agent_name?: stringThe name of the agent in `agent_id`, as the server lists it: who an action of the person, such as an `agent.granted`, w…
action: stringWhat happened.
permission?: stringPermission used.
outcome?: stringPolicy outcome or decision.
item?: stringItem reference (`klav://…`), if known on this device.
item_id?: ItemIdItem ID.
vault?: stringVault name, if known.
reason?: stringThe agent's reason.
domain?: stringClaimed host.
attachments?: AttachmentId[]Attachments delivered to the agent with this event (ADR 0016).
task_id?: TaskIdThe task this event belongs to (ADR 0021 §9).
approval_id?: ApprovalIdThe approval used or decided.
until?: numberIn `agents.paused`: when the pause ends by itself (Unix ms).
alerts?: string[]Alerts.
verified?: booleanAt or before the last event this device verified (`klav log verify`); a later one shows «not verified yet» (ADR 0033 §8…
mcp_tool?: stringThe MCP tool a proxied call named, according to the MCP server, as the proxy signed it (ADR 0049 §6). Only in its gramm…
local_client?: stringThe local client a proxied call was for, according to the proxy, as it signed it (ADR 0049 §6). Only in its grammar.
sandbox?: SandboxIdThe sandbox a proxied call was for, according to the proxy, as it signed it (ADR 0049 §6): who called, where a local cl…
tunnel?: TunnelClaimThe WebSocket tunnel a proxied call opened (ADR 0052 §3), as the proxy signed it: only when its claims keep their rules.
pg?: PgClaimThe Postgres session or statement a proxied call named (ADR 0052 §9.6), as the proxy signed it: database, class and ver…

A head to check the chain against.

Framework
serde
Shape
›{2 fields }
seq: numberPosition.
hash: number[]Hash at that position.

A proxy's current store epoch, as the chain shows it.

Framework
serde
Shape
›{3 fields }
proxy: AgentIdThe credential proxy.
store_epoch: BlobThe epoch of its last `sandbox.store_reset` (16 bytes).
seq: numberThe position of that reset in the chain.

Why this device had no pinned head to hold the chain against (ADR 0030 §4.8): the events up to now are trusted as the server sent them, checked only against heads signed by other devices.

Framework
serde
Shape
"missing" | "unreadable" | "other_account"

What `verify` checked.

Framework
serde
Shape
›{9 fields }
events: numberEvents in the chain.
agent_signatures: numberAgent signatures checked.
account_signatures: numberAccount signatures checked (grants, decisions).
heads: numberHeads signed by devices that matched.
signed_head?: numberThe head this device has signed: now, or in an earlier verification if the log has not grown since (a device does not s…
warnings?: string[]What could not be checked, without being a sign of tampering: an agent the server no longer lists, no head pinned on th…
unpinned?: UnpinnedWhy this device had no head of its own to hold the chain against, if it had none. Also in `warnings`, as [`Unpinned::wa…
store_epochs?: StoreEpoch[]The store epoch of each credential proxy's last `sandbox.store_reset` in the chain (ADR 0036 E3.3, spec §13.12), for pr…
egress_pins?: AgentEgressPin[]Each agent's current signed egress pin, in the order of its latest `agent.egress_pinned` (ADR 0044 §2.1, spec §13.13). …

N's mode-B offer as E reads it.

Framework
serde
Shape
›{7 fields }
ready: booleanWhether N submitted its key.
device_name?: stringUnauthenticated device name, if present.
device_kind?: DeviceKindUnauthenticated device kind, if present.
words?: stringSix words, once `ready`.
same_network?: booleanNetwork hint.
waiting: booleanWhether N is waiting in a claim long-poll.
expires_at: numberSlot expiry (Unix ms).

What mode A inspection shows the signed-in device.

Framework
serde
Shape
›{5 fields }
link_id: LinkIdSlot ID.
words: stringSix verification words.
waiting: booleanWhether N has a claim long-poll open.
same_network?: booleanNetwork hint; absent when unknown.
expires_at: numberSlot expiry (Unix ms).

A mode-B slot opened by the signed-in device.

Framework
serde
Shape
›{4 fields }
link_id: LinkIdSlot ID.
qr_text: stringQR contents.
text: stringCopyable text.
expires_at: numberSlot expiry (Unix ms).

What the person compares on both devices.

Framework
serde
Shape
›{1 field }
code: stringSix EFF words joined by spaces.

The variables an agent changed since the person's latest version (ADR 0032 §3, answer 7).

Framework
serde
Shape
›{4 fields }
agent_id: AgentIdThe agent that wrote the current version.
agent?: stringIts name, when this device could learn it.
at: numberWhen (Unix ms).
variables: string[]Variables added, changed or removed since the person's version.

One environment, for `klav env show`, `run` and `inject`: names and origins, never values.

Framework
serde
Shape
›{3 fields }
environment: EnvironmentListingThe environment, nested: flattened, its count of variables and the list below would share the key `variables`, and noth…
variables: VariableView[]Its variables, in order.
agent_changes?: AgentChangesWhat an agent changed since the person's latest version.

A change to an environment (`klav env create|set|rm|import`).

Framework
serde
Shape
›{6 fields }
create: booleanCreate it if it does not exist (else: it must exist).
must_be_new: booleanMust not exist yet (`klav env create`).
protected?: booleanTurn `protected` on or off.
set: NewVariable[]Variables to add or replace.
remove: string[]Variables to remove.
expires_at_ms?: number | nullExpiry edit: absent keeps it, `Some(Some(ms))` sets a new expiry, `Some(None)` makes the environment permanent.

One environment, for `klav env ls`.

Framework
serde
Shape
›{10 fields }
id: ItemIdThe item.
vault_id: VaultIdVault ID and name.
vault: string
project_id: ProjectIdProject ID and name.
project: string
name: stringIts name.
variables: numberHow many variables.
protected: booleanProtected (the effective flag, ADR 0032 §3).
updated_at: numberLast change (Unix ms).
author_agent_id?: AgentIdThe agent that wrote the current version, if one did.

What a prepared edit would do.

Framework
serde
Shape
›{7 fields }
name: stringThe environment's name.
created: booleanIt is new.
protected: booleanProtected after the edit.
newly_protected: string[]Items that become protected, by name.
unprotected: string[]Items that stop being protected by it, by name.
shrinks: booleanThe edit lowers the protection: presence first (ADR 0032 §3).
warnings?: string[]Variables an agent changed since the person's version, overwritten by this edit.

What saving did.

Framework
serde
Shape
›{8 fields }
name: stringThe environment's name.
id?: ItemIdIts item.
created: booleanIt was created.
protected: booleanProtected after the edit.
newly_protected: string[]Items that became protected, by name.
unprotected: string[]Items it stopped protecting, by name.
agents: string[]Agents whose grants were issued again, by name.
warnings: string[]What did not work (a grant that could not release an item: it stays over-protected until the next change).

A field with the same value as an imported variable.

Framework
serde
Shape
›{3 fields }
reference: string`klav://` by IDs.
name: string"Vault/Project/Item › field".
protected: booleanThat item is already protected.

The review of one variable of `klav env import`, never with its value.

Framework
serde
Shape
›{3 fields }
name: stringIts name.
status: ImportStatusNew, changed or the same.
matches?: ImportMatchA field of an existing item with the same value: proposed as a reference instead of a copy (by IDs), with its name.

What one variable of the value comparison of `klav env import` is.

Framework
serde
Shape
"new" | "changed" | "same"

A variable to set.

Framework
serde
Shape
›{3 fields }
name: stringIts name.
value?: SecretTextIts own value…
reference?: string…or a `klav://` reference (by name or by IDs).

Where a variable's value comes from, without the value.

Framework
serde
Shape
›union2 members · discriminated by origin
›| "value"{1 field }
origin: "value"
›| "reference"{4 fields }
origin: "reference"
reference: stringThe reference as stored (four IDs).
target?: stringThe item and field by name ("Stripe › api_key"), when this device sees it.
protected?: booleanThe target is in the protected set.

One variable, without its value.

Framework
serde
Shape
›intersection2 parts
›& {2 fields }
name: stringIts name.
resolve: string`klav://<vault>/<project>/<environment>/<NAME>` by IDs: what `run`, `inject` and `--reveal` resolve.

The values of one item for one page.

Framework
serde
Shape
›{4 fields }
id: ItemIdItem ID.
kind: ItemKindType.
title: stringTitle.
fields: FillValue[]Values, in the order to type them.

Which values `autofill` returns.

Framework
serde
Shape
"all" | "totp" | "pending"

One value to type.

Framework
serde
Shape
›{3 fields }
name: stringField name in the item (`username`, `password`, `totp`, `number`…).
kind: FieldKindField type.
value: SecretTextText to type: TOTP codes are computed, expiry dates formatted.

An item to offer on a page (metadata only, never secrets).

Framework
serde
Shape
›{10 fields }
id: ItemIdItem ID (what `autofill` takes).
kind: ItemKindType.
title: stringTitle.
username?: stringUsername of a login.
hint?: stringA non-secret hint: a card's last four digits, an identity's name.
location: string`vault/project`.
totp?: booleanThe login has a TOTP secret (its code is filled after the password).
pending?: booleanAn assisted change left a new password pending (ADR 0022 §5): the menu offers it next to the current one ([`FillPart::P…
relation?: HostRelationHow a login's URLs relate to the page (ADR 0025 §3).
site?: stringThe host the login was saved for, when the page is its parent (`my.example.com` on `example.com`): shown next to it.

What `suggest` offers for a page.

Framework
serde
Shape
›{6 fields }
host?: stringThe page's host, when it is fillable.
logins: Suggestion[]Logins whose URLs match the page (exact host or a subdomain), in that order: what may be filled without the person pick…
parent?: Suggestion[]Logins saved for a subdomain of the page (ADR 0025): offered in their own group, «Saved for a subdomain», and filled on…
codes?: Suggestion[]One-time codes saved on their own (kind `totp`, often imported from Google Authenticator) that name the page: their iss…
cards: Suggestion[]Payment cards.
identities: Suggestion[]Identities and addresses.

One line of the sheet: before → after.

Framework
serde
Shape
›intersection2 parts
›& {1 field }
widens: booleanWhether this line lets the agent do more.

The new policy of a [`GrantChange`].

Framework
serde
Shape
›union2 members
›| {1 field }
editor: EditorPolicy
›| {1 field }
rules: Policy

What a [`ChangeLine`] changes.

Framework
serde
Shape
›union7 members · discriminated by kind
›| "project_added"{2 fields }
kind: "project_added"
project: string`vault/project`.
›| "project_removed"{2 fields }
kind: "project_removed"
project: string`vault/project`.
›| "permission"{6 fields }
kind: "permission"
permission: PermissionThe permission.
before: EffectEffect before.
before_default: booleanWhether that was its default (no rule).
after: EffectEffect after.
after_default: booleanWhether this is its default (no rule).
›| "fill_sites"{3 fields }
kind: "fill_sites"
before: string[]Before.
after: string[]After.
›| "hours"{3 fields }
kind: "hours"
before: string[]Before, as `mon-fri 09:00-18:00 -06:00`.
after: string[]After.
›| "expires"{3 fields }
kind: "expires"
before?: numberBefore.
after?: numberAfter.
›| "rules"{1 field }
kind: "rules"

The policies the editor can show and write: what `klav agent approve` writes with `--allow`, `--ask`, `--deny`, `--fill-domain`, `--hours` and `--expires`. A grant whose policy is anything else is read-only in the apps ([`ReadOnlyReason::Rules`]).

Framework
serde
Shape
›{4 fields }
permissions?: PermissionSetting[]One per permission it sets; a permission left out is its default.
fill_sites?: DomainPattern[]Where `fill` may fill (`--fill-domain`); with sites, `fill` has no effect of its own.
hours?: TimeWindow[]Weekly windows for every rule (`--hours`); none is "always".
expires_at?: numberWhen the whole grant ends (Unix seconds); none is "never".

A change to an active agent's grant, as the editor or the CLI sends it. Its exact JSON goes into the digest of the sheet (F3): send the same value to prepare and to apply.

Framework
serde
Shape
›{4 fields }
projects?: string[]The projects of the new grant: `vault/project`, a project name unique across vaults, or an ID.
vaults?: string[]Vaults whose current projects are all in the new grant.
policy: ChangePolicyThe new policy.
rotate_removed?: booleanAlso change the key of each project taken away (P9: offered, unchecked): `rotate_project_key`, and new grants for the o…

The sheet of a change: what the person signs. No secrets.

Framework
serde
Shape
›{9 fields }
agent_id: AgentIdThe agent.
name: stringIts name (the agent's own words, T136).
version: numberThe version the new grant will have.
lines: ChangeLine[]Only the differences, one per line.
widens: booleanWhether the change lets the agent do more: it asks for Touch ID or the master password (P8). Prudent: what cannot be sh…
digest: stringBinds the sheet to the grant in force and to the change (F3).
removed_projects?: string[]Projects taken away (`vault/project`): the sheet offers to change their keys (P9).
rotate_removed?: booleanWhether the change also changes those keys.
warnings?: string[]What could not be checked, and what the person should know.

What [`Unlocked::commit_grant_change`] did.

Framework
serde
Shape
›{7 fields }
agent: AgentViewThe agent, with its new grant.
rotated?: RotationReport[]Keys of projects taken away that changed (with `rotate_removed`).
regranted?: string[]Other agents that got a new grant with those keys.
not_regranted?: string[]Other agents whose grant could not be issued again (`name: why`).
failed?: stringWhat stopped the key changes, if they stopped.
pending?: string[]Projects whose key still has to change (`vault/project`): `klavd` goes on with them by itself after the next unlock (P1…
skipped?: string[]Projects whose key cannot change from this device, and why (`vault/project: why`).

An agent's grant in force, as the editor shows it.

Framework
serde
Shape
›{8 fields }
agent_id: AgentIdThe agent.
name: stringIts name (the agent's own words: show it as such, T136).
version: numberThe grant's version (0 without one).
projects?: GrantedProjectView[]Its projects.
editable: booleanWhether the editor can change it.
reason?: ReadOnlyReasonWhy not, when it cannot.
editor?: EditorPolicyThe policy in the editor's model, when it fits.
policy?: PolicyThe policy as signed, when this device reads it (to show a read-only grant in words).

One permission in the editor: an effect, or none for its default (no rule, ADR 0006 §1).

Framework
serde
Shape
›{2 fields }
permission: PermissionThe permission.
effect?: EffectIts effect; `None` for the default.

Why the apps cannot change a grant (they show it in words instead).

Framework
serde
Shape
"not_active" | "no_grant" | "unreadable" | "proxy" | "issuer" | "rules"

Where the age of a password comes from.

Framework
serde
Shape
"record" | "created"

A password seen in breaches.

Framework
serde
Shape
›{2 fields }
item: HealthItemWhere.
count: numberHow many times Have I Been Pwned saw it.

An item with a problem, as the report shows it: never a value.

Framework
serde
Shape
›{10 fields }
id: ItemIdItem ID.
vault_id: VaultIdVault ID.
project_id: ProjectIdProject ID.
reference: string`klav://vault/project/item` (by name).
kind: ItemKindType.
title: stringTitle.
username?: stringUsername, if any.
hosts: string[]Hosts of its URLs.
field: stringThe field's name.
field_label: stringThe field's label (its name if it has none).

Local health settings (`health.json`, not synced, not secret).

Framework
serde
Shape
›{1 field }
breach_check?: booleanCheck passwords against Have I Been Pwned. Off by default.

An old password.

Framework
serde
Shape
›{4 fields }
item: HealthItemWhere.
since_ms: numberUnchanged since (Unix ms).
days: numberWhole days since then.
source: AgeSourceWhere `since_ms` comes from.

Items that share one password.

Framework
serde
Shape
›{1 field }
items: HealthItem[]Two or more items, by title.

The vault health report: items, hosts and reasons, never values.

Framework
serde
Shape
›{8 fields }
checked_at: numberWhen it was computed (Unix ms).
items: numberItems looked at.
passwords: numberPassword fields looked at.
skipped?: numberItems that could not be opened (left out).
reused: ReusedGroup[]Groups of items that share a password, largest first.
weak: WeakPassword[]Weak passwords.
old: OldPassword[]Passwords unchanged for more than a year, oldest first.
breaches: BreachReportThe breach check.

A weak password.

Framework
serde
Shape
›{3 fields }
item: HealthItemWhere.
score: number`zxcvbn` score, 0 (worst) to 4.
generated_bits?: numberKnown entropy in bits, when the value came out of the generator.

Which generator history entries to delete.

Framework
serde
Shape
›union2 members
›| {1 field }
some: number[]
| "all"

A generator history entry as shown: no value (see [`Unlocked::generated_value`]).

Framework
serde
Shape
›{5 fields }
created_at: numberWhen it was generated (Unix ms); also its ID.
host?: stringThe site it was generated for.
saved_in?: ItemIdThe login it was saved in.
saved_in_title?: stringTitle of that login, if this device has it.
pending: booleanStill only in this device's outbox (not synced yet).

The password history of an item.

Framework
serde
Shape
›{3 fields }
entries: PreviousPasswordView[]Previous passwords, newest first.
pending: booleanA new password generated but not confirmed yet (assisted change).
pending_since?: numberWhen that pending password was generated (Unix ms).

A previous password of an item as shown: no value (see [`Unlocked::previous_password`]).

Framework
serde
Shape
›{6 fields }
index: numberPosition, newest first: what `previous_password` takes.
field: stringField name.
label: stringField label.
from_ms?: numberSince when it was current (Unix ms), if known.
to_ms: numberUntil when it was current (Unix ms).
unconfirmed?: booleanGenerated for an assisted change that was never confirmed (ADR 0022 §5): the site may or may not have it.

What the person does with Klav Cloud's proxy: `klav proxy use klav`, `klav proxy cloud stop` and `klav proxy cloud reset`, and the apps' buttons (ADR 0051 §6.1, §6.3, §4.4).

Framework
serde
Shape
"use" | "stop" | "reset"

What a [`CloudAction`] did: the proxy's status after it, and what the person should read (issuers to add again, provider tokens to rotate).

Framework
serde
Shape
›{2 fields }
status: ProxyStatus`klav proxy status` after the change.
notes?: string[]What it did and what is left to the person, one sentence each.

The enclave image an attestation matched, as the manifest lists it.

Framework
serde
Shape
›{7 fields }
version: stringIts version (`0.12.0`).
commit: stringIts commit, 40 hex characters.
arch: string`aarch64` or `x86_64`.
status: string`current` or `draining`.
pcr0: stringPCR0, PCR1 and PCR2, 96 hex characters each.
pcr1: stringPCR1.
pcr2: stringPCR2.

`klav proxy cloud status`, the apps' row: never a value or a key.

Framework
serde
Shape
›{12 fields }
state: HostedStateWhere it stands.
reason?: stringA short code of why, when not verified (`image_revoked`, `manifest_rollback`, `not_enrolled`, …).
message: stringThe sentence to show.
agent_id?: AgentIdThe account's hosted agent, from the preferences.
generation?: numberIts generation, as the enclave said and the attestation bound.
channel?: stringIts channel, `a<agent_id hex>.<endpoint>` (ADR 0051 §3.4).
entitled?: booleanThe server's word on the account's entitlement (absent from a server older than it, or when it couldn't be read).
image?: HostedImageViewThe image it runs, when verified.
manifest_seq?: numberThe `seq` of the manifest it was checked against.
seed_epoch?: numberThe manifest's `seed_epoch`.
checked_at_ms: numberWhen this device checked (Unix ms).
endpoint: stringThe endpoint it asked.

What a reset did.

Framework
serde
Shape
›{5 fields }
agent?: ProxyAgentViewThe new hosted agent, as the server reports it.
shared: string[]The credentials shared with it.
share_failed?: stringSharing them failed: why (the setting is not changed then).
revoked?: RevokeReportThe old agent's revocation.
issuers: IssuerResignThe old agent's issuers, re-signed with no proxy: the person adds them again for the new one, whose address changed.

Where the hosted proxy stands, as this device checked it just now.

Framework
serde
Shape
›union7 members
| "verified"
| "unverified"
| "unreachable"
| "not_entitled"
| "lost_keys"
| "revoked"
| "unsupported"

`klav proxy cloud stop`: the hosted agent revoked (with its item keys changed) and the setting cleared.

Framework
serde
Shape
›{3 fields }
revoked?: RevokeReportThe revocation, when the server still had the agent.
issuers: IssuerResignThe issuers of the revoked agent, re-signed with no proxy. Issuers of another live proxy are not touched.
rotate_at_provider: string[]The provider tokens it held: the person rotates them at each provider (ADR 0036 §18).

`klav proxy cloud reset`, checked: a new agent at the next generation (ADR 0051 §3.2, §4.4).

Framework
serde
Shape
›{3 fields }
old_agent_id?: AgentIdThe agent it replaces, if the account had one.
new: PreparedHostedUseThe new agent and what it verified.
credentials: string[]The credentials it shares with the new agent.

`klav proxy use klav`, checked: the enrolled agent and what the sheet shows before presence (ADR 0051 §6.1 step 4).

Framework
serde
Shape
›{4 fields }
agent_id: AgentIdThe hosted agent the enclave registered for the account.
view: HostedProxyViewWhat it verified.
replaces_agent?: AgentIdThe agent that wrote the preferences this replaces, if one did.
warnings?: string[]What the person should know before confirming.

What an import would do. No secret values.

Framework
serde
Shape
›{8 fields }
vault: stringDestination vault (name).
project: stringDestination project (name).
sources: SourceReport[]What each file contributed.
totals: TotalsCounts.
rows: Row[]One row per entry, the first `max_rows`.
rows_total: numberHow many rows there are in all.
passkeys: numberPasskeys that will not be imported.
missing: MissingBatch[]Google Authenticator codes still missing.

What an import did.

Framework
serde
Shape
›{7 fields }
vault: stringDestination vault (name).
project: stringDestination project (name).
created: numberItems created.
updated: numberItems of the project updated.
totals: TotalsCounts per entry.
passkeys: numberPasskeys not imported.
passkeys_failed?: string[]Passkeys of the file that could not be saved, as `"<title>: <why>"`: their login was imported without them.

What an issuer change does, to show before presence. Names, limits, the proxy's address and the issuer's words: never a key.

Framework
serde
Shape
›{23 fields }
issuer_id: AgentIdThe issuer.
issuer: stringIts name.
pending: booleanThe issuer is pending: this approves it, with its words.
pairing_code: stringIts 6 pairing words, from the key this change signs for.
proxy_id: AgentIdThe credential proxy.
proxy: stringIts name.
remove: boolean`true` for `issuer remove`.
url?: stringThe proxy's address the issuer's grant names (empty on remove).
profiles?: string[]Profiles its sandboxes may use.
max_ttl_secs?: numberLongest TTL, in seconds.
max_live?: numberMost live sandboxes.
inject_allowed?: booleanThe issuer's policy lets it `inject` somewhere without asking.
inject_ask?: booleanThis change puts `inject` in `ask` for it.
first_on_account?: booleanThe account's first `v: 3` grant: older devices break.
proxy_base_version: numberThe proxy's grant version this change is built on.
issuer_base_version: numberThe issuer's grant version this change is built on (0: none).
issuer_changes: booleanWhich grants change: the issuer's, the proxy's.
proxy_changes: booleanSee `issuer_changes`.
warnings?: string[]Warnings to show before presence.
secret_requests?: booleanIts sandboxes may ask the person for secrets once this is signed (ADR 0053 Q3 (a)). Absent from an older client: no.
secret_requests_changes?: booleanThis changes the opt-in (on or off), not only the issuer's limits.
turns_sandbox_secret_requests_on?: booleanThe account's `sandbox_secret_requests` switch is off and this turns it on before the proxy's grant is signed (ADR 0053…
sandbox_secret_requests_first?: booleanThis turns the opt-in on while the switch is off or the proxy's grant holds none yet, and the account may hold an older…

What an issuer change did. Both grants or neither is the goal; the order makes a half-done change harmless (the proxy refuses an issuer it does not list), and running the same command again finishes it.

Framework
serde
Shape
›{4 fields }
issuer: AgentViewThe issuer, as it is now.
issuer_done: booleanThe issuer's grant was uploaded (or had nothing to change).
proxy_done: booleanThe proxy's grant was uploaded (or had nothing to change).
failed?: stringWhat stopped it, if it stopped.

The issuers of re-signs that a change of the proxy setting did.

Framework
serde
Shape
›{2 fields }
done?: string[]Issuers whose grant now names no proxy.
failed?: string[]Issuers whose grant could not be re-signed (`name: why`). Running `klav proxy use` again finishes them.

What the person asks for in `klav proxy issuer add`.

Framework
serde
Shape
›{6 fields }
profiles: string[]Profiles of the proxy its sandboxes may use.
url: stringWhere a sandbox reaches the proxy: `tls://host:port` (spec §13.10).
max_ttl_secs?: numberLongest TTL it may give a sandbox, in seconds (default 8 h).
max_live?: numberMost of its sandboxes alive at once (default 3).
inject_ask?: booleanPut `inject` in `ask` in the issuer's grant (ADR 0036 E6.2, Q-D).
secret_requests?: booleanWhether its sandboxes may ask the person for secrets through the proxy (ADR 0053 Q3 (a), `--secret-requests`): `Some(tr…

Result of [`Unlocked::grant_items`].

Framework
serde
Shape
›{11 fields }
agent: AgentViewThe agent: with its new grant when `granted`, else as it was.
granted: booleanThe new grant was uploaded. `false` when giving the dropped items new keys or uploading the grant failed (`failed` says…
rekeyed?: ItemId[]Items the new grant no longer shares whose key changed.
regranted?: string[]Other agents that got a new grant with the new item keys.
not_regranted?: string[]Other agents whose grant could not be re-issued (`name: why`): they still hold the old keys of those items. Run it agai…
failed?: stringWhat stopped the key changes, if they stopped.
pending?: ItemId[]Items whose key still has to change (the failed one first).
unconfirmed?: ItemId[]Items whose new key the server took, but whose sync after it failed: the key changed on the server and this device has …
to_reissue?: string[]The other agents that hold an item in `unconfirmed` and need a new grant with its new key (empty if they could not be l…
gone?: ItemId[]Items that dropped out of the grant that this device no longer sees (purged): no key left to change, but the agent may …
reissue_only?: booleanThis only re-issued the grants of other agents that still hold an item the proxy no longer has (a retry after a failed …

What to grant item by item.

Framework
serde
Shape
›{5 fields }
items: ItemLocation[]The items whose keys the agent receives.
profiles?: ProxyProfile[]Where each value may go (ADR 0036 §2).
policy: PolicyThe policy: `proxy` rules that name the items and their hosts, and `deny` for `reveal`, `inject` and `fill`. Vault and …
issuers?: SandboxIssuer[]The agents that may start sandboxes through this proxy (`v: 3`, ADR 0036 §4). A change to the credentials carries them …
local_clients?: LocalClient[]The MCP clients on the person's Mac that may use its MCP profiles (`v: 4`, ADR 0049 §3.2). A change to the credentials …

An error line.

Framework
serde
Shape
›{3 fields }
v: number[`VERSION`].
error: stringA code: [`codes`].
message: stringWhat happened, in English.

A request line: `{"v":1,"op":"sandboxes"}` or `{"v":1,"op":"revoke","scope":"…"}`, nothing else.

Framework
serde
Shape
›{3 fields }
v: number[`VERSION`].
op: string`sandboxes` or `revoke`.
scope?: stringWith `revoke`, and only then: a sandbox ID, or [`SCOPE_ALL`].

The answer to `revoke`.

Framework
serde
Shape
›{3 fields }
v: number[`VERSION`].
revoked: SandboxId[]The sandboxes it ended (none for `all` with none live).
logged: booleanWhether the Klav server already has every end (`person_local`). When not, the proxy sends them on its next sweeps; it s…

One live sandbox, as the proxy holds it.

Framework
serde
Shape
›{9 fields }
sandbox_id: SandboxIdIts ID.
issuer_id: AgentIdThe agent that started it.
label: stringThe label its issuer wrote: the issuer's words, shown as such.
profiles: string[]Its profiles.
issued_at: numberWhen it started (Unix ms).
expires_at: numberWhen it ends (Unix ms).
claimed: booleanWhether its forwarder claimed it.
connected: booleanWhether its forwarder is connected now.
last_seen_at?: numberThe last call over its channel, or its claim (Unix ms, proxy clock).

The answer to `sandboxes`.

Framework
serde
Shape
›{9 fields }
v: number[`VERSION`].
proxy_id: AgentIdThe proxy's agent ID: the app compares it with the account's proxy.
port: numberThe port of its loopback listener (`127.0.0.1:PORT`).
local_calls: booleanWhether it serves profile calls on that listener (not with `--no-local-calls`): local MCP clients need it.
channel: booleanWhether it also listens for sandboxes' forwarders (`--channel`).
mcp_gateway: booleanWhether the account's MCP gateway is on, as the proxy last heard.
mcp_profiles: string[]Its MCP profiles, by name: `http://127.0.0.1:PORT/<name>/…`.
sandboxes: LocalSandbox[]Its live sandboxes, newest first.
unsent_ends: numberEnds waiting for the Klav server.

An agent the person can offer the task to.

Framework
serde
Shape
›{2 fields }
id: AgentIdID.
name: stringName.

Why a login cannot go in the task. Shown unchecked, and cannot be checked.

Framework
serde
Shape
"not_granted" | "no_site" | "not_login" | "other_field"

What the person approves: the agent, the logins left checked, and optionally their own title, reason and duration.

Framework
serde
Shape
›{5 fields }
agent: stringThe agent (ID, unique ID prefix or name).
items: ItemId[]The logins.
task?: stringTitle ([`DEFAULT_OFFER_TASK`] when absent).
reason?: stringReason ([`DEFAULT_OFFER_REASON`] when absent).
duration_secs?: numberDuration in seconds ([`DEFAULT_OFFER_SECS`] when absent; 5 minutes to 24 hours).

One login on the offer card. Metadata only: never a value.

Framework
serde
Shape
›{11 fields }
item_id: ItemIdItem.
vault_id: VaultIdVault.
project_id: ProjectIdProject.
reference: string`klav://vault/project/item`.
title: stringTitle.
username?: stringUsername.
hosts: string[]The item's hosts (normalized): where the agent may change it.
change_url?: ChangePasswordUrlThe site's change-password page (`change_password_url`, ADR 0022 §1.3).
group?: numberWhich group of logins sharing one password it is in (1, 2…), for the person only: the agent never gets it.
permissions: Permission[]What the task would hold: `rotate`, and `totp` if the login has a one-time code and the policy does not deny it.
blocked?: OfferBlockWhy it cannot go in the task, if so.

The «Fix my reused passwords» card: the agents that can take it and the logins that share a password, with their change pages.

Framework
serde
Shape
›{6 fields }
agents: OfferAgent[]Active agents with a grant.
agent?: OfferAgentThe agent the rows were checked against (its grant and policy).
rows: OfferRow[]The logins, sorted by host. Blocked ones last.
task: stringDefault title, reason and duration.
reason: stringDefault reason.
duration_secs: numberDefault duration (seconds).

One site of a task with `rotate`.

Framework
serde
Shape
›{7 fields }
item_id: ItemIdItem.
reference?: string`klav://…`, if this device knows the item.
title?: stringTitle, if this device knows the item.
hosts: string[]The hosts the task allows.
state: SiteStateState.
started?: booleanThe agent started a change and has not closed it yet.
at?: numberTime of the last `rotate.*` event for this site (Unix ms).

A site's state in a task with `rotate` (`klav log --task`).

Framework
serde
Shape
"changed" | "pending" | "failed"

The sites of a task with `rotate` and where each one is.

Framework
serde
Shape
›{4 fields }
task_id: TaskIdThe task.
card?: TaskCardIts card, while the server still lists it.
sites: SiteProgress[]One per login with `rotate`, in the task's order. Empty, with [`Self::log_warning`], when the audit log cannot be read:…
log_warning?: stringWhy `sites` is empty: the audit log could not be read as this device holds it (ADR 0033 §8.4). The card still comes fro…

A field value to set.

Framework
serde
Shape
›{4 fields }
name: stringField name (`[a-z0-9][a-z0-9_-]{0,63}`).
value: SecretTextValue.
kind?: FieldKindType for a field the item does not have yet (default: `text`, or `concealed` when `secret` is set).
secret?: booleanThe value was entered as a secret (prompt or stdin).

One field as shown to the user.

Framework
serde
Shape
›{7 fields }
id: FieldIdID (for stable references).
name: stringName (in `klav://…/<field>`).
label: stringLabel.
kind: FieldKindType.
secret: booleanSecret type.
filled: booleanHas a value.
value?: SecretTextThe value: plain fields always; secret fields only when revealed.

Changes to an item.

Framework
serde
Shape
›{9 fields }
title?: stringNew title.
set?: FieldInput[]Fields to set (created if missing).
remove?: string[]Fields to remove.
add_urls?: string[]URLs to add.
remove_urls?: string[]URLs to remove (exactly as stored): a site an agent added that the person does not want (ADR 0030 §7).
add_tags?: string[]Tags to add.
notes?: SecretTextNew notes.
expires_at_ms?: number | nullExpiry edit: absent keeps the current expiry, `Some(Some(ms))` sets a new expiry, and `Some(None)` clears it to make th…
allow_duplicate?: booleanRename even if another live item of the project already has the new title (references by title become ambiguous).

An item as shown to the user.

Framework
serde
Shape
›intersection2 parts
›& {5 fields }
fields: FieldView[]Fields.
has_notes: booleanHas notes.
notes?: SecretTextNotes, only when revealed.
attachments?: AttachmentMeta[]Attachments (name and size; content via `inject`).
revealed: booleanSecret values are included.

A new item.

Framework
serde
Shape
›{10 fields }
kind: ItemKindType.
title: stringTitle.
vault?: stringVault name or ID (default: the "Personal" vault, or the only one).
project?: stringProject name or ID (default: "General").
fields?: FieldInput[]Field values.
urls?: string[]URLs.
tags?: string[]Tags.
notes?: SecretTextNotes.
expires_at_ms?: numberExpiry of a temporary item (Unix milliseconds); absent when permanent. Validated against this device's clock when the i…
allow_duplicate?: booleanCreate it even if an item with the same title already exists in the project (references by title become ambiguous).

A complete item in transit (CSV import through the daemon): its two plaintext sections, as `klav-core` encodes them before encryption.

Framework
serde
Shape
›{3 fields }
id: ItemIdItem ID.
overview: SecretBytesOverview section (JSON).
details: SecretBytesDetails section (JSON, with the secrets).

A secret produced for the caller (`run`, `inject`).

Framework
serde
Shape
›{4 fields }
reference: stringThe reference as asked.
canonical: stringThe canonical reference.
kind: FieldKindField type (`file` for attachments).
value: SecretBytesValue: UTF-8 text, or the file content for `file` fields.

A TOTP code.

Framework
serde
Shape
›{2 fields }
code: SecretTextThe code.
remaining: numberSeconds until it changes.

A signature over a `clientDataHash` the platform built (iOS hands the hash, not the JSON). Nothing secret.

Framework
serde
Shape
›{5 fields }
credential_id: number[]Credential ID.
authenticator_data: number[]Authenticator data.
signature: number[]ES256 signature (DER).
user_handle: number[]User handle.
item: ItemIdThe login that signed.

A passkey for the platform's list of credentials (`ASPasskeyCredentialIdentity`). Nothing secret.

Framework
serde
Shape
›{6 fields }
item: ItemIdThe login.
title: stringIts title.
rp_id: stringRelying party ID.
user_name: string`user.name`.
credential_id: number[]Credential ID.
user_handle: number[]User handle.

What waits in the outbox, for «Open Klav to sync this passkey».

Framework
serde
Shape
›{2 fields }
passkeys: [ItemId, string][]The logins with a queued passkey, by title.
uses: numberSign-ins waiting to be logged.

What the flush did.

Framework
serde
Shape
›{7 fields }
uploaded: numberRegistrations uploaded (or found already on the server).
renamed: numberNew logins renamed because another item took their title.
uses_sent: number`passkey.used` events sent.
left: numberEntries left for the next time (the error of the first one).
error?: stringWhy the first entry left failed.
set_aside?: numberOutboxes set aside (by this flush or by the AutoFill extension's write, [`SET_ASIDE`]) that the app has not acknowledge…
set_aside_ids?: string[]The names of those outboxes, to acknowledge exactly these once the notice is shown: one set aside later is not covered.

How a registration without network ends.

Framework
serde
Shape
›union3 members
›| intersection2 parts
›& {1 field }
status: "created"
›| {1 field }
status: "excluded"
›| {3 fields }
status: "exists"
item: ItemIdThe login.
title: stringIts title.

A registration made without network. Nothing secret.

Framework
serde
Shape
›{5 fields }
credential_id: number[]Credential ID.
attestation_object: number[]Attestation object (`fmt: none`).
authenticator_data: number[]Authenticator data.
item: ItemIdThe login, already usable on this device; it syncs when the app opens.
title: stringIts title.

An assertion for the page (`PublicKeyCredential` of a `get`). Every binary value is base64url without padding.

Framework
serde
Shape
›{6 fields }
credential_id: stringCredential ID (also `rawId`).
client_data_json: string`clientDataJSON`.
authenticator_data: string`authenticatorData`.
signature: stringES256 signature, DER.
user_handle: string`userHandle`.
item: ItemIdThe login that signed.

A login that holds a passkey for the rpId. No secrets.

Framework
serde
Shape
›{5 fields }
item: ItemIdThe login.
title: stringIts title.
user_name: string`user.name` of the passkey.
credential_id: stringCredential ID, base64url.
vault: stringVault name, to tell logins of different vaults apart.

The answer to «which passkeys does Klav have here?».

Framework
serde
Shape
›{2 fields }
rp_id?: stringThe rpId, when Klav handles this page. `None`: the origin or the rpId did not pass the checks of ADR 0020 §7, and the c…
candidates: PasskeyCandidate[]Matching logins (exact rpId; filtered by `allowCredentials` when the page gave one).

The outcome of a `create`.

Framework
serde
Shape
›union4 members
›| intersection2 parts
›& {1 field }
status: "created"
›| {1 field }
status: "browser"
›| {1 field }
status: "excluded"
›| {3 fields }
status: "exists"
item: ItemIdThe login.
title: stringIts title.

What the page asks to create (`PublicKeyCredentialCreationOptions`, already reduced by the extension).

Framework
serde
Shape
›{12 fields }
origin: stringThe sender's origin, as the browser reported it.
rp_id?: string`rp.id`; the origin's host when absent.
rp_name?: string`rp.name`.
user_id: string`user.id`, base64url.
user_name: string`user.name`.
user_display_name?: string`user.displayName`.
challenge: string`challenge`, base64url.
exclude_credentials?: string[]`excludeCredentials`, base64url IDs.
item?: stringPut it in this existing login (ID) instead of a new one.
replace?: booleanThe person confirmed replacing the passkey of the same account (same rpId and user handle, ADR 0020 §2).
vault?: stringVault of a new login (default vault when absent).
project?: stringProject of a new login (default project when absent).

A created passkey, for the page (`PublicKeyCredential` of a `create`).

Framework
serde
Shape
›{9 fields }
credential_id: stringCredential ID (also `rawId`).
client_data_json: string`clientDataJSON`.
attestation_object: string`attestationObject` (`none`).
authenticator_data: string`getAuthenticatorData()`.
public_key: string`getPublicKey()`: SubjectPublicKeyInfo DER.
public_key_algorithm: number`getPublicKeyAlgorithm()`: -7.
transports: string[]`getTransports()`.
item: ItemIdThe login that holds it.
title: stringIts title.

A Postgres approval as a card shows it. The claims (`database`, `class`, `verbs`) passed their grammar on this device; `sql` and `params` are the sealed statement's, escaped. Its `Debug` shows only sizes.

Framework
serde
Shape
›{10 fields }
database: stringThe database the proxy names (`pg_database`).
class?: SqlClass`write`, `ddl`, `admin` or `unknown`; `None` for a session's access.
verbs?: string[]The leading verbs, from a closed vocabulary (`DELETE`, `DROP TABLE`).
state: PgStatementStateWhat the card can show.
sql?: stringThe exact statement, escaped ([`escape_sql`]): only when `Shown`.
params?: string[]Each parameter, escaped: `NULL`, a text value in quotes, or a binary one as its length and hex. Only when `Shown`.
param_count?: numberHow many parameters the statement carries (when `Shown`).
statement_len?: numberThe statement's length in bytes (when `Shown`).
can_approve?: booleanWhether "Approve once" may be offered.
can_lease?: booleanWhether "Approve 15 min" may be offered: never for `admin` or `unknown` (§13 #11), and only with something approvable.

What an Activity row names of a Postgres access (ADR 0052 §9.6): the claims the proxy signed, never SQL (the log has only class, verbs and digest).

Framework
serde
Shape
›{3 fields }
database: stringThe database.
class?: SqlClassThe class; `None` for a session's access.
verbs?: string[]The verbs.

What a card can show of a Postgres approval's statement.

Framework
serde
Shape
"session" | "shown" | "too_large" | "tampered" | "closed"

A change to one local MCP client of the proxy's grant (ADR 0049 §3.2).

Framework
serde
Shape
›union2 members
›| {1 field }
›set: {2 fields }
profiles: string[]The MCP profiles it may use.
token_digest?: Blob`SHA-256(tuple("klav/v1/proxy/local-client", proxy, token))`.
| "remove"

What a local client change will sign, shown before presence. Never a token or a digest.

Framework
serde
Shape
›{9 fields }
agent_id: AgentIdThe proxy's agent.
agent: stringIts name.
base_version: numberThe grant version this change starts from.
name: stringThe client's name (`claude-code`).
before?: string[]Its profiles before (absent: a new client).
profiles: string[]Its profiles after (empty: removed).
endpoints: [string, string][]Each of those profiles' MCP endpoint, as signed: the client's URL is `http://127.0.0.1:<port>/<profile><endpoint>`.
new_token: booleanA new token is signed: the old one, if any, stops working.
warnings?: string[]What the person should know before confirming.

A local MCP client the proxy's grant names (ADR 0049 §3.2): never its token, nor its token's digest.

Framework
serde
Shape
›{2 fields }
name: stringIts name (`claude-code`).
profiles: string[]The MCP profiles it may use.

What makes a credential an MCP profile (ADR 0049 §2.1, §5.3): the upstream's MCP endpoint, its fixed headers, and which tools are allowed, asked for or denied. A tool none of them names is denied and hidden from `tools/list` (Q3).

Framework
serde
Shape
›{5 fields }
endpoint: stringThe endpoint's path on the upstream (`/mcp`).
headers?: McpHeader[]Fixed, non-secret headers sent on every request.
tools_allow?: string[]Tool patterns that go through.
tools_ask?: string[]Tool patterns each call of which asks the person first.
tools_deny?: string[]Tool patterns refused (and hidden from the list).

What `--preset postgres` makes (ADR 0052 §7, Q9 (a)): how the proxy reaches the database, which databases, the item field with the role, and the SQL policy. The item's main secret is the password.

Framework
serde
Shape
›{7 fields }
transport: PgTransport`direct` (`--pg-direct host:port`) or `northflank_addon` (`--pg-northflank-addon project/addon`).
databases: string[]1–4 databases (`--pg-database`, repeatable), or empty to derive the one of a database item (ADR 0054 §4).
user_field: stringThe item field that holds the role name (`--pg-user`), or empty for the default (`username`, derived or not).
tls: PgTlsTLS toward the database: `verify-full` (on a Northflank addon, inside the tunnel) unless `--pg-tls none` (on a Northfla…
write_item?: stringA second item, a role allowed to write, used only for approved writes (`--pg-write-item`): its title, ID or reference.
allow_cleartext?: booleanThe proxy may answer a cleartext password request, over direct `verify-full` TLS only (`--pg-cleartext`, Q11).
read_only?: boolean`--read-only`: writes, schema changes, admin and unknown statements are refused instead of asking.

The proxy's agent, as the server reports it.

Framework
serde
Shape
›{6 fields }
id: AgentIdAgent ID.
name: stringIts name.
status: AgentStatusIts state.
pairing_code: stringIts 6 pairing words.
paused: booleanPaused by the person.
last_seen_at?: numberLast signed request (Unix ms, minute precision).

What `klav proxy grant` or `revoke` will sign, shown before presence.

Framework
serde
Shape
›{25 fields }
agent_id: AgentIdThe proxy's agent.
agent: stringIts name.
first: booleanIt has no grant yet: the person compares its 6 words now.
pairing_code: stringIts 6 words.
base_version: numberThe grant version this change starts from (0: none).
item_id: ItemIdThe item granted or taken away.
title: stringIts title.
place?: stringIts vault and project, `Vault/Project` (empty if this device no longer sees it). The dialog shows it next to the title,…
site?: stringThe host of its first website, if it has one.
holders?: string[]With `reissue_only`: the other agents whose grants it re-issues.
credential?: ProxyCredentialViewGranted: the profile and rules it gets (none when taken away).
replaces?: booleanThe item already had a profile, which this replaces.
dropped?: ItemId[]Items the grant held that this device no longer sees where the grant names them (purged, or moved to another project): …
warnings?: string[]What the person should know before confirming.
first_on_account?: booleanNo agent of the account holds a per-item grant yet: this one breaks devices older than them ([`OLDER_CLIENTS`]), so it …
reissue_only?: booleanThe item is no longer the proxy's: this only re-issues the grants of other agents that still hold it, after an earlier …
issuers_losing?: string[]Issuers that lose a profile with this change (and, with none left, stop being issuers): their names, for the dialog. Th…
issuers_keeping?: string[]Issuers that keep the profile this grant writes, under the rules it signs: their names. A re-grant under the same name …
local_clients_losing?: string[]Local MCP clients that lose a profile with this change (ADR 0049 §3.2): their names. Absent from an older client: none.
turns_mcp_gateway_on?: booleanThe account's MCP gateway switch is off and this grant turns it on before it signs (ADR 0049 §9). Absent from an older …
mcp_first?: booleanThis writes an MCP profile while the switch is off or the proxy's grant is older than `v: 4`: older devices and proxies…
turns_proxy_tunnels_on?: booleanThe account's `proxy_tunnels` switch is off and this grant turns it on before it signs (ADR 0052 §10). Absent from an o…
tunnels_first?: booleanThis writes a tunnel profile while the switch is off or the proxy's grant is older than `v: 5`: older devices and proxi…
turns_pg_guard_on?: booleanThe account's `pg_guard` switch is off and this grant turns it on before it signs (ADR 0052 §10). Absent from an older …
pg_first?: booleanThis writes a Postgres profile while the switch is off or the proxy's grant holds none yet: older devices and proxies b…

How a credential may be used through the proxy: its profile and the rules for it. A caller with a preset (ADR 0036 §7, `klav proxy grant --preset`) fills it in before it gets here: every part is explicit, and the same spec makes the same profile and rules ([`credential_profile`]).

Framework
serde
Shape
›{13 fields }
profile: stringProfile name: the first segment of the proxy's local URL.
upstream: stringWhere requests go: `https://host[:port]`.
header: stringThe header the value goes in.
prefix?: stringText before the value (`Bearer `).
field?: stringThe field holding the value; none: the item's main secret.
methods: string[]HTTP methods let through (at least one).
path_prefixes: string[]Path prefixes let through (at least one; `/` for every path).
ask?: booleanEvery call asks the person first, instead of going through.
ask_methods?: string[]More methods, each call of which asks the person first.
rate_per_minute?: numberMost calls per minute.
mcp?: McpSpecAn MCP profile (ADR 0049 §2): its endpoint, fixed headers and tool rules. Absent for every other profile, so a spec wit…
tunnel?: TunnelSpecWebSocket tunnels (ADR 0052 §2, §5): the hosts a handshake may reach and whether each one asks. Absent for every other …
pg?: PgSpecA Postgres profile (ADR 0052 §7): `--preset postgres`. Absent for every other profile, so a spec without it is the byte…
Framework
serde
Shape
›{4 fields }
item_id: ItemIdItem.
title: stringIts title (empty if this device no longer sees it).
profile?: ProxyProfileIts profile (none in a grant someone wrote by hand).
rules: ProxyRuleView[]The `proxy` rules that name it.

One agent the proxy's verified grant lets start sandboxes. Its ID, profiles and limits are what the account signed; its name and state are the server's word, as in `klav agent ls`.

Framework
serde
Shape
›{7 fields }
agent_id: AgentIdThe issuer.
name?: stringIts name, as the server lists it (absent when it no longer does).
status?: AgentStatusIts state, as the server lists it (absent when it no longer does): `pending` until its own grant approves it (`klav pro…
profiles: string[]The proxy's profiles its sandboxes may use.
max_ttl_secs: numberLongest TTL it may give a sandbox, in seconds.
max_live: numberMost of its sandboxes alive at once.
url?: stringWhere its own signed grant tells it a sandbox reaches this proxy (`tls://host:port`): absent when this device cannot re…

A rule of the proxy's grant, as the person reads it.

Framework
serde
Shape
›{7 fields }
effect: Effect`allow`, `ask` or `deny`.
methods: string[]Methods (empty: any).
hosts: string[]Hosts.
path_prefixes: string[]Path prefixes (empty: any).
mcp_tools?: string[]The MCP tool patterns it names (ADR 0049 §5.3; empty: none).
upgrades?: string[]The protocol upgrades it names (ADR 0052 §3; empty: none): a rule with `websocket` lets tunnel handshakes through, and …
sql_classes?: SqlClass[]The SQL classes it names (ADR 0052 §7; empty: none): a rule with them governs a Postgres profile's statements, and noth…

`klav proxy status`: never a value.

Framework
serde
Shape
›{9 fields }
mode: ProxyModeThe account's setting.
agent_id?: AgentIdThe proxy's agent ID, with `own`.
agent?: ProxyAgentViewThe proxy's agent, if the server still has it.
credentials: ProxyCredentialView[]The credentials it holds.
problems?: string[]What is wrong with the setting, if anything.
lost?: string[]What the account loses without a proxy (empty with one that works).
issuers?: ProxyIssuerView[]The agents the proxy's grant lets start sandboxes (ADR 0036 §4), from that grant as verified against the account identi…
local_clients?: LocalClientView[]The local MCP clients the proxy's verified grant names (ADR 0049 §3.2). Empty when it names none or is not known.
hosted?: HostedProxyViewKlav Cloud's proxy, as this device checked it just now (ADR 0051 §6.3): with `mode: "klav"` only. Absent from an older …

Why a statement's approval can only be denied (ADR 0052 §9.6, T292, risk 119).

Framework
serde
Shape
"too_large" | "tampered" | "missing"

A statement as the card shows it (ADR 0052 §9.6): every character a terminal could hide, reorder or act on made visible ([`visible_sql`]).

Framework
serde
Shape
›{5 fields }
problem?: SealedProblemWhy it can only be denied, if so.
database?: stringThe database.
statement?: stringThe exact statement, escaped.
length?: numberIts length in bytes, as sent.
params?: string[]Its parameters, escaped (`NULL`, text, or binary as hex).

What `--tunnels`, `--tunnels-ask` and `--tunnel-host` add to a profile (ADR 0052 §2, §5, Q4 (a)): exact hosts by default, each signed and shown in full; a `*.base` host matches exactly one label and is shown as a warning (T287).

Framework
serde
Shape
›{3 fields }
hosts: string[]1–4 tunnel hosts, each exact or `*.base`.
path_prefix?: stringThe path a handshake must be under ([`DEFAULT_TUNNEL_PATH_PREFIX`] when empty).
ask?: booleanEach handshake asks the person first (`--tunnels-ask`), instead of going through (`--tunnels`).

"What it saw": the projects whose keys it held and what the audit log says it used.

Framework
serde
Shape
›{6 fields }
agent: AgentViewThe agent.
projects: GrantedProjectView[]Projects whose keys it received (it could read the titles, usernames and URLs of their items).
items: SeenItem[]Items it used, most recent first.
denied: numberDenied attempts.
log_warning?: stringWhy `items` and `denied` are empty: the audit log could not be read as this device holds it (a server whose chain no lo…
projects_unknown?: boolean`projects` is empty because this device cannot tell which projects the agent held (a grant it cannot verify and a log i…

A key change this device still owes (F4 `agent_revocations`): a revocation's, or a narrowing's.

Framework
serde
Shape
›{13 fields }
agent_id: AgentIdThe agent.
name: stringIts name when it was revoked (the agent's own words, T136).
projects: string[]Every project whose key changes (`vault/project`): for a revocation, every project whose key it held; none when only it…
rotated?: string[]Those already rotated.
pending?: string[]Those still to rotate, in order.
regrants?: string[]Rotated projects whose other agents still need a new grant.
unknown_projects?: booleanThis device does not know which projects the agent had: it never says "done" (T189).
narrowed?: booleanThe agent is active, and this is the key change of projects taken away from it (`rotate_removed`), not a revocation.
items?: numberItems granted one by one still without a new key.
log_unchecked?: booleanThe audit log has not been read for this key change yet (T189).
without_key_change?: booleanA revocation without the key change: only the keys of items granted one by one change, never a project's, so nothing he…
skipped?: string[]Projects and items whose key cannot change from this device, and why (`vault/project: why`, `item <id>: why`): a delete…
last_error?: stringWhat stopped the last step.

Result of [`Unlocked::revoke_agent`]. With `rotate`, check [`RevokeReport::complete`]: a rotation that stopped half way says what failed and what is left, and running it again finishes it.

Framework
serde
Shape
›{13 fields }
agent: AgentViewThe agent, now revoked.
exposure: ExposureWhat it saw.
rotated?: RotationReport[]Project keys rotated by this run (with `rotate`).
already_rotated?: string[]`vault/project` already rotated by an earlier run for this revocation: not rotated again.
rekeyed?: ItemId[]Items granted one by one whose key changed (ADR 0036 §18): always on revoking, since the agent may have kept their keys.
items_pending?: ItemId[]Items whose key still has to change (the failed one first): run the revocation again.
regranted?: string[]Other active agents that got a new grant with the new keys.
not_regranted?: string[]Other active agents whose grant could not be re-issued (`name: why`): one failure does not stop the others. Run it agai…
failed?: stringWhat stopped the rotation, if it stopped.
pending?: string[]`vault/project` still to rotate (the failed one first): run the revocation with `rotate` again.
skipped?: string[]Projects and items whose key cannot change from this device, and why (`vault/project: why`, `item <id>: why`): a delete…
warnings?: string[]What could not be checked (a grant this device cannot read, an audit log it could not read for the agent's last grant).
log_unchecked?: booleanThe key change was asked for and the audit log could not be read: the projects this device knows changed key, but one t…

A rotated project key.

Framework
serde
Shape
›{4 fields }
project_id: ProjectIdProject ID.
project: string`vault/project`.
items: numberItems whose key was re-wrapped.
versions: numberStored versions re-wrapped.

What one [`Unlocked::rotation_step`] did.

Framework
serde
Shape
›{8 fields }
agent_id: AgentIdThe agent.
rotated?: RotationReportThe project whose key rotated in this step.
rekeyed?: ItemId[]Items granted one by one whose key changed in this step.
regranted?: string[]Other agents that got a new grant in this step.
not_regranted?: string[]Other agents whose grant could not be issued again (`name: why`).
skipped?: string[]Projects and items whose key cannot change from this device (`vault/project: why`, `item <id>: why`).
failed?: stringWhat stopped this step.
done: booleanNothing is left of the key change.

What an agent obtained from one item, according to the audit log.

Framework
serde
Shape
›{10 fields }
item_id: ItemIdItem ID.
reference?: stringReference, if this device still sees the item.
permissions: string[]Permissions it used and were allowed (`fill`, `reveal`, `update`…).
secret: booleanWhether it obtained a secret value: an allowed `fill`, `inject`, `totp` or `reveal` of an item that has text secrets (o…
attachments?: numberAttachments delivered to it (deliveries, not distinct files).
uses: numberAllowed uses.
first_at: numberFirst and last use (Unix ms).
last_at: numberLast use (Unix ms).
trashed?: booleanThe item is in the trash now.
deleted?: booleanThe item no longer exists on this device (purged, or this device cannot see it).

What the page says about the new password (the field's `passwordrules`, `minlength` and `maxlength`).

Framework
serde
Shape
›{3 fields }
password_rules?: string`passwordrules`.
min_length?: number`minlength`.
max_length?: number`maxlength`.

One step of a change, as the agent hands it to `klavd` (`agent_rotate_begin`, `agent_rotate_confirm`, `agent_rotate_cancel`).

Framework
serde
Shape
›{5 fields }
agent_id: AgentIdThe agent.
task_id: TaskIdThe task that covers the change.
rotation_id: RotationIdThe change (the server's `RotationInfo::id`, the agent's `pending_id`).
item_id: ItemIdThe item.
request: AgentRequestProofThe request the agent signed for this step.

What a person's revocation did, for the apps and the CLI.

Framework
serde
Shape
›union2 members · discriminated by outcome
›| "revoked"{2 fields }
outcome: "revoked"
revocation: SandboxRevocationAs the server stored it, with the sandboxes it covers.
›| "not_applied"{4 fields }
outcome: "not_applied"
proxy_id: AgentIdThe proxy.
scope: stringA sandbox ID, or `all`.
later_at: numberWhen the later revocation was signed.

`klavd`'s answer to `sandbox_list_checked`: the list, or the check that refused it. Both optional, so that an answer with neither (a newer `klavd` that says it otherwise) is read as a refusal, never as a list. A refusal is read first and wins: a `list` next to it that does not decode is dropped, never an error that would leave the last list standing. Without a refusal, `list` is read as strictly as ever.

Framework
serde
Shape
›{2 fields }
list?: SandboxListThe list, when every check passed.
refused?: ListRefusalThe check that refused it.

Why a sandbox ended, as its proxy logged it ([`SandboxEnd`]), with a catch-all for a reason this build does not know (from a newer `klavd`): such a row is still ended, since its status says so, and only the reason is unknown. The names are [`SandboxEnd`]'s.

Framework
serde
Shape
›union9 members
| "stop"
| "ttl"
| "inactivity"
| "theft"
| "released"
| "issuer_removed"
| "person"
| "person_local"
| "unknown"

Which check refused the list, for a caller that says it in its own words (the Mac app, through `klavd`'s `sandbox_list_checked`). The CLI keeps printing [`ListRefusal::message`]. Read leniently: a check that does not decode (a kind this build does not know, or a known kind without its agent) is [`ListCheck::Unknown`], still a refusal.

Framework
serde
Shape
›union4 members · discriminated by kind
›| "unlisted_proxy"{2 fields }
kind: "unlisted_proxy"
agent_id: AgentIdThe agent the setting names.
›| "proxy_heartbeat"{2 fields }
kind: "proxy_heartbeat"
agent_id: AgentIdThe account's proxy.
›| "log"{1 field }
kind: "log"
›| "unknown"{1 field }
kind: "unknown"

A list refused by one of its checks: which one, and the words the CLI prints for it, the same [`Unlocked::sandbox_list_flagged`] fails with. Read leniently, so that a refusal never fails to decode and leaves the last list standing: without its check, or not even an object, it is [`ListCheck::Unknown`]; without its words, they are empty.

Framework
serde
Shape
›{2 fields }
check: ListCheckThe check.
message: string`klav-client`'s words, in English.

Why there is no heartbeat that counts.

Framework
serde
Shape
›union7 members
| "no_heartbeat"
| "no_epoch"
| "other_epoch"
| "ahead"
| "version"
| "rollback"
| "unknown"

The account's proxy, as this device sees it.

Framework
serde
Shape
›{7 fields }
agent_id: AgentIdThe proxy the account's setting names.
name?: stringIts name, as the server lists it.
paused: booleanA pause the account signed holds it (its own or every agent's).
heartbeat_sent_at?: numberWhen it signed its last heartbeat that counts (proxy clock), if any.
heartbeat_age_ms?: numberHow old that heartbeat is by this device's clock (ms).
quiet: booleanOlder than [`NO_SIGNS_LIVE_MS`] with live sandboxes, or than [`NO_SIGNS_IDLE_MS`] without, or none that counts: the pro…
no_signs?: NoSignsWhy no heartbeat counts, when none does.

The person's list (ADR 0036 E2.1).

Framework
serde
Shape
›{6 fields }
proxy?: ProxyViewThe account's own proxy; absent without one.
sandboxes: SandboxRow[]Every sandbox in the verified chain, of every proxy, oldest first.
verified_events: numberEvents verified: the list holds every sandbox up to this one.
warnings?: string[]What the verification could not check, without being tampering; a rollback of the heartbeat; and a marks file that coul…
marks_unreadable?: booleanThis device's heartbeat watermarks ([`SANDBOX_MARKS_FILE`]) could not be used (damaged, or of a newer version): the hea…
security?: SecurityFlagA security problem shown with the rows instead of failing; never in `warnings`. Only [`Unlocked::sandbox_list_flagged`]…

One sandbox of the account.

Framework
serde
Shape
›{17 fields }
sandbox_id: SandboxIdThe sandbox.
proxy_id: AgentIdThe proxy that issued it.
issuer_id: AgentIdThe issuer, as the proxy signed it.
issuer_name?: stringThe issuer's name, as the server lists it (absent when it no longer does).
label: stringThe issuer's label: shown "per the issuer" (T136).
profiles: string[]The profiles it may use.
issued_at: numberWhen it was issued (the log's clock, Unix ms).
expires_at: numberWhen it expires, as the proxy signed it (Unix ms).
claimed_at?: numberWhen it was claimed (the log's clock), if it was.
status: SandboxStatusWhere it stands.
end_reason?: EndReasonWith [`SandboxStatus::Ended`]: why.
ended_at?: numberWith [`SandboxStatus::Ended`]: when the end was logged.
revoked_by_person_at?: numberThe signed time of the person's last revocation that covered it.
proxy_revoked_at?: numberWith [`SandboxStatus::ProxyRevoked`]: when the server logged the account's signed revocation of its proxy (the log's cl…
connected?: booleanPer the proxy's heartbeat, only for a live sandbox of the account's proxy that the heartbeat names: whether a forwarder…
last_seen_at?: numberPer the same heartbeat: the proxy's last word from it (proxy clock).
attached?: AttachedProfile[]Profiles the person attached to it from a secret request's card (ADR 0053 §5), from their signed decisions in the verif…

Where a sandbox stands, from the verified chain and this device's clock alone.

Framework
serde
Shape
›union7 members
| "waiting"
| "active"
| "revoking"
| "expired"
| "ended"
| "proxy_revoked"
| "unknown"

A security problem the list carries instead of failing: the rows still come from the verified chain, and no proxy is trusted. A caller shows it as a security warning (the CLI exits 3), never as an ordinary one.

Framework
serde
Shape
›union2 members · discriminated by kind
›| "preferences_by_agent"{2 fields }
kind: "preferences_by_agent"
agent_id: AgentIdThe agent the server says wrote them.
›| "unknown"{1 field }
kind: "unknown"

Inputs supplied by the person when fulfilling a pending secret request.

Framework
serde
Shape
›{17 fields }
digest: string[`SecretRequestCard::proposal_digest`] (hex) of the card the person reviewed.
secret: SecretTextSecret value entered by the person (hidden input / stdin). Never logged.
vault?: stringDestination vault name or ID (`create` mode; defaults to the proposal's `vault_id` or the default vault).
project?: stringDestination project name or ID (`create` mode; defaults to the proposal's `project_id` or the default project).
title?: stringTitle override (`create` mode; defaults to `proposal.title`).
field?: stringField name override (defaults to `proposal.field`).
urls?: string[]Login URLs explicitly confirmed by the person (`create` mode for `login` items). `None` saves **no** agent-suggested UR…
notes?: SecretTextNotes override (`create` mode).
allow_duplicate?: booleanAllow creating an item whose title matches another live item in the same project.
grant_proxy?: booleanWhether the person explicitly opted in to granting `klav-proxy` access to this item (unchecked by default, ADR 0046 Q3 …
proxy_base_version?: numberExpected proxy grant version shown in the preview when `grant_proxy` is `true` (staleness check, same as `ProxyGrant`).
every_device_updated?: booleanPerson confirmed every device is updated when this is the account's first per-item grant.
shown_words?: stringPairing words shown when the proxy has no grant yet.
proxy_credential?: ProxyCredentialSpecOptional edited proxy credential spec (defaults to `proxy_spec_from_proposal(&proposal.proxy_proposal, field)`).
env_link?: EnvLinkProposalLink the saved field into this environment variable (ADR 0054 §3). `None` means the person did not enable the link. For…
proxy_profile?: stringThe profile name to grant under, in place of the proposal's (ADR 0053 Q7). For a sandbox's request whose name is taken,…
attach_sandbox?: booleanAlso let the sandbox that asked use the new profile now, until it ends (ADR 0053 §5, Q6 (a)): only with `grant_proxy`, …

Result of fulfilling a secret request.

Framework
serde
Shape
›{6 fields }
card: SecretRequestCardUpdated card (status `fulfilled`).
item: ItemSummaryItem created or updated in the person's vault.
in_grant: booleanWhether the saved item lives in a project granted to the asking agent.
proxy_profile?: stringProfile name granted to `klav-proxy`, if any.
proxy_warnings?: string[]Any warnings produced by the optional proxy grant step.
attached_sandbox?: SandboxIdThe sandbox the signed decision attached the profile to (ADR 0053 §5), if any.

A secret request as the person sees it (CLI, `klavd`, Mac, iOS, extension).

Framework
serde
Shape
›{26 fields }
id: SecretRequestIdRequest ID.
status: SecretRequestStateLifecycle state on the server.
agent_id: AgentIdAsking agent ID.
agent: stringAsking agent name.
mode: SecretRequestMode`create` or `update`.
target_item_id?: ItemIdTarget item ID in `update` mode.
target_reference?: string`klav://Vault/Project/Title` resolved from this device's own vault in `update` mode (never taken from the agent).
target_title?: stringExisting item title from this device's vault in `update` mode.
target_kind?: ItemKindExisting item kind from this device's vault in `update` mode.
reason: stringPlaintext reason supplied by the agent.
created_at: numberCreated at (Unix ms).
expires_at: numberExpires at (Unix ms).
decided_at?: numberDecided at (Unix ms), if decided.
proposal_digest: stringLowercase hex SHA-256 of the canonical proposal JSON (ADR 0030 §5): passed back when fulfilling or denying so nothing i…
proposal?: SecretRequestProposalDecrypted and validated proposal (present while pending and valid).
env_link?: SecretRequestEnvLinkThe proposal's environment link as this device's vault resolves it.
proposal_error?: stringWhy a pending proposal could not be opened or validated (refuses fulfillment while set).
setup_url?: SecretRequestSetupUrlValidated `setup_url` with host and punycode cue (T235).
agent_projects?: [VaultId, ProjectId][]Projects currently in the asking agent's verified grant, so the UI can tell the person whether their chosen destination…
decision?: SecretRequestDecisionVerified decision once fulfilled or denied.
sandbox_id?: SandboxIdThe server says a credential proxy raised this request on behalf of this sandbox (ADR 0053 §3.2): the card shows the "F…
sandbox?: SecretRequestSandboxWith `sandbox_id`: that sandbox as this device's verified chain shows it. Absent when the chain could not be checked or…
proxy_profile_taken?: booleanA sandbox's proposal names a profile the proxy already has: the card refuses that name (Q7, T300) and offers [`Self::pr…
proxy_profile_suggested?: stringWith `proxy_profile_taken`: the first free `<name>-N`, the name the proxy grant uses unless the person picks another fr…
proxy_issuers_keeping?: string[]With `proxy_profile_taken`: the issuers whose sandboxes use the existing profile of that name (their names), which a gr…
attach_available?: booleanThe card may offer "Also let this sandbox use it now" (Q6 (a)): a sandbox's pending request, the sandbox still live, a …

The sandbox a credential proxy asked for (ADR 0053 §3.3), as this device's verified audit chain shows it: never the server's copy (T299).

Framework
serde
Shape
›{7 fields }
sandbox_id: SandboxIdThe sandbox.
label: stringIts label, as the proxy signed it in `sandbox.issued`: the issuer's text, shown "according to the proxy" (risk 123).
issuer_id: AgentIdThe issuer that started it, as the proxy signed it.
issuer?: stringThe issuer's name, as the server lists it (absent when it no longer does).
status: SandboxStatusWhere it stands, by the chain and this device's clock.
live: booleanWhether it still lives: only then may the card attach a profile.
expires_at: numberWhen it expires, as the proxy signed it (Unix ms).

Validated `setup_url` surfaced on a [`SecretRequestCard`] (T235).

Framework
serde
Shape
›{3 fields }
url: stringCanonical `https://…` URL.
host: stringLowercase ASCII host to display prominently in the warning banner.
has_punycode: boolean`true` when any label starts with `xn--` (IDN homograph cue).

Which items to list.

Framework
serde
Shape
›{8 fields }
vault?: stringVault name or ID.
project?: stringProject name or ID.
kind?: ItemKindItem type.
kinds?: ItemKind[]Any of these types (together with `kind`). Empty: every type.
codes?: booleanOnly items with a filled one-time password field, of any type (the «Codes» view). Lists metadata only, never the code.
tag?: stringTag.
query?: stringText to search in titles, usernames, URLs and tags.
trash: booleanList the trash instead of live items.

Where an item lives.

Framework
serde
Shape
›{3 fields }
vault: VaultIdVault.
project: ProjectIdProject.
item: ItemIdItem.

Item metadata (the overview): never contains secrets.

Framework
serde
Shape
›{20 fields }
id: ItemIdItem ID.
reference: string`klav://vault/project/item` (by name).
vault_id: VaultIdVault ID.
vault: stringVault name.
project_id: ProjectIdProject ID.
project: stringProject name.
kind: ItemKindType.
title: stringTitle.
username?: stringUsername, if any.
urls: string[]URLs.
tags: string[]Tags.
version: numberVersion.
updated_at: numberLast change (Unix ms).
trashed: booleanIn the trash.
passkey?: PasskeySummaryThe login's passkey, without secrets (ADR 0020).
confirmed_urls?: string[]The URLs whose site the person confirmed (ADR 0030 §7): the only ones autofill, suggestions and agents' fills use.
pending_urls?: string[]URLs an agent added that the person has not confirmed yet: shown as «Sites added by <agent>», with confirm and remove.
author_agent_id?: AgentIdThe agent that wrote the current version, if one did.
expires_at_ms?: numberExpiry of a temporary item (Unix milliseconds); absent when permanent.
protected_by?: string[]The environments whose references protect this item, or that it is itself (a protected environment), by name (ADR 0032 …

A project as shown to the user.

Framework
serde
Shape
›{5 fields }
id: ProjectIdID.
vault_id: VaultIdVault ID.
vault: stringVault name.
name: stringName.
repos?: string[]Linked Git repositories in normalized `host/owner/repo` form (ADR 0032 §2).

A vault as shown to the user.

Framework
serde
Shape
›{4 fields }
id: VaultIdID.
name: stringName.
deleted: booleanIn the trash.
items: numberNumber of live items.

`account.json`: everything needed to unlock this device. Contains no plaintext secrets (the keyset and the local identity are ciphertext).

Framework
serde
Shape
›{10 fields }
v: numberFormat version (1).
server: stringServer base URL.
email: stringNormalised account e-mail.
account_id: AccountIdAccount ID.
device_id: DeviceIdThis device, as registered with the server.
device_name: stringThis device's name.
kdf_params: BlobArgon2id parameters of the account (kind `0x06`), checked against the production floor at every unlock.
public_identity: BlobPublic identity (kind `0x05`).
sealed_identity: BlobIdentity private keys sealed with the KEK (kind `0x01`).
local_identity: BlobIdentity private keys sealed with the local key (kind `0x40`), for biometric unlock.

What a sync did.

Framework
serde
Shape
›{4 fields }
vaults_updated: numberVaults whose revision moved.
items_received: numberItems received (created, edited, trashed or purged).
vaults_removed: numberVaults no longer listed by the server (purged or access lost).
vaults_signed?: numberVaults created before vault keys were signed that this device signed now (once per device, ADR 0030 §1).

The running task an approval request falls outside of (ADR 0021 §6).

Framework
serde
Shape
›{4 fields }
id: TaskIdThe task.
task: stringIts title, in the agent's words.
expires_at: numberWhen it ends (Unix ms).
can_add: boolean«Add to the task» is offered: a permission a task can hold (`fill`, `totp`, `inject`, `update`) on an item, and for `fi…

A task as the person sees it.

Framework
serde
Shape
›{17 fields }
id: TaskIdID.
status: TaskStatusState.
agent_id: AgentIdThe agent.
agent: stringIts name.
task: stringTitle, in the agent's words (the person's, if [`Self::offered`]).
reason: stringWhy, in the agent's words (the person's, if [`Self::offered`]).
offered?: booleanOffered by the person, without a request from the agent (ADR 0022 §6).
duration_secs: numberRequested duration (seconds), counted from the approval.
created_at: numberAsked at (Unix ms).
decide_by: numberDecide before (Unix ms).
decided_at?: numberDecided at (Unix ms).
revision: numberRevision of the decision in force (0 while pending).
expires_at?: numberWhen an approved task ends (Unix ms).
ended_at?: numberWhen it ended (Unix ms).
ended_by?: TaskEndedByWho ended it.
rows: TaskCardRow[]One row per item: the proposal while pending, what was approved (and what was left out, unchecked) once decided.
request_digest: string`SHA-256` (hex) of the exact request bytes this card was built from (ADR 0030 §5): deciding passes it back, and nothing…

One permission on a task card.

Framework
serde
Shape
›{7 fields }
permission: PermissionThe permission.
checked: booleanChecked: approved if the person leaves it (or approved, once decided).
asked: booleanThe agent asked for it.
added_by_klav: booleanAdded by Klav («Added by Klav»), not by the agent.
denied_by_policy: booleanThe person's policy denies it: struck through, cannot be checked.
no_site?: booleanIt checks the site and the item has none («No site», ADR 0030 §6): cannot be checked.
always_asks?: booleanThe grant says `ask once` for it (ADR 0032 §4.2): «Always asks for approval», unchecked, and it cannot be checked. Omit…

One item on a task card.

Framework
serde
Shape
›{13 fields }
vault_id: VaultIdVault.
project_id: ProjectIdProject.
item_id: ItemIdItem.
reference: string`klav://vault/project/item` from the vault, or `item <id>` when this device does not have it.
title?: stringTitle, from the vault.
username?: stringUser name, from the vault.
missing: booleanThe item is not in the vault, is in the trash, or is outside the agent's grant: it cannot be approved.
asked_domain?: stringThe host the agent gave, if any.
domain_mismatch: booleanThe agent's host matches none of the item's URLs («The site does not match the item»): the row is unchecked and cannot …
no_site?: booleanThe item has no valid host and a permission on the row checks the site («No site», ADR 0030 §6).
domain_claimed?: boolean`domains` is the host the agent asked for, on a card or an identity (no URL by nature): shown «according to the agent».
domains: string[]The hosts that are (or will be) approved.
permissions: TaskCardPermission[]Permissions, in order.

What the person changed on the card before approving.

Framework
serde
Shape
›{3 fields }
without?: [ItemId, Permission | null][]Unchecked: a whole item (`None`) or one of its permissions.
with?: [ItemId, Permission | null][]Checked by hand: what Klav offered unchecked (a `passkey`). Never what the policy denies, a permission without a site o…
for_secs?: numberA shorter duration (seconds); never longer than requested.

`klav log --task` (ADR 0021 §9): the task, its events and what the agent got approved outside it while it ran.

Framework
serde
Shape
›{6 fields }
task_id: TaskIdThe task.
card?: TaskCardIts card, while the server still lists it.
events: LogLine[]Its events, oldest first: requested, decided (and each revision), every use, ended.
outside?: LogLine[]The agent's requests and uses with an approval of their own while the task ran («Outside the task»), oldest first.
sites?: SiteProgress[]In a task with `rotate` (ADR 0022 §6): each site, changed, pending or failed according to its `rotate.*` events.
log_warning?: stringWhy there are no events: the audit log could not be read as this device holds it (ADR 0033 §8.4). The card still comes …