claudekit-cli 3.36.0-dev.12 → 3.36.0-dev.13

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.
Files changed (2) hide show
  1. package/dist/index.js +200 -47
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -50720,12 +50720,31 @@ function determineAction(source, providerConfig, input, targetStateIndex, delete
50720
50720
  const registeredSourceChecksum = normalizeChecksum(registryEntry.sourceChecksum);
50721
50721
  const registeredTargetChecksum = normalizeChecksum(registryEntry.targetChecksum);
50722
50722
  if (isUnknownChecksum(registeredSourceChecksum)) {
50723
+ const targetState2 = lookupTargetState(targetStateIndex, registryEntry.path);
50724
+ const currentTargetChecksum = normalizeChecksum(targetState2?.currentChecksum);
50725
+ if (currentTargetChecksum === convertedChecksum) {
50726
+ return {
50727
+ ...common,
50728
+ action: "skip",
50729
+ reason: "Target up-to-date after registry upgrade — checksums will be backfilled",
50730
+ sourceChecksum: convertedChecksum,
50731
+ currentTargetChecksum
50732
+ };
50733
+ }
50734
+ if (!targetState2 || !targetState2.exists) {
50735
+ return {
50736
+ ...common,
50737
+ action: "install",
50738
+ reason: "Target deleted — reinstalling after registry upgrade",
50739
+ sourceChecksum: convertedChecksum
50740
+ };
50741
+ }
50723
50742
  return {
50724
50743
  ...common,
50725
- action: "skip",
50726
- reason: "First run after registry upgrade — populating checksums (no writes)",
50744
+ action: "update",
50745
+ reason: "Healing stale target after registry upgrade",
50727
50746
  sourceChecksum: convertedChecksum,
50728
- currentTargetChecksum: registeredTargetChecksum
50747
+ currentTargetChecksum
50729
50748
  };
50730
50749
  }
50731
50750
  const sourceChanged = convertedChecksum !== registeredSourceChecksum;
@@ -55942,7 +55961,7 @@ var package_default;
55942
55961
  var init_package = __esm(() => {
55943
55962
  package_default = {
55944
55963
  name: "claudekit-cli",
55945
- version: "3.36.0-dev.12",
55964
+ version: "3.36.0-dev.13",
55946
55965
  description: "CLI tool for bootstrapping and updating ClaudeKit projects",
55947
55966
  type: "module",
55948
55967
  repository: {
@@ -56148,9 +56167,10 @@ async function readMetadataFile(claudeDir2) {
56148
56167
  return null;
56149
56168
  }
56150
56169
  }
56151
- async function promptKitUpdate(beta, yes) {
56170
+ async function promptKitUpdate(beta, yes, deps) {
56152
56171
  try {
56153
- const setup = await getClaudeKitSetup();
56172
+ const execFn = deps?.execAsyncFn ?? execAsync2;
56173
+ const setup = await (deps?.getSetupFn ?? getClaudeKitSetup)();
56154
56174
  const hasLocal = !!setup.project.metadata;
56155
56175
  const hasGlobal = !!setup.global.metadata;
56156
56176
  const localMetadata = hasLocal ? await readMetadataFile(setup.project.path) : null;
@@ -56166,6 +56186,9 @@ async function promptKitUpdate(beta, yes) {
56166
56186
  const isBetaInstalled = isBetaVersion(kitVersion);
56167
56187
  const initCmd = buildInitCommand(selection.isGlobal, selection.kit, beta || isBetaInstalled);
56168
56188
  const promptMessage = selection.promptMessage;
56189
+ if (selection.kit && kitVersion) {
56190
+ logger.info(`Current kit version: ${selection.kit}@${kitVersion}`);
56191
+ }
56169
56192
  if (!yes) {
56170
56193
  logger.info("");
56171
56194
  const shouldUpdate = await se({
@@ -56179,13 +56202,25 @@ async function promptKitUpdate(beta, yes) {
56179
56202
  logger.verbose("Auto-proceeding with kit update (--yes flag)");
56180
56203
  }
56181
56204
  logger.info(`Running: ${initCmd}`);
56182
- const s = de();
56205
+ const s = (deps?.spinnerFn ?? de)();
56183
56206
  s.start("Updating ClaudeKit content...");
56184
56207
  try {
56185
- await execAsync2(initCmd, {
56208
+ await execFn(initCmd, {
56186
56209
  timeout: 300000
56187
56210
  });
56188
- s.stop("Kit content updated");
56211
+ let newKitVersion;
56212
+ try {
56213
+ const claudeDir2 = selection.isGlobal ? setup.global.path : setup.project.path;
56214
+ const updatedMetadata = await readMetadataFile(claudeDir2);
56215
+ newKitVersion = selection.kit ? updatedMetadata?.kits?.[selection.kit]?.version : undefined;
56216
+ } catch {}
56217
+ if (selection.kit && kitVersion && newKitVersion && kitVersion !== newKitVersion) {
56218
+ s.stop(`Kit updated: ${selection.kit}@${kitVersion} -> ${newKitVersion}`);
56219
+ } else if (selection.kit && newKitVersion) {
56220
+ s.stop(`Kit content updated (${selection.kit}@${newKitVersion})`);
56221
+ } else {
56222
+ s.stop("Kit content updated");
56223
+ }
56189
56224
  } catch (error) {
56190
56225
  s.stop("Kit update finished");
56191
56226
  const errorMsg = error instanceof Error ? error.message : "unknown";
@@ -87045,6 +87080,7 @@ class SettingsProcessor {
87045
87080
  tracker = null;
87046
87081
  installingKit;
87047
87082
  cachedVersion = undefined;
87083
+ deletionPatterns = [];
87048
87084
  setGlobalFlag(isGlobal) {
87049
87085
  this.isGlobal = isGlobal;
87050
87086
  }
@@ -87062,6 +87098,9 @@ class SettingsProcessor {
87062
87098
  setInstallingKit(kit) {
87063
87099
  this.installingKit = kit;
87064
87100
  }
87101
+ setDeletions(deletions) {
87102
+ this.deletionPatterns = deletions;
87103
+ }
87065
87104
  initTracker() {
87066
87105
  if (this.projectDir) {
87067
87106
  this.tracker = new InstalledSettingsTracker(this.projectDir, this.isGlobal, this.kitName);
@@ -87171,6 +87210,10 @@ class SettingsProcessor {
87171
87210
  if (pathsFixed) {
87172
87211
  logger.info("Fixed hook command paths to canonical quoted format");
87173
87212
  }
87213
+ const hooksPruned = this.pruneDeletedHooks(mergeResult.merged);
87214
+ if (hooksPruned > 0) {
87215
+ logger.info(`Pruned ${hooksPruned} stale hook(s) referencing deleted files`);
87216
+ }
87174
87217
  await SettingsMerger.writeSettingsFile(destFile, mergeResult.merged);
87175
87218
  logger.success("Merged settings.json (user customizations preserved)");
87176
87219
  await this.injectTeamHooksIfSupported(destFile, mergeResult.merged);
@@ -87215,6 +87258,59 @@ class SettingsProcessor {
87215
87258
  }
87216
87259
  }
87217
87260
  }
87261
+ pruneDeletedHooks(settings) {
87262
+ if (this.deletionPatterns.length === 0 || !settings.hooks)
87263
+ return 0;
87264
+ const hookDeletions = new Set(this.deletionPatterns.filter((p) => p.startsWith("hooks/")));
87265
+ if (hookDeletions.size === 0)
87266
+ return 0;
87267
+ let pruned = 0;
87268
+ const eventKeysToDelete = [];
87269
+ for (const [eventName, entries] of Object.entries(settings.hooks)) {
87270
+ const filteredEntries = [];
87271
+ for (const entry of entries) {
87272
+ if ("hooks" in entry && entry.hooks) {
87273
+ const remainingHooks = entry.hooks.filter((h2) => {
87274
+ const relativePath = this.extractHookRelativePath(h2.command);
87275
+ if (relativePath && hookDeletions.has(relativePath)) {
87276
+ logger.info(`Pruned stale hook: ${h2.command.slice(0, 80)}`);
87277
+ pruned++;
87278
+ return false;
87279
+ }
87280
+ return true;
87281
+ });
87282
+ if (remainingHooks.length > 0) {
87283
+ filteredEntries.push({ ...entry, hooks: remainingHooks });
87284
+ }
87285
+ } else if ("command" in entry) {
87286
+ const relativePath = this.extractHookRelativePath(entry.command);
87287
+ if (relativePath && hookDeletions.has(relativePath)) {
87288
+ logger.info(`Pruned stale hook: ${entry.command.slice(0, 80)}`);
87289
+ pruned++;
87290
+ } else {
87291
+ filteredEntries.push(entry);
87292
+ }
87293
+ } else {
87294
+ filteredEntries.push(entry);
87295
+ }
87296
+ }
87297
+ if (filteredEntries.length > 0) {
87298
+ settings.hooks[eventName] = filteredEntries;
87299
+ } else {
87300
+ eventKeysToDelete.push(eventName);
87301
+ }
87302
+ }
87303
+ for (const key of eventKeysToDelete) {
87304
+ delete settings.hooks[key];
87305
+ }
87306
+ return pruned;
87307
+ }
87308
+ extractHookRelativePath(command) {
87309
+ if (!command)
87310
+ return null;
87311
+ const match2 = command.match(/\.claude[/\\]([\w.\-/\\]+)/);
87312
+ return match2 ? match2[1].replace(/\\/g, "/") : null;
87313
+ }
87218
87314
  async trackInstalledSettings(settings) {
87219
87315
  if (!this.tracker)
87220
87316
  return;
@@ -87483,6 +87579,9 @@ class CopyExecutor {
87483
87579
  setForceOverwriteSettings(force) {
87484
87580
  this.settingsProcessor.setForceOverwriteSettings(force);
87485
87581
  }
87582
+ setDeletions(deletions) {
87583
+ this.settingsProcessor.setDeletions(deletions);
87584
+ }
87486
87585
  setProjectDir(dir) {
87487
87586
  this.settingsProcessor.setProjectDir(dir);
87488
87587
  }
@@ -87655,6 +87754,9 @@ class FileMerger {
87655
87754
  setKitName(kit) {
87656
87755
  this.copyExecutor.setKitName(kit);
87657
87756
  }
87757
+ setDeletions(deletions) {
87758
+ this.copyExecutor.setDeletions(deletions);
87759
+ }
87658
87760
  setManifest(manifest) {
87659
87761
  this.copyExecutor.setManifest(manifest);
87660
87762
  }
@@ -88907,6 +89009,19 @@ async function handleMerge(ctx) {
88907
89009
  }
88908
89010
  }
88909
89011
  const sourceDir = ctx.options.global ? join92(ctx.extractDir, ".claude") : ctx.extractDir;
89012
+ const sourceMetadataPath = ctx.options.global ? join92(sourceDir, "metadata.json") : join92(sourceDir, ".claude", "metadata.json");
89013
+ let sourceMetadata = null;
89014
+ try {
89015
+ if (await import_fs_extra20.pathExists(sourceMetadataPath)) {
89016
+ const metadataContent = await import_fs_extra20.readFile(sourceMetadataPath, "utf-8");
89017
+ sourceMetadata = JSON.parse(metadataContent);
89018
+ }
89019
+ } catch (error) {
89020
+ logger.debug(`Failed to load source metadata: ${error}`);
89021
+ }
89022
+ if (sourceMetadata?.deletions && sourceMetadata.deletions.length > 0) {
89023
+ merger.setDeletions(sourceMetadata.deletions);
89024
+ }
88910
89025
  await merger.merge(sourceDir, ctx.resolvedDir, ctx.isNonInteractive);
88911
89026
  const fileConflicts = merger.getFileConflicts();
88912
89027
  if (fileConflicts.length > 0 && !ctx.isNonInteractive) {
@@ -88914,24 +89029,17 @@ async function handleMerge(ctx) {
88914
89029
  displayConflictSummary(summary);
88915
89030
  }
88916
89031
  try {
88917
- const sourceMetadataPath = ctx.options.global ? join92(sourceDir, "metadata.json") : join92(sourceDir, ".claude", "metadata.json");
88918
- if (await import_fs_extra20.pathExists(sourceMetadataPath)) {
88919
- const metadataContent = await import_fs_extra20.readFile(sourceMetadataPath, "utf-8");
88920
- const sourceMetadata = JSON.parse(metadataContent);
88921
- if (sourceMetadata.deletions && sourceMetadata.deletions.length > 0) {
88922
- const deletionResult = await handleDeletions(sourceMetadata, ctx.claudeDir);
88923
- if (deletionResult.deletedPaths.length > 0) {
88924
- logger.info(`Removed ${deletionResult.deletedPaths.length} deprecated file(s)`);
88925
- for (const path14 of deletionResult.deletedPaths) {
88926
- logger.verbose(` - ${path14}`);
88927
- }
88928
- }
88929
- if (deletionResult.preservedPaths.length > 0) {
88930
- logger.verbose(`Preserved ${deletionResult.preservedPaths.length} user-owned file(s)`);
89032
+ if (sourceMetadata?.deletions && sourceMetadata.deletions.length > 0) {
89033
+ const deletionResult = await handleDeletions(sourceMetadata, ctx.claudeDir);
89034
+ if (deletionResult.deletedPaths.length > 0) {
89035
+ logger.info(`Removed ${deletionResult.deletedPaths.length} deprecated file(s)`);
89036
+ for (const path14 of deletionResult.deletedPaths) {
89037
+ logger.verbose(` - ${path14}`);
88931
89038
  }
88932
89039
  }
88933
- } else {
88934
- logger.debug(`No source metadata found at ${sourceMetadataPath}, skipping deletions`);
89040
+ if (deletionResult.preservedPaths.length > 0) {
89041
+ logger.verbose(`Preserved ${deletionResult.preservedPaths.length} user-owned file(s)`);
89042
+ }
88935
89043
  }
88936
89044
  } catch (error) {
88937
89045
  logger.debug(`Cleanup of deprecated files failed: ${error}`);
@@ -92179,15 +92287,16 @@ async function initCommand(options2) {
92179
92287
  }
92180
92288
  // src/commands/migrate/migrate-command.ts
92181
92289
  init_dist2();
92290
+ var import_picocolors25 = __toESM(require_picocolors(), 1);
92291
+ import { existsSync as existsSync56 } from "node:fs";
92292
+ import { readFile as readFile51, rm as rm14, unlink as unlink12 } from "node:fs/promises";
92293
+ import { homedir as homedir28 } from "node:os";
92294
+ import { basename as basename16, join as join111, resolve as resolve24 } from "node:path";
92182
92295
  init_logger();
92183
92296
  init_agents_discovery();
92184
92297
  init_commands_discovery();
92185
92298
  init_checksum_utils();
92186
92299
  init_config_discovery();
92187
- var import_picocolors25 = __toESM(require_picocolors(), 1);
92188
- import { existsSync as existsSync56 } from "node:fs";
92189
- import { readFile as readFile51, rm as rm14, unlink as unlink12 } from "node:fs/promises";
92190
- import { basename as basename16, resolve as resolve24 } from "node:path";
92191
92300
 
92192
92301
  // src/commands/portable/conflict-resolver.ts
92193
92302
  init_dist2();
@@ -92600,6 +92709,34 @@ async function executeDeleteAction(action, options2) {
92600
92709
  };
92601
92710
  }
92602
92711
  }
92712
+ async function processMetadataDeletions(skillSourcePath, installGlobally) {
92713
+ if (!skillSourcePath)
92714
+ return;
92715
+ const sourceMetadataPath = join111(resolve24(skillSourcePath, ".."), "metadata.json");
92716
+ if (!existsSync56(sourceMetadataPath))
92717
+ return;
92718
+ let sourceMetadata;
92719
+ try {
92720
+ const content = await readFile51(sourceMetadataPath, "utf-8");
92721
+ sourceMetadata = JSON.parse(content);
92722
+ } catch (error) {
92723
+ logger.debug(`[migrate] Failed to parse source metadata.json: ${error}`);
92724
+ return;
92725
+ }
92726
+ if (!sourceMetadata.deletions || sourceMetadata.deletions.length === 0)
92727
+ return;
92728
+ const claudeDir2 = installGlobally ? join111(homedir28(), ".claude") : join111(process.cwd(), ".claude");
92729
+ if (!existsSync56(claudeDir2))
92730
+ return;
92731
+ try {
92732
+ const result = await handleDeletions(sourceMetadata, claudeDir2);
92733
+ if (result.deletedPaths.length > 0) {
92734
+ logger.verbose(`[migrate] Cleaned up ${result.deletedPaths.length} deprecated path(s): ${result.deletedPaths.join(", ")}`);
92735
+ }
92736
+ } catch (error) {
92737
+ logger.warning(`[migrate] Deletion cleanup failed: ${error}`);
92738
+ }
92739
+ }
92603
92740
  async function migrateCommand(options2) {
92604
92741
  console.log();
92605
92742
  oe(import_picocolors25.default.bgMagenta(import_picocolors25.default.black(" ck migrate ")));
@@ -92942,12 +93079,28 @@ async function migrateCommand(options2) {
92942
93079
  allResults.push(...await installSkillDirectories(skills, skillProviders, installOpts));
92943
93080
  }
92944
93081
  }
93082
+ await processMetadataDeletions(skillSource, installGlobally);
92945
93083
  const writtenPaths = new Set(allResults.filter((result) => result.success && !result.skipped && result.path.length > 0).map((result) => resolve24(result.path)));
92946
93084
  for (const deleteAction of plannedDeleteActions) {
92947
93085
  allResults.push(await executeDeleteAction(deleteAction, {
92948
93086
  preservePaths: writtenPaths
92949
93087
  }));
92950
93088
  }
93089
+ const skipActionsToPopulate = plan.actions.filter((a3) => a3.action === "skip" && a3.sourceChecksum && !isUnknownChecksum(a3.sourceChecksum) && a3.targetPath);
93090
+ for (const action of skipActionsToPopulate) {
93091
+ const registryEntry = registry.installations.find((i) => i.item === action.item && i.type === action.type && i.provider === action.provider && i.global === action.global);
93092
+ if (registryEntry && isUnknownChecksum(registryEntry.sourceChecksum)) {
93093
+ try {
93094
+ await addPortableInstallation(action.item, action.type, action.provider, action.global, action.targetPath, registryEntry.sourcePath, {
93095
+ sourceChecksum: action.sourceChecksum,
93096
+ targetChecksum: action.currentTargetChecksum,
93097
+ installSource: registryEntry.installSource === "manual" ? "manual" : "kit"
93098
+ });
93099
+ } catch {
93100
+ logger.debug(`Failed to populate checksums for ${action.item} — will retry on next run`);
93101
+ }
93102
+ }
93103
+ }
92951
93104
  installSpinner.stop("Migrate complete");
92952
93105
  displayMigrationSummary(plan, allResults, { color: useColor });
92953
93106
  const failed = allResults.filter((r2) => !r2.success);
@@ -93260,7 +93413,7 @@ async function handleDirectorySetup(ctx) {
93260
93413
  // src/commands/new/phases/project-creation.ts
93261
93414
  init_config_manager();
93262
93415
  init_github_client();
93263
- import { join as join111 } from "node:path";
93416
+ import { join as join112 } from "node:path";
93264
93417
  init_logger();
93265
93418
  init_output_manager();
93266
93419
  init_types3();
@@ -93386,7 +93539,7 @@ async function projectCreation(kit, resolvedDir, validOptions, isNonInteractive2
93386
93539
  output.section("Installing");
93387
93540
  logger.verbose("Installation target", { directory: resolvedDir });
93388
93541
  const merger = new FileMerger;
93389
- const claudeDir2 = join111(resolvedDir, ".claude");
93542
+ const claudeDir2 = join112(resolvedDir, ".claude");
93390
93543
  merger.setMultiKitContext(claudeDir2, kit);
93391
93544
  if (validOptions.exclude && validOptions.exclude.length > 0) {
93392
93545
  merger.addIgnorePatterns(validOptions.exclude);
@@ -93433,7 +93586,7 @@ async function handleProjectCreation(ctx) {
93433
93586
  }
93434
93587
  // src/commands/new/phases/post-setup.ts
93435
93588
  init_projects_registry();
93436
- import { join as join112 } from "node:path";
93589
+ import { join as join113 } from "node:path";
93437
93590
  init_package_installer();
93438
93591
  init_logger();
93439
93592
  init_path_resolver();
@@ -93465,9 +93618,9 @@ async function postSetup(resolvedDir, validOptions, isNonInteractive2, prompts)
93465
93618
  withSudo: validOptions.withSudo
93466
93619
  });
93467
93620
  }
93468
- const claudeDir2 = join112(resolvedDir, ".claude");
93621
+ const claudeDir2 = join113(resolvedDir, ".claude");
93469
93622
  await promptSetupWizardIfNeeded({
93470
- envPath: join112(claudeDir2, ".env"),
93623
+ envPath: join113(claudeDir2, ".env"),
93471
93624
  claudeDir: claudeDir2,
93472
93625
  isGlobal: false,
93473
93626
  isNonInteractive: isNonInteractive2,
@@ -93537,7 +93690,7 @@ Please use only one download method.`);
93537
93690
  // src/commands/plan/plan-command.ts
93538
93691
  init_output_manager();
93539
93692
  import { existsSync as existsSync58, statSync as statSync8 } from "node:fs";
93540
- import { dirname as dirname30, join as join114, parse as parse6, resolve as resolve28 } from "node:path";
93693
+ import { dirname as dirname30, join as join115, parse as parse6, resolve as resolve28 } from "node:path";
93541
93694
 
93542
93695
  // src/commands/plan/plan-read-handlers.ts
93543
93696
  init_plan_parser();
@@ -93545,7 +93698,7 @@ init_logger();
93545
93698
  init_output_manager();
93546
93699
  var import_picocolors27 = __toESM(require_picocolors(), 1);
93547
93700
  import { existsSync as existsSync57, statSync as statSync7 } from "node:fs";
93548
- import { basename as basename17, dirname as dirname29, join as join113, relative as relative21, resolve as resolve26 } from "node:path";
93701
+ import { basename as basename17, dirname as dirname29, join as join114, relative as relative21, resolve as resolve26 } from "node:path";
93549
93702
  async function handleParse(target, options2) {
93550
93703
  const planFile = resolvePlanFile(target);
93551
93704
  if (!planFile) {
@@ -93621,7 +93774,7 @@ async function handleValidate(target, options2) {
93621
93774
  }
93622
93775
  async function handleStatus(target, options2) {
93623
93776
  const t = target ? resolve26(target) : null;
93624
- const plansDir = t && existsSync57(t) && statSync7(t).isDirectory() && !existsSync57(join113(t, "plan.md")) ? t : null;
93777
+ const plansDir = t && existsSync57(t) && statSync7(t).isDirectory() && !existsSync57(join114(t, "plan.md")) ? t : null;
93625
93778
  if (plansDir) {
93626
93779
  const planFiles = scanPlanDir(plansDir);
93627
93780
  if (planFiles.length === 0) {
@@ -93893,7 +94046,7 @@ function resolvePlanFile(target) {
93893
94046
  const stat18 = statSync8(t);
93894
94047
  if (stat18.isFile())
93895
94048
  return t;
93896
- const candidate = join114(t, "plan.md");
94049
+ const candidate = join115(t, "plan.md");
93897
94050
  if (existsSync58(candidate))
93898
94051
  return candidate;
93899
94052
  }
@@ -93901,7 +94054,7 @@ function resolvePlanFile(target) {
93901
94054
  let dir = process.cwd();
93902
94055
  const root = parse6(dir).root;
93903
94056
  while (dir !== root) {
93904
- const candidate = join114(dir, "plan.md");
94057
+ const candidate = join115(dir, "plan.md");
93905
94058
  if (existsSync58(candidate))
93906
94059
  return candidate;
93907
94060
  dir = dirname30(dir);
@@ -94928,7 +95081,7 @@ async function detectInstallations() {
94928
95081
 
94929
95082
  // src/commands/uninstall/removal-handler.ts
94930
95083
  import { readdirSync as readdirSync7, rmSync as rmSync6 } from "node:fs";
94931
- import { join as join116, resolve as resolve30, sep as sep6 } from "node:path";
95084
+ import { join as join117, resolve as resolve30, sep as sep6 } from "node:path";
94932
95085
  init_logger();
94933
95086
  init_safe_prompts();
94934
95087
  init_safe_spinner();
@@ -94937,7 +95090,7 @@ var import_fs_extra37 = __toESM(require_lib3(), 1);
94937
95090
  // src/commands/uninstall/analysis-handler.ts
94938
95091
  init_metadata_migration();
94939
95092
  import { readdirSync as readdirSync6, rmSync as rmSync5 } from "node:fs";
94940
- import { dirname as dirname31, join as join115 } from "node:path";
95093
+ import { dirname as dirname31, join as join116 } from "node:path";
94941
95094
  init_logger();
94942
95095
  init_safe_prompts();
94943
95096
  var import_picocolors33 = __toESM(require_picocolors(), 1);
@@ -94985,7 +95138,7 @@ async function analyzeInstallation(installation, forceOverwrite, kit) {
94985
95138
  if (uninstallManifest.isMultiKit && kit && metadata?.kits?.[kit]) {
94986
95139
  const kitFiles = metadata.kits[kit].files || [];
94987
95140
  for (const trackedFile of kitFiles) {
94988
- const filePath = join115(installation.path, trackedFile.path);
95141
+ const filePath = join116(installation.path, trackedFile.path);
94989
95142
  if (uninstallManifest.filesToPreserve.includes(trackedFile.path)) {
94990
95143
  result.toPreserve.push({ path: trackedFile.path, reason: "shared with other kit" });
94991
95144
  continue;
@@ -95015,7 +95168,7 @@ async function analyzeInstallation(installation, forceOverwrite, kit) {
95015
95168
  return result;
95016
95169
  }
95017
95170
  for (const trackedFile of allTrackedFiles) {
95018
- const filePath = join115(installation.path, trackedFile.path);
95171
+ const filePath = join116(installation.path, trackedFile.path);
95019
95172
  const ownershipResult = await OwnershipChecker.checkOwnership(filePath, metadata, installation.path);
95020
95173
  if (!ownershipResult.exists)
95021
95174
  continue;
@@ -95112,7 +95265,7 @@ async function removeInstallations(installations, options2) {
95112
95265
  let removedCount = 0;
95113
95266
  let cleanedDirs = 0;
95114
95267
  for (const item of analysis.toDelete) {
95115
- const filePath = join116(installation.path, item.path);
95268
+ const filePath = join117(installation.path, item.path);
95116
95269
  if (!await import_fs_extra37.pathExists(filePath))
95117
95270
  continue;
95118
95271
  if (!await isPathSafeToRemove(filePath, installation.path)) {
@@ -95508,7 +95661,7 @@ init_logger();
95508
95661
  init_path_resolver();
95509
95662
  init_types3();
95510
95663
  import { existsSync as existsSync60, readFileSync as readFileSync13 } from "node:fs";
95511
- import { join as join117 } from "node:path";
95664
+ import { join as join118 } from "node:path";
95512
95665
  var packageVersion = package_default.version;
95513
95666
  function formatInstalledKits(metadata) {
95514
95667
  if (!metadata.kits || Object.keys(metadata.kits).length === 0) {
@@ -95540,9 +95693,9 @@ async function displayVersion() {
95540
95693
  let localKitVersion = null;
95541
95694
  let isGlobalOnlyKit = false;
95542
95695
  const globalKitDir = PathResolver.getGlobalKitDir();
95543
- const globalMetadataPath = join117(globalKitDir, "metadata.json");
95696
+ const globalMetadataPath = join118(globalKitDir, "metadata.json");
95544
95697
  const prefix = PathResolver.getPathPrefix(false);
95545
- const localMetadataPath = prefix ? join117(process.cwd(), prefix, "metadata.json") : join117(process.cwd(), "metadata.json");
95698
+ const localMetadataPath = prefix ? join118(process.cwd(), prefix, "metadata.json") : join118(process.cwd(), "metadata.json");
95546
95699
  const isLocalSameAsGlobal = localMetadataPath === globalMetadataPath;
95547
95700
  if (!isLocalSameAsGlobal && existsSync60(localMetadataPath)) {
95548
95701
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claudekit-cli",
3
- "version": "3.36.0-dev.12",
3
+ "version": "3.36.0-dev.13",
4
4
  "description": "CLI tool for bootstrapping and updating ClaudeKit projects",
5
5
  "type": "module",
6
6
  "repository": {