code wiki / (root) / nx_send.nx

nx_send.nx

buildroot/runtime/nx_send.nx

10726 B208 linesdepth 2pulls 2 transitivereach 73 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 · 19 importers

nx_syscalls.nx nx_send.nx nx_crm_flow.nx nx_organ_ship_loss_canonical_gate_ nx_organ_ship_loss_gate_t370.nx nx_organ_ship_loss_promotion_gate_ nx_send_gate.nx nx_send_merge.nx nx_ship_behavior_loss_regression_t nx_ship_loss_live_before_t370.nx nx_ship_loss_live_fixture_t370.nx nx_wflow_boolean_boundary_probe_t3

diagram shows first 10 each side; +0 more imports, +9 more importers in the complete lists below.

imports: nx_syscalls.nx

imported by: nx_crm_flow.nxnx_organ_ship_loss_canonical_gate_t370.nxnx_organ_ship_loss_gate_t370.nxnx_organ_ship_loss_promotion_gate_t370.nxnx_send_gate.nxnx_send_merge.nxnx_ship_behavior_loss_regression_t371.nxnx_ship_loss_live_before_t370.nxnx_ship_loss_live_fixture_t370.nxnx_wflow_boolean_boundary_probe_t344.nxnx_wflow_engine.nxnx_wflow_engine_candidate_t230.nxnx_wflow_engine_capacity_candidate_t278.nxnx_wflow_engine_completion_t31.nxnx_wflow_engine_identity_candidate_t344.nxnx_wflow_execution_engine_candidate_t346.nxnx_wflow_fault_fixture_t230.nxnx_wflow_mapping_oldpair_fixture_t278.nxnx_wflow_ownership_old_engine_fixture_t344.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
called by 3: fl_loadcmd_intentcmd_selftest calls 1: seq
69func sr_physical(ch: *u8) -> i64
75func sr_route(ch: *u8) -> *u8
called by 3: fl_execcmd_channelscmd_intent calls 1: seq
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