code wiki / _hdl_build / nx_library_publish.nx
nx_library_publish.nx
buildroot/runtime/_hdl_build/nx_library_publish.nx
about
nx_library_publish.nx -- MLIB-020 (CALLOUT-012, operator 2026-06-13: publish to
nishifamily.com/wiki BEHIND the user login; see+work anywhere, synced). The AUTH-GATED
PUBLISH organ: serve the nishi-library dashboard ONLY to a valid OPAQUE-login session,
else 302 -> /wiki/login (data NEVER served unauthenticated -- the security property).
Composes PROVEN organs: nx_no_cookie_session (Ed25519 session mint/validate, the per-request
gate nx_modern_auth_validate_session is built on) + nx_web_builder (responsive render) +
a LIVE read of assignment_queue.tsv (build-status sync -- the page reflects current DONE rungs).
Self-validating gate (PUBLISHGATE): valid-session->served, forged/expired->DENIED, build-status
reflects live queue. Live socket serving rides nx_http_server; remote deploy = MLIB-022
(operator-triggered). license_tier: ORIGINAL
dependencies 5 imports · 2 importers
imports: nx_syscalls.nxnx_itoa_lib.nxnx_ed25519_signature.nxnx_no_cookie_session.nxnx_web_builder.nx
imported by: nx_library_sync.nxnx_synth_matrix.nx
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 16 | const LP_MAGIC_4000: i64 = 4000 |
| 17 | const LP_MAGIC_400000: i64 = 400000 |
| 18 | const LP_MAGIC_60000: i64 = 60000 |
| 20 | const LP_NOW: i64 = 1000000 |
| 21 | const LP_TTL: i64 = 3600 |
| 22 | const LP_OUT: *u8 = "knowledge/nishi-library-dashboard.html" |
| 23 | const LP_QUEUE: *u8 = "knowledge/registry/assignment_queue.tsv" |
functions
| 25 | func lp_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } |
| 30 | func lp_putn(v: i64) -> i64 { nxi_out(v); return 0 } |
| 35 | func lp_wfn(fd: i64, v: i64) -> i64 { nxi_fd(fd, v); return 0 } |
| 36 | func lp_wbuf(dst: *u8, off: i64, s: *u8) -> i64 { var i: i64 = 0; while s[i] != (0 as u8) { dst[off+i] = s[i]; i = i + 1 } return off + i } |
| 38 | func lp_readfile(path: *u8, buf: *u8, cap: i64) -> i64 called by 6: mainls_filecmpls_render_has_countmainsm_src_hasmain calls 3: sys_openat_rdsys_readsys_close |
| 47 | func lp_contains(buf: *u8, n: i64, needle: *u8) -> i64 |
| 54 | func lp_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 } |
| 55 | func lp_startswith(buf: *u8, a: i64, e: i64, pre: *u8) -> i64 { var i: i64 = 0; while pre[i] != (0 as u8) { if a + i >= e { return 0 } if buf[a + i] != pre[i] { return 0 } i = i + 1 } return 1 } |
| 56 | func lp_rangehas(buf: *u8, a: i64, e: i64, needle: *u8) -> i64 { var m: i64 = 0; while needle[m] != (0 as u8) { m = m + 1 } if m == 0 { return 0 } var i: i64 = a; while i + m <= e { var j: i64 = 0; var ok: i64 = 1; while j < m { if buf[i + j] != needle[j] { ok = 0; j = m } else { j = j + 1 } } if ok == 1 { return 1 } i = i + 1 } return 0 } called by 1: lp_count_done |
| 59 | func lp_count_done(buf: *u8, n: i64) -> i64 |
| 75 | func lp_card(fd: i64, t: *u8, b: *u8) -> i64 { wb_card(fd, t, b); return 0 } |
| 77 | func main() -> i64 |