agiledev-cli 0.1.4 → 0.3.0

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 (40) hide show
  1. package/README.md +300 -173
  2. package/SKILL.md +114 -98
  3. package/adev.js +1319 -1285
  4. package/autofix/agents/antigravity.js +379 -0
  5. package/autofix/agents/claude.js +147 -0
  6. package/autofix/agents/codex.js +179 -0
  7. package/autofix/agents/exec.js +230 -0
  8. package/autofix/agents/index.js +400 -0
  9. package/autofix/agents/opencode.js +233 -0
  10. package/autofix/agents/pi.js +247 -0
  11. package/autofix/agiledev.js +98 -0
  12. package/autofix/bridge.js +371 -0
  13. package/autofix/cli.js +712 -0
  14. package/autofix/context.js +152 -0
  15. package/autofix/conversation.js +302 -0
  16. package/autofix/coordinator.js +2892 -0
  17. package/autofix/git.js +459 -0
  18. package/autofix/policy.js +230 -0
  19. package/autofix/profile.js +578 -0
  20. package/autofix/public/app.js +3668 -0
  21. package/autofix/public/i18n-id.js +282 -0
  22. package/autofix/public/index.html +32 -0
  23. package/autofix/public/style.css +2463 -0
  24. package/autofix/queue.js +146 -0
  25. package/autofix/scheduler.js +994 -0
  26. package/autofix/scope.js +32 -0
  27. package/autofix/service.js +1940 -0
  28. package/autofix/store.js +375 -0
  29. package/autofix/workspace.js +298 -0
  30. package/autofix/worktree.js +379 -0
  31. package/docs/autofix-design.md +801 -0
  32. package/docs/autofix-profiles.example.json +65 -0
  33. package/imgs/Bug/350/247/243/345/206/263/345/244/207/346/263/250.png +0 -0
  34. package/imgs/logo.png +0 -0
  35. package/imgs//344/277/256/346/224/271Bug/347/212/266/346/200/201.png +0 -0
  36. package/imgs//345/270/256/346/210/221/344/277/256/345/244/215Bug-20260922-010.png +0 -0
  37. package/imgs//346/237/245/347/234/213/345/271/266/345/210/206/346/236/220/351/234/200/346/261/202/346/226/207/346/241/243.png +0 -0
  38. package/imgs//347/234/213/344/270/200/344/270/213/346/210/221/347/216/260/345/234/250/346/234/211/345/223/252/344/272/233/345/274/200/345/217/221/344/273/273/345/212/241.png +0 -0
  39. package/imgs//347/234/213/344/270/200/344/270/213/346/210/221/350/277/230/346/234/211/345/223/252/344/272/233Bug/346/234/252/350/247/243/345/206/263.png +0 -0
  40. package/package.json +39 -36
@@ -0,0 +1,32 @@
1
+ /**
2
+ * 当前绑定项目的任务作用域。
3
+ *
4
+ * 启动页勾选哪些敏捷项目,本工作区就只扫描、同步、派工、复核这些项目的缺陷。
5
+ * 任务记录是全局的(同一台机器所有工作区共享 ~/.agiledev-autofix/tasks),
6
+ * 所以每个读任务列表的入口都要过一遍作用域,否则未勾选项目的历史任务会被
7
+ * 轮询同步、被兜底派工,甚至因为线上重开而自动重新排队修复。
8
+ *
9
+ * 没有 projectId 的旧任务无法判断归属,一律视为范围外:不自动处理,
10
+ * 也不会出现在主 Agent 的任务清单与派工计划里。
11
+ */
12
+
13
+ /** 归一化为项目 ID 集合;空集合表示观察模式(不处理任何任务)。 */
14
+ export function boundProjectSet(projectIds = []) {
15
+ const list = Array.isArray(projectIds) ? projectIds : [projectIds];
16
+ return new Set(list.map(v => String(v ?? "").trim()).filter(Boolean));
17
+ }
18
+
19
+ /** 任务是否属于当前绑定项目。 */
20
+ export function taskInProjectScope(task, projectIds = [], bound = null) {
21
+ const set = bound || boundProjectSet(projectIds);
22
+ if (!set.size) return false;
23
+ const id = task?.projectId;
24
+ if (id == null || String(id).trim() === "") return false;
25
+ return set.has(String(id).trim());
26
+ }
27
+
28
+ /** 过滤出当前绑定项目的任务。 */
29
+ export function filterTasksInScope(tasks = [], projectIds = []) {
30
+ const bound = boundProjectSet(projectIds);
31
+ return (Array.isArray(tasks) ? tasks : []).filter(t => taskInProjectScope(t, projectIds, bound));
32
+ }