Skip to main content

Module plugin

Module plugin 

Source

Modules§

bridge
Bridge between the abstract plugin framework (room-protocol) and the concrete broker internals (room-cli). This module provides the concrete ChatWriter and HistoryReader types that implement the MessageWriter and HistoryAccess traits respectively.
queue
schema
stats
taskboard

Structs§

ChatWriter
Short-lived scoped handle for a plugin to write messages to the chat.
CommandContext
Context passed to a plugin’s handle method.
CommandInfo
Describes a single command for /help and autocomplete.
HistoryReader
Scoped read-only handle to a room’s chat history.
ParamSchema
Schema for a single command parameter — drives validation, /help output, and TUI argument autocomplete.
PluginRegistry
Central registry of plugins. The broker uses this to dispatch / commands.
RoomMetadata
Frozen snapshot of room state for plugin consumption.
TeamChecker
Concrete TeamAccess backed by the daemon’s UserRegistry.
UserInfo
A user’s online presence.

Enums§

ParamType
The kind of value a parameter accepts.
PluginResult
What the broker should do after a plugin handles a command.

Constants§

PLUGIN_API_VERSION
Current Plugin API version. Increment when the Plugin trait changes in a way that requires plugin authors to update their code (new required methods, changed signatures, removed defaults).
PROTOCOL_VERSION
The room-protocol crate version, derived from Cargo.toml at compile time. Used by the broker to reject plugins that require a newer protocol than the one currently running.

Traits§

HistoryAccess
Async read-only access to a room’s chat history.
MessageWriter
Async message dispatch for plugins. Abstracts over the broker’s broadcast and persistence machinery so plugins never touch broker internals.
Plugin
A plugin that handles one or more / commands and/or reacts to room lifecycle events.
TeamAccess
Read-only access to daemon-level team membership.

Functions§

all_known_commands
Returns command schemas for all known commands: built-ins + default plugins.
builtin_command_infos
Returns CommandInfo schemas for all built-in commands (those handled directly by the broker, not by plugins). Used by the TUI palette and /help to show a complete command list with typed parameter metadata.

Type Aliases§

BoxFuture
Boxed future type used by Plugin::handle for dyn compatibility.