code wiki / (root) / nx_chatmut.nx

nx_chatmut.nx

buildroot/runtime/nx_chatmut.nx

2179 B31 linesdepth 0pulls 0 transitivereach 1 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_chatmut.nx -- sovereign POLITE, TRANSPARENT message mutation for an S-class chat that helps relationships stay positive (operator: "retract not just delete; don't leave a delete sitting in chat; no sneakiness"). The model is honest BY CONSTRUCTION: * RETRACT removes the message CONTENT (it isn't left sitting in the thread) but leaves a visible "retracted" tombstone -- the other person is never confused or silently deceived (the opposite of a stealth delete). * EDIT keeps the message but marks it "edited" and counts the edits (no hidden silent rewrites = no gaslighting). * a retracted message is terminal: it can't be quietly resurrected or re-edited. Message record rec[*i64]: [0]=mut_state, [1]=edit_count, [2]=content_len. Rides E2E (nx_e2e). license_tier: ORIGINAL

dependencies 0 imports · 1 importers

nx_chatmut.nx nx_chatmut_gate.nx

imports: none

imported by: nx_chatmut_gate.nx

structs

none

consts

10const CMT_LIVE: i64 = 0 // normal, no marker
11const CMT_EDITED: i64 = 1 // visibly "edited"
12const CMT_RETRACTED: i64 = 2 // visible "message retracted" tombstone; content gone

functions

14func cmt_init(rec: *i64, content_len: i64) -> i64 { rec[0] = CMT_LIVE; rec[1] = 0; rec[2] = content_len; return 0 }
called by 1: main
16func cmt_edit(rec: *i64, new_len: i64) -> i64
called by 1: main
24func cmt_retract(rec: *i64) -> i64 { rec[0] = CMT_RETRACTED; rec[2] = 0; return 1 }
called by 1: main
26func cmt_marker(rec: *i64) -> i64 { return rec[0] }
called by 1: main
28func cmt_is_honest(rec: *i64) -> i64
called by 1: main