Commit Graph

11 Commits

Author SHA1 Message Date
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
bcb7963d37 feat: 增强命令调用逻辑,支持通过 plugin.invoke_command 返回原始结构,并优化消息统计功能 2026-03-13 10:49:20 +08:00
DrSmoothl
e445c483b0 feat: 优化非阻塞 hook 超时处理,添加全局安全阀支持;为插件 Supervisor 添加自定义 IPC socket 后缀以避免冲突 2026-03-13 00:20:03 +08:00
DrSmoothl
f3270d4d41 feat: 添加插件运行时配置类,增强会话令牌管理和插件目录支持 2026-03-13 00:11:00 +08:00
DrSmoothl
c620040191 feat: 增强组件注册和事件分发,添加会话令牌恢复功能,优化工作流执行超时处理 2026-03-12 23:53:15 +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
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