aico-cli 0.0.7 → 0.0.9
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/cli.mjs +6 -21
- package/dist/index.mjs +1 -1
- package/dist/shared/{aico-cli.CVvY5LWc.mjs → aico-cli.Ngtnxi15.mjs} +4 -4
- package/package.json +1 -1
- package/templates/en/workflow/plan/commands/feat.md +1 -1
- package/templates/en/workflow/sixStep/commands/workflow.md +3 -3
- package/templates/zh-CN/workflow/sixStep/commands/workflow.md +3 -3
package/dist/cli.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import cac from 'cac';
|
|
3
3
|
import ansis from 'ansis';
|
|
4
|
-
import { J as readZcfConfig, K as
|
|
4
|
+
import { J as readZcfConfig, K as updateZcfConfig, N as getTranslation, k as AI_OUTPUT_LANGUAGES, O as inquirer, P as addNumbersToChoices, Q as version, q as backupExistingConfig, r as copyConfigFiles, x as applyAiLanguageDirective, R as configureAiPersonality, C as CLAUDE_DIR, T as readJsonConfig, H as addCompletedOnboarding, S as SETTINGS_FILE, U as writeJsonConfig, o as openSettingsJson, b as importRecommendedPermissions, a as importRecommendedEnv, V as isWindows, z as readMcpConfig, G as fixWindowsMcpConfig, B as writeMcpConfig, W as selectMcpServices, D as backupMcpConfig, M as MCP_SERVICES, F as buildMcpServerConfig, X as EscapeKeyPressed, E as mergeMcpServers, Y as displayBanner, I as I18N, Z as selectAndInstallWorkflows, _ as handleExitPromptError, $ as handleGeneralError, a0 as displayBannerWithInfo, a1 as readZcfConfigAsync, i as init, a2 as executeWithEscapeSupport } from './shared/aico-cli.Ngtnxi15.mjs';
|
|
5
5
|
import inquirer$1 from 'inquirer';
|
|
6
6
|
import { existsSync, copyFileSync, mkdirSync } from 'node:fs';
|
|
7
7
|
import { exec, spawn } from 'node:child_process';
|
|
@@ -65,22 +65,7 @@ async function selectScriptLanguage(currentLang) {
|
|
|
65
65
|
if (zcfConfig?.preferredLang) {
|
|
66
66
|
return zcfConfig.preferredLang;
|
|
67
67
|
}
|
|
68
|
-
const
|
|
69
|
-
type: "list",
|
|
70
|
-
name: "lang",
|
|
71
|
-
message: "Select AICO display language / \u9009\u62E9\u663E\u793A\u8BED\u8A00",
|
|
72
|
-
choices: addNumbersToChoices(
|
|
73
|
-
SUPPORTED_LANGS.map((l) => ({
|
|
74
|
-
name: LANG_LABELS[l],
|
|
75
|
-
value: l
|
|
76
|
-
}))
|
|
77
|
-
)
|
|
78
|
-
});
|
|
79
|
-
if (!lang) {
|
|
80
|
-
console.log(ansis.yellow("Operation cancelled / \u64CD\u4F5C\u5DF2\u53D6\u6D88"));
|
|
81
|
-
process.exit(0);
|
|
82
|
-
}
|
|
83
|
-
const scriptLang = lang;
|
|
68
|
+
const scriptLang = "zh-CN";
|
|
84
69
|
updateZcfConfig({
|
|
85
70
|
version,
|
|
86
71
|
preferredLang: scriptLang
|
|
@@ -1031,8 +1016,8 @@ async function showMainMenu() {
|
|
|
1031
1016
|
},
|
|
1032
1017
|
"2": {
|
|
1033
1018
|
key: "2",
|
|
1034
|
-
labelKey: "
|
|
1035
|
-
processor: () =>
|
|
1019
|
+
labelKey: "startCodeEditor",
|
|
1020
|
+
processor: () => startClaudeCodeEditor(scriptLang),
|
|
1036
1021
|
section: "\u57FA\u7840\u914D\u7F6E"
|
|
1037
1022
|
},
|
|
1038
1023
|
"3": {
|
|
@@ -1055,8 +1040,8 @@ async function showMainMenu() {
|
|
|
1055
1040
|
},
|
|
1056
1041
|
"6": {
|
|
1057
1042
|
key: "6",
|
|
1058
|
-
labelKey: "
|
|
1059
|
-
processor: () =>
|
|
1043
|
+
labelKey: "importWorkflow",
|
|
1044
|
+
processor: () => update({ skipBanner: true }),
|
|
1060
1045
|
section: "\u57FA\u7840\u914D\u7F6E"
|
|
1061
1046
|
},
|
|
1062
1047
|
"7": {
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as AICO_CONFIG_FILE, k as AI_OUTPUT_LANGUAGES, C as CLAUDE_DIR, e as CLAUDE_MD_FILE, f as ClAUDE_CONFIG_FILE, I as I18N, j as LANG_LABELS, L as LEGACY_AICO_CONFIG_FILE, M as MCP_SERVICES, S as SETTINGS_FILE, h as SUPPORTED_LANGS, H as addCompletedOnboarding, x as applyAiLanguageDirective, q as backupExistingConfig, D as backupMcpConfig, F as buildMcpServerConfig, d as cleanupPermissions, c as commandExists, s as configureApi, r as copyConfigFiles, p as ensureClaudeDir, G as fixWindowsMcpConfig, w as getExistingApiConfig, y as getMcpConfigPath, g as getPlatform, a as importRecommendedEnv, b as importRecommendedPermissions, i as init, n as installClaudeCode, l as isClaudeCodeInstalled, m as mergeAndCleanPermissions, t as mergeConfigs, E as mergeMcpServers, v as mergeSettingsFile, o as openSettingsJson, z as readMcpConfig, u as updateDefaultModel, B as writeMcpConfig } from './shared/aico-cli.
|
|
1
|
+
export { A as AICO_CONFIG_FILE, k as AI_OUTPUT_LANGUAGES, C as CLAUDE_DIR, e as CLAUDE_MD_FILE, f as ClAUDE_CONFIG_FILE, I as I18N, j as LANG_LABELS, L as LEGACY_AICO_CONFIG_FILE, M as MCP_SERVICES, S as SETTINGS_FILE, h as SUPPORTED_LANGS, H as addCompletedOnboarding, x as applyAiLanguageDirective, q as backupExistingConfig, D as backupMcpConfig, F as buildMcpServerConfig, d as cleanupPermissions, c as commandExists, s as configureApi, r as copyConfigFiles, p as ensureClaudeDir, G as fixWindowsMcpConfig, w as getExistingApiConfig, y as getMcpConfigPath, g as getPlatform, a as importRecommendedEnv, b as importRecommendedPermissions, i as init, n as installClaudeCode, l as isClaudeCodeInstalled, m as mergeAndCleanPermissions, t as mergeConfigs, E as mergeMcpServers, v as mergeSettingsFile, o as openSettingsJson, z as readMcpConfig, u as updateDefaultModel, B as writeMcpConfig } from './shared/aico-cli.Ngtnxi15.mjs';
|
|
2
2
|
import 'inquirer';
|
|
3
3
|
import 'ansis';
|
|
4
4
|
import 'node:fs';
|
|
@@ -80,7 +80,7 @@ const inquirer = {
|
|
|
80
80
|
createPromptModule: inquirer$1.createPromptModule
|
|
81
81
|
};
|
|
82
82
|
|
|
83
|
-
const version = "0.0.
|
|
83
|
+
const version = "0.0.9";
|
|
84
84
|
|
|
85
85
|
const common$1 = {
|
|
86
86
|
// Basic
|
|
@@ -267,7 +267,7 @@ const menu$1 = {
|
|
|
267
267
|
configureApi: "\u914D\u7F6E API",
|
|
268
268
|
configureMcp: "\u914D\u7F6E MCP",
|
|
269
269
|
configureModel: "\u914D\u7F6E\u9ED8\u8BA4\u6A21\u578B",
|
|
270
|
-
configureAiMemory: "\u914D\u7F6E
|
|
270
|
+
configureAiMemory: "\u914D\u7F6E\u5168\u5C40\u8BB0\u5FC6",
|
|
271
271
|
configureEnvPermission: "\u5BFC\u5165\u63A8\u8350\u73AF\u5883\u53D8\u91CF\u548C\u6743\u9650\u914D\u7F6E",
|
|
272
272
|
startCodeEditor: "\u542F\u52A8\u4EE3\u7801\u7F16\u8F91",
|
|
273
273
|
updateVersion: "\u66F4\u65B0\u7248\u672C",
|
|
@@ -284,7 +284,7 @@ const menu$1 = {
|
|
|
284
284
|
importWorkflow: "\u4EC5\u5BFC\u5165/\u66F4\u65B0\u5DE5\u4F5C\u6D41\u76F8\u5173\u6587\u4EF6",
|
|
285
285
|
configureApiOrCcr: "\u914D\u7F6E API URL\u3001\u8BA4\u8BC1\u4FE1\u606F\u6216 CCR \u4EE3\u7406",
|
|
286
286
|
configureApi: "\u914D\u7F6E API URL \u548C\u8BA4\u8BC1\u4FE1\u606F",
|
|
287
|
-
configureMcp: "\u914D\u7F6E MCP \u670D\u52A1
|
|
287
|
+
configureMcp: "\u914D\u7F6E MCP \u670D\u52A1",
|
|
288
288
|
configureModel: "\u8BBE\u7F6E\u9ED8\u8BA4\u6A21\u578B\uFF08opus/sonnet\uFF09",
|
|
289
289
|
configureAiMemory: "\u914D\u7F6E AI \u8F93\u51FA\u8BED\u8A00\u548C\u89D2\u8272\u98CE\u683C",
|
|
290
290
|
configureEnvPermission: "\u5BFC\u5165\u9690\u79C1\u4FDD\u62A4\u73AF\u5883\u53D8\u91CF\u548C\u7CFB\u7EDF\u6743\u9650\u914D\u7F6E",
|
|
@@ -2395,4 +2395,4 @@ async function openSettingsJson() {
|
|
|
2395
2395
|
}
|
|
2396
2396
|
}
|
|
2397
2397
|
|
|
2398
|
-
export { handleGeneralError as $, AICO_CONFIG_FILE as A, writeMcpConfig as B, CLAUDE_DIR as C, backupMcpConfig as D, mergeMcpServers as E, buildMcpServerConfig as F, fixWindowsMcpConfig as G, addCompletedOnboarding as H, I18N as I, readZcfConfig as J,
|
|
2398
|
+
export { handleGeneralError as $, AICO_CONFIG_FILE as A, writeMcpConfig as B, CLAUDE_DIR as C, backupMcpConfig as D, mergeMcpServers as E, buildMcpServerConfig as F, fixWindowsMcpConfig as G, addCompletedOnboarding as H, I18N as I, readZcfConfig as J, updateZcfConfig as K, LEGACY_AICO_CONFIG_FILE as L, MCP_SERVICES as M, getTranslation as N, inquirer as O, addNumbersToChoices as P, version as Q, configureAiPersonality as R, SETTINGS_FILE as S, readJsonConfig as T, writeJsonConfig as U, isWindows as V, selectMcpServices as W, EscapeKeyPressed as X, displayBanner as Y, selectAndInstallWorkflows as Z, handleExitPromptError as _, importRecommendedEnv as a, displayBannerWithInfo as a0, readZcfConfigAsync as a1, executeWithEscapeSupport as a2, importRecommendedPermissions as b, commandExists as c, cleanupPermissions as d, CLAUDE_MD_FILE as e, ClAUDE_CONFIG_FILE as f, getPlatform as g, SUPPORTED_LANGS as h, init as i, LANG_LABELS as j, AI_OUTPUT_LANGUAGES as k, isClaudeCodeInstalled as l, mergeAndCleanPermissions as m, installClaudeCode as n, openSettingsJson as o, ensureClaudeDir as p, backupExistingConfig as q, copyConfigFiles as r, configureApi as s, mergeConfigs as t, updateDefaultModel as u, mergeSettingsFile as v, getExistingApiConfig as w, applyAiLanguageDirective as x, getMcpConfigPath as y, readMcpConfig as z };
|
package/package.json
CHANGED
|
@@ -30,7 +30,7 @@ When receiving user input, first perform type determination and clearly inform t
|
|
|
30
30
|
|
|
31
31
|
- Generate detailed markdown planning document
|
|
32
32
|
|
|
33
|
-
- Store document in `./.
|
|
33
|
+
- Store document in `./.aico/plan` directory, named in plan/xxx.md format
|
|
34
34
|
|
|
35
35
|
- Include: objective definition, feature breakdown, implementation steps, acceptance criteria
|
|
36
36
|
|
|
@@ -56,7 +56,7 @@ You are a professional AI programming assistant following a structured core work
|
|
|
56
56
|
|
|
57
57
|
- Must have user approval before execution
|
|
58
58
|
- Strictly follow the plan for coding implementation
|
|
59
|
-
- Store plan summary (with context and plan) in project root directory `.
|
|
59
|
+
- Store plan summary (with context and plan) in project root directory `.aico/plan/task-name.md`
|
|
60
60
|
- Request user feedback after key steps and completion
|
|
61
61
|
|
|
62
62
|
### 5. `[Mode: Optimize]` - Code Optimization
|
|
@@ -187,7 +187,7 @@ Questions to Ask:
|
|
|
187
187
|
- Implement according to approved plan
|
|
188
188
|
- Follow development best practices
|
|
189
189
|
- Add usage methods before import statements (critical rule)
|
|
190
|
-
- Store execution plan in project root directory `.
|
|
190
|
+
- Store execution plan in project root directory `.aico/plan/task-name.md`
|
|
191
191
|
- Request feedback at key milestones
|
|
192
192
|
|
|
193
193
|
### 🚀 Phase 5: Code Optimization
|
|
@@ -212,7 +212,7 @@ Questions to Ask:
|
|
|
212
212
|
|
|
213
213
|
```
|
|
214
214
|
project/ # Project root directory
|
|
215
|
-
├── .
|
|
215
|
+
├── .aico/
|
|
216
216
|
│ └── plan/
|
|
217
217
|
│ └── task-name.md # Execution plan and context (in project root)
|
|
218
218
|
├── src/
|
|
@@ -33,7 +33,7 @@ description: '专业AI编程助手,提供结构化六阶段开发工作流(
|
|
|
33
33
|
1. `[模式:研究]`:理解需求并评估完整性(0-10 分),低于 7 分时主动要求补充关键信息。
|
|
34
34
|
2. `[模式:构思]`:提供至少两种可行方案及评估(例如:`方案 1:描述`)。
|
|
35
35
|
3. `[模式:计划]`:将选定方案细化为详尽、有序、可执行的步骤清单(含原子操作:文件、函数/类、逻辑概要;预期结果;新库用 `Context7` 查询)。不写完整代码。完成后请求用户批准。
|
|
36
|
-
4. `[模式:执行]`:必须用户批准方可执行。严格按计划编码执行。计划简要(含上下文和计划)存入当前项目根目录的`.
|
|
36
|
+
4. `[模式:执行]`:必须用户批准方可执行。严格按计划编码执行。计划简要(含上下文和计划)存入当前项目根目录的`.aico/plan/任务名.md`。关键步骤后及完成时请求用户反馈。
|
|
37
37
|
5. `[模式:优化]`:在 `[模式:执行]` 完成后,必须自动进行本模式 `[模式:优化]`,自动检查并分析本次任务已实现(仅本次对话产生的相关代码),在 `[模式:执行]` 下产生的相关代码。聚焦冗余、低效、垃圾代码,提出具体优化建议(含优化理由与预期收益),用户确认后执行相关优化功能。
|
|
38
38
|
6. `[模式:评审]`:对照计划评估执行结果,报告问题与建议。完成后请求用户确认。
|
|
39
39
|
|
|
@@ -156,7 +156,7 @@ description: '专业AI编程助手,提供结构化六阶段开发工作流(
|
|
|
156
156
|
- 根据批准的计划实施
|
|
157
157
|
- 遵循开发最佳实践
|
|
158
158
|
- 在导入语句之前添加使用方法(关键规则)
|
|
159
|
-
- 在项目根目录 `.
|
|
159
|
+
- 在项目根目录 `.aico/plan/任务名.md` 中存储执行计划
|
|
160
160
|
- 在关键里程碑请求反馈
|
|
161
161
|
|
|
162
162
|
### 🚀 阶段 5:代码优化
|
|
@@ -181,7 +181,7 @@ description: '专业AI编程助手,提供结构化六阶段开发工作流(
|
|
|
181
181
|
|
|
182
182
|
```
|
|
183
183
|
project/ # 项目根目录
|
|
184
|
-
├── .
|
|
184
|
+
├── .aico/
|
|
185
185
|
│ └── plan/
|
|
186
186
|
│ └── 任务名.md # 执行计划和上下文(在项目根目录)
|
|
187
187
|
├── src/
|