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.
- package/dist/chunks/feature-checker.mjs +117 -0
- package/dist/{shared/aico-cli.mxgSz9yk.mjs → chunks/simple-config.mjs} +2158 -2639
- package/dist/cli.mjs +184 -998
- package/dist/index.d.mts +12 -42
- package/dist/index.d.ts +12 -42
- package/dist/index.mjs +7 -7
- package/dist/shared/aico-cli.C9hv-Gol.mjs +51 -0
- package/package.json +1 -1
- package/templates/CLAUDE.md +1 -3
- package/templates/{zh-CN/workflow/common/agents → agents/aico/plan}/get-current-datetime.md +2 -2
- package/templates/{zh-CN/workflow/common/agents → agents/aico/plan}/init-architect.md +11 -8
- package/templates/agents/aico/requirement/aico-requirement-aligner.md +231 -0
- package/templates/agents/aico/requirement/aico-requirement-identifier.md +221 -0
- package/templates/agents/aico/requirement/aico-task-executor-validator.md +289 -0
- package/templates/agents/aico/requirement/aico-task-executor.md +328 -0
- package/templates/agents/aico/requirement/aico-task-splitter-validator.md +585 -0
- package/templates/base.md +51 -0
- package/templates/{zh-CN/workflow/common/commands → commands/aico}/init-project.md +1 -1
- package/templates/commands/aico/requirement.md +351 -0
- package/templates/commands/aico/workflow.md +229 -0
- package/templates/language.md +1 -0
- package/templates/personality.md +143 -0
- package/templates/settings.json +6 -3
- package/templates/en/memory/mcp.md +0 -6
- package/templates/en/memory/personality.md +0 -1
- package/templates/en/memory/rules.md +0 -45
- package/templates/en/memory/technical-guides.md +0 -97
- package/templates/en/workflow/bmad/commands/bmad-init.md +0 -103
- package/templates/en/workflow/common/agents/get-current-datetime.md +0 -29
- package/templates/en/workflow/common/agents/init-architect.md +0 -114
- package/templates/en/workflow/common/commands/init-project.md +0 -53
- package/templates/en/workflow/git/commands/git-cleanBranches.md +0 -101
- package/templates/en/workflow/git/commands/git-commit.md +0 -152
- package/templates/en/workflow/git/commands/git-rollback.md +0 -89
- package/templates/en/workflow/git/commands/git-worktree.md +0 -301
- package/templates/en/workflow/plan/agents/planner.md +0 -116
- package/templates/en/workflow/plan/agents/ui-ux-designer.md +0 -91
- package/templates/en/workflow/plan/commands/feat.md +0 -105
- package/templates/en/workflow/sixStep/commands/workflow.md +0 -230
- package/templates/zh-CN/memory/mcp.md +0 -34
- package/templates/zh-CN/memory/personality.md +0 -1
- package/templates/zh-CN/memory/rules.md +0 -45
- package/templates/zh-CN/memory/technical-guides.md +0 -126
- package/templates/zh-CN/workflow/bmad/commands/bmad-init.md +0 -109
- package/templates/zh-CN/workflow/git/commands/git-cleanBranches.md +0 -101
- package/templates/zh-CN/workflow/git/commands/git-commit.md +0 -162
- package/templates/zh-CN/workflow/git/commands/git-rollback.md +0 -90
- package/templates/zh-CN/workflow/git/commands/git-worktree.md +0 -225
- package/templates/zh-CN/workflow/plan/commands/feat.md +0 -105
- package/templates/zh-CN/workflow/sixStep/commands/workflow.md +0 -199
- /package/templates/{zh-CN/workflow/plan/agents → agents/aico/plan}/planner.md +0 -0
- /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 };
|