ccjk 11.1.2 → 12.0.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.
Files changed (99) hide show
  1. package/dist/chunks/agent-teams.mjs +1 -1
  2. package/dist/chunks/agent.mjs +1 -1
  3. package/dist/chunks/api-cli.mjs +118 -0
  4. package/dist/chunks/api-providers.mjs +1 -1
  5. package/dist/chunks/api.mjs +8 -759
  6. package/dist/chunks/auto-bootstrap.mjs +1 -1
  7. package/dist/chunks/auto-init.mjs +1 -1
  8. package/dist/chunks/auto-updater.mjs +1 -1
  9. package/dist/chunks/banner.mjs +1 -1
  10. package/dist/chunks/boost.mjs +1 -1
  11. package/dist/chunks/ccjk-agents.mjs +1 -1
  12. package/dist/chunks/ccjk-all.mjs +1 -1
  13. package/dist/chunks/ccjk-config.mjs +1 -1
  14. package/dist/chunks/ccjk-hooks.mjs +1 -1
  15. package/dist/chunks/ccjk-mcp.mjs +1 -1
  16. package/dist/chunks/ccjk-setup.mjs +1 -1
  17. package/dist/chunks/ccjk-skills.mjs +1 -1
  18. package/dist/chunks/ccr.mjs +6 -6
  19. package/dist/chunks/ccu.mjs +1 -1
  20. package/dist/chunks/check-updates.mjs +2 -2
  21. package/dist/chunks/claude-code-config-manager.mjs +2 -2
  22. package/dist/chunks/claude-code-incremental-manager.mjs +2 -2
  23. package/dist/chunks/claude-config.mjs +1 -1
  24. package/dist/chunks/claude-wrapper.mjs +1 -1
  25. package/dist/chunks/codex-config-switch.mjs +1 -1
  26. package/dist/chunks/codex-provider-manager.mjs +1 -1
  27. package/dist/chunks/codex-uninstaller.mjs +1 -1
  28. package/dist/chunks/codex.mjs +1 -1
  29. package/dist/chunks/commands.mjs +1 -1
  30. package/dist/chunks/completion.mjs +1 -1
  31. package/dist/chunks/config-consolidator.mjs +1 -1
  32. package/dist/chunks/config-switch.mjs +2 -2
  33. package/dist/chunks/config.mjs +1 -1
  34. package/dist/chunks/config2.mjs +1 -1
  35. package/dist/chunks/config3.mjs +1 -1
  36. package/dist/chunks/constants.mjs +1 -1
  37. package/dist/chunks/dashboard.mjs +1 -1
  38. package/dist/chunks/doctor.mjs +31 -7
  39. package/dist/chunks/evolution.mjs +1 -1
  40. package/dist/chunks/features.mjs +5 -5
  41. package/dist/chunks/index.mjs +7 -7
  42. package/dist/chunks/index2.mjs +10 -177
  43. package/dist/chunks/index3.mjs +168 -1162
  44. package/dist/chunks/index4.mjs +1076 -910
  45. package/dist/chunks/index5.mjs +947 -137
  46. package/dist/chunks/index6.mjs +167 -635
  47. package/dist/chunks/index7.mjs +663 -0
  48. package/dist/chunks/init.mjs +17 -17
  49. package/dist/chunks/installer.mjs +1 -1
  50. package/dist/chunks/interview.mjs +2 -2
  51. package/dist/chunks/marketplace.mjs +1 -1
  52. package/dist/chunks/mcp-cli.mjs +191 -0
  53. package/dist/chunks/mcp.mjs +2 -2
  54. package/dist/chunks/menu.mjs +3 -3
  55. package/dist/chunks/migrator.mjs +1 -1
  56. package/dist/chunks/monitor.mjs +1 -1
  57. package/dist/chunks/notification.mjs +1 -1
  58. package/dist/chunks/onboarding.mjs +1 -1
  59. package/dist/chunks/package.mjs +1 -1
  60. package/dist/chunks/permission-manager.mjs +1 -1
  61. package/dist/chunks/permissions.mjs +1 -1
  62. package/dist/chunks/persistence-manager.mjs +1 -1
  63. package/dist/chunks/plugin.mjs +1 -1
  64. package/dist/chunks/prompts.mjs +1 -1
  65. package/dist/chunks/providers.mjs +1 -1
  66. package/dist/chunks/quick-actions.mjs +1 -1
  67. package/dist/chunks/quick-setup.mjs +5 -5
  68. package/dist/chunks/remote.mjs +2 -2
  69. package/dist/chunks/silent-updater.mjs +1 -1
  70. package/dist/chunks/simple-config.mjs +1 -1
  71. package/dist/chunks/skill.mjs +1 -1
  72. package/dist/chunks/skills-sync.mjs +1 -1
  73. package/dist/chunks/skills.mjs +1 -1
  74. package/dist/chunks/slash-commands.mjs +2 -2
  75. package/dist/chunks/startup.mjs +1 -1
  76. package/dist/chunks/stats.mjs +1 -1
  77. package/dist/chunks/status.mjs +1 -1
  78. package/dist/chunks/team.mjs +1 -1
  79. package/dist/chunks/thinking.mjs +2 -2
  80. package/dist/chunks/uninstall.mjs +3 -3
  81. package/dist/chunks/update.mjs +4 -4
  82. package/dist/chunks/upgrade-manager.mjs +1 -1
  83. package/dist/chunks/version-checker.mjs +1 -1
  84. package/dist/chunks/vim.mjs +1 -1
  85. package/dist/chunks/zero-config.mjs +1 -1
  86. package/dist/cli.mjs +76 -16
  87. package/dist/index.d.mts +37 -10
  88. package/dist/index.d.ts +37 -10
  89. package/dist/index.mjs +2 -2
  90. package/dist/shared/{ccjk.DB2UYcq0.mjs → ccjk.BOIUTf5z.mjs} +2 -2
  91. package/dist/shared/ccjk.CL4Yat0G.mjs +303 -0
  92. package/dist/shared/{ccjk.CxtuJxaS.mjs → ccjk.CN0edl87.mjs} +1 -1
  93. package/dist/shared/{ccjk.BKoi8-Hy.mjs → ccjk.CrB6OYHv.mjs} +1 -1
  94. package/dist/shared/{ccjk.DVBW2wxp.mjs → ccjk.Dk1HDseQ.mjs} +1 -1
  95. package/dist/shared/ccjk.bhFAMRyc.mjs +460 -0
  96. package/dist/shared/ccjk.cChAaGgT.mjs +88 -0
  97. package/dist/shared/{ccjk.DrMygfCF.mjs → ccjk.j4uut26D.mjs} +1 -1
  98. package/package.json +2 -3
  99. package/dist/shared/ccjk.Cu_R2MbQ.mjs +0 -75
