Skip to main content

Crate mofa_plugins

Crate mofa_plugins 

Source
Expand description

插件机制模块

提供完整的插件系统,支持:

  • 插件生命周期管理
  • 多种插件类型(LLM、Tool、Storage、Memory 等)
  • 插件注册与发现
  • 插件间通信与依赖管理
  • 事件钩子机制
  • Agent Skills 支持

Re-exports§

pub use tts::AudioPlaybackConfig;
pub use tts::MockTTSEngine;
pub use tts::TTSCommand;
pub use tts::TTSEngine;
pub use tts::TTSPlugin;
pub use tts::TTSPluginConfig;
pub use tts::TextToSpeechTool;
pub use tts::VoiceInfo;
pub use tts::cache::ModelCache;
pub use tts::model_downloader::HFHubClient;
pub use tts::play_audio;
pub use tts::play_audio_async;
pub use rhai_runtime::*;
pub use tool::*;
pub use tools::*;

Modules§

hot_reload
Hot-reload plugin support module
rhai_runtime
Rhai Runtime Plugin
skill
Agent Skills 模块
tool
Tool module
tools
Built-in tools module
tts
Text-to-Speech (TTS) Plugin Module
wasm_runtime
WASM Plugin Runtime Module

Macros§

declare_plugin
Macro to create a plugin export

Structs§

ChatMessage
聊天消息
LLMPlugin
LLM 能力插件
LLMPluginConfig
LLM 插件配置
MemoryEntry
记忆条目
MemoryPlugin
记忆插件
MemoryStorage
内存存储后端
OpenAIClient
OpenAI 客户端实现
PluginConfig
插件配置
PluginContext
插件执行上下文
PluginManager
插件管理器
PluginMetadata
插件元数据
StoragePlugin
存储插件
ToolCall
工具调用请求
ToolDefinition
工具定义
ToolPlugin
工具插件
ToolResult
工具调用结果

Enums§

PluginEvent
插件事件
PluginState
插件状态
PluginType
插件类型枚举

Traits§

AgentPlugin
核心插件 trait
LLMClient
LLM 客户端 trait
StorageBackend
存储后端 trait
ToolExecutor
工具执行器 trait

Type Aliases§

PluginResult
插件执行结果