Migrate test plugins to Rust and async-ify syscall modules
- Replace Python test plugins (echo, ai_test, claudecode) with Rust implementations driven by the plugin SDK - Convert fs/network/process/timer syscall modules to async/await - Change Network.OpenConn to return stream ConnEvent (conn_id handed to client in first "open" frame for Send/Close routing) - Bind timer callbacks to plugin identity; stream_call subscriptions are identity-checked - Update docs and regenerate Python SDK protobuf stubs Verified: cargo build/test/clippy clean; echo + ai_test full syscall suites pass; hermes & claudecode register and heartbeat; cross-plugin bridge.call routing and auth denial verified end-to-end. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -51,22 +51,21 @@ Agentsd/
|
||||
│ ├── agentsd_pb2.py
|
||||
│ └── agentsd_pb2_grpc.py
|
||||
│
|
||||
├── echo/ # 测试插件
|
||||
├── echo/ # 测试插件(Rust)
|
||||
│ ├── plugin.yaml
|
||||
│ └── echo_plugin.py
|
||||
│ └── src/main.rs
|
||||
│
|
||||
├── ai_test/ # AI 手动验证插件(enabled=false,autoload=false)
|
||||
├── ai_test/ # AI 手动验证插件(Rust,enabled=false,autoload=false)
|
||||
│ ├── plugin.yaml
|
||||
│ └── ai_test_plugin.py
|
||||
│ └── src/main.rs
|
||||
│
|
||||
├── hermes/ # Hermes Agent 桥接(63 tool)
|
||||
├── hermes/ # Hermes Agent 桥接(Python,Rust 版仅 stub)
|
||||
│ ├── plugin.yaml
|
||||
│ └── hermes_plugin.py
|
||||
│
|
||||
└── claudecode/ # Claude Code CLI 桥接
|
||||
└── claudecode/ # Claude Code CLI 桥接(Rust)
|
||||
├── plugin.yaml
|
||||
├── claudecode_plugin.py
|
||||
└── test_chat.py
|
||||
└── src/main.rs
|
||||
```
|
||||
|
||||
## 布局原则
|
||||
@@ -94,7 +93,7 @@ cargo build --release # 约 6.1MB 单二进制
|
||||
|
||||
# 启动插件(各开一个终端)
|
||||
python plugins/hermes/hermes_plugin.py
|
||||
python plugins/claudecode/claudecode_plugin.py
|
||||
cargo run -p agentsd-plugin-claudecode
|
||||
```
|
||||
|
||||
## 手动验证插件
|
||||
@@ -103,7 +102,7 @@ python plugins/claudecode/claudecode_plugin.py
|
||||
|
||||
```bash
|
||||
RUST_LOG=agentsd=info ./target/release/agentsd.exe
|
||||
python plugins/ai_test/ai_test_plugin.py
|
||||
cargo run -p agentsd-plugin-ai-test
|
||||
```
|
||||
|
||||
## 重新生成 SDK
|
||||
|
||||
Reference in New Issue
Block a user