@cannbot-ai/install-helper 1.1.5 → 1.1.6-beta.1
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 +21 -1
- package/bin/install-helper.js +0 -0
- package/dist/config/repository.yaml +0 -1
- package/dist/index.js +1677 -1029
- package/dist/index.js.map +1 -1
- package/dist/locales/en_US.json +27 -1
- package/dist/locales/zh_CN.json +27 -1
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -1,19 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
import { select, Separator } from "@inquirer/prompts";
|
|
12
|
-
import chalk3 from "chalk";
|
|
13
|
-
|
|
14
|
-
// src/core/registry.ts
|
|
15
|
-
import { readdirSync, existsSync } from "fs";
|
|
16
|
-
import { join } from "path";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __esm = (fn, res) => function __init() {
|
|
5
|
+
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
6
|
+
};
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
17
11
|
|
|
18
12
|
// src/utils/fs-helpers.ts
|
|
19
13
|
import { lstatSync, statSync, unlinkSync, rmSync } from "fs";
|
|
@@ -42,532 +36,544 @@ function removePath(p) {
|
|
|
42
36
|
} catch {
|
|
43
37
|
}
|
|
44
38
|
}
|
|
39
|
+
var init_fs_helpers = __esm({
|
|
40
|
+
"src/utils/fs-helpers.ts"() {
|
|
41
|
+
"use strict";
|
|
42
|
+
}
|
|
43
|
+
});
|
|
45
44
|
|
|
46
45
|
// src/embedded-plugins.json
|
|
47
|
-
var embedded_plugins_default
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
displayName: "AscendC Kernel \u76F4\u8C03",
|
|
52
|
-
script: "init.sh",
|
|
53
|
-
aliases: [
|
|
54
|
-
"ops-direct",
|
|
55
|
-
"ascendc-direct",
|
|
56
|
-
"direct",
|
|
57
|
-
"kernel"
|
|
58
|
-
],
|
|
59
|
-
skills: 20,
|
|
60
|
-
agents: 4,
|
|
61
|
-
description: "Ascend C \u76F4\u8C03\u5168\u6D41\u7A0B\uFF1A\u73AF\u5883\u2192\u8BBE\u8BA1\u2192\u5F00\u53D1\u2192\u5BA1\u67E5\u2192\u6027\u80FD\u9A8C\u6536",
|
|
62
|
-
version: "1.2.4",
|
|
63
|
-
configFile: "AGENTS.md",
|
|
64
|
-
configRootConfigLink: false,
|
|
65
|
-
installSkills: [
|
|
46
|
+
var embedded_plugins_default;
|
|
47
|
+
var init_embedded_plugins = __esm({
|
|
48
|
+
"src/embedded-plugins.json"() {
|
|
49
|
+
embedded_plugins_default = [
|
|
66
50
|
{
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
"
|
|
73
|
-
"ascendc-
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
51
|
+
id: "ops-direct-invoke",
|
|
52
|
+
dir: "plugins-official/ops-direct-invoke",
|
|
53
|
+
displayName: "AscendC Kernel \u76F4\u8C03",
|
|
54
|
+
script: "init.sh",
|
|
55
|
+
aliases: [
|
|
56
|
+
"ops-direct",
|
|
57
|
+
"ascendc-direct",
|
|
58
|
+
"direct",
|
|
59
|
+
"kernel"
|
|
60
|
+
],
|
|
61
|
+
skills: 20,
|
|
62
|
+
agents: 4,
|
|
63
|
+
description: "Ascend C \u76F4\u8C03\u5168\u6D41\u7A0B\uFF1A\u73AF\u5883\u2192\u8BBE\u8BA1\u2192\u5F00\u53D1\u2192\u5BA1\u67E5\u2192\u6027\u80FD\u9A8C\u6536",
|
|
64
|
+
version: "1.2.4",
|
|
65
|
+
configFile: "AGENTS.md",
|
|
66
|
+
configRootConfigLink: false,
|
|
67
|
+
installSkills: [
|
|
68
|
+
{
|
|
69
|
+
dir: "ops",
|
|
70
|
+
skills: [
|
|
71
|
+
"ascendc-tiling-design",
|
|
72
|
+
"npu-arch",
|
|
73
|
+
"ascendc-api-best-practices",
|
|
74
|
+
"ascendc-regbase-best-practice",
|
|
75
|
+
"ascendc-blaze-best-practice",
|
|
76
|
+
"ops-precision-standard",
|
|
77
|
+
"ascendc-docs-search",
|
|
78
|
+
"ascendc-env-check",
|
|
79
|
+
"ascendc-precision-debug",
|
|
80
|
+
"ops-profiling",
|
|
81
|
+
"ascendc-direct-invoke-template",
|
|
82
|
+
"torch-ascendc-op-extension",
|
|
83
|
+
"ascendc-runtime-debug",
|
|
84
|
+
"ascendc-crash-debug",
|
|
85
|
+
"ascendc-code-review",
|
|
86
|
+
"ascendc-mc2-best-practice"
|
|
87
|
+
]
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
dir: "infra",
|
|
91
|
+
skills: [
|
|
92
|
+
"gitcode-toolkit",
|
|
93
|
+
"gitcode-pr-handler",
|
|
94
|
+
"gitcode-issue-gen",
|
|
95
|
+
"gitcode-issue-handler"
|
|
96
|
+
]
|
|
97
|
+
}
|
|
98
|
+
],
|
|
99
|
+
installAgents: [
|
|
100
|
+
"ascendc-kernel-architect",
|
|
101
|
+
"ascendc-kernel-design-reviewer",
|
|
102
|
+
"ascendc-kernel-developer",
|
|
103
|
+
"ascendc-kernel-reviewer"
|
|
104
|
+
],
|
|
105
|
+
externalRepos: [
|
|
106
|
+
{
|
|
107
|
+
url: "https://gitcode.com/cann/asc-devkit.git",
|
|
108
|
+
dir: "plugins-official/ops-direct-invoke/asc-devkit",
|
|
109
|
+
configRootLink: false
|
|
110
|
+
}
|
|
85
111
|
]
|
|
86
112
|
},
|
|
87
113
|
{
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
"
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
dir: "plugins-official/ops-direct-invoke-flash/skills",
|
|
129
|
-
skills: [
|
|
130
|
-
"ops-direct-invoke-flash"
|
|
114
|
+
id: "ops-direct-invoke-flash",
|
|
115
|
+
dir: "plugins-official/ops-direct-invoke-flash",
|
|
116
|
+
displayName: "AscendC Kernel \u76F4\u8C03\uFF08\u5FEB\u901F\u7248\uFF09",
|
|
117
|
+
script: "init.sh",
|
|
118
|
+
aliases: [
|
|
119
|
+
"flash",
|
|
120
|
+
"kernel-flash"
|
|
121
|
+
],
|
|
122
|
+
skills: 7,
|
|
123
|
+
agents: 1,
|
|
124
|
+
description: "\u4ECE\u6570\u5B66\u516C\u5F0F\u6216\u4EE3\u7801\u7247\u6BB5\u5FEB\u901F\u6784\u5EFA\u5E76\u9A8C\u8BC1 Ascend NPU \u6838\u51FD\u6570",
|
|
125
|
+
version: "1.2.2",
|
|
126
|
+
configFile: "AGENTS.md",
|
|
127
|
+
configRootConfigLink: true,
|
|
128
|
+
installSkills: [
|
|
129
|
+
{
|
|
130
|
+
dir: "plugins-official/ops-direct-invoke-flash/skills",
|
|
131
|
+
skills: [
|
|
132
|
+
"ops-direct-invoke-flash"
|
|
133
|
+
]
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
dir: "ops",
|
|
137
|
+
skills: [
|
|
138
|
+
"ascendc-st-design",
|
|
139
|
+
"ascendc-whitebox-design"
|
|
140
|
+
]
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
dir: "infra",
|
|
144
|
+
skills: [
|
|
145
|
+
"gitcode-toolkit",
|
|
146
|
+
"gitcode-pr-handler",
|
|
147
|
+
"gitcode-issue-gen",
|
|
148
|
+
"gitcode-issue-handler"
|
|
149
|
+
]
|
|
150
|
+
}
|
|
151
|
+
],
|
|
152
|
+
installAgents: [
|
|
153
|
+
"ops-direct-invoke-flash-reviewer"
|
|
131
154
|
]
|
|
132
155
|
},
|
|
133
156
|
{
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
157
|
+
id: "ops-registry-invoke",
|
|
158
|
+
dir: "plugins-official/ops-registry-invoke",
|
|
159
|
+
displayName: "AscendC \u7B97\u5B50\u6CE8\u518C\u8C03\u7528",
|
|
160
|
+
script: "init.sh",
|
|
161
|
+
aliases: [
|
|
162
|
+
"ops-registry",
|
|
163
|
+
"ascendc-registry",
|
|
164
|
+
"registry"
|
|
165
|
+
],
|
|
166
|
+
skills: 28,
|
|
167
|
+
agents: 3,
|
|
168
|
+
description: "\u751F\u4EA7\u7EA7 ACLNN \u6CE8\u518C\u7B97\u5B50\u5168\u6D41\u7A0B\uFF1A\u4EE3\u7801\u2192UT/ST\u2192\u4E0A\u5E93",
|
|
169
|
+
version: "1.2.0",
|
|
170
|
+
configFile: "AGENTS.md",
|
|
171
|
+
configRootConfigLink: false,
|
|
172
|
+
installSkills: [
|
|
173
|
+
{
|
|
174
|
+
dir: "ops",
|
|
175
|
+
skills: [
|
|
176
|
+
"ascendc-blaze-best-practice",
|
|
177
|
+
"ascendc-api-best-practices",
|
|
178
|
+
"ascendc-code-review",
|
|
179
|
+
"ascendc-crash-debug",
|
|
180
|
+
"ascendc-direct-invoke-template",
|
|
181
|
+
"ascendc-docs-gen",
|
|
182
|
+
"ascendc-docs-search",
|
|
183
|
+
"ascendc-env-check",
|
|
184
|
+
"npu-arch",
|
|
185
|
+
"ascendc-performance-best-practices",
|
|
186
|
+
"ascendc-precision-debug",
|
|
187
|
+
"ascendc-regbase-best-practice",
|
|
188
|
+
"ascendc-registry-invoke-template",
|
|
189
|
+
"ascendc-runtime-debug",
|
|
190
|
+
"ascendc-st-design",
|
|
191
|
+
"ascendc-tiling-design",
|
|
192
|
+
"ascendc-ut-develop",
|
|
193
|
+
"ascendc-whitebox-design",
|
|
194
|
+
"ops-precision-standard",
|
|
195
|
+
"ops-profiling",
|
|
196
|
+
"ops-spec-gen",
|
|
197
|
+
"ascendc-perf-optimize",
|
|
198
|
+
"ops-simulator"
|
|
199
|
+
]
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
dir: "infra",
|
|
203
|
+
skills: [
|
|
204
|
+
"gitcode-toolkit",
|
|
205
|
+
"gitcode-pr-handler",
|
|
206
|
+
"gitcode-issue-gen",
|
|
207
|
+
"gitcode-issue-handler"
|
|
208
|
+
]
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
dir: "plugins-official/ops-registry-invoke",
|
|
212
|
+
skills: [
|
|
213
|
+
{
|
|
214
|
+
name: "workflow",
|
|
215
|
+
as: "ops-registry-invoke-workflow"
|
|
216
|
+
}
|
|
217
|
+
]
|
|
218
|
+
}
|
|
219
|
+
],
|
|
220
|
+
installAgents: [
|
|
221
|
+
"ascendc-ops-architect",
|
|
222
|
+
"ascendc-ops-developer",
|
|
223
|
+
"ascendc-ops-tester"
|
|
224
|
+
],
|
|
225
|
+
externalRepos: [
|
|
226
|
+
{
|
|
227
|
+
url: "https://gitcode.com/cann/asc-devkit.git",
|
|
228
|
+
dir: "plugins-official/ops-registry-invoke/asc-devkit",
|
|
229
|
+
configRootLink: false
|
|
230
|
+
}
|
|
138
231
|
]
|
|
139
232
|
},
|
|
140
233
|
{
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
"
|
|
147
|
-
]
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
"
|
|
177
|
-
"
|
|
178
|
-
"
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
"ascendc-registry-invoke-template",
|
|
187
|
-
"ascendc-runtime-debug",
|
|
188
|
-
"ascendc-st-design",
|
|
189
|
-
"ascendc-tiling-design",
|
|
190
|
-
"ascendc-ut-develop",
|
|
191
|
-
"ascendc-whitebox-design",
|
|
192
|
-
"ops-precision-standard",
|
|
193
|
-
"ops-profiling",
|
|
194
|
-
"ops-spec-gen",
|
|
195
|
-
"ascendc-perf-optimize",
|
|
196
|
-
"ops-simulator"
|
|
234
|
+
id: "catlass-op-generator",
|
|
235
|
+
dir: "plugins-official/catlass-op-generator",
|
|
236
|
+
displayName: "Catlass \u7B97\u5B50\u76F4\u8C03",
|
|
237
|
+
script: "init.sh",
|
|
238
|
+
aliases: [
|
|
239
|
+
"catlass"
|
|
240
|
+
],
|
|
241
|
+
skills: 14,
|
|
242
|
+
agents: 3,
|
|
243
|
+
description: "Catlass \u6A21\u677F\u62FC\u88C5 GEMM/Matmul/Epilogue \u7B97\u5B50\u5F00\u53D1",
|
|
244
|
+
version: "1.0.0",
|
|
245
|
+
configFile: "AGENTS.md",
|
|
246
|
+
configRootConfigLink: true,
|
|
247
|
+
installSkills: [
|
|
248
|
+
{
|
|
249
|
+
dir: "ops",
|
|
250
|
+
skills: [
|
|
251
|
+
"catlass-op-design",
|
|
252
|
+
"catlass-op-develop",
|
|
253
|
+
"catlass-op-perf-tune",
|
|
254
|
+
"ascendc-tiling-design",
|
|
255
|
+
"npu-arch",
|
|
256
|
+
"ascendc-api-best-practices",
|
|
257
|
+
"ops-precision-standard",
|
|
258
|
+
"ascendc-docs-search",
|
|
259
|
+
"ascendc-env-check",
|
|
260
|
+
"ascendc-precision-debug",
|
|
261
|
+
"ops-profiling",
|
|
262
|
+
"ascendc-runtime-debug",
|
|
263
|
+
"ascendc-code-review",
|
|
264
|
+
"torch-ascendc-op-extension"
|
|
265
|
+
]
|
|
266
|
+
}
|
|
267
|
+
],
|
|
268
|
+
installAgents: [
|
|
269
|
+
"catlass-op-architect",
|
|
270
|
+
"catlass-op-generator",
|
|
271
|
+
"catlass-op-reviewer"
|
|
272
|
+
],
|
|
273
|
+
externalRepos: [
|
|
274
|
+
{
|
|
275
|
+
url: "https://gitcode.com/cann/asc-devkit.git",
|
|
276
|
+
dir: "plugins-official/catlass-op-generator/asc-devkit",
|
|
277
|
+
configRootLink: false
|
|
278
|
+
}
|
|
197
279
|
]
|
|
198
280
|
},
|
|
199
281
|
{
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
"
|
|
282
|
+
id: "model-infer-sota-approach",
|
|
283
|
+
dir: "plugins-official/model-infer-sota-approach",
|
|
284
|
+
displayName: "NPU \u63A8\u7406 SOTA \u4F18\u5316",
|
|
285
|
+
script: "init.sh",
|
|
286
|
+
aliases: [
|
|
287
|
+
"sota",
|
|
288
|
+
"sota-approach",
|
|
289
|
+
"model-infer-sota"
|
|
290
|
+
],
|
|
291
|
+
skills: 14,
|
|
292
|
+
agents: 6,
|
|
293
|
+
description: "NPU \u63A8\u7406 baseline \u4E4B\u4E0A profiling \u9A71\u52A8\u7684\u63A2\u7D22\u5F0F\u4F18\u5316\u7F16\u6392\uFF08Plan/round \u81EA\u5FAA\u73AF\uFF0C\u4E0E model-infer-optimize \u524D\u540E\u8854\u63A5\uFF09",
|
|
294
|
+
version: "1.0.0",
|
|
295
|
+
configFile: "AGENTS.md",
|
|
296
|
+
configRootConfigLink: true,
|
|
297
|
+
installSkills: [
|
|
298
|
+
{
|
|
299
|
+
dir: "model",
|
|
300
|
+
skills: [
|
|
301
|
+
"model-infer-migrator",
|
|
302
|
+
"model-infer-parallel-analysis",
|
|
303
|
+
"model-infer-parallel-impl",
|
|
304
|
+
"model-infer-kvcache",
|
|
305
|
+
"model-infer-fusion",
|
|
306
|
+
"model-infer-quantization",
|
|
307
|
+
"model-infer-graph-mode",
|
|
308
|
+
"model-infer-precision-debug",
|
|
309
|
+
"model-infer-runtime-debug",
|
|
310
|
+
"model-infer-multi-stream",
|
|
311
|
+
"model-infer-prefetch",
|
|
312
|
+
"model-infer-superkernel",
|
|
313
|
+
"model-infer-profiling",
|
|
314
|
+
"model-infer-perf-breakdown"
|
|
315
|
+
]
|
|
316
|
+
}
|
|
317
|
+
],
|
|
318
|
+
installAgents: [
|
|
319
|
+
"model-infer-sota-scenario",
|
|
320
|
+
"model-infer-sota-profiling-instrumenter",
|
|
321
|
+
"model-infer-sota-profile-analyzer",
|
|
322
|
+
"model-infer-sota-candidate",
|
|
323
|
+
"model-infer-sota-implementer",
|
|
324
|
+
"model-infer-sota-reviewer"
|
|
325
|
+
],
|
|
326
|
+
externalRepos: [
|
|
327
|
+
{
|
|
328
|
+
url: "https://gitcode.com/cann/cann-recipes-infer.git",
|
|
329
|
+
dir: "plugins-official/model-infer-sota-approach/cann-recipes-infer",
|
|
330
|
+
depth: 1,
|
|
331
|
+
configRootLink: true
|
|
332
|
+
}
|
|
206
333
|
]
|
|
207
334
|
},
|
|
208
335
|
{
|
|
209
|
-
|
|
210
|
-
|
|
336
|
+
id: "model-infer-optimize",
|
|
337
|
+
dir: "plugins-official/model-infer-optimize",
|
|
338
|
+
displayName: "NPU \u63A8\u7406\u4F18\u5316",
|
|
339
|
+
script: "init.sh",
|
|
340
|
+
aliases: [
|
|
341
|
+
"model-infer",
|
|
342
|
+
"infer",
|
|
343
|
+
"inference"
|
|
344
|
+
],
|
|
345
|
+
skills: 14,
|
|
346
|
+
agents: 3,
|
|
347
|
+
description: "NPU \u6A21\u578B\u63A8\u7406\u7AEF\u5230\u7AEF\u4F18\u5316\uFF08\u5E76\u884C/KVCache/\u878D\u5408/\u91CF\u5316/\u56FE\u6A21\u5F0F/\u591A\u6D41/SuperKernel\uFF09",
|
|
348
|
+
version: "1.0.5",
|
|
349
|
+
configFile: "AGENTS.md",
|
|
350
|
+
configRootConfigLink: true,
|
|
351
|
+
installSkills: [
|
|
211
352
|
{
|
|
212
|
-
|
|
213
|
-
|
|
353
|
+
dir: "model",
|
|
354
|
+
skills: [
|
|
355
|
+
"model-infer-migrator",
|
|
356
|
+
"model-infer-parallel-analysis",
|
|
357
|
+
"model-infer-parallel-impl",
|
|
358
|
+
"model-infer-kvcache",
|
|
359
|
+
"model-infer-fusion",
|
|
360
|
+
"model-infer-quantization",
|
|
361
|
+
"model-infer-graph-mode",
|
|
362
|
+
"model-infer-precision-debug",
|
|
363
|
+
"model-infer-runtime-debug",
|
|
364
|
+
"model-infer-multi-stream",
|
|
365
|
+
"model-infer-prefetch",
|
|
366
|
+
"model-infer-superkernel",
|
|
367
|
+
"model-infer-profiling",
|
|
368
|
+
"model-infer-perf-breakdown"
|
|
369
|
+
]
|
|
370
|
+
}
|
|
371
|
+
],
|
|
372
|
+
installAgents: [
|
|
373
|
+
"model-infer-analyzer",
|
|
374
|
+
"model-infer-implementer",
|
|
375
|
+
"model-infer-reviewer"
|
|
376
|
+
],
|
|
377
|
+
externalRepos: [
|
|
378
|
+
{
|
|
379
|
+
url: "https://gitcode.com/cann/cann-recipes-infer.git",
|
|
380
|
+
dir: "plugins-official/model-infer-optimize/cann-recipes-infer",
|
|
381
|
+
depth: 1,
|
|
382
|
+
configRootLink: true
|
|
214
383
|
}
|
|
215
384
|
]
|
|
216
|
-
}
|
|
217
|
-
],
|
|
218
|
-
installAgents: [
|
|
219
|
-
"ascendc-ops-architect",
|
|
220
|
-
"ascendc-ops-developer",
|
|
221
|
-
"ascendc-ops-tester"
|
|
222
|
-
],
|
|
223
|
-
externalRepos: [
|
|
224
|
-
{
|
|
225
|
-
url: "https://gitcode.com/cann/asc-devkit.git",
|
|
226
|
-
dir: "plugins-official/ops-registry-invoke/asc-devkit",
|
|
227
|
-
configRootLink: false
|
|
228
|
-
}
|
|
229
|
-
]
|
|
230
|
-
},
|
|
231
|
-
{
|
|
232
|
-
id: "catlass-op-generator",
|
|
233
|
-
dir: "plugins-official/catlass-op-generator",
|
|
234
|
-
displayName: "Catlass \u7B97\u5B50\u76F4\u8C03",
|
|
235
|
-
script: "init.sh",
|
|
236
|
-
aliases: [
|
|
237
|
-
"catlass"
|
|
238
|
-
],
|
|
239
|
-
skills: 14,
|
|
240
|
-
agents: 3,
|
|
241
|
-
description: "Catlass \u6A21\u677F\u62FC\u88C5 GEMM/Matmul/Epilogue \u7B97\u5B50\u5F00\u53D1",
|
|
242
|
-
version: "1.0.0",
|
|
243
|
-
configFile: "AGENTS.md",
|
|
244
|
-
configRootConfigLink: true,
|
|
245
|
-
installSkills: [
|
|
246
|
-
{
|
|
247
|
-
dir: "ops",
|
|
248
|
-
skills: [
|
|
249
|
-
"catlass-op-design",
|
|
250
|
-
"catlass-op-develop",
|
|
251
|
-
"catlass-op-perf-tune",
|
|
252
|
-
"ascendc-tiling-design",
|
|
253
|
-
"npu-arch",
|
|
254
|
-
"ascendc-api-best-practices",
|
|
255
|
-
"ops-precision-standard",
|
|
256
|
-
"ascendc-docs-search",
|
|
257
|
-
"ascendc-env-check",
|
|
258
|
-
"ascendc-precision-debug",
|
|
259
|
-
"ops-profiling",
|
|
260
|
-
"ascendc-runtime-debug",
|
|
261
|
-
"ascendc-code-review",
|
|
262
|
-
"torch-ascendc-op-extension"
|
|
263
|
-
]
|
|
264
|
-
}
|
|
265
|
-
],
|
|
266
|
-
installAgents: [
|
|
267
|
-
"catlass-op-architect",
|
|
268
|
-
"catlass-op-generator",
|
|
269
|
-
"catlass-op-reviewer"
|
|
270
|
-
],
|
|
271
|
-
externalRepos: [
|
|
272
|
-
{
|
|
273
|
-
url: "https://gitcode.com/cann/asc-devkit.git",
|
|
274
|
-
dir: "plugins-official/catlass-op-generator/asc-devkit",
|
|
275
|
-
configRootLink: false
|
|
276
|
-
}
|
|
277
|
-
]
|
|
278
|
-
},
|
|
279
|
-
{
|
|
280
|
-
id: "model-infer-sota-approach",
|
|
281
|
-
dir: "plugins-official/model-infer-sota-approach",
|
|
282
|
-
displayName: "NPU \u63A8\u7406 SOTA \u4F18\u5316",
|
|
283
|
-
script: "init.sh",
|
|
284
|
-
aliases: [
|
|
285
|
-
"sota",
|
|
286
|
-
"sota-approach",
|
|
287
|
-
"model-infer-sota"
|
|
288
|
-
],
|
|
289
|
-
skills: 14,
|
|
290
|
-
agents: 6,
|
|
291
|
-
description: "NPU \u63A8\u7406 baseline \u4E4B\u4E0A profiling \u9A71\u52A8\u7684\u63A2\u7D22\u5F0F\u4F18\u5316\u7F16\u6392\uFF08Plan/round \u81EA\u5FAA\u73AF\uFF0C\u4E0E model-infer-optimize \u524D\u540E\u8854\u63A5\uFF09",
|
|
292
|
-
version: "1.0.0",
|
|
293
|
-
configFile: "AGENTS.md",
|
|
294
|
-
configRootConfigLink: true,
|
|
295
|
-
installSkills: [
|
|
296
|
-
{
|
|
297
|
-
dir: "model",
|
|
298
|
-
skills: [
|
|
299
|
-
"model-infer-migrator",
|
|
300
|
-
"model-infer-parallel-analysis",
|
|
301
|
-
"model-infer-parallel-impl",
|
|
302
|
-
"model-infer-kvcache",
|
|
303
|
-
"model-infer-fusion",
|
|
304
|
-
"model-infer-quantization",
|
|
305
|
-
"model-infer-graph-mode",
|
|
306
|
-
"model-infer-precision-debug",
|
|
307
|
-
"model-infer-runtime-debug",
|
|
308
|
-
"model-infer-multi-stream",
|
|
309
|
-
"model-infer-prefetch",
|
|
310
|
-
"model-infer-superkernel",
|
|
311
|
-
"model-infer-profiling",
|
|
312
|
-
"model-infer-perf-breakdown"
|
|
313
|
-
]
|
|
314
|
-
}
|
|
315
|
-
],
|
|
316
|
-
installAgents: [
|
|
317
|
-
"model-infer-sota-scenario",
|
|
318
|
-
"model-infer-sota-profiling-instrumenter",
|
|
319
|
-
"model-infer-sota-profile-analyzer",
|
|
320
|
-
"model-infer-sota-candidate",
|
|
321
|
-
"model-infer-sota-implementer",
|
|
322
|
-
"model-infer-sota-reviewer"
|
|
323
|
-
],
|
|
324
|
-
externalRepos: [
|
|
325
|
-
{
|
|
326
|
-
url: "https://gitcode.com/cann/cann-recipes-infer.git",
|
|
327
|
-
dir: "plugins-official/model-infer-sota-approach/cann-recipes-infer",
|
|
328
|
-
depth: 1,
|
|
329
|
-
configRootLink: true
|
|
330
|
-
}
|
|
331
|
-
]
|
|
332
|
-
},
|
|
333
|
-
{
|
|
334
|
-
id: "model-infer-optimize",
|
|
335
|
-
dir: "plugins-official/model-infer-optimize",
|
|
336
|
-
displayName: "NPU \u63A8\u7406\u4F18\u5316",
|
|
337
|
-
script: "init.sh",
|
|
338
|
-
aliases: [
|
|
339
|
-
"model-infer",
|
|
340
|
-
"infer",
|
|
341
|
-
"inference"
|
|
342
|
-
],
|
|
343
|
-
skills: 14,
|
|
344
|
-
agents: 3,
|
|
345
|
-
description: "NPU \u6A21\u578B\u63A8\u7406\u7AEF\u5230\u7AEF\u4F18\u5316\uFF08\u5E76\u884C/KVCache/\u878D\u5408/\u91CF\u5316/\u56FE\u6A21\u5F0F/\u591A\u6D41/SuperKernel\uFF09",
|
|
346
|
-
version: "1.0.5",
|
|
347
|
-
configFile: "AGENTS.md",
|
|
348
|
-
configRootConfigLink: true,
|
|
349
|
-
installSkills: [
|
|
350
|
-
{
|
|
351
|
-
dir: "model",
|
|
352
|
-
skills: [
|
|
353
|
-
"model-infer-migrator",
|
|
354
|
-
"model-infer-parallel-analysis",
|
|
355
|
-
"model-infer-parallel-impl",
|
|
356
|
-
"model-infer-kvcache",
|
|
357
|
-
"model-infer-fusion",
|
|
358
|
-
"model-infer-quantization",
|
|
359
|
-
"model-infer-graph-mode",
|
|
360
|
-
"model-infer-precision-debug",
|
|
361
|
-
"model-infer-runtime-debug",
|
|
362
|
-
"model-infer-multi-stream",
|
|
363
|
-
"model-infer-prefetch",
|
|
364
|
-
"model-infer-superkernel",
|
|
365
|
-
"model-infer-profiling",
|
|
366
|
-
"model-infer-perf-breakdown"
|
|
367
|
-
]
|
|
368
|
-
}
|
|
369
|
-
],
|
|
370
|
-
installAgents: [
|
|
371
|
-
"model-infer-analyzer",
|
|
372
|
-
"model-infer-implementer",
|
|
373
|
-
"model-infer-reviewer"
|
|
374
|
-
],
|
|
375
|
-
externalRepos: [
|
|
376
|
-
{
|
|
377
|
-
url: "https://gitcode.com/cann/cann-recipes-infer.git",
|
|
378
|
-
dir: "plugins-official/model-infer-optimize/cann-recipes-infer",
|
|
379
|
-
depth: 1,
|
|
380
|
-
configRootLink: true
|
|
381
|
-
}
|
|
382
|
-
]
|
|
383
|
-
},
|
|
384
|
-
{
|
|
385
|
-
id: "pypto-op-orchestrator",
|
|
386
|
-
dir: "plugins-official/pypto-op-orchestrator",
|
|
387
|
-
displayName: "PyPTO \u7B97\u5B50\u5F00\u53D1",
|
|
388
|
-
script: "init.sh",
|
|
389
|
-
aliases: [
|
|
390
|
-
"pypto",
|
|
391
|
-
"pytorch"
|
|
392
|
-
],
|
|
393
|
-
skills: 8,
|
|
394
|
-
agents: 3,
|
|
395
|
-
description: "PyPTO Python API \u7B97\u5B50\u5168\u6D41\u7A0B\u5F00\u53D1\uFF0C\u8986\u76D6\u9700\u6C42\u7406\u89E3\u3001API \u63A2\u7D22\u3001\u5B9E\u73B0\u4E0E\u8C03\u4F18",
|
|
396
|
-
version: "1.1.9",
|
|
397
|
-
configFile: "AGENTS.md",
|
|
398
|
-
configRootConfigLink: false,
|
|
399
|
-
installSkills: [
|
|
385
|
+
},
|
|
400
386
|
{
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
"pypto
|
|
407
|
-
"
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
387
|
+
id: "pypto-op-orchestrator",
|
|
388
|
+
dir: "plugins-official/pypto-op-orchestrator",
|
|
389
|
+
displayName: "PyPTO \u7B97\u5B50\u5F00\u53D1",
|
|
390
|
+
script: "init.sh",
|
|
391
|
+
aliases: [
|
|
392
|
+
"pypto",
|
|
393
|
+
"pytorch"
|
|
394
|
+
],
|
|
395
|
+
skills: 8,
|
|
396
|
+
agents: 3,
|
|
397
|
+
description: "PyPTO Python API \u7B97\u5B50\u5168\u6D41\u7A0B\u5F00\u53D1\uFF0C\u8986\u76D6\u9700\u6C42\u7406\u89E3\u3001API \u63A2\u7D22\u3001\u5B9E\u73B0\u4E0E\u8C03\u4F18",
|
|
398
|
+
version: "1.1.9",
|
|
399
|
+
configFile: "AGENTS.md",
|
|
400
|
+
configRootConfigLink: false,
|
|
401
|
+
installSkills: [
|
|
402
|
+
{
|
|
403
|
+
dir: "ops",
|
|
404
|
+
skills: [
|
|
405
|
+
"pypto-intent-understand",
|
|
406
|
+
"pypto-api-explore",
|
|
407
|
+
"pypto-op-design",
|
|
408
|
+
"pypto-op-develop",
|
|
409
|
+
"pypto-precision-debug",
|
|
410
|
+
"pypto-precision-compare",
|
|
411
|
+
"pypto-op-perf-tune",
|
|
412
|
+
"pypto-golden-generate"
|
|
413
|
+
]
|
|
414
|
+
}
|
|
415
|
+
],
|
|
416
|
+
installAgents: [
|
|
417
|
+
"pypto-op-analyst",
|
|
418
|
+
"pypto-op-developer",
|
|
419
|
+
"pypto-op-perf-tuner"
|
|
420
|
+
],
|
|
421
|
+
externalRepos: [
|
|
422
|
+
{
|
|
423
|
+
url: "https://gitcode.com/cann/pypto.git",
|
|
424
|
+
dir: "plugins-official/pypto-op-orchestrator/pypto",
|
|
425
|
+
configRootLink: false
|
|
426
|
+
}
|
|
411
427
|
]
|
|
412
|
-
}
|
|
413
|
-
],
|
|
414
|
-
installAgents: [
|
|
415
|
-
"pypto-op-analyst",
|
|
416
|
-
"pypto-op-developer",
|
|
417
|
-
"pypto-op-perf-tuner"
|
|
418
|
-
],
|
|
419
|
-
externalRepos: [
|
|
420
|
-
{
|
|
421
|
-
url: "https://gitcode.com/cann/pypto.git",
|
|
422
|
-
dir: "plugins-official/pypto-op-orchestrator/pypto",
|
|
423
|
-
configRootLink: false
|
|
424
|
-
}
|
|
425
|
-
]
|
|
426
|
-
},
|
|
427
|
-
{
|
|
428
|
-
id: "tilelang-op-orchestrator",
|
|
429
|
-
dir: "plugins-official/tilelang-op-orchestrator",
|
|
430
|
-
displayName: "TileLang \u7B97\u5B50\u5F00\u53D1",
|
|
431
|
-
script: "init.sh",
|
|
432
|
-
aliases: [
|
|
433
|
-
"tilelang"
|
|
434
|
-
],
|
|
435
|
-
skills: 9,
|
|
436
|
-
agents: 3,
|
|
437
|
-
description: "TileLang Python DSL + @tilelang.jit \u7B97\u5B50\u5F00\u53D1\uFF08\u652F\u6301 Developer/Expert \u53CC\u6A21\u5F0F\uFF09",
|
|
438
|
-
version: "1.1.0",
|
|
439
|
-
configFile: "AGENTS.md",
|
|
440
|
-
configRootConfigLink: false,
|
|
441
|
-
installSkills: [
|
|
428
|
+
},
|
|
442
429
|
{
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
"tilelang
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
430
|
+
id: "tilelang-op-orchestrator",
|
|
431
|
+
dir: "plugins-official/tilelang-op-orchestrator",
|
|
432
|
+
displayName: "TileLang \u7B97\u5B50\u5F00\u53D1",
|
|
433
|
+
script: "init.sh",
|
|
434
|
+
aliases: [
|
|
435
|
+
"tilelang"
|
|
436
|
+
],
|
|
437
|
+
skills: 9,
|
|
438
|
+
agents: 3,
|
|
439
|
+
description: "TileLang Python DSL + @tilelang.jit \u7B97\u5B50\u5F00\u53D1\uFF08\u652F\u6301 Developer/Expert \u53CC\u6A21\u5F0F\uFF09",
|
|
440
|
+
version: "1.1.0",
|
|
441
|
+
configFile: "AGENTS.md",
|
|
442
|
+
configRootConfigLink: false,
|
|
443
|
+
installSkills: [
|
|
444
|
+
{
|
|
445
|
+
dir: "ops",
|
|
446
|
+
skills: [
|
|
447
|
+
"tilelang-api-best-practices",
|
|
448
|
+
"tilelang-env-check",
|
|
449
|
+
"tilelang-op-design",
|
|
450
|
+
"tilelang-op-develop",
|
|
451
|
+
"tilelang-op-test-design",
|
|
452
|
+
"tilelang-perf-optimization",
|
|
453
|
+
"tilelang-programming-model-guide",
|
|
454
|
+
"tilelang-review",
|
|
455
|
+
"tilelang-submodule-pull"
|
|
456
|
+
]
|
|
457
|
+
}
|
|
458
|
+
],
|
|
459
|
+
installAgents: [
|
|
460
|
+
"tilelang-op-analyst",
|
|
461
|
+
"tilelang-op-developer",
|
|
462
|
+
"tilelang-op-perf-tuner"
|
|
463
|
+
],
|
|
464
|
+
externalRepos: [
|
|
465
|
+
{
|
|
466
|
+
url: "https://github.com/tile-ai/tilelang-ascend.git",
|
|
467
|
+
dir: "plugins-official/tilelang-op-orchestrator/tilelang-ascend",
|
|
468
|
+
depth: 1,
|
|
469
|
+
recursive: true,
|
|
470
|
+
configRootLink: false
|
|
471
|
+
}
|
|
454
472
|
]
|
|
455
|
-
}
|
|
456
|
-
],
|
|
457
|
-
installAgents: [
|
|
458
|
-
"tilelang-op-analyst",
|
|
459
|
-
"tilelang-op-developer",
|
|
460
|
-
"tilelang-op-perf-tuner"
|
|
461
|
-
],
|
|
462
|
-
externalRepos: [
|
|
463
|
-
{
|
|
464
|
-
url: "https://github.com/tile-ai/tilelang-ascend.git",
|
|
465
|
-
dir: "plugins-official/tilelang-op-orchestrator/tilelang-ascend",
|
|
466
|
-
depth: 1,
|
|
467
|
-
recursive: true,
|
|
468
|
-
configRootLink: false
|
|
469
|
-
}
|
|
470
|
-
]
|
|
471
|
-
},
|
|
472
|
-
{
|
|
473
|
-
id: "triton-op-generator",
|
|
474
|
-
dir: "plugins-official/triton-op-generator",
|
|
475
|
-
displayName: "Triton \u7B97\u5B50\u5F00\u53D1",
|
|
476
|
-
script: "init.sh",
|
|
477
|
-
aliases: [
|
|
478
|
-
"triton"
|
|
479
|
-
],
|
|
480
|
-
skills: 7,
|
|
481
|
-
agents: 0,
|
|
482
|
-
description: "Triton-Ascend \u7B97\u5B50 6 \u9636\u6BB5\u81EA\u52A8\u751F\u6210\u4E0E\u4F18\u5316\uFF08\u63CF\u8FF0\u2192\u4EE3\u7801\u2192\u9A8C\u8BC1\u2192\u4F18\u5316\uFF09",
|
|
483
|
-
version: "1.0.2",
|
|
484
|
-
configFile: "AGENTS.md",
|
|
485
|
-
configRootConfigLink: false,
|
|
486
|
-
installSkills: [
|
|
473
|
+
},
|
|
487
474
|
{
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
"triton
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
configRootConfigLink: true,
|
|
518
|
-
installSkills: [
|
|
475
|
+
id: "triton-op-generator",
|
|
476
|
+
dir: "plugins-official/triton-op-generator",
|
|
477
|
+
displayName: "Triton \u7B97\u5B50\u5F00\u53D1",
|
|
478
|
+
script: "init.sh",
|
|
479
|
+
aliases: [
|
|
480
|
+
"triton"
|
|
481
|
+
],
|
|
482
|
+
skills: 7,
|
|
483
|
+
agents: 0,
|
|
484
|
+
description: "Triton-Ascend \u7B97\u5B50 6 \u9636\u6BB5\u81EA\u52A8\u751F\u6210\u4E0E\u4F18\u5316\uFF08\u63CF\u8FF0\u2192\u4EE3\u7801\u2192\u9A8C\u8BC1\u2192\u4F18\u5316\uFF09",
|
|
485
|
+
version: "1.0.2",
|
|
486
|
+
configFile: "AGENTS.md",
|
|
487
|
+
configRootConfigLink: false,
|
|
488
|
+
installSkills: [
|
|
489
|
+
{
|
|
490
|
+
dir: "ops",
|
|
491
|
+
skills: [
|
|
492
|
+
"triton-task-extractor",
|
|
493
|
+
"triton-op-designer",
|
|
494
|
+
"triton-op-coding",
|
|
495
|
+
"triton-op-verifier",
|
|
496
|
+
"triton-latency-optimizer",
|
|
497
|
+
"npu-arch",
|
|
498
|
+
"triton-precision-debug"
|
|
499
|
+
]
|
|
500
|
+
}
|
|
501
|
+
],
|
|
502
|
+
installAgents: []
|
|
503
|
+
},
|
|
519
504
|
{
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
"torch
|
|
526
|
-
"
|
|
527
|
-
"
|
|
505
|
+
id: "torch-compile",
|
|
506
|
+
dir: "plugins-official/torch-compile",
|
|
507
|
+
displayName: "torch.compile \u56FE\u6A21\u5F0F",
|
|
508
|
+
script: "init.sh",
|
|
509
|
+
aliases: [
|
|
510
|
+
"torch",
|
|
511
|
+
"compile",
|
|
512
|
+
"graph"
|
|
513
|
+
],
|
|
514
|
+
skills: 6,
|
|
515
|
+
agents: 1,
|
|
516
|
+
description: "NPU \u56FE\u6A21\u5F0F npugraph_ex \u914D\u7F6E\u3001\u811A\u672C\u8FC1\u79FB\u3001\u7F16\u8BD1\u8BCA\u65AD\u4E0E\u81EA\u5B9A\u4E49\u7B97\u5B50\u5165\u56FE",
|
|
517
|
+
version: "1.0.4",
|
|
518
|
+
configFile: "AGENTS.md",
|
|
519
|
+
configRootConfigLink: true,
|
|
520
|
+
installSkills: [
|
|
521
|
+
{
|
|
522
|
+
dir: "graph",
|
|
523
|
+
skills: [
|
|
524
|
+
"torch-npugraph-ex-knowledge",
|
|
525
|
+
"torch-npugraph-ex-template",
|
|
526
|
+
"torch-npugraph-ex-dfx-triage",
|
|
527
|
+
"torch-npugraph-ex-compile-error-diagnosis",
|
|
528
|
+
"torch-npugraph-ex-runtime-error-diagnosis",
|
|
529
|
+
"torch-custom-ops-guide"
|
|
530
|
+
]
|
|
531
|
+
}
|
|
532
|
+
],
|
|
533
|
+
installAgents: [
|
|
534
|
+
"torch-npugraph-ex"
|
|
528
535
|
]
|
|
529
|
-
}
|
|
530
|
-
],
|
|
531
|
-
installAgents: [
|
|
532
|
-
"torch-npugraph-ex"
|
|
533
|
-
]
|
|
534
|
-
},
|
|
535
|
-
{
|
|
536
|
-
id: "ops-code-reviewer",
|
|
537
|
-
dir: "plugins-official/ops-code-reviewer",
|
|
538
|
-
displayName: "\u4EE3\u7801\u68C0\u89C6",
|
|
539
|
-
script: "init.sh",
|
|
540
|
-
aliases: [
|
|
541
|
-
"code-review",
|
|
542
|
-
"reviewer",
|
|
543
|
-
"review"
|
|
544
|
-
],
|
|
545
|
-
skills: 5,
|
|
546
|
-
agents: 2,
|
|
547
|
-
description: "Ascend C \u7B97\u5B50\u4EE3\u7801 4 \u9636\u6BB5\u5168\u91CF\u68C0\u89C6\uFF08\u4E3B Agent \u7F16\u6392 + \u5B50 Agent \u5E76\u884C\u68C0\u89C6\uFF09",
|
|
548
|
-
version: "1.1.0",
|
|
549
|
-
configFile: "AGENTS.md",
|
|
550
|
-
configRootConfigLink: false,
|
|
551
|
-
installSkills: [
|
|
536
|
+
},
|
|
552
537
|
{
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
"
|
|
559
|
-
"
|
|
538
|
+
id: "ops-code-reviewer",
|
|
539
|
+
dir: "plugins-official/ops-code-reviewer",
|
|
540
|
+
displayName: "\u4EE3\u7801\u68C0\u89C6",
|
|
541
|
+
script: "init.sh",
|
|
542
|
+
aliases: [
|
|
543
|
+
"code-review",
|
|
544
|
+
"reviewer",
|
|
545
|
+
"review"
|
|
546
|
+
],
|
|
547
|
+
skills: 5,
|
|
548
|
+
agents: 2,
|
|
549
|
+
description: "Ascend C \u7B97\u5B50\u4EE3\u7801 4 \u9636\u6BB5\u5168\u91CF\u68C0\u89C6\uFF08\u4E3B Agent \u7F16\u6392 + \u5B50 Agent \u5E76\u884C\u68C0\u89C6\uFF09",
|
|
550
|
+
version: "1.1.0",
|
|
551
|
+
configFile: "AGENTS.md",
|
|
552
|
+
configRootConfigLink: false,
|
|
553
|
+
installSkills: [
|
|
554
|
+
{
|
|
555
|
+
dir: "ops",
|
|
556
|
+
skills: [
|
|
557
|
+
"ascendc-code-review",
|
|
558
|
+
"ascendc-docs-search",
|
|
559
|
+
"ascendc-task-focus",
|
|
560
|
+
"ascendc-api-best-practices",
|
|
561
|
+
"npu-arch"
|
|
562
|
+
]
|
|
563
|
+
}
|
|
564
|
+
],
|
|
565
|
+
installAgents: [
|
|
566
|
+
"ascendc-code-summarizer",
|
|
567
|
+
"ascendc-ops-reviewer"
|
|
560
568
|
]
|
|
561
569
|
}
|
|
562
|
-
]
|
|
563
|
-
installAgents: [
|
|
564
|
-
"ascendc-code-summarizer",
|
|
565
|
-
"ascendc-ops-reviewer"
|
|
566
|
-
]
|
|
570
|
+
];
|
|
567
571
|
}
|
|
568
|
-
|
|
572
|
+
});
|
|
569
573
|
|
|
570
574
|
// src/core/registry.ts
|
|
575
|
+
import { readdirSync, existsSync } from "fs";
|
|
576
|
+
import { join } from "path";
|
|
571
577
|
function loadPlugins() {
|
|
572
578
|
const plugins = [...embedded_plugins_default];
|
|
573
579
|
plugins.sort(
|
|
@@ -575,8 +581,6 @@ function loadPlugins() {
|
|
|
575
581
|
);
|
|
576
582
|
return plugins;
|
|
577
583
|
}
|
|
578
|
-
var PLUGIN_REGISTRY = loadPlugins();
|
|
579
|
-
var PLUGIN_DIRS = ["plugins-official", "plugins-community"];
|
|
580
584
|
function mergeDynamicPlugins(repoPath) {
|
|
581
585
|
if (!existsSync(repoPath)) return;
|
|
582
586
|
const existingIds = new Set(PLUGIN_REGISTRY.map((p) => p.id));
|
|
@@ -637,412 +641,465 @@ function getAllPlugins() {
|
|
|
637
641
|
function getPluginById(id) {
|
|
638
642
|
return PLUGIN_REGISTRY.find((p) => p.id === id);
|
|
639
643
|
}
|
|
644
|
+
var PLUGIN_REGISTRY, PLUGIN_DIRS;
|
|
645
|
+
var init_registry = __esm({
|
|
646
|
+
"src/core/registry.ts"() {
|
|
647
|
+
"use strict";
|
|
648
|
+
init_fs_helpers();
|
|
649
|
+
init_embedded_plugins();
|
|
650
|
+
PLUGIN_REGISTRY = loadPlugins();
|
|
651
|
+
PLUGIN_DIRS = ["plugins-official", "plugins-community"];
|
|
652
|
+
}
|
|
653
|
+
});
|
|
640
654
|
|
|
641
|
-
// src/
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
655
|
+
// src/locales/zh_CN.json
|
|
656
|
+
var zh_CN_default;
|
|
657
|
+
var init_zh_CN = __esm({
|
|
658
|
+
"src/locales/zh_CN.json"() {
|
|
659
|
+
zh_CN_default = {
|
|
660
|
+
wizard_title: "CANNBot Install Helper",
|
|
661
|
+
wizard_detect: "\u6B63\u5728\u68C0\u6D4B\u5DF2\u5B89\u88C5\u7684 AI \u7F16\u7A0B\u5DE5\u5177...",
|
|
662
|
+
wizard_select_tool: "\u9009\u62E9 AI \u7F16\u7A0B\u5DE5\u5177",
|
|
663
|
+
wizard_select_level: "\u9009\u62E9\u5B89\u88C5\u4F4D\u7F6E",
|
|
664
|
+
wizard_select_plugin: "\u9009\u62E9\u8981\u5B89\u88C5\u7684\u63D2\u4EF6",
|
|
665
|
+
wizard_confirm: "\u786E\u8BA4\u5B89\u88C5",
|
|
666
|
+
wizard_detected_tool: "\u68C0\u6D4B\u5230",
|
|
667
|
+
wizard_confirm_tool: "\u4F7F\u7528",
|
|
668
|
+
wizard_last_used: "\u4E0A\u6B21\u4F7F\u7528",
|
|
669
|
+
wizard_already_installed: "\u5DF2\u5B89\u88C5",
|
|
670
|
+
install_repo_ready: "\u4ED3\u5E93\u5C31\u7EEA",
|
|
671
|
+
install_progress: "\u6B63\u5728\u5B89\u88C5",
|
|
672
|
+
install_done: "\u5B89\u88C5\u5B8C\u6210",
|
|
673
|
+
install_success: "\u6210\u529F",
|
|
674
|
+
install_already_installed: "\u5DF2\u5B89\u88C5",
|
|
675
|
+
install_reinstall_confirm: "\u662F\u5426\u91CD\u65B0\u5B89\u88C5\uFF08\u8986\u76D6\uFF09",
|
|
676
|
+
install_skip: "\u8DF3\u8FC7",
|
|
677
|
+
install_enhanced_next_steps: "\u4E0B\u4E00\u6B65",
|
|
678
|
+
install_enhanced_launch: "\u542F\u52A8",
|
|
679
|
+
install_enhanced_try: "\u8BD5\u8BD5",
|
|
680
|
+
install_enhanced_more: "\u66F4\u591A",
|
|
681
|
+
install_enhanced_check: "\u68C0\u67E5",
|
|
682
|
+
install_enhanced_docs: "\u6587\u6863",
|
|
683
|
+
update_updating: "\u6B63\u5728\u66F4\u65B0",
|
|
684
|
+
update_done: "\u66F4\u65B0\u5B8C\u6210",
|
|
685
|
+
update_no_plugins: "\u6682\u65E0\u5DF2\u5B89\u88C5\u7684\u63D2\u4EF6",
|
|
686
|
+
update_skipped: "\u5DF2\u8DF3\u8FC7",
|
|
687
|
+
doctor_title: "CANNBot Doctor",
|
|
688
|
+
doctor_tools: "AI \u5DE5\u5177",
|
|
689
|
+
doctor_plugins: "\u5DF2\u5B89\u88C5\u63D2\u4EF6",
|
|
690
|
+
doctor_links: "\u94FE\u63A5\u5B8C\u6574\u6027",
|
|
691
|
+
doctor_config: "\u914D\u7F6E\u6587\u4EF6",
|
|
692
|
+
doctor_result: "\u7ED3\u679C",
|
|
693
|
+
doctor_fix_cleaning: "\u6E05\u7406\u5931\u6548\u94FE\u63A5",
|
|
694
|
+
doctor_fix_rebuilding: "\u91CD\u5EFA\u76EE\u5F55",
|
|
695
|
+
info_description: "\u63CF\u8FF0",
|
|
696
|
+
info_skills: "Skills",
|
|
697
|
+
info_agents: "Agents",
|
|
698
|
+
info_status: "\u72B6\u6001",
|
|
699
|
+
info_quickstart: "\u5FEB\u901F\u5F00\u59CB",
|
|
700
|
+
info_not_found: "\u672A\u627E\u5230\u63D2\u4EF6",
|
|
701
|
+
lang_title: "\u8BED\u8A00\u8BBE\u7F6E",
|
|
702
|
+
lang_current: "\u5F53\u524D\u8BED\u8A00",
|
|
703
|
+
lang_set: "\u8BED\u8A00\u5DF2\u8BBE\u7F6E\u4E3A",
|
|
704
|
+
lang_invalid: "\u65E0\u6548\u7684\u8BED\u8A00\uFF0C\u652F\u6301: zh_CN, en_US",
|
|
705
|
+
list_title: "\u53EF\u7528\u573A\u666F",
|
|
706
|
+
list_id: "\u5E8F\u53F7",
|
|
707
|
+
list_name: "\u573A\u666F\u540D",
|
|
708
|
+
list_status: "\u72B6\u6001",
|
|
709
|
+
list_description: "\u63CF\u8FF0",
|
|
710
|
+
status_installed: "\u5DF2\u88C5",
|
|
711
|
+
status_not_installed: "\u672A\u88C5",
|
|
712
|
+
error_tool_not_found: "\u672A\u68C0\u6D4B\u5230\u4EFB\u4F55 AI \u7F16\u7A0B\u5DE5\u5177",
|
|
713
|
+
error_plugin_not_found: "\u672A\u627E\u5230\u63D2\u4EF6",
|
|
714
|
+
error_invalid_tool: "\u6682\u4E0D\u652F\u6301\u7684 AI \u5DE5\u5177: {tool}\n\u652F\u6301\u7684\u5DE5\u5177: {tools}",
|
|
715
|
+
error_invalid_level: "\u6682\u4E0D\u652F\u6301\u7684\u5B89\u88C5\u7EA7\u522B: {level}\n\u652F\u6301\u7684\u7EA7\u522B: {levels}",
|
|
716
|
+
error_skill_not_found: "\u672A\u5728\u6CE8\u518C\u8868\u4E2D\u627E\u5230 Skill",
|
|
717
|
+
error_source_not_found: "\u672A\u627E\u5230\u6E90\u6587\u4EF6: {path}",
|
|
718
|
+
error_script_not_found: "\u672A\u627E\u5230\u5B89\u88C5\u811A\u672C: {path}",
|
|
719
|
+
error_unknown: "\u672A\u77E5\u9519\u8BEF",
|
|
720
|
+
error_not_installed: "\u672A\u5B89\u88C5",
|
|
721
|
+
error_no_shell: "\u672A\u627E\u5230 bash \u6216 sh\uFF0C\u65E0\u6CD5\u6267\u884C\u5B89\u88C5\u811A\u672C\u3002\u8BF7\u5B89\u88C5 Git Bash \u6216 WSL",
|
|
722
|
+
error_symlink_windows: "\u521B\u5EFA\u7B26\u53F7\u94FE\u63A5\u5931\u8D25\uFF0C\u8BF7\u4EE5\u7BA1\u7406\u5458\u8EAB\u4EFD\u8FD0\u884C\u6216\u5F00\u542F Windows \u5F00\u53D1\u8005\u6A21\u5F0F",
|
|
723
|
+
skill_select_category: "\u9009\u62E9 Skill \u7C7B\u522B",
|
|
724
|
+
skill_select_items: "\u9009\u62E9\u8981\u5B89\u88C5\u7684 Skills",
|
|
725
|
+
skill_already_installed: "\u5DF2\u5B89\u88C5",
|
|
726
|
+
skill_select_all: "\u5168\u9009\u6240\u6709 Skills\uFF08\u5171 {count} \u4E2A\uFF09",
|
|
727
|
+
skill_select_all_category: "\u5168\u9009\u5F53\u524D\u7C7B\u522B",
|
|
728
|
+
skill_continue_or_install: "\u5DF2\u9009 {count} \u4E2A Skills\uFF0C\u8BF7\u9009\u62E9\u64CD\u4F5C",
|
|
729
|
+
skill_continue_select: "\u7EE7\u7EED\u9009\u62E9\u5176\u4ED6\u7C7B\u522B",
|
|
730
|
+
skill_confirm_install_count: "\u786E\u8BA4\u5B89\u88C5\uFF08\u5DF2\u9009 {count} \u4E2A Skills\uFF09",
|
|
731
|
+
skill_all_install_progress: "\u6B63\u5728\u5B89\u88C5\u5168\u90E8 {count} \u4E2A Skills...",
|
|
732
|
+
skill_install_progress: "\u6B63\u5728\u5B89\u88C5",
|
|
733
|
+
skill_install_done: "Skill \u5B89\u88C5\u5B8C\u6210",
|
|
734
|
+
skill_uninstall_done: "Skill \u5378\u8F7D\u5B8C\u6210",
|
|
735
|
+
skill_list_title: "\u53EF\u7528 Skills",
|
|
736
|
+
wizard_select_mode: "\u9009\u62E9\u5B89\u88C5\u7C7B\u578B",
|
|
737
|
+
wizard_mode_plugin: "\u5B89\u88C5 Plugin",
|
|
738
|
+
wizard_mode_plugin_desc: "\u5B8C\u6574\u5F00\u53D1\u5DE5\u4F5C\u6D41\uFF08Skills + Agents + \u914D\u7F6E\u6587\u4EF6\uFF09",
|
|
739
|
+
wizard_mode_skill: "\u5B89\u88C5 Skill",
|
|
740
|
+
wizard_mode_skill_desc: "\u4EC5\u5B89\u88C5\u9886\u57DF\u77E5\u8BC6\u6280\u80FD\uFF0C\u8BA9 AI \u638C\u63E1\u7279\u5B9A\u80FD\u529B",
|
|
741
|
+
wizard_back: "\u8FD4\u56DE",
|
|
742
|
+
wizard_cancel: "\u9000\u51FA",
|
|
743
|
+
wizard_no_selection: "\u672A\u9009\u62E9\u4EFB\u4F55\u9879\uFF0C\u8BF7\u9009\u62E9\u64CD\u4F5C",
|
|
744
|
+
wizard_back_to_reselect: "\u8FD4\u56DE",
|
|
745
|
+
status_title: "\u5DF2\u5B89\u88C5\u63D2\u4EF6",
|
|
746
|
+
status_none: "\u6682\u65E0\u5DF2\u5B89\u88C5\u7684\u63D2\u4EF6",
|
|
747
|
+
status_hint: "\u8FD0\u884C install-helper init \u5F00\u59CB\u5B89\u88C5",
|
|
748
|
+
status_install_time: "\u5B89\u88C5\u65F6\u95F4",
|
|
749
|
+
install_installed_to: "\u5B89\u88C5\u5230",
|
|
750
|
+
install_skills_count: "Skills",
|
|
751
|
+
install_agents_count: "Agents",
|
|
752
|
+
lang_supported: "\u652F\u6301\u7684\u8BED\u8A00: zh_CN, en_US",
|
|
753
|
+
lang_usage: "\u7528\u6CD5: install-helper lang set <language>",
|
|
754
|
+
lang_specify: "\u8BF7\u6307\u5B9A\u8BED\u8A00: install-helper lang set zh_CN",
|
|
755
|
+
lang_unknown_action: "\u672A\u77E5\u64CD\u4F5C",
|
|
756
|
+
lang_supported_actions: "\u652F\u6301\u7684\u64CD\u4F5C: show, set",
|
|
757
|
+
info_aliases: "\u522B\u540D",
|
|
758
|
+
uninstall_not_found: "\u672A\u627E\u5230",
|
|
759
|
+
uninstall_no_record: "\u672A\u627E\u5230\u5B89\u88C5\u8BB0\u5F55\uFF0C\u53EF\u80FD\u672A\u5B89\u88C5\u6216\u5B89\u88C5\u8BB0\u5F55\u5DF2\u635F\u574F",
|
|
760
|
+
uninstall_no_record_hint: "\u5982\u9700\u5F3A\u5236\u6E05\u7406\uFF0C\u8BF7\u624B\u52A8\u5220\u9664 .opencode/ \u6216 .claude/ \u76EE\u5F55\u4E2D\u7684\u76F8\u5173\u6587\u4EF6",
|
|
761
|
+
uninstall_in_progress: "\u6B63\u5728\u5378\u8F7D",
|
|
762
|
+
uninstall_summary_format: "{name}\uFF08\u79FB\u9664 {files} \u4E2A\u6587\u4EF6\uFF0C{dirs} \u4E2A\u76EE\u5F55\uFF09",
|
|
763
|
+
uninstall_files_gone: "\u7684\u6587\u4EF6\u5DF2\u4E0D\u5B58\u5728\uFF0C\u5DF2\u6E05\u7406\u5B89\u88C5\u8BB0\u5F55",
|
|
764
|
+
uninstall_skills_in_progress: "\u6B63\u5728\u5378\u8F7D",
|
|
765
|
+
init_pkg_dir_warn: "\u5F53\u524D\u76EE\u5F55\u770B\u8D77\u6765\u662F install-helper \u5305\u76EE\u5F55",
|
|
766
|
+
init_pkg_dir_hint: "\u8BF7\u5728\u4F60\u7684\u9879\u76EE\u76EE\u5F55\u4E2D\u8FD0\u884C\u6B64\u547D\u4EE4\uFF0C\u800C\u4E0D\u662F\u5728 install-helper \u5B89\u88C5\u76EE\u5F55\u4E2D",
|
|
767
|
+
init_pkg_dir_example: "\u793A\u4F8B\uFF1Acd ~/my-project && install-helper",
|
|
768
|
+
init_cancelled: "\u5DF2\u53D6\u6D88\u5B89\u88C5",
|
|
769
|
+
backup_detected: "\u68C0\u6D4B\u5230\u5F53\u524D\u76EE\u5F55\u5DF2\u5B89\u88C5\u63D2\u4EF6",
|
|
770
|
+
backup_current: "\u5F53\u524D\u5B89\u88C5",
|
|
771
|
+
backup_installing: "\u5373\u5C06\u5B89\u88C5",
|
|
772
|
+
backup_overwrite_warning: "\u7EE7\u7EED\u5B89\u88C5\u5C06\u8986\u76D6\u73B0\u6709\u7684 AGENTS.md \u914D\u7F6E\u6587\u4EF6\u3002",
|
|
773
|
+
backup_auto_create: "\u7CFB\u7EDF\u4F1A\u81EA\u52A8\u521B\u5EFA\u5907\u4EFD\uFF0C\u4EE5\u4FBF\u540E\u7EED\u6062\u590D\u3002",
|
|
774
|
+
backup_overwrite: "\u8986\u76D6\u5B89\u88C5\uFF08\u81EA\u52A8\u5907\u4EFD\uFF09",
|
|
775
|
+
backup_cancel: "\u53D6\u6D88\u5B89\u88C5",
|
|
776
|
+
backup_restore_prompt: "\u68C0\u6D4B\u5230\u5907\u4EFD\u914D\u7F6E\uFF0C\u662F\u5426\u6062\u590D\uFF1F",
|
|
777
|
+
backup_restore: "\u6062\u590D",
|
|
778
|
+
backup_only_uninstall: "\u4EC5\u5378\u8F7D\uFF08\u4E0D\u6062\u590D\uFF09",
|
|
779
|
+
backup_select_action: "\u8BF7\u9009\u62E9\u64CD\u4F5C",
|
|
780
|
+
backup_restore_success: "\u5DF2\u6062\u590D\u914D\u7F6E",
|
|
781
|
+
backup_created: "\u5DF2\u521B\u5EFA\u5907\u4EFD",
|
|
782
|
+
backup_failed: "\u5907\u4EFD\u521B\u5EFA\u5931\u8D25\uFF0C\u5B89\u88C5\u5DF2\u4E2D\u6B62\u4EE5\u4FDD\u62A4\u73B0\u6709\u914D\u7F6E",
|
|
783
|
+
loading_skills_list: "\u6B63\u5728\u52A0\u8F7D Skills \u5217\u8868...",
|
|
784
|
+
loading_skills_list_complete: "Skills \u5217\u8868\u52A0\u8F7D\u5B8C\u6210",
|
|
785
|
+
loading_plugin_data: "\u6B63\u5728\u52A0\u8F7D\u63D2\u4EF6\u6570\u636E...",
|
|
786
|
+
loading_plugin_data_complete: "\u63D2\u4EF6\u6570\u636E\u52A0\u8F7D\u5B8C\u6210",
|
|
787
|
+
loading_skills_list_failed: "Skills \u5217\u8868\u52A0\u8F7D\u5931\u8D25\uFF0C\u5C06\u4F7F\u7528\u5185\u7F6E\u6570\u636E",
|
|
788
|
+
repo_pull_failed: "\u65E0\u6CD5\u62C9\u53D6\u6700\u65B0\u5185\u5BB9\uFF0C\u4F7F\u7528\u7F13\u5B58\u6570\u636E",
|
|
789
|
+
repo_cloning: "\u9996\u6B21\u4F7F\u7528\uFF0C\u6B63\u5728\u514B\u9686 cannbot-skills \u4ED3\u5E93...",
|
|
790
|
+
repo_clone_failed: "\u514B\u9686\u4ED3\u5E93\u5931\u8D25: {error}\n\u8BF7\u624B\u52A8\u514B\u9686: git clone {url} {dir}",
|
|
791
|
+
external_repo_update_failed: "\u5916\u90E8\u4ED3\u5E93\u66F4\u65B0\u5931\u8D25\uFF0C\u4F7F\u7528\u73B0\u6709\u7248\u672C: {dir}",
|
|
792
|
+
config_corrupted: "\u914D\u7F6E\u6587\u4EF6\u5DF2\u635F\u574F\uFF0C\u4F7F\u7528\u9ED8\u8BA4\u914D\u7F6E",
|
|
793
|
+
record_corrupted: "\u5B89\u88C5\u8BB0\u5F55\u5DF2\u635F\u574F\uFF1A{file}",
|
|
794
|
+
skill_record_corrupted: "Skill \u5B89\u88C5\u8BB0\u5F55\u5DF2\u635F\u574F",
|
|
795
|
+
record_write_failed: "\u5B89\u88C5\u8BB0\u5F55\u5199\u5165\u5931\u8D25\uFF0C\u5378\u8F7D\u65F6\u53EF\u80FD\u65E0\u6CD5\u81EA\u52A8\u6E05\u7406",
|
|
796
|
+
install_config_failed: "\u914D\u7F6E\u6587\u4EF6\u5B89\u88C5\u5931\u8D25: {error}",
|
|
797
|
+
install_clone_failed: "git clone \u5931\u8D25: {url}\uFF0C\u8BF7\u624B\u52A8\u514B\u9686: git clone {url} {dir}",
|
|
798
|
+
install_link_config_failed: "\u94FE\u63A5 {name} \u5230\u914D\u7F6E\u76EE\u5F55\u5931\u8D25",
|
|
799
|
+
install_link_project_failed: "\u94FE\u63A5 {name} \u5230\u9879\u76EE\u76EE\u5F55\u5931\u8D25",
|
|
800
|
+
install_link_workflows_failed: "\u94FE\u63A5 workflows \u5230\u914D\u7F6E\u76EE\u5F55\u5931\u8D25",
|
|
801
|
+
install_skill_source_not_found: "Skill \u6E90\u76EE\u5F55\u672A\u627E\u5230: {dir}",
|
|
802
|
+
install_skill_not_found: "Skill \u672A\u627E\u5230: {name} (\u5728 {dir})",
|
|
803
|
+
install_skill_failed: "Skill \u5B89\u88C5\u5931\u8D25: {name}",
|
|
804
|
+
install_agent_not_found: "Agent \u672A\u627E\u5230: {name}",
|
|
805
|
+
install_agent_failed: "Agent \u5B89\u88C5\u5931\u8D25: {name}",
|
|
806
|
+
install_no_skill_selected: "\u672A\u9009\u62E9\u4EFB\u4F55 Skill",
|
|
807
|
+
install_to: "\u5B89\u88C5\u5230",
|
|
808
|
+
start_to_use: "\u542F\u52A8 {tool} \u5373\u53EF\u4F7F\u7528",
|
|
809
|
+
wizard_step_1_title: "[1/4] \u9009\u62E9 AI \u7F16\u7A0B\u5DE5\u5177",
|
|
810
|
+
wizard_step_2_title: "[2/4] \u9009\u62E9\u5B89\u88C5\u4F4D\u7F6E",
|
|
811
|
+
wizard_step_3_title: "[3/4] \u9009\u62E9\u8981\u5B89\u88C5\u7684\u63D2\u4EF6",
|
|
812
|
+
wizard_step_4_title: "[4/4] \u786E\u8BA4\u5B89\u88C5",
|
|
813
|
+
wizard_step_3_skill_title: "[3/4] \u9009\u62E9 Skill \u7C7B\u522B",
|
|
814
|
+
wizard_step_4_skill_title: "[4/4] \u9009\u62E9\u8981\u5B89\u88C5\u7684 Skills \u2014 {category}",
|
|
815
|
+
install_level_project: "\u5B89\u88C5\u5230\u5F53\u524D\u76EE\u5F55\uFF08\u63A8\u8350\uFF0C\u4EC5\u5F53\u524D\u9879\u76EE\u53EF\u7528\uFF09",
|
|
816
|
+
install_level_global: "\u5B89\u88C5\u5230\u5168\u5C40\uFF08\u6240\u6709\u9879\u76EE\u5171\u4EAB\uFF09",
|
|
817
|
+
wizard_select_mode_title: "\u9009\u62E9\u5B89\u88C5\u7C7B\u578B",
|
|
818
|
+
skill_count_format: "{count} \u4E2A Skills",
|
|
819
|
+
result_success_format: "{count} \u6210\u529F",
|
|
820
|
+
result_failed_format: "{count} \u5931\u8D25",
|
|
821
|
+
uninstall_remove_label: "\u79FB\u9664",
|
|
822
|
+
uninstall_clean_empty_dir: "\u6E05\u7406\u7A7A\u76EE\u5F55",
|
|
823
|
+
uninstall_skill_not_installed: "\u672A\u5B89\u88C5",
|
|
824
|
+
available_plugins: "\u53EF\u7528\u63D2\u4EF6",
|
|
825
|
+
available_skills: "\u53EF\u7528 Skills",
|
|
826
|
+
skill_total_count: "\u5171 {count} \u4E2A Skills",
|
|
827
|
+
wizard_confirm_install_format: "\u5373\u5C06\u5B89\u88C5 {count} \u4E2A\u63D2\u4EF6\u5230 {tool}\uFF08{level} \u7EA7\u522B\uFF09\uFF1A",
|
|
828
|
+
wizard_install_path: "\u5B89\u88C5\u8DEF\u5F84",
|
|
829
|
+
update_install_hint: "\u4F7F\u7528 {cmd} \u5B89\u88C5\u63D2\u4EF6",
|
|
830
|
+
hint_select_move: "\u79FB\u52A8",
|
|
831
|
+
hint_select_space: "\u7A7A\u683C",
|
|
832
|
+
hint_select_check: "\u52FE\u9009",
|
|
833
|
+
hint_select_confirm: "\u786E\u8BA4",
|
|
834
|
+
hint_checkbox_suffix: "\u4E0D\u9009\u6309\u56DE\u8F66\u53EF\u8FD4\u56DE",
|
|
835
|
+
doctor_not_installed: "\u672A\u5B89\u88C5",
|
|
836
|
+
doctor_links_valid: "{count} \u4E2A\u8F6F\u94FE\u63A5\u5747\u6709\u6548",
|
|
837
|
+
doctor_broken_links: "{count} \u4E2A\u5931\u6548\u94FE\u63A5",
|
|
838
|
+
doctor_fixed: "\u5DF2\u6E05\u7406 {count} \u4E2A\u5931\u6548\u94FE\u63A5",
|
|
839
|
+
doctor_not_exist: "\u4E0D\u5B58\u5728",
|
|
840
|
+
doctor_created: "\u5DF2\u521B\u5EFA {path}",
|
|
841
|
+
doctor_config_exists: "\u5B58\u5728",
|
|
842
|
+
doctor_config_not_exist: "\u4E0D\u5B58\u5728",
|
|
843
|
+
doctor_result_with_fix: "{warnings} \u4E2A\u8B66\u544A, {fixes} \u9879\u5DF2\u4FEE\u590D",
|
|
844
|
+
doctor_result_without_fix: "{warnings} \u4E2A\u8B66\u544A",
|
|
845
|
+
count_suffix: "\u4E2A",
|
|
846
|
+
try_prompt: "\u5E2E\u6211\u5F00\u53D1\u4E00\u4E2A Abs \u7B97\u5B50",
|
|
847
|
+
uninstall_interactive_title: "\u7BA1\u7406\u5DF2\u5B89\u88C5\u7684\u5185\u5BB9 \u2014 \u53D6\u6D88\u52FE\u9009\u8981\u5378\u8F7D\u7684\u9879",
|
|
848
|
+
uninstall_select_type: "\u9009\u62E9\u8981\u5378\u8F7D\u7684\u7C7B\u578B",
|
|
849
|
+
uninstall_type_skill: "\u5378\u8F7D Skills",
|
|
850
|
+
uninstall_type_plugin: "\u5378\u8F7D Plugins",
|
|
851
|
+
uninstall_checkbox_hint: "\u52FE\u9009=\u4FDD\u7559\uFF0C\u53D6\u6D88\u52FE\u9009=\u5378\u8F7D",
|
|
852
|
+
uninstall_uncheck_all: "\u5168\u4E0D\u9009\uFF08\u6807\u8BB0\u5168\u90E8\u5378\u8F7D\uFF09",
|
|
853
|
+
uninstall_confirm_count: "\u786E\u8BA4\u5378\u8F7D\uFF08{count} \u4E2A\u5C06\u5378\u8F7D\uFF09",
|
|
854
|
+
uninstall_no_installed: "\u6CA1\u6709\u5DF2\u5B89\u88C5\u7684 Skills \u6216 Plugins",
|
|
855
|
+
uninstall_no_installed_skills: "\u6CA1\u6709\u5DF2\u5B89\u88C5\u7684 Skills",
|
|
856
|
+
uninstall_no_installed_plugins: "\u6CA1\u6709\u5DF2\u5B89\u88C5\u7684 Plugins",
|
|
857
|
+
uninstall_nothing_to_uninstall: "\u6CA1\u6709\u9700\u8981\u5378\u8F7D\u7684\u9879\u76EE",
|
|
858
|
+
uninstall_all_progress: "\u6B63\u5728\u5378\u8F7D\u5168\u90E8 {count} \u4E2A Skills...",
|
|
859
|
+
uninstall_all_summary: "\u5373\u5C06\u5378\u8F7D {skills} \u4E2A Skills \u548C {plugins} \u4E2A Plugins\uFF1A",
|
|
860
|
+
uninstall_all_done: "\u6279\u91CF\u5378\u8F7D\u5B8C\u6210",
|
|
861
|
+
uninstall_recent_no_history: "\u65E0\u5B89\u88C5\u6279\u6B21\u8BB0\u5F55\uFF0C\u65E0\u6CD5\u8BC6\u522B\u6700\u8FD1\u5B89\u88C5\u7684 Skills",
|
|
862
|
+
uninstall_recent_progress: "\u5373\u5C06\u5378\u8F7D\u6700\u8FD1\u5B89\u88C5\u7684 {count} \u4E2A Skills\uFF1A",
|
|
863
|
+
uninstall_plugin_batch_progress: "\u6B63\u5728\u6279\u91CF\u5378\u8F7D {count} \u4E2A\u63D2\u4EF6...",
|
|
864
|
+
uninstall_plugin_batch_skip_restore: "\u6279\u91CF\u5378\u8F7D\u6A21\u5F0F\uFF1A\u8DF3\u8FC7\u5907\u4EFD\u6062\u590D",
|
|
865
|
+
uninstall_confirm_prompt: "\u5373\u5C06\u5378\u8F7D {count} \u9879\uFF0C\u786E\u8BA4\uFF1F",
|
|
866
|
+
uninstall_select_items: "\u7BA1\u7406\u5DF2\u5B89\u88C5\u7684 Skills\uFF08\u7A7A\u683C\u5207\u6362\uFF0C\u56DE\u8F66\u786E\u8BA4\uFF09",
|
|
867
|
+
uninstall_select_plugins: "\u7BA1\u7406\u5DF2\u5B89\u88C5\u7684 Plugins\uFF08\u7A7A\u683C\u5207\u6362\uFF0C\u56DE\u8F66\u786E\u8BA4\uFF09",
|
|
868
|
+
uninstall_select_category: "\u9009\u62E9\u8981\u7BA1\u7406\u7684 Skill \u7C7B\u522B",
|
|
869
|
+
uninstall_uncheck_all_category: "\u5168\u4E0D\u9009\u5F53\u524D\u7C7B\u522B\uFF08\u6807\u8BB0\u5168\u90E8\u5378\u8F7D\uFF09",
|
|
870
|
+
uninstall_continue_or_confirm: "\u5DF2\u6807\u8BB0 {count} \u4E2A\u5F85\u5378\u8F7D\uFF0C\u8BF7\u9009\u62E9\u64CD\u4F5C",
|
|
871
|
+
uninstall_marked_count: "\u5DF2\u6807\u8BB0 {count} \u4E2A\u5F85\u5378\u8F7D",
|
|
872
|
+
uninstall_uncategorized: "\u672A\u5206\u7C7B"
|
|
873
|
+
};
|
|
874
|
+
}
|
|
875
|
+
});
|
|
646
876
|
|
|
647
|
-
// src/
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
877
|
+
// src/locales/en_US.json
|
|
878
|
+
var en_US_default;
|
|
879
|
+
var init_en_US = __esm({
|
|
880
|
+
"src/locales/en_US.json"() {
|
|
881
|
+
en_US_default = {
|
|
882
|
+
wizard_title: "CANNBot Install Helper",
|
|
883
|
+
wizard_detect: "Detecting installed AI coding tools...",
|
|
884
|
+
wizard_select_tool: "Select AI coding tool",
|
|
885
|
+
wizard_select_level: "Select install level",
|
|
886
|
+
wizard_select_plugin: "Select a scenario to install",
|
|
887
|
+
wizard_confirm: "Confirm installation",
|
|
888
|
+
wizard_detected_tool: "Detected",
|
|
889
|
+
wizard_confirm_tool: "Confirm using",
|
|
890
|
+
wizard_last_used: "last used",
|
|
891
|
+
wizard_already_installed: "installed",
|
|
892
|
+
install_repo_ready: "Repository ready",
|
|
893
|
+
install_progress: "Installing",
|
|
894
|
+
install_done: "Installation complete",
|
|
895
|
+
install_success: "success",
|
|
896
|
+
install_already_installed: "already installed",
|
|
897
|
+
install_reinstall_confirm: "Reinstall (overwrite)",
|
|
898
|
+
install_skip: "skipped",
|
|
899
|
+
install_enhanced_next_steps: "Next steps",
|
|
900
|
+
install_enhanced_launch: "Launch",
|
|
901
|
+
install_enhanced_try: "Try",
|
|
902
|
+
install_enhanced_more: "More",
|
|
903
|
+
install_enhanced_check: "Check",
|
|
904
|
+
install_enhanced_docs: "Docs",
|
|
905
|
+
update_updating: "Updating",
|
|
906
|
+
update_done: "Update complete",
|
|
907
|
+
update_no_plugins: "No installed plugins",
|
|
908
|
+
update_skipped: "skipped",
|
|
909
|
+
doctor_title: "CANNBot Doctor",
|
|
910
|
+
doctor_tools: "AI Tools",
|
|
911
|
+
doctor_plugins: "Installed Plugins",
|
|
912
|
+
doctor_links: "Link Integrity",
|
|
913
|
+
doctor_config: "Configuration",
|
|
914
|
+
doctor_result: "Result",
|
|
915
|
+
doctor_fix_cleaning: "Cleaning broken links",
|
|
916
|
+
doctor_fix_rebuilding: "Rebuilding directories",
|
|
917
|
+
info_description: "Description",
|
|
918
|
+
info_skills: "Skills",
|
|
919
|
+
info_agents: "Agents",
|
|
920
|
+
info_status: "Status",
|
|
921
|
+
info_quickstart: "Quick Start",
|
|
922
|
+
info_not_found: "Plugin not found",
|
|
923
|
+
lang_title: "Language Settings",
|
|
924
|
+
lang_current: "Current language",
|
|
925
|
+
lang_set: "Language set to",
|
|
926
|
+
lang_invalid: "Invalid language, supported: zh_CN, en_US",
|
|
927
|
+
list_title: "Available Scenarios",
|
|
928
|
+
list_id: "#",
|
|
929
|
+
list_name: "Name",
|
|
930
|
+
list_status: "Status",
|
|
931
|
+
list_description: "Description",
|
|
932
|
+
status_installed: "installed",
|
|
933
|
+
status_not_installed: "not installed",
|
|
934
|
+
error_tool_not_found: "No AI coding tool detected",
|
|
935
|
+
error_plugin_not_found: "Plugin not found",
|
|
936
|
+
error_invalid_tool: "Unsupported AI tool: {tool}\nSupported tools: {tools}",
|
|
937
|
+
error_invalid_level: "Unsupported install level: {level}\nSupported levels: {levels}",
|
|
938
|
+
error_skill_not_found: "Skill not found in registry",
|
|
939
|
+
error_source_not_found: "Source not found: {path}",
|
|
940
|
+
error_script_not_found: "Script not found: {path}",
|
|
941
|
+
error_unknown: "Unknown error",
|
|
942
|
+
error_not_installed: "Not installed",
|
|
943
|
+
error_no_shell: "bash or sh not found, cannot execute install script. Please install Git Bash or WSL",
|
|
944
|
+
error_symlink_windows: "Failed to create symlink, please run as administrator or enable Windows Developer Mode",
|
|
945
|
+
skill_select_category: "Select Skill category",
|
|
946
|
+
skill_select_items: "Select Skills to install (space to toggle, enter to confirm)",
|
|
947
|
+
skill_already_installed: "installed",
|
|
948
|
+
skill_select_all: "Select ALL Skills ({count} total)",
|
|
949
|
+
skill_select_all_category: "Select all in this category",
|
|
950
|
+
skill_continue_or_install: "{count} Skills selected, choose an action",
|
|
951
|
+
skill_continue_select: "Continue selecting from other categories",
|
|
952
|
+
skill_confirm_install_count: "Install now ({count} Skills selected)",
|
|
953
|
+
skill_all_install_progress: "Installing all {count} Skills...",
|
|
954
|
+
skill_install_progress: "Installing",
|
|
955
|
+
skill_install_done: "Skill installation complete",
|
|
956
|
+
skill_uninstall_done: "Skill uninstallation complete",
|
|
957
|
+
skill_list_title: "Available Skills",
|
|
958
|
+
wizard_select_mode: "Select installation mode",
|
|
959
|
+
wizard_mode_plugin: "Install Plugin",
|
|
960
|
+
wizard_mode_plugin_desc: "Full development workflow (Skills + Agents + config)",
|
|
961
|
+
wizard_mode_skill: "Install Skill",
|
|
962
|
+
wizard_mode_skill_desc: "Domain knowledge only, give AI specific capabilities",
|
|
963
|
+
wizard_back: "Go back",
|
|
964
|
+
wizard_cancel: "Cancel installation",
|
|
965
|
+
wizard_no_selection: "No items selected, please choose an action",
|
|
966
|
+
wizard_back_to_reselect: "Go back",
|
|
967
|
+
status_title: "Installed Plugins",
|
|
968
|
+
status_none: "No installed plugins",
|
|
969
|
+
status_hint: "Run install-helper init to start",
|
|
970
|
+
status_install_time: "Installed at",
|
|
971
|
+
install_installed_to: "Installed to",
|
|
972
|
+
install_skills_count: "Skills",
|
|
973
|
+
install_agents_count: "Agents",
|
|
974
|
+
lang_supported: "Supported languages: zh_CN, en_US",
|
|
975
|
+
lang_usage: "Usage: install-helper lang set <language>",
|
|
976
|
+
lang_specify: "Please specify language: install-helper lang set zh_CN",
|
|
977
|
+
lang_unknown_action: "Unknown action",
|
|
978
|
+
lang_supported_actions: "Supported actions: show, set",
|
|
979
|
+
info_aliases: "Aliases",
|
|
980
|
+
uninstall_not_found: "Not found",
|
|
981
|
+
uninstall_no_record: "No install record found, may not be installed or record is corrupted",
|
|
982
|
+
uninstall_no_record_hint: "For manual cleanup, delete related files in .opencode/ or .claude/ directory",
|
|
983
|
+
uninstall_in_progress: "Uninstalling",
|
|
984
|
+
uninstall_summary_format: "{name} (removed {files} files, {dirs} directories)",
|
|
985
|
+
uninstall_files_gone: " files no longer exist, install record cleaned",
|
|
986
|
+
uninstall_skills_in_progress: "Uninstalling",
|
|
987
|
+
init_pkg_dir_warn: "Current directory appears to be the install-helper package directory",
|
|
988
|
+
init_pkg_dir_hint: "Please run this command in your project directory, not in the install-helper package directory",
|
|
989
|
+
init_pkg_dir_example: "Example: cd ~/my-project && install-helper",
|
|
990
|
+
init_cancelled: "Installation cancelled",
|
|
991
|
+
backup_detected: "Plugin already installed in current directory",
|
|
992
|
+
backup_current: "Currently installed",
|
|
993
|
+
backup_installing: "About to install",
|
|
994
|
+
backup_overwrite_warning: "Continuing will overwrite existing AGENTS.md configuration.",
|
|
995
|
+
backup_auto_create: "System will automatically create backup for future restoration.",
|
|
996
|
+
backup_overwrite: "Overwrite (auto backup)",
|
|
997
|
+
backup_cancel: "Cancel installation",
|
|
998
|
+
backup_restore_prompt: "Backup configuration detected, restore?",
|
|
999
|
+
backup_restore: "Restore",
|
|
1000
|
+
backup_only_uninstall: "Uninstall only (no restore)",
|
|
1001
|
+
backup_select_action: "Please select an action",
|
|
1002
|
+
backup_restore_success: "Configuration restored",
|
|
1003
|
+
backup_created: "Backup created",
|
|
1004
|
+
backup_failed: "Backup creation failed, installation aborted to protect existing config",
|
|
1005
|
+
loading_skills_list: "Loading Skills list...",
|
|
1006
|
+
loading_skills_list_complete: "Skills list loaded",
|
|
1007
|
+
loading_plugin_data: "Loading plugin data...",
|
|
1008
|
+
loading_plugin_data_complete: "Plugin data loaded",
|
|
1009
|
+
loading_skills_list_failed: "Failed to load Skills list, using built-in data",
|
|
1010
|
+
repo_pull_failed: "Failed to pull latest updates, using cached data",
|
|
1011
|
+
repo_cloning: "First-time setup: cloning cannbot-skills repository...",
|
|
1012
|
+
repo_clone_failed: "Failed to clone repository: {error}\nClone manually: git clone {url} {dir}",
|
|
1013
|
+
external_repo_update_failed: "External repo update failed, using existing version: {dir}",
|
|
1014
|
+
config_corrupted: "Config file corrupted, using defaults",
|
|
1015
|
+
record_corrupted: "Install record corrupted: {file}",
|
|
1016
|
+
skill_record_corrupted: "Skill install record corrupted",
|
|
1017
|
+
record_write_failed: "Install record write failed, uninstall may not work properly",
|
|
1018
|
+
install_config_failed: "Failed to install config file: {error}",
|
|
1019
|
+
install_clone_failed: "git clone failed: {url}, clone manually: git clone {url} {dir}",
|
|
1020
|
+
install_link_config_failed: "Failed to link {name} to config directory",
|
|
1021
|
+
install_link_project_failed: "Failed to link {name} to project directory",
|
|
1022
|
+
install_link_workflows_failed: "Failed to link workflows to config directory",
|
|
1023
|
+
install_skill_source_not_found: "Skill source not found: {dir}",
|
|
1024
|
+
install_skill_not_found: "Skill not found: {name} in {dir}",
|
|
1025
|
+
install_skill_failed: "Failed to install skill: {name}",
|
|
1026
|
+
install_agent_not_found: "Agent not found: {name}",
|
|
1027
|
+
install_agent_failed: "Failed to install agent: {name}",
|
|
1028
|
+
install_no_skill_selected: "No Skill selected",
|
|
1029
|
+
install_to: "Install to",
|
|
1030
|
+
start_to_use: "Start {tool} to use",
|
|
1031
|
+
wizard_step_1_title: "[1/4] Select AI coding tool",
|
|
1032
|
+
wizard_step_2_title: "[2/4] Select installation location",
|
|
1033
|
+
wizard_step_3_title: "[3/4] Select plugins to install",
|
|
1034
|
+
wizard_step_4_title: "[4/4] Confirm installation",
|
|
1035
|
+
wizard_step_3_skill_title: "[3/4] Select Skill category",
|
|
1036
|
+
wizard_step_4_skill_title: "[4/4] Select Skills to install \u2014 {category}",
|
|
1037
|
+
install_level_project: "Install to current directory (recommended, current project only)",
|
|
1038
|
+
install_level_global: "Install globally (all projects)",
|
|
1039
|
+
wizard_select_mode_title: "Select installation type",
|
|
1040
|
+
skill_count_format: "{count} Skills",
|
|
1041
|
+
result_success_format: "{count} succeeded",
|
|
1042
|
+
result_failed_format: "{count} failed",
|
|
1043
|
+
uninstall_remove_label: "Removed",
|
|
1044
|
+
uninstall_clean_empty_dir: "Cleaned empty directory",
|
|
1045
|
+
uninstall_skill_not_installed: "Not installed",
|
|
1046
|
+
available_plugins: "Available plugins",
|
|
1047
|
+
available_skills: "Available Skills",
|
|
1048
|
+
skill_total_count: "Total {count} Skills",
|
|
1049
|
+
wizard_confirm_install_format: "About to install {count} plugins to {tool} ({level} level):",
|
|
1050
|
+
wizard_install_path: "Install path",
|
|
1051
|
+
update_install_hint: "Use {cmd} to install plugins",
|
|
1052
|
+
hint_select_move: "Navigate",
|
|
1053
|
+
hint_select_space: "Space",
|
|
1054
|
+
hint_select_check: "Toggle",
|
|
1055
|
+
hint_select_confirm: "Confirm",
|
|
1056
|
+
hint_checkbox_suffix: "Press enter without selection to go back",
|
|
1057
|
+
doctor_not_installed: "Not installed",
|
|
1058
|
+
doctor_links_valid: "{count} symlinks all valid",
|
|
1059
|
+
doctor_broken_links: "{count} broken links",
|
|
1060
|
+
doctor_fixed: "Cleaned {count} broken links",
|
|
1061
|
+
doctor_not_exist: "Does not exist",
|
|
1062
|
+
doctor_created: "Created {path}",
|
|
1063
|
+
doctor_config_exists: "Exists",
|
|
1064
|
+
doctor_config_not_exist: "Does not exist",
|
|
1065
|
+
doctor_result_with_fix: "{warnings} warnings, {fixes} fixed",
|
|
1066
|
+
doctor_result_without_fix: "{warnings} warnings",
|
|
1067
|
+
count_suffix: "",
|
|
1068
|
+
try_prompt: "help me develop an Abs operator",
|
|
1069
|
+
uninstall_interactive_title: "Manage installed items \u2014 uncheck to uninstall",
|
|
1070
|
+
uninstall_select_type: "Select type to uninstall",
|
|
1071
|
+
uninstall_type_skill: "Uninstall Skills",
|
|
1072
|
+
uninstall_type_plugin: "Uninstall Plugins",
|
|
1073
|
+
uninstall_checkbox_hint: "Checked = keep, unchecked = uninstall",
|
|
1074
|
+
uninstall_uncheck_all: "Uncheck all (mark all for uninstall)",
|
|
1075
|
+
uninstall_confirm_count: "Confirm uninstall ({count} will be removed)",
|
|
1076
|
+
uninstall_no_installed: "No installed Skills or Plugins",
|
|
1077
|
+
uninstall_no_installed_skills: "No installed Skills",
|
|
1078
|
+
uninstall_no_installed_plugins: "No installed Plugins",
|
|
1079
|
+
uninstall_nothing_to_uninstall: "Nothing to uninstall",
|
|
1080
|
+
uninstall_all_progress: "Uninstalling all {count} Skills...",
|
|
1081
|
+
uninstall_all_summary: "About to uninstall {skills} Skills and {plugins} Plugins:",
|
|
1082
|
+
uninstall_all_done: "Batch uninstall complete",
|
|
1083
|
+
uninstall_recent_no_history: "No install batch history, cannot identify recently installed Skills",
|
|
1084
|
+
uninstall_recent_progress: "About to uninstall {count} recently installed Skills:",
|
|
1085
|
+
uninstall_plugin_batch_progress: "Batch uninstalling {count} plugins...",
|
|
1086
|
+
uninstall_plugin_batch_skip_restore: "Batch mode: skipping backup restore",
|
|
1087
|
+
uninstall_confirm_prompt: "About to uninstall {count} items, confirm?",
|
|
1088
|
+
uninstall_select_items: "Manage installed Skills (space to toggle, enter to confirm)",
|
|
1089
|
+
uninstall_select_plugins: "Manage installed Plugins (space to toggle, enter to confirm)",
|
|
1090
|
+
uninstall_select_category: "Select Skill category to manage",
|
|
1091
|
+
uninstall_uncheck_all_category: "Uncheck all in this category (mark for uninstall)",
|
|
1092
|
+
uninstall_continue_or_confirm: "{count} marked for uninstall, choose an action",
|
|
1093
|
+
uninstall_marked_count: "{count} marked for uninstall",
|
|
1094
|
+
uninstall_uncategorized: "Uncategorized"
|
|
1095
|
+
};
|
|
1096
|
+
}
|
|
1097
|
+
});
|
|
651
1098
|
|
|
652
1099
|
// src/utils/i18n.ts
|
|
653
1100
|
import { readFileSync, existsSync as existsSync2 } from "fs";
|
|
654
1101
|
import { join as join2, dirname } from "path";
|
|
655
1102
|
import { fileURLToPath } from "url";
|
|
656
|
-
|
|
657
|
-
// src/locales/zh_CN.json
|
|
658
|
-
var zh_CN_default = {
|
|
659
|
-
wizard_title: "CANNBot Install Helper",
|
|
660
|
-
wizard_detect: "\u6B63\u5728\u68C0\u6D4B\u5DF2\u5B89\u88C5\u7684 AI \u7F16\u7A0B\u5DE5\u5177...",
|
|
661
|
-
wizard_select_tool: "\u9009\u62E9 AI \u7F16\u7A0B\u5DE5\u5177",
|
|
662
|
-
wizard_select_level: "\u9009\u62E9\u5B89\u88C5\u4F4D\u7F6E",
|
|
663
|
-
wizard_select_plugin: "\u9009\u62E9\u8981\u5B89\u88C5\u7684\u63D2\u4EF6",
|
|
664
|
-
wizard_confirm: "\u786E\u8BA4\u5B89\u88C5",
|
|
665
|
-
wizard_detected_tool: "\u68C0\u6D4B\u5230",
|
|
666
|
-
wizard_confirm_tool: "\u4F7F\u7528",
|
|
667
|
-
wizard_last_used: "\u4E0A\u6B21\u4F7F\u7528",
|
|
668
|
-
wizard_already_installed: "\u5DF2\u5B89\u88C5",
|
|
669
|
-
install_repo_ready: "\u4ED3\u5E93\u5C31\u7EEA",
|
|
670
|
-
install_progress: "\u6B63\u5728\u5B89\u88C5",
|
|
671
|
-
install_done: "\u5B89\u88C5\u5B8C\u6210",
|
|
672
|
-
install_success: "\u6210\u529F",
|
|
673
|
-
install_already_installed: "\u5DF2\u5B89\u88C5",
|
|
674
|
-
install_reinstall_confirm: "\u662F\u5426\u91CD\u65B0\u5B89\u88C5\uFF08\u8986\u76D6\uFF09",
|
|
675
|
-
install_skip: "\u8DF3\u8FC7",
|
|
676
|
-
install_enhanced_next_steps: "\u4E0B\u4E00\u6B65",
|
|
677
|
-
install_enhanced_launch: "\u542F\u52A8",
|
|
678
|
-
install_enhanced_try: "\u8BD5\u8BD5",
|
|
679
|
-
install_enhanced_more: "\u66F4\u591A",
|
|
680
|
-
install_enhanced_check: "\u68C0\u67E5",
|
|
681
|
-
install_enhanced_docs: "\u6587\u6863",
|
|
682
|
-
update_updating: "\u6B63\u5728\u66F4\u65B0",
|
|
683
|
-
update_done: "\u66F4\u65B0\u5B8C\u6210",
|
|
684
|
-
update_no_plugins: "\u6682\u65E0\u5DF2\u5B89\u88C5\u7684\u63D2\u4EF6",
|
|
685
|
-
update_skipped: "\u5DF2\u8DF3\u8FC7",
|
|
686
|
-
doctor_title: "CANNBot Doctor",
|
|
687
|
-
doctor_tools: "AI \u5DE5\u5177",
|
|
688
|
-
doctor_plugins: "\u5DF2\u5B89\u88C5\u63D2\u4EF6",
|
|
689
|
-
doctor_links: "\u94FE\u63A5\u5B8C\u6574\u6027",
|
|
690
|
-
doctor_config: "\u914D\u7F6E\u6587\u4EF6",
|
|
691
|
-
doctor_result: "\u7ED3\u679C",
|
|
692
|
-
doctor_fix_cleaning: "\u6E05\u7406\u5931\u6548\u94FE\u63A5",
|
|
693
|
-
doctor_fix_rebuilding: "\u91CD\u5EFA\u76EE\u5F55",
|
|
694
|
-
info_description: "\u63CF\u8FF0",
|
|
695
|
-
info_skills: "Skills",
|
|
696
|
-
info_agents: "Agents",
|
|
697
|
-
info_status: "\u72B6\u6001",
|
|
698
|
-
info_quickstart: "\u5FEB\u901F\u5F00\u59CB",
|
|
699
|
-
info_not_found: "\u672A\u627E\u5230\u63D2\u4EF6",
|
|
700
|
-
lang_title: "\u8BED\u8A00\u8BBE\u7F6E",
|
|
701
|
-
lang_current: "\u5F53\u524D\u8BED\u8A00",
|
|
702
|
-
lang_set: "\u8BED\u8A00\u5DF2\u8BBE\u7F6E\u4E3A",
|
|
703
|
-
lang_invalid: "\u65E0\u6548\u7684\u8BED\u8A00\uFF0C\u652F\u6301: zh_CN, en_US",
|
|
704
|
-
list_title: "\u53EF\u7528\u573A\u666F",
|
|
705
|
-
list_id: "\u5E8F\u53F7",
|
|
706
|
-
list_name: "\u573A\u666F\u540D",
|
|
707
|
-
list_status: "\u72B6\u6001",
|
|
708
|
-
list_description: "\u63CF\u8FF0",
|
|
709
|
-
status_installed: "\u5DF2\u88C5",
|
|
710
|
-
status_not_installed: "\u672A\u88C5",
|
|
711
|
-
error_tool_not_found: "\u672A\u68C0\u6D4B\u5230\u4EFB\u4F55 AI \u7F16\u7A0B\u5DE5\u5177",
|
|
712
|
-
error_plugin_not_found: "\u672A\u627E\u5230\u63D2\u4EF6",
|
|
713
|
-
error_invalid_tool: "\u6682\u4E0D\u652F\u6301\u7684 AI \u5DE5\u5177: {tool}\n\u652F\u6301\u7684\u5DE5\u5177: {tools}",
|
|
714
|
-
error_invalid_level: "\u6682\u4E0D\u652F\u6301\u7684\u5B89\u88C5\u7EA7\u522B: {level}\n\u652F\u6301\u7684\u7EA7\u522B: {levels}",
|
|
715
|
-
error_skill_not_found: "\u672A\u5728\u6CE8\u518C\u8868\u4E2D\u627E\u5230 Skill",
|
|
716
|
-
error_source_not_found: "\u672A\u627E\u5230\u6E90\u6587\u4EF6: {path}",
|
|
717
|
-
error_script_not_found: "\u672A\u627E\u5230\u5B89\u88C5\u811A\u672C: {path}",
|
|
718
|
-
error_unknown: "\u672A\u77E5\u9519\u8BEF",
|
|
719
|
-
error_not_installed: "\u672A\u5B89\u88C5",
|
|
720
|
-
error_no_shell: "\u672A\u627E\u5230 bash \u6216 sh\uFF0C\u65E0\u6CD5\u6267\u884C\u5B89\u88C5\u811A\u672C\u3002\u8BF7\u5B89\u88C5 Git Bash \u6216 WSL",
|
|
721
|
-
error_symlink_windows: "\u521B\u5EFA\u7B26\u53F7\u94FE\u63A5\u5931\u8D25\uFF0C\u8BF7\u4EE5\u7BA1\u7406\u5458\u8EAB\u4EFD\u8FD0\u884C\u6216\u5F00\u542F Windows \u5F00\u53D1\u8005\u6A21\u5F0F",
|
|
722
|
-
skill_select_category: "\u9009\u62E9 Skill \u7C7B\u522B",
|
|
723
|
-
skill_select_items: "\u9009\u62E9\u8981\u5B89\u88C5\u7684 Skills",
|
|
724
|
-
skill_already_installed: "\u5DF2\u5B89\u88C5",
|
|
725
|
-
skill_select_all: "\u5168\u9009\u6240\u6709 Skills\uFF08\u5171 {count} \u4E2A\uFF09",
|
|
726
|
-
skill_select_all_category: "\u5168\u9009\u5F53\u524D\u7C7B\u522B",
|
|
727
|
-
skill_continue_or_install: "\u5DF2\u9009 {count} \u4E2A Skills\uFF0C\u8BF7\u9009\u62E9\u64CD\u4F5C",
|
|
728
|
-
skill_continue_select: "\u7EE7\u7EED\u9009\u62E9\u5176\u4ED6\u7C7B\u522B",
|
|
729
|
-
skill_confirm_install_count: "\u786E\u8BA4\u5B89\u88C5\uFF08\u5DF2\u9009 {count} \u4E2A Skills\uFF09",
|
|
730
|
-
skill_all_install_progress: "\u6B63\u5728\u5B89\u88C5\u5168\u90E8 {count} \u4E2A Skills...",
|
|
731
|
-
skill_install_progress: "\u6B63\u5728\u5B89\u88C5",
|
|
732
|
-
skill_install_done: "Skill \u5B89\u88C5\u5B8C\u6210",
|
|
733
|
-
skill_uninstall_done: "Skill \u5378\u8F7D\u5B8C\u6210",
|
|
734
|
-
skill_list_title: "\u53EF\u7528 Skills",
|
|
735
|
-
wizard_select_mode: "\u9009\u62E9\u5B89\u88C5\u7C7B\u578B",
|
|
736
|
-
wizard_mode_plugin: "\u5B89\u88C5 Plugin",
|
|
737
|
-
wizard_mode_plugin_desc: "\u5B8C\u6574\u5F00\u53D1\u5DE5\u4F5C\u6D41\uFF08Skills + Agents + \u914D\u7F6E\u6587\u4EF6\uFF09",
|
|
738
|
-
wizard_mode_skill: "\u5B89\u88C5 Skill",
|
|
739
|
-
wizard_mode_skill_desc: "\u4EC5\u5B89\u88C5\u9886\u57DF\u77E5\u8BC6\u6280\u80FD\uFF0C\u8BA9 AI \u638C\u63E1\u7279\u5B9A\u80FD\u529B",
|
|
740
|
-
wizard_back: "\u8FD4\u56DE",
|
|
741
|
-
wizard_cancel: "\u9000\u51FA",
|
|
742
|
-
wizard_no_selection: "\u672A\u9009\u62E9\u4EFB\u4F55\u9879\uFF0C\u8BF7\u9009\u62E9\u64CD\u4F5C",
|
|
743
|
-
wizard_back_to_reselect: "\u8FD4\u56DE",
|
|
744
|
-
status_title: "\u5DF2\u5B89\u88C5\u63D2\u4EF6",
|
|
745
|
-
status_none: "\u6682\u65E0\u5DF2\u5B89\u88C5\u7684\u63D2\u4EF6",
|
|
746
|
-
status_hint: "\u8FD0\u884C install-helper init \u5F00\u59CB\u5B89\u88C5",
|
|
747
|
-
status_install_time: "\u5B89\u88C5\u65F6\u95F4",
|
|
748
|
-
install_installed_to: "\u5B89\u88C5\u5230",
|
|
749
|
-
install_skills_count: "Skills",
|
|
750
|
-
install_agents_count: "Agents",
|
|
751
|
-
lang_supported: "\u652F\u6301\u7684\u8BED\u8A00: zh_CN, en_US",
|
|
752
|
-
lang_usage: "\u7528\u6CD5: install-helper lang set <language>",
|
|
753
|
-
lang_specify: "\u8BF7\u6307\u5B9A\u8BED\u8A00: install-helper lang set zh_CN",
|
|
754
|
-
lang_unknown_action: "\u672A\u77E5\u64CD\u4F5C",
|
|
755
|
-
lang_supported_actions: "\u652F\u6301\u7684\u64CD\u4F5C: show, set",
|
|
756
|
-
info_aliases: "\u522B\u540D",
|
|
757
|
-
uninstall_not_found: "\u672A\u627E\u5230",
|
|
758
|
-
uninstall_no_record: "\u672A\u627E\u5230\u5B89\u88C5\u8BB0\u5F55\uFF0C\u53EF\u80FD\u672A\u5B89\u88C5\u6216\u5B89\u88C5\u8BB0\u5F55\u5DF2\u635F\u574F",
|
|
759
|
-
uninstall_no_record_hint: "\u5982\u9700\u5F3A\u5236\u6E05\u7406\uFF0C\u8BF7\u624B\u52A8\u5220\u9664 .opencode/ \u6216 .claude/ \u76EE\u5F55\u4E2D\u7684\u76F8\u5173\u6587\u4EF6",
|
|
760
|
-
uninstall_in_progress: "\u6B63\u5728\u5378\u8F7D",
|
|
761
|
-
uninstall_summary_format: "{name}\uFF08\u79FB\u9664 {files} \u4E2A\u6587\u4EF6\uFF0C{dirs} \u4E2A\u76EE\u5F55\uFF09",
|
|
762
|
-
uninstall_files_gone: "\u7684\u6587\u4EF6\u5DF2\u4E0D\u5B58\u5728\uFF0C\u5DF2\u6E05\u7406\u5B89\u88C5\u8BB0\u5F55",
|
|
763
|
-
uninstall_skills_in_progress: "\u6B63\u5728\u5378\u8F7D",
|
|
764
|
-
init_pkg_dir_warn: "\u5F53\u524D\u76EE\u5F55\u770B\u8D77\u6765\u662F install-helper \u5305\u76EE\u5F55",
|
|
765
|
-
init_pkg_dir_hint: "\u8BF7\u5728\u4F60\u7684\u9879\u76EE\u76EE\u5F55\u4E2D\u8FD0\u884C\u6B64\u547D\u4EE4\uFF0C\u800C\u4E0D\u662F\u5728 install-helper \u5B89\u88C5\u76EE\u5F55\u4E2D",
|
|
766
|
-
init_pkg_dir_example: "\u793A\u4F8B\uFF1Acd ~/my-project && install-helper",
|
|
767
|
-
init_cancelled: "\u5DF2\u53D6\u6D88\u5B89\u88C5",
|
|
768
|
-
backup_detected: "\u68C0\u6D4B\u5230\u5F53\u524D\u76EE\u5F55\u5DF2\u5B89\u88C5\u63D2\u4EF6",
|
|
769
|
-
backup_current: "\u5F53\u524D\u5B89\u88C5",
|
|
770
|
-
backup_installing: "\u5373\u5C06\u5B89\u88C5",
|
|
771
|
-
backup_overwrite_warning: "\u7EE7\u7EED\u5B89\u88C5\u5C06\u8986\u76D6\u73B0\u6709\u7684 AGENTS.md \u914D\u7F6E\u6587\u4EF6\u3002",
|
|
772
|
-
backup_auto_create: "\u7CFB\u7EDF\u4F1A\u81EA\u52A8\u521B\u5EFA\u5907\u4EFD\uFF0C\u4EE5\u4FBF\u540E\u7EED\u6062\u590D\u3002",
|
|
773
|
-
backup_overwrite: "\u8986\u76D6\u5B89\u88C5\uFF08\u81EA\u52A8\u5907\u4EFD\uFF09",
|
|
774
|
-
backup_cancel: "\u53D6\u6D88\u5B89\u88C5",
|
|
775
|
-
backup_restore_prompt: "\u68C0\u6D4B\u5230\u5907\u4EFD\u914D\u7F6E\uFF0C\u662F\u5426\u6062\u590D\uFF1F",
|
|
776
|
-
backup_restore: "\u6062\u590D",
|
|
777
|
-
backup_only_uninstall: "\u4EC5\u5378\u8F7D\uFF08\u4E0D\u6062\u590D\uFF09",
|
|
778
|
-
backup_select_action: "\u8BF7\u9009\u62E9\u64CD\u4F5C",
|
|
779
|
-
backup_restore_success: "\u5DF2\u6062\u590D\u914D\u7F6E",
|
|
780
|
-
backup_created: "\u5DF2\u521B\u5EFA\u5907\u4EFD",
|
|
781
|
-
backup_failed: "\u5907\u4EFD\u521B\u5EFA\u5931\u8D25\uFF0C\u5B89\u88C5\u5DF2\u4E2D\u6B62\u4EE5\u4FDD\u62A4\u73B0\u6709\u914D\u7F6E",
|
|
782
|
-
loading_skills_list: "\u6B63\u5728\u52A0\u8F7D Skills \u5217\u8868...",
|
|
783
|
-
loading_skills_list_complete: "Skills \u5217\u8868\u52A0\u8F7D\u5B8C\u6210",
|
|
784
|
-
loading_plugin_data: "\u6B63\u5728\u52A0\u8F7D\u63D2\u4EF6\u6570\u636E...",
|
|
785
|
-
loading_plugin_data_complete: "\u63D2\u4EF6\u6570\u636E\u52A0\u8F7D\u5B8C\u6210",
|
|
786
|
-
loading_skills_list_failed: "Skills \u5217\u8868\u52A0\u8F7D\u5931\u8D25\uFF0C\u5C06\u4F7F\u7528\u5185\u7F6E\u6570\u636E",
|
|
787
|
-
repo_pull_failed: "\u65E0\u6CD5\u62C9\u53D6\u6700\u65B0\u5185\u5BB9\uFF0C\u4F7F\u7528\u7F13\u5B58\u6570\u636E",
|
|
788
|
-
repo_cloning: "\u9996\u6B21\u4F7F\u7528\uFF0C\u6B63\u5728\u514B\u9686 cannbot-skills \u4ED3\u5E93...",
|
|
789
|
-
repo_clone_failed: "\u514B\u9686\u4ED3\u5E93\u5931\u8D25: {error}\n\u8BF7\u624B\u52A8\u514B\u9686: git clone {url} {dir}",
|
|
790
|
-
external_repo_update_failed: "\u5916\u90E8\u4ED3\u5E93\u66F4\u65B0\u5931\u8D25\uFF0C\u4F7F\u7528\u73B0\u6709\u7248\u672C: {dir}",
|
|
791
|
-
config_corrupted: "\u914D\u7F6E\u6587\u4EF6\u5DF2\u635F\u574F\uFF0C\u4F7F\u7528\u9ED8\u8BA4\u914D\u7F6E",
|
|
792
|
-
record_corrupted: "\u5B89\u88C5\u8BB0\u5F55\u5DF2\u635F\u574F\uFF1A{file}",
|
|
793
|
-
skill_record_corrupted: "Skill \u5B89\u88C5\u8BB0\u5F55\u5DF2\u635F\u574F",
|
|
794
|
-
record_write_failed: "\u5B89\u88C5\u8BB0\u5F55\u5199\u5165\u5931\u8D25\uFF0C\u5378\u8F7D\u65F6\u53EF\u80FD\u65E0\u6CD5\u81EA\u52A8\u6E05\u7406",
|
|
795
|
-
install_config_failed: "\u914D\u7F6E\u6587\u4EF6\u5B89\u88C5\u5931\u8D25: {error}",
|
|
796
|
-
install_clone_failed: "git clone \u5931\u8D25: {url}\uFF0C\u8BF7\u624B\u52A8\u514B\u9686: git clone {url} {dir}",
|
|
797
|
-
install_link_config_failed: "\u94FE\u63A5 {name} \u5230\u914D\u7F6E\u76EE\u5F55\u5931\u8D25",
|
|
798
|
-
install_link_project_failed: "\u94FE\u63A5 {name} \u5230\u9879\u76EE\u76EE\u5F55\u5931\u8D25",
|
|
799
|
-
install_link_workflows_failed: "\u94FE\u63A5 workflows \u5230\u914D\u7F6E\u76EE\u5F55\u5931\u8D25",
|
|
800
|
-
install_skill_source_not_found: "Skill \u6E90\u76EE\u5F55\u672A\u627E\u5230: {dir}",
|
|
801
|
-
install_skill_not_found: "Skill \u672A\u627E\u5230: {name} (\u5728 {dir})",
|
|
802
|
-
install_skill_failed: "Skill \u5B89\u88C5\u5931\u8D25: {name}",
|
|
803
|
-
install_agent_not_found: "Agent \u672A\u627E\u5230: {name}",
|
|
804
|
-
install_agent_failed: "Agent \u5B89\u88C5\u5931\u8D25: {name}",
|
|
805
|
-
install_no_skill_selected: "\u672A\u9009\u62E9\u4EFB\u4F55 Skill",
|
|
806
|
-
install_to: "\u5B89\u88C5\u5230",
|
|
807
|
-
start_to_use: "\u542F\u52A8 {tool} \u5373\u53EF\u4F7F\u7528",
|
|
808
|
-
wizard_step_1_title: "[1/4] \u9009\u62E9 AI \u7F16\u7A0B\u5DE5\u5177",
|
|
809
|
-
wizard_step_2_title: "[2/4] \u9009\u62E9\u5B89\u88C5\u4F4D\u7F6E",
|
|
810
|
-
wizard_step_3_title: "[3/4] \u9009\u62E9\u8981\u5B89\u88C5\u7684\u63D2\u4EF6",
|
|
811
|
-
wizard_step_4_title: "[4/4] \u786E\u8BA4\u5B89\u88C5",
|
|
812
|
-
wizard_step_3_skill_title: "[3/4] \u9009\u62E9 Skill \u7C7B\u522B",
|
|
813
|
-
wizard_step_4_skill_title: "[4/4] \u9009\u62E9\u8981\u5B89\u88C5\u7684 Skills \u2014 {category}",
|
|
814
|
-
install_level_project: "\u5B89\u88C5\u5230\u5F53\u524D\u76EE\u5F55\uFF08\u63A8\u8350\uFF0C\u4EC5\u5F53\u524D\u9879\u76EE\u53EF\u7528\uFF09",
|
|
815
|
-
install_level_global: "\u5B89\u88C5\u5230\u5168\u5C40\uFF08\u6240\u6709\u9879\u76EE\u5171\u4EAB\uFF09",
|
|
816
|
-
wizard_select_mode_title: "\u9009\u62E9\u5B89\u88C5\u7C7B\u578B",
|
|
817
|
-
skill_count_format: "{count} \u4E2A Skills",
|
|
818
|
-
result_success_format: "{count} \u6210\u529F",
|
|
819
|
-
result_failed_format: "{count} \u5931\u8D25",
|
|
820
|
-
uninstall_remove_label: "\u79FB\u9664",
|
|
821
|
-
uninstall_clean_empty_dir: "\u6E05\u7406\u7A7A\u76EE\u5F55",
|
|
822
|
-
uninstall_skill_not_installed: "\u672A\u5B89\u88C5",
|
|
823
|
-
available_plugins: "\u53EF\u7528\u63D2\u4EF6",
|
|
824
|
-
available_skills: "\u53EF\u7528 Skills",
|
|
825
|
-
skill_total_count: "\u5171 {count} \u4E2A Skills",
|
|
826
|
-
wizard_confirm_install_format: "\u5373\u5C06\u5B89\u88C5 {count} \u4E2A\u63D2\u4EF6\u5230 {tool}\uFF08{level} \u7EA7\u522B\uFF09\uFF1A",
|
|
827
|
-
wizard_install_path: "\u5B89\u88C5\u8DEF\u5F84",
|
|
828
|
-
update_install_hint: "\u4F7F\u7528 {cmd} \u5B89\u88C5\u63D2\u4EF6",
|
|
829
|
-
hint_select_move: "\u79FB\u52A8",
|
|
830
|
-
hint_select_space: "\u7A7A\u683C",
|
|
831
|
-
hint_select_check: "\u52FE\u9009",
|
|
832
|
-
hint_select_confirm: "\u786E\u8BA4",
|
|
833
|
-
hint_checkbox_suffix: "\u4E0D\u9009\u6309\u56DE\u8F66\u53EF\u8FD4\u56DE",
|
|
834
|
-
doctor_not_installed: "\u672A\u5B89\u88C5",
|
|
835
|
-
doctor_links_valid: "{count} \u4E2A\u8F6F\u94FE\u63A5\u5747\u6709\u6548",
|
|
836
|
-
doctor_broken_links: "{count} \u4E2A\u5931\u6548\u94FE\u63A5",
|
|
837
|
-
doctor_fixed: "\u5DF2\u6E05\u7406 {count} \u4E2A\u5931\u6548\u94FE\u63A5",
|
|
838
|
-
doctor_not_exist: "\u4E0D\u5B58\u5728",
|
|
839
|
-
doctor_created: "\u5DF2\u521B\u5EFA {path}",
|
|
840
|
-
doctor_config_exists: "\u5B58\u5728",
|
|
841
|
-
doctor_config_not_exist: "\u4E0D\u5B58\u5728",
|
|
842
|
-
doctor_result_with_fix: "{warnings} \u4E2A\u8B66\u544A, {fixes} \u9879\u5DF2\u4FEE\u590D",
|
|
843
|
-
doctor_result_without_fix: "{warnings} \u4E2A\u8B66\u544A",
|
|
844
|
-
count_suffix: "\u4E2A",
|
|
845
|
-
try_prompt: "\u5E2E\u6211\u5F00\u53D1\u4E00\u4E2A Abs \u7B97\u5B50"
|
|
846
|
-
};
|
|
847
|
-
|
|
848
|
-
// src/locales/en_US.json
|
|
849
|
-
var en_US_default = {
|
|
850
|
-
wizard_title: "CANNBot Install Helper",
|
|
851
|
-
wizard_detect: "Detecting installed AI coding tools...",
|
|
852
|
-
wizard_select_tool: "Select AI coding tool",
|
|
853
|
-
wizard_select_level: "Select install level",
|
|
854
|
-
wizard_select_plugin: "Select a scenario to install",
|
|
855
|
-
wizard_confirm: "Confirm installation",
|
|
856
|
-
wizard_detected_tool: "Detected",
|
|
857
|
-
wizard_confirm_tool: "Confirm using",
|
|
858
|
-
wizard_last_used: "last used",
|
|
859
|
-
wizard_already_installed: "installed",
|
|
860
|
-
install_repo_ready: "Repository ready",
|
|
861
|
-
install_progress: "Installing",
|
|
862
|
-
install_done: "Installation complete",
|
|
863
|
-
install_success: "success",
|
|
864
|
-
install_already_installed: "already installed",
|
|
865
|
-
install_reinstall_confirm: "Reinstall (overwrite)",
|
|
866
|
-
install_skip: "skipped",
|
|
867
|
-
install_enhanced_next_steps: "Next steps",
|
|
868
|
-
install_enhanced_launch: "Launch",
|
|
869
|
-
install_enhanced_try: "Try",
|
|
870
|
-
install_enhanced_more: "More",
|
|
871
|
-
install_enhanced_check: "Check",
|
|
872
|
-
install_enhanced_docs: "Docs",
|
|
873
|
-
update_updating: "Updating",
|
|
874
|
-
update_done: "Update complete",
|
|
875
|
-
update_no_plugins: "No installed plugins",
|
|
876
|
-
update_skipped: "skipped",
|
|
877
|
-
doctor_title: "CANNBot Doctor",
|
|
878
|
-
doctor_tools: "AI Tools",
|
|
879
|
-
doctor_plugins: "Installed Plugins",
|
|
880
|
-
doctor_links: "Link Integrity",
|
|
881
|
-
doctor_config: "Configuration",
|
|
882
|
-
doctor_result: "Result",
|
|
883
|
-
doctor_fix_cleaning: "Cleaning broken links",
|
|
884
|
-
doctor_fix_rebuilding: "Rebuilding directories",
|
|
885
|
-
info_description: "Description",
|
|
886
|
-
info_skills: "Skills",
|
|
887
|
-
info_agents: "Agents",
|
|
888
|
-
info_status: "Status",
|
|
889
|
-
info_quickstart: "Quick Start",
|
|
890
|
-
info_not_found: "Plugin not found",
|
|
891
|
-
lang_title: "Language Settings",
|
|
892
|
-
lang_current: "Current language",
|
|
893
|
-
lang_set: "Language set to",
|
|
894
|
-
lang_invalid: "Invalid language, supported: zh_CN, en_US",
|
|
895
|
-
list_title: "Available Scenarios",
|
|
896
|
-
list_id: "#",
|
|
897
|
-
list_name: "Name",
|
|
898
|
-
list_status: "Status",
|
|
899
|
-
list_description: "Description",
|
|
900
|
-
status_installed: "installed",
|
|
901
|
-
status_not_installed: "not installed",
|
|
902
|
-
error_tool_not_found: "No AI coding tool detected",
|
|
903
|
-
error_plugin_not_found: "Plugin not found",
|
|
904
|
-
error_invalid_tool: "Unsupported AI tool: {tool}\nSupported tools: {tools}",
|
|
905
|
-
error_invalid_level: "Unsupported install level: {level}\nSupported levels: {levels}",
|
|
906
|
-
error_skill_not_found: "Skill not found in registry",
|
|
907
|
-
error_source_not_found: "Source not found: {path}",
|
|
908
|
-
error_script_not_found: "Script not found: {path}",
|
|
909
|
-
error_unknown: "Unknown error",
|
|
910
|
-
error_not_installed: "Not installed",
|
|
911
|
-
error_no_shell: "bash or sh not found, cannot execute install script. Please install Git Bash or WSL",
|
|
912
|
-
error_symlink_windows: "Failed to create symlink, please run as administrator or enable Windows Developer Mode",
|
|
913
|
-
skill_select_category: "Select Skill category",
|
|
914
|
-
skill_select_items: "Select Skills to install (space to toggle, enter to confirm)",
|
|
915
|
-
skill_already_installed: "installed",
|
|
916
|
-
skill_select_all: "Select ALL Skills ({count} total)",
|
|
917
|
-
skill_select_all_category: "Select all in this category",
|
|
918
|
-
skill_continue_or_install: "{count} Skills selected, choose an action",
|
|
919
|
-
skill_continue_select: "Continue selecting from other categories",
|
|
920
|
-
skill_confirm_install_count: "Install now ({count} Skills selected)",
|
|
921
|
-
skill_all_install_progress: "Installing all {count} Skills...",
|
|
922
|
-
skill_install_progress: "Installing",
|
|
923
|
-
skill_install_done: "Skill installation complete",
|
|
924
|
-
skill_uninstall_done: "Skill uninstallation complete",
|
|
925
|
-
skill_list_title: "Available Skills",
|
|
926
|
-
wizard_select_mode: "Select installation mode",
|
|
927
|
-
wizard_mode_plugin: "Install Plugin",
|
|
928
|
-
wizard_mode_plugin_desc: "Full development workflow (Skills + Agents + config)",
|
|
929
|
-
wizard_mode_skill: "Install Skill",
|
|
930
|
-
wizard_mode_skill_desc: "Domain knowledge only, give AI specific capabilities",
|
|
931
|
-
wizard_back: "Go back",
|
|
932
|
-
wizard_cancel: "Cancel installation",
|
|
933
|
-
wizard_no_selection: "No items selected, please choose an action",
|
|
934
|
-
wizard_back_to_reselect: "Go back",
|
|
935
|
-
status_title: "Installed Plugins",
|
|
936
|
-
status_none: "No installed plugins",
|
|
937
|
-
status_hint: "Run install-helper init to start",
|
|
938
|
-
status_install_time: "Installed at",
|
|
939
|
-
install_installed_to: "Installed to",
|
|
940
|
-
install_skills_count: "Skills",
|
|
941
|
-
install_agents_count: "Agents",
|
|
942
|
-
lang_supported: "Supported languages: zh_CN, en_US",
|
|
943
|
-
lang_usage: "Usage: install-helper lang set <language>",
|
|
944
|
-
lang_specify: "Please specify language: install-helper lang set zh_CN",
|
|
945
|
-
lang_unknown_action: "Unknown action",
|
|
946
|
-
lang_supported_actions: "Supported actions: show, set",
|
|
947
|
-
info_aliases: "Aliases",
|
|
948
|
-
uninstall_not_found: "Not found",
|
|
949
|
-
uninstall_no_record: "No install record found, may not be installed or record is corrupted",
|
|
950
|
-
uninstall_no_record_hint: "For manual cleanup, delete related files in .opencode/ or .claude/ directory",
|
|
951
|
-
uninstall_in_progress: "Uninstalling",
|
|
952
|
-
uninstall_summary_format: "{name} (removed {files} files, {dirs} directories)",
|
|
953
|
-
uninstall_files_gone: " files no longer exist, install record cleaned",
|
|
954
|
-
uninstall_skills_in_progress: "Uninstalling",
|
|
955
|
-
init_pkg_dir_warn: "Current directory appears to be the install-helper package directory",
|
|
956
|
-
init_pkg_dir_hint: "Please run this command in your project directory, not in the install-helper package directory",
|
|
957
|
-
init_pkg_dir_example: "Example: cd ~/my-project && install-helper",
|
|
958
|
-
init_cancelled: "Installation cancelled",
|
|
959
|
-
backup_detected: "Plugin already installed in current directory",
|
|
960
|
-
backup_current: "Currently installed",
|
|
961
|
-
backup_installing: "About to install",
|
|
962
|
-
backup_overwrite_warning: "Continuing will overwrite existing AGENTS.md configuration.",
|
|
963
|
-
backup_auto_create: "System will automatically create backup for future restoration.",
|
|
964
|
-
backup_overwrite: "Overwrite (auto backup)",
|
|
965
|
-
backup_cancel: "Cancel installation",
|
|
966
|
-
backup_restore_prompt: "Backup configuration detected, restore?",
|
|
967
|
-
backup_restore: "Restore",
|
|
968
|
-
backup_only_uninstall: "Uninstall only (no restore)",
|
|
969
|
-
backup_select_action: "Please select an action",
|
|
970
|
-
backup_restore_success: "Configuration restored",
|
|
971
|
-
backup_created: "Backup created",
|
|
972
|
-
backup_failed: "Backup creation failed, installation aborted to protect existing config",
|
|
973
|
-
loading_skills_list: "Loading Skills list...",
|
|
974
|
-
loading_skills_list_complete: "Skills list loaded",
|
|
975
|
-
loading_plugin_data: "Loading plugin data...",
|
|
976
|
-
loading_plugin_data_complete: "Plugin data loaded",
|
|
977
|
-
loading_skills_list_failed: "Failed to load Skills list, using built-in data",
|
|
978
|
-
repo_pull_failed: "Failed to pull latest updates, using cached data",
|
|
979
|
-
repo_cloning: "First-time setup: cloning cannbot-skills repository...",
|
|
980
|
-
repo_clone_failed: "Failed to clone repository: {error}\nClone manually: git clone {url} {dir}",
|
|
981
|
-
external_repo_update_failed: "External repo update failed, using existing version: {dir}",
|
|
982
|
-
config_corrupted: "Config file corrupted, using defaults",
|
|
983
|
-
record_corrupted: "Install record corrupted: {file}",
|
|
984
|
-
skill_record_corrupted: "Skill install record corrupted",
|
|
985
|
-
record_write_failed: "Install record write failed, uninstall may not work properly",
|
|
986
|
-
install_config_failed: "Failed to install config file: {error}",
|
|
987
|
-
install_clone_failed: "git clone failed: {url}, clone manually: git clone {url} {dir}",
|
|
988
|
-
install_link_config_failed: "Failed to link {name} to config directory",
|
|
989
|
-
install_link_project_failed: "Failed to link {name} to project directory",
|
|
990
|
-
install_link_workflows_failed: "Failed to link workflows to config directory",
|
|
991
|
-
install_skill_source_not_found: "Skill source not found: {dir}",
|
|
992
|
-
install_skill_not_found: "Skill not found: {name} in {dir}",
|
|
993
|
-
install_skill_failed: "Failed to install skill: {name}",
|
|
994
|
-
install_agent_not_found: "Agent not found: {name}",
|
|
995
|
-
install_agent_failed: "Failed to install agent: {name}",
|
|
996
|
-
install_no_skill_selected: "No Skill selected",
|
|
997
|
-
install_to: "Install to",
|
|
998
|
-
start_to_use: "Start {tool} to use",
|
|
999
|
-
wizard_step_1_title: "[1/4] Select AI coding tool",
|
|
1000
|
-
wizard_step_2_title: "[2/4] Select installation location",
|
|
1001
|
-
wizard_step_3_title: "[3/4] Select plugins to install",
|
|
1002
|
-
wizard_step_4_title: "[4/4] Confirm installation",
|
|
1003
|
-
wizard_step_3_skill_title: "[3/4] Select Skill category",
|
|
1004
|
-
wizard_step_4_skill_title: "[4/4] Select Skills to install \u2014 {category}",
|
|
1005
|
-
install_level_project: "Install to current directory (recommended, current project only)",
|
|
1006
|
-
install_level_global: "Install globally (all projects)",
|
|
1007
|
-
wizard_select_mode_title: "Select installation type",
|
|
1008
|
-
skill_count_format: "{count} Skills",
|
|
1009
|
-
result_success_format: "{count} succeeded",
|
|
1010
|
-
result_failed_format: "{count} failed",
|
|
1011
|
-
uninstall_remove_label: "Removed",
|
|
1012
|
-
uninstall_clean_empty_dir: "Cleaned empty directory",
|
|
1013
|
-
uninstall_skill_not_installed: "Not installed",
|
|
1014
|
-
available_plugins: "Available plugins",
|
|
1015
|
-
available_skills: "Available Skills",
|
|
1016
|
-
skill_total_count: "Total {count} Skills",
|
|
1017
|
-
wizard_confirm_install_format: "About to install {count} plugins to {tool} ({level} level):",
|
|
1018
|
-
wizard_install_path: "Install path",
|
|
1019
|
-
update_install_hint: "Use {cmd} to install plugins",
|
|
1020
|
-
hint_select_move: "Navigate",
|
|
1021
|
-
hint_select_space: "Space",
|
|
1022
|
-
hint_select_check: "Toggle",
|
|
1023
|
-
hint_select_confirm: "Confirm",
|
|
1024
|
-
hint_checkbox_suffix: "Press enter without selection to go back",
|
|
1025
|
-
doctor_not_installed: "Not installed",
|
|
1026
|
-
doctor_links_valid: "{count} symlinks all valid",
|
|
1027
|
-
doctor_broken_links: "{count} broken links",
|
|
1028
|
-
doctor_fixed: "Cleaned {count} broken links",
|
|
1029
|
-
doctor_not_exist: "Does not exist",
|
|
1030
|
-
doctor_created: "Created {path}",
|
|
1031
|
-
doctor_config_exists: "Exists",
|
|
1032
|
-
doctor_config_not_exist: "Does not exist",
|
|
1033
|
-
doctor_result_with_fix: "{warnings} warnings, {fixes} fixed",
|
|
1034
|
-
doctor_result_without_fix: "{warnings} warnings",
|
|
1035
|
-
count_suffix: "",
|
|
1036
|
-
try_prompt: "help me develop an Abs operator"
|
|
1037
|
-
};
|
|
1038
|
-
|
|
1039
|
-
// src/utils/i18n.ts
|
|
1040
|
-
var __filename = fileURLToPath(import.meta.url);
|
|
1041
|
-
var __dirname = dirname(__filename);
|
|
1042
|
-
var EMBEDDED_LOCALES = {
|
|
1043
|
-
zh_CN: zh_CN_default,
|
|
1044
|
-
en_US: en_US_default
|
|
1045
|
-
};
|
|
1046
1103
|
function loadLocale(locale) {
|
|
1047
1104
|
const embedded = EMBEDDED_LOCALES[locale];
|
|
1048
1105
|
if (embedded) return embedded;
|
|
@@ -1064,8 +1121,6 @@ function loadLocale(locale) {
|
|
|
1064
1121
|
}
|
|
1065
1122
|
return EMBEDDED_LOCALES.zh_CN || {};
|
|
1066
1123
|
}
|
|
1067
|
-
var currentLang = "zh_CN";
|
|
1068
|
-
var messages = loadLocale("zh_CN");
|
|
1069
1124
|
function setLanguage(lang) {
|
|
1070
1125
|
currentLang = lang;
|
|
1071
1126
|
messages = loadLocale(lang);
|
|
@@ -1073,10 +1128,27 @@ function setLanguage(lang) {
|
|
|
1073
1128
|
function t(key) {
|
|
1074
1129
|
return messages[key] !== void 0 ? messages[key] : key;
|
|
1075
1130
|
}
|
|
1131
|
+
var __filename, __dirname, EMBEDDED_LOCALES, currentLang, messages;
|
|
1132
|
+
var init_i18n = __esm({
|
|
1133
|
+
"src/utils/i18n.ts"() {
|
|
1134
|
+
"use strict";
|
|
1135
|
+
init_zh_CN();
|
|
1136
|
+
init_en_US();
|
|
1137
|
+
__filename = fileURLToPath(import.meta.url);
|
|
1138
|
+
__dirname = dirname(__filename);
|
|
1139
|
+
EMBEDDED_LOCALES = {
|
|
1140
|
+
zh_CN: zh_CN_default,
|
|
1141
|
+
en_US: en_US_default
|
|
1142
|
+
};
|
|
1143
|
+
currentLang = "zh_CN";
|
|
1144
|
+
messages = loadLocale("zh_CN");
|
|
1145
|
+
}
|
|
1146
|
+
});
|
|
1076
1147
|
|
|
1077
1148
|
// src/utils/paths.ts
|
|
1078
|
-
|
|
1079
|
-
|
|
1149
|
+
import { homedir } from "os";
|
|
1150
|
+
import { join as join3 } from "path";
|
|
1151
|
+
import { existsSync as existsSync3 } from "fs";
|
|
1080
1152
|
function validateTool(tool) {
|
|
1081
1153
|
if (!VALID_TOOLS.includes(tool)) {
|
|
1082
1154
|
throw new Error(
|
|
@@ -1181,8 +1253,21 @@ function getCannbotConfigDir() {
|
|
|
1181
1253
|
function getCannbotRepoPath() {
|
|
1182
1254
|
return join3(getCannbotConfigDir(), "repo");
|
|
1183
1255
|
}
|
|
1256
|
+
var VALID_TOOLS, VALID_LEVELS;
|
|
1257
|
+
var init_paths = __esm({
|
|
1258
|
+
"src/utils/paths.ts"() {
|
|
1259
|
+
"use strict";
|
|
1260
|
+
init_i18n();
|
|
1261
|
+
VALID_TOOLS = ["opencode", "claude", "trae", "cursor", "copilot", "codearts"];
|
|
1262
|
+
VALID_LEVELS = ["project", "global"];
|
|
1263
|
+
}
|
|
1264
|
+
});
|
|
1184
1265
|
|
|
1185
1266
|
// src/core/detector.ts
|
|
1267
|
+
import { execa } from "execa";
|
|
1268
|
+
import { existsSync as existsSync4 } from "fs";
|
|
1269
|
+
import { homedir as homedir2 } from "os";
|
|
1270
|
+
import { join as join4 } from "path";
|
|
1186
1271
|
async function getCommandVersion(cmd, args = ["--version"]) {
|
|
1187
1272
|
try {
|
|
1188
1273
|
const result = await execa(cmd, args, { timeout: 5e3 });
|
|
@@ -1295,6 +1380,12 @@ function getToolDisplayName(tool) {
|
|
|
1295
1380
|
function getAllTools() {
|
|
1296
1381
|
return VALID_TOOLS;
|
|
1297
1382
|
}
|
|
1383
|
+
var init_detector = __esm({
|
|
1384
|
+
"src/core/detector.ts"() {
|
|
1385
|
+
"use strict";
|
|
1386
|
+
init_paths();
|
|
1387
|
+
}
|
|
1388
|
+
});
|
|
1298
1389
|
|
|
1299
1390
|
// src/core/manifest.ts
|
|
1300
1391
|
import { existsSync as existsSync5, readFileSync as readFileSync2 } from "fs";
|
|
@@ -1389,16 +1480,16 @@ function verifyPluginFilesExist(configRoot, manifest, tool, level) {
|
|
|
1389
1480
|
if (!existsSync5(configFilePath)) return false;
|
|
1390
1481
|
return true;
|
|
1391
1482
|
}
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1483
|
+
var init_manifest = __esm({
|
|
1484
|
+
"src/core/manifest.ts"() {
|
|
1485
|
+
"use strict";
|
|
1486
|
+
init_paths();
|
|
1487
|
+
init_registry();
|
|
1488
|
+
}
|
|
1489
|
+
});
|
|
1396
1490
|
|
|
1397
1491
|
// src/ui/theme.ts
|
|
1398
1492
|
import chalk from "chalk";
|
|
1399
|
-
var selectTheme = {
|
|
1400
|
-
helpMode: "never"
|
|
1401
|
-
};
|
|
1402
1493
|
function isCJK(code) {
|
|
1403
1494
|
return code >= 11904 && code <= 40959 || code >= 63744 && code <= 64255 || code >= 65072 && code <= 65103 || code >= 65280 && code <= 65519 || code >= 13312 && code <= 19903 || code >= 131072 && code <= 173791 || code >= 173824 && code <= 177983 || code >= 177984 && code <= 178207 || code >= 178208 && code <= 183983;
|
|
1404
1495
|
}
|
|
@@ -1457,27 +1548,30 @@ function wrapDescription(text) {
|
|
|
1457
1548
|
if (line) lines.push(line.trimEnd());
|
|
1458
1549
|
return lines.map((l, i2) => chalk.cyan(i2 === 0 ? prefix + l : indent + l)).join("\n");
|
|
1459
1550
|
}
|
|
1460
|
-
var checkboxTheme
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1551
|
+
var selectTheme, checkboxTheme;
|
|
1552
|
+
var init_theme = __esm({
|
|
1553
|
+
"src/ui/theme.ts"() {
|
|
1554
|
+
"use strict";
|
|
1555
|
+
selectTheme = {
|
|
1556
|
+
helpMode: "never"
|
|
1557
|
+
};
|
|
1558
|
+
checkboxTheme = {
|
|
1559
|
+
icon: {
|
|
1560
|
+
checked: "\x1B[32m\u2611\x1B[22m",
|
|
1561
|
+
unchecked: "\u2610",
|
|
1562
|
+
cursor: "\u276F"
|
|
1563
|
+
},
|
|
1564
|
+
helpMode: "never",
|
|
1565
|
+
style: {
|
|
1566
|
+
description: (text) => wrapDescription(text)
|
|
1567
|
+
}
|
|
1568
|
+
};
|
|
1469
1569
|
}
|
|
1470
|
-
};
|
|
1570
|
+
});
|
|
1471
1571
|
|
|
1472
1572
|
// src/utils/logger.ts
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
error: (msg) => console.log(chalk2.red("\u2717") + " " + msg),
|
|
1476
|
-
warn: (msg) => console.log(chalk2.yellow("\u26A0") + " " + msg),
|
|
1477
|
-
info: (msg) => console.log(chalk2.cyan("\u2192") + " " + msg),
|
|
1478
|
-
step: (msg) => console.log(chalk2.dim(msg)),
|
|
1479
|
-
blank: () => console.log()
|
|
1480
|
-
};
|
|
1573
|
+
import chalk2 from "chalk";
|
|
1574
|
+
import ora from "ora";
|
|
1481
1575
|
function createSpinner(text) {
|
|
1482
1576
|
return ora({ text, color: "cyan" });
|
|
1483
1577
|
}
|
|
@@ -1516,11 +1610,22 @@ function showOperationHints(isCheckbox = false) {
|
|
|
1516
1610
|
`);
|
|
1517
1611
|
}
|
|
1518
1612
|
}
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1613
|
+
var logger;
|
|
1614
|
+
var init_logger = __esm({
|
|
1615
|
+
"src/utils/logger.ts"() {
|
|
1616
|
+
"use strict";
|
|
1617
|
+
init_i18n();
|
|
1618
|
+
init_theme();
|
|
1619
|
+
logger = {
|
|
1620
|
+
success: (msg) => console.log(chalk2.green("\u2713") + " " + msg),
|
|
1621
|
+
error: (msg) => console.log(chalk2.red("\u2717") + " " + msg),
|
|
1622
|
+
warn: (msg) => console.log(chalk2.yellow("\u26A0") + " " + msg),
|
|
1623
|
+
info: (msg) => console.log(chalk2.cyan("\u2192") + " " + msg),
|
|
1624
|
+
step: (msg) => console.log(chalk2.dim(msg)),
|
|
1625
|
+
blank: () => console.log()
|
|
1626
|
+
};
|
|
1627
|
+
}
|
|
1628
|
+
});
|
|
1524
1629
|
|
|
1525
1630
|
// src/utils/fs.ts
|
|
1526
1631
|
import { writeFileSync, renameSync, existsSync as existsSync6, unlinkSync as unlinkSync2 } from "fs";
|
|
@@ -1542,8 +1647,16 @@ function atomicWriteFileSync(filePath, data, encoding = "utf-8") {
|
|
|
1542
1647
|
throw e;
|
|
1543
1648
|
}
|
|
1544
1649
|
}
|
|
1650
|
+
var init_fs = __esm({
|
|
1651
|
+
"src/utils/fs.ts"() {
|
|
1652
|
+
"use strict";
|
|
1653
|
+
}
|
|
1654
|
+
});
|
|
1545
1655
|
|
|
1546
1656
|
// src/utils/config.ts
|
|
1657
|
+
import { existsSync as existsSync7, mkdirSync, readFileSync as readFileSync3 } from "fs";
|
|
1658
|
+
import { join as join6 } from "path";
|
|
1659
|
+
import { parse, stringify } from "yaml";
|
|
1547
1660
|
function getConfigDir() {
|
|
1548
1661
|
return getCannbotConfigDir();
|
|
1549
1662
|
}
|
|
@@ -1605,12 +1718,35 @@ function removeInstalledPlugin(pluginId) {
|
|
|
1605
1718
|
);
|
|
1606
1719
|
writeConfig(config);
|
|
1607
1720
|
}
|
|
1721
|
+
var init_config = __esm({
|
|
1722
|
+
"src/utils/config.ts"() {
|
|
1723
|
+
"use strict";
|
|
1724
|
+
init_fs();
|
|
1725
|
+
init_logger();
|
|
1726
|
+
init_i18n();
|
|
1727
|
+
init_paths();
|
|
1728
|
+
}
|
|
1729
|
+
});
|
|
1608
1730
|
|
|
1609
1731
|
// src/utils/constants.ts
|
|
1610
|
-
var BACK
|
|
1611
|
-
var
|
|
1732
|
+
var BACK, CANCEL;
|
|
1733
|
+
var init_constants = __esm({
|
|
1734
|
+
"src/utils/constants.ts"() {
|
|
1735
|
+
"use strict";
|
|
1736
|
+
BACK = "__back__";
|
|
1737
|
+
CANCEL = "__cancel__";
|
|
1738
|
+
}
|
|
1739
|
+
});
|
|
1612
1740
|
|
|
1613
1741
|
// src/ui/wizard.ts
|
|
1742
|
+
var wizard_exports = {};
|
|
1743
|
+
__export(wizard_exports, {
|
|
1744
|
+
runWizard: () => runWizard,
|
|
1745
|
+
selectToolWithDetection: () => selectToolWithDetection,
|
|
1746
|
+
stepLevel: () => stepLevel
|
|
1747
|
+
});
|
|
1748
|
+
import { select, Separator } from "@inquirer/prompts";
|
|
1749
|
+
import chalk3 from "chalk";
|
|
1614
1750
|
async function selectToolWithDetection() {
|
|
1615
1751
|
const config = readConfig();
|
|
1616
1752
|
logger.blank();
|
|
@@ -1842,8 +1978,33 @@ async function stepConfirm(tool, level, plugins) {
|
|
|
1842
1978
|
if (result === CANCEL) return CANCEL;
|
|
1843
1979
|
return true;
|
|
1844
1980
|
}
|
|
1981
|
+
var init_wizard = __esm({
|
|
1982
|
+
"src/ui/wizard.ts"() {
|
|
1983
|
+
"use strict";
|
|
1984
|
+
init_registry();
|
|
1985
|
+
init_detector();
|
|
1986
|
+
init_manifest();
|
|
1987
|
+
init_paths();
|
|
1988
|
+
init_i18n();
|
|
1989
|
+
init_logger();
|
|
1990
|
+
init_config();
|
|
1991
|
+
init_theme();
|
|
1992
|
+
init_constants();
|
|
1993
|
+
}
|
|
1994
|
+
});
|
|
1995
|
+
|
|
1996
|
+
// src/cli.ts
|
|
1997
|
+
import { Command } from "commander";
|
|
1998
|
+
|
|
1999
|
+
// src/commands/init.ts
|
|
2000
|
+
init_wizard();
|
|
2001
|
+
import { select as select4, Separator as Separator3 } from "@inquirer/prompts";
|
|
2002
|
+
import chalk7 from "chalk";
|
|
1845
2003
|
|
|
1846
2004
|
// src/core/repository.ts
|
|
2005
|
+
init_paths();
|
|
2006
|
+
init_logger();
|
|
2007
|
+
init_i18n();
|
|
1847
2008
|
import { existsSync as existsSync10, mkdirSync as mkdirSync3, readFileSync as readFileSync6, rmSync as rmSync2 } from "fs";
|
|
1848
2009
|
import { join as join9, dirname as dirname4 } from "path";
|
|
1849
2010
|
import { fileURLToPath as fileURLToPath3 } from "url";
|
|
@@ -1851,6 +2012,9 @@ import { execa as execa2 } from "execa";
|
|
|
1851
2012
|
import { parse as parseYaml2 } from "yaml";
|
|
1852
2013
|
|
|
1853
2014
|
// src/core/scanner.ts
|
|
2015
|
+
init_paths();
|
|
2016
|
+
init_fs();
|
|
2017
|
+
init_fs_helpers();
|
|
1854
2018
|
import { existsSync as existsSync8, readdirSync as readdirSync2, readFileSync as readFileSync4, mkdirSync as mkdirSync2 } from "fs";
|
|
1855
2019
|
import { join as join7, dirname as dirname3 } from "path";
|
|
1856
2020
|
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
@@ -1883,13 +2047,13 @@ function loadScanConfig() {
|
|
|
1883
2047
|
const config = parseYaml(readFileSync4(configPath, "utf-8"));
|
|
1884
2048
|
const ttlHours = config.scanCacheTtlHours || 24;
|
|
1885
2049
|
return {
|
|
1886
|
-
skillDirs: config.scanDirs || ["ops", "model", "graph", "infra", "
|
|
2050
|
+
skillDirs: config.scanDirs || ["ops", "model", "graph", "infra", "runtime"],
|
|
1887
2051
|
pluginDirs: config.pluginDirs || ["plugins-official", "plugins-community"],
|
|
1888
2052
|
cacheTtlMs: ttlHours * 60 * 60 * 1e3
|
|
1889
2053
|
};
|
|
1890
2054
|
} catch {
|
|
1891
2055
|
return {
|
|
1892
|
-
skillDirs: ["ops", "model", "graph", "infra", "
|
|
2056
|
+
skillDirs: ["ops", "model", "graph", "infra", "runtime"],
|
|
1893
2057
|
pluginDirs: ["plugins-official", "plugins-community"],
|
|
1894
2058
|
cacheTtlMs: 24 * 60 * 60 * 1e3
|
|
1895
2059
|
};
|
|
@@ -2057,6 +2221,7 @@ function safeReaddir(dir) {
|
|
|
2057
2221
|
}
|
|
2058
2222
|
|
|
2059
2223
|
// src/core/skill-registry.ts
|
|
2224
|
+
init_i18n();
|
|
2060
2225
|
var CATEGORY_DEFS = [
|
|
2061
2226
|
{ id: "knowledge", name: "\u77E5\u8BC6\u4E0E\u53C2\u8003", nameEn: "Knowledge & Reference" },
|
|
2062
2227
|
{ id: "env-tools", name: "\u73AF\u5883\u4E0E\u5DE5\u5177", nameEn: "Environment & Tools" },
|
|
@@ -2292,7 +2457,11 @@ function getAllCategories() {
|
|
|
2292
2457
|
})).filter((cat) => cat.skills.length > 0);
|
|
2293
2458
|
}
|
|
2294
2459
|
|
|
2460
|
+
// src/core/repository.ts
|
|
2461
|
+
init_registry();
|
|
2462
|
+
|
|
2295
2463
|
// src/core/metadata-sync.ts
|
|
2464
|
+
init_registry();
|
|
2296
2465
|
import { existsSync as existsSync9, readFileSync as readFileSync5, statSync as statSync2 } from "fs";
|
|
2297
2466
|
import { join as join8 } from "path";
|
|
2298
2467
|
function readPluginJson(pluginDir) {
|
|
@@ -2517,11 +2686,19 @@ function createRepositoryManager(customPath) {
|
|
|
2517
2686
|
}
|
|
2518
2687
|
|
|
2519
2688
|
// src/core/installer.ts
|
|
2689
|
+
init_registry();
|
|
2690
|
+
init_manifest();
|
|
2691
|
+
init_paths();
|
|
2520
2692
|
import { existsSync as existsSync14 } from "fs";
|
|
2521
2693
|
import { join as join13, basename as basename2 } from "path";
|
|
2522
2694
|
import { execa as execa4, execaSync } from "execa";
|
|
2523
2695
|
|
|
2524
2696
|
// src/core/record.ts
|
|
2697
|
+
init_paths();
|
|
2698
|
+
init_fs();
|
|
2699
|
+
init_fs_helpers();
|
|
2700
|
+
init_logger();
|
|
2701
|
+
init_i18n();
|
|
2525
2702
|
import { existsSync as existsSync11, mkdirSync as mkdirSync4, readFileSync as readFileSync7, unlinkSync as unlinkSync3 } from "fs";
|
|
2526
2703
|
import { join as join10 } from "path";
|
|
2527
2704
|
function getInstallsDir() {
|
|
@@ -2657,12 +2834,21 @@ function addSkillsToRecord(skillIds, tool, level, installPath) {
|
|
|
2657
2834
|
record[tool][level][installPath] = { skills: [], installTime: "" };
|
|
2658
2835
|
}
|
|
2659
2836
|
const entry = record[tool][level][installPath];
|
|
2837
|
+
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
2838
|
+
const newSkills = [];
|
|
2660
2839
|
for (const id of skillIds) {
|
|
2661
2840
|
if (!entry.skills.includes(id)) {
|
|
2662
2841
|
entry.skills.push(id);
|
|
2842
|
+
newSkills.push(id);
|
|
2663
2843
|
}
|
|
2664
2844
|
}
|
|
2665
|
-
entry.installTime =
|
|
2845
|
+
entry.installTime = now;
|
|
2846
|
+
if (!entry.batches) entry.batches = [];
|
|
2847
|
+
entry.batches.push({
|
|
2848
|
+
batchId: `batch-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`,
|
|
2849
|
+
installedAt: now,
|
|
2850
|
+
skills: newSkills.length > 0 ? newSkills : [...skillIds]
|
|
2851
|
+
});
|
|
2666
2852
|
writeSkillRecord(record);
|
|
2667
2853
|
}
|
|
2668
2854
|
function removeSkillsFromRecord(skillIds, tool, level, installPath) {
|
|
@@ -2670,6 +2856,15 @@ function removeSkillsFromRecord(skillIds, tool, level, installPath) {
|
|
|
2670
2856
|
if (!record[tool]?.[level]?.[installPath]) return;
|
|
2671
2857
|
const entry = record[tool][level][installPath];
|
|
2672
2858
|
entry.skills = entry.skills.filter((id) => !skillIds.includes(id));
|
|
2859
|
+
if (entry.batches) {
|
|
2860
|
+
for (const batch of entry.batches) {
|
|
2861
|
+
batch.skills = batch.skills.filter((id) => !skillIds.includes(id));
|
|
2862
|
+
}
|
|
2863
|
+
entry.batches = entry.batches.filter((b) => b.skills.length > 0);
|
|
2864
|
+
if (entry.batches.length === 0) {
|
|
2865
|
+
delete entry.batches;
|
|
2866
|
+
}
|
|
2867
|
+
}
|
|
2673
2868
|
if (entry.skills.length === 0) {
|
|
2674
2869
|
delete record[tool][level][installPath];
|
|
2675
2870
|
if (Object.keys(record[tool][level]).length === 0) {
|
|
@@ -2691,10 +2886,27 @@ function getInstalledSkills(tool, level, installPath) {
|
|
|
2691
2886
|
return existsSync11(skillPath) || isSymlink(skillPath);
|
|
2692
2887
|
});
|
|
2693
2888
|
}
|
|
2889
|
+
function getLastBatchSkills(tool, level, installPath) {
|
|
2890
|
+
const record = readSkillRecord();
|
|
2891
|
+
const entry = record[tool]?.[level]?.[installPath];
|
|
2892
|
+
if (!entry || !entry.batches || entry.batches.length === 0) {
|
|
2893
|
+
return null;
|
|
2894
|
+
}
|
|
2895
|
+
const lastBatch = entry.batches[entry.batches.length - 1];
|
|
2896
|
+
const configRoot = getConfigRoot(tool, level);
|
|
2897
|
+
const skillsDir = join10(configRoot, "skills");
|
|
2898
|
+
return lastBatch.skills.filter((skillId) => {
|
|
2899
|
+
const skillPath = join10(skillsDir, skillId);
|
|
2900
|
+
return existsSync11(skillPath) || isSymlink(skillPath);
|
|
2901
|
+
});
|
|
2902
|
+
}
|
|
2694
2903
|
|
|
2695
2904
|
// src/core/backup.ts
|
|
2905
|
+
init_manifest();
|
|
2696
2906
|
import { existsSync as existsSync12, copyFileSync, readdirSync as readdirSync3, unlinkSync as unlinkSync4 } from "fs";
|
|
2697
2907
|
import { join as join11 } from "path";
|
|
2908
|
+
init_registry();
|
|
2909
|
+
init_paths();
|
|
2698
2910
|
function detectCurrentPlugin(configRoot, tool, installPath) {
|
|
2699
2911
|
const manifests = readAllManifests(configRoot);
|
|
2700
2912
|
if (manifests.length > 0) {
|
|
@@ -2822,6 +3034,7 @@ function readAllRecords() {
|
|
|
2822
3034
|
}
|
|
2823
3035
|
|
|
2824
3036
|
// src/ui/backup-prompts.ts
|
|
3037
|
+
init_i18n();
|
|
2825
3038
|
import { select as select2 } from "@inquirer/prompts";
|
|
2826
3039
|
import chalk4 from "chalk";
|
|
2827
3040
|
async function showOverwriteWarning(currentPluginName, newPluginName) {
|
|
@@ -2860,6 +3073,10 @@ async function showRestorePrompt(backups) {
|
|
|
2860
3073
|
}
|
|
2861
3074
|
|
|
2862
3075
|
// src/core/plugin-installer.ts
|
|
3076
|
+
init_paths();
|
|
3077
|
+
init_fs_helpers();
|
|
3078
|
+
init_logger();
|
|
3079
|
+
init_i18n();
|
|
2863
3080
|
import { existsSync as existsSync13, mkdirSync as mkdirSync5, symlinkSync, realpathSync, readlinkSync, copyFileSync as copyFileSync2, cpSync, writeFileSync as writeFileSync2, rmSync as rmSync3 } from "fs";
|
|
2864
3081
|
import { join as join12, basename } from "path";
|
|
2865
3082
|
import { execa as execa3 } from "execa";
|
|
@@ -3125,6 +3342,8 @@ async function installViaManifest(plugin, repoPath, tool, level, installPath) {
|
|
|
3125
3342
|
}
|
|
3126
3343
|
|
|
3127
3344
|
// src/core/installer.ts
|
|
3345
|
+
init_i18n();
|
|
3346
|
+
init_logger();
|
|
3128
3347
|
function findShell() {
|
|
3129
3348
|
const candidates = ["bash", "sh"];
|
|
3130
3349
|
for (const cmd of candidates) {
|
|
@@ -3336,12 +3555,22 @@ async function installPlugin(opts) {
|
|
|
3336
3555
|
}
|
|
3337
3556
|
}
|
|
3338
3557
|
|
|
3558
|
+
// src/commands/init.ts
|
|
3559
|
+
init_registry();
|
|
3560
|
+
|
|
3339
3561
|
// src/core/skill-installer.ts
|
|
3562
|
+
init_paths();
|
|
3563
|
+
init_fs_helpers();
|
|
3564
|
+
init_constants();
|
|
3565
|
+
init_logger();
|
|
3566
|
+
init_i18n();
|
|
3340
3567
|
import { existsSync as existsSync15, mkdirSync as mkdirSync6, symlinkSync as symlinkSync2, readdirSync as readdirSync4, rmSync as rmSync4, realpathSync as realpathSync2, readlinkSync as readlinkSync2, cpSync as cpSync2 } from "fs";
|
|
3341
3568
|
import { join as join14, dirname as dirname5, isAbsolute } from "path";
|
|
3342
3569
|
import { select as select3, checkbox, Separator as Separator2 } from "@inquirer/prompts";
|
|
3343
3570
|
import chalk5 from "chalk";
|
|
3344
3571
|
import Table from "cli-table3";
|
|
3572
|
+
init_theme();
|
|
3573
|
+
import { confirm } from "@inquirer/prompts";
|
|
3345
3574
|
async function installSkills(skillIds, tool, level, repoPath) {
|
|
3346
3575
|
const configRoot = getConfigRoot(tool, level);
|
|
3347
3576
|
const skillsDir = join14(configRoot, "skills");
|
|
@@ -3448,6 +3677,7 @@ async function uninstallSkills(skillIds, tool, level) {
|
|
|
3448
3677
|
var SELECT_ALL = "__select_all__";
|
|
3449
3678
|
var SELECT_ALL_CATEGORY = "__select_all_category__";
|
|
3450
3679
|
var CONTINUE_SELECT = "__continue_select__";
|
|
3680
|
+
var UNSELECT_ALL = "__unselect_all__";
|
|
3451
3681
|
async function interactiveSkillSelect(tool, level) {
|
|
3452
3682
|
const categories = getAllCategories();
|
|
3453
3683
|
const allSkillIds = getAllSkills().map((s) => s.id);
|
|
@@ -3589,6 +3819,180 @@ async function interactiveSkillSelect(tool, level) {
|
|
|
3589
3819
|
}
|
|
3590
3820
|
}
|
|
3591
3821
|
}
|
|
3822
|
+
async function interactiveSkillUnselect(tool, level) {
|
|
3823
|
+
const installPath = level === "project" ? process.cwd() : getConfigRoot(tool, level);
|
|
3824
|
+
const installedSkills = getInstalledSkills(tool, level, installPath);
|
|
3825
|
+
if (installedSkills.length === 0) {
|
|
3826
|
+
logger.warn(t("uninstall_no_installed_skills"));
|
|
3827
|
+
return "back";
|
|
3828
|
+
}
|
|
3829
|
+
const allCategories = getAllCategories();
|
|
3830
|
+
const installedSet = new Set(installedSkills);
|
|
3831
|
+
const categoriesWithInstalled = allCategories.map((cat) => ({
|
|
3832
|
+
...cat,
|
|
3833
|
+
skills: cat.skills.filter((s) => installedSet.has(s.id))
|
|
3834
|
+
})).filter((cat) => cat.skills.length > 0);
|
|
3835
|
+
const uncategorized = installedSkills.filter(
|
|
3836
|
+
(id) => !allCategories.some((cat) => cat.skills.some((s) => s.id === id))
|
|
3837
|
+
);
|
|
3838
|
+
if (uncategorized.length > 0) {
|
|
3839
|
+
categoriesWithInstalled.push({
|
|
3840
|
+
id: "__uncategorized__",
|
|
3841
|
+
name: t("uninstall_uncategorized"),
|
|
3842
|
+
skills: uncategorized.map((id) => ({ id, description: "", source: "", filePath: "" }))
|
|
3843
|
+
});
|
|
3844
|
+
}
|
|
3845
|
+
let keptSet = new Set(installedSkills);
|
|
3846
|
+
let step = 0;
|
|
3847
|
+
let selectedCategoryId = "";
|
|
3848
|
+
while (true) {
|
|
3849
|
+
switch (step) {
|
|
3850
|
+
case 0: {
|
|
3851
|
+
const toUninstallCount = installedSkills.length - keptSet.size;
|
|
3852
|
+
const titleSuffix = toUninstallCount > 0 ? `${t("wizard_step_3_skill_title")}\uFF08${t("uninstall_marked_count").replace("{count}", String(toUninstallCount))}\uFF09` : t("wizard_step_3_skill_title");
|
|
3853
|
+
printBoxTitle(titleSuffix);
|
|
3854
|
+
const categoryChoices = [
|
|
3855
|
+
{
|
|
3856
|
+
name: `>> ${t("uninstall_uncheck_all")}`,
|
|
3857
|
+
value: UNSELECT_ALL
|
|
3858
|
+
},
|
|
3859
|
+
new Separator2("\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500"),
|
|
3860
|
+
...categoriesWithInstalled.map((cat) => {
|
|
3861
|
+
const catKeptCount = cat.skills.filter((s) => keptSet.has(s.id)).length;
|
|
3862
|
+
const catUninstallCount = cat.skills.length - catKeptCount;
|
|
3863
|
+
const suffix = catUninstallCount > 0 ? chalk5.yellow(` (${catUninstallCount} to uninstall)`) : "";
|
|
3864
|
+
return {
|
|
3865
|
+
name: `> ${cat.name} (${cat.skills.length} skills)${suffix}`,
|
|
3866
|
+
value: cat.id
|
|
3867
|
+
};
|
|
3868
|
+
}),
|
|
3869
|
+
new Separator2("\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500"),
|
|
3870
|
+
...toUninstallCount > 0 ? [{ name: `>> ${t("uninstall_confirm_count").replace("{count}", String(toUninstallCount))}`, value: "uninstall" }] : [],
|
|
3871
|
+
{ name: "<- " + t("wizard_back"), value: BACK },
|
|
3872
|
+
{ name: "x " + t("wizard_cancel"), value: CANCEL }
|
|
3873
|
+
];
|
|
3874
|
+
showOperationHints();
|
|
3875
|
+
selectedCategoryId = await select3({
|
|
3876
|
+
message: t("uninstall_select_category"),
|
|
3877
|
+
choices: categoryChoices,
|
|
3878
|
+
loop: false,
|
|
3879
|
+
theme: selectTheme,
|
|
3880
|
+
pageSize: 15
|
|
3881
|
+
});
|
|
3882
|
+
if (selectedCategoryId === BACK) return "back";
|
|
3883
|
+
if (selectedCategoryId === CANCEL) return "cancel";
|
|
3884
|
+
if (selectedCategoryId === UNSELECT_ALL) {
|
|
3885
|
+
keptSet = /* @__PURE__ */ new Set();
|
|
3886
|
+
step = 0;
|
|
3887
|
+
break;
|
|
3888
|
+
}
|
|
3889
|
+
if (selectedCategoryId === "uninstall") {
|
|
3890
|
+
const toUninstall = installedSkills.filter((id) => !keptSet.has(id));
|
|
3891
|
+
if (toUninstall.length === 0) {
|
|
3892
|
+
logger.info(t("uninstall_nothing_to_uninstall"));
|
|
3893
|
+
return "back";
|
|
3894
|
+
}
|
|
3895
|
+
const confirmed = await confirm({
|
|
3896
|
+
message: t("uninstall_confirm_prompt").replace("{count}", chalk5.bold(String(toUninstall.length))),
|
|
3897
|
+
default: false
|
|
3898
|
+
});
|
|
3899
|
+
if (!confirmed) return "cancel";
|
|
3900
|
+
return { toUninstall, toKeep: [...keptSet] };
|
|
3901
|
+
}
|
|
3902
|
+
step = 1;
|
|
3903
|
+
break;
|
|
3904
|
+
}
|
|
3905
|
+
case 1: {
|
|
3906
|
+
const category = categoriesWithInstalled.find((c) => c.id === selectedCategoryId);
|
|
3907
|
+
if (!category) return "back";
|
|
3908
|
+
printBoxTitle(t("wizard_step_4_skill_title").replace("{category}", category.name));
|
|
3909
|
+
const categorySkillIds = new Set(category.skills.map((s) => s.id));
|
|
3910
|
+
const keptInCategory = new Set([...keptSet].filter((id) => categorySkillIds.has(id)));
|
|
3911
|
+
const skillChoices = [
|
|
3912
|
+
{
|
|
3913
|
+
name: `>> ${t("uninstall_uncheck_all_category")}`,
|
|
3914
|
+
value: SELECT_ALL_CATEGORY,
|
|
3915
|
+
checked: keptInCategory.size === 0,
|
|
3916
|
+
description: t("uninstall_uncheck_all_category")
|
|
3917
|
+
},
|
|
3918
|
+
new Separator2("\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500"),
|
|
3919
|
+
...category.skills.map((skill) => {
|
|
3920
|
+
const isKept = keptInCategory.has(skill.id);
|
|
3921
|
+
return {
|
|
3922
|
+
name: `${chalk5.cyan(skill.id)}`,
|
|
3923
|
+
value: skill.id,
|
|
3924
|
+
checked: isKept,
|
|
3925
|
+
description: skill.description || ""
|
|
3926
|
+
};
|
|
3927
|
+
})
|
|
3928
|
+
];
|
|
3929
|
+
logger.info(chalk5.dim(` ${t("uninstall_checkbox_hint")}`));
|
|
3930
|
+
logger.blank();
|
|
3931
|
+
showOperationHints(true);
|
|
3932
|
+
const selectedSkills = await checkbox({
|
|
3933
|
+
message: t("uninstall_select_items"),
|
|
3934
|
+
choices: skillChoices,
|
|
3935
|
+
loop: false,
|
|
3936
|
+
instructions: false,
|
|
3937
|
+
theme: checkboxTheme,
|
|
3938
|
+
pageSize: 15
|
|
3939
|
+
});
|
|
3940
|
+
let keptInCat;
|
|
3941
|
+
if (selectedSkills.includes(SELECT_ALL_CATEGORY)) {
|
|
3942
|
+
keptInCat = [];
|
|
3943
|
+
} else {
|
|
3944
|
+
keptInCat = selectedSkills.filter((id) => id !== SELECT_ALL_CATEGORY);
|
|
3945
|
+
}
|
|
3946
|
+
for (const id of categorySkillIds) {
|
|
3947
|
+
if (keptInCat.includes(id)) {
|
|
3948
|
+
keptSet.add(id);
|
|
3949
|
+
} else {
|
|
3950
|
+
keptSet.delete(id);
|
|
3951
|
+
}
|
|
3952
|
+
}
|
|
3953
|
+
const toUninstallCount = installedSkills.length - keptSet.size;
|
|
3954
|
+
const action = await select3({
|
|
3955
|
+
message: toUninstallCount > 0 ? t("uninstall_continue_or_confirm").replace("{count}", String(toUninstallCount)) : t("wizard_no_selection"),
|
|
3956
|
+
choices: toUninstallCount > 0 ? [
|
|
3957
|
+
{ name: ">> " + t("uninstall_confirm_count").replace("{count}", String(toUninstallCount)), value: "uninstall" },
|
|
3958
|
+
{ name: "> " + t("skill_continue_select"), value: CONTINUE_SELECT },
|
|
3959
|
+
new Separator2("\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500"),
|
|
3960
|
+
{ name: "x " + t("wizard_cancel"), value: "cancel" }
|
|
3961
|
+
] : [
|
|
3962
|
+
new Separator2("\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500"),
|
|
3963
|
+
{ name: "> " + t("skill_continue_select"), value: CONTINUE_SELECT },
|
|
3964
|
+
{ name: "<- " + t("wizard_back_to_reselect"), value: "back" },
|
|
3965
|
+
{ name: "x " + t("wizard_cancel"), value: "cancel" }
|
|
3966
|
+
],
|
|
3967
|
+
loop: false,
|
|
3968
|
+
theme: selectTheme
|
|
3969
|
+
});
|
|
3970
|
+
if (action === "uninstall") {
|
|
3971
|
+
const toUninstall = installedSkills.filter((id) => !keptSet.has(id));
|
|
3972
|
+
if (toUninstall.length === 0) {
|
|
3973
|
+
logger.info(t("uninstall_nothing_to_uninstall"));
|
|
3974
|
+
return "back";
|
|
3975
|
+
}
|
|
3976
|
+
const confirmed = await confirm({
|
|
3977
|
+
message: t("uninstall_confirm_prompt").replace("{count}", chalk5.bold(String(toUninstall.length))),
|
|
3978
|
+
default: false
|
|
3979
|
+
});
|
|
3980
|
+
if (!confirmed) return "cancel";
|
|
3981
|
+
return { toUninstall, toKeep: [...keptSet] };
|
|
3982
|
+
}
|
|
3983
|
+
if (action === CONTINUE_SELECT) {
|
|
3984
|
+
step = 0;
|
|
3985
|
+
break;
|
|
3986
|
+
}
|
|
3987
|
+
if (action === "back") {
|
|
3988
|
+
step = 0;
|
|
3989
|
+
break;
|
|
3990
|
+
}
|
|
3991
|
+
return "cancel";
|
|
3992
|
+
}
|
|
3993
|
+
}
|
|
3994
|
+
}
|
|
3995
|
+
}
|
|
3592
3996
|
function listAllSkills() {
|
|
3593
3997
|
const categories = getAllCategories();
|
|
3594
3998
|
console.log();
|
|
@@ -3625,6 +4029,9 @@ function resolveSkillSourcePath(skill, repoPath) {
|
|
|
3625
4029
|
}
|
|
3626
4030
|
|
|
3627
4031
|
// src/ui/display.ts
|
|
4032
|
+
init_i18n();
|
|
4033
|
+
init_detector();
|
|
4034
|
+
init_registry();
|
|
3628
4035
|
import chalk6 from "chalk";
|
|
3629
4036
|
import Table2 from "cli-table3";
|
|
3630
4037
|
function printPluginList(plugins, installed) {
|
|
@@ -3713,6 +4120,12 @@ function printEnhancedSummary(results, tool, configRoot) {
|
|
|
3713
4120
|
}
|
|
3714
4121
|
|
|
3715
4122
|
// src/commands/init.ts
|
|
4123
|
+
init_logger();
|
|
4124
|
+
init_i18n();
|
|
4125
|
+
init_config();
|
|
4126
|
+
init_paths();
|
|
4127
|
+
init_theme();
|
|
4128
|
+
init_constants();
|
|
3716
4129
|
import { existsSync as existsSync16, readFileSync as readFileSync8 } from "fs";
|
|
3717
4130
|
import { join as join15 } from "path";
|
|
3718
4131
|
async function initCommand() {
|
|
@@ -3942,6 +4355,8 @@ async function skillInstallFlow() {
|
|
|
3942
4355
|
}
|
|
3943
4356
|
|
|
3944
4357
|
// src/commands/list.ts
|
|
4358
|
+
init_registry();
|
|
4359
|
+
init_manifest();
|
|
3945
4360
|
async function listCommand() {
|
|
3946
4361
|
try {
|
|
3947
4362
|
const repoManager = createRepositoryManager();
|
|
@@ -3955,6 +4370,11 @@ async function listCommand() {
|
|
|
3955
4370
|
}
|
|
3956
4371
|
|
|
3957
4372
|
// src/commands/doctor.ts
|
|
4373
|
+
init_detector();
|
|
4374
|
+
init_registry();
|
|
4375
|
+
init_manifest();
|
|
4376
|
+
init_paths();
|
|
4377
|
+
init_i18n();
|
|
3958
4378
|
import chalk8 from "chalk";
|
|
3959
4379
|
import { existsSync as existsSync17, readdirSync as readdirSync5, lstatSync as lstatSync2, unlinkSync as unlinkSync5, mkdirSync as mkdirSync7 } from "fs";
|
|
3960
4380
|
import { join as join16 } from "path";
|
|
@@ -4125,6 +4545,8 @@ function fixBrokenLinks(dir) {
|
|
|
4125
4545
|
}
|
|
4126
4546
|
|
|
4127
4547
|
// src/commands/status.ts
|
|
4548
|
+
init_manifest();
|
|
4549
|
+
init_i18n();
|
|
4128
4550
|
import chalk9 from "chalk";
|
|
4129
4551
|
async function statusCommand() {
|
|
4130
4552
|
const installed = scanInstalled();
|
|
@@ -4152,8 +4574,15 @@ async function statusCommand() {
|
|
|
4152
4574
|
}
|
|
4153
4575
|
|
|
4154
4576
|
// src/commands/install.ts
|
|
4577
|
+
init_registry();
|
|
4578
|
+
init_wizard();
|
|
4579
|
+
init_manifest();
|
|
4580
|
+
init_logger();
|
|
4581
|
+
init_i18n();
|
|
4582
|
+
init_config();
|
|
4583
|
+
init_paths();
|
|
4155
4584
|
import { join as join17 } from "path";
|
|
4156
|
-
import { confirm } from "@inquirer/prompts";
|
|
4585
|
+
import { confirm as confirm2 } from "@inquirer/prompts";
|
|
4157
4586
|
import chalk10 from "chalk";
|
|
4158
4587
|
async function installCommand(names, options) {
|
|
4159
4588
|
if (options.list) {
|
|
@@ -4367,7 +4796,7 @@ async function installCommand(names, options) {
|
|
|
4367
4796
|
const plugin = findPlugin(pluginId);
|
|
4368
4797
|
const displayName = plugin?.displayName || pluginId;
|
|
4369
4798
|
logger.warn(`${displayName} [${t("install_already_installed")}]`);
|
|
4370
|
-
const shouldReinstall = await
|
|
4799
|
+
const shouldReinstall = await confirm2({
|
|
4371
4800
|
message: `${t("install_reinstall_confirm")}?`,
|
|
4372
4801
|
default: false
|
|
4373
4802
|
});
|
|
@@ -4482,12 +4911,34 @@ async function installPlugins(pluginIds, tool, level, repoPath, installPath, yes
|
|
|
4482
4911
|
}
|
|
4483
4912
|
|
|
4484
4913
|
// src/commands/uninstall.ts
|
|
4914
|
+
init_registry();
|
|
4485
4915
|
import { existsSync as existsSync18, unlinkSync as unlinkSync6, rmdirSync, readdirSync as readdirSync6 } from "fs";
|
|
4486
4916
|
import { resolve, basename as basename3, sep } from "path";
|
|
4487
4917
|
import chalk11 from "chalk";
|
|
4918
|
+
import { select as select5, checkbox as checkbox2, Separator as Separator4, confirm as confirm3 } from "@inquirer/prompts";
|
|
4919
|
+
init_config();
|
|
4920
|
+
init_fs_helpers();
|
|
4921
|
+
init_logger();
|
|
4922
|
+
init_i18n();
|
|
4923
|
+
init_paths();
|
|
4924
|
+
init_manifest();
|
|
4925
|
+
init_theme();
|
|
4926
|
+
init_wizard();
|
|
4488
4927
|
async function uninstallCommand(names, options) {
|
|
4489
4928
|
const tool = options.tool ? validateTool(options.tool) : "opencode";
|
|
4490
4929
|
const level = options.level ? validateLevel(options.level) : "project";
|
|
4930
|
+
if (options.all) {
|
|
4931
|
+
await uninstallAll(tool, level, options.yes || false);
|
|
4932
|
+
return;
|
|
4933
|
+
}
|
|
4934
|
+
if (options.recent) {
|
|
4935
|
+
await uninstallRecent(tool, level, options.yes || false);
|
|
4936
|
+
return;
|
|
4937
|
+
}
|
|
4938
|
+
if (names.length === 0) {
|
|
4939
|
+
await uninstallInteractive(tool, level);
|
|
4940
|
+
return;
|
|
4941
|
+
}
|
|
4491
4942
|
const plugins = [];
|
|
4492
4943
|
const skills = [];
|
|
4493
4944
|
for (const name of names) {
|
|
@@ -4503,99 +4954,288 @@ async function uninstallCommand(names, options) {
|
|
|
4503
4954
|
}
|
|
4504
4955
|
logger.error(`${t("uninstall_not_found")}: ${name}`);
|
|
4505
4956
|
}
|
|
4506
|
-
|
|
4507
|
-
|
|
4508
|
-
|
|
4509
|
-
|
|
4510
|
-
|
|
4511
|
-
|
|
4512
|
-
|
|
4513
|
-
|
|
4957
|
+
await uninstallPlugins(plugins, options.yes || false);
|
|
4958
|
+
await uninstallSkillsByName(skills, tool, level);
|
|
4959
|
+
}
|
|
4960
|
+
async function uninstallAll(tool, level, yes) {
|
|
4961
|
+
const installPath = level === "project" ? process.cwd() : getConfigRoot(tool, level);
|
|
4962
|
+
const installedSkills = getInstalledSkills(tool, level, installPath);
|
|
4963
|
+
const installedPlugins = scanInstalled().filter((p) => p.tool === tool && p.level === level);
|
|
4964
|
+
const totalItems = installedSkills.length + installedPlugins.length;
|
|
4965
|
+
if (totalItems === 0) {
|
|
4966
|
+
logger.warn(t("uninstall_no_installed"));
|
|
4967
|
+
return;
|
|
4968
|
+
}
|
|
4969
|
+
logger.info(t("uninstall_all_summary").replace("{skills}", String(installedSkills.length)).replace("{plugins}", String(installedPlugins.length)));
|
|
4970
|
+
logger.blank();
|
|
4971
|
+
for (const s of installedSkills) {
|
|
4972
|
+
logger.step(` \u2022 ${chalk11.cyan(s)}`);
|
|
4973
|
+
}
|
|
4974
|
+
for (const p of installedPlugins) {
|
|
4975
|
+
logger.step(` \u2022 ${chalk11.cyan(p.displayName)} ${chalk11.dim(`(${p.id})`)}`);
|
|
4976
|
+
}
|
|
4977
|
+
logger.blank();
|
|
4978
|
+
if (!yes) {
|
|
4979
|
+
const confirmed = await confirm3({
|
|
4980
|
+
message: t("uninstall_confirm_prompt").replace("{count}", chalk11.bold(String(totalItems))),
|
|
4981
|
+
default: false
|
|
4982
|
+
});
|
|
4983
|
+
if (!confirmed) {
|
|
4984
|
+
logger.info(t("init_cancelled"));
|
|
4985
|
+
return;
|
|
4514
4986
|
}
|
|
4515
|
-
|
|
4516
|
-
|
|
4517
|
-
|
|
4518
|
-
|
|
4519
|
-
|
|
4520
|
-
|
|
4521
|
-
};
|
|
4522
|
-
|
|
4523
|
-
|
|
4524
|
-
for (const filePath of record.files) {
|
|
4525
|
-
if (!isSafePath(filePath)) continue;
|
|
4526
|
-
try {
|
|
4527
|
-
if (existsSync18(filePath) || isSymlink(filePath)) {
|
|
4528
|
-
unlinkSync6(filePath);
|
|
4529
|
-
const name = basename3(filePath);
|
|
4530
|
-
logger.step(` ${t("uninstall_remove_label")}: ${name}`);
|
|
4531
|
-
removedFiles++;
|
|
4532
|
-
}
|
|
4533
|
-
} catch {
|
|
4534
|
-
}
|
|
4987
|
+
}
|
|
4988
|
+
if (installedSkills.length > 0) {
|
|
4989
|
+
logger.info(`${t("uninstall_skills_in_progress")} ${t("skill_count_format").replace("{count}", String(installedSkills.length))}...`);
|
|
4990
|
+
await uninstallSkills(installedSkills, tool, level);
|
|
4991
|
+
}
|
|
4992
|
+
if (installedPlugins.length > 0) {
|
|
4993
|
+
logger.info(`${t("uninstall_plugin_batch_progress").replace("{count}", String(installedPlugins.length))}...`);
|
|
4994
|
+
for (const inst of installedPlugins) {
|
|
4995
|
+
await uninstallPluginById(inst.id, true);
|
|
4535
4996
|
}
|
|
4536
|
-
|
|
4537
|
-
|
|
4538
|
-
|
|
4539
|
-
|
|
4540
|
-
|
|
4541
|
-
|
|
4542
|
-
|
|
4543
|
-
|
|
4544
|
-
|
|
4545
|
-
|
|
4546
|
-
|
|
4547
|
-
|
|
4548
|
-
|
|
4549
|
-
|
|
4550
|
-
|
|
4551
|
-
|
|
4997
|
+
}
|
|
4998
|
+
logger.blank();
|
|
4999
|
+
logger.success(t("uninstall_all_done"));
|
|
5000
|
+
logger.blank();
|
|
5001
|
+
}
|
|
5002
|
+
async function uninstallRecent(tool, level, yes) {
|
|
5003
|
+
const installPath = level === "project" ? process.cwd() : getConfigRoot(tool, level);
|
|
5004
|
+
const lastBatch = getLastBatchSkills(tool, level, installPath);
|
|
5005
|
+
if (!lastBatch || lastBatch.length === 0) {
|
|
5006
|
+
logger.warn(t("uninstall_recent_no_history"));
|
|
5007
|
+
return;
|
|
5008
|
+
}
|
|
5009
|
+
logger.info(t("uninstall_recent_progress").replace("{count}", chalk11.bold(String(lastBatch.length))));
|
|
5010
|
+
logger.blank();
|
|
5011
|
+
for (const s of lastBatch) {
|
|
5012
|
+
logger.step(` \u2022 ${chalk11.cyan(s)}`);
|
|
5013
|
+
}
|
|
5014
|
+
logger.blank();
|
|
5015
|
+
if (!yes) {
|
|
5016
|
+
const confirmed = await confirm3({
|
|
5017
|
+
message: t("uninstall_confirm_prompt").replace("{count}", chalk11.bold(String(lastBatch.length))),
|
|
5018
|
+
default: false
|
|
5019
|
+
});
|
|
5020
|
+
if (!confirmed) {
|
|
5021
|
+
logger.info(t("init_cancelled"));
|
|
5022
|
+
return;
|
|
5023
|
+
}
|
|
5024
|
+
}
|
|
5025
|
+
logger.info(`${t("uninstall_skills_in_progress")} ${t("skill_count_format").replace("{count}", String(lastBatch.length))}...`);
|
|
5026
|
+
await uninstallSkills(lastBatch, tool, level);
|
|
5027
|
+
logger.blank();
|
|
5028
|
+
logger.success(t("skill_uninstall_done"));
|
|
5029
|
+
logger.blank();
|
|
5030
|
+
}
|
|
5031
|
+
async function uninstallInteractive(defaultTool, defaultLevel) {
|
|
5032
|
+
let tool = defaultTool;
|
|
5033
|
+
let level = defaultLevel;
|
|
5034
|
+
const typeChoices = [
|
|
5035
|
+
{ name: `> ${t("uninstall_type_skill")}`, value: "skill" },
|
|
5036
|
+
{ name: `> ${t("uninstall_type_plugin")}`, value: "plugin" },
|
|
5037
|
+
new Separator4("\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500"),
|
|
5038
|
+
{ name: "x " + t("wizard_cancel"), value: "cancel" }
|
|
5039
|
+
];
|
|
5040
|
+
showOperationHints();
|
|
5041
|
+
const uninstallType = await select5({
|
|
5042
|
+
message: t("uninstall_select_type"),
|
|
5043
|
+
choices: typeChoices,
|
|
5044
|
+
loop: false,
|
|
5045
|
+
theme: selectTheme
|
|
5046
|
+
});
|
|
5047
|
+
if (uninstallType === "cancel") {
|
|
5048
|
+
logger.info(t("init_cancelled"));
|
|
5049
|
+
return;
|
|
5050
|
+
}
|
|
5051
|
+
if (!process.env.INSTALL_HELPER_TOOL) {
|
|
5052
|
+
const detected = await selectToolWithDetection();
|
|
5053
|
+
if (detected === "back" || detected === "cancel") {
|
|
5054
|
+
logger.info(t("init_cancelled"));
|
|
5055
|
+
return;
|
|
5056
|
+
}
|
|
5057
|
+
tool = detected;
|
|
5058
|
+
}
|
|
5059
|
+
if (!process.env.INSTALL_HELPER_LEVEL) {
|
|
5060
|
+
const { stepLevel: stepLevel2 } = await Promise.resolve().then(() => (init_wizard(), wizard_exports));
|
|
5061
|
+
const levelResult = await stepLevel2();
|
|
5062
|
+
if (levelResult === "__back__" || levelResult === "__cancel__") {
|
|
5063
|
+
logger.info(t("init_cancelled"));
|
|
5064
|
+
return;
|
|
5065
|
+
}
|
|
5066
|
+
level = levelResult;
|
|
5067
|
+
}
|
|
5068
|
+
if (uninstallType === "skill") {
|
|
5069
|
+
await interactiveSkillUninstall(tool, level);
|
|
5070
|
+
} else {
|
|
5071
|
+
await interactivePluginUninstall(tool, level);
|
|
5072
|
+
}
|
|
5073
|
+
}
|
|
5074
|
+
async function interactiveSkillUninstall(tool, level) {
|
|
5075
|
+
const result = await interactiveSkillUnselect(tool, level);
|
|
5076
|
+
if (result === "back" || result === "cancel") {
|
|
5077
|
+
if (result === "cancel") logger.info(t("init_cancelled"));
|
|
5078
|
+
return;
|
|
5079
|
+
}
|
|
5080
|
+
const { toUninstall } = result;
|
|
5081
|
+
logger.info(`${t("uninstall_skills_in_progress")} ${t("skill_count_format").replace("{count}", String(toUninstall.length))}...`);
|
|
5082
|
+
await uninstallSkills(toUninstall, tool, level);
|
|
5083
|
+
logger.blank();
|
|
5084
|
+
logger.success(t("skill_uninstall_done"));
|
|
5085
|
+
logger.blank();
|
|
5086
|
+
}
|
|
5087
|
+
async function interactivePluginUninstall(tool, level) {
|
|
5088
|
+
const installed = scanInstalled().filter((p) => p.tool === tool && p.level === level);
|
|
5089
|
+
if (installed.length === 0) {
|
|
5090
|
+
logger.warn(t("uninstall_no_installed_plugins"));
|
|
5091
|
+
return;
|
|
5092
|
+
}
|
|
5093
|
+
const pluginChoices = [
|
|
5094
|
+
...installed.map((inst) => ({
|
|
5095
|
+
name: `${chalk11.cyan(inst.displayName)} ${chalk11.dim(`(${inst.id})`)}`,
|
|
5096
|
+
value: inst.id,
|
|
5097
|
+
checked: true,
|
|
5098
|
+
description: `${inst.skillsCount} skills, ${inst.agentsCount} agents`
|
|
5099
|
+
}))
|
|
5100
|
+
];
|
|
5101
|
+
printBoxTitle(t("uninstall_interactive_title"));
|
|
5102
|
+
logger.info(chalk11.dim(` ${t("uninstall_checkbox_hint")}`));
|
|
5103
|
+
logger.blank();
|
|
5104
|
+
showOperationHints(true);
|
|
5105
|
+
const selected = await checkbox2({
|
|
5106
|
+
message: t("uninstall_select_plugins"),
|
|
5107
|
+
choices: pluginChoices,
|
|
5108
|
+
loop: false,
|
|
5109
|
+
instructions: false,
|
|
5110
|
+
theme: checkboxTheme,
|
|
5111
|
+
pageSize: 15
|
|
5112
|
+
});
|
|
5113
|
+
const toUninstall = installed.filter((inst) => !selected.includes(inst.id));
|
|
5114
|
+
if (toUninstall.length === 0) {
|
|
5115
|
+
logger.info(t("uninstall_nothing_to_uninstall"));
|
|
5116
|
+
return;
|
|
5117
|
+
}
|
|
5118
|
+
const confirmed = await confirm3({
|
|
5119
|
+
message: t("uninstall_confirm_count").replace("{count}", chalk11.bold(String(toUninstall.length))),
|
|
5120
|
+
default: false
|
|
5121
|
+
});
|
|
5122
|
+
if (!confirmed) {
|
|
5123
|
+
logger.info(t("init_cancelled"));
|
|
5124
|
+
return;
|
|
5125
|
+
}
|
|
5126
|
+
logger.info(`${t("uninstall_plugin_batch_progress").replace("{count}", String(toUninstall.length))}...`);
|
|
5127
|
+
for (const inst of toUninstall) {
|
|
5128
|
+
await uninstallPluginById(inst.id, true);
|
|
5129
|
+
}
|
|
5130
|
+
logger.blank();
|
|
5131
|
+
logger.success(t("uninstall_all_done"));
|
|
5132
|
+
logger.blank();
|
|
5133
|
+
}
|
|
5134
|
+
async function uninstallPlugins(pluginIds, batchMode) {
|
|
5135
|
+
for (const pluginId of pluginIds) {
|
|
5136
|
+
await uninstallPluginById(pluginId, batchMode);
|
|
5137
|
+
}
|
|
5138
|
+
}
|
|
5139
|
+
async function uninstallPluginById(pluginId, batchMode) {
|
|
5140
|
+
const plugin = findPlugin(pluginId);
|
|
5141
|
+
if (!plugin) return;
|
|
5142
|
+
const record = readRecord(plugin.id);
|
|
5143
|
+
if (!record) {
|
|
5144
|
+
logger.warn(`${plugin.displayName} ${t("uninstall_no_record")}`);
|
|
5145
|
+
logger.info(`${t("uninstall_no_record_hint")}`);
|
|
5146
|
+
return;
|
|
5147
|
+
}
|
|
5148
|
+
logger.info(`${t("uninstall_in_progress")} ${plugin.displayName}...`);
|
|
5149
|
+
const configRoot = getConfigRoot(record.tool, record.level);
|
|
5150
|
+
const allowedBases = [resolve(configRoot), resolve(record.installPath)];
|
|
5151
|
+
const isSafePath = (p) => {
|
|
5152
|
+
const resolved = resolve(p);
|
|
5153
|
+
return allowedBases.some((base) => resolved === base || resolved.startsWith(base + sep));
|
|
5154
|
+
};
|
|
5155
|
+
let removedFiles = 0;
|
|
5156
|
+
let removedDirs = 0;
|
|
5157
|
+
for (const filePath of record.files) {
|
|
5158
|
+
if (!isSafePath(filePath)) continue;
|
|
5159
|
+
try {
|
|
5160
|
+
if (existsSync18(filePath) || isSymlink(filePath)) {
|
|
5161
|
+
unlinkSync6(filePath);
|
|
5162
|
+
const name = basename3(filePath);
|
|
5163
|
+
logger.step(` ${t("uninstall_remove_label")}: ${name}`);
|
|
5164
|
+
removedFiles++;
|
|
4552
5165
|
}
|
|
5166
|
+
} catch {
|
|
4553
5167
|
}
|
|
4554
|
-
|
|
4555
|
-
|
|
4556
|
-
|
|
4557
|
-
|
|
4558
|
-
|
|
4559
|
-
|
|
4560
|
-
|
|
4561
|
-
|
|
4562
|
-
|
|
4563
|
-
|
|
4564
|
-
|
|
4565
|
-
|
|
5168
|
+
}
|
|
5169
|
+
const sortedDirs = [...record.directories].filter(isSafePath).sort((a, b) => b.length - a.length);
|
|
5170
|
+
for (const dirPath of sortedDirs) {
|
|
5171
|
+
try {
|
|
5172
|
+
if (resolve(dirPath) === resolve(configRoot)) {
|
|
5173
|
+
continue;
|
|
5174
|
+
}
|
|
5175
|
+
if (existsSync18(dirPath)) {
|
|
5176
|
+
const entries = readdirSync6(dirPath);
|
|
5177
|
+
if (entries.length === 0) {
|
|
5178
|
+
rmdirSync(dirPath);
|
|
5179
|
+
const name = basename3(dirPath);
|
|
5180
|
+
logger.step(` ${t("uninstall_clean_empty_dir")}: ${name}/`);
|
|
5181
|
+
removedDirs++;
|
|
4566
5182
|
}
|
|
4567
5183
|
}
|
|
4568
|
-
}
|
|
4569
|
-
const currentBackups = backups.filter((b) => b.pluginId === pluginId);
|
|
4570
|
-
for (const backup of currentBackups) {
|
|
4571
|
-
deleteBackup(backup.filePath);
|
|
4572
|
-
}
|
|
4573
|
-
const totalRemoved = removedFiles + removedDirs;
|
|
4574
|
-
if (totalRemoved > 0) {
|
|
4575
|
-
logger.success(t("uninstall_summary_format").replace("{name}", plugin.displayName).replace("{files}", String(removedFiles)).replace("{dirs}", String(removedDirs)));
|
|
4576
|
-
} else {
|
|
4577
|
-
logger.warn(`${plugin.displayName}${t("uninstall_files_gone")}`);
|
|
5184
|
+
} catch {
|
|
4578
5185
|
}
|
|
4579
5186
|
}
|
|
4580
|
-
|
|
4581
|
-
|
|
4582
|
-
|
|
4583
|
-
|
|
4584
|
-
|
|
4585
|
-
|
|
4586
|
-
|
|
4587
|
-
|
|
4588
|
-
|
|
4589
|
-
|
|
5187
|
+
deleteRecord(plugin.id);
|
|
5188
|
+
removeInstalledPlugin(plugin.id);
|
|
5189
|
+
const backups = findBackups(configRoot);
|
|
5190
|
+
const otherBackups = backups.filter((b) => b.pluginId !== pluginId);
|
|
5191
|
+
if (!batchMode && otherBackups.length > 0) {
|
|
5192
|
+
const choice = await showRestorePrompt(otherBackups);
|
|
5193
|
+
if (choice !== "none") {
|
|
5194
|
+
const restored = restoreBackup(choice, configRoot, record.tool);
|
|
5195
|
+
if (restored) {
|
|
5196
|
+
const backupInfo = otherBackups.find((b) => b.filePath === choice);
|
|
5197
|
+
logger.success(`${t("backup_restore_success")}: ${backupInfo?.pluginName || ""}`);
|
|
5198
|
+
deleteBackup(choice);
|
|
4590
5199
|
}
|
|
4591
5200
|
}
|
|
4592
|
-
|
|
4593
|
-
logger.
|
|
4594
|
-
|
|
5201
|
+
} else if (batchMode && otherBackups.length > 0) {
|
|
5202
|
+
logger.info(t("uninstall_plugin_batch_skip_restore"));
|
|
5203
|
+
}
|
|
5204
|
+
const currentBackups = backups.filter((b) => b.pluginId === pluginId);
|
|
5205
|
+
for (const backup of currentBackups) {
|
|
5206
|
+
deleteBackup(backup.filePath);
|
|
5207
|
+
}
|
|
5208
|
+
const totalRemoved = removedFiles + removedDirs;
|
|
5209
|
+
if (totalRemoved > 0) {
|
|
5210
|
+
logger.success(t("uninstall_summary_format").replace("{name}", plugin.displayName).replace("{files}", String(removedFiles)).replace("{dirs}", String(removedDirs)));
|
|
5211
|
+
} else {
|
|
5212
|
+
logger.warn(`${plugin.displayName}${t("uninstall_files_gone")}`);
|
|
4595
5213
|
}
|
|
4596
5214
|
}
|
|
5215
|
+
async function uninstallSkillsByName(skills, tool, level) {
|
|
5216
|
+
if (skills.length === 0) return;
|
|
5217
|
+
logger.info(`${t("uninstall_skills_in_progress")} ${t("skill_count_format").replace("{count}", String(skills.length))}...`);
|
|
5218
|
+
const results = await uninstallSkills(skills, tool, level);
|
|
5219
|
+
let successCount = 0;
|
|
5220
|
+
let failCount = 0;
|
|
5221
|
+
for (const result of results) {
|
|
5222
|
+
if (result.success) {
|
|
5223
|
+
successCount++;
|
|
5224
|
+
} else {
|
|
5225
|
+
failCount++;
|
|
5226
|
+
}
|
|
5227
|
+
}
|
|
5228
|
+
logger.blank();
|
|
5229
|
+
logger.success(`${t("skill_uninstall_done")}: ${chalk11.green(t("result_success_format").replace("{count}", String(successCount)))}, ${failCount > 0 ? chalk11.red(t("result_failed_format").replace("{count}", String(failCount))) : chalk11.dim(t("result_failed_format").replace("{count}", String(failCount)))}`);
|
|
5230
|
+
logger.blank();
|
|
5231
|
+
}
|
|
4597
5232
|
|
|
4598
5233
|
// src/commands/update.ts
|
|
5234
|
+
init_registry();
|
|
5235
|
+
init_manifest();
|
|
5236
|
+
init_logger();
|
|
5237
|
+
init_i18n();
|
|
5238
|
+
init_paths();
|
|
4599
5239
|
import chalk12 from "chalk";
|
|
4600
5240
|
async function updateCommand(pluginNames, options) {
|
|
4601
5241
|
const repoManager = createRepositoryManager();
|
|
@@ -4692,9 +5332,12 @@ async function updateCommand(pluginNames, options) {
|
|
|
4692
5332
|
}
|
|
4693
5333
|
|
|
4694
5334
|
// src/commands/info.ts
|
|
5335
|
+
init_registry();
|
|
4695
5336
|
import chalk13 from "chalk";
|
|
4696
5337
|
import { existsSync as existsSync19, readdirSync as readdirSync7 } from "fs";
|
|
4697
5338
|
import { join as join18 } from "path";
|
|
5339
|
+
init_manifest();
|
|
5340
|
+
init_i18n();
|
|
4698
5341
|
async function infoCommand(pluginName) {
|
|
4699
5342
|
const plugin = findPlugin(pluginName);
|
|
4700
5343
|
if (!plugin) {
|
|
@@ -4740,6 +5383,8 @@ async function infoCommand(pluginName) {
|
|
|
4740
5383
|
}
|
|
4741
5384
|
|
|
4742
5385
|
// src/commands/lang.ts
|
|
5386
|
+
init_config();
|
|
5387
|
+
init_i18n();
|
|
4743
5388
|
import chalk14 from "chalk";
|
|
4744
5389
|
async function langCommand(action, value) {
|
|
4745
5390
|
const config = readConfig();
|
|
@@ -4776,6 +5421,8 @@ async function langCommand(action, value) {
|
|
|
4776
5421
|
}
|
|
4777
5422
|
|
|
4778
5423
|
// src/cli.ts
|
|
5424
|
+
init_config();
|
|
5425
|
+
init_i18n();
|
|
4779
5426
|
import { readFileSync as readFileSync9, existsSync as existsSync20 } from "fs";
|
|
4780
5427
|
import { fileURLToPath as fileURLToPath4 } from "url";
|
|
4781
5428
|
import { dirname as dirname6, join as join19 } from "path";
|
|
@@ -4829,7 +5476,7 @@ function createCLI() {
|
|
|
4829
5476
|
program2.command("install [names...]").description("Install plugins or skills (auto-detects type)").option("-t, --tool <tool>", "AI tool (opencode, claude, trae, cursor, copilot, codearts)").option("-l, --level <level>", "Install level (project, global)", "project").option("-y, --yes", "Skip confirmation prompts").option("-a, --all", "Install ALL available skills").option("--list", "List all available skills by category").action(async (names, options) => {
|
|
4830
5477
|
await installCommand(names, options);
|
|
4831
5478
|
});
|
|
4832
|
-
program2.command("uninstall
|
|
5479
|
+
program2.command("uninstall [names...]").description("Uninstall plugins or skills (auto-detects type)").option("-t, --tool <tool>", "AI tool (opencode, claude, trae, cursor, copilot, codearts)").option("-l, --level <level>", "Install level (project, global)", "project").option("-y, --yes", "Skip confirmation prompts").option("-a, --all", "Uninstall ALL installed skills and plugins").option("--recent", "Uninstall the most recently installed skill batch").action(async (names, options) => {
|
|
4833
5480
|
await uninstallCommand(names, options);
|
|
4834
5481
|
});
|
|
4835
5482
|
program2.command("update [plugins...]").description("Update installed plugins (git pull + reinstall)").option("-t, --tool <tool>", "AI tool (opencode, claude, trae, cursor, copilot, codearts)").option("-l, --level <level>", "Install level (project, global)").option("-y, --yes", "Skip confirmation prompts").action(async (plugins, options) => {
|
|
@@ -4848,6 +5495,7 @@ function createCLI() {
|
|
|
4848
5495
|
}
|
|
4849
5496
|
|
|
4850
5497
|
// src/index.ts
|
|
5498
|
+
init_i18n();
|
|
4851
5499
|
function isExitError(error) {
|
|
4852
5500
|
if (!error) return false;
|
|
4853
5501
|
return error.name === "ExitPromptError" || error.message?.includes("force closed") || error.message?.includes("SIGINT") || error.constructor?.name === "ExitPromptError";
|