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 orphan librarytopic 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)

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
27func wi_count(buf: *u8, len: i64, needle: *u8, nlen: i64) -> i64
35func wi_balanced(buf: *u8, len: i64, start: i64, out: *u8, cap: i64) -> i64
56func wi_emit(fd: i64, key: *u8, kl: i64, v: i64) -> i64
70func main() -> i64