code wiki / _hdl_build / nx_studio_daemon_gate.nx
nx_studio_daemon_gate.nx
buildroot/runtime/_hdl_build/nx_studio_daemon_gate.nx
about
nx_studio_daemon_gate.nx -- SOVEREIGN in-process referee for the OPAQUE-gated studio daemon (no socket, no
curl, no shell). Arms a realm + registers an admin via the REAL Modern Auth (OPAQUE-3DH), then feeds crafted
HTTP request BYTES into the pure router stu_handle and asserts the response bytes -- the whole no-cookie
login -> token -> gated-build -> deny flow, inside one Nishi organ. Proves the studio is behind the CANONICAL
login (X-Nishi-Session, NOT a cookie, NOT nx_cms_admin).
T1 GET /webdev -> 200 + SPA shell (public)
T2 POST /webdev/login ok -> 200 + {"token":...} (mint a real 152B no-cookie token)
T3 POST /webdev/build WITH token, tier|guided -> 200 + governed guided page
T4 POST /webdev/build NO token -> 401 (default-deny: cannot build/publish unauthenticated)
T5 POST /webdev/login WRONG pw -> 401
T6 POST /webdev/build BAD token -> 401 (forged token rejected by Ed25519)
T7 GET /webdev/guided -> 200 + the guided surface (served)
T8 POST /webdev/build WITH token, tier|freeform -> 200 + governed canvas (placement honored)
Sovereign: nx_sitegen_studio_daemon + nx_modern_auth_flow + nx_syscalls. license_tier: ORIGINAL
dependencies 3 imports · 0 importers
imports: nx_sitegen_studio_daemon.nxnx_modern_auth_flow.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
| none |
functions
| 19 | func sdg_w(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } |
| 20 | func sdg_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 21 | func sdg_row(name: *u8, ok: i64) -> i64 { if ok == 1 { sdg_w(" PASS " as *u8) } if ok != 1 { sdg_w(" FAIL " as *u8) } sdg_w(name); sdg_w("\n" as *u8); return ok } |
| 22 | func sdg_cat(d: *u8, o: i64, s: *u8) -> i64 { var i: i64 = 0; while s[i] != (0 as u8) { d[o + i] = s[i]; i = i + 1 } return o + i } called by 1: main |
| 23 | func sdg_cat_n(d: *u8, o: i64, s: *u8, n: i64) -> i64 { var i: i64 = 0; while i < n { d[o + i] = s[i]; i = i + 1 } return o + n } called by 1: main |
| 24 | func sdg_trunc(path: *u8) -> i64 { let fd: i64 = sys_openat_wr(path, 0x180); if fd >= 0 { sys_close(fd) } return 0 } |
| 25 | func sdg_starts(buf: *u8, n: i64, s: *u8) -> i64 |
| 32 | func sdg_contains(hay: *u8, n: i64, needle: *u8) -> i64 |
| 44 | func sdg_extract_token(resp: *u8, n: i64, out: *u8) -> i64 called by 1: main |
| 68 | func main() -> i64 |