@cannbot-ai/install-helper 0.0.2-beta.16 → 0.0.2-beta.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -76,356 +76,42 @@ function getPluginById(id) {
76
76
  import { execa } from "execa";
77
77
  import { existsSync as existsSync2 } from "fs";
78
78
  import { homedir as homedir2 } from "os";
79
- import { join as join3 } from "path";
79
+ import { join as join4 } from "path";
80
80
 
81
81
  // src/utils/paths.ts
82
82
  import { homedir } from "os";
83
- import { join as join2 } from "path";
83
+ import { join as join3 } from "path";
84
84
  import { existsSync } from "fs";
85
85
 
86
86
  // src/utils/i18n.ts
87
- var zh_CN = {
88
- wizard_title: "CANNBot Install Helper",
89
- wizard_detect: "\u6B63\u5728\u68C0\u6D4B\u5DF2\u5B89\u88C5\u7684 AI \u7F16\u7A0B\u5DE5\u5177...",
90
- wizard_select_tool: "\u9009\u62E9 AI \u7F16\u7A0B\u5DE5\u5177",
91
- wizard_select_level: "\u9009\u62E9\u5B89\u88C5\u4F4D\u7F6E",
92
- wizard_select_plugins: "\u9009\u62E9\u8981\u5B89\u88C5\u7684\u63D2\u4EF6",
93
- wizard_confirm: "\u786E\u8BA4\u5B89\u88C5",
94
- wizard_detected_tool: "\u68C0\u6D4B\u5230",
95
- wizard_confirm_tool: "\u4F7F\u7528",
96
- wizard_last_used: "\u4E0A\u6B21\u4F7F\u7528",
97
- wizard_already_installed: "\u5DF2\u5B89\u88C5",
98
- install_cloning: "\u6B63\u5728\u514B\u9686 cannbot-skills \u4ED3\u5E93...",
99
- install_repo_ready: "\u4ED3\u5E93\u5C31\u7EEA",
100
- install_progress: "\u6B63\u5728\u5B89\u88C5",
101
- install_done: "\u5B89\u88C5\u5B8C\u6210",
102
- install_success: "\u6210\u529F",
103
- install_failed: "\u5931\u8D25",
104
- install_already_installed: "\u5DF2\u5B89\u88C5",
105
- install_reinstall_confirm: "\u662F\u5426\u91CD\u65B0\u5B89\u88C5\uFF08\u8986\u76D6\uFF09",
106
- install_skip: "\u8DF3\u8FC7",
107
- install_enhanced_next_steps: "\u4E0B\u4E00\u6B65",
108
- install_enhanced_launch: "\u542F\u52A8",
109
- install_enhanced_try: "\u8BD5\u8BD5",
110
- install_enhanced_more: "\u66F4\u591A",
111
- install_enhanced_check: "\u68C0\u67E5",
112
- install_enhanced_docs: "\u6587\u6863",
113
- update_title: "\u66F4\u65B0\u5DF2\u5B89\u88C5\u7684 Skills",
114
- update_updating: "\u6B63\u5728\u66F4\u65B0",
115
- update_done: "\u66F4\u65B0\u5B8C\u6210",
116
- update_no_plugins: "\u6682\u65E0\u5DF2\u5B89\u88C5\u7684\u63D2\u4EF6",
117
- doctor_title: "CANNBot Doctor",
118
- doctor_tools: "AI \u5DE5\u5177",
119
- doctor_plugins: "\u5DF2\u5B89\u88C5\u63D2\u4EF6",
120
- doctor_links: "\u94FE\u63A5\u5B8C\u6574\u6027",
121
- doctor_config: "\u914D\u7F6E\u6587\u4EF6",
122
- doctor_result: "\u7ED3\u679C",
123
- doctor_fix_title: "\u81EA\u52A8\u4FEE\u590D",
124
- doctor_fix_cleaning: "\u6E05\u7406\u5931\u6548\u94FE\u63A5",
125
- doctor_fix_rebuilding: "\u91CD\u5EFA\u76EE\u5F55",
126
- doctor_fix_done: "\u4FEE\u590D\u5B8C\u6210",
127
- info_title: "\u63D2\u4EF6\u8BE6\u60C5",
128
- info_description: "\u63CF\u8FF0",
129
- info_skills: "Skills",
130
- info_agents: "Agents",
131
- info_status: "\u72B6\u6001",
132
- info_quickstart: "\u5FEB\u901F\u5F00\u59CB",
133
- info_not_found: "\u672A\u627E\u5230\u63D2\u4EF6",
134
- lang_title: "\u8BED\u8A00\u8BBE\u7F6E",
135
- lang_current: "\u5F53\u524D\u8BED\u8A00",
136
- lang_set: "\u8BED\u8A00\u5DF2\u8BBE\u7F6E\u4E3A",
137
- lang_invalid: "\u65E0\u6548\u7684\u8BED\u8A00\uFF0C\u652F\u6301: zh_CN, en_US",
138
- list_title: "\u53EF\u7528\u573A\u666F",
139
- list_id: "\u5E8F\u53F7",
140
- list_name: "\u573A\u666F\u540D",
141
- list_status: "\u72B6\u6001",
142
- list_skills: "Skills",
143
- list_agents: "Agents",
144
- status_installed: "\u5DF2\u88C5",
145
- status_not_installed: "\u672A\u88C5",
146
- error_tool_not_found: "\u672A\u68C0\u6D4B\u5230\u4EFB\u4F55 AI \u7F16\u7A0B\u5DE5\u5177",
147
- error_plugin_not_found: "\u672A\u627E\u5230\u63D2\u4EF6",
148
- error_repo_not_found: "\u4ED3\u5E93\u672A\u627E\u5230",
149
- error_invalid_tool: "\u6682\u4E0D\u652F\u6301\u7684 AI \u5DE5\u5177: {tool}\n\u652F\u6301\u7684\u5DE5\u5177: {tools}",
150
- error_invalid_level: "\u6682\u4E0D\u652F\u6301\u7684\u5B89\u88C5\u7EA7\u522B: {level}\n\u652F\u6301\u7684\u7EA7\u522B: {levels}",
151
- quick_start: "\u542F\u52A8\u547D\u4EE4",
152
- quick_start_hint: "\u8BD5\u8BD5\u8F93\u5165: \u5E2E\u6211\u5F00\u53D1\u4E00\u4E2A Abs \u7B97\u5B50",
153
- skill_select_category: "\u9009\u62E9 Skill \u7C7B\u522B",
154
- skill_select_items: "\u9009\u62E9\u8981\u5B89\u88C5\u7684 Skills",
155
- skill_already_installed: "\u5DF2\u5B89\u88C5",
156
- skill_install_progress: "\u6B63\u5728\u5B89\u88C5",
157
- skill_install_done: "Skill \u5B89\u88C5\u5B8C\u6210",
158
- skill_uninstall_done: "Skill \u5378\u8F7D\u5B8C\u6210",
159
- skill_list_title: "\u53EF\u7528 Skills",
160
- wizard_select_mode: "\u9009\u62E9\u5B89\u88C5\u7C7B\u578B",
161
- wizard_mode_plugin: "\u5B89\u88C5 Plugin",
162
- wizard_mode_plugin_desc: "\u5B8C\u6574\u5F00\u53D1\u5DE5\u4F5C\u6D41\uFF08Skills + Agents + \u914D\u7F6E\u6587\u4EF6\uFF09",
163
- wizard_mode_skill: "\u5B89\u88C5 Skill",
164
- wizard_mode_skill_desc: "\u4EC5\u5B89\u88C5\u9886\u57DF\u77E5\u8BC6\u6280\u80FD\uFF0C\u8BA9 AI \u638C\u63E1\u7279\u5B9A\u80FD\u529B",
165
- wizard_back: "\u8FD4\u56DE",
166
- wizard_cancel: "\u9000\u51FA",
167
- wizard_no_selection: "\u672A\u9009\u62E9\u4EFB\u4F55\u9879\uFF0C\u8BF7\u9009\u62E9\u64CD\u4F5C",
168
- wizard_back_to_reselect: "\u8FD4\u56DE",
169
- status_title: "\u5DF2\u5B89\u88C5\u63D2\u4EF6",
170
- status_none: "\u6682\u65E0\u5DF2\u5B89\u88C5\u7684\u63D2\u4EF6",
171
- status_hint: "\u8FD0\u884C install-helper init \u5F00\u59CB\u5B89\u88C5",
172
- status_install_time: "\u5B89\u88C5\u65F6\u95F4",
173
- install_installed_to: "\u5B89\u88C5\u5230",
174
- install_skills_count: "Skills",
175
- install_agents_count: "Agents",
176
- lang_supported: "\u652F\u6301\u7684\u8BED\u8A00: zh_CN, en_US",
177
- lang_usage: "\u7528\u6CD5: install-helper lang set <language>",
178
- lang_specify: "\u8BF7\u6307\u5B9A\u8BED\u8A00: install-helper lang set zh_CN",
179
- lang_unknown_action: "\u672A\u77E5\u64CD\u4F5C",
180
- lang_supported_actions: "\u652F\u6301\u7684\u64CD\u4F5C: show, set",
181
- info_aliases: "\u522B\u540D",
182
- uninstall_not_found: "\u672A\u627E\u5230",
183
- uninstall_no_record: "\u672A\u627E\u5230\u5B89\u88C5\u8BB0\u5F55\uFF0C\u53EF\u80FD\u672A\u5B89\u88C5\u6216\u5B89\u88C5\u8BB0\u5F55\u5DF2\u635F\u574F",
184
- 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",
185
- uninstall_in_progress: "\u6B63\u5728\u5378\u8F7D",
186
- uninstall_removed: "\u5DF2\u5378\u8F7D",
187
- uninstall_files_gone: "\u7684\u6587\u4EF6\u5DF2\u4E0D\u5B58\u5728\uFF0C\u5DF2\u6E05\u7406\u5B89\u88C5\u8BB0\u5F55",
188
- uninstall_skills_in_progress: "\u6B63\u5728\u5378\u8F7D",
189
- init_pkg_dir_warn: "\u5F53\u524D\u76EE\u5F55\u770B\u8D77\u6765\u662F install-helper \u5305\u76EE\u5F55",
190
- 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",
191
- init_pkg_dir_example: "\u793A\u4F8B\uFF1Acd ~/my-project && install-helper",
192
- init_cancelled: "\u5DF2\u53D6\u6D88\u5B89\u88C5",
193
- backup_detected: "\u68C0\u6D4B\u5230\u5F53\u524D\u76EE\u5F55\u5DF2\u5B89\u88C5\u63D2\u4EF6",
194
- backup_current: "\u5F53\u524D\u5B89\u88C5",
195
- backup_installing: "\u5373\u5C06\u5B89\u88C5",
196
- backup_overwrite_warning: "\u7EE7\u7EED\u5B89\u88C5\u5C06\u8986\u76D6\u73B0\u6709\u7684 AGENTS.md \u914D\u7F6E\u6587\u4EF6\u3002",
197
- backup_auto_create: "\u7CFB\u7EDF\u4F1A\u81EA\u52A8\u521B\u5EFA\u5907\u4EFD\uFF0C\u4EE5\u4FBF\u540E\u7EED\u6062\u590D\u3002",
198
- backup_overwrite: "\u8986\u76D6\u5B89\u88C5\uFF08\u81EA\u52A8\u5907\u4EFD\uFF09",
199
- backup_cancel: "\u53D6\u6D88\u5B89\u88C5",
200
- backup_restore_prompt: "\u68C0\u6D4B\u5230\u5907\u4EFD\u914D\u7F6E\uFF0C\u662F\u5426\u6062\u590D\uFF1F",
201
- backup_restore: "\u6062\u590D",
202
- backup_only_uninstall: "\u4EC5\u5378\u8F7D\uFF08\u4E0D\u6062\u590D\uFF09",
203
- backup_select_action: "\u8BF7\u9009\u62E9\u64CD\u4F5C",
204
- backup_restore_success: "\u5DF2\u6062\u590D\u914D\u7F6E",
205
- backup_created: "\u5DF2\u521B\u5EFA\u5907\u4EFD",
206
- loading_skills_list: "\u6B63\u5728\u52A0\u8F7D Skills \u5217\u8868...",
207
- loading_skills_list_complete: "Skills \u5217\u8868\u52A0\u8F7D\u5B8C\u6210",
208
- loading_plugin_data: "\u6B63\u5728\u52A0\u8F7D\u63D2\u4EF6\u6570\u636E...",
209
- loading_plugin_data_complete: "\u63D2\u4EF6\u6570\u636E\u52A0\u8F7D\u5B8C\u6210",
210
- loading_skills_list_failed: "Skills \u5217\u8868\u52A0\u8F7D\u5931\u8D25\uFF0C\u5C06\u4F7F\u7528\u5185\u7F6E\u6570\u636E",
211
- install_no_skill_selected: "\u672A\u9009\u62E9\u4EFB\u4F55 Skill",
212
- install_to: "\u5B89\u88C5\u5230",
213
- start_to_use: "\u542F\u52A8 {tool} \u5373\u53EF\u4F7F\u7528",
214
- wizard_step_1_title: "[1/4] \u9009\u62E9 AI \u7F16\u7A0B\u5DE5\u5177",
215
- wizard_step_2_title: "[2/4] \u9009\u62E9\u5B89\u88C5\u4F4D\u7F6E",
216
- wizard_step_3_title: "[3/4] \u9009\u62E9\u8981\u5B89\u88C5\u7684\u63D2\u4EF6",
217
- wizard_step_4_title: "[4/4] \u786E\u8BA4\u5B89\u88C5",
218
- wizard_step_3_skill_title: "[3/4] \u9009\u62E9 Skill \u7C7B\u522B",
219
- wizard_step_4_skill_title: "[4/4] \u9009\u62E9\u8981\u5B89\u88C5\u7684 Skills \u2014 {category}",
220
- install_level_project: "\u5B89\u88C5\u5230\u5F53\u524D\u76EE\u5F55\uFF08\u63A8\u8350\uFF0C\u4EC5\u5F53\u524D\u9879\u76EE\u53EF\u7528\uFF09",
221
- install_level_global: "\u5B89\u88C5\u5230\u5168\u5C40\uFF08\u6240\u6709\u9879\u76EE\u5171\u4EAB\uFF09",
222
- wizard_select_mode_title: "\u9009\u62E9\u5B89\u88C5\u7C7B\u578B",
223
- skill_count_format: "{count} \u4E2A Skills",
224
- result_success_format: "{count} \u6210\u529F",
225
- result_failed_format: "{count} \u5931\u8D25",
226
- uninstall_remove_label: "\u79FB\u9664",
227
- uninstall_remove_file_format: "\u79FB\u9664 {count} \u4E2A\u6587\u4EF6",
228
- uninstall_remove_dir_format: "{count} \u4E2A\u76EE\u5F55",
229
- uninstall_clean_empty_dir: "\u6E05\u7406\u7A7A\u76EE\u5F55",
230
- uninstall_skill_not_installed: "\u672A\u5B89\u88C5",
231
- available_plugins: "\u53EF\u7528\u63D2\u4EF6",
232
- available_skills: "\u53EF\u7528 Skills",
233
- skill_total_count: "\u5171 {count} \u4E2A Skills",
234
- wizard_confirm_install_format: "\u5373\u5C06\u5B89\u88C5 {count} \u4E2A\u63D2\u4EF6\u5230 {tool}\uFF08{level} \u7EA7\u522B\uFF09\uFF1A",
235
- wizard_install_path: "\u5B89\u88C5\u8DEF\u5F84",
236
- update_install_hint: "\u4F7F\u7528 {cmd} \u5B89\u88C5\u63D2\u4EF6",
237
- hint_select_move: "\u79FB\u52A8",
238
- hint_select_space: "\u7A7A\u683C",
239
- hint_select_check: "\u52FE\u9009",
240
- hint_select_confirm: "\u786E\u8BA4",
241
- hint_checkbox_suffix: "\u4E0D\u9009\u6309\u56DE\u8F66\u53EF\u8FD4\u56DE",
242
- doctor_not_installed: "\u672A\u5B89\u88C5",
243
- doctor_links_valid: "{count} \u4E2A\u8F6F\u94FE\u63A5\u5747\u6709\u6548",
244
- doctor_broken_links: "{count} \u4E2A\u5931\u6548\u94FE\u63A5",
245
- doctor_fixed: "\u5DF2\u6E05\u7406 {count} \u4E2A\u5931\u6548\u94FE\u63A5",
246
- doctor_not_exist: "\u4E0D\u5B58\u5728",
247
- doctor_created: "\u5DF2\u521B\u5EFA {path}",
248
- doctor_config_exists: "\u5B58\u5728",
249
- doctor_config_not_exist: "\u4E0D\u5B58\u5728",
250
- doctor_result_with_fix: "{warnings} \u4E2A\u8B66\u544A, {errors} \u4E2A\u9519\u8BEF, {fixes} \u9879\u5DF2\u4FEE\u590D",
251
- doctor_result_without_fix: "{warnings} \u4E2A\u8B66\u544A, {errors} \u4E2A\u9519\u8BEF",
252
- count_suffix: "\u4E2A",
253
- try_prompt: "\u5E2E\u6211\u5F00\u53D1\u4E00\u4E2A Abs \u7B97\u5B50"
254
- };
255
- var en_US = {
256
- wizard_title: "CANNBot Install Helper",
257
- wizard_detect: "Detecting installed AI coding tools...",
258
- wizard_select_tool: "Select AI coding tool",
259
- wizard_select_level: "Select install level",
260
- wizard_select_plugins: "Select scenarios to install",
261
- wizard_confirm: "Confirm installation",
262
- wizard_detected_tool: "Detected",
263
- wizard_confirm_tool: "Confirm using",
264
- wizard_last_used: "last used",
265
- wizard_already_installed: "installed",
266
- install_cloning: "Cloning cannbot-skills repository...",
267
- install_repo_ready: "Repository ready",
268
- install_progress: "Installing",
269
- install_done: "Installation complete",
270
- install_success: "success",
271
- install_failed: "failed",
272
- install_already_installed: "already installed",
273
- install_reinstall_confirm: "Reinstall (overwrite)",
274
- install_skip: "skipped",
275
- install_enhanced_next_steps: "Next steps",
276
- install_enhanced_launch: "Launch",
277
- install_enhanced_try: "Try",
278
- install_enhanced_more: "More",
279
- install_enhanced_check: "Check",
280
- install_enhanced_docs: "Docs",
281
- update_title: "Update installed Skills",
282
- update_updating: "Updating",
283
- update_done: "Update complete",
284
- update_no_plugins: "No installed plugins",
285
- doctor_title: "CANNBot Doctor",
286
- doctor_tools: "AI Tools",
287
- doctor_plugins: "Installed Plugins",
288
- doctor_links: "Link Integrity",
289
- doctor_config: "Configuration",
290
- doctor_result: "Result",
291
- doctor_fix_title: "Auto-fix",
292
- doctor_fix_cleaning: "Cleaning broken links",
293
- doctor_fix_rebuilding: "Rebuilding directories",
294
- doctor_fix_done: "Fix complete",
295
- info_title: "Plugin Details",
296
- info_description: "Description",
297
- info_skills: "Skills",
298
- info_agents: "Agents",
299
- info_status: "Status",
300
- info_quickstart: "Quick Start",
301
- info_not_found: "Plugin not found",
302
- lang_title: "Language Settings",
303
- lang_current: "Current language",
304
- lang_set: "Language set to",
305
- lang_invalid: "Invalid language, supported: zh_CN, en_US",
306
- list_title: "Available Scenarios",
307
- list_id: "#",
308
- list_name: "Name",
309
- list_status: "Status",
310
- list_skills: "Skills",
311
- list_agents: "Agents",
312
- status_installed: "installed",
313
- status_not_installed: "not installed",
314
- error_tool_not_found: "No AI coding tool detected",
315
- error_plugin_not_found: "Plugin not found",
316
- error_repo_not_found: "Repository not found",
317
- error_invalid_tool: "Unsupported AI tool: {tool}\nSupported tools: {tools}",
318
- error_invalid_level: "Unsupported install level: {level}\nSupported levels: {levels}",
319
- quick_start: "Launch command",
320
- quick_start_hint: "Try: help me develop an Abs operator",
321
- skill_select_category: "Select Skill category",
322
- skill_select_items: "Select Skills to install (space to toggle, enter to confirm)",
323
- skill_already_installed: "installed",
324
- skill_install_progress: "Installing",
325
- skill_install_done: "Skill installation complete",
326
- skill_uninstall_done: "Skill uninstallation complete",
327
- skill_list_title: "Available Skills",
328
- wizard_select_mode: "Select installation mode",
329
- wizard_mode_plugin: "Install Plugin",
330
- wizard_mode_plugin_desc: "Full development workflow (Skills + Agents + config)",
331
- wizard_mode_skill: "Install Skill",
332
- wizard_mode_skill_desc: "Domain knowledge only, give AI specific capabilities",
333
- wizard_back: "Go back",
334
- wizard_cancel: "Cancel installation",
335
- wizard_no_selection: "No items selected, please choose an action",
336
- wizard_back_to_reselect: "Go back",
337
- status_title: "Installed Plugins",
338
- status_none: "No installed plugins",
339
- status_hint: "Run install-helper init to start",
340
- status_install_time: "Installed at",
341
- install_installed_to: "Installed to",
342
- install_skills_count: "Skills",
343
- install_agents_count: "Agents",
344
- lang_supported: "Supported languages: zh_CN, en_US",
345
- lang_usage: "Usage: install-helper lang set <language>",
346
- lang_specify: "Please specify language: install-helper lang set zh_CN",
347
- lang_unknown_action: "Unknown action",
348
- lang_supported_actions: "Supported actions: show, set",
349
- info_aliases: "Aliases",
350
- uninstall_not_found: "Not found",
351
- uninstall_no_record: "No install record found, may not be installed or record is corrupted",
352
- uninstall_no_record_hint: "For manual cleanup, delete related files in .opencode/ or .claude/ directory",
353
- uninstall_in_progress: "Uninstalling",
354
- uninstall_removed: "Uninstalled",
355
- uninstall_files_gone: " files no longer exist, install record cleaned",
356
- uninstall_skills_in_progress: "Uninstalling",
357
- init_pkg_dir_warn: "Current directory appears to be the install-helper package directory",
358
- init_pkg_dir_hint: "Please run this command in your project directory, not in the install-helper package directory",
359
- init_pkg_dir_example: "Example: cd ~/my-project && install-helper",
360
- init_cancelled: "Installation cancelled",
361
- backup_detected: "Plugin already installed in current directory",
362
- backup_current: "Currently installed",
363
- backup_installing: "About to install",
364
- backup_overwrite_warning: "Continuing will overwrite existing AGENTS.md configuration.",
365
- backup_auto_create: "System will automatically create backup for future restoration.",
366
- backup_overwrite: "Overwrite (auto backup)",
367
- backup_cancel: "Cancel installation",
368
- backup_restore_prompt: "Backup configuration detected, restore?",
369
- backup_restore: "Restore",
370
- backup_only_uninstall: "Uninstall only (no restore)",
371
- backup_select_action: "Please select an action",
372
- backup_restore_success: "Configuration restored",
373
- backup_created: "Backup created",
374
- loading_skills_list: "Loading Skills list...",
375
- loading_skills_list_complete: "Skills list loaded",
376
- loading_plugin_data: "Loading plugin data...",
377
- loading_plugin_data_complete: "Plugin data loaded",
378
- loading_skills_list_failed: "Failed to load Skills list, using built-in data",
379
- install_no_skill_selected: "No Skill selected",
380
- install_to: "Install to",
381
- start_to_use: "Start {tool} to use",
382
- wizard_step_1_title: "[1/4] Select AI coding tool",
383
- wizard_step_2_title: "[2/4] Select installation location",
384
- wizard_step_3_title: "[3/4] Select plugins to install",
385
- wizard_step_4_title: "[4/4] Confirm installation",
386
- wizard_step_3_skill_title: "[3/4] Select Skill category",
387
- wizard_step_4_skill_title: "[4/4] Select Skills to install \u2014 {category}",
388
- install_level_project: "Install to current directory (recommended, current project only)",
389
- install_level_global: "Install globally (all projects)",
390
- wizard_select_mode_title: "Select installation type",
391
- skill_count_format: "{count} Skills",
392
- result_success_format: "{count} succeeded",
393
- result_failed_format: "{count} failed",
394
- uninstall_remove_label: "Removed",
395
- uninstall_remove_file_format: "Removed {count} files",
396
- uninstall_remove_dir_format: "{count} directories",
397
- uninstall_clean_empty_dir: "Cleaned empty directory",
398
- uninstall_skill_not_installed: "Not installed",
399
- available_plugins: "Available plugins",
400
- available_skills: "Available Skills",
401
- skill_total_count: "Total {count} Skills",
402
- wizard_confirm_install_format: "About to install {count} plugins to {tool} ({level} level):",
403
- wizard_install_path: "Install path",
404
- update_install_hint: "Use {cmd} to install plugins",
405
- hint_select_move: "Navigate",
406
- hint_select_space: "Space",
407
- hint_select_check: "Toggle",
408
- hint_select_confirm: "Confirm",
409
- hint_checkbox_suffix: "Press enter without selection to go back",
410
- doctor_not_installed: "Not installed",
411
- doctor_links_valid: "{count} symlinks all valid",
412
- doctor_broken_links: "{count} broken links",
413
- doctor_fixed: "Cleaned {count} broken links",
414
- doctor_not_exist: "Does not exist",
415
- doctor_created: "Created {path}",
416
- doctor_config_exists: "Exists",
417
- doctor_config_not_exist: "Does not exist",
418
- doctor_result_with_fix: "{warnings} warnings, {errors} errors, {fixes} fixed",
419
- doctor_result_without_fix: "{warnings} warnings, {errors} errors",
420
- count_suffix: "",
421
- try_prompt: "help me develop an Abs operator"
422
- };
87
+ import { readFileSync as readFileSync2 } from "fs";
88
+ import { join as join2, dirname as dirname2 } from "path";
89
+ import { fileURLToPath as fileURLToPath2 } from "url";
90
+ var __filename2 = fileURLToPath2(import.meta.url);
91
+ var __dirname2 = dirname2(__filename2);
92
+ function loadLocale(locale) {
93
+ const localePath = join2(__dirname2, "locales", `${locale}.json`);
94
+ try {
95
+ const content = readFileSync2(localePath, "utf-8");
96
+ return JSON.parse(content);
97
+ } catch {
98
+ const fallbackPath = join2(__dirname2, "locales", "zh_CN.json");
99
+ try {
100
+ const content = readFileSync2(fallbackPath, "utf-8");
101
+ return JSON.parse(content);
102
+ } catch {
103
+ return {};
104
+ }
105
+ }
106
+ }
423
107
  var currentLang = "zh_CN";
108
+ var messages = loadLocale("zh_CN");
424
109
  function setLanguage(lang) {
425
110
  currentLang = lang;
111
+ messages = loadLocale(lang);
426
112
  }
427
113
  function t(key) {
428
- return currentLang === "zh_CN" ? zh_CN[key] : en_US[key];
114
+ return messages[key] !== void 0 ? messages[key] : key;
429
115
  }
430
116
 
431
117
  // src/utils/paths.ts
@@ -449,9 +135,9 @@ function validateLevel(level) {
449
135
  }
450
136
  function detectTraeVariant() {
451
137
  const home = homedir();
452
- if (existsSync(join2(home, ".trae-cn"))) return "ide";
453
- if (existsSync(join2(home, ".marscode"))) return "plugin";
454
- if (existsSync(join2(home, ".traecli"))) return "cli";
138
+ if (existsSync(join3(home, ".trae-cn"))) return "ide";
139
+ if (existsSync(join3(home, ".marscode"))) return "plugin";
140
+ if (existsSync(join3(home, ".traecli"))) return "cli";
455
141
  return "unknown";
456
142
  }
457
143
  function getConfigRoot(tool, level, base) {
@@ -459,24 +145,24 @@ function getConfigRoot(tool, level, base) {
459
145
  if (level === "global") {
460
146
  switch (tool) {
461
147
  case "opencode":
462
- return join2(home, ".config", "opencode");
148
+ return join3(home, ".config", "opencode");
463
149
  case "claude":
464
- return join2(home, ".claude");
150
+ return join3(home, ".claude");
465
151
  case "trae": {
466
152
  const variant = detectTraeVariant();
467
153
  switch (variant) {
468
154
  case "plugin":
469
- return join2(home, ".marscode");
155
+ return join3(home, ".marscode");
470
156
  case "cli":
471
- return join2(home, ".traecli");
157
+ return join3(home, ".traecli");
472
158
  default:
473
- return join2(home, ".trae-cn");
159
+ return join3(home, ".trae-cn");
474
160
  }
475
161
  }
476
162
  case "cursor":
477
- return join2(home, ".cursor");
163
+ return join3(home, ".cursor");
478
164
  case "copilot":
479
- return join2(home, ".copilot");
165
+ return join3(home, ".copilot");
480
166
  default:
481
167
  throw new Error(
482
168
  t("error_invalid_tool").replace("{tool}", tool).replace("{tools}", VALID_TOOLS.join(", "))
@@ -486,24 +172,24 @@ function getConfigRoot(tool, level, base) {
486
172
  const baseDir = base || process.cwd();
487
173
  switch (tool) {
488
174
  case "opencode":
489
- return join2(baseDir, ".opencode");
175
+ return join3(baseDir, ".opencode");
490
176
  case "claude":
491
- return join2(baseDir, ".claude");
177
+ return join3(baseDir, ".claude");
492
178
  case "trae": {
493
179
  const variant = detectTraeVariant();
494
180
  switch (variant) {
495
181
  case "plugin":
496
- return join2(baseDir, ".marscode");
182
+ return join3(baseDir, ".marscode");
497
183
  case "cli":
498
- return join2(baseDir, ".traecli");
184
+ return join3(baseDir, ".traecli");
499
185
  default:
500
- return join2(baseDir, ".trae");
186
+ return join3(baseDir, ".trae");
501
187
  }
502
188
  }
503
189
  case "cursor":
504
- return join2(baseDir, ".cursor");
190
+ return join3(baseDir, ".cursor");
505
191
  case "copilot":
506
- return join2(baseDir, ".github");
192
+ return join3(baseDir, ".github");
507
193
  default:
508
194
  throw new Error(
509
195
  t("error_invalid_tool").replace("{tool}", tool).replace("{tools}", VALID_TOOLS.join(", "))
@@ -514,19 +200,19 @@ function getConfigFileName(tool) {
514
200
  return tool === "claude" ? "CLAUDE.md" : "AGENTS.md";
515
201
  }
516
202
  function getSkillsDir(configRoot) {
517
- return join2(configRoot, "skills");
203
+ return join3(configRoot, "skills");
518
204
  }
519
205
  function getAgentsDir(configRoot) {
520
- return join2(configRoot, "agents");
206
+ return join3(configRoot, "agents");
521
207
  }
522
208
  function getManifestPath(configRoot) {
523
- return join2(configRoot, "cannbot-manifest.json");
209
+ return join3(configRoot, "cannbot-manifest.json");
524
210
  }
525
211
  function getCannbotConfigDir() {
526
- return join2(homedir(), ".cannbot");
212
+ return join3(homedir(), ".cannbot");
527
213
  }
528
214
  function getCannbotRepoPath() {
529
- return join2(getCannbotConfigDir(), "repo");
215
+ return join3(getCannbotConfigDir(), "repo");
530
216
  }
531
217
 
532
218
  // src/core/detector.ts
@@ -564,12 +250,12 @@ async function detectTrae() {
564
250
  const home = homedir2();
565
251
  const variant = detectTraeVariant();
566
252
  let path;
567
- if (variant === "ide" && existsSync2(join3(home, ".trae-cn"))) {
568
- path = join3(home, ".trae-cn");
569
- } else if (variant === "plugin" && existsSync2(join3(home, ".marscode"))) {
570
- path = join3(home, ".marscode");
571
- } else if (variant === "cli" && existsSync2(join3(home, ".traecli"))) {
572
- path = join3(home, ".traecli");
253
+ if (variant === "ide" && existsSync2(join4(home, ".trae-cn"))) {
254
+ path = join4(home, ".trae-cn");
255
+ } else if (variant === "plugin" && existsSync2(join4(home, ".marscode"))) {
256
+ path = join4(home, ".marscode");
257
+ } else if (variant === "cli" && existsSync2(join4(home, ".traecli"))) {
258
+ path = join4(home, ".traecli");
573
259
  } else if (variant === "unknown") {
574
260
  const cmdPath = await getCommandPath("trae");
575
261
  if (cmdPath) path = cmdPath;
@@ -633,13 +319,13 @@ function getAllTools() {
633
319
  }
634
320
 
635
321
  // src/core/manifest.ts
636
- import { existsSync as existsSync3, readFileSync as readFileSync2 } from "fs";
637
- import { join as join4 } from "path";
322
+ import { existsSync as existsSync3, readFileSync as readFileSync3 } from "fs";
323
+ import { join as join5 } from "path";
638
324
  function readManifest(configRoot) {
639
325
  const manifestPath = getManifestPath(configRoot);
640
326
  if (existsSync3(manifestPath)) {
641
327
  try {
642
- const content = readFileSync2(manifestPath, "utf-8");
328
+ const content = readFileSync3(manifestPath, "utf-8");
643
329
  return JSON.parse(content);
644
330
  } catch {
645
331
  }
@@ -652,16 +338,16 @@ function readAllManifests(configRoot) {
652
338
  const standardPath = getManifestPath(configRoot);
653
339
  if (existsSync3(standardPath)) {
654
340
  try {
655
- const content = readFileSync2(standardPath, "utf-8");
341
+ const content = readFileSync3(standardPath, "utf-8");
656
342
  manifests.push(JSON.parse(content));
657
343
  } catch {
658
344
  }
659
345
  }
660
346
  for (const plugin of plugins) {
661
- const pluginManifestPath = join4(configRoot, `${plugin.id}-manifest.json`);
347
+ const pluginManifestPath = join5(configRoot, `${plugin.id}-manifest.json`);
662
348
  if (existsSync3(pluginManifestPath)) {
663
349
  try {
664
- const content = readFileSync2(pluginManifestPath, "utf-8");
350
+ const content = readFileSync3(pluginManifestPath, "utf-8");
665
351
  manifests.push(JSON.parse(content));
666
352
  } catch {
667
353
  }
@@ -704,27 +390,27 @@ function scanInstalled() {
704
390
  return installed;
705
391
  }
706
392
  function verifyPluginFilesExist(configRoot, manifest, tool, level) {
707
- const skillsDir = join4(configRoot, "skills");
708
- const agentsDir = join4(configRoot, "agents");
393
+ const skillsDir = join5(configRoot, "skills");
394
+ const agentsDir = join5(configRoot, "agents");
709
395
  if (manifest.installed_skills && manifest.installed_skills.length > 0) {
710
396
  const hasAnySkill = manifest.installed_skills.some((skillId) => {
711
- const skillPath = join4(skillsDir, skillId);
397
+ const skillPath = join5(skillsDir, skillId);
712
398
  return existsSync3(skillPath);
713
399
  });
714
400
  if (!hasAnySkill) return false;
715
401
  }
716
402
  if (manifest.installed_agents && manifest.installed_agents.length > 0) {
717
403
  const hasAnyAgent = manifest.installed_agents.some((agentId) => {
718
- const agentPath = join4(agentsDir, agentId);
404
+ const agentPath = join5(agentsDir, agentId);
719
405
  return existsSync3(agentPath);
720
406
  });
721
407
  if (!hasAnyAgent) return false;
722
408
  }
723
409
  let agentsMdPath;
724
410
  if (tool === "opencode" && level === "project") {
725
- agentsMdPath = join4(configRoot, "..", "AGENTS.md");
411
+ agentsMdPath = join5(configRoot, "..", "AGENTS.md");
726
412
  } else {
727
- agentsMdPath = join4(configRoot, "AGENTS.md");
413
+ agentsMdPath = join5(configRoot, "AGENTS.md");
728
414
  }
729
415
  if (!existsSync3(agentsMdPath)) return false;
730
416
  return true;
@@ -793,15 +479,15 @@ function showOperationHints(isCheckbox = false) {
793
479
  }
794
480
 
795
481
  // src/utils/config.ts
796
- import { existsSync as existsSync4, mkdirSync, readFileSync as readFileSync3, writeFileSync } from "fs";
797
- import { join as join5 } from "path";
482
+ import { existsSync as existsSync4, mkdirSync, readFileSync as readFileSync4, writeFileSync } from "fs";
483
+ import { join as join6 } from "path";
798
484
  import { homedir as homedir3 } from "os";
799
485
  import { parse, stringify } from "yaml";
800
486
  function getConfigDir() {
801
- return join5(homedir3(), ".cannbot");
487
+ return join6(homedir3(), ".cannbot");
802
488
  }
803
489
  function getConfigPath() {
804
- return join5(getConfigDir(), "config.yaml");
490
+ return join6(getConfigDir(), "config.yaml");
805
491
  }
806
492
  function readConfig() {
807
493
  const configPath = getConfigPath();
@@ -812,7 +498,7 @@ function readConfig() {
812
498
  };
813
499
  }
814
500
  try {
815
- const content = readFileSync3(configPath, "utf-8");
501
+ const content = readFileSync4(configPath, "utf-8");
816
502
  const parsed = parse(content);
817
503
  return {
818
504
  language: parsed.language || "zh_CN",
@@ -1118,19 +804,19 @@ async function stepConfirm(tool, level, plugins) {
1118
804
  }
1119
805
 
1120
806
  // src/core/repository.ts
1121
- import { existsSync as existsSync6, mkdirSync as mkdirSync3, readFileSync as readFileSync5 } from "fs";
1122
- import { join as join7, dirname as dirname3 } from "path";
1123
- import { fileURLToPath as fileURLToPath3 } from "url";
807
+ import { existsSync as existsSync6, mkdirSync as mkdirSync3, readFileSync as readFileSync6 } from "fs";
808
+ import { join as join8, dirname as dirname4 } from "path";
809
+ import { fileURLToPath as fileURLToPath4 } from "url";
1124
810
  import { execa as execa2 } from "execa";
1125
811
  import { parse as parseYaml3 } from "yaml";
1126
812
 
1127
813
  // src/core/scanner.ts
1128
- import { existsSync as existsSync5, readdirSync as readdirSync2, readFileSync as readFileSync4, statSync, writeFileSync as writeFileSync2, mkdirSync as mkdirSync2 } from "fs";
1129
- import { join as join6, dirname as dirname2 } from "path";
1130
- import { fileURLToPath as fileURLToPath2 } from "url";
814
+ import { existsSync as existsSync5, readdirSync as readdirSync2, readFileSync as readFileSync5, statSync, writeFileSync as writeFileSync2, mkdirSync as mkdirSync2 } from "fs";
815
+ import { join as join7, dirname as dirname3 } from "path";
816
+ import { fileURLToPath as fileURLToPath3 } from "url";
1131
817
  import { parse as parseYaml2 } from "yaml";
1132
- var __filename2 = fileURLToPath2(import.meta.url);
1133
- var __dirname2 = dirname2(__filename2);
818
+ var __filename3 = fileURLToPath3(import.meta.url);
819
+ var __dirname3 = dirname3(__filename3);
1134
820
  var EXCLUDE_DIRS = /* @__PURE__ */ new Set([
1135
821
  "node_modules",
1136
822
  ".git",
@@ -1152,9 +838,9 @@ var EXCLUDE_DIRS = /* @__PURE__ */ new Set([
1152
838
  "scripts"
1153
839
  ]);
1154
840
  function loadScanConfig() {
1155
- const configPath = join6(__dirname2, "config", "defaults.yaml");
841
+ const configPath = join7(__dirname3, "config", "repository.yaml");
1156
842
  try {
1157
- const config = parseYaml2(readFileSync4(configPath, "utf-8"));
843
+ const config = parseYaml2(readFileSync5(configPath, "utf-8"));
1158
844
  return {
1159
845
  skillDirs: config.scanDirs || ["ops", "model", "graph", "infra", "ops-lab"],
1160
846
  pluginDirs: config.pluginDirs || ["plugins-official", "plugins-community"]
@@ -1173,21 +859,21 @@ function scanSkills(repoPath) {
1173
859
  const skills = [];
1174
860
  const seen = /* @__PURE__ */ new Set();
1175
861
  for (const dir of SKILL_SCAN_DIRS) {
1176
- const fullPath = join6(repoPath, dir);
862
+ const fullPath = join7(repoPath, dir);
1177
863
  if (!existsSync5(fullPath)) continue;
1178
864
  scanDirectory(fullPath, repoPath, dir, skills, seen);
1179
865
  }
1180
866
  for (const pluginDir of PLUGIN_SCAN_DIRS) {
1181
- const pluginParent = join6(repoPath, pluginDir);
867
+ const pluginParent = join7(repoPath, pluginDir);
1182
868
  if (!existsSync5(pluginParent)) continue;
1183
869
  for (const plugin of safeReaddir(pluginParent)) {
1184
- const pluginPath = join6(pluginParent, plugin);
870
+ const pluginPath = join7(pluginParent, plugin);
1185
871
  if (!isDirectory(pluginPath)) continue;
1186
- const skillsDir = join6(pluginPath, "skills");
872
+ const skillsDir = join7(pluginPath, "skills");
1187
873
  if (existsSync5(skillsDir)) {
1188
874
  scanDirectory(skillsDir, repoPath, `${pluginDir}/${plugin}/skills`, skills, seen);
1189
875
  }
1190
- const skillDir = join6(pluginPath, "skill");
876
+ const skillDir = join7(pluginPath, "skill");
1191
877
  if (existsSync5(skillDir)) {
1192
878
  scanDirectory(skillDir, repoPath, `${pluginDir}/${plugin}/skill`, skills, seen);
1193
879
  }
@@ -1197,7 +883,7 @@ function scanSkills(repoPath) {
1197
883
  }
1198
884
  function parseFrontmatter(filePath) {
1199
885
  try {
1200
- const content = readFileSync4(filePath, "utf-8");
886
+ const content = readFileSync5(filePath, "utf-8");
1201
887
  const lines = content.split("\n");
1202
888
  if (lines.length < 3) return null;
1203
889
  if (lines[0].trim() !== "---") return null;
@@ -1223,17 +909,17 @@ function parseFrontmatter(filePath) {
1223
909
  }
1224
910
  function getCurrentCommit(repoPath) {
1225
911
  try {
1226
- const headFile = join6(repoPath, ".git", "HEAD");
912
+ const headFile = join7(repoPath, ".git", "HEAD");
1227
913
  if (!existsSync5(headFile)) return "unknown";
1228
- const headContent = readFileSync4(headFile, "utf-8").trim();
914
+ const headContent = readFileSync5(headFile, "utf-8").trim();
1229
915
  if (headContent.startsWith("ref: ")) {
1230
- const refPath = join6(repoPath, ".git", headContent.slice(5));
916
+ const refPath = join7(repoPath, ".git", headContent.slice(5));
1231
917
  if (existsSync5(refPath)) {
1232
- return readFileSync4(refPath, "utf-8").trim();
918
+ return readFileSync5(refPath, "utf-8").trim();
1233
919
  }
1234
- const packedRefsPath = join6(repoPath, ".git", "packed-refs");
920
+ const packedRefsPath = join7(repoPath, ".git", "packed-refs");
1235
921
  if (existsSync5(packedRefsPath)) {
1236
- const packedRefs = readFileSync4(packedRefsPath, "utf-8");
922
+ const packedRefs = readFileSync5(packedRefsPath, "utf-8");
1237
923
  const refName = headContent.slice(5);
1238
924
  const lines = packedRefs.split("\n");
1239
925
  for (const line of lines) {
@@ -1252,7 +938,7 @@ function readScanCache() {
1252
938
  try {
1253
939
  const cachePath = getCachePath();
1254
940
  if (!existsSync5(cachePath)) return null;
1255
- const content = readFileSync4(cachePath, "utf-8");
941
+ const content = readFileSync5(cachePath, "utf-8");
1256
942
  const cache = JSON.parse(content);
1257
943
  if (!cache.skills || !cache.timestamp) return null;
1258
944
  const age = Date.now() - cache.timestamp;
@@ -1265,7 +951,7 @@ function readScanCache() {
1265
951
  function writeScanCache(cache) {
1266
952
  try {
1267
953
  const cachePath = getCachePath();
1268
- const cacheDir = dirname2(cachePath);
954
+ const cacheDir = dirname3(cachePath);
1269
955
  if (!existsSync5(cacheDir)) {
1270
956
  mkdirSync2(cacheDir, { recursive: true });
1271
957
  }
@@ -1274,10 +960,10 @@ function writeScanCache(cache) {
1274
960
  }
1275
961
  }
1276
962
  function getCachePath() {
1277
- return join6(getCannbotConfigDir(), "scan-cache.json");
963
+ return join7(getCannbotConfigDir(), "scan-cache.json");
1278
964
  }
1279
965
  function scanDirectory(dirPath, repoPath, sourcePrefix, skills, seen) {
1280
- const selfSkillMd = join6(dirPath, "SKILL.md");
966
+ const selfSkillMd = join7(dirPath, "SKILL.md");
1281
967
  if (existsSync5(selfSkillMd)) {
1282
968
  const frontmatter = parseFrontmatter(selfSkillMd);
1283
969
  if (frontmatter && !seen.has(frontmatter.name)) {
@@ -1292,10 +978,10 @@ function scanDirectory(dirPath, repoPath, sourcePrefix, skills, seen) {
1292
978
  return;
1293
979
  }
1294
980
  for (const entry of safeReaddir(dirPath)) {
1295
- const fullPath = join6(dirPath, entry);
981
+ const fullPath = join7(dirPath, entry);
1296
982
  if (EXCLUDE_DIRS.has(entry)) continue;
1297
983
  if (!isDirectory(fullPath)) continue;
1298
- const skillMd = join6(fullPath, "SKILL.md");
984
+ const skillMd = join7(fullPath, "SKILL.md");
1299
985
  if (existsSync5(skillMd)) {
1300
986
  const frontmatter = parseFrontmatter(skillMd);
1301
987
  if (frontmatter && !seen.has(frontmatter.name)) {
@@ -1554,15 +1240,15 @@ function getAllCategories() {
1554
1240
  }
1555
1241
 
1556
1242
  // src/core/repository.ts
1557
- var __filename3 = fileURLToPath3(import.meta.url);
1558
- var __dirname3 = dirname3(__filename3);
1243
+ var __filename4 = fileURLToPath4(import.meta.url);
1244
+ var __dirname4 = dirname4(__filename4);
1559
1245
  function loadRepoUrl() {
1560
1246
  if (process.env.CANNBOT_REPO_URL) {
1561
1247
  return process.env.CANNBOT_REPO_URL;
1562
1248
  }
1563
- const configPath = join7(__dirname3, "config", "defaults.yaml");
1249
+ const configPath = join8(__dirname4, "config", "repository.yaml");
1564
1250
  try {
1565
- const config = parseYaml3(readFileSync5(configPath, "utf-8"));
1251
+ const config = parseYaml3(readFileSync6(configPath, "utf-8"));
1566
1252
  return config.repository?.url || "https://gitcode.com/cann/cannbot-skills.git";
1567
1253
  } catch {
1568
1254
  return "https://gitcode.com/cann/cannbot-skills.git";
@@ -1626,8 +1312,8 @@ var RepositoryManager = class {
1626
1312
  }
1627
1313
  isValidRepo(path) {
1628
1314
  if (!existsSync6(path)) return false;
1629
- const gitDir = join7(path, ".git");
1630
- const pluginsDir = join7(path, "plugins-official");
1315
+ const gitDir = join8(path, ".git");
1316
+ const pluginsDir = join8(path, "plugins-official");
1631
1317
  return existsSync6(gitDir) && existsSync6(pluginsDir);
1632
1318
  }
1633
1319
  async cloneRepo() {
@@ -1663,17 +1349,17 @@ function createRepositoryManager(customPath) {
1663
1349
 
1664
1350
  // src/core/installer.ts
1665
1351
  import { existsSync as existsSync9 } from "fs";
1666
- import { join as join10 } from "path";
1352
+ import { join as join11 } from "path";
1667
1353
  import { execa as execa3 } from "execa";
1668
1354
 
1669
1355
  // src/core/record.ts
1670
- import { existsSync as existsSync7, mkdirSync as mkdirSync4, readFileSync as readFileSync6, writeFileSync as writeFileSync4, lstatSync, unlinkSync } from "fs";
1671
- import { join as join8 } from "path";
1356
+ import { existsSync as existsSync7, mkdirSync as mkdirSync4, readFileSync as readFileSync7, writeFileSync as writeFileSync4, lstatSync, unlinkSync } from "fs";
1357
+ import { join as join9 } from "path";
1672
1358
  function getInstallsDir() {
1673
- return join8(getCannbotConfigDir(), "installs");
1359
+ return join9(getCannbotConfigDir(), "installs");
1674
1360
  }
1675
1361
  function getRecordPath(pluginId) {
1676
- return join8(getInstallsDir(), `${pluginId}.json`);
1362
+ return join9(getInstallsDir(), `${pluginId}.json`);
1677
1363
  }
1678
1364
  function readRecord(pluginId) {
1679
1365
  const recordPath = getRecordPath(pluginId);
@@ -1681,7 +1367,7 @@ function readRecord(pluginId) {
1681
1367
  return null;
1682
1368
  }
1683
1369
  try {
1684
- const content = readFileSync6(recordPath, "utf-8");
1370
+ const content = readFileSync7(recordPath, "utf-8");
1685
1371
  return JSON.parse(content);
1686
1372
  } catch {
1687
1373
  return null;
@@ -1705,22 +1391,22 @@ function scanInstalledFiles(pluginId, displayName, tool, level, installPath, con
1705
1391
  const files = [];
1706
1392
  const directories = [];
1707
1393
  if (manifest) {
1708
- const skillsDir = join8(configRoot, "skills");
1394
+ const skillsDir = join9(configRoot, "skills");
1709
1395
  if (existsSync7(skillsDir)) {
1710
1396
  directories.push(skillsDir);
1711
1397
  for (const skillName of manifest.installed_skills || []) {
1712
- const skillPath = join8(skillsDir, skillName);
1398
+ const skillPath = join9(skillsDir, skillName);
1713
1399
  if (existsSync7(skillPath) || isSymlink(skillPath)) {
1714
1400
  files.push(skillPath);
1715
1401
  }
1716
1402
  }
1717
1403
  }
1718
- const agentsDir = join8(configRoot, "agents");
1404
+ const agentsDir = join9(configRoot, "agents");
1719
1405
  if (existsSync7(agentsDir)) {
1720
1406
  directories.push(agentsDir);
1721
1407
  for (const agentName of manifest.installed_agents || []) {
1722
- const agentPath = join8(agentsDir, agentName);
1723
- const agentPathMd = join8(agentsDir, agentName + ".md");
1408
+ const agentPath = join9(agentsDir, agentName);
1409
+ const agentPathMd = join9(agentsDir, agentName + ".md");
1724
1410
  if (existsSync7(agentPath) || isSymlink(agentPath)) {
1725
1411
  files.push(agentPath);
1726
1412
  } else if (existsSync7(agentPathMd) || isSymlink(agentPathMd)) {
@@ -1729,30 +1415,30 @@ function scanInstalledFiles(pluginId, displayName, tool, level, installPath, con
1729
1415
  }
1730
1416
  }
1731
1417
  }
1732
- const workflowsLink = join8(configRoot, "workflows");
1418
+ const workflowsLink = join9(configRoot, "workflows");
1733
1419
  if (isSymlink(workflowsLink)) {
1734
1420
  files.push(workflowsLink);
1735
1421
  }
1736
- const manifestPath = join8(configRoot, "cannbot-manifest.json");
1422
+ const manifestPath = join9(configRoot, "cannbot-manifest.json");
1737
1423
  if (existsSync7(manifestPath)) {
1738
1424
  files.push(manifestPath);
1739
1425
  }
1740
- const pluginManifestPath = join8(configRoot, `${pluginId}-manifest.json`);
1426
+ const pluginManifestPath = join9(configRoot, `${pluginId}-manifest.json`);
1741
1427
  if (existsSync7(pluginManifestPath)) {
1742
1428
  files.push(pluginManifestPath);
1743
1429
  }
1744
1430
  const configFileName = tool === "claude" ? "CLAUDE.md" : "AGENTS.md";
1745
- const configFilePath = level === "project" ? join8(installPath, configFileName) : join8(configRoot, configFileName);
1431
+ const configFilePath = level === "project" ? join9(installPath, configFileName) : join9(configRoot, configFileName);
1746
1432
  if (existsSync7(configFilePath)) {
1747
1433
  files.push(configFilePath);
1748
1434
  }
1749
1435
  const repoLinks = ["asc-devkit", "pypto", "tilelang-ascend", "cann-recipes-infer", "cann-samples"];
1750
1436
  for (const repoName of repoLinks) {
1751
- const repoLinkPath = join8(installPath, repoName);
1437
+ const repoLinkPath = join9(installPath, repoName);
1752
1438
  if (isSymlink(repoLinkPath)) {
1753
1439
  files.push(repoLinkPath);
1754
1440
  }
1755
- const repoLinkInConfig = join8(configRoot, repoName);
1441
+ const repoLinkInConfig = join9(configRoot, repoName);
1756
1442
  if (isSymlink(repoLinkInConfig)) {
1757
1443
  files.push(repoLinkInConfig);
1758
1444
  }
@@ -1777,7 +1463,7 @@ function isSymlink(path) {
1777
1463
  }
1778
1464
  }
1779
1465
  function getSkillRecordPath() {
1780
- return join8(getInstallsDir(), "skills.json");
1466
+ return join9(getInstallsDir(), "skills.json");
1781
1467
  }
1782
1468
  function readSkillRecord() {
1783
1469
  const recordPath = getSkillRecordPath();
@@ -1785,7 +1471,7 @@ function readSkillRecord() {
1785
1471
  return {};
1786
1472
  }
1787
1473
  try {
1788
- const content = readFileSync6(recordPath, "utf-8");
1474
+ const content = readFileSync7(recordPath, "utf-8");
1789
1475
  return JSON.parse(content);
1790
1476
  } catch {
1791
1477
  return {};
@@ -1835,16 +1521,16 @@ function getInstalledSkills(tool, level, installPath) {
1835
1521
  const record = readSkillRecord();
1836
1522
  const recordedSkills = record[tool]?.[level]?.[installPath]?.skills || [];
1837
1523
  const configRoot = getConfigRoot(tool, level);
1838
- const skillsDir = join8(configRoot, "skills");
1524
+ const skillsDir = join9(configRoot, "skills");
1839
1525
  return recordedSkills.filter((skillId) => {
1840
- const skillPath = join8(skillsDir, skillId);
1526
+ const skillPath = join9(skillsDir, skillId);
1841
1527
  return existsSync7(skillPath) || isSymlink(skillPath);
1842
1528
  });
1843
1529
  }
1844
1530
 
1845
1531
  // src/core/backup.ts
1846
1532
  import { existsSync as existsSync8, copyFileSync, readdirSync as readdirSync3, unlinkSync as unlinkSync2 } from "fs";
1847
- import { join as join9 } from "path";
1533
+ import { join as join10 } from "path";
1848
1534
  function getAgentsFileName(tool) {
1849
1535
  return tool === "claude" ? "CLAUDE.md" : "AGENTS.md";
1850
1536
  }
@@ -1859,7 +1545,7 @@ function detectCurrentPlugin(configRoot, tool) {
1859
1545
  };
1860
1546
  }
1861
1547
  }
1862
- const agentsFile = join9(configRoot, getAgentsFileName(tool));
1548
+ const agentsFile = join10(configRoot, getAgentsFileName(tool));
1863
1549
  if (!existsSync8(agentsFile)) {
1864
1550
  return null;
1865
1551
  }
@@ -1878,13 +1564,13 @@ function detectCurrentPlugin(configRoot, tool) {
1878
1564
  return null;
1879
1565
  }
1880
1566
  function createBackup(configRoot, tool, fromPluginId, fromPluginName) {
1881
- const agentsFile = join9(configRoot, getAgentsFileName(tool));
1567
+ const agentsFile = join10(configRoot, getAgentsFileName(tool));
1882
1568
  if (!existsSync8(agentsFile)) {
1883
1569
  return null;
1884
1570
  }
1885
1571
  const timestamp = formatTimestamp(/* @__PURE__ */ new Date());
1886
1572
  const backupFileName = `${getAgentsFileName(tool)}.cannbot-backup.${fromPluginId}.${timestamp}`;
1887
- const backupPath = join9(configRoot, backupFileName);
1573
+ const backupPath = join10(configRoot, backupFileName);
1888
1574
  try {
1889
1575
  copyFileSync(agentsFile, backupPath);
1890
1576
  return {
@@ -1914,7 +1600,7 @@ function findBackups(configRoot) {
1914
1600
  const timestamp = pluginIdAndTime.substring(lastDotIndex + 1);
1915
1601
  const plugin = findPlugin(pluginId);
1916
1602
  backups.push({
1917
- filePath: join9(configRoot, file),
1603
+ filePath: join10(configRoot, file),
1918
1604
  pluginId,
1919
1605
  pluginName: plugin?.displayName || pluginId,
1920
1606
  backupTime: timestamp
@@ -1927,7 +1613,7 @@ function findBackups(configRoot) {
1927
1613
  }
1928
1614
  function restoreBackup(backupPath, configRoot, tool) {
1929
1615
  try {
1930
- const agentsFile = join9(configRoot, getAgentsFileName(tool));
1616
+ const agentsFile = join10(configRoot, getAgentsFileName(tool));
1931
1617
  copyFileSync(backupPath, agentsFile);
1932
1618
  return true;
1933
1619
  } catch {
@@ -2028,7 +1714,7 @@ async function installPlugin(opts) {
2028
1714
  warnings: []
2029
1715
  };
2030
1716
  }
2031
- const scriptPath = join10(opts.repoPath, plugin.dir, plugin.script);
1717
+ const scriptPath = join11(opts.repoPath, plugin.dir, plugin.script);
2032
1718
  if (!existsSync9(scriptPath)) {
2033
1719
  return {
2034
1720
  success: false,
@@ -2045,7 +1731,7 @@ async function installPlugin(opts) {
2045
1731
  }
2046
1732
  const cwd = opts.installPath || process.cwd();
2047
1733
  const configRoot = getConfigRoot(opts.tool, opts.level, opts.installPath);
2048
- const agentsFile = join10(configRoot, getAgentsFileName(opts.tool));
1734
+ const agentsFile = join11(configRoot, getAgentsFileName(opts.tool));
2049
1735
  let backupInfo = null;
2050
1736
  if (existsSync9(agentsFile)) {
2051
1737
  const currentPlugin = detectCurrentPlugin(configRoot, opts.tool);
@@ -2141,13 +1827,13 @@ async function installPlugin(opts) {
2141
1827
 
2142
1828
  // src/core/skill-installer.ts
2143
1829
  import { existsSync as existsSync10, mkdirSync as mkdirSync5, symlinkSync, unlinkSync as unlinkSync3, readdirSync as readdirSync4, rmdirSync, realpathSync, lstatSync as lstatSync2 } from "fs";
2144
- import { join as join11 } from "path";
1830
+ import { join as join12 } from "path";
2145
1831
  import { select as select3, checkbox as checkbox2, Separator as Separator2 } from "@inquirer/prompts";
2146
1832
  import chalk4 from "chalk";
2147
1833
  import Table from "cli-table3";
2148
1834
  async function installSkills(skillIds, tool, level, repoPath) {
2149
1835
  const configRoot = getConfigRoot(tool, level);
2150
- const skillsDir = join11(configRoot, "skills");
1836
+ const skillsDir = join12(configRoot, "skills");
2151
1837
  const installPath = level === "project" ? process.cwd() : configRoot;
2152
1838
  if (!existsSync10(skillsDir)) {
2153
1839
  mkdirSync5(skillsDir, { recursive: true });
@@ -2160,8 +1846,8 @@ async function installSkills(skillIds, tool, level, repoPath) {
2160
1846
  results.push({ skillId, success: false, error: "Skill not found in registry" });
2161
1847
  continue;
2162
1848
  }
2163
- const sourcePath = join11(repoPath, skill.source, skill.id);
2164
- const targetPath = join11(skillsDir, skillId);
1849
+ const sourcePath = join12(repoPath, skill.source, skill.id);
1850
+ const targetPath = join12(skillsDir, skillId);
2165
1851
  if (!existsSync10(sourcePath)) {
2166
1852
  results.push({ skillId, success: false, error: `Source not found: ${sourcePath}` });
2167
1853
  continue;
@@ -2184,12 +1870,12 @@ async function installSkills(skillIds, tool, level, repoPath) {
2184
1870
  }
2185
1871
  async function uninstallSkills(skillIds, tool, level) {
2186
1872
  const configRoot = getConfigRoot(tool, level);
2187
- const skillsDir = join11(configRoot, "skills");
1873
+ const skillsDir = join12(configRoot, "skills");
2188
1874
  const installPath = level === "project" ? process.cwd() : configRoot;
2189
1875
  const results = [];
2190
1876
  const removedIds = [];
2191
1877
  for (const skillId of skillIds) {
2192
- const targetPath = join11(skillsDir, skillId);
1878
+ const targetPath = join12(skillsDir, skillId);
2193
1879
  try {
2194
1880
  if (existsSync10(targetPath) || isSymlink2(targetPath)) {
2195
1881
  unlinkSync3(targetPath);
@@ -2421,15 +2107,15 @@ function printEnhancedSummary(results, tool, configRoot) {
2421
2107
  }
2422
2108
 
2423
2109
  // src/commands/init.ts
2424
- import { existsSync as existsSync11, readFileSync as readFileSync7 } from "fs";
2425
- import { join as join12 } from "path";
2110
+ import { existsSync as existsSync11, readFileSync as readFileSync8 } from "fs";
2111
+ import { join as join13 } from "path";
2426
2112
  var BACK2 = "__back__";
2427
2113
  var CANCEL2 = "__cancel__";
2428
2114
  async function initCommand() {
2429
2115
  const cwd = process.cwd();
2430
- if (existsSync11(join12(cwd, "package.json")) && (() => {
2116
+ if (existsSync11(join13(cwd, "package.json")) && (() => {
2431
2117
  try {
2432
- const pkg = JSON.parse(readFileSync7(join12(cwd, "package.json"), "utf-8"));
2118
+ const pkg = JSON.parse(readFileSync8(join13(cwd, "package.json"), "utf-8"));
2433
2119
  return pkg.name === "@cannbot-ai/install-helper";
2434
2120
  } catch {
2435
2121
  return false;
@@ -2656,7 +2342,7 @@ async function listCommand() {
2656
2342
  // src/commands/doctor.ts
2657
2343
  import chalk7 from "chalk";
2658
2344
  import { existsSync as existsSync12, readdirSync as readdirSync5, lstatSync as lstatSync3, unlinkSync as unlinkSync4, mkdirSync as mkdirSync6 } from "fs";
2659
- import { join as join13 } from "path";
2345
+ import { join as join14 } from "path";
2660
2346
  async function doctorCommand(options = {}) {
2661
2347
  console.log();
2662
2348
  console.log(chalk7.bold(` ${t("doctor_title")}`));
@@ -2746,7 +2432,7 @@ async function doctorCommand(options = {}) {
2746
2432
  console.log();
2747
2433
  console.log(chalk7.bold(` ${t("doctor_config")}`));
2748
2434
  const configFile = getConfigFileName(primaryTool);
2749
- const configPath = join13(process.cwd(), configFile);
2435
+ const configPath = join14(process.cwd(), configFile);
2750
2436
  if (existsSync12(configPath)) {
2751
2437
  console.log(chalk7.green(" \u2713") + ` ${configFile} ${t("doctor_config_exists")}`);
2752
2438
  } else {
@@ -2770,7 +2456,7 @@ function checkBrokenLinks(dir) {
2770
2456
  try {
2771
2457
  const entries = readdirSync5(dir);
2772
2458
  for (const entry of entries) {
2773
- const fullPath = join13(dir, entry);
2459
+ const fullPath = join14(dir, entry);
2774
2460
  try {
2775
2461
  const stats = lstatSync3(fullPath);
2776
2462
  if (stats.isSymbolicLink()) {
@@ -2791,7 +2477,7 @@ function fixBrokenLinks(dir) {
2791
2477
  try {
2792
2478
  const entries = readdirSync5(dir);
2793
2479
  for (const entry of entries) {
2794
- const fullPath = join13(dir, entry);
2480
+ const fullPath = join14(dir, entry);
2795
2481
  try {
2796
2482
  const stats = lstatSync3(fullPath);
2797
2483
  if (stats.isSymbolicLink()) {
@@ -3266,7 +2952,7 @@ async function updateCommand(pluginNames, options) {
3266
2952
  // src/commands/info.ts
3267
2953
  import chalk12 from "chalk";
3268
2954
  import { existsSync as existsSync14, readdirSync as readdirSync7 } from "fs";
3269
- import { join as join14 } from "path";
2955
+ import { join as join15 } from "path";
3270
2956
  async function infoCommand(pluginName) {
3271
2957
  const plugin = findPlugin(pluginName);
3272
2958
  if (!plugin) {
@@ -3290,11 +2976,11 @@ async function infoCommand(pluginName) {
3290
2976
  try {
3291
2977
  const repoManager = createRepositoryManager();
3292
2978
  const repoPath = await repoManager.ensureRepo();
3293
- const quickstartPath = join14(repoPath, plugin.dir, "quickstart.md");
2979
+ const quickstartPath = join15(repoPath, plugin.dir, "quickstart.md");
3294
2980
  if (existsSync14(quickstartPath)) {
3295
2981
  console.log(` ${chalk12.dim(t("info_quickstart") + ":")} ${quickstartPath}`);
3296
2982
  }
3297
- const agentsDir = join14(repoPath, plugin.dir, "agents");
2983
+ const agentsDir = join15(repoPath, plugin.dir, "agents");
3298
2984
  if (existsSync14(agentsDir)) {
3299
2985
  const agentFiles = readdirSync7(agentsDir).filter((f) => f.endsWith(".md"));
3300
2986
  if (agentFiles.length > 0) {
@@ -3353,7 +3039,7 @@ function createCLI() {
3353
3039
  setLanguage(config.language);
3354
3040
  }
3355
3041
  const program2 = new Command();
3356
- program2.name("install-helper").description("CANNBot Install Helper - Interactive installer for CANN operator development skills").version("0.0.2-beta.16");
3042
+ program2.name("install-helper").description("CANNBot Install Helper - Interactive installer for CANN operator development skills").version("1.0.3");
3357
3043
  program2.command("init", { isDefault: false }).description("Run interactive installation wizard").action(async () => {
3358
3044
  await initCommand();
3359
3045
  });