nx_send.nx
buildroot/runtime/nx_send.nx
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
imports: nx_syscalls.nx
imported by: nx_crm_flow.nxnx_send_gate.nxnx_send_merge.nxnx_wflow_engine.nx
structs
| none |
consts
| none |
functions
| 16 | func slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 17 | func p(s: *u8) -> i64 { sys_write(1, s, slen(s)); return 0 } |
| 18 | func pn(v: i64) -> i64 called by 11: mainbm_selftestwf_exec_organwf_for_eachwf_execwf_tpl_list+5 calls 3: psys_mmapsys_write |
| 24 | func seq(a: *u8, b: *u8) -> i64 |
| 30 | func is_empty(s: *u8) -> i64 { if s[0] == (0 as u8) { return 1 } return 0 } |
| 31 | func 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 } |
| 32 | func is_zip5(s: *u8) -> i64 |
| 39 | func pipe_field(s: *u8, idx: i64, out: *u8, cap: i64) -> i64 |
| 61 | func sr_valid(ch: *u8) -> i64 |
| 69 | func sr_physical(ch: *u8) -> i64 |
| 75 | func sr_route(ch: *u8) -> *u8 |
| 86 | func pa_valid(l1: *u8, city: *u8, region: *u8, postal: *u8, country: *u8) -> i64 |
| 98 | func cmd_channels() -> i64 |
| 116 | func cmd_addr(l1: *u8, city: *u8, region: *u8, postal: *u8, country: *u8) -> i64 |
| 122 | func cmd_intent(recip: *u8, chan: *u8, occ: *u8, dest: *u8) -> i64 |
| 145 | func cmd_selftest() -> i64 |
| 193 | func sd_cli(argc: i64, argv: *i64) -> i64 |