code wiki / (root) / nx_licgate_lib.nx

nx_licgate_lib.nx

buildroot/runtime/nx_licgate_lib.nx

15985 B364 linesdepth 2pulls 2 transitivereach 28 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_licgate_lib.nx -- the SHIPPABILITY verdict as a LIBRARY: may I SELL what this generation chain produced? Split out of nx_licgate.nx so the EMIT PATH can call it in-process. WHY A LIB (the same unblock as nx_swarm_endpoint_lib): a gate nothing calls is DARK, and the one consumer that MUST call this is the generator itself -- it has to refuse BEFORE bytes hit disk, not after. An organ with main() cannot be imported (double-main), so the verdict had to leave the CLI. The CLI is now a thin caller of this, which means the command line and the emit path prove the SAME code. THE DEFECT IT PREVENTS: output rights and weight rights are DIFFERENT RIGHTS. NoobAI-XL is freely downloadable, freely mergeable, and forbids commercialising model-GENERATED PRODUCTS -- so a game built entirely from "open" checkpoints can be in breach on every frame. And a generation's rights are the INTERSECTION over its whole provenance chain: one non-commercial LoRA in a forty-node graph poisons everything downstream of it. FAIL-CLOSED: unknown model, unresolved licence, or an EMPTY chain -> REFUSE. Silence is never permission. Rights table is DATA (knowledge/model_license.conf) -- a new checkpoint costs a row. Rights are encoded ORDERED (0 NO < 1 CONDITIONAL < 2 YES) so "most restrictive wins" is a plain MIN; deriv_must_open is an OBLIGATION, so it takes the MAX instead. license_tier: ORIGINAL

dependencies 1 imports · 4 importers

nx_syscalls.nx nx_licgate_lib.nx nx_acquire.nx nx_asset_prov_clock_candidate_t346 nx_asset_prov_lib.nx nx_licgate.nx

imports: nx_syscalls.nx

imported by: nx_acquire.nxnx_asset_prov_clock_candidate_t346.nxnx_asset_prov_lib.nxnx_licgate.nx

structs

none

consts

28const LG_NO: i64 = 0
29const LG_COND: i64 = 1
30const LG_YES: i64 = 2
32const LG_UNVERIFIED: i64 = 0
33const LG_WORD: i64 = 8
34const LG_CTX_SLOTS: i64 = 8
305const LG_RC_OK: i64 = 0
306const LG_RC_REVIEW: i64 = 3
307const LG_RC_REFUSE: i64 = 4

functions

39func lg_len(s: *u8) -> i64 { var i: i64 = 0; while s[i] != (0 as u8) { i = i + 1 } return i }
41func lg_put(o: *u8, at: i64, s: *u8) -> i64
48func lg_putn(o: *u8, at: i64, buf: *u8, off: i64, n: i64) -> i64
called by 2: lg_row_verbatimmain
55func lg_putd(o: *u8, at: i64, v: i64) -> i64
67func lg_ceq(a: *u8, b: *u8) -> i64
called by 2: mainmain
78func lg_seq(buf: *u8, off: i64, n: i64, s: *u8) -> i64
86func lg_sseq(buf: *u8, a: i64, an: i64, b: i64, bn: i64) -> i64
called by 1: lg_ctx
94func lg_field(buf: *u8, s: i64, e: i64, idx: i64, box: *i64) -> i64
117func lg_num(buf: *u8, off: i64, n: i64) -> i64
called by 1: lg_ctx
137func lg_ctx() -> *i64
206func lg_find_model(ctx: *i64, want: *u8) -> i64
called by 2: mainlg_eval calls 1: lg_seq
226func lg_find_license(ctx: *i64, want: *u8) -> i64
241func lg_lic_redist(ctx: *i64, li: i64) -> i64 { let lic: *i64 = ctx[2] as *i64; return lic[li * 7 + 3] }
242func lg_lic_verified(ctx: *i64, li: i64) -> i64 { let lic: *i64 = ctx[2] as *i64; return lic[li * 7 + 6] }
246func lg_eval(ctx: *i64, names: *i64, cnt: i64, res: *i64) -> i64
called by 2: mainlg_verdict calls 1: lg_find_model
309func lg_rc(res: *i64) -> i64
called by 2: mainlg_verdict
333func lg_rc_axes(res: *i64) -> i64
called by 1: main
346func lg_axis_name(res: *i64) -> *u8
called by 1: main
359func lg_verdict(names: *i64, cnt: i64) -> i64
called by 1: main calls 4: lg_ctxsys_mmaplg_evallg_rc