Skip to main content

Module plugins

Module plugins 

Source
Expand description

§WASM Plugin System

Extends RavenClaws with WebAssembly plugins — load .wasm binaries at runtime and register their exported tools into the agent’s ToolRegistry.

§Plugin ABI (v1)

Every WASM plugin must export the following functions:

ExportSignatureDescription
plugin_name() -> i32Pointer to null-terminated UTF-8 name string in linear memory
plugin_version() -> i32Pointer to null-terminated version string
plugin_description() -> i32Pointer to null-terminated description string
plugin_tools_count() -> i32Number of tools this plugin exposes
plugin_tool_name(i32) -> i32Given tool index, returns pointer to name string
plugin_tool_description(i32) -> i32Given tool index, returns pointer to description string
plugin_tool_execute(i32, i32) -> i32Given tool index + input pointer, returns pointer to output string

Strings are communicated via pointer into the plugin’s exported linear memory. The host reads them by inspecting the memory at the returned offset.

Structs§

PluginTool
A single tool exposed by a WASM plugin.
WasmPlugin
A loaded WASM plugin with its store, instance, and exported tools.
WasmPluginManager
Manages a collection of loaded WASM plugins.

Enums§

PluginError
Errors that can occur during plugin loading, inspection, or execution.