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§
- Code
Mode Recall - Guest
Program - Bundle of host-import calls a guest program asks for. The host
runs them in order and records what it returned in
RecallBundle. - Recall
Bundle - What the guest program produces. The CLI hands
final_answerback to the LLM; the bundle’s other fields land in the audit trail so an offline auditor can replay the recall. - Recall
Hit - Resource
Budget - 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§
- Code
Mode Error - Recall
Step - One step a guest program asks the host to run. Mirrors the WIT
world’s
storeinterface (recall,score,cite).
Traits§
- Host
Store - Trait the host exposes to the guest. Mirrors the WIT
storeinterface 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
wasmfeature.