Files
mnote/bugs/07-ai/done/7-63-page-ai-pi-rust-official-p1-alignment-checklist-v1.md

31 lines
2.4 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 7-63 Page AI Pi Rust Official P1 Alignment Checklist
## 背景
Pi Rust built-in tools 已恢复为一等工具面,但 MNote Pi Lab 仍有一组官方能力只接了外壳、被 MNote 自造路径替代,或没有 UI/API 入口。该缺陷以 Pi Rust 官方 RPC/CLI 语义为准,不再把 MNote 当成 Pi 能力替代层;MNote 只负责展示、授权目录、URL/引用与宿主上下文。
## Checklist
- [x] 官方 RPC 管理面:接入受控 `rpc-command` endpoint,覆盖 `get_messages``get_available_models``new_session``switch_session``set_session_name``export_html``abort_bash`
- [x] 中途发送:`steer` / `follow_up` 使用官方 RPC command,普通 prompt 保留为默认 `prompt`
- [x] Abort 语义:普通 abort 只发送官方 `abort`,不直接 kill runtime;新建会话/切换模式等需要结束旧进程的路径另走明确 stop/kill。
- [x] Bash 中止:full access 下长 bash 暴露 `abort_bash` UI/API。
- [x] Prompt templates:移除默认 `--no-prompt-templates`,无配置时允许官方 `.pi/prompts` / `~/.pi/agent/prompts` 发现。
- [x] `@file` / context files:移除默认 `--no-context-files`,让 Pi Rust 官方 `@file` 与资源扩展处理真实文件地址;MNote hidden context 仅作为页面/selection/allowed roots 附加上下文。
- [x] 图片/附件:前端接入文件选择并按 Pi RPC `images` base64 payload 传给 `prompt`/`steer`/`follow_up`
- [x] 测试:补静态 smoke 覆盖启动参数、RPC command allowlist、图片 payload、abort 不 kill;补浏览器 smoke 覆盖附件入口、RPC command wrapper 和官方 built-in tools 不回退。
- [x] 验证:`cargo test -p mnote-web page_ai_pi`、相关 `scripts/task-pi-lab-*.js`、真实 Chromium smoke。
- [x] 完成后移动到 `bugs/07-ai/done/` 并记录提交与验证证据。
## 验证证据
- `cargo test -p mnote-web page_ai_pi -- --nocapture`30 passed。
- `node scripts/task-pi-lab-static-smoke.js`253 checks passed。
- `MNOTE_UI_BASE_URL=http://127.0.0.1:3000 PLAYWRIGHT_CHROMIUM_EXECUTABLE=/usr/bin/chromium-browser node scripts/task-pi-lab-full-access-builtin-delete-smoke.js`:通过,结果 `/tmp/mnote-pi-full-access-builtin-tools-1783775113182/result.json`
## 非目标
- 不在本轮开放任意外部 Pi extension/package install。
- 不改变 MNote allowed roots / permission mode 的宿主授权边界。
- 不把 OpenHub/LightRAG/MCP 的产品策略混入官方 Pi Rust RPC 对齐。