@cleocode/core 2026.3.46 → 2026.3.47
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/bootstrap.d.ts.map +1 -1
- package/dist/index.js +33 -5
- package/dist/index.js.map +3 -3
- package/dist/scaffold.d.ts +19 -0
- package/dist/scaffold.d.ts.map +1 -1
- package/package.json +5 -5
- package/src/__tests__/injection-chain.test.d.ts +4 -3
- package/src/__tests__/injection-chain.test.d.ts.map +1 -1
- package/src/__tests__/injection-chain.test.js +11 -10
- package/src/__tests__/injection-chain.test.js.map +1 -1
- package/src/__tests__/injection-mvi-tiers.test.js +4 -2
- package/src/__tests__/injection-mvi-tiers.test.js.map +1 -1
- package/src/bootstrap.ts +34 -5
- package/src/scaffold.ts +52 -2
- package/src/sessions/__tests__/briefing.test.js +28 -2
- package/src/sessions/__tests__/briefing.test.js.map +1 -1
- package/src/skills/__tests__/routing-table.test.js +48 -31
- package/src/skills/__tests__/routing-table.test.js.map +1 -1
- package/src/skills/orchestrator/__tests__/spawn-tier.test.js +41 -32
- package/src/skills/orchestrator/__tests__/spawn-tier.test.js.map +1 -1
- package/src/store/__tests__/project-detect.test.js +1 -1
- package/src/store/__tests__/project-detect.test.js.map +1 -1
- package/src/store/__tests__/test-db-helper.d.ts.map +1 -1
- package/src/store/__tests__/test-db-helper.js +0 -1
- package/src/store/__tests__/test-db-helper.js.map +1 -1
package/dist/bootstrap.d.ts.map
CHANGED
|
@@ -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,
|
|
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,CA0B/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
|
@@ -19013,6 +19013,7 @@ __export(scaffold_exports, {
|
|
|
19013
19013
|
CLEO_GITIGNORE_FALLBACK: () => CLEO_GITIGNORE_FALLBACK,
|
|
19014
19014
|
REQUIRED_CLEO_SUBDIRS: () => REQUIRED_CLEO_SUBDIRS,
|
|
19015
19015
|
REQUIRED_GLOBAL_SUBDIRS: () => REQUIRED_GLOBAL_SUBDIRS,
|
|
19016
|
+
STALE_GLOBAL_ENTRIES: () => STALE_GLOBAL_ENTRIES,
|
|
19016
19017
|
checkBrainDb: () => checkBrainDb,
|
|
19017
19018
|
checkCleoGitRepo: () => checkCleoGitRepo,
|
|
19018
19019
|
checkCleoStructure: () => checkCleoStructure,
|
|
@@ -19049,7 +19050,7 @@ __export(scaffold_exports, {
|
|
|
19049
19050
|
import { execFile as execFile3 } from "node:child_process";
|
|
19050
19051
|
import { randomUUID } from "node:crypto";
|
|
19051
19052
|
import { existsSync as existsSync33, constants as fsConstants3, readFileSync as readFileSync22, statSync as statSync8 } from "node:fs";
|
|
19052
|
-
import { access as access3, mkdir as mkdir5, readFile as readFile6, writeFile as writeFile5 } from "node:fs/promises";
|
|
19053
|
+
import { access as access3, mkdir as mkdir5, readFile as readFile6, rm as rm2, writeFile as writeFile5 } from "node:fs/promises";
|
|
19053
19054
|
import { dirname as dirname8, join as join37, resolve as resolve5 } from "node:path";
|
|
19054
19055
|
import { fileURLToPath as fileURLToPath4 } from "node:url";
|
|
19055
19056
|
import { promisify as promisify3 } from "node:util";
|
|
@@ -19064,7 +19065,7 @@ async function fileExists(path2) {
|
|
|
19064
19065
|
async function stripCLEOBlocks(filePath) {
|
|
19065
19066
|
if (!existsSync33(filePath)) return;
|
|
19066
19067
|
const content = await readFile6(filePath, "utf8");
|
|
19067
|
-
const stripped = content.replace(/\n?<!-- CLEO:START
|
|
19068
|
+
const stripped = content.replace(/\n?<!-- CLEO:START[^>]*-->[\s\S]*?<!-- CLEO:END -->\n?/g, "");
|
|
19068
19069
|
if (stripped !== content) await writeFile5(filePath, stripped, "utf8");
|
|
19069
19070
|
}
|
|
19070
19071
|
async function removeCleoFromRootGitignore(projectRoot) {
|
|
@@ -19747,6 +19748,19 @@ async function ensureGlobalHome() {
|
|
|
19747
19748
|
for (const subdir of REQUIRED_GLOBAL_SUBDIRS) {
|
|
19748
19749
|
await mkdir5(join37(cleoHome, subdir), { recursive: true });
|
|
19749
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
|
+
);
|
|
19761
|
+
}
|
|
19762
|
+
}
|
|
19763
|
+
}
|
|
19750
19764
|
return {
|
|
19751
19765
|
action: alreadyExists ? "skipped" : "created",
|
|
19752
19766
|
path: cleoHome,
|
|
@@ -19861,7 +19875,7 @@ function checkLogDir(projectRoot) {
|
|
|
19861
19875
|
fix: null
|
|
19862
19876
|
};
|
|
19863
19877
|
}
|
|
19864
|
-
var execFileAsync3, REQUIRED_CLEO_SUBDIRS, CLEO_GITIGNORE_FALLBACK, REQUIRED_GLOBAL_SUBDIRS;
|
|
19878
|
+
var execFileAsync3, REQUIRED_CLEO_SUBDIRS, CLEO_GITIGNORE_FALLBACK, REQUIRED_GLOBAL_SUBDIRS, STALE_GLOBAL_ENTRIES;
|
|
19865
19879
|
var init_scaffold = __esm({
|
|
19866
19880
|
"packages/core/src/scaffold.ts"() {
|
|
19867
19881
|
"use strict";
|
|
@@ -19919,6 +19933,20 @@ metrics/
|
|
|
19919
19933
|
backups/
|
|
19920
19934
|
`;
|
|
19921
19935
|
REQUIRED_GLOBAL_SUBDIRS = ["logs", "templates"];
|
|
19936
|
+
STALE_GLOBAL_ENTRIES = [
|
|
19937
|
+
"adrs",
|
|
19938
|
+
"rcasd",
|
|
19939
|
+
"agent-outputs",
|
|
19940
|
+
"backups",
|
|
19941
|
+
"sandbox",
|
|
19942
|
+
"tasks.db",
|
|
19943
|
+
"tasks.db-shm",
|
|
19944
|
+
"tasks.db-wal",
|
|
19945
|
+
"brain-worker.pid",
|
|
19946
|
+
"VERSION",
|
|
19947
|
+
"schemas",
|
|
19948
|
+
"bin"
|
|
19949
|
+
];
|
|
19922
19950
|
}
|
|
19923
19951
|
});
|
|
19924
19952
|
|
|
@@ -41462,8 +41490,8 @@ function parseTokenMetrics(inputFile, cwd) {
|
|
|
41462
41490
|
const raw = JSON.parse(readFileSync28(file2, "utf-8"));
|
|
41463
41491
|
if (raw.resourceMetrics) {
|
|
41464
41492
|
const points = [];
|
|
41465
|
-
for (const
|
|
41466
|
-
for (const sm of
|
|
41493
|
+
for (const rm3 of raw.resourceMetrics ?? []) {
|
|
41494
|
+
for (const sm of rm3.scopeMetrics ?? []) {
|
|
41467
41495
|
for (const metric of sm.metrics ?? []) {
|
|
41468
41496
|
if (metric.name !== "claude_code.token.usage") continue;
|
|
41469
41497
|
for (const dp of metric.sum?.dataPoints ?? []) {
|