package camel:plugin;
/// Guest bean plugin with multi-method dispatch.
///
/// Beans declare their methods via `methods()` and handle invocations
/// via `invoke(method, exchange)`. The host calls `init()` once at
/// registration and `invoke()` for each route step that targets this bean.
world bean {
import host;
use types.{wasm-exchange, wasm-error};
export invoke: func(method: string, exchange: wasm-exchange) -> result<wasm-exchange, wasm-error>;
export methods: func() -> list<string>;
export init: func() -> result<_, string>;
}