@fitlab-ai/agent-infra 0.5.6 → 0.5.8

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 (166) hide show
  1. package/README.md +92 -4
  2. package/README.zh-CN.md +92 -4
  3. package/bin/cli.js +28 -4
  4. package/lib/defaults.json +5 -2
  5. package/lib/init.js +86 -5
  6. package/lib/prompt.js +28 -1
  7. package/lib/render.js +1 -1
  8. package/lib/sandbox/commands/rm.js +6 -4
  9. package/lib/sandbox/commands/vm.js +43 -16
  10. package/lib/sandbox/config.js +5 -0
  11. package/lib/sandbox/engine.js +144 -16
  12. package/lib/sandbox/shell.js +36 -2
  13. package/lib/sandbox/task-resolver.js +13 -6
  14. package/lib/update.js +14 -3
  15. package/package.json +5 -5
  16. package/templates/.agents/QUICKSTART.en.md +19 -2
  17. package/templates/.agents/QUICKSTART.zh-CN.md +19 -2
  18. package/templates/.agents/README.en.md +71 -2
  19. package/templates/.agents/README.zh-CN.md +71 -2
  20. package/templates/.agents/rules/issue-pr-commands.en.md +5 -0
  21. package/templates/.agents/rules/issue-pr-commands.github.en.md +60 -0
  22. package/templates/.agents/rules/issue-pr-commands.github.zh-CN.md +60 -0
  23. package/templates/.agents/rules/issue-pr-commands.zh-CN.md +5 -0
  24. package/templates/.agents/rules/issue-sync.en.md +19 -0
  25. package/templates/.agents/rules/issue-sync.github.en.md +14 -0
  26. package/templates/.agents/rules/issue-sync.github.zh-CN.md +14 -0
  27. package/templates/.agents/rules/issue-sync.zh-CN.md +19 -0
  28. package/templates/.agents/rules/label-milestone-setup.en.md +5 -0
  29. package/templates/.agents/rules/label-milestone-setup.github.en.md +10 -0
  30. package/templates/.agents/rules/label-milestone-setup.github.zh-CN.md +10 -0
  31. package/templates/.agents/rules/label-milestone-setup.zh-CN.md +5 -0
  32. package/templates/.agents/rules/milestone-inference.en.md +5 -0
  33. package/templates/.agents/rules/milestone-inference.zh-CN.md +5 -0
  34. package/templates/.agents/rules/pr-sync.en.md +5 -0
  35. package/templates/.agents/rules/pr-sync.zh-CN.md +5 -0
  36. package/templates/.agents/rules/release-commands.en.md +5 -0
  37. package/templates/.agents/rules/release-commands.github.en.md +16 -0
  38. package/templates/.agents/rules/release-commands.github.zh-CN.md +16 -0
  39. package/templates/.agents/rules/release-commands.zh-CN.md +5 -0
  40. package/templates/.agents/rules/security-alerts.en.md +5 -0
  41. package/templates/.agents/rules/security-alerts.zh-CN.md +5 -0
  42. package/templates/.agents/scripts/platform-adapters/find-existing-task.github.js +272 -0
  43. package/templates/.agents/scripts/platform-adapters/find-existing-task.js +5 -0
  44. package/templates/.agents/scripts/platform-adapters/platform-sync.github.js +88 -8
  45. package/templates/.agents/scripts/platform-adapters/platform-sync.js +13 -0
  46. package/templates/.agents/skills/analyze-task/SKILL.en.md +5 -5
  47. package/templates/.agents/skills/analyze-task/SKILL.zh-CN.md +5 -5
  48. package/templates/.agents/skills/analyze-task/config/verify.json +3 -1
  49. package/templates/.agents/skills/block-task/SKILL.en.md +1 -1
  50. package/templates/.agents/skills/block-task/SKILL.zh-CN.md +1 -1
  51. package/templates/.agents/skills/block-task/config/verify.json +2 -1
  52. package/templates/.agents/skills/cancel-task/SKILL.en.md +3 -3
  53. package/templates/.agents/skills/cancel-task/SKILL.zh-CN.md +4 -4
  54. package/templates/.agents/skills/cancel-task/config/verify.json +2 -1
  55. package/templates/.agents/skills/check-task/SKILL.en.md +1 -1
  56. package/templates/.agents/skills/check-task/SKILL.zh-CN.md +1 -1
  57. package/templates/.agents/skills/close-codescan/SKILL.en.md +3 -3
  58. package/templates/.agents/skills/close-codescan/SKILL.zh-CN.md +3 -3
  59. package/templates/.agents/skills/close-dependabot/SKILL.en.md +1 -1
  60. package/templates/.agents/skills/close-dependabot/SKILL.zh-CN.md +1 -1
  61. package/templates/.agents/skills/commit/SKILL.en.md +2 -2
  62. package/templates/.agents/skills/commit/SKILL.zh-CN.md +2 -2
  63. package/templates/.agents/skills/commit/config/verify.json +2 -1
  64. package/templates/.agents/skills/complete-task/SKILL.en.md +1 -1
  65. package/templates/.agents/skills/complete-task/SKILL.zh-CN.md +1 -1
  66. package/templates/.agents/skills/complete-task/config/verify.json +2 -1
  67. package/templates/.agents/skills/create-issue/SKILL.en.md +10 -10
  68. package/templates/.agents/skills/create-issue/SKILL.zh-CN.md +10 -10
  69. package/templates/.agents/skills/create-issue/config/verify.json +2 -1
  70. package/templates/.agents/skills/create-issue/reference/label-and-type.en.md +3 -3
  71. package/templates/.agents/skills/create-issue/reference/label-and-type.zh-CN.md +3 -3
  72. package/templates/.agents/skills/create-issue/reference/template-matching.en.md +6 -34
  73. package/templates/.agents/skills/create-issue/reference/template-matching.zh-CN.md +8 -36
  74. package/templates/.agents/skills/create-pr/SKILL.en.md +3 -3
  75. package/templates/.agents/skills/create-pr/SKILL.zh-CN.md +3 -3
  76. package/templates/.agents/skills/create-pr/config/verify.json +2 -1
  77. package/templates/.agents/skills/create-pr/reference/pr-body-template.en.md +7 -17
  78. package/templates/.agents/skills/create-pr/reference/pr-body-template.zh-CN.md +27 -37
  79. package/templates/.agents/skills/create-release-note/SKILL.en.md +16 -9
  80. package/templates/.agents/skills/create-release-note/SKILL.zh-CN.md +16 -9
  81. package/templates/.agents/skills/create-task/SKILL.en.md +5 -5
  82. package/templates/.agents/skills/create-task/SKILL.zh-CN.md +5 -5
  83. package/templates/.agents/skills/implement-task/SKILL.en.md +3 -3
  84. package/templates/.agents/skills/implement-task/SKILL.zh-CN.md +3 -3
  85. package/templates/.agents/skills/implement-task/config/verify.json +3 -1
  86. package/templates/.agents/skills/import-codescan/SKILL.en.md +3 -3
  87. package/templates/.agents/skills/import-codescan/SKILL.zh-CN.md +3 -3
  88. package/templates/.agents/skills/import-dependabot/SKILL.en.md +2 -2
  89. package/templates/.agents/skills/import-dependabot/SKILL.zh-CN.md +2 -2
  90. package/templates/.agents/skills/import-issue/SKILL.en.md +41 -11
  91. package/templates/.agents/skills/import-issue/SKILL.zh-CN.md +41 -11
  92. package/templates/.agents/skills/init-labels/SKILL.en.md +10 -10
  93. package/templates/.agents/skills/init-labels/SKILL.zh-CN.md +10 -10
  94. package/templates/.agents/skills/init-labels/scripts/init-labels.sh +6 -0
  95. package/templates/.agents/skills/init-milestones/SKILL.en.md +8 -8
  96. package/templates/.agents/skills/init-milestones/SKILL.zh-CN.md +8 -8
  97. package/templates/.agents/skills/init-milestones/scripts/init-milestones.sh +6 -0
  98. package/templates/.agents/skills/plan-task/SKILL.en.md +3 -3
  99. package/templates/.agents/skills/plan-task/SKILL.zh-CN.md +3 -3
  100. package/templates/.agents/skills/plan-task/config/verify.json +3 -1
  101. package/templates/.agents/skills/post-release/SKILL.en.md +95 -0
  102. package/templates/.agents/skills/post-release/SKILL.zh-CN.md +95 -0
  103. package/templates/.agents/skills/refine-task/SKILL.en.md +2 -2
  104. package/templates/.agents/skills/refine-task/SKILL.zh-CN.md +2 -2
  105. package/templates/.agents/skills/refine-task/config/verify.json +3 -1
  106. package/templates/.agents/skills/refine-title/SKILL.en.md +1 -1
  107. package/templates/.agents/skills/refine-title/SKILL.zh-CN.md +1 -1
  108. package/templates/.agents/skills/release/SKILL.en.md +6 -1
  109. package/templates/.agents/skills/release/SKILL.zh-CN.md +6 -1
  110. package/templates/.agents/skills/release/scripts/manage-milestones.sh +6 -0
  111. package/templates/.agents/skills/restore-task/SKILL.en.md +13 -64
  112. package/templates/.agents/skills/restore-task/SKILL.zh-CN.md +13 -64
  113. package/templates/.agents/skills/review-task/SKILL.en.md +3 -3
  114. package/templates/.agents/skills/review-task/SKILL.zh-CN.md +3 -3
  115. package/templates/.agents/skills/review-task/config/verify.json +3 -1
  116. package/templates/.agents/skills/test/SKILL.en.md +1 -1
  117. package/templates/.agents/skills/test/SKILL.zh-CN.md +1 -1
  118. package/templates/.agents/skills/test-integration/SKILL.en.md +1 -1
  119. package/templates/.agents/skills/test-integration/SKILL.zh-CN.md +1 -1
  120. package/templates/.agents/skills/update-agent-infra/SKILL.en.md +12 -2
  121. package/templates/.agents/skills/update-agent-infra/SKILL.zh-CN.md +6 -2
  122. package/templates/.agents/skills/update-agent-infra/scripts/sync-templates.js +344 -16
  123. package/templates/.agents/skills/upgrade-dependency/SKILL.en.md +1 -1
  124. package/templates/.agents/skills/upgrade-dependency/SKILL.zh-CN.md +1 -1
  125. package/templates/.agents/templates/task.en.md +2 -2
  126. package/templates/.agents/templates/task.zh-CN.md +2 -2
  127. package/templates/.claude/commands/create-issue.en.md +1 -1
  128. package/templates/.claude/commands/create-issue.zh-CN.md +1 -1
  129. package/templates/.claude/commands/import-issue.en.md +1 -1
  130. package/templates/.claude/commands/import-issue.zh-CN.md +1 -1
  131. package/templates/.claude/commands/init-labels.en.md +1 -1
  132. package/templates/.claude/commands/init-labels.zh-CN.md +1 -1
  133. package/templates/.claude/commands/init-milestones.en.md +1 -1
  134. package/templates/.claude/commands/init-milestones.zh-CN.md +1 -1
  135. package/templates/.claude/commands/post-release.en.md +8 -0
  136. package/templates/.claude/commands/post-release.zh-CN.md +8 -0
  137. package/templates/.claude/commands/restore-task.en.md +1 -1
  138. package/templates/.claude/commands/restore-task.zh-CN.md +1 -1
  139. package/templates/.claude/hooks/check-version-format.sh +1 -1
  140. package/templates/.gemini/commands/_project_/create-issue.en.toml +1 -1
  141. package/templates/.gemini/commands/_project_/create-issue.zh-CN.toml +1 -1
  142. package/templates/.gemini/commands/_project_/import-issue.en.toml +1 -1
  143. package/templates/.gemini/commands/_project_/import-issue.zh-CN.toml +1 -1
  144. package/templates/.gemini/commands/_project_/init-labels.en.toml +2 -2
  145. package/templates/.gemini/commands/_project_/init-labels.zh-CN.toml +2 -2
  146. package/templates/.gemini/commands/_project_/init-milestones.en.toml +2 -2
  147. package/templates/.gemini/commands/_project_/init-milestones.zh-CN.toml +2 -2
  148. package/templates/.gemini/commands/_project_/post-release.en.toml +6 -0
  149. package/templates/.gemini/commands/_project_/post-release.zh-CN.toml +6 -0
  150. package/templates/.gemini/commands/_project_/restore-task.en.toml +1 -1
  151. package/templates/.gemini/commands/_project_/restore-task.zh-CN.toml +1 -1
  152. package/templates/{.github/hooks → .git-hooks}/check-version-format.sh +2 -2
  153. package/templates/.github/workflows/pr-label.yml +1 -1
  154. package/templates/.opencode/commands/create-issue.en.md +1 -1
  155. package/templates/.opencode/commands/create-issue.zh-CN.md +1 -1
  156. package/templates/.opencode/commands/import-issue.en.md +1 -1
  157. package/templates/.opencode/commands/import-issue.zh-CN.md +1 -1
  158. package/templates/.opencode/commands/init-labels.en.md +1 -1
  159. package/templates/.opencode/commands/init-labels.zh-CN.md +1 -1
  160. package/templates/.opencode/commands/init-milestones.en.md +1 -1
  161. package/templates/.opencode/commands/init-milestones.zh-CN.md +1 -1
  162. package/templates/.opencode/commands/post-release.en.md +9 -0
  163. package/templates/.opencode/commands/post-release.zh-CN.md +9 -0
  164. package/templates/.opencode/commands/restore-task.en.md +1 -1
  165. package/templates/.opencode/commands/restore-task.zh-CN.md +1 -1
  166. /package/templates/{.github/hooks → .git-hooks}/pre-commit +0 -0
