nx_claude_bridge.nx
buildroot/runtime/nx_claude_bridge.nx
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
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
structs
| none |
consts
| 8 | const K_MAGIC_65536: i64 = 65536 |
| 9 | const K_MAGIC_1000000: i64 = 1000000 |
| 10 | const K_MAGIC_1048576: i64 = 1048576 |
| 11 | const K_MAGIC_1024: i64 = 1024 |
functions
| 13 | func 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 } |
| 14 | func 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 |
| 15 | func 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 } |
| 16 | func 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 } |
| 18 | func cb_cat(path: *u8, out: *u8, o: i64) -> i64 |
| 26 | func cb_ls(path: *u8, out: *u8, o: i64) -> i64 |
| 45 | func cb_sleep_ms(ms: i64) -> i64 |
| 54 | func cb_run(jobfile: *u8, out: *u8, o: i64) -> i64 |
| 111 | func cb_dispatch(tool: *u8, arg: *u8, out: *u8, o: i64) -> i64 |
| 119 | func main() -> i64 |