@cleocode/core 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.
@@ -1 +1 @@
1
- {"version":3,"file":"bootstrap.d.ts","sourceRoot":"","sources":["../src/bootstrap.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAWH,iEAAiE;AACjE,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,uCAAuC;AACvC,MAAM,WAAW,gBAAgB;IAC/B,wCAAwC;IACxC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,0DAA0D;IAC1D,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAID;;;;;;;;GAQG;AACH,wBAAsB,mBAAmB,CAAC,OAAO,CAAC,EAAE,gBAAgB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAiC/F;AAkID;;GAEG;AACH,wBAAsB,qBAAqB,CAAC,GAAG,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAmChF;AAID;;GAEG;AACH,wBAAsB,qBAAqB,CAAC,GAAG,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAahF"}
1
+ {"version":3,"file":"bootstrap.d.ts","sourceRoot":"","sources":["../src/bootstrap.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAWH,iEAAiE;AACjE,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,uCAAuC;AACvC,MAAM,WAAW,gBAAgB;IAC/B,wCAAwC;IACxC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,0DAA0D;IAC1D,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAID;;;;;;;;GAQG;AACH,wBAAsB,mBAAmB,CAAC,OAAO,CAAC,EAAE,gBAAgB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAiC/F;AAiID;;GAEG;AACH,wBAAsB,qBAAqB,CAAC,GAAG,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAmChF;AAID;;GAEG;AACH,wBAAsB,qBAAqB,CAAC,GAAG,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAahF"}
package/dist/index.js CHANGED
@@ -19748,16 +19748,24 @@ async function ensureGlobalHome() {
19748
19748
  for (const subdir of REQUIRED_GLOBAL_SUBDIRS) {
19749
19749
  await mkdir5(join37(cleoHome, subdir), { recursive: true });
19750
19750
  }
19751
- for (const stale of STALE_GLOBAL_ENTRIES) {
19752
- const stalePath = join37(cleoHome, stale);
19753
- if (existsSync33(stalePath)) {
19754
- try {
19755
- await rm2(stalePath, { recursive: true, force: true });
19756
- console.warn(`[CLEO] Removed stale global entry: ${stalePath}`);
19757
- } catch (err) {
19758
- console.warn(
19759
- `[CLEO] Could not remove stale global entry ${stalePath}: ${err instanceof Error ? err.message : String(err)}`
19760
- );
19751
+ const homedir7 = (await import("node:os")).homedir();
19752
+ const legacyCleoHome = join37(homedir7, ".cleo");
19753
+ const cleanupPaths = [cleoHome];
19754
+ if (legacyCleoHome !== cleoHome && existsSync33(legacyCleoHome)) {
19755
+ cleanupPaths.push(legacyCleoHome);
19756
+ }
19757
+ for (const homeDir of cleanupPaths) {
19758
+ for (const stale of STALE_GLOBAL_ENTRIES) {
19759
+ const stalePath = join37(homeDir, stale);
19760
+ if (existsSync33(stalePath)) {
19761
+ try {
19762
+ await rm2(stalePath, { recursive: true, force: true });
19763
+ console.warn(`[CLEO] Removed stale global entry: ${stalePath}`);
19764
+ } catch (err) {
19765
+ console.warn(
19766
+ `[CLEO] Could not remove stale global entry ${stalePath}: ${err instanceof Error ? err.message : String(err)}`
19767
+ );
19768
+ }
19761
19769
  }
19762
19770
  }
19763
19771
  }
@@ -62566,9 +62574,13 @@ async function injectAgentsHub(ctx) {
62566
62574
  await mkdir17(globalAgentsDir, { recursive: true });
62567
62575
  if (existsSync102(globalAgentsMd)) {
62568
62576
  const content = await readFile19(globalAgentsMd, "utf8");
62569
- const stripped = content.replace(/\n?<!-- CLEO:START[^>]*-->[\s\S]*?<!-- CLEO:END -->\n?/g, "").replace(/\n?<!-- CAAMP:START -->[\s\S]*?<!-- CAAMP:END -->\n?/g, "").trim();
62570
- await writeFile12(globalAgentsMd, stripped ? `${stripped}
62571
- ` : "", "utf8");
62577
+ const stripped = content.replace(
62578
+ /\n?<!-- CLEO:START[^>]*-->[\s\S]*?<!-- CLEO:END -->\n?/g,
62579
+ ""
62580
+ );
62581
+ if (stripped !== content) {
62582
+ await writeFile12(globalAgentsMd, stripped, "utf8");
62583
+ }
62572
62584
  }
62573
62585
  const expectedContent = "@~/.cleo/templates/CLEO-INJECTION.md";
62574
62586
  const action = await inject2(globalAgentsMd, expectedContent);