code wiki / (root) / nx_pathway.nx

nx_pathway.nx

buildroot/runtime/nx_pathway.nx

10421 B275 linesdepth 5pulls 9 transitivereach 8 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_pathway.nx -- cell-graph manifest. Biological analogue: a signaling pathway is a sequence of molecular events where signal transduction passes through ordered cells via vesicles. Nishi pathway is the substrate-level declarative composition format: a typed directed graph of cells with vesicle edges between them. Same .nx pathway runs local-only, split across laptop+NAS+peer GPU, or all-cloud -- the operator changes the per- cell tropism, not the graph. Per [[feedback-pathway-tropism-block-composition-location-agnostic]]: the structural EXCEED-axis vs ComfyUI / Langflow / Airflow DAG / K8s Argo / Ray Serve / Step Functions ASL / Temporal: those bind the location of work at graph-definition time. nx_pathway lets the SAME manifest run differently per cell's nx_tropism resolution. Composes: nx_budget -- each cell has a budget pointer; pathway aggregates for whole-pathway forecasting nx_attention_class -- each cell declares its class nx_tropism -- each cell declares preferred location nx_ribosome -- each cell declares ribosome target nx_metabolism -- pathway-level hot-site list informs replan nx_homeostasis -- migration signals at the cell level may trigger pathway-wide topology re-resolve V1 ships a fixed-capacity graph with cells + edges. Sub-graph composition (pathway-of-pathways) is queued; parallel sub-graphs are representable but the scheduler that exploits them is V2. Gap list (V1 honest perf verdict): - no typed payload validation between cells (caller's job) - no cycle detection (caller must build DAG-correct) - no per-edge bandwidth budget (queued for distributed scheduler) - no live re-routing (pathway is rebuilt, not patched, on migration signal) - no NxCellSpec field count is bumping the parser's 16-field ceiling -- stay strict to that contract per [[feedback-nishilang-16-arg-function-limit]]

dependencies 6 imports · 6 importers

nx_syscalls.nx nx_tier.nx nx_budget.nx nx_attention_class.nx nx_tropism.nx nx_ribosome.nx nx_pathway.nx nx_ecosystem_compose_test.nx nx_organism.nx nx_organism_test.nx nx_pathway_test.nx nx_sovereign_compose_test.nx nx_substrate_compose_test.nx

imports: nx_syscalls.nxnx_tier.nxnx_budget.nxnx_attention_class.nxnx_tropism.nxnx_ribosome.nx

imported by: nx_ecosystem_compose_test.nxnx_organism.nxnx_organism_test.nxnx_pathway_test.nxnx_sovereign_compose_test.nxnx_substrate_compose_test.nx

structs

74struct NxCellSpec
90struct NxEdge
102struct NxPathway

consts

62const NX_PW_OK: nx_int = 0
63const NX_PW_ERR_FULL: nx_int = 1
64const NX_PW_ERR_BAD_CELL: nx_int = 2
65const NX_PW_ERR_BAD_EDGE: nx_int = 3
66const NX_PW_ERR_CELL_NOT_FOUND: nx_int = 4
112const NX_PW_CELLSPEC_BYTES: nx_size = 64
114const NX_PW_EDGE_BYTES: nx_size = 24

functions

118func nx_pathway_new(cell_capacity: nx_size, edge_capacity: nx_size) -> *NxPathway
called by 5: mainmainmainmainmain calls 1: sys_mmap
133func _pathway_cell_at(p: *NxPathway, idx: nx_size) -> *NxCellSpec
139func _pathway_edge_at(p: *NxPathway, idx: nx_size) -> *NxEdge
called by 1: nx_pathway_add_edge
150func nx_pathway_add_cell(p: *NxPathway, spec: *NxCellSpec) -> nx_int
169func _pathway_find_cell_idx(p: *NxPathway, cell_id: nx_int) -> nx_int
184func nx_pathway_add_edge(p: *NxPathway,
201func nx_pathway_get_cell(p: *NxPathway, cell_id: nx_int) -> *NxCellSpec
217func nx_pathway_resolve_target(p: *NxPathway,
232func nx_pathway_aggregate_ram_max(p: *NxPathway) -> nx_size
247func nx_pathway_aggregate_vram_max(p: *NxPathway) -> nx_size
266func nx_pathway_count_remote_cells(p: *NxPathway) -> nx_size