nx_refintake.nx
buildroot/runtime/nx_refintake.nx
about
nx_refintake.nx -- CLI over nx_refintake_lib (aesthetictwin AT22, 2026-09-16): reference intake as a workflow of verbs,
each one a step that can run alone or inside `all`, so the same organ is a primitive, a workflow and an agent's tool.
nx_refintake pages <slug> mirror every page source whose mirror is absent (journaled PAGE-OK / PAGE-FAILED)
nx_refintake discover <slug> apply every knowledge/refintake.hosts pattern whose prefix matches a page source;
rewrite knowledge/refintake/<slug>.sources (one url per line, deduped)
nx_refintake mirror <slug> mirror every declared image source and every discovered url not yet journaled; every
mirrored body is classified by its magic bytes (JPEG/PNG/GIF/WEBP are OK, an HTML stub or
anything else is journaled NOT-IMAGE-<class>, never counted as a picture)
nx_refintake verify <slug> re-classify every journaled OK mirror; names each row whose bytes are no longer a picture
nx_refintake videos <slug> KVS player pages (kind video): page, player video_url + license_code, the function/0/ hash
permutation undone, the clip mirrored and classified by its ftyp magic (AT24)
nx_refintake all <slug> pages, discover, mirror, verify, videos in that order (the one-call workflow)
nx_refintake check the conf: subjects, sources per kind, tags on declared axes (a group label is refused by name)
exit: 0 ok | 2 usage | 3 conf unreadable | 4 subject undeclared or refused | 5 tag refused | 6 a leg reported failures
license_tier: ORIGINAL No hw writes (Rule 26).
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_refintake_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
| 19 | const RC_EXIT_USAGE: i64 = 2 |
| 20 | const RC_EXIT_CONF: i64 = 3 |
| 21 | const RC_EXIT_SUBJECT: i64 = 4 |
| 22 | const RC_EXIT_TAG: i64 = 5 |
| 23 | const RC_EXIT_LEG: i64 = 6 |
| 24 | const RC_ARGC_SLUG: i64 = 3 |
| 25 | const RC_C_N: i64 = 8 |
| 26 | const RC_C_TRIED: i64 = 0 |
| 27 | const RC_C_OK: i64 = 1 |
| 28 | const RC_C_FAILED: i64 = 2 |
| 29 | const RC_C_PRESENT: i64 = 3 |
| 30 | const RC_C_NOTIMAGE: i64 = 4 |
| 31 | const RC_C_ALREADY: i64 = 5 |
| 32 | const RC_C_PATTERNS: i64 = 6 |
| 33 | const RC_C_UNKNOWNHOST: i64 = 7 |
| 34 | const RC_V_ROWS: i64 = 0 |
| 35 | const RC_V_IMAGES: i64 = 1 |
| 36 | const RC_V_HTML: i64 = 2 |
| 37 | const RC_V_OTHER: i64 = 3 |
| 38 | const RC_V_UNREADABLE: i64 = 4 |
functions
| 40 | func rc_usage() -> i64 |
| 44 | func rc_zero(c: *i64, n: i64) -> i64 { var i: i64 = 0; while i < n { c[i] = 0; i = i + 1 } return 0 } called by 1: main |
| 45 | func rc_fetched_path(mirror: *u8, out: *u8) -> i64 |
| 51 | func rc_present(mirror: *u8) -> i64 |
| 58 | func rc_journaled(jrnl: *u8, jn: i64, url: *u8) -> i64 |
| 68 | func rc_load_journal(slug: *u8, lenp: *i64) -> *u8 |
| 75 | func rc_pages(conf: *u8, n: i64, slug: *u8, lic: *u8, c: *i64) -> i64 |
| 110 | func rc_discover(conf: *u8, n: i64, slug: *u8, hosts: *u8, hn: i64, c: *i64, urlsp: *i64) -> i64 |
| 181 | func rc_mirror_url(slug: *u8, url: *u8, mirror: *u8, lic: *u8, c: *i64) -> i64 called by 1: rc_mirror calls 10: sys_mmapri_mirror_oneri_journalri_putsrc_fetched_pathri_image_class+4 |
| 210 | func rc_mirror(conf: *u8, n: i64, slug: *u8, lic: *u8, c: *i64) -> i64 |
| 259 | func rc_verify(slug: *u8, v: *i64) -> i64 |
| 294 | func rc_videos(conf: *u8, n: i64, slug: *u8, lic: *u8, c: *i64) -> i64 |
| 380 | func rc_check(conf: *u8, n: i64) -> i64 |
| 404 | func main(argc: i64, argv: *i64) -> i64 |