chore: update pairing task progress

This commit is contained in:
nav
2026-04-08 21:34:53 +00:00
parent 34a591dd0c
commit 3891eab488
3 changed files with 22 additions and 2 deletions

View File

@@ -480,6 +480,9 @@
## Phase 6 — Pairing 主流程
### YNX-0601 实现 Client 首次密钥生成
**状态**
- [x] 已完成2026-04-08
**目标**
- Client 首次运行自动生成本地公私钥
@@ -493,9 +496,17 @@
- 首次启动可生成并持久化 keypair
- 重启不会重复生成
**已完成内容**
- 已新增 `Yonexus.Client/plugin/crypto/keypair.ts`,使用 Ed25519 生成并导出 PEM keypair
- 已在 `Yonexus.Client/plugin/core/state.ts` 增加 `ensureClientKeyPair()`,首次启动自动生成并持久化 keypair
- Client runtime 启动时自动确保 keypair 存在
---
### YNX-0602 实现 Server pairing request 创建
**状态**
- [x] 已完成2026-04-08
**目标**
- Server 可为待配对客户端创建 pairing 会话
@@ -509,6 +520,10 @@
- 每次 pairing 会话有可验证的过期时间
- pairing code 不会通过 Yonexus WS 下发
**已完成内容**
- 已新增 `Yonexus.Server/plugin/services/pairing.ts`,封装 pairing code/TTL/状态写入
- Server runtime 在 `pair_required` 时创建 pending pairing 记录并持久化
---
### YNX-0603 实现 Discord DM 配对通知
@@ -525,6 +540,11 @@
- 通知成功时 Client 才能进入可确认状态
- 通知失败时不会继续配对成功路径
**进展说明**
- 已新增 `Yonexus.Server/plugin/notifications/discord.ts` 作为通知服务骨架
- 当前为日志输出 stub仍需接入真实 Discord DM 发送逻辑
- runtime 已在 pairing 创建后调用通知服务并记录 sent/failed 元数据
---
### YNX-0604 实现 pair_request / pair_confirm / pair_success