ccjk 14.1.7 → 14.1.8

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 (68) hide show
  1. package/bin/ccjk.mjs +3 -2
  2. package/bin/ccjk.ts +104 -104
  3. package/dist/chunks/agent.mjs +2 -2
  4. package/dist/chunks/api-cli.mjs +2 -2
  5. package/dist/chunks/api-config-selector.mjs +5 -6
  6. package/dist/chunks/auto-updater.mjs +1 -1
  7. package/dist/chunks/brain-config.mjs +1 -1
  8. package/dist/chunks/brain-status.mjs +13 -7
  9. package/dist/chunks/ccjk-all.mjs +3 -3
  10. package/dist/chunks/ccjk-mcp.mjs +2 -2
  11. package/dist/chunks/ccjk-setup.mjs +1 -1
  12. package/dist/chunks/ccjk-skills.mjs +1 -1
  13. package/dist/chunks/ccr.mjs +11 -12
  14. package/dist/chunks/check-updates.mjs +1 -2
  15. package/dist/chunks/claude-code-incremental-manager.mjs +9 -9
  16. package/dist/chunks/claude-config.mjs +2 -2
  17. package/dist/chunks/code-type-resolver.mjs +2 -4
  18. package/dist/chunks/codex-config-switch.mjs +3 -4
  19. package/dist/chunks/codex-provider-manager.mjs +1 -2
  20. package/dist/chunks/codex.mjs +2 -33
  21. package/dist/chunks/config-switch.mjs +8 -5
  22. package/dist/chunks/config.mjs +382 -19
  23. package/dist/chunks/config2.mjs +3 -3
  24. package/dist/chunks/config3.mjs +1 -1
  25. package/dist/chunks/context.mjs +2 -2
  26. package/dist/chunks/doctor.mjs +4 -5
  27. package/dist/chunks/evolution.mjs +10 -6
  28. package/dist/chunks/features.mjs +13 -14
  29. package/dist/chunks/index10.mjs +4 -4
  30. package/dist/chunks/init.mjs +556 -557
  31. package/dist/chunks/installer.mjs +2 -2
  32. package/dist/chunks/mcp-cli.mjs +6 -7
  33. package/dist/chunks/mcp.mjs +6 -7
  34. package/dist/chunks/memory-check.mjs +2 -2
  35. package/dist/chunks/memory-paths.mjs +1 -1
  36. package/dist/chunks/memory-sync.mjs +2 -2
  37. package/dist/chunks/memory.mjs +7 -7
  38. package/dist/chunks/notification.mjs +1 -1
  39. package/dist/chunks/package.mjs +1 -1
  40. package/dist/chunks/quick-provider.mjs +37 -7
  41. package/dist/chunks/quick-setup.mjs +6 -7
  42. package/dist/chunks/remote.mjs +1 -1
  43. package/dist/chunks/research.mjs +118 -118
  44. package/dist/chunks/simple-config.mjs +4 -4
  45. package/dist/chunks/skill2.mjs +129 -80
  46. package/dist/chunks/skills-sync.mjs +1 -1
  47. package/dist/chunks/slash-commands.mjs +1 -1
  48. package/dist/chunks/uninstall.mjs +1 -1
  49. package/dist/chunks/update.mjs +10 -11
  50. package/dist/chunks/zero-config.mjs +8 -9
  51. package/dist/cli.mjs +1 -1
  52. package/dist/index.d.mts +3 -3
  53. package/dist/index.d.ts +3 -3
  54. package/dist/index.mjs +7 -7
  55. package/dist/shared/{ccjk.QNhw2Y_5.mjs → ccjk.B9OuS4xZ.mjs} +3 -3
  56. package/dist/shared/{ccjk.DqlzNDEQ.mjs → ccjk.BEiR3L4C.mjs} +2 -3
  57. package/dist/shared/{ccjk.4iw1XCF3.mjs → ccjk.BJ3Zpjo5.mjs} +1 -1
  58. package/dist/shared/{ccjk.Nwf9bR70.mjs → ccjk.BzxpiEPF.mjs} +2 -2
  59. package/dist/shared/{ccjk.BI-hdI7P.mjs → ccjk.CbWVbtb9.mjs} +1 -1
  60. package/dist/shared/{ccjk.UhjQ1seV.mjs → ccjk.DMV3x5Sd.mjs} +1 -1
  61. package/dist/shared/{ccjk.DQXk596F.mjs → ccjk.DuzJZlgj.mjs} +107 -103
  62. package/dist/shared/{ccjk.DTdjs-qK.mjs → ccjk.MwtjAULc.mjs} +1 -1
  63. package/dist/shared/{ccjk.DsYaCCx4.mjs → ccjk.i_vn-9C3.mjs} +2 -2
  64. package/dist/shared/{ccjk.kAZkKbGW.mjs → ccjk.tI_s2uSh.mjs} +2 -3
  65. package/package.json +5 -5
  66. package/dist/shared/ccjk.DKXs7Fbm.mjs +0 -361
  67. package/dist/shared/{ccjk.BBizCO6_.mjs → ccjk.DcMvE7lf.mjs} +1 -1
  68. package/dist/shared/{ccjk.Dhu8ia5S.mjs → ccjk.zFGcZT7Y.mjs} +1 -1
