Files
bilin/docs/superpowers/plans/2026-07-08-bilin-w5-platform.md
T

79 lines
2.4 KiB
Markdown
Raw 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.
# 笔临 Wave 5 平台基建 Implementation Plan
> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
**Goal:** 交付 v2.0.0:撤销堆栈持久化、云同步、崩溃日志、自动更新、扩展 API 骨架、Skill/MCP 占位。
**Architecture:** Schema v11 `undo_stack``SyncService` 加密 `.novel-all``electron-log` + `electron-updater``ExtensionRegistry` stub。
**Tech Stack:** Electron 36、electron-log、electron-updater、Vitest、Playwright
**Spec:** `docs/superpowers/specs/2026-07-08-bilin-master-completion-design.md` §9
**Master Program:** Wave 5/5 → v2.0.0
---
## File Map
| 文件 | 职责 |
|------|------|
| `src/main/db/schema-v11.sql` | undo_stack |
| `src/main/services/undo-stack.service.ts` | 持久化撤销 |
| `src/main/services/sync.service.ts` | 本地/WebDAV 同步 |
| `src/main/services/log.service.ts` | electron-log |
| `src/main/services/update.service.ts` | electron-updater |
| `src/main/services/extension-registry.ts` | 扩展注册表 stub |
| `src/shared/extension-api.ts` | BilinExtension 类型 |
| `src/renderer/components/settings/SyncSettingsTab.tsx` | 备份与同步 |
| `e2e/timeline.spec.ts` | E2E-TL-01~03 |
---
## Task 1: Schema v11 + 撤销堆栈
- [x] **Step 1:** schema-v11 + migrate v11
- [x] **Step 2:** UndoStackRepository + Service + IPC
- [x] **Step 3:** TipTap 防抖持久化 + 跨会话 Ctrl+Z
- [x] **Step 4:** E2E-UNDO-01
---
## Task 2: 云同步
- [x] **Step 1:** sync-crypto AES-256-GCM
- [x] **Step 2:** SyncService local-folder + WebDAV
- [x] **Step 3:** SyncSettingsTab + 冲突模态
- [x] **Step 4:** IT-SYNC-01 + E2E-SYNC-01
---
## Task 3: 日志与崩溃报告
- [x] **Step 1:** LogService + 启动检测
- [x] **Step 2:** 发送报告 stub + UT-LOG-01
---
## Task 4: 自动更新
- [x] **Step 1:** UpdateService + IPC 事件
- [x] **Step 2:** 顶栏更新提示(BILIN_E2E 禁用 / BILIN_MOCK_UPDATE mock
- [x] **Step 3:** IT-UPDATE-01 + E2E-UPDATE-02
---
## Task 5: 扩展 API + Skill/MCP
- [x] **Step 1:** extension-api.ts + registry stub
- [x] **Step 2:** docs/extensions/README.md
- [x] **Step 3:** ExtensionsSettingsTab + AI Skill/MCP 占位
---
## Task 6: i18n + v2.0.0
- [x] **Step 1:** app.getLocale 首次语言
- [x] **Step 2:** 全量 test + E2E
- [x] **Step 3:** 版本 **v2.0.0**