Skip to main content

Module host

Module host 

Source
Expand description

Host — the thin Rust shell that wires up Lua VM, Mesh, HTTP, and MCP.

§Responsibilities

  1. Spawn an mlua-isle AsyncIsle (dedicated Lua VM thread with coroutine support)
  2. Optionally connect to agent-mesh relay
  3. Initialize the MCP manager for stdio-based MCP server connections
  4. Inject all Lua stdlib bridges (mesh.*, http.*, sh.*, tool.*, log.*, mcp.*)
  5. Execute the user-provided Lua script via coroutine_eval (async-aware)
  6. Graceful shutdown (Isle + MCP servers + mesh)

Structs§

BlockConfig
HostContext
Shared context passed into Lua bridge functions.

Functions§

run