meetsoma 0.24.1 → 0.26.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.
- package/dist/thin-cli.js +73 -18
- package/package.json +1 -1
package/dist/thin-cli.js
CHANGED
|
@@ -1949,6 +1949,79 @@ async function projectDoctor() {
|
|
|
1949
1949
|
}
|
|
1950
1950
|
} catch {
|
|
1951
1951
|
}
|
|
1952
|
+
{
|
|
1953
|
+
const somaDir = join3(process.cwd(), ".soma");
|
|
1954
|
+
const settingsPath = join3(somaDir, "settings.json");
|
|
1955
|
+
if (existsSync3(settingsPath)) {
|
|
1956
|
+
try {
|
|
1957
|
+
const current = JSON.parse(readFileSync3(settingsPath, "utf-8"));
|
|
1958
|
+
let migrationsChanged = false;
|
|
1959
|
+
if (!Array.isArray(current.migrations)) {
|
|
1960
|
+
current.migrations = [];
|
|
1961
|
+
migrationsChanged = true;
|
|
1962
|
+
}
|
|
1963
|
+
const applyOnceAlways = (id, fn) => {
|
|
1964
|
+
if (current.migrations.includes(id)) return;
|
|
1965
|
+
fn();
|
|
1966
|
+
current.migrations.push(id);
|
|
1967
|
+
migrationsChanged = true;
|
|
1968
|
+
};
|
|
1969
|
+
applyOnceAlways("breathe-auto-off-v0.23.1", () => {
|
|
1970
|
+
if (current.breathe && typeof current.breathe === "object" && current.breathe.auto === true) {
|
|
1971
|
+
current.breathe.auto = false;
|
|
1972
|
+
console.log(` ${green("\u2713")} migration breathe-auto-off-v0.23.1: flipped breathe.auto \u2192 false`);
|
|
1973
|
+
return true;
|
|
1974
|
+
}
|
|
1975
|
+
return false;
|
|
1976
|
+
});
|
|
1977
|
+
applyOnceAlways("mind-prepend-cleanup-v0.25.0", () => {
|
|
1978
|
+
try {
|
|
1979
|
+
const mindPath = join3(somaDir, "body", "_mind.md");
|
|
1980
|
+
if (!existsSync3(mindPath)) return false;
|
|
1981
|
+
const original = readFileSync3(mindPath, "utf-8");
|
|
1982
|
+
const bareLineRx = /^[ \t]*\{\{(protocol_summaries|muscle_digests|scripts_table)\}\}[ \t]*$/gm;
|
|
1983
|
+
if (!bareLineRx.test(original)) return false;
|
|
1984
|
+
bareLineRx.lastIndex = 0;
|
|
1985
|
+
const backupPath = mindPath + ".bak-v0.25.0";
|
|
1986
|
+
if (!existsSync3(backupPath)) writeFileSync2(backupPath, original);
|
|
1987
|
+
let cleaned = original.replace(bareLineRx, "");
|
|
1988
|
+
cleaned = cleaned.replace(/\n{3,}/g, "\n\n");
|
|
1989
|
+
const breadcrumb = "<!-- v0.25.0 migration (2026-05-04): removed redundant {{protocol_summaries}} / {{muscle_digests}} / {{scripts_table}} interpolations.\n compileFrontalCortex prepends them. Backup: _mind.md.bak-v0.25.0. See: docs/body.md, migrations/phases/v0.24.1-to-v0.25.0.md. -->\n\n";
|
|
1990
|
+
const fmMatch = cleaned.match(/^---\n[\s\S]*?\n---\n+/);
|
|
1991
|
+
cleaned = fmMatch ? cleaned.slice(0, fmMatch[0].length) + breadcrumb + cleaned.slice(fmMatch[0].length) : breadcrumb + cleaned;
|
|
1992
|
+
writeFileSync2(mindPath, cleaned);
|
|
1993
|
+
console.log(` ${green("\u2713")} migration mind-prepend-cleanup-v0.25.0: cleaned _mind.md (backup at _mind.md.bak-v0.25.0)`);
|
|
1994
|
+
return true;
|
|
1995
|
+
} catch {
|
|
1996
|
+
return false;
|
|
1997
|
+
}
|
|
1998
|
+
});
|
|
1999
|
+
applyOnceAlways("memory-section-rename-v0.26.0", () => {
|
|
2000
|
+
try {
|
|
2001
|
+
const preloadDir = join3(somaDir, "memory", "preloads");
|
|
2002
|
+
if (!existsSync3(preloadDir)) return false;
|
|
2003
|
+
const files = readdirSync(preloadDir).filter((f) => f.startsWith("preload-next-") && f.endsWith(".md"));
|
|
2004
|
+
let touched = 0;
|
|
2005
|
+
for (const f of files) {
|
|
2006
|
+
const path = join3(preloadDir, f);
|
|
2007
|
+
const content = readFileSync3(path, "utf-8");
|
|
2008
|
+
if (!/^## Next Session\s*$/m.test(content)) continue;
|
|
2009
|
+
writeFileSync2(path, content.replace(/^## Next Session\s*$/m, "## Start Here"));
|
|
2010
|
+
touched++;
|
|
2011
|
+
}
|
|
2012
|
+
if (touched > 0) {
|
|
2013
|
+
console.log(` ${green("\u2713")} migration memory-section-rename-v0.26.0: renamed in ${touched} preload(s)`);
|
|
2014
|
+
}
|
|
2015
|
+
return touched > 0;
|
|
2016
|
+
} catch {
|
|
2017
|
+
return false;
|
|
2018
|
+
}
|
|
2019
|
+
});
|
|
2020
|
+
if (migrationsChanged) writeFileSync2(settingsPath, JSON.stringify(current, null, " ") + "\n");
|
|
2021
|
+
} catch {
|
|
2022
|
+
}
|
|
2023
|
+
}
|
|
2024
|
+
}
|
|
1952
2025
|
if (agentV && semverCmp2(projectV, agentV) === 0) {
|
|
1953
2026
|
console.log(` ${green("\u2713")} Project is up to date.`);
|
|
1954
2027
|
console.log("");
|
|
@@ -1988,24 +2061,6 @@ async function projectDoctor() {
|
|
|
1988
2061
|
changed = true;
|
|
1989
2062
|
fixes++;
|
|
1990
2063
|
}
|
|
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
|
-
});
|
|
2009
2064
|
if (changed) writeFileSync2(settingsPath, JSON.stringify(current, null, " ") + "\n");
|
|
2010
2065
|
} catch {
|
|
2011
2066
|
}
|