Skip to main content

Module runner

Module runner 

Source
Expand description

Host-side execution path for code-mode recall.

The “guest program” is a pre-built sequence of host import calls the LLM-generated wasm would have made. Today the binary in mnemo-cli builds the program from CLI args; tomorrow the wasmtime runner (gated under the wasm feature) compiles + executes a real WIT guest. Either way the host-side contract is the same: a GuestProgram is consumed against the [MemStore]-shaped callable, producing a RecallBundle with the cited memories plus token-cost accounting.

Structs§

CodeModeRecall
GuestProgram
Bundle of host-import calls a guest program asks for. The host runs them in order and records what it returned in RecallBundle.
RecallBundle
What the guest program produces. The CLI hands final_answer back to the LLM; the bundle’s other fields land in the audit trail so an offline auditor can replay the recall.
RecallHit
ResourceBudget
Resource limits the wasm sandbox is parameterised by. Defaults chosen so a runaway guest cannot DOS the host: 10M fuel, 64 pages (4 MiB), 50 ms wall.

Enums§

CodeModeError
RecallStep
One step a guest program asks the host to run. Mirrors the WIT world’s store interface (recall, score, cite).

Traits§

HostStore
Trait the host exposes to the guest. Mirrors the WIT store interface so swapping in the wasmtime path keeps the same contract.

Functions§

run_code_mode_host
Run a guest program against the host store. The wall-time and fuel budgets are enforced cooperatively on every step; the wasm sandbox enforces them preemptively under the wasm feature.