Record transport scaffolding and protocol tests
This commit is contained in:
29
TASKLIST.md
29
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
|
||||
|
||||
Reference in New Issue
Block a user