code wiki / _hdl_build / nx_portal_builder.nx
nx_portal_builder.nx
buildroot/runtime/_hdl_build/nx_portal_builder.nx
about
nx_portal_builder.nx -- ADMIN-001 (CALLOUT-013): the admin-portal SHELL authoring tool. Reads the
module registry (knowledge/registry/modules.tsv) + a ROLE (argv[1]) and EMITS the role-filtered
portal page via the PROVEN nx_web_builder -- a WordPress-like portal showing ONLY the modules the
role may access (RBAC, same levels as roleaccess_gate). One tool authors the client /portal AND the
lawyer /admin from the SAME registry (data-driven, growable). Writes to knowledge/staging/media/
(PRIVATE behind login -- not public). Prints PORTALGATE role= modules= for the gate. license_tier: ORIGINAL
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_web_builder.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 9 | const PB_MAGIC_40000: i64 = 40000 |
| 11 | const PB_REG: *u8 = "knowledge/registry/modules.tsv" |
functions
| 13 | func pb_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } |
| 14 | func pb_putn(v: i64) -> i64 { let bb: *u8 = sys_mmap(28); var m: i64=v; if m<0 {m=0-m}; let t: *u8 = sys_mmap(28); var k: i64=0; if m==0 {t[0]=48;k=1}; while m>0 {t[k]=48+(m%10); m=m/10; k=k+1}; var i: i64=0; while i<k {bb[i]=t[k-1-i]; i=i+1}; sys_write(1, bb, k); return 0 } |
| 15 | func pb_read(path: *u8, buf: *u8, cap: i64) -> i64 |
| 24 | func pb_scan(buf: *u8, n: i64, start: i64, delim: i64) -> i64 { var i: i64 = start; var s: i64 = 1; while s == 1 { if i >= n { s = 0 } else { if buf[i] == (delim as u8) { s = 0 } else { i = i + 1 } } } return i } called by 1: main |
| 26 | func pb_lvl(w: *u8) -> i64 called by 1: main |
| 33 | func main(argc: i64, argv: *i64) -> i64 |