@@ -29,7 +29,7 @@ repo_root=$(
29
29
  CDPATH= cd -- "$script_dir/../.." && pwd
30
30
  )
31
31
 
32
- if sh "$repo_root/.github/hooks/check-version-format.sh"; then
32
+ if sh "$repo_root/.git-hooks/check-version-format.sh"; then
33
33
  echo "Claude hook: version check passed."
34
34
  exit 0
35
35
  else
@@ -1,4 +1,4 @@
1
- description = "Create a GitHub Issue from a task file"
1
+ description = "Create an Issue from a task file"
2
2
  prompt = """
3
3
  Create Issue for task {{args}}.
4
4
 
@@ -1,4 +1,4 @@
1
- description = "从任务文件创建 GitHub Issue"
1
+ description = "从任务文件创建 Issue"
2
2
  prompt = """
3
3
  为任务 {{args}} 创建 Issue。
4
4
 
@@ -1,4 +1,4 @@
1
- description = "Import a GitHub Issue and create a task"
1
+ description = "Import an Issue and create a task"
2
2
  prompt = """
3
3
  Import Issue #{{args}}.
4
4
 
@@ -1,4 +1,4 @@
1
- description = "从 GitHub Issue 导入并创建任务"
1
+ description = "从 Issue 导入并创建任务"
2
2
  prompt = """
