@rely-ai/caliber 1.18.6 → 1.18.8
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/bin.js +17 -14
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -5645,13 +5645,14 @@ function getSkillPath(platform, slug) {
|
|
|
5645
5645
|
}
|
|
5646
5646
|
return join9(".claude", "skills", slug, "SKILL.md");
|
|
5647
5647
|
}
|
|
5648
|
-
function
|
|
5648
|
+
function getSkillDir(platform) {
|
|
5649
|
+
if (platform === "cursor") return join9(process.cwd(), ".cursor", "skills");
|
|
5650
|
+
if (platform === "codex") return join9(process.cwd(), ".agents", "skills");
|
|
5651
|
+
return join9(process.cwd(), ".claude", "skills");
|
|
5652
|
+
}
|
|
5653
|
+
function getInstalledSkills(platforms) {
|
|
5649
5654
|
const installed = /* @__PURE__ */ new Set();
|
|
5650
|
-
const dirs =
|
|
5651
|
-
join9(process.cwd(), ".claude", "skills"),
|
|
5652
|
-
join9(process.cwd(), ".cursor", "skills"),
|
|
5653
|
-
join9(process.cwd(), ".agents", "skills")
|
|
5654
|
-
];
|
|
5655
|
+
const dirs = platforms.map(getSkillDir);
|
|
5655
5656
|
for (const dir of dirs) {
|
|
5656
5657
|
try {
|
|
5657
5658
|
const entries = readdirSync4(dir, { withFileTypes: true });
|
|
@@ -5789,7 +5790,7 @@ ${candidateList}`,
|
|
|
5789
5790
|
reason: s.reason || candidates[s.index].reason
|
|
5790
5791
|
}));
|
|
5791
5792
|
}
|
|
5792
|
-
function buildProjectContext(fingerprint) {
|
|
5793
|
+
function buildProjectContext(fingerprint, platforms) {
|
|
5793
5794
|
const parts = [];
|
|
5794
5795
|
if (fingerprint.packageName) parts.push(`Package: ${fingerprint.packageName}`);
|
|
5795
5796
|
if (fingerprint.languages.length > 0) parts.push(`Languages: ${fingerprint.languages.join(", ")}`);
|
|
@@ -5810,7 +5811,7 @@ ${fingerprint.existingConfigs.claudeMd.slice(0, 500)}`);
|
|
|
5810
5811
|
parts.push(`
|
|
5811
5812
|
Dependencies: ${deps.slice(0, 30).join(", ")}`);
|
|
5812
5813
|
}
|
|
5813
|
-
const installed = getInstalledSkills();
|
|
5814
|
+
const installed = getInstalledSkills(platforms);
|
|
5814
5815
|
if (installed.size > 0) {
|
|
5815
5816
|
parts.push(`
|
|
5816
5817
|
Already installed skills: ${Array.from(installed).join(", ")}`);
|
|
@@ -5905,12 +5906,14 @@ async function recommendCommand() {
|
|
|
5905
5906
|
console.log(chalk8.dim(" Cancelled.\n"));
|
|
5906
5907
|
return;
|
|
5907
5908
|
}
|
|
5908
|
-
|
|
5909
|
+
const state = readState();
|
|
5910
|
+
const platforms = state?.targetAgent ?? void 0;
|
|
5911
|
+
await searchAndInstallSkills(platforms);
|
|
5909
5912
|
}
|
|
5910
|
-
async function searchAndInstallSkills() {
|
|
5913
|
+
async function searchAndInstallSkills(targetPlatforms) {
|
|
5911
5914
|
const fingerprint = await collectFingerprint(process.cwd());
|
|
5912
|
-
const platforms = detectLocalPlatforms();
|
|
5913
|
-
const installedSkills = getInstalledSkills();
|
|
5915
|
+
const platforms = targetPlatforms ?? detectLocalPlatforms();
|
|
5916
|
+
const installedSkills = getInstalledSkills(platforms);
|
|
5914
5917
|
const technologies = [...new Set([
|
|
5915
5918
|
...fingerprint.languages,
|
|
5916
5919
|
...fingerprint.frameworks,
|
|
@@ -5941,7 +5944,7 @@ async function searchAndInstallSkills() {
|
|
|
5941
5944
|
if (config) {
|
|
5942
5945
|
const scoreSpinner = ora("Scoring relevance for your project...").start();
|
|
5943
5946
|
try {
|
|
5944
|
-
const projectContext = buildProjectContext(fingerprint);
|
|
5947
|
+
const projectContext = buildProjectContext(fingerprint, platforms);
|
|
5945
5948
|
results = await scoreWithLLM(newCandidates, projectContext, technologies);
|
|
5946
5949
|
if (results.length === 0) {
|
|
5947
5950
|
scoreSpinner.succeed("No highly relevant skills found for your specific project.");
|
|
@@ -6697,7 +6700,7 @@ ${agentRefs.join(" ")}
|
|
|
6697
6700
|
if (wantsSkills) {
|
|
6698
6701
|
trackInitSkillsSearch(true, 0);
|
|
6699
6702
|
try {
|
|
6700
|
-
await searchAndInstallSkills();
|
|
6703
|
+
await searchAndInstallSkills(targetAgent);
|
|
6701
6704
|
} catch (err) {
|
|
6702
6705
|
if (err.message !== "__exit__") {
|
|
6703
6706
|
console.log(chalk9.dim(" Skills search failed: " + (err.message || "unknown error")));
|
package/package.json
CHANGED