Persist PageTree expand state via control-plane view-state and align chevron/DOM with restored expansion; keep Sidex-style shallow page-tree scan and drop the unused recursive scanner that only added cargo noise. Add password vault workbench routes/runtime/skill/CLI, split page_ai_pi into a module package, and retire Hermes/ACP/OpenHub recycle + root harness evidence from the index while gitignoring recycle and local diag dumps. Archive superseded design/bugs docs under old/, point architecture at ARCHITECTURE.md, and refresh smokes for Pi S1–S7, vault, and editor regressions so the working tree can stay clean.
41 lines
1.7 KiB
Markdown
41 lines
1.7 KiB
Markdown
# [recycle] 3-20 [done][bug] ACP incoming request 只记录日志不响应 v1
|
|
|
|
> 发现时间:2026-05-17
|
|
>
|
|
> 状态:`[done]`
|
|
>
|
|
> 关联主线:`03-rust-web`
|
|
|
|
## 1. 问题定义
|
|
|
|
ACP client 收到 `session/request_permission` 等 incoming request 时当前只记录日志,没有返回协议响应。
|
|
|
|
## 2. 证据
|
|
|
|
- [acp_client.rs](/mnt/Data1T/mnote/rust/crates/mnote-web/src/acp_client.rs:347) 附近处理 incoming request。
|
|
|
|
## 3. 影响
|
|
|
|
- ACP agent 侧可能等待到超时。
|
|
- 权限请求无法进入用户确认或自动拒绝流程。
|
|
- run 状态可能卡在进行中,SSE 输出也无法表达真实阻塞原因。
|
|
|
|
## 4. 建议修复
|
|
|
|
- 为已知 request type 实现明确响应:允许、拒绝或要求人工确认。
|
|
- 未支持的 request type 也应返回结构化 error,而不是只日志。
|
|
- 增加 ACP request/response 协议测试。
|
|
|
|
## 5. 修复
|
|
|
|
- [acp_client.rs](/mnt/Data1T/mnote/rust/crates/mnote-web/src/acp_client.rs:157) 将 ACP 子进程 stdin writer 作为共享 `Arc<Mutex<BufWriter<_>>>` 传入后台 reader loop。
|
|
- [acp_client.rs](/mnt/Data1T/mnote/rust/crates/mnote-web/src/acp_client.rs:335) 对带 `id + method` 的 incoming request 写回 JSON-RPC error 响应,当前无权限确认 UI 时明确拒绝,避免 agent 等待超时。
|
|
- [acp_client.rs](/mnt/Data1T/mnote/rust/crates/mnote-web/src/acp_client.rs:551) 增加 mock ACP server 测试,覆盖 `session/request_permission` 主动请求必须收到响应。
|
|
|
|
## 6. 验证
|
|
|
|
- `cargo test --manifest-path rust/Cargo.toml -p mnote-web test_incoming_permission_request_gets_response -- --nocapture`
|
|
- 结果:1 passed
|
|
- `cargo test --manifest-path rust/Cargo.toml -p mnote-web acp_client -- --nocapture`
|
|
- 结果:6 passed
|