Skip to main content

Module agency_delegation

Module agency_delegation 

Source
Expand description

AgencyDelegation — the integrating record for supported agency (ADR §7–§10).

Binds a principal to their agent(s) for a domain of agency, under an AuthorityProfile (modality × trigger × accountability), gated by a Trigger, anchored to a shared-values credential (default UN-HR / UNCRC), scoped by ABAC attributes + jurisdiction + precedence (the backpacker case: family Primary, a local housemate LocalTemporary), with validity, consent, revocation, an evidence-chain reference, and — for the child-maturation case — a monotonic developmental transfer schedule.

delegation_permits is the fail-closed ABAC evaluator. Two invariants are load-bearing: selfhood is never delegated by default (a Selfhood-sphere request is denied unless the delegation carries an explicit selfhood grant), and consequential-domain judgements require declared provenance + an epistemic horizon.

Structs§

AccessRequest
A request to act under a delegation. provenance carries the declared judgement provenance (required for consequential-domain judgements).
AgencyDelegation
A supported-agency delegation.
TransferStage
One monotonic transfer step: at trigger (age milestone / capacity attestation / the child’s declarative claim), domain advances to to_stage.

Enums§

AccessDecision
ConsentState
Consent state of the principal. Fail-closed: Pending is not effective.
ControlStage
Control stage of a domain under a developmental (child-maturation) transfer. Monotonic: authority only ever flows toward the principal (ADR §7.2).
Precedence
Precedence among agents/delegations. The backpacker case: family back home is Primary, a local housemate who can help in an emergency is LocalTemporary.

Functions§

agency_delegation_full_json
The lossless JSON of a delegation — every field. Stored as the journal record’s summary so the full delegation (authority, trigger, scope, transfer schedule, …) reconstructs on read; the lossy agency_delegation_summary is for compact projections only.
agency_delegation_record_id
agency-delegation-record ID.
agency_delegation_summary
Agency-delegation summary.
build_agency_delegation_envelope
Builds agency-delegation-envelope.
delegation_permits
Fail-closed, bounded, deterministic ABAC. Order matters: revocation → consent → validity → trigger → domain → selfhood default-deny → consequential-provenance → jurisdiction.
parse_agency_delegation
Reconstruct a delegation from its lossless JSON (as stored by agency_delegation_full_json).