code wiki / (root) / nx_claude_bridge.nx

nx_claude_bridge.nx

buildroot/runtime/nx_claude_bridge.nx

7935 B163 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind tooltopic claude
docsdependenciesstructsconstsfunctions

about

nx_claude_bridge.nx -- the CLAUDE <-> NISHI bridge (the "works with you" gap): a sovereign command protocol. Claude writes commands (tool + args) to knowledge/bridge/cmd.txt; this organ reads them, runs the REAL sovereign tool for each (echo / cat / ls -- inline coreutils), and writes the results to knowledge/bridge/result.txt (and stdout). Claude reads the result = the loop where the operator AND Claude drive the Nishi system together. More tools wire in as more dispatch arms. No persistent-hardware writes (Rule 26). expect_exit: 0 license_tier: ORIGINAL

dependencies 1 imports · 0 importers

nx_syscalls.nx nx_claude_bridge.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 sys_mmap sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close cb_puts sys_write sys_exit cb_app cb_dispatch cb_streq cb_run cb_app ↻ sys_mmap ↻ sys_read_file ↻ sys_openat_wr sys_fork sys_dup3 sys_execve sys_exit ↻ sys_wait4 nx_kill cb_sleep_ms sys_mmap ↻ sys_close ↻ cb_appn cb_app ↻ cb_cat sys_mmap ↻ sys_read_file ↻ cb_app ↻ cb_appn ↻ cb_ls sys_openat_rd ↻ cb_app ↻ sys_mmap ↻ sys_getdents64

structs

none

consts

8const K_MAGIC_65536: i64 = 65536
9const K_MAGIC_1000000: i64 = 1000000
10const K_MAGIC_1048576: i64 = 1048576
11const K_MAGIC_1024: i64 = 1024

functions

13func cb_puts(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
called by 1: main calls 1: sys_write
14func cb_streq(a: *u8, b: *u8) -> i64 { var i: i64=0; while 1==1 { if a[i]!=b[i] { return 0 } if a[i]==(0 as u8) { return 1 } i=i+1 } return 1 }
called by 1: cb_dispatch
15func cb_app(out: *u8, off: i64, s: *u8) -> i64 { var i: i64=0; while s[i]!=(0 as u8){ out[off+i]=s[i]; i=i+1 } return off+i }
16func cb_appn(out: *u8, off: i64, src: *u8, n: i64) -> i64 { var i: i64=0; while i<n { out[off+i]=src[i]; i=i+1 } return off+i }
called by 2: cb_catcb_run
18func cb_cat(path: *u8, out: *u8, o: i64) -> i64
26func cb_ls(path: *u8, out: *u8, o: i64) -> i64
45func cb_sleep_ms(ms: i64) -> i64
called by 1: cb_run calls 1: sys_mmap
54func cb_run(jobfile: *u8, out: *u8, o: i64) -> i64
111func cb_dispatch(tool: *u8, arg: *u8, out: *u8, o: i64) -> i64
119func main() -> i64