claudekit-cli 3.10.0 → 3.10.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/index.js +241 -58
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6895,7 +6895,7 @@ var require_umd = __commonJS((exports, module) => {
|
|
|
6895
6895
|
});
|
|
6896
6896
|
|
|
6897
6897
|
// src/shared/environment.ts
|
|
6898
|
-
function
|
|
6898
|
+
function isCIEnvironment() {
|
|
6899
6899
|
return process.env.CI === "true" || process.env.CI_SAFE_MODE === "true";
|
|
6900
6900
|
}
|
|
6901
6901
|
function isNonInteractive() {
|
|
@@ -12368,6 +12368,7 @@ var exports_gemini_mcp_linker = {};
|
|
|
12368
12368
|
__export(exports_gemini_mcp_linker, {
|
|
12369
12369
|
processGeminiMcpLinking: () => processGeminiMcpLinking,
|
|
12370
12370
|
linkGeminiMcpConfig: () => linkGeminiMcpConfig,
|
|
12371
|
+
getGeminiSettingsPath: () => getGeminiSettingsPath,
|
|
12371
12372
|
findMcpConfigPath: () => findMcpConfigPath,
|
|
12372
12373
|
checkExistingGeminiConfig: () => checkExistingGeminiConfig,
|
|
12373
12374
|
addGeminiToGitignore: () => addGeminiToGitignore
|
|
@@ -12396,20 +12397,31 @@ function findMcpConfigPath(projectDir) {
|
|
|
12396
12397
|
logger.debug("No MCP config found (local or global)");
|
|
12397
12398
|
return null;
|
|
12398
12399
|
}
|
|
12399
|
-
function
|
|
12400
|
-
|
|
12400
|
+
function getGeminiSettingsPath(projectDir, isGlobal) {
|
|
12401
|
+
if (isGlobal) {
|
|
12402
|
+
return join25(homedir4(), ".gemini", "settings.json");
|
|
12403
|
+
}
|
|
12404
|
+
return join25(projectDir, ".gemini", "settings.json");
|
|
12405
|
+
}
|
|
12406
|
+
function checkExistingGeminiConfig(projectDir, isGlobal = false) {
|
|
12407
|
+
const geminiSettingsPath = getGeminiSettingsPath(projectDir, isGlobal);
|
|
12401
12408
|
if (!existsSync7(geminiSettingsPath)) {
|
|
12402
|
-
return { exists: false, isSymlink: false };
|
|
12409
|
+
return { exists: false, isSymlink: false, settingsPath: geminiSettingsPath };
|
|
12403
12410
|
}
|
|
12404
12411
|
try {
|
|
12405
12412
|
const stats = lstatSync(geminiSettingsPath);
|
|
12406
12413
|
if (stats.isSymbolicLink()) {
|
|
12407
12414
|
const target = readlinkSync(geminiSettingsPath);
|
|
12408
|
-
return {
|
|
12415
|
+
return {
|
|
12416
|
+
exists: true,
|
|
12417
|
+
isSymlink: true,
|
|
12418
|
+
currentTarget: target,
|
|
12419
|
+
settingsPath: geminiSettingsPath
|
|
12420
|
+
};
|
|
12409
12421
|
}
|
|
12410
|
-
return { exists: true, isSymlink: false };
|
|
12422
|
+
return { exists: true, isSymlink: false, settingsPath: geminiSettingsPath };
|
|
12411
12423
|
} catch {
|
|
12412
|
-
return { exists: true, isSymlink: false };
|
|
12424
|
+
return { exists: true, isSymlink: false, settingsPath: geminiSettingsPath };
|
|
12413
12425
|
}
|
|
12414
12426
|
}
|
|
12415
12427
|
async function readJsonFile(filePath) {
|
|
@@ -12422,20 +12434,25 @@ async function readJsonFile(filePath) {
|
|
|
12422
12434
|
return null;
|
|
12423
12435
|
}
|
|
12424
12436
|
}
|
|
12425
|
-
async function createSymlink(targetPath, linkPath, projectDir) {
|
|
12437
|
+
async function createSymlink(targetPath, linkPath, projectDir, isGlobal) {
|
|
12426
12438
|
const isWindows5 = process.platform === "win32";
|
|
12427
12439
|
const linkDir = dirname6(linkPath);
|
|
12428
12440
|
if (!existsSync7(linkDir)) {
|
|
12429
12441
|
await mkdir9(linkDir, { recursive: true });
|
|
12430
12442
|
logger.debug(`Created directory: ${linkDir}`);
|
|
12431
12443
|
}
|
|
12432
|
-
|
|
12433
|
-
|
|
12434
|
-
|
|
12444
|
+
let symlinkTarget;
|
|
12445
|
+
if (isGlobal) {
|
|
12446
|
+
symlinkTarget = getGlobalMcpConfigPath();
|
|
12447
|
+
} else {
|
|
12448
|
+
const localMcpPath = join25(projectDir, ".mcp.json");
|
|
12449
|
+
const isLocalConfig = targetPath === localMcpPath;
|
|
12450
|
+
symlinkTarget = isLocalConfig ? "../.mcp.json" : targetPath;
|
|
12451
|
+
}
|
|
12435
12452
|
try {
|
|
12436
12453
|
await symlink2(symlinkTarget, linkPath, isWindows5 ? "file" : undefined);
|
|
12437
12454
|
logger.debug(`Created symlink: ${linkPath} → ${symlinkTarget}`);
|
|
12438
|
-
return { success: true, method: "symlink", targetPath };
|
|
12455
|
+
return { success: true, method: "symlink", targetPath, geminiSettingsPath: linkPath };
|
|
12439
12456
|
} catch (error) {
|
|
12440
12457
|
const errorMessage = error instanceof Error ? error.message : "Unknown error";
|
|
12441
12458
|
return {
|
|
@@ -12532,9 +12549,9 @@ ${geminiPattern}
|
|
|
12532
12549
|
}
|
|
12533
12550
|
}
|
|
12534
12551
|
async function linkGeminiMcpConfig(projectDir, options = {}) {
|
|
12535
|
-
const { skipGitignore = false } = options;
|
|
12552
|
+
const { skipGitignore = false, isGlobal = false } = options;
|
|
12536
12553
|
const resolvedProjectDir = resolve3(projectDir);
|
|
12537
|
-
const geminiSettingsPath =
|
|
12554
|
+
const geminiSettingsPath = getGeminiSettingsPath(resolvedProjectDir, isGlobal);
|
|
12538
12555
|
const mcpConfigPath = findMcpConfigPath(resolvedProjectDir);
|
|
12539
12556
|
if (!mcpConfigPath) {
|
|
12540
12557
|
return {
|
|
@@ -12543,32 +12560,38 @@ async function linkGeminiMcpConfig(projectDir, options = {}) {
|
|
|
12543
12560
|
error: "No MCP config found. Create .mcp.json or ~/.claude/.mcp.json first."
|
|
12544
12561
|
};
|
|
12545
12562
|
}
|
|
12546
|
-
const existing = checkExistingGeminiConfig(resolvedProjectDir);
|
|
12563
|
+
const existing = checkExistingGeminiConfig(resolvedProjectDir, isGlobal);
|
|
12547
12564
|
let result;
|
|
12548
12565
|
if (!existing.exists) {
|
|
12549
|
-
result = await createSymlink(mcpConfigPath, geminiSettingsPath, resolvedProjectDir);
|
|
12566
|
+
result = await createSymlink(mcpConfigPath, geminiSettingsPath, resolvedProjectDir, isGlobal);
|
|
12550
12567
|
if (!result.success && process.platform === "win32") {
|
|
12551
12568
|
logger.debug("Symlink failed on Windows, falling back to creating new settings with mcpServers");
|
|
12552
12569
|
result = await createNewSettingsWithMerge(geminiSettingsPath, mcpConfigPath);
|
|
12553
12570
|
}
|
|
12554
12571
|
} else if (existing.isSymlink) {
|
|
12555
12572
|
logger.debug(`Gemini config already symlinked: ${existing.currentTarget}`);
|
|
12556
|
-
result = {
|
|
12573
|
+
result = {
|
|
12574
|
+
success: true,
|
|
12575
|
+
method: "skipped",
|
|
12576
|
+
targetPath: existing.currentTarget,
|
|
12577
|
+
geminiSettingsPath
|
|
12578
|
+
};
|
|
12557
12579
|
} else {
|
|
12558
12580
|
result = await mergeGeminiSettings(geminiSettingsPath, mcpConfigPath);
|
|
12559
12581
|
}
|
|
12560
|
-
if (result.success && !skipGitignore) {
|
|
12582
|
+
if (result.success && !skipGitignore && !isGlobal) {
|
|
12561
12583
|
await addGeminiToGitignore(resolvedProjectDir);
|
|
12562
12584
|
}
|
|
12563
12585
|
return result;
|
|
12564
12586
|
}
|
|
12565
|
-
async function processGeminiMcpLinking(projectDir) {
|
|
12587
|
+
async function processGeminiMcpLinking(projectDir, options = {}) {
|
|
12566
12588
|
logger.info("Setting up Gemini CLI MCP integration...");
|
|
12567
|
-
const result = await linkGeminiMcpConfig(projectDir);
|
|
12589
|
+
const result = await linkGeminiMcpConfig(projectDir, options);
|
|
12590
|
+
const settingsPath = result.geminiSettingsPath || (options.isGlobal ? "~/.gemini/settings.json" : ".gemini/settings.json");
|
|
12568
12591
|
if (result.success) {
|
|
12569
12592
|
switch (result.method) {
|
|
12570
12593
|
case "symlink":
|
|
12571
|
-
logger.success(`Gemini MCP linked:
|
|
12594
|
+
logger.success(`Gemini MCP linked: ${settingsPath} → ${result.targetPath}`);
|
|
12572
12595
|
logger.info("MCP servers will auto-sync with your Claude config.");
|
|
12573
12596
|
break;
|
|
12574
12597
|
case "merge":
|
|
@@ -12581,7 +12604,11 @@ async function processGeminiMcpLinking(projectDir) {
|
|
|
12581
12604
|
}
|
|
12582
12605
|
} else {
|
|
12583
12606
|
logger.warning(`Gemini MCP setup incomplete: ${result.error}`);
|
|
12584
|
-
|
|
12607
|
+
if (options.isGlobal) {
|
|
12608
|
+
logger.info("Manual setup: mkdir -p ~/.gemini && ln -sf ~/.claude/.mcp.json ~/.gemini/settings.json");
|
|
12609
|
+
} else {
|
|
12610
|
+
logger.info("Manual setup: mkdir -p .gemini && ln -sf ../.mcp.json .gemini/settings.json");
|
|
12611
|
+
}
|
|
12585
12612
|
}
|
|
12586
12613
|
}
|
|
12587
12614
|
var init_gemini_mcp_linker = __esm(() => {
|
|
@@ -12671,7 +12698,7 @@ async function isGeminiInstalled() {
|
|
|
12671
12698
|
}
|
|
12672
12699
|
async function isPackageInstalled(packageName) {
|
|
12673
12700
|
validatePackageName(packageName);
|
|
12674
|
-
if (
|
|
12701
|
+
if (isCIEnvironment()) {
|
|
12675
12702
|
logger.info(`CI environment detected: skipping network check for ${packageName}`);
|
|
12676
12703
|
return false;
|
|
12677
12704
|
}
|
|
@@ -12707,7 +12734,7 @@ async function isPackageInstalled(packageName) {
|
|
|
12707
12734
|
}
|
|
12708
12735
|
async function getPackageVersion(packageName) {
|
|
12709
12736
|
validatePackageName(packageName);
|
|
12710
|
-
if (
|
|
12737
|
+
if (isCIEnvironment()) {
|
|
12711
12738
|
logger.info(`CI environment detected: skipping version check for ${packageName}`);
|
|
12712
12739
|
return null;
|
|
12713
12740
|
}
|
|
@@ -12787,7 +12814,7 @@ async function installPackageGlobally(packageName, packageDisplayName) {
|
|
|
12787
12814
|
}
|
|
12788
12815
|
async function installOpenCode() {
|
|
12789
12816
|
const displayName = "OpenCode CLI";
|
|
12790
|
-
if (
|
|
12817
|
+
if (isCIEnvironment()) {
|
|
12791
12818
|
logger.info("CI environment detected: skipping OpenCode installation");
|
|
12792
12819
|
return {
|
|
12793
12820
|
success: false,
|
|
@@ -12896,7 +12923,7 @@ function validateScriptPath(skillsDir, scriptPath) {
|
|
|
12896
12923
|
}
|
|
12897
12924
|
async function installSkillsDependencies(skillsDir) {
|
|
12898
12925
|
const displayName = "Skills Dependencies";
|
|
12899
|
-
if (
|
|
12926
|
+
if (isCIEnvironment()) {
|
|
12900
12927
|
logger.info("CI environment detected: skipping skills installation");
|
|
12901
12928
|
return {
|
|
12902
12929
|
success: false,
|
|
@@ -14677,7 +14704,7 @@ var cac = (name = "") => new CAC(name);
|
|
|
14677
14704
|
// package.json
|
|
14678
14705
|
var package_default = {
|
|
14679
14706
|
name: "claudekit-cli",
|
|
14680
|
-
version: "3.10.
|
|
14707
|
+
version: "3.10.2",
|
|
14681
14708
|
description: "CLI tool for bootstrapping and updating ClaudeKit projects",
|
|
14682
14709
|
type: "module",
|
|
14683
14710
|
repository: {
|
|
@@ -14922,7 +14949,12 @@ init_logger();
|
|
|
14922
14949
|
import { exec } from "node:child_process";
|
|
14923
14950
|
import { promisify } from "node:util";
|
|
14924
14951
|
var execAsync = promisify(exec);
|
|
14925
|
-
|
|
14952
|
+
function shouldSkipExpensiveOperations() {
|
|
14953
|
+
if (process.env.CK_TEST_HOME) {
|
|
14954
|
+
return false;
|
|
14955
|
+
}
|
|
14956
|
+
return process.env.CI === "true" || process.env.CI_SAFE_MODE === "true";
|
|
14957
|
+
}
|
|
14926
14958
|
function getOSInfo() {
|
|
14927
14959
|
const platform = process.platform;
|
|
14928
14960
|
const arch = process.arch;
|
|
@@ -14994,7 +15026,7 @@ var DEPENDENCIES = {
|
|
|
14994
15026
|
}
|
|
14995
15027
|
};
|
|
14996
15028
|
async function commandExists(command) {
|
|
14997
|
-
if (
|
|
15029
|
+
if (shouldSkipExpensiveOperations()) {
|
|
14998
15030
|
const supportedCommands = ["node", "python", "python3", "pip", "pip3", "claude"];
|
|
14999
15031
|
return supportedCommands.includes(command);
|
|
15000
15032
|
}
|
|
@@ -15010,7 +15042,7 @@ async function commandExists(command) {
|
|
|
15010
15042
|
}
|
|
15011
15043
|
}
|
|
15012
15044
|
async function getCommandPath(command) {
|
|
15013
|
-
if (
|
|
15045
|
+
if (shouldSkipExpensiveOperations()) {
|
|
15014
15046
|
const ciPath = getCICommandPath(command);
|
|
15015
15047
|
if (ciPath)
|
|
15016
15048
|
return ciPath;
|
|
@@ -15029,7 +15061,7 @@ async function getCommandPath(command) {
|
|
|
15029
15061
|
}
|
|
15030
15062
|
}
|
|
15031
15063
|
async function getCommandVersion(command, versionFlag, versionRegex) {
|
|
15032
|
-
if (
|
|
15064
|
+
if (shouldSkipExpensiveOperations()) {
|
|
15033
15065
|
const mockVersions = {
|
|
15034
15066
|
npm: "10.0.0",
|
|
15035
15067
|
node: "20.0.0",
|
|
@@ -15361,6 +15393,12 @@ function compareVersions2(a, b) {
|
|
|
15361
15393
|
}
|
|
15362
15394
|
return 0;
|
|
15363
15395
|
}
|
|
15396
|
+
function shouldSkipExpensiveOperations2() {
|
|
15397
|
+
if (process.env.CK_TEST_HOME) {
|
|
15398
|
+
return false;
|
|
15399
|
+
}
|
|
15400
|
+
return process.env.CI === "true" || process.env.CI_SAFE_MODE === "true";
|
|
15401
|
+
}
|
|
15364
15402
|
|
|
15365
15403
|
class SystemChecker {
|
|
15366
15404
|
group = "system";
|
|
@@ -15375,13 +15413,29 @@ class SystemChecker {
|
|
|
15375
15413
|
logger.verbose(`SystemChecker: Processing ${dep.name}`);
|
|
15376
15414
|
results.push(await this.mapDependencyToCheck(dep));
|
|
15377
15415
|
}
|
|
15378
|
-
|
|
15379
|
-
|
|
15380
|
-
|
|
15381
|
-
|
|
15416
|
+
if (!shouldSkipExpensiveOperations2()) {
|
|
15417
|
+
logger.verbose("SystemChecker: Checking git");
|
|
15418
|
+
results.push(await this.checkGit());
|
|
15419
|
+
logger.verbose("SystemChecker: Checking GitHub CLI");
|
|
15420
|
+
results.push(await this.checkGitHubCli());
|
|
15421
|
+
} else {
|
|
15422
|
+
logger.verbose("SystemChecker: Skipping git/gh checks in CI");
|
|
15423
|
+
results.push(this.createCISkipResult("git-version", "Git"));
|
|
15424
|
+
results.push(this.createCISkipResult("gh-cli-version", "GitHub CLI"));
|
|
15425
|
+
}
|
|
15382
15426
|
logger.verbose("SystemChecker: All system checks complete");
|
|
15383
15427
|
return results;
|
|
15384
15428
|
}
|
|
15429
|
+
createCISkipResult(id, name) {
|
|
15430
|
+
return {
|
|
15431
|
+
id,
|
|
15432
|
+
name,
|
|
15433
|
+
group: "system",
|
|
15434
|
+
status: "pass",
|
|
15435
|
+
message: "Skipped in CI",
|
|
15436
|
+
autoFixable: false
|
|
15437
|
+
};
|
|
15438
|
+
}
|
|
15385
15439
|
async mapDependencyToCheck(dep) {
|
|
15386
15440
|
const isInstalled = dep.installed && dep.meetsRequirements;
|
|
15387
15441
|
const name = this.formatDependencyName(dep.name);
|
|
@@ -16069,6 +16123,12 @@ async function getClaudeKitSetup(projectDir = process.cwd()) {
|
|
|
16069
16123
|
// src/domains/health-checks/claudekit-checker.ts
|
|
16070
16124
|
init_logger();
|
|
16071
16125
|
var HOOK_EXTENSIONS = [".js", ".cjs", ".mjs", ".ts", ".sh", ".ps1"];
|
|
16126
|
+
function shouldSkipExpensiveOperations3() {
|
|
16127
|
+
if (process.env.CK_TEST_HOME) {
|
|
16128
|
+
return false;
|
|
16129
|
+
}
|
|
16130
|
+
return process.env.CI === "true" || process.env.CI_SAFE_MODE === "true";
|
|
16131
|
+
}
|
|
16072
16132
|
|
|
16073
16133
|
class ClaudekitChecker {
|
|
16074
16134
|
group = "claudekit";
|
|
@@ -16338,6 +16398,18 @@ class ClaudekitChecker {
|
|
|
16338
16398
|
}
|
|
16339
16399
|
async checkGlobalDirReadable() {
|
|
16340
16400
|
const globalDir = PathResolver.getGlobalKitDir();
|
|
16401
|
+
if (shouldSkipExpensiveOperations3()) {
|
|
16402
|
+
return {
|
|
16403
|
+
id: "ck-global-dir-readable",
|
|
16404
|
+
name: "Global Dir Readable",
|
|
16405
|
+
group: "claudekit",
|
|
16406
|
+
priority: "standard",
|
|
16407
|
+
status: "info",
|
|
16408
|
+
message: "Skipped in CI/test environment",
|
|
16409
|
+
details: globalDir,
|
|
16410
|
+
autoFixable: false
|
|
16411
|
+
};
|
|
16412
|
+
}
|
|
16341
16413
|
try {
|
|
16342
16414
|
await access(globalDir, constants.R_OK);
|
|
16343
16415
|
return {
|
|
@@ -16366,6 +16438,18 @@ class ClaudekitChecker {
|
|
|
16366
16438
|
}
|
|
16367
16439
|
async checkGlobalDirWritable() {
|
|
16368
16440
|
const globalDir = PathResolver.getGlobalKitDir();
|
|
16441
|
+
if (shouldSkipExpensiveOperations3()) {
|
|
16442
|
+
return {
|
|
16443
|
+
id: "ck-global-dir-writable",
|
|
16444
|
+
name: "Global Dir Writable",
|
|
16445
|
+
group: "claudekit",
|
|
16446
|
+
priority: "standard",
|
|
16447
|
+
status: "info",
|
|
16448
|
+
message: "Skipped in CI/test environment",
|
|
16449
|
+
details: globalDir,
|
|
16450
|
+
autoFixable: false
|
|
16451
|
+
};
|
|
16452
|
+
}
|
|
16369
16453
|
const timestamp = Date.now();
|
|
16370
16454
|
const random = Math.random().toString(36).substring(2);
|
|
16371
16455
|
const testFile = join4(globalDir, `.ck-write-test-${timestamp}-${random}`);
|
|
@@ -17449,7 +17533,12 @@ Need help? Run with: ck new --verbose`, 404);
|
|
|
17449
17533
|
// src/domains/health-checks/auth-checker.ts
|
|
17450
17534
|
init_logger();
|
|
17451
17535
|
init_types2();
|
|
17452
|
-
|
|
17536
|
+
function shouldSkipExpensiveOperations4() {
|
|
17537
|
+
if (process.env.CK_TEST_HOME) {
|
|
17538
|
+
return false;
|
|
17539
|
+
}
|
|
17540
|
+
return process.env.CI === "true" || process.env.CI_SAFE_MODE === "true";
|
|
17541
|
+
}
|
|
17453
17542
|
|
|
17454
17543
|
class AuthChecker {
|
|
17455
17544
|
group = "auth";
|
|
@@ -17533,14 +17622,14 @@ class AuthChecker {
|
|
|
17533
17622
|
}
|
|
17534
17623
|
async checkRepoAccess(kit) {
|
|
17535
17624
|
const kitConfig = AVAILABLE_KITS[kit];
|
|
17536
|
-
if (
|
|
17537
|
-
logger.verbose(`AuthChecker: Skipping repo access check for ${kit} in CI`);
|
|
17625
|
+
if (shouldSkipExpensiveOperations4()) {
|
|
17626
|
+
logger.verbose(`AuthChecker: Skipping repo access check for ${kit} in CI/test`);
|
|
17538
17627
|
return {
|
|
17539
17628
|
id: `repo-access-${kit}`,
|
|
17540
17629
|
name: `Repository Access (${kit})`,
|
|
17541
17630
|
group: "auth",
|
|
17542
17631
|
status: "info",
|
|
17543
|
-
message: "Skipped in CI environment",
|
|
17632
|
+
message: "Skipped in CI/test environment",
|
|
17544
17633
|
autoFixable: false
|
|
17545
17634
|
};
|
|
17546
17635
|
}
|
|
@@ -17600,6 +17689,12 @@ import { constants as constants2, access as access2, mkdir as mkdir3, readFile a
|
|
|
17600
17689
|
import { arch, homedir as homedir3, platform as platform3 } from "node:os";
|
|
17601
17690
|
import { join as join6, normalize as normalize3 } from "node:path";
|
|
17602
17691
|
var IS_WINDOWS = platform3() === "win32";
|
|
17692
|
+
function shouldSkipExpensiveOperations5() {
|
|
17693
|
+
if (process.env.CK_TEST_HOME) {
|
|
17694
|
+
return false;
|
|
17695
|
+
}
|
|
17696
|
+
return process.env.CI === "true" || process.env.CI_SAFE_MODE === "true";
|
|
17697
|
+
}
|
|
17603
17698
|
|
|
17604
17699
|
class PlatformChecker {
|
|
17605
17700
|
group = "platform";
|
|
@@ -17698,6 +17793,18 @@ class PlatformChecker {
|
|
|
17698
17793
|
}
|
|
17699
17794
|
async checkGlobalDirAccess() {
|
|
17700
17795
|
const globalDir = PathResolver.getGlobalKitDir();
|
|
17796
|
+
if (shouldSkipExpensiveOperations5()) {
|
|
17797
|
+
return {
|
|
17798
|
+
id: "global-dir-access",
|
|
17799
|
+
name: "Global Dir Access",
|
|
17800
|
+
group: "platform",
|
|
17801
|
+
priority: "critical",
|
|
17802
|
+
status: "info",
|
|
17803
|
+
message: "Skipped in CI/test environment",
|
|
17804
|
+
details: globalDir,
|
|
17805
|
+
autoFixable: false
|
|
17806
|
+
};
|
|
17807
|
+
}
|
|
17701
17808
|
const testFile = join6(globalDir, ".ck-doctor-access-test");
|
|
17702
17809
|
try {
|
|
17703
17810
|
await mkdir3(globalDir, { recursive: true });
|
|
@@ -17771,6 +17878,17 @@ class PlatformChecker {
|
|
|
17771
17878
|
};
|
|
17772
17879
|
}
|
|
17773
17880
|
async checkLongPathSupport() {
|
|
17881
|
+
if (shouldSkipExpensiveOperations5()) {
|
|
17882
|
+
return {
|
|
17883
|
+
id: "long-path-support",
|
|
17884
|
+
name: "Long Path Support",
|
|
17885
|
+
group: "platform",
|
|
17886
|
+
priority: "extended",
|
|
17887
|
+
status: "info",
|
|
17888
|
+
message: "Skipped in CI/test environment",
|
|
17889
|
+
autoFixable: false
|
|
17890
|
+
};
|
|
17891
|
+
}
|
|
17774
17892
|
try {
|
|
17775
17893
|
const { execSync: execSync3 } = await import("node:child_process");
|
|
17776
17894
|
const result = execSync3('reg query "HKLM\\SYSTEM\\CurrentControlSet\\Control\\FileSystem" /v LongPathsEnabled', { encoding: "utf-8", timeout: 2000 });
|
|
@@ -17798,6 +17916,17 @@ class PlatformChecker {
|
|
|
17798
17916
|
}
|
|
17799
17917
|
}
|
|
17800
17918
|
async checkSymlinkSupport() {
|
|
17919
|
+
if (shouldSkipExpensiveOperations5()) {
|
|
17920
|
+
return {
|
|
17921
|
+
id: "symlink-support",
|
|
17922
|
+
name: "Symlink Support",
|
|
17923
|
+
group: "platform",
|
|
17924
|
+
priority: "extended",
|
|
17925
|
+
status: "info",
|
|
17926
|
+
message: "Skipped in CI/test environment",
|
|
17927
|
+
autoFixable: false
|
|
17928
|
+
};
|
|
17929
|
+
}
|
|
17801
17930
|
const testDir = PathResolver.getGlobalKitDir();
|
|
17802
17931
|
const target = join6(testDir, ".ck-symlink-test-target");
|
|
17803
17932
|
const link = join6(testDir, ".ck-symlink-test-link");
|
|
@@ -27557,30 +27686,75 @@ class SettingsMerger {
|
|
|
27557
27686
|
return merged;
|
|
27558
27687
|
}
|
|
27559
27688
|
static mergeHookEntries(sourceEntries, destEntries, eventName, result) {
|
|
27560
|
-
const existingCommands = new Set;
|
|
27561
|
-
SettingsMerger.extractCommands(destEntries, existingCommands);
|
|
27562
27689
|
if (destEntries.length > 0) {
|
|
27563
27690
|
result.hooksPreserved += destEntries.length;
|
|
27564
27691
|
}
|
|
27565
|
-
const merged =
|
|
27692
|
+
const merged = destEntries.map((entry) => SettingsMerger.deepCopyEntry(entry));
|
|
27693
|
+
const matcherIndex = new Map;
|
|
27694
|
+
for (let i = 0;i < merged.length; i++) {
|
|
27695
|
+
const entry = merged[i];
|
|
27696
|
+
if ("matcher" in entry && entry.matcher) {
|
|
27697
|
+
matcherIndex.set(entry.matcher, i);
|
|
27698
|
+
}
|
|
27699
|
+
}
|
|
27700
|
+
const existingCommands = new Set;
|
|
27701
|
+
SettingsMerger.extractCommands(destEntries, existingCommands);
|
|
27566
27702
|
for (const entry of sourceEntries) {
|
|
27703
|
+
const sourceMatcher = "matcher" in entry ? entry.matcher : undefined;
|
|
27567
27704
|
const commands = SettingsMerger.getEntryCommands(entry);
|
|
27568
|
-
|
|
27569
|
-
|
|
27570
|
-
|
|
27571
|
-
|
|
27572
|
-
|
|
27573
|
-
|
|
27574
|
-
|
|
27575
|
-
|
|
27576
|
-
|
|
27577
|
-
|
|
27578
|
-
|
|
27705
|
+
if (sourceMatcher && matcherIndex.has(sourceMatcher)) {
|
|
27706
|
+
const existingIdx = matcherIndex.get(sourceMatcher);
|
|
27707
|
+
if (existingIdx === undefined)
|
|
27708
|
+
continue;
|
|
27709
|
+
const existingEntry = merged[existingIdx];
|
|
27710
|
+
const newCommands = commands.filter((cmd) => !existingCommands.has(cmd));
|
|
27711
|
+
const duplicateCommands = commands.filter((cmd) => existingCommands.has(cmd));
|
|
27712
|
+
if (duplicateCommands.length > 0) {
|
|
27713
|
+
const summary = duplicateCommands.length === 1 ? `"${SettingsMerger.truncateCommand(duplicateCommands[0])}"` : `${duplicateCommands.length} commands`;
|
|
27714
|
+
result.conflictsDetected.push(`${eventName}: duplicate ${summary}`);
|
|
27715
|
+
}
|
|
27716
|
+
if (newCommands.length > 0 && "hooks" in entry && entry.hooks) {
|
|
27717
|
+
if (!existingEntry.hooks) {
|
|
27718
|
+
existingEntry.hooks = [];
|
|
27719
|
+
}
|
|
27720
|
+
for (const hook of entry.hooks) {
|
|
27721
|
+
if (hook.command && !existingCommands.has(hook.command)) {
|
|
27722
|
+
existingEntry.hooks.push(hook);
|
|
27723
|
+
existingCommands.add(hook.command);
|
|
27724
|
+
}
|
|
27725
|
+
}
|
|
27726
|
+
result.hooksAdded++;
|
|
27727
|
+
}
|
|
27728
|
+
} else {
|
|
27729
|
+
const isFullyDuplicated = commands.length > 0 && commands.every((cmd) => existingCommands.has(cmd));
|
|
27730
|
+
const duplicateCommands = commands.filter((cmd) => existingCommands.has(cmd));
|
|
27731
|
+
if (duplicateCommands.length > 0) {
|
|
27732
|
+
const summary = duplicateCommands.length === 1 ? `"${SettingsMerger.truncateCommand(duplicateCommands[0])}"` : `${duplicateCommands.length} commands`;
|
|
27733
|
+
result.conflictsDetected.push(`${eventName}: duplicate ${summary}`);
|
|
27734
|
+
}
|
|
27735
|
+
if (!isFullyDuplicated) {
|
|
27736
|
+
merged.push(entry);
|
|
27737
|
+
result.hooksAdded++;
|
|
27738
|
+
if (sourceMatcher) {
|
|
27739
|
+
matcherIndex.set(sourceMatcher, merged.length - 1);
|
|
27740
|
+
}
|
|
27741
|
+
for (const cmd of commands) {
|
|
27742
|
+
existingCommands.add(cmd);
|
|
27743
|
+
}
|
|
27579
27744
|
}
|
|
27580
27745
|
}
|
|
27581
27746
|
}
|
|
27582
27747
|
return merged;
|
|
27583
27748
|
}
|
|
27749
|
+
static deepCopyEntry(entry) {
|
|
27750
|
+
if ("hooks" in entry) {
|
|
27751
|
+
return {
|
|
27752
|
+
...entry,
|
|
27753
|
+
hooks: entry.hooks ? [...entry.hooks.map((h2) => ({ ...h2 }))] : undefined
|
|
27754
|
+
};
|
|
27755
|
+
}
|
|
27756
|
+
return { ...entry };
|
|
27757
|
+
}
|
|
27584
27758
|
static extractCommands(entries, commands) {
|
|
27585
27759
|
for (const entry of entries) {
|
|
27586
27760
|
if ("command" in entry && entry.command) {
|
|
@@ -32972,12 +33146,21 @@ async function initCommand(options) {
|
|
|
32972
33146
|
const { isGeminiInstalled: isGeminiInstalled2 } = await Promise.resolve().then(() => (init_package_installer(), exports_package_installer));
|
|
32973
33147
|
const { checkExistingGeminiConfig: checkExistingGeminiConfig2, findMcpConfigPath: findMcpConfigPath2, processGeminiMcpLinking: processGeminiMcpLinking2 } = await Promise.resolve().then(() => (init_gemini_mcp_linker(), exports_gemini_mcp_linker));
|
|
32974
33148
|
const geminiInstalled = await isGeminiInstalled2();
|
|
32975
|
-
const existingConfig = checkExistingGeminiConfig2(resolvedDir);
|
|
32976
|
-
const
|
|
33149
|
+
const existingConfig = checkExistingGeminiConfig2(resolvedDir, validOptions.global);
|
|
33150
|
+
const mcpConfigPath = findMcpConfigPath2(resolvedDir);
|
|
33151
|
+
const mcpConfigExists = mcpConfigPath !== null;
|
|
32977
33152
|
if (geminiInstalled && !existingConfig.exists && mcpConfigExists) {
|
|
32978
|
-
const
|
|
33153
|
+
const geminiPath = validOptions.global ? "~/.gemini/settings.json" : ".gemini/settings.json";
|
|
33154
|
+
const mcpPath = validOptions.global ? "~/.claude/.mcp.json" : ".mcp.json";
|
|
33155
|
+
const promptMessage = [
|
|
33156
|
+
"Gemini CLI detected. Set up MCP integration?",
|
|
33157
|
+
` → Creates ${geminiPath} symlink to ${mcpPath}`,
|
|
33158
|
+
" → Gemini CLI will share MCP servers with Claude Code"
|
|
33159
|
+
].join(`
|
|
33160
|
+
`);
|
|
33161
|
+
const shouldSetupGemini = await prompts.confirm(promptMessage);
|
|
32979
33162
|
if (shouldSetupGemini) {
|
|
32980
|
-
await processGeminiMcpLinking2(resolvedDir);
|
|
33163
|
+
await processGeminiMcpLinking2(resolvedDir, { isGlobal: validOptions.global });
|
|
32981
33164
|
}
|
|
32982
33165
|
}
|
|
32983
33166
|
}
|
|
@@ -33648,7 +33831,7 @@ var import_compare_versions2 = __toESM(require_umd(), 1);
|
|
|
33648
33831
|
// package.json
|
|
33649
33832
|
var package_default2 = {
|
|
33650
33833
|
name: "claudekit-cli",
|
|
33651
|
-
version: "3.10.
|
|
33834
|
+
version: "3.10.2",
|
|
33652
33835
|
description: "CLI tool for bootstrapping and updating ClaudeKit projects",
|
|
33653
33836
|
type: "module",
|
|
33654
33837
|
repository: {
|