@cleocode/cleo 2026.3.52 → 2026.3.54
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 +23 -4
- package/dist/cli/index.js.map +2 -2
- package/dist/mcp/index.js +23 -4
- package/dist/mcp/index.js.map +2 -2
- package/package.json +3 -3
package/dist/mcp/index.js
CHANGED
|
@@ -10224,6 +10224,14 @@ function isAbsolutePath(path2) {
|
|
|
10224
10224
|
if (path2.startsWith("\\\\")) return true;
|
|
10225
10225
|
return false;
|
|
10226
10226
|
}
|
|
10227
|
+
function getCleoTemplatesTildePath() {
|
|
10228
|
+
const absPath = getCleoTemplatesDir();
|
|
10229
|
+
const home = homedir();
|
|
10230
|
+
if (absPath.startsWith(home)) {
|
|
10231
|
+
return `~${absPath.slice(home.length)}`;
|
|
10232
|
+
}
|
|
10233
|
+
return absPath;
|
|
10234
|
+
}
|
|
10227
10235
|
function getAgentsHome() {
|
|
10228
10236
|
return process.env["AGENTS_HOME"] ?? join5(homedir(), ".agents");
|
|
10229
10237
|
}
|
|
@@ -34622,7 +34630,7 @@ async function ensureInjection(projectRoot) {
|
|
|
34622
34630
|
try {
|
|
34623
34631
|
const globalAgentsDir = getAgentsHome();
|
|
34624
34632
|
const globalAgentsMd = join36(globalAgentsDir, "AGENTS.md");
|
|
34625
|
-
const globalHubContent =
|
|
34633
|
+
const globalHubContent = `@${getCleoTemplatesTildePath()}/CLEO-INJECTION.md`;
|
|
34626
34634
|
await mkdir4(globalAgentsDir, { recursive: true });
|
|
34627
34635
|
await inject2(globalAgentsMd, globalHubContent);
|
|
34628
34636
|
} catch {
|
|
@@ -35539,6 +35547,15 @@ async function ensureGlobalHome() {
|
|
|
35539
35547
|
for (const subdir of REQUIRED_GLOBAL_SUBDIRS) {
|
|
35540
35548
|
await mkdir5(join37(cleoHome, subdir), { recursive: true });
|
|
35541
35549
|
}
|
|
35550
|
+
const globalConfigPath = join37(cleoHome, "config.json");
|
|
35551
|
+
if (!existsSync34(globalConfigPath)) {
|
|
35552
|
+
const templatePath = join37(getPackageRoot(), "templates", "global-config.template.json");
|
|
35553
|
+
if (existsSync34(templatePath)) {
|
|
35554
|
+
const template = readFileSync22(templatePath, "utf-8");
|
|
35555
|
+
const resolved = template.replace("{{SCHEMA_VERSION_GLOBAL_CONFIG}}", "1.0.0");
|
|
35556
|
+
await writeFile5(globalConfigPath, resolved);
|
|
35557
|
+
}
|
|
35558
|
+
}
|
|
35542
35559
|
const homedir7 = (await import("node:os")).homedir();
|
|
35543
35560
|
const legacyCleoHome = join37(homedir7, ".cleo");
|
|
35544
35561
|
const cleanupPaths = [cleoHome];
|
|
@@ -35744,7 +35761,9 @@ backups/
|
|
|
35744
35761
|
"brain-worker.pid",
|
|
35745
35762
|
"VERSION",
|
|
35746
35763
|
"schemas",
|
|
35747
|
-
"bin"
|
|
35764
|
+
"bin",
|
|
35765
|
+
".install-state",
|
|
35766
|
+
"templates/templates"
|
|
35748
35767
|
];
|
|
35749
35768
|
}
|
|
35750
35769
|
});
|
|
@@ -65037,8 +65056,8 @@ async function injectAgentsHub(ctx) {
|
|
|
65037
65056
|
await writeFile12(globalAgentsMd, stripped, "utf8");
|
|
65038
65057
|
}
|
|
65039
65058
|
}
|
|
65040
|
-
const
|
|
65041
|
-
const action = await inject2(globalAgentsMd,
|
|
65059
|
+
const templateRef = `@${getCleoTemplatesTildePath()}/CLEO-INJECTION.md`;
|
|
65060
|
+
const action = await inject2(globalAgentsMd, templateRef);
|
|
65042
65061
|
ctx.created.push(`~/.agents/AGENTS.md (${action})`);
|
|
65043
65062
|
} else {
|
|
65044
65063
|
ctx.created.push("~/.agents/AGENTS.md (would create/update CAAMP block)");
|