claudekit-cli 4.5.0-dev.9 → 4.5.1-dev.1

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/cli-manifest.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
- "version": "4.5.0-dev.9",
3
- "generatedAt": "2026-07-02T15:45:21.584Z",
2
+ "version": "4.5.1-dev.1",
3
+ "generatedAt": "2026-07-03T00:23:47.047Z",
4
4
  "commands": {
5
5
  "agents": {
6
6
  "name": "agents",
package/dist/index.js CHANGED
@@ -64580,7 +64580,7 @@ var package_default;
64580
64580
  var init_package = __esm(() => {
64581
64581
  package_default = {
64582
64582
  name: "claudekit-cli",
64583
- version: "4.5.0-dev.9",
64583
+ version: "4.5.1-dev.1",
64584
64584
  description: "CLI tool for bootstrapping and updating ClaudeKit projects",
64585
64585
  type: "module",
64586
64586
  repository: {
@@ -68983,22 +68983,26 @@ async function countMissingCkHookRegistrations(claudeDir3, kit, options2 = {}) {
68983
68983
  }
68984
68984
  return missing;
68985
68985
  }
68986
+ function buildInitArgs(options2) {
68987
+ const args = ["init"];
68988
+ if (options2.isGlobal)
68989
+ args.push("-g");
68990
+ if (options2.kit)
68991
+ args.push("--kit", options2.kit);
68992
+ if (options2.yes)
68993
+ args.push("--yes");
68994
+ if (options2.restoreCkHooks)
68995
+ args.push("--restore-ck-hooks");
68996
+ if (options2.installMode && options2.isGlobal && options2.kit === "engineer") {
68997
+ args.push("--install-mode", options2.installMode);
68998
+ }
68999
+ args.push("--install-skills");
69000
+ if (options2.beta)
69001
+ args.push("--beta");
69002
+ return args;
69003
+ }
68986
69004
  function buildInitCommand(isGlobal, kit, beta, yes, restoreCkHooks, installMode) {
68987
- const parts = ["ck init"];
68988
- if (isGlobal)
68989
- parts.push("-g");
68990
- if (kit)
68991
- parts.push(`--kit ${kit}`);
68992
- if (yes)
68993
- parts.push("--yes");
68994
- if (restoreCkHooks)
68995
- parts.push("--restore-ck-hooks");
68996
- if (installMode && isGlobal && kit === "engineer")
68997
- parts.push(`--install-mode ${installMode}`);
68998
- parts.push("--install-skills");
68999
- if (beta)
69000
- parts.push("--beta");
69001
- return parts.join(" ");
69005
+ return `ck ${buildInitArgs({ isGlobal, kit, beta, yes, restoreCkHooks, installMode }).join(" ")}`;
69002
69006
  }
69003
69007
  function resolveCkExecutable(platformName = process.platform) {
69004
69008
  return platformName === "win32" ? "ck.cmd" : "ck";
@@ -69018,6 +69022,17 @@ function resolveCkInitSpawnCommand(initArgs, options2 = {}) {
69018
69022
  args: initArgs
69019
69023
  };
69020
69024
  }
69025
+ function createDefaultSpawnInitFn() {
69026
+ return (spawnArgs) => new Promise((resolve36) => {
69027
+ const initCommand = resolveCkInitSpawnCommand(spawnArgs);
69028
+ const child = spawn2(initCommand.command, initCommand.args, { stdio: "inherit" });
69029
+ child.on("close", (code) => resolve36(code ?? 1));
69030
+ child.on("error", (err) => {
69031
+ logger.verbose(`Failed to spawn ck init: ${err.message}`);
69032
+ resolve36(1);
69033
+ });
69034
+ });
69035
+ }
69021
69036
  async function fetchLatestReleaseTag(kit, beta) {
69022
69037
  try {
69023
69038
  const { GitHubClient: GitHubClient2 } = await Promise.resolve().then(() => (init_github_client(), exports_github_client));
@@ -69058,11 +69073,11 @@ async function findMissingHookDependencies(claudeDir3) {
69058
69073
  }
69059
69074
  async function promptKitUpdate(beta, yes, deps) {
69060
69075
  try {
69061
- const execFn = deps?.execAsyncFn ?? execAsync2;
69062
69076
  const loadFullConfigFn = deps?.loadFullConfigFn ?? CkConfigManager.loadFull;
69063
69077
  const confirmFn = deps?.confirmFn ?? se;
69064
69078
  const isCancelFn = deps?.isCancelFn ?? lD;
69065
69079
  const getSetupFn = deps?.getSetupFn ?? getClaudeKitSetup;
69080
+ const spawnFn = deps?.spawnInitFn ?? createDefaultSpawnInitFn();
69066
69081
  const findMissingHookDepsFn = deps?.findMissingHookDependenciesFn ?? findMissingHookDependencies;
69067
69082
  const detectInstallModeFn = deps?.detectInstallModeFn ?? detectInstallMode;
69068
69083
  const hasTrackedPluginSuppliedLegacyFilesFn = deps?.hasTrackedPluginSuppliedLegacyFilesFn ?? hasTrackedPluginSuppliedLegacyFiles;
@@ -69229,12 +69244,27 @@ async function promptKitUpdate(beta, yes, deps) {
69229
69244
  }
69230
69245
  const useBeta = beta || isBetaInstalled;
69231
69246
  if (yes) {
69232
- const initCmd = buildInitCommand(selection.isGlobal, selection.kit, useBeta, true, forceKitReinstall, installModePreference);
69233
- logger.info(`Running: ${initCmd}`);
69247
+ const args = buildInitArgs({
69248
+ isGlobal: selection.isGlobal,
69249
+ kit: selection.kit,
69250
+ beta: useBeta,
69251
+ yes: true,
69252
+ restoreCkHooks: forceKitReinstall,
69253
+ installMode: installModePreference
69254
+ });
69255
+ logger.info(`Running: ck ${args.join(" ")}`);
69234
69256
  const s = (deps?.spinnerFn ?? de)();
69235
- s.start("Updating ClaudeKit content...");
69257
+ s.start("Preparing ClaudeKit content update...");
69258
+ s.stop("Running ClaudeKit content update");
69236
69259
  try {
69237
- await execFn(initCmd, { timeout: 300000 });
69260
+ const exitCode = await spawnFn(args);
69261
+ if (exitCode !== 0) {
69262
+ if (installModePreference === "plugin") {
69263
+ throw new StrictPluginUpdateError(`Strict plugin kit update failed with exit code ${exitCode}`);
69264
+ }
69265
+ logger.warning("Kit content update may have encountered issues");
69266
+ return;
69267
+ }
69238
69268
  let newKitVersion;
69239
69269
  try {
69240
69270
  const claudeDir3 = selection.isGlobal ? setup.global.path : setup.project.path;
@@ -69242,49 +69272,32 @@ async function promptKitUpdate(beta, yes, deps) {
69242
69272
  newKitVersion = selection.kit ? updatedMetadata?.kits?.[selection.kit]?.version : undefined;
69243
69273
  } catch {}
69244
69274
  if (selection.kit && kitVersion && newKitVersion && kitVersion !== newKitVersion) {
69245
- s.stop(`Kit updated: ${selection.kit}@${kitVersion} -> ${newKitVersion}`);
69275
+ logger.success(`Kit updated: ${selection.kit}@${kitVersion} -> ${newKitVersion}`);
69246
69276
  } else if (selection.kit && newKitVersion) {
69247
- s.stop(`Kit content updated (${selection.kit}@${newKitVersion})`);
69277
+ logger.success(`Kit content updated (${selection.kit}@${newKitVersion})`);
69248
69278
  } else {
69249
- s.stop("Kit content updated");
69279
+ logger.success("Kit content updated");
69250
69280
  }
69251
69281
  } catch (error) {
69252
- s.stop("Kit update finished");
69282
+ if (error instanceof StrictPluginUpdateError)
69283
+ throw error;
69253
69284
  const errorMsg = error instanceof Error ? error.message : "unknown";
69254
69285
  if (installModePreference === "plugin") {
69255
69286
  throw new StrictPluginUpdateError(`Strict plugin kit update failed: ${errorMsg}`);
69256
69287
  }
69257
- if (errorMsg.includes("exit code") && !errorMsg.includes("exit code 0")) {
69258
- logger.warning("Kit content update may have encountered issues");
69259
- logger.verbose(`Error: ${errorMsg}`);
69260
- } else {
69261
- logger.verbose(`Init command completed: ${errorMsg}`);
69262
- }
69288
+ logger.warning("Kit content update may have encountered issues");
69289
+ logger.verbose(`Error: ${errorMsg}`);
69263
69290
  }
69264
69291
  } else {
69265
- const args = ["init"];
69266
- if (selection.isGlobal)
69267
- args.push("-g");
69268
- if (selection.kit)
69269
- args.push("--kit", selection.kit);
69270
- if (forceKitReinstall)
69271
- args.push("--restore-ck-hooks");
69272
- if (installModePreference)
69273
- args.push("--install-mode", installModePreference);
69274
- args.push("--install-skills");
69275
- if (useBeta)
69276
- args.push("--beta");
69292
+ const args = buildInitArgs({
69293
+ isGlobal: selection.isGlobal,
69294
+ kit: selection.kit,
69295
+ beta: useBeta,
69296
+ restoreCkHooks: forceKitReinstall,
69297
+ installMode: installModePreference
69298
+ });
69277
69299
  const displayCmd = `ck ${args.join(" ")}`;
69278
69300
  logger.info(`Running: ${displayCmd}`);
69279
- const spawnFn = deps?.spawnInitFn ?? ((spawnArgs) => new Promise((resolve36) => {
69280
- const initCommand = resolveCkInitSpawnCommand(spawnArgs);
69281
- const child = spawn2(initCommand.command, initCommand.args, { stdio: "inherit" });
69282
- child.on("close", (code) => resolve36(code ?? 1));
69283
- child.on("error", (err) => {
69284
- logger.verbose(`Failed to spawn ck init: ${err.message}`);
69285
- resolve36(1);
69286
- });
69287
- }));
69288
69301
  const exitCode = await spawnFn(args);
69289
69302
  if (exitCode !== 0) {
69290
69303
  if (installModePreference === "plugin") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claudekit-cli",
3
- "version": "4.5.0-dev.9",
3
+ "version": "4.5.1-dev.1",
4
4
  "description": "CLI tool for bootstrapping and updating ClaudeKit projects",
5
5
  "type": "module",
6
6
  "repository": {