Skip to content

feat(maaend): 支持IMS - #1184

Open
HarcoChen wants to merge 1 commit into
devfrom
feat/maaend-native-sanity
Open

HarcoChen wants to merge 1 commit into
devfrom
feat/maaend-native-sanity

Conversation

@HarcoChen

@HarcoChen HarcoChen commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Sourcery 摘要

支持在由 MAS 管理的用户中选择由 MAS 指定的理智任务执行方式,或由 MaaEnd 原生执行理智任务。

新功能:

  • 新增 MaaEnd 原生理智任务执行策略,保留已启用的基于库存的任务及其目标。
  • 在用户界面中展示理智任务执行策略,并提供 MaaEnd 原生配置指南。

Bug 修复:

  • 防止 MAS 快速配置覆盖 MaaEnd 原生理智配置。

增强:

  • 更新配置持久化、叠加层、状态标签和任务调度,以区分由 MAS 管理的理智任务执行和 MaaEnd 原生理智任务执行。
  • 明确在使用原生策略时,MAS 理智模式和计划不会生效的情况。
Original summary in English

Summary by Sourcery

Support choosing between MAS-specified and MaaEnd-native sanity-task execution for managed users.

New Features:

  • Add a MaaEnd native sanity-task execution strategy that preserves enabled inventory-based tasks and targets.
  • Expose the sanity execution strategy and native MaaEnd configuration guidance in the user interface.

Bug Fixes:

  • Prevent native MaaEnd sanity configuration from being overridden by MAS quick configuration.

Enhancements:

  • Update configuration persistence, overlays, status tags, and task scheduling to distinguish MAS-managed and MaaEnd-native sanity execution.
  • Clarify when MAS sanity mode and plans are not applied under the native strategy.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @HarcoChen, you've used your own review budget of 250,000 diff characters for the last 7 days.

You can request another review in 1 hour and 43 minutes by commenting @sourcery-ai review. Upgrade to get a review now.

@sourcery-ai

sourcery-ai Bot commented Oct 3, 2026

Copy link
Copy Markdown

审查者指南

本 PR 为 MaaEnd 托管流程引入可配置的理智任务执行策略:默认使用 MAS 指定任务,同时允许沿用 MaaEnd 中已启用的原生任务和库存目标;后端调整快速配置的任务筛选、执行与完成判定,前端提供策略切换和按配置来源进入 MaaEnd 配置的入口,并同步更新配置回填、摘要和提示文案。

MaaEnd 原生理智任务执行时序图

sequenceDiagram
    participant User
    participant MAS as MAS托管流程
    participant AutoProxy
    participant MaaEnd

    User->>MAS: 选择原生理智策略
    MAS->>AutoProxy: get_task_book_name(task)
    AutoProxy->>MaaEnd: _source_maaend_tasks()
    MaaEnd-->>AutoProxy: 已启用的理智任务
    AutoProxy->>AutoProxy: _daily_once_task_done(task_name)
    AutoProxy-->>MAS: 保留已启用任务并执行
    MAS->>AutoProxy: _quick_task_daily_once_done("Sanity")
    AutoProxy-->>MAS: 所有原生理智任务完成状态
Loading

MaaEnd 理智策略选择流程图

flowchart TD
    A[启用理智任务] --> B{SanityStrategy}
    B -->|MAS| C[使用 MAS 指定理智任务]
    C --> D[应用理智模式与计划配置]
    B -->|Native| E[读取 MaaEnd 已启用的协议空间和基质刷取]
    E --> F[保留 MaaEnd 原生库存目标]
    F --> G[MAS 理智开关控制整组是否运行]
Loading

文件级变更

变更 详情 文件
新增理智任务执行策略配置,支持 MAS 指定任务与 MaaEnd 原生策略两种模式。
  • 扩展配置模型、Schema 和前端类型,并将默认策略设为 MAS。
  • 在标签与配置摘要中展示当前策略,并标记原生模式下 MAS 理智配置不生效。
app/models/config.py
app/models/schema.py
app/task/MaaEnd/tools/backup_archive.py
frontend/src/api/models/MaaEndUserConfig_Info.ts
将 MaaEnd 原生理智任务纳入快速配置的任务判断、执行和完成状态逻辑。
  • 原生模式下沿用 MaaEnd 已启用的协议空间、基质刷取等任务,不再根据 MAS 选择覆盖任务。
  • 按原生任务启用状态和每日完成状态判断阶段跳过、任务可执行性及理智组完成情况。
  • 更新缺少原生理智任务时的警告信息,并保留理智总开关对任务组的控制。
app/task/MaaEnd/AutoProxy.py
在 MaaEnd 用户编辑界面增加原生策略配置入口,并引导用户通过 MaaEnd 配置库存目标。
  • 新增执行策略选择、原生策略说明和配置入口;原生模式下隐藏或禁用 MAS 的固定任务、计划和路线配置。
  • 配置 MaaEnd 前先自动保存当前配置来源,分别支持脚本共享、用户独立和直控会话。
  • 补充库存目标来源、自动采集行为和原生策略的中文提示及交互状态。
frontend/src/i18n/locales/zh-CN.ts
frontend/src/views/EditView/User/MaaEndUserEdit.vue
frontend/src/views/MaaEndUserEdit/AutoCollectConfigSection.vue
frontend/src/views/MaaEndUserEdit/SanityConfigSection.vue
记录 MaaEnd 原生理智策略功能变更。
  • 新增功能变更日志。
