code wiki / _hdl_build / nx_legal_portal_daemon.nx

nx_legal_portal_daemon.nx

buildroot/runtime/_hdl_build/nx_legal_portal_daemon.nx

5333 B110 linesdepth 13pulls 21 transitivereach 0 importersview sourcekind servicetopic legal
docsdependenciesstructsconstsfunctions

about

nx_legal_portal_daemon.nx -- runnable Client Workspace portal: bind 127.0.0.1:8455 and serve the legal portal in an accept loop over the real lp_handle router. Browse http://127.0.0.1:8455/portal/envelopes (LOOPBACK ONLY -- a public bind + mTLS + file-backed tenant stores is the separate, operator-gated production deploy step). The pctx here is a DEMO tenant fixture (two envelopes incl. a Will routed to REQUIRES_WET so the never-void surfacing is visible, plus a vault doc + a pending checklist). Wiring real per-tenant file-backed stores replaces this fixture at deploy time. license_tier: ORIGINAL

dependencies 9 imports · 0 importers

nx_legal_portal.nx nx_legal_portal_boot.nx nx_legal_store.nx nx_doc_envelope.nx nx_doc_serve.nx nx_doc_annotate.nx nx_doc_vault.nx nx_legal_compliance.nx nx_syscalls.nx nx_legal_portal_daemon.nx

imports: nx_legal_portal.nxnx_legal_portal_boot.nxnx_legal_store.nxnx_doc_envelope.nxnx_doc_serve.nxnx_doc_annotate.nxnx_doc_vault.nxnx_legal_compliance.nxnx_syscalls.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 lp_boot_load sys_mmap ↻ ls_path nx_vault_valid_tid ls_cat ls_load sys_openat_rd sys_mmap ↻ sys_read sys_close nx_env_create nx_legal_doc_classify lc_ci_contains lc_slen lc_lower nx_legal_regime nx_legal_is_excluded nx_env_add_recipient nx_env_send ne_find_env nx_env_required_signers nx_vault_add nx_ann_add na_put lp_boot_save sys_mmap ↻ ls_path ↻ ls_save sys_openat_wr sys_mmap ↻ sys_write sys_close ↻ lpd_puts sys_write ↻ ls_path ↻ ls_blob_load sys_openat_rd ↻ sys_mmap ↻

structs

none

consts

20const LPD_MAGIC_8601: i64 = 8601
21const LPD_MAGIC_9601: i64 = 9601
22const LPD_MAGIC_9602: i64 = 9602
23const LPD_MAGIC_8602: i64 = 8602
24const LPD_MAGIC_2000: i64 = 2000
25const LPD_MAGIC_5001: i64 = 5001
26const LPD_MAGIC_4096: i64 = 4096
28const LPD_PORT: i64 = 0x2107 // 8455, loopback
29const LPD_STORE: *u8 = "knowledge/legal_" // durable per-tenant store base (survives restart)

functions

31func lpd_addr(out: *u8, port: i64) -> i64
called by 1: main
39func lpd_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 }
called by 1: main calls 1: sys_write
41func main() -> i64