@rely-ai/caliber 1.12.3 → 1.12.4
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 +38 -44
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -6031,6 +6031,43 @@ async function initCommand(options) {
|
|
|
6031
6031
|
if (rawOutput) report.addCodeBlock("Generation: Raw LLM Response", rawOutput);
|
|
6032
6032
|
report.addJson("Generation: Parsed Setup", generatedSetup);
|
|
6033
6033
|
}
|
|
6034
|
+
{
|
|
6035
|
+
const preWriteResult = writeSetup(generatedSetup);
|
|
6036
|
+
const inlineScore = computeLocalScore(process.cwd(), targetAgent);
|
|
6037
|
+
if (inlineScore.score < 100) {
|
|
6038
|
+
const inlineFailingChecks = inlineScore.checks.filter((c) => !c.passed && c.maxPoints > 0).filter((c) => !NON_LLM_CHECKS.has(c.id));
|
|
6039
|
+
if (inlineFailingChecks.length > 0) {
|
|
6040
|
+
genSpinner.text = "Polishing generated setup...";
|
|
6041
|
+
log(options.verbose, `Inline polish: score ${inlineScore.score}/100, fixing ${inlineFailingChecks.length} checks`);
|
|
6042
|
+
try {
|
|
6043
|
+
const polishResult = await generateSetup(
|
|
6044
|
+
fingerprint,
|
|
6045
|
+
targetAgent,
|
|
6046
|
+
void 0,
|
|
6047
|
+
{ onStatus: () => {
|
|
6048
|
+
}, onComplete: () => {
|
|
6049
|
+
}, onError: () => {
|
|
6050
|
+
} },
|
|
6051
|
+
inlineFailingChecks.map((c) => ({ name: c.name, suggestion: c.suggestion })),
|
|
6052
|
+
inlineScore.score,
|
|
6053
|
+
inlineScore.checks.filter((c) => c.passed).map((c) => ({ name: c.name })),
|
|
6054
|
+
{ skipSkills: true, forceTargetedFix: true }
|
|
6055
|
+
);
|
|
6056
|
+
if (polishResult.setup) {
|
|
6057
|
+
generatedSetup = polishResult.setup;
|
|
6058
|
+
writeSetup(generatedSetup);
|
|
6059
|
+
log(options.verbose, "Inline polish applied");
|
|
6060
|
+
}
|
|
6061
|
+
} catch {
|
|
6062
|
+
log(options.verbose, "Inline polish failed, continuing with original");
|
|
6063
|
+
}
|
|
6064
|
+
}
|
|
6065
|
+
}
|
|
6066
|
+
try {
|
|
6067
|
+
undoSetup();
|
|
6068
|
+
} catch {
|
|
6069
|
+
}
|
|
6070
|
+
}
|
|
6034
6071
|
const elapsedMs = Date.now() - genStartTime;
|
|
6035
6072
|
trackInitGenerationCompleted(elapsedMs, 0);
|
|
6036
6073
|
const mins = Math.floor(elapsedMs / 6e4);
|
|
@@ -6174,50 +6211,7 @@ async function initCommand(options) {
|
|
|
6174
6211
|
if (hookChoice === "skip") {
|
|
6175
6212
|
console.log(chalk8.dim(" Skipped auto-refresh hooks. Run ") + chalk8.hex("#83D1EB")("caliber hooks --install") + chalk8.dim(" later to enable."));
|
|
6176
6213
|
}
|
|
6177
|
-
|
|
6178
|
-
if (afterScore.score < 100) {
|
|
6179
|
-
const polishFailingChecks = afterScore.checks.filter((c) => !c.passed && c.maxPoints > 0).filter((c) => !NON_LLM_CHECKS.has(c.id));
|
|
6180
|
-
if (polishFailingChecks.length > 0) {
|
|
6181
|
-
console.log("");
|
|
6182
|
-
console.log(chalk8.dim(` Score: ${afterScore.score}/100 \u2014 polishing ${polishFailingChecks.length} remaining check${polishFailingChecks.length === 1 ? "" : "s"}...`));
|
|
6183
|
-
if (options.verbose) {
|
|
6184
|
-
for (const c of polishFailingChecks) {
|
|
6185
|
-
log(options.verbose, ` Polish target: ${c.name}${c.suggestion ? ` \u2014 ${c.suggestion}` : ""}`);
|
|
6186
|
-
}
|
|
6187
|
-
}
|
|
6188
|
-
const polishFailing = polishFailingChecks.map((c) => ({
|
|
6189
|
-
name: c.name,
|
|
6190
|
-
suggestion: c.suggestion
|
|
6191
|
-
}));
|
|
6192
|
-
const polishPassing = afterScore.checks.filter((c) => c.passed).map((c) => ({ name: c.name }));
|
|
6193
|
-
try {
|
|
6194
|
-
const polishResult = await generateSetup(
|
|
6195
|
-
fingerprint,
|
|
6196
|
-
targetAgent,
|
|
6197
|
-
void 0,
|
|
6198
|
-
{
|
|
6199
|
-
onStatus: () => {
|
|
6200
|
-
},
|
|
6201
|
-
onComplete: () => {
|
|
6202
|
-
},
|
|
6203
|
-
onError: () => {
|
|
6204
|
-
}
|
|
6205
|
-
},
|
|
6206
|
-
polishFailing,
|
|
6207
|
-
afterScore.score,
|
|
6208
|
-
polishPassing,
|
|
6209
|
-
{ skipSkills: true, forceTargetedFix: true }
|
|
6210
|
-
);
|
|
6211
|
-
if (polishResult.setup) {
|
|
6212
|
-
const polishWriteResult = writeSetup(polishResult.setup);
|
|
6213
|
-
if (polishWriteResult.written.length > 0) {
|
|
6214
|
-
afterScore = computeLocalScore(process.cwd(), targetAgent);
|
|
6215
|
-
}
|
|
6216
|
-
}
|
|
6217
|
-
} catch {
|
|
6218
|
-
}
|
|
6219
|
-
}
|
|
6220
|
-
}
|
|
6214
|
+
const afterScore = computeLocalScore(process.cwd(), targetAgent);
|
|
6221
6215
|
if (afterScore.score < baselineScore.score) {
|
|
6222
6216
|
trackInitScoreRegression(baselineScore.score, afterScore.score);
|
|
6223
6217
|
console.log("");
|
package/package.json
CHANGED