@@ -1,361 +0,0 @@
1
- import { execSync } from 'node:child_process';
2
- import process__default from 'node:process';
3
- import { ensureI18nInitialized, i18n } from '../chunks/index2.mjs';
4
-
5
- const MCP_SERVICE_CONFIGS = [
6
- // Documentation and research services
7
- {
8
- id: "context7",
9
- requiresApiKey: false,
10
- defaultSelected: true,
11
- config: {
12
- type: "stdio",
13
- command: "npx",
14
- args: ["-y", "@upstash/context7-mcp@latest"],
15
- env: {}
16
- }
17
- },
18
- {
19
- id: "open-websearch",
20
- requiresApiKey: false,
21
- config: {
22
- type: "stdio",
23
- command: "npx",
24
- args: ["-y", "open-websearch@latest"],
25
- env: {
26
- MODE: "stdio",
27
- DEFAULT_SEARCH_ENGINE: "duckduckgo",
28
- ALLOWED_SEARCH_ENGINES: "duckduckgo,bing,brave"
29
- }
30
- }
31
- },
32
- {
33
- id: "mcp-deepwiki",
34
- requiresApiKey: false,
35
- config: {
36
- type: "stdio",
37
- command: "npx",
38
- args: ["-y", "mcp-deepwiki@latest"],
39
- env: {}
40
- }
41
- },
42
- {
43
- id: "spec-workflow",
44
- requiresApiKey: false,
45
- config: {
46
- type: "stdio",
47
- command: "npx",
48
- args: ["-y", "@pimzino/spec-workflow-mcp@latest"],
49
- env: {}
50
- }
51
- },
52
- {
53
- id: "serena",
54
- requiresApiKey: false,
55
- config: {
56
- type: "stdio",
57
- command: "uvx",
58
- args: ["--from", "git+https://github.com/oraios/serena", "serena", "start-mcp-server", "--context", "ide-assistant", "--enable-web-dashboard", "false"],
59
- env: {}
60
- },
61
- platformRequirements: {
62
- requiredCommands: ["uvx"]
63
- }
64
- },
65
- {
66
- id: "Playwright",
67
- requiresApiKey: false,
68
- config: {
69
- type: "stdio",
70
- command: "npx",
71
- args: ["-y", "@playwright/mcp@latest", "--browser", "chromium"],
72
- env: {}
73
- },
74
- platformRequirements: {
75
- platforms: ["macos", "windows"],
76
- requiresGui: true
77
- }
78
- },
79
- {
80
- id: "intent-engine",
81
- requiresApiKey: false,
82
- config: {
83
- type: "stdio",
84
- command: "npx",
85
- args: ["-y", "@origintask/intent-engine@latest", "mcp"],
86
- env: {}
87
- }
88
- },
89
- {
90
- id: "sqlite",
91
- requiresApiKey: false,
92
- config: {
93
- type: "stdio",
94
- command: "npx",
95
- args: ["-y", "@anthropic-ai/mcp-server-sqlite@latest"],
96
- env: {}
97
- }
98
- }
99
- ];
100
- async function getMcpServices() {
101
- ensureI18nInitialized();
102
- const mcpServiceList = [
103
- {
104
- id: "context7",
105
- name: i18n.t("mcp:services.context7.name"),
106
- description: i18n.t("mcp:services.context7.description")
107
- },
108
- {
109
- id: "open-websearch",
110
- name: i18n.t("mcp:services.open-websearch.name"),
111
- description: i18n.t("mcp:services.open-websearch.description")
112
- },
113
- {
114
- id: "mcp-deepwiki",
115
- name: i18n.t("mcp:services.mcp-deepwiki.name"),
116
- description: i18n.t("mcp:services.mcp-deepwiki.description")
117
- },
118
- {
119
- id: "spec-workflow",
120
- name: i18n.t("mcp:services.spec-workflow.name"),
121
- description: i18n.t("mcp:services.spec-workflow.description")
122
- },
123
- {
124
- id: "serena",
125
- name: i18n.t("mcp:services.serena.name"),
126
- description: i18n.t("mcp:services.serena.description")
127
- },
128
- {
129
- id: "Playwright",
130
- name: i18n.t("mcp:services.Playwright.name"),
131
- description: i18n.t("mcp:services.Playwright.description")
132
- },
133
- {
134
- id: "intent-engine",
135
- name: i18n.t("mcp:services.intent-engine.name"),
136
- description: i18n.t("mcp:services.intent-engine.description")
137
- },
138
- {
139
- id: "sqlite",
140
- name: i18n.t("mcp:services.sqlite.name"),
141
- description: i18n.t("mcp:services.sqlite.description")
142
- }
143
- ];
144
- return MCP_SERVICE_CONFIGS.map((config) => {
145
- const serviceInfo = mcpServiceList.find((s) => s.id === config.id);
146
- const service = {
147
- id: config.id,
148
- name: serviceInfo?.name || config.id,
149
- description: serviceInfo?.description || "",
150
- requiresApiKey: config.requiresApiKey,
151
- config: config.config
152
- };
153
- if (config.apiKeyEnvVar) {
154
- service.apiKeyEnvVar = config.apiKeyEnvVar;
155
- }
156
- return service;
157
- });
158
- }
159
- async function getMcpService(id) {
160
- const services = await getMcpServices();
161
- return services.find((service) => service.id === id);
162
- }
163
- function detectPlatform() {
164
- const platform = process__default.platform;
165
- const env = process__default.env;
166
- const isWsl = !!(env.WSL_DISTRO_NAME || env.WSLENV || env.PATH && env.PATH.includes("/mnt/c/"));
167
- const isTermux = !!(env.TERMUX_VERSION || env.PREFIX?.includes("com.termux"));
168
- const isHeadless = !!(env.SSH_CLIENT || env.SSH_TTY || env.SSH_CONNECTION || !env.DISPLAY && platform === "linux");
169
- const hasGui = (() => {
170
- if (platform === "darwin")
171
- return true;
172
- if (platform === "win32")
173
- return !isHeadless;
174
- if (isWsl || isTermux)
175
- return false;
176
- if (platform === "linux")
177
- return !!env.DISPLAY || !!env.WAYLAND_DISPLAY;
178
- return false;
179
- })();
180
- let detectedPlatform;
181
- if (platform === "darwin") {
182
- detectedPlatform = "macos";
183
- } else if (platform === "win32") {
184
- detectedPlatform = "windows";
185
- } else if (isWsl) {
186
- detectedPlatform = "wsl";
187
- } else if (isTermux) {
188
- detectedPlatform = "termux";
189
- } else if (platform === "linux") {
190
- detectedPlatform = "linux";
191
- } else {
192
- detectedPlatform = "unknown";
193
- }
194
- return {
195
- platform: detectedPlatform,
196
- hasGui,
197
- isHeadless
198
- };
199
- }
200
- function isCommandAvailable(command) {
201
- try {
202
- execSync(`which ${command}`, { stdio: "ignore" });
203
- return true;
204
- } catch {
205
- return false;
206
- }
207
- }
208
- function isMcpServiceCompatible(serviceId) {
209
- const config = MCP_SERVICE_CONFIGS.find((c) => c.id === serviceId);
210
- if (!config) {
211
- return { compatible: false, reason: "Service not found" };
212
- }
213
- const requirements = config.platformRequirements;
214
- if (!requirements) {
215
- return { compatible: true };
216
- }
217
- const { platform, hasGui } = detectPlatform();
218
- if (requirements.platforms && requirements.platforms.length > 0) {
219
- if (platform !== "unknown" && !requirements.platforms.includes(platform)) {
220
- return {
221
- compatible: false,
222
- reason: `Not supported on ${platform}. Requires: ${requirements.platforms.join(", ")}`
223
- };
224
- }
225
- }
226
- if (requirements.requiresGui && !hasGui) {
227
- return {
228
- compatible: false,
229
- reason: "Requires GUI environment (X11/Wayland/Desktop)"
230
- };
231
- }
232
- if (requirements.requiredCommands) {
233
- for (const cmd of requirements.requiredCommands) {
234
- if (!isCommandAvailable(cmd)) {
235
- return {
236
- compatible: false,
237
- reason: `Required command not found: ${cmd}`
238
- };
239
- }
240
- }
241
- }
242
- return { compatible: true };
243
- }
244
- async function getMcpServicesWithCompatibility() {
245
- const allServices = await getMcpServices();
246
- return allServices.map((service) => {
247
- const { compatible, reason } = isMcpServiceCompatible(service.id);
248
- return {
249
- ...service,
250
- compatible,
251
- incompatibleReason: reason
252
- };
253
- });
254
- }
255
- const DEFAULT_MCP_TOOL_SEARCH_CONFIG = {
256
- mcpAutoEnableThreshold: 10,
257
- excludedServices: ["mcp-search", "context7"]
258
- };
259
- function getMcpToolSearchConfig() {
260
- const env = process__default.env;
261
- return {
262
- mcpAutoEnableThreshold: env.MCP_AUTO_THRESHOLD || DEFAULT_MCP_TOOL_SEARCH_CONFIG.mcpAutoEnableThreshold,
263
- dynamicServiceDiscovery: env.MCP_DYNAMIC_DISCOVERY !== "false",
264
- listChangedNotifications: env.MCP_LIST_CHANGED !== "false",
265
- excludedServices: env.MCP_EXCLUDED_SERVICES?.split(",").map((s) => s.trim()).filter(Boolean) || DEFAULT_MCP_TOOL_SEARCH_CONFIG.excludedServices
266
- };
267
- }
268
- class DynamicMcpServiceRegistry {
269
- _services = /* @__PURE__ */ new Map();
270
- _listeners = /* @__PURE__ */ new Set();
271
- _enabled = false;
272
- /**
273
- * Enable dynamic service discovery
274
- */
275
- enable() {
276
- this._enabled = true;
277
- }
278
- /**
279
- * Disable dynamic service discovery
280
- */
281
- disable() {
282
- this._enabled = false;
283
- }
284
- /**
285
- * Check if dynamic discovery is enabled
286
- */
287
- isEnabled() {
288
- return this._enabled;
289
- }
290
- /**
291
- * Add a service dynamically
292
- */
293
- addService(serviceId, config) {
294
- if (!this._enabled) {
295
- return false;
296
- }
297
- const isUpdate = this._services.has(serviceId);
298
- this._services.set(serviceId, config);
299
- this._notify({
300
- type: isUpdate ? "updated" : "added",
301
- serviceId,
302
- timestamp: Date.now(),
303
- config
304
- });
305
- return true;
306
- }
307
- /**
308
- * Remove a service dynamically
309
- */
310
- removeService(serviceId) {
311
- if (!this._enabled || !this._services.has(serviceId)) {
312
- return false;
313
- }
314
- const config = this._services.get(serviceId);
315
- this._services.delete(serviceId);
316
- this._notify({
317
- type: "removed",
318
- serviceId,
319
- timestamp: Date.now(),
320
- config
321
- });
322
- return true;
323
- }
324
- /**
325
- * Get a service configuration
326
- */
327
- getService(serviceId) {
328
- return this._services.get(serviceId);
329
- }
330
- /**
331
- * List all dynamically registered services
332
- */
333
- listServices() {
334
- return new Map(this._services);
335
- }
336
- /**
337
- * Subscribe to list change notifications
338
- */
339
- subscribe(listener) {
340
- this._listeners.add(listener);
341
- return () => this._listeners.delete(listener);
342
- }
343
- /**
344
- * Notify all listeners of a change
345
- */
346
- _notify(notification) {
347
- const toolSearchConfig = getMcpToolSearchConfig();
348
- if (toolSearchConfig.listChangedNotifications) {
349
- for (const listener of Array.from(this._listeners)) {
350
- try {
351
- listener(notification);
352
- } catch (error) {
353
- console.error("Error notifying MCP list change listener:", error);
354
- }
355
- }
356
- }
357
- }
358
- }
359
- const dynamicMcpRegistry = new DynamicMcpServiceRegistry();
360
-
361
- export { MCP_SERVICE_CONFIGS as M, getMcpService as a, getMcpServicesWithCompatibility as b, dynamicMcpRegistry as d, getMcpServices as g, isMcpServiceCompatible as i };
@@ -1,10 +1,10 @@
1
1
  import { existsSync, readFileSync, mkdirSync, unlinkSync } from 'node:fs';