changelog.d/feat-maaend-native-sanity.feat.md

提示与命令

与 Sourcery 交互

  • 触发新的审查: 在拉取请求中评论 @sourcery-ai review。
  • 继续讨论: 直接回复 Sourcery 的审查评论。
  • 根据审查评论生成 GitHub issue: 回复审查评论,请 Sourcery 根据该评论创建 issue。你也可以在审查评论中回复 @sourcery-ai issue,根据该评论创建 issue。
  • 生成拉取请求标题: 在拉取请求标题的任意位置写入 @sourcery-ai,即可随时生成标题。你也可以在拉取请求中评论 @sourcery-ai title,随时重新生成标题。
  • 生成拉取请求摘要: 在拉取请求正文中你希望插入摘要的位置写入 @sourcery-ai summary,即可随时生成 PR 摘要。你也可以在拉取请求中评论 @sourcery-ai summary,随时重新生成摘要。
  • 生成审查者指南: 在拉取请求中评论 @sourcery-ai guide,即可随时重新生成审查者指南。
  • 解决所有 Sourcery 评论: 在拉取请求中评论 @sourcery-ai resolve,即可解决所有 Sourcery 评论。如果你已经处理完所有评论且不想再看到它们,此功能非常有用。
  • 忽略所有 Sourcery 审查: 在拉取请求中评论 @sourcery-ai dismiss,即可忽略所有现有的 Sourcery 审查。如果你想从新的审查开始,这项功能尤其有用——别忘了评论 @sourcery-ai review 来触发新的审查!

自定义使用体验

访问你的控制面板以:

  • 启用或禁用审查功能,例如 Sourcery 生成的拉取请求摘要、审查者指南等。
  • 更改审查语言。
  • 添加、移除或编辑自定义审查说明。
  • 调整其他审查设置。

获取帮助

Original review guide in English

Reviewer's Guide

本 PR 为 MaaEnd 托管流程引入可配置的理智任务执行策略:默认使用 MAS 指定任务,同时允许沿用 MaaEnd 中已启用的原生任务和库存目标;后端调整快速配置的任务筛选、执行与完成判定,前端提供策略切换和按配置来源进入 MaaEnd 配置的入口,并同步更新配置回填、摘要和提示文案。

Sequence diagram for MaaEnd native sanity task execution

sequenceDiagram
    participant User
    participant MAS as MAS托管流程
    participant AutoProxy
    participant MaaEnd

    User->>MAS: 选择原生理智策略
    MAS->>AutoProxy: get_task_book_name(task)
    AutoProxy->>MaaEnd: _source_maaend_tasks()
    MaaEnd-->>AutoProxy: 已启用的理智任务
    AutoProxy->>AutoProxy: _daily_once_task_done(task_name)
    AutoProxy-->>MAS: 保留已启用任务并执行
    MAS->>AutoProxy: _quick_task_daily_once_done("Sanity")
    AutoProxy-->>MAS: 所有原生理智任务完成状态
Loading

Flow diagram for MaaEnd sanity strategy selection

flowchart TD
    A[启用理智任务] --> B{SanityStrategy}
    B -->|MAS| C[使用 MAS 指定理智任务]
    C --> D[应用理智模式与计划配置]
    B -->|Native| E[读取 MaaEnd 已启用的协议空间和基质刷取]
    E --> F[保留 MaaEnd 原生库存目标]
    F --> G[MAS 理智开关控制整组是否运行]
Loading

File-Level Changes

Change Details Files
新增理智任务执行策略配置,支持 MAS 指定任务与 MaaEnd 原生策略两种模式。
  • 扩展配置模型、Schema 和前端类型,并将默认策略设为 MAS。
  • 在标签与配置摘要中展示当前策略,并标记原生模式下 MAS 理智配置不生效。
app/models/config.py
app/models/schema.py
app/task/MaaEnd/tools/backup_archive.py
frontend/src/api/models/MaaEndUserConfig_Info.ts
将 MaaEnd 原生理智任务纳入快速配置的任务判断、执行和完成状态逻辑。
  • 原生模式下沿用 MaaEnd 已启用的协议空间、基质刷取等任务,不再根据 MAS 选择覆盖任务。
  • 按原生任务启用状态和每日完成状态判断阶段跳过、任务可执行性及理智组完成情况。
  • 更新缺少原生理智任务时的警告信息,并保留理智总开关对任务组的控制。
app/task/MaaEnd/AutoProxy.py
在 MaaEnd 用户编辑界面增加原生策略配置入口,并引导用户通过 MaaEnd 配置库存目标。
  • 新增执行策略选择、原生策略说明和配置入口;原生模式下隐藏或禁用 MAS 的固定任务、计划和路线配置。
  • 配置 MaaEnd 前先自动保存当前配置来源,分别支持脚本共享、用户独立和直控会话。
  • 补充库存目标来源、自动采集行为和原生策略的中文提示及交互状态。
frontend/src/i18n/locales/zh-CN.ts
frontend/src/views/EditView/User/MaaEndUserEdit.vue
frontend/src/views/MaaEndUserEdit/AutoCollectConfigSection.vue
frontend/src/views/MaaEndUserEdit/SanityConfigSection.vue
记录 MaaEnd 原生理智策略功能变更。
  • 新增功能变更日志。
changelog.d/feat-maaend-native-sanity.feat.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant