@cleocode/cleo 2026.3.51 → 2026.3.52
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/cli/index.js +25 -13
- package/dist/cli/index.js.map +3 -3
- package/dist/mcp/index.js +25 -13
- package/dist/mcp/index.js.map +3 -3
- package/package.json +4 -4
package/dist/mcp/index.js
CHANGED
|
@@ -35539,16 +35539,24 @@ async function ensureGlobalHome() {
|
|
|
35539
35539
|
for (const subdir of REQUIRED_GLOBAL_SUBDIRS) {
|
|
35540
35540
|
await mkdir5(join37(cleoHome, subdir), { recursive: true });
|
|
35541
35541
|
}
|
|
35542
|
-
|
|
35543
|
-
|
|
35544
|
-
|
|
35545
|
-
|
|
35546
|
-
|
|
35547
|
-
|
|
35548
|
-
|
|
35549
|
-
|
|
35550
|
-
|
|
35551
|
-
|
|
35542
|
+
const homedir7 = (await import("node:os")).homedir();
|
|
35543
|
+
const legacyCleoHome = join37(homedir7, ".cleo");
|
|
35544
|
+
const cleanupPaths = [cleoHome];
|
|
35545
|
+
if (legacyCleoHome !== cleoHome && existsSync34(legacyCleoHome)) {
|
|
35546
|
+
cleanupPaths.push(legacyCleoHome);
|
|
35547
|
+
}
|
|
35548
|
+
for (const homeDir of cleanupPaths) {
|
|
35549
|
+
for (const stale of STALE_GLOBAL_ENTRIES) {
|
|
35550
|
+
const stalePath = join37(homeDir, stale);
|
|
35551
|
+
if (existsSync34(stalePath)) {
|
|
35552
|
+
try {
|
|
35553
|
+
await rm2(stalePath, { recursive: true, force: true });
|
|
35554
|
+
console.warn(`[CLEO] Removed stale global entry: ${stalePath}`);
|
|
35555
|
+
} catch (err) {
|
|
35556
|
+
console.warn(
|
|
35557
|
+
`[CLEO] Could not remove stale global entry ${stalePath}: ${err instanceof Error ? err.message : String(err)}`
|
|
35558
|
+
);
|
|
35559
|
+
}
|
|
35552
35560
|
}
|
|
35553
35561
|
}
|
|
35554
35562
|
}
|
|
@@ -65021,9 +65029,13 @@ async function injectAgentsHub(ctx) {
|
|
|
65021
65029
|
await mkdir17(globalAgentsDir, { recursive: true });
|
|
65022
65030
|
if (existsSync103(globalAgentsMd)) {
|
|
65023
65031
|
const content = await readFile19(globalAgentsMd, "utf8");
|
|
65024
|
-
const stripped = content.replace(
|
|
65025
|
-
|
|
65026
|
-
|
|
65032
|
+
const stripped = content.replace(
|
|
65033
|
+
/\n?<!-- CLEO:START[^>]*-->[\s\S]*?<!-- CLEO:END -->\n?/g,
|
|
65034
|
+
""
|
|
65035
|
+
);
|
|
65036
|
+
if (stripped !== content) {
|
|
65037
|
+
await writeFile12(globalAgentsMd, stripped, "utf8");
|
|
65038
|
+
}
|
|
65027
65039
|
}
|
|
65028
65040
|
const expectedContent = "@~/.cleo/templates/CLEO-INJECTION.md";
|
|
65029
65041
|
const action = await inject2(globalAgentsMd, expectedContent);
|