Skip to content

docs: PI v2.7 - pretask#1309

Open
MistEO wants to merge 4 commits into
mainfrom
docs/PI_2.7
Open

docs: PI v2.7 - pretask#1309
MistEO wants to merge 4 commits into
mainfrom
docs/PI_2.7

Conversation

@MistEO
Copy link
Copy Markdown
Member

@MistEO MistEO commented May 6, 2026

@MaaXYZ/ui-developers @MaaXYZ/application-developers 看看

fix #1308

Summary by Sourcery

为 v2.7.0 新增的 pretask 配置撰写文档,用于在 Controller 启动前运行自定义程序,并更新相关配置语义。

Build:

  • 更新接口 JSON 模式(schema),以包含新的 v2.7.0 pretask 配置字段。

Documentation:

  • 为 v2.7.0 的 pretask 字段新增英文和中文文档,包括其结构、执行行为以及选项参数序列化语义。
  • 说明 pretask.option 被排除在标准的选项覆盖/合并顺序之外,并且仅用于为预任务进程生成参数。
Original summary in English

Summary by Sourcery

Document the new v2.7.0 pretask configuration for running custom programs before Controller startup and update related configuration semantics.

Build:

  • Update the interface JSON schema to include the new v2.7.0 pretask configuration field.

Documentation:

  • Add English and Chinese documentation for the v2.7.0 pretask field, including its structure, execution behavior, and option argument serialization semantics.
  • Clarify that pretask.option is excluded from the standard option override/merge order and is used only to generate arguments for pre-task processes.

Copilot AI review requested due to automatic review settings May 6, 2026 15:48
Copy link
Copy Markdown
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.

Hey - 我在这里给出了一些总体反馈:

  • pretask.option 的描述中,建议显式说明序列化 JSON 参数的编码和转义方面的预期(例如 UTF-8、shell 转义规则),这样可以确保不同平台上的客户端实现行为一致。
  • 对于 pretask 字段是 object | object[] 的情况,可以加一句简短说明:单个对象等价于只包含该对象的单元素数组,这样客户端和 PI 作者就能对如何规范化和执行多个 pre-task 有明确、一致的预期。
面向 AI 代理的提示词
Please address the comments from this code review:

## Overall Comments
- In the `pretask.option` description, consider explicitly specifying the encoding and escaping expectations for the serialized JSON argument (e.g., UTF-8, shell-escaping rules) so client implementations across platforms behave consistently.
- For the `pretask` field being `object | object[]`, it may help to add a short note stating that a single object is treated equivalently to a single-element array so clients and PI authors have an unambiguous expectation for how multiple pre-tasks are normalized and executed.

Sourcery 对开源项目是免费的——如果你觉得我们的评审有帮助,欢迎分享 ✨
帮我变得更有用!请在每条评论上点 👍 或 👎,我会根据你的反馈改进后续评审。
Original comment in English

Hey - I've left some high level feedback:

  • In the pretask.option description, consider explicitly specifying the encoding and escaping expectations for the serialized JSON argument (e.g., UTF-8, shell-escaping rules) so client implementations across platforms behave consistently.
  • For the pretask field being object | object[], it may help to add a short note stating that a single object is treated equivalently to a single-element array so clients and PI authors have an unambiguous expectation for how multiple pre-tasks are normalized and executed.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- In the `pretask.option` description, consider explicitly specifying the encoding and escaping expectations for the serialized JSON argument (e.g., UTF-8, shell-escaping rules) so client implementations across platforms behave consistently.
- For the `pretask` field being `object | object[]`, it may help to add a short note stating that a single object is treated equivalently to a single-element array so clients and PI authors have an unambiguous expectation for how multiple pre-tasks are normalized and executed.

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.

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.

PI 草案 支持在游戏运行前运行一些agent代码

1 participant