Expand description
ABI-stable types for the dynamic plugin FFI boundary.
All structs are #[repr(C)] and use abi_stable::std_types
so they can be safely passed across dlopen-loaded library boundaries.
§API Version History
- 0.1 — Initial version: single command per plugin, plain-text responses.
- 0.2 — Multi-command support via
RVec<CommandDescriptorEntry>, rich-media responses via JSON segments, event context in requests. - 0.3 — Extended
CommandRequestwith sender nickname, message ID, and timestamp. AddedReplyBuilderfor fluent rich-media construction. AddedPluginInitConfig/PluginInitResultlifecycle hooks.
Structs§
- BotApi
- Provides static methods for plugins to queue outbound messages to arbitrary users or groups. Messages are buffered in a process-local queue and flushed by the host after the callback returns.
- Command
Descriptor Entry - Describes a single command registered by a dynamic plugin.
- Command
Request - Request passed to command callback.
- Command
Response - Response from command callback.
- Dynamic
Action Response - The action portion of every dynamic plugin response.
- Interceptor
Descriptor Entry - Describes an interceptor registered by a dynamic plugin.
- Interceptor
Request - Request passed to interceptor callbacks (pre_handle / after_completion).
- Interceptor
Response - Response from a
pre_handleinterceptor callback. - Notice
Request - Request passed to notice/request/meta callbacks.
- Notice
Response - Response from notice/request/meta callbacks.
- Plugin
Descriptor - Metadata returned by the
qimen_plugin_descriptorFFI symbol. - Plugin
Init Config - Configuration passed to plugin init hook.
- Plugin
Init Result - Result from plugin init hook.
- Reply
Builder - Fluent builder for constructing rich-media command responses.
- Route
Descriptor Entry - Describes a system event route registered by a dynamic plugin.
- Send
Action - An outbound send action queued by plugin code via
BotApi/SendBuilder. - Send
Builder - Fluent builder for constructing and queuing a rich-media send to an arbitrary target (group or private).
Constants§
Functions§
- drain_
send_ queue - Drain all queued send actions. Called by the generated
qimen_plugin_flush_sendssymbol. - expected_
api_ version - Current plugin API version. Dynamic plugins must declare the same version to be loaded by the host.
- is_
compatible_ api_ version - Also accept legacy 0.1 / 0.2 plugins for backward compatibility.