Expand description
Runtime side of script-backed custom regions (RegionKind::Custom).
The scripting layer (leviath_scripting::region_hook) compiles and runs
the hooks; this module owns everything on the runtime side of that JSON
boundary: building the ctx objects a hook receives, interpreting each
hook’s returned value, and every fallback. The contract is that a hook
failure can never fail an inference or lose a write:
renderfailure → the region renders as a Temporary-style block ([{name}]:\n…,Nevercache hint) and a warning names the script.on_writefailure → the entry is accepted unchanged.on_overflowfailure or invalid indices → oldest-first eviction.
Structs§
- Assemble
Meta - Stage-level metadata threaded into
render(ctx).Default(empty name, zero iterations, empty model) is used by callers with no stage context - the transition-choice request and plainassemble()in tests.