meetsoma 0.23.0 → 0.24.0

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/thin-cli.js +39 -10
  2. package/package.json +1 -1
package/dist/thin-cli.js CHANGED
@@ -1406,21 +1406,30 @@ async function checkAndUpdate() {
1406
1406
  } catch {
1407
1407
  console.log(` ${green("\u2713")} Core installed`);
1408
1408
  }
1409
+ let remoteName = "origin";
1410
+ try {
1411
+ const remotes = execSync2("git remote -v", { cwd: installPath, encoding: "utf-8" });
1412
+ const m = remotes.match(/^(\w+)\s+https:\/\/github\.com\/.*\(fetch\)/m);
1413
+ if (m) remoteName = m[1];
1414
+ } catch {
1415
+ }
1409
1416
  let behind = 0;
1417
+ let branch = "main";
1410
1418
  try {
1411
1419
  console.log(` ${yellow("\u23F3")} Checking for updates...`);
1412
- execSync2("git fetch origin --quiet", { cwd: installPath, stdio: "ignore", timeout: 15e3 });
1413
- const branch = execSync2("git rev-parse --abbrev-ref HEAD", {
1420
+ execSync2(`git fetch ${remoteName} --quiet`, { cwd: installPath, stdio: "ignore", timeout: 15e3 });
1421
+ branch = execSync2("git rev-parse --abbrev-ref HEAD", {
1414
1422
  cwd: installPath,
1415
1423
  encoding: "utf-8"
1416
1424
  }).trim();
1417
1425
  const behindStr = execSync2(
1418
- `git rev-list HEAD..origin/${branch} --count`,
1426
+ `git rev-list HEAD..${remoteName}/${branch} --count`,
1419
1427
  { cwd: installPath, encoding: "utf-8" }
1420
1428
  ).trim();
1421
1429
  behind = parseInt(behindStr) || 0;
1422
- } catch {
1423
- console.log(` ${dim("Could not check for updates.")}`);
1430
+ } catch (err) {
1431
+ const errMsg = (err.stderr ? err.stderr.toString() : err.message || "").split("\n")[0];
1432
+ console.log(` ${dim("Could not check for updates:")} ${dim(errMsg || "unknown error")}`);
1424
1433
  console.log("");
1425
1434
  return;
1426
1435
  }
@@ -1441,7 +1450,7 @@ async function checkAndUpdate() {
1441
1450
  console.log("");
1442
1451
  try {
1443
1452
  const log = execSync2(
1444
- `git log HEAD..origin/main --oneline --no-decorate -5`,
1453
+ `git log HEAD..${remoteName}/${branch} --oneline --no-decorate -5`,
1445
1454
  { cwd: installPath, encoding: "utf-8" }
1446
1455
  ).trim();
1447
1456
  if (log) {
@@ -1979,6 +1988,24 @@ async function projectDoctor() {
1979
1988
  changed = true;
1980
1989
  fixes++;
1981
1990
  }
1991
+ if (!Array.isArray(current.migrations)) {
1992
+ current.migrations = [];
1993
+ }
1994
+ const applyOnce = (id, fn) => {
1995
+ if (current.migrations.includes(id)) return;
1996
+ const flipped = fn();
1997
+ current.migrations.push(id);
1998
+ changed = true;
1999
+ if (flipped) fixes++;
2000
+ };
2001
+ applyOnce("breathe-auto-off-v0.23.1", () => {
2002
+ if (current.breathe && typeof current.breathe === "object" && current.breathe.auto === true) {
2003
+ current.breathe.auto = false;
2004
+ console.log(` ${green("\u2713")} migration breathe-auto-off-v0.23.1: flipped breathe.auto \u2192 false (re-enable in settings.json if desired)`);
2005
+ return true;
2006
+ }
2007
+ return false;
2008
+ });
1982
2009
  if (changed) writeFileSync2(settingsPath, JSON.stringify(current, null, " ") + "\n");
1983
2010
  } catch {
1984
2011
  }
@@ -2050,13 +2077,15 @@ async function projectDoctor() {
2050
2077
  }
2051
2078
  } catch {
2052
2079
  }
2053
- if (fixes > 0) {
2054
- try {
2055
- const s = JSON.parse(readFileSync3(settingsPath, "utf-8"));
2080
+ try {
2081
+ const s = JSON.parse(readFileSync3(settingsPath, "utf-8"));
2082
+ if (s.version !== agentV) {
2056
2083
  s.version = agentV;
2057
2084
  writeFileSync2(settingsPath, JSON.stringify(s, null, " ") + "\n");
2058
- } catch {
2059
2085
  }
2086
+ } catch {
2087
+ }
2088
+ if (fixes > 0) {
2060
2089
  console.log(` ${green("\u2713")} Applied ${fixes} automatic fixes`);
2061
2090
  const bc = existsSync3(join3(somaDir, "body")) ? readdirSync(join3(somaDir, "body")).filter((f) => f.endsWith(".md")).length : 0;
2062
2091
  const pc = existsSync3(protoDir) ? readdirSync(protoDir).filter((f) => f.endsWith(".md")).length : 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "meetsoma",
3
- "version": "0.23.0",
3
+ "version": "0.24.0",
4
4
  "description": "Soma — the AI coding agent with self-growing memory",
5
5
  "type": "module",
6
6
  "bin": {