@fitlab-ai/agent-infra 0.7.2 → 0.7.4

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.
Files changed (126) hide show
  1. package/README.md +35 -787
  2. package/README.zh-CN.md +37 -762
  3. package/bin/cli.ts +1 -1
  4. package/dist/bin/cli.js +1 -1
  5. package/dist/lib/defaults.json +0 -1
  6. package/dist/lib/init.js +0 -3
  7. package/dist/lib/sandbox/commands/create.js +44 -3
  8. package/dist/lib/sandbox/commands/enter.js +13 -15
  9. package/dist/lib/sandbox/commands/list-running.js +36 -1
  10. package/dist/lib/sandbox/commands/ls.js +9 -4
  11. package/dist/lib/sandbox/commands/rm.js +99 -19
  12. package/dist/lib/sandbox/commands/start.js +36 -0
  13. package/dist/lib/sandbox/index.js +11 -1
  14. package/dist/lib/sandbox/readme-scaffold.js +6 -6
  15. package/dist/lib/table.js +11 -2
  16. package/dist/lib/task/artifacts.js +58 -0
  17. package/dist/lib/task/commands/cat.js +38 -0
  18. package/dist/lib/task/commands/files.js +47 -0
  19. package/dist/lib/task/commands/grep.js +143 -0
  20. package/dist/lib/task/commands/log.js +75 -0
  21. package/dist/lib/task/commands/ls.js +1 -1
  22. package/dist/lib/task/commands/show.js +5 -114
  23. package/dist/lib/task/commands/status.js +239 -0
  24. package/dist/lib/task/index.js +37 -0
  25. package/dist/lib/task/resolve-ref.js +150 -0
  26. package/dist/lib/task/short-id.js +10 -0
  27. package/dist/lib/update.js +25 -8
  28. package/lib/defaults.json +0 -1
  29. package/lib/init.ts +0 -10
  30. package/lib/sandbox/commands/create.ts +47 -4
  31. package/lib/sandbox/commands/enter.ts +33 -14
  32. package/lib/sandbox/commands/list-running.ts +43 -1
  33. package/lib/sandbox/commands/ls.ts +12 -4
  34. package/lib/sandbox/commands/rm.ts +128 -19
  35. package/lib/sandbox/commands/start.ts +61 -0
  36. package/lib/sandbox/index.ts +11 -1
  37. package/lib/sandbox/readme-scaffold.ts +6 -6
  38. package/lib/table.ts +14 -2
  39. package/lib/task/artifacts.ts +72 -0
  40. package/lib/task/commands/cat.ts +39 -0
  41. package/lib/task/commands/files.ts +53 -0
  42. package/lib/task/commands/grep.ts +147 -0
  43. package/lib/task/commands/log.ts +80 -0
  44. package/lib/task/commands/ls.ts +1 -1
  45. package/lib/task/commands/show.ts +5 -117
  46. package/lib/task/commands/status.ts +302 -0
  47. package/lib/task/index.ts +37 -0
  48. package/lib/task/resolve-ref.ts +160 -0
  49. package/lib/task/short-id.ts +10 -0
  50. package/lib/update.ts +28 -10
  51. package/package.json +1 -1
  52. package/templates/.agents/README.en.md +1 -0
  53. package/templates/.agents/README.zh-CN.md +1 -0
  54. package/templates/.agents/hooks/auto-resume.sh +21 -4
  55. package/templates/.agents/rules/README.en.md +41 -0
  56. package/templates/.agents/rules/README.zh-CN.md +40 -0
  57. package/templates/.agents/rules/debugging-guide.en.md +25 -0
  58. package/templates/.agents/rules/debugging-guide.zh-CN.md +25 -0
  59. package/templates/.agents/rules/next-step-output.en.md +6 -3
  60. package/templates/.agents/rules/next-step-output.zh-CN.md +6 -3
  61. package/templates/.agents/rules/pr-checks-commands.en.md +5 -0
  62. package/templates/.agents/rules/pr-checks-commands.github.en.md +62 -0
  63. package/templates/.agents/rules/pr-checks-commands.github.zh-CN.md +62 -0
  64. package/templates/.agents/rules/pr-checks-commands.zh-CN.md +5 -0
  65. package/templates/.agents/rules/pr-sync.github.en.md +7 -0
  66. package/templates/.agents/rules/pr-sync.github.zh-CN.md +7 -0
  67. package/templates/.agents/skills/analyze-task/SKILL.en.md +1 -1
  68. package/templates/.agents/skills/analyze-task/SKILL.zh-CN.md +1 -1
  69. package/templates/.agents/skills/block-task/SKILL.en.md +8 -1
  70. package/templates/.agents/skills/block-task/SKILL.zh-CN.md +8 -1
  71. package/templates/.agents/skills/cancel-task/SKILL.en.md +8 -1
  72. package/templates/.agents/skills/cancel-task/SKILL.zh-CN.md +8 -1
  73. package/templates/.agents/skills/check-task/SKILL.en.md +1 -1
  74. package/templates/.agents/skills/check-task/SKILL.zh-CN.md +1 -1
  75. package/templates/.agents/skills/close-codescan/SKILL.en.md +8 -1
  76. package/templates/.agents/skills/close-codescan/SKILL.zh-CN.md +8 -1
  77. package/templates/.agents/skills/close-dependabot/SKILL.en.md +8 -1
  78. package/templates/.agents/skills/close-dependabot/SKILL.zh-CN.md +8 -1
  79. package/templates/.agents/skills/code-task/SKILL.en.md +3 -1
  80. package/templates/.agents/skills/code-task/SKILL.zh-CN.md +3 -1
  81. package/templates/.agents/skills/commit/SKILL.en.md +2 -3
  82. package/templates/.agents/skills/commit/SKILL.zh-CN.md +2 -3
  83. package/templates/.agents/skills/commit/reference/task-status-update.en.md +31 -23
  84. package/templates/.agents/skills/commit/reference/task-status-update.zh-CN.md +31 -23
  85. package/templates/.agents/skills/complete-task/SKILL.en.md +36 -3
  86. package/templates/.agents/skills/complete-task/SKILL.zh-CN.md +36 -3
  87. package/templates/.agents/skills/create-pr/SKILL.en.md +16 -7
  88. package/templates/.agents/skills/create-pr/SKILL.zh-CN.md +16 -7
  89. package/templates/.agents/skills/create-pr/reference/comment-publish.en.md +1 -0
  90. package/templates/.agents/skills/create-pr/reference/comment-publish.zh-CN.md +1 -0
  91. package/templates/.agents/skills/create-task/SKILL.en.md +1 -1
  92. package/templates/.agents/skills/create-task/SKILL.zh-CN.md +1 -1
  93. package/templates/.agents/skills/import-codescan/SKILL.en.md +1 -1
  94. package/templates/.agents/skills/import-codescan/SKILL.zh-CN.md +1 -1
  95. package/templates/.agents/skills/import-dependabot/SKILL.en.md +1 -1
  96. package/templates/.agents/skills/import-dependabot/SKILL.zh-CN.md +1 -1
  97. package/templates/.agents/skills/import-issue/SKILL.en.md +1 -1
  98. package/templates/.agents/skills/import-issue/SKILL.zh-CN.md +1 -1
  99. package/templates/.agents/skills/plan-task/SKILL.en.md +1 -1
  100. package/templates/.agents/skills/plan-task/SKILL.zh-CN.md +1 -1
  101. package/templates/.agents/skills/review-analysis/SKILL.en.md +1 -1
  102. package/templates/.agents/skills/review-analysis/SKILL.zh-CN.md +1 -1
  103. package/templates/.agents/skills/review-code/SKILL.en.md +1 -1
  104. package/templates/.agents/skills/review-code/SKILL.zh-CN.md +1 -1
  105. package/templates/.agents/skills/review-plan/SKILL.en.md +1 -1
  106. package/templates/.agents/skills/review-plan/SKILL.zh-CN.md +1 -1
  107. package/templates/.agents/skills/update-agent-infra/scripts/sync-templates.js +0 -1
  108. package/templates/.agents/skills/watch-pr/SKILL.en.md +131 -0
  109. package/templates/.agents/skills/watch-pr/SKILL.zh-CN.md +131 -0
  110. package/templates/.agents/skills/watch-pr/config/verify.json +22 -0
  111. package/templates/.agents/skills/watch-pr/reference/monitor-and-heal.en.md +43 -0
  112. package/templates/.agents/skills/watch-pr/reference/monitor-and-heal.zh-CN.md +43 -0
  113. package/templates/.agents/templates/task.en.md +1 -0
  114. package/templates/.agents/templates/task.zh-CN.md +1 -0
  115. package/templates/.agents/workflows/bug-fix.en.yaml +6 -4
  116. package/templates/.agents/workflows/bug-fix.zh-CN.yaml +5 -4
  117. package/templates/.agents/workflows/feature-development.en.yaml +6 -4
  118. package/templates/.agents/workflows/feature-development.zh-CN.yaml +5 -4
  119. package/templates/.agents/workflows/refactoring.en.yaml +6 -4
  120. package/templates/.agents/workflows/refactoring.zh-CN.yaml +5 -4
  121. package/templates/.claude/commands/watch-pr.en.md +8 -0
  122. package/templates/.claude/commands/watch-pr.zh-CN.md +8 -0
  123. package/templates/.gemini/commands/_project_/watch-pr.en.toml +8 -0
  124. package/templates/.gemini/commands/_project_/watch-pr.zh-CN.toml +8 -0
  125. package/templates/.opencode/commands/watch-pr.en.md +11 -0
  126. package/templates/.opencode/commands/watch-pr.zh-CN.md +11 -0
