nx_app_monitor.nx
buildroot/runtime/nx_app_monitor.nx
about
nx_app_monitor.nx -- S-class sovereign health monitor for the Nishi web apps.
Data-driven: reads web_assets/app_registry.tsv (the single source of truth), and
for EVERY registered app does a real HTTPS GET through the Nishi TLS-1.3 client +
Mozilla CA chain (no curl), asserting 200 + the app's content marker. This is the
watchdog that was missing when sites.elf silently crash-looped. Prints an up/down
table; exits 0 iff every app is UP (so it doubles as a gate / cron check).
license_tier: ORIGINAL
dependencies 11 imports · 0 importers
diagram shows first 10 each side; +1 more imports, +0 more importers in the complete lists below.
imports: nx_syscalls.nxnx_x509_trust_store.nxnx_trust_store_load_from_certdata.nxnx_tls13_client_validate_certificate.nxnx_tls13_client_session_run.nxnx_https_url_for_fetch.nxnx_https_url_connect.nxnx_https_get.nxnx_https_get_complete.nxnx_http_response_parse.nxnx_app_store.nx
imported by: nobody (leaf or entry point)
structs
| none |
consts
| 19 | const K_MAGIC_2097152: i64 = 2097152 |
| 20 | const K_MAGIC_4194304: i64 = 4194304 |
| 21 | const K_MAGIC_65536: i64 = 65536 |
| 22 | const K_MAGIC_8192: i64 = 8192 |
functions
| 24 | func w(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } calls 1: sys_write |
| 25 | func wn(v: i64) -> i64 { let b: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0-m;sys_write(1,"-" as *u8,1)}; let t: *u8=sys_mmap(28); 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{b[i]=t[k-1-i];i=i+1}; sys_write(1,b,k); return 0 } |
| 26 | func slen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } called by 1: contains |
| 27 | func contains(buf: *u8, lo: i64, hi: i64, needle: *u8) -> i64 calls 1: slen |
| 34 | func field(buf: *u8, ls: i64, le: i64, fi: i64, out: *u8) -> i64 |
| 44 | func check_one(store: *TrustStore, path: *u8, pathlen: i64, marker: *u8, mk: *i64) -> i64 calls 1: sys_mmap |
| 81 | func main() -> i64 |