aico-cli 0.1.5 → 0.1.7

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 (52) hide show
  1. package/dist/chunks/feature-checker.mjs +117 -0
  2. package/dist/{shared/aico-cli.mxgSz9yk.mjs → chunks/simple-config.mjs} +2158 -2639
  3. package/dist/cli.mjs +184 -998
  4. package/dist/index.d.mts +12 -42
  5. package/dist/index.d.ts +12 -42
  6. package/dist/index.mjs +7 -7
  7. package/dist/shared/aico-cli.C9hv-Gol.mjs +51 -0
  8. package/package.json +1 -1
  9. package/templates/CLAUDE.md +1 -3
  10. package/templates/{zh-CN/workflow/common/agents → agents/aico/plan}/get-current-datetime.md +2 -2
  11. package/templates/{zh-CN/workflow/common/agents → agents/aico/plan}/init-architect.md +11 -8
  12. package/templates/agents/aico/requirement/aico-requirement-aligner.md +231 -0
  13. package/templates/agents/aico/requirement/aico-requirement-identifier.md +221 -0
  14. package/templates/agents/aico/requirement/aico-task-executor-validator.md +289 -0
  15. package/templates/agents/aico/requirement/aico-task-executor.md +328 -0
  16. package/templates/agents/aico/requirement/aico-task-splitter-validator.md +585 -0
  17. package/templates/base.md +51 -0
  18. package/templates/{zh-CN/workflow/common/commands → commands/aico}/init-project.md +1 -1
  19. package/templates/commands/aico/requirement.md +351 -0
  20. package/templates/commands/aico/workflow.md +229 -0
  21. package/templates/language.md +1 -0
  22. package/templates/personality.md +143 -0
  23. package/templates/settings.json +6 -3
  24. package/templates/en/memory/mcp.md +0 -6
  25. package/templates/en/memory/personality.md +0 -1
  26. package/templates/en/memory/rules.md +0 -45
  27. package/templates/en/memory/technical-guides.md +0 -97
  28. package/templates/en/workflow/bmad/commands/bmad-init.md +0 -103
  29. package/templates/en/workflow/common/agents/get-current-datetime.md +0 -29
  30. package/templates/en/workflow/common/agents/init-architect.md +0 -114
  31. package/templates/en/workflow/common/commands/init-project.md +0 -53
  32. package/templates/en/workflow/git/commands/git-cleanBranches.md +0 -101
  33. package/templates/en/workflow/git/commands/git-commit.md +0 -152
  34. package/templates/en/workflow/git/commands/git-rollback.md +0 -89
  35. package/templates/en/workflow/git/commands/git-worktree.md +0 -301
  36. package/templates/en/workflow/plan/agents/planner.md +0 -116
  37. package/templates/en/workflow/plan/agents/ui-ux-designer.md +0 -91
  38. package/templates/en/workflow/plan/commands/feat.md +0 -105
  39. package/templates/en/workflow/sixStep/commands/workflow.md +0 -230
  40. package/templates/zh-CN/memory/mcp.md +0 -34
  41. package/templates/zh-CN/memory/personality.md +0 -1
  42. package/templates/zh-CN/memory/rules.md +0 -45
  43. package/templates/zh-CN/memory/technical-guides.md +0 -126
  44. package/templates/zh-CN/workflow/bmad/commands/bmad-init.md +0 -109
  45. package/templates/zh-CN/workflow/git/commands/git-cleanBranches.md +0 -101
  46. package/templates/zh-CN/workflow/git/commands/git-commit.md +0 -162
  47. package/templates/zh-CN/workflow/git/commands/git-rollback.md +0 -90
  48. package/templates/zh-CN/workflow/git/commands/git-worktree.md +0 -225
  49. package/templates/zh-CN/workflow/plan/commands/feat.md +0 -105
  50. package/templates/zh-CN/workflow/sixStep/commands/workflow.md +0 -199
  51. /package/templates/{zh-CN/workflow/plan/agents → agents/aico/plan}/planner.md +0 -0
  52. /package/templates/{zh-CN/workflow/plan/agents → agents/aico/plan}/ui-ux-designer.md +0 -0
