diff --git a/README.md b/README.md index 6b3b376..7c6cc1d 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,8 @@ sgClaw 项目仓库。 ## 当前工程形态 -- `src/`:Rust 侧最小可联调实现,包含 pipe 协议、握手、`BrowserPipeTool`、MAC Policy。 -- `tests/`:协议、握手、工具与 JSON Line 联调测试。 +- `src/`:Rust 侧最小 Agent 实现,包含 pipe 协议、握手、`BrowserPipeTool`、规则规划器、DeepSeek provider、最小 Agent runtime。 +- `tests/`:协议、握手、工具、规划器、runtime 与 JSON Line 联调测试。 - `resources/rules.json`:本地安全策略白名单。 - `docs/`:项目架构、联调协议与团队启动文档。 - `frontend/sgClaw验证/`:本地验证页面与辅助脚本。 @@ -14,6 +14,8 @@ sgClaw 项目仓库。 ```bash cargo test +cargo test --test planner_test -q +cargo test --test agent_runtime_test -q cargo run bash frontend/sgClaw验证/serve.sh ``` diff --git a/docs/superpowers/acceptance/2026-03-25-superrpa-sgclaw-rust-only.md b/docs/superpowers/acceptance/2026-03-25-superrpa-sgclaw-rust-only.md new file mode 100644 index 0000000..0f3c426 --- /dev/null +++ b/docs/superpowers/acceptance/2026-03-25-superrpa-sgclaw-rust-only.md @@ -0,0 +1,73 @@ +# Rust-Only Acceptance Checklist + +## Scope + +This checklist covers the Rust-side work that can be verified before the SuperRPA browser repository is available locally. + +Covered: + +- pipe handshake and protocol baseline +- task-level message types +- HMAC canonical string alignment +- Phase 1 rule-based Baidu search planner +- DeepSeek provider scaffolding +- provider-backed minimal Agent runtime with fallback to planner mode + +Not covered yet: + +- `SgClawProcessHost` +- `PipeListener` +- `CommandRouter` reuse in SuperRPA +- FunctionsUI bridge integration + +## Required Commands + +Run from the feature worktree: + +```bash +cd /home/zyl/projects/sgClaw/.worktrees/superrpa-browser-control +cargo test -q +``` + +Optional focused checks: + +```bash +cargo test --test task_protocol_test -q +cargo test --test planner_test -q +cargo test --test runtime_task_flow_test -q +cargo test --test deepseek_provider_test -q +cargo test --test agent_runtime_test -q +``` + +## Pass Criteria + +- `init -> init_ack` tests pass +- `submit_task`, `task_complete`, and `log_entry` serialize correctly +- HMAC output is based on newline-delimited canonical string with stable JSON ordering +- Planner turns `打开百度搜索天气` into `navigate -> type -> click` +- Runtime mock flow emits browser commands and finishes with `task_complete` +- DeepSeek settings load from environment with default model `deepseek-chat` +- DeepSeek request body matches OpenAI-compatible chat completion shape + +## Runtime Configuration + +The provider-backed path is enabled only when `DEEPSEEK_API_KEY` is present. + +Environment variables: + +- `DEEPSEEK_API_KEY` +- `DEEPSEEK_BASE_URL` optional, defaults to `https://api.deepseek.com` +- `DEEPSEEK_MODEL` optional, defaults to `deepseek-chat` + +Without `DEEPSEEK_API_KEY`, sgClaw falls back to the Phase 1 rule-based planner. + +## Current Branch Milestones + +- `b9773d4` — task pipe protocol and HMAC alignment +- `1ab0012` — Phase 1 task planner flow +- `0d0097b` — DeepSeek provider scaffolding +- `9979b1f` — provider-backed Agent runtime + +## Next Dependency + +To continue beyond Rust-only acceptance, the local SuperRPA / Chromium repository path is required so Tasks 3, 4, and 5 can be implemented and verified.