docs: document background indexing and merged phase two behavior

This commit is contained in:
2026-09-06 03:06:40 +08:00
parent b265a5528a
commit 64af068df4
11 changed files with 224 additions and 3 deletions
+10 -1
View File
@@ -42,7 +42,7 @@ Web 联调阶段只暴露后端通过 `APP_VAULT_PATH` 配置的单一 Vault
| 方法 | 路径 | 用途 |
| --- | --- | --- |
| GET | `/api/workspace` | 获取当前 Vault、文件数和索引同步状态 |
| POST | `/api/workspace/open` | 打开配置的 Vault磁盘路径集变化时重建索引 |
| POST | `/api/workspace/open` | 打开配置的 Vault;路径集变化时先登记文件与 FTS,再调度后台向量更新 |
| GET | `/api/workspace/tree` | 获取真实 Markdown 文件和目录树 |
| POST | `/api/workspace/folders` | 新建目录 |
| POST | `/api/workspace/folders/rename` | 重命名目录并同步 Note 路径 |
@@ -198,3 +198,12 @@ RunCancelled
- `GET /api/index/status` 额外返回 `total_notes: int``total_blocks: int`,来自当前 SQLite 索引;未建立内容索引时为 0。
- `GET /api/permissions/policy` 返回 `Record<string, "allow" | "confirm" | "deny">`,值取自后端当前生效的 PermissionPolicy。此接口只读,不提供全局修改能力,运行时权限确认仍使用既有 Agent permission endpoint。
## 2026-09-06:后台索引补充
- `POST /api/workspace/open` 返回可使用的 WorkspaceSnapshot,不等待向量推理。
- `PATCH /api/notes/{note_id}` 成功代表正文、元数据和 FTS 已保存;后台向量失败不撤销这次保存。
- `GET /api/index/status` 新增 `vector_refresh_required: boolean`,表示工作区或笔记存在向量待处理标记。该字段不是进度百分比;任务失败时也可为 true。
- `POST /api/index/rebuild` 仍仅支持全量重建,并等待结果;不要将上述异步语义推广到所有索引 API。
状态、恢复限制与验证见 [工作区后台索引与保存开发说明](../development/工作区后台索引与保存开发说明.md)。