@cleocode/cleo 2026.3.53 → 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 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 = "@~/.cleo/templates/CLEO-INJECTION.md";
34633
+ const globalHubContent = `@${getCleoTemplatesTildePath()}/CLEO-INJECTION.md`;
34626
34634
  await mkdir4(globalAgentsDir, { recursive: true });
34627
34635
  await inject2(globalAgentsMd, globalHubContent);
34628
34636
  } catch {
@@ -65076,8 +65084,8 @@ async function injectAgentsHub(ctx) {
65076
65084
  await writeFile12(globalAgentsMd, stripped, "utf8");
65077
65085
  }
65078
65086
  }
65079
- const expectedContent = "@~/.cleo/templates/CLEO-INJECTION.md";
65080
- const action = await inject2(globalAgentsMd, expectedContent);
65087
+ const templateRef = `@${getCleoTemplatesTildePath()}/CLEO-INJECTION.md`;
65088
+ const action = await inject2(globalAgentsMd, templateRef);
65081
65089
  ctx.created.push(`~/.agents/AGENTS.md (${action})`);
65082
65090
  } else {
65083
65091
  ctx.created.push("~/.agents/AGENTS.md (would create/update CAAMP block)");