ccjk 2.0.0 → 2.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/README.md +183 -181
- package/README.zh-CN.md +335 -0
- package/dist/chunks/claude-code-config-manager.mjs +7 -7
- package/dist/chunks/claude-code-incremental-manager.mjs +1 -1
- package/dist/chunks/codex-config-switch.mjs +3 -3
- package/dist/chunks/codex-provider-manager.mjs +1 -1
- package/dist/chunks/codex-uninstaller.mjs +2 -2
- package/dist/chunks/commands.mjs +1 -1
- package/dist/chunks/features.mjs +10 -10
- package/dist/chunks/simple-config.mjs +21 -364
- package/dist/cli.mjs +361 -7
- package/dist/i18n/locales/en/configuration.json +12 -1
- package/dist/i18n/locales/zh-CN/configuration.json +12 -1
- package/dist/index.mjs +366 -7
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { C as CCJK_PLUGINS_DIR, a as CCJK_SKILLS_DIR, b as CCJK_GROUPS_DIR, A as AIDER_DIR, c as AIDER_CONFIG_FILE, d as AIDER_ENV_FILE, e as CONTINUE_DIR, f as CONTINUE_CONFIG_FILE,
|
|
2
|
-
export {
|
|
1
|
+
import { C as CCJK_PLUGINS_DIR, a as CCJK_SKILLS_DIR, b as CCJK_GROUPS_DIR, A as AIDER_DIR, c as AIDER_CONFIG_FILE, d as AIDER_ENV_FILE, e as CONTINUE_DIR, f as CONTINUE_CONFIG_FILE, S as STATUS, r as renderProgressBar, g as checkClaudeCodeVersion, h as checkCcjkVersion, v as version, i as detectAllConfigs, j as getCurrentTemplateId, s as sectionDivider, k as COLORS } from './chunks/simple-config.mjs';
|
|
2
|
+
export { a5 as AI_OUTPUT_LANGUAGES, a0 as API_DEFAULT_URL, a1 as API_ENV_KEY, O as CCJK_CONFIG_DIR, P as CCJK_CONFIG_FILE, y as CLAUDE_DIR, B as CLAUDE_MD_FILE, E as CLAUDE_VSC_CONFIG_FILE, L as CLINE_CONFIG_FILE, K as CLINE_DIR, I as CODEX_AGENTS_FILE, H as CODEX_AUTH_FILE, G as CODEX_CONFIG_FILE, F as CODEX_DIR, J as CODEX_PROMPTS_DIR, Y as CODE_TOOL_ALIASES, X as CODE_TOOL_BANNERS, _ as CODE_TOOL_INFO, V as CODE_TOOL_TYPES, N as CURSOR_CONFIG_FILE, M as CURSOR_DIR, D as ClAUDE_CONFIG_FILE, W as DEFAULT_CODE_TOOL_TYPE, a4 as LANG_LABELS, Q as LEGACY_ZCF_CONFIG_DIR, R as LEGACY_ZCF_CONFIG_FILE, T as LEGACY_ZCF_CONFIG_FILES, bY as PERMISSION_TEMPLATES, z as SETTINGS_FILE, a3 as SUPPORTED_LANGS, Z as ZCF_CONFIG_DIR, U as ZCF_CONFIG_FILE, c4 as addAutoApprovePattern, as as addCompletedOnboarding, bu as applyAiLanguageDirective, b6 as applyCodexPlatformCommand, b$ as applyTemplate, ax as backupCodexAgents, ay as backupCodexComplete, az as backupCodexConfig, aA as backupCodexFiles, aB as backupCodexPrompts, bl as backupExistingConfig, ao as backupMcpConfig, aj as boxify, aq as buildMcpServerConfig, cf as checkAllVersions, aC as checkCodexUpdate, ca as checkPluginVersions, o as cleanupPermissions, aD as codexSwitchToOfficialLogin, q as commandExists, bx as compareConfigs, bn as configureApi, aE as configureCodexApi, b5 as configureCodexMcp, by as consolidateConfigs, bm as copyConfigFiles, aF as createBackupDirectory, bQ as createHomebrewSymlink, a9 as detectBuildTools, ab as detectCICDSystems, b2 as detectConfigManagementMode, a8 as detectFrameworks, bL as detectInstalledVersion, ac as detectLanguages, a7 as detectPackageManager, ae as detectProject, aa as detectTestFrameworks, ad as determineProjectType, ah as displayBanner, ai as displayBannerWithInfo, bB as displayConfigScan, m as displayCurrentStatus, c9 as displayPermissions, bR as displayVerificationResult, at as ensureApiKeyApproved, bk as ensureClaudeDir, aG as ensureEnvKeyMigration, bN as executeInstallMethod, c7 as exportPermissions, bX as exportProjectKnowledge, ar as fixWindowsMcpConfig, bi as formatToolStatus, af as generateSuggestions, a6 as getAiOutputLanguageLabel, bg as getAllToolsInfo, bc as getAllToolsStatus, b4 as getAvailableManagementActions, aH as getBackupMessage, aI as getCodexVersion, aJ as getCurrentCodexProvider, bt as getExistingApiConfig, bs as getExistingModelConfig, bH as getInstallationStatus, bd as getInstalledTools, al as getMcpConfigPath, t as getPlatform, bW as getProjectKnowledge, ag as getProjectSummary, bj as getRecommendedTools, b7 as getToolConfigPath, b8 as getToolDir, bf as getToolInfo, bb as getToolStatus, ba as getToolVersion, bh as getToolsByCategory, bO as handleInstallFailure, c8 as importPermissions, u as importRecommendedEnv, w as importRecommendedPermissions, l as init, bD as installClaudeCode, bF as installCodex, aK as installCodexCli, be as installTool, bC as isClaudeCodeInstalled, $ as isCodeToolType, aL as isCodexCliInstalled, bE as isCodexInstalled, c3 as isDirectoryTrusted, bG as isLocalClaudeCodeInstalled, c2 as isPermissionAllowed, b9 as isToolInstalled, aM as listCodexProviders, bS as loadKnowledgeBase, av as manageApiKeyApproval, ak as menuItem, p as mergeAndCleanPermissions, bo as mergeConfigs, ap as mergeMcpServers, br as mergeSettingsFile, aN as migrateEnvKeyInContent, aO as migrateEnvKeyToTempEnvKey, aP as needsEnvKeyMigration, x as openSettingsJson, aQ as parseCodexConfig, bw as promptApiConfigurationAction, bV as quickSync, aR as readCodexConfig, am as readMcpConfig, bZ as readPermissions, au as removeApiKeyFromRejected, c5 as removeAutoApprovePattern, bI as removeLocalClaudeCode, bA as removeRedundantConfigs, aS as renderCodexConfig, c6 as resetPermissions, a2 as resolveCodeToolType, aT as runCodexFullInit, aU as runCodexSystemPromptSelection, aV as runCodexUninstall, aW as runCodexUpdate, aX as runCodexWorkflowImport, aY as runCodexWorkflowImportWithLanguageSelection, aZ as runCodexWorkflowSelection, n as runConfigWizard, bU as runOnboarding, bT as saveKnowledgeBase, bM as selectInstallMethod, bK as setInstallMethod, aw as setPrimaryApiKey, b3 as shouldShowManagementMode, a_ as switchCodexProvider, bv as switchToOfficialLogin, a$ as switchToProvider, c0 as trustDirectory, bJ as uninstallCodeTool, c1 as untrustDirectory, bp as updateCustomModel, bq as updateDefaultModel, cg as upgradeAll, ce as upgradeAllPlugins, cc as upgradeCcjk, cb as upgradeClaudeCode, cd as upgradePlugin, bP as verifyInstallation, b0 as writeAuthFile, b1 as writeCodexConfig, bz as writeConsolidatedConfig, an as writeMcpConfig, b_ as writePermissions } from './chunks/simple-config.mjs';
|
|
3
|
+
import { homedir } from 'node:os';
|
|
4
|
+
import ansis from 'ansis';
|
|
5
|
+
import ora from 'ora';
|
|
6
|
+
import { exec } from 'tinyexec';
|
|
3
7
|
import { existsSync, mkdirSync, readFileSync, writeFileSync, readdirSync } from 'node:fs';
|
|
4
8
|
import { join } from 'pathe';
|
|
5
|
-
import { exec } from 'tinyexec';
|
|
6
9
|
export { configureIncrementalManagement } from './chunks/codex-config-switch.mjs';
|
|
7
10
|
export { addProviderToExisting, deleteProviders, editExistingProvider, validateProviderData } from './chunks/codex-provider-manager.mjs';
|
|
8
11
|
export { CodexUninstaller } from './chunks/codex-uninstaller.mjs';
|
|
9
|
-
import ansis from 'ansis';
|
|
10
12
|
import inquirer from 'inquirer';
|
|
11
13
|
import 'node:process';
|
|
12
14
|
import 'smol-toml';
|
|
13
15
|
import 'dayjs';
|
|
14
16
|
import 'node:child_process';
|
|
15
|
-
import 'node:os';
|
|
16
17
|
import 'node:util';
|
|
17
18
|
import 'node:url';
|
|
18
19
|
import 'inquirer-toggle';
|
|
19
|
-
import 'ora';
|
|
20
20
|
import 'semver';
|
|
21
21
|
import 'node:fs/promises';
|
|
22
22
|
import 'fs-extra';
|
|
@@ -1529,6 +1529,365 @@ function syncSkillsToContinue(skills) {
|
|
|
1529
1529
|
writeContinueConfig(config);
|
|
1530
1530
|
}
|
|
1531
1531
|
|
|
1532
|
+
async function checkClaudeCodeInstallation() {
|
|
1533
|
+
try {
|
|
1534
|
+
const versionInfo = await checkClaudeCodeVersion();
|
|
1535
|
+
if (versionInfo.current === "unknown") {
|
|
1536
|
+
return {
|
|
1537
|
+
name: "Claude Code",
|
|
1538
|
+
status: "fail",
|
|
1539
|
+
message: "Not installed",
|
|
1540
|
+
fixable: true,
|
|
1541
|
+
fixCommand: "npm install -g @anthropic-ai/claude-code"
|
|
1542
|
+
};
|
|
1543
|
+
}
|
|
1544
|
+
if (versionInfo.updateAvailable) {
|
|
1545
|
+
return {
|
|
1546
|
+
name: "Claude Code",
|
|
1547
|
+
status: "warn",
|
|
1548
|
+
message: `v${versionInfo.current} (update to v${versionInfo.latest} available)`,
|
|
1549
|
+
fixable: true,
|
|
1550
|
+
fixCommand: "ccjk upgrade claude-code"
|
|
1551
|
+
};
|
|
1552
|
+
}
|
|
1553
|
+
return {
|
|
1554
|
+
name: "Claude Code",
|
|
1555
|
+
status: "pass",
|
|
1556
|
+
message: `v${versionInfo.current} (latest)`
|
|
1557
|
+
};
|
|
1558
|
+
} catch (error) {
|
|
1559
|
+
return {
|
|
1560
|
+
name: "Claude Code",
|
|
1561
|
+
status: "fail",
|
|
1562
|
+
message: "Check failed",
|
|
1563
|
+
details: error instanceof Error ? error.message : "Unknown error"
|
|
1564
|
+
};
|
|
1565
|
+
}
|
|
1566
|
+
}
|
|
1567
|
+
async function checkCcjkInstallation() {
|
|
1568
|
+
try {
|
|
1569
|
+
const versionInfo = await checkCcjkVersion();
|
|
1570
|
+
if (versionInfo.updateAvailable) {
|
|
1571
|
+
return {
|
|
1572
|
+
name: "CCJK",
|
|
1573
|
+
status: "warn",
|
|
1574
|
+
message: `v${versionInfo.current} (update to v${versionInfo.latest} available)`,
|
|
1575
|
+
fixable: true,
|
|
1576
|
+
fixCommand: "ccjk upgrade ccjk"
|
|
1577
|
+
};
|
|
1578
|
+
}
|
|
1579
|
+
return {
|
|
1580
|
+
name: "CCJK",
|
|
1581
|
+
status: "pass",
|
|
1582
|
+
message: `v${versionInfo.current} (latest)`
|
|
1583
|
+
};
|
|
1584
|
+
} catch {
|
|
1585
|
+
return {
|
|
1586
|
+
name: "CCJK",
|
|
1587
|
+
status: "pass",
|
|
1588
|
+
message: `v${version}`
|
|
1589
|
+
};
|
|
1590
|
+
}
|
|
1591
|
+
}
|
|
1592
|
+
async function checkNodeVersion() {
|
|
1593
|
+
try {
|
|
1594
|
+
const result = await exec("node", ["--version"], { throwOnError: false });
|
|
1595
|
+
const nodeVersion = result.stdout.trim().replace("v", "");
|
|
1596
|
+
const major = Number.parseInt(nodeVersion.split(".")[0]);
|
|
1597
|
+
if (major < 18) {
|
|
1598
|
+
return {
|
|
1599
|
+
name: "Node.js",
|
|
1600
|
+
status: "fail",
|
|
1601
|
+
message: `v${nodeVersion} (requires v18+)`,
|
|
1602
|
+
fixable: false
|
|
1603
|
+
};
|
|
1604
|
+
}
|
|
1605
|
+
if (major < 20) {
|
|
1606
|
+
return {
|
|
1607
|
+
name: "Node.js",
|
|
1608
|
+
status: "warn",
|
|
1609
|
+
message: `v${nodeVersion} (v20+ recommended)`
|
|
1610
|
+
};
|
|
1611
|
+
}
|
|
1612
|
+
return {
|
|
1613
|
+
name: "Node.js",
|
|
1614
|
+
status: "pass",
|
|
1615
|
+
message: `v${nodeVersion}`
|
|
1616
|
+
};
|
|
1617
|
+
} catch {
|
|
1618
|
+
return {
|
|
1619
|
+
name: "Node.js",
|
|
1620
|
+
status: "fail",
|
|
1621
|
+
message: "Not found"
|
|
1622
|
+
};
|
|
1623
|
+
}
|
|
1624
|
+
}
|
|
1625
|
+
async function checkNpmVersion() {
|
|
1626
|
+
try {
|
|
1627
|
+
const result = await exec("npm", ["--version"], { throwOnError: false });
|
|
1628
|
+
const npmVersion = result.stdout.trim();
|
|
1629
|
+
return {
|
|
1630
|
+
name: "npm",
|
|
1631
|
+
status: "pass",
|
|
1632
|
+
message: `v${npmVersion}`
|
|
1633
|
+
};
|
|
1634
|
+
} catch {
|
|
1635
|
+
return {
|
|
1636
|
+
name: "npm",
|
|
1637
|
+
status: "fail",
|
|
1638
|
+
message: "Not found"
|
|
1639
|
+
};
|
|
1640
|
+
}
|
|
1641
|
+
}
|
|
1642
|
+
async function checkGitInstallation() {
|
|
1643
|
+
try {
|
|
1644
|
+
const result = await exec("git", ["--version"], { throwOnError: false });
|
|
1645
|
+
const match = result.stdout.match(/(\d+\.\d+\.\d+)/);
|
|
1646
|
+
const gitVersion = match ? match[1] : "unknown";
|
|
1647
|
+
return {
|
|
1648
|
+
name: "Git",
|
|
1649
|
+
status: "pass",
|
|
1650
|
+
message: `v${gitVersion}`
|
|
1651
|
+
};
|
|
1652
|
+
} catch {
|
|
1653
|
+
return {
|
|
1654
|
+
name: "Git",
|
|
1655
|
+
status: "warn",
|
|
1656
|
+
message: "Not found (optional)"
|
|
1657
|
+
};
|
|
1658
|
+
}
|
|
1659
|
+
}
|
|
1660
|
+
async function checkApiConnectivity() {
|
|
1661
|
+
try {
|
|
1662
|
+
const start = Date.now();
|
|
1663
|
+
const result = await exec("curl", ["-s", "-o", "/dev/null", "-w", "%{http_code}", "https://api.anthropic.com/health"], {
|
|
1664
|
+
throwOnError: false,
|
|
1665
|
+
timeout: 1e4
|
|
1666
|
+
});
|
|
1667
|
+
const elapsed = Date.now() - start;
|
|
1668
|
+
if (result.stdout.trim() === "200" || result.stdout.trim() === "404") {
|
|
1669
|
+
return {
|
|
1670
|
+
name: "API Connectivity",
|
|
1671
|
+
status: "pass",
|
|
1672
|
+
message: `OK (${elapsed}ms)`
|
|
1673
|
+
};
|
|
1674
|
+
}
|
|
1675
|
+
return {
|
|
1676
|
+
name: "API Connectivity",
|
|
1677
|
+
status: "warn",
|
|
1678
|
+
message: `Response: ${result.stdout.trim()}`
|
|
1679
|
+
};
|
|
1680
|
+
} catch {
|
|
1681
|
+
return {
|
|
1682
|
+
name: "API Connectivity",
|
|
1683
|
+
status: "info",
|
|
1684
|
+
message: "Could not test (curl not available)"
|
|
1685
|
+
};
|
|
1686
|
+
}
|
|
1687
|
+
}
|
|
1688
|
+
function checkConfigValidity() {
|
|
1689
|
+
const configs = detectAllConfigs();
|
|
1690
|
+
const existingConfigs = configs.filter((c) => c.exists);
|
|
1691
|
+
if (existingConfigs.length === 0) {
|
|
1692
|
+
return {
|
|
1693
|
+
name: "Config Files",
|
|
1694
|
+
status: "info",
|
|
1695
|
+
message: "No config files (run ccjk init)",
|
|
1696
|
+
fixable: true,
|
|
1697
|
+
fixCommand: "ccjk init"
|
|
1698
|
+
};
|
|
1699
|
+
}
|
|
1700
|
+
if (existingConfigs.length > 1) {
|
|
1701
|
+
return {
|
|
1702
|
+
name: "Config Files",
|
|
1703
|
+
status: "warn",
|
|
1704
|
+
message: `${existingConfigs.length} found (consolidation recommended)`,
|
|
1705
|
+
fixable: true,
|
|
1706
|
+
fixCommand: "ccjk config consolidate"
|
|
1707
|
+
};
|
|
1708
|
+
}
|
|
1709
|
+
return {
|
|
1710
|
+
name: "Config Files",
|
|
1711
|
+
status: "pass",
|
|
1712
|
+
message: "1 config file"
|
|
1713
|
+
};
|
|
1714
|
+
}
|
|
1715
|
+
function checkPermissions() {
|
|
1716
|
+
try {
|
|
1717
|
+
const templateId = getCurrentTemplateId();
|
|
1718
|
+
if (templateId) {
|
|
1719
|
+
return {
|
|
1720
|
+
name: "Permissions",
|
|
1721
|
+
status: "pass",
|
|
1722
|
+
message: `${templateId} template active`
|
|
1723
|
+
};
|
|
1724
|
+
}
|
|
1725
|
+
return {
|
|
1726
|
+
name: "Permissions",
|
|
1727
|
+
status: "info",
|
|
1728
|
+
message: "Custom permissions"
|
|
1729
|
+
};
|
|
1730
|
+
} catch {
|
|
1731
|
+
return {
|
|
1732
|
+
name: "Permissions",
|
|
1733
|
+
status: "info",
|
|
1734
|
+
message: "Not configured"
|
|
1735
|
+
};
|
|
1736
|
+
}
|
|
1737
|
+
}
|
|
1738
|
+
async function checkDiskSpace() {
|
|
1739
|
+
try {
|
|
1740
|
+
if (process.platform === "win32") {
|
|
1741
|
+
return {
|
|
1742
|
+
name: "Disk Space",
|
|
1743
|
+
status: "info",
|
|
1744
|
+
message: "Check skipped (Windows)"
|
|
1745
|
+
};
|
|
1746
|
+
}
|
|
1747
|
+
const result = await exec("df", ["-h", homedir()], { throwOnError: false });
|
|
1748
|
+
const lines = result.stdout.trim().split("\n");
|
|
1749
|
+
if (lines.length >= 2) {
|
|
1750
|
+
const parts = lines[1].split(/\s+/);
|
|
1751
|
+
const available = parts[3];
|
|
1752
|
+
const usePercent = Number.parseInt(parts[4]);
|
|
1753
|
+
if (usePercent > 90) {
|
|
1754
|
+
return {
|
|
1755
|
+
name: "Disk Space",
|
|
1756
|
+
status: "warn",
|
|
1757
|
+
message: `${available} available (${usePercent}% used)`
|
|
1758
|
+
};
|
|
1759
|
+
}
|
|
1760
|
+
return {
|
|
1761
|
+
name: "Disk Space",
|
|
1762
|
+
status: "pass",
|
|
1763
|
+
message: `${available} available`
|
|
1764
|
+
};
|
|
1765
|
+
}
|
|
1766
|
+
return {
|
|
1767
|
+
name: "Disk Space",
|
|
1768
|
+
status: "info",
|
|
1769
|
+
message: "Could not determine"
|
|
1770
|
+
};
|
|
1771
|
+
} catch {
|
|
1772
|
+
return {
|
|
1773
|
+
name: "Disk Space",
|
|
1774
|
+
status: "info",
|
|
1775
|
+
message: "Check skipped"
|
|
1776
|
+
};
|
|
1777
|
+
}
|
|
1778
|
+
}
|
|
1779
|
+
function calculateScore(checks) {
|
|
1780
|
+
let score = 100;
|
|
1781
|
+
const weights = {
|
|
1782
|
+
"Claude Code": 25,
|
|
1783
|
+
"CCJK": 15,
|
|
1784
|
+
"Node.js": 20,
|
|
1785
|
+
"npm": 10,
|
|
1786
|
+
"Git": 5,
|
|
1787
|
+
"API Connectivity": 10,
|
|
1788
|
+
"Config Files": 10,
|
|
1789
|
+
"Permissions": 5
|
|
1790
|
+
};
|
|
1791
|
+
for (const check of checks) {
|
|
1792
|
+
const checkWeight = weights[check.name] || 5;
|
|
1793
|
+
if (check.status === "fail") {
|
|
1794
|
+
score -= checkWeight;
|
|
1795
|
+
} else if (check.status === "warn") {
|
|
1796
|
+
score -= checkWeight * 0.5;
|
|
1797
|
+
}
|
|
1798
|
+
}
|
|
1799
|
+
return Math.max(0, Math.min(100, Math.round(score)));
|
|
1800
|
+
}
|
|
1801
|
+
function generateRecommendations(checks) {
|
|
1802
|
+
const recommendations = [];
|
|
1803
|
+
for (const check of checks) {
|
|
1804
|
+
if (check.fixable && check.fixCommand && (check.status === "fail" || check.status === "warn")) {
|
|
1805
|
+
recommendations.push(`Run '${check.fixCommand}' to fix ${check.name.toLowerCase()}`);
|
|
1806
|
+
}
|
|
1807
|
+
}
|
|
1808
|
+
return recommendations;
|
|
1809
|
+
}
|
|
1810
|
+
async function runHealthCheck() {
|
|
1811
|
+
const spinner = ora("Running health check...").start();
|
|
1812
|
+
const checks = [];
|
|
1813
|
+
spinner.text = "Checking Claude Code...";
|
|
1814
|
+
checks.push(await checkClaudeCodeInstallation());
|
|
1815
|
+
spinner.text = "Checking CCJK...";
|
|
1816
|
+
checks.push(await checkCcjkInstallation());
|
|
1817
|
+
spinner.text = "Checking Node.js...";
|
|
1818
|
+
checks.push(await checkNodeVersion());
|
|
1819
|
+
spinner.text = "Checking npm...";
|
|
1820
|
+
checks.push(await checkNpmVersion());
|
|
1821
|
+
spinner.text = "Checking Git...";
|
|
1822
|
+
checks.push(await checkGitInstallation());
|
|
1823
|
+
spinner.text = "Checking API connectivity...";
|
|
1824
|
+
checks.push(await checkApiConnectivity());
|
|
1825
|
+
spinner.text = "Checking config files...";
|
|
1826
|
+
checks.push(checkConfigValidity());
|
|
1827
|
+
spinner.text = "Checking permissions...";
|
|
1828
|
+
checks.push(checkPermissions());
|
|
1829
|
+
spinner.text = "Checking disk space...";
|
|
1830
|
+
checks.push(await checkDiskSpace());
|
|
1831
|
+
spinner.stop();
|
|
1832
|
+
const score = calculateScore(checks);
|
|
1833
|
+
const recommendations = generateRecommendations(checks);
|
|
1834
|
+
return {
|
|
1835
|
+
timestamp: /* @__PURE__ */ new Date(),
|
|
1836
|
+
score,
|
|
1837
|
+
checks,
|
|
1838
|
+
recommendations
|
|
1839
|
+
};
|
|
1840
|
+
}
|
|
1841
|
+
function displayHealthReport(report) {
|
|
1842
|
+
console.log(ansis.cyan("\n\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550 CCJK Environment Health \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\n"));
|
|
1843
|
+
for (const check of report.checks) {
|
|
1844
|
+
switch (check.status) {
|
|
1845
|
+
case "pass":
|
|
1846
|
+
console.log(STATUS.success(`${check.name.padEnd(20)} ${check.message}`));
|
|
1847
|
+
break;
|
|
1848
|
+
case "warn":
|
|
1849
|
+
console.log(STATUS.warning(`${check.name.padEnd(20)} ${check.message}`));
|
|
1850
|
+
break;
|
|
1851
|
+
case "fail":
|
|
1852
|
+
console.log(STATUS.error(`${check.name.padEnd(20)} ${check.message}`));
|
|
1853
|
+
break;
|
|
1854
|
+
case "info":
|
|
1855
|
+
console.log(STATUS.info(`${check.name.padEnd(20)} ${check.message}`));
|
|
1856
|
+
break;
|
|
1857
|
+
}
|
|
1858
|
+
}
|
|
1859
|
+
console.log("");
|
|
1860
|
+
console.log(`Score: ${ansis.cyan(report.score.toString())}/100`);
|
|
1861
|
+
console.log(renderProgressBar(report.score, 40));
|
|
1862
|
+
if (report.recommendations.length > 0) {
|
|
1863
|
+
console.log(ansis.yellow("\nRecommendations:"));
|
|
1864
|
+
for (const rec of report.recommendations) {
|
|
1865
|
+
console.log(ansis.yellow(` \u2022 ${rec}`));
|
|
1866
|
+
}
|
|
1867
|
+
}
|
|
1868
|
+
console.log("");
|
|
1869
|
+
}
|
|
1870
|
+
async function runDoctor(fix = false) {
|
|
1871
|
+
const report = await runHealthCheck();
|
|
1872
|
+
displayHealthReport(report);
|
|
1873
|
+
if (fix && report.recommendations.length > 0) {
|
|
1874
|
+
console.log(ansis.cyan("\n\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550 Attempting Fixes \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\n"));
|
|
1875
|
+
for (const check of report.checks) {
|
|
1876
|
+
if (check.fixable && check.fixCommand && (check.status === "fail" || check.status === "warn")) {
|
|
1877
|
+
const spinner = ora(`Fixing ${check.name}...`).start();
|
|
1878
|
+
try {
|
|
1879
|
+
const parts = check.fixCommand.split(" ");
|
|
1880
|
+
await exec(parts[0], parts.slice(1), { throwOnError: true });
|
|
1881
|
+
spinner.succeed(`Fixed ${check.name}`);
|
|
1882
|
+
} catch (_error) {
|
|
1883
|
+
spinner.fail(`Failed to fix ${check.name}`);
|
|
1884
|
+
}
|
|
1885
|
+
}
|
|
1886
|
+
}
|
|
1887
|
+
console.log("");
|
|
1888
|
+
}
|
|
1889
|
+
}
|
|
1890
|
+
|
|
1532
1891
|
class MenuBuilder {
|
|
1533
1892
|
sections = [];
|
|
1534
1893
|
options;
|
|
@@ -1703,4 +2062,4 @@ function showStatus(type, message) {
|
|
|
1703
2062
|
console.log(STATUS[type](message));
|
|
1704
2063
|
}
|
|
1705
2064
|
|
|
1706
|
-
export { AIDER_CONFIG_FILE, AIDER_DIR, AIDER_ENV_FILE, CCJK_GROUPS_DIR, CCJK_PLUGINS_DIR, CCJK_SKILLS_DIR, COLORS, CONTINUE_CONFIG_FILE, CONTINUE_DIR, MenuBuilder, STATUS, addContinueCustomCommand, addContinueMcpServer, addContinueModel, addGroup, addSkill, configureAiderApi, configureContinueApi, confirm, createBatchSkills, disableGroup, disablePlugin, discoverPlugins, enableContinueContextProvider, enableGroup, enablePlugin, ensureAiderDir, ensureContinueDir, ensureGroupsDir, ensurePluginsDir, ensureSkillsDir, exportGroups, exportSkills, getAiderModelPresets, getAiderVersion, getAllGroups, getAllSkills, getBatchCategories, getContinueProviderPresets, getEnabledAgents, getEnabledSkillIds, getGroup, getRegistry as getGroupRegistry, getLoadedPlugins, getPluginAgents, getPluginInfo, getPluginMcpServices, getPluginOutputStyles, getPluginSkills, getPluginWorkflows, getSkill, getRegistry$1 as getSkillRegistry, importGroups, importSkills, initializePlugins, installAider, isAiderInstalled, isContinueConfigured, isGroupEnabled, listPlugins, loadPlugin, readAiderConfig, readContinueConfig, readPluginConfig, refreshRegistry as refreshGroupRegistry, refreshRegistry$1 as refreshSkillRegistry, removeContinueModel, removeGroup, removeSkill, runAider, searchGroups, searchSkills, sectionDivider, setSkillEnabled, showQuickMenu, showStatus, syncSkillsToContinue, unloadPlugin, writeAiderConfig, writeContinueConfig, writePluginConfig };
|
|
2065
|
+
export { AIDER_CONFIG_FILE, AIDER_DIR, AIDER_ENV_FILE, CCJK_GROUPS_DIR, CCJK_PLUGINS_DIR, CCJK_SKILLS_DIR, COLORS, CONTINUE_CONFIG_FILE, CONTINUE_DIR, MenuBuilder, STATUS, addContinueCustomCommand, addContinueMcpServer, addContinueModel, addGroup, addSkill, checkCcjkVersion, checkClaudeCodeVersion, configureAiderApi, configureContinueApi, confirm, createBatchSkills, detectAllConfigs, disableGroup, disablePlugin, discoverPlugins, displayHealthReport, enableContinueContextProvider, enableGroup, enablePlugin, ensureAiderDir, ensureContinueDir, ensureGroupsDir, ensurePluginsDir, ensureSkillsDir, exportGroups, exportSkills, getAiderModelPresets, getAiderVersion, getAllGroups, getAllSkills, getBatchCategories, getContinueProviderPresets, getCurrentTemplateId, getEnabledAgents, getEnabledSkillIds, getGroup, getRegistry as getGroupRegistry, getLoadedPlugins, getPluginAgents, getPluginInfo, getPluginMcpServices, getPluginOutputStyles, getPluginSkills, getPluginWorkflows, getSkill, getRegistry$1 as getSkillRegistry, importGroups, importSkills, initializePlugins, installAider, isAiderInstalled, isContinueConfigured, isGroupEnabled, listPlugins, loadPlugin, readAiderConfig, readContinueConfig, readPluginConfig, refreshRegistry as refreshGroupRegistry, refreshRegistry$1 as refreshSkillRegistry, removeContinueModel, removeGroup, removeSkill, renderProgressBar, runAider, runDoctor, runHealthCheck, searchGroups, searchSkills, sectionDivider, setSkillEnabled, showQuickMenu, showStatus, syncSkillsToContinue, unloadPlugin, writeAiderConfig, writeContinueConfig, writePluginConfig };
|
package/package.json
CHANGED