code wiki / (root) / nx_companion_recon.nx

nx_companion_recon.nx

buildroot/runtime/nx_companion_recon.nx

6432 B111 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind tooltopic companion
docsdependenciesstructsconstsfunctions

about

nx_companion_recon.nx -- sovereign recon of the OLD Elder AI companion media-gen system: the ARC / EXPERIENCE systems and the FAILURE evidence (operator: "really evaluate ... get us back to the old images we generated but with REAL arcs and experiences instead of the FAILED systems we had"). Grounds the census in what actually worked + what failed. Reuses the getdents walk; roots at the platform; for each readable/db file prints lines matching the companion-system markers (arc/story/identity-drift/regression/wardrobe/video/experience). Baked root+markers (nx_sov_build_run doesn't forward args). Zero egress, sovereign. license_tier: ORIGINAL expect_exit: 0

dependencies 1 imports · 0 importers

nx_syscalls.nx nx_companion_recon.nx

imports: nx_syscalls.nx

imported by: nobody (leaf or entry point)

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

main rc_puts sys_write rc_strlen sys_mmap rc_walk sys_openat_rd sys_mmap ↻ sys_getdents64 dirent_reclen dirent_type dirent_name rc_is_dot rc_skip_dir rc_ends rc_strlen ↻ rc_join rc_walk ↻ rc_skip rc_ends ↻ rc_scan sys_openat_rd ↻ sys_read sys_close rc_hit rc_find rc_strlen ↻ rc_puts ↻ sys_write ↻ sys_close ↻ sys_write ↻ sys_exit

structs

none

consts

8const RC_MAGIC_65536: i64 = 65536
9const RC_MAGIC_2048: i64 = 2048
11const RC_ROOT: *u8 = "/mnt/c/Users/elder/elder-ai-platform" as *u8
12const RC_FBUF: i64 = 3145728
13const RC_MAXDEPTH: i64 = 14
14const RC_MAXLINES: i64 = 5

functions

16func rc_strlen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n }
17func rc_puts(s: *u8) -> i64 { sys_write(1, s, rc_strlen(s)); return 0 }
called by 2: rc_scanmain calls 2: sys_writerc_strlen
18func rc_find(buf: *u8, lo: i64, hi: i64, pat: *u8) -> i64 { let pl: i64=rc_strlen(pat); if pl==0 {return 0} var i: i64=lo; while i+pl<=hi { var j: i64=0; while j<pl { if buf[i+j]!=pat[j]{j=pl+1} else {j=j+1} } if j==pl {return 1} i=i+1 } return 0 }
called by 1: rc_hit calls 1: rc_strlen
19func rc_is_dot(name: *u8) -> i64 { if name[0]==(46 as u8){ if name[1]==(0 as u8){return 1} if name[1]==(46 as u8){ if name[2]==(0 as u8){return 1} } } return 0 }
called by 1: rc_walk
20func rc_join(dp: *u8, name: *u8, out: *u8) -> i64 { var p: i64=0; var a: i64=0; while dp[a]!=(0 as u8){out[p]=dp[a];p=p+1;a=a+1} out[p]=47 as u8; p=p+1; var b: i64=0; while name[b]!=(0 as u8){out[p]=name[b];p=p+1;b=b+1} out[p]=0 as u8; return 0 }
called by 1: rc_walk
21func rc_ends(name: *u8, suf: *u8) -> i64 { let n: i64=rc_strlen(name); let s: i64=rc_strlen(suf); if n<s {return 0} var i: i64=0; while i<s { if name[n-s+i]!=suf[i]{return 0} i=i+1 } return 1 }
called by 2: rc_skiprc_skip_dir calls 1: rc_strlen
22func rc_skip(name: *u8) -> i64
called by 1: rc_walk calls 1: rc_ends
30func rc_skip_dir(name: *u8) -> i64 { if rc_ends(name,"node_modules" as *u8)==1 {return 1} if rc_ends(name,".git" as *u8)==1 {return 1} if rc_ends(name,"__pycache__" as *u8)==1 {return 1} return 0 }
called by 1: rc_walk calls 1: rc_ends
33func rc_hit(buf: *u8, ls: i64, le: i64) -> i64
called by 1: rc_scan calls 1: rc_find
48func rc_scan(path: *u8, fbuf: *u8) -> i64
75func rc_walk(dp: *u8, fbuf: *u8, depth: i64) -> i64
103func main() -> i64