code wiki / (root) / nx_share.nx

nx_share.nx

buildroot/runtime/nx_share.nx

14366 B303 linesdepth 6pulls 8 transitivereach 0 importersview sourcekind tooltopic share
docsdependenciesstructsconstsfunctions

about

nx_share.nx -- SHARING ring of the Relationship OS. Operator 2026-07-09: "share jobs or resources or all that ... how a shared item can be stored and used and grow that persons opportunities." SHARE-ITEM : a typed shared item -- job | resource | intro -- from one person in the graph to another, PERSISTED on the sovereign append-only seg_store ("shr:"+cid canon records: itype,title,from,to, note,reqs). Stored = never lost, tamper-evident, on your hardware. SHARE-FIT : the GROWTH wire -- a shared JOB carries its requirement skill-csv; on receipt the recipient's profile runs through the career matcher (nx_career match_score + skill_gap), so the share lands WITH "your match: N/100" + the concrete gap plan. A share is not a link; it is a scored opportunity + what to do about it. SHARE-USE : the usage lifecycle (seen -> used -> outcome), additive "usg:" records -- what happened to the share is part of the history. SHARE-ATTR : warm-channel attribution -- per sharer: shared vs used counts -> strength permil. Measures WHOSE shares actually move you (the nx_vizsla_recruiter warm-beats-cold doctrine, quantified). Composes nx_career (matcher) + canon_cid + seg_store. Argless = selftest gate. license_tier: ORIGINAL expect_exit: 0

dependencies 3 imports · 0 importers

nx_career.nx nx_canon_cid.nx nx_seg_store.nx nx_share.nx

imports: nx_career.nxnx_canon_cid.nxnx_seg_store.nx

imported by: nobody (leaf or entry point)

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

main p sys_write slen ss_cat ss_catn sys_mmap sys_now_us sys_mmap ↻ sys_clock_gettime_mono ss_begin ss_begin_cap sys_mmap ↻ sh_save sh_itype_ok seq p ↻ canon_encode sys_mmap ↻ cc_cmp cc_w32 cc_len sys_munmap cid_of sys_mmap ↻ sha256_digest sys_mmap ↻ sha256_init sys_mmap ↻ sha256_k sha256_update sha256_compress_ni_blocks blk_set_byte sha256_compress sha256_compress_ni blk_word sha256_final blk_set_byte ↻ sha256_compress ↻ cid_from_digest

structs

none

consts

18const K_MAGIC_4096: i64 = 4096
19const K_MAGIC_2048: i64 = 2048

functions

21func sh_kmemeq(b: *u8, off: i64, n: i64, s: *u8) -> i64
called by 2: sh_iskindsh_field calls 1: slen
27func sh_iskind(b: *u8, koff: i64, kl: i64, pfx: *u8) -> i64
called by 2: sh_inboxsh_attribution calls 1: sh_kmemeq
31func sh_field(rec: *u8, rl: i64, want: *u8, out: *u8, cap: i64) -> i64
54func sh_itype_ok(t: *u8) -> i64
called by 1: sh_save calls 1: seq
60func sh_status_ok(s: *u8) -> i64
called by 1: sh_use calls 1: seq
67func sh_save(w: *i64, a: *i64) -> i64
86func sh_use(w: *i64, title: *u8, to: *u8, status: *u8) -> i64
105func sh_inbox(prefix: *u8, person: *u8, profile: *u8, fitp: *i64, gapp: *i64) -> i64
173func sh_attribution(prefix: *u8, sharer: *u8, outp: *i64) -> i64
236func main() -> i64