code wiki / _hdl_build / nx_printer_ctl.nx
nx_printer_ctl.nx
buildroot/runtime/_hdl_build/nx_printer_ctl.nx
about
nx_printer_ctl.nx -- sovereign 3D-printer / home-IoT control ORGAN (CLI + MCP tool).
The operator's ask: integrate the 3D printers + home electronics into the
existing website behind the opaque secure login. The pasted reference design
used Node/Express + nginx + http-proxy-middleware + WAN mTLS. This organ is
the SOVEREIGN realization on the nishi fabric (no third-party stack, per the
ecosystem-only + api-first doctrine): the sovereign edge already does opaque
cap-token auth + reverse-proxy; this organ is the cap-gated LAN control leg.
Verbs (JSON on stdout = the MCP/API/agent interchange):
nx_printer_ctl info <ip> <port> [apikey] -- GET /printer/info
nx_printer_ctl estop <ip> <port> [apikey] -- POST /printer/emergency_stop
nx_printer_ctl pause <ip> <port> [apikey] -- POST /printer/print/pause
nx_printer_ctl resume <ip> <port> [apikey] -- POST /printer/print/resume
nx_printer_ctl cancel <ip> <port> [apikey] -- POST /printer/print/cancel
nx_printer_ctl contract -- emit the security/routing contract (no network)
Composes nx_printer_ctl_lib (parse/emit/allowlist) over the shipped Moonraker
primitives. NEVER-BRICK by construction: fixed safe-endpoint allowlist, no
raw-gcode passthrough (see the lib header + nx_printer_ctl_gate).
license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_printer_ctl_lib.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
| 26 | const PC_STDERR: i64 = 2 |
| 27 | const PC_EXIT_USAGE: i64 = 2 |
functions
| 29 | func pc_werr(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(PC_STDERR, s, n); return 0 } |
| 31 | func main(argc: i64, argv: *i64) -> i64 |