ccjk 13.3.18 → 13.3.19
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-cli.mjs +1 -1
- package/dist/chunks/api.mjs +1 -1
- package/dist/chunks/auto-fix.mjs +4 -4
- package/dist/chunks/boost.mjs +1 -1
- package/dist/chunks/ccjk-mcp.mjs +2 -2
- package/dist/chunks/ccr.mjs +24 -20
- package/dist/chunks/check-updates.mjs +2 -1
- package/dist/chunks/claude-code-config-manager.mjs +4 -4
- package/dist/chunks/claude-code-incremental-manager.mjs +5 -5
- package/dist/chunks/claude-config.mjs +2 -2
- package/dist/chunks/claude-wrapper.mjs +1 -1
- package/dist/chunks/codex-config-switch.mjs +4 -3
- package/dist/chunks/codex-provider-manager.mjs +2 -1
- package/dist/chunks/codex.mjs +4 -332
- package/dist/chunks/config-switch.mjs +2 -1
- package/dist/chunks/config.mjs +424 -358
- package/dist/chunks/config2.mjs +358 -424
- package/dist/chunks/config3.mjs +6 -1
- package/dist/chunks/doctor.mjs +2 -2
- package/dist/chunks/features.mjs +812 -0
- package/dist/chunks/index.mjs +1 -1
- package/dist/chunks/init.mjs +43 -89
- package/dist/chunks/installer.mjs +1 -1
- package/dist/chunks/mcp-cli.mjs +18 -17
- package/dist/chunks/mcp.mjs +5 -4
- package/dist/chunks/menu-hierarchical.mjs +27 -23
- package/dist/chunks/menu.mjs +17 -791
- package/dist/chunks/onboarding-wizard.mjs +2 -2
- package/dist/chunks/package.mjs +1 -1
- package/dist/chunks/platform.mjs +1 -1
- package/dist/chunks/quick-setup.mjs +14 -11
- package/dist/chunks/slash-commands.mjs +1 -1
- package/dist/chunks/uninstall.mjs +1 -1
- package/dist/chunks/update.mjs +17 -15
- package/dist/cli.mjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/shared/ccjk.0aJQmVxS.mjs +336 -0
- package/dist/shared/ccjk.C3o4BXvM.mjs +444 -0
- package/dist/shared/{ccjk.DfZKjHvG.mjs → ccjk.Dgq22o6V.mjs} +2 -438
- package/dist/shared/{ccjk.KpFl2RDA.mjs → ccjk.LTONy3IS.mjs} +4 -3
- package/dist/shared/ccjk.Si-T_ccK.mjs +75 -0
- package/dist/shared/{ccjk.I6IuYdc_.mjs → ccjk.Xla_pE3y.mjs} +1 -1
- package/dist/shared/{ccjk.DZ4ehAHg.mjs → ccjk.byom1b8z.mjs} +1 -1
- package/package.json +1 -1
package/dist/chunks/codex.mjs
CHANGED
|
@@ -10,344 +10,16 @@ import { x as K } from './main.mjs';
|
|
|
10
10
|
import { CODEX_AUTH_FILE, SUPPORTED_LANGS, CODEX_DIR, CODEX_AGENTS_FILE, CODEX_PROMPTS_DIR, CODEX_CONFIG_FILE, AI_OUTPUT_LANGUAGES, ZCF_CONFIG_FILE } from './constants.mjs';
|
|
11
11
|
import { ensureI18nInitialized, i18n, format } from './index5.mjs';
|
|
12
12
|
import { updateZcfConfig, readZcfConfig, readDefaultTomlConfig, updateTomlConfig } from './ccjk-config.mjs';
|
|
13
|
-
import { e as applyAiLanguageDirective } from './
|
|
13
|
+
import { e as applyAiLanguageDirective } from './config2.mjs';
|
|
14
14
|
import { exists, readFile, ensureDir, writeFileAtomic, writeFile, copyFile, copyDir } from './fs-operations.mjs';
|
|
15
15
|
import { readJsonConfig, writeJsonConfig } from './json-config.mjs';
|
|
16
|
-
import {
|
|
16
|
+
import { i as isWindows, m as getMcpCommand, l as getSystemRoot, w as wrapCommandWithSudo, n as normalizeTomlPath } from './platform.mjs';
|
|
17
17
|
import { a as addNumbersToChoices } from '../shared/ccjk.BFQ7yr5S.mjs';
|
|
18
18
|
import { resolveAiOutputLanguage } from './prompts.mjs';
|
|
19
19
|
import { p as promptBoolean } from '../shared/ccjk.BWFpnOr3.mjs';
|
|
20
|
-
import '
|
|
21
|
-
import { homedir } from 'node:os';
|
|
20
|
+
import { M as MCP_SERVICE_CONFIGS, s as selectMcpServices, g as getMcpServices } from '../shared/ccjk.0aJQmVxS.mjs';
|
|
22
21
|
import { j as join, d as dirname } from '../shared/ccjk.bQ7Dh1g4.mjs';
|
|
23
22
|
|
|
24
|
-
const PLAYWRIGHT_PROFILES_DIR = join(homedir(), ".ccjk", "playwright");
|
|
25
|
-
function createPlaywrightMcpConfig(options = {}) {
|
|
26
|
-
const {
|
|
27
|
-
profile = "default",
|
|
28
|
-
headless = false,
|
|
29
|
-
browser = "chromium",
|
|
30
|
-
userDataDir
|
|
31
|
-
} = options;
|
|
32
|
-
const resolvedUserDataDir = userDataDir || join(PLAYWRIGHT_PROFILES_DIR, profile);
|
|
33
|
-
const args = ["-y", "@playwright/mcp@latest"];
|
|
34
|
-
args.push("--browser", browser);
|
|
35
|
-
args.push("--user-data-dir", resolvedUserDataDir);
|
|
36
|
-
if (headless) {
|
|
37
|
-
args.push("--headless");
|
|
38
|
-
}
|
|
39
|
-
return {
|
|
40
|
-
type: "stdio",
|
|
41
|
-
command: "npx",
|
|
42
|
-
args,
|
|
43
|
-
env: {}
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
const MCP_SERVICE_CONFIGS = [
|
|
47
|
-
// Documentation and Search Services - Universal (no GUI required)
|
|
48
|
-
{
|
|
49
|
-
id: "context7",
|
|
50
|
-
requiresApiKey: false,
|
|
51
|
-
config: {
|
|
52
|
-
type: "stdio",
|
|
53
|
-
command: "npx",
|
|
54
|
-
args: ["-y", "@upstash/context7-mcp@latest"],
|
|
55
|
-
env: {}
|
|
56
|
-
}
|
|
57
|
-
// Works on all platforms - no special requirements
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
id: "open-websearch",
|
|
61
|
-
requiresApiKey: false,
|
|
62
|
-
config: {
|
|
63
|
-
type: "stdio",
|
|
64
|
-
command: "npx",
|
|
65
|
-
args: ["-y", "open-websearch@latest"],
|
|
66
|
-
env: {
|
|
67
|
-
MODE: "stdio",
|
|
68
|
-
DEFAULT_SEARCH_ENGINE: "duckduckgo",
|
|
69
|
-
ALLOWED_SEARCH_ENGINES: "duckduckgo,bing,brave"
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
// Works on all platforms - no special requirements
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
id: "mcp-deepwiki",
|
|
76
|
-
requiresApiKey: false,
|
|
77
|
-
config: {
|
|
78
|
-
type: "stdio",
|
|
79
|
-
command: "npx",
|
|
80
|
-
args: ["-y", "mcp-deepwiki@latest"],
|
|
81
|
-
env: {}
|
|
82
|
-
}
|
|
83
|
-
// Works on all platforms - no special requirements
|
|
84
|
-
},
|
|
85
|
-
// Development Workflow Services
|
|
86
|
-
{
|
|
87
|
-
id: "spec-workflow",
|
|
88
|
-
requiresApiKey: false,
|
|
89
|
-
config: {
|
|
90
|
-
type: "stdio",
|
|
91
|
-
command: "npx",
|
|
92
|
-
args: ["-y", "@pimzino/spec-workflow-mcp@latest"],
|
|
93
|
-
env: {}
|
|
94
|
-
}
|
|
95
|
-
// Works on all platforms - no special requirements
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
id: "serena",
|
|
99
|
-
requiresApiKey: false,
|
|
100
|
-
config: {
|
|
101
|
-
type: "stdio",
|
|
102
|
-
command: "uvx",
|
|
103
|
-
args: ["--from", "git+https://github.com/oraios/serena", "serena", "start-mcp-server", "--context", "ide-assistant", "--enable-web-dashboard", "false"],
|
|
104
|
-
env: {}
|
|
105
|
-
},
|
|
106
|
-
platformRequirements: {
|
|
107
|
-
requiredCommands: ["uvx"]
|
|
108
|
-
// Requires uv/uvx to be installed
|
|
109
|
-
}
|
|
110
|
-
},
|
|
111
|
-
// Browser and Automation Services - Require GUI environment
|
|
112
|
-
{
|
|
113
|
-
id: "Playwright",
|
|
114
|
-
requiresApiKey: false,
|
|
115
|
-
config: createPlaywrightMcpConfig(),
|
|
116
|
-
// Uses default profile with chromium browser
|
|
117
|
-
platformRequirements: {
|
|
118
|
-
platforms: ["macos", "windows"],
|
|
119
|
-
// GUI required - exclude headless Linux/WSL/Termux
|
|
120
|
-
requiresGui: true
|
|
121
|
-
}
|
|
122
|
-
},
|
|
123
|
-
// Cross-session Memory Services
|
|
124
|
-
{
|
|
125
|
-
id: "intent-engine",
|
|
126
|
-
requiresApiKey: false,
|
|
127
|
-
defaultSelected: true,
|
|
128
|
-
config: {
|
|
129
|
-
type: "stdio",
|
|
130
|
-
command: "npx",
|
|
131
|
-
args: ["-y", "@origintask/intent-engine@latest", "mcp"],
|
|
132
|
-
env: {}
|
|
133
|
-
}
|
|
134
|
-
// Works on all platforms - no special requirements
|
|
135
|
-
},
|
|
136
|
-
// Anthropic Official MCP Services - Universal
|
|
137
|
-
// Note: Removed low-value services: filesystem (buggy), puppeteer (duplicate of Playwright),
|
|
138
|
-
// memory (Claude has built-in memory), fetch (Claude has WebFetch), sequential-thinking (limited value)
|
|
139
|
-
{
|
|
140
|
-
id: "sqlite",
|
|
141
|
-
requiresApiKey: false,
|
|
142
|
-
config: {
|
|
143
|
-
type: "stdio",
|
|
144
|
-
command: "npx",
|
|
145
|
-
args: ["-y", "@anthropic-ai/mcp-server-sqlite@latest"],
|
|
146
|
-
env: {}
|
|
147
|
-
}
|
|
148
|
-
// Works on all platforms - no special requirements
|
|
149
|
-
}
|
|
150
|
-
];
|
|
151
|
-
async function getMcpServices() {
|
|
152
|
-
ensureI18nInitialized();
|
|
153
|
-
const mcpServiceList = [
|
|
154
|
-
// Documentation and Search Services
|
|
155
|
-
{
|
|
156
|
-
id: "context7",
|
|
157
|
-
name: i18n.t("mcp:services.context7.name"),
|
|
158
|
-
description: i18n.t("mcp:services.context7.description")
|
|
159
|
-
},
|
|
160
|
-
{
|
|
161
|
-
id: "open-websearch",
|
|
162
|
-
name: i18n.t("mcp:services.open-websearch.name"),
|
|
163
|
-
description: i18n.t("mcp:services.open-websearch.description")
|
|
164
|
-
},
|
|
165
|
-
{
|
|
166
|
-
id: "mcp-deepwiki",
|
|
167
|
-
name: i18n.t("mcp:services.mcp-deepwiki.name"),
|
|
168
|
-
description: i18n.t("mcp:services.mcp-deepwiki.description")
|
|
169
|
-
},
|
|
170
|
-
// Development Workflow Services
|
|
171
|
-
{
|
|
172
|
-
id: "spec-workflow",
|
|
173
|
-
name: i18n.t("mcp:services.spec-workflow.name"),
|
|
174
|
-
description: i18n.t("mcp:services.spec-workflow.description")
|
|
175
|
-
},
|
|
176
|
-
{
|
|
177
|
-
id: "serena",
|
|
178
|
-
name: i18n.t("mcp:services.serena.name"),
|
|
179
|
-
description: i18n.t("mcp:services.serena.description")
|
|
180
|
-
},
|
|
181
|
-
// Browser and Automation Services
|
|
182
|
-
{
|
|
183
|
-
id: "Playwright",
|
|
184
|
-
name: i18n.t("mcp:services.playwright.name"),
|
|
185
|
-
description: i18n.t("mcp:services.playwright.description")
|
|
186
|
-
},
|
|
187
|
-
// Cross-session Memory Services
|
|
188
|
-
{
|
|
189
|
-
id: "intent-engine",
|
|
190
|
-
name: i18n.t("mcp:services.intent-engine.name"),
|
|
191
|
-
description: i18n.t("mcp:services.intent-engine.description")
|
|
192
|
-
},
|
|
193
|
-
// Anthropic Official MCP Services
|
|
194
|
-
// Note: Removed low-value services: filesystem (buggy), puppeteer (duplicate),
|
|
195
|
-
// memory (Claude built-in), fetch (Claude WebFetch), sequential-thinking (limited value)
|
|
196
|
-
{
|
|
197
|
-
id: "sqlite",
|
|
198
|
-
name: i18n.t("mcp:services.sqlite.name"),
|
|
199
|
-
description: i18n.t("mcp:services.sqlite.description")
|
|
200
|
-
}
|
|
201
|
-
];
|
|
202
|
-
return MCP_SERVICE_CONFIGS.map((config) => {
|
|
203
|
-
const serviceInfo = mcpServiceList.find((s) => s.id === config.id);
|
|
204
|
-
const service = {
|
|
205
|
-
id: config.id,
|
|
206
|
-
name: serviceInfo?.name || config.id,
|
|
207
|
-
description: serviceInfo?.description || "",
|
|
208
|
-
requiresApiKey: config.requiresApiKey,
|
|
209
|
-
config: config.config
|
|
210
|
-
};
|
|
211
|
-
if (config.apiKeyEnvVar) {
|
|
212
|
-
service.apiKeyEnvVar = config.apiKeyEnvVar;
|
|
213
|
-
}
|
|
214
|
-
return service;
|
|
215
|
-
});
|
|
216
|
-
}
|
|
217
|
-
async function getMcpService(id) {
|
|
218
|
-
const services = await getMcpServices();
|
|
219
|
-
return services.find((service) => service.id === id);
|
|
220
|
-
}
|
|
221
|
-
const DEFAULT_MCP_TOOL_SEARCH_CONFIG = {
|
|
222
|
-
mcpAutoEnableThreshold: 10,
|
|
223
|
-
excludedServices: ["mcp-search", "context7", "sqlite"]
|
|
224
|
-
};
|
|
225
|
-
function getMcpToolSearchConfig() {
|
|
226
|
-
const env = process__default.env;
|
|
227
|
-
return {
|
|
228
|
-
mcpAutoEnableThreshold: env.MCP_AUTO_THRESHOLD || DEFAULT_MCP_TOOL_SEARCH_CONFIG.mcpAutoEnableThreshold,
|
|
229
|
-
dynamicServiceDiscovery: env.MCP_DYNAMIC_DISCOVERY !== "false",
|
|
230
|
-
listChangedNotifications: env.MCP_LIST_CHANGED !== "false",
|
|
231
|
-
excludedServices: env.MCP_EXCLUDED_SERVICES?.split(",").map((s) => s.trim()).filter(Boolean) || DEFAULT_MCP_TOOL_SEARCH_CONFIG.excludedServices
|
|
232
|
-
};
|
|
233
|
-
}
|
|
234
|
-
class DynamicMcpServiceRegistry {
|
|
235
|
-
_services = /* @__PURE__ */ new Map();
|
|
236
|
-
_listeners = /* @__PURE__ */ new Set();
|
|
237
|
-
_enabled = false;
|
|
238
|
-
/**
|
|
239
|
-
* Enable dynamic service discovery
|
|
240
|
-
*/
|
|
241
|
-
enable() {
|
|
242
|
-
this._enabled = true;
|
|
243
|
-
}
|
|
244
|
-
/**
|
|
245
|
-
* Disable dynamic service discovery
|
|
246
|
-
*/
|
|
247
|
-
disable() {
|
|
248
|
-
this._enabled = false;
|
|
249
|
-
}
|
|
250
|
-
/**
|
|
251
|
-
* Check if dynamic discovery is enabled
|
|
252
|
-
*/
|
|
253
|
-
isEnabled() {
|
|
254
|
-
return this._enabled;
|
|
255
|
-
}
|
|
256
|
-
/**
|
|
257
|
-
* Add a service dynamically
|
|
258
|
-
*/
|
|
259
|
-
addService(serviceId, config) {
|
|
260
|
-
if (!this._enabled) {
|
|
261
|
-
return false;
|
|
262
|
-
}
|
|
263
|
-
const isUpdate = this._services.has(serviceId);
|
|
264
|
-
this._services.set(serviceId, config);
|
|
265
|
-
this._notify({
|
|
266
|
-
type: isUpdate ? "updated" : "added",
|
|
267
|
-
serviceId,
|
|
268
|
-
timestamp: Date.now(),
|
|
269
|
-
config
|
|
270
|
-
});
|
|
271
|
-
return true;
|
|
272
|
-
}
|
|
273
|
-
/**
|
|
274
|
-
* Remove a service dynamically
|
|
275
|
-
*/
|
|
276
|
-
removeService(serviceId) {
|
|
277
|
-
if (!this._enabled || !this._services.has(serviceId)) {
|
|
278
|
-
return false;
|
|
279
|
-
}
|
|
280
|
-
const config = this._services.get(serviceId);
|
|
281
|
-
this._services.delete(serviceId);
|
|
282
|
-
this._notify({
|
|
283
|
-
type: "removed",
|
|
284
|
-
serviceId,
|
|
285
|
-
timestamp: Date.now(),
|
|
286
|
-
config
|
|
287
|
-
});
|
|
288
|
-
return true;
|
|
289
|
-
}
|
|
290
|
-
/**
|
|
291
|
-
* Get a service configuration
|
|
292
|
-
*/
|
|
293
|
-
getService(serviceId) {
|
|
294
|
-
return this._services.get(serviceId);
|
|
295
|
-
}
|
|
296
|
-
/**
|
|
297
|
-
* List all dynamically registered services
|
|
298
|
-
*/
|
|
299
|
-
listServices() {
|
|
300
|
-
return new Map(this._services);
|
|
301
|
-
}
|
|
302
|
-
/**
|
|
303
|
-
* Subscribe to list change notifications
|
|
304
|
-
*/
|
|
305
|
-
subscribe(listener) {
|
|
306
|
-
this._listeners.add(listener);
|
|
307
|
-
return () => this._listeners.delete(listener);
|
|
308
|
-
}
|
|
309
|
-
/**
|
|
310
|
-
* Notify all listeners of a change
|
|
311
|
-
*/
|
|
312
|
-
_notify(notification) {
|
|
313
|
-
const toolSearchConfig = getMcpToolSearchConfig();
|
|
314
|
-
if (toolSearchConfig.listChangedNotifications) {
|
|
315
|
-
for (const listener of Array.from(this._listeners)) {
|
|
316
|
-
try {
|
|
317
|
-
listener(notification);
|
|
318
|
-
} catch (error) {
|
|
319
|
-
console.error("Error notifying MCP list change listener:", error);
|
|
320
|
-
}
|
|
321
|
-
}
|
|
322
|
-
}
|
|
323
|
-
}
|
|
324
|
-
}
|
|
325
|
-
const dynamicMcpRegistry = new DynamicMcpServiceRegistry();
|
|
326
|
-
|
|
327
|
-
async function selectMcpServices() {
|
|
328
|
-
ensureI18nInitialized();
|
|
329
|
-
const mcpServices = await getMcpServices();
|
|
330
|
-
const defaultSelectedIds = new Set(
|
|
331
|
-
MCP_SERVICE_CONFIGS.filter((c) => c.defaultSelected).map((c) => c.id)
|
|
332
|
-
);
|
|
333
|
-
const choices = mcpServices.map((service) => ({
|
|
334
|
-
name: `${service.name} - ${a.gray(service.description)}`,
|
|
335
|
-
value: service.id,
|
|
336
|
-
checked: defaultSelectedIds.has(service.id)
|
|
337
|
-
}));
|
|
338
|
-
const { services } = await inquirer.prompt({
|
|
339
|
-
type: "checkbox",
|
|
340
|
-
name: "services",
|
|
341
|
-
message: `${i18n.t("mcp:selectMcpServices")}${i18n.t("common:multiSelectHint")}`,
|
|
342
|
-
choices
|
|
343
|
-
});
|
|
344
|
-
if (services === void 0) {
|
|
345
|
-
console.log(a.yellow(i18n.t("common:cancelled")));
|
|
346
|
-
return void 0;
|
|
347
|
-
}
|
|
348
|
-
return services;
|
|
349
|
-
}
|
|
350
|
-
|
|
351
23
|
function detectConfigManagementMode() {
|
|
352
24
|
try {
|
|
353
25
|
const config = readCodexConfig();
|
|
@@ -2074,4 +1746,4 @@ const codex = {
|
|
|
2074
1746
|
writeCodexConfig: writeCodexConfig
|
|
2075
1747
|
};
|
|
2076
1748
|
|
|
2077
|
-
export {
|
|
1749
|
+
export { readCodexConfig as a, switchToOfficialLogin as b, switchToProvider as c, backupCodexComplete as d, writeAuthFile as e, detectConfigManagementMode as f, applyCodexPlatformCommand as g, runCodexFullInit as h, codex as i, listCodexProviders as l, runCodexUpdate as r, switchCodexProvider as s, writeCodexConfig as w };
|
|
@@ -32,7 +32,7 @@ import './fs-operations.mjs';
|
|
|
32
32
|
import 'node:fs/promises';
|
|
33
33
|
import './json-config.mjs';
|
|
34
34
|
import '../shared/ccjk.RyizuzOI.mjs';
|
|
35
|
-
import './
|
|
35
|
+
import './config2.mjs';
|
|
36
36
|
import './claude-config.mjs';
|
|
37
37
|
import './platform.mjs';
|
|
38
38
|
import './main.mjs';
|
|
@@ -46,6 +46,7 @@ import '../shared/ccjk.CxpGa6MC.mjs';
|
|
|
46
46
|
import './prompts.mjs';
|
|
47
47
|
import '../shared/ccjk.gDEDGD_t.mjs';
|
|
48
48
|
import '../shared/ccjk.BWFpnOr3.mjs';
|
|
49
|
+
import '../shared/ccjk.0aJQmVxS.mjs';
|
|
49
50
|
|
|
50
51
|
async function configSwitchCommand(options) {
|
|
51
52
|
try {
|