code wiki / _hdl_build / nx_ttrust_response.nx

nx_ttrust_response.nx

buildroot/runtime/_hdl_build/nx_ttrust_response.nx

3033 B40 linesdepth 2pulls 2 transitivereach 1 importersview sourcekind librarytopic ttrust
docsdependenciesstructsconstsfunctions

about

nx_ttrust_response.nx -- the CAPTAIN MORONI active-defense FSM (operator: "a true captain moroni -- i wont attack you but if you attack me ill put you in the ground and find where you came from and scorched earth back on that connection WITH PROPER AUTHORIZATION"). Makes the horse-on-fire protocol from nishi-trusting-trust-defense executable: the graded response when a lattice-layer refusal fires. Pure logic; the thresholds are the operator's doctrine. TWO disciplines are enforced: (1) NO 90s-car-alarm -- escalation requires ALL THREE independent evidence axes (behavior + context + provenance) to violate a stated invariant. Wind violates no contract, so wind never trips. (2) NO vigilante -- the phase-6 counter-offensive (scorched earth on the attacker's own pipe) fires ONLY with an explicit Auth(counter_offensive) token rooted in hex0. Without it the FSM STOPS at phase 5 (signed evidence held privately, no counter-pipe). license_tier: ORIGINAL Composes nx_ttrust_lattice (the refusal that triggers this response).

dependencies 1 imports · 1 importers

nx_syscalls.nx nx_ttrust_response.nx nx_ttrust_response_test.nx

imports: nx_syscalls.nx

imported by: nx_ttrust_response_test.nx

structs

none

consts

15const CM_PRINCIPLED: i64 = 0 // principled defense posture only (no escalation)
16const CM_DETECT: i64 = 1 // multi-axis detection confirmed
17const CM_DOCUMENT: i64 = 2 // capture bytes + parent_id chain
18const CM_SOFT_REFUSE: i64 = 3 // fake-return + narrate to the attacker
19const CM_ENTRAP: i64 = 4 // sandbox in a fishbowl, observe full intent
20const CM_ATTRIBUTE: i64 = 5 // hex0-rooted signed attribution, held privately
21const CM_SCORCH: i64 = 6 // counter-narrate: signed indictment via attacker's own channel

functions

24func cm_axes_confirmed(behavior: i64, context: i64, provenance: i64) -> i64
called by 1: main
31func cm_phase(confirmed: i64, attacker_continued: i64, attack_completed: i64, has_auth_token: i64) -> i64
called by 1: main
40func cm_stayed_defensive(phase: i64) -> i64 { if phase == CM_SCORCH { return 0 } return 1 }
called by 1: main