ccjk 12.0.7 → 12.0.9

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.
Files changed (47) hide show
  1. package/dist/chunks/agents.mjs +1 -1
  2. package/dist/chunks/auto-fixer.mjs +93 -0
  3. package/dist/chunks/auto-updater.mjs +3 -2
  4. package/dist/chunks/boost.mjs +1 -1
  5. package/dist/chunks/ccr.mjs +4 -3
  6. package/dist/chunks/check-updates.mjs +3 -2
  7. package/dist/chunks/claude-code-incremental-manager.mjs +3 -2
  8. package/dist/chunks/codex-config-switch.mjs +2 -1
  9. package/dist/chunks/codex-provider-manager.mjs +2 -1
  10. package/dist/chunks/codex-uninstaller.mjs +1 -1
  11. package/dist/chunks/codex.mjs +1 -1
  12. package/dist/chunks/config-switch.mjs +2 -1
  13. package/dist/chunks/config2.mjs +2 -1
  14. package/dist/chunks/doctor.mjs +1 -0
  15. package/dist/chunks/features.mjs +3 -2
  16. package/dist/chunks/index10.mjs +569 -1061
  17. package/dist/chunks/index11.mjs +1076 -913
  18. package/dist/chunks/index12.mjs +951 -135
  19. package/dist/chunks/index13.mjs +184 -209
  20. package/dist/chunks/index14.mjs +210 -655
  21. package/dist/chunks/index4.mjs +1 -1
  22. package/dist/chunks/index7.mjs +201 -2182
  23. package/dist/chunks/init.mjs +5 -5
  24. package/dist/chunks/installer.mjs +2 -1
  25. package/dist/chunks/mcp-cli.mjs +2 -1
  26. package/dist/chunks/mcp.mjs +2 -1
  27. package/dist/chunks/menu.mjs +22 -11
  28. package/dist/chunks/onboarding-wizard.mjs +93 -0
  29. package/dist/chunks/onboarding.mjs +1 -0
  30. package/dist/chunks/package.mjs +1 -1
  31. package/dist/chunks/prompts.mjs +2 -1
  32. package/dist/chunks/quick-actions.mjs +1 -1
  33. package/dist/chunks/quick-provider.mjs +1 -0
  34. package/dist/chunks/quick-setup.mjs +3 -2
  35. package/dist/chunks/remote.mjs +1 -0
  36. package/dist/chunks/status.mjs +7 -2
  37. package/dist/chunks/uninstall.mjs +3 -2
  38. package/dist/chunks/update.mjs +3 -2
  39. package/dist/chunks/upgrade-manager.mjs +1 -1
  40. package/dist/chunks/wsl.mjs +1 -1
  41. package/dist/cli.mjs +19 -3
  42. package/dist/shared/{ccjk.DOwtZMk8.mjs → ccjk.BWFpnOr3.mjs} +7 -1831
  43. package/dist/shared/{ccjk.D5MFQT7w.mjs → ccjk.CNMWk_mE.mjs} +7 -7
  44. package/dist/shared/{ccjk.BRZ9ww8S.mjs → ccjk.CvChMYvB.mjs} +1 -1
  45. package/dist/shared/ccjk.DeWpAShp.mjs +1828 -0
  46. package/dist/shared/{ccjk.BwfbSKN2.mjs → ccjk.Dx-O9dWz.mjs} +1 -1
  47. package/package.json +2 -2
@@ -3,7 +3,7 @@ import { i as inquirer } from './index3.mjs';
3
3
  import { existsSync } from 'node:fs';
4
4
  import process__default from 'node:process';
5
5
  import { m as runCodexFullInit, d as selectMcpServices, g as getMcpServices, M as MCP_SERVICE_CONFIGS } from './codex.mjs';
6
- import { a as modifyApiConfigPartially, b as configureApiCompletely, n as needsMigration, m as migrateSettingsForTokenRetrieval, d as displayMigrationResult, p as promptMigration, s as selectAndInstallWorkflows, c as configureOutputStyle, f as formatApiKeyDisplay, W as WORKFLOW_CONFIG_BASE } from '../shared/ccjk.BwfbSKN2.mjs';
6
+ import { a as modifyApiConfigPartially, b as configureApiCompletely, n as needsMigration, m as migrateSettingsForTokenRetrieval, d as displayMigrationResult, p as promptMigration, s as selectAndInstallWorkflows, c as configureOutputStyle, f as formatApiKeyDisplay, W as WORKFLOW_CONFIG_BASE } from '../shared/ccjk.Dx-O9dWz.mjs';
7
7
  import { SETTINGS_FILE, DEFAULT_CODE_TOOL_TYPE, CODE_TOOL_BANNERS, API_DEFAULT_URL } from './constants.mjs';
8
8
  import { ensureI18nInitialized, i18n } from './index5.mjs';
9
9
  import { displayBannerWithInfo, padToDisplayWidth } from './banner.mjs';
