Expand description
Plugin framework types for the room chat system.
This module defines the traits and types needed to implement a room plugin.
External crates can depend on room-protocol alone to implement Plugin
— no dependency on room-cli or broker internals is required.
Structs§
- Command
Context - Context passed to a plugin’s
handlemethod. - Command
Info - Describes a single command for
/helpand autocomplete. - Param
Schema - Schema for a single command parameter — drives validation,
/helpoutput, and TUI argument autocomplete. - Room
Metadata - Frozen snapshot of room state for plugin consumption.
- User
Info - A user’s online presence.
Enums§
- Param
Type - The kind of value a parameter accepts.
- Plugin
Result - What the broker should do after a plugin handles a command.
Constants§
- PLUGIN_
API_ VERSION - Current Plugin API version. Increment when the
Plugintrait changes in a way that requires plugin authors to update their code (new required methods, changed signatures, removed defaults). - PROTOCOL_
VERSION - The
room-protocolcrate version, derived fromCargo.tomlat compile time. Used by the broker to reject plugins that require a newer protocol than the one currently running.
Traits§
- History
Access - Async read-only access to a room’s chat history.
- Message
Writer - 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. - Team
Access - Read-only access to daemon-level team membership.
Type Aliases§
- BoxFuture
- Boxed future type used by
Plugin::handlefor dyn compatibility.