Commit Graph

18744 Commits

Author SHA1 Message Date
uye
b4429c4b6f feat: 重复启动时通过跨进程事件激活主窗口而非弹窗警告 (#16363)
* feat: 重复启动时通过跨进程事件激活主窗口而非弹窗警告

* perf: GetSingleInstanceKey 改用路径哈希
2026-04-29 21:33:08 +08:00
github-actions[bot]
719d04f53d chore: Auto Templates Optimization
Triggered by 5f2d547998

[skip changelog]
2026-04-29 13:22:47 +00:00
Manicsteiner
5f2d547998 chore: YostarJP MiniGame SPA (#16372) 2026-04-29 21:22:22 +08:00
Roland125
e9d8f6a844 fix: 修复剿灭后出现升级界面,导致无法继续任务的问题(#16255) (#16370) 2026-04-29 21:20:35 +08:00
status102
4215a05371 perf: 合并简化任务状态 2026-04-29 19:44:22 +08:00
github-actions[bot]
dd7ec5cd20 chore: Auto update by pre-commit hooks
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/25078413821
[skip changelog]
alpha/v6.8.1-alpha.1.d033.gdd7ec5cd20
2026-04-28 21:24:51 +00:00
uye
a62258f74e feat: 在关卡没解锁代理/剿灭没使用全权代理时报错停止 (#16357)
* feat: 在关卡没解锁代理/剿灭没使用全权代理时报错停止

* chore: 添加最大循环次数
2026-04-28 23:45:24 +08:00
github-actions[bot]
de4476b545 chore: Auto Templates Optimization
Triggered by e6b3223e29

[skip changelog]
2026-04-28 12:13:55 +00:00
Roland125
e6b3223e29 feat: 增加 保存代理指挥记录 支持; 新增合成玉掉落检查, 0掉落结束 (#16356)
* fix: 增加在剿灭代理记录更新界面,点击确认按钮的任务和图片资源
fix: 增加剿灭模式下,对合成玉的掉落检测。不掉落合成玉时,结束战斗任务

* perf: 使用代理卡时不会更新记录

Co-authored-by: Status102 <102887808+status102@users.noreply.github.com>

---------

Co-authored-by: Status102 <102887808+status102@users.noreply.github.com>
2026-04-28 20:12:41 +08:00
github-actions[bot]
be77d7b1bc chore: Auto Update Game Resources - 2026-04-28
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/25046601559

[skip changelog]
2026-04-28 10:04:06 +00:00
status102
34d1f8413a feat(wpf): 掉落物识别额外输出剿灭进度 2026-04-28 14:05:15 +08:00
status102
04a793e6ce rft: ProcessTask匹配命中状态更新统一化 2026-04-28 13:35:50 +08:00
status102
5619aefa10 fix: 干员使用技能间隔未能生效 2026-04-28 13:22:12 +08:00
github-actions[bot]
d2ee76d2f6 chore: Auto update by pre-commit hooks
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/25020210469
[skip changelog]
alpha/v6.8.1-alpha.1.d025.gd2ee76d2f6
2026-04-27 21:23:04 +00:00
uye
8f1b7fd087 feat: 新增 get_last_matched_task_name 方法;成功命中新节点时与 get_last_task_name 一致,在进入下一轮匹配后若未再命中新节点时,仍保留最近一次成功命中的任务名,避免误取空值 2026-04-28 00:49:06 +08:00
uye
ea22cbab4a chore: 支持打包日志文件后 GitHub 上传日志不再需要先关闭 MAA 2026-04-27 22:37:34 +08:00
dependabot[bot]
f733530b67 ci: bump the github-actions group in /.github/workflows with 2 updates (#16344)
Bumps the github-actions group in /.github/workflows with 2 updates: [apple-actions/import-codesign-certs](https://github.com/apple-actions/import-codesign-certs) and [apple-actions/download-provisioning-profiles](https://github.com/apple-actions/download-provisioning-profiles).


Updates `apple-actions/import-codesign-certs` from 6 to 7
- [Release notes](https://github.com/apple-actions/import-codesign-certs/releases)
- [Commits](https://github.com/apple-actions/import-codesign-certs/compare/v6...v7)

Updates `apple-actions/download-provisioning-profiles` from 5 to 6
- [Release notes](https://github.com/apple-actions/download-provisioning-profiles/releases)
- [Commits](https://github.com/apple-actions/download-provisioning-profiles/compare/v5...v6)

---
updated-dependencies:
- dependency-name: apple-actions/import-codesign-certs
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: apple-actions/download-provisioning-profiles
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-27 15:12:47 +08:00
github-actions[bot]
33885b1294 chore: Auto update by pre-commit hooks
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/24967148430
[skip changelog]
alpha/v6.8.1-alpha.1.d021.g33885b1294
2026-04-26 21:12:26 +00:00
uye
893793efff chore: 调整完整后 无其他 MAA 选项绑定逻辑,不再强制勾选退出模拟器 2026-04-27 02:02:13 +08:00
status102
8161976869 fix: 干员仓储识别手动指定术兔
临时修复
2026-04-27 01:37:56 +08:00
Jin Zhaonian
60cbc68e59 fear: PC 端支持 完成后退出明日方舟 (#16351)
* fix: 修复pc端任务完成后勾选自动关闭游戏但无法关闭的问题

* fix: IsWindow检查与WM_CLOSE关闭

Co-authored-by: Copilot <copilot@github.com>

---------

Co-authored-by: Copilot <copilot@github.com>
2026-04-27 01:36:19 +08:00
uye
b65b37fba8 chore: 调整选项 IsEnabled 2026-04-27 01:35:10 +08:00
Alex Gu
7d3f8bfa2d fix: 若干正确性问题修正(null check / race / clamp / retry 等 9 处) (#16332)
## 概述

代码 review 发现的一批正确性问题批量修正,都是 `src/MaaCore` 下单行 / 局部 logic 级别的
bug,彼此独立,按严重度从高到低逐条 commit。没有功能改动、没有 API 变化、没有 breaking behavior。

每个 commit 单独对应一条 bug,便于逐条 review 或按需
revert。下表也按严重度从高到低排序,附上「原问题」与「修法理由」。

### 发现来源

使用 Claude Code 新版 `/ultrareview` 多 agent review 扫了 `src/MaaCore` 源码(~58k
行),人工逐条核对后提 PR。另有 2 条(AvatarCacheManager 并发保护 / CopilotConfig
默认值语义)涉及设计决策或 breaking change,已单独提 issue 讨论,不在本 PR 内。

---

## Fix 列表(按严重度排序)

### 1. `Controller::back_to_home` 空指针解引用崩溃 — HIGH

**位置**:`src/MaaCore/Controller/Controller.cpp:137`

**原问题**:
```cpp
bool asst::Controller::back_to_home()
{
    m_controller->back_to_home();   // 无 null 检查
    return true;
}
```
未连接设备时 `m_controller == nullptr`,此处直接 segfault。同文件 `sync_params` /
`start_game` / `stop_game` / `click` 等所有公开方法都有 null 保护(前者用 `if
(!m_controller) return`,后者用 `CHECK_EXIST(m_controller, false)` 宏),**只有
`back_to_home` 漏了**。

**触发路径**:任务运行中 ADB 断连使 `m_controller` 被 reset 成 null → 调度走到"回主页"分支 → 崩溃。

**修法**:函数开头加 `CHECK_EXIST(m_controller,
false);`,与同文件其他方法保持一致。最小改动,零行为变化(未连接时 `back_to_home` 返回 `false` 而不是崩溃)。

---

### 2. `MumuExtras::screencap` reload 之后没有真正重试 — MEDIUM-HIGH

**位置**:`src/MaaCore/Controller/MumuExtras.cpp:54-83`

**原问题**:
```cpp
int ret = capture_display_func_(...);       // 第一次 capture
if (ret) {
    // Try reloading once before giving up.
    if (!reload()) { ... return std::nullopt; }
    if (ret) {                              // ← 检查的是同一个 ret,不是重试之后的
        LogError << "Failed to capture display, but reload before retrying capture was successful." ...;
        return std::nullopt;
    }
}
```
注释承诺"失败时 reload 后重试 capture",但第二个 `if (ret)` 检查的还是第一次调用写入的
`ret`,`capture_display_func_` **从未被重新调用过**。reload 成功或失败都必然返回
`std::nullopt`,注释里的"reload before retrying capture was
successful"日志其实**只是字面,retry 压根没发生**。

**后果**:MuMu 模拟器短暂 capture 失败(内存抖动 / 显示切换)时,原本 reload
应能恢复,但代码从不真正重试,上层看到的永远是「截图失败」。

**修法**:在两个 `if (ret)` 之间加上**真正的**重试:重新调用 `capture_display_func_` 并更新
`ret`。reload 可能改变设备状态,所以 `display_id` 也重新 `get_display_id()`
取一次。失败信息相应改为"Failed to capture display even after reload",语义准确。

---

### 3. `Controller` 中 `d_size` 被 `const static` 固化,分辨率变化后缩放错误 — MEDIUM

**位置**:`src/MaaCore/Controller/Controller.cpp:146` 和 `:438`(两处)

**原问题**:
```cpp
const static cv::Size d_size(m_scale_size.first, m_scale_size.second);
```
C++ 函数内 `static` 局部变量的初始化表达式**仅在第一次进入该函数时执行一次**。首次调用时 `m_scale_size`
的值被固化到 `d_size`,之后用户切换模拟器、改分辨率预设、连接新设备等导致 `m_scale_size` 变化时,**`d_size`
不会更新**。

**后果**:
- `cv::resize(..., d_size, ...)` 把图缩到错误的目标尺寸 → OCR / 模板匹配的坐标/尺寸都错
- 截图失败兜底路径 `m_cache_image = cv::Mat(d_size, CV_8UC3)` 也分配错误尺寸的空图
- 用户看到各种"识别不到 / 坐标偏移"但不崩溃,**只能通过重启 MaaCore 恢复**

**修法**:去掉 `static`,每次调用重新构造。`cv::Size` 就是两个
`int`,栈上构造基本无开销,不存在性能回归。两处都修。

---

### 4. `PlayToolsController::swipe` 起点钳制没有应用到 `toucher_down` —
MEDIUM-LOW

**位置**:`src/MaaCore/Controller/PlayToolsController.cpp:230`

**原问题**:
```cpp
int x1 = p1.x, y1 = p1.y;                          // 拷贝到局部变量
// ...
if (x1 < 0 || x1 >= width || y1 < 0 || y1 >= height) {
    x1 = std::clamp(x1, 0, width - 1);             // 只钳制了局部 x1/y1
    y1 = std::clamp(y1, 0, height - 1);
}
// ...
toucher_down(p1);                                  // ← 仍用原始的 const Point& p1
```
注释"起点不能在屏幕外,但是终点可以"已经说明了钳制意图,但钳制结果只存在局部 `x1/y1`,`toucher_down(p1)`
使用的还是未钳制的原始 `p1`。后续 `progressive_move` 用 `x1/y1` 所以中段 swipe 在屏幕内,**但首个
touch-down 事件发到屏幕外坐标**,iOS PlayTools 侧多半会被丢弃或忽略 → 整个手势无效。

**修法**:`toucher_down(p1)` → `toucher_down({ x1, y1 })`,用已钳制的坐标构造临时
`Point`。与同文件下方 `toucher_move({ x, y })` 的风格一致。

---

### 5. `Assistant::m_task_id` 非原子 static 导致跨实例数据竞争 — MEDIUM-LOW

**位置**:`src/MaaCore/Assistant.h:214`(声明)+
`src/MaaCore/Assistant.cpp:295-296`(使用)

**原问题**:
```cpp
// Assistant.h
inline static TaskId m_task_id = 0;                     // 进程级 static,非 atomic
mutable std::mutex m_mutex;                             // 实例级 mutex
inline static std::atomic<AsyncCallId> m_call_id = 0;   // 旁证:同文件另一个 static 是 atomic

// Assistant.cpp:295
std::unique_lock<std::mutex> lock(m_mutex);             // 锁的是当前实例的 mutex
int task_id = ++m_task_id;                              // 改的是进程共享的 static
```
`m_task_id` 是 static(**所有 Assistant 实例共享一个内存地址**),但 `m_mutex`
是每个实例各自的锁。两个不同实例并发 `++m_task_id` 时,各自 lock 各自的 mutex,彼此不互斥 ——
**数据竞争**,`++` 对非原子 `int` 是 RMW 三步,可能让两个实例拿到同一个 `task_id`。

单实例客户端(MaaWpfGui、MaaMacGui)触发不了;多实例 + 并发下任务的客户端(命令行批处理 / 自动化测试)会偶现任务 id
冲突,后续 `AsstSetTaskParams` / `AsstStop` 可能误中另一个实例的任务。

旁证:同文件 line 227 的另一个同类 static `m_call_id` 已经声明成
`std::atomic<AsyncCallId>`,一致性也对不上,显然是作者漏改。

**修法**:`TaskId m_task_id` → `std::atomic<TaskId>
m_task_id`。`++m_task_id` 靠 `std::atomic::operator++` 原子化,语法不变。`m_mutex`
原先是为紧跟的 `m_tasks_list.emplace_back` 服务的,继续保留。

---

### 6. `OcrPack::load` 复制粘贴导致 `rec_label` 变化检测用错字段 — LOW-MEDIUM

**位置**:`src/MaaCore/Config/Miscellaneous/OcrPack.cpp:61`

**原问题**:
```cpp
// 前两块都正确:当前保存路径 != 新路径 时才更新
if (exists(det_model_file) && m_det_model_path != det_model_file) { ... }
if (exists(rec_model_file) && m_rec_model_path != rec_model_file) { ... }
// 第三块:应该检查 m_rec_label_path,却写成了 m_rec_model_path
if (exists(rec_label_file) && m_rec_model_path != rec_label_file) {
    m_rec_label_path = rec_label_file;
    m_rec = nullptr;
}
```
模型路径以 `.onnx` 结尾,标签路径以 `.txt` 结尾,`m_rec_model_path != rec_label_file`
**恒为真**(只要标签文件存在)。结果每次调用 `load()` 都会:
- 无效地重新给 `m_rec_label_path` 赋同样的值
- 把 `m_rec` 置空 → 触发下一次 OCR 时 lazy 重载

不会导致正确性崩塌(`check_and_load` 路径会 lazy 重建
`m_rec`),但"路径没变则保留缓存"的设计目的完全失败,且多次 `load()` 会产生不必要的模型重载开销。

**修法**:`m_rec_model_path != rec_label_file` → `m_rec_label_path !=
rec_label_file`,与上面 `det` / `rec_model` 两块的模式对齐。

---

### 7. `RoguelikeStageEncounterConfig` `fallback_choices` 校验写错变量 — LOW


**位置**:`src/MaaCore/Config/Roguelike/RoguelikeStageEncounterConfig.cpp:77`

**原问题**:
```cpp
int option_num = pair_arr[0].as_integer();
if (option_num < 0) { ... return false; }               // 校验 option_num,OK
int choice = pair_arr[1].as_integer();
if (option_num < 0) {                                   // ← 重复检查 option_num
    Log.error(
        std::format(
            "RoguelikeEncounterConfig | callback choice for event {} with {} option(s) is less than zero",
            ...));
    return false;
}
```
错误信息本身已经说明是在校验 `choice`("callback choice ... is less than
zero"),但实际比较的是上面已经保证过非负的 `option_num`,这个 `if` 永远进不去。

**后果**:坏 JSON 中 `[3, -5]` 这类负数 `choice` 能被静默接受,后续
`static_cast<size_t>(-5)` 产生巨大无符号数,作为索引使用时 UB。正常配置不触发,但这条防御校验已名存实亡。

**修法**:第二个 `if` 判断变量改为 `choice`。错误消息中 `option_num` 作为上下文保留(用于打印 option
数量,语义正确)。

---

### 8. `AsstDestroy` 对值传入的形参赋 `nullptr` 是死代码 — TRIVIAL

**位置**:`src/MaaCore/AsstCaller.cpp:98`

**原问题**:
```cpp
void AsstDestroy(AsstHandle handle)
{
    if (handle == nullptr) return;
    delete handle;
    handle = nullptr;       // ← 改的是局部拷贝,对调用方的变量无影响
}
```
`AsstHandle` 按值传入,`handle = nullptr` 只修改本函数作用域的局部拷贝。`delete handle`
已正确销毁对象,这行既没有替调用方置空(要做到需接受 `AsstHandle*`),也不会影响 delete 行为,纯死代码。

**修法**:删掉这行,保持 `delete` 行为不变,避免给读者错误印象。

---

### 9. `AvatarCacheManager.h` 开头两行重复的 `#pragma once` — TRIVIAL

**位置**:`src/MaaCore/Config/Miscellaneous/AvatarCacheManager.h:1-3`

**原问题**:
```cpp
#pragma once

#pragma once        // ← 重复
#include "Config/AbstractResource.h"
```
pragma once 幂等,没有功能影响,但看起来是编辑时的残留。清理即可。

---

## Test plan

- [x] `git diff dev-v2..HEAD --stat`:8 文件 / +18/-11,只有目标修改,无无关改动
- [x] 每条 fix 都有对应的单独 commit,便于逐条 review 或按需 revert
- [x] **本地 macOS arm64 build 通过**:`cmake --preset macos-arm64 && cmake
--build build --config Release` → 203/203 targets 编译链接成功,0 error,修改的 8
个文件 0 warning(全局唯一 1 条 warning 是 `MaaUtils/Logger.cpp` 的 `#pragma
message` 版本信息打印,与本 PR 无关)
- [ ] 单元测试:macOS preset 默认没有编译 test target(`unit_test/MaaCore/` 下仅 1 个
`AlgorithmTest.cpp`,与本 PR 改动的函数无交集),本地 `ctest` 返回 "No tests were
found"。依赖上游 CI 完整矩阵(Linux / Windows / macOS + 各自测试)验证。

## Notes for reviewers

- 每条 fix 的 commit message 都附了原理说明,结合 PR 正文对应条目阅读
- **没有功能性增加**,也**不动任何 public API / ABI**
- 不涉及 resource / JSON 数据文件
- 合并之后建议开一个跟进 issue 讨论 ultrareview 的另外两条 finding(AvatarCacheManager
并发保护、CopilotConfig 默认值语义)—— 这两条需要设计决策,不适合塞进本 PR

---

_PR 发现来源:Claude Code `/ultrareview` 多 agent 扫描后人工复核。_

## Summary by Sourcery

在不改变公共 API 或行为的前提下,修复了控制器、OCR、肉鸽配置以及工具组件中的多处正确性问题。

Bug 修复:
- 在 `Controller::back_to_home` 中增加空指针检查,以防在底层控制器不可用时发生崩溃。
- 确保 `MumuExtras::screencap` 在成功重新加载后确实会重试屏幕捕获,并且能准确记录失败日志。
- 在 Controller 中为缩放后的图像尺寸使用非静态的 `cv::Size`,以便在无需重启的情况下正确响应分辨率变化。
- 对传递给 `PlayTools toucher_down` 的滑动起始点进行限制,确保初始触控事件始终在屏幕范围内。
- 将 Assistant 的进程级任务 ID 计数器改为原子类型,避免在多实例场景下产生数据竞争。
- 修正 `OcrPack` 标签路径变更检测逻辑,使 OCR 模型只在标签文件实际变更时才会重新加载。
- 修复 `RoguelikeStageEncounterConfig` 的回退选项校验逻辑,按预期拒绝负数选项。
- 移除 `AsstDestroy` 中无效的句柄重置代码,该代码试图将值传递参数置空但实际上无效。
- 移除 `AvatarCacheManager.h` 中多余的 `#pragma once`,以清理头文件。

<details>
<summary>Original summary in English</summary>

## Summary by Sourcery

Fix multiple correctness issues across controller, OCR, roguelike
config, and utility components without changing public APIs or
behaviors.

Bug Fixes:
- Add a null check in Controller::back_to_home to prevent crashes when
the underlying controller is unavailable.
- Ensure MumuExtras::screencap actually retries display capture after a
successful reload and logs failures accurately.
- Use a non-static cv::Size for scaled image dimensions in Controller so
resolution changes are respected without restart.
- Clamp the swipe starting point passed to PlayTools toucher_down to
keep initial touch events within screen bounds.
- Make Assistant's process-wide task ID counter atomic to avoid data
races across instances.
- Correct OcrPack label path change detection so OCR models are only
reloaded when the label file actually changes.
- Fix RoguelikeStageEncounterConfig fallback choice validation to reject
negative choices as intended.
- Remove ineffective handle reset code in AsstDestroy that tried to null
a by-value parameter.
- Remove a redundant #pragma once in AvatarCacheManager.h to clean up
the header.

</details>
2026-04-27 00:46:12 +08:00
SherkeyXD
4a77baba13 feat: 适配界面主题「重构」 (#16349)
* feat: 界面主题「重构」预载

* fix: 修复小工具 updater 路径错误
2026-04-27 00:45:09 +08:00
uye
b9fca6f03d chore: 连接方式使用 PC 端时禁用不支持的完成后操作 2026-04-27 00:32:13 +08:00
srdr0p
1b1bc15aca feat: 支持腾讯应用宝 5.10.56.xx (#16292)
* feat(connection): 新增腾讯应用宝模拟器支持

在 WinAdapter 和 config.json 中添加应用宝(Androws)模拟器入口。
本次仅支持 ADB Input 方式和官方渠道。

同步更新各语言连接文档(zh/en/ja/ko/tw)及 UI 本地化字符串。

* feat(controller): 为腾讯应用宝新增多渠道与 Minitouch 支持

应用宝的应用与 DisplayId 绑定,需在 connect() 前确定包名。
新增 InstanceOptionKey::ClientType (= 6),经由
AsstSetInstanceOption -> Assistant::set_instance_option
-> Controller::set_client_type 传递渠道信息;
AdbController::connect 在建立连接时通过 ctrler()->get_client_type()
读取并写入 AdbConnectionContext,用于替换命令模板中的 [PackageName]。

引入 AdbConnectionContext 保存 ADB 连接信息供 Minitouch 使用,
并通过 eventId 标识所绑定的输入设备。
2026-04-26 23:48:24 +08:00
status102
54f07fc3ad perf(wpf): 优化1星词条选项操作描述 2026-04-26 12:59:09 +08:00
github-actions[bot]
ce9fc40ef5 chore: Auto update by pre-commit hooks
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/24940764290
[skip changelog]
alpha/v6.8.1-alpha.1.d011.gce9fc40ef5
2026-04-25 21:12:38 +00:00
晓丶梦丶仁
fa5929a5f5 feat: 争锋频道 绿藤城 (#16345)
* feat: 争锋频道 绿藤城

* i18n: jp kr

* fix: key
2026-04-25 23:53:09 +08:00
status102
adcf581ab3 fix: 干员仓储识别未跳过数据查找失败的干员 2026-04-25 23:17:06 +08:00
SherkeyXD
7567ca7950 chore: 周年月卡文本更新 2026-04-25 23:12:09 +08:00
github-actions[bot]
83ce081ac5 chore: Auto Update Game Resources - 2026-04-25
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/24932890662

[skip changelog]
2026-04-25 14:18:43 +00:00
Constrat
d6cdfc6c77 fix: EN IS6 trail regex 2026-04-25 15:27:15 +02:00
status102
b0f46de1e6 perf: 理智上限增加到210 2026-04-25 20:47:49 +08:00
SherkeyXD
a1064f7c21 fix: 月度小队不再隐藏分队选择 2026-04-25 18:10:04 +08:00
uye
ac3b986d7a feat: updater 支持暗色模式 alpha/v6.8.1-alpha.1.d003.gac3b986d7a 2026-04-25 05:51:09 +08:00
uye
f08793369e feat: updater 支持显示进度条或控制台输出 2026-04-25 05:51:09 +08:00
Goat Boring(山羊博宁88)
8da0b89e6e docs: 修改部分注释 (#16215)
* docs: 修改部分注释

* docs: Fix typo in JSON file usage note

* docs: 改改改

* style: format

Co-authored-by: Status102 <102887808+status102@users.noreply.github.com>

* docs: 换地址

* docs: 作业最低支持版本

---------

Co-authored-by: Status102 <102887808+status102@users.noreply.github.com>
2026-04-25 01:57:35 +08:00
uye
0913148a69 Release v6.8.0 (#16335)
## 由 Sourcery 生成的摘要

为 v6.8.0 版本更新了更新程序行为、GUI 日志记录、资源以及 CI/发布工作流。

新功能:
- 在原生更新程序中添加对待处理更新计划条目的详细日志记录。
- 新增 copilot 配置 JSON 资源。

漏洞修复:
- 防止非完整更新包删除或替换目录,在这些情况下强制仅对文件进行操作。
- 从 WPF 待处理更新清单的删除列表中过滤目录条目,避免意外删除目录。
- 从 OTAPacker 的 zip 列表输出中排除目录条目。
- 当在 VisionHelper 中请求的 ROI 超出范围时,返回安全的空矩形,以避免无效图像访问。
- 通过仅记录最新公告正文来避免公告日志被覆盖。

改进:
- 为原生更新程序日志文件引入基于最大大小阈值的日志轮换。
- 在完整包更新期间保留缓存目录。
- 在 CI 中从发布制品中移除备份文件,以保持发布包干净。

构建:
- 调整本地安装脚本,将 WPF GUI 发布为 win-x64、自包含且针对特定运行时的构建。

CI:
- 在多个工作流中将 github-script action 升级到 v9。
- 在 Avalonia CI 工作流中将 upload-artifact 的使用升级到 v7。
- 更新发布工作流以使用最新的 softprops/action-gh-release v3。
- 将 COS 上传步骤切换为使用较新的 tencent-cos-action,并采用基于 sync 的参数进行发布分发。

<details>
<summary>Original summary in English</summary>

## Summary by Sourcery

Update updater behavior, GUI logging, resources, and CI/release
workflows for the v6.8.0 release.

New Features:
- Add detailed logging of pending update plan entries in the native
updater.
- Add new copilot configuration JSON resources.

Bug Fixes:
- Prevent non-full update packages from deleting or replacing
directories, enforcing file-only operations in these cases.
- Filter directory entries from the WPF pending update manifest remove
list to avoid unintended directory removals.
- Exclude directory entries from OTAPacker zip listing output.
- Return a safe empty rectangle when a requested ROI is out of range in
VisionHelper to avoid invalid image access.
- Avoid overwriting announcement logs by logging only the latest
announcement body.

Enhancements:
- Introduce log rotation for the native updater log file based on a
maximum size threshold.
- Preserve the cache directory during full-package updates.
- Remove backup files from release artifacts in CI to keep distributions
clean.

Build:
- Adjust local-install script to publish the WPF GUI as a win-x64
self-contained runtime-specific build.

CI:
- Bump github-script actions to v9 in multiple workflows.
- Upgrade upload-artifact usage to v7 in Avalonia CI workflows.
- Update release workflow to use the latest softprops/action-gh-release
v3.
- Switch COS upload step to use the newer tencent-cos-action with
sync-based arguments for release distribution.

</details>
v6.8.0
2026-04-25 00:49:14 +08:00
github-actions[bot]
5eb161a390 docs: Auto Update Changelogs of v6.8.0 (#16336)
* docs: Auto Generate Changelog of Release v6.8.0

* docs: changelog

* feat(changelog): 更新 v6.8.0 版本日志,优化更新流程与功能介绍

* docs: changelog

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: uye <99072975+ABA2396@users.noreply.github.com>
Co-authored-by: AnnAngela <naganjue@vip.qq.com>
2026-04-25 00:46:20 +08:00
uye
0c4bcf6aae fix: 使用本地注册的更新包会导致从 API 获取的更新信息被置空 2026-04-24 23:19:16 +08:00
MistEO
f90cc11100 ci: disable MAA cos 2026-04-24 22:21:04 +08:00
github-actions[bot]
f1be7f5711 chore: Auto Update Game Resources - 2026-04-24
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/24893433596

[skip changelog]
2026-04-24 14:00:14 +00:00
Roland125
e6fad34468 修复截图延迟极低时,可能会随机出现,更换产物/订单失败的问题 (#16330)
fix: 给更换产物/订单的一环任务步骤加延时,避免在极低截图延迟下(5ms)出现更换不成功的情况。
fix: 给ConfirmProductChange任务添加一个stop出口,避免在单独测试更换产物任务时,可能会出现的一个意外报错。

点击更换订单和点击更换产物的时候(见下方两图)会有一个动画时间。

以前cpp代码里,任务执行默认有个500ms延时,可能是现在没有了吧,导致mumu extra模式下,有随机概率卡动画,点击产物会不生效,而且。

大概今年1月份就在我的基建里发现换班出问题了,但是再手动link start一次通常又能换好。

观察一段时间之后,发现能不能换成功都是随机的感觉。

同时,不管换没换对,在基建换班任务执行中,都是返回产物已切换,没有报错的。这个没搞懂怎么回事。

<img width="921" height="517" alt="image"
src="https://github.com/user-attachments/assets/5a45910d-8a87-47b8-8695-4e0f4242df8a"
/>
<img width="918" height="518" alt="image"
src="https://github.com/user-attachments/assets/c4132171-4978-4dbd-afbd-a9aaad13b6b0"
/>


额外加的stop入口是因为在执行自定任务测试的时候发现,如果切换到的产物和当前产物一致,会报错。

正常来说如果产物一致是不会进换产物流程的,所以不影响正常的换班逻辑。

## Summary by Sourcery

为产品/订单变更任务添加时序和控制流调整,以在截图延迟极低的情况下提升可靠性。

Bug Fixes:
- 在产品/订单变更步骤中引入延迟,以防止在截图延迟极低时出现随机失败。
- 为 `ConfirmProductChange` 任务添加停止退出逻辑,以避免在隔离任务测试期间,当目标产品与当前产品相同时出现错误。

<details>
<summary>Original summary in English</summary>

## Summary by Sourcery

Add timing and control-flow adjustments to product/order change tasks to
improve reliability under very low screenshot latency.

Bug Fixes:
- Introduce a delay in the product/order change step to prevent random
failures when screenshots are taken with extremely low latency.
- Add a stop exit to the ConfirmProductChange task to avoid errors when
the target product is the same as the current one during isolated task
testing.

</details>
2026-04-24 21:25:13 +08:00
github-actions[bot]
4a3780528a chore: Auto update by pre-commit hooks
https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/24803125569
[skip changelog]
alpha/v6.8.0-beta.2.d013.g4a3780528a
2026-04-22 21:18:18 +00:00
uye
c45b476a30 chore: 简化公告日志记录 2026-04-23 00:43:39 +08:00
uye
3214aa96e7 fix: local-install 找不到 Artifact 2026-04-22 22:30:38 +08:00
uye
9c1ac90446 chore: tool 更新 2026-04-22 22:19:46 +08:00
uye
a1fb539856 fix: 内测版与其他类型版本对比时 removelist 会错误添加所有目录 2026-04-22 22:04:25 +08:00
uye
31fdcf191f chore: updater 额外保留 cache 文件夹 2026-04-22 20:32:03 +08:00