2
2
  import os__default, { homedir } from 'node:os';
3
3
  import { c as createDefaultGateway } from './ccjk.D0g2ABGg.mjs';
4
+ import { CLOUD_ENDPOINTS } from '../chunks/constants.mjs';
4
5
  import { writeFileAtomic } from '../chunks/fs-operations.mjs';
5
6
  import { Buffer } from 'node:buffer';
6
7
  import crypto from 'node:crypto';
7
- import { CLOUD_ENDPOINTS } from '../chunks/constants.mjs';
8
8
  import { j as join } from './ccjk.bQ7Dh1g4.mjs';
9
9
 
10
10
  function validateBindRequest(request) {
@@ -1,9 +1,9 @@
1
1
  import { c as consola, o as ofetch } from './ccjk.Cv13QsGp.mjs';
2
2
  import fs__default, { existsSync, readFileSync, mkdirSync, writeFileSync } from 'node:fs';
3
3
  import path__default, { join, dirname } from 'node:path';
4
+ import { randomUUID } from 'node:crypto';
4
5
  import { homedir } from 'node:os';
5
6
  import { fileURLToPath } from 'node:url';
6
- import { randomUUID } from 'node:crypto';
7
7
  import { CLOUD_ENDPOINTS } from '../chunks/constants.mjs';
8
8
 
9
9
  const defaults = Object.freeze({