3
3
  导入 Issue #{{args}}。
4
4
 
@@ -1,6 +1,6 @@
1
- description = "Initialize the repository's standard GitHub Labels taxonomy"
1
+ description = "Initialize the repository's standard labels taxonomy"
2
2
  prompt = """
3
- Initialize GitHub Labels for {{project}}.
3
+ Initialize labels for {{project}}.
4
4
 
5
5
  Read and execute the init-labels skill from `.agents/skills/init-labels/SKILL.md`.
6
6
 
@@ -1,6 +1,6 @@
1
- description = "初始化仓库的 GitHub Labels 体系"
1
+ description = "初始化仓库的 labels 体系"
2
2
  prompt = """
3
- 为 {{project}} 初始化 GitHub Labels
3
+ 为 {{project}} 初始化 labels
4
4
 
5
5
  读取并执行 `.agents/skills/init-labels/SKILL.md` 中的 init-labels 技能。
6
6
 
@@ -1,8 +1,8 @@
1
- description = "Initialize the repository's standard GitHub Milestones taxonomy"
1
+ description = "Initialize the repository's standard milestones taxonomy"
2
2
  prompt = """
3
3
  Initialize milestones: {{args}}
4
4
 
5
- Initialize GitHub Milestones for {{project}}.
5
+ Initialize milestones for {{project}}.
6
6
 
7
7
  Read and execute the init-milestones skill from `.agents/skills/init-milestones/SKILL.md`.
8
8
 
@@ -1,8 +1,8 @@
1
- description = "初始化仓库的 GitHub Milestones 体系"
1
+ description = "初始化仓库的 milestones 体系"
2
2
  prompt = """
