Expand description
Consent gating for egress providers (SPEC.md §4 and §10;
SPEC.md §7 point 4).
The security-critical rule: a provider that declares egress — anything
that could send workspace content off the local machine — MUST NOT be
queried until the user has recorded explicit, one-time consent that
names what leaves. A host never auto-enables egress. Read/write-only
providers carry no such gate. The store is in-memory and serde-able so a
host can persist the user’s decisions across runs (task deliverable 4).
Scope-level consent is recorded as a
ConsentReceipt — a protocol-defined
shape that lives in contextgraph-types alongside the usage report, since
any host claiming the consent guarantee must produce it and any auditor must
be able to read it. This module holds the host machinery that consumes
receipts: the append-only ledger and the gate.
Structs§
- Consent
Record - A recorded consent decision for one provider.
granted_scopeis the human-readable description of what data flows out, shown to the user at consent time and retained as the audit of what they agreed to (SPEC.md §4). - Consent
Store - The set of consent decisions a host holds: a keyed table of legacy boolean
ConsentRecords and an append-only ledger of scope-levelConsentReceipts (docs/context-reuse.md§3). Both are serde-able so a host can persist a user’s decisions — and the receipt ledger — across runs.
Enums§
- Consent
Decision - The host’s pre-query consent verdict for one provider — the gate result the
host acts on before transmitting a query (
docs/context-reuse.md§3).