Skip to content

docs: PI v2.3#1142

Merged
MistEO merged 6 commits intomainfrom
docs/PI_2.3
Feb 26, 2026
Merged

docs: PI v2.3#1142
MistEO merged 6 commits intomainfrom
docs/PI_2.3

Conversation

@MistEO
Copy link
Member

@MistEO MistEO commented Feb 23, 2026

Summary by Sourcery

使示例接口定义和中文版《Project Interface V2》文档与 Project Interface V2.3-a1 保持一致。

Documentation:

  • 更新中文版《Project Interface V2》文档,以反映 PI v2.3-a1 规范。

Chores:

  • 刷新示例接口 JSON,使其与更新后的 Project Interface V2.3-a1 模式保持一致。
Original summary in English

Summary by Sourcery

Align sample interface definition and Chinese Project Interface V2 documentation with Project Interface V2.3-a1.

Documentation:

  • Update Chinese Project Interface V2 documentation to reflect the PI v2.3-a1 specification.

Chores:

  • Refresh sample interface JSON to match the updated Project Interface V2.3-a1 schema.

增强内容:

  • 调整示例接口 JSON 和校验模式,使其与更新后的 Project Interface V2.3-a1 格式保持一致。

文档:

  • 修订 Project Interface V2 的中文文档,使其与 PI v2.3-a1 版本对齐。
Original summary in English

Summary by Sourcery

使示例接口定义和中文版《Project Interface V2》文档与 Project Interface V2.3-a1 保持一致。

Documentation:

  • 更新中文版《Project Interface V2》文档,以反映 PI v2.3-a1 规范。

Chores:

  • 刷新示例接口 JSON,使其与更新后的 Project Interface V2.3-a1 模式保持一致。
Original summary in English

Summary by Sourcery

Align sample interface definition and Chinese Project Interface V2 documentation with Project Interface V2.3-a1.

Documentation:

  • Update Chinese Project Interface V2 documentation to reflect the PI v2.3-a1 specification.

Chores:

  • Refresh sample interface JSON to match the updated Project Interface V2.3-a1 schema.

- icon `string`
预设图标文件路径,相对于项目根目录。可选。支持国际化(以`$`开头)。

- task `object[]`
Copy link
Contributor

Choose a reason for hiding this comment

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

这里这个配置要不直接标准化下,这样UI可以统一用这个配置来存,后续要传给agent啥也就能操作了?
@MaaXYZ/ui-developers

Copy link
Member Author

Choose a reason for hiding this comment

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

没听懂)

Copy link
Member Author

Choose a reason for hiding this comment

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

哦你是说直接把 config 也订一套协议吗,感觉到也行,但不是特别有必要(

Copy link
Contributor

Choose a reason for hiding this comment

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

主要是目前这preset本质上就是要求ui能解析这个, 那还不如强制要求大家都用一套(

- 明确 option 覆盖顺序:global → resource → controller → task
- 明确 checkbox override 按 cases 定义顺序合并,与用户勾选顺序无关
- 合并 default_case/default_cases 为 default_case 支持 string | string[]
- global_option 示例改为战斗划火柴、战斗自动闪避
- preset 支持通过 import 分文件管理
- 修正 resource.option 描述为"资源包级"

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@MistEO
Copy link
Member Author

MistEO commented Feb 26, 2026

@neko-para @MaaXYZ/ui-developers @MaaXYZ/application-developers 再看看

MistEO and others added 2 commits February 26, 2026 14:53
- 添加 checkbox 类型选项(战斗划火柴)
- 添加 controller.option(战斗自动闪避)
- 添加 resource.option 示例
- 添加 global_option 示例
- 添加 preset 预设配置示例(刷日常、全力刷本)
- default_case 使用数组形式(checkbox 类型)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- 文档: 在 option 定义中新增 resource 字段,用于限制配置项仅在特定资源包下可用
- 示例: 为"作战关卡"选项添加 resource: ["Official"] 示例
- 版本记录补充 option.resource

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- default_case `string` | `string[]`
默认选项名称。可选。
- 当 `type` 为 `"select"` / `"switch"` 时,填写单个字符串,Client 使用该值作为选项的初始选中值。
- 当 `type` 为 `"checkbox"` 时,填写字符串数组,Client 使用该值作为多选框的初始选中值。 **💡 v2.3.0**
Copy link
Contributor

Choose a reason for hiding this comment

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

要不用default_cases, 没必要用同一个名字吧(

Copy link
Member Author

Choose a reason for hiding this comment

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

然后就会有一堆人把这俩用串了然后来问为什么不生效)

@MistEO MistEO changed the title docs: PI v2.3-a1 docs: PI v2.3 Feb 26, 2026
@MistEO MistEO marked this pull request as ready for review February 26, 2026 17:34
Copilot AI review requested due to automatic review settings February 26, 2026 17:34
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

嗨,我已经审查了你的更改,一切看起来都很棒!


Sourcery 对开源项目是免费的——如果你觉得我们的代码审查有帮助,请考虑分享给他人 ✨
帮我变得更有用吧!请在每条评论上点 👍 或 👎,我会根据你的反馈来改进以后的代码审查。
Original comment in English

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the Project Interface V2 to version 2.3-a1, introducing a hierarchical option system, multi-select checkbox options, and preset configurations. The Chinese documentation (docs/zh_cn/3.3-ProjectInterfaceV2协议.md) has been updated with comprehensive v2.3.0 annotations, and the sample interface.json demonstrates all new features with clear inline comments.

Changes:

  • Added v2.3.0 features to sample/interface.json: controller/resource/global-level options, checkbox type, preset configurations, and option filtering by resource
  • Updated Chinese documentation with v2.3.0 version entry and complete feature documentation including hierarchical option override system
  • Introduced new hierarchical option priority system: global_option → resource.option → controller.option → task.option (lowest to highest priority)

@MistEO MistEO merged commit 4165b11 into main Feb 26, 2026
1 check passed
@MistEO MistEO deleted the docs/PI_2.3 branch February 26, 2026 18:49
MistEO added a commit that referenced this pull request Feb 27, 2026
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
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.

3 participants