@@ -1,8 +1,9 @@
1
1
  # 功能开发工作流
2
2
  # 实现新功能时使用此工作流。
3
3
  #
4
- # 注:步骤中的 `pr_tasks` 列表仅在 `.agents/.airc.json:requiresPullRequest !== false` 时
5
- # 被计入工作流进度判定(详见 .agents/skills/complete-task/SKILL.md)。
4
+ # 注:步骤中的 `pr_tasks` 列表按「走 PR 路径」判定是否计入工作流进度:
5
+ # `.agents/.airc.json:prFlow="required"` 始终计入;`prFlow="disabled"` 不计入;
6
+ # 字段缺省时仅当 task.md 的 `pr_status=skipped` 排除,否则计入(详见 .agents/skills/complete-task/SKILL.md)。
6
7
 
7
8
  name: feature-development
8
9
  description: 开发新功能的端到端工作流。
@@ -176,7 +177,7 @@ steps:
176
177
  - 待修复问题列表
177
178
 
178
179
  - name: commit
179
- description: 最终确认变更并创建拉取请求(PR 部分仅在项目启用 PR 流程时执行)。
180
+ description: 最终确认变更并创建拉取请求(PR 部分仅在走 PR 路径时执行)。
180
181
  recommended_agents:
181
182
  - claude
