@odla-ai/harness 0.11.14 → 0.11.16
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-ZXUN2STV.js → chunk-BOYUPB3P.js} +26 -4
- package/dist/chunk-BOYUPB3P.js.map +1 -0
- package/dist/code-runtime-cli.cjs +25 -3
- package/dist/code-runtime-cli.cjs.map +1 -1
- package/dist/code-runtime-cli.js +1 -1
- package/dist/node.cjs +25 -3
- package/dist/node.cjs.map +1 -1
- package/dist/node.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-ZXUN2STV.js.map +0 -1
|
@@ -1371,6 +1371,14 @@ function describeReview(review) {
|
|
|
1371
1371
|
const head = review.verdict === "approved" ? `Clean verification and independent review passed (score ${review.score}/100).` : `Clean verification passed; independent review REJECTED this candidate (score ${review.score}/100). Address the findings and checkpoint again.`;
|
|
1372
1372
|
return [head, review.summary, findings].filter(Boolean).join("\n").slice(0, 4e3);
|
|
1373
1373
|
}
|
|
1374
|
+
function gateOutput(output) {
|
|
1375
|
+
const plain = output.replace(GATE_ANSI, "");
|
|
1376
|
+
if (plain.length <= 1500) return plain;
|
|
1377
|
+
return `${plain.slice(0, 300)}
|
|
1378
|
+
\u2026 [${plain.length - 1500} characters omitted] \u2026
|
|
1379
|
+
${plain.slice(-1200)}`;
|
|
1380
|
+
}
|
|
1381
|
+
var GATE_ANSI = /\u001b\[[0-9;?]*[A-Za-z]/g;
|
|
1374
1382
|
function describeGateFailure(evidence) {
|
|
1375
1383
|
const failed = evidence.receipt.recipes.filter((recipe2) => recipe2.status !== "passed");
|
|
1376
1384
|
const detail = failed.map((recipe2) => {
|
|
@@ -1380,7 +1388,7 @@ ${log?.stderr ?? ""}`.trim();
|
|
|
1380
1388
|
const named = describeTapFailures(output);
|
|
1381
1389
|
return `${recipe2.recipeId}=${recipe2.status}${named ? `
|
|
1382
1390
|
${named}` : ""}${output ? `
|
|
1383
|
-
${output
|
|
1391
|
+
${gateOutput(output)}` : ""}`;
|
|
1384
1392
|
}).join("\n\n");
|
|
1385
1393
|
return `Clean verification failed. Fix this and checkpoint again:
|
|
1386
1394
|
${detail}`.slice(0, 4e3);
|
|
@@ -3227,6 +3235,19 @@ async function graphQuery(context, request, options, policy, registry) {
|
|
|
3227
3235
|
return response(request, true, renderWhoTouches(graphs, query));
|
|
3228
3236
|
}
|
|
3229
3237
|
|
|
3238
|
+
// src/code-tool-recipe-output.ts
|
|
3239
|
+
var RECIPE_OUTPUT_HEAD = 4e3;
|
|
3240
|
+
var RECIPE_OUTPUT_TAIL = 24e3;
|
|
3241
|
+
var ANSI = /\u001b\[[0-9;?]*[A-Za-z]/g;
|
|
3242
|
+
function boundedRecipeOutput(output) {
|
|
3243
|
+
const plain = output.replace(ANSI, "");
|
|
3244
|
+
if (plain.length <= RECIPE_OUTPUT_HEAD + RECIPE_OUTPUT_TAIL) return plain;
|
|
3245
|
+
const omitted = plain.length - RECIPE_OUTPUT_HEAD - RECIPE_OUTPUT_TAIL;
|
|
3246
|
+
return `${plain.slice(0, RECIPE_OUTPUT_HEAD)}
|
|
3247
|
+
\u2026 [${omitted} characters omitted; the last ${RECIPE_OUTPUT_TAIL} follow] \u2026
|
|
3248
|
+
${plain.slice(-RECIPE_OUTPUT_TAIL)}`;
|
|
3249
|
+
}
|
|
3250
|
+
|
|
3230
3251
|
// src/code-tool-broker.ts
|
|
3231
3252
|
function createCodeToolBroker(options) {
|
|
3232
3253
|
validateOptions(options);
|
|
@@ -3326,8 +3347,9 @@ async function recipe(context, request, options, recipes, policy) {
|
|
|
3326
3347
|
const output = [result.stdout, result.stderr].filter(Boolean).join("\n");
|
|
3327
3348
|
const ok = result.exitCode === 0 && !result.outputLimitExceeded && !result.timedOut;
|
|
3328
3349
|
const status = result.timedOut ? "timed out" : result.outputLimitExceeded ? "exceeded output limit" : ok ? "passed" : `failed with exit ${result.exitCode}`;
|
|
3329
|
-
|
|
3330
|
-
${
|
|
3350
|
+
const shown = boundedRecipeOutput(output);
|
|
3351
|
+
return response(request, ok, `Recipe ${recipeId} ${status}.${shown ? `
|
|
3352
|
+
${shown}` : ""}`, {
|
|
3331
3353
|
recipeId,
|
|
3332
3354
|
exitCode: result.exitCode,
|
|
3333
3355
|
durationMs: result.durationMs,
|
|
@@ -4234,4 +4256,4 @@ export {
|
|
|
4234
4256
|
withProofRecipes,
|
|
4235
4257
|
TheseusRuntimeEngine
|
|
4236
4258
|
};
|
|
4237
|
-
//# sourceMappingURL=chunk-
|
|
4259
|
+
//# sourceMappingURL=chunk-BOYUPB3P.js.map
|