@fitlab-ai/agent-infra 0.5.4 → 0.5.6
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/README.md +94 -1
- package/README.zh-CN.md +94 -1
- package/lib/defaults.json +1 -0
- package/lib/sandbox/commands/create.js +7 -3
- package/lib/sandbox/shell.js +47 -7
- package/lib/sandbox/tools.js +18 -14
- package/package.json +1 -1
- package/templates/.agents/README.en.md +52 -0
- package/templates/.agents/README.zh-CN.md +52 -0
- package/templates/.agents/rules/issue-pr-commands.github.en.md +10 -1
- package/templates/.agents/rules/issue-pr-commands.github.zh-CN.md +10 -1
- package/templates/.agents/rules/issue-sync.github.en.md +12 -10
- package/templates/.agents/rules/issue-sync.github.zh-CN.md +12 -10
- package/templates/.agents/rules/milestone-inference.github.en.md +6 -5
- package/templates/.agents/rules/milestone-inference.github.zh-CN.md +6 -5
- package/templates/.agents/scripts/platform-adapters/platform-sync.github.js +87 -14
- package/templates/.agents/skills/analyze-task/SKILL.en.md +1 -1
- package/templates/.agents/skills/analyze-task/SKILL.zh-CN.md +1 -1
- package/templates/.agents/skills/create-pr/config/verify.json +2 -0
- package/templates/.agents/skills/create-pr/reference/pr-body-template.en.md +6 -7
- package/templates/.agents/skills/create-pr/reference/pr-body-template.zh-CN.md +6 -7
- package/templates/.agents/skills/create-release-note/SKILL.en.md +27 -2
- package/templates/.agents/skills/create-release-note/SKILL.zh-CN.md +27 -2
- package/templates/.agents/skills/implement-task/SKILL.en.md +1 -1
- package/templates/.agents/skills/implement-task/SKILL.zh-CN.md +1 -1
- package/templates/.agents/skills/import-issue/SKILL.en.md +10 -2
- package/templates/.agents/skills/import-issue/SKILL.zh-CN.md +10 -2
- package/templates/.agents/skills/import-issue/config/verify.json +2 -1
- package/templates/.agents/skills/plan-task/SKILL.en.md +1 -1
- package/templates/.agents/skills/plan-task/SKILL.zh-CN.md +1 -1
- package/templates/.agents/skills/refine-task/SKILL.en.md +1 -1
- package/templates/.agents/skills/refine-task/SKILL.zh-CN.md +1 -1
- package/templates/.agents/skills/review-task/SKILL.en.md +1 -1
- package/templates/.agents/skills/review-task/SKILL.zh-CN.md +1 -1
- package/templates/.agents/skills/update-agent-infra/scripts/sync-templates.js +316 -1
- package/templates/.github/scripts/sync-labels-to-set.sh +110 -0
- package/templates/.github/workflows/metadata-sync.yml +11 -20
- package/templates/.github/workflows/pr-label.yml +10 -19
- package/templates/.github/workflows/status-label.yml +20 -34
|
@@ -14,6 +14,16 @@ jobs:
|
|
|
14
14
|
manage-status-labels:
|
|
15
15
|
runs-on: ubuntu-latest
|
|
16
16
|
steps:
|
|
17
|
+
- name: Checkout shared scripts
|
|
18
|
+
if: >-
|
|
19
|
+
(github.event_name == 'issues' && github.event.action == 'closed' && github.event.issue.state_reason == 'completed') ||
|
|
20
|
+
(github.event_name == 'issues' && github.event.action == 'reopened') ||
|
|
21
|
+
(github.event_name == 'pull_request_target' && github.event.action == 'closed' && github.event.pull_request.merged == true)
|
|
22
|
+
uses: actions/checkout@v6
|
|
23
|
+
with:
|
|
24
|
+
sparse-checkout: .github/scripts
|
|
25
|
+
sparse-checkout-cone-mode: false
|
|
26
|
+
|
|
17
27
|
- name: Remove status labels on issue close
|
|
18
28
|
if: >-
|
|
19
29
|
github.event_name == 'issues' &&
|
|
@@ -23,16 +33,10 @@ jobs:
|
|
|
23
33
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
24
34
|
ISSUE_NUMBER: ${{ github.event.issue.number }}
|
|
25
35
|
run: |
|
|
26
|
-
|
|
36
|
+
.github/scripts/sync-labels-to-set.sh \
|
|
27
37
|
--repo "$GITHUB_REPOSITORY" \
|
|
28
|
-
--
|
|
29
|
-
|
|
30
|
-
| while IFS= read -r label; do
|
|
31
|
-
[ -z "$label" ] && continue
|
|
32
|
-
gh issue edit "$ISSUE_NUMBER" \
|
|
33
|
-
--repo "$GITHUB_REPOSITORY" \
|
|
34
|
-
--remove-label "$label"
|
|
35
|
-
done || true
|
|
38
|
+
--issue "$ISSUE_NUMBER" \
|
|
39
|
+
--prefix "status:"
|
|
36
40
|
|
|
37
41
|
- name: Add triage label on issue reopen
|
|
38
42
|
if: github.event_name == 'issues' && github.event.action == 'reopened'
|
|
@@ -40,23 +44,11 @@ jobs:
|
|
|
40
44
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
41
45
|
ISSUE_NUMBER: ${{ github.event.issue.number }}
|
|
42
46
|
run: |
|
|
43
|
-
|
|
47
|
+
.github/scripts/sync-labels-to-set.sh \
|
|
44
48
|
--repo "$GITHUB_REPOSITORY" \
|
|
45
|
-
--
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
[ -z "$label" ] && continue
|
|
49
|
-
if [ "$label" != "status: waiting-for-triage" ]; then
|
|
50
|
-
gh issue edit "$ISSUE_NUMBER" \
|
|
51
|
-
--repo "$GITHUB_REPOSITORY" \
|
|
52
|
-
--remove-label "$label"
|
|
53
|
-
fi
|
|
54
|
-
done || true
|
|
55
|
-
if ! printf '%s\n' "$current_status_labels" | grep -qxF "status: waiting-for-triage"; then
|
|
56
|
-
gh issue edit "$ISSUE_NUMBER" \
|
|
57
|
-
--repo "$GITHUB_REPOSITORY" \
|
|
58
|
-
--add-label "status: waiting-for-triage"
|
|
59
|
-
fi
|
|
49
|
+
--issue "$ISSUE_NUMBER" \
|
|
50
|
+
--prefix "status:" \
|
|
51
|
+
--target "status: waiting-for-triage"
|
|
60
52
|
|
|
61
53
|
- name: Clean status labels on PR merge
|
|
62
54
|
if: >-
|
|
@@ -75,15 +67,9 @@ jobs:
|
|
|
75
67
|
--repo "$GITHUB_REPOSITORY" \
|
|
76
68
|
--json state --jq '.state')
|
|
77
69
|
if [ "$state" = "CLOSED" ]; then
|
|
78
|
-
|
|
70
|
+
.github/scripts/sync-labels-to-set.sh \
|
|
79
71
|
--repo "$GITHUB_REPOSITORY" \
|
|
80
|
-
--
|
|
81
|
-
|
|
82
|
-
| while IFS= read -r label; do
|
|
83
|
-
[ -z "$label" ] && continue
|
|
84
|
-
gh issue edit "$issue_number" \
|
|
85
|
-
--repo "$GITHUB_REPOSITORY" \
|
|
86
|
-
--remove-label "$label"
|
|
87
|
-
done || true
|
|
72
|
+
--issue "$issue_number" \
|
|
73
|
+
--prefix "status:"
|
|
88
74
|
fi
|
|
89
75
|
done
|