code wiki / (root) / nx_spore.nx

nx_spore.nx

buildroot/runtime/nx_spore.nx

11138 B287 linesdepth 2pulls 2 transitivereach 1 importersview sourcekind librarytopic spore
docsdependenciesstructsconstsfunctions

about

nx_spore.nx -- drift unit; positive mycelium-class networking bootstrap. Per META-CARDINAL feedback-forest-meta-vision-drift-lifecycle: the tiniest viable Nishi-stack capsule that, when planted on an operator- consented device of any size, bit-by-bit builds the device's ability to talk to other Nishi peers -- like a fungal spore germinates and reaches out with first hyphae, NOT like a botnet/zombie/parasite. Per existing NISHI_SPORE_ROADMAP.md: this primitive handles the LIFECYCLE STATE MACHINE + form-factor classification. The actual bootable-artifact emission (ISO 9660 / GPT / qcow2 / etc.) lives in nx_spore_emit (queued); the cell-supervisor bring-up at first-boot lives in nx_germinate (queued). This primitive is the lifecycle substrate that other spore primitives compose against. V1 ships: - sealed enum of form factors (ISO / RAW_DISK / SD / QCOW2 / VMDK / VHDX / NETBOOT / NISHI_SILICON) - sealed enum of germination states (PACKED / TRANSPORTED / LANDED / VERIFIED / NETWORKING_UP / READY_FOR_SEED / FAILED) - state machine transitions per [[feedback-self-surfacing- intelligence-staged-autonomy]] operator gates - positive-network discipline predicate (operator-consent required; never covert) Composes: nx_methyl -- spore artifact carries Ed25519-signed methyl marker nx_chromatin -- next-stage chromatin block fetch (post-germination) nx_attest_silicon -- silicon-trust verdict before sovereignty-critical cell assembly nx_niche -- germinated spore probes niche before seed assembly nx_provenance_chain -- every state transition chain-logged Gap list (V1 honest perf verdict): - state machine logic only; actual ISO/qcow2/etc. emission lives in nx_spore_emit (queued) - <50KB target documented in roadmap; current substrate doesn't yet measure spore artifact size - operator-consent flag is operator-attested (V2 composes with nx_covenant for landowner/installer consent chain)

dependencies 2 imports · 1 importers

nx_syscalls.nx nx_tier.nx nx_spore.nx nx_spore_test.nx

imports: nx_syscalls.nxnx_tier.nx

imported by: nx_spore_test.nx

structs

98struct NxSporeRecord

consts

61const NX_SF_HYBRID_ISO: nx_int = 0
62const NX_SF_RAW_DISK_IMG: nx_int = 1
63const NX_SF_SD_CARD: nx_int = 2
64const NX_SF_QCOW2: nx_int = 3
65const NX_SF_VMDK: nx_int = 4
66const NX_SF_VHDX: nx_int = 5
67const NX_SF_NETBOOT_PXE: nx_int = 6
68const NX_SF_NISHI_SILICON_RV64: nx_int = 7
69const NX_SF_N_FORMS: nx_int = 8
73const NX_GS_PACKED: nx_int = 0 // freshly emitted; not yet deployed
74const NX_GS_TRANSPORTED: nx_int = 1 // on target media (USB stick, etc.)
75const NX_GS_LANDED: nx_int = 2 // booted on target hardware
76const NX_GS_VERIFIED: nx_int = 3 // Ed25519 + BLAKE3 attestation passed
77const NX_GS_NETWORKING_UP: nx_int = 4 // peer-mesh discovery active
78const NX_GS_READY_FOR_SEED: nx_int = 5 // niche probed; ready for nx_seed
79const NX_GS_FAILED: nx_int = 6 // terminal failure state
80const NX_GS_N_STATES: nx_int = 7
84const NX_SP_OK: nx_int = 0
85const NX_SP_ERR_INVALID_FORM: nx_int = 1
86const NX_SP_ERR_INVALID_TRANSITION: nx_int = 2
87const NX_SP_ERR_OPERATOR_CONSENT_MISSING: nx_int = 3
88const NX_SP_ERR_VERIFICATION_FAILED: nx_int = 4
89const NX_SP_ERR_NULL_INPUT: nx_int = 5
90const NX_SP_N_VERDICTS: nx_int = 6
109const NX_SP_REC_BYTES: nx_int = 64

functions

113func nx_sf_form_is_valid(f: nx_int) -> nx_int
121func nx_gs_state_is_valid(s: nx_int) -> nx_int
129func nx_sp_verdict_is_valid(v: nx_int) -> nx_int
called by 1: main
137func nx_gs_state_is_terminal(s: nx_int) -> nx_int
145func nx_gs_state_is_active(s: nx_int) -> nx_int
called by 1: main
156func nx_sf_is_bootable_artifact(f: nx_int) -> nx_int
called by 1: main calls 1: nx_sf_form_is_valid
168func _sp_transition_allowed(from: nx_int, to: nx_int) -> nx_int
201func nx_sp_record_new(form_factor: nx_int,
called by 1: main calls 1: sys_mmap
234func nx_sp_record_transition(r: *NxSporeRecord,
261func nx_sp_record_mark_verified(r: *NxSporeRecord,
called by 1: main calls 1: nx_sp_record_transition
274func nx_sp_record_set_silicon_trust(r: *NxSporeRecord,
called by 1: main
283func nx_sp_record_is_ready_for_seed(r: *NxSporeRecord) -> nx_int
called by 1: main