Repository navigation
v1.2.0
✨ 新功能
- MJOT 在线推理(OT3):在设置页开启「使用 MJOT 云端推理」后,每一步都向 MJOT 官方服务器询问建议;本地 Rust 引擎仍在环节内,负责计算合法操作、跳过必然操作,并在云端出错时接管
- API 密钥管理:粘贴密钥后先在服务器校验再保存,输错的密钥不会被存下;密钥加密保存,界面只显示「尾号」
- 兑换密钥:输入兑换码即可换得密钥,也可把兑换时长叠加到已保存的密钥上(续期);兑换后自动刷新套餐与到期时间
- 购买密钥:在浏览器中完成支付,本窗口自动轮询取回密钥(30 天 $10 / 90 天 $27 / 包月 $10 每月 / 包年 $100 每年);窗口关掉也不影响,1 小时内重新打开可继续取回
- 密钥状态:显示套餐、到期时间、今日用量与每日上限、每分钟请求上限、候选数量(Top-K)
- 服务状态:一键查询服务端健康、排队深度与工作进程状态,无需密钥
- 在线模型选择:四麻与三麻分别从服务器拉取可用模型,留空则使用服务器默认
- 决策超时:可在 0.5–3.0 秒之间调整,超过该时长即改用本地模型
🎨 UI/UX 增强
- 设置页模型区重构:「使用 MJOT 云端推理」开关取代原来的模式切换,本地与在线配置同时可见
- 密钥卡片:已配置时只显示尾号与「更换密钥 / 清除密钥」,只有输入新密钥时才出现输入框;确认与取消合并为输入框右侧的图标按钮
- 模型状态点:绿=在线作答、蓝=本地作答、黄=在线失败由本地兜底、红色闪烁=熔断中、红=模型加载失败;屏幕上没有建议时不显示
- 端口超出 1024–65535 时输入框直接标红并提示范围
🛠️ 维护与重构
- 新增
scripts/inference-probe.ts,可手动对线上服务做端到端探测(AKAGI_OT_KEY=… npx tsx scripts/inference-probe.ts) - 移除
.editorconfig及其 VS Code 扩展推荐,格式统一由 Prettier 与 rustfmt 负责
🐛 问题修复
- 设置页加载失败时标题误报「连接失败」,改用通用错误文案
- 端口输入框在合法范围之外没有任何提示
🧪 测试与质量
- 新增 4 个主进程测试(牌谱裁剪、HTTP 客户端、决策网关、端到端回退链路)与 2 个前端测试(密钥卡片状态、状态点判定)
- 全仓共 436 个单元测试、19 个集成测试、58 个 Rust 测试
- Rust 引擎新增「两种拔北写法都能解析」的测试
✨ Major Features
- MJOT online inference (OT3): with "Use MJOT cloud inference" enabled, every decision asks the official MJOT service; the local Rust engine stays in the loop, computing the legal actions, skipping forced turns and taking over whenever the cloud fails
- API key management: a pasted key is validated against the server before it is stored, so a typo is never saved; the key is encrypted and only its last four characters are shown
- Redeem a key: exchange a code for a key, or stack that time onto the key already stored (renewal); the plan and expiry refresh right after
- Buy a key: pay in the browser while this window polls for the result (30 days $10 / 90 days $27 / monthly $10 per month / yearly $100 per year); closing the window is fine, a pending checkout can be collected again within an hour
- Key status: plan, expiry, today's usage against the daily cap, the per-minute limit and the number of candidates (Top-K)
- Service health: one click for the server's health, queue depth and worker state, no key required
- Online model selection: four-player and three-player models are listed from the server, and leaving them empty uses the server default
- Decision timeout: adjustable between 0.5 and 3.0 seconds; past that the local model answers
🎨 UI/UX Enhancements
- Model section rebuilt: one "Use MJOT cloud inference" switch replaces the old mode toggle, with the local and online settings visible at the same time
- Key card: once a key is stored it shows the last four characters with "Replace key" and "Clear key"; the input only appears while a new key is being entered, and confirm/cancel are icon buttons next to it
- Model status dot: green for an online answer, blue for local, yellow when the cloud failed and local covered for it, flashing red while the breaker is open, red when the model failed to load; nothing is shown when there is no recommendation on screen
- A port outside 1024–65535 turns the field red and states the range
🛠️ Maintenance & Refactoring
- Added
scripts/inference-probe.tsfor manual end-to-end probing of the live service (AKAGI_OT_KEY=… npx tsx scripts/inference-probe.ts) - Removed
.editorconfigand its VS Code recommendation; Prettier and rustfmt own formatting
🐛 Bug Fixes
- A failed settings load was headed "Connection failed"; it now uses the generic error text
- A port outside the legal range had no feedback at all
🧪 Testing & Quality
- Four new main-process suites (window shaping, HTTP client, decision gate, end-to-end fallback path) and two frontend suites (key card states, dot resolution)
- 436 unit tests, 19 integration tests and 58 Rust tests in total
- New Rust test pinning that both spellings of an extracted north tile parse
Full Changelog: v1.1.0...v1.2.0