nx_content_ship.nx
buildroot/runtime/nx_content_ship.nx
about
nx_content_ship.nx -- ONE sovereign command for the whole CONTENT ship loop (operator 2026-07-12: "isn't this
the type of thing we can bring into nishi and get up via mcp and api"). Replaces the sh-script choreography
(mint.body heredoc + grep/sed token extraction + per-file upload/promote calls + tr -d '\r' + edge check) with
a single fork+capture organ over the PROVEN pieces: nx_mgmt_client (sovereign TLS-1.3) + the mgmt API.
nx_content_ship <manifest> <capfile> [edge]
<manifest> rows: put|<remote-target>|<local-file> upload + atomic promote_content (idempotent)
verify|<url-path>|<expect-substr> GET via the edge, gate on substring
comment rows start with the hash char; blank lines + CRLF tolerated (no tr -d '\r' dance)
<capfile> file holding the nx_session_mint capability token (raw, one line)
[edge] default https://nishifamily.com
Step 0 SELF-MINTS a fresh 24h admin session over HTTPS (tools/call nx_session_mint, cap IN THE BODY -- the
dummy session header is ignored by the tools daemon), so there is no pre-step and no stale token.
Deploy of BINARIES/services is deliberately NOT here (that is /api/deploy, never-brick) -- this organ moves
site CONTENT through the fail-closed content namespace (md_content_pfx allowlist enforced server-side).
dependencies 1 imports · 0 importers
imports: nx_tool_run.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
| 16 | const K_MAGIC_2000: i64 = 2000 |
| 17 | const K_MAGIC_1048576: i64 = 1048576 |
| 18 | const K_MAGIC_262144: i64 = 262144 |
| 19 | const K_MAGIC_4096: i64 = 4096 |
| 20 | const K_MAGIC_65536: i64 = 65536 |
| 21 | const K_MAGIC_4000: i64 = 4000 |
functions
| 23 | func cs_slen(s: *u8) -> i64 { var i: i64 = 0; while s[i] != (0 as u8) { i = i + 1 } return i } |
| 24 | func cs_puts(s: *u8) -> i64 { sys_write(1, s, cs_slen(s)); return 0 } |
| 27 | func cs_eq(a: *u8, b: *u8) -> i64 called by 1: main |
| 34 | func cs_contains(buf: *u8, n: i64, needle: *u8) -> i64 |
| 48 | func cs_app(dst: *u8, off: i64, src: *u8) -> i64 called by 1: main |
| 56 | func cs_write_file(path: *u8, content: *u8, n: i64) -> i64 |
| 65 | func cs_read_file(path: *u8, buf: *u8, bcap: i64) -> i64 |
| 79 | func cs_run(path: *u8, av: *i64, out: *u8, cap: i64, olen: *i64) -> i64 |
| 84 | func main(argc: i64, argv: *i64) -> i64 |