code wiki / (root) / nx_send.nx

nx_send.nx

buildroot/runtime/nx_send.nx

10726 B208 linesdepth 2pulls 2 transitivereach 17 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_send.nx -- THE UNIFIED SEND SPINE (rung 1 of Nishi Mail to SOTA). Operator 2026-07-08: "send a postcard or present as easily as i can send digital". ONE model to send to a recipient over ANY channel -- email | postcard | letter | card | gift -- so the compose surface + the scheduler + the delivery ledger all speak one vocabulary. SEND-CHANNEL : the routing table (channel -> which sovereign composer/transport handles it). POSTAL-ADDR : a structured postal address model + sovereign deliverability validation. SEND-INTENT : the send descriptor (recipient + channel + destination + occasion + status). Sovereign by construction: no 3rd party on the path. Physical last-mile = own print pipeline (nx_mailpiece -> nx_img_print, next rung); a carrier adapter (Lob/PostGrid-class) is an opt-in edge, and gifts stop at a sovereign gift-intent + order doc -- both per operator decision. Pure logic + a self-test gate (argless = selftest). Persistence + raster composition = next rungs. Commands: channels | addr <l1> <city> <region> <postal> <country> | intent <recip> <chan> <occ> <dest> | selftest expect_exit: 0 license_tier: ORIGINAL

dependencies 1 imports · 4 importers

nx_syscalls.nx nx_send.nx nx_crm_flow.nx nx_send_gate.nx nx_send_merge.nx nx_wflow_engine.nx

imports: nx_syscalls.nx

imported by: nx_crm_flow.nxnx_send_gate.nxnx_send_merge.nxnx_wflow_engine.nx

structs

none

consts

none

functions

16func slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
17func p(s: *u8) -> i64 { sys_write(1, s, slen(s)); return 0 }
18func pn(v: i64) -> i64
24func seq(a: *u8, b: *u8) -> i64
30func is_empty(s: *u8) -> i64 { if s[0] == (0 as u8) { return 1 } return 0 }
called by 2: pa_validcmd_intent
31func has_at(s: *u8) -> i64 { var i: i64 = 0; while s[i] != (0 as u8) { if s[i] == (64 as u8) { return 1 } i = i + 1 } return 0 }
32func is_zip5(s: *u8) -> i64
39func pipe_field(s: *u8, idx: i64, out: *u8, cap: i64) -> i64
61func sr_valid(ch: *u8) -> i64
69func sr_physical(ch: *u8) -> i64
75func sr_route(ch: *u8) -> *u8
86func pa_valid(l1: *u8, city: *u8, region: *u8, postal: *u8, country: *u8) -> i64
98func cmd_channels() -> i64
called by 1: sd_cli calls 4: psys_mmapsr_routesr_physical
116func cmd_addr(l1: *u8, city: *u8, region: *u8, postal: *u8, country: *u8) -> i64
called by 1: sd_cli calls 2: pa_validp
122func cmd_intent(recip: *u8, chan: *u8, occ: *u8, dest: *u8) -> i64
145func cmd_selftest() -> i64
193func sd_cli(argc: i64, argv: *i64) -> i64