ccjk 13.6.4 → 13.6.7
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/agents.mjs +1 -1
- package/dist/chunks/api-config-selector.mjs +6 -4
- package/dist/chunks/auto-updater.mjs +100 -2
- package/dist/chunks/banner.mjs +0 -16
- package/dist/chunks/ccjk-mcp.mjs +2 -2
- package/dist/chunks/ccr.mjs +6 -4
- package/dist/chunks/check-updates.mjs +28 -17
- package/dist/chunks/claude-code-config-manager.mjs +3 -1
- package/dist/chunks/claude-code-incremental-manager.mjs +46 -20
- package/dist/chunks/claude-config.mjs +52 -2
- package/dist/chunks/claude-wrapper.mjs +1 -1
- package/dist/chunks/cli-hook.mjs +25 -83
- package/dist/chunks/codex-config-switch.mjs +3 -2
- package/dist/chunks/codex-provider-manager.mjs +1 -0
- package/dist/chunks/codex.mjs +3 -359
- package/dist/chunks/config-switch.mjs +23 -10
- package/dist/chunks/config.mjs +1 -1
- package/dist/chunks/config2.mjs +3 -3
- package/dist/chunks/constants.mjs +179 -3
- package/dist/chunks/doctor.mjs +1 -1
- package/dist/chunks/features.mjs +76 -11
- package/dist/chunks/index10.mjs +55 -36
- package/dist/chunks/init.mjs +120 -61
- package/dist/chunks/installer.mjs +80 -19
- package/dist/chunks/mcp-cli.mjs +17 -16
- package/dist/chunks/mcp.mjs +8 -7
- package/dist/chunks/memory-check.mjs +1 -1
- package/dist/chunks/package.mjs +1 -1
- package/dist/chunks/platform.mjs +5 -1
- package/dist/chunks/quick-setup.mjs +13 -11
- package/dist/chunks/research.mjs +1177 -0
- package/dist/chunks/sessions.mjs +1 -1
- package/dist/chunks/smart-defaults.mjs +42 -14
- package/dist/chunks/uninstall.mjs +2 -2
- package/dist/chunks/update.mjs +14 -13
- package/dist/chunks/version-checker.mjs +11 -1
- package/dist/cli.mjs +32 -0
- package/dist/i18n/locales/en/cli.json +0 -4
- package/dist/i18n/locales/en/menu.json +3 -3
- package/dist/i18n/locales/en/notification.json +2 -2
- package/dist/i18n/locales/zh-CN/cli.json +0 -4
- package/dist/i18n/locales/zh-CN/menu.json +3 -3
- package/dist/i18n/locales/zh-CN/notification.json +2 -2
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +8 -174
- package/dist/shared/{ccjk.DvAP4XfP.mjs → ccjk.B4aXNclK.mjs} +2 -2
- package/dist/shared/ccjk.BI-hdI7P.mjs +30 -0
- package/dist/shared/{ccjk.DwSebGy0.mjs → ccjk.BOO14f66.mjs} +1 -1
- package/dist/shared/ccjk.BnsY5WxD.mjs +171 -0
- package/dist/shared/{ccjk.C4m4ypdk.mjs → ccjk.DHaUdzX3.mjs} +4 -3
- package/dist/shared/ccjk.DKXs7Fbm.mjs +361 -0
- package/dist/shared/{ccjk.BP5hsTZQ.mjs → ccjk.Dz0ssUQx.mjs} +1 -1
- package/dist/shared/ccjk.yYQMbHH3.mjs +115 -0
- package/package.json +70 -65
- package/templates/common/workflow/essential/en/feat.md +68 -291
- package/templates/common/workflow/sixStep/en/workflow.md +56 -330
- package/dist/shared/ccjk.CiKtBUW_.mjs +0 -54
package/dist/chunks/sessions.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { execSync } from 'node:child_process';
|
|
2
2
|
import { existsSync, readFileSync } from 'node:fs';
|
|
3
3
|
import { homedir } from 'node:os';
|
|
4
|
-
import { CCJK_CONFIG_DIR } from './constants.mjs';
|
|
4
|
+
import { CCJK_CONFIG_DIR, CODE_TOOL_INFO } from './constants.mjs';
|
|
5
5
|
import { writeJsonConfig } from './json-config.mjs';
|
|
6
6
|
import { j as join } from '../shared/ccjk.bQ7Dh1g4.mjs';
|
|
7
|
-
import { g as getPlatform } from './platform.mjs';
|
|
7
|
+
import { g as getPlatform, h as commandExists } from './platform.mjs';
|
|
8
8
|
import { s as scanProject } from '../shared/ccjk.DJuyfrlL.mjs';
|
|
9
9
|
|
|
10
10
|
const ORCHESTRATION_LEVELS = ["off", "minimal", "standard", "max"];
|
|
@@ -89,7 +89,7 @@ class SmartDefaultsDetector {
|
|
|
89
89
|
const platform = getPlatform();
|
|
90
90
|
const apiKey = this.detectApiKey();
|
|
91
91
|
const apiProvider = this.detectApiProvider(apiKey);
|
|
92
|
-
const ccVersion = this.detectClaudeCodeVersion();
|
|
92
|
+
const ccVersion = await this.detectClaudeCodeVersion();
|
|
93
93
|
const projectContext = scanProject(cwd);
|
|
94
94
|
return {
|
|
95
95
|
// Environment detection
|
|
@@ -142,17 +142,28 @@ class SmartDefaultsDetector {
|
|
|
142
142
|
/**
|
|
143
143
|
* Detect installed Claude Code version
|
|
144
144
|
*/
|
|
145
|
-
detectClaudeCodeVersion() {
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
145
|
+
async detectClaudeCodeVersion() {
|
|
146
|
+
const candidateCommands = [
|
|
147
|
+
CODE_TOOL_INFO["claude-code"].runtimeCommand,
|
|
148
|
+
CODE_TOOL_INFO.myclaude.runtimeCommand
|
|
149
|
+
];
|
|
150
|
+
for (const command of candidateCommands) {
|
|
151
|
+
try {
|
|
152
|
+
if (!await commandExists(command)) {
|
|
153
|
+
continue;
|
|
154
|
+
}
|
|
155
|
+
const output = execSync(`${command} --version 2>/dev/null || echo ""`, {
|
|
156
|
+
encoding: "utf-8",
|
|
157
|
+
timeout: 5e3
|
|
158
|
+
}).trim();
|
|
159
|
+
const match = output.match(/(\d+\.\d+\.\d+)/);
|
|
160
|
+
if (match) {
|
|
161
|
+
return match[1];
|
|
162
|
+
}
|
|
163
|
+
} catch {
|
|
164
|
+
}
|
|
155
165
|
}
|
|
166
|
+
return void 0;
|
|
156
167
|
}
|
|
157
168
|
/**
|
|
158
169
|
* Detect which Claude Code native features are available
|
|
@@ -235,6 +246,23 @@ class SmartDefaultsDetector {
|
|
|
235
246
|
* This is a static method so it can be called without instantiating the full detector.
|
|
236
247
|
*/
|
|
237
248
|
static detectCodeToolType() {
|
|
249
|
+
const myclaudeMarkers = [
|
|
250
|
+
join(homedir(), ".claude.json"),
|
|
251
|
+
join(homedir(), ".claude", "config.json")
|
|
252
|
+
];
|
|
253
|
+
try {
|
|
254
|
+
if (myclaudeMarkers.some((p) => existsSync(p))) {
|
|
255
|
+
const globalConfigPath = join(homedir(), ".claude.json");
|
|
256
|
+
if (existsSync(globalConfigPath)) {
|
|
257
|
+
const configContent = readFileSync(globalConfigPath, "utf-8");
|
|
258
|
+
const config = JSON.parse(configContent);
|
|
259
|
+
if (config.myclaudeActiveProviderProfileId || config.myclaudeProviderProfiles) {
|
|
260
|
+
return "myclaude";
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
} catch {
|
|
265
|
+
}
|
|
238
266
|
const claudeCodePaths = [
|
|
239
267
|
join(homedir(), ".claude"),
|
|
240
268
|
join(homedir(), ".config", "claude")
|
|
@@ -246,7 +274,7 @@ class SmartDefaultsDetector {
|
|
|
246
274
|
if (existsSync(codexPath)) {
|
|
247
275
|
return "codex";
|
|
248
276
|
}
|
|
249
|
-
return "
|
|
277
|
+
return "myclaude";
|
|
250
278
|
}
|
|
251
279
|
/**
|
|
252
280
|
* Check if CCR (Claude Code Router) should be enabled
|
|
@@ -3,7 +3,7 @@ import { i as inquirer } from './index6.mjs';
|
|
|
3
3
|
import { ZCF_CONFIG_FILE, DEFAULT_CODE_TOOL_TYPE, isCodeToolType } from './constants.mjs';
|
|
4
4
|
import { i18n, ensureI18nInitialized, resolveSupportedLanguage } from './index2.mjs';
|
|
5
5
|
import { readZcfConfig } from './ccjk-config.mjs';
|
|
6
|
-
import { r as resolveCodeType } from '../shared/ccjk.
|
|
6
|
+
import { r as resolveCodeType } from '../shared/ccjk.yYQMbHH3.mjs';
|
|
7
7
|
import { a as handleExitPromptError, h as handleGeneralError } from '../shared/ccjk.DGllfVCZ.mjs';
|
|
8
8
|
import { a as addNumbersToChoices } from '../shared/ccjk.BFQ7yr5S.mjs';
|
|
9
9
|
import { p as promptBoolean } from '../shared/ccjk.DZ2LLOa-.mjs';
|
|
@@ -618,7 +618,7 @@ async function uninstall(options = {}) {
|
|
|
618
618
|
}
|
|
619
619
|
const uninstaller = new ZcfUninstaller(lang);
|
|
620
620
|
if (codeType === "codex") {
|
|
621
|
-
const { runCodexUninstall } = await import('./codex.mjs').then(function (n) { return n.
|
|
621
|
+
const { runCodexUninstall } = await import('./codex.mjs').then(function (n) { return n.q; });
|
|
622
622
|
await runCodexUninstall();
|
|
623
623
|
return;
|
|
624
624
|
}
|
package/dist/chunks/update.mjs
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import { existsSync } from 'node:fs';
|
|
2
2
|
import a from './index5.mjs';
|
|
3
3
|
import { i as inquirer } from './index6.mjs';
|
|
4
|
-
import {
|
|
4
|
+
import { M as MCP_SERVICE_CONFIGS, g as getMcpServices } from '../shared/ccjk.DKXs7Fbm.mjs';
|
|
5
5
|
import { SETTINGS_FILE, DEFAULT_CODE_TOOL_TYPE, resolveCodeToolType as resolveCodeToolType$1, isCodeToolType } from './constants.mjs';
|
|
6
6
|
import { i18n } from './index2.mjs';
|
|
7
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
|
+
import { c as runCodexUpdate } from './codex.mjs';
|
|
10
11
|
import { f as copyConfigFiles } from './config.mjs';
|
|
11
12
|
import { n as needsMigration, m as migrateSettingsForTokenRetrieval, d as displayMigrationResult, p as promptMigration } from '../shared/ccjk.DDq2hqA5.mjs';
|
|
12
|
-
import { u as updatePromptOnly } from '../shared/ccjk.
|
|
13
|
+
import { u as updatePromptOnly } from '../shared/ccjk.Dz0ssUQx.mjs';
|
|
13
14
|
import { a as handleExitPromptError, h as handleGeneralError } from '../shared/ccjk.DGllfVCZ.mjs';
|
|
14
|
-
import { a as installMcpServices } from '../shared/ccjk.
|
|
15
|
+
import { a as installMcpServices } from '../shared/ccjk.DHaUdzX3.mjs';
|
|
15
16
|
import { resolveAiOutputLanguage } from './prompts.mjs';
|
|
16
17
|
import { g as getRuntimeVersion } from '../shared/ccjk.gDEDGD_t.mjs';
|
|
17
18
|
import { checkClaudeCodeVersionAndPrompt } from './version-checker.mjs';
|
|
@@ -32,24 +33,24 @@ import 'node:os';
|
|
|
32
33
|
import 'node:crypto';
|
|
33
34
|
import 'buffer';
|
|
34
35
|
import 'string_decoder';
|
|
36
|
+
import 'node:child_process';
|
|
37
|
+
import '../shared/ccjk.bQ7Dh1g4.mjs';
|
|
35
38
|
import 'node:url';
|
|
36
|
-
import '../shared/ccjk.RyizuzOI.mjs';
|
|
37
|
-
import './index8.mjs';
|
|
38
|
-
import '../shared/ccjk.DeWpAShp.mjs';
|
|
39
|
-
import '../shared/ccjk.CxpGa6MC.mjs';
|
|
40
39
|
import '../shared/ccjk.BBtCGd_g.mjs';
|
|
41
|
-
import './
|
|
42
|
-
import 'module';
|
|
43
|
-
import 'node:child_process';
|
|
44
|
-
import 'node:stream';
|
|
40
|
+
import './index3.mjs';
|
|
45
41
|
import './fs-operations.mjs';
|
|
46
42
|
import 'node:fs/promises';
|
|
47
|
-
import '../shared/ccjk.bQ7Dh1g4.mjs';
|
|
48
43
|
import './json-config.mjs';
|
|
44
|
+
import '../shared/ccjk.RyizuzOI.mjs';
|
|
49
45
|
import './platform.mjs';
|
|
46
|
+
import './main.mjs';
|
|
47
|
+
import 'module';
|
|
48
|
+
import 'node:stream';
|
|
49
|
+
import './index8.mjs';
|
|
50
|
+
import '../shared/ccjk.DeWpAShp.mjs';
|
|
51
|
+
import '../shared/ccjk.CxpGa6MC.mjs';
|
|
50
52
|
import '../shared/ccjk.BFQ7yr5S.mjs';
|
|
51
53
|
import '../shared/ccjk.DZ2LLOa-.mjs';
|
|
52
|
-
import './index3.mjs';
|
|
53
54
|
import '../shared/ccjk.DScm_NnL.mjs';
|
|
54
55
|
|
|
55
56
|
const ccjkVersion = getRuntimeVersion();
|
|
@@ -864,6 +864,16 @@ async function checkCometixLineVersion() {
|
|
|
864
864
|
needsUpdate: currentVersion && latestVersion ? shouldUpdate(currentVersion, latestVersion) : false
|
|
865
865
|
};
|
|
866
866
|
}
|
|
867
|
+
async function checkMyclaudeVersion() {
|
|
868
|
+
const currentVersion = await getInstalledVersion("myclaude");
|
|
869
|
+
const latestVersion = await getLatestVersion("myclaude-code");
|
|
870
|
+
return {
|
|
871
|
+
installed: currentVersion !== null,
|
|
872
|
+
currentVersion,
|
|
873
|
+
latestVersion,
|
|
874
|
+
needsUpdate: currentVersion && latestVersion ? shouldUpdate(currentVersion, latestVersion) : false
|
|
875
|
+
};
|
|
876
|
+
}
|
|
867
877
|
async function checkClaudeCodeVersionAndPrompt(skipPrompt = false) {
|
|
868
878
|
try {
|
|
869
879
|
const versionInfo = await checkClaudeCodeVersion();
|
|
@@ -878,4 +888,4 @@ async function checkClaudeCodeVersionAndPrompt(skipPrompt = false) {
|
|
|
878
888
|
}
|
|
879
889
|
}
|
|
880
890
|
|
|
881
|
-
export { checkCcrVersion, checkClaudeCodeVersion, checkClaudeCodeVersionAndPrompt, checkCometixLineVersion, checkDuplicateInstallations, compareVersions, detectAllClaudeCodeInstallations, detectWrongClaudeCodePackage, fixBrokenNpmSymlink, getClaudeCodeInstallationSource, getHomebrewClaudeCodeVersion, getInstalledVersion, getLatestVersion, getSourceDisplayName, handleDuplicateInstallations, shouldUpdate };
|
|
891
|
+
export { checkCcrVersion, checkClaudeCodeVersion, checkClaudeCodeVersionAndPrompt, checkCometixLineVersion, checkDuplicateInstallations, checkMyclaudeVersion, compareVersions, detectAllClaudeCodeInstallations, detectWrongClaudeCodePackage, fixBrokenNpmSymlink, getClaudeCodeInstallationSource, getHomebrewClaudeCodeVersion, getInstalledVersion, getLatestVersion, getSourceDisplayName, handleDuplicateInstallations, shouldUpdate };
|
package/dist/cli.mjs
CHANGED
|
@@ -461,6 +461,38 @@ const COMMANDS = [
|
|
|
461
461
|
};
|
|
462
462
|
}
|
|
463
463
|
},
|
|
464
|
+
{
|
|
465
|
+
name: "research <action> [...args]",
|
|
466
|
+
description: "Run persisted research experiments with explicit metric comparison",
|
|
467
|
+
tier: "extended",
|
|
468
|
+
options: [
|
|
469
|
+
{ flags: "--name <name>", description: "Experiment name" },
|
|
470
|
+
{ flags: "--cmd <command>", description: "Shell command to execute" },
|
|
471
|
+
{ flags: "--metric <name>", description: "Metric name to parse from output" },
|
|
472
|
+
{ flags: "--objective <mode>", description: "Metric objective (auto|maximize|minimize)" },
|
|
473
|
+
{ flags: "--baseline <sessionId>", description: "Baseline session id to compare against" },
|
|
474
|
+
{ flags: "--budget-ms <ms>", description: "Execution budget in milliseconds" },
|
|
475
|
+
{ flags: "--cwd <path>", description: "Working directory for the command" },
|
|
476
|
+
{ flags: "--limit <n>", description: "Number of sessions to list" }
|
|
477
|
+
],
|
|
478
|
+
loader: async () => {
|
|
479
|
+
return async (options, action, args) => {
|
|
480
|
+
const actionStr = action;
|
|
481
|
+
const argsArr = args;
|
|
482
|
+
const { researchCommand } = await import('./chunks/research.mjs');
|
|
483
|
+
await researchCommand(actionStr || "help", argsArr, {
|
|
484
|
+
name: options.name,
|
|
485
|
+
cmd: options.cmd,
|
|
486
|
+
metric: options.metric,
|
|
487
|
+
objective: options.objective,
|
|
488
|
+
baseline: options.baseline,
|
|
489
|
+
budgetMs: options.budgetMs ? Number(options.budgetMs) : void 0,
|
|
490
|
+
cwd: options.cwd,
|
|
491
|
+
limit: options.limit ? Number(options.limit) : void 0
|
|
492
|
+
});
|
|
493
|
+
};
|
|
494
|
+
}
|
|
495
|
+
},
|
|
464
496
|
// ==================== New v8.0.0 Commands ====================
|
|
465
497
|
// Note: task, keybinding, and history commands use Commander.js subcommand pattern
|
|
466
498
|
// They are registered via registerSpecialCommands() instead of lazy loading
|
|
@@ -137,7 +137,6 @@
|
|
|
137
137
|
"commands.ccjkSetup.args.rollbackOnError": "Auto-rollback on failure",
|
|
138
138
|
"commands.ccjkSetup.args.lang": "Display language",
|
|
139
139
|
"commandDiscovery.title": "🧠 CCJK Commands (ccjk 命令)",
|
|
140
|
-
"commandDiscovery.claudeCodeTitle": "🤖 Claude Code Commands",
|
|
141
140
|
"commandDiscovery.status": "Brain Dashboard",
|
|
142
141
|
"commandDiscovery.health": "Health Check",
|
|
143
142
|
"commandDiscovery.search": "Search Contexts",
|
|
@@ -145,8 +144,5 @@
|
|
|
145
144
|
"commandDiscovery.tasks": "Task Manager",
|
|
146
145
|
"commandDiscovery.backup": "Create Backup",
|
|
147
146
|
"commandDiscovery.optimize": "Optimize DB",
|
|
148
|
-
"commandDiscovery.help": "Show all commands",
|
|
149
|
-
"commandDiscovery.clear": "Clear conversation",
|
|
150
|
-
"commandDiscovery.reset": "Reset session",
|
|
151
147
|
"commandDiscovery.footer": "Type 'ccjk --help' for full command list"
|
|
152
148
|
}
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"updateDesc": "Update all components to latest version",
|
|
11
11
|
"updateComplete": "Update complete! All components are up to date.",
|
|
12
12
|
"notify": "Notifications",
|
|
13
|
-
"notifyDesc": "
|
|
13
|
+
"notifyDesc": "Configure task alerts, channels, and delivery methods",
|
|
14
14
|
"more": "More",
|
|
15
15
|
"running": "Running..."
|
|
16
16
|
},
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
"model": "Model Configuration",
|
|
92
92
|
"modelDesc": "Select and configure AI models",
|
|
93
93
|
"memory": "Memory Configuration",
|
|
94
|
-
"memoryDesc": "
|
|
94
|
+
"memoryDesc": "Manage project memory sync and AI response preferences",
|
|
95
95
|
"permission": "Permission Configuration",
|
|
96
96
|
"permissionDesc": "Manage tool and file permissions",
|
|
97
97
|
"configSwitch": "Config Switch",
|
|
@@ -189,7 +189,7 @@
|
|
|
189
189
|
"model": "Model Configuration",
|
|
190
190
|
"modelDesc": "Select and configure AI models",
|
|
191
191
|
"memory": "Memory Configuration",
|
|
192
|
-
"memoryDesc": "
|
|
192
|
+
"memoryDesc": "Manage project memory sync and AI response preferences",
|
|
193
193
|
"permission": "Permission Configuration",
|
|
194
194
|
"permissionDesc": "Manage tool and file permissions",
|
|
195
195
|
"configSwitch": "Config Switch",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"title": "Notification System",
|
|
3
|
-
"description": "Task completion notifications via
|
|
3
|
+
"description": "Task alerts and completion notifications via cloud and local delivery channels",
|
|
4
4
|
|
|
5
5
|
"status.enabled": "Enabled",
|
|
6
6
|
"status.disabled": "Disabled",
|
|
@@ -126,7 +126,7 @@
|
|
|
126
126
|
"errors.cloudError": "Cloud service error: {{error}}",
|
|
127
127
|
"errors.tokenInvalid": "Device token is invalid. Please regenerate.",
|
|
128
128
|
|
|
129
|
-
"menu.title": "📱
|
|
129
|
+
"menu.title": "📱 Task Alert Settings",
|
|
130
130
|
"menu.configure": "Configure Notifications",
|
|
131
131
|
"menu.viewStatus": "View Status",
|
|
132
132
|
"menu.testNotification": "Send Test",
|
|
@@ -137,7 +137,6 @@
|
|
|
137
137
|
"commands.ccjkSetup.args.rollbackOnError": "失败时自动回滚",
|
|
138
138
|
"commands.ccjkSetup.args.lang": "显示语言",
|
|
139
139
|
"commandDiscovery.title": "🧠 CCJK 命令 (ccjk 命令)",
|
|
140
|
-
"commandDiscovery.claudeCodeTitle": "🤖 Claude Code 命令",
|
|
141
140
|
"commandDiscovery.status": "大脑仪表盘",
|
|
142
141
|
"commandDiscovery.health": "健康检查",
|
|
143
142
|
"commandDiscovery.search": "搜索上下文",
|
|
@@ -145,8 +144,5 @@
|
|
|
145
144
|
"commandDiscovery.tasks": "任务管理",
|
|
146
145
|
"commandDiscovery.backup": "创建备份",
|
|
147
146
|
"commandDiscovery.optimize": "优化数据库",
|
|
148
|
-
"commandDiscovery.help": "显示所有命令",
|
|
149
|
-
"commandDiscovery.clear": "清除对话",
|
|
150
|
-
"commandDiscovery.reset": "重置会话",
|
|
151
147
|
"commandDiscovery.footer": "输入 'ccjk --help' 查看完整命令列表"
|
|
152
148
|
}
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"updateDesc": "更新所有组件到最新版本",
|
|
11
11
|
"updateComplete": "更新完成!所有组件已是最新版本。",
|
|
12
12
|
"notify": "通知中心",
|
|
13
|
-
"notifyDesc": "
|
|
13
|
+
"notifyDesc": "配置任务提醒、通知渠道与发送方式",
|
|
14
14
|
"more": "更多",
|
|
15
15
|
"running": "正在执行..."
|
|
16
16
|
},
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
"model": "模型配置",
|
|
92
92
|
"modelDesc": "选择和配置 AI 模型",
|
|
93
93
|
"memory": "记忆配置",
|
|
94
|
-
"memoryDesc": "
|
|
94
|
+
"memoryDesc": "管理项目记忆同步与 AI 回复偏好",
|
|
95
95
|
"permission": "权限配置",
|
|
96
96
|
"permissionDesc": "管理工具和文件权限",
|
|
97
97
|
"configSwitch": "配置切换",
|
|
@@ -189,7 +189,7 @@
|
|
|
189
189
|
"model": "模型配置",
|
|
190
190
|
"modelDesc": "选择和配置 AI 模型",
|
|
191
191
|
"memory": "记忆配置",
|
|
192
|
-
"memoryDesc": "
|
|
192
|
+
"memoryDesc": "管理项目记忆同步与 AI 回复偏好",
|
|
193
193
|
"permission": "权限配置",
|
|
194
194
|
"permissionDesc": "管理工具和文件权限",
|
|
195
195
|
"configSwitch": "配置切换",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"title": "通知系统",
|
|
3
|
-
"description": "
|
|
3
|
+
"description": "通过云端与本地渠道接收任务提醒和完成通知",
|
|
4
4
|
|
|
5
5
|
"status.enabled": "已启用",
|
|
6
6
|
"status.disabled": "已禁用",
|
|
@@ -126,7 +126,7 @@
|
|
|
126
126
|
"errors.cloudError": "云服务错误: {{error}}",
|
|
127
127
|
"errors.tokenInvalid": "设备令牌无效,请重新生成。",
|
|
128
128
|
|
|
129
|
-
"menu.title": "📱
|
|
129
|
+
"menu.title": "📱 任务提醒设置",
|
|
130
130
|
"menu.configure": "配置通知",
|
|
131
131
|
"menu.viewStatus": "查看状态",
|
|
132
132
|
"menu.testNotification": "发送测试",
|
package/dist/index.d.mts
CHANGED
|
@@ -5002,7 +5002,7 @@ declare function findRealCommandPath(command: string): Promise<string | null>;
|
|
|
5002
5002
|
* Get recommended install methods for a code tool based on current platform
|
|
5003
5003
|
* Returns methods in priority order (most recommended first)
|
|
5004
5004
|
*/
|
|
5005
|
-
type CodeType = 'claude-code' | 'codex';
|
|
5005
|
+
type CodeType = 'claude-code' | 'myclaude' | 'codex';
|
|
5006
5006
|
type InstallMethod = 'npm' | 'homebrew' | 'curl' | 'powershell' | 'cmd' | 'npm-global' | 'native';
|
|
5007
5007
|
declare function getRecommendedInstallMethods(codeType: CodeType): InstallMethod[];
|
|
5008
5008
|
|
package/dist/index.d.ts
CHANGED
|
@@ -5002,7 +5002,7 @@ declare function findRealCommandPath(command: string): Promise<string | null>;
|
|
|
5002
5002
|
* Get recommended install methods for a code tool based on current platform
|
|
5003
5003
|
* Returns methods in priority order (most recommended first)
|
|
5004
5004
|
*/
|
|
5005
|
-
type CodeType = 'claude-code' | 'codex';
|
|
5005
|
+
type CodeType = 'claude-code' | 'myclaude' | 'codex';
|
|
5006
5006
|
type InstallMethod = 'npm' | 'homebrew' | 'curl' | 'powershell' | 'cmd' | 'npm-global' | 'native';
|
|
5007
5007
|
declare function getRecommendedInstallMethods(codeType: CodeType): InstallMethod[];
|
|
5008
5008
|
|
package/dist/index.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import { CLOUD_ENDPOINTS } from './chunks/constants.mjs';
|
|
|
5
5
|
export { C as CloudError, a as CloudErrorCode, b as CloudErrorFactory, f as formatErrorForLogging, g as getRetryDelay, h as handleCloudError, i as isAuthError, c as isRateLimitError, d as isRetryableError, e as isRetryableErrorCode } from './shared/ccjk.vO3d1ABk.mjs';
|
|
6
6
|
import { e as extractString } from './shared/ccjk.C2jHOZVP.mjs';
|
|
7
7
|
export { a as extractDisplayName, i as i18nHelpers, n as normalizeRecommendation, b as normalizeRecommendations } from './shared/ccjk.C2jHOZVP.mjs';
|
|
8
|
-
import { exec, execSync
|
|
8
|
+
import { exec, execSync } from 'node:child_process';
|
|
9
9
|
import { promises, existsSync, readdirSync, readFileSync, statSync, createReadStream } from 'node:fs';
|
|
10
10
|
import * as os from 'node:os';
|
|
11
11
|
import { homedir } from 'node:os';
|
|
@@ -14,6 +14,7 @@ import { promisify } from 'node:util';
|
|
|
14
14
|
import a from './chunks/index5.mjs';
|
|
15
15
|
import { g as getRuntimeVersion } from './shared/ccjk.gDEDGD_t.mjs';
|
|
16
16
|
import { j as join$1 } from './shared/ccjk.bQ7Dh1g4.mjs';
|
|
17
|
+
import { b as buildCommand, c as commandExists, a as escapeArgument, e as executeCommand, d as executeCommandParallel, f as executeCommandSequence, g as executeCommandStream, h as getCommandPath, i as getCommandVersion, p as parseVersion } from './shared/ccjk.BnsY5WxD.mjs';
|
|
17
18
|
export { j as config } from './chunks/config.mjs';
|
|
18
19
|
export { a as loggerUtils } from './shared/ccjk.8oaxX4iR.mjs';
|
|
19
20
|
export { p as platform } from './chunks/platform.mjs';
|
|
@@ -1036,7 +1037,7 @@ const userSkillsApi = {
|
|
|
1036
1037
|
sortByLastUsed
|
|
1037
1038
|
};
|
|
1038
1039
|
|
|
1039
|
-
const execAsync
|
|
1040
|
+
const execAsync = promisify(exec);
|
|
1040
1041
|
class BaseCodeTool {
|
|
1041
1042
|
config;
|
|
1042
1043
|
configPath;
|
|
@@ -1061,7 +1062,7 @@ class BaseCodeTool {
|
|
|
1061
1062
|
async isInstalled() {
|
|
1062
1063
|
try {
|
|
1063
1064
|
const command = this.getInstallCheckCommand();
|
|
1064
|
-
const { stdout, stderr } = await execAsync
|
|
1065
|
+
const { stdout, stderr } = await execAsync(command);
|
|
1065
1066
|
const version = this.parseVersion(stdout || stderr);
|
|
1066
1067
|
return {
|
|
1067
1068
|
installed: true,
|
|
@@ -1081,7 +1082,7 @@ class BaseCodeTool {
|
|
|
1081
1082
|
async install() {
|
|
1082
1083
|
try {
|
|
1083
1084
|
const command = this.getInstallCommand();
|
|
1084
|
-
const { stdout, stderr } = await execAsync
|
|
1085
|
+
const { stdout, stderr } = await execAsync(command);
|
|
1085
1086
|
return {
|
|
1086
1087
|
success: true,
|
|
1087
1088
|
output: stdout || stderr,
|
|
@@ -1101,7 +1102,7 @@ class BaseCodeTool {
|
|
|
1101
1102
|
async uninstall() {
|
|
1102
1103
|
try {
|
|
1103
1104
|
const command = this.getUninstallCommand();
|
|
1104
|
-
const { stdout, stderr } = await execAsync
|
|
1105
|
+
const { stdout, stderr } = await execAsync(command);
|
|
1105
1106
|
await this.removeConfigFile();
|
|
1106
1107
|
return {
|
|
1107
1108
|
success: true,
|
|
@@ -1163,7 +1164,7 @@ class BaseCodeTool {
|
|
|
1163
1164
|
async execute(command, args = []) {
|
|
1164
1165
|
try {
|
|
1165
1166
|
const fullCommand = this.buildCommand(command, args);
|
|
1166
|
-
const { stdout, stderr } = await execAsync
|
|
1167
|
+
const { stdout, stderr } = await execAsync(fullCommand, {
|
|
1167
1168
|
env: { ...process.env, ...this.config.env }
|
|
1168
1169
|
});
|
|
1169
1170
|
return {
|
|
@@ -1258,7 +1259,7 @@ class BaseCodeTool {
|
|
|
1258
1259
|
*/
|
|
1259
1260
|
async findToolPath() {
|
|
1260
1261
|
try {
|
|
1261
|
-
const { stdout } = await execAsync
|
|
1262
|
+
const { stdout } = await execAsync(`which ${this.getMetadata().name}`);
|
|
1262
1263
|
return stdout.trim();
|
|
1263
1264
|
} catch (_error) {
|
|
1264
1265
|
return void 0;
|
|
@@ -2726,173 +2727,6 @@ function generateRecommendations(scanResult) {
|
|
|
2726
2727
|
return recommendations;
|
|
2727
2728
|
}
|
|
2728
2729
|
|
|
2729
|
-
const execAsync = promisify(exec);
|
|
2730
|
-
async function executeCommand(command, args = [], options = {}) {
|
|
2731
|
-
try {
|
|
2732
|
-
const fullCommand = buildCommand(command, args);
|
|
2733
|
-
const execOptions = {
|
|
2734
|
-
cwd: options.cwd,
|
|
2735
|
-
env: { ...process.env, ...options.env },
|
|
2736
|
-
timeout: options.timeout,
|
|
2737
|
-
shell: typeof options.shell === "string" ? options.shell : options.shell ? "/bin/sh" : void 0,
|
|
2738
|
-
encoding: options.encoding || "utf8",
|
|
2739
|
-
maxBuffer: options.maxBuffer || 1024 * 1024 * 10
|
|
2740
|
-
// 10MB default
|
|
2741
|
-
};
|
|
2742
|
-
const { stdout, stderr } = await execAsync(fullCommand, execOptions);
|
|
2743
|
-
return {
|
|
2744
|
-
success: true,
|
|
2745
|
-
stdout: stdout.toString().trim(),
|
|
2746
|
-
stderr: stderr.toString().trim(),
|
|
2747
|
-
exitCode: 0
|
|
2748
|
-
};
|
|
2749
|
-
} catch (error) {
|
|
2750
|
-
return {
|
|
2751
|
-
success: false,
|
|
2752
|
-
stdout: error.stdout?.toString().trim() || "",
|
|
2753
|
-
stderr: error.stderr?.toString().trim() || "",
|
|
2754
|
-
exitCode: error.code || 1,
|
|
2755
|
-
error: error.message
|
|
2756
|
-
};
|
|
2757
|
-
}
|
|
2758
|
-
}
|
|
2759
|
-
function executeCommandStream(command, args = [], options = {}) {
|
|
2760
|
-
return new Promise((resolve) => {
|
|
2761
|
-
const spawnOptions = {
|
|
2762
|
-
cwd: options.cwd,
|
|
2763
|
-
env: { ...process.env, ...options.env },
|
|
2764
|
-
shell: options.shell !== false
|
|
2765
|
-
};
|
|
2766
|
-
const child = spawn(command, args, spawnOptions);
|
|
2767
|
-
let stdout = "";
|
|
2768
|
-
let stderr = "";
|
|
2769
|
-
child.stdout?.on("data", (data) => {
|
|
2770
|
-
const text = data.toString();
|
|
2771
|
-
stdout += text;
|
|
2772
|
-
if (options.onStdout) {
|
|
2773
|
-
options.onStdout(text);
|
|
2774
|
-
}
|
|
2775
|
-
});
|
|
2776
|
-
child.stderr?.on("data", (data) => {
|
|
2777
|
-
const text = data.toString();
|
|
2778
|
-
stderr += text;
|
|
2779
|
-
if (options.onStderr) {
|
|
2780
|
-
options.onStderr(text);
|
|
2781
|
-
}
|
|
2782
|
-
});
|
|
2783
|
-
child.on("close", (code) => {
|
|
2784
|
-
resolve({
|
|
2785
|
-
success: code === 0,
|
|
2786
|
-
stdout: stdout.trim(),
|
|
2787
|
-
stderr: stderr.trim(),
|
|
2788
|
-
exitCode: code || 0,
|
|
2789
|
-
error: code !== 0 ? `Command exited with code ${code}` : void 0
|
|
2790
|
-
});
|
|
2791
|
-
});
|
|
2792
|
-
child.on("error", (error) => {
|
|
2793
|
-
resolve({
|
|
2794
|
-
success: false,
|
|
2795
|
-
stdout: stdout.trim(),
|
|
2796
|
-
stderr: stderr.trim(),
|
|
2797
|
-
exitCode: 1,
|
|
2798
|
-
error: error.message
|
|
2799
|
-
});
|
|
2800
|
-
});
|
|
2801
|
-
if (options.timeout) {
|
|
2802
|
-
setTimeout(() => {
|
|
2803
|
-
child.kill();
|
|
2804
|
-
resolve({
|
|
2805
|
-
success: false,
|
|
2806
|
-
stdout: stdout.trim(),
|
|
2807
|
-
stderr: stderr.trim(),
|
|
2808
|
-
exitCode: 1,
|
|
2809
|
-
error: `Command timed out after ${options.timeout}ms`
|
|
2810
|
-
});
|
|
2811
|
-
}, options.timeout);
|
|
2812
|
-
}
|
|
2813
|
-
});
|
|
2814
|
-
}
|
|
2815
|
-
function buildCommand(command, args) {
|
|
2816
|
-
const escapedArgs = args.map(escapeArgument);
|
|
2817
|
-
return [command, ...escapedArgs].join(" ");
|
|
2818
|
-
}
|
|
2819
|
-
function escapeArgument(arg) {
|
|
2820
|
-
if (/[\s"'`$&|;<>(){}[\]\\]/.test(arg)) {
|
|
2821
|
-
const escaped = arg.replace(/"/g, '\\"');
|
|
2822
|
-
return `"${escaped}"`;
|
|
2823
|
-
}
|
|
2824
|
-
return arg;
|
|
2825
|
-
}
|
|
2826
|
-
async function commandExists(command) {
|
|
2827
|
-
const isWindows = process.platform === "win32";
|
|
2828
|
-
const checkCommand = isWindows ? "where" : "which";
|
|
2829
|
-
try {
|
|
2830
|
-
const result = await executeCommand(checkCommand, [command]);
|
|
2831
|
-
return result.success;
|
|
2832
|
-
} catch {
|
|
2833
|
-
return false;
|
|
2834
|
-
}
|
|
2835
|
-
}
|
|
2836
|
-
async function getCommandPath(command) {
|
|
2837
|
-
const isWindows = process.platform === "win32";
|
|
2838
|
-
const checkCommand = isWindows ? "where" : "which";
|
|
2839
|
-
try {
|
|
2840
|
-
const result = await executeCommand(checkCommand, [command]);
|
|
2841
|
-
if (result.success) {
|
|
2842
|
-
return result.stdout.split("\n")[0].trim();
|
|
2843
|
-
}
|
|
2844
|
-
return null;
|
|
2845
|
-
} catch {
|
|
2846
|
-
return null;
|
|
2847
|
-
}
|
|
2848
|
-
}
|
|
2849
|
-
function parseVersion(output) {
|
|
2850
|
-
const patterns = [
|
|
2851
|
-
/version\s+v?(\d+\.\d+\.\d+)/i,
|
|
2852
|
-
/v?(\d+\.\d+\.\d+)/,
|
|
2853
|
-
/(\d+\.\d+\.\d+)/
|
|
2854
|
-
];
|
|
2855
|
-
for (const pattern of patterns) {
|
|
2856
|
-
const match = output.match(pattern);
|
|
2857
|
-
if (match) {
|
|
2858
|
-
return match[1];
|
|
2859
|
-
}
|
|
2860
|
-
}
|
|
2861
|
-
return null;
|
|
2862
|
-
}
|
|
2863
|
-
async function getCommandVersion(command, versionFlag = "--version") {
|
|
2864
|
-
try {
|
|
2865
|
-
const result = await executeCommand(command, [versionFlag]);
|
|
2866
|
-
if (result.success) {
|
|
2867
|
-
return parseVersion(result.stdout || result.stderr);
|
|
2868
|
-
}
|
|
2869
|
-
return null;
|
|
2870
|
-
} catch {
|
|
2871
|
-
return null;
|
|
2872
|
-
}
|
|
2873
|
-
}
|
|
2874
|
-
async function executeCommandSequence(commands) {
|
|
2875
|
-
const results = [];
|
|
2876
|
-
for (const cmd of commands) {
|
|
2877
|
-
const result = await executeCommand(
|
|
2878
|
-
cmd.command,
|
|
2879
|
-
cmd.args || [],
|
|
2880
|
-
cmd.options || {}
|
|
2881
|
-
);
|
|
2882
|
-
results.push(result);
|
|
2883
|
-
if (!result.success) {
|
|
2884
|
-
break;
|
|
2885
|
-
}
|
|
2886
|
-
}
|
|
2887
|
-
return results;
|
|
2888
|
-
}
|
|
2889
|
-
async function executeCommandParallel(commands) {
|
|
2890
|
-
const promises = commands.map(
|
|
2891
|
-
(cmd) => executeCommand(cmd.command, cmd.args || [], cmd.options || {})
|
|
2892
|
-
);
|
|
2893
|
-
return Promise.all(promises);
|
|
2894
|
-
}
|
|
2895
|
-
|
|
2896
2730
|
const index$4 = {
|
|
2897
2731
|
__proto__: null,
|
|
2898
2732
|
buildCommand: buildCommand,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import a from '../chunks/index5.mjs';
|
|
2
2
|
import { i as inquirer } from '../chunks/index6.mjs';
|
|
3
|
-
import { M as MCP_SERVICE_CONFIGS } from '
|
|
3
|
+
import { M as MCP_SERVICE_CONFIGS } from './ccjk.DKXs7Fbm.mjs';
|
|
4
4
|
import { i18n } from '../chunks/index2.mjs';
|
|
5
|
-
import { d as displayInstalledMcpServices, b as isMcpServiceInstalled, i as installMcpService, u as uninstallMcpService } from './ccjk.
|
|
5
|
+
import { d as displayInstalledMcpServices, b as isMcpServiceInstalled, i as installMcpService, u as uninstallMcpService } from './ccjk.DHaUdzX3.mjs';
|
|
6
6
|
import { existsSync, unlinkSync, statSync, mkdirSync, readFileSync } from 'node:fs';
|
|
7
7
|
import { homedir } from 'node:os';
|
|
8
8
|
import { writeFileAtomic } from '../chunks/fs-operations.mjs';
|