@cleocode/core 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/index.js +23 -4
- package/dist/index.js.map +2 -2
- package/dist/paths.d.ts +11 -0
- package/dist/paths.d.ts.map +1 -1
- package/dist/scaffold.d.ts +1 -1
- package/dist/scaffold.d.ts.map +1 -1
- package/package.json +5 -5
- package/src/bootstrap.ts +3 -3
- package/src/injection.ts +2 -2
- package/src/paths.ts +19 -0
- package/src/scaffold.ts +13 -0
package/dist/index.js
CHANGED
|
@@ -10223,6 +10223,14 @@ function isAbsolutePath(path2) {
|
|
|
10223
10223
|
if (path2.startsWith("\\\\")) return true;
|
|
10224
10224
|
return false;
|
|
10225
10225
|
}
|
|
10226
|
+
function getCleoTemplatesTildePath() {
|
|
10227
|
+
const absPath = getCleoTemplatesDir();
|
|
10228
|
+
const home = homedir();
|
|
10229
|
+
if (absPath.startsWith(home)) {
|
|
10230
|
+
return `~${absPath.slice(home.length)}`;
|
|
10231
|
+
}
|
|
10232
|
+
return absPath;
|
|
10233
|
+
}
|
|
10226
10234
|
function getAgentsHome() {
|
|
10227
10235
|
return process.env["AGENTS_HOME"] ?? join5(homedir(), ".agents");
|
|
10228
10236
|
}
|
|
@@ -18831,7 +18839,7 @@ async function ensureInjection(projectRoot) {
|
|
|
18831
18839
|
try {
|
|
18832
18840
|
const globalAgentsDir = getAgentsHome();
|
|
18833
18841
|
const globalAgentsMd = join36(globalAgentsDir, "AGENTS.md");
|
|
18834
|
-
const globalHubContent =
|
|
18842
|
+
const globalHubContent = `@${getCleoTemplatesTildePath()}/CLEO-INJECTION.md`;
|
|
18835
18843
|
await mkdir4(globalAgentsDir, { recursive: true });
|
|
18836
18844
|
await inject2(globalAgentsMd, globalHubContent);
|
|
18837
18845
|
} catch {
|
|
@@ -19748,6 +19756,15 @@ async function ensureGlobalHome() {
|
|
|
19748
19756
|
for (const subdir of REQUIRED_GLOBAL_SUBDIRS) {
|
|
19749
19757
|
await mkdir5(join37(cleoHome, subdir), { recursive: true });
|
|
19750
19758
|
}
|
|
19759
|
+
const globalConfigPath = join37(cleoHome, "config.json");
|
|
19760
|
+
if (!existsSync33(globalConfigPath)) {
|
|
19761
|
+
const templatePath = join37(getPackageRoot(), "templates", "global-config.template.json");
|
|
19762
|
+
if (existsSync33(templatePath)) {
|
|
19763
|
+
const template = readFileSync22(templatePath, "utf-8");
|
|
19764
|
+
const resolved = template.replace("{{SCHEMA_VERSION_GLOBAL_CONFIG}}", "1.0.0");
|
|
19765
|
+
await writeFile5(globalConfigPath, resolved);
|
|
19766
|
+
}
|
|
19767
|
+
}
|
|
19751
19768
|
const homedir7 = (await import("node:os")).homedir();
|
|
19752
19769
|
const legacyCleoHome = join37(homedir7, ".cleo");
|
|
19753
19770
|
const cleanupPaths = [cleoHome];
|
|
@@ -19953,7 +19970,9 @@ backups/
|
|
|
19953
19970
|
"brain-worker.pid",
|
|
19954
19971
|
"VERSION",
|
|
19955
19972
|
"schemas",
|
|
19956
|
-
"bin"
|
|
19973
|
+
"bin",
|
|
19974
|
+
".install-state",
|
|
19975
|
+
"templates/templates"
|
|
19957
19976
|
];
|
|
19958
19977
|
}
|
|
19959
19978
|
});
|
|
@@ -62582,8 +62601,8 @@ async function injectAgentsHub(ctx) {
|
|
|
62582
62601
|
await writeFile12(globalAgentsMd, stripped, "utf8");
|
|
62583
62602
|
}
|
|
62584
62603
|
}
|
|
62585
|
-
const
|
|
62586
|
-
const action = await inject2(globalAgentsMd,
|
|
62604
|
+
const templateRef = `@${getCleoTemplatesTildePath()}/CLEO-INJECTION.md`;
|
|
62605
|
+
const action = await inject2(globalAgentsMd, templateRef);
|
|
62587
62606
|
ctx.created.push(`~/.agents/AGENTS.md (${action})`);
|
|
62588
62607
|
} else {
|
|
62589
62608
|
ctx.created.push("~/.agents/AGENTS.md (would create/update CAAMP block)");
|