Expand description
Out-of-band consent (SPEC-ENGINE §3.8; C0 2.0 consent.schema.json,
enums/consent-kinds.json, vectors/consent_*.vectors.json).
The engine creates every consent (RESOLUTIONS R16); a person answers it
in a terminal, the Cockpit or the browser. No MCP action can approve:
approval lives only in broker::Broker::approve, which takes a
Proof that only an approval channel produces.
Re-exports§
Modules§
- broker
consent::Broker(SPEC-ENGINE §3.8.1): creates requests, stores the person’s decisions with their proof, and checks that proof on every read. A record whose proof fails is ignored and the step returnsconsent_record_invalid; a hand-writtenstate: approvedfile therefore has no effect on anos_presencehost.- channel
- The CLI approval channel (SPEC-ENGINE §3.8.2, first row).
- chat_
key - The device chat key (rc4-32): an Ed25519 key that lives only in LeanCTX
Code and signs the person’s posts (
leanctx.cloud.person_publish.v1). - helper_
mac - Client of
LeanCTX Consent.app(SPEC-ENGINE §3.8.5): the only signer of consent proofs on macOS. The engine checks the helper’s code signature (Team ID pin) before every use, starts it with a private socket and a session secret on stdin, and asks it over JSON-RPC lines. - optin_
key - The opt-in key (rc4-16, owner decision 24.11.): an Ed25519 key that lives only in LeanCTX Code (its Keychain) and signs the person’s “turn task pickup on” without a prompt per click.
- person_
sign - What the person at this Instance signs with its bound presence key, so the Cloud can tell the person from the agents that share the instance token (a person’s publish first; opt-ins and decision changes follow with their own domains).
- task_
key - The app’s task-propose key (rc4-67): an Ed25519 key that lives only in
LeanCTX Code and signs the person’s own task proposals
(
leanctx.cloud.task_propose_person.v1). - web
- Web channel
lean-ctx cloud consent --web <id>(SPEC-ENGINE §3.8.2 “Web channel flow”, RESOLUTIONS R49, R61, R82).
Structs§
- Presence
Signature - The presence-key signature of an approval (§3.8.4).
- Record
- One consent request and its decision.
Enums§
- Channel
- How a decision was made (
enums/consent-channels.json). - Consent
Error - Why a consent-gated step did not run.
code()is the C0/engine error code;Displayis the person-facing text of SPEC-ENGINE §3.17. - Kind
- The C0 consent kinds (C0 2.2): sharing a checkout into a vault and storing an API key.
- Proof
- Exactly one proof per approved record (§3.8.1).
- State
Constants§
- PROOF_
DOMAIN - Domain of a presence-key signature (§3.8.1, form (b) of §3.8.3).
- REQUEST_
TTL_ MS - A request may be answered for 24 h.
- STATEMENT_
DOMAIN - Domain and schema of a Cloud-signed web answer (§3.8.2 step 5).
- STATEMENT_
SCHEMA
Functions§
- check_
subject - The subject carries exactly the kind’s fields (no
isolation, R107), each of the type the schema gives it. - is_
consent_ id - new_
consent_ id cns_+ 16 lowercase base32 (80 random bits).- subject
- Build a subject from its fields (callers name each one).
- subject_
digest hex(blake3(canonical_json(subject))).