ccjk 14.1.3 → 14.1.6
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 +5 -5
- package/dist/chunks/api-config-selector.mjs +18 -5
- package/dist/chunks/api-providers.mjs +24 -9
- package/dist/chunks/auto-updater.mjs +13 -13
- package/dist/chunks/boost.mjs +1 -1
- package/dist/chunks/ccjk-all.mjs +4 -4
- package/dist/chunks/ccjk-config.mjs +168 -10
- package/dist/chunks/ccjk-mcp.mjs +4 -4
- package/dist/chunks/ccjk-setup.mjs +4 -4
- package/dist/chunks/ccr.mjs +11 -11
- package/dist/chunks/check-updates.mjs +3 -3
- package/dist/chunks/claude-code-incremental-manager.mjs +8 -6
- package/dist/chunks/claude-config.mjs +73 -0
- package/dist/chunks/claude-wrapper.mjs +1 -1
- package/dist/chunks/cli-hook.mjs +76 -1
- package/dist/chunks/code-type-resolver.mjs +14 -13
- package/dist/chunks/codex-config-switch.mjs +2 -2
- package/dist/chunks/codex-provider-manager.mjs +2 -2
- package/dist/chunks/codex.mjs +3 -3
- package/dist/chunks/config-switch.mjs +5 -5
- package/dist/chunks/config.mjs +531 -158
- package/dist/chunks/config2.mjs +22 -20
- package/dist/chunks/config3.mjs +6 -6
- package/dist/chunks/constants.mjs +20 -13
- package/dist/chunks/doctor.mjs +1 -1
- package/dist/chunks/features.mjs +59 -4
- package/dist/chunks/fs-operations.mjs +2 -14
- package/dist/chunks/index.mjs +1 -1
- package/dist/chunks/index10.mjs +115 -100
- package/dist/chunks/init.mjs +112 -51
- package/dist/chunks/installer.mjs +28 -21
- package/dist/chunks/mcp-cli.mjs +6 -6
- package/dist/chunks/mcp.mjs +6 -6
- package/dist/chunks/package.mjs +1 -1
- package/dist/chunks/platform.mjs +3 -3
- package/dist/chunks/prompts.mjs +9 -7
- package/dist/chunks/quick-actions.mjs +1 -1
- package/dist/chunks/quick-provider.mjs +23 -31
- package/dist/chunks/quick-setup.mjs +3 -4
- package/dist/chunks/simple-config.mjs +57 -16
- package/dist/chunks/slash-commands.mjs +1 -1
- package/dist/chunks/smart-guide.mjs +23 -10
- package/dist/chunks/status.mjs +28 -24
- package/dist/chunks/update.mjs +19 -18
- package/dist/chunks/upgrade.mjs +88 -5
- package/dist/chunks/version-checker.mjs +2 -2
- package/dist/chunks/zero-config.mjs +121 -16
- package/dist/cli.mjs +50 -27
- package/dist/i18n/locales/en/language.json +1 -1
- package/dist/i18n/locales/en/menu.json +8 -7
- package/dist/i18n/locales/en/multi-config.json +1 -1
- package/dist/i18n/locales/zh-CN/language.json +1 -1
- package/dist/i18n/locales/zh-CN/menu.json +8 -7
- package/dist/i18n/locales/zh-CN/multi-config.json +1 -1
- package/dist/index.d.mts +13 -11
- package/dist/index.d.ts +13 -11
- package/dist/index.mjs +7 -7
- package/dist/shared/{ccjk.B6VCKdyy.mjs → ccjk.BXTrU9TN.mjs} +31 -68
- package/dist/shared/{ccjk.DScm_NnL.mjs → ccjk.Ccrqt7u2.mjs} +30 -1
- package/dist/shared/{ccjk.CVjfbEIj.mjs → ccjk.DZtwozOG.mjs} +1 -1
- package/dist/shared/{ccjk.D6wx-rxT.mjs → ccjk.Dxgd2vjc.mjs} +3 -3
- package/dist/shared/{ccjk.BO45TPXJ.mjs → ccjk.K8c6VnM2.mjs} +2 -2
- package/dist/shared/{ccjk.BJENIVf7.mjs → ccjk.MpkxXQJL.mjs} +179 -19
- package/dist/shared/{ccjk.Dh6Be-ef.mjs → ccjk.ygJzcD-n.mjs} +28 -24
- package/package.json +1 -30
- package/dist/chunks/auto-fix.mjs +0 -253
- package/dist/chunks/auto-init.mjs +0 -311
- package/dist/chunks/auto-upgrade.mjs +0 -152
- package/dist/chunks/migrator.mjs +0 -178
- package/dist/shared/ccjk.DDq2hqA5.mjs +0 -158
- package/dist/shared/ccjk.KPLeMP-o.mjs +0 -79
- package/templates/common/workflow/essential/en/agents/planner.md +0 -116
- package/templates/common/workflow/essential/zh-CN/agents/planner.md +0 -116
|
@@ -5,7 +5,7 @@ import { C as ClaudeCodeConfigManager } from './config.mjs';
|
|
|
5
5
|
import { a as addNumbersToChoices } from '../shared/ccjk.BFQ7yr5S.mjs';
|
|
6
6
|
import { readZcfConfig } from './ccjk-config.mjs';
|
|
7
7
|
import { p as promptBoolean } from '../shared/ccjk.DZ2LLOa-.mjs';
|
|
8
|
-
import { v as validateApiKey } from '../shared/ccjk.
|
|
8
|
+
import { v as validateApiKey } from '../shared/ccjk.ygJzcD-n.mjs';
|
|
9
9
|
import '../shared/ccjk.BAGoDD49.mjs';
|
|
10
10
|
import 'node:readline';
|
|
11
11
|
import 'stream';
|
|
@@ -27,15 +27,15 @@ import 'node:url';
|
|
|
27
27
|
import '../shared/ccjk.bQ7Dh1g4.mjs';
|
|
28
28
|
import '../shared/ccjk.RyizuzOI.mjs';
|
|
29
29
|
import './constants.mjs';
|
|
30
|
-
import './json-config.mjs';
|
|
31
30
|
import './fs-operations.mjs';
|
|
32
31
|
import 'node:fs/promises';
|
|
32
|
+
import './json-config.mjs';
|
|
33
|
+
import '../shared/ccjk.Ccrqt7u2.mjs';
|
|
33
34
|
import './platform.mjs';
|
|
34
35
|
import './main.mjs';
|
|
35
36
|
import 'module';
|
|
36
37
|
import 'node:child_process';
|
|
37
38
|
import 'node:stream';
|
|
38
|
-
import '../shared/ccjk.DScm_NnL.mjs';
|
|
39
39
|
import '../shared/ccjk.BBtCGd_g.mjs';
|
|
40
40
|
import './index3.mjs';
|
|
41
41
|
import '../shared/ccjk.DeWpAShp.mjs';
|
|
@@ -55,14 +55,16 @@ function getAuthTypeLabel(authType) {
|
|
|
55
55
|
}
|
|
56
56
|
async function syncMyclaudeProfilesIfNeeded() {
|
|
57
57
|
const zcfConfig = readZcfConfig();
|
|
58
|
-
if (zcfConfig?.codeToolType !== "
|
|
58
|
+
if (zcfConfig?.codeToolType !== "clavue") {
|
|
59
59
|
return;
|
|
60
60
|
}
|
|
61
|
-
const { syncMyclaudeProviderProfilesFromCurrentClaudeConfig } = await import('./config.mjs').then(function (n) { return n.
|
|
61
|
+
const { syncMyclaudeProviderProfilesFromCurrentClaudeConfig } = await import('./config.mjs').then(function (n) { return n.H; });
|
|
62
62
|
syncMyclaudeProviderProfilesFromCurrentClaudeConfig();
|
|
63
63
|
}
|
|
64
64
|
async function configureIncrementalManagement() {
|
|
65
65
|
ensureI18nInitialized();
|
|
66
|
+
const zcfConfig = readZcfConfig();
|
|
67
|
+
const runtimeLabel = zcfConfig?.codeToolType === "clavue" ? "Clavue" : "Claude Code";
|
|
66
68
|
const config = ClaudeCodeConfigManager.readConfig();
|
|
67
69
|
if (!config || !config.profiles || Object.keys(config.profiles).length === 0) {
|
|
68
70
|
await handleAddProfile();
|
|
@@ -71,7 +73,7 @@ async function configureIncrementalManagement() {
|
|
|
71
73
|
}
|
|
72
74
|
const profiles = Object.values(config.profiles);
|
|
73
75
|
const currentProfile = config.currentProfileId ? config.profiles[config.currentProfileId] : null;
|
|
74
|
-
console.log(a.green(i18n.t("multi-config:incrementalManagementTitle")));
|
|
76
|
+
console.log(a.green(i18n.t("multi-config:incrementalManagementTitle", { runtime: runtimeLabel })));
|
|
75
77
|
console.log(a.gray(i18n.t("multi-config:currentProfileCount", { count: profiles.length })));
|
|
76
78
|
if (currentProfile) {
|
|
77
79
|
console.log(a.gray(i18n.t("multi-config:currentDefaultProfile", { profile: currentProfile.name })));
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { SETTINGS_FILE, CLAUDE_DIR } from './constants.mjs';
|
|
2
|
+
import { exists, ensureDir } from './fs-operations.mjs';
|
|
3
|
+
import { readJsonConfig, writeJsonConfig } from './json-config.mjs';
|
|
4
|
+
import { l as deepMerge } from './config.mjs';
|
|
5
|
+
import 'node:os';
|
|
6
|
+
import './index2.mjs';
|
|
7
|
+
import 'node:fs';
|
|
8
|
+
import 'node:process';
|
|
9
|
+
import 'node:url';
|
|
10
|
+
import '../shared/ccjk.bQ7Dh1g4.mjs';
|
|
11
|
+
import 'node:crypto';
|
|
12
|
+
import 'node:fs/promises';
|
|
13
|
+
import '../shared/ccjk.RyizuzOI.mjs';
|
|
14
|
+
import '../shared/ccjk.BAGoDD49.mjs';
|
|
15
|
+
import './index5.mjs';
|
|
16
|
+
import './index6.mjs';
|
|
17
|
+
import 'node:readline';
|
|
18
|
+
import 'stream';
|
|
19
|
+
import 'node:tty';
|
|
20
|
+
import 'node:async_hooks';
|
|
21
|
+
import '../shared/ccjk.Cjgrln_h.mjs';
|
|
22
|
+
import 'node:util';
|
|
23
|
+
import 'tty';
|
|
24
|
+
import 'fs';
|
|
25
|
+
import 'child_process';
|
|
26
|
+
import 'node:path';
|
|
27
|
+
import 'buffer';
|
|
28
|
+
import 'string_decoder';
|
|
29
|
+
import './ccjk-config.mjs';
|
|
30
|
+
import '../shared/ccjk.BBtCGd_g.mjs';
|
|
31
|
+
import './index3.mjs';
|
|
32
|
+
import '../shared/ccjk.Ccrqt7u2.mjs';
|
|
33
|
+
import './platform.mjs';
|
|
34
|
+
import './main.mjs';
|
|
35
|
+
import 'module';
|
|
36
|
+
import 'node:child_process';
|
|
37
|
+
import 'node:stream';
|
|
38
|
+
|
|
39
|
+
function readClaudeConfig(configPath = SETTINGS_FILE) {
|
|
40
|
+
try {
|
|
41
|
+
if (!exists(configPath)) {
|
|
42
|
+
return null;
|
|
43
|
+
}
|
|
44
|
+
return readJsonConfig(configPath) || null;
|
|
45
|
+
} catch (error) {
|
|
46
|
+
console.error(`Failed to read Claude config from ${configPath}:`, error);
|
|
47
|
+
return null;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
function writeClaudeConfig(config, options = {}, configPath = SETTINGS_FILE) {
|
|
51
|
+
try {
|
|
52
|
+
ensureDir(CLAUDE_DIR);
|
|
53
|
+
writeJsonConfig(configPath, config, {
|
|
54
|
+
atomic: options.atomic !== false,
|
|
55
|
+
pretty: true,
|
|
56
|
+
backup: options.backup
|
|
57
|
+
});
|
|
58
|
+
} catch (error) {
|
|
59
|
+
console.error(`Failed to write Claude config to ${configPath}:`, error);
|
|
60
|
+
throw new Error(`Failed to write Claude config: ${error instanceof Error ? error.message : String(error)}`);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
function updateClaudeConfig(updates, options = {}, configPath = SETTINGS_FILE) {
|
|
64
|
+
const existingConfig = readClaudeConfig(configPath) || {};
|
|
65
|
+
const mergedConfig = deepMerge(existingConfig, updates, {
|
|
66
|
+
mergeArrays: options.merge === "preserve",
|
|
67
|
+
arrayMergeStrategy: "unique"
|
|
68
|
+
});
|
|
69
|
+
writeClaudeConfig(mergedConfig, options, configPath);
|
|
70
|
+
return mergedConfig;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export { readClaudeConfig, updateClaudeConfig, writeClaudeConfig };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import process__default from 'node:process';
|
|
2
2
|
import { exec as q } from './main.mjs';
|
|
3
3
|
import { i18n, initI18n } from './index2.mjs';
|
|
4
|
-
import {
|
|
4
|
+
import { l as findRealCommandPath } from './platform.mjs';
|
|
5
5
|
import 'module';
|
|
6
6
|
import 'node:child_process';
|
|
7
7
|
import 'node:path';
|
package/dist/chunks/cli-hook.mjs
CHANGED
|
@@ -3,7 +3,6 @@ import { DEFAULT_CODE_TOOL_TYPE, isCodeToolType, getCodeToolNativeSlashCommands
|
|
|
3
3
|
import { readZcfConfig } from './ccjk-config.mjs';
|
|
4
4
|
import { a as getGlobalStateManager, g as getGlobalConvoyManager, c as contextLoader, S as SessionIntelligence } from './session-manager.mjs';
|
|
5
5
|
import { l as logger } from '../shared/ccjk.8oaxX4iR.mjs';
|
|
6
|
-
import { h as hookRegistry } from '../shared/ccjk.KPLeMP-o.mjs';
|
|
7
6
|
import { Buffer } from 'node:buffer';
|
|
8
7
|
import { randomUUID } from 'node:crypto';
|
|
9
8
|
import { existsSync, mkdirSync, writeFileSync, readFileSync } from 'node:fs';
|
|
@@ -31,6 +30,82 @@ import '../shared/ccjk.DlTXS9rP.mjs';
|
|
|
31
30
|
import './index5.mjs';
|
|
32
31
|
import '../shared/ccjk.wLJHO0Af.mjs';
|
|
33
32
|
|
|
33
|
+
class HookRegistry {
|
|
34
|
+
hooks = /* @__PURE__ */ new Map();
|
|
35
|
+
/**
|
|
36
|
+
* Register a hook for an event
|
|
37
|
+
*/
|
|
38
|
+
register(event, hook) {
|
|
39
|
+
const hooks = this.hooks.get(event) || [];
|
|
40
|
+
hooks.push(hook);
|
|
41
|
+
hooks.sort((a, b) => (b.priority || 0) - (a.priority || 0));
|
|
42
|
+
this.hooks.set(event, hooks);
|
|
43
|
+
logger.debug(`Registered hook "${hook.name}" for event "${event}"`);
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Unregister a hook
|
|
47
|
+
*/
|
|
48
|
+
unregister(event, hookName) {
|
|
49
|
+
const hooks = this.hooks.get(event);
|
|
50
|
+
if (!hooks)
|
|
51
|
+
return;
|
|
52
|
+
const filtered = hooks.filter((h) => h.name !== hookName);
|
|
53
|
+
this.hooks.set(event, filtered);
|
|
54
|
+
logger.debug(`Unregistered hook "${hookName}" for event "${event}"`);
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Execute all hooks for an event
|
|
58
|
+
* Returns false if any hook returns continue: false
|
|
59
|
+
*/
|
|
60
|
+
async execute(context) {
|
|
61
|
+
const hooks = this.hooks.get(context.event) || [];
|
|
62
|
+
const enabledHooks = hooks.filter((h) => h.enabled !== false);
|
|
63
|
+
if (enabledHooks.length === 0) {
|
|
64
|
+
return { continue: true };
|
|
65
|
+
}
|
|
66
|
+
let currentContext = context;
|
|
67
|
+
let aggregatedData = {};
|
|
68
|
+
for (const hook of enabledHooks) {
|
|
69
|
+
try {
|
|
70
|
+
const result = await hook.fn(currentContext);
|
|
71
|
+
if (result.data) {
|
|
72
|
+
aggregatedData = { ...aggregatedData, ...result.data };
|
|
73
|
+
}
|
|
74
|
+
if (!result.continue) {
|
|
75
|
+
return {
|
|
76
|
+
continue: false,
|
|
77
|
+
data: aggregatedData,
|
|
78
|
+
error: result.error
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
currentContext = {
|
|
82
|
+
...currentContext,
|
|
83
|
+
data: { ...currentContext.data, ...aggregatedData }
|
|
84
|
+
};
|
|
85
|
+
} catch (error) {
|
|
86
|
+
logger.error(`Hook "${hook.name}" failed:`, error);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
return {
|
|
90
|
+
continue: true,
|
|
91
|
+
data: aggregatedData
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Get all registered hooks for an event
|
|
96
|
+
*/
|
|
97
|
+
getHooks(event) {
|
|
98
|
+
return this.hooks.get(event) || [];
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Clear all hooks
|
|
102
|
+
*/
|
|
103
|
+
clear() {
|
|
104
|
+
this.hooks.clear();
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
const hookRegistry = new HookRegistry();
|
|
108
|
+
|
|
34
109
|
async function emitCommandHookEvent(event, data, sessionId) {
|
|
35
110
|
try {
|
|
36
111
|
const context = {
|
|
@@ -490,7 +490,7 @@ class SmartDefaultsDetector {
|
|
|
490
490
|
async detectClaudeCodeVersion() {
|
|
491
491
|
const candidateCommands = [
|
|
492
492
|
CODE_TOOL_INFO["claude-code"].runtimeCommand,
|
|
493
|
-
CODE_TOOL_INFO.
|
|
493
|
+
CODE_TOOL_INFO.clavue.runtimeCommand
|
|
494
494
|
];
|
|
495
495
|
for (const command of candidateCommands) {
|
|
496
496
|
try {
|
|
@@ -591,20 +591,21 @@ class SmartDefaultsDetector {
|
|
|
591
591
|
* This is a static method so it can be called without instantiating the full detector.
|
|
592
592
|
*/
|
|
593
593
|
static detectCodeToolType() {
|
|
594
|
-
const
|
|
595
|
-
join(homedir(), ".
|
|
596
|
-
join(homedir(), ".
|
|
594
|
+
const clavueMarkers = [
|
|
595
|
+
join(homedir(), ".clavue", ".clavue.json"),
|
|
596
|
+
join(homedir(), ".clavue", "settings.json")
|
|
597
597
|
];
|
|
598
598
|
try {
|
|
599
|
-
if (
|
|
600
|
-
const globalConfigPath = join(homedir(), ".
|
|
599
|
+
if (clavueMarkers.some((p) => existsSync(p))) {
|
|
600
|
+
const globalConfigPath = join(homedir(), ".clavue", ".clavue.json");
|
|
601
601
|
if (existsSync(globalConfigPath)) {
|
|
602
602
|
const configContent = readFileSync(globalConfigPath, "utf-8");
|
|
603
603
|
const config = JSON.parse(configContent);
|
|
604
|
-
if (config.myclaudeActiveProviderProfileId || config.myclaudeProviderProfiles) {
|
|
605
|
-
return "
|
|
604
|
+
if (config.clavueActiveProviderProfileId || config.clavueProviderProfiles || config.myclaudeActiveProviderProfileId || config.myclaudeProviderProfiles) {
|
|
605
|
+
return "clavue";
|
|
606
606
|
}
|
|
607
607
|
}
|
|
608
|
+
return "clavue";
|
|
608
609
|
}
|
|
609
610
|
} catch {
|
|
610
611
|
}
|
|
@@ -619,7 +620,7 @@ class SmartDefaultsDetector {
|
|
|
619
620
|
if (existsSync(codexPath)) {
|
|
620
621
|
return "codex";
|
|
621
622
|
}
|
|
622
|
-
return "
|
|
623
|
+
return "clavue";
|
|
623
624
|
}
|
|
624
625
|
/**
|
|
625
626
|
* Check if CCR (Claude Code Router) should be enabled
|
|
@@ -769,11 +770,11 @@ const smartDefaults = {
|
|
|
769
770
|
|
|
770
771
|
const CODE_TYPE_ABBREVIATIONS = {
|
|
771
772
|
cc: "claude-code",
|
|
772
|
-
mc: "
|
|
773
|
-
mycode: "
|
|
773
|
+
mc: "clavue",
|
|
774
|
+
mycode: "clavue",
|
|
774
775
|
cx: "codex"
|
|
775
776
|
};
|
|
776
|
-
const STARTUP_CODE_TOOL_CHOICES = ["
|
|
777
|
+
const STARTUP_CODE_TOOL_CHOICES = ["clavue", "claude-code", "codex"];
|
|
777
778
|
async function resolveCodeType(codeTypeParam) {
|
|
778
779
|
if (codeTypeParam) {
|
|
779
780
|
const normalizedParam = codeTypeParam.toLowerCase().trim();
|
|
@@ -837,7 +838,7 @@ async function promptStartupCodeType() {
|
|
|
837
838
|
name: "codeToolType",
|
|
838
839
|
message: isZh ? "\u9009\u62E9\u4EE3\u7801\u5DE5\u5177" : "Choose your code tool",
|
|
839
840
|
choices: STARTUP_CODE_TOOL_CHOICES.map((tool) => {
|
|
840
|
-
if (tool === "
|
|
841
|
+
if (tool === "clavue") {
|
|
841
842
|
return {
|
|
842
843
|
name: isZh ? `${tool} - Provider-first \u63A7\u5236\u4E2D\u5FC3\uFF08\u9ED8\u8BA4\u63A8\u8350\uFF09` : `${tool} - Provider-first control center (recommended default)`,
|
|
843
844
|
value: tool
|
|
@@ -5,7 +5,7 @@ import { ensureI18nInitialized, i18n } from './index2.mjs';
|
|
|
5
5
|
import { readJsonConfig } from './json-config.mjs';
|
|
6
6
|
import { a as addNumbersToChoices } from '../shared/ccjk.BFQ7yr5S.mjs';
|
|
7
7
|
import { p as promptBoolean } from '../shared/ccjk.DZ2LLOa-.mjs';
|
|
8
|
-
import {
|
|
8
|
+
import { e as detectConfigManagementMode } from './codex.mjs';
|
|
9
9
|
import { deleteProviders, addProviderToExisting, editExistingProvider } from './codex-provider-manager.mjs';
|
|
10
10
|
import '../shared/ccjk.BAGoDD49.mjs';
|
|
11
11
|
import 'node:readline';
|
|
@@ -40,8 +40,8 @@ import 'node:stream';
|
|
|
40
40
|
import './ccjk-config.mjs';
|
|
41
41
|
import './index3.mjs';
|
|
42
42
|
import './config.mjs';
|
|
43
|
+
import '../shared/ccjk.Ccrqt7u2.mjs';
|
|
43
44
|
import './platform.mjs';
|
|
44
|
-
import '../shared/ccjk.DScm_NnL.mjs';
|
|
45
45
|
import './prompts.mjs';
|
|
46
46
|
import '../shared/ccjk.gDEDGD_t.mjs';
|
|
47
47
|
import '../shared/ccjk.DKXs7Fbm.mjs';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ensureI18nInitialized, i18n } from './index2.mjs';
|
|
2
|
-
import { r as readCodexConfig,
|
|
2
|
+
import { r as readCodexConfig, f as backupCodexComplete, w as writeCodexConfig, g as writeAuthFile } from './codex.mjs';
|
|
3
3
|
import 'node:fs';
|
|
4
4
|
import 'node:process';
|
|
5
5
|
import 'node:url';
|
|
@@ -37,8 +37,8 @@ import './fs-operations.mjs';
|
|
|
37
37
|
import 'node:fs/promises';
|
|
38
38
|
import './json-config.mjs';
|
|
39
39
|
import './config.mjs';
|
|
40
|
+
import '../shared/ccjk.Ccrqt7u2.mjs';
|
|
40
41
|
import './platform.mjs';
|
|
41
|
-
import '../shared/ccjk.DScm_NnL.mjs';
|
|
42
42
|
import '../shared/ccjk.BFQ7yr5S.mjs';
|
|
43
43
|
import './prompts.mjs';
|
|
44
44
|
import '../shared/ccjk.gDEDGD_t.mjs';
|
package/dist/chunks/codex.mjs
CHANGED
|
@@ -11,10 +11,10 @@ import { x as K } from './main.mjs';
|
|
|
11
11
|
import { CODEX_CONFIG_FILE, CODEX_AUTH_FILE, CODEX_DIR, SUPPORTED_LANGS, CODEX_AGENTS_FILE, CODEX_PROMPTS_DIR, ZCF_CONFIG_FILE, AI_OUTPUT_LANGUAGES } from './constants.mjs';
|
|
12
12
|
import { ensureI18nInitialized, i18n, format } from './index2.mjs';
|
|
13
13
|
import { updateZcfConfig, readZcfConfig, readDefaultTomlConfig, updateTomlConfig } from './ccjk-config.mjs';
|
|
14
|
-
import {
|
|
14
|
+
import { v as applyAiLanguageDirective } from './config.mjs';
|
|
15
15
|
import { exists, readFile, ensureDir, writeFileAtomic, writeFile, copyDir, copyFile } from './fs-operations.mjs';
|
|
16
16
|
import { readJsonConfig, writeJsonConfig } from './json-config.mjs';
|
|
17
|
-
import { i as isWindows, m as getMcpCommand,
|
|
17
|
+
import { i as isWindows, m as getMcpCommand, k as getSystemRoot, w as wrapCommandWithSudo, n as normalizeTomlPath } from './platform.mjs';
|
|
18
18
|
import { a as addNumbersToChoices } from '../shared/ccjk.BFQ7yr5S.mjs';
|
|
19
19
|
import { resolveAiOutputLanguage } from './prompts.mjs';
|
|
20
20
|
import { p as promptBoolean } from '../shared/ccjk.DZ2LLOa-.mjs';
|
|
@@ -2069,4 +2069,4 @@ const codex = {
|
|
|
2069
2069
|
writeCodexConfig: writeCodexConfig
|
|
2070
2070
|
};
|
|
2071
2071
|
|
|
2072
|
-
export { switchToOfficialLogin as a, switchToProvider as b, runCodexUpdate as c,
|
|
2072
|
+
export { switchToOfficialLogin as a, switchToProvider as b, runCodexUpdate as c, applyCodexPlatformCommand as d, detectConfigManagementMode as e, backupCodexComplete as f, writeAuthFile as g, runCodexFullInit as h, runCodexUninstall as i, configureCodexAiMemoryFeature as j, configureCodexDefaultModelFeature as k, listCodexProviders as l, configureCodexMcp as m, configureCodexApi as n, configureCodexPresetFeature as o, runCodexWorkflowImportWithLanguageSelection as p, codex as q, readCodexConfig as r, switchCodexProvider as s, writeCodexConfig as w };
|
|
@@ -32,12 +32,12 @@ 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 '../shared/ccjk.Ccrqt7u2.mjs';
|
|
35
36
|
import './platform.mjs';
|
|
36
37
|
import './main.mjs';
|
|
37
38
|
import 'module';
|
|
38
39
|
import 'node:child_process';
|
|
39
40
|
import 'node:stream';
|
|
40
|
-
import '../shared/ccjk.DScm_NnL.mjs';
|
|
41
41
|
import './index8.mjs';
|
|
42
42
|
import '../shared/ccjk.DeWpAShp.mjs';
|
|
43
43
|
import '../shared/ccjk.CxpGa6MC.mjs';
|
|
@@ -78,7 +78,7 @@ function resolveCodeType(codeType) {
|
|
|
78
78
|
return DEFAULT_CODE_TOOL_TYPE;
|
|
79
79
|
}
|
|
80
80
|
function syncMyclaudeStateIfNeeded(codeType, currentProfileId) {
|
|
81
|
-
if (codeType !== "
|
|
81
|
+
if (codeType !== "clavue") {
|
|
82
82
|
return;
|
|
83
83
|
}
|
|
84
84
|
if (currentProfileId !== void 0) {
|
|
@@ -88,7 +88,7 @@ function syncMyclaudeStateIfNeeded(codeType, currentProfileId) {
|
|
|
88
88
|
}
|
|
89
89
|
async function handleList(codeType) {
|
|
90
90
|
const targetCodeType = resolveCodeType(codeType);
|
|
91
|
-
if (targetCodeType === "claude-code" || targetCodeType === "
|
|
91
|
+
if (targetCodeType === "claude-code" || targetCodeType === "clavue") {
|
|
92
92
|
await listClaudeCodeProfiles();
|
|
93
93
|
} else if (targetCodeType === "codex") {
|
|
94
94
|
await listCodexProvidersWithDisplay();
|
|
@@ -141,7 +141,7 @@ async function listClaudeCodeProfiles() {
|
|
|
141
141
|
}
|
|
142
142
|
async function handleDirectSwitch(codeType, target) {
|
|
143
143
|
const resolvedCodeType = resolveCodeType(codeType);
|
|
144
|
-
if (resolvedCodeType === "claude-code" || resolvedCodeType === "
|
|
144
|
+
if (resolvedCodeType === "claude-code" || resolvedCodeType === "clavue") {
|
|
145
145
|
await handleClaudeCodeDirectSwitch(target, resolvedCodeType);
|
|
146
146
|
} else if (resolvedCodeType === "codex") {
|
|
147
147
|
await switchCodexProvider(target);
|
|
@@ -214,7 +214,7 @@ async function handleClaudeCodeDirectSwitch(target, codeType = "claude-code") {
|
|
|
214
214
|
}
|
|
215
215
|
async function handleInteractiveSwitch(codeType) {
|
|
216
216
|
const resolvedCodeType = resolveCodeType(codeType);
|
|
217
|
-
if (resolvedCodeType === "claude-code" || resolvedCodeType === "
|
|
217
|
+
if (resolvedCodeType === "claude-code" || resolvedCodeType === "clavue") {
|
|
218
218
|
await handleClaudeCodeInteractiveSwitch(resolvedCodeType);
|
|
219
219
|
} else if (resolvedCodeType === "codex") {
|
|
220
220
|
await handleCodexInteractiveSwitch();
|