@cleocode/core 2026.3.47 → 2026.3.49
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 +19 -37
- package/dist/index.js.map +3 -3
- package/dist/init.d.ts +1 -3
- package/dist/init.d.ts.map +1 -1
- package/dist/project-info.d.ts +5 -0
- package/dist/project-info.d.ts.map +1 -1
- package/dist/upgrade.d.ts +6 -0
- package/dist/upgrade.d.ts.map +1 -1
- package/package.json +5 -5
- package/src/__tests__/injection-chain.test.ts +3 -2
- package/src/bootstrap.ts +18 -9
- package/src/init.ts +12 -12
- package/src/injection.ts +6 -6
- package/src/project-info.ts +16 -1
- package/src/upgrade.ts +49 -2
- package/src/validation/doctor/checks.ts +4 -4
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,CAkC/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"}
|
package/dist/index.js
CHANGED
|
@@ -18900,7 +18900,7 @@ function checkInjection2(projectRoot) {
|
|
|
18900
18900
|
status: "warning",
|
|
18901
18901
|
message: "AGENTS.md not found in project root",
|
|
18902
18902
|
details: { path: agentsMdPath, exists: false },
|
|
18903
|
-
fix: "cleo
|
|
18903
|
+
fix: "cleo upgrade"
|
|
18904
18904
|
};
|
|
18905
18905
|
}
|
|
18906
18906
|
let content;
|
|
@@ -18925,7 +18925,7 @@ function checkInjection2(projectRoot) {
|
|
|
18925
18925
|
status: "warning",
|
|
18926
18926
|
message: "AGENTS.md exists but has no CAAMP markers",
|
|
18927
18927
|
details: { path: agentsMdPath, hasCaampMarker: false },
|
|
18928
|
-
fix: "cleo
|
|
18928
|
+
fix: "cleo upgrade"
|
|
18929
18929
|
};
|
|
18930
18930
|
}
|
|
18931
18931
|
if (startCount !== endCount) {
|
|
@@ -18935,7 +18935,7 @@ function checkInjection2(projectRoot) {
|
|
|
18935
18935
|
status: "warning",
|
|
18936
18936
|
message: `CAAMP markers unbalanced: ${startCount} START vs ${endCount} END`,
|
|
18937
18937
|
details: { path: agentsMdPath, startCount, endCount },
|
|
18938
|
-
fix: "cleo
|
|
18938
|
+
fix: "cleo upgrade"
|
|
18939
18939
|
};
|
|
18940
18940
|
}
|
|
18941
18941
|
const caampMatch = content.match(/<!-- CAAMP:START -->([\s\S]*?)<!-- CAAMP:END -->/);
|
|
@@ -18957,7 +18957,7 @@ function checkInjection2(projectRoot) {
|
|
|
18957
18957
|
status: "warning",
|
|
18958
18958
|
message: `Missing @ reference targets: ${missing.join(", ")}`,
|
|
18959
18959
|
details: { path: agentsMdPath, missing, totalRefs: refs.length },
|
|
18960
|
-
fix: "cleo
|
|
18960
|
+
fix: "cleo upgrade"
|
|
18961
18961
|
};
|
|
18962
18962
|
}
|
|
18963
18963
|
}
|
|
@@ -18974,7 +18974,7 @@ function checkInjection2(projectRoot) {
|
|
|
18974
18974
|
status: "warning",
|
|
18975
18975
|
message: `CLAUDE.md CAAMP markers unbalanced: ${cStartCount} START vs ${cEndCount} END`,
|
|
18976
18976
|
details: { file: "CLAUDE.md", startCount: cStartCount, endCount: cEndCount },
|
|
18977
|
-
fix: "cleo
|
|
18977
|
+
fix: "cleo upgrade"
|
|
18978
18978
|
};
|
|
18979
18979
|
}
|
|
18980
18980
|
if (cStartCount === 0) {
|
|
@@ -18984,7 +18984,7 @@ function checkInjection2(projectRoot) {
|
|
|
18984
18984
|
status: "warning",
|
|
18985
18985
|
message: "CLAUDE.md has no CAAMP markers",
|
|
18986
18986
|
details: { file: "CLAUDE.md", hasCaampMarker: false },
|
|
18987
|
-
fix: "cleo
|
|
18987
|
+
fix: "cleo upgrade"
|
|
18988
18988
|
};
|
|
18989
18989
|
}
|
|
18990
18990
|
} catch {
|
|
@@ -55933,7 +55933,7 @@ function checkAgentsMdHub(projectRoot) {
|
|
|
55933
55933
|
status: "warning",
|
|
55934
55934
|
message: "AGENTS.md not found in project root",
|
|
55935
55935
|
details: { path: agentsMdPath, exists: false },
|
|
55936
|
-
fix: "cleo
|
|
55936
|
+
fix: "cleo upgrade"
|
|
55937
55937
|
};
|
|
55938
55938
|
}
|
|
55939
55939
|
let content;
|
|
@@ -55956,7 +55956,7 @@ function checkAgentsMdHub(projectRoot) {
|
|
|
55956
55956
|
status: "warning",
|
|
55957
55957
|
message: "AGENTS.md exists but has no CAAMP:START marker",
|
|
55958
55958
|
details: { path: agentsMdPath, hasCaampMarker: false },
|
|
55959
|
-
fix: "cleo
|
|
55959
|
+
fix: "cleo upgrade"
|
|
55960
55960
|
};
|
|
55961
55961
|
}
|
|
55962
55962
|
return {
|
|
@@ -56295,7 +56295,7 @@ function checkCaampMarkerIntegrity(projectRoot) {
|
|
|
56295
56295
|
status: "warning",
|
|
56296
56296
|
message: `CAAMP marker issues: ${issues.join("; ")}`,
|
|
56297
56297
|
details: { issues },
|
|
56298
|
-
fix: "cleo
|
|
56298
|
+
fix: "cleo upgrade"
|
|
56299
56299
|
};
|
|
56300
56300
|
}
|
|
56301
56301
|
return {
|
|
@@ -56361,7 +56361,7 @@ function checkAtReferenceTargetExists(projectRoot) {
|
|
|
56361
56361
|
status: "warning",
|
|
56362
56362
|
message: `Missing @ reference targets: ${missing.join(", ")}`,
|
|
56363
56363
|
details: { missing, totalRefs: refs.length },
|
|
56364
|
-
fix: "cleo
|
|
56364
|
+
fix: "cleo upgrade"
|
|
56365
56365
|
};
|
|
56366
56366
|
}
|
|
56367
56367
|
return {
|
|
@@ -61858,7 +61858,14 @@ async function initAgentDefinition(created, warnings) {
|
|
|
61858
61858
|
try {
|
|
61859
61859
|
try {
|
|
61860
61860
|
const stat2 = await lstat(globalAgentsDir);
|
|
61861
|
-
if (stat2.isSymbolicLink()
|
|
61861
|
+
if (stat2.isSymbolicLink()) {
|
|
61862
|
+
const { readlink } = await import("node:fs/promises");
|
|
61863
|
+
const currentTarget = await readlink(globalAgentsDir);
|
|
61864
|
+
if (currentTarget === agentSourceDir) {
|
|
61865
|
+
return;
|
|
61866
|
+
}
|
|
61867
|
+
await unlink4(globalAgentsDir);
|
|
61868
|
+
} else if (stat2.isDirectory()) {
|
|
61862
61869
|
return;
|
|
61863
61870
|
}
|
|
61864
61871
|
} catch {
|
|
@@ -61942,32 +61949,7 @@ async function installGitHubTemplates(projectRoot, created, skipped) {
|
|
|
61942
61949
|
}
|
|
61943
61950
|
}
|
|
61944
61951
|
}
|
|
61945
|
-
async function updateDocs() {
|
|
61946
|
-
const cleoDir = getCleoDirAbsolute();
|
|
61947
|
-
const projRoot = getProjectRoot();
|
|
61948
|
-
const created = [];
|
|
61949
|
-
const warnings = [];
|
|
61950
|
-
try {
|
|
61951
|
-
const result = await ensureInjection(projRoot);
|
|
61952
|
-
if (result.action !== "skipped") {
|
|
61953
|
-
created.push(`injection: ${result.details ?? result.action}`);
|
|
61954
|
-
}
|
|
61955
|
-
} catch (err) {
|
|
61956
|
-
warnings.push(`CAAMP injection: ${err instanceof Error ? err.message : String(err)}`);
|
|
61957
|
-
}
|
|
61958
|
-
return {
|
|
61959
|
-
initialized: true,
|
|
61960
|
-
directory: cleoDir,
|
|
61961
|
-
created,
|
|
61962
|
-
skipped: [],
|
|
61963
|
-
warnings,
|
|
61964
|
-
updateDocsOnly: true
|
|
61965
|
-
};
|
|
61966
|
-
}
|
|
61967
61952
|
async function initProject(opts = {}) {
|
|
61968
|
-
if (opts.updateDocs) {
|
|
61969
|
-
return updateDocs();
|
|
61970
|
-
}
|
|
61971
61953
|
const cleoDir = getCleoDirAbsolute();
|
|
61972
61954
|
const projRoot = getProjectRoot();
|
|
61973
61955
|
const alreadyInitialized = existsSync99(cleoDir) && (existsSync99(join100(cleoDir, "tasks.db")) || existsSync99(join100(cleoDir, "config.json")));
|
|
@@ -62315,7 +62297,7 @@ init_paths();
|
|
|
62315
62297
|
|
|
62316
62298
|
// packages/core/src/project-info.ts
|
|
62317
62299
|
init_paths();
|
|
62318
|
-
import { existsSync as existsSync101, readFileSync as readFileSync75 } from "node:fs";
|
|
62300
|
+
import { existsSync as existsSync101, readFileSync as readFileSync75, writeFileSync as writeFileSync19 } from "node:fs";
|
|
62319
62301
|
import { readFile as readFile18 } from "node:fs/promises";
|
|
62320
62302
|
import { join as join102 } from "node:path";
|
|
62321
62303
|
async function getProjectInfo(cwd) {
|