@@ -0,0 +1,117 @@
1
+ import { existsSync } from 'node:fs';
2
+ import { join } from 'pathe';
3
+ import { S as SETTINGS_FILE, G as readJsonConfig, C as CLAUDE_DIR } from './simple-config.mjs';
4
+ import { i as isClaudeCodeInstalled } from '../shared/aico-cli.C9hv-Gol.mjs';
5
+ import 'ansis';
6
+ import 'inquirer';
7
+ import 'tinyexec';
8
+ import 'node:os';
9
+ import 'node:child_process';
10
+ import 'node:util';
11
+ import 'child_process';
12
+ import 'util';
13
+ import 'ora';
14
+ import 'dayjs';
15
+ import 'node:path';
16
+ import 'node:url';
17
+
18
+ async function checkAllFeatures(context) {
19
+ const results = {};
20
+ results.config = await checkConfigFeature();
21
+ results.claudeCode = await checkClaudeCodeFeature();
22
+ results.workflow = await checkWorkflowFeature();
23
+ results.statusBar = await checkStatusBarFeature();
24
+ results.aiPersonality = await checkAiPersonalityFeature();
25
+ return results;
26
+ }
27
+ async function checkConfigFeature() {
28
+ try {
29
+ const settingsExists = existsSync(SETTINGS_FILE);
30
+ if (!settingsExists) {
31
+ return { isInstalled: false, details: "settings.json \u4E0D\u5B58\u5728" };
32
+ }
33
+ const settings = await readJsonConfig(SETTINGS_FILE);
34
+ const hasBaseUrl = !!settings?.env?.ANTHROPIC_BASE_URL;
35
+ return {
36
+ isInstalled: hasBaseUrl,
37
+ details: hasBaseUrl ? "API \u914D\u7F6E\u6B63\u5E38" : "\u7F3A\u5C11 ANTHROPIC_BASE_URL \u914D\u7F6E"
38
+ };
39
+ } catch (error) {
40
+ return {
41
+ isInstalled: false,
42
+ details: `\u914D\u7F6E\u68C0\u67E5\u5931\u8D25: ${error instanceof Error ? error.message : String(error)}`
43
+ };
44
+ }
45
+ }
46
+ async function checkClaudeCodeFeature() {
47
+ try {
48
+ const installed = await isClaudeCodeInstalled();
49
+ return {
50
+ isInstalled: installed,
51
+ details: installed ? "Claude Code \u5DF2\u5B89\u88C5" : "Claude Code \u672A\u5B89\u88C5"
52
+ };
53
+ } catch (error) {
54
+ return {
55
+ isInstalled: false,
56
+ details: `Claude Code \u68C0\u67E5\u5931\u8D25: ${error instanceof Error ? error.message : String(error)}`
57
+ };
58
+ }
59
+ }
60
+ async function checkWorkflowFeature() {
61
+ try {
62
+ const workflowDir = join(CLAUDE_DIR, "agents");
63
+ const workflowExists = existsSync(workflowDir);
64
+ if (!workflowExists) {
65
+ return { isInstalled: false, details: "\u5DE5\u4F5C\u6D41\u76EE\u5F55\u4E0D\u5B58\u5728" };
66
+ }
67
+ const hasWorkflowFiles = existsSync(join(workflowDir, "aico")) || existsSync(join(workflowDir, "commands"));
68
+ return {
69
+ isInstalled: hasWorkflowFiles,
70
+ details: hasWorkflowFiles ? "\u5DE5\u4F5C\u6D41\u6587\u4EF6\u5DF2\u5B89\u88C5" : "\u5DE5\u4F5C\u6D41\u76EE\u5F55\u4E3A\u7A7A"
71
+ };
72
+ } catch (error) {
73
+ return {
74
+ isInstalled: false,
75
+ details: `\u5DE5\u4F5C\u6D41\u68C0\u67E5\u5931\u8D25: ${error instanceof Error ? error.message : String(error)}`
76
+ };
77
+ }
78
+ }
79
+ async function checkStatusBarFeature() {
80
+ try {
81
+ const statusBarDir = join(CLAUDE_DIR, "ccline");
82
+ const statusBarExists = existsSync(statusBarDir);
83
+ return {
84
+ isInstalled: statusBarExists,
85
+ details: statusBarExists ? "\u72B6\u6001\u680F\u5DF2\u914D\u7F6E" : "\u72B6\u6001\u680F\u672A\u914D\u7F6E"
86
+ };
87
+ } catch (error) {
88
+ return {
89
+ isInstalled: false,
90
+ details: `\u72B6\u6001\u680F\u68C0\u67E5\u5931\u8D25: ${error instanceof Error ? error.message : String(error)}`
91
+ };
92
+ }
93
+ }
94
+ async function checkAiPersonalityFeature() {
95
+ try {
96
+ const requiredFiles = [
97
+ "personality.md",
98
+ "base.md",
99
+ "language.md",
100
+ "CLAUDE.md"
101
+ ];
102
+ const missingFiles = requiredFiles.filter(
103
+ (file) => !existsSync(join(CLAUDE_DIR, file))
104
+ );
105
+ return {
106
+ isInstalled: missingFiles.length === 0,
107
+ details: missingFiles.length === 0 ? "AI \u4E2A\u6027\u6587\u4EF6\u5B8C\u6574" : `\u7F3A\u5931\u6587\u4EF6: ${missingFiles.join(", ")}`
108
+ };
109
+ } catch (error) {
110
+ return {
111
+ isInstalled: false,
112
+ details: `AI \u4E2A\u6027\u6587\u4EF6\u68C0\u67E5\u5931\u8D25: ${error instanceof Error ? error.message : String(error)}`
113
+ };
114
+ }
115
+ }
116
+
117
+ export { checkAllFeatures };