Repository navigation
v1.1.0
Important
💥 破坏性变更
该版本是一次整体重写,不兼容 v1.0.x:
- 移除 Python 后端,不再需要 Python 环境
- 仅支持雀魂,天凤、麻雀一番街、天月麻雀不再可用
- 模型格式由
mortal.pth/mortal3p.pth改为akagi4p.safetensors/akagi3p.safetensors,随安装包分发,旧模型文件不再能加载 - 移除以下设置项:
platform(游戏平台)、server(后台服务主机/端口)、ot(在线模型服务与 api_key)、model_config.temperature(温度参数)、mitm.host(MITM代理端口)
✨ 新功能
- Rust 原生推理引擎:推理不再依赖 Python 运行时与 libriichi,引擎以原生插件形式随各平台安装包分发
- 协议直接从游戏客户端引导:
liqi.json改为从雀魂 Unity 客户端的资源包中提取,不再依赖滞后的 CDN 版本;设置页的「更新协议文件」与每日自动任务走同一套流程 - 修罗之战:支持从换牌到第三家和了的完整流程
⚡ 改进与优化
- MITM 解密范围收窄:只解密
maj-soul.com/majsoul.com/mahjongsoul.com及英文服的两个精确主机,其余流量原样隧道 - 屏蔽阿里云 SLS 遥测埋点:登录时上报的证书信息不会再泄露本机 CA
- CA 证书整理:统一生成到
ca/目录,命名为akagi-ng-ca,并附带 Windows 可直接安装的 DER 版本 - 游戏窗口独立会话:代理与权限规则不再影响仪表盘与悬浮窗,且只放行全屏、指针锁定与剪贴板写入
- 用户代理统一去指纹:全应用(含弹窗)不再暴露 Electron 与应用名
🚀 性能提升
- 推理整体迁移到 Rust,桌面端不再需要启动独立的 Python 进程
- MITM 模式下非游戏流量直接隧道转发,不再经过解密与重加密
- 遥测埋点在本地应答,不再产生额外往返
🎨 UI/UX 增强
- 悬浮窗开关改用画中画图标,与窗口行为一致
- 启动页单次挂载,避免重复初始化造成的闪烁
- 渲染错误在根级捕获并提示,不再白屏
- 修复 macOS 托盘图标与无边框标题栏的显示问题
📝 文档更新
- 中英文 README 全部重写,修正不准确的描述与许可说明
- 补充浏览器(SwitchyOmega)与 Steam 客户端(Clash)两种代理配置教程
🛠️ 维护与重构
- 删除 Python 后端,代码库收敛为 TypeScript + Rust
- 主进程按层拆分,每个窗口与托盘各自成模块,IPC 按域分组
- 手写日志器替换为
electron-log,仪表盘与悬浮窗的控制台输出同样落盘 - 精简脚本目录,只保留与当前日志格式匹配的工具
- 打包时一并分发 Rust 引擎与上游
native_bot的 Apache-2.0 许可证 - 版本同步脚本覆盖
Cargo.toml与packages/rust_engine/package.json
🐛 问题修复
- 庄家第 14 张牌被当作摸牌,牌序与实际手牌不一致
- 缺少宝牌指示牌的局无法正常开启
- 抢杠时没有推送打牌推荐
- 没有任何合法选项时仍会发布决策
- 版本号按字符串比较,导致更新提示误判
- 主题值非法或启动页被取消时崩溃
- 代理在设置未变化时被重启,打断正在进行的对局
- 切换到 MITM 后页面重载会重新挂上调试器,导致同一 socket 被两条路径重复抓取
🧪 测试与质量
- 主进程与前端接入 Vitest,并新增独立的重放集成测试项目
- Rust 引擎补齐 55 个单元测试与 2 个上游 parities 测试,保证与上游决策一致
- 恢复 Codecov 覆盖率上报,区分
typescript与rust两个 flag
📦 更新依赖
- Dependabot 仅用于 GitHub Actions:npm 依赖改为手动决定
⚠️ 已知问题
- MITM 代理监听所有网卡(mockttp 限制),请勿在不可信网络中开启外部代理模式
- MITM 代理启动失败时没有界面提示,游戏窗口会指向一个未启动的端口
- 内置模型在修罗之战下会按标准立直麻将规则选择,其打牌偏好不完全代表真实强度(合法操作、手牌、事件流与结算均正确)
Important
💥 Breaking Changes
This release is a full rewrite and is not compatible with v1.0.x:
- The Python backend is gone; a Python environment is no longer needed
- Mahjong Soul only; Tenhou, Riichi City and Amatsuki Mahjong are no longer available
- Models change from
mortal.pth/mortal3p.pthtoakagi4p.safetensors/akagi3p.safetensors, bundled with the installer; the old files can no longer be loaded - The following settings are removed:
platform(game platform),server(background service host/port),ot(online model service and api_key),model_config.temperature,mitm.host
✨ Major Features
- Native Rust inference engine: inference no longer needs a Python runtime or libriichi; the engine ships as a native addon with every platform package
- Protocol bootstrapped straight from the game client:
liqi.jsonis now extracted from the Majsoul Unity client's asset bundles instead of the lagging CDN copy; the "update protocol" button and the daily automated job run the same pipeline - Battle of Asura (修羅の戦): supported end to end, from the tile swap to the third win
⚡ Improvements & Refinements
- Narrower MITM decryption: only
maj-soul.com,majsoul.com,mahjongsoul.comand two exact English-server hosts are decrypted; everything else is tunnelled untouched - Aliyun SLS telemetry beacons are blocked: the certificate report sent at login no longer exposes the local CA
- CA tidy-up: generated under
ca/, namedakagi-ng-ca, with a DER copy Windows can install directly - The game window gets its own session: proxy and permission rules no longer reach the dashboard or the overlay, and only fullscreen, pointer lock and clipboard writes are granted
- User agent cleaned everywhere: popups and child windows no longer advertise Electron or the app name
🚀 Performance Improvements
- Inference moved to Rust; the desktop app no longer starts a separate Python process
- In MITM mode, non-game traffic is tunnelled directly instead of being decrypted and re-encrypted
- Telemetry beacons are answered locally, so they no longer cost a round trip
🎨 UI/UX Enhancements
- The HUD toggle now uses a picture-in-picture icon, matching what it actually does
- The splash mounts once, so nothing flickers during startup
- Render errors are caught at the root and reported instead of leaving a blank window
- Fixed the macOS tray icon and frameless title bar
📝 Documentation
- Both READMEs rewritten, including corrections to the licensing notes
- Added proxy setup guides for browsers (SwitchyOmega) and the Steam client (Clash)
🛠️ Maintenance & Refactoring
- Python backend deleted; the codebase is TypeScript + Rust only
- The main process is laid out in layers, each window and the tray own a module, and the IPC surface is grouped by domain
- The hand-rolled logger was replaced with
electron-log, which also captures dashboard and overlay console output - Scripts trimmed to the ones that match this build's log format
- Releases bundle the Rust engine and the upstream
native_botApache-2.0 license - The version sync covers
Cargo.tomlandpackages/rust_engine/package.json
🐛 Bug Fixes
- The dealer's fourteenth tile was read as the draw, misaligning the whole hand
- A round arriving without a dora indicator could not be opened
- No recommendation was pushed when a kan was robbed
- A decision was published even when it had no choice
- Versions were compared as strings, so the update prompt misfired
- A malformed theme value or a cancelled splash could crash the UI
- The proxy restarted on unrelated setting changes, interrupting a game in progress
- After switching to MITM, a page reload re-attached the debugger and both paths captured the same socket
🧪 Testing & Quality
- Vitest covers the main process and the frontend, with a separate project for replay integration tests
- The Rust engine runs 55 unit tests and 2 upstream parity tests that pin decision-level equivalence
- Codecov reporting restored, with separate
typescriptandrustflags
📦 Dependency Updates
- Dependabot now updates GitHub Actions only; npm versions are decided by hand
⚠️ Known Issues
- The MITM proxy listens on every interface (a mockttp limitation); do not enable the external-proxy mode on an untrusted network
- A failed proxy start has no UI feedback, so the game window can point at a port that never came up
- Under Battle of Asura scoring, the built-in model chooses by standard riichi mahjong rules, so its preferences do not fully represent its strength (legal actions, hand, event flow and settlement are exact)
Full Changelog: v1.0.8...v1.1.0