kaizen-agent 1.6.3 → 1.6.4

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 +9 -7
  2. package/package.json +1 -1
package/cli/install.ts CHANGED
@@ -478,20 +478,22 @@ async function resolveRepoQuietly() {
478
478
 
479
479
  async function resolveRepo() {
480
480
  const here = dirname(import.meta.dir);
481
- if (existsSync(join(here, ".git"))) return here;
482
-
483
481
  const dest = process.env.KAIZEN_HOME ?? join(home, "kaizen");
484
- if (existsSync(join(dest, ".git"))) {
482
+ // The launcher runs the clone itself, so an upgrade from inside it must pull
483
+ // that clone -- returning it untouched was "Up to date" at whatever was there.
484
+ for (const dir of [here, dest]) {
485
+ if (!existsSync(join(dir, ".git"))) continue;
486
+ if (!upgrade && dir === here) return dir;
485
487
  // A pull can refuse for reasons that have nothing to do with linking -- local
486
488
  // edits, a detached head, no network. Linking the checkout already on disk
487
489
  // still works, so say what happened and carry on.
488
490
  try {
489
- await Bun.$`git -C ${dest} pull --ff-only`.quiet();
490
- step(`updated ${tilde(dest)}`);
491
+ await Bun.$`git -C ${dir} pull --ff-only`.quiet();
492
+ step(`updated ${tilde(dir)}`);
491
493
  } catch {
492
- step(`kept ${tilde(dest)} ${c.dim("(could not pull)")}`);
494
+ step(`kept ${tilde(dir)} ${c.dim("(could not pull)")}`);
493
495
  }
494
- return dest;
496
+ return dir;
495
497
  }
496
498
  // A copy made before git was installed can never be pulled, so it keeps upgrading
497
499
  // through npm and its caches. Once git is here, replace it with a real clone --
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kaizen-agent",
3
- "version": "1.6.3",
3
+ "version": "1.6.4",
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": {