claudekit-cli 3.34.1-dev.1 → 3.34.1-dev.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 CHANGED
@@ -29190,8 +29190,10 @@ var init_ck_config = __esm(() => {
29190
29190
  CkHooksConfigSchema = exports_external.object({
29191
29191
  "session-init": exports_external.boolean().optional(),
29192
29192
  "subagent-init": exports_external.boolean().optional(),
29193
+ "descriptive-name": exports_external.boolean().optional(),
29193
29194
  "dev-rules-reminder": exports_external.boolean().optional(),
29194
29195
  "usage-context-awareness": exports_external.boolean().optional(),
29196
+ "context-tracking": exports_external.boolean().optional(),
29195
29197
  "scout-block": exports_external.boolean().optional(),
29196
29198
  "privacy-block": exports_external.boolean().optional(),
29197
29199
  "post-edit-simplify-reminder": exports_external.boolean().optional()
@@ -29264,8 +29266,10 @@ var init_ck_config = __esm(() => {
29264
29266
  hooks: {
29265
29267
  "session-init": true,
29266
29268
  "subagent-init": true,
29269
+ "descriptive-name": true,
29267
29270
  "dev-rules-reminder": true,
29268
29271
  "usage-context-awareness": true,
29272
+ "context-tracking": true,
29269
29273
  "scout-block": true,
29270
29274
  "privacy-block": true,
29271
29275
  "post-edit-simplify-reminder": true
@@ -29274,8 +29278,10 @@ var init_ck_config = __esm(() => {
29274
29278
  CK_HOOK_NAMES = [
29275
29279
  "session-init",
29276
29280
  "subagent-init",
29281
+ "descriptive-name",
29277
29282
  "dev-rules-reminder",
29278
29283
  "usage-context-awareness",
29284
+ "context-tracking",
29279
29285
  "scout-block",
29280
29286
  "privacy-block",
29281
29287
  "post-edit-simplify-reminder"
@@ -29556,6 +29562,9 @@ function getNestedValue(obj, path2) {
29556
29562
  }
29557
29563
  function setNestedValue(obj, path2, value) {
29558
29564
  const keys = path2.split(".");
29565
+ if (keys.some((k) => DANGEROUS_KEYS.includes(k))) {
29566
+ throw new Error("Invalid field path: dangerous key detected");
29567
+ }
29559
29568
  let current = obj;
29560
29569
  for (let i = 0;i < keys.length - 1; i++) {
29561
29570
  const key = keys[i];
@@ -29569,6 +29578,8 @@ function setNestedValue(obj, path2, value) {
29569
29578
  function deepMerge(target, source) {
29570
29579
  const result = { ...target };
29571
29580
  for (const key of Object.keys(source)) {
29581
+ if (DANGEROUS_KEYS.includes(key))
29582
+ continue;
29572
29583
  const sourceVal = source[key];
29573
29584
  const targetVal = result[key];
29574
29585
  if (sourceVal !== null && typeof sourceVal === "object" && !Array.isArray(sourceVal) && targetVal !== null && typeof targetVal === "object" && !Array.isArray(targetVal)) {
@@ -29707,6 +29718,10 @@ class CkConfigManager {
29707
29718
  return null;
29708
29719
  return CkConfigManager.loadConfigFile(CkConfigManager.getProjectConfigPath(projectDir));
29709
29720
  }
29721
+ static projectConfigExists(dir, isGlobal) {
29722
+ const configPath = isGlobal ? join3(dir, ".ck.json") : CkConfigManager.getProjectConfigPath(dir);
29723
+ return existsSync3(configPath);
29724
+ }
29710
29725
  static configExists(scope, projectDir) {
29711
29726
  if (scope === "global") {
29712
29727
  return existsSync3(CkConfigManager.getGlobalConfigPath());
@@ -29727,10 +29742,11 @@ class CkConfigManager {
29727
29742
  await CkConfigManager.saveFull(existing, scope, projectDir);
29728
29743
  }
29729
29744
  }
29730
- var CK_CONFIG_FILE = ".ck.json";
29745
+ var CK_CONFIG_FILE = ".ck.json", DANGEROUS_KEYS;
29731
29746
  var init_ck_config_manager = __esm(() => {
29732
29747
  init_logger();
29733
29748
  init_types2();
29749
+ DANGEROUS_KEYS = ["__proto__", "constructor", "prototype"];
29734
29750
  });
29735
29751
 
29736
29752
  // src/shared/environment.ts
@@ -38109,17 +38125,12 @@ class FileWatcher {
38109
38125
  if (this.isConfigFile(path2)) {
38110
38126
  try {
38111
38127
  const scope = this.getConfigScope(path2);
38112
- let config;
38113
- if (scope === "global") {
38114
- ConfigManager.setGlobalFlag(true);
38115
- config = await ConfigManager.load();
38116
- } else {
38117
- const projectConfig = await ConfigManager.loadProjectConfig(process.cwd(), false);
38118
- config = projectConfig ? { paths: projectConfig } : {};
38119
- }
38128
+ const ckScope = scope === "global" ? "global" : "project";
38129
+ const projectDir = scope === "global" ? null : process.cwd();
38130
+ const config = await CkConfigManager.loadScope(ckScope, projectDir);
38120
38131
  this.wsManager.broadcast({
38121
38132
  type: "config:updated",
38122
- payload: { scope, config }
38133
+ payload: { scope, config: config ?? {} }
38123
38134
  });
38124
38135
  } catch (error) {
38125
38136
  logger.error(`Failed to reload config: ${error}`);
@@ -38877,6 +38888,9 @@ var init_projects_registry = __esm(() => {
38877
38888
  });
38878
38889
 
38879
38890
  // src/domains/web-server/routes/ck-config-routes.ts
38891
+ import { existsSync as existsSync6 } from "node:fs";
38892
+ import { readFile as readFile5 } from "node:fs/promises";
38893
+ import { join as join9 } from "node:path";
38880
38894
  async function resolveProjectDir(projectId) {
38881
38895
  if (!projectId)
38882
38896
  return null;
@@ -38999,92 +39013,6 @@ function registerCkConfigRoutes(app) {
38999
39013
  res.status(500).json({ error: "Failed to update field" });
39000
39014
  }
39001
39015
  });
39002
- }
39003
- var init_ck_config_routes = __esm(() => {
39004
- init_config();
39005
- init_ck_config_schema();
39006
- init_logger();
39007
- init_types2();
39008
- });
39009
-
39010
- // src/domains/web-server/routes/config-routes.ts
39011
- import { existsSync as existsSync6 } from "node:fs";
39012
- import { mkdir as mkdir4, readFile as readFile5, writeFile as writeFile6 } from "node:fs/promises";
39013
- import { join as join9 } from "node:path";
39014
- function registerConfigRoutes(app) {
39015
- app.get("/api/config", async (_req, res) => {
39016
- try {
39017
- const projectDir = process.cwd();
39018
- const globalConfigPath = getEngineerKitConfigPath();
39019
- let globalConfig = {};
39020
- if (existsSync6(globalConfigPath)) {
39021
- const content = await readFile5(globalConfigPath, "utf-8");
39022
- try {
39023
- globalConfig = JSON.parse(content);
39024
- } catch {}
39025
- }
39026
- const localConfig = await ConfigManager.loadProjectConfig(projectDir, false);
39027
- const merged = deepMerge2(globalConfig, localConfig ? { paths: localConfig } : {});
39028
- const response = {
39029
- global: globalConfig,
39030
- local: localConfig ? { paths: localConfig } : null,
39031
- merged
39032
- };
39033
- res.json(response);
39034
- } catch (error) {
39035
- logger.error(`Failed to load config: ${error}`);
39036
- res.status(500).json({ error: "Failed to load configuration" });
39037
- }
39038
- });
39039
- app.get("/api/config/global", async (_req, res) => {
39040
- try {
39041
- const globalConfigPath = getEngineerKitConfigPath();
39042
- let config = {};
39043
- if (existsSync6(globalConfigPath)) {
39044
- const content = await readFile5(globalConfigPath, "utf-8");
39045
- try {
39046
- config = JSON.parse(content);
39047
- } catch {}
39048
- }
39049
- res.json(config);
39050
- } catch (error) {
39051
- res.status(500).json({ error: "Failed to load global config" });
39052
- }
39053
- });
39054
- app.get("/api/config/local", async (_req, res) => {
39055
- try {
39056
- const projectDir = process.cwd();
39057
- const config = await ConfigManager.loadProjectConfig(projectDir, false);
39058
- res.json(config ? { paths: config } : {});
39059
- } catch (error) {
39060
- res.status(500).json({ error: "Failed to load local config" });
39061
- }
39062
- });
39063
- app.post("/api/config", async (req, res) => {
39064
- try {
39065
- const { scope = "local", config } = req.body;
39066
- if (!config || typeof config !== "object") {
39067
- res.status(400).json({ error: "Invalid config payload" });
39068
- return;
39069
- }
39070
- if (scope === "global") {
39071
- const globalConfigPath = getEngineerKitConfigPath();
39072
- const globalDir = PathResolver.getGlobalKitDir();
39073
- if (!existsSync6(globalDir)) {
39074
- await mkdir4(globalDir, { recursive: true });
39075
- }
39076
- await writeFile6(globalConfigPath, JSON.stringify(config, null, 2), "utf-8");
39077
- logger.debug(`Engineer kit config saved to ${globalConfigPath}`);
39078
- } else {
39079
- const projectDir = process.cwd();
39080
- await ConfigManager.saveProjectConfig(projectDir, config.paths || config, false);
39081
- }
39082
- res.json({ success: true, scope });
39083
- } catch (error) {
39084
- logger.error(`Failed to save config: ${error}`);
39085
- res.status(500).json({ error: "Failed to save configuration" });
39086
- }
39087
- });
39088
39016
  app.get("/api/metadata/global", async (_req, res) => {
39089
39017
  try {
39090
39018
  const metadataPath = join9(PathResolver.getGlobalKitDir(), "metadata.json");
@@ -39093,7 +39021,9 @@ function registerConfigRoutes(app) {
39093
39021
  const content = await readFile5(metadataPath, "utf-8");
39094
39022
  try {
39095
39023
  metadata = JSON.parse(content);
39096
- } catch {}
39024
+ } catch (err) {
39025
+ logger.warning(`Invalid JSON in metadata.json: ${err}`);
39026
+ }
39097
39027
  }
39098
39028
  res.json(metadata);
39099
39029
  } catch (error) {
@@ -39101,92 +39031,13 @@ function registerConfigRoutes(app) {
39101
39031
  res.status(500).json({ error: "Failed to load metadata" });
39102
39032
  }
39103
39033
  });
39104
- app.get("/api/config/project/:id", async (req, res) => {
39105
- try {
39106
- const id = String(req.params.id);
39107
- let projectDir;
39108
- if (id.startsWith("discovered-")) {
39109
- const encodedPath = id.slice("discovered-".length);
39110
- projectDir = Buffer.from(encodedPath, "base64url").toString("utf-8");
39111
- } else {
39112
- const { ProjectsRegistryManager: ProjectsRegistryManager2 } = await Promise.resolve().then(() => (init_projects_registry(), exports_projects_registry));
39113
- const project = await ProjectsRegistryManager2.getProject(id);
39114
- if (!project) {
39115
- res.status(404).json({ error: "Project not found" });
39116
- return;
39117
- }
39118
- projectDir = project.path;
39119
- }
39120
- const globalConfigPath = getEngineerKitConfigPath();
39121
- let globalConfig = {};
39122
- if (existsSync6(globalConfigPath)) {
39123
- const content = await readFile5(globalConfigPath, "utf-8");
39124
- try {
39125
- globalConfig = JSON.parse(content);
39126
- } catch {}
39127
- }
39128
- const localConfig = await ConfigManager.loadProjectConfig(projectDir, false);
39129
- const merged = deepMerge2(globalConfig, localConfig ? { paths: localConfig } : {});
39130
- const response = {
39131
- global: globalConfig,
39132
- local: localConfig ? { paths: localConfig } : null,
39133
- merged
39134
- };
39135
- res.json(response);
39136
- } catch (error) {
39137
- logger.error(`Failed to load project config: ${error}`);
39138
- res.status(500).json({ error: "Failed to load project configuration" });
39139
- }
39140
- });
39141
- app.post("/api/config/project/:id", async (req, res) => {
39142
- try {
39143
- const id = String(req.params.id);
39144
- const { config } = req.body;
39145
- if (!config || typeof config !== "object") {
39146
- res.status(400).json({ error: "Invalid config payload" });
39147
- return;
39148
- }
39149
- let projectDir;
39150
- if (id.startsWith("discovered-")) {
39151
- const encodedPath = id.slice("discovered-".length);
39152
- projectDir = Buffer.from(encodedPath, "base64url").toString("utf-8");
39153
- } else {
39154
- const { ProjectsRegistryManager: ProjectsRegistryManager2 } = await Promise.resolve().then(() => (init_projects_registry(), exports_projects_registry));
39155
- const project = await ProjectsRegistryManager2.getProject(id);
39156
- if (!project) {
39157
- res.status(404).json({ error: "Project not found" });
39158
- return;
39159
- }
39160
- projectDir = project.path;
39161
- }
39162
- await ConfigManager.saveProjectConfig(projectDir, config.paths || config, false);
39163
- res.json({ success: true });
39164
- } catch (error) {
39165
- logger.error(`Failed to save project config: ${error}`);
39166
- res.status(500).json({ error: "Failed to save project configuration" });
39167
- }
39168
- });
39169
- }
39170
- function deepMerge2(target, source) {
39171
- const result = { ...target };
39172
- const dangerousKeys = ["__proto__", "constructor", "prototype"];
39173
- for (const key of Object.keys(source)) {
39174
- if (dangerousKeys.includes(key))
39175
- continue;
39176
- const sourceVal = source[key];
39177
- if (sourceVal && typeof sourceVal === "object" && !Array.isArray(sourceVal)) {
39178
- result[key] = deepMerge2(result[key] || {}, sourceVal);
39179
- } else {
39180
- result[key] = sourceVal;
39181
- }
39182
- }
39183
- return result;
39184
39034
  }
39185
- var getEngineerKitConfigPath = () => join9(PathResolver.getGlobalKitDir(), ".ck.json");
39186
- var init_config_routes = __esm(() => {
39035
+ var init_ck_config_routes = __esm(() => {
39187
39036
  init_config();
39037
+ init_ck_config_schema();
39188
39038
  init_logger();
39189
39039
  init_path_resolver();
39040
+ init_types2();
39190
39041
  });
39191
39042
 
39192
39043
  // src/domains/web-server/routes/health-routes.ts
@@ -43608,7 +43459,7 @@ async function buildProjectInfoFromRegistry(registered) {
43608
43459
  } catch {}
43609
43460
  }
43610
43461
  } catch {}
43611
- const hasLocalConfig = hasClaudeDir && ConfigManager.projectConfigExists(registered.path, false);
43462
+ const hasLocalConfig = hasClaudeDir && CkConfigManager.projectConfigExists(registered.path, false);
43612
43463
  const settings = await readSettings();
43613
43464
  const skills = await scanSkills();
43614
43465
  const settingsPath = join17(homedir10(), ".claude", "settings.json");
@@ -43649,7 +43500,7 @@ async function detectAndBuildProjectInfo(path2, id) {
43649
43500
  } catch {}
43650
43501
  }
43651
43502
  } catch {}
43652
- const hasLocalConfig = ConfigManager.projectConfigExists(path2, id === "global");
43503
+ const hasLocalConfig = CkConfigManager.projectConfigExists(path2, id === "global");
43653
43504
  const settings = await readSettings();
43654
43505
  const skills = await scanSkills();
43655
43506
  const settingsPath = join17(homedir10(), ".claude", "settings.json");
@@ -43998,7 +43849,7 @@ var init_skills_discovery = __esm(() => {
43998
43849
 
43999
43850
  // src/commands/skills/skills-registry.ts
44000
43851
  import { existsSync as existsSync14 } from "node:fs";
44001
- import { mkdir as mkdir5, readFile as readFile12, writeFile as writeFile7 } from "node:fs/promises";
43852
+ import { mkdir as mkdir4, readFile as readFile12, writeFile as writeFile6 } from "node:fs/promises";
44002
43853
  import { homedir as homedir14 } from "node:os";
44003
43854
  import { dirname as dirname6, join as join21 } from "node:path";
44004
43855
  function getCliVersion() {
@@ -44035,9 +43886,9 @@ async function readRegistry() {
44035
43886
  async function writeRegistry(registry) {
44036
43887
  const dir = dirname6(REGISTRY_PATH);
44037
43888
  if (!existsSync14(dir)) {
44038
- await mkdir5(dir, { recursive: true });
43889
+ await mkdir4(dir, { recursive: true });
44039
43890
  }
44040
- await writeFile7(REGISTRY_PATH, JSON.stringify(registry, null, 2), "utf-8");
43891
+ await writeFile6(REGISTRY_PATH, JSON.stringify(registry, null, 2), "utf-8");
44041
43892
  }
44042
43893
  async function addInstallation(skill, agent, global3, path2, sourcePath) {
44043
43894
  const registry = await readRegistry();
@@ -44111,7 +43962,7 @@ var init_skills_registry = __esm(() => {
44111
43962
 
44112
43963
  // src/commands/skills/skills-installer.ts
44113
43964
  import { existsSync as existsSync15 } from "node:fs";
44114
- import { cp, mkdir as mkdir6, stat as stat7 } from "node:fs/promises";
43965
+ import { cp, mkdir as mkdir5, stat as stat7 } from "node:fs/promises";
44115
43966
  import { dirname as dirname7, resolve as resolve6 } from "node:path";
44116
43967
  function isSamePath(path1, path2) {
44117
43968
  try {
@@ -44156,7 +44007,7 @@ async function installSkillForAgent(skill, agent, options2) {
44156
44007
  try {
44157
44008
  const parentDir = dirname7(targetPath);
44158
44009
  if (!existsSync15(parentDir)) {
44159
- await mkdir6(parentDir, { recursive: true });
44010
+ await mkdir5(parentDir, { recursive: true });
44160
44011
  }
44161
44012
  if (existsSync15(targetPath)) {
44162
44013
  const stats = await stat7(targetPath);
@@ -44735,7 +44586,7 @@ var init_pnpm_detector = __esm(() => {
44735
44586
 
44736
44587
  // src/domains/installation/package-managers/detection-core.ts
44737
44588
  import { existsSync as existsSync17 } from "node:fs";
44738
- import { chmod as chmod2, mkdir as mkdir7, readFile as readFile13, writeFile as writeFile8 } from "node:fs/promises";
44589
+ import { chmod as chmod2, mkdir as mkdir6, readFile as readFile13, writeFile as writeFile7 } from "node:fs/promises";
44739
44590
  import { platform as platform4 } from "node:os";
44740
44591
  import { join as join23 } from "node:path";
44741
44592
  function detectFromEnv() {
@@ -44800,7 +44651,7 @@ async function saveCachedPm(pm, getVersion) {
44800
44651
  const configDir = PathResolver.getConfigDir(false);
44801
44652
  const cacheFile = join23(configDir, CACHE_FILE);
44802
44653
  if (!existsSync17(configDir)) {
44803
- await mkdir7(configDir, { recursive: true });
44654
+ await mkdir6(configDir, { recursive: true });
44804
44655
  if (platform4() !== "win32") {
44805
44656
  await chmod2(configDir, 448);
44806
44657
  }
@@ -44811,7 +44662,7 @@ async function saveCachedPm(pm, getVersion) {
44811
44662
  detectedAt: Date.now(),
44812
44663
  version: version ?? undefined
44813
44664
  };
44814
- await writeFile8(cacheFile, JSON.stringify(data, null, 2), "utf-8");
44665
+ await writeFile7(cacheFile, JSON.stringify(data, null, 2), "utf-8");
44815
44666
  if (platform4() !== "win32") {
44816
44667
  await chmod2(cacheFile, 384);
44817
44668
  }
@@ -45385,7 +45236,7 @@ var package_default;
45385
45236
  var init_package = __esm(() => {
45386
45237
  package_default = {
45387
45238
  name: "claudekit-cli",
45388
- version: "3.34.1-dev.1",
45239
+ version: "3.34.1-dev.2",
45389
45240
  description: "CLI tool for bootstrapping and updating ClaudeKit projects",
45390
45241
  type: "module",
45391
45242
  repository: {
@@ -46199,7 +46050,7 @@ var init_error_handler2 = __esm(() => {
46199
46050
 
46200
46051
  // src/domains/versioning/release-cache.ts
46201
46052
  import { existsSync as existsSync18 } from "node:fs";
46202
- import { mkdir as mkdir8, readFile as readFile17, unlink as unlink3, writeFile as writeFile10 } from "node:fs/promises";
46053
+ import { mkdir as mkdir7, readFile as readFile17, unlink as unlink3, writeFile as writeFile9 } from "node:fs/promises";
46203
46054
  import { join as join27 } from "node:path";
46204
46055
  var ReleaseCacheEntrySchema, ReleaseCache;
46205
46056
  var init_release_cache = __esm(() => {
@@ -46245,12 +46096,12 @@ var init_release_cache = __esm(() => {
46245
46096
  async set(key, releases) {
46246
46097
  const cacheFile = this.getCachePath(key);
46247
46098
  try {
46248
- await mkdir8(this.cacheDir, { recursive: true, mode: 448 });
46099
+ await mkdir7(this.cacheDir, { recursive: true, mode: 448 });
46249
46100
  const cacheEntry = {
46250
46101
  timestamp: Date.now(),
46251
46102
  releases
46252
46103
  };
46253
- await writeFile10(cacheFile, JSON.stringify(cacheEntry, null, 2), "utf-8");
46104
+ await writeFile9(cacheFile, JSON.stringify(cacheEntry, null, 2), "utf-8");
46254
46105
  logger.debug(`Release cache set for key: ${key}, cached ${releases.length} releases`);
46255
46106
  } catch (error) {
46256
46107
  logger.debug(`Failed to set release cache for key ${key}: ${error}`);
@@ -46961,7 +46812,7 @@ var init_version_utils = __esm(() => {
46961
46812
 
46962
46813
  // src/domains/versioning/version-cache.ts
46963
46814
  import { existsSync as existsSync19 } from "node:fs";
46964
- import { mkdir as mkdir9, readFile as readFile18, writeFile as writeFile11 } from "node:fs/promises";
46815
+ import { mkdir as mkdir8, readFile as readFile18, writeFile as writeFile10 } from "node:fs/promises";
46965
46816
  import { join as join28 } from "node:path";
46966
46817
  var VersionCacheManager;
46967
46818
  var init_version_cache = __esm(() => {
@@ -46999,9 +46850,9 @@ var init_version_cache = __esm(() => {
46999
46850
  const cacheDir = PathResolver.getCacheDir(false);
47000
46851
  try {
47001
46852
  if (!existsSync19(cacheDir)) {
47002
- await mkdir9(cacheDir, { recursive: true, mode: 448 });
46853
+ await mkdir8(cacheDir, { recursive: true, mode: 448 });
47003
46854
  }
47004
- await writeFile11(cacheFile, JSON.stringify(cache3, null, 2), "utf-8");
46855
+ await writeFile10(cacheFile, JSON.stringify(cache3, null, 2), "utf-8");
47005
46856
  logger.debug(`Version check cache saved to ${cacheFile}`);
47006
46857
  } catch (error) {
47007
46858
  logger.debug(`Failed to save version check cache: ${error}`);
@@ -47581,7 +47432,6 @@ var init_user_routes = __esm(() => {
47581
47432
  function registerRoutes(app) {
47582
47433
  registerHealthRoutes(app);
47583
47434
  registerActionRoutes(app);
47584
- registerConfigRoutes(app);
47585
47435
  registerCkConfigRoutes(app);
47586
47436
  registerProjectRoutes(app);
47587
47437
  registerSkillRoutes(app);
@@ -47593,7 +47443,6 @@ function registerRoutes(app) {
47593
47443
  var init_routes = __esm(() => {
47594
47444
  init_action_routes();
47595
47445
  init_ck_config_routes();
47596
- init_config_routes();
47597
47446
  init_project_routes();
47598
47447
  init_session_routes();
47599
47448
  init_settings_routes();
@@ -53046,7 +52895,7 @@ var init_skills_installer2 = __esm(() => {
53046
52895
 
53047
52896
  // src/services/package-installer/gemini-mcp/config-manager.ts
53048
52897
  import { existsSync as existsSync32 } from "node:fs";
53049
- import { mkdir as mkdir13, readFile as readFile26, writeFile as writeFile16 } from "node:fs/promises";
52898
+ import { mkdir as mkdir12, readFile as readFile26, writeFile as writeFile15 } from "node:fs/promises";
53050
52899
  import { dirname as dirname11, join as join50 } from "node:path";
53051
52900
  async function readJsonFile(filePath) {
53052
52901
  try {
@@ -53077,7 +52926,7 @@ async function addGeminiToGitignore(projectDir) {
53077
52926
  `) || content === "" ? "" : `
53078
52927
  `;
53079
52928
  const comment = "# Gemini CLI settings (contains user-specific config)";
53080
- await writeFile16(gitignorePath, `${content}${newLine}${comment}
52929
+ await writeFile15(gitignorePath, `${content}${newLine}${comment}
53081
52930
  ${geminiPattern}
53082
52931
  `, "utf-8");
53083
52932
  logger.debug(`Added ${geminiPattern} to .gitignore`);
@@ -53089,7 +52938,7 @@ ${geminiPattern}
53089
52938
  async function createNewSettingsWithMerge(geminiSettingsPath, mcpConfigPath) {
53090
52939
  const linkDir = dirname11(geminiSettingsPath);
53091
52940
  if (!existsSync32(linkDir)) {
53092
- await mkdir13(linkDir, { recursive: true });
52941
+ await mkdir12(linkDir, { recursive: true });
53093
52942
  logger.debug(`Created directory: ${linkDir}`);
53094
52943
  }
53095
52944
  const mcpConfig = await readJsonFile(mcpConfigPath);
@@ -53102,7 +52951,7 @@ async function createNewSettingsWithMerge(geminiSettingsPath, mcpConfigPath) {
53102
52951
  }
53103
52952
  const newSettings = { mcpServers };
53104
52953
  try {
53105
- await writeFile16(geminiSettingsPath, JSON.stringify(newSettings, null, 2), "utf-8");
52954
+ await writeFile15(geminiSettingsPath, JSON.stringify(newSettings, null, 2), "utf-8");
53106
52955
  logger.debug(`Created new Gemini settings with mcpServers: ${geminiSettingsPath}`);
53107
52956
  return { success: true, method: "merge", targetPath: mcpConfigPath };
53108
52957
  } catch (error) {
@@ -53132,7 +52981,7 @@ async function mergeGeminiSettings(geminiSettingsPath, mcpConfigPath) {
53132
52981
  mcpServers
53133
52982
  };
53134
52983
  try {
53135
- await writeFile16(geminiSettingsPath, JSON.stringify(mergedSettings, null, 2), "utf-8");
52984
+ await writeFile15(geminiSettingsPath, JSON.stringify(mergedSettings, null, 2), "utf-8");
53136
52985
  logger.debug(`Merged mcpServers into: ${geminiSettingsPath}`);
53137
52986
  return { success: true, method: "merge", targetPath: mcpConfigPath };
53138
52987
  } catch (error) {
@@ -53205,12 +53054,12 @@ var init_validation = __esm(() => {
53205
53054
 
53206
53055
  // src/services/package-installer/gemini-mcp/linker-core.ts
53207
53056
  import { existsSync as existsSync34 } from "node:fs";
53208
- import { mkdir as mkdir14, symlink as symlink2 } from "node:fs/promises";
53057
+ import { mkdir as mkdir13, symlink as symlink2 } from "node:fs/promises";
53209
53058
  import { dirname as dirname12, join as join52 } from "node:path";
53210
53059
  async function createSymlink(targetPath, linkPath, projectDir, isGlobal) {
53211
53060
  const linkDir = dirname12(linkPath);
53212
53061
  if (!existsSync34(linkDir)) {
53213
- await mkdir14(linkDir, { recursive: true });
53062
+ await mkdir13(linkDir, { recursive: true });
53214
53063
  logger.debug(`Created directory: ${linkDir}`);
53215
53064
  }
53216
53065
  let symlinkTarget;
@@ -61014,7 +60863,7 @@ function checkComponentCounts(setup) {
61014
60863
  // src/domains/health-checks/checkers/permissions-checker.ts
61015
60864
  init_logger();
61016
60865
  init_path_resolver();
61017
- import { constants as constants2, access as access2, unlink as unlink4, writeFile as writeFile12 } from "node:fs/promises";
60866
+ import { constants as constants2, access as access2, unlink as unlink4, writeFile as writeFile11 } from "node:fs/promises";
61018
60867
  import { join as join34 } from "node:path";
61019
60868
 
61020
60869
  // src/domains/health-checks/checkers/shared.ts
@@ -61085,7 +60934,7 @@ async function checkGlobalDirWritable() {
61085
60934
  const random = Math.random().toString(36).substring(2);
61086
60935
  const testFile = join34(globalDir, `.ck-write-test-${timestamp}-${random}`);
61087
60936
  try {
61088
- await writeFile12(testFile, "test", { encoding: "utf-8", flag: "wx" });
60937
+ await writeFile11(testFile, "test", { encoding: "utf-8", flag: "wx" });
61089
60938
  } catch (error) {
61090
60939
  return {
61091
60940
  id: "ck-global-dir-writable",
@@ -62115,7 +61964,7 @@ import { platform as platform6 } from "node:os";
62115
61964
 
62116
61965
  // src/domains/health-checks/platform/environment-checker.ts
62117
61966
  init_path_resolver();
62118
- import { constants as constants3, access as access3, mkdir as mkdir10, readFile as readFile23, unlink as unlink5, writeFile as writeFile13 } from "node:fs/promises";
61967
+ import { constants as constants3, access as access3, mkdir as mkdir9, readFile as readFile23, unlink as unlink5, writeFile as writeFile12 } from "node:fs/promises";
62119
61968
  import { arch as arch2, homedir as homedir16, platform as platform5 } from "node:os";
62120
61969
  import { join as join42, normalize as normalize6 } from "node:path";
62121
61970
  var IS_WINDOWS = platform5() === "win32";
@@ -62213,8 +62062,8 @@ async function checkGlobalDirAccess() {
62213
62062
  }
62214
62063
  const testFile = join42(globalDir, ".ck-doctor-access-test");
62215
62064
  try {
62216
- await mkdir10(globalDir, { recursive: true });
62217
- await writeFile13(testFile, "test", "utf-8");
62065
+ await mkdir9(globalDir, { recursive: true });
62066
+ await writeFile12(testFile, "test", "utf-8");
62218
62067
  const content = await readFile23(testFile, "utf-8");
62219
62068
  await unlink5(testFile);
62220
62069
  if (content !== "test")
@@ -62288,7 +62137,7 @@ async function checkWSLBoundary() {
62288
62137
 
62289
62138
  // src/domains/health-checks/platform/windows-checker.ts
62290
62139
  init_path_resolver();
62291
- import { mkdir as mkdir11, symlink, unlink as unlink6, writeFile as writeFile14 } from "node:fs/promises";
62140
+ import { mkdir as mkdir10, symlink, unlink as unlink6, writeFile as writeFile13 } from "node:fs/promises";
62292
62141
  import { join as join43 } from "node:path";
62293
62142
  async function checkLongPathSupport() {
62294
62143
  if (shouldSkipExpensiveOperations4()) {
@@ -62344,8 +62193,8 @@ async function checkSymlinkSupport() {
62344
62193
  const target = join43(testDir, ".ck-symlink-test-target");
62345
62194
  const link = join43(testDir, ".ck-symlink-test-link");
62346
62195
  try {
62347
- await mkdir11(testDir, { recursive: true });
62348
- await writeFile14(target, "test", "utf-8");
62196
+ await mkdir10(testDir, { recursive: true });
62197
+ await writeFile13(target, "test", "utf-8");
62349
62198
  await symlink(target, link);
62350
62199
  await unlink6(link);
62351
62200
  await unlink6(target);
@@ -63099,7 +62948,7 @@ init_github_client();
63099
62948
  init_logger();
63100
62949
  init_path_resolver();
63101
62950
  var import_compare_versions5 = __toESM(require_umd(), 1);
63102
- import { mkdir as mkdir12, readFile as readFile24, unlink as unlink7, writeFile as writeFile15 } from "node:fs/promises";
62951
+ import { mkdir as mkdir11, readFile as readFile24, unlink as unlink7, writeFile as writeFile14 } from "node:fs/promises";
63103
62952
  import { join as join45 } from "node:path";
63104
62953
  var CACHE_TTL_HOURS = 24;
63105
62954
  var DEFAULT_CACHE_TTL_MS = CACHE_TTL_HOURS * 60 * 60 * 1000;
@@ -63157,8 +63006,8 @@ class ConfigVersionChecker {
63157
63006
  try {
63158
63007
  const cachePath = ConfigVersionChecker.getCacheFilePath(kitType, global3);
63159
63008
  const cacheDir = PathResolver.getCacheDir(global3);
63160
- await mkdir12(cacheDir, { recursive: true });
63161
- await writeFile15(cachePath, JSON.stringify(cache3, null, 2));
63009
+ await mkdir11(cacheDir, { recursive: true });
63010
+ await writeFile14(cachePath, JSON.stringify(cache3, null, 2));
63162
63011
  } catch (error) {
63163
63012
  logger.debug(`Cache write failed: ${error instanceof Error ? error.message : "Unknown error"}`);
63164
63013
  }
@@ -65819,7 +65668,7 @@ init_logger();
65819
65668
  // src/shared/process-lock.ts
65820
65669
  init_logger();
65821
65670
  var import_proper_lockfile = __toESM(require_proper_lockfile(), 1);
65822
- import { mkdir as mkdir15 } from "node:fs/promises";
65671
+ import { mkdir as mkdir14 } from "node:fs/promises";
65823
65672
  import os5 from "node:os";
65824
65673
  import { join as join53 } from "node:path";
65825
65674
  var LOCK_CONFIG = {
@@ -65852,7 +65701,7 @@ function registerCleanupHandlers() {
65852
65701
  }
65853
65702
  async function ensureLocksDir() {
65854
65703
  const lockDir = getLocksDir();
65855
- await mkdir15(lockDir, { recursive: true });
65704
+ await mkdir14(lockDir, { recursive: true });
65856
65705
  }
65857
65706
  async function withProcessLock(lockName, fn) {
65858
65707
  registerCleanupHandlers();
@@ -66007,7 +65856,7 @@ init_github_client();
66007
65856
  init_environment();
66008
65857
  init_logger();
66009
65858
  init_safe_spinner();
66010
- import { mkdir as mkdir21, stat as stat12 } from "node:fs/promises";
65859
+ import { mkdir as mkdir20, stat as stat12 } from "node:fs/promises";
66011
65860
  import { tmpdir as tmpdir3 } from "node:os";
66012
65861
  import { join as join61 } from "node:path";
66013
65862
 
@@ -66027,7 +65876,7 @@ var import_ignore = __toESM(require_ignore(), 1);
66027
65876
  init_logger();
66028
65877
  init_output_manager();
66029
65878
  import { createWriteStream as createWriteStream2, rmSync } from "node:fs";
66030
- import { mkdir as mkdir16 } from "node:fs/promises";
65879
+ import { mkdir as mkdir15 } from "node:fs/promises";
66031
65880
  import { join as join55 } from "node:path";
66032
65881
 
66033
65882
  // src/shared/progress-bar.ts
@@ -66239,7 +66088,7 @@ class FileDownloader {
66239
66088
  async downloadAsset(asset, destDir) {
66240
66089
  try {
66241
66090
  const destPath = join55(destDir, asset.name);
66242
- await mkdir16(destDir, { recursive: true });
66091
+ await mkdir15(destDir, { recursive: true });
66243
66092
  output.info(`Downloading ${asset.name} (${formatBytes(asset.size)})...`);
66244
66093
  logger.verbose("Download details", {
66245
66094
  url: asset.browser_download_url,
@@ -66324,7 +66173,7 @@ class FileDownloader {
66324
66173
  async downloadFile(params) {
66325
66174
  const { url, name, size, destDir, token } = params;
66326
66175
  const destPath = join55(destDir, name);
66327
- await mkdir16(destDir, { recursive: true });
66176
+ await mkdir15(destDir, { recursive: true });
66328
66177
  output.info(`Downloading ${name}${size ? ` (${formatBytes(size)})` : ""}...`);
66329
66178
  const headers = {};
66330
66179
  if (token && url.includes("api.github.com")) {
@@ -66442,7 +66291,7 @@ async function validateExtraction(extractDir) {
66442
66291
 
66443
66292
  // src/domains/installation/extraction/tar-extractor.ts
66444
66293
  init_logger();
66445
- import { copyFile as copyFile3, mkdir as mkdir19, readdir as readdir11, rm as rm3, stat as stat10 } from "node:fs/promises";
66294
+ import { copyFile as copyFile3, mkdir as mkdir18, readdir as readdir11, rm as rm3, stat as stat10 } from "node:fs/promises";
66446
66295
  import { join as join59 } from "node:path";
66447
66296
 
66448
66297
  // node_modules/@isaacs/fs-minipass/dist/esm/index.js
@@ -72072,7 +71921,7 @@ var checkCwd = (dir, cb) => {
72072
71921
  cb(er);
72073
71922
  });
72074
71923
  };
72075
- var mkdir17 = (dir, opt, cb) => {
71924
+ var mkdir16 = (dir, opt, cb) => {
72076
71925
  dir = normalizeWindowsPath(dir);
72077
71926
  const umask = opt.umask ?? 18;
72078
71927
  const mode = opt.mode | 448;
@@ -72595,7 +72444,7 @@ class Unpack extends Parser {
72595
72444
  }
72596
72445
  }
72597
72446
  [MKDIR](dir, mode, cb) {
72598
- mkdir17(normalizeWindowsPath(dir), {
72447
+ mkdir16(normalizeWindowsPath(dir), {
72599
72448
  uid: this.uid,
72600
72449
  gid: this.gid,
72601
72450
  processUid: this.processUid,
@@ -73311,7 +73160,7 @@ function decodeFilePath(path10) {
73311
73160
  // src/domains/installation/utils/file-utils.ts
73312
73161
  init_logger();
73313
73162
  init_types2();
73314
- import { copyFile as copyFile2, lstat as lstat4, mkdir as mkdir18, readdir as readdir10 } from "node:fs/promises";
73163
+ import { copyFile as copyFile2, lstat as lstat4, mkdir as mkdir17, readdir as readdir10 } from "node:fs/promises";
73315
73164
  import { join as join58, relative as relative6 } from "node:path";
73316
73165
  async function withRetry(fn, retries = 3) {
73317
73166
  for (let i = 0;i < retries; i++) {
@@ -73331,7 +73180,7 @@ var isRetryable = (e2) => {
73331
73180
  };
73332
73181
  var delay = (ms) => new Promise((r2) => setTimeout(r2, ms));
73333
73182
  async function moveDirectoryContents(sourceDir, destDir, shouldExclude, sizeTracker) {
73334
- await mkdir18(destDir, { recursive: true });
73183
+ await mkdir17(destDir, { recursive: true });
73335
73184
  const entries = await readdir10(sourceDir, { encoding: "utf8" });
73336
73185
  for (const entry of entries) {
73337
73186
  const sourcePath = join58(sourceDir, entry);
@@ -73359,7 +73208,7 @@ async function moveDirectoryContents(sourceDir, destDir, shouldExclude, sizeTrac
73359
73208
  }
73360
73209
  }
73361
73210
  async function copyDirectory(sourceDir, destDir, shouldExclude, sizeTracker) {
73362
- await mkdir18(destDir, { recursive: true });
73211
+ await mkdir17(destDir, { recursive: true });
73363
73212
  const entries = await readdir10(sourceDir, { encoding: "utf8" });
73364
73213
  for (const entry of entries) {
73365
73214
  const sourcePath = join58(sourceDir, entry);
@@ -73391,7 +73240,7 @@ async function copyDirectory(sourceDir, destDir, shouldExclude, sizeTracker) {
73391
73240
  class TarExtractor {
73392
73241
  async extract(archivePath, destDir, shouldExclude, sizeTracker) {
73393
73242
  const tempExtractDir = `${destDir}-temp`;
73394
- await mkdir19(tempExtractDir, { recursive: true });
73243
+ await mkdir18(tempExtractDir, { recursive: true });
73395
73244
  try {
73396
73245
  await extract({
73397
73246
  file: archivePath,
@@ -73426,7 +73275,7 @@ class TarExtractor {
73426
73275
  await moveDirectoryContents(tempExtractDir, destDir, shouldExclude, sizeTracker);
73427
73276
  }
73428
73277
  } else {
73429
- await mkdir19(destDir, { recursive: true });
73278
+ await mkdir18(destDir, { recursive: true });
73430
73279
  await copyFile3(rootPath, join59(destDir, rootEntry));
73431
73280
  }
73432
73281
  } else {
@@ -73449,7 +73298,7 @@ init_environment();
73449
73298
  init_logger();
73450
73299
  var import_extract_zip = __toESM(require_extract_zip(), 1);
73451
73300
  import { execFile as execFile8 } from "node:child_process";
73452
- import { copyFile as copyFile4, mkdir as mkdir20, readdir as readdir12, rm as rm4, stat as stat11 } from "node:fs/promises";
73301
+ import { copyFile as copyFile4, mkdir as mkdir19, readdir as readdir12, rm as rm4, stat as stat11 } from "node:fs/promises";
73453
73302
  import { join as join60 } from "node:path";
73454
73303
  class ZipExtractor {
73455
73304
  async tryNativeUnzip(archivePath, destDir) {
@@ -73457,7 +73306,7 @@ class ZipExtractor {
73457
73306
  return false;
73458
73307
  }
73459
73308
  return new Promise((resolve11) => {
73460
- mkdir20(destDir, { recursive: true }).then(() => {
73309
+ mkdir19(destDir, { recursive: true }).then(() => {
73461
73310
  execFile8("unzip", ["-o", "-q", archivePath, "-d", destDir], (error, _stdout, stderr) => {
73462
73311
  if (error) {
73463
73312
  logger.debug(`Native unzip failed: ${stderr || error.message}`);
@@ -73475,7 +73324,7 @@ class ZipExtractor {
73475
73324
  }
73476
73325
  async extract(archivePath, destDir, shouldExclude, sizeTracker) {
73477
73326
  const tempExtractDir = `${destDir}-temp`;
73478
- await mkdir20(tempExtractDir, { recursive: true });
73327
+ await mkdir19(tempExtractDir, { recursive: true });
73479
73328
  try {
73480
73329
  const nativeSuccess = await this.tryNativeUnzip(archivePath, tempExtractDir);
73481
73330
  if (!nativeSuccess) {
@@ -73513,7 +73362,7 @@ class ZipExtractor {
73513
73362
  await moveDirectoryContents(tempExtractDir, destDir, shouldExclude, sizeTracker);
73514
73363
  }
73515
73364
  } else {
73516
- await mkdir20(destDir, { recursive: true });
73365
+ await mkdir19(destDir, { recursive: true });
73517
73366
  await copyFile4(rootPath, join60(destDir, rootEntry));
73518
73367
  }
73519
73368
  } else {
@@ -73588,7 +73437,7 @@ class DownloadManager {
73588
73437
  try {
73589
73438
  this.sizeTracker.reset();
73590
73439
  const detectedType = archiveType || detectArchiveType(archivePath);
73591
- await mkdir21(destDir, { recursive: true });
73440
+ await mkdir20(destDir, { recursive: true });
73592
73441
  if (detectedType === "tar.gz") {
73593
73442
  await this.tarExtractor.extract(archivePath, destDir, this.shouldExclude, this.sizeTracker);
73594
73443
  } else if (detectedType === "zip") {
@@ -73615,7 +73464,7 @@ class DownloadManager {
73615
73464
  const counter = DownloadManager.tempDirCounter++;
73616
73465
  const primaryTempDir = join61(tmpdir3(), `claudekit-${timestamp}-${counter}`);
73617
73466
  try {
73618
- await mkdir21(primaryTempDir, { recursive: true });
73467
+ await mkdir20(primaryTempDir, { recursive: true });
73619
73468
  logger.debug(`Created temp directory: ${primaryTempDir}`);
73620
73469
  registerTempDir(primaryTempDir);
73621
73470
  return primaryTempDir;
@@ -73632,7 +73481,7 @@ Solutions:
73632
73481
  }
73633
73482
  const fallbackTempDir = join61(homeDir, ".claudekit", "tmp", `claudekit-${timestamp}-${counter}`);
73634
73483
  try {
73635
- await mkdir21(fallbackTempDir, { recursive: true });
73484
+ await mkdir20(fallbackTempDir, { recursive: true });
73636
73485
  logger.debug(`Created temp directory (fallback): ${fallbackTempDir}`);
73637
73486
  logger.warning(`Using fallback temp directory: ${fallbackTempDir}
73638
73487
  (OS temp directory was not accessible)`);
@@ -76004,7 +75853,7 @@ class FileScanner {
76004
75853
  // src/domains/config/installed-settings-tracker.ts
76005
75854
  init_shared();
76006
75855
  import { existsSync as existsSync36 } from "node:fs";
76007
- import { mkdir as mkdir22, readFile as readFile29, writeFile as writeFile18 } from "node:fs/promises";
75856
+ import { mkdir as mkdir21, readFile as readFile29, writeFile as writeFile17 } from "node:fs/promises";
76008
75857
  import { dirname as dirname15, join as join66 } from "node:path";
76009
75858
  var CK_JSON_FILE = ".ck.json";
76010
75859
 
@@ -76056,8 +75905,8 @@ class InstalledSettingsTracker {
76056
75905
  data.kits[this.kitName] = {};
76057
75906
  }
76058
75907
  data.kits[this.kitName].installedSettings = settings;
76059
- await mkdir22(dirname15(ckJsonPath), { recursive: true });
76060
- await writeFile18(ckJsonPath, JSON.stringify(data, null, 2), "utf-8");
75908
+ await mkdir21(dirname15(ckJsonPath), { recursive: true });
75909
+ await writeFile17(ckJsonPath, JSON.stringify(data, null, 2), "utf-8");
76061
75910
  logger.debug(`Saved installed settings to ${ckJsonPath}`);
76062
75911
  } catch (error) {
76063
75912
  logger.warning(`Failed to save installed settings: ${error instanceof Error ? error.message : "Unknown error"}`);
@@ -77229,12 +77078,12 @@ class FileScanner2 {
77229
77078
  // src/services/transformers/commands-prefix/prefix-applier.ts
77230
77079
  init_logger();
77231
77080
  var import_fs_extra17 = __toESM(require_lib3(), 1);
77232
- import { lstat as lstat7, mkdir as mkdir23, readdir as readdir17, stat as stat15 } from "node:fs/promises";
77081
+ import { lstat as lstat7, mkdir as mkdir22, readdir as readdir17, stat as stat15 } from "node:fs/promises";
77233
77082
  import { join as join74 } from "node:path";
77234
77083
 
77235
77084
  // src/services/transformers/commands-prefix/content-transformer.ts
77236
77085
  init_logger();
77237
- import { readFile as readFile33, readdir as readdir16, writeFile as writeFile22 } from "node:fs/promises";
77086
+ import { readFile as readFile33, readdir as readdir16, writeFile as writeFile21 } from "node:fs/promises";
77238
77087
  import { join as join73 } from "node:path";
77239
77088
  var TRANSFORMABLE_EXTENSIONS = new Set([
77240
77089
  ".md",
@@ -77310,7 +77159,7 @@ async function transformCommandReferences(directory, options2 = {}) {
77310
77159
  if (options2.dryRun) {
77311
77160
  logger.debug(`[dry-run] Would transform ${changes} command ref(s) in ${fullPath}`);
77312
77161
  } else {
77313
- await writeFile22(fullPath, transformed, "utf-8");
77162
+ await writeFile21(fullPath, transformed, "utf-8");
77314
77163
  if (options2.verbose) {
77315
77164
  logger.verbose(`Transformed ${changes} command ref(s) in ${fullPath}`);
77316
77165
  }
@@ -77395,9 +77244,9 @@ async function applyPrefix(extractDir) {
77395
77244
  }
77396
77245
  await import_fs_extra17.copy(commandsDir, backupDir);
77397
77246
  logger.verbose("Created backup of commands directory");
77398
- await mkdir23(tempDir, { recursive: true });
77247
+ await mkdir22(tempDir, { recursive: true });
77399
77248
  const ckDir = join74(tempDir, "ck");
77400
- await mkdir23(ckDir, { recursive: true });
77249
+ await mkdir22(ckDir, { recursive: true });
77401
77250
  let processedCount = 0;
77402
77251
  for (const entry of entries) {
77403
77252
  const sourcePath = join74(commandsDir, entry);
@@ -77835,7 +77684,7 @@ init_skip_directories();
77835
77684
  init_types2();
77836
77685
  var import_fs_extra21 = __toESM(require_lib3(), 1);
77837
77686
  import { createHash as createHash2 } from "node:crypto";
77838
- import { readFile as readFile35, readdir as readdir20, writeFile as writeFile23 } from "node:fs/promises";
77687
+ import { readFile as readFile35, readdir as readdir20, writeFile as writeFile22 } from "node:fs/promises";
77839
77688
  import { join as join78, relative as relative12 } from "node:path";
77840
77689
 
77841
77690
  class SkillsManifestManager {
@@ -77859,7 +77708,7 @@ class SkillsManifestManager {
77859
77708
  }
77860
77709
  static async writeManifest(skillsDir2, manifest) {
77861
77710
  const manifestPath = join78(skillsDir2, SkillsManifestManager.MANIFEST_FILENAME);
77862
- await writeFile23(manifestPath, JSON.stringify(manifest, null, 2), "utf-8");
77711
+ await writeFile22(manifestPath, JSON.stringify(manifest, null, 2), "utf-8");
77863
77712
  logger.debug(`Wrote manifest to: ${manifestPath}`);
77864
77713
  }
77865
77714
  static async readManifest(skillsDir2) {
@@ -78252,7 +78101,7 @@ import { join as join84 } from "node:path";
78252
78101
 
78253
78102
  // src/domains/skills/migrator/migration-executor.ts
78254
78103
  init_logger();
78255
- import { copyFile as copyFile5, mkdir as mkdir24, readdir as readdir22, rm as rm5 } from "node:fs/promises";
78104
+ import { copyFile as copyFile5, mkdir as mkdir23, readdir as readdir22, rm as rm5 } from "node:fs/promises";
78256
78105
  import { join as join80 } from "node:path";
78257
78106
  var import_fs_extra24 = __toESM(require_lib3(), 1);
78258
78107
 
@@ -78415,7 +78264,7 @@ Detected changes:`;
78415
78264
 
78416
78265
  // src/domains/skills/migrator/migration-executor.ts
78417
78266
  async function copySkillDirectory(sourceDir, destDir) {
78418
- await mkdir24(destDir, { recursive: true });
78267
+ await mkdir23(destDir, { recursive: true });
78419
78268
  const entries = await readdir22(sourceDir, { withFileTypes: true });
78420
78269
  for (const entry of entries) {
78421
78270
  const sourcePath = join80(sourceDir, entry.name);
@@ -78435,7 +78284,7 @@ async function executeInternal(mappings, customizations, currentSkillsDir, inter
78435
78284
  const preserved = [];
78436
78285
  const errors2 = [];
78437
78286
  const tempDir = join80(currentSkillsDir, "..", ".skills-migration-temp");
78438
- await mkdir24(tempDir, { recursive: true });
78287
+ await mkdir23(tempDir, { recursive: true });
78439
78288
  try {
78440
78289
  for (const mapping of mappings) {
78441
78290
  try {
@@ -78457,7 +78306,7 @@ async function executeInternal(mappings, customizations, currentSkillsDir, inter
78457
78306
  const category = mapping.category;
78458
78307
  const targetPath = category ? join80(tempDir, category, skillName) : join80(tempDir, skillName);
78459
78308
  if (category) {
78460
- await mkdir24(join80(tempDir, category), { recursive: true });
78309
+ await mkdir23(join80(tempDir, category), { recursive: true });
78461
78310
  }
78462
78311
  await copySkillDirectory(currentSkillPath, targetPath);
78463
78312
  migrated.push(skillName);
@@ -78476,7 +78325,7 @@ async function executeInternal(mappings, customizations, currentSkillsDir, inter
78476
78325
  }
78477
78326
  }
78478
78327
  await rm5(currentSkillsDir, { recursive: true, force: true });
78479
- await mkdir24(currentSkillsDir, { recursive: true });
78328
+ await mkdir23(currentSkillsDir, { recursive: true });
78480
78329
  await copySkillDirectory(tempDir, currentSkillsDir);
78481
78330
  await rm5(tempDir, { recursive: true, force: true });
78482
78331
  return { migrated, preserved, errors: errors2 };
@@ -78523,7 +78372,7 @@ function validateMigrationPath(path12, paramName) {
78523
78372
  init_logger();
78524
78373
  init_types2();
78525
78374
  var import_fs_extra25 = __toESM(require_lib3(), 1);
78526
- import { copyFile as copyFile6, mkdir as mkdir25, readdir as readdir23, rm as rm6, stat as stat16 } from "node:fs/promises";
78375
+ import { copyFile as copyFile6, mkdir as mkdir24, readdir as readdir23, rm as rm6, stat as stat16 } from "node:fs/promises";
78527
78376
  import { basename as basename8, join as join81, normalize as normalize8 } from "node:path";
78528
78377
  function validatePath2(path12, paramName) {
78529
78378
  if (!path12 || typeof path12 !== "string") {
@@ -78553,7 +78402,7 @@ class SkillsBackupManager {
78553
78402
  const backupDir = parentDir ? join81(parentDir, backupDirName) : join81(skillsDir2, "..", backupDirName);
78554
78403
  logger.info(`Creating backup at: ${backupDir}`);
78555
78404
  try {
78556
- await mkdir25(backupDir, { recursive: true });
78405
+ await mkdir24(backupDir, { recursive: true });
78557
78406
  await SkillsBackupManager.copyDirectory(skillsDir2, backupDir);
78558
78407
  logger.success("Backup created successfully");
78559
78408
  return backupDir;
@@ -78575,7 +78424,7 @@ class SkillsBackupManager {
78575
78424
  if (await import_fs_extra25.pathExists(targetDir)) {
78576
78425
  await rm6(targetDir, { recursive: true, force: true });
78577
78426
  }
78578
- await mkdir25(targetDir, { recursive: true });
78427
+ await mkdir24(targetDir, { recursive: true });
78579
78428
  await SkillsBackupManager.copyDirectory(backupDir, targetDir);
78580
78429
  logger.success("Backup restored successfully");
78581
78430
  } catch (error) {
@@ -78635,7 +78484,7 @@ class SkillsBackupManager {
78635
78484
  continue;
78636
78485
  }
78637
78486
  if (entry.isDirectory()) {
78638
- await mkdir25(destPath, { recursive: true });
78487
+ await mkdir24(destPath, { recursive: true });
78639
78488
  await SkillsBackupManager.copyDirectory(sourcePath, destPath);
78640
78489
  } else if (entry.isFile()) {
78641
78490
  await copyFile6(sourcePath, destPath);
@@ -79054,7 +78903,7 @@ import { join as join87 } from "node:path";
79054
78903
 
79055
78904
  // src/services/transformers/opencode-path-transformer.ts
79056
78905
  init_logger();
79057
- import { readFile as readFile37, readdir as readdir26, writeFile as writeFile24 } from "node:fs/promises";
78906
+ import { readFile as readFile37, readdir as readdir26, writeFile as writeFile23 } from "node:fs/promises";
79058
78907
  import { platform as platform12 } from "node:os";
79059
78908
  import { extname as extname3, join as join86 } from "node:path";
79060
78909
  var IS_WINDOWS3 = platform12() === "win32";
@@ -79128,7 +78977,7 @@ async function transformPathsForGlobalOpenCode(directory, options2 = {}) {
79128
78977
  const content = await readFile37(fullPath, "utf-8");
79129
78978
  const { transformed, changes } = transformOpenCodeContent(content);
79130
78979
  if (changes > 0) {
79131
- await writeFile24(fullPath, transformed, "utf-8");
78980
+ await writeFile23(fullPath, transformed, "utf-8");
79132
78981
  filesTransformed++;
79133
78982
  totalChanges += changes;
79134
78983
  if (options2.verbose) {
@@ -79349,7 +79198,7 @@ async function handlePostInstall(ctx) {
79349
79198
  // src/commands/init/phases/selection-handler.ts
79350
79199
  init_config_manager();
79351
79200
  init_github_client();
79352
- import { mkdir as mkdir26 } from "node:fs/promises";
79201
+ import { mkdir as mkdir25 } from "node:fs/promises";
79353
79202
  import { join as join90, resolve as resolve15 } from "node:path";
79354
79203
 
79355
79204
  // src/domains/github/kit-access-checker.ts
@@ -79872,7 +79721,7 @@ async function handleSelection(ctx) {
79872
79721
  }
79873
79722
  if (!await import_fs_extra32.pathExists(resolvedDir)) {
79874
79723
  if (ctx.options.global) {
79875
- await mkdir26(resolvedDir, { recursive: true });
79724
+ await mkdir25(resolvedDir, { recursive: true });
79876
79725
  logger.info(`Created global directory: ${resolvedDir}`);
79877
79726
  } else {
79878
79727
  logger.error(`Directory does not exist: ${resolvedDir}`);
@@ -80007,7 +79856,7 @@ async function handleSelection(ctx) {
80007
79856
  };
80008
79857
  }
80009
79858
  // src/commands/init/phases/sync-handler.ts
80010
- import { copyFile as copyFile7, mkdir as mkdir27, open as open4, readFile as readFile39, rename as rename3, stat as stat17, unlink as unlink8, writeFile as writeFile26 } from "node:fs/promises";
79859
+ import { copyFile as copyFile7, mkdir as mkdir26, open as open4, readFile as readFile39, rename as rename3, stat as stat17, unlink as unlink8, writeFile as writeFile25 } from "node:fs/promises";
80011
79860
  import { dirname as dirname18, join as join91, resolve as resolve16 } from "node:path";
80012
79861
  init_logger();
80013
79862
  init_path_resolver();
@@ -80127,7 +79976,7 @@ async function acquireSyncLock(global3) {
80127
79976
  const lockPath = join91(cacheDir, ".sync-lock");
80128
79977
  const startTime = Date.now();
80129
79978
  const lockTimeout = getLockTimeout();
80130
- await mkdir27(dirname18(lockPath), { recursive: true });
79979
+ await mkdir26(dirname18(lockPath), { recursive: true });
80131
79980
  while (Date.now() - startTime < lockTimeout) {
80132
79981
  try {
80133
79982
  const handle = await open4(lockPath, "wx");
@@ -80207,7 +80056,7 @@ async function executeSyncMerge(ctx) {
80207
80056
  const targetPath = await validateSyncPath(ctx.claudeDir, file.path);
80208
80057
  const targetDir = join91(targetPath, "..");
80209
80058
  try {
80210
- await mkdir27(targetDir, { recursive: true });
80059
+ await mkdir26(targetDir, { recursive: true });
80211
80060
  } catch (mkdirError) {
80212
80061
  const errCode = mkdirError.code;
80213
80062
  if (errCode === "ENOSPC") {
@@ -80286,7 +80135,7 @@ async function executeSyncMerge(ctx) {
80286
80135
  try {
80287
80136
  const tempPath = `${currentPath}.tmp.${Date.now()}`;
80288
80137
  try {
80289
- await writeFile26(tempPath, result.result, "utf-8");
80138
+ await writeFile25(tempPath, result.result, "utf-8");
80290
80139
  await rename3(tempPath, currentPath);
80291
80140
  } catch (atomicError) {
80292
80141
  await unlink8(tempPath).catch(() => {});
@@ -80370,14 +80219,14 @@ function displaySyncPlan(plan) {
80370
80219
  console.log(import_picocolors21.default.dim("─".repeat(40)));
80371
80220
  }
80372
80221
  async function createBackup(claudeDir2, files, backupDir) {
80373
- await mkdir27(backupDir, { recursive: true });
80222
+ await mkdir26(backupDir, { recursive: true });
80374
80223
  for (const file of files) {
80375
80224
  try {
80376
80225
  const sourcePath = await validateSyncPath(claudeDir2, file.path);
80377
80226
  if (await import_fs_extra33.pathExists(sourcePath)) {
80378
80227
  const targetPath = await validateSyncPath(backupDir, file.path);
80379
80228
  const targetDir = join91(targetPath, "..");
80380
- await mkdir27(targetDir, { recursive: true });
80229
+ await mkdir26(targetDir, { recursive: true });
80381
80230
  await copyFile7(sourcePath, targetPath);
80382
80231
  }
80383
80232
  } catch (error) {
@@ -80473,7 +80322,7 @@ async function renameFolders(dirsToRename, extractDir, options2) {
80473
80322
  // src/services/transformers/folder-transform/path-replacer.ts
80474
80323
  init_logger();
80475
80324
  init_types2();
80476
- import { readFile as readFile40, readdir as readdir28, writeFile as writeFile27 } from "node:fs/promises";
80325
+ import { readFile as readFile40, readdir as readdir28, writeFile as writeFile26 } from "node:fs/promises";
80477
80326
  import { join as join93, relative as relative16 } from "node:path";
80478
80327
  var TRANSFORMABLE_FILE_PATTERNS = [
80479
80328
  ".md",
@@ -80556,7 +80405,7 @@ async function transformFileContents(dir, compiledReplacements, options2) {
80556
80405
  if (options2.dryRun) {
80557
80406
  logger.debug(`[dry-run] Would update ${relative16(dir, fullPath)}: ${changeCount} replacement(s)`);
80558
80407
  } else {
80559
- await writeFile27(fullPath, newContent, "utf-8");
80408
+ await writeFile26(fullPath, newContent, "utf-8");
80560
80409
  logger.debug(`Updated ${relative16(dir, fullPath)}: ${changeCount} replacement(s)`);
80561
80410
  }
80562
80411
  filesChanged++;
@@ -80662,7 +80511,7 @@ async function transformFolderPaths(extractDir, folders, options2 = {}) {
80662
80511
 
80663
80512
  // src/services/transformers/global-path-transformer.ts
80664
80513
  init_logger();
80665
- import { readFile as readFile41, readdir as readdir29, writeFile as writeFile28 } from "node:fs/promises";
80514
+ import { readFile as readFile41, readdir as readdir29, writeFile as writeFile27 } from "node:fs/promises";
80666
80515
  import { platform as platform13 } from "node:os";
80667
80516
  import { extname as extname4, join as join94 } from "node:path";
80668
80517
  var IS_WINDOWS4 = platform13() === "win32";
@@ -80785,7 +80634,7 @@ async function transformPathsForGlobalInstall(directory, options2 = {}) {
80785
80634
  const content = await readFile41(fullPath, "utf-8");
80786
80635
  const { transformed, changes } = transformContent(content);
80787
80636
  if (changes > 0) {
80788
- await writeFile28(fullPath, transformed, "utf-8");
80637
+ await writeFile27(fullPath, transformed, "utf-8");
80789
80638
  filesTransformed++;
80790
80639
  totalChanges += changes;
80791
80640
  if (options2.verbose) {