@@ -25,7 +25,7 @@ import { a as addNumbersToChoices } from '../shared/ccjk.BFQ7yr5S.mjs';
25
25
  import { resolveAiOutputLanguage } from './prompts.mjs';
26
26
  import { g as getRuntimeVersion } from '../shared/ccjk.gDEDGD_t.mjs';
27
27
  import { c as checkSuperpowersInstalled, i as installSuperpowers } from '../shared/ccjk._dESH4Rk.mjs';
28
- import { p as promptBoolean } from '../shared/ccjk.DOwtZMk8.mjs';
28
+ import { p as promptBoolean } from '../shared/ccjk.BWFpnOr3.mjs';
29
29
  import { checkClaudeCodeVersionAndPrompt } from './version-checker.mjs';
30
30
 
31
31
  const execAsync$1 = promisify(exec);
@@ -1517,7 +1517,7 @@ async function smartInit(options = {}) {
1517
1517
  try {
1518
1518
  console.log(a.bold.green("\n\u{1F9E0} Smart Initialization Mode\n"));
1519
1519
  console.log(a.gray("Analyzing your project to generate optimal configuration...\n"));
1520
- const { analyzeProject } = await import('./index14.mjs');
1520
+ const { analyzeProject } = await import('./index10.mjs');
1521
1521
  const analysis = await analyzeProject();
1522
1522
  console.log(a.cyan("\u{1F4CA} Project Analysis:"));
1523
1523
  console.log(a.gray(` \u2022 Type: ${analysis.projectType}`));
@@ -1536,7 +1536,7 @@ async function smartInit(options = {}) {
1536
1536
  console.log(a.gray(` \u2022 CI/CD: ${analysis.cicd.join(", ")}`));
1537
1537
  }
1538
1538
  console.log("");
1539
- const { selectTemplates } = await import('./index14.mjs');
1539
+ const { selectTemplates } = await import('./index10.mjs');
1540
1540
  const selection = await selectTemplates(analysis);
1541
1541
  console.log(a.cyan("\u{1F3AF} Template Selection:"));
1542
1542
  console.log(a.gray(` \u2022 Agents: ${selection.agents.length} selected`));
@@ -1562,7 +1562,7 @@ async function smartInit(options = {}) {
1562
1562
  }
1563
1563
  }
1564
1564
  console.log(a.gray("\n\u{1F527} Generating configurations...\n"));
1565
- const { generateConfigs, writeConfigs } = await import('./index14.mjs');
1565
+ const { generateConfigs, writeConfigs } = await import('./index10.mjs');
1566
1566
  const config = await generateConfigs(selection);
1567
1567
  await writeConfigs(config);
1568
1568
  console.log(a.green("\u2714 Configurations generated successfully!"));
@@ -24,11 +24,12 @@ import 'node:path';
24
24
  import 'node:crypto';
25
25
  import 'buffer';
26
26
  import 'string_decoder';
27
+ import '../shared/ccjk.DeWpAShp.mjs';
27
28
  import 'module';
28
29
  import 'node:child_process';
29
30
  import 'node:stream';
30
31
  import 'node:url';
31
- import '../shared/ccjk.DOwtZMk8.mjs';
32
+ import '../shared/ccjk.BWFpnOr3.mjs';
32
33
  import './version-checker.mjs';
33
34
  import '../shared/ccjk.CxpGa6MC.mjs';
34
35
  import 'node:fs/promises';
@@ -25,6 +25,7 @@ import 'node:crypto';
25
25
  import 'buffer';
26
26
  import 'string_decoder';
27
27
  import './index7.mjs';
28
+ import '../shared/ccjk.DeWpAShp.mjs';
28
29
  import '../shared/ccjk.CxpGa6MC.mjs';
29
30
  import '../shared/ccjk.BBtCGd_g.mjs';
30
31
  import './main.mjs';
@@ -43,7 +44,7 @@ import './platform.mjs';
43
44
  import '../shared/ccjk.BFQ7yr5S.mjs';
44
45
  import './prompts.mjs';
45
46
  import '../shared/ccjk.gDEDGD_t.mjs';
46
- import '../shared/ccjk.DOwtZMk8.mjs';
47
+ import '../shared/ccjk.BWFpnOr3.mjs';
47
48
 
48
49
  async function mcpInstallCli(options) {
49
50
  const lang = options.lang || i18n.language || "en";
@@ -35,6 +35,7 @@ import 'child_process';
35
35
  import 'buffer';
36
36
  import 'string_decoder';
37
37
  import './index7.mjs';
38
+ import '../shared/ccjk.DeWpAShp.mjs';
38
39
  import '../shared/ccjk.CxpGa6MC.mjs';
39
40
  import '../shared/ccjk.BBtCGd_g.mjs';
40
41
  import './ccjk-config.mjs';
@@ -44,7 +45,7 @@ import '../shared/ccjk.DXRAZcix.mjs';
44
45
  import '../shared/ccjk.BFQ7yr5S.mjs';
45
46
  import './prompts.mjs';
46
47
  import '../shared/ccjk.gDEDGD_t.mjs';
47
- import '../shared/ccjk.DOwtZMk8.mjs';
48
+ import '../shared/ccjk.BWFpnOr3.mjs';
48
49
 
49
50
  function getReleasableServices(configuredServices, tier) {
50
51
  return configuredServices.filter((serviceId) => {
@@ -12,7 +12,7 @@ import { r as resolveCodeType } from '../shared/ccjk.Cjj8SVrn.mjs';
12
12
  import { h as handleExitPromptError, a as handleGeneralError } from '../shared/ccjk.BIxuVL3_.mjs';
13
13
  import { changeScriptLanguageFeature, mcpManagerFeature, configureMergedPermissionsFeature, configureAiMemoryFeature, configureDefaultModelFeature, configureMcpFeature, configureApiFeature } from './features.mjs';
14
14
  import { a as addNumbersToChoices } from '../shared/ccjk.BFQ7yr5S.mjs';
15
- import { p as promptBoolean } from '../shared/ccjk.DOwtZMk8.mjs';
15
+ import { p as promptBoolean } from '../shared/ccjk.BWFpnOr3.mjs';
16
16
  import { homedir } from 'node:os';
17
17
  import { runCcrStop, runCcrStart, runCcrRestart, runCcrStatus, runCcrUi } from './commands.mjs';
18
18
  import { readCcrConfig, configureCcrFeature } from './config2.mjs';
@@ -325,6 +325,7 @@ function showHelpDocumentation(isZh) {
325
325
  console.log(` ${a.green("npx ccjk skills")} ${a.dim(isZh ? "- \u7BA1\u7406\u6280\u80FD" : "- Manage skills")}`);
326
326
  console.log(` ${a.green("npx ccjk mcp")} ${a.dim(isZh ? "- \u7BA1\u7406 MCP" : "- Manage MCP")}`);
327
327
  console.log(` ${a.green("npx ccjk agents")} ${a.dim(isZh ? "- \u7BA1\u7406\u667A\u80FD\u4F53" : "- Manage agents")}`);
328
+ console.log(` ${a.green("npx ccjk gen")} ${a.dim(isZh ? "- \u667A\u80FD\u751F\u6210 agents/skills" : "- Smart generate agents/skills")}`);
328
329
  console.log("");
329
330
  console.log(a.bold(isZh ? "\u26A1 \u5FEB\u6377\u65B9\u5F0F" : "\u26A1 Shortcuts"));
330
331
  console.log(` ${a.green("npx ccjk qs")} ${a.dim(isZh ? "- \u5FEB\u901F\u914D\u7F6E (quick-setup)" : "- Quick setup")}`);
@@ -393,6 +394,7 @@ async function showSimplifiedMenu() {
393
394
  console.log(` ${a.green("A.")} ${isZh ? "Agents \u7BA1\u7406" : "Agents Manager"} ${a.dim(isZh ? "- \u521B\u5EFA/\u7BA1\u7406 AI \u667A\u80FD\u4F53" : "- Create/manage AI agents")}`);
394
395
  console.log(` ${a.green("P.")} ${isZh ? "\u6301\u4E45\u5316\u7BA1\u7406" : "Persistence Manager"} ${a.dim(isZh ? "- \u7BA1\u7406\u4E0A\u4E0B\u6587\u5B58\u50A8\u548C\u5C42\u7EA7" : "- Manage context storage and tiers")}`);
395
396
  console.log(` ${a.green("R.")} ${isZh ? "CCR" : "CCR"} ${a.dim(isZh ? "- \u914D\u7F6E Claude Code Router \u4EE5\u4F7F\u7528\u591A\u4E2A AI \u6A21\u578B" : "- Configure Claude Code Router for multiple AI models")}`);
397
+ console.log(` ${a.green("G.")} ${isZh ? "\u667A\u80FD\u751F\u6210 Agents/Skills" : "Smart Generate Agents/Skills"} ${a.dim(isZh ? "- \u5206\u6790\u9879\u76EE\uFF0C\u81EA\u52A8\u751F\u6210 agent/skill \u914D\u7F6E" : "- Analyze project, auto-generate agent/skill configs")}`);
396
398
  console.log("");
397
399
  console.log(a.dim(` ------------ CCJK ------------`));
398
400
  console.log(` ${a.green("0.")} ${isZh ? "\u66F4\u6539\u663E\u793A\u8BED\u8A00 / Select display language" : "Select display language"} ${a.dim(isZh ? "- \u66F4\u6539 CCJK \u754C\u9762\u8BED\u8A00" : "- Change CCJK interface language")}`);
@@ -409,7 +411,7 @@ async function showSimplifiedMenu() {
409
411
  message: isZh ? "\u8BF7\u8F93\u5165\u9009\u9879:" : "Enter option:",
410
412
  validate: (value) => {
411
413
  const normalized2 = normalizeMenuInput(value);
412
- const valid = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "k", "m", "a", "p", "r", "s", "-", "+", "d", "h", "q"];
414
+ const valid = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "k", "m", "a", "p", "r", "g", "s", "-", "+", "d", "h", "q"];
413
415
  return valid.includes(normalized2) || (isZh ? "\u8BF7\u8F93\u5165\u6709\u6548\u9009\u9879" : "Please enter a valid option");
414
416
  }
415
417
  });
@@ -422,6 +424,14 @@ async function showSimplifiedMenu() {
422
424
  // -------- Claude Code --------
423
425
  case "1": {
424
426
  await init({ skipBanner: true, codeType: "claude-code" });
427
+ const offerGen = await promptBoolean({
428
+ message: isZh ? "\u662F\u5426\u8FD0\u884C\u667A\u80FD Agent/Skill \u751F\u6210\uFF1F\uFF08\u63A8\u8350\uFF09" : "Run smart agent/skill generation for this project? (recommended)",
429
+ defaultValue: true
430
+ });
431
+ if (offerGen) {
432
+ const { smartGenerateAndInstall } = await import('./index10.mjs');
433
+ await smartGenerateAndInstall();
434
+ }
425
435
  break;
426
436
  }
427
437
  case "2": {
@@ -522,6 +532,12 @@ async function showSimplifiedMenu() {
522
532
  printSeparator();
523
533
  return void 0;
524
534
  }
535
+ case "g": {
536
+ const { smartGenerateAndInstall } = await import('./index10.mjs');
537
+ await smartGenerateAndInstall();
538
+ printSeparator();
539
+ return void 0;
540
+ }
525
541
  // ------------ CCJK ------------
526
542
  case "0": {
527
543
  const currentLang = i18n.language;
@@ -587,6 +603,8 @@ async function showSimplifiedMenu() {
587
603
  return void 0;
588
604
  }
589
605
  async function isFirstTimeUser() {
606
+ const { isOnboardingCompleted } = await import('./onboarding-wizard.mjs');
607
+ if (isOnboardingCompleted()) return false;
590
608
  const config = readZcfConfig();
591
609
  if (!config || !config.version) {
592
610
  return true;
@@ -596,19 +614,12 @@ async function isFirstTimeUser() {
596
614
  }
597
615
  return false;
598
616
  }
599
- function showNewUserWelcome() {
600
- const isZh = i18n.language === "zh-CN";
601
- console.log("");
602
- console.log(a.bold.yellow(isZh ? "\u{1F389} \u6B22\u8FCE\u9996\u6B21\u4F7F\u7528 CCJK!" : "\u{1F389} Welcome to CCJK!"));
603
- console.log(a.dim(isZh ? " CCJK \u662F Claude Code \u7684\u667A\u80FD\u914D\u7F6E\u5DE5\u5177\uFF0C\u8BA9\u4F60\u7684 AI \u7F16\u7A0B\u4F53\u9A8C\u66F4\u52A0\u7B80\u5355\u9AD8\u6548" : " CCJK is the smart configuration tool for Claude Code"));
604
- console.log(a.dim(isZh ? ' \u5EFA\u8BAE\u9996\u6B21\u4F7F\u7528\u9009\u62E9 "1. \u5B8C\u6574\u521D\u59CB\u5316" \u8FDB\u884C\u4E00\u952E\u914D\u7F6E' : ' Recommended: Select "1. Full Init" for first-time setup'));
605
- console.log("");
606
- }
607
617
  async function showMainMenu(options = {}) {
608
618
  try {
609
619
  const isNewUser = await isFirstTimeUser();
610
620
  if (isNewUser) {
611
- showNewUserWelcome();
621
+ const { runOnboardingWizard } = await import('./onboarding-wizard.mjs');
622
+ await runOnboardingWizard();
612
623
  }
613
624
  if (options.codeType) {
614
625
  try {
@@ -0,0 +1,93 @@
1
+ import a from './index2.mjs';
2
+ import { existsSync, mkdirSync, writeFileSync, readFileSync } from 'node:fs';
3
+ import { CCJK_CONFIG_DIR } from './constants.mjs';
4
+ import { i18n } from './index5.mjs';
5
+ import { r as runHealthCheck } from '../shared/ccjk.CNMWk_mE.mjs';
6
+ import { j as join } from '../shared/ccjk.bQ7Dh1g4.mjs';
7
+ import '../shared/ccjk.BAGoDD49.mjs';
8
+ import 'node:os';
9
+ import 'node:process';
10
+ import 'node:url';
11
+
12
+ const ONBOARDING_STATE_FILE = join(CCJK_CONFIG_DIR, "onboarding.json");
13
+ function readOnboardingState() {
14
+ try {
15
+ if (!existsSync(ONBOARDING_STATE_FILE)) return null;
16
+ return JSON.parse(readFileSync(ONBOARDING_STATE_FILE, "utf-8"));
17
+ } catch {
18
+ return null;
19
+ }
20
+ }
21
+ function writeOnboardingState(state) {
22
+ try {
23
+ if (!existsSync(CCJK_CONFIG_DIR)) {
24
+ mkdirSync(CCJK_CONFIG_DIR, { recursive: true });
25
+ }
26
+ writeFileSync(ONBOARDING_STATE_FILE, JSON.stringify(state, null, 2));
27
+ } catch {
28
+ }
29
+ }
30
+ function isOnboardingCompleted() {
31
+ const state = readOnboardingState();
32
+ return state?.completed === true;
33
+ }
34
+ async function runOnboardingWizard() {
35
+ const isZh = i18n.language === "zh-CN";
36
+ console.log("");
37
+ console.log(a.bold.yellow(isZh ? "\u{1F389} \u6B22\u8FCE\u4F7F\u7528 CCJK\uFF01" : "\u{1F389} Welcome to CCJK!"));
38
+ console.log(a.dim(isZh ? " \u8BA9\u6211\u4EEC\u7528 3 \u6B65\u5B8C\u6210\u521D\u59CB\u5316\u914D\u7F6E" : " Let's get you set up in 3 steps"));
39
+ console.log("");
40
+ console.log(a.bold(`${isZh ? "\u6B65\u9AA4 1/3" : "Step 1/3"}: ${isZh ? "\u73AF\u5883\u68C0\u6D4B" : "Environment Detection"}`));
41
+ try {
42
+ const { detectSmartDefaults } = await import('./smart-defaults.mjs').then(function (n) { return n.s; });
43
+ const defaults = await detectSmartDefaults();
44
+ if (defaults) {
45
+ console.log(a.green(` \u2714 ${isZh ? "\u68C0\u6D4B\u5230" : "Detected"}: ${defaults.codeToolType || "claude-code"}`));
46
+ if (defaults.mcpServices?.length) {
47
+ console.log(a.dim(` ${isZh ? "\u63A8\u8350 MCP \u670D\u52A1" : "Recommended MCP"}: ${defaults.mcpServices.slice(0, 3).join(", ")}`));
48
+ }
49
+ } else {
50
+ console.log(a.dim(` ${isZh ? "\u4F7F\u7528\u9ED8\u8BA4\u914D\u7F6E" : "Using default configuration"}`));
51
+ }
52
+ } catch {
53
+ console.log(a.dim(` ${isZh ? "\u73AF\u5883\u68C0\u6D4B\u8DF3\u8FC7" : "Environment detection skipped"}`));
54
+ }
55
+ console.log("");
56
+ console.log(a.bold(`${isZh ? "\u6B65\u9AA4 2/3" : "Step 2/3"}: ${isZh ? "API \u914D\u7F6E" : "API Configuration"}`));
57
+ try {
58
+ const { getExistingApiConfig } = await import('./config.mjs').then(function (n) { return n.j; });
59
+ const existing = getExistingApiConfig();
60
+ if (existing?.key || existing?.url) {
61
+ console.log(a.green(` \u2714 ${isZh ? "\u5DF2\u914D\u7F6E" : "Already configured"}`));
62
+ } else {
63
+ const { configureApiFeature } = await import('./features.mjs');
64
+ await configureApiFeature();
65
+ }
66
+ } catch {
67
+ console.log(a.yellow(` ${isZh ? "\u26A0 API \u914D\u7F6E\u8DF3\u8FC7\uFF0C\u7A0D\u540E\u53EF\u901A\u8FC7\u83DC\u5355\u914D\u7F6E" : "\u26A0 API setup skipped, configure later via menu"}`));
68
+ }
69
+ console.log("");
70
+ console.log(a.bold(`${isZh ? "\u6B65\u9AA4 3/3" : "Step 3/3"}: ${isZh ? "\u73AF\u5883\u9A8C\u8BC1" : "Verification"}`));
71
+ try {
72
+ const health = await runHealthCheck();
73
+ const passCount = health.results.filter((r) => r.status === "pass").length;
74
+ const total = health.results.length;
75
+ const scoreColor = health.totalScore >= 75 ? a.green : health.totalScore >= 50 ? a.yellow : a.red;
76
+ console.log(scoreColor(` \u2714 ${isZh ? "\u5065\u5EB7\u5206" : "Health score"}: ${health.totalScore}/100 (${passCount}/${total} ${isZh ? "\u901A\u8FC7" : "passed"})`));
77
+ if (health.recommendations.length > 0) {
78
+ const top = health.recommendations[0];
79
+ console.log(a.dim(` ${isZh ? "\u5EFA\u8BAE" : "Tip"}: ${top.title}`));
80
+ if (top.command) {
81
+ console.log(a.dim(` \u2192 ${top.command}`));
82
+ }
83
+ }
84
+ } catch {
85
+ console.log(a.dim(` ${isZh ? "\u9A8C\u8BC1\u8DF3\u8FC7" : "Verification skipped"}`));
86
+ }
87
+ console.log("");
88
+ writeOnboardingState({ completed: true, completedAt: (/* @__PURE__ */ new Date()).toISOString() });
89
+ console.log(a.bold.green(isZh ? "\u2705 \u521D\u59CB\u5316\u5B8C\u6210\uFF01\u8FDB\u5165\u4E3B\u83DC\u5355..." : "\u2705 Setup complete! Loading main menu..."));
90
+ console.log("");
91
+ }
92
+
93
+ export { isOnboardingCompleted, readOnboardingState, runOnboardingWizard };
@@ -24,6 +24,7 @@ import 'node:os';
24
24
  import 'node:crypto';
25
25
  import 'buffer';
26
26
  import 'string_decoder';
27
+ import '../shared/ccjk.DeWpAShp.mjs';
27
28
  import './index5.mjs';
28
29
  import 'node:url';
29
30
  import '../shared/ccjk.gDEDGD_t.mjs';
@@ -1,3 +1,3 @@
1
- const version = "12.0.6";
1
+ const version = "12.0.8";
2
2
 
3
3
  export { version };
@@ -6,7 +6,7 @@ import { ensureI18nInitialized, i18n } from './index5.mjs';
6
6
  import { readZcfConfig, updateZcfConfig } from './ccjk-config.mjs';
7
7
  import { a as addNumbersToChoices } from '../shared/ccjk.BFQ7yr5S.mjs';
8
8
  import { g as getRuntimeVersion } from '../shared/ccjk.gDEDGD_t.mjs';
9
- import { p as promptBoolean } from '../shared/ccjk.DOwtZMk8.mjs';
9
+ import { p as promptBoolean } from '../shared/ccjk.BWFpnOr3.mjs';
10
10
  import '../shared/ccjk.BAGoDD49.mjs';
11
11
  import 'node:readline';
12
12
  import 'stream';
@@ -31,6 +31,7 @@ import './fs-operations.mjs';
31
31
  import 'node:fs/promises';
32
32
  import './json-config.mjs';
33
33
  import '../shared/ccjk.RyizuzOI.mjs';
34
+ import '../shared/ccjk.DeWpAShp.mjs';
34
35
 
35
36
  const ccjkVersion = getRuntimeVersion();
36
37
  async function selectAiOutputLanguage(defaultLang) {
@@ -3,7 +3,7 @@ import { homedir } from 'node:os';
3
3
  import a from './index2.mjs';
4
4
  import { getContextPersistence } from './persistence.mjs';
5
5
  import { MetricsDisplay } from './metrics-display.mjs';
6
- import { r as runHealthCheck } from '../shared/ccjk.D5MFQT7w.mjs';
6
+ import { r as runHealthCheck } from '../shared/ccjk.CNMWk_mE.mjs';
7
7
  import { j as join } from '../shared/ccjk.bQ7Dh1g4.mjs';
8
8
  import '../shared/ccjk.BAGoDD49.mjs';
9
9
  import 'better-sqlite3';
@@ -18,6 +18,7 @@ import 'node:os';
18
18
  import 'node:crypto';
19
19
  import 'buffer';
20
20
  import 'string_decoder';
21
+ import '../shared/ccjk.DeWpAShp.mjs';
21
22
 
22
23
  const CLOUD_API_BASE_URL = "https://api.claudehome.cn/v1";
23
24
  const REQUEST_TIMEOUT = 1e4;
@@ -39,14 +39,15 @@ import '../shared/ccjk.BBtCGd_g.mjs';
39
39
  import './index6.mjs';
40
40
  import './codex.mjs';
41
41
  import './index7.mjs';
42
+ import '../shared/ccjk.DeWpAShp.mjs';
42
43
  import '../shared/ccjk.CxpGa6MC.mjs';
43
44
  import './config.mjs';
44
45
  import './claude-config.mjs';
45
46
  import '../shared/ccjk.DXRAZcix.mjs';
46
47
  import '../shared/ccjk.BFQ7yr5S.mjs';
47
48
  import './prompts.mjs';
48
- import '../shared/ccjk.DOwtZMk8.mjs';
49
- import '../shared/ccjk.BwfbSKN2.mjs';
49
+ import '../shared/ccjk.BWFpnOr3.mjs';
50
+ import '../shared/ccjk.Dx-O9dWz.mjs';
50
51
  import './banner.mjs';
51
52
  import './config2.mjs';
52
53
  import './auto-updater.mjs';
@@ -21,6 +21,7 @@ import 'node:os';
21
21
  import 'node:crypto';
22
22
  import 'buffer';
23
23
  import 'string_decoder';
24
+ import '../shared/ccjk.DeWpAShp.mjs';
24
25
  import 'node:fs';
25
26
  import 'node:url';
26
27
  import '../shared/ccjk.bQ7Dh1g4.mjs';
@@ -5,7 +5,7 @@ import a from './index2.mjs';
5
5
  import { s as scanProject } from '../shared/ccjk.BrPUmTqm.mjs';
6
6
  import { getContextPersistence } from './persistence.mjs';
7
7
  import { MetricsDisplay } from './metrics-display.mjs';
8
- import { r as runHealthCheck } from '../shared/ccjk.D5MFQT7w.mjs';
8
+ import { r as runHealthCheck } from '../shared/ccjk.CNMWk_mE.mjs';
9
9
  import { j as join } from '../shared/ccjk.bQ7Dh1g4.mjs';
10
10
  import '../shared/ccjk.BAGoDD49.mjs';
11
11
  import 'node:child_process';
@@ -230,7 +230,7 @@ function renderHealthSection(report, compact) {
230
230
  const priority = rec.priority === "high" ? a.red("!") : rec.priority === "medium" ? a.yellow("\u2022") : a.gray("\xB7");
231
231
  lines.push(` ${priority} ${rec.title}`);
232
232
  if (rec.command) {
233
- lines.push(` ${a.gray("\u2192")} ${a.cyan(rec.command)}`);
233
+ lines.push(` ${a.gray("\u2192")} ${a.cyan(rec.command)} ${a.yellow("[fix]")}`);
234
234
  }
235
235
  }
236
236
  }
@@ -280,6 +280,11 @@ async function statusCommand(options = {}) {
280
280
  }
281
281
  }
282
282
  console.log();
283
+ const fixable = health.results.filter((r) => r.status !== "pass" && r.command);
284
+ if (fixable.length > 0 && !options.json) {
285
+ const { autoFix } = await import('./auto-fixer.mjs');
286
+ await autoFix(fixable);
287
+ }
283
288
  } catch (error) {
284
289
  console.error(a.red("Error running status command:"), error);
285
290
  process__default.exit(1);
@@ -6,12 +6,12 @@ import { readZcfConfig } from './ccjk-config.mjs';
6
6
  import { r as resolveCodeType } from '../shared/ccjk.Cjj8SVrn.mjs';
7
7
  import { h as handleExitPromptError, a as handleGeneralError } from '../shared/ccjk.BIxuVL3_.mjs';
8
8
  import { a as addNumbersToChoices } from '../shared/ccjk.BFQ7yr5S.mjs';
9
- import { p as promptBoolean } from '../shared/ccjk.DOwtZMk8.mjs';
9
+ import { p as promptBoolean } from '../shared/ccjk.BWFpnOr3.mjs';
10
10
  import { promises } from 'node:fs';
11
11
  import { homedir } from 'node:os';
12
12
  import { exec as q } from './main.mjs';
13
13
  import { readJsonConfig, writeJsonConfig } from './json-config.mjs';
14
- import { m as moveToTrash } from '../shared/ccjk.BRZ9ww8S.mjs';
14
+ import { m as moveToTrash } from '../shared/ccjk.CvChMYvB.mjs';
15
15
  import { j as join } from '../shared/ccjk.bQ7Dh1g4.mjs';
16
16
  import '../shared/ccjk.BAGoDD49.mjs';
17
17
  import 'node:readline';
@@ -38,6 +38,7 @@ import './smart-defaults.mjs';
38
38
  import 'node:child_process';
39
39
  import './platform.mjs';
40
40
  import '../shared/ccjk.BrPUmTqm.mjs';
41
+ import '../shared/ccjk.DeWpAShp.mjs';
41
42
  import 'module';
42
43
  import 'node:stream';
43
44
  import 'globby';
@@ -8,7 +8,7 @@ import { displayBanner } from './banner.mjs';
8
8
  import { readZcfConfig, updateZcfConfig } from './ccjk-config.mjs';
9
9
  import { r as readMcpConfig } from './claude-config.mjs';
10
10
  import { c as copyConfigFiles } from './config.mjs';
11
- import { n as needsMigration, m as migrateSettingsForTokenRetrieval, d as displayMigrationResult, p as promptMigration, u as updatePromptOnly, s as selectAndInstallWorkflows } from '../shared/ccjk.BwfbSKN2.mjs';
11
+ import { n as needsMigration, m as migrateSettingsForTokenRetrieval, d as displayMigrationResult, p as promptMigration, u as updatePromptOnly, s as selectAndInstallWorkflows } from '../shared/ccjk.Dx-O9dWz.mjs';
12
12
  import { h as handleExitPromptError, a as handleGeneralError } from '../shared/ccjk.BIxuVL3_.mjs';
13
13
  import { a as installMcpServices } from '../shared/ccjk.waa2ikKJ.mjs';
14
14
  import { resolveAiOutputLanguage } from './prompts.mjs';
@@ -33,6 +33,7 @@ import 'string_decoder';
33
33
  import 'node:url';
34
34
  import '../shared/ccjk.RyizuzOI.mjs';
35
35
  import './index7.mjs';
36
+ import '../shared/ccjk.DeWpAShp.mjs';
36
37
  import '../shared/ccjk.CxpGa6MC.mjs';
37
38
  import '../shared/ccjk.BBtCGd_g.mjs';
38
39
  import './main.mjs';
@@ -45,7 +46,7 @@ import '../shared/ccjk.bQ7Dh1g4.mjs';
45
46
  import './json-config.mjs';
46
47
  import './platform.mjs';
47
48
  import '../shared/ccjk.BFQ7yr5S.mjs';
48
- import '../shared/ccjk.DOwtZMk8.mjs';
49
+ import '../shared/ccjk.BWFpnOr3.mjs';
49
50
  import './index6.mjs';
50
51
  import '../shared/ccjk.DXRAZcix.mjs';
51
52
 
@@ -6,8 +6,8 @@ import { exec as q } from './main.mjs';
6
6
  import { STATUS } from './banner.mjs';
7
7
  import { g as getRuntimeVersion } from '../shared/ccjk.gDEDGD_t.mjs';
8
8
  import '../shared/ccjk.BAGoDD49.mjs';
9
- import 'node:util';
10
9
  import '../shared/ccjk.Cjgrln_h.mjs';
10
+ import '../shared/ccjk.DeWpAShp.mjs';
11
11
  import 'module';
12
12
  import 'node:child_process';
13
13
  import 'node:path';
@@ -1,6 +1,6 @@
1
1
  import { Buffer } from 'node:buffer';
2
2
  import { c as chunkify } from '../shared/ccjk.KfSWcGlE.mjs';
3
- import { canAccessPowerShell, convertWslPathToWindows, isUncPath } from './index13.mjs';
3
+ import { canAccessPowerShell, convertWslPathToWindows, isUncPath } from './index14.mjs';
4
4
  import process__default from 'node:process';
5
5
  import { promisify } from 'node:util';
6
6
  import childProcess from 'node:child_process';
package/dist/cli.mjs CHANGED
@@ -326,6 +326,22 @@ const COMMANDS = [
326
326
  };
327
327
  }
328
328
  },
329
+ {
330
+ name: "generate [projectPath]",
331
+ description: "Smart agent/skill generation \u2014 auto-detect project and generate configs",
332
+ aliases: ["gen"],
333
+ tier: "extended",
334
+ options: [
335
+ { flags: "--dry-run, -d", description: "Preview without writing files" },
336
+ { flags: "--verbose, -v", description: "Verbose output" }
337
+ ],
338
+ loader: async () => {
339
+ return async (_options, projectPath) => {
340
+ const { smartGenerateAndInstall } = await import('./chunks/index10.mjs');
341
+ await smartGenerateAndInstall(projectPath);
342
+ };
343
+ }
344
+ },
329
345
  {
330
346
  name: "config [action] [...args]",
331
347
  description: "Manage CCJK configuration",
@@ -884,7 +900,7 @@ const COMMANDS = [
884
900
  return async (options, action, args) => {
885
901
  const actionStr = action;
886
902
  const argsArr = args || [];
887
- const { getPostmortemManager } = await import('./chunks/index10.mjs');
903
+ const { getPostmortemManager } = await import('./chunks/index11.mjs');
888
904
  const manager = getPostmortemManager(process__default.cwd());
889
905
  if (actionStr === "init") {
890
906
  const ora = (await import('./chunks/index7.mjs')).default;
@@ -1705,7 +1721,7 @@ ${ansis.yellow("By Status:")}`);
1705
1721
  { flags: "--lang, -l <lang>", description: "Display language (zh-CN, en)" }
1706
1722
  ],
1707
1723
  loader: async () => {
1708
- const { addCommand } = await import('./chunks/index11.mjs');
1724
+ const { addCommand } = await import('./chunks/index12.mjs');
1709
1725
  return async (options, source) => {
1710
1726
  await addCommand(source, {
1711
1727
  type: options.type,
@@ -2182,7 +2198,7 @@ function bootstrapCloudServices() {
2182
2198
  await autoBootstrap();
2183
2199
  const { autoUpgrade } = await import('./chunks/silent-updater.mjs');
2184
2200
  await autoUpgrade();
2185
- const { activateSuperpowers } = await import('./chunks/index12.mjs');
2201
+ const { activateSuperpowers } = await import('./chunks/index13.mjs');
2186
2202
  await activateSuperpowers("zh-CN");
2187
2203
  const { setupBrainHook } = await import('./chunks/cli-hook.mjs');
2188
2204
  await setupBrainHook({