@rely-ai/caliber 1.20.0-dev.1773695578 → 1.20.0-dev.1773696449
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 +23 -2
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -2857,7 +2857,7 @@ Return the complete updated AgentSetup JSON incorporating the user's changes. Re
|
|
|
2857
2857
|
system: REFINE_SYSTEM_PROMPT,
|
|
2858
2858
|
prompt,
|
|
2859
2859
|
messages: conversationHistory,
|
|
2860
|
-
maxTokens:
|
|
2860
|
+
maxTokens: 16e3
|
|
2861
2861
|
},
|
|
2862
2862
|
{
|
|
2863
2863
|
onText: (text) => {
|
|
@@ -6577,7 +6577,7 @@ async function scoreAndRefine(setup, dir, sessionHistory, callbacks) {
|
|
|
6577
6577
|
callbacks.onStatus(`Fixing ${issues.length} scoring issue${issues.length === 1 ? "" : "s"}: ${issueNames}...`);
|
|
6578
6578
|
}
|
|
6579
6579
|
const feedbackMessage = buildFeedbackMessage(issues);
|
|
6580
|
-
const refined = await
|
|
6580
|
+
const refined = await refineSetupFast(currentSetup, feedbackMessage);
|
|
6581
6581
|
if (!refined) {
|
|
6582
6582
|
if (callbacks?.onStatus) callbacks.onStatus("Refinement failed, keeping current setup");
|
|
6583
6583
|
return bestSetup;
|
|
@@ -6596,6 +6596,27 @@ async function scoreAndRefine(setup, dir, sessionHistory, callbacks) {
|
|
|
6596
6596
|
}
|
|
6597
6597
|
return bestSetup;
|
|
6598
6598
|
}
|
|
6599
|
+
async function refineSetupFast(setup, feedbackMessage) {
|
|
6600
|
+
const prompt = `Current setup:
|
|
6601
|
+
${JSON.stringify(setup, null, 2)}
|
|
6602
|
+
|
|
6603
|
+
${feedbackMessage}
|
|
6604
|
+
|
|
6605
|
+
Return the complete updated AgentSetup JSON with only these fixes applied. Respond with ONLY the JSON.`;
|
|
6606
|
+
try {
|
|
6607
|
+
const raw = await llmCall({
|
|
6608
|
+
system: "You fix scoring issues in AI agent configuration files. Return only the corrected JSON \u2014 no explanations, no code fences.",
|
|
6609
|
+
prompt,
|
|
6610
|
+
maxTokens: 16e3
|
|
6611
|
+
});
|
|
6612
|
+
const cleaned = stripMarkdownFences(raw);
|
|
6613
|
+
const jsonStart = cleaned.indexOf("{");
|
|
6614
|
+
const jsonToParse = jsonStart !== -1 ? cleaned.slice(jsonStart) : cleaned;
|
|
6615
|
+
return JSON.parse(jsonToParse);
|
|
6616
|
+
} catch {
|
|
6617
|
+
return null;
|
|
6618
|
+
}
|
|
6619
|
+
}
|
|
6599
6620
|
async function runScoreRefineWithSpinner(setup, dir, sessionHistory) {
|
|
6600
6621
|
const spinner = ora2("Validating setup against scoring criteria...").start();
|
|
6601
6622
|
try {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rely-ai/caliber",
|
|
3
|
-
"version": "1.20.0-dev.
|
|
3
|
+
"version": "1.20.0-dev.1773696449",
|
|
4
4
|
"description": "Analyze your codebase and generate optimized AI agent configs (CLAUDE.md, .cursorrules, skills) — no API key needed",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|