Commit Graph

40 Commits

Author SHA1 Message Date
SengokuCola
1247482dd4 fix:解析预发布版版本号 2026-05-09 21:10:12 +08:00
SengokuCola
0f158327e2 Revert "fix:使sdk结构符合文档"
This reverts commit 7d82d30889.
2026-05-09 17:59:03 +08:00
SengokuCola
7d82d30889 fix:使sdk结构符合文档 2026-05-09 17:58:31 +08:00
SengokuCola
9584f13f16 fix:修复麦麦观察的一些不一致问题(混乱!? 2026-05-07 21:49:25 +08:00
SengokuCola
75e9453495 feat:优化webui多个页面的人机交互,修复插件地址问题,放宽插件id限制,增加高级页面缩进,统计页面快捷按钮,优化新手引导 2026-05-04 12:46:55 +08:00
DrSmoothl
742e21a727 feat: Add LLM Provider support in plugin runtime
- Introduced LLM Provider declarations in plugin manifests, allowing plugins to specify their LLM capabilities.
- Implemented validation for LLM Provider declarations to prevent duplicates and conflicts.
- Enhanced the PluginRunner to handle LLM Provider invocation requests, enabling plugins to interact with LLM Providers seamlessly.
- Added a ClientRegistry to manage LLM Provider registrations and ensure no conflicts arise between different plugins.
- Created a PluginLLMClient to facilitate communication with LLM Providers through the plugin runtime.
- Developed tests to ensure proper registration and conflict handling of LLM Providers.
2026-04-27 16:49:44 +08:00
SengokuCola
066c8baf84 feat:修复部分模型请求问题(v4l) 2026-04-22 23:36:39 +08:00
DrSmoothl
4ec06ece56 feat: add plugin dependency pipeline and HTML rendering service
- Implemented a new dependency pipeline for plugins to manage Python package dependencies, including conflict detection and automatic installation of missing dependencies.
- Introduced an HTML rendering service that utilizes existing browsers to render HTML content as PNG images, with support for various configurations and error handling.
2026-04-03 01:48:23 +08:00
DrSmoothl
7d0d429640 feat: Enhance plugin runtime configuration and hook management
- Added `inactive_plugins` field to `RunnerReadyPayload` and `ReloadPluginResultPayload` to track plugins that are not activated due to being disabled or unmet dependencies.
- Introduced `InspectPluginConfigPayload` and `InspectPluginConfigResultPayload` for inspecting plugin configuration metadata.
- Implemented `PluginActivationStatus` enum to better represent plugin activation states.
- Updated `_activate_plugin` method to return activation status and handle inactive plugins accordingly.
- Added hooks for send service to allow modification of messages before and after sending.
- Created new runtime routes for listing hook specifications in the WebUI.
- Refactored plugin configuration handling to utilize runtime inspection for better accuracy and flexibility.
- Enhanced error handling and logging for plugin configuration operations.
2026-04-02 21:16:31 +08:00
DrSmoothl
daf7c644a6 扬了 sys 控制 2026-03-31 16:59:02 +08:00
DrSmoothl
0b0f47a444 feat: Enhance Hook System with HookHandler and Dispatcher
- Introduced HookHandlerEntry to manage hook processing with attributes like hook name, mode, order, timeout, and error policy.
- Implemented normalization methods for hook attributes to ensure valid configurations.
- Updated ComponentRegistry to support retrieval of hook handlers based on hook names, with sorting by mode and order.
- Refactored HookDispatcher to handle invocation of hooks, separating blocking and non-blocking handlers, and managing execution results.
- Added support for registering hook specifications and invoking hooks across supervisors in PluginRuntimeManager.
- Removed deprecated workflow step handling from PluginRunner, streamlining hook invocation responses.
2026-03-24 19:04:05 +08:00
DrSmoothl
d5581a1a97 feat: 增强插件导入管理,添加导入请求验证和模块访问控制 2026-03-24 12:14:59 +08:00
DrSmoothl
f4a9afc452 feat: 增强 RPC 服务器连接处理,添加连接锁以防止并发连接问题 2026-03-24 12:14:59 +08:00
DrSmoothl
1b61e51554 feat: 添加批量插件重载功能及相关测试 2026-03-24 12:14:59 +08:00
DrSmoothl
1f02171a63 Refactor plugin loader and runner to support enhanced manifest structure
- Updated the PluginMeta class to utilize a strongly typed PluginManifest, improving type safety and clarity.
- Refactored dependency extraction logic to streamline the handling of plugin dependencies.
- Modified the PluginLoader to accommodate new manifest versioning and validation processes.
- Enhanced the PluginRunner to work with a dictionary for external available plugins, allowing for version mapping.
- Updated built-in plugins' manifest files to version 2, adding URLs and SDK versioning for better integration and documentation.
- Improved error handling and logging for plugin loading and dependency resolution processes.
2026-03-24 12:14:59 +08:00
DrSmoothl
0c508995dd feat: enhance session ID calculation and plugin management
- Updated `calculate_session_id` method in `SessionUtils` to include optional `account_id` and `scope` parameters for more granular session ID generation.
- Added new environment variables in `plugin_runtime` for external plugin dependencies and global configuration snapshots.
- Introduced methods in `RuntimeComponentManagerProtocol` for loading and reloading plugins globally, accommodating external dependencies.
- Enhanced `PluginRunnerSupervisor` to manage external available plugin IDs during plugin reloads.
- Implemented dependency extraction and management in `PluginRuntimeManager` to handle cross-supervisor dependencies.
- Added tests for session ID calculation and message registration in `ChatManager` to ensure correct behavior with new parameters.
2026-03-24 12:14:58 +08:00
DrSmoothl
d13767ee21 feat: Enhance plugin configuration management and SDK integration
- Add support for configuration reload scopes in the plugin runtime.
- Implement validation for SDK plugins to ensure required lifecycle methods are overridden.
- Update the configuration update handling to include scope information.
- Introduce tests for expression auto-check task and NapCat adapter SDK integration.
- Refactor configuration management to support callbacks with variable arguments.
- Improve plugin loading and error handling for configuration updates.
- Ensure that plugins can manage their own configuration updates effectively.
2026-03-24 12:14:58 +08:00
DrSmoothl
9dea6b0e6f feat: implement dedicated API registry and enhance API handling capabilities
- Added APIEntry and APIRegistry classes for managing plugin APIs.
- Updated PluginRunnerSupervisor to include API registry and methods for invoking APIs.
- Enhanced PluginRuntimeManager to support API registration and invocation.
- Created tests for API registration, invocation, and visibility between plugins.
- Refactored component handling to distinguish between runtime components and APIs.
2026-03-24 12:14:41 +08:00
DrSmoothl
89df7ccf6b feat: 添加 NapCat 适配器的入站消息编解码功能,增强插件配置更新逻辑和数据库交互测试 2026-03-24 12:14:28 +08:00
DrSmoothl
4e2e7a279e feat: Implement adapter runtime state management and update handling
- Added support for adapter runtime state updates in the PluginRunnerSupervisor.
- Introduced new payload classes: AdapterStateUpdatePayload and AdapterStateUpdateResultPayload for handling state updates.
- Implemented methods to bind and unbind routes based on adapter connection status.
- Enhanced the NapCat adapter to report connection state and manage runtime state.
- Added tests for adapter runtime state synchronization and database session behavior in the statistic module.
- Updated existing methods to ensure proper handling of adapter state and route bindings.
2026-03-24 12:14:28 +08:00
DrSmoothl
a5a6d2cb26 fix: 修复错误的插件重载机制,改为插件级区分
test: 补充新版本插件系统重载机制的测试
2026-03-16 13:27:10 +08:00
DrSmoothl
ef9b0d6d08 feat(plugin_loader): 添加临时 sys.path 入口管理器以支持插件加载 2026-03-15 22:04:33 +08:00
DrSmoothl
e1b3cf6e9f fix: 修复 Windows 平台下信号处理器注册问题,避免不必要的注册尝试 2026-03-15 16:27:50 +08:00
DrSmoothl
49b9401709 feat: 添加 Windows Named Pipe 传输实现,支持异步连接和数据传输,修复 Windows 平台插件系统导入隔离误把 DLLs 加进去的 bug 2026-03-15 15:44:14 +08:00
DrSmoothl
8da1b6d93f feat: 实现插件能力令牌的多版本支持,优化插件热重载逻辑 2026-03-13 16:54:01 +08:00
DrSmoothl
324432ff92 feat: 添加对 key_field/key_value 参数的兼容处理,自动转换为 filters 2026-03-13 16:37:46 +08:00
DrSmoothl
262efa2302 feat: 优化表情包插件和 TTS 插件的异步调用,简化错误处理逻辑 2026-03-13 16:31:59 +08:00
DrSmoothl
29f4d05a87 feat: 添加组件启停目标解析功能,支持全局唯一短名,避免跨 Supervisor 误操作 2026-03-13 16:15:20 +08:00
DrSmoothl
7e2b509bf0 feat: 实现 RPC 服务器的发送队列和背压控制机制 2026-03-13 16:05:51 +08:00
DrSmoothl
d92aa800a3 feat: 实现插件配置更新通知机制,支持热重载与文件变化监听 2026-03-13 15:47:49 +08:00
DrSmoothl
f1e10b4054 feat: 添加插件身份绑定机制,防止伪造插件身份的 RPC 调用 2026-03-13 15:40:14 +08:00
DrSmoothl
44a9e9ecd7 feat: 实现插件注册的分阶段接入与切换机制,优化 RPC 连接管理 2026-03-13 15:21:40 +08:00
DrSmoothl
a576313b22 Ruff Format 2026-03-13 11:45:26 +08:00
DrSmoothl
bcb7963d37 feat: 增强命令调用逻辑,支持通过 plugin.invoke_command 返回原始结构,并优化消息统计功能 2026-03-13 10:49:20 +08:00
DrSmoothl
f3270d4d41 feat: 添加插件运行时配置类,增强会话令牌管理和插件目录支持 2026-03-13 00:11:00 +08:00
DrSmoothl
b17948a495 feat: 添加 Runner 日志桥,支持将 Runner 进程日志通过 IPC 批量发送到主进程 2026-03-12 21:45:58 +08:00
DrSmoothl
d0b56abdab feat: 增强插件能力检查,支持 generation 校验并添加清理功能 2026-03-12 21:22:23 +08:00
DrSmoothl
1cd366bc09 refactor: 优化代码结构,简化条件判断和异常处理 2026-03-06 12:00:00 +08:00
DrSmoothl
2f21cd00bc feat: Enhance plugin runtime with new component registry and workflow executor
- Introduced `ComponentRegistry` for managing plugin components with support for registration, enabling/disabling, and querying by type and plugin.
- Added `EventDispatcher` to handle event distribution to registered event handlers, supporting both blocking and non-blocking execution.
- Implemented `WorkflowExecutor` to manage a linear workflow execution across multiple stages, including command routing and error handling.
- Created `ManifestValidator` for validating plugin manifests against required fields and version compatibility.
- Updated `RPCClient` to use `MsgPackCodec` for message encoding.
- Enhanced `PluginRunner` to support lifecycle hooks for plugins, including `on_load` and `on_unload`.
- Added sys.path isolation to restrict plugin access to only necessary directories.
2026-03-06 11:55:59 +08:00
DrSmoothl
61dc15a513 feat(plugin-runtime): add plugin isolation IPC infrastructure
- Protocol layer: Envelope model with Pydantic schema, MsgPack/JSON codecs, unified error codes
- Transport layer: cross-platform IPC abstraction with 4-byte length-prefixed framing (UDS + TCP fallback)
- Host: RPC server, policy engine, circuit breaker, capability service, supervisor with hot-reload
- Runner: RPC client, plugin loader, process entry point
- Tests: 16 passing tests covering protocol, transport, host, and E2E handshake
2026-03-06 02:01:30 +08:00