ccjk 12.0.1 → 12.0.3
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/agent-teams.mjs +17 -18
- package/dist/chunks/agent.mjs +105 -102
- package/dist/chunks/agents.mjs +87 -77
- package/dist/chunks/api-cli.mjs +41 -27
- package/dist/chunks/api-providers.mjs +2 -4
- package/dist/chunks/api.mjs +23 -12
- package/dist/chunks/auto-bootstrap.mjs +3 -5
- package/dist/chunks/auto-init.mjs +3 -4
- package/dist/chunks/auto-updater.mjs +103 -91
- package/dist/chunks/banner.mjs +44 -43
- package/dist/chunks/boost.mjs +30 -31
- package/dist/chunks/ccjk-agents.mjs +6 -9
- package/dist/chunks/ccjk-all.mjs +703 -85
- package/dist/chunks/ccjk-config.mjs +6 -6
- package/dist/chunks/ccjk-hooks.mjs +20 -9
- package/dist/chunks/ccjk-mcp.mjs +64 -52
- package/dist/chunks/ccjk-setup.mjs +35 -25
- package/dist/chunks/ccjk-skills.mjs +51 -41
- package/dist/chunks/ccr.mjs +43 -33
- package/dist/chunks/ccu.mjs +16 -12
- package/dist/chunks/check-updates.mjs +31 -20
- package/dist/chunks/claude-code-config-manager.mjs +25 -10
- package/dist/chunks/claude-code-incremental-manager.mjs +65 -51
- package/dist/chunks/claude-config.mjs +2 -2
- package/dist/chunks/claude-wrapper.mjs +9 -6
- package/dist/chunks/cleanup-migration.mjs +1 -1
- package/dist/chunks/cli-hook.mjs +10 -3
- package/dist/chunks/cloud-sync.mjs +1 -1
- package/dist/chunks/codex-config-switch.mjs +59 -46
- package/dist/chunks/codex-provider-manager.mjs +30 -17
- package/dist/chunks/codex-uninstaller.mjs +5 -6
- package/dist/chunks/codex.mjs +89 -89
- package/dist/chunks/commands.mjs +28 -29
- package/dist/chunks/commands2.mjs +4 -3
- package/dist/chunks/commit.mjs +42 -23
- package/dist/chunks/completion.mjs +46 -47
- package/dist/chunks/config-consolidator.mjs +13 -14
- package/dist/chunks/config-switch.mjs +67 -54
- package/dist/chunks/config.mjs +10 -10
- package/dist/chunks/config2.mjs +53 -42
- package/dist/chunks/config3.mjs +107 -93
- package/dist/chunks/constants.mjs +2 -4
- package/dist/chunks/context-loader.mjs +5 -4
- package/dist/chunks/context.mjs +77 -76
- package/dist/chunks/convoy-manager.mjs +4 -4
- package/dist/chunks/dashboard.mjs +28 -29
- package/dist/chunks/doctor.mjs +69 -55
- package/dist/chunks/evolution.mjs +37 -38
- package/dist/chunks/features.mjs +104 -93
- package/dist/chunks/fs-operations.mjs +1 -1
- package/dist/chunks/health-alerts.mjs +1 -1
- package/dist/chunks/health-check.mjs +1 -1
- package/dist/chunks/help.mjs +117 -116
- package/dist/chunks/hook-installer.mjs +3 -2
- package/dist/chunks/index.mjs +20 -6
- package/dist/chunks/index10.mjs +1171 -0
- package/dist/chunks/index11.mjs +1008 -0
- package/dist/chunks/index12.mjs +193 -0
- package/dist/chunks/index13.mjs +218 -0
- package/dist/chunks/index14.mjs +663 -0
- package/dist/chunks/index2.mjs +19 -10
- package/dist/chunks/index3.mjs +19079 -164
- package/dist/chunks/index4.mjs +8 -1171
- package/dist/chunks/index5.mjs +7479 -884
- package/dist/chunks/index6.mjs +160 -184
- package/dist/chunks/index7.mjs +3573 -653
- package/dist/chunks/index8.mjs +19 -0
- package/dist/chunks/index9.mjs +616 -0
- package/dist/chunks/init.mjs +177 -176
- package/dist/chunks/installer.mjs +92 -82
- package/dist/chunks/installer2.mjs +3 -2
- package/dist/chunks/interview.mjs +118 -107
- package/dist/chunks/json-config.mjs +3 -2
- package/dist/chunks/linux.mjs +3863 -0
- package/dist/chunks/macos.mjs +69 -0
- package/dist/chunks/main.mjs +635 -0
- package/dist/chunks/marketplace.mjs +69 -66
- package/dist/chunks/mcp-cli.mjs +62 -49
- package/dist/chunks/mcp.mjs +141 -128
- package/dist/chunks/menu.mjs +85 -85
- package/dist/chunks/metrics-display.mjs +41 -40
- package/dist/chunks/migrator.mjs +4 -5
- package/dist/chunks/monitor.mjs +96 -96
- package/dist/chunks/notification.mjs +151 -141
- package/dist/chunks/onboarding.mjs +27 -16
- package/dist/chunks/package.mjs +2 -3
- package/dist/chunks/paradigm.mjs +24 -23
- package/dist/chunks/permission-manager.mjs +11 -12
- package/dist/chunks/permissions.mjs +72 -57
- package/dist/chunks/persistence-manager.mjs +97 -84
- package/dist/chunks/persistence.mjs +1 -1
- package/dist/chunks/platform.mjs +29 -29
- package/dist/chunks/plugin.mjs +104 -105
- package/dist/chunks/prompts.mjs +39 -27
- package/dist/chunks/providers.mjs +68 -69
- package/dist/chunks/quick-actions.mjs +71 -72
- package/dist/chunks/quick-provider.mjs +56 -40
- package/dist/chunks/quick-setup.mjs +74 -62
- package/dist/chunks/remote.mjs +21 -12
- package/dist/chunks/session.mjs +116 -103
- package/dist/chunks/sessions.mjs +29 -28
- package/dist/chunks/silent-updater.mjs +8 -10
- package/dist/chunks/simple-config.mjs +13 -10
- package/dist/chunks/skill.mjs +8560 -103
- package/dist/chunks/skills-sync.mjs +5212 -79
- package/dist/chunks/skills.mjs +105 -94
- package/dist/chunks/slash-commands.mjs +36 -37
- package/dist/chunks/smart-defaults.mjs +7 -3
- package/dist/chunks/smart-guide.mjs +1 -1
- package/dist/chunks/startup.mjs +2 -4
- package/dist/chunks/stats.mjs +41 -42
- package/dist/chunks/status.mjs +49 -50
- package/dist/chunks/team.mjs +24 -12
- package/dist/chunks/thinking.mjs +74 -63
- package/dist/chunks/trace.mjs +20 -19
- package/dist/chunks/uninstall.mjs +69 -56
- package/dist/chunks/update.mjs +44 -32
- package/dist/chunks/upgrade-manager.mjs +30 -23
- package/dist/chunks/version-checker.mjs +45 -41
- package/dist/chunks/vim.mjs +81 -69
- package/dist/chunks/windows.mjs +14 -0
- package/dist/chunks/workflows.mjs +15 -15
- package/dist/chunks/wsl.mjs +129 -0
- package/dist/chunks/zero-config.mjs +45 -34
- package/dist/cli.mjs +20 -20
- package/dist/index.mjs +44 -34
- package/dist/shared/ccjk.BAGoDD49.mjs +36 -0
- package/dist/shared/ccjk.BBtCGd_g.mjs +899 -0
- package/dist/shared/{ccjk.CGcy7cNM.mjs → ccjk.BDKUdmLk.mjs} +1 -1
- package/dist/shared/{ccjk.DtMBiwVG.mjs → ccjk.BFxsJM0k.mjs} +1 -1
- package/dist/shared/{ccjk.j4uut26D.mjs → ccjk.BIxuVL3_.mjs} +5 -5
- package/dist/shared/ccjk.BRZ9ww8S.mjs +142 -0
- package/dist/shared/{ccjk.CN0edl87.mjs → ccjk.BSYWk9ML.mjs} +1 -1
- package/dist/shared/{ccjk.Dk1HDseQ.mjs → ccjk.BnpWvs9V.mjs} +75 -75
- package/dist/shared/ccjk.BoApaI4j.mjs +28 -0
- package/dist/shared/{ccjk.DKojSRzw.mjs → ccjk.BrPUmTqm.mjs} +1 -1
- package/dist/shared/{ccjk.C10pepYx.mjs → ccjk.BxSmJ8B7.mjs} +1 -1
- package/dist/shared/ccjk.Bx_rmYfN.mjs +69 -0
- package/dist/shared/ccjk.COweQ1RR.mjs +5 -0
- package/dist/shared/{ccjk.BN90X6oc.mjs → ccjk.CePkJq2S.mjs} +17 -17
- package/dist/shared/{ccjk.Bvoex4TZ.mjs → ccjk.CfKKcvWy.mjs} +1 -1
- package/dist/shared/ccjk.Cjgrln_h.mjs +297 -0
- package/dist/shared/ccjk.CxpGa6MC.mjs +2724 -0
- package/dist/shared/{ccjk.DfwJOEok.mjs → ccjk.D5MFQT7w.mjs} +1 -1
- package/dist/shared/{ccjk.cChAaGgT.mjs → ccjk.DG_o24cZ.mjs} +6 -6
- package/dist/shared/{ccjk.bhFAMRyc.mjs → ccjk.DLLw-h4Y.mjs} +32 -32
- package/dist/shared/ccjk.DOwtZMk8.mjs +4019 -0
- package/dist/shared/ccjk.DSpGBMwx.mjs +38 -0
- package/dist/shared/{ccjk.BsXQugfY.mjs → ccjk.DTdjs-qK.mjs} +13 -13
- package/dist/shared/{ccjk.Bdhyg3X-.mjs → ccjk.DsYaCCx4.mjs} +1 -1
- package/dist/shared/ccjk.KfSWcGlE.mjs +38 -0
- package/dist/shared/ccjk.RyizuzOI.mjs +21 -0
- package/dist/shared/{ccjk.h7_W-wTs.mjs → ccjk.SPoXMvZD.mjs} +1 -1
- package/dist/shared/ccjk.T_cX87dY.mjs +15 -0
- package/dist/shared/{ccjk.CrB6OYHv.mjs → ccjk._dESH4Rk.mjs} +2 -2
- package/dist/shared/ccjk.bQ7Dh1g4.mjs +249 -0
- package/dist/shared/{ccjk.CBhIZiPz.mjs → ccjk.hoqrwWdN.mjs} +1 -1
- package/dist/shared/{ccjk.BNwRnWYx.mjs → ccjk.s7OCVzdd.mjs} +1230 -33
- package/dist/shared/{ccjk.BOIUTf5z.mjs → ccjk.waa2ikKJ.mjs} +8 -9
- package/package.json +31 -29
- package/dist/shared/ccjk.DHbrGcgg.mjs +0 -13
- package/dist/shared/ccjk.DntgA8fQ.mjs +0 -42
|
@@ -1,6 +1,22 @@
|
|
|
1
|
-
import
|
|
2
|
-
import inquirer from '
|
|
3
|
-
import ora from '
|
|
1
|
+
import a from './index2.mjs';
|
|
2
|
+
import { i as inquirer } from './index3.mjs';
|
|
3
|
+
import ora from './index7.mjs';
|
|
4
|
+
import '../shared/ccjk.BAGoDD49.mjs';
|
|
5
|
+
import 'node:readline';
|
|
6
|
+
import 'stream';
|
|
7
|
+
import 'node:tty';
|
|
8
|
+
import 'node:process';
|
|
9
|
+
import 'node:async_hooks';
|
|
10
|
+
import '../shared/ccjk.Cjgrln_h.mjs';
|
|
11
|
+
import 'node:util';
|
|
12
|
+
import 'tty';
|
|
13
|
+
import 'fs';
|
|
14
|
+
import 'child_process';
|
|
15
|
+
import 'node:path';
|
|
16
|
+
import 'node:os';
|
|
17
|
+
import 'node:crypto';
|
|
18
|
+
import 'buffer';
|
|
19
|
+
import 'string_decoder';
|
|
4
20
|
|
|
5
21
|
const DEFAULT_TIMEOUT = 3e4;
|
|
6
22
|
const DEFAULT_RETRY_ATTEMPTS = 3;
|
|
@@ -655,7 +671,7 @@ async function quickProviderLaunch(shortcode, options = {}) {
|
|
|
655
671
|
const normalizedCode = shortcode.toLowerCase().trim();
|
|
656
672
|
console.log();
|
|
657
673
|
const spinner = ora({
|
|
658
|
-
text:
|
|
674
|
+
text: a.gray(`\u6B63\u5728\u67E5\u8BE2\u4F9B\u5E94\u5546 "${normalizedCode}"...`),
|
|
659
675
|
color: "cyan"
|
|
660
676
|
}).start();
|
|
661
677
|
try {
|
|
@@ -667,34 +683,34 @@ async function quickProviderLaunch(shortcode, options = {}) {
|
|
|
667
683
|
return await handleNewProvider(normalizedCode, options);
|
|
668
684
|
}
|
|
669
685
|
} catch (error) {
|
|
670
|
-
spinner.fail(
|
|
671
|
-
console.error(
|
|
686
|
+
spinner.fail(a.red("\u67E5\u8BE2\u5931\u8D25"));
|
|
687
|
+
console.error(a.gray(error instanceof Error ? error.message : "\u7F51\u7EDC\u9519\u8BEF"));
|
|
672
688
|
return false;
|
|
673
689
|
}
|
|
674
690
|
}
|
|
675
691
|
async function handleExistingProvider(provider, options) {
|
|
676
|
-
console.log(
|
|
692
|
+
console.log(a.cyan.bold(`
|
|
677
693
|
\u{1F680} \u5FEB\u901F\u914D\u7F6E: ${provider.name}`));
|
|
678
|
-
console.log(
|
|
679
|
-
console.log(` ${
|
|
680
|
-
console.log(` ${
|
|
694
|
+
console.log(a.gray("\u2500".repeat(40)));
|
|
695
|
+
console.log(` ${a.yellow("\u77ED\u7801:")} ${provider.shortcode}`);
|
|
696
|
+
console.log(` ${a.yellow("API URL:")} ${provider.apiUrl}`);
|
|
681
697
|
if (provider.description) {
|
|
682
|
-
console.log(` ${
|
|
698
|
+
console.log(` ${a.yellow("\u63CF\u8FF0:")} ${provider.description}`);
|
|
683
699
|
}
|
|
684
700
|
if (provider.verified) {
|
|
685
|
-
console.log(` ${
|
|
701
|
+
console.log(` ${a.green("\u2713")} \u5B98\u65B9\u9A8C\u8BC1`);
|
|
686
702
|
}
|
|
687
703
|
console.log();
|
|
688
704
|
const { confirmed } = await inquirer.prompt([
|
|
689
705
|
{
|
|
690
706
|
type: "confirm",
|
|
691
707
|
name: "confirmed",
|
|
692
|
-
message: `\u662F\u5426\u4F7F\u7528 ${
|
|
708
|
+
message: `\u662F\u5426\u4F7F\u7528 ${a.cyan(provider.name)} \u4F5C\u4E3A API \u4F9B\u5E94\u5546?`,
|
|
693
709
|
default: true
|
|
694
710
|
}
|
|
695
711
|
]);
|
|
696
712
|
if (!confirmed) {
|
|
697
|
-
console.log(
|
|
713
|
+
console.log(a.gray("\n\u5DF2\u53D6\u6D88\uFF0C\u8FDB\u5165\u4E3B\u83DC\u5355...\n"));
|
|
698
714
|
return false;
|
|
699
715
|
}
|
|
700
716
|
const config = await configureProvider(provider);
|
|
@@ -706,9 +722,9 @@ async function handleExistingProvider(provider, options) {
|
|
|
706
722
|
return false;
|
|
707
723
|
}
|
|
708
724
|
async function handleNewProvider(shortcode, options) {
|
|
709
|
-
console.log(
|
|
725
|
+
console.log(a.yellow(`
|
|
710
726
|
\u26A0\uFE0F \u4F9B\u5E94\u5546 "${shortcode}" \u5C1A\u672A\u6CE8\u518C`));
|
|
711
|
-
console.log(
|
|
727
|
+
console.log(a.gray("\u8BE5\u77ED\u7801\u5728\u4E91\u7AEF\u6CE8\u518C\u8868\u4E2D\u4E0D\u5B58\u5728\n"));
|
|
712
728
|
const { createNew } = await inquirer.prompt([
|
|
713
729
|
{
|
|
714
730
|
type: "confirm",
|
|
@@ -718,7 +734,7 @@ async function handleNewProvider(shortcode, options) {
|
|
|
718
734
|
}
|
|
719
735
|
]);
|
|
720
736
|
if (!createNew) {
|
|
721
|
-
console.log(
|
|
737
|
+
console.log(a.gray("\n\u5DF2\u53D6\u6D88\uFF0C\u8FDB\u5165\u4E3B\u83DC\u5355...\n"));
|
|
722
738
|
return false;
|
|
723
739
|
}
|
|
724
740
|
const { name, apiUrl } = await inquirer.prompt([
|
|
@@ -757,7 +773,7 @@ async function handleNewProvider(shortcode, options) {
|
|
|
757
773
|
apiUrl: apiUrl.trim()
|
|
758
774
|
});
|
|
759
775
|
if (result.success && result.data) {
|
|
760
|
-
spinner.succeed(
|
|
776
|
+
spinner.succeed(a.green("\u4F9B\u5E94\u5546\u6CE8\u518C\u6210\u529F!"));
|
|
761
777
|
const config = await configureProvider(result.data, options);
|
|
762
778
|
if (config) {
|
|
763
779
|
await saveProviderConfig(config);
|
|
@@ -765,8 +781,8 @@ async function handleNewProvider(shortcode, options) {
|
|
|
765
781
|
return true;
|
|
766
782
|
}
|
|
767
783
|
} else {
|
|
768
|
-
spinner.fail(
|
|
769
|
-
console.error(
|
|
784
|
+
spinner.fail(a.red("\u6CE8\u518C\u5931\u8D25"));
|
|
785
|
+
console.error(a.gray(result.error?.message || "\u672A\u77E5\u9519\u8BEF"));
|
|
770
786
|
const { continueLocal } = await inquirer.prompt([
|
|
771
787
|
{
|
|
772
788
|
type: "confirm",
|
|
@@ -792,14 +808,14 @@ async function handleNewProvider(shortcode, options) {
|
|
|
792
808
|
}
|
|
793
809
|
}
|
|
794
810
|
} catch (error) {
|
|
795
|
-
spinner.fail(
|
|
796
|
-
console.error(
|
|
811
|
+
spinner.fail(a.red("\u6CE8\u518C\u5931\u8D25"));
|
|
812
|
+
console.error(a.gray(error instanceof Error ? error.message : "\u7F51\u7EDC\u9519\u8BEF"));
|
|
797
813
|
}
|
|
798
814
|
return false;
|
|
799
815
|
}
|
|
800
816
|
async function configureProvider(provider, _options) {
|
|
801
|
-
console.log(
|
|
802
|
-
console.log(
|
|
817
|
+
console.log(a.cyan("\n\u{1F4DD} \u914D\u7F6E API \u51ED\u8BC1"));
|
|
818
|
+
console.log(a.gray("\u2500".repeat(40)));
|
|
803
819
|
const { apiKey } = await inquirer.prompt([
|
|
804
820
|
{
|
|
805
821
|
type: "password",
|
|
@@ -828,7 +844,7 @@ async function configureProvider(provider, _options) {
|
|
|
828
844
|
value: m
|
|
829
845
|
})),
|
|
830
846
|
{
|
|
831
|
-
name:
|
|
847
|
+
name: a.gray("\u81EA\u5B9A\u4E49..."),
|
|
832
848
|
value: "__custom__"
|
|
833
849
|
}
|
|
834
850
|
]
|
|
@@ -878,7 +894,7 @@ async function saveProviderConfig(config) {
|
|
|
878
894
|
const spinner = ora("\u6B63\u5728\u4FDD\u5B58\u914D\u7F6E...").start();
|
|
879
895
|
try {
|
|
880
896
|
const { readJsonFile, writeJsonFile } = await import('./fs-operations.mjs');
|
|
881
|
-
const { join } = await import('
|
|
897
|
+
const { join } = await import('./index8.mjs');
|
|
882
898
|
const { homedir } = await import('node:os');
|
|
883
899
|
const { existsSync, mkdirSync } = await import('node:fs');
|
|
884
900
|
const claudeDir = join(homedir(), ".claude");
|
|
@@ -907,27 +923,27 @@ async function saveProviderConfig(config) {
|
|
|
907
923
|
...envConfig
|
|
908
924
|
};
|
|
909
925
|
writeJsonFile(settingsPath, settings);
|
|
910
|
-
spinner.succeed(
|
|
926
|
+
spinner.succeed(a.green("\u914D\u7F6E\u5DF2\u4FDD\u5B58"));
|
|
911
927
|
} catch (error) {
|
|
912
|
-
spinner.fail(
|
|
913
|
-
console.log(
|
|
914
|
-
console.log(
|
|
915
|
-
console.log(`${
|
|
916
|
-
console.log(`${
|
|
917
|
-
console.log(
|
|
928
|
+
spinner.fail(a.red("\u4FDD\u5B58\u5931\u8D25"));
|
|
929
|
+
console.log(a.yellow("\n\u8BF7\u624B\u52A8\u914D\u7F6E:"));
|
|
930
|
+
console.log(a.gray("\u2500".repeat(40)));
|
|
931
|
+
console.log(`${a.cyan("API URL:")} ${config.provider.apiUrl}`);
|
|
932
|
+
console.log(`${a.cyan("Model:")} ${config.model}`);
|
|
933
|
+
console.log(a.gray('\n\u8FD0\u884C "ccjk api" \u8FDB\u884C\u624B\u52A8\u914D\u7F6E'));
|
|
918
934
|
throw error;
|
|
919
935
|
}
|
|
920
936
|
}
|
|
921
937
|
function showSuccessMessage(config) {
|
|
922
938
|
console.log();
|
|
923
|
-
console.log(
|
|
924
|
-
console.log(
|
|
925
|
-
console.log(` ${
|
|
926
|
-
console.log(` ${
|
|
927
|
-
console.log(` ${
|
|
939
|
+
console.log(a.green.bold("\u2705 \u914D\u7F6E\u5B8C\u6210!"));
|
|
940
|
+
console.log(a.gray("\u2500".repeat(40)));
|
|
941
|
+
console.log(` ${a.yellow("\u4F9B\u5E94\u5546:")} ${config.provider.name}`);
|
|
942
|
+
console.log(` ${a.yellow("API URL:")} ${config.provider.apiUrl}`);
|
|
943
|
+
console.log(` ${a.yellow("\u6A21\u578B:")} ${config.model}`);
|
|
928
944
|
console.log();
|
|
929
|
-
console.log(
|
|
930
|
-
console.log(
|
|
945
|
+
console.log(a.gray("\u73B0\u5728\u53EF\u4EE5\u5F00\u59CB\u4F7F\u7528 Claude Code \u4E86"));
|
|
946
|
+
console.log(a.gray('\u8FD0\u884C "claude" \u542F\u52A8\u5BF9\u8BDD'));
|
|
931
947
|
console.log();
|
|
932
948
|
}
|
|
933
949
|
|
|
@@ -1,98 +1,110 @@
|
|
|
1
|
-
import
|
|
2
|
-
import inquirer from '
|
|
3
|
-
import { version } from './package.mjs';
|
|
1
|
+
import a from './index2.mjs';
|
|
2
|
+
import { i as inquirer } from './index3.mjs';
|
|
4
3
|
import { detectSmartDefaults } from './smart-defaults.mjs';
|
|
5
|
-
import { i18n } from './
|
|
4
|
+
import { i18n } from './index5.mjs';
|
|
6
5
|
import { updateZcfConfig } from './ccjk-config.mjs';
|
|
6
|
+
import { g as getRuntimeVersion } from '../shared/ccjk.DSpGBMwx.mjs';
|
|
7
7
|
import { i as init } from './init.mjs';
|
|
8
|
+
import '../shared/ccjk.BAGoDD49.mjs';
|
|
9
|
+
import 'node:readline';
|
|
10
|
+
import 'stream';
|
|
11
|
+
import 'node:tty';
|
|
12
|
+
import 'node:process';
|
|
13
|
+
import 'node:async_hooks';
|
|
14
|
+
import '../shared/ccjk.Cjgrln_h.mjs';
|
|
15
|
+
import 'node:util';
|
|
16
|
+
import 'tty';
|
|
17
|
+
import 'fs';
|
|
18
|
+
import 'child_process';
|
|
19
|
+
import 'node:path';
|
|
20
|
+
import 'node:os';
|
|
21
|
+
import 'node:crypto';
|
|
22
|
+
import 'buffer';
|
|
23
|
+
import 'string_decoder';
|
|
8
24
|
import 'node:child_process';
|
|
9
25
|
import 'node:fs';
|
|
10
|
-
import 'node:os';
|
|
11
|
-
import 'pathe';
|
|
12
26
|
import './platform.mjs';
|
|
13
|
-
import '
|
|
14
|
-
import '
|
|
15
|
-
import '
|
|
27
|
+
import './main.mjs';
|
|
28
|
+
import 'module';
|
|
29
|
+
import 'node:stream';
|
|
30
|
+
import '../shared/ccjk.bQ7Dh1g4.mjs';
|
|
31
|
+
import '../shared/ccjk.BrPUmTqm.mjs';
|
|
16
32
|
import 'node:url';
|
|
17
|
-
import '
|
|
18
|
-
import '
|
|
19
|
-
import 'smol-toml';
|
|
33
|
+
import '../shared/ccjk.BBtCGd_g.mjs';
|
|
34
|
+
import './index6.mjs';
|
|
20
35
|
import './constants.mjs';
|
|
21
36
|
import './fs-operations.mjs';
|
|
22
|
-
import 'node:crypto';
|
|
23
37
|
import 'node:fs/promises';
|
|
24
38
|
import './json-config.mjs';
|
|
25
|
-
import '
|
|
39
|
+
import '../shared/ccjk.RyizuzOI.mjs';
|
|
26
40
|
import './codex.mjs';
|
|
27
|
-
import '
|
|
28
|
-
import '
|
|
41
|
+
import './index7.mjs';
|
|
42
|
+
import '../shared/ccjk.CxpGa6MC.mjs';
|
|
29
43
|
import './config.mjs';
|
|
30
44
|
import './claude-config.mjs';
|
|
31
45
|
import '../shared/ccjk.BiCrMV5O.mjs';
|
|
32
46
|
import '../shared/ccjk.BFQ7yr5S.mjs';
|
|
33
47
|
import './prompts.mjs';
|
|
34
|
-
import '../shared/ccjk.
|
|
35
|
-
import '
|
|
36
|
-
import '../shared/ccjk.Dk1HDseQ.mjs';
|
|
48
|
+
import '../shared/ccjk.DOwtZMk8.mjs';
|
|
49
|
+
import '../shared/ccjk.BnpWvs9V.mjs';
|
|
37
50
|
import './banner.mjs';
|
|
38
51
|
import './config2.mjs';
|
|
39
|
-
import 'node:util';
|
|
40
52
|
import './auto-updater.mjs';
|
|
41
53
|
import './version-checker.mjs';
|
|
42
|
-
import '
|
|
43
|
-
import '../shared/ccjk.
|
|
44
|
-
import '../shared/ccjk.j4uut26D.mjs';
|
|
54
|
+
import '../shared/ccjk.BSYWk9ML.mjs';
|
|
55
|
+
import '../shared/ccjk.BIxuVL3_.mjs';
|
|
45
56
|
import './installer.mjs';
|
|
46
|
-
import '../shared/ccjk.
|
|
57
|
+
import '../shared/ccjk._dESH4Rk.mjs';
|
|
47
58
|
|
|
59
|
+
const ccjkVersion = getRuntimeVersion();
|
|
48
60
|
function displayHeader() {
|
|
49
61
|
console.log("");
|
|
50
|
-
console.log(
|
|
51
|
-
console.log(
|
|
52
|
-
console.log(
|
|
62
|
+
console.log(a.bold.green("\u26A1 CCJK Quick Setup"));
|
|
63
|
+
console.log(a.gray(` v${ccjkVersion} \u2022 One-click configuration`));
|
|
64
|
+
console.log(a.gray(` ${"\u2500".repeat(50)}`));
|
|
53
65
|
console.log("");
|
|
54
66
|
}
|
|
55
67
|
function displayStep(step, total, message) {
|
|
56
|
-
const prefix =
|
|
68
|
+
const prefix = a.green(`[${step}/${total}]`);
|
|
57
69
|
console.log(`${prefix} ${message}`);
|
|
58
70
|
}
|
|
59
71
|
function displaySuccess(result, defaults) {
|
|
60
72
|
const isZh = i18n.language === "zh-CN";
|
|
61
73
|
console.log("");
|
|
62
|
-
console.log(
|
|
63
|
-
console.log(
|
|
74
|
+
console.log(a.bold.green("\u2705 Setup Complete!"));
|
|
75
|
+
console.log(a.gray(` ${"\u2500".repeat(50)}`));
|
|
64
76
|
console.log("");
|
|
65
|
-
console.log(
|
|
66
|
-
console.log(` \u2022 MCP Services: ${
|
|
67
|
-
console.log(` \u2022 Skills: ${
|
|
68
|
-
console.log(` \u2022 Agents: ${
|
|
69
|
-
console.log(` \u2022 Provider: ${
|
|
77
|
+
console.log(a.bold("\u{1F4E6} Configured:"));
|
|
78
|
+
console.log(` \u2022 MCP Services: ${a.green(defaults.mcpServices.join(", "))}`);
|
|
79
|
+
console.log(` \u2022 Skills: ${a.green(defaults.skills.length)} enabled`);
|
|
80
|
+
console.log(` \u2022 Agents: ${a.green(defaults.agents.length)} ready`);
|
|
81
|
+
console.log(` \u2022 Provider: ${a.green(defaults.apiProvider || "anthropic")}`);
|
|
70
82
|
if (defaults.recommendedHooks.length > 0) {
|
|
71
|
-
console.log(` \u2022 Hooks: ${
|
|
83
|
+
console.log(` \u2022 Hooks: ${a.green(defaults.recommendedHooks.join(", "))}`);
|
|
72
84
|
}
|
|
73
85
|
console.log("");
|
|
74
|
-
console.log(
|
|
86
|
+
console.log(a.bold.green("\u23F1\uFE0F ") + a.white(`Completed in ${result.duration}s`));
|
|
75
87
|
console.log("");
|
|
76
|
-
console.log(
|
|
77
|
-
console.log(` 1. ${
|
|
78
|
-
console.log(` 2. ${
|
|
79
|
-
console.log(` 3. ${
|
|
88
|
+
console.log(a.bold("\u{1F3AF} Quick Start:"));
|
|
89
|
+
console.log(` 1. ${a.gray("Open your project directory")}`);
|
|
90
|
+
console.log(` 2. ${a.green("claude")}`);
|
|
91
|
+
console.log(` 3. ${a.gray("Start coding with AI assistance!")}`);
|
|
80
92
|
console.log("");
|
|
81
|
-
console.log(
|
|
93
|
+
console.log(a.gray(isZh ? '\u{1F4A1} \u8FD0\u884C "ccjk menu" \u83B7\u53D6\u66F4\u591A\u9009\u9879' : '\u{1F4A1} Run "ccjk menu" for more options'));
|
|
82
94
|
console.log("");
|
|
83
95
|
}
|
|
84
96
|
function displayError(result) {
|
|
85
97
|
console.log("");
|
|
86
|
-
console.log(
|
|
87
|
-
console.log(
|
|
98
|
+
console.log(a.bold.red("\u274C Setup Failed"));
|
|
99
|
+
console.log(a.gray(` ${"\u2500".repeat(50)}`));
|
|
88
100
|
console.log("");
|
|
89
101
|
if (result.errors) {
|
|
90
102
|
for (const error of result.errors) {
|
|
91
|
-
console.log(
|
|
103
|
+
console.log(a.red(` \u2022 ${error}`));
|
|
92
104
|
}
|
|
93
105
|
}
|
|
94
106
|
console.log("");
|
|
95
|
-
console.log(
|
|
107
|
+
console.log(a.gray("\u{1F4A1} Run with verbose mode for details: npx ccjk quick-setup --verbose"));
|
|
96
108
|
console.log("");
|
|
97
109
|
}
|
|
98
110
|
async function promptProvider() {
|
|
@@ -268,15 +280,15 @@ async function quickSetup(options = {}) {
|
|
|
268
280
|
displayStep(1, 4, "Detecting environment...");
|
|
269
281
|
const defaults = await detectSmartDefaults();
|
|
270
282
|
result.steps.detection = true;
|
|
271
|
-
console.log(` ${
|
|
272
|
-
console.log(` ${
|
|
283
|
+
console.log(` ${a.gray("Platform:")} ${a.green(defaults.platform)}`);
|
|
284
|
+
console.log(` ${a.gray("Code Tool:")} ${a.green(defaults.codeToolType || "claude-code")}`);
|
|
273
285
|
if (defaults.projectContext) {
|
|
274
286
|
const ctx = defaults.projectContext;
|
|
275
287
|
const parts = [ctx.language, ctx.framework !== "none" ? ctx.framework : null, ctx.testRunner !== "none" ? ctx.testRunner : null, ctx.packageManager !== "none" ? ctx.packageManager : null].filter(Boolean);
|
|
276
|
-
console.log(` ${
|
|
277
|
-
if (ctx.runtime.isHeadless) console.log(` ${
|
|
278
|
-
if (ctx.runtime.isContainer) console.log(` ${
|
|
279
|
-
if (ctx.runtime.isCI) console.log(` ${
|
|
288
|
+
console.log(` ${a.gray("Project:")} ${a.green(parts.join(" + "))}`);
|
|
289
|
+
if (ctx.runtime.isHeadless) console.log(` ${a.gray("Runtime:")} ${a.yellow("headless server")}`);
|
|
290
|
+
if (ctx.runtime.isContainer) console.log(` ${a.gray("Runtime:")} ${a.yellow("container")}`);
|
|
291
|
+
if (ctx.runtime.isCI) console.log(` ${a.gray("Runtime:")} ${a.yellow("CI/CD")}`);
|
|
280
292
|
}
|
|
281
293
|
console.log("");
|
|
282
294
|
displayStep(2, 4, "Configuring API key...");
|
|
@@ -285,7 +297,7 @@ async function quickSetup(options = {}) {
|
|
|
285
297
|
if (options.apiKey) {
|
|
286
298
|
apiKey = options.apiKey;
|
|
287
299
|
provider = options.provider || defaults.apiProvider || "anthropic";
|
|
288
|
-
console.log(` ${
|
|
300
|
+
console.log(` ${a.gray("Using provided API key")}`);
|
|
289
301
|
} else if (defaults.apiKey && !options.skipPrompt) {
|
|
290
302
|
const isZh = i18n.language === "zh-CN";
|
|
291
303
|
const { useDetected } = await inquirer.prompt({
|
|
@@ -297,7 +309,7 @@ async function quickSetup(options = {}) {
|
|
|
297
309
|
if (useDetected) {
|
|
298
310
|
apiKey = defaults.apiKey;
|
|
299
311
|
provider = defaults.apiProvider || "anthropic";
|
|
300
|
-
console.log(` ${
|
|
312
|
+
console.log(` ${a.gray("Using detected API key")}`);
|
|
301
313
|
} else {
|
|
302
314
|
provider = await promptProvider();
|
|
303
315
|
apiKey = await promptApiKey(provider);
|
|
@@ -305,13 +317,13 @@ async function quickSetup(options = {}) {
|
|
|
305
317
|
} else if (defaults.apiKey && options.skipPrompt) {
|
|
306
318
|
apiKey = defaults.apiKey;
|
|
307
319
|
provider = defaults.apiProvider || "anthropic";
|
|
308
|
-
console.log(` ${
|
|
320
|
+
console.log(` ${a.gray("Using detected API key")}`);
|
|
309
321
|
} else {
|
|
310
322
|
provider = options.provider || await promptProvider();
|
|
311
323
|
apiKey = await promptApiKey(provider);
|
|
312
324
|
}
|
|
313
325
|
result.steps.apiKey = true;
|
|
314
|
-
console.log(` ${
|
|
326
|
+
console.log(` ${a.gray("Provider:")} ${a.green(provider)}`);
|
|
315
327
|
console.log("");
|
|
316
328
|
let customMcpServices;
|
|
317
329
|
let customSkills;
|
|
@@ -350,15 +362,15 @@ async function quickSetup(options = {}) {
|
|
|
350
362
|
!hasApiKey
|
|
351
363
|
);
|
|
352
364
|
updateZcfConfig({
|
|
353
|
-
version,
|
|
365
|
+
version: ccjkVersion,
|
|
354
366
|
preferredLang: lang,
|
|
355
367
|
templateLang: lang,
|
|
356
368
|
aiOutputLang: lang,
|
|
357
369
|
codeToolType: defaults.codeToolType || "claude-code"
|
|
358
370
|
});
|
|
359
|
-
console.log(` ${
|
|
360
|
-
console.log(` ${
|
|
361
|
-
console.log(` ${
|
|
371
|
+
console.log(` ${a.gray("MCP Services:")} ${a.green(finalMcpServices.join(", "))}${customMcpServices ? a.yellow(" (custom)") : ""}`);
|
|
372
|
+
console.log(` ${a.gray("Skills:")} ${a.green(finalSkills.join(", "))}${customSkills ? a.yellow(" (custom)") : ""}`);
|
|
373
|
+
console.log(` ${a.gray("Agents:")} ${a.green(finalAgents.join(", "))}${customAgents ? a.yellow(" (custom)") : ""}`);
|
|
362
374
|
console.log("");
|
|
363
375
|
displayStep(4, 4, "Executing installation...");
|
|
364
376
|
await init(initOptions);
|
|
@@ -371,7 +383,7 @@ async function quickSetup(options = {}) {
|
|
|
371
383
|
});
|
|
372
384
|
} catch (error) {
|
|
373
385
|
const msg = error instanceof Error ? error.message : String(error);
|
|
374
|
-
console.log(
|
|
386
|
+
console.log(a.yellow(` \u26A0 Skills installation skipped: ${msg}`));
|
|
375
387
|
}
|
|
376
388
|
}
|
|
377
389
|
result.steps.installation = true;
|
|
@@ -380,7 +392,7 @@ async function quickSetup(options = {}) {
|
|
|
380
392
|
const { installRecommendedHooks } = await import('./hook-installer.mjs');
|
|
381
393
|
const hooksAdded = await installRecommendedHooks(defaults.recommendedHooks);
|
|
382
394
|
if (hooksAdded > 0) {
|
|
383
|
-
console.log(` ${
|
|
395
|
+
console.log(` ${a.green("\u2713")} Installed ${a.cyan(String(hooksAdded))} recommended hooks`);
|
|
384
396
|
}
|
|
385
397
|
} catch {
|
|
386
398
|
}
|
package/dist/chunks/remote.mjs
CHANGED
|
@@ -1,24 +1,33 @@
|
|
|
1
1
|
import { spawn } from 'child_process';
|
|
2
2
|
import { existsSync, readFileSync, mkdirSync, writeFileSync } from 'fs';
|
|
3
|
-
import inquirer from '
|
|
4
|
-
import ora from '
|
|
3
|
+
import { i as inquirer } from './index3.mjs';
|
|
4
|
+
import ora from './index7.mjs';
|
|
5
5
|
import { homedir } from 'os';
|
|
6
6
|
import { join } from 'path';
|
|
7
|
-
import { i18n } from './
|
|
8
|
-
import { i as isDeviceBound, g as getBindingStatus, b as bindDevice } from '../shared/ccjk.
|
|
9
|
-
import { l as logger } from '../shared/ccjk.
|
|
10
|
-
import 'node:
|
|
7
|
+
import { i18n } from './index5.mjs';
|
|
8
|
+
import { i as isDeviceBound, g as getBindingStatus, b as bindDevice } from '../shared/ccjk.BDKUdmLk.mjs';
|
|
9
|
+
import { l as logger } from '../shared/ccjk.DG_o24cZ.mjs';
|
|
10
|
+
import 'node:readline';
|
|
11
|
+
import '../shared/ccjk.BAGoDD49.mjs';
|
|
12
|
+
import 'stream';
|
|
13
|
+
import 'node:tty';
|
|
11
14
|
import 'node:process';
|
|
12
|
-
import 'node:
|
|
13
|
-
import '
|
|
14
|
-
import '
|
|
15
|
-
import '
|
|
15
|
+
import 'node:async_hooks';
|
|
16
|
+
import '../shared/ccjk.Cjgrln_h.mjs';
|
|
17
|
+
import 'node:util';
|
|
18
|
+
import 'tty';
|
|
19
|
+
import 'node:path';
|
|
16
20
|
import 'node:os';
|
|
17
|
-
import './fs-operations.mjs';
|
|
18
21
|
import 'node:crypto';
|
|
22
|
+
import 'buffer';
|
|
23
|
+
import 'string_decoder';
|
|
24
|
+
import 'node:fs';
|
|
25
|
+
import 'node:url';
|
|
26
|
+
import '../shared/ccjk.bQ7Dh1g4.mjs';
|
|
27
|
+
import './fs-operations.mjs';
|
|
19
28
|
import 'node:fs/promises';
|
|
20
29
|
import 'node:buffer';
|
|
21
|
-
import '
|
|
30
|
+
import './index2.mjs';
|
|
22
31
|
|
|
23
32
|
const DAEMON_CONFIG_PATH = join(homedir(), ".ccjk", "daemon.json");
|
|
24
33
|
async function setupRemote(options = {}) {
|