code wiki / (root) / nx_json_auth_read_t1.nx

nx_json_auth_read_t1.nx

buildroot/runtime/nx_json_auth_read_t1.nx

15046 B323 linesdepth 2pulls 2 transitivereach 2 importersview sourcekind librarytopic json
docsdependenciesstructsconstsfunctions

about

nx_json_lib.nx -- minimal SOVEREIGN JSON field reader (no jq, no shell, no 3rd-party). Built for the work-journal: extract "transcript_path" from a Claude-Code hook's stdin JSON and scan tool_use blocks out of the session transcript .jsonl. NOT a full JSON parser -- it linearly finds "key":"value" string fields and literal anchors, which is exactly what capture needs and is robust to the harness's compact (space-free) emission. De-escapes backslash sequences and neutralizes any TAB/NL/CR so an extracted value can never tear the TSV work-journal line. Sovereign: imports nx_syscalls only. license_tier: ORIGINAL

dependencies 1 imports · 1 importers

nx_syscalls.nx nx_json_auth_read_t1.nx nx_mcp_route_auth_read_t1.nx

imports: nx_syscalls.nx

imported by: nx_mcp_route_auth_read_t1.nx

structs

none

consts

none

functions

10func jx_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
13func jx_find(buf: *u8, n: i64, start: i64, pat: *u8) -> i64
29func jx_hexdig(buf: *u8, n: i64, at: i64) -> i64
called by 1: jx_hex4
39func jx_hex4(buf: *u8, n: i64, at: i64) -> i64
52func jx_emit_utf8(out: *u8, o0: i64, outcap: i64, cp: i64) -> i64
91func jx_copy_str_ctl(buf: *u8, n: i64, vstart: i64, out: *u8, outcap: i64, keep_ctl: i64) -> i64
155func jx_copy_str(buf: *u8, n: i64, vstart: i64, out: *u8, outcap: i64) -> i64
called by 1: jx_get_str calls 1: jx_copy_str_ctl
160func jx_decode_span(buf: *u8, n: i64, out: *u8, outcap: i64) -> i64
called by 1: mr_id_equal calls 2: jx_hex4jx_emit_utf8
214func jx_copy_str_raw(buf: *u8, n: i64, vstart: i64, out: *u8, outcap: i64) -> i64
called by 1: jx_get_str_raw calls 1: jx_copy_str_ctl
221func jx_skip_ws(buf: *u8, n: i64, from: i64) -> i64
242func jx_get_int(buf: *u8, n: i64, start: i64, key: *u8, out_val: *i64) -> i64
277func jx_get_str(buf: *u8, n: i64, start: i64, key: *u8, out: *u8, outcap: i64) -> i64
304func jx_get_str_raw(buf: *u8, n: i64, start: i64, key: *u8, out: *u8, outcap: i64) -> i64