meetsoma 0.24.0 → 0.25.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 +52 -18
- package/package.json +1 -1
package/dist/thin-cli.js
CHANGED
|
@@ -1949,6 +1949,58 @@ 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
|
+
if (migrationsChanged) writeFileSync2(settingsPath, JSON.stringify(current, null, " ") + "\n");
|
|
2000
|
+
} catch {
|
|
2001
|
+
}
|
|
2002
|
+
}
|
|
2003
|
+
}
|
|
1952
2004
|
if (agentV && semverCmp2(projectV, agentV) === 0) {
|
|
1953
2005
|
console.log(` ${green("\u2713")} Project is up to date.`);
|
|
1954
2006
|
console.log("");
|
|
@@ -1988,24 +2040,6 @@ async function projectDoctor() {
|
|
|
1988
2040
|
changed = true;
|
|
1989
2041
|
fixes++;
|
|
1990
2042
|
}
|
|
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
2043
|
if (changed) writeFileSync2(settingsPath, JSON.stringify(current, null, " ") + "\n");
|
|
2010
2044
|
} catch {
|
|
2011
2045
|
}
|