@cleocode/caamp 2026.9.21 → 2026.9.23
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/{chunk-UYVHBBJE.js → chunk-3OL6CAMT.js} +56 -8
- package/dist/chunk-3OL6CAMT.js.map +1 -0
- package/dist/cli.js +1 -1
- package/dist/index.d.ts +40 -4
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/package.json +7 -7
- package/dist/chunk-UYVHBBJE.js.map +0 -1
|
@@ -2574,15 +2574,52 @@ function loadLibraryFromModule(root) {
|
|
|
2574
2574
|
}
|
|
2575
2575
|
return mod;
|
|
2576
2576
|
}
|
|
2577
|
+
var CATALOG_CATEGORIES = /* @__PURE__ */ new Set([
|
|
2578
|
+
"core",
|
|
2579
|
+
"recommended",
|
|
2580
|
+
"specialist",
|
|
2581
|
+
"composition",
|
|
2582
|
+
"meta"
|
|
2583
|
+
]);
|
|
2584
|
+
function catalogEntryFromManifest(skill) {
|
|
2585
|
+
const path = skill.path.endsWith("SKILL.md") ? skill.path : `${skill.path}/SKILL.md`;
|
|
2586
|
+
const category = skill.category !== void 0 && CATALOG_CATEGORIES.has(skill.category) ? skill.category : "recommended";
|
|
2587
|
+
return {
|
|
2588
|
+
name: skill.name,
|
|
2589
|
+
description: skill.description,
|
|
2590
|
+
version: skill.version,
|
|
2591
|
+
path,
|
|
2592
|
+
references: skill.references ?? [],
|
|
2593
|
+
core: skill.core ?? skill.deliveryTier === "core",
|
|
2594
|
+
category,
|
|
2595
|
+
tier: skill.tier,
|
|
2596
|
+
protocol: skill.protocol ?? null,
|
|
2597
|
+
dependencies: skill.dependencies ?? [],
|
|
2598
|
+
sharedResources: skill.sharedResources ?? [],
|
|
2599
|
+
compatibility: skill.compatibility ?? [],
|
|
2600
|
+
license: skill.license ?? "MIT",
|
|
2601
|
+
metadata: {
|
|
2602
|
+
...skill.deliveryTier !== void 0 && { deliveryTier: skill.deliveryTier },
|
|
2603
|
+
...skill.install !== void 0 && { install: skill.install }
|
|
2604
|
+
}
|
|
2605
|
+
};
|
|
2606
|
+
}
|
|
2607
|
+
function readPackageVersion(root) {
|
|
2608
|
+
const pkgPath = join5(root, "package.json");
|
|
2609
|
+
if (!existsSync4(pkgPath)) return "0.0.0";
|
|
2610
|
+
try {
|
|
2611
|
+
const pkg = JSON.parse(readFileSync(pkgPath, "utf-8"));
|
|
2612
|
+
return pkg.version ?? "0.0.0";
|
|
2613
|
+
} catch {
|
|
2614
|
+
return "0.0.0";
|
|
2615
|
+
}
|
|
2616
|
+
}
|
|
2577
2617
|
function buildLibraryFromFiles(root) {
|
|
2578
2618
|
const catalogPath = join5(root, "skills.json");
|
|
2579
|
-
if (!existsSync4(catalogPath)) {
|
|
2580
|
-
throw new Error(`No skills.json found at ${root}`);
|
|
2581
|
-
}
|
|
2582
|
-
const catalogData = JSON.parse(readFileSync(catalogPath, "utf-8"));
|
|
2583
|
-
const entries = catalogData.skills ?? [];
|
|
2584
|
-
const version = catalogData.version ?? "0.0.0";
|
|
2585
2619
|
const manifestPath = join5(root, "skills", "manifest.json");
|
|
2620
|
+
if (!existsSync4(catalogPath) && !existsSync4(manifestPath)) {
|
|
2621
|
+
throw new Error(`No skills.json or skills/manifest.json found at ${root}`);
|
|
2622
|
+
}
|
|
2586
2623
|
let manifest;
|
|
2587
2624
|
if (existsSync4(manifestPath)) {
|
|
2588
2625
|
manifest = JSON.parse(readFileSync(manifestPath, "utf-8"));
|
|
@@ -2594,6 +2631,16 @@ function buildLibraryFromFiles(root) {
|
|
|
2594
2631
|
skills: []
|
|
2595
2632
|
};
|
|
2596
2633
|
}
|
|
2634
|
+
let entries;
|
|
2635
|
+
let version;
|
|
2636
|
+
if (existsSync4(catalogPath)) {
|
|
2637
|
+
const catalogData = JSON.parse(readFileSync(catalogPath, "utf-8"));
|
|
2638
|
+
entries = catalogData.skills ?? [];
|
|
2639
|
+
version = catalogData.version ?? "0.0.0";
|
|
2640
|
+
} else {
|
|
2641
|
+
entries = manifest.skills.map(catalogEntryFromManifest);
|
|
2642
|
+
version = readPackageVersion(root);
|
|
2643
|
+
}
|
|
2597
2644
|
const profilesDir = join5(root, "profiles");
|
|
2598
2645
|
const profiles = /* @__PURE__ */ new Map();
|
|
2599
2646
|
if (existsSync4(profilesDir)) {
|
|
@@ -2826,7 +2873,7 @@ function discoverLibrary() {
|
|
|
2826
2873
|
if (existsSync5(indexPath)) {
|
|
2827
2874
|
return loadLibraryFromModule(envPath);
|
|
2828
2875
|
}
|
|
2829
|
-
if (existsSync5(join6(envPath, "skills.json"))) {
|
|
2876
|
+
if (existsSync5(join6(envPath, "skills.json")) || existsSync5(join6(envPath, "skills", "manifest.json"))) {
|
|
2830
2877
|
return buildLibraryFromFiles(envPath);
|
|
2831
2878
|
}
|
|
2832
2879
|
} catch {
|
|
@@ -5380,6 +5427,7 @@ export {
|
|
|
5380
5427
|
parseSource,
|
|
5381
5428
|
isMarketplaceScoped,
|
|
5382
5429
|
loadLibraryFromModule,
|
|
5430
|
+
catalogEntryFromManifest,
|
|
5383
5431
|
buildLibraryFromFiles,
|
|
5384
5432
|
registerSkillLibrary,
|
|
5385
5433
|
registerSkillLibraryFromPath,
|
|
@@ -5436,4 +5484,4 @@ export {
|
|
|
5436
5484
|
recommendSkills2 as recommendSkills,
|
|
5437
5485
|
validateSkill
|
|
5438
5486
|
};
|
|
5439
|
-
//# sourceMappingURL=chunk-
|
|
5487
|
+
//# sourceMappingURL=chunk-3OL6CAMT.js.map
|