code wiki / (root) / nx_covenant.nx

nx_covenant.nx

buildroot/runtime/nx_covenant.nx

9291 B251 linesdepth 2pulls 2 transitivereach 1 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_covenant.nx -- multi-stakeholder + multi-generational consent. Per META-CARDINAL feedback-regenerative-stewardship-doctrine-captain-moroni: the legal-and-relational substrate where regenerative intentions become regenerative actions without harm. Composes: landowner consent + Indigenous Free Prior and Informed Consent (FPIC) per UN Declaration on the Rights of Indigenous Peoples + Indigenous Data Sovereignty + CARE Principles + watershed rights + regulatory compliance + neighbor relationships + future-inheritor obligations. V1 ships sealed enums of stakeholder classes + consent states + covenant lifecycle + revocation handling. Per [[feedback-user-owns- every-bit]]: every consent is operator-scope-bounded + time-bounded + revocable.

dependencies 2 imports · 1 importers

nx_syscalls.nx nx_tier.nx nx_covenant.nx nx_covenant_test.nx

imports: nx_syscalls.nxnx_tier.nx

imported by: nx_covenant_test.nx

structs

61struct NxConsentEntry
75struct NxCovenant

consts

24const NX_SH_LANDOWNER: nx_int = 0
25const NX_SH_INDIGENOUS_NATION: nx_int = 1 // requires FPIC
26const NX_SH_DOWNSTREAM_WATER_USER: nx_int = 2
27const NX_SH_REGULATORY_BODY: nx_int = 3
28const NX_SH_NEIGHBOR: nx_int = 4
29const NX_SH_FUTURE_INHERITOR: nx_int = 5 // multi-generational
30const NX_SH_OPERATOR: nx_int = 6 // the primary actor
31const NX_SH_FAMILY_MEMBER: nx_int = 7
32const NX_SH_COMMUNITY_COUNCIL: nx_int = 8
33const NX_SH_TRUSTED_ADVISOR: nx_int = 9 // counsel / ecologist / etc.
34const NX_SH_N_CLASSES: nx_int = 10
38const NX_CN_PENDING: nx_int = 0
39const NX_CN_GRANTED: nx_int = 1
40const NX_CN_GRANTED_CONDITIONAL: nx_int = 2 // with stipulations
41const NX_CN_DECLINED: nx_int = 3
42const NX_CN_REVOKED: nx_int = 4
43const NX_CN_EXPIRED: nx_int = 5
44const NX_CN_NOT_APPLICABLE: nx_int = 6 // stakeholder doesn't apply here
45const NX_CN_N_STATES: nx_int = 7
49const NX_CV_V_OK_ALL_GRANTED: nx_int = 0
50const NX_CV_V_PENDING_STAKEHOLDERS: nx_int = 1
51const NX_CV_V_BLOCKED_DECLINED: nx_int = 2
52const NX_CV_V_FPIC_REQUIRED_MISSING: nx_int = 3 // Indigenous consent missing
53const NX_CV_V_REVOKED: nx_int = 4
54const NX_CV_V_EXPIRED: nx_int = 5
55const NX_CV_V_NULL: nx_int = 6
56const NX_CV_V_INVALID: nx_int = 7
57const NX_CV_V_N: nx_int = 8
71const NX_CN_ENT_BYTES: nx_int = 48
85const NX_CV_BYTES: nx_int = 48

functions

87func nx_sh_class_is_valid(c: nx_int) -> nx_int
93func nx_cn_state_is_valid(s: nx_int) -> nx_int
99func nx_cv_v_is_valid(v: nx_int) -> nx_int
called by 1: main
105func nx_cn_state_is_blocking(s: nx_int) -> nx_int
called by 1: main
112func nx_cn_state_is_satisfied(s: nx_int) -> nx_int
called by 2: nx_cv_classifymain
119func nx_sh_class_requires_fpic(c: nx_int) -> nx_int
called by 1: main
124func nx_cv_new(covenant_id: nx_int,
called by 1: main calls 1: sys_mmap
142func _cv_entry_at(c: *NxCovenant, idx: nx_int) -> *NxConsentEntry
149func nx_cv_add_stakeholder(c: *NxCovenant,
called by 1: main calls 1: nx_sh_class_is_valid
199func nx_cv_classify(c: *NxCovenant, now_us: nx_size) -> nx_int
241func nx_cv_count_by_class(c: *NxCovenant, class_id: nx_int) -> nx_int
called by 1: main calls 1: _cv_entry_at