ccjk 9.5.6 → 9.7.0
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 +1 -1
- package/dist/chunks/api-providers.mjs +1 -1
- package/dist/chunks/api.mjs +3 -3
- package/dist/chunks/auto-bootstrap.mjs +1 -1
- package/dist/chunks/auto-updater.mjs +1 -1
- package/dist/chunks/boost.mjs +160 -0
- package/dist/chunks/ccjk-agents.mjs +1 -1
- package/dist/chunks/ccjk-all.mjs +1 -1
- package/dist/chunks/ccjk-config.mjs +1 -1
- package/dist/chunks/ccjk-hooks.mjs +1 -1
- package/dist/chunks/ccjk-mcp.mjs +2 -2
- package/dist/chunks/ccjk-setup.mjs +1 -1
- package/dist/chunks/ccjk-skills.mjs +1 -1
- package/dist/chunks/ccr.mjs +25 -30
- package/dist/chunks/ccu.mjs +1 -1
- package/dist/chunks/check-updates.mjs +3 -4
- package/dist/chunks/claude-code-config-manager.mjs +7 -7
- package/dist/chunks/claude-code-incremental-manager.mjs +2 -2
- package/dist/chunks/claude-config.mjs +4 -4
- package/dist/chunks/claude-wrapper.mjs +2 -2
- package/dist/chunks/codex-config-switch.mjs +4 -5
- package/dist/chunks/codex-provider-manager.mjs +2 -3
- package/dist/chunks/codex-uninstaller.mjs +2 -2
- package/dist/chunks/codex.mjs +207 -6
- package/dist/chunks/commands.mjs +391 -88
- package/dist/chunks/commands2.mjs +88 -391
- package/dist/chunks/completion.mjs +1 -1
- package/dist/chunks/config-consolidator.mjs +2 -2
- package/dist/chunks/config-switch.mjs +3 -4
- package/dist/chunks/config.mjs +78 -7
- package/dist/chunks/config2.mjs +400 -410
- package/dist/chunks/config3.mjs +410 -400
- package/dist/chunks/constants.mjs +1 -1
- package/dist/chunks/doctor.mjs +4 -4
- package/dist/chunks/features.mjs +24 -17
- package/dist/chunks/index.mjs +178 -7
- package/dist/chunks/index2.mjs +1162 -169
- package/dist/chunks/index3.mjs +910 -1076
- package/dist/chunks/index4.mjs +137 -947
- package/dist/chunks/index5.mjs +635 -167
- package/dist/chunks/init.mjs +141 -99
- package/dist/chunks/installer.mjs +147 -649
- package/dist/chunks/installer2.mjs +649 -147
- package/dist/chunks/interview.mjs +2 -2
- package/dist/chunks/marketplace.mjs +1 -1
- package/dist/chunks/mcp.mjs +1058 -17
- package/dist/chunks/menu.mjs +147 -56
- package/dist/chunks/monitor.mjs +2 -2
- package/dist/chunks/notification.mjs +1 -1
- package/dist/chunks/onboarding.mjs +2 -2
- package/dist/chunks/package.mjs +2 -210
- package/dist/chunks/permission-manager.mjs +2 -2
- package/dist/chunks/permissions.mjs +1 -1
- package/dist/chunks/platform.mjs +1 -1
- package/dist/chunks/plugin.mjs +1 -1
- package/dist/chunks/prompts.mjs +1 -1
- package/dist/chunks/providers.mjs +1 -1
- package/dist/chunks/quick-setup.mjs +16 -20
- package/dist/chunks/silent-updater.mjs +1 -1
- package/dist/chunks/simple-config.mjs +2 -2
- package/dist/chunks/skill.mjs +1 -1
- package/dist/chunks/skills-sync.mjs +1 -1
- package/dist/chunks/skills.mjs +1 -1
- package/dist/chunks/startup.mjs +1 -1
- package/dist/chunks/stats.mjs +1 -1
- package/dist/chunks/status.mjs +159 -0
- package/dist/chunks/team.mjs +1 -1
- package/dist/chunks/thinking.mjs +2 -2
- package/dist/chunks/uninstall.mjs +6 -6
- package/dist/chunks/update.mjs +6 -9
- package/dist/chunks/upgrade-manager.mjs +2 -2
- package/dist/chunks/version-checker.mjs +3 -3
- package/dist/chunks/vim.mjs +1 -1
- package/dist/chunks/workflows.mjs +616 -215
- package/dist/cli.mjs +70 -121
- package/dist/index.d.mts +17 -1482
- package/dist/index.d.ts +17 -1482
- package/dist/index.mjs +950 -4740
- package/dist/shared/{ccjk.zCqdxT2Y.mjs → ccjk.Br91zBIG.mjs} +2 -2
- package/dist/shared/ccjk.CSkyCZIM.mjs +638 -0
- package/dist/shared/{ccjk.BKoi8-Hy.mjs → ccjk.DE91nClQ.mjs} +1 -1
- package/dist/shared/{ccjk.f40us0yY.mjs → ccjk.DvIrK0wz.mjs} +2 -2
- package/dist/shared/ccjk.LsPZ2PYo.mjs +1048 -0
- package/dist/shared/{ccjk.DRweXU5F.mjs → ccjk.q1koQxEE.mjs} +2 -2
- package/package.json +1 -1
- package/templates/claude-code/common/settings.json +15 -111
- package/dist/chunks/api-adapter.mjs +0 -180
- package/dist/chunks/cli.mjs +0 -2227
- package/dist/chunks/context-menu.mjs +0 -913
- package/dist/chunks/hooks-sync.mjs +0 -1627
- package/dist/chunks/index6.mjs +0 -663
- package/dist/chunks/mcp-market.mjs +0 -1077
- package/dist/chunks/mcp-server.mjs +0 -776
- package/dist/chunks/project-detector.mjs +0 -131
- package/dist/chunks/provider-registry.mjs +0 -92
- package/dist/chunks/setup-wizard.mjs +0 -362
- package/dist/chunks/tools.mjs +0 -143
- package/dist/chunks/workflows2.mjs +0 -633
- package/dist/shared/ccjk.BM_HZogn.mjs +0 -347
- package/dist/shared/ccjk.BaEp4UHQ.mjs +0 -75
- package/dist/shared/ccjk.CS0ybJCf.mjs +0 -490
- package/dist/shared/ccjk.CZgIwikC.mjs +0 -209
- package/dist/shared/ccjk.tO8zeFh1.mjs +0 -397
|
@@ -1,397 +0,0 @@
|
|
|
1
|
-
import { execSync } from 'node:child_process';
|
|
2
|
-
import { existsSync, readdirSync, readFileSync, statSync } from 'node:fs';
|
|
3
|
-
import { homedir } from 'node:os';
|
|
4
|
-
import { join } from 'pathe';
|
|
5
|
-
import ansis from 'ansis';
|
|
6
|
-
import { version } from '../chunks/package.mjs';
|
|
7
|
-
|
|
8
|
-
const CLAUDE_DIR = join(homedir(), ".claude");
|
|
9
|
-
const COMMANDS_DIR = join(CLAUDE_DIR, "commands", "ccjk");
|
|
10
|
-
const SKILLS_DIR = join(CLAUDE_DIR, "skills");
|
|
11
|
-
const SUPERPOWERS_DIR = join(CLAUDE_DIR, "superpowers");
|
|
12
|
-
function scanCommands() {
|
|
13
|
-
const capabilities = [];
|
|
14
|
-
if (!existsSync(COMMANDS_DIR)) {
|
|
15
|
-
return capabilities;
|
|
16
|
-
}
|
|
17
|
-
try {
|
|
18
|
-
const files = readdirSync(COMMANDS_DIR);
|
|
19
|
-
for (const file of files) {
|
|
20
|
-
if (!file.endsWith(".md"))
|
|
21
|
-
continue;
|
|
22
|
-
const filePath = join(COMMANDS_DIR, file);
|
|
23
|
-
const commandId = file.replace(".md", "");
|
|
24
|
-
try {
|
|
25
|
-
const content = readFileSync(filePath, "utf-8");
|
|
26
|
-
const nameMatch = content.match(/^#\s([^\n]+)$/m);
|
|
27
|
-
const descMatch = content.match(/^>\s([^\n]+)$/m);
|
|
28
|
-
capabilities.push({
|
|
29
|
-
id: commandId,
|
|
30
|
-
name: nameMatch?.[1] || commandId,
|
|
31
|
-
type: "command",
|
|
32
|
-
status: "active",
|
|
33
|
-
priority: 10,
|
|
34
|
-
description: descMatch?.[1] || "CCJK command",
|
|
35
|
-
triggers: [`/ccjk:${commandId}`],
|
|
36
|
-
path: filePath
|
|
37
|
-
});
|
|
38
|
-
} catch (error) {
|
|
39
|
-
capabilities.push({
|
|
40
|
-
id: commandId,
|
|
41
|
-
name: commandId,
|
|
42
|
-
type: "command",
|
|
43
|
-
status: "error",
|
|
44
|
-
priority: 0,
|
|
45
|
-
description: "Failed to load command",
|
|
46
|
-
error: error instanceof Error ? error.message : "Unknown error",
|
|
47
|
-
path: filePath
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
} catch {
|
|
52
|
-
}
|
|
53
|
-
return capabilities;
|
|
54
|
-
}
|
|
55
|
-
function scanSkills() {
|
|
56
|
-
const capabilities = [];
|
|
57
|
-
if (!existsSync(SKILLS_DIR)) {
|
|
58
|
-
return capabilities;
|
|
59
|
-
}
|
|
60
|
-
try {
|
|
61
|
-
const files = readdirSync(SKILLS_DIR);
|
|
62
|
-
for (const file of files) {
|
|
63
|
-
if (!file.endsWith(".md"))
|
|
64
|
-
continue;
|
|
65
|
-
const filePath = join(SKILLS_DIR, file);
|
|
66
|
-
const skillId = file.replace(".md", "");
|
|
67
|
-
try {
|
|
68
|
-
const content = readFileSync(filePath, "utf-8");
|
|
69
|
-
const nameMatch = content.match(/^#\s([^\n]+)$/m);
|
|
70
|
-
const descMatch = content.match(/^>\s([^\n]+)$/m);
|
|
71
|
-
capabilities.push({
|
|
72
|
-
id: skillId,
|
|
73
|
-
name: nameMatch?.[1] || skillId,
|
|
74
|
-
type: "skill",
|
|
75
|
-
status: "active",
|
|
76
|
-
priority: 8,
|
|
77
|
-
description: descMatch?.[1] || "Custom skill",
|
|
78
|
-
triggers: [`/${skillId}`],
|
|
79
|
-
path: filePath
|
|
80
|
-
});
|
|
81
|
-
} catch (error) {
|
|
82
|
-
capabilities.push({
|
|
83
|
-
id: skillId,
|
|
84
|
-
name: skillId,
|
|
85
|
-
type: "skill",
|
|
86
|
-
status: "error",
|
|
87
|
-
priority: 0,
|
|
88
|
-
description: "Failed to load skill",
|
|
89
|
-
error: error instanceof Error ? error.message : "Unknown error",
|
|
90
|
-
path: filePath
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
} catch {
|
|
95
|
-
}
|
|
96
|
-
return capabilities;
|
|
97
|
-
}
|
|
98
|
-
function scanSuperpowers() {
|
|
99
|
-
const capabilities = [];
|
|
100
|
-
if (!existsSync(SUPERPOWERS_DIR)) {
|
|
101
|
-
return capabilities;
|
|
102
|
-
}
|
|
103
|
-
try {
|
|
104
|
-
const entries = readdirSync(SUPERPOWERS_DIR);
|
|
105
|
-
for (const entry of entries) {
|
|
106
|
-
const entryPath = join(SUPERPOWERS_DIR, entry);
|
|
107
|
-
try {
|
|
108
|
-
const stat = statSync(entryPath);
|
|
109
|
-
if (!stat.isDirectory())
|
|
110
|
-
continue;
|
|
111
|
-
const files = readdirSync(entryPath);
|
|
112
|
-
const mdFiles = files.filter((f) => f.endsWith(".md"));
|
|
113
|
-
if (mdFiles.length === 0)
|
|
114
|
-
continue;
|
|
115
|
-
const status = mdFiles.length > 0 ? "active" : "inactive";
|
|
116
|
-
capabilities.push({
|
|
117
|
-
id: entry,
|
|
118
|
-
name: entry,
|
|
119
|
-
type: "superpower",
|
|
120
|
-
status,
|
|
121
|
-
priority: 9,
|
|
122
|
-
description: `Superpower with ${mdFiles.length} skill(s)`,
|
|
123
|
-
path: entryPath
|
|
124
|
-
});
|
|
125
|
-
} catch (error) {
|
|
126
|
-
capabilities.push({
|
|
127
|
-
id: entry,
|
|
128
|
-
name: entry,
|
|
129
|
-
type: "superpower",
|
|
130
|
-
status: "error",
|
|
131
|
-
priority: 0,
|
|
132
|
-
description: "Failed to load superpower",
|
|
133
|
-
error: error instanceof Error ? error.message : "Unknown error",
|
|
134
|
-
path: entryPath
|
|
135
|
-
});
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
} catch {
|
|
139
|
-
}
|
|
140
|
-
return capabilities;
|
|
141
|
-
}
|
|
142
|
-
function scanMCPServices() {
|
|
143
|
-
const capabilities = [];
|
|
144
|
-
const configPath = join(CLAUDE_DIR, "claude_desktop_config.json");
|
|
145
|
-
if (!existsSync(configPath)) {
|
|
146
|
-
return capabilities;
|
|
147
|
-
}
|
|
148
|
-
try {
|
|
149
|
-
const content = readFileSync(configPath, "utf-8");
|
|
150
|
-
const config = JSON.parse(content);
|
|
151
|
-
if (config.mcpServers && typeof config.mcpServers === "object") {
|
|
152
|
-
for (const [serviceName, serviceConfig] of Object.entries(config.mcpServers)) {
|
|
153
|
-
const status = serviceConfig && typeof serviceConfig === "object" ? "active" : "inactive";
|
|
154
|
-
capabilities.push({
|
|
155
|
-
id: serviceName,
|
|
156
|
-
name: serviceName,
|
|
157
|
-
type: "mcp",
|
|
158
|
-
status,
|
|
159
|
-
priority: 7,
|
|
160
|
-
description: "MCP service",
|
|
161
|
-
path: configPath
|
|
162
|
-
});
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
} catch {
|
|
166
|
-
}
|
|
167
|
-
return capabilities;
|
|
168
|
-
}
|
|
169
|
-
function scanAgents() {
|
|
170
|
-
const capabilities = [];
|
|
171
|
-
try {
|
|
172
|
-
execSync("which agent-browser", { stdio: "ignore" });
|
|
173
|
-
capabilities.push({
|
|
174
|
-
id: "agent-browser",
|
|
175
|
-
name: "Agent Browser",
|
|
176
|
-
type: "agent",
|
|
177
|
-
status: "active",
|
|
178
|
-
priority: 10,
|
|
179
|
-
description: "Zero-config browser automation",
|
|
180
|
-
triggers: ["agent-browser"]
|
|
181
|
-
});
|
|
182
|
-
} catch {
|
|
183
|
-
}
|
|
184
|
-
return capabilities;
|
|
185
|
-
}
|
|
186
|
-
function scanCapabilities() {
|
|
187
|
-
const commands = scanCommands();
|
|
188
|
-
const skills = scanSkills();
|
|
189
|
-
const agents = scanAgents();
|
|
190
|
-
const mcpServices = scanMCPServices();
|
|
191
|
-
const superpowers = scanSuperpowers();
|
|
192
|
-
const allCapabilities = [
|
|
193
|
-
...commands,
|
|
194
|
-
...skills,
|
|
195
|
-
...agents,
|
|
196
|
-
...mcpServices,
|
|
197
|
-
...superpowers
|
|
198
|
-
];
|
|
199
|
-
const activeCount = allCapabilities.filter((c) => c.status === "active").length;
|
|
200
|
-
const errorCount = allCapabilities.filter((c) => c.status === "error").length;
|
|
201
|
-
return {
|
|
202
|
-
commands,
|
|
203
|
-
skills,
|
|
204
|
-
agents,
|
|
205
|
-
mcpServices,
|
|
206
|
-
superpowers,
|
|
207
|
-
total: allCapabilities.length,
|
|
208
|
-
activeCount,
|
|
209
|
-
errorCount
|
|
210
|
-
};
|
|
211
|
-
}
|
|
212
|
-
function getCapability(id) {
|
|
213
|
-
const result = scanCapabilities();
|
|
214
|
-
const allCapabilities = [
|
|
215
|
-
...result.commands,
|
|
216
|
-
...result.skills,
|
|
217
|
-
...result.agents,
|
|
218
|
-
...result.mcpServices,
|
|
219
|
-
...result.superpowers
|
|
220
|
-
];
|
|
221
|
-
return allCapabilities.find((c) => c.id === id);
|
|
222
|
-
}
|
|
223
|
-
function getCapabilitiesByType(type) {
|
|
224
|
-
const result = scanCapabilities();
|
|
225
|
-
switch (type) {
|
|
226
|
-
case "command":
|
|
227
|
-
return result.commands;
|
|
228
|
-
case "skill":
|
|
229
|
-
return result.skills;
|
|
230
|
-
case "agent":
|
|
231
|
-
return result.agents;
|
|
232
|
-
case "mcp":
|
|
233
|
-
return result.mcpServices;
|
|
234
|
-
case "superpower":
|
|
235
|
-
return result.superpowers;
|
|
236
|
-
default:
|
|
237
|
-
return [];
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
const BOX_CHARS = {
|
|
242
|
-
topLeft: "\u256D",
|
|
243
|
-
topRight: "\u256E",
|
|
244
|
-
bottomLeft: "\u2570",
|
|
245
|
-
bottomRight: "\u256F",
|
|
246
|
-
horizontal: "\u2500",
|
|
247
|
-
vertical: "\u2502"
|
|
248
|
-
};
|
|
249
|
-
function createBorderLine(width, type) {
|
|
250
|
-
const left = type === "top" ? BOX_CHARS.topLeft : type === "bottom" ? BOX_CHARS.bottomLeft : BOX_CHARS.vertical;
|
|
251
|
-
const right = type === "top" ? BOX_CHARS.topRight : type === "bottom" ? BOX_CHARS.bottomRight : BOX_CHARS.vertical;
|
|
252
|
-
const fill = type === "middle" ? " " : BOX_CHARS.horizontal;
|
|
253
|
-
return `${left}${fill.repeat(width - 2)}${right}`;
|
|
254
|
-
}
|
|
255
|
-
function centerText(text, width) {
|
|
256
|
-
const plainText = text.replace(/\x1B\[[0-9;]*m/g, "");
|
|
257
|
-
const padding = Math.max(0, width - plainText.length - 2);
|
|
258
|
-
const leftPad = Math.floor(padding / 2);
|
|
259
|
-
const rightPad = padding - leftPad;
|
|
260
|
-
return `${BOX_CHARS.vertical}${" ".repeat(leftPad)}${text}${" ".repeat(rightPad)}${BOX_CHARS.vertical}`;
|
|
261
|
-
}
|
|
262
|
-
function leftText(text, width) {
|
|
263
|
-
const plainText = text.replace(/\x1B\[[0-9;]*m/g, "");
|
|
264
|
-
const padding = Math.max(0, width - plainText.length - 2);
|
|
265
|
-
return `${BOX_CHARS.vertical} ${text}${" ".repeat(padding - 1)}${BOX_CHARS.vertical}`;
|
|
266
|
-
}
|
|
267
|
-
function getVersion() {
|
|
268
|
-
return version;
|
|
269
|
-
}
|
|
270
|
-
function generateWelcome(scanResult, options = {}) {
|
|
271
|
-
const {
|
|
272
|
-
showVersion = true,
|
|
273
|
-
showStats = true,
|
|
274
|
-
showRecommendations = true,
|
|
275
|
-
compact = false
|
|
276
|
-
} = options;
|
|
277
|
-
const lines = [];
|
|
278
|
-
const width = compact ? 50 : 70;
|
|
279
|
-
lines.push(createBorderLine(width, "top"));
|
|
280
|
-
if (showVersion) {
|
|
281
|
-
const version = getVersion();
|
|
282
|
-
const title = ansis.bold.cyan(`\u{1F389} CCJK v${version} - Claude Code JinKu`);
|
|
283
|
-
lines.push(centerText(title, width));
|
|
284
|
-
} else {
|
|
285
|
-
const title = ansis.bold.cyan("\u{1F389} CCJK - Claude Code JinKu");
|
|
286
|
-
lines.push(centerText(title, width));
|
|
287
|
-
}
|
|
288
|
-
if (showStats && scanResult.total > 0) {
|
|
289
|
-
lines.push(leftText("", width));
|
|
290
|
-
lines.push(leftText(ansis.bold("\u2728 Available Capabilities:"), width));
|
|
291
|
-
if (scanResult.skills.length > 0) {
|
|
292
|
-
const activeSkills = scanResult.skills.filter((c) => c.status === "active");
|
|
293
|
-
if (activeSkills.length > 0) {
|
|
294
|
-
lines.push(leftText("", width));
|
|
295
|
-
lines.push(leftText(ansis.bold.green(" \u{1F4DA} Skills:"), width));
|
|
296
|
-
activeSkills.slice(0, 5).forEach((skill) => {
|
|
297
|
-
const trigger = skill.triggers?.[0] || `/${skill.id}`;
|
|
298
|
-
lines.push(leftText(` ${ansis.cyan(trigger.padEnd(20))} ${ansis.dim(skill.description)}`, width));
|
|
299
|
-
});
|
|
300
|
-
if (activeSkills.length > 5) {
|
|
301
|
-
lines.push(leftText(` ${ansis.dim(`... and ${activeSkills.length - 5} more`)}`, width));
|
|
302
|
-
}
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
if (scanResult.mcpServices.length > 0) {
|
|
306
|
-
const activeMcp = scanResult.mcpServices.filter((c) => c.status === "active");
|
|
307
|
-
if (activeMcp.length > 0) {
|
|
308
|
-
lines.push(leftText("", width));
|
|
309
|
-
lines.push(leftText(ansis.bold.green(" \u{1F50C} MCP Services:"), width));
|
|
310
|
-
activeMcp.slice(0, 5).forEach((mcp) => {
|
|
311
|
-
lines.push(leftText(` ${ansis.cyan(mcp.name.padEnd(20))} ${ansis.dim(mcp.description)}`, width));
|
|
312
|
-
});
|
|
313
|
-
if (activeMcp.length > 5) {
|
|
314
|
-
lines.push(leftText(` ${ansis.dim(`... and ${activeMcp.length - 5} more`)}`, width));
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
}
|
|
318
|
-
if (scanResult.agents.length > 0) {
|
|
319
|
-
const activeAgents = scanResult.agents.filter((c) => c.status === "active");
|
|
320
|
-
if (activeAgents.length > 0) {
|
|
321
|
-
lines.push(leftText("", width));
|
|
322
|
-
lines.push(leftText(ansis.bold.green(" \u{1F916} Agents:"), width));
|
|
323
|
-
activeAgents.forEach((agent) => {
|
|
324
|
-
const trigger = agent.triggers?.[0] || agent.id;
|
|
325
|
-
lines.push(leftText(` ${ansis.cyan(trigger.padEnd(20))} ${ansis.dim(agent.description)}`, width));
|
|
326
|
-
});
|
|
327
|
-
}
|
|
328
|
-
}
|
|
329
|
-
if (scanResult.superpowers.length > 0) {
|
|
330
|
-
const activeSuperpowers = scanResult.superpowers.filter((c) => c.status === "active");
|
|
331
|
-
if (activeSuperpowers.length > 0) {
|
|
332
|
-
lines.push(leftText("", width));
|
|
333
|
-
lines.push(leftText(ansis.bold.green(" \u26A1 Superpowers:"), width));
|
|
334
|
-
activeSuperpowers.slice(0, 3).forEach((sp) => {
|
|
335
|
-
lines.push(leftText(` ${ansis.cyan(sp.name.padEnd(20))} ${ansis.dim(sp.description)}`, width));
|
|
336
|
-
});
|
|
337
|
-
if (activeSuperpowers.length > 3) {
|
|
338
|
-
lines.push(leftText(` ${ansis.dim(`... and ${activeSuperpowers.length - 3} more`)}`, width));
|
|
339
|
-
}
|
|
340
|
-
}
|
|
341
|
-
}
|
|
342
|
-
if (scanResult.commands.length > 0) {
|
|
343
|
-
const activeCommands = scanResult.commands.filter((c) => c.status === "active").length;
|
|
344
|
-
lines.push(leftText("", width));
|
|
345
|
-
lines.push(leftText(` ${ansis.green("\u2022")} ${activeCommands} CCJK Command(s) available`, width));
|
|
346
|
-
}
|
|
347
|
-
if (scanResult.errorCount > 0) {
|
|
348
|
-
lines.push(leftText("", width));
|
|
349
|
-
lines.push(leftText(` ${ansis.red("\u26A0")} ${scanResult.errorCount} capability error(s) detected`, width));
|
|
350
|
-
}
|
|
351
|
-
}
|
|
352
|
-
if (showRecommendations && !compact) {
|
|
353
|
-
lines.push(leftText("", width));
|
|
354
|
-
lines.push(leftText(ansis.bold("\u{1F4A1} Quick Tips:"), width));
|
|
355
|
-
lines.push(leftText(` ${ansis.green("/ccjk:status")} - View detailed capability status`, width));
|
|
356
|
-
lines.push(leftText(` ${ansis.green("/ccjk:help")} - Get help and documentation`, width));
|
|
357
|
-
const activeSkills = scanResult.skills.filter((c) => c.status === "active");
|
|
358
|
-
if (activeSkills.length > 0 && activeSkills[0].triggers?.[0]) {
|
|
359
|
-
lines.push(leftText(` ${ansis.green(activeSkills[0].triggers[0])} - Try this skill`, width));
|
|
360
|
-
}
|
|
361
|
-
}
|
|
362
|
-
lines.push(createBorderLine(width, "bottom"));
|
|
363
|
-
return lines.join("\n");
|
|
364
|
-
}
|
|
365
|
-
function generateCompactWelcome(scanResult) {
|
|
366
|
-
const parts = [];
|
|
367
|
-
if (scanResult.commands.length > 0) {
|
|
368
|
-
parts.push(`${scanResult.commands.filter((c) => c.status === "active").length} commands`);
|
|
369
|
-
}
|
|
370
|
-
if (scanResult.skills.length > 0) {
|
|
371
|
-
parts.push(`${scanResult.skills.filter((c) => c.status === "active").length} skills`);
|
|
372
|
-
}
|
|
373
|
-
if (scanResult.superpowers.length > 0) {
|
|
374
|
-
parts.push(`${scanResult.superpowers.filter((c) => c.status === "active").length} superpowers`);
|
|
375
|
-
}
|
|
376
|
-
const summary = parts.join(", ");
|
|
377
|
-
return ansis.dim(`CCJK loaded: ${summary || "no capabilities"}`);
|
|
378
|
-
}
|
|
379
|
-
function generateRecommendations(scanResult) {
|
|
380
|
-
const recommendations = [];
|
|
381
|
-
if (scanResult.total === 0) {
|
|
382
|
-
recommendations.push("Run `npx ccjk` to install CCJK capabilities");
|
|
383
|
-
return recommendations;
|
|
384
|
-
}
|
|
385
|
-
if (scanResult.agents.length === 0) {
|
|
386
|
-
recommendations.push("Install Agent Browser for zero-config browser automation");
|
|
387
|
-
}
|
|
388
|
-
if (scanResult.superpowers.length === 0) {
|
|
389
|
-
recommendations.push("Install Superpowers for advanced AI workflows");
|
|
390
|
-
}
|
|
391
|
-
if (scanResult.errorCount > 0) {
|
|
392
|
-
recommendations.push(`Fix ${scanResult.errorCount} capability error(s) - run /ccjk:status for details`);
|
|
393
|
-
}
|
|
394
|
-
return recommendations;
|
|
395
|
-
}
|
|
396
|
-
|
|
397
|
-
export { getCapability as a, generateCompactWelcome as b, generateRecommendations as c, generateWelcome as d, getCapabilitiesByType as g, scanCapabilities as s };
|