code wiki / (root) / nx_workflow_lib.nx

nx_workflow_lib.nx

buildroot/runtime/nx_workflow_lib.nx

9253 B199 linesdepth 4pulls 5 transitivereach 2 importersview sourcekind librarytopic workflow
docsdependenciesstructsconstsfunctions

about

nx_workflow_lib.nx -- CONSOLIDATED workflow tool (MCP name: nx_workflow, tool #5 of the 15), LIBRARY half. READ-ONLY first increment over the WMS registry SSOT (knowledge/store/ws-): the operator's "workstreams callable from anywhere" ask -- a crash needs only this board + a resume trigger. board <prefix> -> every workstream: state / empire / id / last_touched (+ per-state totals) show <prefix> <id> -> one workstream, every field labeled Composes the WMS store lib (ws_get_p / ws_field / WS record schema) -- no reinvention. spawn/dispatch/ resume = WRITE increments behind their own cap, after this read surface is proven. license_tier: ORIGINAL

dependencies 3 imports · 2 importers

nx_syscalls.nx nx_itoa_lib.nx nx_workstream_store.nx nx_workflow_lib.nx nx_workflow.nx nx_workflow_gate.nx

imports: nx_syscalls.nxnx_itoa_lib.nxnx_workstream_store.nx

imported by: nx_workflow.nxnx_workflow_gate.nx

structs

none

consts

13const WF_REC_CAP: i64 = 8192 // one ws:<id> record working buffer
14const WF_IDS_CAP: i64 = 262144 // ws:ids index working buffer
15const WF_FIELD_CAP: i64 = 1024 // one extracted field
16const WF_KEY_CAP: i64 = 512
17const WF_ASCII_0: i64 = 48 // '0'
18const WF_F_EMPIRE: i64 = 1 // record field slots (schema: id empire state last_touched memory code deps)
19const WF_F_STATE: i64 = 2
20const WF_F_TOUCHED: i64 = 3
21const WF_F_MEMORY: i64 = 4
22const WF_F_CODE: i64 = 5
23const WF_SUM_MAX: i64 = 40 // summary caps the ACTIVE listing (loudly) -- agent-context-sized
24const WF_F_DEPS: i64 = 6

functions

26func wf_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 }
31func wf_putn(v: i64) -> i64 { nxi_out(v); return 0 }
called by 3: mainwf_boardwf_summary calls 1: nxi_out
32func wf_seq(a: *u8, b: *u8) -> i64 { var i: i64 = 0; while a[i] != (0 as u8) { if a[i] != b[i] { return 0 } i = i + 1 } if b[i] != (0 as u8) { return 0 } return 1 }
34func wf_key(out: *u8, id: *u8, idlen: i64) -> i64
45func wf_show_field(rec: *u8, rlen: i64, f: i64, label: *u8) -> i64
called by 1: wf_show calls 3: sys_mmapws_fieldwf_puts
54func wf_board(prefix: *u8) -> i64
112func wf_summary(prefix: *u8) -> i64
179func wf_show(prefix: *u8, id: *u8) -> i64