kaizen-agent 1.42.1 → 1.42.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.
Files changed (2) hide show
  1. package/cli/install.ts +11 -3
  2. package/package.json +1 -1
package/cli/install.ts CHANGED
@@ -768,11 +768,19 @@ async function resolveRepo() {
768
768
  rmSync(fresh, { recursive: true, force: true });
769
769
  cpSync(here, fresh, { recursive: true, dereference: true, filter: (src) => basename(src) !== "node_modules" });
770
770
  rmSync(old, { recursive: true, force: true });
771
- // Windows refuses to move a folder a running kaizen still holds open. The
772
- // install stays as it was; say how to finish rather than throwing.
771
+ // Windows refuses to move a folder a running kaizen still holds open (kaizen
772
+ // upgrade itself runs from it). Copy over it in place instead; files the new
773
+ // version dropped stay behind, which is harmless.
773
774
  try { renameSync(dest, old); } catch {
775
+ try {
776
+ cpSync(fresh, dest, { recursive: true, force: true });
777
+ } catch {
778
+ rmSync(fresh, { recursive: true, force: true });
779
+ step(`kept ${tilde(dest)} ${c.dim("(in use; close kaizen and any dashboard, then run bunx kaizen-agent@latest)")}`);
780
+ return dest;
781
+ }
774
782
  rmSync(fresh, { recursive: true, force: true });
775
- step(`kept ${tilde(dest)} ${c.dim("(in use; close kaizen and any dashboard, then run bunx kaizen-agent@latest)")}`);
783
+ step(`updated ${tilde(dest)} in place to kaizen ${versionOf(dest)} ${c.dim("(folder in use, so not swapped)")}`);
776
784
  return dest;
777
785
  }
778
786
  renameSync(fresh, dest);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kaizen-agent",
3
- "version": "1.42.1",
3
+ "version": "1.42.2",
4
4
  "description": "Staged workflow for AI agents — code, writing, research, operations: plan, human approval, build, independent review, bounded fix loop.",
5
5
  "type": "module",
6
6
  "bin": {