Commit Graph

21 Commits

Author SHA1 Message Date
DrSmoothl
2e080e437a pylance fix x2 2026-03-14 02:08:50 +08:00
DrSmoothl
2f3519411a feat: 添加 Host 应用版本号支持,优化插件加载和热重载逻辑,检测重复插件 ID 2026-03-13 17:35:35 +08:00
DrSmoothl
8da1b6d93f feat: 实现插件能力令牌的多版本支持,优化插件热重载逻辑 2026-03-13 16:54:01 +08:00
DrSmoothl
262efa2302 feat: 优化表情包插件和 TTS 插件的异步调用,简化错误处理逻辑 2026-03-13 16:31:59 +08:00
DrSmoothl
f1e10b4054 feat: 添加插件身份绑定机制,防止伪造插件身份的 RPC 调用 2026-03-13 15:40:14 +08:00
DrSmoothl
a576313b22 Ruff Format 2026-03-13 11:45:26 +08:00
DrSmoothl
8ac0aff479 插件系统代码风格修复 2026-03-13 11:07:19 +08:00
DrSmoothl
1c759ad426 feat: 增强 Runner 日志处理,添加日志消息序列化和控制台日志输出管理 2026-03-13 01:13:29 +08:00
DrSmoothl
8f7f31a164 feat: 优化插件调用逻辑,重构命令匹配和事件处理,增强插件管理能力 2026-03-13 00:47:09 +08:00
DrSmoothl
98d7bed064 feat: 增强插件加载过程,记录 on_load 失败的插件并跳过注册 2026-03-13 00:23:27 +08:00
DrSmoothl
f3270d4d41 feat: 添加插件运行时配置类,增强会话令牌管理和插件目录支持 2026-03-13 00:11:00 +08:00
DrSmoothl
6bac2b9331 feat: 增强插件管理和日志处理,兼容旧版参数,优化 UDS 路径处理 2026-03-12 23:34:07 +08:00
DrSmoothl
688b53ee24 feat: 增强插件管理和连接稳定性,添加会话令牌重置和组件清理功能 2026-03-12 22:51:14 +08:00
DrSmoothl
b17948a495 feat: 添加 Runner 日志桥,支持将 Runner 进程日志通过 IPC 批量发送到主进程 2026-03-12 21:45:58 +08:00
DrSmoothl
69219e36f7 Refactor protocol and transport modules to use type hints for improved clarity and consistency
- Updated Codec class to use abstract methods for encoding and decoding envelopes.
- Changed Envelope class to use Dict and Optional for payload and error fields.
- Refined error handling in RPCError class with Optional type hints for details.
- Enhanced manifest validation logic with type hints for better type safety.
- Improved plugin loading mechanism with consistent type annotations.
- Updated RPCClient to utilize Optional for codec and connection attributes.
- Refactored transport classes to use Optional for server attributes and socket paths.
2026-03-11 00:07:13 +08:00
DrSmoothl
baae2df154 feat: 集成新版本插件运行时,支持事件桥接与命令处理 2026-03-06 16:37:56 +08:00
DrSmoothl
d5cf4c9b8b refactor: 添加类型注解以增强代码可读性和类型安全 2026-03-06 12:35:31 +08:00
DrSmoothl
c6afa97060 补全新版插件系统的类型注解 2026-03-06 12:17:00 +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