Klav Atlas

klav-core

46 schemas in 12 files.

Stablev0.15.1034e81b52d1b· 2026-12-04

Blast radius

5 direct · 4 transitive workspaces · 4 apps affected

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

Contracts in its surface1 RPC

Where a change-password page came from.

Framework
serde
Shape
›union2 members · discriminated by source
›| "bundled"{2 fields }
source: "bundled"
domain: stringThe domain the page is listed under.
›| "well_known"{1 field }
source: "well_known"

A site's change-password page. Metadata only: no secret.

Framework
serde
Shape
›intersection2 parts
›& {2 fields }
url: stringThe page.
host: stringThe host it was looked up for.

The four kinds of generated secret (ADR 0022 §1.1).

Framework
serde
Shape
"smart" | "random" | "memorable" | "pin"

Options for [`generate`]. Each kind reads its own: `length` and the classes for `random` (and `smart` without site rules, where `length` is also the preferred length), the word settings for `memorable`, and `pin_length` for `pin`.

Framework
serde
Shape
›{12 fields }
kind: GeneratorKindWhich kind.
length: numberPassword length.
lowercase: boolean`a–z`.
uppercase: boolean`A–Z`.
digits: boolean`0–9`.
symbols: booleanSymbols.
avoid_ambiguous: booleanExclude look-alike characters.
words: numberPassphrase words.
separator: stringPassphrase separator.
capitalize: booleanCapitalise each word.
include_number: booleanAdd a digit to one word.
pin_length: numberPIN digits.

Why a `smart` password ignored the site's rules and is `random`.

Framework
serde
Shape
"unreadable" | "impossible"

Where the rules of a `smart` password came from.

Framework
serde
Shape
›union3 members · discriminated by source
›| "field"{1 field }
source: "field"
›| "bundled"{2 fields }
source: "bundled"
domain: stringThe domain the rules are listed under.
›| "lengths"{1 field }
source: "lengths"

