Commit Graph
26 Commits
Author SHA1 Message Date
joywayerandClaude Opus 4.8 883335f656 fix(framework): kick_server 终止不重连(对齐真实客户端)
收到 kick_server 时 emit kicked 并 stop(),不再 onClose→重连→重踢空转。
kick 处理移出登录门控,登录态内外一致。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-28 20:37:16 +08:00
joywayerandClaude Opus 4.8 ad661707ec fix(framework): player_login.version 改为数字 versionCode(联调登录成功)
真机联调发现:协议 version 字段=数字 versionCode(源码 8 处 data.version=GameData.versionCode),
框架原发字符串 '1.1' 被服务器版本校验拒绝(kick_server 检查到新版本)。改为数字后登录成功
(state:0 playerid:430511)。
- ChannelIdentity/LoginRequestData.version: string→number,去掉冗余 versionCode 与未发送的 '1.1' 串
- query-string version 解析为数字;测试 fixture 同步

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-28 20:33:53 +08:00
joywayerandClaude Opus 4.8 96c6c7c914 fix(framework): decodeFrame 改单层(服务器协议非双层)
真机联调发现:服务器实发单层 {app,route,rpc,data};旧客户端的'外层 data'是浏览器
MessageEvent(00_minhttp.js:266 ws.onmessage=config.onmessage),非协议层。框架传输层
已取 ev.data,decodeFrame 不应再剥一层。修正后 kick_server 等业务包能正确解析。
- decodeFrame 单层化 + 测试改单层帧
- 更正 docs/protocol/01 §3.2(双层→单层,附 MessageEvent 依据)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-28 20:25:36 +08:00
joywayerandClaude Opus 4.8 5132fddc4e feat(framework): config 调试 serverOverride(全链路+游戏服连本地)
- DebugProfile 加 serverOverride:debug 抓远程配置走全链路后把连接地址覆盖为此
- staging profile 加 serverOverride=ws://127.0.0.1:3088(联调本地测试服)
- release 一律忽略 serverOverride,用远程解析结果
- 同步指南

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-28 20:08:59 +08:00
joywayerandClaude Opus 4.8 d461578d6e feat(framework): config 调试登录账号进 profile(DebugAccount)
- DebugProfile 加 account?: DebugAccount(openid 等登录字段,仅 debug 模式生效)
- resolveBootstrap 结果加 account:debug 取 profile.account,release 恒 undefined
- staging profile 留占位 account 待填真值;接入处 setIdentity 合并 identity+account
- 同步指南

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-28 19:57:41 +08:00
joywayerandClaude Opus 4.8 51a4ee57ac refactor(framework): 移除 resolveBootstrap 下游兜底,立第二准则
- CLAUDE.md 新增「第二准则:数据源权威、唯一,下游不兜底」
- bootstrap 删除 fallbackServers 选项与 ?? DEFAULT_GAMESERVER 猜默认
- 无 server/gameserver、远程失败、解析不出地址 → 一律抛 ConfigFetchError 显式暴露
- 同步 guide + 两篇 spec(删 fallback/降级措辞)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-28 18:59:15 +08:00
joywayerandClaude Opus 4.8 5ab4a0a4b6 feat(framework): net NetClient 可选 debug 收发包日志
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-28 18:16:36 +08:00
joywayerandClaude Opus 4.8 2c2e487d8f feat(framework): config resolveBootstrap 接入 mode + release 锁死 URL 覆盖
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-28 18:13:15 +08:00
joywayerandClaude Opus 4.8 8cbc488e0c feat(framework): config 运行模式解析 resolveRuntimeMode(自动+手动覆盖)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-28 18:10:42 +08:00
joywayerandClaude Opus 4.8 c87d204f28 feat(framework): config 启动编排 resolveBootstrap(身份合并+服务器决策+降级)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-28 16:44:43 +08:00
joywayerandClaude Opus 4.8 6333ddc8e4 feat(framework): config 远程配置分层取参 getParam + 服务器解析 resolveServers
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-28 16:41:28 +08:00
joywayerandClaude Opus 4.8 231e9ee31c feat(framework): config 调试 profiles + ?profile= 切换
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-28 16:38:44 +08:00
joywayerandClaude Opus 4.8 119a457c59 feat(framework): config 原生同步身份来源(window.settings/app_* 逐字对齐)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-28 16:36:13 +08:00
joywayerandClaude Opus 4.8 510c074627 feat(framework): config H5 URL query 身份来源
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-28 16:33:58 +08:00
joywayerandClaude Opus 4.8 2f97150a6f feat(framework): config 身份类型 + 纯合并 resolveIdentity + 构建期默认
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-28 16:30:49 +08:00
joywayerandClaude Opus 4.8 dbc5d19e61 test(framework): login 全流程集成测试(over FakeTransport)
集成测试在断言处调用 parseLoginResponse(any login 数据),规避 TS6 对闭包内赋值变量经 assert.ok 收窄为 never 的 CFA 行为;断言与覆盖范围不变。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-28 14:27:56 +08:00
joywayerandClaude Opus 4.8 0ada512464 feat(framework): protocol routes 常量 + login 请求构造/响应解析
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-28 14:25:29 +08:00
joywayerandClaude Opus 4.8 540cf286a5 feat(framework): net-client 编排(login流程/门控/TcpID/超时重连/服务器切换/事件)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-28 14:24:57 +08:00
joywayerandClaude Opus 4.8 79d0071645 feat(framework): net 候选服务器轮询策略
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-28 14:23:41 +08:00
joywayerandClaude Opus 4.8 08d41cdec1 feat(framework): net 收包超时看门狗(注入 Clock 可测)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-28 14:23:13 +08:00
joywayerandClaude Opus 4.8 90843374f9 feat(framework): net Transport 接口 + 测试用 FakeTransport
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-28 14:22:47 +08:00
joywayerandClaude Opus 4.8 7dcdeb6615 feat(framework): net 信封编解码 + 握手/心跳/错误包识别
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-28 14:22:18 +08:00
joywayerandClaude Opus 4.8 c1be4dcb1e feat(framework): core 座位↔视图转换
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-28 14:21:46 +08:00
joywayerandClaude Opus 4.8 bfd9339f64 feat(framework): core EventBus(类型化+故障隔离)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-28 14:21:26 +08:00
joywayerandClaude Opus 4.8 56dbfeb5e2 feat(framework): core 最小集协议类型(envelope/login)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-28 14:20:54 +08:00
joywayerandClaude Opus 4.8 f693f45895 chore(framework): TS 测试基建(tsx+node:test) + core 常量
- 补 @types/node(tsconfig types:[node] 所需,原计划遗漏)
- tsconfig 加 allowImportingTsExtensions(import 带 .ts 后缀所需)
- test:framework 改用 run-framework-tests.mjs 递归枚举(node 20.13 <20.14 不支持 --test glob)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-28 14:20:25 +08:00