Commit Graph
3 Commits
Author SHA1 Message Date
lanterngamescnandClaude Opus 4.8 01e4c0e99e M3 补全:移除 EchoSample 样板 + getcompareCode 接版本决策 + app_gamename
- 移除 EchoSampleProvider(组装根/导出/文件):M3 全部 Provider 已就位,
  getTime 由 DeviceProvider 提供;样板回显仅 M1 测试页用,生产无依赖
- getcompareCode:启动期 StartupOrchestrator 把网络 App 版本(VersionDecision.appVersion)
  存 KvStore(KV_KEY_NET_APP_VERSION),DeviceProvider 同步读出与本地 config.appversion 比较,
  本地>网络→'1' 否则'0'(对齐 Android apputil.code 语义)
- app_gamename:VersionXml.parse 解析子 <game name>;ResourceManager.localGameName 暴露;
  AppDataInjector.buildValues 接 gameName 参数;大厅/子游戏两处注入均填入

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-26 07:33:13 +08:00
lanterngamescn d2da223c8d M2(领域层): ConfigManager/VersionResolver/ResourceManager/AppDataInjector/StartupOrchestrator
T-M2-05 ConfigManager:本地 rawfile/app_config.json(§4.2 实测值)、远程 URL 拼装('-'→'/'+.txt+?a=ts 禁缓存)、
        长度<30 走 showmessage 阻断、二级 url 二次请求(语义待真机校验)、产出版本决策
T-M2-06 VersionResolver:纯函数,agentlist/gamelist 两棵树 + agent→channel→market→game 后层覆盖 +
        两树取更高 version(§4.4)。单测 8 用例全通过,覆盖率 81.8%(≥80%)
T-M2-07 ResourceManager:沙箱路径规范、内置包拷贝解压、version.xml 解析(@ohos.xml)、远程 zip 下载/删旧/解压、版本比较
T-M2-09 AppDataInjector:加载前写 <gameDir>/app_data.js(§6 全局变量同名同义,JSON.stringify 安全字面量)
T-M2-11 StartupOrchestrator:INIT→…→ENTER_HALL 状态机,远程失败降级本地、showmessage 阻断、weburl 空/非空入口规则
配套:module.json5 声明 ohos.permission.INTERNET + reason_internet 字符串

devecocli build 通过;scripts/test.sh 单测全通过(修复 PermissionRequestResult 顶层导入)。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-25 18:29:45 +08:00
lanterngamescnandClaude Opus 4.8 6de9038a54 M0: 搭建多模块工程骨架(T-M0-01/T-M0-02)
- 在 entry 基础上新增 6 个 HAR:contracts/common/platform/domain_resource/feature_bridge/feature_capabilities(框架§4 工程结构)
- 依赖单向向下、无环、无传递依赖(T-M0-02):
  contracts←common←platform←domain_resource;feature_bridge←(contracts,common);
  feature_capabilities←(全部下层);entry←(全部下层)
- 各 HAR 含 build-profile/hvigorfile(harTasks)/module.json5(type:har)/Index.ets 导出入口
- devecocli build(debug) 全模块编译通过,entry 打包 HAP 成功

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