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.
- package/bin/ccjk.mjs +3 -2
- package/bin/ccjk.ts +104 -104
- package/dist/chunks/agent.mjs +2 -2
- package/dist/chunks/api-cli.mjs +2 -2
- package/dist/chunks/api-config-selector.mjs +5 -6
- package/dist/chunks/auto-updater.mjs +1 -1
- package/dist/chunks/brain-config.mjs +1 -1
- package/dist/chunks/brain-status.mjs +13 -7
- package/dist/chunks/ccjk-all.mjs +3 -3
- package/dist/chunks/ccjk-mcp.mjs +2 -2
- package/dist/chunks/ccjk-setup.mjs +1 -1
- package/dist/chunks/ccjk-skills.mjs +1 -1
- package/dist/chunks/ccr.mjs +11 -12
- package/dist/chunks/check-updates.mjs +1 -2
- package/dist/chunks/claude-code-incremental-manager.mjs +9 -9
- package/dist/chunks/claude-config.mjs +2 -2
- package/dist/chunks/code-type-resolver.mjs +2 -4
- package/dist/chunks/codex-config-switch.mjs +3 -4
- package/dist/chunks/codex-provider-manager.mjs +1 -2
- package/dist/chunks/codex.mjs +2 -33
- package/dist/chunks/config-switch.mjs +8 -5
- package/dist/chunks/config.mjs +382 -19
- package/dist/chunks/config2.mjs +3 -3
- package/dist/chunks/config3.mjs +1 -1
- package/dist/chunks/context.mjs +2 -2
- package/dist/chunks/doctor.mjs +4 -5
- package/dist/chunks/evolution.mjs +10 -6
- package/dist/chunks/features.mjs +13 -14
- package/dist/chunks/index10.mjs +4 -4
- package/dist/chunks/init.mjs +556 -557
- package/dist/chunks/installer.mjs +2 -2
- package/dist/chunks/mcp-cli.mjs +6 -7
- package/dist/chunks/mcp.mjs +6 -7
- package/dist/chunks/memory-check.mjs +2 -2
- package/dist/chunks/memory-paths.mjs +1 -1
- package/dist/chunks/memory-sync.mjs +2 -2
- package/dist/chunks/memory.mjs +7 -7
- package/dist/chunks/notification.mjs +1 -1
- package/dist/chunks/package.mjs +1 -1
- package/dist/chunks/quick-provider.mjs +37 -7
- package/dist/chunks/quick-setup.mjs +6 -7
- package/dist/chunks/remote.mjs +1 -1
- package/dist/chunks/research.mjs +118 -118
- package/dist/chunks/simple-config.mjs +4 -4
- package/dist/chunks/skill2.mjs +129 -80
- package/dist/chunks/skills-sync.mjs +1 -1
- package/dist/chunks/slash-commands.mjs +1 -1
- package/dist/chunks/uninstall.mjs +1 -1
- package/dist/chunks/update.mjs +10 -11
- package/dist/chunks/zero-config.mjs +8 -9
- package/dist/cli.mjs +1 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.mjs +7 -7
- package/dist/shared/{ccjk.QNhw2Y_5.mjs → ccjk.B9OuS4xZ.mjs} +3 -3
- package/dist/shared/{ccjk.DqlzNDEQ.mjs → ccjk.BEiR3L4C.mjs} +2 -3
- package/dist/shared/{ccjk.4iw1XCF3.mjs → ccjk.BJ3Zpjo5.mjs} +1 -1
- package/dist/shared/{ccjk.Nwf9bR70.mjs → ccjk.BzxpiEPF.mjs} +2 -2
- package/dist/shared/{ccjk.BI-hdI7P.mjs → ccjk.CbWVbtb9.mjs} +1 -1
- package/dist/shared/{ccjk.UhjQ1seV.mjs → ccjk.DMV3x5Sd.mjs} +1 -1
- package/dist/shared/{ccjk.DQXk596F.mjs → ccjk.DuzJZlgj.mjs} +107 -103
- package/dist/shared/{ccjk.DTdjs-qK.mjs → ccjk.MwtjAULc.mjs} +1 -1
- package/dist/shared/{ccjk.DsYaCCx4.mjs → ccjk.i_vn-9C3.mjs} +2 -2
- package/dist/shared/{ccjk.kAZkKbGW.mjs → ccjk.tI_s2uSh.mjs} +2 -3
- package/package.json +5 -5
- package/dist/shared/ccjk.DKXs7Fbm.mjs +0 -361
- package/dist/shared/{ccjk.BBizCO6_.mjs → ccjk.DcMvE7lf.mjs} +1 -1
- package/dist/shared/{ccjk.Dhu8ia5S.mjs → ccjk.zFGcZT7Y.mjs} +1 -1
|
@@ -1,12 +1,12 @@
|
|
|
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 '../chunks/config.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.tI_s2uSh.mjs';
|
|
6
6
|
import { existsSync, unlinkSync, statSync, mkdirSync, readFileSync } from 'node:fs';
|
|
7
7
|
import { homedir } from 'node:os';
|
|
8
|
-
import { writeFileAtomic } from '../chunks/fs-operations.mjs';
|
|
9
8
|
import { CLOUD_ENDPOINTS } from '../chunks/constants.mjs';
|
|
9
|
+
import { writeFileAtomic } from '../chunks/fs-operations.mjs';
|
|
10
10
|
import { j as join } from './ccjk.bQ7Dh1g4.mjs';
|
|
11
11
|
|
|
12
12
|
const DEFAULT_API_URL = `${CLOUD_ENDPOINTS.MAIN.BASE_URL}${CLOUD_ENDPOINTS.MAIN.API_VERSION}/skills`;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { existsSync, readdirSync } from 'node:fs';
|
|
2
|
-
import { M as MCP_SERVICE_CONFIGS } from '
|
|
2
|
+
import { r as readMcpConfig, f as fixWindowsMcpConfig, m as mergeMcpServers, w as writeMcpConfig, q as syncMcpPermissions, M as MCP_SERVICE_CONFIGS, h as buildMcpServerConfig } from '../chunks/config.mjs';
|
|
3
3
|
import { s as selectAndInstallWorkflows, W as WORKFLOW_CONFIG_BASE } from './ccjk.B8oqkakg.mjs';
|
|
4
4
|
import { i as isCcrInstalled, a as installCcr } from './ccjk.DFRPtmK_.mjs';
|
|
5
|
-
import { r as readMcpConfig, f as fixWindowsMcpConfig, m as mergeMcpServers, w as writeMcpConfig, o as syncMcpPermissions, e as buildMcpServerConfig } from '../chunks/config.mjs';
|
|
6
5
|
import { readJsonConfig } from '../chunks/json-config.mjs';
|
|
7
|
-
import { a as copyOutputStyles, s as setGlobalDefaultOutputStyle, g as getAvailableOutputStyles } from './ccjk.
|
|
6
|
+
import { a as copyOutputStyles, s as setGlobalDefaultOutputStyle, g as getAvailableOutputStyles } from './ccjk.BJ3Zpjo5.mjs';
|
|
8
7
|
import { c as commandExists } from '../chunks/platform.mjs';
|
|
9
8
|
import { r as resolveClaudeFamilySettingsTarget } from './ccjk.Di1IYU3u.mjs';
|
|
10
9
|
import { j as join } from './ccjk.bQ7Dh1g4.mjs';
|
|
@@ -6,7 +6,7 @@ import { updateZcfConfig } from '../chunks/ccjk-config.mjs';
|
|
|
6
6
|
import { r as resolveClaudeFamilySettingsTarget, n as normalizeClaudeFamilySettings } from './ccjk.Di1IYU3u.mjs';
|
|
7
7
|
import { exists, removeFile, ensureDir, copyFile } from '../chunks/fs-operations.mjs';
|
|
8
8
|
import { readJsonConfig, writeJsonConfig } from '../chunks/json-config.mjs';
|
|
9
|
-
import {
|
|
9
|
+
import { o as mergeAndCleanPermissions } from '../chunks/config.mjs';
|
|
10
10
|
import { a as addNumbersToChoices } from './ccjk.BFQ7yr5S.mjs';
|
|
11
11
|
import { p as promptBoolean } from './ccjk.DZ2LLOa-.mjs';
|
|
12
12
|
import { j as join, d as dirname } from './ccjk.bQ7Dh1g4.mjs';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import a from '../chunks/index5.mjs';
|
|
2
2
|
import { i as inquirer } from '../chunks/index6.mjs';
|
|
3
3
|
import { ensureI18nInitialized, i18n } from '../chunks/index2.mjs';
|
|
4
|
-
import {
|
|
5
|
-
import { c as configureOutputStyle } from './ccjk.
|
|
4
|
+
import { i as getExistingApiConfig, j as configureApi, B as switchToOfficialLogin, b as backupExistingConfig, D as applyAiLanguageDirective } from '../chunks/config.mjs';
|
|
5
|
+
import { c as configureOutputStyle } from './ccjk.BJ3Zpjo5.mjs';
|
|
6
6
|
import { a as addNumbersToChoices } from './ccjk.BFQ7yr5S.mjs';
|
|
7
7
|
import { r as resolveClaudeFamilySettingsTarget } from './ccjk.Di1IYU3u.mjs';
|
|
8
8
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import a from '../chunks/index5.mjs';
|
|
2
2
|
import { i as inquirer } from '../chunks/index6.mjs';
|
|
3
|
-
import { g as getMcpServices, M as MCP_SERVICE_CONFIGS } from '
|
|
3
|
+
import { g as getMcpServices, M as MCP_SERVICE_CONFIGS } from '../chunks/config.mjs';
|
|
4
4
|
import { ensureI18nInitialized, i18n } from '../chunks/index2.mjs';
|
|
5
5
|
|
|
6
6
|
async function selectMcpServices() {
|
|
@@ -3,6 +3,105 @@ import { appendFile, readFile } from 'node:fs/promises';
|
|
|
3
3
|
import { homedir } from 'node:os';
|
|
4
4
|
import { j as join } from './ccjk.bQ7Dh1g4.mjs';
|
|
5
5
|
|
|
6
|
+
function decideCapability(context) {
|
|
7
|
+
const { input, conversationTurns, hasUncommittedChanges, recentFailures } = context;
|
|
8
|
+
const lower = input.toLowerCase();
|
|
9
|
+
if (lower.includes("\u89E3\u91CA") || lower.includes("\u4EC0\u4E48\u662F") || lower.includes("\u4E3A\u4EC0\u4E48") || lower.includes("\u5982\u4F55\u7406\u89E3")) {
|
|
10
|
+
return {
|
|
11
|
+
level: 0,
|
|
12
|
+
reasoning: "\u7EAF\u6587\u672C\u63A8\u7406\u4EFB\u52A1",
|
|
13
|
+
expectedSteps: 1,
|
|
14
|
+
expectedDuration: 5,
|
|
15
|
+
complexity: 1
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
if (lower.startsWith("/") || lower.includes("commit") || lower.includes("review")) {
|
|
19
|
+
return {
|
|
20
|
+
level: 1,
|
|
21
|
+
reasoning: "Skill\u5FEB\u6377\u6307\u4EE4",
|
|
22
|
+
expectedSteps: 1,
|
|
23
|
+
expectedDuration: 10,
|
|
24
|
+
complexity: 2
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
if ((lower.includes("\u4FEE\u6539") || lower.includes("fix") || lower.includes("\u66F4\u65B0")) && !lower.includes("\u6240\u6709") && !lower.includes("\u6279\u91CF")) {
|
|
28
|
+
return {
|
|
29
|
+
level: 2,
|
|
30
|
+
reasoning: "\u5355\u6587\u4EF6\u4FEE\u6539",
|
|
31
|
+
expectedSteps: 3,
|
|
32
|
+
expectedDuration: 20,
|
|
33
|
+
complexity: 3
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
if (lower.includes("\u91CD\u6784") || lower.includes("\u6279\u91CF") || lower.includes("\u6240\u6709") || lower.includes("\u6DFB\u52A0") && lower.includes("\u529F\u80FD")) {
|
|
37
|
+
return {
|
|
38
|
+
level: 3,
|
|
39
|
+
reasoning: "\u591A\u6587\u4EF6\u534F\u8C03\u64CD\u4F5C",
|
|
40
|
+
expectedSteps: 8,
|
|
41
|
+
expectedDuration: 60,
|
|
42
|
+
complexity: 6
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
if (lower.includes("\u5206\u6790\u6574\u4E2A") || lower.includes("\u5168\u5C40") || lower.includes("\u67B6\u6784") || lower.includes("\u8FC1\u79FB")) {
|
|
46
|
+
return {
|
|
47
|
+
level: 4,
|
|
48
|
+
reasoning: "\u590D\u6742\u4EFB\u52A1\uFF0C\u5EFA\u8BAEsubagent",
|
|
49
|
+
expectedSteps: 15,
|
|
50
|
+
expectedDuration: 180,
|
|
51
|
+
complexity: 8
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
if (lower.includes("\u5B8C\u5168\u91CD\u5199") || lower.includes("\u4ECE\u96F6\u5F00\u59CB") || lower.includes("\u5927\u89C4\u6A21")) {
|
|
55
|
+
return {
|
|
56
|
+
level: 5,
|
|
57
|
+
reasoning: "\u6781\u590D\u6742\u4EFB\u52A1\uFF0C\u5FC5\u987Bsubagent",
|
|
58
|
+
expectedSteps: 30,
|
|
59
|
+
expectedDuration: 600,
|
|
60
|
+
complexity: 10
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
const complexity = Math.min(
|
|
64
|
+
10,
|
|
65
|
+
3 + conversationTurns * 0.5 + recentFailures * 2 + (hasUncommittedChanges ? 1 : 0)
|
|
66
|
+
);
|
|
67
|
+
if (complexity >= 8) {
|
|
68
|
+
return {
|
|
69
|
+
level: 4,
|
|
70
|
+
reasoning: "\u4E0A\u4E0B\u6587\u590D\u6742\u5EA6\u9AD8",
|
|
71
|
+
expectedSteps: 12,
|
|
72
|
+
expectedDuration: 120,
|
|
73
|
+
complexity: Math.round(complexity)
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
if (complexity >= 5) {
|
|
77
|
+
return {
|
|
78
|
+
level: 3,
|
|
79
|
+
reasoning: "\u4E2D\u7B49\u590D\u6742\u5EA6\u4EFB\u52A1",
|
|
80
|
+
expectedSteps: 6,
|
|
81
|
+
expectedDuration: 45,
|
|
82
|
+
complexity: Math.round(complexity)
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
return {
|
|
86
|
+
level: 2,
|
|
87
|
+
reasoning: "\u6807\u51C6\u64CD\u4F5C",
|
|
88
|
+
expectedSteps: 3,
|
|
89
|
+
expectedDuration: 20,
|
|
90
|
+
complexity: Math.round(complexity)
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
function getCapabilityName(level) {
|
|
94
|
+
const names = {
|
|
95
|
+
0: "\u7EAF\u6587\u672C\u63A8\u7406",
|
|
96
|
+
1: "Skill\u6267\u884C",
|
|
97
|
+
2: "\u5355\u6587\u4EF6\u64CD\u4F5C",
|
|
98
|
+
3: "\u591A\u6587\u4EF6\u534F\u8C03",
|
|
99
|
+
4: "\u590D\u6742\u4EFB\u52A1",
|
|
100
|
+
5: "\u6781\u590D\u6742\u4EFB\u52A1"
|
|
101
|
+
};
|
|
102
|
+
return names[level];
|
|
103
|
+
}
|
|
104
|
+
|
|
6
105
|
class BrainTelemetry {
|
|
7
106
|
logPath;
|
|
8
107
|
constructor(logPath) {
|
|
@@ -80,7 +179,8 @@ class BrainTelemetry {
|
|
|
80
179
|
const date = log.timestamp.split("T")[0];
|
|
81
180
|
const stats = dailyStats.get(date) ?? { count: 0, success: 0 };
|
|
82
181
|
stats.count++;
|
|
83
|
-
if (log.success)
|
|
182
|
+
if (log.success)
|
|
183
|
+
stats.success++;
|
|
84
184
|
dailyStats.set(date, stats);
|
|
85
185
|
}
|
|
86
186
|
const recentTrend = Array.from(dailyStats.entries()).map(([date, stats]) => ({
|
|
@@ -151,105 +251,6 @@ function getTelemetry() {
|
|
|
151
251
|
return globalTelemetry;
|
|
152
252
|
}
|
|
153
253
|
|
|
154
|
-
function decideCapability(context) {
|
|
155
|
-
const { input, conversationTurns, hasUncommittedChanges, recentFailures } = context;
|
|
156
|
-
const lower = input.toLowerCase();
|
|
157
|
-
if (lower.includes("\u89E3\u91CA") || lower.includes("\u4EC0\u4E48\u662F") || lower.includes("\u4E3A\u4EC0\u4E48") || lower.includes("\u5982\u4F55\u7406\u89E3")) {
|
|
158
|
-
return {
|
|
159
|
-
level: 0,
|
|
160
|
-
reasoning: "\u7EAF\u6587\u672C\u63A8\u7406\u4EFB\u52A1",
|
|
161
|
-
expectedSteps: 1,
|
|
162
|
-
expectedDuration: 5,
|
|
163
|
-
complexity: 1
|
|
164
|
-
};
|
|
165
|
-
}
|
|
166
|
-
if (lower.startsWith("/") || lower.includes("commit") || lower.includes("review")) {
|
|
167
|
-
return {
|
|
168
|
-
level: 1,
|
|
169
|
-
reasoning: "Skill\u5FEB\u6377\u6307\u4EE4",
|
|
170
|
-
expectedSteps: 1,
|
|
171
|
-
expectedDuration: 10,
|
|
172
|
-
complexity: 2
|
|
173
|
-
};
|
|
174
|
-
}
|
|
175
|
-
if ((lower.includes("\u4FEE\u6539") || lower.includes("fix") || lower.includes("\u66F4\u65B0")) && !lower.includes("\u6240\u6709") && !lower.includes("\u6279\u91CF")) {
|
|
176
|
-
return {
|
|
177
|
-
level: 2,
|
|
178
|
-
reasoning: "\u5355\u6587\u4EF6\u4FEE\u6539",
|
|
179
|
-
expectedSteps: 3,
|
|
180
|
-
expectedDuration: 20,
|
|
181
|
-
complexity: 3
|
|
182
|
-
};
|
|
183
|
-
}
|
|
184
|
-
if (lower.includes("\u91CD\u6784") || lower.includes("\u6279\u91CF") || lower.includes("\u6240\u6709") || lower.includes("\u6DFB\u52A0") && lower.includes("\u529F\u80FD")) {
|
|
185
|
-
return {
|
|
186
|
-
level: 3,
|
|
187
|
-
reasoning: "\u591A\u6587\u4EF6\u534F\u8C03\u64CD\u4F5C",
|
|
188
|
-
expectedSteps: 8,
|
|
189
|
-
expectedDuration: 60,
|
|
190
|
-
complexity: 6
|
|
191
|
-
};
|
|
192
|
-
}
|
|
193
|
-
if (lower.includes("\u5206\u6790\u6574\u4E2A") || lower.includes("\u5168\u5C40") || lower.includes("\u67B6\u6784") || lower.includes("\u8FC1\u79FB")) {
|
|
194
|
-
return {
|
|
195
|
-
level: 4,
|
|
196
|
-
reasoning: "\u590D\u6742\u4EFB\u52A1\uFF0C\u5EFA\u8BAEsubagent",
|
|
197
|
-
expectedSteps: 15,
|
|
198
|
-
expectedDuration: 180,
|
|
199
|
-
complexity: 8
|
|
200
|
-
};
|
|
201
|
-
}
|
|
202
|
-
if (lower.includes("\u5B8C\u5168\u91CD\u5199") || lower.includes("\u4ECE\u96F6\u5F00\u59CB") || lower.includes("\u5927\u89C4\u6A21")) {
|
|
203
|
-
return {
|
|
204
|
-
level: 5,
|
|
205
|
-
reasoning: "\u6781\u590D\u6742\u4EFB\u52A1\uFF0C\u5FC5\u987Bsubagent",
|
|
206
|
-
expectedSteps: 30,
|
|
207
|
-
expectedDuration: 600,
|
|
208
|
-
complexity: 10
|
|
209
|
-
};
|
|
210
|
-
}
|
|
211
|
-
const complexity = Math.min(
|
|
212
|
-
10,
|
|
213
|
-
3 + conversationTurns * 0.5 + recentFailures * 2 + (hasUncommittedChanges ? 1 : 0)
|
|
214
|
-
);
|
|
215
|
-
if (complexity >= 8) {
|
|
216
|
-
return {
|
|
217
|
-
level: 4,
|
|
218
|
-
reasoning: "\u4E0A\u4E0B\u6587\u590D\u6742\u5EA6\u9AD8",
|
|
219
|
-
expectedSteps: 12,
|
|
220
|
-
expectedDuration: 120,
|
|
221
|
-
complexity: Math.round(complexity)
|
|
222
|
-
};
|
|
223
|
-
}
|
|
224
|
-
if (complexity >= 5) {
|
|
225
|
-
return {
|
|
226
|
-
level: 3,
|
|
227
|
-
reasoning: "\u4E2D\u7B49\u590D\u6742\u5EA6\u4EFB\u52A1",
|
|
228
|
-
expectedSteps: 6,
|
|
229
|
-
expectedDuration: 45,
|
|
230
|
-
complexity: Math.round(complexity)
|
|
231
|
-
};
|
|
232
|
-
}
|
|
233
|
-
return {
|
|
234
|
-
level: 2,
|
|
235
|
-
reasoning: "\u6807\u51C6\u64CD\u4F5C",
|
|
236
|
-
expectedSteps: 3,
|
|
237
|
-
expectedDuration: 20,
|
|
238
|
-
complexity: Math.round(complexity)
|
|
239
|
-
};
|
|
240
|
-
}
|
|
241
|
-
function getCapabilityName(level) {
|
|
242
|
-
const names = {
|
|
243
|
-
0: "\u7EAF\u6587\u672C\u63A8\u7406",
|
|
244
|
-
1: "Skill\u6267\u884C",
|
|
245
|
-
2: "\u5355\u6587\u4EF6\u64CD\u4F5C",
|
|
246
|
-
3: "\u591A\u6587\u4EF6\u534F\u8C03",
|
|
247
|
-
4: "\u590D\u6742\u4EFB\u52A1",
|
|
248
|
-
5: "\u6781\u590D\u6742\u4EFB\u52A1"
|
|
249
|
-
};
|
|
250
|
-
return names[level];
|
|
251
|
-
}
|
|
252
|
-
|
|
253
254
|
class SmartRouter {
|
|
254
255
|
config;
|
|
255
256
|
recentFailures = 0;
|
|
@@ -321,8 +322,10 @@ class SmartRouter {
|
|
|
321
322
|
* 判断是否应该执行
|
|
322
323
|
*/
|
|
323
324
|
shouldExecute(decision) {
|
|
324
|
-
if (decision.level <= 1)
|
|
325
|
-
|
|
325
|
+
if (decision.level <= 1)
|
|
326
|
+
return true;
|
|
327
|
+
if (decision.level === 2)
|
|
328
|
+
return true;
|
|
326
329
|
if (decision.level === 3) {
|
|
327
330
|
return decision.complexity >= this.config.autoSubagentThreshold;
|
|
328
331
|
}
|
|
@@ -353,7 +356,8 @@ class SmartRouter {
|
|
|
353
356
|
* 记录任务执行结果
|
|
354
357
|
*/
|
|
355
358
|
async recordExecution(decision, result) {
|
|
356
|
-
if (!this.config.enableTelemetry)
|
|
359
|
+
if (!this.config.enableTelemetry)
|
|
360
|
+
return;
|
|
357
361
|
const telemetry = getTelemetry();
|
|
358
362
|
const log = {
|
|
359
363
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
@@ -5,7 +5,7 @@ import { CCJK_PLUGINS_DIR, CCJK_SKILLS_DIR, CLAUDE_AGENTS_DIR, CCJK_CONFIG_DIR }
|
|
|
5
5
|
import { w as writeAgentFile, g as getAgentsDir } from './ccjk.CfKKcvWy.mjs';
|
|
6
6
|
import { j as join, d as dirname } from './ccjk.bQ7Dh1g4.mjs';
|
|
7
7
|
import { spawn } from 'node:child_process';
|
|
8
|
-
import { g as getSkillParser } from './ccjk.
|
|
8
|
+
import { g as getSkillParser } from './ccjk.i_vn-9C3.mjs';
|
|
9
9
|
|
|
10
10
|
const DEFAULT_MIN_CONFIDENCE = 0.6;
|
|
11
11
|
const PATTERN_WEIGHT = 0.4;
|
|
@@ -186,7 +186,7 @@ class SkillParser {
|
|
|
186
186
|
*/
|
|
187
187
|
extractRules(content, basePath) {
|
|
188
188
|
const rules = [];
|
|
189
|
-
const rulePattern =
|
|
189
|
+
const rulePattern = /##?\s*(?:`([a-z]+-\d+)`|(\w+-\d+))[:\s]*(.+?)(?=\n##?|\n##|$)/gs;
|
|
190
190
|
let match;
|
|
191
191
|
while ((match = rulePattern.exec(content)) !== null) {
|
|
192
192
|
const id = match[1] || match[2];
|
|
@@ -233,7 +233,7 @@ class SkillParser {
|
|
|
233
233
|
*/
|
|
234
234
|
extractExamples(content) {
|
|
235
235
|
const examples = [];
|
|
236
|
-
const examplePattern =
|
|
236
|
+
const examplePattern = /##?\s*(?:Example|示例|案例)[:\s]*(.+?)(?=\n##?|\n##|$)/gis;
|
|
237
237
|
let match;
|
|
238
238
|
while ((match = examplePattern.exec(content)) !== null) {
|
|
239
239
|
const exampleContent = match[1];
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import a from '../chunks/index5.mjs';
|
|
2
2
|
import { i as inquirer } from '../chunks/index6.mjs';
|
|
3
|
-
import {
|
|
3
|
+
import { t as getMcpService, v as dynamicMcpRegistry, r as readMcpConfig, h as buildMcpServerConfig, w as writeMcpConfig, M as MCP_SERVICE_CONFIGS } from '../chunks/config.mjs';
|
|
4
4
|
import { CLAVUE_CONFIG_FILE, CLAVUE_SETTINGS_FILE, ClAUDE_CONFIG_FILE, CODEX_CONFIG_FILE } from '../chunks/constants.mjs';
|
|
5
5
|
import { ensureI18nInitialized, i18n } from '../chunks/index2.mjs';
|
|
6
|
-
import { r as
|
|
7
|
-
import { r as readCodexConfig, d as applyCodexPlatformCommand, w as writeCodexConfig } from '../chunks/codex.mjs';
|
|
6
|
+
import { r as readCodexConfig, c as applyCodexPlatformCommand, w as writeCodexConfig } from '../chunks/codex.mjs';
|
|
8
7
|
import { exists } from '../chunks/fs-operations.mjs';
|
|
9
8
|
import { i as isWindows, k as getSystemRoot } from '../chunks/platform.mjs';
|
|
10
9
|
import { r as resolveClaudeFamilySettingsTarget } from './ccjk.Di1IYU3u.mjs';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ccjk",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "14.1.
|
|
4
|
+
"version": "14.1.8",
|
|
5
5
|
"packageManager": "pnpm@10.17.1",
|
|
6
6
|
"description": "Production-ready AI dev environment for Claude Code, Codex, and modern coding workflows with 30-second onboarding, persistent memory, Agent Teams, remote control, and capability discovery.",
|
|
7
7
|
"author": {
|
|
@@ -122,13 +122,13 @@
|
|
|
122
122
|
"contract:check": "node scripts/check-remote-contract.mjs"
|
|
123
123
|
},
|
|
124
124
|
"dependencies": {
|
|
125
|
-
"better-sqlite3": "^12.
|
|
125
|
+
"better-sqlite3": "^12.9.0",
|
|
126
126
|
"fdir": "^6.5.0",
|
|
127
127
|
"globby": "^14.1.0",
|
|
128
128
|
"ioredis": "^5.9.3",
|
|
129
129
|
"node-cron": "^4.2.1",
|
|
130
|
-
"sql.js": "^1.14.
|
|
131
|
-
"tar": "^7.5.
|
|
130
|
+
"sql.js": "^1.14.1",
|
|
131
|
+
"tar": "^7.5.13",
|
|
132
132
|
"tinyglobby": "^0.2.15",
|
|
133
133
|
"web-tree-sitter": "^0.26.5"
|
|
134
134
|
},
|
|
@@ -157,7 +157,7 @@
|
|
|
157
157
|
"find-up-simple": "^1.0.1",
|
|
158
158
|
"fs-extra": "^11.3.3",
|
|
159
159
|
"gray-matter": "^4.0.3",
|
|
160
|
-
"handlebars": "^4.7.
|
|
160
|
+
"handlebars": "^4.7.9",
|
|
161
161
|
"husky": "^9.1.7",
|
|
162
162
|
"i18next": "^25.8.13",
|
|
163
163
|
"i18next-fs-backend": "^2.6.1",
|