3
3
  初始化里程碑:{{args}}
4
4
 
5
- 为 {{project}} 初始化 GitHub Milestones
5
+ 为 {{project}} 初始化 milestones
6
6
 
7
7
  读取并执行 `.agents/skills/init-milestones/SKILL.md` 中的 init-milestones 技能。
8
8
 
@@ -0,0 +1,6 @@
1
+ description = "Run post-release tasks"
2
+ prompt = """
3
+ Read and execute the post-release skill from `.agents/skills/post-release/SKILL.md`.
4
+
5
+ Follow all steps defined in the skill exactly.
6
+ """
@@ -0,0 +1,6 @@
1
+ description = "执行版本发布后处理"
2
+ prompt = """
3
+ 读取并执行 `.agents/skills/post-release/SKILL.md` 中的 post-release 技能。
4
+
5
+ 严格按照技能中定义的所有步骤执行。
6
+ """
@@ -1,4 +1,4 @@
1
- description = "Restore local task files from GitHub Issue comments"
1
+ description = "Restore local task files from Issue comments"
2
2
  prompt = """
3
3
  Restore task from Issue: {{args}}
4
4
 
@@ -1,4 +1,4 @@
1
- description = "从 GitHub Issue 评论还原本地任务文件"
1
+ description = "从 Issue 评论还原本地任务文件"
2
2
  prompt = """
