Skip to main content Crate harn_vm Copy item path Source pub use checkpoint::register_checkpoint_builtins ;pub use llm::register_llm_builtins ;pub use mcp::connect_mcp_server ;pub use mcp::connect_mcp_server_from_json ;pub use mcp::connect_mcp_server_from_spec ;pub use mcp::register_mcp_builtins ;pub use mcp_server::take_mcp_serve_prompts ;pub use mcp_server::take_mcp_serve_registry ;pub use mcp_server::take_mcp_serve_resource_templates ;pub use mcp_server::take_mcp_serve_resources ;pub use mcp_server::tool_registry_to_mcp_tools ;pub use mcp_server::McpServer ;pub use metadata::register_metadata_builtins ;pub use metadata::register_scan_builtins ;pub use stdlib::host::clear_host_call_bridge ;pub use stdlib::host::set_host_call_bridge ;pub use stdlib::host::HostCallBridge ;pub use stdlib::template::lookup_prompt_consumers ;pub use stdlib::template::lookup_prompt_span ;pub use stdlib::template::prompt_render_indices ;pub use stdlib::template::record_prompt_render_index ;pub use stdlib::template::PromptSourceSpan ;pub use stdlib::template::PromptSpanKind ;pub use stdlib::register_agent_stdlib ;pub use stdlib::register_core_stdlib ;pub use stdlib::register_io_stdlib ;pub use stdlib::register_vm_stdlib ;pub use store::register_store_builtins ;pub use value ::*;agent_events Agent event stream — the ACP-aligned observation surface for the
agent loop. agent_sessions First-class session storage. bridge JSON-RPC 2.0 bridge for host communication. checkpoint Checkpoint system for resilient pipeline execution. events Structured event emission for observability. iter Lazy iterator protocol for the Harn VM. jsonrpc Shared JSON-RPC 2.0 message construction helpers. llm LLM integration: API calls, streaming, agent loops, tool handling, and tracing. llm_config mcp MCP (Model Context Protocol) client for connecting to external tool servers. mcp_server MCP server mode: expose Harn tools, resources, resource templates, and
prompts as MCP capabilities over stdio. metadata Project metadata store for Harn’s runtime state root. orchestration runtime_paths schema stdlib Standard library builtins for the Harn VM. stdlib_modules store Persistent key-value store backed by Harn’s runtime state root. tool_annotations Tool annotations — the single source of truth for tool semantics. tracing Pipeline Observability: structured tracing spans with parent/child relationships. value visible_text Chunk A compiled chunk of bytecode. CompileError Compile error. CompiledFunction A compiled function (closure body). Compiler Compiles an AST into bytecode. DebugState Information about current execution state for the debugger. Vm The Harn bytecode virtual machine. Constant A constant value in the constant pool. DebugAction Debug action returned by the debug hook. Op Bytecode opcodes for the Harn VM. clone_async_builtin_child_vm Clone the VM at the top of the async-builtin child VM stack, returning a
fresh Vm instance the caller owns. Enables concurrent tool-handler
execution within a single agent_loop iteration — the VM shares its heavy
state (env, builtins, bridge, module_cache) via Arc/Rc, so cloning is
cheap and each handler gets its own execution context. compile_source Lex, parse, type-check, and compile source to bytecode in one call.
Bails on the first type error. For callers that need diagnostics
rather than early exit, use harn_parser::check_source directly
and then call Compiler::new().compile(&program). register_http_builtins Register HTTP builtins on a VM. reset_http_state Reset thread-local HTTP mock state. Call between test runs. reset_thread_local_state Reset all thread-local state that can leak between test runs. restore_async_builtin_child_vm Deprecated Legacy no-op retained for backward compatibility. take_async_builtin_child_vm Deprecated Legacy API preserved for out-of-tree callers; new code should use
clone_async_builtin_child_vm(). take/restore serialized concurrent
callers because only one could hold the popped value at a time.