code wiki / (root) / nx_workflow_ingest.nx

nx_workflow_ingest.nx

buildroot/runtime/nx_workflow_ingest.nx

4115 B112 linesdepth 5pulls 6 transitivereach 0 importersview sourcekind tooltopic workflow
docsdependenciesstructsconstsfunctions

about

nx_workflow_ingest.nx -- SOVEREIGN media -> ComfyUI workflow extractor (piece 1 of the anti-ComfyUI ingest). ComfyUI embeds the gen-graph as JSON in media metadata (PNG tEXt chunks; MP4/WebM atoms): "workflow" (UI graph, nodes[]) + "prompt" (API graph, class_type). This reads a media file, finds a marker, and extracts the balanced JSON (string-aware brace matching), writes it out, and counts nodes. No 3rd party. license_tier: ORIGINAL

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_le.nx nx_strconv.nx nx_workflow_ingest.nx

imports: nx_syscalls.nxnx_le.nxnx_strconv.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main sys_openat_rd sys_mmap sys_read sys_close wi_find wi_balanced sys_openat_wr sys_write wi_count wi_find ↻ wi_emit sys_mmap ↻ nx_strconv_format_i64 sys_write ↻

structs

none

consts

10const K_MAGIC_8388608: i64 = 8388608
11const K_MAGIC_1048576: i64 = 1048576

functions

14func wi_find(buf: *u8, len: i64, needle: *u8, nlen: i64, start: i64) -> i64
called by 2: wi_countmain
27func wi_count(buf: *u8, len: i64, needle: *u8, nlen: i64) -> i64
called by 1: main calls 1: wi_find
35func wi_balanced(buf: *u8, len: i64, start: i64, out: *u8, cap: i64) -> i64
called by 1: main
56func wi_emit(fd: i64, key: *u8, kl: i64, v: i64) -> i64
70func main() -> i64