3
3
  从 Issue 还原任务:{{args}}
4
4
 
@@ -5,7 +5,7 @@ script_dir=$(
5
5
  CDPATH= cd -- "$(dirname -- "$0")" && pwd
6
6
  )
7
7
  repo_root=$(
8
- CDPATH= cd -- "$script_dir/../.." && pwd
8
+ CDPATH= cd -- "$script_dir/.." && pwd
9
9
  )
10
10
 
11
11
  airc_file="$repo_root/.agents/.airc.json"
@@ -21,7 +21,7 @@ template_version=$(
21
21
  exit 1
22
22
  }
23
23
 
24
- if ! printf '%s\n' "$template_version" | grep -Eq '^v[0-9]+\.[0-9]+\.[0-9]+$'; then
24
+ if ! printf '%s\n' "$template_version" | grep -Eq '^v[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9.]+)?$'; then
25
25
  echo "Error: .agents/.airc.json templateVersion must use v-prefixed semver (found: $template_version)."
26
26
  exit 1
27
27
  fi
@@ -26,7 +26,7 @@ jobs:
26
26
  PR_NUMBER: ${{ github.event.pull_request.number }}
27
27
  run: |
28
28
  changed_files=$(gh api "repos/$GITHUB_REPOSITORY/pulls/$PR_NUMBER/files" \
29
- --paginate --jq '[.[].filename]')
29
+ --paginate --jq '.[].filename' | jq -Rn '[inputs]')
30
30
 
31
31
  should_labels=$(jq -rn \
32
32
  --argjson files "$changed_files" \
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: "Create a GitHub Issue from a task file"
2
+ description: "Create an Issue from a task file"
3
3
  agent: general
4
4
  subtask: false
5
5
  ---
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: "从任务文件创建 GitHub Issue"
2
+ description: "从任务文件创建 Issue"
3
3
  agent: general
4
4
  subtask: false
5
5
  ---
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: "Import a GitHub Issue and create a task"
2
+ description: "Import an Issue and create a task"
3
3
  agent: general
4
4
  subtask: false
5
5
  ---
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: "从 GitHub Issue 导入并创建任务"
2
+ description: "从 Issue 导入并创建任务"
3
3
  agent: general
4
4
  subtask: false
5
5
  ---
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: "Initialize the repository's standard GitHub Labels taxonomy"
2
+ description: "Initialize the repository's standard labels taxonomy"
3
3
  agent: general
4
4
  subtask: false
5
5
  ---
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: "初始化仓库的 GitHub Labels 体系"
2
+ description: "初始化仓库的 labels 体系"
3
3
  agent: general
4
4
  subtask: false
5
5
  ---
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: "Initialize the repository's standard GitHub Milestones taxonomy"
2
+ description: "Initialize the repository's standard milestones taxonomy"
3
3
  agent: general
4
4
  subtask: false
5
5
  ---
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: "初始化仓库的 GitHub Milestones 体系"
2
+ description: "初始化仓库的 milestones 体系"
3
3
  agent: general
4
4
  subtask: false
5
5
  ---
@@ -0,0 +1,9 @@
1
+ ---
2
+ description: "Run post-release tasks"
3
+ agent: general
4
+ subtask: false
5
+ ---
6
+
7
+ Read and execute the post-release skill from `.agents/skills/post-release/SKILL.md`.
8
+
9
+ Follow all steps defined in the skill exactly.
@@ -0,0 +1,9 @@
1
+ ---
2
+ description: "执行版本发布后处理"
3
+ agent: general
4
+ subtask: false
5
+ ---
6
+
7
+ 读取并执行 `.agents/skills/post-release/SKILL.md` 中的 post-release 技能。
8
+
9
+ 严格按照技能中定义的所有步骤执行。
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: "Restore local task files from GitHub Issue comments"
2
+ description: "Restore local task files from Issue comments"
3
3
  agent: general
4
4
  subtask: false
5
5
  ---
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: "从 GitHub Issue 评论还原本地任务文件"
2
+ description: "从 Issue 评论还原本地任务文件"
3
3
  agent: general
4
4
  subtask: false
5
5
  ---