ccjk 2.6.2 → 3.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/agent.mjs +1412 -0
- package/dist/chunks/api.mjs +7 -7
- package/dist/chunks/auto-updater.mjs +9 -9
- package/dist/chunks/ccr.mjs +4 -4
- package/dist/chunks/ccu.mjs +1 -1
- package/dist/chunks/claude-code-incremental-manager.mjs +6 -6
- package/dist/chunks/codex.mjs +4 -4
- package/dist/chunks/commands2.mjs +5 -5
- package/dist/chunks/commit.mjs +2 -2
- package/dist/chunks/config-consolidator.mjs +2 -2
- package/dist/chunks/config-switch.mjs +6 -6
- package/dist/chunks/config.mjs +1 -1
- package/dist/chunks/config2.mjs +14 -14
- package/dist/chunks/doctor.mjs +3 -3
- package/dist/chunks/features.mjs +12 -12
- package/dist/chunks/help.mjs +35 -35
- package/dist/chunks/index.mjs +11 -11
- package/dist/chunks/init.mjs +21 -21
- package/dist/chunks/interview.mjs +33 -33
- package/dist/chunks/marketplace.mjs +8 -8
- package/dist/chunks/mcp.mjs +8 -8
- package/dist/chunks/menu.mjs +302 -293
- package/dist/chunks/notification.mjs +5 -5
- package/dist/chunks/onboarding.mjs +7 -7
- package/dist/chunks/package.mjs +1 -1
- package/dist/chunks/permission-manager.mjs +3 -3
- package/dist/chunks/plugin.mjs +24 -24
- package/dist/chunks/prompts.mjs +3 -3
- package/dist/chunks/providers.mjs +13 -13
- package/dist/chunks/session.mjs +17 -17
- package/dist/chunks/skill.mjs +304 -0
- package/dist/chunks/skills-sync.mjs +4 -4
- package/dist/chunks/skills.mjs +2 -2
- package/dist/chunks/team.mjs +1 -1
- package/dist/chunks/uninstall.mjs +8 -8
- package/dist/chunks/update.mjs +4 -4
- package/dist/chunks/upgrade-manager.mjs +3 -3
- package/dist/chunks/version-checker.mjs +6 -6
- package/dist/chunks/workflows.mjs +2 -2
- package/dist/cli.mjs +48 -0
- package/dist/index.d.mts +157 -14
- package/dist/index.d.ts +157 -14
- package/dist/index.mjs +4 -4
- package/dist/shared/{ccjk.rLRHmcqD.mjs → ccjk.BQzWKmC3.mjs} +3 -3
- package/dist/shared/{ccjk.uVUeWAt8.mjs → ccjk.BZT_f2go.mjs} +7 -7
- package/dist/shared/{ccjk.-FoZ3zat.mjs → ccjk.BlPCiSHj.mjs} +10 -10
- package/dist/shared/ccjk.DH6cOJsf.mjs +1674 -0
- package/dist/shared/{ccjk.tB4-Y4Qb.mjs → ccjk.DrMygfCF.mjs} +1 -1
- package/dist/shared/ccjk.tJ08-yZt.mjs +179 -0
- package/package.json +1 -1
- package/dist/shared/ccjk.BhKlRJ0h.mjs +0 -114
|
@@ -0,0 +1,304 @@
|
|
|
1
|
+
import chalk from 'chalk';
|
|
2
|
+
import { g as getPluginManager } from '../shared/ccjk.DH6cOJsf.mjs';
|
|
3
|
+
import 'node:fs';
|
|
4
|
+
import 'node:os';
|
|
5
|
+
import 'pathe';
|
|
6
|
+
import 'tinyexec';
|
|
7
|
+
import 'node:child_process';
|
|
8
|
+
|
|
9
|
+
async function handleSkillCommand(args, options = {}) {
|
|
10
|
+
const subcommand = args[0];
|
|
11
|
+
const restArgs = args.slice(1);
|
|
12
|
+
switch (subcommand) {
|
|
13
|
+
case "install":
|
|
14
|
+
case "add":
|
|
15
|
+
await installSkill(restArgs[0], options);
|
|
16
|
+
break;
|
|
17
|
+
case "list":
|
|
18
|
+
case "ls":
|
|
19
|
+
await listSkills(options);
|
|
20
|
+
break;
|
|
21
|
+
case "info":
|
|
22
|
+
case "show":
|
|
23
|
+
await showSkillInfo(restArgs[0], options);
|
|
24
|
+
break;
|
|
25
|
+
case "remove":
|
|
26
|
+
case "rm":
|
|
27
|
+
case "uninstall":
|
|
28
|
+
await removeSkill(restArgs[0]);
|
|
29
|
+
break;
|
|
30
|
+
case "search":
|
|
31
|
+
await searchSkills(restArgs.join(" "));
|
|
32
|
+
break;
|
|
33
|
+
default:
|
|
34
|
+
showSkillHelp();
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
async function installSkill(source, options) {
|
|
38
|
+
if (!source) {
|
|
39
|
+
console.log(chalk.red("Error: Please specify a skill source"));
|
|
40
|
+
console.log(chalk.dim("Example: skill install vercel-labs/agent-skills/skills/react-best-practices"));
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
console.log(chalk.cyan(`
|
|
44
|
+
\u{1F4E6} Installing skill from: ${source}
|
|
45
|
+
`));
|
|
46
|
+
const manager = await getPluginManager();
|
|
47
|
+
const result = await manager.install(source, { force: options.force });
|
|
48
|
+
if (result.success) {
|
|
49
|
+
console.log(chalk.green(`\u2705 Successfully installed: ${result.pluginId}`));
|
|
50
|
+
console.log(chalk.dim(` Version: ${result.version}`));
|
|
51
|
+
console.log(chalk.dim(` Path: ${result.path}`));
|
|
52
|
+
const plugin = manager.getPlugin(result.pluginId);
|
|
53
|
+
if (plugin?.skill) {
|
|
54
|
+
console.log("");
|
|
55
|
+
console.log(chalk.bold("Skill Info:"));
|
|
56
|
+
console.log(chalk.dim(` ${plugin.skill.description}`));
|
|
57
|
+
if (plugin.skill.applicability.taskTypes.length > 0) {
|
|
58
|
+
console.log("");
|
|
59
|
+
console.log(chalk.bold("When to use:"));
|
|
60
|
+
for (const task of plugin.skill.applicability.taskTypes.slice(0, 3)) {
|
|
61
|
+
console.log(chalk.dim(` \u2022 ${task}`));
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
} else {
|
|
66
|
+
console.log(chalk.red(`\u274C Installation failed: ${result.error}`));
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
async function listSkills(options) {
|
|
70
|
+
const manager = await getPluginManager();
|
|
71
|
+
const plugins = manager.listPlugins();
|
|
72
|
+
const skills = plugins.filter((p) => p.skill || p.manifest.formatVersion === "2.0");
|
|
73
|
+
if (options.json) {
|
|
74
|
+
console.log(JSON.stringify(skills.map((s) => ({
|
|
75
|
+
id: s.manifest.id,
|
|
76
|
+
name: s.manifest.name.en,
|
|
77
|
+
version: s.manifest.version,
|
|
78
|
+
hasSkill: !!s.skill,
|
|
79
|
+
scripts: s.scripts?.length ?? 0
|
|
80
|
+
})), null, 2));
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
console.log(chalk.cyan("\n\u{1F4DA} Installed Skills\n"));
|
|
84
|
+
if (skills.length === 0) {
|
|
85
|
+
console.log(chalk.dim("No skills installed yet."));
|
|
86
|
+
console.log(chalk.dim("\nInstall skills with:"));
|
|
87
|
+
console.log(chalk.dim(" skill install vercel-labs/agent-skills/skills/react-best-practices"));
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
for (const skill of skills) {
|
|
91
|
+
const name = skill.manifest.name.en || skill.manifest.id;
|
|
92
|
+
const version = skill.manifest.version;
|
|
93
|
+
const hasScripts = skill.scripts && skill.scripts.length > 0;
|
|
94
|
+
console.log(` ${chalk.bold(name)} ${chalk.dim(`(${skill.manifest.id})`)} ${chalk.dim(`v${version}`)}`);
|
|
95
|
+
if (skill.skill) {
|
|
96
|
+
console.log(chalk.dim(` ${skill.skill.description.substring(0, 60)}...`));
|
|
97
|
+
}
|
|
98
|
+
const badges = [];
|
|
99
|
+
if (hasScripts)
|
|
100
|
+
badges.push("\u{1F4DC} scripts");
|
|
101
|
+
if (skill.intents?.length)
|
|
102
|
+
badges.push("\u{1F3AF} intents");
|
|
103
|
+
if (skill.skill?.rules?.length)
|
|
104
|
+
badges.push(`\u{1F4CB} ${skill.skill.rules.length} rules`);
|
|
105
|
+
if (badges.length > 0) {
|
|
106
|
+
console.log(chalk.dim(` ${badges.join(" \u2022 ")}`));
|
|
107
|
+
}
|
|
108
|
+
console.log("");
|
|
109
|
+
}
|
|
110
|
+
console.log(chalk.dim(`Total: ${skills.length} skills`));
|
|
111
|
+
}
|
|
112
|
+
async function showSkillInfo(skillId, options) {
|
|
113
|
+
if (!skillId) {
|
|
114
|
+
console.log(chalk.red("Error: Please specify a skill ID"));
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
const manager = await getPluginManager();
|
|
118
|
+
const plugin = manager.getPlugin(skillId);
|
|
119
|
+
if (!plugin) {
|
|
120
|
+
console.log(chalk.red(`Skill not found: ${skillId}`));
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
if (options.json) {
|
|
124
|
+
console.log(JSON.stringify({
|
|
125
|
+
manifest: plugin.manifest,
|
|
126
|
+
skill: plugin.skill ? {
|
|
127
|
+
title: plugin.skill.title,
|
|
128
|
+
description: plugin.skill.description,
|
|
129
|
+
applicability: plugin.skill.applicability,
|
|
130
|
+
rulesCount: plugin.skill.rules?.length ?? 0,
|
|
131
|
+
sectionsCount: plugin.skill.sections.length
|
|
132
|
+
} : null,
|
|
133
|
+
scripts: plugin.scripts,
|
|
134
|
+
intents: plugin.intents
|
|
135
|
+
}, null, 2));
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
console.log("");
|
|
139
|
+
console.log(chalk.bold(chalk.cyan(`\u{1F4E6} ${plugin.manifest.name.en}`)));
|
|
140
|
+
console.log(chalk.dim(`ID: ${plugin.manifest.id}`));
|
|
141
|
+
console.log(chalk.dim(`Version: ${plugin.manifest.version}`));
|
|
142
|
+
console.log(chalk.dim(`Category: ${plugin.manifest.category}`));
|
|
143
|
+
console.log("");
|
|
144
|
+
if (plugin.skill) {
|
|
145
|
+
console.log(chalk.bold("\u{1F4D6} Skill Document"));
|
|
146
|
+
console.log(chalk.dim(`Title: ${plugin.skill.title}`));
|
|
147
|
+
console.log(chalk.dim(`Description: ${plugin.skill.description}`));
|
|
148
|
+
console.log("");
|
|
149
|
+
if (plugin.skill.applicability.taskTypes.length > 0) {
|
|
150
|
+
console.log(chalk.bold("\u{1F3AF} When to Apply"));
|
|
151
|
+
for (const task of plugin.skill.applicability.taskTypes) {
|
|
152
|
+
console.log(chalk.dim(` \u2022 ${task}`));
|
|
153
|
+
}
|
|
154
|
+
console.log("");
|
|
155
|
+
}
|
|
156
|
+
if (plugin.skill.rules && plugin.skill.rules.length > 0) {
|
|
157
|
+
console.log(chalk.bold(`\u{1F4CB} Rules (${plugin.skill.rules.length} total)`));
|
|
158
|
+
const byPriority = {
|
|
159
|
+
critical: plugin.skill.rules.filter((r) => r.priority === "critical"),
|
|
160
|
+
high: plugin.skill.rules.filter((r) => r.priority === "high"),
|
|
161
|
+
medium: plugin.skill.rules.filter((r) => r.priority === "medium"),
|
|
162
|
+
low: plugin.skill.rules.filter((r) => r.priority === "low")
|
|
163
|
+
};
|
|
164
|
+
if (byPriority.critical.length > 0) {
|
|
165
|
+
console.log(chalk.red(` \u{1F534} Critical (${byPriority.critical.length})`));
|
|
166
|
+
for (const rule of byPriority.critical.slice(0, 3)) {
|
|
167
|
+
console.log(chalk.dim(` ${rule.id}: ${rule.title}`));
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
if (byPriority.high.length > 0) {
|
|
171
|
+
console.log(chalk.yellow(` \u{1F7E1} High (${byPriority.high.length})`));
|
|
172
|
+
for (const rule of byPriority.high.slice(0, 3)) {
|
|
173
|
+
console.log(chalk.dim(` ${rule.id}: ${rule.title}`));
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
console.log("");
|
|
177
|
+
}
|
|
178
|
+
if (plugin.skill.sections.length > 0) {
|
|
179
|
+
console.log(chalk.bold("\u{1F4D1} Sections"));
|
|
180
|
+
for (const section of plugin.skill.sections) {
|
|
181
|
+
console.log(chalk.dim(` \u2022 ${section.title}`));
|
|
182
|
+
}
|
|
183
|
+
console.log("");
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
if (plugin.scripts && plugin.scripts.length > 0) {
|
|
187
|
+
console.log(chalk.bold("\u{1F4DC} Scripts"));
|
|
188
|
+
for (const script of plugin.scripts) {
|
|
189
|
+
console.log(chalk.dim(` \u2022 ${script.name} (${script.type})`));
|
|
190
|
+
}
|
|
191
|
+
console.log("");
|
|
192
|
+
}
|
|
193
|
+
if (plugin.intents && plugin.intents.length > 0) {
|
|
194
|
+
console.log(chalk.bold("\u{1F3AF} Auto-Activation Intents"));
|
|
195
|
+
for (const intent of plugin.intents) {
|
|
196
|
+
console.log(chalk.dim(` \u2022 ${intent.name.en}`));
|
|
197
|
+
console.log(chalk.dim(` Patterns: ${intent.patterns.slice(0, 2).join(", ")}...`));
|
|
198
|
+
}
|
|
199
|
+
console.log("");
|
|
200
|
+
}
|
|
201
|
+
console.log(chalk.bold("\u{1F4CD} Source"));
|
|
202
|
+
console.log(chalk.dim(` Type: ${plugin.source.type}`));
|
|
203
|
+
if (plugin.source.type === "local") {
|
|
204
|
+
console.log(chalk.dim(` Path: ${plugin.source.path}`));
|
|
205
|
+
} else if (plugin.source.type === "github") {
|
|
206
|
+
console.log(chalk.dim(` Repo: ${plugin.source.repo}`));
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
async function removeSkill(skillId, _options) {
|
|
210
|
+
if (!skillId) {
|
|
211
|
+
console.log(chalk.red("Error: Please specify a skill ID"));
|
|
212
|
+
return;
|
|
213
|
+
}
|
|
214
|
+
const manager = await getPluginManager();
|
|
215
|
+
const plugin = manager.getPlugin(skillId);
|
|
216
|
+
if (!plugin) {
|
|
217
|
+
console.log(chalk.red(`Skill not found: ${skillId}`));
|
|
218
|
+
return;
|
|
219
|
+
}
|
|
220
|
+
console.log(chalk.yellow(`
|
|
221
|
+
\u26A0\uFE0F Removing skill: ${plugin.manifest.name.en}`));
|
|
222
|
+
const success = await manager.uninstall(skillId);
|
|
223
|
+
if (success) {
|
|
224
|
+
console.log(chalk.green(`\u2705 Successfully removed: ${skillId}`));
|
|
225
|
+
} else {
|
|
226
|
+
console.log(chalk.red(`\u274C Failed to remove: ${skillId}`));
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
async function searchSkills(query, _options) {
|
|
230
|
+
console.log(chalk.cyan(`
|
|
231
|
+
\u{1F50D} Searching for skills: "${query}"
|
|
232
|
+
`));
|
|
233
|
+
const popularSkills = [
|
|
234
|
+
{
|
|
235
|
+
source: "vercel-labs/agent-skills/skills/react-best-practices",
|
|
236
|
+
name: "React Best Practices",
|
|
237
|
+
description: "40+ React/Next.js performance optimization rules"
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
source: "vercel-labs/agent-skills/skills/web-design-guidelines",
|
|
241
|
+
name: "Web Design Guidelines",
|
|
242
|
+
description: "100+ UI/UX rules for accessibility and performance"
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
source: "vercel-labs/agent-skills/skills/vercel-deploy-claimable",
|
|
246
|
+
name: "Vercel Deploy",
|
|
247
|
+
description: "One-click deployment with framework auto-detection"
|
|
248
|
+
}
|
|
249
|
+
];
|
|
250
|
+
console.log(chalk.bold("Popular Skills:"));
|
|
251
|
+
console.log("");
|
|
252
|
+
for (const skill of popularSkills) {
|
|
253
|
+
console.log(` ${chalk.bold(skill.name)}`);
|
|
254
|
+
console.log(chalk.dim(` ${skill.description}`));
|
|
255
|
+
console.log(chalk.dim(` Install: skill install ${skill.source}`));
|
|
256
|
+
console.log("");
|
|
257
|
+
}
|
|
258
|
+
console.log(chalk.dim("More skills coming soon..."));
|
|
259
|
+
}
|
|
260
|
+
function showSkillHelp() {
|
|
261
|
+
console.log(`
|
|
262
|
+
${chalk.bold(chalk.cyan("\u{1F4DA} Skill Command"))}
|
|
263
|
+
|
|
264
|
+
${chalk.bold("Usage:")}
|
|
265
|
+
skill <command> [options]
|
|
266
|
+
|
|
267
|
+
${chalk.bold("Commands:")}
|
|
268
|
+
${chalk.green("install")} <source> Install a skill from GitHub or local path
|
|
269
|
+
${chalk.green("list")} List installed skills
|
|
270
|
+
${chalk.green("info")} <id> Show detailed skill information
|
|
271
|
+
${chalk.green("remove")} <id> Remove an installed skill
|
|
272
|
+
${chalk.green("search")} <query> Search for skills
|
|
273
|
+
|
|
274
|
+
${chalk.bold("Options:")}
|
|
275
|
+
--force Force reinstall
|
|
276
|
+
--json Output as JSON
|
|
277
|
+
|
|
278
|
+
${chalk.bold("Examples:")}
|
|
279
|
+
${chalk.dim("# Install from GitHub")}
|
|
280
|
+
skill install vercel-labs/agent-skills/skills/react-best-practices
|
|
281
|
+
|
|
282
|
+
${chalk.dim("# Install from local path")}
|
|
283
|
+
skill install ./my-skill
|
|
284
|
+
|
|
285
|
+
${chalk.dim("# List installed skills")}
|
|
286
|
+
skill list
|
|
287
|
+
|
|
288
|
+
${chalk.dim("# Show skill details")}
|
|
289
|
+
skill info react-best-practices
|
|
290
|
+
|
|
291
|
+
${chalk.bold("Skill Format:")}
|
|
292
|
+
Skills follow the SKILL.md format with optional scripts:
|
|
293
|
+
|
|
294
|
+
my-skill/
|
|
295
|
+
\u251C\u2500\u2500 SKILL.md # AI instructions
|
|
296
|
+
\u251C\u2500\u2500 plugin.json # Metadata (optional)
|
|
297
|
+
\u251C\u2500\u2500 scripts/ # Executable scripts
|
|
298
|
+
\u2502 \u2514\u2500\u2500 main.sh
|
|
299
|
+
\u2514\u2500\u2500 references/ # Reference documents
|
|
300
|
+
\u2514\u2500\u2500 rules/
|
|
301
|
+
`);
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
export { handleSkillCommand as default, handleSkillCommand };
|
|
@@ -720,9 +720,9 @@ async function showSyncStatus(options = {}) {
|
|
|
720
720
|
if (conflicts > 0)
|
|
721
721
|
console.log(ansis.red(` \u26A0 ${t("skillsSync:status.conflict")}: ${conflicts}`));
|
|
722
722
|
if (localOnly > 0)
|
|
723
|
-
console.log(ansis.
|
|
723
|
+
console.log(ansis.green(` \u2295 ${t("skillsSync:status.localOnly")}: ${localOnly}`));
|
|
724
724
|
if (remoteOnly > 0)
|
|
725
|
-
console.log(ansis.
|
|
725
|
+
console.log(ansis.green(` \u2296 ${t("skillsSync:status.remoteOnly")}: ${remoteOnly}`));
|
|
726
726
|
console.log("");
|
|
727
727
|
} catch (error) {
|
|
728
728
|
console.warn(ansis.yellow(` ${t("skillsSync:warning.statusFailed")}: ${error}`));
|
|
@@ -807,8 +807,8 @@ function displaySyncResult(result, lang) {
|
|
|
807
807
|
if (result.conflicts > 0) {
|
|
808
808
|
console.log(ansis.yellow(` ${t("skillsSync:result.conflicts")}: ${result.conflicts}`));
|
|
809
809
|
}
|
|
810
|
-
console.log(ansis.
|
|
811
|
-
console.log(ansis.
|
|
810
|
+
console.log(ansis.green(` ${t("skillsSync:result.uploaded")}: ${result.uploaded}`));
|
|
811
|
+
console.log(ansis.green(` ${t("skillsSync:result.downloaded")}: ${result.downloaded}`));
|
|
812
812
|
console.log(ansis.dim(` ${t("skillsSync:result.skipped")}: ${result.skipped}`));
|
|
813
813
|
console.log(ansis.dim(` ${t("skillsSync:result.duration")}: ${(result.durationMs / 1e3).toFixed(2)}s`));
|
|
814
814
|
if (result.failed > 0 || result.conflicts > 0) {
|
package/dist/chunks/skills.mjs
CHANGED
|
@@ -46,7 +46,7 @@ async function listSkills(options = {}) {
|
|
|
46
46
|
const statusIcon = skill.enabled ? ansis.green("\u2713") : ansis.dim("\u25CB");
|
|
47
47
|
const name = skill.name[options.lang || "en"];
|
|
48
48
|
const description = skill.description[options.lang || "en"];
|
|
49
|
-
const triggers = skill.triggers.map((t) => ansis.
|
|
49
|
+
const triggers = skill.triggers.map((t) => ansis.green(t)).join(", ");
|
|
50
50
|
console.log(` ${statusIcon} ${ansis.bold(name)} ${ansis.dim(`(${skill.id})`)}`);
|
|
51
51
|
console.log(` ${ansis.dim(description)}`);
|
|
52
52
|
console.log(` ${ansis.dim(i18n.t("skills:label.triggers"))}: ${triggers}`);
|
|
@@ -141,7 +141,7 @@ async function showSkillInfo(skillName, options = {}) {
|
|
|
141
141
|
console.log("");
|
|
142
142
|
console.log(ansis.bold(` ${i18n.t("skills:label.triggers")}:`));
|
|
143
143
|
for (const trigger of skill.triggers) {
|
|
144
|
-
console.log(ansis.
|
|
144
|
+
console.log(ansis.green(` ${trigger}`));
|
|
145
145
|
}
|
|
146
146
|
if (skill.tags && skill.tags.length > 0) {
|
|
147
147
|
console.log("");
|
package/dist/chunks/team.mjs
CHANGED
|
@@ -37,7 +37,7 @@ async function teamShare() {
|
|
|
37
37
|
return;
|
|
38
38
|
}
|
|
39
39
|
const config = JSON.parse(readFileSync(CONFIG_FILE, "utf-8"));
|
|
40
|
-
console.log(ansis.
|
|
40
|
+
console.log(ansis.green(i18n.t("team:shareConfig")));
|
|
41
41
|
console.log(JSON.stringify(config, null, 2));
|
|
42
42
|
}
|
|
43
43
|
async function teamSync() {
|
|
@@ -4,7 +4,7 @@ import { ZCF_CONFIG_FILE, DEFAULT_CODE_TOOL_TYPE, isCodeToolType } from './const
|
|
|
4
4
|
import { i18n, ensureI18nInitialized } from './index2.mjs';
|
|
5
5
|
import { readZcfConfig } from './ccjk-config.mjs';
|
|
6
6
|
import { r as resolveCodeType } from '../shared/ccjk.CUdzQluX.mjs';
|
|
7
|
-
import { h as handleExitPromptError, a as handleGeneralError } from '../shared/ccjk.
|
|
7
|
+
import { h as handleExitPromptError, a as handleGeneralError } from '../shared/ccjk.DrMygfCF.mjs';
|
|
8
8
|
import { p as promptBoolean, a as addNumbersToChoices } from '../shared/ccjk.DhBeLRzf.mjs';
|
|
9
9
|
import { homedir } from 'node:os';
|
|
10
10
|
import { pathExists } from 'fs-extra';
|
|
@@ -575,7 +575,7 @@ async function uninstall(options = {}) {
|
|
|
575
575
|
}
|
|
576
576
|
}
|
|
577
577
|
async function showInteractiveUninstall(uninstaller) {
|
|
578
|
-
console.log(ansis.
|
|
578
|
+
console.log(ansis.green.bold(i18n.t("uninstall:title")));
|
|
579
579
|
console.log("");
|
|
580
580
|
const { mainChoice } = await inquirer.prompt({
|
|
581
581
|
type: "list",
|
|
@@ -606,7 +606,7 @@ async function showInteractiveUninstall(uninstaller) {
|
|
|
606
606
|
}
|
|
607
607
|
async function showCustomUninstallMenu(uninstaller) {
|
|
608
608
|
console.log("");
|
|
609
|
-
console.log(ansis.
|
|
609
|
+
console.log(ansis.green(i18n.t("uninstall:selectCustomItems")));
|
|
610
610
|
const { customItems } = await inquirer.prompt({
|
|
611
611
|
type: "checkbox",
|
|
612
612
|
name: "customItems",
|
|
@@ -683,13 +683,13 @@ async function executeCompleteUninstall(uninstaller) {
|
|
|
683
683
|
return;
|
|
684
684
|
}
|
|
685
685
|
console.log("");
|
|
686
|
-
console.log(ansis.
|
|
686
|
+
console.log(ansis.green(i18n.t("uninstall:processingComplete")));
|
|
687
687
|
const result = await uninstaller.completeUninstall();
|
|
688
688
|
displayUninstallResult("complete", [result]);
|
|
689
689
|
}
|
|
690
690
|
async function executeCustomUninstall(uninstaller, items) {
|
|
691
691
|
console.log("");
|
|
692
|
-
console.log(ansis.
|
|
692
|
+
console.log(ansis.green(i18n.t("uninstall:executingCustom")));
|
|
693
693
|
console.log(ansis.gray(i18n.t("uninstall:selectedItems")));
|
|
694
694
|
items.forEach((item) => {
|
|
695
695
|
console.log(` \u2022 ${i18n.t(`uninstall:${item}`)}`);
|
|
@@ -703,13 +703,13 @@ async function executeCustomUninstall(uninstaller, items) {
|
|
|
703
703
|
return;
|
|
704
704
|
}
|
|
705
705
|
console.log("");
|
|
706
|
-
console.log(ansis.
|
|
706
|
+
console.log(ansis.green(i18n.t("uninstall:processingCustom")));
|
|
707
707
|
const results = await uninstaller.customUninstall(items);
|
|
708
708
|
displayUninstallResult("custom", results);
|
|
709
709
|
}
|
|
710
710
|
function displayUninstallResult(mode, results) {
|
|
711
711
|
console.log("");
|
|
712
|
-
console.log(ansis.
|
|
712
|
+
console.log(ansis.green("\u2500".repeat(50)));
|
|
713
713
|
let totalSuccess = 0;
|
|
714
714
|
let totalErrors = 0;
|
|
715
715
|
let totalWarnings = 0;
|
|
@@ -747,7 +747,7 @@ function displayUninstallResult(mode, results) {
|
|
|
747
747
|
const totalRemovedFiles = results.reduce((count, result) => count + (result.removed?.length || 0), 0);
|
|
748
748
|
const totalRemovedConfigs = results.reduce((count, result) => count + (result.removedConfigs?.length || 0), 0);
|
|
749
749
|
console.log("");
|
|
750
|
-
console.log(ansis.
|
|
750
|
+
console.log(ansis.green("\u2500".repeat(50)));
|
|
751
751
|
if (mode === "complete") {
|
|
752
752
|
if (totalErrors === 0) {
|
|
753
753
|
console.log(ansis.green.bold(`\u2714 ${i18n.t("uninstall:completeSuccess")}`));
|
package/dist/chunks/update.mjs
CHANGED
|
@@ -2,11 +2,11 @@ import ansis from 'ansis';
|
|
|
2
2
|
import { version } from './package.mjs';
|
|
3
3
|
import { DEFAULT_CODE_TOOL_TYPE, resolveCodeToolType as resolveCodeToolType$1, isCodeToolType } from './constants.mjs';
|
|
4
4
|
import { i18n } from './index2.mjs';
|
|
5
|
-
import {
|
|
5
|
+
import { f as displayBanner } from '../shared/ccjk.tJ08-yZt.mjs';
|
|
6
6
|
import { readZcfConfig, updateZcfConfig } from './ccjk-config.mjs';
|
|
7
7
|
import { C as runCodexUpdate } from './codex.mjs';
|
|
8
|
-
import { u as updatePromptOnly, s as selectAndInstallWorkflows } from '../shared/ccjk.
|
|
9
|
-
import { h as handleExitPromptError, a as handleGeneralError } from '../shared/ccjk.
|
|
8
|
+
import { u as updatePromptOnly, s as selectAndInstallWorkflows } from '../shared/ccjk.BQzWKmC3.mjs';
|
|
9
|
+
import { h as handleExitPromptError, a as handleGeneralError } from '../shared/ccjk.DrMygfCF.mjs';
|
|
10
10
|
import { resolveAiOutputLanguage } from './prompts.mjs';
|
|
11
11
|
import { checkClaudeCodeVersionAndPrompt } from './version-checker.mjs';
|
|
12
12
|
import 'node:os';
|
|
@@ -81,7 +81,7 @@ async function update(options = {}) {
|
|
|
81
81
|
// Non-interactive mode flag
|
|
82
82
|
);
|
|
83
83
|
const aiOutputLang = await resolveAiOutputLanguage(i18n.language, options.aiOutputLang, zcfConfig, options.skipPrompt);
|
|
84
|
-
console.log(ansis.
|
|
84
|
+
console.log(ansis.green(`
|
|
85
85
|
${i18n.t("configuration:updatingPrompts")}
|
|
86
86
|
`));
|
|
87
87
|
await updatePromptOnly(aiOutputLang);
|
|
@@ -4,7 +4,7 @@ import ora from 'ora';
|
|
|
4
4
|
import semver from 'semver';
|
|
5
5
|
import { exec } from 'tinyexec';
|
|
6
6
|
import { version } from './package.mjs';
|
|
7
|
-
import { S as STATUS } from '../shared/ccjk.
|
|
7
|
+
import { S as STATUS } from '../shared/ccjk.tJ08-yZt.mjs';
|
|
8
8
|
import './index2.mjs';
|
|
9
9
|
import 'node:fs';
|
|
10
10
|
import 'node:url';
|
|
@@ -156,7 +156,7 @@ async function upgradeAllPlugins() {
|
|
|
156
156
|
return results;
|
|
157
157
|
}
|
|
158
158
|
async function checkAllVersions() {
|
|
159
|
-
console.log(ansis.
|
|
159
|
+
console.log(ansis.green("\n\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550 Version Check \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\n"));
|
|
160
160
|
const claudeCode = await checkClaudeCodeVersion();
|
|
161
161
|
if (claudeCode.updateAvailable) {
|
|
162
162
|
console.log(STATUS.warning(`Claude Code: v${claudeCode.current} \u2192 v${claudeCode.latest} (update available)`));
|
|
@@ -183,7 +183,7 @@ async function checkAllVersions() {
|
|
|
183
183
|
console.log("");
|
|
184
184
|
}
|
|
185
185
|
async function upgradeAll() {
|
|
186
|
-
console.log(ansis.
|
|
186
|
+
console.log(ansis.green("\n\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550 Upgrading All \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\n"));
|
|
187
187
|
await upgradeClaudeCode();
|
|
188
188
|
await upgradeCcjk();
|
|
189
189
|
const pluginResults = await upgradeAllPlugins();
|
|
@@ -624,7 +624,7 @@ async function performNpmRemovalAndActivateHomebrew(_npmInstallation, homebrewIn
|
|
|
624
624
|
spinner.succeed(i18n.t("installation:duplicateRemoved"));
|
|
625
625
|
if (homebrewInstallation && !homebrewInstallation.isActive) {
|
|
626
626
|
console.log("");
|
|
627
|
-
console.log(ansis.
|
|
627
|
+
console.log(ansis.green(`\u{1F517} ${i18n.t("installation:activatingHomebrew")}`));
|
|
628
628
|
const { createHomebrewSymlink } = await import('./init.mjs').then(function (n) { return n.G; });
|
|
629
629
|
const symlinkResult = await createHomebrewSymlink("claude", homebrewInstallation.path);
|
|
630
630
|
if (symlinkResult.success) {
|
|
@@ -665,11 +665,11 @@ async function handleDuplicateInstallations(skipPrompt = false) {
|
|
|
665
665
|
const isActive = homebrewInstallation.isActive;
|
|
666
666
|
const statusIcon = isActive ? "\u2705" : "\u26A0\uFE0F";
|
|
667
667
|
const statusColor = isActive ? ansis.green : ansis.yellow;
|
|
668
|
-
console.log(ansis.
|
|
668
|
+
console.log(ansis.green.bold(`\u{1F37A} Homebrew Cask ${i18n.t("installation:recommendedMethod")}:`));
|
|
669
669
|
console.log(ansis.white(` ${i18n.t("installation:installationSource")}: ${statusColor(getSourceDisplayName(homebrewInstallation.source, i18n))}`));
|
|
670
670
|
console.log(ansis.white(` ${i18n.t("installation:installationPath")}: ${ansis.gray(homebrewInstallation.path)}`));
|
|
671
671
|
if (homebrewInstallation.version) {
|
|
672
|
-
console.log(ansis.white(` ${i18n.t("installation:installationVersion")}: ${ansis.
|
|
672
|
+
console.log(ansis.white(` ${i18n.t("installation:installationVersion")}: ${ansis.green(homebrewInstallation.version)}`));
|
|
673
673
|
}
|
|
674
674
|
console.log(ansis.white(` ${statusIcon} ${isActive ? i18n.t("installation:currentActiveInstallation") : i18n.t("installation:inactiveInstallations")}`));
|
|
675
675
|
console.log("");
|
|
@@ -680,7 +680,7 @@ async function handleDuplicateInstallations(skipPrompt = false) {
|
|
|
680
680
|
console.log(ansis.white(` ${i18n.t("installation:installationSource")}: ${ansis.yellow(getSourceDisplayName(npmInstallation.source, i18n))}`));
|
|
681
681
|
console.log(ansis.white(` ${i18n.t("installation:installationPath")}: ${ansis.gray(npmInstallation.path)}`));
|
|
682
682
|
if (npmInstallation.version) {
|
|
683
|
-
console.log(ansis.white(` ${i18n.t("installation:installationVersion")}: ${ansis.
|
|
683
|
+
console.log(ansis.white(` ${i18n.t("installation:installationVersion")}: ${ansis.green(npmInstallation.version)}`));
|
|
684
684
|
if (homebrewInstallation?.version && npmInstallation.version !== homebrewInstallation.version) {
|
|
685
685
|
console.log(ansis.red(` ${format(i18n.t("installation:versionMismatchWarning"), {
|
|
686
686
|
npmVersion: npmInstallation.version,
|
|
@@ -693,14 +693,14 @@ async function handleDuplicateInstallations(skipPrompt = false) {
|
|
|
693
693
|
}
|
|
694
694
|
console.log("");
|
|
695
695
|
}
|
|
696
|
-
console.log(ansis.
|
|
696
|
+
console.log(ansis.green(`\u{1F4A1} ${i18n.t("installation:recommendRemoveNpm")}`));
|
|
697
697
|
console.log("");
|
|
698
698
|
if (!npmInstallation) {
|
|
699
699
|
return { hadDuplicates: true, resolved: false, action: "kept-both" };
|
|
700
700
|
}
|
|
701
701
|
const { exec: tinyExec } = await import('tinyexec');
|
|
702
702
|
if (skipPrompt) {
|
|
703
|
-
console.log(ansis.
|
|
703
|
+
console.log(ansis.green(`\u{1F504} ${i18n.t("installation:autoRemovingNpm")}`));
|
|
704
704
|
return await performNpmRemovalAndActivateHomebrew(
|
|
705
705
|
npmInstallation,
|
|
706
706
|
homebrewInstallation,
|
|
@@ -571,9 +571,9 @@ const PHASE_ICONS = {
|
|
|
571
571
|
};
|
|
572
572
|
const PHASE_COLORS = {
|
|
573
573
|
brainstorming: ansis.magenta,
|
|
574
|
-
planning: ansis.
|
|
574
|
+
planning: ansis.green,
|
|
575
575
|
implementation: ansis.yellow,
|
|
576
|
-
review: ansis.
|
|
576
|
+
review: ansis.green,
|
|
577
577
|
finishing: ansis.green
|
|
578
578
|
};
|
|
579
579
|
const STATUS_ICONS = {
|
package/dist/cli.mjs
CHANGED
|
@@ -441,6 +441,54 @@ const COMMANDS = [
|
|
|
441
441
|
};
|
|
442
442
|
}
|
|
443
443
|
},
|
|
444
|
+
// ==================== Plugins-v2 Commands ====================
|
|
445
|
+
{
|
|
446
|
+
name: "skill [action] [...args]",
|
|
447
|
+
description: "Manage plugins-v2 skills (SKILL.md based)",
|
|
448
|
+
tier: "extended",
|
|
449
|
+
options: [
|
|
450
|
+
{ flags: "--force, -f", description: "Force reinstall" },
|
|
451
|
+
{ flags: "--json", description: "Output as JSON" }
|
|
452
|
+
],
|
|
453
|
+
loader: async () => {
|
|
454
|
+
const { handleSkillCommand } = await import('./chunks/skill.mjs');
|
|
455
|
+
return async (options, action, args) => {
|
|
456
|
+
const actionStr = action;
|
|
457
|
+
const argsArr = args;
|
|
458
|
+
await handleSkillCommand([actionStr, ...argsArr], {
|
|
459
|
+
force: options.force,
|
|
460
|
+
json: options.json
|
|
461
|
+
});
|
|
462
|
+
};
|
|
463
|
+
}
|
|
464
|
+
},
|
|
465
|
+
{
|
|
466
|
+
name: "agent [action] [...args]",
|
|
467
|
+
description: "Manage AI agents (Skills + MCP composition)",
|
|
468
|
+
aliases: ["ag"],
|
|
469
|
+
tier: "extended",
|
|
470
|
+
options: [
|
|
471
|
+
{ flags: "--template, -t <template>", description: "Use agent template" },
|
|
472
|
+
{ flags: "--skills, -s <skills>", description: "Comma-separated skill IDs" },
|
|
473
|
+
{ flags: "--mcp, -m <servers>", description: "Comma-separated MCP servers" },
|
|
474
|
+
{ flags: "--persona, -p <persona>", description: "Custom persona" },
|
|
475
|
+
{ flags: "--json", description: "Output as JSON" }
|
|
476
|
+
],
|
|
477
|
+
loader: async () => {
|
|
478
|
+
const { handleAgentCommand } = await import('./chunks/agent.mjs');
|
|
479
|
+
return async (options, action, args) => {
|
|
480
|
+
const actionStr = action;
|
|
481
|
+
const argsArr = args;
|
|
482
|
+
await handleAgentCommand([actionStr, ...argsArr], {
|
|
483
|
+
template: options.template,
|
|
484
|
+
skills: options.skills ? options.skills.split(",") : void 0,
|
|
485
|
+
mcp: options.mcp ? options.mcp.split(",") : void 0,
|
|
486
|
+
persona: options.persona,
|
|
487
|
+
json: options.json
|
|
488
|
+
});
|
|
489
|
+
};
|
|
490
|
+
}
|
|
491
|
+
},
|
|
444
492
|
{
|
|
445
493
|
name: "ccu [...args]",
|
|
446
494
|
description: "Claude Code usage analysis",
|