@cleocode/core 2026.3.53 → 2026.3.55

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 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 = "@~/.cleo/templates/CLEO-INJECTION.md";
18842
+ const globalHubContent = `@${getCleoTemplatesTildePath()}/CLEO-INJECTION.md`;
18835
18843
  await mkdir4(globalAgentsDir, { recursive: true });
18836
18844
  await inject2(globalAgentsMd, globalHubContent);
18837
18845
  } catch {
@@ -62593,8 +62601,8 @@ async function injectAgentsHub(ctx) {
62593
62601
  await writeFile12(globalAgentsMd, stripped, "utf8");
62594
62602
  }
62595
62603
  }
62596
- const expectedContent = "@~/.cleo/templates/CLEO-INJECTION.md";
62597
- const action = await inject2(globalAgentsMd, expectedContent);
62604
+ const templateRef = `@${getCleoTemplatesTildePath()}/CLEO-INJECTION.md`;
62605
+ const action = await inject2(globalAgentsMd, templateRef);
62598
62606
  ctx.created.push(`~/.agents/AGENTS.md (${action})`);
62599
62607
  } else {
62600
62608
  ctx.created.push("~/.agents/AGENTS.md (would create/update CAAMP block)");