code wiki / _hdl_build / nx_vn_living.nx
nx_vn_living.nx
buildroot/runtime/_hdl_build/nx_vn_living.nx
about
nx_vn_living.nx -- the "LIVING but it still TRACKS" engine for the VN (operator: interactions can be LLM-run IN
LIMITS so they feel living, but the story stays on its rails). The hard part is the LIMITS, and they must hold
for ANY interaction provider -- a deterministic template now, a sovereign no-float LLM later. Design:
- a scene carries CANON: a required FACT (must appear) + a FORBIDDEN string (must never appear) + an authored
fallback line that is itself on-canon.
- a PROVIDER generates a living interaction line (varied). Could be an LLM.
- the VALIDATOR (vl_ok) is THE LIMIT: it accepts the line ONLY if it keeps canon (has fact, lacks forbidden).
- vl_interact runs the provider, validates, and FALLS BACK to the authored canon line if it derails -> so the
final line is ALWAYS on-canon. An unbounded/hallucinating provider can vary the flavour but CANNOT break
the plot. That is "living interactions, story still tracks", made mechanical + provider-agnostic. license_tier: ORIGINAL
dependencies 1 imports · 1 importers
imports: nx_syscalls.nx
imported by: nx_vn_living_gate.nx
structs
| none |
consts
| none |
functions
| 13 | func vl_has(hay: *u8, needle: *u8) -> i64 |
| 24 | func vl_cpy(out: *u8, s: *u8) -> i64 { var i: i64 = 0; while s[i] != (0 as u8) { out[i] = s[i]; i = i + 1 } out[i] = 0 as u8; return i } |
| 27 | func vl_ok(line: *u8, fact: *u8, forbidden: *u8) -> i64 |
| 34 | func vl_gen_good(seed: i64, out: *u8) -> i64 |
| 42 | func vl_gen_rogue(seed: i64, out: *u8) -> i64 |
| 49 | func vl_interact(seed: i64, kind: i64, fact: *u8, forbidden: *u8, authored: *u8, out: *u8, accbox: *i64) -> i64 |