182
183
  - human
@@ -192,4 +193,4 @@ steps:
192
193
  - 任务文件
193
194
  outputs:
194
195
  - 已完成的任务文件(位于 .agents/workspace/completed/)
195
- - 拉取请求(仅项目启用 PR 流程时)
196
+ - 拉取请求(仅走 PR 路径时)
@@ -1,8 +1,10 @@
1
1
  # Refactoring workflow
2
2
  # Use this workflow for code refactoring tasks.
3
3
  #
4
- # Note: a step's `pr_tasks` list is counted toward workflow progress only when
5
- # `.agents/.airc.json:requiresPullRequest !== false` (see .agents/skills/complete-task/SKILL.md).
4
+ # Note: whether a step's `pr_tasks` list counts toward workflow progress follows the "PR path" rule:
5
+ # `.agents/.airc.json:prFlow="required"` always counts; `prFlow="disabled"` never counts;
6
+ # when the field is absent, exclude only if task.md's `pr_status=skipped`, otherwise count
7
+ # (see .agents/skills/complete-task/SKILL.md).
6
8
 
7
9
  name: refactoring
8
10
  description: Safe and structured workflow for code refactoring.
@@ -180,7 +182,7 @@ steps:
180
182
  - Findings list, if any
181
183
 
182
184
  - name: commit
183
- description: Finalize the refactoring and create a pull request (the PR portion runs only when the project enables the PR flow).
185
+ description: Finalize the refactoring and create a pull request (the PR portion runs only on the PR path).
184
186
  recommended_agents:
185
187
  - claude
186
188
  - human
@@ -196,4 +198,4 @@ steps:
196
198
  - Task workspace
197
199
  outputs:
