nx_mgmt_call_candidate_t189.nx
buildroot/runtime/nx_mgmt_call_candidate_t189.nx
about
nx_mgmt_call.nx -- the mgmt-API driver forked as an MCP tool. Mints a FRESH admin session from the NAS key bundle
(no staleness, no stored secret) and issues one authenticated call to the loopback mgmt API (:18098), printing the
response body. This is what makes the SOTA control plane (deploy/reconcile/restart/services/health) reachable over
MCP without the shell. Runs as the (root) tools daemon's child, which can read the elderwesto-owned key bundle.
CLI: nx_mgmt_call <METHOD> <path> [body] e.g. nx_mgmt_call GET /api/services
Body encoding is route-specific. Current form routes require target=..., not JSON.
Example: nx_mgmt_call POST /api/organ_run 'target=nx_filehash&confirm=yes&args=nx_mgmt_api.elf.new'
Resolve deployment targets through deploy_targets.conf; tool names and deployment names differ.
dependencies 3 imports · 0 importers
imports: nx_mgmt_private_response_candidate_t189.nxnx_session_mint_lib.nxnx_tool_http_backend.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
| 12 | const MC_MAGIC_86400: i64 = 86400 |
| 13 | const MC_MAGIC_131072: i64 = 131072 |
| 14 | const MC_MAGIC_1048576: i64 = 1048576 |
| 16 | const MC_KEYS: *u8 = "opaque_keys.bin" as *u8 // relative to the daemon cwd (nishihost) |
| 17 | const MC_REALM: *u8 = "nishi_site_admin" as *u8 |
| 18 | const MC_HANDLE: *u8 = "elderwesto" as *u8 |
| 19 | const MC_PORT: i64 = 18098 |
functions
| 21 | func mc_puts(buf: *u8, off: i64, s: *u8) -> i64 { var i: i64 = 0; while s[i] != (0 as u8) { buf[off] = s[i]; off = off + 1; i = i + 1 } return off } called by 1: main |
| 22 | func mc_putn(buf: *u8, off: i64, s: *u8, n: i64) -> i64 { var i: i64 = 0; while i < n { buf[off] = s[i]; off = off + 1; i = i + 1 } return off } called by 1: main |
| 23 | func mc_puti(buf: *u8, off: i64, v: i64) -> i64 called by 1: main |
| 32 | func mc_private_end(r:*NxMgmtPrivateResponse,session:*u8,reply:*u8,reply_n:i64)->i64 |
| 39 | func main(argc: i64, argv: *i64) -> i64 |