Expand description
Runtime cookbook: operations for SIM.
This lib exposes the sim_cookbook engine as registered runtime
operations over a shared recipe store: cookbook:books|chapters|list|show| setup|search|next|reload (ungated), cookbook:run (read-eval gated,
decodes a recipe’s setup through its codec, evaluates it, and checks
declared expectations), and cookbook:load-lib|unload-lib lifecycle
wrappers over a host-owned loadable-lib directory.
The engine stays in sim-cookbook (kernel-free); this crate holds the
kernel integration so the boundary stays clean. CLI, WebUI, browse/help,
and agent cookbook surfaces should call these operations or the same seeded
store helpers instead of creating a second projection path.
Structs§
- Built
InLoadable Resolver - Resolver for the seed-recipes built-in loadable-lib directory.
- Config
Cookbook Provider - Cookbook config provider backed by a merged effective config Dir.
- Config
Provider - Converts a
CookbookConfiginto an effective loadable-lib directory. - Cookbook
Capability Profile - The deterministic capability profile the cookbook seats its eval
Cxwith. - Cookbook
Config - In-memory shape of the
sim/cookbookconfig table. - Cookbook
Lib - The cookbook lib, holding the shared recipe store the ops read.
- Cookbook
Lifecycle Op - A registered lifecycle operation over a loadable-lib directory.
- Cookbook
Op - A registered cookbook operation over a shared recipe store.
- Cookbook
Overrides - Overlay parsed from the
sim/cookbookeffective config table. - Cookbook
Store Handle - A runtime value that exposes the shared recipe store to projection layers.
- Empty
Catalog - The empty catalog: resolves nothing.
- Loadable
LibConfig - One configured loadable-lib row.
- Loadable
LibEntry - One known library in the cookbook’s effective loadable-lib directory.
- Loadable
LibList - Effective directory of host-loadable libraries known to the cookbook.
- Resolved
Loadable - Host-resolved loadable-lib material.
- Seeded
LibCatalog - A catalog over the seeded numbers domains.
Enums§
- Lifecycle
Action - Lifecycle command encoded by a synthetic cookbook card.
- OpKind
- Which cookbook operation a
CookbookOpperforms.
Constants§
- SEEDED_
RECIPE_ BOOKS - Seed books embedded by crates that currently ship first-pass recipes.
Statics§
- RECIPES
- Cookbook recipes for this lib, embedded at build time.
Traits§
- LibCatalog
- A resolver from a recipe
requiresname to a loadable library. - Loadable
LibResolver - Host resolver for config-selected loadable libs.
Functions§
- apply_
overrides - Applies a cookbook config overlay over an existing directory snapshot.
- built_
in_ config - Built-in cookbook directory config used by the seeded host resolver.
- cookbook_
config_ from_ effective - Builds the in-memory cookbook directory config from an effective Dir.
- cookbook_
config_ from_ effective_ with_ base - Builds the in-memory cookbook directory by applying effective overrides over a host-provided base directory.
- cookbook_
lib_ symbol - Returns the stable config library id for cookbook defaults.
- cookbook_
overrides_ from_ effective - Parses the effective
sim/cookbooktable as a directory overlay. - decode_
setup - Decode a recipe’s setup to an
Exprwithout evaluating it (cookbook:setup). - install_
cookbook_ lib - Install the cookbook lib over
store(idempotent). - install_
cookbook_ lib_ with_ loadable_ libs - Install the cookbook lib with lifecycle ops over
loadable_libs. - install_
seeded_ cookbook_ lib - Install the cookbook runtime over the embedded seed recipe store.
- lifecycle_
action - Reads the lifecycle action encoded by a synthetic cookbook card.
- load_
requires - Load every
requiresentry ofcardintocxviacatalog, idempotently, returning the names that stayed unresolved (neither already loaded nor carried by the catalog). - manifest_
name - The lib id:
sim:cookbook. - missing_
requires - Lib ids in
card.requiresthat are not currently loaded. - op_
exports - The
cookbook:*function exports. - projected_
recipe_ store - Builds the cookbook store for the current load state and known directory.
- require_
eval_ capability - Error unless the runtime holds the read-eval capability.
- run_
lifecycle_ action - Execute one lifecycle command and package it as a
RecipeRun. - run_
recipe - Run a recipe end to end against an
EmptyCatalog(the direct path): every required lib must already be loaded intocx, or the run errors. - run_
recipe_ twice - Run a Category C recipe twice under the same (catalog + Cx) and confirm the two runs produce identical results.
- run_
recipe_ with_ catalog - Run a recipe end to end, loading its
requiresfromcatalogfirst. - run_
recipe_ with_ loadable_ libs - Run a cookbook card against a dynamic loadable-lib directory.
- seeded_
recipe_ store - Build a store populated from the embedded seed recipe books.
- store_
symbol - The registered value holding the shared cookbook store handle.
Type Aliases§
- LibFactory
- Host-owned factory for constructing a loadable library.