ccjk 2.4.3 → 2.5.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/api-providers.mjs +73 -1
- package/dist/chunks/ccjk-config.mjs +13 -77
- package/dist/chunks/ccr.mjs +9 -4
- package/dist/chunks/check-updates.mjs +4 -2
- package/dist/chunks/claude-code-config-manager.mjs +9 -15
- package/dist/chunks/claude-code-incremental-manager.mjs +5 -8
- package/dist/chunks/codex.mjs +10 -569
- package/dist/chunks/config-switch.mjs +7 -5
- package/dist/chunks/config.mjs +573 -0
- package/dist/chunks/config2.mjs +451 -0
- package/dist/chunks/doctor.mjs +89 -1
- package/dist/chunks/features.mjs +13 -10
- package/dist/chunks/index.mjs +10 -1164
- package/dist/chunks/index2.mjs +8 -2
- package/dist/chunks/init.mjs +14 -11
- package/dist/chunks/json-config.mjs +59 -0
- package/dist/chunks/mcp-server.mjs +776 -0
- package/dist/chunks/mcp.mjs +10 -8
- package/dist/chunks/menu.mjs +5 -5
- package/dist/chunks/package.mjs +1 -1
- package/dist/chunks/permissions.mjs +420 -0
- package/dist/chunks/prompts.mjs +2 -1
- package/dist/chunks/providers.mjs +261 -0
- package/dist/chunks/session.mjs +484 -41
- package/dist/chunks/skills.mjs +553 -0
- package/dist/chunks/stats.mjs +411 -0
- package/dist/chunks/uninstall.mjs +4 -3
- package/dist/chunks/update.mjs +6 -3
- package/dist/chunks/workflows2.mjs +140 -0
- package/dist/cli.mjs +316 -10
- package/dist/i18n/locales/en/hooks.json +47 -0
- package/dist/i18n/locales/en/mcp.json +55 -0
- package/dist/i18n/locales/en/permissions.json +43 -0
- package/dist/i18n/locales/en/sandbox.json +44 -0
- package/dist/i18n/locales/en/skills.json +89 -129
- package/dist/i18n/locales/en/stats.json +20 -0
- package/dist/i18n/locales/zh-CN/hooks.json +47 -0
- package/dist/i18n/locales/zh-CN/mcp.json +55 -0
- package/dist/i18n/locales/zh-CN/permissions.json +43 -0
- package/dist/i18n/locales/zh-CN/sandbox.json +44 -0
- package/dist/i18n/locales/zh-CN/skills.json +88 -128
- package/dist/i18n/locales/zh-CN/stats.json +20 -0
- package/dist/index.mjs +12 -8
- package/dist/shared/ccjk.B-lZxV2u.mjs +1162 -0
- package/dist/shared/{ccjk.CURU8gbR.mjs → ccjk.CUdzQluX.mjs} +1 -1
- package/dist/shared/{ccjk.ByTIGCUC.mjs → ccjk.Dut3wyoP.mjs} +1 -1
- package/dist/shared/ccjk.J8YiPsOw.mjs +259 -0
- package/dist/shared/{ccjk.CGTmRqsu.mjs → ccjk.rLRHmcqD.mjs} +5 -134
- package/dist/shared/{ccjk.QbS8EAOd.mjs → ccjk.uVUeWAt8.mjs} +2 -1
- package/package.json +1 -1
- package/templates/common/skills/code-review.md +343 -0
- package/templates/common/skills/summarize.md +312 -0
- package/templates/common/skills/translate.md +202 -0
package/dist/cli.mjs
CHANGED
|
@@ -63,10 +63,17 @@ const COMMANDS = [
|
|
|
63
63
|
name: "doctor",
|
|
64
64
|
description: "Run environment health check",
|
|
65
65
|
tier: "core",
|
|
66
|
+
options: [
|
|
67
|
+
{ flags: "--check-providers", description: "Check API provider health" },
|
|
68
|
+
{ flags: "--code-type, -T <type>", description: "Code tool type" }
|
|
69
|
+
],
|
|
66
70
|
loader: async () => {
|
|
67
71
|
const { doctor } = await import('./chunks/doctor.mjs');
|
|
68
|
-
return async () => {
|
|
69
|
-
await doctor(
|
|
72
|
+
return async (options) => {
|
|
73
|
+
await doctor({
|
|
74
|
+
checkProviders: options.checkProviders,
|
|
75
|
+
codeType: options.codeType
|
|
76
|
+
});
|
|
70
77
|
};
|
|
71
78
|
}
|
|
72
79
|
},
|
|
@@ -83,6 +90,44 @@ const COMMANDS = [
|
|
|
83
90
|
}
|
|
84
91
|
},
|
|
85
92
|
// ==================== Extended Commands ====================
|
|
93
|
+
{
|
|
94
|
+
name: "serve",
|
|
95
|
+
description: "Start CCJK as MCP server",
|
|
96
|
+
tier: "extended",
|
|
97
|
+
options: [
|
|
98
|
+
{ flags: "--mcp", description: "Enable MCP server mode" },
|
|
99
|
+
{ flags: "--stdio", description: "Use stdio transport (default)" },
|
|
100
|
+
{ flags: "--http", description: "Use HTTP transport" },
|
|
101
|
+
{ flags: "--port <port>", description: "HTTP server port (default: 3000)" },
|
|
102
|
+
{ flags: "--host <host>", description: "HTTP server host (default: localhost)" },
|
|
103
|
+
{ flags: "--debug", description: "Enable debug logging" }
|
|
104
|
+
],
|
|
105
|
+
loader: async () => {
|
|
106
|
+
return async (options) => {
|
|
107
|
+
if (!options.mcp) {
|
|
108
|
+
console.error("Error: --mcp flag is required for serve command");
|
|
109
|
+
console.log("Usage: ccjk serve --mcp [--stdio|--http] [--port 3000]");
|
|
110
|
+
process__default.exit(1);
|
|
111
|
+
}
|
|
112
|
+
const { startMCPServer } = await import('./chunks/mcp-server.mjs');
|
|
113
|
+
const transport = options.http ? "http" : "stdio";
|
|
114
|
+
const port = options.port ? Number.parseInt(options.port, 10) : 3e3;
|
|
115
|
+
const host = options.host || "localhost";
|
|
116
|
+
const debug = options.debug || false;
|
|
117
|
+
console.error(`Starting CCJK MCP Server (${transport} mode)...`);
|
|
118
|
+
await startMCPServer({
|
|
119
|
+
transport,
|
|
120
|
+
port,
|
|
121
|
+
host,
|
|
122
|
+
debug
|
|
123
|
+
});
|
|
124
|
+
if (transport === "http") {
|
|
125
|
+
console.error(`MCP Server running on http://${host}:${port}`);
|
|
126
|
+
console.error("Press Ctrl+C to stop");
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
},
|
|
86
131
|
{
|
|
87
132
|
name: "mcp <action> [...args]",
|
|
88
133
|
description: "MCP Server management",
|
|
@@ -189,11 +234,27 @@ const COMMANDS = [
|
|
|
189
234
|
} else if (options.resume) {
|
|
190
235
|
await resumeInterview();
|
|
191
236
|
} else if (options.depth === "quick") {
|
|
192
|
-
await quickInterview(specFile,
|
|
237
|
+
await quickInterview(specFile, {
|
|
238
|
+
specFile,
|
|
239
|
+
depth: "quick",
|
|
240
|
+
resume: !!options.resume,
|
|
241
|
+
lang: options.lang
|
|
242
|
+
});
|
|
193
243
|
} else if (options.depth === "deep") {
|
|
194
|
-
await deepInterview(specFile,
|
|
244
|
+
await deepInterview(specFile, {
|
|
245
|
+
specFile,
|
|
246
|
+
depth: "deep",
|
|
247
|
+
resume: !!options.resume,
|
|
248
|
+
lang: options.lang
|
|
249
|
+
});
|
|
195
250
|
} else {
|
|
196
|
-
await interview({
|
|
251
|
+
await interview({
|
|
252
|
+
specFile,
|
|
253
|
+
depth: options.depth,
|
|
254
|
+
template: options.template,
|
|
255
|
+
resume: !!options.resume,
|
|
256
|
+
lang: options.lang
|
|
257
|
+
});
|
|
197
258
|
}
|
|
198
259
|
};
|
|
199
260
|
}
|
|
@@ -218,6 +279,84 @@ const COMMANDS = [
|
|
|
218
279
|
};
|
|
219
280
|
}
|
|
220
281
|
},
|
|
282
|
+
{
|
|
283
|
+
name: "config [action] [...args]",
|
|
284
|
+
description: "Manage CCJK configuration",
|
|
285
|
+
tier: "extended",
|
|
286
|
+
options: [
|
|
287
|
+
{ flags: "--format, -f <format>", description: "Output format (table|json|yaml)" },
|
|
288
|
+
{ flags: "--global, -g", description: "Use global config" }
|
|
289
|
+
],
|
|
290
|
+
loader: async () => {
|
|
291
|
+
return async (options, action, args) => {
|
|
292
|
+
const actionStr = action;
|
|
293
|
+
const argsArr = args;
|
|
294
|
+
const configOptions = { global: !!options.global, json: options.format === "json" };
|
|
295
|
+
if (!actionStr || actionStr === "list") {
|
|
296
|
+
const { listConfig } = await import('./chunks/config2.mjs');
|
|
297
|
+
await listConfig(configOptions);
|
|
298
|
+
} else if (actionStr === "get") {
|
|
299
|
+
const { getConfig } = await import('./chunks/config2.mjs');
|
|
300
|
+
await getConfig(argsArr[0] || "", configOptions);
|
|
301
|
+
} else if (actionStr === "set") {
|
|
302
|
+
const { setConfig } = await import('./chunks/config2.mjs');
|
|
303
|
+
await setConfig(argsArr[0] || "", argsArr[1] || "", configOptions);
|
|
304
|
+
} else if (actionStr === "unset") {
|
|
305
|
+
const { unsetConfig } = await import('./chunks/config2.mjs');
|
|
306
|
+
await unsetConfig(argsArr[0] || "", configOptions);
|
|
307
|
+
} else if (actionStr === "reset") {
|
|
308
|
+
const { resetConfig } = await import('./chunks/config2.mjs');
|
|
309
|
+
await resetConfig(configOptions);
|
|
310
|
+
} else if (actionStr === "edit") {
|
|
311
|
+
const { editConfig } = await import('./chunks/config2.mjs');
|
|
312
|
+
await editConfig(configOptions);
|
|
313
|
+
} else if (actionStr === "validate") {
|
|
314
|
+
const { validateConfig } = await import('./chunks/config2.mjs');
|
|
315
|
+
await validateConfig(configOptions);
|
|
316
|
+
} else {
|
|
317
|
+
console.error(`Unknown config action: ${actionStr}`);
|
|
318
|
+
console.log("Available actions: list, get, set, unset, reset, edit, validate");
|
|
319
|
+
}
|
|
320
|
+
};
|
|
321
|
+
}
|
|
322
|
+
},
|
|
323
|
+
{
|
|
324
|
+
name: "providers [action] [...args]",
|
|
325
|
+
description: "Manage API providers",
|
|
326
|
+
tier: "extended",
|
|
327
|
+
options: [
|
|
328
|
+
{ flags: "--format, -f <format>", description: "Output format (table|json)" },
|
|
329
|
+
{ flags: "--code-type, -T <type>", description: "Code tool type" }
|
|
330
|
+
],
|
|
331
|
+
loader: async () => {
|
|
332
|
+
return async (options, action, args) => {
|
|
333
|
+
const actionStr = action;
|
|
334
|
+
const argsArr = args;
|
|
335
|
+
if (!actionStr || actionStr === "list") {
|
|
336
|
+
const { listProviders } = await import('./chunks/providers.mjs');
|
|
337
|
+
await listProviders(options);
|
|
338
|
+
} else if (actionStr === "add") {
|
|
339
|
+
const { addProvider } = await import('./chunks/providers.mjs');
|
|
340
|
+
await addProvider(options);
|
|
341
|
+
} else if (actionStr === "remove") {
|
|
342
|
+
const { removeProvider } = await import('./chunks/providers.mjs');
|
|
343
|
+
await removeProvider(argsArr[0] || "", options);
|
|
344
|
+
} else if (actionStr === "edit") {
|
|
345
|
+
const { editProvider } = await import('./chunks/providers.mjs');
|
|
346
|
+
await editProvider(argsArr[0] || "", options);
|
|
347
|
+
} else if (actionStr === "test") {
|
|
348
|
+
const { testProvider } = await import('./chunks/providers.mjs');
|
|
349
|
+
await testProvider(argsArr[0] || "", options);
|
|
350
|
+
} else if (actionStr === "health") {
|
|
351
|
+
const { checkProviderHealth } = await import('./chunks/providers.mjs');
|
|
352
|
+
await checkProviderHealth(options);
|
|
353
|
+
} else {
|
|
354
|
+
console.error(`Unknown providers action: ${actionStr}`);
|
|
355
|
+
console.log("Available actions: list, add, remove, edit, test, health");
|
|
356
|
+
}
|
|
357
|
+
};
|
|
358
|
+
}
|
|
359
|
+
},
|
|
221
360
|
{
|
|
222
361
|
name: "ccr",
|
|
223
362
|
description: "Configure Claude Code Router",
|
|
@@ -229,6 +368,95 @@ const COMMANDS = [
|
|
|
229
368
|
};
|
|
230
369
|
}
|
|
231
370
|
},
|
|
371
|
+
{
|
|
372
|
+
name: "permissions [action] [...args]",
|
|
373
|
+
description: "Manage CCJK permissions",
|
|
374
|
+
aliases: ["perm"],
|
|
375
|
+
tier: "extended",
|
|
376
|
+
options: [
|
|
377
|
+
{ flags: "--format, -f <format>", description: "Output format (table|json|list)" },
|
|
378
|
+
{ flags: "--verbose, -v", description: "Verbose output" }
|
|
379
|
+
],
|
|
380
|
+
loader: async () => {
|
|
381
|
+
return async (options, action, args) => {
|
|
382
|
+
const actionStr = action;
|
|
383
|
+
const argsArr = args;
|
|
384
|
+
if (!actionStr || actionStr === "list") {
|
|
385
|
+
const { listPermissions } = await import('./chunks/permissions.mjs');
|
|
386
|
+
await listPermissions(options);
|
|
387
|
+
} else if (actionStr === "check") {
|
|
388
|
+
const { checkPermission } = await import('./chunks/permissions.mjs');
|
|
389
|
+
await checkPermission(argsArr[0] || "", options);
|
|
390
|
+
} else if (actionStr === "grant") {
|
|
391
|
+
const { grantPermission } = await import('./chunks/permissions.mjs');
|
|
392
|
+
await grantPermission(argsArr[0] || "", options);
|
|
393
|
+
} else if (actionStr === "revoke") {
|
|
394
|
+
const { revokePermission } = await import('./chunks/permissions.mjs');
|
|
395
|
+
await revokePermission(argsArr[0] || "", options);
|
|
396
|
+
} else if (actionStr === "reset") {
|
|
397
|
+
const { resetPermissions } = await import('./chunks/permissions.mjs');
|
|
398
|
+
await resetPermissions(options);
|
|
399
|
+
} else if (actionStr === "export") {
|
|
400
|
+
const { exportPermissions } = await import('./chunks/permissions.mjs');
|
|
401
|
+
await exportPermissions(argsArr[0], options);
|
|
402
|
+
} else if (actionStr === "import") {
|
|
403
|
+
const { importPermissions } = await import('./chunks/permissions.mjs');
|
|
404
|
+
await importPermissions(argsArr[0] || "", options);
|
|
405
|
+
} else {
|
|
406
|
+
const { permissionsHelp } = await import('./chunks/permissions.mjs');
|
|
407
|
+
permissionsHelp(options);
|
|
408
|
+
}
|
|
409
|
+
};
|
|
410
|
+
}
|
|
411
|
+
},
|
|
412
|
+
{
|
|
413
|
+
name: "skills [action] [...args]",
|
|
414
|
+
description: "Manage CCJK skills",
|
|
415
|
+
aliases: ["sk"],
|
|
416
|
+
tier: "extended",
|
|
417
|
+
options: [
|
|
418
|
+
{ flags: "--category, -c <category>", description: "Filter by category" },
|
|
419
|
+
{ flags: "--show-disabled", description: "Show disabled skills" },
|
|
420
|
+
{ flags: "--format, -f <format>", description: "Output format (table|json|list)" },
|
|
421
|
+
{ flags: "--batch", description: "Batch create skills" }
|
|
422
|
+
],
|
|
423
|
+
loader: async () => {
|
|
424
|
+
return async (options, action, args) => {
|
|
425
|
+
const { initI18n } = await import('./chunks/index2.mjs');
|
|
426
|
+
await initI18n(options.lang || "zh-CN");
|
|
427
|
+
const actionStr = action;
|
|
428
|
+
const argsArr = args;
|
|
429
|
+
if (!actionStr) {
|
|
430
|
+
const { skillsMenu } = await import('./chunks/skills.mjs');
|
|
431
|
+
await skillsMenu(options);
|
|
432
|
+
} else if (actionStr === "list" || actionStr === "ls") {
|
|
433
|
+
const { listSkills } = await import('./chunks/skills.mjs');
|
|
434
|
+
await listSkills(options);
|
|
435
|
+
} else if (actionStr === "run") {
|
|
436
|
+
const { runSkill } = await import('./chunks/skills.mjs');
|
|
437
|
+
await runSkill(argsArr[0] || "", options);
|
|
438
|
+
} else if (actionStr === "info") {
|
|
439
|
+
const { showSkillInfo } = await import('./chunks/skills.mjs');
|
|
440
|
+
await showSkillInfo(argsArr[0] || "", options);
|
|
441
|
+
} else if (actionStr === "create") {
|
|
442
|
+
const { createSkill } = await import('./chunks/skills.mjs');
|
|
443
|
+
await createSkill(argsArr[0] || "", options);
|
|
444
|
+
} else if (actionStr === "enable") {
|
|
445
|
+
const { enableSkill } = await import('./chunks/skills.mjs');
|
|
446
|
+
await enableSkill(argsArr[0] || "", options);
|
|
447
|
+
} else if (actionStr === "disable") {
|
|
448
|
+
const { disableSkill } = await import('./chunks/skills.mjs');
|
|
449
|
+
await disableSkill(argsArr[0] || "", options);
|
|
450
|
+
} else if (actionStr === "delete" || actionStr === "remove" || actionStr === "rm") {
|
|
451
|
+
const { deleteSkill } = await import('./chunks/skills.mjs');
|
|
452
|
+
await deleteSkill(argsArr[0] || "", options);
|
|
453
|
+
} else {
|
|
454
|
+
const { runSkill } = await import('./chunks/skills.mjs');
|
|
455
|
+
await runSkill(actionStr, options);
|
|
456
|
+
}
|
|
457
|
+
};
|
|
458
|
+
}
|
|
459
|
+
},
|
|
232
460
|
{
|
|
233
461
|
name: "ccu [...args]",
|
|
234
462
|
description: "Claude Code usage analysis",
|
|
@@ -240,6 +468,37 @@ const COMMANDS = [
|
|
|
240
468
|
};
|
|
241
469
|
}
|
|
242
470
|
},
|
|
471
|
+
{
|
|
472
|
+
name: "stats [action]",
|
|
473
|
+
description: "Usage statistics and analytics",
|
|
474
|
+
tier: "extended",
|
|
475
|
+
options: [
|
|
476
|
+
{ flags: "--period, -p <period>", description: "Time period (1d, 7d, 30d, 90d, all)" },
|
|
477
|
+
{ flags: "--format, -f <format>", description: "Output format (table, json, csv)" },
|
|
478
|
+
{ flags: "--export, -e <file>", description: "Export to file" },
|
|
479
|
+
{ flags: "--provider <provider>", description: "Filter by provider" },
|
|
480
|
+
{ flags: "--days <days>", description: "Days to keep for cleanup action" }
|
|
481
|
+
],
|
|
482
|
+
loader: async () => {
|
|
483
|
+
return async (options, action) => {
|
|
484
|
+
const actionStr = action;
|
|
485
|
+
if (actionStr === "dates") {
|
|
486
|
+
const { listStatsDates } = await import('./chunks/stats.mjs');
|
|
487
|
+
await listStatsDates();
|
|
488
|
+
} else if (actionStr === "storage") {
|
|
489
|
+
const { storageStats } = await import('./chunks/stats.mjs');
|
|
490
|
+
await storageStats();
|
|
491
|
+
} else if (actionStr === "cleanup") {
|
|
492
|
+
const { cleanupStats } = await import('./chunks/stats.mjs');
|
|
493
|
+
const days = options.days ? Number.parseInt(options.days, 10) : 90;
|
|
494
|
+
await cleanupStats(days);
|
|
495
|
+
} else {
|
|
496
|
+
const { stats } = await import('./chunks/stats.mjs');
|
|
497
|
+
await stats(options);
|
|
498
|
+
}
|
|
499
|
+
};
|
|
500
|
+
}
|
|
501
|
+
},
|
|
243
502
|
{
|
|
244
503
|
name: "uninstall",
|
|
245
504
|
description: "Remove CCJK configurations",
|
|
@@ -317,14 +576,19 @@ const COMMANDS = [
|
|
|
317
576
|
},
|
|
318
577
|
{
|
|
319
578
|
name: "session <action> [id]",
|
|
320
|
-
description: "Manage sessions (save, list, restore, export, cleanup, status)",
|
|
579
|
+
description: "Manage sessions (save, list, restore, export, cleanup, status, create, rename, delete)",
|
|
321
580
|
tier: "extended",
|
|
322
581
|
options: [
|
|
323
582
|
{ flags: "--all, -a", description: "Clean all targets without selection" },
|
|
324
|
-
{ flags: "--force, -f", description: "Force cleanup without confirmation" }
|
|
583
|
+
{ flags: "--force, -f", description: "Force cleanup without confirmation" },
|
|
584
|
+
{ flags: "--name, -n <name>", description: "Session name" },
|
|
585
|
+
{ flags: "--provider, -p <provider>", description: "API provider" },
|
|
586
|
+
{ flags: "--api-key, -k <key>", description: "API key" },
|
|
587
|
+
{ flags: "--resume, -r <session>", description: "Resume session by name or ID" },
|
|
588
|
+
{ flags: "--background, -b", description: "Run in background mode" }
|
|
325
589
|
],
|
|
326
590
|
loader: async () => {
|
|
327
|
-
const { saveSession, listSessions, restoreSession, exportSession, cleanupSession, sessionStatus } = await import('./chunks/session.mjs');
|
|
591
|
+
const { saveSession, listSessions, restoreSession, exportSession, cleanupSession, sessionStatus, createSessionCommand, renameSessionCommand, deleteSessionCommand } = await import('./chunks/session.mjs');
|
|
328
592
|
return async (options, action, id) => {
|
|
329
593
|
const actionStr = action;
|
|
330
594
|
if (actionStr === "save")
|
|
@@ -339,8 +603,14 @@ const COMMANDS = [
|
|
|
339
603
|
await cleanupSession({ all: options.all, force: options.force });
|
|
340
604
|
else if (actionStr === "status")
|
|
341
605
|
await sessionStatus();
|
|
606
|
+
else if (actionStr === "create")
|
|
607
|
+
await createSessionCommand(options);
|
|
608
|
+
else if (actionStr === "rename")
|
|
609
|
+
await renameSessionCommand(id, options);
|
|
610
|
+
else if (actionStr === "delete")
|
|
611
|
+
await deleteSessionCommand(id, options);
|
|
342
612
|
else
|
|
343
|
-
console.error(`Unknown action: ${actionStr}. Use: save, list, restore, export, cleanup, or
|
|
613
|
+
console.error(`Unknown action: ${actionStr}. Use: save, list, restore, export, cleanup, status, create, rename, or delete`);
|
|
344
614
|
};
|
|
345
615
|
}
|
|
346
616
|
},
|
|
@@ -626,6 +896,41 @@ ${chalk.yellow("By Status:")}`);
|
|
|
626
896
|
});
|
|
627
897
|
};
|
|
628
898
|
}
|
|
899
|
+
},
|
|
900
|
+
// ==================== API Provider Management ====================
|
|
901
|
+
{
|
|
902
|
+
name: "providers [action]",
|
|
903
|
+
description: "Manage API providers",
|
|
904
|
+
tier: "extended",
|
|
905
|
+
options: [
|
|
906
|
+
{ flags: "--json", description: "Output in JSON format" }
|
|
907
|
+
],
|
|
908
|
+
loader: async () => {
|
|
909
|
+
const { providersCommand } = await import('./chunks/providers.mjs');
|
|
910
|
+
return async (options, action) => {
|
|
911
|
+
await providersCommand(action, options);
|
|
912
|
+
};
|
|
913
|
+
}
|
|
914
|
+
},
|
|
915
|
+
// ==================== Configuration Management ====================
|
|
916
|
+
{
|
|
917
|
+
name: "config [action] [key] [value]",
|
|
918
|
+
description: "Manage configuration",
|
|
919
|
+
tier: "extended",
|
|
920
|
+
options: [
|
|
921
|
+
{ flags: "--json", description: "Output in JSON format" }
|
|
922
|
+
],
|
|
923
|
+
loader: async () => {
|
|
924
|
+
const { configCommand } = await import('./chunks/config2.mjs');
|
|
925
|
+
return async (options, action, key, value) => {
|
|
926
|
+
const args = [];
|
|
927
|
+
if (key !== void 0)
|
|
928
|
+
args.push(key);
|
|
929
|
+
if (value !== void 0)
|
|
930
|
+
args.push(value);
|
|
931
|
+
await configCommand(action, args, options);
|
|
932
|
+
};
|
|
933
|
+
}
|
|
629
934
|
}
|
|
630
935
|
// context 命令已在上面定义(第 435 行),使用 context-compression/commands/context.ts
|
|
631
936
|
// shell hook 管理功能通过 'ccjk context hook install/uninstall' 子命令访问
|
|
@@ -657,7 +962,7 @@ async function resolveLanguage(options) {
|
|
|
657
962
|
if (envLang)
|
|
658
963
|
return envLang;
|
|
659
964
|
try {
|
|
660
|
-
const { readZcfConfigAsync } = await import('./chunks/ccjk-config.mjs')
|
|
965
|
+
const { readZcfConfigAsync } = await import('./chunks/ccjk-config.mjs');
|
|
661
966
|
const config = await readZcfConfigAsync();
|
|
662
967
|
if (config?.preferredLang)
|
|
663
968
|
return config.preferredLang;
|
|
@@ -881,6 +1186,7 @@ function customizeHelpLazy(_sections, version) {
|
|
|
881
1186
|
body: [
|
|
882
1187
|
` ${cyan("ccjk mcp")} <action> MCP server management`,
|
|
883
1188
|
` ${cyan("ccjk browser")} ${gray("ab")} Agent Browser automation ${green("NEW")}`,
|
|
1189
|
+
` ${cyan("ccjk skills")} ${gray("sk")} Manage CCJK skills ${green("NEW")}`,
|
|
884
1190
|
` ${cyan("ccjk interview")} ${gray("iv")} Interview-driven development`,
|
|
885
1191
|
` ${cyan("ccjk commit")} Smart git commit`,
|
|
886
1192
|
` ${cyan("ccjk config-switch")} ${gray("cs")} Switch configuration`,
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "CCJK Hooks Management",
|
|
3
|
+
"globalStatus": "Global Status",
|
|
4
|
+
"configPath": "Config Path",
|
|
5
|
+
"enabled": "Enabled",
|
|
6
|
+
"disabled": "Disabled",
|
|
7
|
+
"noHooksRegistered": "No hooks registered yet.",
|
|
8
|
+
"addHookHint": "Add your first hook with:",
|
|
9
|
+
"description": "Description",
|
|
10
|
+
"timeout": "Timeout",
|
|
11
|
+
"async": "Async",
|
|
12
|
+
"sync": "Sync",
|
|
13
|
+
"legend": "Legend",
|
|
14
|
+
"verboseHint": "Use --verbose for more details",
|
|
15
|
+
"type": {
|
|
16
|
+
"PreRequest": "Pre-Request Hooks",
|
|
17
|
+
"PostResponse": "Post-Response Hooks",
|
|
18
|
+
"ProviderSwitch": "Provider Switch Hooks",
|
|
19
|
+
"Error": "Error Hooks",
|
|
20
|
+
"SessionStart": "Session Start Hooks",
|
|
21
|
+
"SessionEnd": "Session End Hooks"
|
|
22
|
+
},
|
|
23
|
+
"invalidType": "Invalid hook type: {{type}}",
|
|
24
|
+
"validTypes": "Valid types",
|
|
25
|
+
"hookTypes": "Available hook types",
|
|
26
|
+
"addSuccess": "Hook added successfully: {{type}} - {{command}}",
|
|
27
|
+
"addFailed": "Failed to add hook",
|
|
28
|
+
"addUsage": "Usage: ccjk hooks add <type> <command>",
|
|
29
|
+
"addExample": "Example:",
|
|
30
|
+
"removeSuccess": "Hook removed successfully: {{type}} - {{command}}",
|
|
31
|
+
"removeNotFound": "Hook not found: {{type}} - {{command}}",
|
|
32
|
+
"removeUsage": "Usage: ccjk hooks remove <type> <command>",
|
|
33
|
+
"removeExample": "Example:",
|
|
34
|
+
"clearTypeSuccess": "All {{type}} hooks cleared successfully",
|
|
35
|
+
"clearTypeFailed": "Failed to clear {{type}} hooks",
|
|
36
|
+
"clearAllSuccess": "All hooks cleared successfully",
|
|
37
|
+
"clearAllFailed": "Failed to clear all hooks",
|
|
38
|
+
"enableSuccess": "Hooks enabled globally",
|
|
39
|
+
"disableSuccess": "Hooks disabled globally",
|
|
40
|
+
"helpTitle": "CCJK Hooks Commands",
|
|
41
|
+
"helpList": "List all registered hooks",
|
|
42
|
+
"helpAdd": "Add a new hook",
|
|
43
|
+
"helpRemove": "Remove a hook",
|
|
44
|
+
"helpClear": "Clear hooks (all or by type)",
|
|
45
|
+
"helpEnable": "Enable hooks globally",
|
|
46
|
+
"helpDisable": "Disable hooks globally"
|
|
47
|
+
}
|
|
@@ -68,5 +68,60 @@
|
|
|
68
68
|
"restartRequired": "Restart Claude Code for changes to take effect",
|
|
69
69
|
"noServicesInstalled": "No MCP services installed",
|
|
70
70
|
"installedServices": "Installed MCP services ({{tool}})"
|
|
71
|
+
},
|
|
72
|
+
"server": {
|
|
73
|
+
"starting": "Starting CCJK MCP server...",
|
|
74
|
+
"started": "✓ CCJK MCP server started",
|
|
75
|
+
"listening": "Listening on port: {{port}}",
|
|
76
|
+
"stdioMode": "Using stdio transport",
|
|
77
|
+
"httpMode": "Using HTTP transport",
|
|
78
|
+
"error": "MCP server error: {{error}}",
|
|
79
|
+
"invalidTransport": "Invalid transport mode: {{transport}}",
|
|
80
|
+
"portInUse": "Port {{port}} is already in use",
|
|
81
|
+
"initializeFailed": "Failed to initialize MCP server",
|
|
82
|
+
"toolNotFound": "Tool not found: {{name}}",
|
|
83
|
+
"toolExecutionError": "Tool execution error: {{error}}",
|
|
84
|
+
"invalidRequest": "Invalid request format",
|
|
85
|
+
"methodNotSupported": "Method not supported: {{method}}",
|
|
86
|
+
"serverInfo": "CCJK MCP Server v{{version}}",
|
|
87
|
+
"capabilities": "Server capabilities: {{capabilities}}",
|
|
88
|
+
"toolsAvailable": "Available tools: {{count}}",
|
|
89
|
+
"requestReceived": "Request received: {{method}}",
|
|
90
|
+
"responseTime": "Response time: {{time}}ms",
|
|
91
|
+
"debugMode": "Debug mode enabled"
|
|
92
|
+
},
|
|
93
|
+
"tools": {
|
|
94
|
+
"chat": {
|
|
95
|
+
"name": "CCJK Chat",
|
|
96
|
+
"description": "Send messages to Claude via CCJK with custom provider and model selection"
|
|
97
|
+
},
|
|
98
|
+
"providers": {
|
|
99
|
+
"name": "List Providers",
|
|
100
|
+
"description": "List all configured API providers"
|
|
101
|
+
},
|
|
102
|
+
"stats": {
|
|
103
|
+
"name": "Usage Statistics",
|
|
104
|
+
"description": "Get usage statistics (requires CCusage tool)"
|
|
105
|
+
},
|
|
106
|
+
"workflows": {
|
|
107
|
+
"name": "List Workflows",
|
|
108
|
+
"description": "List available workflows"
|
|
109
|
+
},
|
|
110
|
+
"mcpServices": {
|
|
111
|
+
"name": "List MCP Services",
|
|
112
|
+
"description": "List configured MCP services"
|
|
113
|
+
},
|
|
114
|
+
"config": {
|
|
115
|
+
"name": "Configuration Management",
|
|
116
|
+
"description": "Get or set CCJK configuration"
|
|
117
|
+
},
|
|
118
|
+
"init": {
|
|
119
|
+
"name": "Initialize Configuration",
|
|
120
|
+
"description": "Initialize or update Claude Code configuration"
|
|
121
|
+
},
|
|
122
|
+
"doctor": {
|
|
123
|
+
"name": "Health Check",
|
|
124
|
+
"description": "Run health check and diagnostics"
|
|
125
|
+
}
|
|
71
126
|
}
|
|
72
127
|
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"noRules": "No permission rules configured",
|
|
3
|
+
"currentRules": "Current Permission Rules",
|
|
4
|
+
"allowRules": "Allow Rules",
|
|
5
|
+
"denyRules": "Deny Rules",
|
|
6
|
+
"totalRules": "Total",
|
|
7
|
+
"allow": "allow",
|
|
8
|
+
"deny": "deny",
|
|
9
|
+
"ruleExamples": "Permission Rule Examples",
|
|
10
|
+
"ruleFormat": "Rule Format:",
|
|
11
|
+
"supportedResourceTypes": "Supported Resource Types:",
|
|
12
|
+
"wildcardSupport": "Wildcard Support:",
|
|
13
|
+
"enterRule": "Enter permission rule",
|
|
14
|
+
"invalidRule": "Invalid rule",
|
|
15
|
+
"selectRuleType": "Select rule type",
|
|
16
|
+
"enterDescription": "Enter description (optional)",
|
|
17
|
+
"ruleAdded": "Permission rule added",
|
|
18
|
+
"noRulesToRemove": "No permission rules to remove",
|
|
19
|
+
"selectRuleToRemove": "Select rule to remove",
|
|
20
|
+
"ruleRemoved": "Permission rule removed",
|
|
21
|
+
"rulesRemoved": "rules removed",
|
|
22
|
+
"ruleNotFound": "Rule not found",
|
|
23
|
+
"enterTarget": "Enter target to check (e.g., Provider(302ai):read)",
|
|
24
|
+
"invalidTargetFormat": "Invalid target format",
|
|
25
|
+
"targetFormatExample": "Expected format: Resource:action (e.g., Provider(302ai):read)",
|
|
26
|
+
"permissionCheck": "Permission Check Result",
|
|
27
|
+
"target": "Target",
|
|
28
|
+
"allowed": "ALLOWED",
|
|
29
|
+
"denied": "DENIED",
|
|
30
|
+
"reason": "Reason",
|
|
31
|
+
"matchedRule": "Matched Rule:",
|
|
32
|
+
"confirmClear": "Are you sure you want to clear {{type}} permission rules?",
|
|
33
|
+
"all": "all",
|
|
34
|
+
"rulesCleared": "Permission rules cleared",
|
|
35
|
+
"selectAction": "Select action",
|
|
36
|
+
"listRules": "List all rules",
|
|
37
|
+
"addRule": "Add new rule",
|
|
38
|
+
"removeRule": "Remove rule",
|
|
39
|
+
"checkPermission": "Check permission",
|
|
40
|
+
"clearRules": "Clear rules",
|
|
41
|
+
"showExamples": "Show examples",
|
|
42
|
+
"unknownAction": "Unknown action"
|
|
43
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"enablingTitle": "Enabling Sandbox Mode",
|
|
3
|
+
"enabledSuccess": "Sandbox mode enabled",
|
|
4
|
+
"disabledSuccess": "Sandbox mode disabled",
|
|
5
|
+
"notEnabled": "Sandbox mode is not enabled",
|
|
6
|
+
"statusTitle": "Sandbox Status",
|
|
7
|
+
"menuTitle": "Sandbox Management",
|
|
8
|
+
"isolateRequestsPrompt": "Isolate requests?",
|
|
9
|
+
"maskSensitiveDataPrompt": "Mask sensitive data?",
|
|
10
|
+
"auditLogPrompt": "Enable audit logging?",
|
|
11
|
+
"maxRequestsPrompt": "Maximum requests per minute",
|
|
12
|
+
"invalidNumber": "Please enter a valid number",
|
|
13
|
+
"disableConfirm": "Are you sure you want to disable sandbox mode?",
|
|
14
|
+
"clearConfirm": "Are you sure you want to clear audit logs?",
|
|
15
|
+
"clearedLogs": "Cleared {{count}} log file(s)",
|
|
16
|
+
"status": "Status",
|
|
17
|
+
"enabled": "Enabled",
|
|
18
|
+
"disabled": "Disabled",
|
|
19
|
+
"configuration": "Configuration",
|
|
20
|
+
"isolateRequests": "Request Isolation",
|
|
21
|
+
"maskSensitiveData": "Data Masking",
|
|
22
|
+
"auditLog": "Audit Logging",
|
|
23
|
+
"maxRequests": "Rate Limiting",
|
|
24
|
+
"statistics": "Statistics",
|
|
25
|
+
"totalRequests": "Total Requests",
|
|
26
|
+
"totalResponses": "Total Responses",
|
|
27
|
+
"totalErrors": "Total Errors",
|
|
28
|
+
"rateLimitHits": "Rate Limit Hits",
|
|
29
|
+
"auditLogInfo": "Audit Log Information",
|
|
30
|
+
"totalEntries": "Total Entries",
|
|
31
|
+
"requests": "Requests",
|
|
32
|
+
"responses": "Responses",
|
|
33
|
+
"errors": "Errors",
|
|
34
|
+
"timeRange": "Time Range",
|
|
35
|
+
"auditLogsTitle": "Audit Logs",
|
|
36
|
+
"showing": "Showing",
|
|
37
|
+
"entries": "entries",
|
|
38
|
+
"noAuditLogs": "No audit logs found",
|
|
39
|
+
"enableSandbox": "Enable Sandbox Mode",
|
|
40
|
+
"disableSandbox": "Disable Sandbox Mode",
|
|
41
|
+
"viewStatus": "View Status",
|
|
42
|
+
"viewAuditLogs": "View Audit Logs",
|
|
43
|
+
"clearAuditLogs": "Clear Audit Logs"
|
|
44
|
+
}
|