Commit Graph

8 Commits

Author SHA1 Message Date
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