diff --git a/TASKLIST.md b/TASKLIST.md index 6ed7abb..6041997 100644 --- a/TASKLIST.md +++ b/TASKLIST.md @@ -133,6 +133,9 @@ --- ### YNX-0104 编写协议级测试样例 +**状态** +- [x] 已完成(2026-04-08) + **目标** - 在实现运行时前,先锁定协议行为 @@ -145,6 +148,13 @@ - 协议测试能独立运行 - 后续实现可直接拿这些样例做回归 +**已完成内容** +- 已新增 `Yonexus.Protocol/tests/codec.test.ts` +- 已覆盖 `encodeBuiltin`/`decodeBuiltin`、`parseRuleMessage`/`encodeRuleMessage`、服务器重写消息解析/编码 +- 已包含 malformed message、非法 rule identifier、保留字冲突等反例 +- 已提供完整的 hello flow、rule message flow 示例 +- 已配置 `package.json`、`tsconfig.json`、`vitest.config.ts` 测试基础设施 + --- ## Phase 2 — Server 插件脚手架 @@ -357,6 +367,9 @@ ## Phase 5 — Transport 最小闭环 ### YNX-0501 实现 Server WebSocket 启动与连接接入 +**状态** +- [x] 已完成(2026-04-08) + **目标** - Server 能监听并接受连接 @@ -369,9 +382,18 @@ - 可看到客户端连接进入 - 无协议时也不会崩 +**已完成内容** +- 已新增 `Yonexus.Server/plugin/core/transport.ts` +- 已实现 `YonexusServerTransport`,支持 start/stop、send/broadcast、连接管理 +- 已实现临时连接追踪、已认证连接管理、单 identifier 单连接策略 +- 已更新 `plugin/index.ts` 导出 transport 模块 + --- ### YNX-0502 实现 Client WebSocket 连接器 +**状态** +- [x] 已完成(2026-04-08) + **目标** - Client 能主动连到 Server @@ -384,6 +406,13 @@ - Client 能连上可用的 Server - Server 不可用时不会死循环刷日志 +**已完成内容** +- 已新增 `Yonexus.Client/plugin/core/transport.ts` +- 已实现 `YonexusClientTransport`,支持 connect/disconnect/send +- 已实现指数退避重连策略(max 10 次,1s~30s 退避) +- 已实现心跳 timer 基础设施 +- 已更新 `plugin/index.ts` 导出 transport 模块 + --- ### YNX-0503 实现 hello / hello_ack diff --git a/Yonexus.Client b/Yonexus.Client index 2148027..bc3e931 160000 --- a/Yonexus.Client +++ b/Yonexus.Client @@ -1 +1 @@ -Subproject commit 2148027a411a6545aa0b36b9d15494af7bb750a1 +Subproject commit bc3e931979866fb345132365f03dfa48d614894d diff --git a/Yonexus.Protocol b/Yonexus.Protocol index 4d8c787..fbe1457 160000 --- a/Yonexus.Protocol +++ b/Yonexus.Protocol @@ -1 +1 @@ -Subproject commit 4d8c787dbc7900eaaa0d11349e2c88f607c6fe9b +Subproject commit fbe1457ab63202503b669c4ad4022593750394da diff --git a/Yonexus.Server b/Yonexus.Server index c5287fa..b44a4ca 160000 --- a/Yonexus.Server +++ b/Yonexus.Server @@ -1 +1 @@ -Subproject commit c5287fa474644cec72d1e863e36a34b50977d929 +Subproject commit b44a4cae66255edf96f1e5c90ae67422b5262ec0