@@ -1,7 +1,7 @@
1
1
  import { existsSync, readFileSync } from 'node:fs';
2
2
  import ansis from 'ansis';
3
3
  import { SETTINGS_FILE } from './constants.mjs';
4
- import { ensureI18nInitialized, i18n } from './index2.mjs';
4
+ import { ensureI18nInitialized, i18n } from './index3.mjs';
5
5
  import { writeJsonConfig } from './json-config.mjs';
6
6
  import 'node:os';
7
7
  import 'pathe';
@@ -5,7 +5,7 @@ import { CCJK_CONFIG_DIR } from './constants.mjs';
5
5
  import { w as writeAgentFile } from '../shared/ccjk.Bvoex4TZ.mjs';
6
6
  import { g as getPluginManager } from '../shared/ccjk.BsXQugfY.mjs';
7
7
  import { homedir } from 'node:os';
8
- import './index2.mjs';
8
+ import './index3.mjs';
9
9
  import 'node:process';
10
10
  import 'node:url';
11
11
  import 'i18next';
@@ -0,0 +1,118 @@
1
+ import ansis from 'ansis';
2
+ import { i18n } from './index3.mjs';
3
+ import { f as configureApi, e as getExistingApiConfig } from './config.mjs';
4
+ import { g as getAllPresets } from '../shared/ccjk.CL4Yat0G.mjs';
5
+ import 'node:fs';
6
+ import 'node:process';
7
+ import 'node:url';
8
+ import 'i18next';
9
+ import 'i18next-fs-backend';
10
+ import 'pathe';
11
+ import 'dayjs';
12
+ import 'inquirer';
13
+ import './constants.mjs';
14
+ import 'node:os';
15
+ import './claude-config.mjs';
16
+ import './json-config.mjs';
17
+ import './fs-operations.mjs';
18
+ import 'node:crypto';
19
+ import 'node:fs/promises';
20
+ import './platform.mjs';
21
+ import 'tinyexec';
22
+ import '../shared/ccjk.BiCrMV5O.mjs';
23
+
24
+ async function apiConfigure(options = {}) {
25
+ const lang = options.lang || i18n.language || "en";
26
+ const isZh = lang === "zh-CN";
27
+ if (options.interactive !== false && !options.provider) {
28
+ const { runConfigWizard } = await import('./index.mjs');
29
+ await runConfigWizard(lang);
30
+ return;
31
+ }
32
+ if (!options.provider) {
33
+ console.log(ansis.red(isZh ? "\u9519\u8BEF: \u5FC5\u987B\u6307\u5B9A --provider" : "Error: --provider is required"));
34
+ console.log(ansis.dim(isZh ? "\u7528\u6CD5: ccjk api configure --provider <name> --key <key>" : "Usage: ccjk api configure --provider <name> --key <key>"));
35
+ process.exit(1);
36
+ }
37
+ const presets = getAllPresets();
38
+ const preset = presets.find(
39
+ (p) => p.id === options.provider || p.name.toLowerCase() === options.provider?.toLowerCase()
40
+ );
41
+ if (!preset) {
42
+ console.log(ansis.red(isZh ? `\u9519\u8BEF: \u672A\u77E5\u7684\u63D0\u4F9B\u5546 "${options.provider}"` : `Error: Unknown provider "${options.provider}"`));
43
+ console.log(ansis.dim(isZh ? "\u63D0\u793A: \u4F7F\u7528 ccjk api list \u67E5\u770B\u53EF\u7528\u63D0\u4F9B\u5546" : "Tip: Use ccjk api list to see available providers"));
44
+ process.exit(1);
45
+ }
46
+ if (preset.requiresApiKey && !options.key) {
47
+ console.log(ansis.red(isZh ? "\u9519\u8BEF: \u5FC5\u987B\u6307\u5B9A --key" : "Error: --key is required"));
48
+ process.exit(1);
49
+ }
50
+ if (!options.yes) {
51
+ const inquirer = await import('inquirer');
52
+ const { confirm } = await inquirer.default.prompt([{
53
+ type: "confirm",
54
+ name: "confirm",
55
+ message: isZh ? `\u786E\u8BA4\u914D\u7F6E ${preset.name}?` : `Configure ${preset.name}?`,
56
+ default: true
57
+ }]);
58
+ if (!confirm) {
59
+ console.log(ansis.yellow(isZh ? "\u5DF2\u53D6\u6D88" : "Cancelled"));
60
+ return;
61
+ }
62
+ }
63
+ const config = {
64
+ type: "api_key",
65
+ apiKey: options.key,
66
+ apiUrl: options.url || preset.baseUrl,
67
+ model: options.model || preset.defaultModel
68
+ };
69
+ if (options.fastModel) {
70
+ config.fastModel = options.fastModel;
71
+ }
72
+ const result = configureApi(config);
73
+ if (result) {
74
+ console.log(ansis.green(isZh ? `\u2713 \u5DF2\u914D\u7F6E ${preset.name}` : `\u2713 Configured ${preset.name}`));
75
+ console.log(ansis.dim(isZh ? "\u63D0\u793A: \u91CD\u542F Claude Code \u4EE5\u5E94\u7528\u66F4\u6539" : "Tip: Restart Claude Code to apply changes"));
76
+ } else {
77
+ console.log(ansis.red(isZh ? "\u2717 \u914D\u7F6E\u5931\u8D25" : "\u2717 Configuration failed"));
78
+ process.exit(1);
79
+ }
80
+ }
81
+ async function apiList(options = {}) {
82
+ const lang = options.lang || i18n.language || "en";
83
+ const isZh = lang === "zh-CN";
84
+ const config = getExistingApiConfig();
85
+ if (options.json) {
86
+ console.log(JSON.stringify({
87
+ current: config,
88
+ available: getAllPresets().map((p) => ({
89
+ id: p.id,
90
+ name: p.name,
91
+ category: p.category,
92
+ requiresApiKey: p.requiresApiKey
93
+ }))
94
+ }, null, 2));
95
+ return;
96
+ }
97
+ console.log("");
98
+ console.log(ansis.bold.cyan(isZh ? "\u{1F4CB} API \u914D\u7F6E" : "\u{1F4CB} API Configuration"));
99
+ console.log(ansis.dim("\u2500".repeat(50)));
100
+ console.log("");
101
+ if (config) {
102
+ console.log(ansis.green(isZh ? "\u5F53\u524D\u914D\u7F6E:" : "Current configuration:"));
103
+ const apiUrl = config.apiUrl;
104
+ const model = config.model;
105
+ if (apiUrl) {
106
+ console.log(` ${ansis.dim("URL:")} ${apiUrl}`);
107
+ }
108
+ if (model) {
109
+ console.log(` ${ansis.dim("Model:")} ${model}`);
110
+ }
111
+ } else {
112
+ console.log(ansis.yellow(isZh ? "\u672A\u914D\u7F6E API" : "No API configured"));
113
+ }
114
+ console.log("");
115
+ console.log(ansis.dim(isZh ? "\u63D0\u793A: \u4F7F\u7528 ccjk api configure --provider <name> \u914D\u7F6E API" : "Tip: Use ccjk api configure --provider <name> to configure API"));
116
+ }
117
+
118
+ export { apiConfigure, apiList };
@@ -1,7 +1,7 @@
1
1
  import { CCJK_CLOUD_API_URL } from './constants.mjs';
2
2
  import 'node:os';
3
3
  import 'pathe';
4
- import './index2.mjs';
4
+ import './index3.mjs';
5
5
  import 'node:fs';
6
6
  import 'node:process';
7
7
  import 'node:url';