Skip to main content

Crate abi_stable_host_api

Crate abi_stable_host_api 

Source
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 CommandRequest with sender nickname, message ID, and timestamp. Added ReplyBuilder for fluent rich-media construction. Added PluginInitConfig / PluginInitResult lifecycle 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.
CommandDescriptorEntry
Describes a single command registered by a dynamic plugin.
CommandRequest
Request passed to command callback.
CommandResponse
Response from command callback.
DynamicActionResponse
The action portion of every dynamic plugin response.
InterceptorDescriptorEntry
Describes an interceptor registered by a dynamic plugin.
InterceptorRequest
Request passed to interceptor callbacks (pre_handle / after_completion).
InterceptorResponse
Response from a pre_handle interceptor callback.
NoticeRequest
Request passed to notice/request/meta callbacks.
NoticeResponse
Response from notice/request/meta callbacks.
PluginDescriptor
Metadata returned by the qimen_plugin_descriptor FFI symbol.
PluginInitConfig
Configuration passed to plugin init hook.
PluginInitResult
Result from plugin init hook.
ReplyBuilder
Fluent builder for constructing rich-media command responses.
RouteDescriptorEntry
Describes a system event route registered by a dynamic plugin.
SendAction
An outbound send action queued by plugin code via BotApi / SendBuilder.
SendBuilder
Fluent builder for constructing and queuing a rich-media send to an arbitrary target (group or private).

Constants§

ACTION_APPROVE
ACTION_IGNORE
ACTION_REJECT
ACTION_REPLY

Functions§

drain_send_queue
Drain all queued send actions. Called by the generated qimen_plugin_flush_sends symbol.
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.