code wiki / _hdl_build / nx_cms_webdev_gate.nx
nx_cms_webdev_gate.nx
buildroot/runtime/_hdl_build/nx_cms_webdev_gate.nx
about
nx_cms_webdev_gate.nx -- SOVEREIGN gate for the CAPABILITY-ADAPTIVE studio behind the CMS login (no shells,
no curl). Forks the admin daemon, then drives it over raw sovereign sockets: GET /webdev BLOCKED without a
session; POST /admin/login issues nsess; WITH the session the PICKER is served at /webdev and each tier
surface at /webdev/{guided,freeform}; POST /webdev/build is forbidden without a session and, with it, builds
each tier through se_build_tier (guided->page, freeform->canvas, raw .site->block). Proves the full multi-tier
studio is behind OUR login, end-to-end. Appends a CMSGATE row to knowledge/status/cms_gate.log on all-pass.
PRE: ./_offc/nx_sov_build_run.elf nx_cms_admin --build-only (produces /tmp/nx_cms_admin.sov.elf). license_tier: ORIGINAL
dependencies 5 imports · 0 importers
imports: nx_http_client.nxnx_connect.nxnx_cms_store.nxnx_sha256.nxnx_syscalls.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
| 14 | const W_PORT: i64 = 8092 |
| 15 | const W_SITE: *u8 = "/mnt/c/Users/elder/AppData/Local/Temp/awcms" as *u8 |
| 16 | const W_ADMIN: *u8 = "/tmp/nx_cms_admin.sov.elf" as *u8 |
functions
| 18 | func wg_w(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 19 | func wg_len(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } |
| 20 | func wg_cat(dst: *u8, off: i64, s: *u8) -> i64 { var o: i64=off; var k: i64=0; while s[k]!=(0 as u8){dst[o]=s[k];o=o+1;k=k+1} return o } |
| 21 | func wg_catn(dst: *u8, off: i64, s: *u8, n: i64) -> i64 { var o: i64=off; var k: i64=0; while k<n{dst[o]=s[k];o=o+1;k=k+1} return o } |
| 22 | func wg_num(dst: *u8, off: i64, v: i64) -> i64 { var o: i64=off; let t: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0-m}; var k: i64=0; if m==0{t[0]=48 as u8;k=1}; while m>0{t[k]=(48+(m%10)) as u8;m=m/10;k=k+1}; var i: i64=0; while i<k{dst[o]=t[k-1-i];o=o+1;i=i+1} return o } |
| 23 | func wg_find(buf: *u8, n: i64, pat: *u8, plen: i64) -> i64 |
| 29 | func wg_has(buf: *u8, n: i64, s: *u8) -> i64 { if wg_find(buf,n,s,wg_len(s))>=0 { return 1 } return 0 } |
| 30 | func wg_row(id: i64, ok: i64, what: *u8) -> i64 { wg_w("WDROW " as *u8); let b: *u8=sys_mmap(8); b[0]=(48+id) as u8; sys_write(1,b,1); wg_w(" " as *u8); if ok==1 { wg_w("PASS " as *u8) } else { wg_w("FAIL " as *u8) } wg_w(what); wg_w("\n" as *u8); return ok } |
| 32 | func wg_setpw(outpath: *u8, pw: *u8) -> i64 |
| 40 | func wg_copy(file: *u8, buf: *u8, cap: i64) -> i64 |
| 46 | func wg_send(reqbuf: *u8, reqlen: i64, resp: *u8, cap: i64) -> i64 called by 1: main calls 7: sys_mmapnx_http_client_sockaddr_ipv4sys_socketnx_connect_boundedsys_closesys_write+1 |
| 57 | func wg_get(req: *u8, path: *u8, tok: *u8, toklen: i64) -> i64 |
| 64 | func wg_post(req: *u8, path: *u8, tok: *u8, toklen: i64, body: *u8) -> i64 |
| 74 | func main() -> i64 |