code wiki / (root) / nx_legal_serve.nx

nx_legal_serve.nx

buildroot/runtime/nx_legal_serve.nx

3003 B37 linesdepth 2pulls 3 transitivereach 0 importersview sourcekind servicetopic legal
docsdependenciesstructsconstsfunctions

about

nx_legal_serve.nx -- SERVE-WRAPPER making the LEGAL role's capability MCP-callable (operator 2026-07-10). Library-role pattern (3rd instance): nx_legal_compliance is a PURE-LOGIC lib (classify + ESIGN/UETA verdict, no imports, no main); this wrapper IMPORTS it + EXERCISES the safety-critical INVARIANT: an EXCLUDED testamentary instrument (a will) is NEVER e-signed VALID (15 U.S.C. 7003(a)(1)), while a general contract with intent+consent+attribution+retainability IS. Clean exit 0 + JSON verdict so nishi_crew dispatches `legal legal`. nx_legal_compliance imports NOTHING (pure) -> import BOTH it and nx_syscalls (for my sys_* helpers), no double-import. LV_INVALID_VOID=2, LV_VALID=0, DT_CONTRACT=1 (from the lib). license_tier: ORIGINAL expect_exit: 0

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_legal_compliance.nx nx_legal_serve.nx

imports: nx_syscalls.nxnx_legal_compliance.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main sys_mmap nx_legal_doc_classify lc_ci_contains lc_slen lc_lower nx_legal_is_excluded nx_legal_verdict nx_legal_regime nx_legal_is_excluded ↻ lsv_w2 sys_mmap ↻ sys_write lsv_bit sys_mmap ↻ sys_write ↻ sys_exit

structs

none

consts

none

functions

11func lsv_raw(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
12func lsv_w2(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){ if s[n]==(39 as u8) { let q: *u8=sys_mmap(1); q[0]=34 as u8; sys_write(1,q,1) } else { sys_write(1,(s as i64+n) as *u8,1) } n=n+1 } return 0 }
called by 1: main calls 2: sys_mmapsys_write
13func lsv_bit(b: i64) -> i64 { let d: *u8=sys_mmap(1); d[0]=(48+b) as u8; sys_write(1,d,1); return 0 }
called by 1: main calls 2: sys_mmapsys_write
15func main() -> i64