198
200
  - Completed task workspace under .agents/workspace/completed/
199
- - Pull request (only when the project enables the PR flow)
201
+ - Pull request (only on the PR path)
@@ -1,8 +1,9 @@
1
1
  # 重构工作流
2
2
  # 代码重构任务时使用此工作流。
3
3
  #
4
- # 注:步骤中的 `pr_tasks` 列表仅在 `.agents/.airc.json:requiresPullRequest !== false` 时
5
- # 被计入工作流进度判定(详见 .agents/skills/complete-task/SKILL.md)。
4
+ # 注:步骤中的 `pr_tasks` 列表按「走 PR 路径」判定是否计入工作流进度:
5
+ # `.agents/.airc.json:prFlow="required"` 始终计入;`prFlow="disabled"` 不计入;
6
+ # 字段缺省时仅当 task.md 的 `pr_status=skipped` 排除,否则计入(详见 .agents/skills/complete-task/SKILL.md)。
6
7
 
7
8
  name: refactoring
8
9
  description: 安全且结构化的代码重构工作流。
@@ -180,7 +181,7 @@ steps:
180
181
  - 问题列表(如有)
181
182
 
182
183
  - name: commit
183
- description: 最终确认重构并创建拉取请求(PR 部分仅在项目启用 PR 流程时执行)。
184
+ description: 最终确认重构并创建拉取请求(PR 部分仅在走 PR 路径时执行)。
184
185
  recommended_agents:
185
186
  - claude
186
187
  - human
@@ -196,4 +197,4 @@ steps:
196
197
  - 任务文件
197
198
  outputs:
198
199
  - 已完成的任务文件(位于 .agents/workspace/completed/)
199
- - 拉取请求(仅项目启用 PR 流程时)
200
+ - 拉取请求(仅走 PR 路径时)
@@ -0,0 +1,8 @@
1
+ ---
2
+ description: "Watch a PR's required checks and self-heal on failure"
3
+ usage: "/watch-pr [task-id | --pr <number>]"
4
+ ---
5
+
6
+ Read and execute the watch-pr skill from `.agents/skills/watch-pr/SKILL.md`.
7
+
8
+ Follow all steps defined in the skill exactly.
@@ -0,0 +1,8 @@
1
+ ---
2
+ description: "监控 PR 的 required checks 并在失败时自愈"
3
+ usage: "/watch-pr [task-id | --pr <number>]"
4
+ ---
5
+
6
+ 读取并执行 `.agents/skills/watch-pr/SKILL.md` 中的 watch-pr 技能。
7
+
8
+ 严格按照技能中定义的所有步骤执行。
@@ -0,0 +1,8 @@
1
+ description = "Watch a PR's required checks and self-heal on failure"
2
+ prompt = """
3
+ Watch PR checks: {{args}}
4
+
5
+ Read and execute the watch-pr skill from `.agents/skills/watch-pr/SKILL.md`.
6
+
7
+ Follow all steps defined in the skill exactly.
8
+ """
@@ -0,0 +1,8 @@
1
+ description = "监控 PR 的 required checks 并在失败时自愈"
2
+ prompt = """
3
+ 监控 PR 检查:{{args}}
4
+
5
+ 读取并执行 `.agents/skills/watch-pr/SKILL.md` 中的 watch-pr 技能。
6
+
7
+ 严格按照技能中定义的所有步骤执行。
8
+ """
@@ -0,0 +1,11 @@
1
+ ---
2
+ description: "Watch a PR's required checks and self-heal on failure"
3
+ agent: general
4
+ subtask: false
5
+ ---
6
+
7
+ Watch PR checks: $ARGUMENTS
8
+
9
+ Read and execute the watch-pr skill from `.agents/skills/watch-pr/SKILL.md`.
10
+
11
+ Follow all steps defined in the skill exactly.
@@ -0,0 +1,11 @@
1
+ ---
2
+ description: "监控 PR 的 required checks 并在失败时自愈"
3
+ agent: general
4
+ subtask: false
5
+ ---
6
+
7
+ 监控 PR 检查:$ARGUMENTS
8
+
9
+ 读取并执行 `.agents/skills/watch-pr/SKILL.md` 中的 watch-pr 技能。
10
+
11
+ 严格按照技能中定义的所有步骤执行。