@fitlab-ai/agent-infra 0.5.8 → 0.5.10
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 +237 -5
- package/README.zh-CN.md +213 -5
- package/bin/cli.js +2 -2
- package/lib/init.js +18 -4
- package/lib/sandbox/commands/create.js +467 -240
- package/lib/sandbox/commands/enter.js +59 -26
- package/lib/sandbox/commands/ls.js +37 -6
- package/lib/sandbox/commands/rebuild.js +31 -15
- package/lib/sandbox/commands/refresh.js +119 -0
- package/lib/sandbox/commands/rm.js +59 -11
- package/lib/sandbox/commands/vm.js +56 -6
- package/lib/sandbox/config.js +9 -5
- package/lib/sandbox/constants.js +18 -3
- package/lib/sandbox/credentials.js +520 -0
- package/lib/sandbox/dotfiles.js +189 -0
- package/lib/sandbox/engine.js +135 -157
- package/lib/sandbox/engines/colima.js +79 -0
- package/lib/sandbox/engines/docker-desktop.js +34 -0
- package/lib/sandbox/engines/index.js +27 -0
- package/lib/sandbox/engines/native.js +112 -0
- package/lib/sandbox/engines/orbstack.js +76 -0
- package/lib/sandbox/engines/selinux.js +60 -0
- package/lib/sandbox/engines/wsl2-paths.js +59 -0
- package/lib/sandbox/engines/wsl2.js +72 -0
- package/lib/sandbox/index.js +10 -1
- package/lib/sandbox/runtimes/ai-tools.dockerfile +14 -1
- package/lib/sandbox/runtimes/base.dockerfile +125 -3
- package/lib/sandbox/shell.js +53 -2
- package/lib/sandbox/tools.js +5 -5
- package/package.json +8 -4
- package/templates/.agents/rules/create-issue.en.md +5 -0
- package/templates/.agents/rules/create-issue.github.en.md +176 -0
- package/templates/.agents/rules/create-issue.github.zh-CN.md +176 -0
- package/templates/.agents/rules/create-issue.zh-CN.md +5 -0
- package/templates/.agents/rules/issue-pr-commands.github.en.md +29 -0
- package/templates/.agents/rules/issue-pr-commands.github.zh-CN.md +29 -0
- package/templates/.agents/rules/issue-sync.github.en.md +1 -1
- package/templates/.agents/rules/issue-sync.github.zh-CN.md +1 -1
- package/templates/.agents/rules/milestone-inference.github.en.md +2 -2
- package/templates/.agents/rules/milestone-inference.github.zh-CN.md +2 -2
- package/templates/.agents/scripts/{platform-adapters/find-existing-task.github.js → find-existing-task.js} +22 -79
- package/templates/.agents/scripts/platform-adapters/platform-sync.github.js +72 -42
- package/templates/.agents/skills/create-task/SKILL.en.md +69 -11
- package/templates/.agents/skills/create-task/SKILL.zh-CN.md +70 -12
- package/templates/.agents/skills/create-task/config/verify.json +6 -1
- package/templates/.agents/skills/implement-task/reference/implementation-rules.en.md +7 -12
- package/templates/.agents/skills/implement-task/reference/implementation-rules.zh-CN.md +7 -12
- package/templates/.agents/skills/import-issue/SKILL.en.md +7 -9
- package/templates/.agents/skills/import-issue/SKILL.zh-CN.md +7 -9
- package/templates/.agents/skills/refine-task/reference/fix-workflow.en.md +2 -2
- package/templates/.agents/skills/refine-task/reference/fix-workflow.zh-CN.md +2 -2
- package/templates/.agents/skills/test/SKILL.en.md +45 -6
- package/templates/.agents/skills/test/SKILL.zh-CN.md +45 -6
- package/templates/.agents/scripts/platform-adapters/find-existing-task.js +0 -5
- package/templates/.agents/skills/create-issue/SKILL.en.md +0 -118
- package/templates/.agents/skills/create-issue/SKILL.zh-CN.md +0 -118
- package/templates/.agents/skills/create-issue/config/verify.json +0 -30
- package/templates/.agents/skills/create-issue/reference/label-and-type.en.md +0 -71
- package/templates/.agents/skills/create-issue/reference/label-and-type.zh-CN.md +0 -71
- package/templates/.agents/skills/create-issue/reference/template-matching.en.md +0 -17
- package/templates/.agents/skills/create-issue/reference/template-matching.zh-CN.md +0 -17
- package/templates/.claude/commands/create-issue.en.md +0 -8
- package/templates/.claude/commands/create-issue.zh-CN.md +0 -8
- package/templates/.gemini/commands/_project_/create-issue.en.toml +0 -8
- package/templates/.gemini/commands/_project_/create-issue.zh-CN.toml +0 -8
- package/templates/.opencode/commands/create-issue.en.md +0 -11
- package/templates/.opencode/commands/create-issue.zh-CN.md +0 -11
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
# Label、Issue Type 和 Milestone 规则
|
|
2
|
-
|
|
3
|
-
在应用 label、Issue Type、milestone 或 `in:` label 之前先读取本文件。
|
|
4
|
-
|
|
5
|
-
## 默认正文格式(Fallback)
|
|
6
|
-
|
|
7
|
-
推荐 fallback:
|
|
8
|
-
|
|
9
|
-
```markdown
|
|
10
|
-
## Description
|
|
11
|
-
|
|
12
|
-
{task-description}
|
|
13
|
-
|
|
14
|
-
## Requirements
|
|
15
|
-
|
|
16
|
-
- [ ] {requirement-1}
|
|
17
|
-
- [ ] {requirement-2}
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
将任务类型映射到 label 和 Issue Type,但只保留仓库里实际存在的 label。
|
|
21
|
-
|
|
22
|
-
Fallback label 映射:
|
|
23
|
-
|
|
24
|
-
| task.md type | label |
|
|
25
|
-
|---|---|
|
|
26
|
-
| `bug`, `bugfix` | `type: bug` |
|
|
27
|
-
| `feature` | `type: feature` |
|
|
28
|
-
| `enhancement` | `type: enhancement` |
|
|
29
|
-
| `docs`, `documentation` | `type: documentation` |
|
|
30
|
-
| `dependency-upgrade` | `type: dependency-upgrade` |
|
|
31
|
-
| `task`, `chore` | `type: task` |
|
|
32
|
-
| `refactor`, `refactoring` | `type: enhancement` |
|
|
33
|
-
| 其他值 | 跳过 |
|
|
34
|
-
|
|
35
|
-
Issue Type fallback 映射:
|
|
36
|
-
|
|
37
|
-
| task.md type | Issue Type |
|
|
38
|
-
|---|---|
|
|
39
|
-
| `bug`, `bugfix` | `Bug` |
|
|
40
|
-
| `feature`, `enhancement` | `Feature` |
|
|
41
|
-
| `task`, `documentation`, `dependency-upgrade`, `chore`, `docs`, `refactor`, `refactoring` 以及其他所有值 | `Task` |
|
|
42
|
-
|
|
43
|
-
## 创建 Issue
|
|
44
|
-
|
|
45
|
-
创建 Issue 时,执行前先读取 `.agents/rules/issue-pr-commands.md`,并使用其中的 “创建 Issue” 命令模板。
|
|
46
|
-
|
|
47
|
-
调用创建命令前,先按 `.agents/rules/issue-sync.md` / `.agents/rules/issue-pr-commands.md` 完成前置步骤中的认证和代码托管平台检测。
|
|
48
|
-
|
|
49
|
-
如果最终没有有效 label,就省略 label 参数。
|
|
50
|
-
|
|
51
|
-
Milestone 推断规则见 `.agents/rules/milestone-inference.md` 的「阶段 1:`create-issue`」。推断前先读取该文件。
|
|
52
|
-
|
|
53
|
-
Issue Type 设置同样遵循 `.agents/rules/issue-pr-commands.md` 中的对应命令。
|
|
54
|
-
|
|
55
|
-
- Label、milestone、`in:` label 和 Issue Type 的直接设置,都按 `.agents/rules/issue-pr-commands.md` 与 `.agents/rules/issue-sync.md` 的权限降级规则处理
|
|
56
|
-
- 当规则判定应跳过直接写入时,继续创建 Issue,不要让流程失败
|
|
57
|
-
|
|
58
|
-
`in:` label(粗选):
|
|
59
|
-
|
|
60
|
-
执行前先按 `.agents/rules/issue-pr-commands.md` 的 Issue 更新命令准备 label 编辑参数。
|
|
61
|
-
|
|
62
|
-
从查询结果中,根据 task.md 的标题和描述进行语义匹配:
|
|
63
|
-
- 任务描述**明确提及**某个模块(如"修复 CLI 参数解析"→ `in: cli`)→ 添加
|
|
64
|
-
- 任务描述**强烈暗示**某个模块 → 添加
|
|
65
|
-
- 无法确定或模糊 → **不添加**
|
|
66
|
-
|
|
67
|
-
原则:宁缺毋滥。粗选阶段不求精确,后续 implement-task / create-pr 阶段会基于实际改动文件精修。
|
|
68
|
-
|
|
69
|
-
相关 `in:` label 的添加按 `.agents/rules/issue-sync.md` 的权限降级规则处理。当 `in:` label 不可用、不相关或规则判定应跳过时,不要让创建 Issue 流程失败。
|
|
70
|
-
|
|
71
|
-
当 label、Issue Type 或 milestone 不可用时,应跳过并继续,不要让 Issue 创建失败。
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
# Issue Template Matching
|
|
2
|
-
|
|
3
|
-
Read this file before deciding how to build the Issue body.
|
|
4
|
-
|
|
5
|
-
## Detect Issue Templates
|
|
6
|
-
|
|
7
|
-
Issue template detection is platform-specific. Read `.agents/rules/issue-pr-commands.md` and follow the template detection section provided by the configured platform.
|
|
8
|
-
|
|
9
|
-
If templates exist, inspect their top-level names and choose the best match for the task title and description. Use the candidate template guidance provided by the configured platform rule when available.
|
|
10
|
-
|
|
11
|
-
If no template matches clearly, choose the nearest candidate. If templates are missing, unreadable, or parsing fails, fall back to the default body path.
|
|
12
|
-
|
|
13
|
-
## Build the Body from the Matched Template
|
|
14
|
-
|
|
15
|
-
Build the body by following the field handling and field mapping guidance provided by the configured platform section in `.agents/rules/issue-pr-commands.md`.
|
|
16
|
-
|
|
17
|
-
When platform guidance is unavailable, use the default body path.
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
# Issue 模板匹配
|
|
2
|
-
|
|
3
|
-
在决定如何构建 Issue 正文前先读取本文件。
|
|
4
|
-
|
|
5
|
-
## 检测 Issue 模板
|
|
6
|
-
|
|
7
|
-
Issue 模板检测属于平台相关逻辑。先读取 `.agents/rules/issue-pr-commands.md`,并按当前配置平台提供的模板检测章节执行。
|
|
8
|
-
|
|
9
|
-
如果存在模板,检查其顶层名称,并根据任务标题和描述选择最匹配的模板。可用时,使用当前配置平台规则提供的候选模板指引。
|
|
10
|
-
|
|
11
|
-
如果没有清晰匹配,选择最接近的候选模板。模板不存在、无法读取或解析失败时,回退到默认正文路径。
|
|
12
|
-
|
|
13
|
-
## 从匹配模板构建正文
|
|
14
|
-
|
|
15
|
-
按 `.agents/rules/issue-pr-commands.md` 中当前配置平台章节提供的字段处理和字段映射指引构建正文。
|
|
16
|
-
|
|
17
|
-
如果平台指引不可用,使用默认正文路径。
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: "Create an Issue from a task file"
|
|
3
|
-
agent: general
|
|
4
|
-
subtask: false
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
Create Issue for task $1.
|
|
8
|
-
|
|
9
|
-
Read and execute the create-issue skill from `.agents/skills/create-issue/SKILL.md`.
|
|
10
|
-
|
|
11
|
-
Follow all steps defined in the skill exactly.
|