code wiki / (root) / nx_twinreport_lib.nx

nx_twinreport_lib.nx

buildroot/runtime/nx_twinreport_lib.nx

14858 B296 linesdepth 12pulls 65 transitivereach 2 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_twinreport_lib.nx -- FROM A CARD TO A VISIBLE RESULT IN ONE CALL (aesthetictwin AT42, 2026-09-17). Operator 2026-09-17: "just get all of it to mcp and api and workflow and agent powered its better to see what you have rendered". A reference card's axes go in; the estate's fit loop solves the genes, the fitted face is rendered from three views, and the result rows are APPENDED to the board's results file in the grammar nx_compare_results renders (result|slug|kind|date|class|title|report|image|headline), so the next publish shows them. Nothing here is specific to one person: any card the fit can read is a slug. The seeds verb does the same for synthetic people drawn from the gene ranges. Rows are slug-keyed, so a re-run supersedes its own earlier rows instead of duplicating them. license_tier: ORIGINAL No hw writes (Rule 26).

dependencies 3 imports · 2 importers

nx_syscalls.nx nx_civil_date.nx nx_twinfit_lib.nx nx_twinreport_lib.nx nx_twinreport.nx nx_twinreport_gate.nx

imports: nx_syscalls.nxnx_civil_date.nxnx_twinfit_lib.nx

imported by: nx_twinreport.nxnx_twinreport_gate.nx

structs

none

consts

13const TWR_YAW_THREEQUARTER: i64 = 2145 // thirty degrees in the renderer's angle unit (radians times 4096)
14const TWR_CAMZ_CLOSE: i64 = 2
15const TWR_PATHB: i64 = 1024
16const TWR_ROWB: i64 = 4096
17const TWR_VIEWS: i64 = 3
18const TWR_MODE644: i64 = 420
19const TWR_DATE_FIELDS: i64 = 8
20const TWR_DATE_YEAR: i64 = 0
21const TWR_DATE_MONTH: i64 = 1
22const TWR_DATE_DAY: i64 = 2
23const TWR_TEN: i64 = 10
24const TWR_CLASS: *u8 = "face-synthetic"
25const TWR_E_NOTARGET: i64 = 0 - 3
26const TWR_E_RENDER: i64 = 0 - 4
27const TWR_E_APPEND: i64 = 0 - 5
28const TWR_E_RANGE: i64 = 0 - 6
30const TWR_R_EVALS: i64 = 0
31const TWR_R_REACHED: i64 = 1
32const TWR_R_UNREACHED: i64 = 2
33const TWR_R_UNSTATED: i64 = 3
34const TWR_R_CONFIRMED: i64 = 4
35const TWR_R_RENDERS: i64 = 5
36const TWR_R_ROWS: i64 = 6
37const TWR_R_ROW_BYTES: i64 = 7
38const TWR_R_PNG_BYTES: i64 = 8
39const TWR_R_UNCHANGED: i64 = 9
40const TWR_R_N: i64 = 10
82const TWR_PIPE: i64 = 124
83const TWR_BYTE: i64 = 255
84const TWR_NL: i64 = 10
85const TWR_DATE_FIELD: i64 = 3

functions

42func twr_cat2(out: *u8, o: i64, n: i64) -> i64 { // a two-digit field, zero padded
called by 1: twr_today
48func twr_today(out: *u8) -> i64
59func twr_view_name(v: i64) -> *u8
called by 1: twr_fit_report
64func twr_view_words(v: i64) -> *u8
called by 1: twr_fit_report
69func twr_view_yaw(v: i64) -> i64 { if v == 1 { return TWR_YAW_THREEQUARTER } return TW_YAW_FRONTAL }
called by 1: twr_fit_report
70func twr_view_camz(v: i64) -> i64 { if v == 2 { return TW_CAMZ_UNITS } return TWR_CAMZ_CLOSE }
called by 1: twr_fit_report
71func twr_append(path: *u8, buf: *u8, n: i64) -> i64
87func twr_after_pipe(buf: *u8, s: i64, e: i64, k: i64) -> i64
96func twr_span_eq(a: *u8, as0: i64, ae: i64, b: *u8, bs: i64, be: i64) -> i64
103func twr_same_but_date(a: *u8, as0: i64, ae: i64, b: *u8, bs: i64, be: i64) -> i64
112func twr_last_row(file: *u8, fn: i64, row: *u8, rs: i64, re: i64, out: *i64) -> i64
126func twr_append_changed(path: *u8, rows: *u8, ro: i64, rep: *i64) -> i64
163func twr_row_head(row: *u8, o: i64, slug: *u8, suffix: *u8, kind: *u8, date: *u8, title_a: *u8, title_b: *u8, title_c: *u8, hrefpfx: *u8, file: *u8) -> i64
175func twr_fit_report(base: i64, slug: *u8, target_path: *u8, outdir: *u8, hrefpfx: *u8, results_path: *u8, rep: *i64) -> i64
249func twr_seed_report(base: i64, seed_lo: i64, seed_hi: i64, outdir: *u8, hrefpfx: *u8, results_path: *u8, rep: *i64) -> i64