ccjk 12.0.6 → 12.0.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/README.md +14 -0
- package/README.zh-CN.md +13 -0
- package/dist/chunks/api-cli.mjs +1 -1
- package/dist/chunks/ccjk-agents.mjs +3 -2
- package/dist/chunks/ccjk-all.mjs +129 -1764
- package/dist/chunks/ccjk-hooks.mjs +5 -4
- package/dist/chunks/ccjk-mcp.mjs +7 -6
- package/dist/chunks/ccjk-setup.mjs +3 -2
- package/dist/chunks/ccjk-skills.mjs +6 -5
- package/dist/chunks/ccr.mjs +6 -5
- package/dist/chunks/check-updates.mjs +8 -8
- package/dist/chunks/claude-code-config-manager.mjs +1 -1
- package/dist/chunks/claude-code-incremental-manager.mjs +2 -2
- package/dist/chunks/codex-config-switch.mjs +1 -1
- package/dist/chunks/codex-provider-manager.mjs +1 -1
- package/dist/chunks/config-switch.mjs +1 -1
- package/dist/chunks/config.mjs +1 -1
- package/dist/chunks/config2.mjs +1 -1
- package/dist/chunks/config3.mjs +1 -1
- package/dist/chunks/constants.mjs +33 -2
- package/dist/chunks/dashboard.mjs +115 -3
- package/dist/chunks/features.mjs +3 -3
- package/dist/chunks/init.mjs +108 -4
- package/dist/chunks/installer2.mjs +7 -7
- package/dist/chunks/manager.mjs +1048 -0
- package/dist/chunks/mcp-cli.mjs +1 -1
- package/dist/chunks/mcp.mjs +1 -1
- package/dist/chunks/menu.mjs +22 -1
- package/dist/chunks/notification.mjs +5 -2
- package/dist/chunks/package.mjs +1 -1
- package/dist/chunks/quick-provider.mjs +1 -269
- package/dist/chunks/quick-setup.mjs +10 -10
- package/dist/chunks/remote.mjs +4 -1
- package/dist/chunks/simple-config.mjs +1 -1
- package/dist/chunks/skill.mjs +117 -9003
- package/dist/chunks/skill2.mjs +9003 -0
- package/dist/chunks/skills-sync.mjs +536 -55
- package/dist/chunks/skills.mjs +7 -1156
- package/dist/chunks/smart-defaults.mjs +87 -9
- package/dist/chunks/status.mjs +1 -1
- package/dist/chunks/uninstall.mjs +1 -1
- package/dist/chunks/update.mjs +2 -2
- package/dist/chunks/zero-config.mjs +6 -2
- package/dist/cli.mjs +3 -1
- package/dist/i18n/locales/en/cloud.json +40 -0
- package/dist/i18n/locales/zh-CN/cloud.json +40 -0
- package/dist/index.d.mts +2586 -2
- package/dist/index.d.ts +2586 -2
- package/dist/index.mjs +1340 -7
- package/dist/shared/ccjk.B364Fu0N.mjs +1819 -0
- package/dist/shared/ccjk.BtB1e5jm.mjs +171 -0
- package/dist/shared/{ccjk.BnpWvs9V.mjs → ccjk.BwfbSKN2.mjs} +1 -1
- package/dist/shared/{ccjk.AqnXPAzw.mjs → ccjk.C2jHOZVP.mjs} +1 -1
- package/dist/shared/{ccjk.BSYWk9ML.mjs → ccjk.Cjj8SVrn.mjs} +1 -1
- package/dist/shared/ccjk.D6ycHbak.mjs +270 -0
- package/dist/shared/ccjk.D8ZLYSZZ.mjs +299 -0
- package/dist/shared/{ccjk.s7OCVzdd.mjs → ccjk.DS7UESmF.mjs} +2 -1483
- package/dist/shared/{ccjk.BiCrMV5O.mjs → ccjk.DXRAZcix.mjs} +0 -28
- package/dist/shared/ccjk.UIvifqNE.mjs +1486 -0
- package/dist/shared/{ccjk.BDKUdmLk.mjs → ccjk.c-ETfBZ_.mjs} +208 -86
- package/package.json +5 -1
- package/templates/claude-code/common/settings.json +3 -1
|
@@ -1,15 +1,85 @@
|
|
|
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';
|
|
5
|
+
import { writeJsonConfig } from './json-config.mjs';
|
|
6
|
+
import { j as join } from '../shared/ccjk.bQ7Dh1g4.mjs';
|
|
4
7
|
import { g as getPlatform } from './platform.mjs';
|
|
5
8
|
import { s as scanProject } from '../shared/ccjk.BrPUmTqm.mjs';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
|
|
10
|
+
const ORCHESTRATION_LEVELS = ["off", "minimal", "standard", "max"];
|
|
11
|
+
function parseOrchestrationLevel(value) {
|
|
12
|
+
if (!value) {
|
|
13
|
+
return "max";
|
|
14
|
+
}
|
|
15
|
+
const normalized = value.trim().toLowerCase();
|
|
16
|
+
if (ORCHESTRATION_LEVELS.includes(normalized)) {
|
|
17
|
+
return normalized;
|
|
18
|
+
}
|
|
19
|
+
throw new Error(`Invalid orchestration level: ${value}. Valid values: ${ORCHESTRATION_LEVELS.join(", ")}`);
|
|
20
|
+
}
|
|
21
|
+
function buildDefaults(level) {
|
|
22
|
+
if (level === "off") {
|
|
23
|
+
return {
|
|
24
|
+
planForNonTrivial: false,
|
|
25
|
+
useSubagentsForResearch: false,
|
|
26
|
+
verifyBeforeDone: false,
|
|
27
|
+
rootCauseFirst: true,
|
|
28
|
+
lessonsLoop: false
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
if (level === "minimal") {
|
|
32
|
+
return {
|
|
33
|
+
planForNonTrivial: true,
|
|
34
|
+
useSubagentsForResearch: false,
|
|
35
|
+
verifyBeforeDone: true,
|
|
36
|
+
rootCauseFirst: true,
|
|
37
|
+
lessonsLoop: false
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
if (level === "max") {
|
|
41
|
+
return {
|
|
42
|
+
planForNonTrivial: true,
|
|
43
|
+
useSubagentsForResearch: true,
|
|
44
|
+
verifyBeforeDone: true,
|
|
45
|
+
rootCauseFirst: true,
|
|
46
|
+
lessonsLoop: true
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
return {
|
|
50
|
+
planForNonTrivial: true,
|
|
51
|
+
useSubagentsForResearch: true,
|
|
52
|
+
verifyBeforeDone: true,
|
|
53
|
+
rootCauseFirst: true,
|
|
54
|
+
lessonsLoop: true
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
function resolveOrchestrationLevelFromRuntime(runtime) {
|
|
58
|
+
if (!runtime) {
|
|
59
|
+
return "max";
|
|
60
|
+
}
|
|
61
|
+
if (runtime.isCI || runtime.isContainer) {
|
|
62
|
+
return "minimal";
|
|
63
|
+
}
|
|
64
|
+
if (runtime.isSSH) {
|
|
65
|
+
return "minimal";
|
|
66
|
+
}
|
|
67
|
+
return "max";
|
|
68
|
+
}
|
|
69
|
+
function writeOrchestrationPolicy(params) {
|
|
70
|
+
const filePath = join(CCJK_CONFIG_DIR, "orchestration.json");
|
|
71
|
+
const policy = {
|
|
72
|
+
version: "1.0.0",
|
|
73
|
+
enabled: params.level !== "off",
|
|
74
|
+
level: params.level,
|
|
75
|
+
language: params.language,
|
|
76
|
+
defaults: buildDefaults(params.level),
|
|
77
|
+
generatedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
78
|
+
source: params.source
|
|
79
|
+
};
|
|
80
|
+
writeJsonConfig(filePath, policy, { atomic: true });
|
|
81
|
+
return filePath;
|
|
82
|
+
}
|
|
13
83
|
|
|
14
84
|
class SmartDefaultsDetector {
|
|
15
85
|
/**
|
|
@@ -49,7 +119,8 @@ class SmartDefaultsDetector {
|
|
|
49
119
|
workflows: {
|
|
50
120
|
outputStyle: "engineer-professional",
|
|
51
121
|
gitWorkflow: projectContext.usesConventionalCommits ? "conventional-commits" : "conventional-commits",
|
|
52
|
-
sixStepWorkflow: true
|
|
122
|
+
sixStepWorkflow: true,
|
|
123
|
+
orchestrationLevel: resolveOrchestrationLevelFromRuntime(projectContext.runtime)
|
|
53
124
|
},
|
|
54
125
|
// Tool integrations
|
|
55
126
|
tools: {
|
|
@@ -331,4 +402,11 @@ function detectCodeToolType() {
|
|
|
331
402
|
return SmartDefaultsDetector.detectCodeToolType();
|
|
332
403
|
}
|
|
333
404
|
|
|
334
|
-
|
|
405
|
+
const smartDefaults = {
|
|
406
|
+
__proto__: null,
|
|
407
|
+
SmartDefaultsDetector: SmartDefaultsDetector,
|
|
408
|
+
detectCodeToolType: detectCodeToolType,
|
|
409
|
+
detectSmartDefaults: detectSmartDefaults
|
|
410
|
+
};
|
|
411
|
+
|
|
412
|
+
export { detectCodeToolType as a, detectSmartDefaults as d, parseOrchestrationLevel as p, smartDefaults as s, writeOrchestrationPolicy as w };
|
package/dist/chunks/status.mjs
CHANGED
|
@@ -68,7 +68,7 @@ function loadInstalledSettings() {
|
|
|
68
68
|
}
|
|
69
69
|
async function loadSmartDefaults() {
|
|
70
70
|
try {
|
|
71
|
-
const { detectSmartDefaults } = await import('./smart-defaults.mjs');
|
|
71
|
+
const { detectSmartDefaults } = await import('./smart-defaults.mjs').then(function (n) { return n.s; });
|
|
72
72
|
return await detectSmartDefaults();
|
|
73
73
|
} catch {
|
|
74
74
|
return null;
|
|
@@ -3,7 +3,7 @@ import { i as inquirer } from './index3.mjs';
|
|
|
3
3
|
import { ZCF_CONFIG_FILE, DEFAULT_CODE_TOOL_TYPE, isCodeToolType } from './constants.mjs';
|
|
4
4
|
import { i18n, ensureI18nInitialized } from './index5.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.Cjj8SVrn.mjs';
|
|
7
7
|
import { h as handleExitPromptError, a as handleGeneralError } from '../shared/ccjk.BIxuVL3_.mjs';
|
|
8
8
|
import { a as addNumbersToChoices } from '../shared/ccjk.BFQ7yr5S.mjs';
|
|
9
9
|
import { p as promptBoolean } from '../shared/ccjk.DOwtZMk8.mjs';
|
package/dist/chunks/update.mjs
CHANGED
|
@@ -8,7 +8,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
10
|
import { c as copyConfigFiles } from './config.mjs';
|
|
11
|
-
import { n as needsMigration, m as migrateSettingsForTokenRetrieval, d as displayMigrationResult, p as promptMigration, u as updatePromptOnly, s as selectAndInstallWorkflows } from '../shared/ccjk.
|
|
11
|
+
import { n as needsMigration, m as migrateSettingsForTokenRetrieval, d as displayMigrationResult, p as promptMigration, u as updatePromptOnly, s as selectAndInstallWorkflows } from '../shared/ccjk.BwfbSKN2.mjs';
|
|
12
12
|
import { h as handleExitPromptError, a as handleGeneralError } from '../shared/ccjk.BIxuVL3_.mjs';
|
|
13
13
|
import { a as installMcpServices } from '../shared/ccjk.waa2ikKJ.mjs';
|
|
14
14
|
import { resolveAiOutputLanguage } from './prompts.mjs';
|
|
@@ -47,7 +47,7 @@ import './platform.mjs';
|
|
|
47
47
|
import '../shared/ccjk.BFQ7yr5S.mjs';
|
|
48
48
|
import '../shared/ccjk.DOwtZMk8.mjs';
|
|
49
49
|
import './index6.mjs';
|
|
50
|
-
import '../shared/ccjk.
|
|
50
|
+
import '../shared/ccjk.DXRAZcix.mjs';
|
|
51
51
|
|
|
52
52
|
const ccjkVersion = getRuntimeVersion();
|
|
53
53
|
function resolveCodeToolType(optionValue, savedValue) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { existsSync, readFileSync } from 'node:fs';
|
|
2
1
|
import a from './index2.mjs';
|
|
3
2
|
import { i as inquirer } from './index3.mjs';
|
|
3
|
+
import { existsSync, readFileSync } from 'node:fs';
|
|
4
4
|
import { SETTINGS_FILE, CLAUDE_DIR } from './constants.mjs';
|
|
5
5
|
import { i18n } from './index5.mjs';
|
|
6
6
|
import { ensureDir, writeFileAtomic } from './fs-operations.mjs';
|
|
7
|
-
import { m as mergeAndCleanPermissions } from '../shared/ccjk.
|
|
7
|
+
import { m as mergeAndCleanPermissions } from '../shared/ccjk.DXRAZcix.mjs';
|
|
8
8
|
import { a as addNumbersToChoices } from '../shared/ccjk.BFQ7yr5S.mjs';
|
|
9
9
|
import '../shared/ccjk.BAGoDD49.mjs';
|
|
10
10
|
import 'node:readline';
|
|
@@ -31,6 +31,8 @@ const MAX_PRESET = {
|
|
|
31
31
|
name: "Maximum Permissions",
|
|
32
32
|
description: "All common commands, file operations, and MCP servers",
|
|
33
33
|
permissions: [
|
|
34
|
+
"Bash(*)",
|
|
35
|
+
"Bash(sips *)",
|
|
34
36
|
// Package managers
|
|
35
37
|
"Bash(pnpm *)",
|
|
36
38
|
"Bash(npm *)",
|
|
@@ -138,6 +140,8 @@ const DEV_PRESET = {
|
|
|
138
140
|
name: "Developer Preset",
|
|
139
141
|
description: "Build tools, git, package managers, and file operations",
|
|
140
142
|
permissions: [
|
|
143
|
+
"Bash(*)",
|
|
144
|
+
"Bash(sips *)",
|
|
141
145
|
// Package managers
|
|
142
146
|
"Bash(pnpm *)",
|
|
143
147
|
"Bash(npm *)",
|
package/dist/cli.mjs
CHANGED
|
@@ -32,6 +32,8 @@ const COMMANDS = [
|
|
|
32
32
|
{ flags: "--api-type, -t <type>", description: "API type" },
|
|
33
33
|
{ flags: "--api-key, -k <key>", description: "API key" },
|
|
34
34
|
{ flags: "--code-type, -T <type>", description: "Code tool type" },
|
|
35
|
+
{ flags: "--orchestration <level>", description: "Workflow orchestration level (off|minimal|standard|max)" },
|
|
36
|
+
{ flags: "--install-agent-browser <boolean>", description: "Install Agent Browser during init (default: true)" },
|
|
35
37
|
{ flags: "--smart", description: "Smart generation mode - auto-detect project and generate agents/skills" },
|
|
36
38
|
{ flags: "--dry-run", description: "Preview changes without writing files" },
|
|
37
39
|
{ flags: "--yes, -y", description: "Skip confirmation prompts (auto-confirm)" }
|
|
@@ -568,7 +570,7 @@ const COMMANDS = [
|
|
|
568
570
|
{ flags: "--json", description: "Output as JSON" }
|
|
569
571
|
],
|
|
570
572
|
loader: async () => {
|
|
571
|
-
const { handleSkillCommand } = await import('./chunks/
|
|
573
|
+
const { handleSkillCommand } = await import('./chunks/skill2.mjs');
|
|
572
574
|
return async (options, action, args) => {
|
|
573
575
|
const actionStr = action;
|
|
574
576
|
const argsArr = args;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "Cloud Client",
|
|
3
|
+
"description": "Cloud API client for CCJK services",
|
|
4
|
+
|
|
5
|
+
"errors": {
|
|
6
|
+
"AUTH_ERROR": "Authentication failed. Please check your credentials.",
|
|
7
|
+
"RATE_LIMIT": "Rate limit exceeded. Please try again later.",
|
|
8
|
+
"SCHEMA_MISMATCH": "Response format validation failed. The server response does not match the expected schema.",
|
|
9
|
+
"NETWORK_ERROR": "Network connection failed. Please check your internet connection.",
|
|
10
|
+
"TIMEOUT": "Request timeout. The server did not respond in time.",
|
|
11
|
+
"SERVER_ERROR": "Server error occurred. Please try again later.",
|
|
12
|
+
"NOT_FOUND": "Resource not found. The requested resource does not exist.",
|
|
13
|
+
"API_ERROR": "API request failed. Please check your request parameters.",
|
|
14
|
+
"VALIDATION_ERROR": "Validation error. Please check your input data.",
|
|
15
|
+
"UNKNOWN_ERROR": "An unknown error occurred. Please try again.",
|
|
16
|
+
|
|
17
|
+
"context": {
|
|
18
|
+
"projectAnalysis": "Failed to analyze project",
|
|
19
|
+
"templateFetch": "Failed to fetch template",
|
|
20
|
+
"batchTemplateFetch": "Failed to fetch batch templates",
|
|
21
|
+
"usageReport": "Failed to report usage",
|
|
22
|
+
"healthCheck": "Failed to check API health"
|
|
23
|
+
},
|
|
24
|
+
|
|
25
|
+
"retry": {
|
|
26
|
+
"attempting": "Retrying request (attempt {{attempt}}/{{maxAttempts}})...",
|
|
27
|
+
"failed": "Request failed after {{attempts}} attempts",
|
|
28
|
+
"backoff": "Waiting {{delay}}ms before retry"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
|
|
32
|
+
"status": {
|
|
33
|
+
"connecting": "Connecting to cloud service...",
|
|
34
|
+
"connected": "Connected to cloud service",
|
|
35
|
+
"disconnected": "Disconnected from cloud service",
|
|
36
|
+
"healthy": "Cloud service is healthy",
|
|
37
|
+
"degraded": "Cloud service is degraded",
|
|
38
|
+
"unhealthy": "Cloud service is unhealthy"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "云客户端",
|
|
3
|
+
"description": "CCJK 云服务 API 客户端",
|
|
4
|
+
|
|
5
|
+
"errors": {
|
|
6
|
+
"AUTH_ERROR": "认证失败,请检查您的凭据。",
|
|
7
|
+
"RATE_LIMIT": "请求频率超限,请稍后再试。",
|
|
8
|
+
"SCHEMA_MISMATCH": "响应格式验证失败,服务器响应与预期格式不匹配。",
|
|
9
|
+
"NETWORK_ERROR": "网络连接失败,请检查您的网络连接。",
|
|
10
|
+
"TIMEOUT": "请求超时,服务器未能及时响应。",
|
|
11
|
+
"SERVER_ERROR": "服务器错误,请稍后再试。",
|
|
12
|
+
"NOT_FOUND": "资源不存在,请求的资源未找到。",
|
|
13
|
+
"API_ERROR": "API 请求失败,请检查您的请求参数。",
|
|
14
|
+
"VALIDATION_ERROR": "验证错误,请检查您的输入数据。",
|
|
15
|
+
"UNKNOWN_ERROR": "发生未知错误,请重试。",
|
|
16
|
+
|
|
17
|
+
"context": {
|
|
18
|
+
"projectAnalysis": "项目分析失败",
|
|
19
|
+
"templateFetch": "模板获取失败",
|
|
20
|
+
"batchTemplateFetch": "批量模板获取失败",
|
|
21
|
+
"usageReport": "使用情况上报失败",
|
|
22
|
+
"healthCheck": "健康检查失败"
|
|
23
|
+
},
|
|
24
|
+
|
|
25
|
+
"retry": {
|
|
26
|
+
"attempting": "正在重试请求(第 {{attempt}}/{{maxAttempts}} 次)...",
|
|
27
|
+
"failed": "请求在 {{attempts}} 次尝试后失败",
|
|
28
|
+
"backoff": "等待 {{delay}}ms 后重试"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
|
|
32
|
+
"status": {
|
|
33
|
+
"connecting": "正在连接云服务...",
|
|
34
|
+
"connected": "已连接到云服务",
|
|
35
|
+
"disconnected": "已断开云服务连接",
|
|
36
|
+
"healthy": "云服务运行正常",
|
|
37
|
+
"degraded": "云服务性能下降",
|
|
38
|
+
"unhealthy": "云服务不可用"
|
|
39
|
+
}
|
|
40
|
+
}
|