---
title: "Schemas: klav-core"
description: "46 entries."
canonical: "https://klav.everdoc.dev/stable/reference/schemas/klav-core"
channel: "stable"
---

# Schemas: klav-core

> OmarAlex24/klav · channel `stable` · v0.15.1 @ [`034e81b52d1b`](https://github.com/OmarAlex24/klav/tree/034e81b52d1b693c65ff95181cd555c6734bc8e8) · 2026-12-04 · generated by Everdoc from source (no LLM).

46 entries.

<a id="schema-agentlabel"></a>

## `AgentLabel`

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.

- Kind: schema
- Workspace: [klav-core](../../architecture/klav-core.md)
- Source: [crates/klav-core/src/model/agent_labels.rs:23](https://github.com/OmarAlex24/klav/blob/034e81b52d1b693c65ff95181cd555c6734bc8e8/crates/klav-core/src/model/agent_labels.rs#L23-L35)
- Handlers: 0 · Callers: 0
- Shape: `{ label?: string; host?: string; role_hint?: string }`

<a id="schema-agentlabels"></a>

## `AgentLabels`

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

- Kind: schema
- Workspace: [klav-core](../../architecture/klav-core.md)
- Source: [crates/klav-core/src/model/agent_labels.rs:75](https://github.com/OmarAlex24/klav/blob/034e81b52d1b693c65ff95181cd555c6734bc8e8/crates/klav-core/src/model/agent_labels.rs#L75-L81)
- Handlers: 0 · Callers: 0
- Shape: `{ labels?: Record<AgentId, AgentLabel> }`

<a id="schema-attachmentmeta"></a>

## `AttachmentMeta`

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

- Kind: schema
- Workspace: [klav-core](../../architecture/klav-core.md)
- Source: [crates/klav-core/src/model/item.rs:429](https://github.com/OmarAlex24/klav/blob/034e81b52d1b693c65ff95181cd555c6734bc8e8/crates/klav-core/src/model/item.rs#L429-L440)
- Handlers: 0 · Callers: 0
- Shape: `{ id: AttachmentId; file_name: string; size: number; media_type?: string }`

<a id="schema-author"></a>

## `Author`

Who wrote a version (ADR 0030 §7).

- Kind: schema
- Workspace: [klav-core](../../architecture/klav-core.md)
- Source: [crates/klav-core/src/model/environment.rs:317](https://github.com/OmarAlex24/klav/blob/034e81b52d1b693c65ff95181cd555c6734bc8e8/crates/klav-core/src/model/environment.rs#L317-L324)
- Handlers: 0 · Callers: 0
- Shape: `"person" | "agent"`

<a id="schema-changepasswordsource"></a>

## `ChangePasswordSource`

Where a change-password page came from.

- Kind: schema
- Workspace: [klav-core](../../architecture/klav-core.md)
- Source: [crates/klav-core/src/generator/change_password.rs:27](https://github.com/OmarAlex24/klav/blob/034e81b52d1b693c65ff95181cd555c6734bc8e8/crates/klav-core/src/generator/change_password.rs#L27-L37)
- Handlers: 0 · Callers: 0
- Shape: `{ source: "bundled"; domain: string } | { source: "well_known" }`

<a id="schema-changepasswordurl"></a>

## `ChangePasswordUrl`

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

- Kind: schema
- Workspace: [klav-core](../../architecture/klav-core.md)
- Source: [crates/klav-core/src/generator/change_password.rs:40](https://github.com/OmarAlex24/klav/blob/034e81b52d1b693c65ff95181cd555c6734bc8e8/crates/klav-core/src/generator/change_password.rs#L40-L49)
- Handlers: 0 · Callers: 0
- Shape: `{ url: string; host: string } & ChangePasswordSource`

<a id="schema-effect"></a>

## `Effect`

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

- Kind: schema
- Workspace: [klav-core](../../architecture/klav-core.md)
- Source: [crates/klav-core/src/policy.rs:184](https://github.com/OmarAlex24/klav/blob/034e81b52d1b693c65ff95181cd555c6734bc8e8/crates/klav-core/src/policy.rs#L184-L193)
- Handlers: 0 · Callers: 0
- Shape: `"allow" | "ask" | "deny"`

<a id="schema-envlinkdecision"></a>

## `EnvLinkDecision`

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

- Kind: schema
- Workspace: [klav-core](../../architecture/klav-core.md)
- Source: [crates/klav-core/src/secret_request.rs:529](https://github.com/OmarAlex24/klav/blob/034e81b52d1b693c65ff95181cd555c6734bc8e8/crates/klav-core/src/secret_request.rs#L529-L536)
- Handlers: 0 · Callers: 0
- Shape: `{ environment: string; variable: string }`

<a id="schema-envlinkproposal"></a>

## `EnvLinkProposal`

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

- Kind: schema
- Workspace: [klav-core](../../architecture/klav-core.md)
- Source: [crates/klav-core/src/secret_request.rs:501](https://github.com/OmarAlex24/klav/blob/034e81b52d1b693c65ff95181cd555c6734bc8e8/crates/klav-core/src/secret_request.rs#L501-L508)
- Handlers: 0 · Callers: 0
- Shape: `{ environment: string; variable: string }`

<a id="schema-environmentsummary"></a>

## `EnvironmentSummary`

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

- Kind: schema
- Workspace: [klav-core](../../architecture/klav-core.md)
- Source: [crates/klav-core/src/model/environment.rs:138](https://github.com/OmarAlex24/klav/blob/034e81b52d1b693c65ff95181cd555c6734bc8e8/crates/klav-core/src/model/environment.rs#L138-L146)
- Handlers: 0 · Callers: 0
- Shape: `{ protected: boolean; variables: string[] }`

<a id="schema-fieldkind"></a>

## `FieldKind`

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

- Kind: schema
- Workspace: [klav-core](../../architecture/klav-core.md)
- Source: [crates/klav-core/src/model/item.rs:136](https://github.com/OmarAlex24/klav/blob/034e81b52d1b693c65ff95181cd555c6734bc8e8/crates/klav-core/src/model/item.rs#L136-L161)
- Handlers: 0 · Callers: 0
- Shape: `"username" | "password" | "totp" | "file" | "text" | "concealed" | "url" | "email" | "phone" | "date" | "month_year"`

<a id="schema-generatorkind"></a>

## `GeneratorKind`

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

- Kind: schema
- Workspace: [klav-core](../../architecture/klav-core.md)
- Source: [crates/klav-core/src/generator/mod.rs:301](https://github.com/OmarAlex24/klav/blob/034e81b52d1b693c65ff95181cd555c6734bc8e8/crates/klav-core/src/generator/mod.rs#L301-L313)
- Handlers: 0 · Callers: 0
- Shape: `"smart" | "random" | "memorable" | "pin"`

<a id="schema-generatoroptions"></a>

## `GeneratorOptions`

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`.

- Kind: schema
- Workspace: [klav-core](../../architecture/klav-core.md)
- Source: [crates/klav-core/src/generator/mod.rs:324](https://github.com/OmarAlex24/klav/blob/034e81b52d1b693c65ff95181cd555c6734bc8e8/crates/klav-core/src/generator/mod.rs#L324-L351)
- Handlers: 0 · Callers: 0
- Shape: `{ kind: GeneratorKind; length: number; lowercase: boolean; uppercase: boolean; digits: boolean; symbols: boolean; avoid_ambiguous: boolean; words: number; separator: string; capitalize: boolean; include_number: boolean; pin_length: number }`

<a id="schema-hostrelation"></a>

## `HostRelation`

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.

- Kind: schema
- Workspace: [klav-core](../../architecture/klav-core.md)
- Source: [crates/klav-core/src/site.rs:154](https://github.com/OmarAlex24/klav/blob/034e81b52d1b693c65ff95181cd555c6734bc8e8/crates/klav-core/src/site.rs#L154-L168)
- Handlers: 0 · Callers: 0
- Shape: `"exact" | "subdomain" | "parent"`

<a id="schema-imagestatus"></a>

## `ImageStatus`

The status of an image in the manifest.

- Kind: schema
- Workspace: [klav-core](../../architecture/klav-core.md)
- Source: [crates/klav-core/src/nitro/manifest.rs:51](https://github.com/OmarAlex24/klav/blob/034e81b52d1b693c65ff95181cd555c6734bc8e8/crates/klav-core/src/nitro/manifest.rs#L51-L60)
- Handlers: 0 · Callers: 0
- Shape: `"current" | "draining" | "revoked"`

<a id="schema-itemkind"></a>

## `ItemKind`

Item types (design §3).

- Kind: schema
- Workspace: [klav-core](../../architecture/klav-core.md)
- Source: [crates/klav-core/src/model/item.rs:89](https://github.com/OmarAlex24/klav/blob/034e81b52d1b693c65ff95181cd555c6734bc8e8/crates/klav-core/src/model/item.rs#L89-L122)
- Handlers: 0 · Callers: 0
- Shape: `"login" | "card" | "identity" | "ssh_key" | "file" | "totp" | "note" | "api_key" | "database" | "generator_history" | "preferences" | "agent_labels" | "environment"`

<a id="schema-overview"></a>

## `Overview`

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

- Kind: schema
- Workspace: [klav-core](../../architecture/klav-core.md)
- Source: [crates/klav-core/src/model/item.rs:443](https://github.com/OmarAlex24/klav/blob/034e81b52d1b693c65ff95181cd555c6734bc8e8/crates/klav-core/src/model/item.rs#L443-L468)
- Handlers: 0 · Callers: 0
- Shape: `{ v: number; kind: ItemKind; title: string; username?: string; urls?: string[]; tags?: string[]; passkey?: PasskeySummary; environment?: EnvironmentSummary }`

<a id="schema-passkeysummary"></a>

## `PasskeySummary`

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

- Kind: schema
- Workspace: [klav-core](../../architecture/klav-core.md)
- Source: [crates/klav-core/src/model/passkey.rs:47](https://github.com/OmarAlex24/klav/blob/034e81b52d1b693c65ff95181cd555c6734bc8e8/crates/klav-core/src/model/passkey.rs#L47-L56)
- Handlers: 0 · Callers: 0
- Shape: `{ rp_id: string; credential_id: string; user_name: string }`

<a id="schema-permission"></a>

## `Permission`

Agent permissions (design §5.2).

- Kind: schema
- Workspace: [klav-core](../../architecture/klav-core.md)
- Source: [crates/klav-core/src/policy.rs:63](https://github.com/OmarAlex24/klav/blob/034e81b52d1b693c65ff95181cd555c6734bc8e8/crates/klav-core/src/policy.rs#L63-L93)
- Handlers: 0 · Callers: 0
- Shape: `"list" | "fill" | "inject" | "totp" | "reveal" | "create" | "update" | "delete" | "passkey" | "rotate" | "proxy"`

<a id="schema-policy"></a>

## `Policy`

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

- Kind: schema
- Workspace: [klav-core](../../architecture/klav-core.md)
- Source: [crates/klav-core/src/policy.rs:1329](https://github.com/OmarAlex24/klav/blob/034e81b52d1b693c65ff95181cd555c6734bc8e8/crates/klav-core/src/policy.rs#L1329-L1338)
- Handlers: 0 · Callers: 0
- Shape: `{ rules?: Rule[]; expires_at?: number }`

<a id="schema-preferences"></a>

## `Preferences`

The preferences of the account.

- Kind: schema
- Workspace: [klav-core](../../architecture/klav-core.md)
- Source: [crates/klav-core/src/model/preferences.rs:23](https://github.com/OmarAlex24/klav/blob/034e81b52d1b693c65ff95181cd555c6734bc8e8/crates/klav-core/src/model/preferences.rs#L23-L33)
- Handlers: 0 · Callers: 0
- Shape: `{ developer?: boolean; proxy?: ProxySetting }`

<a id="schema-proxymode"></a>

## `ProxyMode`

`proxy.mode`.

- Kind: schema
- Workspace: [klav-core](../../architecture/klav-core.md)
- Source: [crates/klav-core/src/model/preferences.rs:36](https://github.com/OmarAlex24/klav/blob/034e81b52d1b693c65ff95181cd555c6734bc8e8/crates/klav-core/src/model/preferences.rs#L36-L48)
- Handlers: 0 · Callers: 0
- Shape: `"none" | "own" | "klav"`

<a id="schema-proxyproposal"></a>

## `ProxyProposal`

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

- Kind: schema
- Workspace: [klav-core](../../architecture/klav-core.md)
- Source: [crates/klav-core/src/secret_request.rs:400](https://github.com/OmarAlex24/klav/blob/034e81b52d1b693c65ff95181cd555c6734bc8e8/crates/klav-core/src/secret_request.rs#L400-L427)
- Handlers: 0 · Callers: 0
- Shape: `{ preset?: string; profile: string; upstream: string; header: string; prefix?: string; methods?: string[]; ask_methods?: string[]; path_prefixes: string[]; rate_per_minute?: number }`

<a id="schema-proxysetting"></a>

## `ProxySetting`

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

- Kind: schema
- Workspace: [klav-core](../../architecture/klav-core.md)
- Source: [crates/klav-core/src/model/preferences.rs:52](https://github.com/OmarAlex24/klav/blob/034e81b52d1b693c65ff95181cd555c6734bc8e8/crates/klav-core/src/model/preferences.rs#L52-L60)
- Handlers: 0 · Callers: 0
- Shape: `{ mode: ProxyMode; agent_id?: AgentId }`

<a id="schema-rule"></a>

## `Rule`

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

- Kind: schema
- Workspace: [klav-core](../../architecture/klav-core.md)
- Source: [crates/klav-core/src/policy.rs:1261](https://github.com/OmarAlex24/klav/blob/034e81b52d1b693c65ff95181cd555c6734bc8e8/crates/klav-core/src/policy.rs#L1261-L1283)
- Handlers: 0 · Callers: 0
- Shape: `{ permission: Permission; effect: Effect; scope?: Scope; expires_at?: number; once?: boolean; origin?: RuleOrigin }`

<a id="schema-ruleorigin"></a>

## `RuleOrigin`

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

- Kind: schema
- Workspace: [klav-core](../../architecture/klav-core.md)
- Source: [crates/klav-core/src/policy.rs:1237](https://github.com/OmarAlex24/klav/blob/034e81b52d1b693c65ff95181cd555c6734bc8e8/crates/klav-core/src/policy.rs#L1237-L1245)
- Handlers: 0 · Callers: 0
- Shape: `"protected"`

<a id="schema-rulesfallback"></a>

## `RulesFallback`

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

- Kind: schema
- Workspace: [klav-core](../../architecture/klav-core.md)
- Source: [crates/klav-core/src/generator/mod.rs:428](https://github.com/OmarAlex24/klav/blob/034e81b52d1b693c65ff95181cd555c6734bc8e8/crates/klav-core/src/generator/mod.rs#L428-L435)
- Handlers: 0 · Callers: 0
- Shape: `"unreadable" | "impossible"`

<a id="schema-rulessource"></a>

## `RulesSource`

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

- Kind: schema
- Workspace: [klav-core](../../architecture/klav-core.md)
- Source: [crates/klav-core/src/generator/mod.rs:413](https://github.com/OmarAlex24/klav/blob/034e81b52d1b693c65ff95181cd555c6734bc8e8/crates/klav-core/src/generator/mod.rs#L413-L425)
- Handlers: 0 · Callers: 0
- Shape: `{ source: "field" } | { source: "bundled"; domain: string } | { source: "lengths" }`

<a id="schema-scope"></a>

## `Scope`

Where a rule applies. Empty dimensions do not constrain.

- Kind: schema
- Workspace: [klav-core](../../architecture/klav-core.md)
- Source: [crates/klav-core/src/policy.rs:1081](https://github.com/OmarAlex24/klav/blob/034e81b52d1b693c65ff95181cd555c6734bc8e8/crates/klav-core/src/policy.rs#L1081-L1132)
- Handlers: 0 · Callers: 0
- Shape: `{ vaults?: Selector[]; projects?: Selector[]; tags?: string[]; domains?: DomainPattern[]; hours?: TimeWindow[]; items?: ItemId[]; methods?: HttpMethod[]; path_prefixes?: PathPrefix[]; mcp_tools?: ToolPattern[]; upgrades?: Upgrade[]; sql_classes?: SqlClass[] }`

<a id="schema-secretrequestdecision"></a>

## `SecretRequestDecision`

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

- Kind: schema
- Workspace: [klav-core](../../architecture/klav-core.md)
- Source: [crates/klav-core/src/secret_request.rs:789](https://github.com/OmarAlex24/klav/blob/034e81b52d1b693c65ff95181cd555c6734bc8e8/crates/klav-core/src/secret_request.rs#L789-L831)
- Handlers: 0 · Callers: 0
- Shape: `{ v: number; request_id: SecretRequestId; agent_id: AgentId; status: SecretRequestStatus; in_grant: boolean; vault_id?: VaultId; project_id?: ProjectId; item_id?: ItemId; field?: string; proxy_profile?: string; env_linked?: EnvLinkDecision; attach_sandbox?: SandboxId }`

<a id="schema-secretrequestmode"></a>

## `SecretRequestMode`

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

- Kind: schema
- Workspace: [klav-core](../../architecture/klav-core.md)
- Source: [crates/klav-core/src/secret_request.rs:116](https://github.com/OmarAlex24/klav/blob/034e81b52d1b693c65ff95181cd555c6734bc8e8/crates/klav-core/src/secret_request.rs#L116-L123)
- Handlers: 0 · Callers: 0
- Shape: `"create" | "update"`

<a id="schema-secretrequestproposal"></a>

## `SecretRequestProposal`

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

- Kind: schema
- Workspace: [klav-core](../../architecture/klav-core.md)
- Source: [crates/klav-core/src/secret_request.rs:559](https://github.com/OmarAlex24/klav/blob/034e81b52d1b693c65ff95181cd555c6734bc8e8/crates/klav-core/src/secret_request.rs#L559-L619)
- Handlers: 0 · Callers: 0
- Shape: `{ v: number; mode: SecretRequestMode; kind?: ItemKind; title?: string; vault_id?: VaultId; project_id?: ProjectId; target_item_id?: ItemId; field: string; placeholder?: string; setup_url?: string; base_url?: string; urls?: string[]; notes?: string; proxy_proposal?: ProxyProposal; env_link?: EnvLinkProposal; sandbox_id?: SandboxId }`

<a id="schema-secretrequeststatus"></a>

## `SecretRequestStatus`

Outcome of a secret request decided by the person.

- Kind: schema
- Workspace: [klav-core](../../architecture/klav-core.md)
- Source: [crates/klav-core/src/secret_request.rs:136](https://github.com/OmarAlex24/klav/blob/034e81b52d1b693c65ff95181cd555c6734bc8e8/crates/klav-core/src/secret_request.rs#L136-L143)
- Handlers: 0 · Callers: 0
- Shape: `"fulfilled" | "denied"`

<a id="schema-sitehints"></a>

## `SiteHints`

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

- Kind: schema
- Workspace: [klav-core](../../architecture/klav-core.md)
- Source: [crates/klav-core/src/generator/mod.rs:399](https://github.com/OmarAlex24/klav/blob/034e81b52d1b693c65ff95181cd555c6734bc8e8/crates/klav-core/src/generator/mod.rs#L399-L410)
- Handlers: 0 · Callers: 0
- Shape: `{ host?: string; password_rules?: string; min_length?: number; max_length?: number }`

<a id="schema-sqlclass"></a>

## `SqlClass`

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.

- Kind: schema
- Workspace: [klav-core](../../architecture/klav-core.md)
- Source: [crates/klav-core/src/policy.rs:498](https://github.com/OmarAlex24/klav/blob/034e81b52d1b693c65ff95181cd555c6734bc8e8/crates/klav-core/src/policy.rs#L498-L515)
- Handlers: 0 · Callers: 0
- Shape: `"read" | "write" | "ddl" | "admin" | "unknown"`

<a id="schema-strength"></a>

## `Strength`

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

- Kind: schema
- Workspace: [klav-core](../../architecture/klav-core.md)
- Source: [crates/klav-core/src/generator/mod.rs:438](https://github.com/OmarAlex24/klav/blob/034e81b52d1b693c65ff95181cd555c6734bc8e8/crates/klav-core/src/generator/mod.rs#L438-L449)
- Handlers: 0 · Callers: 0
- Shape: `"weak" | "fair" | "strong" | "very_strong"`

<a id="schema-taskaccessdecision"></a>

## `TaskAccessDecision`

One approved access of a [`TaskDecision`].

- Kind: schema
- Workspace: [klav-core](../../architecture/klav-core.md)
- Source: [crates/klav-core/src/task.rs:380](https://github.com/OmarAlex24/klav/blob/034e81b52d1b693c65ff95181cd555c6734bc8e8/crates/klav-core/src/task.rs#L380-L400)
- Handlers: 0 · Callers: 0
- Shape: `{ vault_id: VaultId; project_id: ProjectId; item_id: ItemId; permissions: Permission[]; domains: string[]; added_by_klav: Permission[] }`

<a id="schema-taskaccessrequest"></a>

## `TaskAccessRequest`

One access of a [`TaskRequest`].

- Kind: schema
- Workspace: [klav-core](../../architecture/klav-core.md)
- Source: [crates/klav-core/src/task.rs:287](https://github.com/OmarAlex24/klav/blob/034e81b52d1b693c65ff95181cd555c6734bc8e8/crates/klav-core/src/task.rs#L287-L301)
- Handlers: 0 · Callers: 0
- Shape: `{ vault_id: VaultId; project_id: ProjectId; item_id: ItemId; permissions: Permission[]; domain?: string }`

<a id="schema-taskdecision"></a>

## `TaskDecision`

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.

- Kind: schema
- Workspace: [klav-core](../../architecture/klav-core.md)
- Source: [crates/klav-core/src/task.rs:339](https://github.com/OmarAlex24/klav/blob/034e81b52d1b693c65ff95181cd555c6734bc8e8/crates/klav-core/src/task.rs#L339-L359)
- Handlers: 0 · Callers: 0
- Shape: `{ v: number; task_id: TaskId; agent_id: AgentId; revision: number; expires_at_ms: number; access: TaskAccessDecision[]; offer?: TaskOffer }`

<a id="schema-taskoffer"></a>

## `TaskOffer`

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

- Kind: schema
- Workspace: [klav-core](../../architecture/klav-core.md)
- Source: [crates/klav-core/src/task.rs:363](https://github.com/OmarAlex24/klav/blob/034e81b52d1b693c65ff95181cd555c6734bc8e8/crates/klav-core/src/task.rs#L363-L370)
- Handlers: 0 · Callers: 0
- Shape: `{ task: string; reason: string }`

<a id="schema-taskrequest"></a>

## `TaskRequest`

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).

- Kind: schema
- Workspace: [klav-core](../../architecture/klav-core.md)
- Source: [crates/klav-core/src/task.rs:271](https://github.com/OmarAlex24/klav/blob/034e81b52d1b693c65ff95181cd555c6734bc8e8/crates/klav-core/src/task.rs#L271-L284)
- Handlers: 0 · Callers: 0
- Shape: `{ v: number; task: string; reason: string; duration_secs: number; access: TaskAccessRequest[] }`

<a id="schema-taskspec"></a>

## `TaskSpec`

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`.

- Kind: schema
- Workspace: [klav-core](../../architecture/klav-core.md)
- Source: [crates/klav-core/src/task.rs:217](https://github.com/OmarAlex24/klav/blob/034e81b52d1b693c65ff95181cd555c6734bc8e8/crates/klav-core/src/task.rs#L217-L228)
- Handlers: 0 · Callers: 0
- Shape: `{ task: string; reason: string; duration: string; access: TaskSpecAccess[] }`

<a id="schema-taskspecaccess"></a>

## `TaskSpecAccess`

One access of a [`TaskSpec`].

- Kind: schema
- Workspace: [klav-core](../../architecture/klav-core.md)
- Source: [crates/klav-core/src/task.rs:231](https://github.com/OmarAlex24/klav/blob/034e81b52d1b693c65ff95181cd555c6734bc8e8/crates/klav-core/src/task.rs#L231-L243)
- Handlers: 0 · Callers: 0
- Shape: `{ ref: string; permissions: Permission[]; domain?: string }`

<a id="schema-timewindow"></a>

## `TimeWindow`

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

- Kind: schema
- Workspace: [klav-core](../../architecture/klav-core.md)
- Source: [crates/klav-core/src/policy.rs:990](https://github.com/OmarAlex24/klav/blob/034e81b52d1b693c65ff95181cd555c6734bc8e8/crates/klav-core/src/policy.rs#L990-L1003)
- Handlers: 0 · Callers: 0
- Shape: `{ days?: Weekday[]; start: ClockTime; end: ClockTime; utc_offset?: UtcOffset }`

<a id="schema-upgrade"></a>

## `Upgrade`

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.

- Kind: schema
- Workspace: [klav-core](../../architecture/klav-core.md)
- Source: [crates/klav-core/src/policy.rs:472](https://github.com/OmarAlex24/klav/blob/034e81b52d1b693c65ff95181cd555c6734bc8e8/crates/klav-core/src/policy.rs#L472-L477)
- Handlers: 0 · Callers: 0
- Shape: `"websocket"`

<a id="schema-weekday"></a>

## `Weekday`

Day of the week.

- Kind: schema
- Workspace: [klav-core](../../architecture/klav-core.md)
- Source: [crates/klav-core/src/policy.rs:710](https://github.com/OmarAlex24/klav/blob/034e81b52d1b693c65ff95181cd555c6734bc8e8/crates/klav-core/src/policy.rs#L710-L727)
- Handlers: 0 · Callers: 0
- Shape: `"mon" | "tue" | "wed" | "thu" | "fri" | "sat" | "sun"`
