Files
Agentsd/docs/03-实施路线.md
未知时光 e75cfc6812 Fix documentation inconsistencies found by code audit
- docs/01: sync all syscall signatures with proto (missing params,
  invented callback params, stream semantics, return types)
- docs/02: mark unimplemented features (FFI system plugins, topo sort,
  lifecycle CLI, watchdog); clarify plugin.yaml is not parsed by the
  kernel - registration goes through gRPC PluginBridge.Register;
  correct permission model and session_id descriptions
- docs/03: check off implemented stage 3 items (Hermes adapter,
  Claude Code plugin)
- docs/04: data/ actual location, add Cargo.toml to plugin trees,
  note __init__.py is hand-maintained
- README: status line now reflects actual progress

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-10 14:59:54 +08:00

55 lines
2.5 KiB
Markdown

# 03 - 实施路线
## 阶段 1:内核骨架(= 跑起来的 PID 1) ✅ 已完成
- [x] Rust workspace:`agentsd` 主二进制
- [x] gRPC server(tonic over TCP,后续切 UDS)
- [x] 实现 FS syscall(read/write/delete/rename/stat/list)
- [x] 实现 Memory syscall(SQLite KV + FTS5 trigram search,默认写入 data/memory.db)
- [x] 实现 Input syscall(stdin)
- [x] 实现 Display syscall(stdout)
- [x] 实现 Process syscall(spawn/kill/wait/stdin/stdout + watch channel 无竞态 wait)
- [x] 实现 Timer syscall(once/cancel/now + 回调事件通道)
- [x] 实现 Audio syscall(stub,待系统插件)
- [x] 实现 HID syscall(stub,待系统插件)
- [x] 实现 Network syscall(HTTP via reqwest)
- [x] Plugin Bridge(注册/调用路由/心跳,注册状态写入 data/plugins.json)
- [x] 插件加载:gRPC 握手 + 注册
- [x] echo 测试插件(Rust)验证基础链路
- [x] ai_test 手动验证插件(Rust,默认 disabled/autoload false)覆盖 Display/Memory/FS/Process/Timer/权限拒绝
- [x] proto 定义:完整 9 个 service + PluginBridge
- [x] 权限安全:无 x-plugin-id 的请求一律拒绝(UNAUTHENTICATED)
- [x] 死插件路由保护:Bridge.call 校验 PluginStatus::Running
**验证结果**:agentsd 启动 → Rust 插件通过 gRPC 注册 → ai_test 调用 Display/Memory/FS/Process/Timer syscall 并验证权限拒绝。
## 阶段 2:完善核心 syscall 🔶 部分完成
- [x] Network:reqwest 原生 HTTP client(阶段 1 已完成)
- [x] Network TCP 流:open_conn/send/close/listen 双向 TCP 通信
- [x] FS.Watch:接入 notify-rs v7 文件监听(递归)
- [x] Timer.Cron:接入 cron 表达式定时(7 段格式)
- [ ] Audio:接入系统音频后端(wasapi/alsa)
- [ ] HID:接入屏幕截取(Windows: win32 API)
- [ ] Unix socket / Named pipe 传输(替代 TCP)
## 阶段 3:接入 Agent 🔶 部分完成
- [ ] Agent 插件:Input → LLM(Network) → Display
- [x] Hermes adapter:`hermes_plugin.py` 桥接 Hermes 工具注册表;Rust 版 hermes 插件提供 echo 验证路由,bridge.call 路由已验证
- [x] Claude Code 插件(Rust,standard 类型,depends: hermes,导出 chat/code/review/ask/run)
- [ ] 本地模型插件(llama.cpp via Process syscall)
## 阶段 4:插件管理(= systemctl)
- [ ] agentsd start / stop / restart / status / list / logs
- [ ] 看门狗(崩溃自动重启)
- [ ] 依赖解析 + 拓扑排序
- [ ] install / uninstall / enable / disable
## 阶段 5:生态
- [ ] Web UI 插件(shell)
- [ ] 语音交互(Audio + TTS/STT 插件)
- [ ] 桌面自动化(HID + computer-use 插件)