ccjk 12.0.0 → 12.0.2
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 +22 -11
- 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 +41 -42
- 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 +42 -32
- package/dist/chunks/ccu.mjs +16 -12
- package/dist/chunks/check-updates.mjs +30 -19
- 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 +58 -45
- package/dist/chunks/codex-provider-manager.mjs +29 -16
- 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 +12 -13
- package/dist/chunks/config-switch.mjs +66 -53
- 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 +68 -54
- package/dist/chunks/evolution.mjs +37 -38
- package/dist/chunks/features.mjs +103 -92
- 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 +173 -173
- 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 +61 -48
- package/dist/chunks/mcp.mjs +140 -127
- 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 +95 -95
- package/dist/chunks/notification.mjs +151 -141
- package/dist/chunks/onboarding.mjs +26 -15
- package/dist/chunks/package.mjs +1 -1
- package/dist/chunks/paradigm.mjs +24 -23
- package/dist/chunks/permission-manager.mjs +10 -11
- 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 +36 -25
- 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 +71 -60
- 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 +39 -28
- package/dist/chunks/upgrade-manager.mjs +24 -18
- 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 +41 -31
- 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.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 -30
- package/dist/shared/ccjk.DHbrGcgg.mjs +0 -13
- package/dist/shared/ccjk.DntgA8fQ.mjs +0 -42
|
@@ -1,19 +1,22 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { i18n } from './
|
|
1
|
+
import a from './index2.mjs';
|
|
2
|
+
import { i18n } from './index5.mjs';
|
|
3
3
|
import { createHash } from 'node:crypto';
|
|
4
4
|
import { existsSync, createWriteStream } from 'node:fs';
|
|
5
5
|
import { readFile, mkdir, rm } from 'node:fs/promises';
|
|
6
6
|
import { homedir } from 'node:os';
|
|
7
7
|
import { Readable } from 'node:stream';
|
|
8
8
|
import { pipeline } from 'node:stream/promises';
|
|
9
|
-
import { join } from 'pathe';
|
|
10
9
|
import { extract } from 'tar';
|
|
11
|
-
import { exec } from '
|
|
10
|
+
import { exec as q } from './main.mjs';
|
|
12
11
|
import { writeFileAtomicAsync, exists, readJsonFile } from './fs-operations.mjs';
|
|
12
|
+
import { j as join } from '../shared/ccjk.bQ7Dh1g4.mjs';
|
|
13
|
+
import '../shared/ccjk.BAGoDD49.mjs';
|
|
13
14
|
import 'node:process';
|
|
14
15
|
import 'node:url';
|
|
15
|
-
import '
|
|
16
|
-
import '
|
|
16
|
+
import 'module';
|
|
17
|
+
import 'node:child_process';
|
|
18
|
+
import 'node:path';
|
|
19
|
+
import 'node:readline';
|
|
17
20
|
|
|
18
21
|
const DEFAULT_REGISTRY_URL = "https://registry.api.claudehome.cn/v1";
|
|
19
22
|
const DEFAULT_CACHE_CONFIG = {
|
|
@@ -416,7 +419,7 @@ async function extractPackage(archivePath, destDir) {
|
|
|
416
419
|
// Strip top-level directory
|
|
417
420
|
});
|
|
418
421
|
} else if (archivePath.endsWith(".zip")) {
|
|
419
|
-
const result = await
|
|
422
|
+
const result = await q("unzip", ["-q", "-o", archivePath, "-d", destDir]);
|
|
420
423
|
if (result.exitCode !== 0) {
|
|
421
424
|
throw new Error(`Unzip failed: ${result.stderr || "Unknown error"}`);
|
|
422
425
|
}
|
|
@@ -438,7 +441,7 @@ async function runPostInstall(installPath, manifest) {
|
|
|
438
441
|
if (!exists(scriptPath)) {
|
|
439
442
|
throw new Error(`Post-install script not found: ${scriptPath}`);
|
|
440
443
|
}
|
|
441
|
-
const result = await
|
|
444
|
+
const result = await q("node", [scriptPath], {
|
|
442
445
|
nodeOptions: {
|
|
443
446
|
cwd: installPath
|
|
444
447
|
}
|
|
@@ -702,27 +705,27 @@ async function checkForUpdates() {
|
|
|
702
705
|
|
|
703
706
|
async function searchCommand(query, _options) {
|
|
704
707
|
try {
|
|
705
|
-
console.log(
|
|
708
|
+
console.log(a.green(i18n.t("marketplace:searching", { query })));
|
|
706
709
|
const results = await searchPackages({ query });
|
|
707
710
|
if (results.packages.length === 0) {
|
|
708
|
-
console.log(
|
|
711
|
+
console.log(a.yellow(i18n.t("marketplace:noResults")));
|
|
709
712
|
return;
|
|
710
713
|
}
|
|
711
|
-
console.log(
|
|
714
|
+
console.log(a.green(i18n.t("marketplace:searchResults", { count: results.packages.length })));
|
|
712
715
|
console.log();
|
|
713
716
|
for (const pkg of results.packages) {
|
|
714
717
|
const installed = await isPackageInstalled(pkg.name);
|
|
715
|
-
const installedMark = installed ?
|
|
716
|
-
console.log(`${installedMark} ${
|
|
718
|
+
const installedMark = installed ? a.green("\u2713") : a.gray("\u25CB");
|
|
719
|
+
console.log(`${installedMark} ${a.bold(pkg.name)} ${a.gray(`v${pkg.version}`)}`);
|
|
717
720
|
console.log(` ${pkg.description.en || Object.values(pkg.description)[0]}`);
|
|
718
|
-
console.log(` ${
|
|
721
|
+
console.log(` ${a.gray(i18n.t("marketplace:packageInfo.category"))}: ${pkg.category}`);
|
|
719
722
|
if (pkg.verified === "verified") {
|
|
720
|
-
console.log(` ${
|
|
723
|
+
console.log(` ${a.green("\u2713")} ${i18n.t("marketplace:packageInfo.verified")}`);
|
|
721
724
|
}
|
|
722
725
|
console.log();
|
|
723
726
|
}
|
|
724
727
|
} catch (err) {
|
|
725
|
-
console.error(
|
|
728
|
+
console.error(a.red(i18n.t("marketplace:searchFailed")));
|
|
726
729
|
console.error(err);
|
|
727
730
|
throw err;
|
|
728
731
|
}
|
|
@@ -730,33 +733,33 @@ async function searchCommand(query, _options) {
|
|
|
730
733
|
async function installCommand(packageName, options) {
|
|
731
734
|
try {
|
|
732
735
|
if (await isPackageInstalled(packageName)) {
|
|
733
|
-
console.log(
|
|
736
|
+
console.log(a.yellow(`Package '${packageName}' is already installed`));
|
|
734
737
|
return;
|
|
735
738
|
}
|
|
736
739
|
const pkg = await getPackage(packageName);
|
|
737
740
|
if (!pkg) {
|
|
738
|
-
console.error(
|
|
741
|
+
console.error(a.red(i18n.t("marketplace:packageNotFound", { name: packageName })));
|
|
739
742
|
throw new Error(`Package not found: ${packageName}`);
|
|
740
743
|
}
|
|
741
|
-
console.log(
|
|
744
|
+
console.log(a.green(i18n.t("marketplace:installing", { name: packageName })));
|
|
742
745
|
const result = await installPackage(packageName, {
|
|
743
746
|
force: options.force,
|
|
744
747
|
skipVerification: options.skipVerification
|
|
745
748
|
});
|
|
746
749
|
if (result.success) {
|
|
747
|
-
console.log(
|
|
750
|
+
console.log(a.green(i18n.t("marketplace:installSuccess", { name: packageName })));
|
|
748
751
|
if (result.installedPath) {
|
|
749
|
-
console.log(
|
|
752
|
+
console.log(a.gray(`${i18n.t("marketplace:installedAt")}: ${result.installedPath}`));
|
|
750
753
|
}
|
|
751
754
|
} else {
|
|
752
|
-
console.error(
|
|
755
|
+
console.error(a.red(i18n.t("marketplace:installFailed", { name: packageName })));
|
|
753
756
|
if (result.error) {
|
|
754
|
-
console.error(
|
|
757
|
+
console.error(a.red(i18n.t("marketplace:errors.installError", { error: result.error })));
|
|
755
758
|
}
|
|
756
759
|
throw new Error(`Install failed: ${packageName}`);
|
|
757
760
|
}
|
|
758
761
|
} catch (err) {
|
|
759
|
-
console.error(
|
|
762
|
+
console.error(a.red(i18n.t("marketplace:installFailed", { name: packageName })));
|
|
760
763
|
console.error(err);
|
|
761
764
|
throw err;
|
|
762
765
|
}
|
|
@@ -764,24 +767,24 @@ async function installCommand(packageName, options) {
|
|
|
764
767
|
async function uninstallCommand(packageName, options) {
|
|
765
768
|
try {
|
|
766
769
|
if (!await isPackageInstalled(packageName)) {
|
|
767
|
-
console.error(
|
|
770
|
+
console.error(a.red(i18n.t("marketplace:packageNotInstalled", { name: packageName })));
|
|
768
771
|
throw new Error(`Package not installed: ${packageName}`);
|
|
769
772
|
}
|
|
770
|
-
console.log(
|
|
773
|
+
console.log(a.green(i18n.t("marketplace:uninstalling", { name: packageName })));
|
|
771
774
|
const result = await uninstallPackage(packageName, {
|
|
772
775
|
force: options.force
|
|
773
776
|
});
|
|
774
777
|
if (result.success) {
|
|
775
|
-
console.log(
|
|
778
|
+
console.log(a.green(i18n.t("marketplace:uninstallSuccess", { name: packageName })));
|
|
776
779
|
} else {
|
|
777
|
-
console.error(
|
|
780
|
+
console.error(a.red(i18n.t("marketplace:uninstallFailed", { name: packageName })));
|
|
778
781
|
if (result.error) {
|
|
779
|
-
console.error(
|
|
782
|
+
console.error(a.red(i18n.t("marketplace:errors.uninstallError", { error: result.error })));
|
|
780
783
|
}
|
|
781
784
|
throw new Error(`Uninstall failed: ${packageName}`);
|
|
782
785
|
}
|
|
783
786
|
} catch (err) {
|
|
784
|
-
console.error(
|
|
787
|
+
console.error(a.red(i18n.t("marketplace:uninstallFailed", { name: packageName })));
|
|
785
788
|
console.error(err);
|
|
786
789
|
throw err;
|
|
787
790
|
}
|
|
@@ -789,34 +792,34 @@ async function uninstallCommand(packageName, options) {
|
|
|
789
792
|
async function updateCommand(packageName, _options) {
|
|
790
793
|
try {
|
|
791
794
|
if (packageName) {
|
|
792
|
-
console.log(
|
|
795
|
+
console.log(a.green(i18n.t("marketplace:updating", { name: packageName })));
|
|
793
796
|
const result = await updatePackage(packageName);
|
|
794
797
|
if (result.success) {
|
|
795
|
-
console.log(
|
|
798
|
+
console.log(a.green(i18n.t("marketplace:updateSuccess", { name: packageName })));
|
|
796
799
|
} else {
|
|
797
|
-
console.error(
|
|
800
|
+
console.error(a.red(i18n.t("marketplace:updateFailed", { name: packageName })));
|
|
798
801
|
if (result.error) {
|
|
799
|
-
console.error(
|
|
802
|
+
console.error(a.red(result.error));
|
|
800
803
|
}
|
|
801
804
|
throw new Error(`Update failed: ${packageName}`);
|
|
802
805
|
}
|
|
803
806
|
} else {
|
|
804
|
-
console.log(
|
|
807
|
+
console.log(a.green(i18n.t("marketplace:checkingUpdates")));
|
|
805
808
|
const updates = await checkForUpdates();
|
|
806
809
|
if (updates.length === 0) {
|
|
807
|
-
console.log(
|
|
810
|
+
console.log(a.green(i18n.t("marketplace:noUpdates")));
|
|
808
811
|
return;
|
|
809
812
|
}
|
|
810
|
-
console.log(
|
|
813
|
+
console.log(a.yellow(i18n.t("marketplace:updatesAvailable", { count: updates.length })));
|
|
811
814
|
console.log();
|
|
812
815
|
for (const update of updates) {
|
|
813
|
-
console.log(` ${
|
|
816
|
+
console.log(` ${a.bold(update.id)}: ${a.gray(update.currentVersion)} \u2192 ${a.green(update.latestVersion)}`);
|
|
814
817
|
}
|
|
815
818
|
console.log();
|
|
816
|
-
console.log(
|
|
819
|
+
console.log(a.gray(i18n.t("marketplace:updateHint")));
|
|
817
820
|
}
|
|
818
821
|
} catch (err) {
|
|
819
|
-
console.error(
|
|
822
|
+
console.error(a.red(i18n.t("marketplace:updateCheckFailed")));
|
|
820
823
|
console.error(err);
|
|
821
824
|
throw err;
|
|
822
825
|
}
|
|
@@ -825,20 +828,20 @@ async function listCommand(_options) {
|
|
|
825
828
|
try {
|
|
826
829
|
const installedList = await getInstalledPackages();
|
|
827
830
|
if (installedList.length === 0) {
|
|
828
|
-
console.log(
|
|
831
|
+
console.log(a.yellow(i18n.t("marketplace:noInstalled")));
|
|
829
832
|
return;
|
|
830
833
|
}
|
|
831
|
-
console.log(
|
|
834
|
+
console.log(a.green(i18n.t("marketplace:installedPackages", { count: installedList.length })));
|
|
832
835
|
console.log();
|
|
833
836
|
for (const installed of installedList) {
|
|
834
837
|
const pkg = installed.package;
|
|
835
|
-
console.log(`${
|
|
838
|
+
console.log(`${a.green("\u2713")} ${a.bold(pkg.name)} ${a.gray(`v${pkg.version}`)}`);
|
|
836
839
|
console.log(` ${pkg.description.en || Object.values(pkg.description)[0]}`);
|
|
837
|
-
console.log(` ${
|
|
840
|
+
console.log(` ${a.gray(i18n.t("marketplace:packageInfo.category"))}: ${pkg.category}`);
|
|
838
841
|
console.log();
|
|
839
842
|
}
|
|
840
843
|
} catch (err) {
|
|
841
|
-
console.error(
|
|
844
|
+
console.error(a.red(i18n.t("marketplace:listFailed")));
|
|
842
845
|
console.error(err);
|
|
843
846
|
throw err;
|
|
844
847
|
}
|
|
@@ -847,45 +850,45 @@ async function infoCommand(packageName, _options) {
|
|
|
847
850
|
try {
|
|
848
851
|
const pkg = await getPackage(packageName);
|
|
849
852
|
if (!pkg) {
|
|
850
|
-
console.error(
|
|
853
|
+
console.error(a.red(i18n.t("marketplace:packageNotFound", { name: packageName })));
|
|
851
854
|
throw new Error(`Package not found: ${packageName}`);
|
|
852
855
|
}
|
|
853
856
|
const installed = await isPackageInstalled(packageName);
|
|
854
857
|
console.log();
|
|
855
|
-
console.log(
|
|
856
|
-
console.log(
|
|
858
|
+
console.log(a.bold.cyan(pkg.name));
|
|
859
|
+
console.log(a.gray("\u2500".repeat(50)));
|
|
857
860
|
console.log();
|
|
858
|
-
console.log(`${
|
|
859
|
-
console.log(`${
|
|
860
|
-
console.log(`${
|
|
861
|
+
console.log(`${a.bold(i18n.t("marketplace:packageInfo.description"))}: ${pkg.description.en || Object.values(pkg.description)[0]}`);
|
|
862
|
+
console.log(`${a.bold(i18n.t("marketplace:packageInfo.version"))}: ${pkg.version}`);
|
|
863
|
+
console.log(`${a.bold(i18n.t("marketplace:packageInfo.category"))}: ${pkg.category}`);
|
|
861
864
|
if (pkg.author) {
|
|
862
|
-
console.log(`${
|
|
865
|
+
console.log(`${a.bold(i18n.t("marketplace:packageInfo.author"))}: ${pkg.author}`);
|
|
863
866
|
}
|
|
864
867
|
if (pkg.license) {
|
|
865
|
-
console.log(`${
|
|
868
|
+
console.log(`${a.bold(i18n.t("marketplace:packageInfo.license"))}: ${pkg.license}`);
|
|
866
869
|
}
|
|
867
870
|
if (pkg.repository) {
|
|
868
|
-
console.log(`${
|
|
871
|
+
console.log(`${a.bold(i18n.t("marketplace:packageInfo.repository"))}: ${pkg.repository}`);
|
|
869
872
|
}
|
|
870
873
|
if (pkg.downloads !== void 0) {
|
|
871
|
-
console.log(`${
|
|
874
|
+
console.log(`${a.bold(i18n.t("marketplace:packageInfo.downloads"))}: ${pkg.downloads.toLocaleString()}`);
|
|
872
875
|
}
|
|
873
876
|
if (pkg.rating !== void 0) {
|
|
874
877
|
const stars = "\u2605".repeat(Math.round(pkg.rating));
|
|
875
878
|
const emptyStars = "\u2606".repeat(5 - Math.round(pkg.rating));
|
|
876
|
-
console.log(`${
|
|
879
|
+
console.log(`${a.bold(i18n.t("marketplace:packageInfo.rating"))}: ${a.yellow(stars)}${a.gray(emptyStars)} (${pkg.rating}/5)`);
|
|
877
880
|
}
|
|
878
881
|
if (pkg.keywords && pkg.keywords.length > 0) {
|
|
879
|
-
console.log(`${
|
|
882
|
+
console.log(`${a.bold(i18n.t("marketplace:packageInfo.keywords"))}: ${pkg.keywords.join(", ")}`);
|
|
880
883
|
}
|
|
881
884
|
if (pkg.verified === "verified") {
|
|
882
|
-
console.log(`${
|
|
885
|
+
console.log(`${a.green("\u2713")} ${i18n.t("marketplace:packageInfo.verified")}`);
|
|
883
886
|
}
|
|
884
887
|
console.log();
|
|
885
|
-
console.log(`${
|
|
888
|
+
console.log(`${a.bold("Status")}: ${installed ? a.green("Installed") : a.gray("Not installed")}`);
|
|
886
889
|
console.log();
|
|
887
890
|
} catch (err) {
|
|
888
|
-
console.error(
|
|
891
|
+
console.error(a.red(i18n.t("marketplace:infoFailed")));
|
|
889
892
|
console.error(err);
|
|
890
893
|
throw err;
|
|
891
894
|
}
|
|
@@ -893,7 +896,7 @@ async function infoCommand(packageName, _options) {
|
|
|
893
896
|
async function marketplaceMenu(action, options) {
|
|
894
897
|
const opts = options || {};
|
|
895
898
|
if (!action) {
|
|
896
|
-
console.log(
|
|
899
|
+
console.log(a.green("\n\u{1F6D2} Marketplace Commands:\n"));
|
|
897
900
|
console.log(" ccjk cloud plugins search <query> - Search packages");
|
|
898
901
|
console.log(" ccjk cloud plugins install <pkg> - Install package");
|
|
899
902
|
console.log(" ccjk cloud plugins uninstall <pkg> - Uninstall package");
|
|
@@ -910,19 +913,19 @@ async function marketplaceMenu(action, options) {
|
|
|
910
913
|
if (param)
|
|
911
914
|
await searchCommand(param);
|
|
912
915
|
else
|
|
913
|
-
console.log(
|
|
916
|
+
console.log(a.yellow("Usage: ccjk cloud plugins search <query>"));
|
|
914
917
|
break;
|
|
915
918
|
case "install":
|
|
916
919
|
if (param)
|
|
917
920
|
await installCommand(param, opts);
|
|
918
921
|
else
|
|
919
|
-
console.log(
|
|
922
|
+
console.log(a.yellow("Usage: ccjk cloud plugins install <package>"));
|
|
920
923
|
break;
|
|
921
924
|
case "uninstall":
|
|
922
925
|
if (param)
|
|
923
926
|
await uninstallCommand(param, opts);
|
|
924
927
|
else
|
|
925
|
-
console.log(
|
|
928
|
+
console.log(a.yellow("Usage: ccjk cloud plugins uninstall <package>"));
|
|
926
929
|
break;
|
|
927
930
|
case "update":
|
|
928
931
|
await updateCommand(param || void 0);
|
|
@@ -935,10 +938,10 @@ async function marketplaceMenu(action, options) {
|
|
|
935
938
|
if (param)
|
|
936
939
|
await infoCommand(param);
|
|
937
940
|
else
|
|
938
|
-
console.log(
|
|
941
|
+
console.log(a.yellow("Usage: ccjk cloud plugins info <package>"));
|
|
939
942
|
break;
|
|
940
943
|
default:
|
|
941
|
-
console.log(
|
|
944
|
+
console.log(a.yellow(`Unknown action: ${cmd}`));
|
|
942
945
|
await marketplaceMenu(void 0, opts);
|
|
943
946
|
}
|
|
944
947
|
}
|
package/dist/chunks/mcp-cli.mjs
CHANGED
|
@@ -1,25 +1,40 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { i18n } from './
|
|
1
|
+
import a from './index2.mjs';
|
|
2
|
+
import { i18n } from './index5.mjs';
|
|
3
3
|
import { g as getMcpServices } from './codex.mjs';
|
|
4
4
|
import { r as readMcpConfig } from './claude-config.mjs';
|
|
5
|
-
import { i as installMcpService, u as uninstallMcpService } from '../shared/ccjk.
|
|
5
|
+
import { i as installMcpService, u as uninstallMcpService } from '../shared/ccjk.waa2ikKJ.mjs';
|
|
6
|
+
import '../shared/ccjk.BAGoDD49.mjs';
|
|
6
7
|
import 'node:fs';
|
|
7
8
|
import 'node:process';
|
|
8
9
|
import 'node:url';
|
|
9
|
-
import '
|
|
10
|
-
import '
|
|
11
|
-
import '
|
|
12
|
-
import '
|
|
13
|
-
import '
|
|
14
|
-
import '
|
|
15
|
-
import '
|
|
16
|
-
import '
|
|
17
|
-
import '
|
|
18
|
-
import '
|
|
10
|
+
import '../shared/ccjk.bQ7Dh1g4.mjs';
|
|
11
|
+
import '../shared/ccjk.RyizuzOI.mjs';
|
|
12
|
+
import './index3.mjs';
|
|
13
|
+
import 'node:readline';
|
|
14
|
+
import 'stream';
|
|
15
|
+
import 'node:tty';
|
|
16
|
+
import 'node:async_hooks';
|
|
17
|
+
import '../shared/ccjk.Cjgrln_h.mjs';
|
|
18
|
+
import 'node:util';
|
|
19
|
+
import 'tty';
|
|
20
|
+
import 'fs';
|
|
21
|
+
import 'child_process';
|
|
22
|
+
import 'node:path';
|
|
19
23
|
import 'node:os';
|
|
24
|
+
import 'node:crypto';
|
|
25
|
+
import 'buffer';
|
|
26
|
+
import 'string_decoder';
|
|
27
|
+
import './index7.mjs';
|
|
28
|
+
import '../shared/ccjk.CxpGa6MC.mjs';
|
|
29
|
+
import '../shared/ccjk.BBtCGd_g.mjs';
|
|
30
|
+
import './main.mjs';
|
|
31
|
+
import 'module';
|
|
32
|
+
import 'node:child_process';
|
|
33
|
+
import 'node:stream';
|
|
34
|
+
import './constants.mjs';
|
|
20
35
|
import './ccjk-config.mjs';
|
|
36
|
+
import './index6.mjs';
|
|
21
37
|
import './fs-operations.mjs';
|
|
22
|
-
import 'node:crypto';
|
|
23
38
|
import 'node:fs/promises';
|
|
24
39
|
import './json-config.mjs';
|
|
25
40
|
import './config.mjs';
|
|
@@ -28,16 +43,14 @@ import './platform.mjs';
|
|
|
28
43
|
import '../shared/ccjk.BFQ7yr5S.mjs';
|
|
29
44
|
import './prompts.mjs';
|
|
30
45
|
import './package.mjs';
|
|
31
|
-
import '../shared/ccjk.
|
|
32
|
-
import 'inquirer-toggle';
|
|
33
|
-
import 'node:child_process';
|
|
46
|
+
import '../shared/ccjk.DOwtZMk8.mjs';
|
|
34
47
|
|
|
35
48
|
async function mcpInstallCli(options) {
|
|
36
49
|
const lang = options.lang || i18n.language || "en";
|
|
37
50
|
const isZh = lang === "zh-CN";
|
|
38
51
|
if (!options.services || options.services.length === 0) {
|
|
39
|
-
console.log(
|
|
40
|
-
console.log(
|
|
52
|
+
console.log(a.red(isZh ? "\u9519\u8BEF: \u5FC5\u987B\u6307\u5B9A\u670D\u52A1\u540D\u79F0" : "Error: Service names required"));
|
|
53
|
+
console.log(a.dim(isZh ? "\u7528\u6CD5: ccjk mcp install <service1> [service2...]" : "Usage: ccjk mcp install <service1> [service2...]"));
|
|
41
54
|
process.exit(1);
|
|
42
55
|
}
|
|
43
56
|
const availableServices = await getMcpServices();
|
|
@@ -45,12 +58,12 @@ async function mcpInstallCli(options) {
|
|
|
45
58
|
(s) => !availableServices.some((svc) => svc.id === s)
|
|
46
59
|
);
|
|
47
60
|
if (invalidServices.length > 0) {
|
|
48
|
-
console.log(
|
|
49
|
-
console.log(
|
|
61
|
+
console.log(a.red(isZh ? `\u9519\u8BEF: \u672A\u77E5\u7684\u670D\u52A1: ${invalidServices.join(", ")}` : `Error: Unknown services: ${invalidServices.join(", ")}`));
|
|
62
|
+
console.log(a.dim(isZh ? "\u63D0\u793A: \u4F7F\u7528 ccjk mcp list \u67E5\u770B\u53EF\u7528\u670D\u52A1" : "Tip: Use ccjk mcp list to see available services"));
|
|
50
63
|
process.exit(1);
|
|
51
64
|
}
|
|
52
65
|
if (!options.yes) {
|
|
53
|
-
const inquirer = await import('
|
|
66
|
+
const inquirer = await import('./index3.mjs').then(function (n) { return n.c; });
|
|
54
67
|
const { confirm } = await inquirer.default.prompt([{
|
|
55
68
|
type: "confirm",
|
|
56
69
|
name: "confirm",
|
|
@@ -58,7 +71,7 @@ async function mcpInstallCli(options) {
|
|
|
58
71
|
default: true
|
|
59
72
|
}]);
|
|
60
73
|
if (!confirm) {
|
|
61
|
-
console.log(
|
|
74
|
+
console.log(a.yellow(isZh ? "\u5DF2\u53D6\u6D88" : "Cancelled"));
|
|
62
75
|
return;
|
|
63
76
|
}
|
|
64
77
|
}
|
|
@@ -70,43 +83,43 @@ async function mcpInstallCli(options) {
|
|
|
70
83
|
successCount++;
|
|
71
84
|
} else {
|
|
72
85
|
failCount++;
|
|
73
|
-
console.log(
|
|
86
|
+
console.log(a.red(isZh ? `\u2717 \u5B89\u88C5 ${serviceId} \u5931\u8D25: ${result.error || "\u672A\u77E5\u9519\u8BEF"}` : `\u2717 Failed to install ${serviceId}: ${result.error || "Unknown error"}`));
|
|
74
87
|
}
|
|
75
88
|
}
|
|
76
89
|
if (successCount > 0) {
|
|
77
|
-
console.log(
|
|
90
|
+
console.log(a.green(isZh ? `\u2713 \u5DF2\u5B89\u88C5 ${successCount} \u4E2A\u670D\u52A1` : `\u2713 Installed ${successCount} service(s)`));
|
|
78
91
|
}
|
|
79
92
|
if (failCount > 0) {
|
|
80
|
-
console.log(
|
|
93
|
+
console.log(a.red(isZh ? `\u2717 ${failCount} \u4E2A\u670D\u52A1\u5B89\u88C5\u5931\u8D25` : `\u2717 ${failCount} service(s) failed`));
|
|
81
94
|
}
|
|
82
95
|
if (successCount > 0) {
|
|
83
|
-
console.log(
|
|
96
|
+
console.log(a.dim(isZh ? "\u63D0\u793A: \u91CD\u542F Claude Code \u4EE5\u5E94\u7528\u66F4\u6539" : "Tip: Restart Claude Code to apply changes"));
|
|
84
97
|
}
|
|
85
98
|
}
|
|
86
99
|
async function mcpUninstallCli(options) {
|
|
87
100
|
const lang = options.lang || i18n.language || "en";
|
|
88
101
|
const isZh = lang === "zh-CN";
|
|
89
102
|
if (!options.services || options.services.length === 0) {
|
|
90
|
-
console.log(
|
|
91
|
-
console.log(
|
|
103
|
+
console.log(a.red(isZh ? "\u9519\u8BEF: \u5FC5\u987B\u6307\u5B9A\u670D\u52A1\u540D\u79F0" : "Error: Service names required"));
|
|
104
|
+
console.log(a.dim(isZh ? "\u7528\u6CD5: ccjk mcp uninstall <service1> [service2...]" : "Usage: ccjk mcp uninstall <service1> [service2...]"));
|
|
92
105
|
process.exit(1);
|
|
93
106
|
}
|
|
94
107
|
const config = readMcpConfig();
|
|
95
108
|
if (!config || !config.mcpServers) {
|
|
96
|
-
console.log(
|
|
109
|
+
console.log(a.yellow(isZh ? "\u672A\u5B89\u88C5\u4EFB\u4F55 MCP \u670D\u52A1" : "No MCP services installed"));
|
|
97
110
|
return;
|
|
98
111
|
}
|
|
99
112
|
const notInstalled = options.services.filter((s) => !config.mcpServers[s]);
|
|
100
113
|
if (notInstalled.length > 0) {
|
|
101
|
-
console.log(
|
|
114
|
+
console.log(a.yellow(isZh ? `\u8B66\u544A: \u4EE5\u4E0B\u670D\u52A1\u672A\u5B89\u88C5: ${notInstalled.join(", ")}` : `Warning: Not installed: ${notInstalled.join(", ")}`));
|
|
102
115
|
}
|
|
103
116
|
const toRemove = options.services.filter((s) => config.mcpServers[s]);
|
|
104
117
|
if (toRemove.length === 0) {
|
|
105
|
-
console.log(
|
|
118
|
+
console.log(a.yellow(isZh ? "\u6CA1\u6709\u670D\u52A1\u9700\u8981\u5378\u8F7D" : "No services to uninstall"));
|
|
106
119
|
return;
|
|
107
120
|
}
|
|
108
121
|
if (!options.yes) {
|
|
109
|
-
const inquirer = await import('
|
|
122
|
+
const inquirer = await import('./index3.mjs').then(function (n) { return n.c; });
|
|
110
123
|
const { confirm } = await inquirer.default.prompt([{
|
|
111
124
|
type: "confirm",
|
|
112
125
|
name: "confirm",
|
|
@@ -114,7 +127,7 @@ async function mcpUninstallCli(options) {
|
|
|
114
127
|
default: true
|
|
115
128
|
}]);
|
|
116
129
|
if (!confirm) {
|
|
117
|
-
console.log(
|
|
130
|
+
console.log(a.yellow(isZh ? "\u5DF2\u53D6\u6D88" : "Cancelled"));
|
|
118
131
|
return;
|
|
119
132
|
}
|
|
120
133
|
}
|
|
@@ -126,17 +139,17 @@ async function mcpUninstallCli(options) {
|
|
|
126
139
|
successCount++;
|
|
127
140
|
} else {
|
|
128
141
|
failCount++;
|
|
129
|
-
console.log(
|
|
142
|
+
console.log(a.red(isZh ? `\u2717 \u5378\u8F7D ${serviceId} \u5931\u8D25: ${result.error || "\u672A\u77E5\u9519\u8BEF"}` : `\u2717 Failed to uninstall ${serviceId}: ${result.error || "Unknown error"}`));
|
|
130
143
|
}
|
|
131
144
|
}
|
|
132
145
|
if (successCount > 0) {
|
|
133
|
-
console.log(
|
|
146
|
+
console.log(a.green(isZh ? `\u2713 \u5DF2\u5378\u8F7D ${successCount} \u4E2A\u670D\u52A1` : `\u2713 Uninstalled ${successCount} service(s)`));
|
|
134
147
|
}
|
|
135
148
|
if (failCount > 0) {
|
|
136
|
-
console.log(
|
|
149
|
+
console.log(a.red(isZh ? `\u2717 ${failCount} \u4E2A\u670D\u52A1\u5378\u8F7D\u5931\u8D25` : `\u2717 ${failCount} service(s) failed`));
|
|
137
150
|
}
|
|
138
151
|
if (successCount > 0) {
|
|
139
|
-
console.log(
|
|
152
|
+
console.log(a.dim(isZh ? "\u63D0\u793A: \u91CD\u542F Claude Code \u4EE5\u5E94\u7528\u66F4\u6539" : "Tip: Restart Claude Code to apply changes"));
|
|
140
153
|
}
|
|
141
154
|
}
|
|
142
155
|
async function mcpListCli(options = {}) {
|
|
@@ -159,33 +172,33 @@ async function mcpListCli(options = {}) {
|
|
|
159
172
|
return;
|
|
160
173
|
}
|
|
161
174
|
console.log("");
|
|
162
|
-
console.log(
|
|
163
|
-
console.log(
|
|
175
|
+
console.log(a.bold.cyan(isZh ? "\u{1F4E6} MCP \u670D\u52A1" : "\u{1F4E6} MCP Services"));
|
|
176
|
+
console.log(a.dim("\u2500".repeat(50)));
|
|
164
177
|
console.log("");
|
|
165
178
|
if (options.installed) {
|
|
166
179
|
if (installedServices.length === 0) {
|
|
167
|
-
console.log(
|
|
180
|
+
console.log(a.yellow(isZh ? "\u672A\u5B89\u88C5\u4EFB\u4F55\u670D\u52A1" : "No services installed"));
|
|
168
181
|
} else {
|
|
169
|
-
console.log(
|
|
182
|
+
console.log(a.green(isZh ? `\u5DF2\u5B89\u88C5 ${installedServices.length} \u4E2A\u670D\u52A1:` : `${installedServices.length} service(s) installed:`));
|
|
170
183
|
for (const serviceId of installedServices) {
|
|
171
184
|
const service = availableServices.find((s) => s.id === serviceId);
|
|
172
185
|
const name = service ? service.name : serviceId;
|
|
173
|
-
console.log(` ${
|
|
186
|
+
console.log(` ${a.green("\u25CF")} ${name} ${a.dim(`(${serviceId})`)}`);
|
|
174
187
|
}
|
|
175
188
|
}
|
|
176
189
|
} else {
|
|
177
|
-
console.log(
|
|
190
|
+
console.log(a.dim(isZh ? "\u53EF\u7528\u670D\u52A1:" : "Available services:"));
|
|
178
191
|
for (const service of availableServices) {
|
|
179
192
|
const installed = installedServices.includes(service.id);
|
|
180
|
-
const icon = installed ?
|
|
193
|
+
const icon = installed ? a.green("\u2713") : a.dim("\u25CB");
|
|
181
194
|
const name = service.name;
|
|
182
195
|
const desc = service.description;
|
|
183
|
-
console.log(` ${icon} ${
|
|
184
|
-
console.log(` ${
|
|
196
|
+
console.log(` ${icon} ${a.bold(name)} ${a.dim(`(${service.id})`)}`);
|
|
197
|
+
console.log(` ${a.dim(desc)}`);
|
|
185
198
|
}
|
|
186
199
|
}
|
|
187
200
|
console.log("");
|
|
188
|
-
console.log(
|
|
201
|
+
console.log(a.dim(isZh ? "\u63D0\u793A: \u4F7F\u7528 ccjk mcp install <service> \u5B89\u88C5\u670D\u52A1" : "Tip: Use ccjk mcp install <service> to install a service"));
|
|
189
202
|
}
|
|
190
203
|
|
|
191
204
|
export { mcpInstallCli, mcpListCli, mcpUninstallCli };
|