@fitlab-ai/agent-infra 0.7.5 → 0.7.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/cli.ts +11 -3
- package/dist/bin/cli.js +10 -3
- package/dist/lib/sandbox/commands/create.js +26 -4
- package/dist/lib/sandbox/commands/ls.js +4 -33
- package/dist/lib/sandbox/commands/show.js +67 -0
- package/dist/lib/sandbox/index.js +7 -0
- package/dist/lib/sandbox/tools.js +20 -1
- package/dist/lib/task/commands/issue-body.js +94 -0
- package/dist/lib/task/commands/log.js +139 -6
- package/dist/lib/task/index.js +8 -0
- package/dist/lib/task/issue-form.js +66 -0
- package/dist/lib/task/sections.js +44 -0
- package/lib/sandbox/commands/create.ts +33 -4
- package/lib/sandbox/commands/ls.ts +4 -36
- package/lib/sandbox/commands/show.ts +80 -0
- package/lib/sandbox/index.ts +7 -0
- package/lib/sandbox/tools.ts +28 -1
- package/lib/task/commands/issue-body.ts +102 -0
- package/lib/task/commands/log.ts +146 -6
- package/lib/task/index.ts +8 -0
- package/lib/task/issue-form.ts +77 -0
- package/lib/task/sections.ts +44 -0
- package/package.json +3 -2
- package/templates/.agents/README.en.md +3 -1
- package/templates/.agents/README.zh-CN.md +3 -1
- package/templates/.agents/rules/create-issue.github.en.md +20 -29
- package/templates/.agents/rules/create-issue.github.zh-CN.md +20 -29
- package/templates/.agents/rules/issue-pr-commands.github.en.md +6 -0
- package/templates/.agents/rules/issue-pr-commands.github.zh-CN.md +6 -0
- package/templates/.agents/rules/next-step-output.en.md +26 -1
- package/templates/.agents/rules/next-step-output.zh-CN.md +26 -1
- package/templates/.agents/rules/no-mid-flow-questions.en.md +11 -0
- package/templates/.agents/rules/no-mid-flow-questions.zh-CN.md +11 -0
- package/templates/.agents/rules/review-handshake.en.md +15 -1
- package/templates/.agents/rules/review-handshake.zh-CN.md +15 -1
- package/templates/.agents/rules/task-management.en.md +27 -0
- package/templates/.agents/rules/task-management.zh-CN.md +31 -0
- package/templates/.agents/scripts/validate-artifact.js +11 -2
- package/templates/.agents/skills/analyze-task/SKILL.en.md +14 -1
- package/templates/.agents/skills/analyze-task/SKILL.zh-CN.md +14 -1
- package/templates/.agents/skills/archive-tasks/SKILL.en.md +3 -1
- package/templates/.agents/skills/archive-tasks/SKILL.zh-CN.md +3 -1
- package/templates/.agents/skills/block-task/SKILL.en.md +13 -1
- package/templates/.agents/skills/block-task/SKILL.zh-CN.md +13 -1
- package/templates/.agents/skills/cancel-task/SKILL.en.md +13 -1
- package/templates/.agents/skills/cancel-task/SKILL.zh-CN.md +14 -2
- package/templates/.agents/skills/check-task/SKILL.en.md +30 -81
- package/templates/.agents/skills/check-task/SKILL.zh-CN.md +30 -80
- package/templates/.agents/skills/close-codescan/SKILL.en.md +13 -1
- package/templates/.agents/skills/close-codescan/SKILL.zh-CN.md +13 -1
- package/templates/.agents/skills/close-dependabot/SKILL.en.md +13 -1
- package/templates/.agents/skills/close-dependabot/SKILL.zh-CN.md +13 -1
- package/templates/.agents/skills/code-task/SKILL.en.md +14 -1
- package/templates/.agents/skills/code-task/SKILL.zh-CN.md +14 -1
- package/templates/.agents/skills/code-task/reference/dual-mode.en.md +7 -2
- package/templates/.agents/skills/code-task/reference/dual-mode.zh-CN.md +7 -2
- package/templates/.agents/skills/code-task/scripts/detect-mode.js +6 -14
- package/templates/.agents/skills/commit/SKILL.en.md +37 -5
- package/templates/.agents/skills/commit/SKILL.zh-CN.md +37 -5
- package/templates/.agents/skills/complete-task/SKILL.en.md +13 -1
- package/templates/.agents/skills/complete-task/SKILL.zh-CN.md +13 -1
- package/templates/.agents/skills/create-pr/SKILL.en.md +23 -2
- package/templates/.agents/skills/create-pr/SKILL.zh-CN.md +23 -2
- package/templates/.agents/skills/create-release-note/SKILL.en.md +19 -2
- package/templates/.agents/skills/create-release-note/SKILL.zh-CN.md +19 -2
- package/templates/.agents/skills/create-task/SKILL.en.md +14 -1
- package/templates/.agents/skills/create-task/SKILL.zh-CN.md +17 -4
- package/templates/.agents/skills/import-codescan/SKILL.en.md +14 -1
- package/templates/.agents/skills/import-codescan/SKILL.zh-CN.md +14 -1
- package/templates/.agents/skills/import-dependabot/SKILL.en.md +14 -1
- package/templates/.agents/skills/import-dependabot/SKILL.zh-CN.md +14 -1
- package/templates/.agents/skills/import-issue/SKILL.en.md +35 -2
- package/templates/.agents/skills/import-issue/SKILL.zh-CN.md +35 -2
- package/templates/.agents/skills/init-labels/SKILL.en.md +3 -1
- package/templates/.agents/skills/init-labels/SKILL.zh-CN.md +3 -1
- package/templates/.agents/skills/init-milestones/SKILL.en.md +3 -1
- package/templates/.agents/skills/init-milestones/SKILL.zh-CN.md +3 -1
- package/templates/.agents/skills/plan-task/SKILL.en.md +15 -1
- package/templates/.agents/skills/plan-task/SKILL.zh-CN.md +15 -1
- package/templates/.agents/skills/post-release/SKILL.en.md +3 -1
- package/templates/.agents/skills/post-release/SKILL.zh-CN.md +3 -1
- package/templates/.agents/skills/refine-title/SKILL.en.md +3 -1
- package/templates/.agents/skills/refine-title/SKILL.zh-CN.md +3 -1
- package/templates/.agents/skills/release/SKILL.en.md +3 -1
- package/templates/.agents/skills/release/SKILL.zh-CN.md +3 -1
- package/templates/.agents/skills/restore-task/SKILL.en.md +13 -1
- package/templates/.agents/skills/restore-task/SKILL.zh-CN.md +13 -1
- package/templates/.agents/skills/review-analysis/SKILL.en.md +16 -2
- package/templates/.agents/skills/review-analysis/SKILL.zh-CN.md +16 -2
- package/templates/.agents/skills/review-analysis/reference/output-templates.en.md +1 -1
- package/templates/.agents/skills/review-analysis/reference/output-templates.zh-CN.md +1 -1
- package/templates/.agents/skills/review-analysis/reference/report-template.en.md +1 -1
- package/templates/.agents/skills/review-analysis/reference/report-template.zh-CN.md +1 -2
- package/templates/.agents/skills/review-analysis/reference/review-criteria.en.md +1 -0
- package/templates/.agents/skills/review-analysis/reference/review-criteria.zh-CN.md +1 -0
- package/templates/.agents/skills/review-code/SKILL.en.md +15 -2
- package/templates/.agents/skills/review-code/SKILL.zh-CN.md +15 -2
- package/templates/.agents/skills/review-code/reference/output-templates.en.md +1 -1
- package/templates/.agents/skills/review-code/reference/output-templates.zh-CN.md +1 -1
- package/templates/.agents/skills/review-code/reference/report-template.en.md +1 -1
- package/templates/.agents/skills/review-code/reference/report-template.zh-CN.md +1 -2
- package/templates/.agents/skills/review-code/reference/review-criteria.en.md +1 -0
- package/templates/.agents/skills/review-code/reference/review-criteria.zh-CN.md +1 -0
- package/templates/.agents/skills/review-plan/SKILL.en.md +16 -2
- package/templates/.agents/skills/review-plan/SKILL.zh-CN.md +16 -2
- package/templates/.agents/skills/review-plan/reference/output-templates.en.md +1 -1
- package/templates/.agents/skills/review-plan/reference/output-templates.zh-CN.md +1 -1
- package/templates/.agents/skills/review-plan/reference/report-template.en.md +1 -1
- package/templates/.agents/skills/review-plan/reference/report-template.zh-CN.md +1 -2
- package/templates/.agents/skills/review-plan/reference/review-criteria.en.md +1 -0
- package/templates/.agents/skills/review-plan/reference/review-criteria.zh-CN.md +1 -0
- package/templates/.agents/skills/test/SKILL.en.md +3 -1
- package/templates/.agents/skills/test/SKILL.zh-CN.md +1 -1
- package/templates/.agents/skills/test-integration/SKILL.en.md +3 -1
- package/templates/.agents/skills/test-integration/SKILL.zh-CN.md +3 -1
- package/templates/.agents/skills/update-agent-infra/SKILL.en.md +3 -1
- package/templates/.agents/skills/update-agent-infra/SKILL.zh-CN.md +3 -1
- package/templates/.agents/skills/upgrade-dependency/SKILL.en.md +3 -1
- package/templates/.agents/skills/upgrade-dependency/SKILL.zh-CN.md +3 -1
- package/templates/.agents/skills/watch-pr/SKILL.en.md +13 -1
- package/templates/.agents/skills/watch-pr/SKILL.zh-CN.md +13 -1
- package/templates/.agents/templates/task.en.md +5 -0
- package/templates/.agents/templates/task.zh-CN.md +5 -0
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: watch-pr
|
|
3
|
-
description:
|
|
3
|
+
description: >
|
|
4
|
+
监控 PR 的 required checks 并在失败时自愈。
|
|
5
|
+
当需要监控 PR 的 required checks 并在失败时自愈时使用。
|
|
4
6
|
---
|
|
5
7
|
|
|
6
8
|
# 监控 Pull Request
|
|
@@ -21,6 +23,16 @@ description: "监控 PR 的 required checks 并在失败时自愈"
|
|
|
21
23
|
|
|
22
24
|
> 如果 `{task-id}` 入参匹配 `^[#]?[0-9]+$`(裸数字或带 `#` 前缀),先读取 `.agents/rules/task-short-id.md` 的「SKILL 入参解析」段执行解析;后续命令视 `{task-id}` 为解析后的全长 `TASK-YYYYMMDD-HHMMSS` 形式。
|
|
23
25
|
|
|
26
|
+
## 步骤开始:写入 started 标记
|
|
27
|
+
|
|
28
|
+
确认前置条件后、本轮第一个产出动作之前,向 task.md `## 活动日志` 追加一条 started 标记(与本轮 done 条目同基名 + ` [started]` 后缀,note 用 `started`):
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Watch PR (Round {N}) [started]** by {agent} — started
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
`ai task log` 会把它与完成时写入的 done 条目配对成一行(进行中 → 已完成)。约定见 `.agents/rules/task-management.md` 的「Activity Log started / done 双标记约定」。
|
|
35
|
+
|
|
24
36
|
## 执行步骤
|
|
25
37
|
|
|
26
38
|
### 1. 解析入参
|
|
@@ -60,10 +60,15 @@ pr_status: pending # PR status: pending (default) | created (PR crea
|
|
|
60
60
|
| id | stage | round | severity | status | evidence |
|
|
61
61
|
|----|-------|-------|----------|--------|----------|
|
|
62
62
|
|
|
63
|
+
## Human Rulings
|
|
64
|
+
|
|
65
|
+
<!-- Humans record rulings for needs-human-decision decisions here and flip matching HD- rows in the Review Disagreement Ledger to human-decided. -->
|
|
66
|
+
|
|
63
67
|
## Activity Log
|
|
64
68
|
|
|
65
69
|
<!-- Append a new entry for each workflow step. Do NOT overwrite previous entries. -->
|
|
66
70
|
<!-- Format: - {YYYY-MM-DD HH:mm:ss±HH:MM} — **{step}** by {agent} — {brief summary} -->
|
|
71
|
+
<!-- Some workflow skills also write a started marker when the step begins (action suffixed with ` [started]`) and a done entry on completion; ai task log pairs them onto one row by base action. Convention: see .agents/rules/task-management.md. -->
|
|
67
72
|
|
|
68
73
|
## Completion Checklist
|
|
69
74
|
|
|
@@ -60,10 +60,15 @@ pr_status: pending # PR 状态:pending(默认)| created(已
|
|
|
60
60
|
| id | stage | round | severity | status | evidence |
|
|
61
61
|
|----|-------|-------|----------|--------|----------|
|
|
62
62
|
|
|
63
|
+
## 人工裁决
|
|
64
|
+
|
|
65
|
+
<!-- 人类在此记录对 needs-human-decision 决策的裁定,并把 ## 审查分歧账本 对应 HD- 行翻为 human-decided。 -->
|
|
66
|
+
|
|
63
67
|
## 活动日志
|
|
64
68
|
|
|
65
69
|
<!-- 每个工作流步骤追加一条新记录,不要覆盖之前的记录。 -->
|
|
66
70
|
<!-- 格式:- {YYYY-MM-DD HH:mm:ss±HH:MM} — **{步骤}** by {执行者} — {简要说明} -->
|
|
71
|
+
<!-- 部分工作流 SKILL 在步骤开始时额外写一条 started 标记(action 末尾加 ` [started]`),完成时再写 done;ai task log 会按基名把两者配对成一行。约定见 .agents/rules/task-management.md。 -->
|
|
67
72
|
|
|
68
73
|
## 完成检查清单
|
|
69
74
|
|