code wiki / _hdl_build / nx_nishi_deploy.nx

nx_nishi_deploy.nx

buildroot/runtime/_hdl_build/nx_nishi_deploy.nx

7586 B143 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind tooltopic nishi
docsdependenciesstructsconstsfunctions

about

nx_nishi_deploy.nx -- SOVEREIGN deploy organ (operator 2026-06-23: "no sh, use the nishi ecosystem, 100% true nishi capabilities"). Replaces the bash deploy scripts: reads a manifest of repo-relative files (knowledge/deploy/manifest.txt) + a commit message (knowledge/deploy/msg.txt), then does a PLUMBING commit (write-tree -> commit-tree -> update-ref, which avoids the /mnt/c index-refresh hang AND the pre-commit-hook stall) + push to Gitea -- entirely as NishiLang orchestration. git is the flagged BORROWED ORACLE (named replacement = the sovereign pack/push lane, per nx_ark_push); the orchestration + verdict are fully sovereign. SHAs are captured by redirecting the child's stdout to a file (no pipe int32 fiddling) + reading it back. license_tier: ORIGINAL

dependencies 1 imports · 0 importers

nx_syscalls.nx nx_nishi_deploy.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 dw sys_write sys_mmap sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close sys_exit dn sys_write ↻ sys_mmap ↻ run sys_fork sys_openat_rd ↻ sys_dup3 sys_openat_wr sys_execve mk_env sys_mmap ↻ sys_exit ↻ sys_mmap ↻ sys_wait4 run_to_file sys_fork ↻ sys_openat_rd ↻ sys_dup3 ↻ sys_openat_wr ↻ sys_execve ↻ mk_env ↻ sys_exit ↻ sys_mmap ↻ sys_wait4 ↻ read_sha sys_mmap ↻ sys_read_file ↻

structs

none

consts

11const C_GIT: *u8 = "/usr/bin/git"
12const C_REPO: *u8 = "/mnt/c/Users/elder/nishi-core"
13const C_BRANCH: *u8 = "agents/invention-engine"
14const C_REF: *u8 = "refs/heads/agents/invention-engine"
15const C_MANIFEST: *u8 = "knowledge/deploy/manifest.txt"
16const C_MSGFILE: *u8 = "knowledge/deploy/msg.txt"
17const F_TREE: *u8 = "/tmp/nxd_tree"
18const F_HEAD: *u8 = "/tmp/nxd_head"
19const F_COMMIT: *u8 = "/tmp/nxd_commit"
20const C_LOCK: *u8 = "/mnt/c/Users/elder/nishi-core/.git/index.lock"
21const AT_FDCWD: i64 = 0 - 100
22const MODE: i64 = 420

functions

24func dw(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
25func dn(v: i64) -> i64 { if v==0 { sys_write(1,"0" as *u8,1); return 0 } let bb: *u8=sys_mmap(28); var m: i64=v; var k: i64=0; let t: *u8=sys_mmap(28); while m>0{t[k]=(48+(m%10)) as u8;m=m/10;k=k+1} var z: i64=0; while z<k{bb[z]=t[k-1-z];z=z+1} sys_write(1,bb,k); return 0 }
called by 1: main calls 2: sys_writesys_mmap
28func mk_env() -> *i64
called by 2: runrun_to_file calls 1: sys_mmap
37func run(argv: *i64) -> i64
50func run_to_file(argv: *i64, outfile: *u8) -> i64
64func read_sha(path: *u8) -> *u8
called by 1: main calls 2: sys_mmapsys_read_file
75func main() -> i64