nx_extllm_lib.nx
buildroot/runtime/nx_extllm_lib.nx
about
nx_extllm_lib.nx -- THE EGRESS DECISION LIBRARY: may THESE BYTES leave, to THIS PROVIDER, for THIS USE?
The CODE half of two conf files authored 2026-08-24 that have had no reader since (measured 2026-08-25:
xl_egress matches=0 over 61,475 files, coverage_complete=1 corpus_complete=1).
xl_class_of -- CLASSIFY AT THE DOOR over the operator's release manifest. C by default; U only on an
explicit row whose sha256 still matches the file. A STALE row admits NOTHING.
xl_use_verdict -- the provider terms ledger as data. UNKNOWN is a VALUE and REFUSES every gated use.
xl_budget_* -- CUMULATIVE disclosure per provider. Splitting work into parts defeats a SINGLE call
and NOT aggregation across calls: a provider holding a perpetual licence retains every
fragment and reassembles at leisure. The bound is on the SUM, never on the call.
WHY A NEW LIB RATHER THAN EXTENDING AN INCUMBENT (checked before building, 2026-08-25): the estate's three
shipping classifiers cannot answer an OBJECT-side release question. ag_uid_to_level grades a READER (a 0..3
RBAC ladder, never a byte's sensitivity); nx_site_lock_lib slk_resolve returns 0 for an unmatched path and
ag_allow turns that into ALLOW for everyone ("no match => PUBLIC"); the docportal consent bit is OPT-OUT
(keep initialises to 1, so an undeclared document is SERVED). Two of the three default to release, so this
decision must fail closed INDEPENDENTLY of all of them rather than compose one.
Verdicts are exit-code shaped so a caller can branch without parsing. license_tier: ORIGINAL. No hw writes (Rule 26).
dependencies 2 imports · 3 importers
imports: nx_syscalls.nxnx_sovjson_lib.nx
imported by: nx_extllm.nxnx_extllm_call.nxnx_extllm_publish_guard.nx
structs
| none |
consts
| 21 | const XL_ALLOW: i64 = 0 |
| 22 | const XL_REFUSE: i64 = 1 |
| 23 | const XL_UNKNOWN: i64 = 3 |
| 26 | const XL_CLASS_U: i64 = 0 |
| 27 | const XL_CLASS_C: i64 = 1 |
| 30 | const XL_USE_WORKER: i64 = 1 |
| 31 | const XL_USE_JUDGE: i64 = 2 |
| 32 | const XL_USE_DISTILL: i64 = 3 |
| 35 | const XL_BYTE_HASH: i64 = 35 |
| 36 | const XL_BYTE_PIPE: i64 = 124 |
| 37 | const XL_BYTE_NL: i64 = 10 |
| 40 | const XL_TC_PROVIDER: i64 = 0 |
| 41 | const XL_TC_TIER: i64 = 1 |
| 42 | const XL_TC_TRAINS_IN: i64 = 2 |
| 43 | const XL_TC_OUT_OURS: i64 = 3 |
| 44 | const XL_TC_PUBRESTRICT: i64 = 4 |
| 45 | const XL_TC_USES: i64 = 9 |
| 46 | const XL_TC_REFKEY: i64 = 10 |
| 47 | const XL_TC_PIN: i64 = 11 |
| 48 | const XL_TC_COLS: i64 = 12 |
| 51 | const XL_RC_PATH: i64 = 1 |
| 52 | const XL_RC_SHA: i64 = 2 |
| 53 | const XL_RC_COLS: i64 = 6 |
| 58 | const XL_PIN_MIN: i64 = 65 |
| 59 | const XL_BYTE_H: i64 = 104 |
| 65 | const XL_SPAN_SLOTS: i64 = 2 |
| 66 | const XL_SPAN_BYTES: i64 = 16 |
| 244 | const XL_LC_PROVIDER: i64 = 1 |
| 245 | const XL_LC_SUBSYSTEM: i64 = 3 |
| 246 | const XL_LC_BYTES: i64 = 4 |
| 247 | const XL_LC_COLS: i64 = 8 |
functions
| 68 | func xl_terms_path() -> *u8 { return "knowledge/extllm_terms.conf" as *u8 } |
| 69 | func xl_release_path() -> *u8 { return "knowledge/extllm_release.conf" as *u8 } |
| 72 | func xl_is_comment(q: *u8, ls: i64, le: i64) -> i64 |
| 79 | func xl_col(q: *u8, ls: i64, le: i64, c: i64, out: *i64) -> i64 |
| 97 | func xl_ncols(q: *u8, ls: i64, le: i64) -> i64 |
| 105 | func xl_use_name(use: i64) -> *u8 called by 1: xl_use_listed |
| 112 | func xl_verdict_name(v: i64) -> *u8 |
| 118 | func xl_class_name(c: i64) -> *u8 called by 1: xe_emit_class |
| 124 | func xl_row_find(q: *u8, n: i64, provider: *u8, tier: *u8, out: *i64) -> i64 |
| 148 | func xl_cell_is(q: *u8, ls: i64, le: i64, col: i64, lit: *u8) -> i64 |
| 155 | func xl_use_listed(q: *u8, ls: i64, le: i64, use: i64) -> i64 |
| 162 | func xl_pin_ok(q: *u8, ls: i64, le: i64) -> i64 |
| 176 | func xl_use_verdict(q: *u8, n: i64, provider: *u8, tier: *u8, use: i64) -> i64 |
| 190 | func xl_trains_on_input(q: *u8, n: i64, provider: *u8, tier: *u8) -> i64 |
| 202 | func xl_release_row(q: *u8, n: i64, path: *u8, out: *i64) -> i64 |
| 220 | func xl_class_of(q: *u8, n: i64, path: *u8, actual_sha: *u8) -> i64 |
| 231 | func xl_release_rows(q: *u8, n: i64) -> i64 |
| 251 | func xl_spent(q: *u8, n: i64, provider: *u8, subsystem: *u8, all_subsystems: i64) -> i64 |
| 281 | func xl_budget_verdict(spent: i64, add: i64, bound: i64) -> i64 called by 1: xe_selftest |
| 288 | func xl_budget_left(spent: i64, bound: i64) -> i64 called by 1: xe_selftest |