What the page (or the item's URL) says about the password it wants.

Framework
serde
Shape
›{4 fields }
host?: stringThe site's host, for the bundled rules.
password_rules?: stringThe field's `passwordrules` attribute.
min_length?: numberThe field's `minlength`.
max_length?: numberThe field's `maxlength`.

Strength label of a generated secret, from its exact entropy (ADR 0022 §1.2).

Framework
serde
Shape
"weak" | "fair" | "strong" | "very_strong"

Person-owned metadata for a single agent: an optional friendly alias (`label`, e.g. `"Proxmox proxy"`), an optional machine/host name (`host`, e.g. `"pve-home"` or `"Omar's MacBook Pro"`), and an optional role hint.

Framework
serde
Shape
›{3 fields }
label?: stringHuman alias chosen by the person.
host?: stringMachine, server or sandbox host chosen by the person.
role_hint?: stringOptional role hint (reserved for future use).

Map of agent IDs to person-owned labels (ADR 0047 §1).

Framework
serde
Shape
›{1 field }
labels?: Record<AgentId, AgentLabel>Labels keyed by agent ID.

Who wrote a version (ADR 0030 §7).

Framework
serde
Shape
"person" | "agent"

What the overview says about an environment: no values, no references.

Framework
serde
Shape
›{2 fields }
protected: booleanThe `protected` flag of this version (ADR 0032 §3). Which flag counts is decided by [`effective_protected`], not by thi…
variables: string[]The variable names, in the order of the details.

Metadata of an attachment (its bytes are encrypted separately, spec §10).

Framework
serde
Shape
›{4 fields }
id: AttachmentIdAttachment ID (bound into the attachment AAD).
file_name: stringOriginal file name.
size: numberPlaintext size in bytes.
media_type?: stringMedia type, if known.

Field types. Secret types ([`FieldKind::is_secret`]) never appear in the overview.

Framework
serde
Shape
›union11 members
| "username"
| "password"
| "totp"
| "file"
| "text"
| "concealed"
| "url"
| "email"
| "phone"
| "date"
| "month_year"

Item types (design §3).

Framework
serde
Shape
›union13 members
| "login"
| "card"
| "identity"
| "ssh_key"
| "file"
| "totp"
| "note"
| "api_key"
| "database"
| "generator_history"
| "preferences"
| "agent_labels"
| "environment"

Metadata visible with the `list` permission. Contains no secrets.

Framework
serde
Shape
›{8 fields }
v: numberSchema version.
kind: ItemKindItem type.
title: stringTitle (also the item name in `klav://` references).
username?: stringFirst `username` field, if any.
urls?: string[]URLs used for autofill.
tags?: string[]Tags.
passkey?: PasskeySummarySummary of the login's passkey (ADR 0020 §3), without secrets.
environment?: EnvironmentSummaryAn environment's flag and variable names (ADR 0032 §1). Present exactly when `kind = environment`.

What the overview says about the passkey of a login: what `list` may see.

Framework
serde
Shape
›{3 fields }
rp_id: stringRelying party ID.
credential_id: stringCredential ID, base64url without padding.
user_name: string`user.name`.

The preferences of the account.

Framework
serde
Shape
›{2 fields }
developer?: booleanThe «Development» switch (ADR 0032 §7). Absent: on.
proxy?: ProxySettingWhich credential proxy the account uses (ADR 0036 §3). Absent: [`ProxyMode::None`].

`proxy.mode`.

Framework
serde
Shape
"none" | "own" | "klav"

`proxy`: `{mode, agent_id?}`. `agent_id` is there exactly when the mode is `own` or `klav` (ADR 0051 §6.2).

Framework
serde
Shape
›{2 fields }
mode: ProxyModeThe mode.
agent_id?: AgentIdThe proxy's agent, with `own` and `klav`.

The status of an image in the manifest.

Framework
serde
Shape
"current" | "draining" | "revoked"

Outcome of a rule. Ordered from least to most restrictive.

Framework
serde
Shape
"allow" | "ask" | "deny"

Agent permissions (design §5.2).

Framework
serde
Shape
›union11 members
| "list"
| "fill"
| "inject"
| "totp"
| "reveal"
| "create"
| "update"
| "delete"
| "passkey"
| "rotate"
| "proxy"

An agent's policy (part of its grant).

Framework
serde
Shape
›{2 fields }
rules?: Rule[]Rules; permissions without rules use the defaults.
expires_at?: numberUnix time (seconds) from which the whole policy denies everything.

A rule: `permission → effect` inside a scope, optionally until a time.

Framework
serde
Shape
›{6 fields }
permission: PermissionPermission the rule is about.
effect: EffectEffect when it applies.
scope?: ScopeWhere it applies.
expires_at?: numberUnix time (seconds) from which the rule no longer applies.
once?: boolean«Ask every time» (ADR 0032 §4.2): only with `ask`. An approval under it has no lease, is spent in one use and never goe…
origin?: RuleOriginSet when Klav wrote the rule on its own (ADR 0032 §3.1). Omitted when absent.

Where a rule comes from, when Klav wrote it on its own (ADR 0032 §3.1).

Framework
serde
Shape
"protected"

Where a rule applies. Empty dimensions do not constrain.

Framework
serde
Shape
›{11 fields }
vaults?: Selector[]Vaults, by ID or name.
projects?: Selector[]Projects, by ID or name.
tags?: string[]Item tags (the item needs at least one of them).
domains?: DomainPattern[]Host patterns (the request needs a domain matching one of them).
hours?: TimeWindow[]Weekly time windows (the request time must fall in one of them).
items?: ItemId[]Items, by ID (the request's item must be one of them). In `proxy` rules (ADR 0036 §2) and, per environment and for inhe…
methods?: HttpMethod[]HTTP methods (the proxied request's method must be one of them). Only in `proxy` rules (ADR 0036 §2).
path_prefixes?: PathPrefix[]HTTP path prefixes (the proxied request's path must be under one of them). Only in `proxy` rules (ADR 0036 §2).
mcp_tools?: ToolPattern[]MCP tools (the call's tool must match one of them). Only in `proxy` rules on an MCP profile's item (ADR 0049 §5.3). A r…
upgrades?: Upgrade[]Protocol upgrades (the request's upgrade must be one of them). Only in `proxy` rules, in a grant payload `v: 5` (ADR 00…
sql_classes?: SqlClass[]SQL classes (the request's class must be one of them). Only in `proxy` rules, in a grant payload `v: 5` (ADR 0052 §7). …

The class of a SQL statement or batch the Postgres proxy forwards (ADR 0052 §7, §9.4). A closed set: a value this build does not know fails to parse, so an older runtime rejects a rule or a claim that names it. Ordered from least to most restrictive in what the presets do with it.

Framework
serde
Shape
"read" | "write" | "ddl" | "admin" | "unknown"

A weekly time window (design §5.2 "horario", ADR 0014), in a fixed UTC offset.

Framework
serde
Shape
›{4 fields }
days?: Weekday[]Days the window starts on (empty: every day).
start: ClockTimeStart (inclusive).
end: ClockTimeEnd (exclusive).
utc_offset?: UtcOffsetOffset of the local time the window is written in.

A protocol upgrade a `proxy` request asks for (ADR 0052 §3). A closed set: a value this build does not know fails to parse, so an older runtime rejects a rule or a claim that names it.

Framework
serde
Shape
"websocket"

Day of the week.

Framework
serde
Shape
›union7 members
| "mon"
| "tue"
| "wed"
| "thu"
| "fri"
| "sat"
| "sun"

The environment variable the person actually linked inside the asking agent's granted project (ADR 0054 §3).

Framework
serde
Shape
›{2 fields }
environment: stringEnvironment item name.
variable: stringEnvironment variable name.

A link an agent proposes from the secret being saved into one variable of one environment item (ADR 0054 §3).

Framework
serde
Shape
›{2 fields }
environment: stringEnvironment item name (`[a-z0-9][a-z0-9_-]{0,63}`, e.g. `"development"`).
variable: stringEnvironment variable name (`[A-Za-z_][A-Za-z0-9_]{0,127}`, e.g. `"DATABASE_URL"`).

Optional `klav-proxy` profile suggested by the agent for a sandbox credential (ADR 0046 §2, Q3).

Framework
serde
Shape
›{9 fields }
preset?: stringOptional preset name (e.g. `"northflank"`).
profile: stringProfile name (`[a-z0-9][a-z0-9_-]{0,63}`).
upstream: stringUpstream base URL (`https://…`, no userinfo, IP literal, query or fragment).
header: stringHTTP header where the proxy puts the secret (e.g. `"authorization"`).
prefix?: stringOptional prefix before the secret value (e.g. `"Bearer "`).
methods?: string[]HTTP methods allowed without per-call approval.
ask_methods?: string[]HTTP methods that ask the person per call.
path_prefixes: string[]Allowed path prefixes (at least one, each starting with `/`).
rate_per_minute?: numberOptional per-minute rate limit (`1..=600`).

The person's signed decision on a secret request (ADR 0046 §3).

Framework
serde
Shape
›{12 fields }
v: numberFormat version (`1`).
request_id: SecretRequestIdThe secret request being decided.
agent_id: AgentIdThe agent that made the request.
status: SecretRequestStatus`fulfilled` or `denied`.
in_grant: booleanWhether the saved item lives in a project covered by the asking agent's grant. Always `false` when `denied`.
vault_id?: VaultIdVault ID — present **only** when `fulfilled` and `in_grant` (T236).
project_id?: ProjectIdProject ID — present **only** when `fulfilled` and `in_grant` (T236).
item_id?: ItemIdItem ID — present **only** when `fulfilled` and `in_grant` (T236).
field?: stringName of the field saved — present **only** when `fulfilled`.
proxy_profile?: stringProfile granted to `klav-proxy` — present **only** when `fulfilled` and the person enabled and confirmed the proxy gran…
env_linked?: EnvLinkDecisionEnvironment variable the person actually linked inside the asking agent's granted project (ADR 0054 §3) — present **onl…
attach_sandbox?: SandboxIdThe sandbox that may use `proxy_profile` at once, until it ends (ADR 0053 §5, Q6 (a)) — present **only** when `fulfille…

Whether the request asks for a new item or an update to one secret field of an existing item (ADR 0046 Q5).

Framework
serde
Shape
"create" | "update"

Proposal JSON sealed inside kind `0x25` (`proposal_blob`, ADR 0046 §1).

Framework
serde
Shape
›{16 fields }
v: numberFormat version (`1`).
mode: SecretRequestMode`create` or `update`.
kind?: ItemKindItem kind (`api_key`, `database`, `login`, `note`, `ssh_key`, `totp`). Required in `create` mode; must be omitted in `u…
title?: stringSuggested title. Required in `create` mode; omitted in `update` mode (the card reads the real title from the person's v…
vault_id?: VaultIdOptional suggested vault ID (if known from a grant).
project_id?: ProjectIdOptional suggested project ID (if known from a grant).
target_item_id?: ItemIdTarget item ID. Required in `update` mode; must be omitted in `create`.
field: stringSecret field name to populate (e.g. `"api_key"`, `"password"`).
placeholder?: stringOptional short placeholder for the hidden input (e.g. `"vck_…"`).
setup_url?: stringOptional provider dashboard / key-creation URL (`https://` only, T235).
base_url?: stringOptional API base URL (only for `api_key` in `create` mode).
urls?: string[]Optional suggested login URLs (only for `login` in `create` mode; kept unchecked/unconfirmed by default on the person's…
notes?: stringOptional plain-text notes (shown as suggested by the agent).
proxy_proposal?: ProxyProposalOptional `klav-proxy` profile proposal for a sandbox credential.
env_link?: EnvLinkProposalOptional proposed link into one variable of one environment item (ADR 0054 §3). Local agents only: forbidden when `sand…
sandbox_id?: SandboxIdThe sandbox this proposal was raised for, written by the credential proxy that seals it on that sandbox's behalf (ADR 0…

Outcome of a secret request decided by the person.

Framework
serde
Shape
"fulfilled" | "denied"

How the page's host relates to a login's URLs (ADR 0025 §3). The order of the variants is the order logins are offered in: `Exact` first, then `Subdomain`, then `Parent`. It wins over any other order (recent use, title), and only the best of it is ever filled without the person.

Framework
serde
Shape
"exact" | "subdomain" | "parent"

One approved access of a [`TaskDecision`].

Framework
serde
Shape
›{6 fields }
vault_id: VaultIdVault of the item.
project_id: ProjectIdProject of the item.
item_id: ItemIdThe item.
permissions: Permission[]Approved permissions.
domains: string[]Approved hosts (lowercase): a `fill`, `passkey` or `rotate` passes on one of them or a subdomain, and never with this l…
added_by_klav: Permission[]The permissions Klav added on the person's client, not the agent (`totp` on a login with TOTP, `passkey`; ADR 0021 §3).…

One access of a [`TaskRequest`].

Framework
serde
Shape
›{5 fields }
vault_id: VaultIdVault of the item.
project_id: ProjectIdProject of the item.
item_id: ItemIdThe item.
permissions: Permission[]What for.
domain?: stringExpected host, if the agent gave one.

What the person approved (spec §13.8). Signed by the account and stored verbatim. A denial has no accesses and `expires_at_ms = 0`. Each «Add to the task» signs a new one with `revision + 1` and the same expiry.

Framework
serde
Shape
›{7 fields }
v: number[`TASK_FORMAT_VERSION`].
task_id: TaskIdThe task.
agent_id: AgentIdThe agent.
revision: number1 for the first decision; each addition the next one.
expires_at_ms: numberWhen the task ends (Unix ms); `0` in a denial.
access: TaskAccessDecision[]What was approved.
offer?: TaskOfferOnly in a task the person offered without a request (ADR 0022 §6): the title and reason, written by the person. Absent …

The person's own title and reason of an offered task (ADR 0022 §6), signed inside the decision. Same limits as a request's.

Framework
serde
Shape
›{2 fields }
task: stringTitle.
reason: stringWhy.

What the agent sends (`POST /v1/agent/tasks`), with IDs only. The server stores these bytes verbatim and the person signs them (spec §13.8). `task` and `reason` stay in clear, like `reason` today (T20).

Framework
serde
Shape
›{5 fields }
v: number[`TASK_FORMAT_VERSION`].
task: stringTitle, in the agent's words.
reason: stringWhy, in the agent's words.
duration_secs: numberHow long the task lasts once approved (seconds).
access: TaskAccessRequest[]What it needs.

What the agent writes: `tarea.toml` / `tarea.json` in the CLI and the arguments of the MCP tool `request_task` (ADR 0021 §1). Keys in English, like `klav.toml`.

Framework
serde
Shape
›{4 fields }
task: stringShort title (at most 120 characters), written by the agent.
reason: stringWhy (at most 500 characters). Mandatory.
duration: string`30m`, `2h`…: from 5 minutes to 24 hours, counted from the approval.
access: TaskSpecAccess[]From 1 to 50 accesses.

One access of a [`TaskSpec`].

Framework
serde
Shape
›{3 fields }
ref: stringA `klav://` reference or the short form of `klav.toml`; the runtime turns it into IDs before sending.
permissions: Permission[]`fill`, `totp`, `inject`, `update`, `passkey` or `rotate`.
domain?: stringExpected host; without it the item's URLs are used.