@kody-ade/kody-engine 0.4.268 → 0.4.270

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.
Files changed (2) hide show
  1. package/dist/bin/kody.js +31 -5
  2. package/package.json +1 -1
package/dist/bin/kody.js CHANGED
@@ -15,7 +15,7 @@ var init_package = __esm({
15
15
  "package.json"() {
16
16
  package_default = {
17
17
  name: "@kody-ade/kody-engine",
18
- version: "0.4.268",
18
+ version: "0.4.270",
19
19
  description: "kody \u2014 autonomous development engine. Single-session Claude Code agent behind a generic executor + declarative executable profiles.",
20
20
  license: "MIT",
21
21
  type: "module",
@@ -348,7 +348,7 @@ var init_issue = __esm({
348
348
  };
349
349
  DEFAULT_COMMENT_LIMIT = 12;
350
350
  DEFAULT_COMMENT_MAX_BYTES = 16e3;
351
- VERDICT_HEADING = /(^|\n)\s*#{1,6}\s*Verdict\s*:/i;
351
+ VERDICT_HEADING = /(^|\n)\s*#{1,6}\s*Verdict\b\s*:?/i;
352
352
  }
353
353
  });
354
354
 
@@ -9424,10 +9424,36 @@ var init_composePrompt = __esm({
9424
9424
  });
9425
9425
 
9426
9426
  // src/scripts/postReviewResult.ts
9427
+ function inferVerdictFromReviewText(body) {
9428
+ if (/\b(blocking|blocker|must fix|should not merge|regression|breaks|security risk)\b/i.test(body)) return "FAIL";
9429
+ if (/\b(actionable item|suggestions?|worth clarifying|worth checking|minor note|non-blocking|deserves a comment)\b/i.test(
9430
+ body
9431
+ )) {
9432
+ return "CONCERNS";
9433
+ }
9434
+ if (/\bLGTM\b/i.test(body) || /\blooks good\b/i.test(body) || /\bgood PR\b/i.test(body) || /\bno changes required\b/i.test(body) || /\bno findings\b/i.test(body) || /\ball checks pass\b/i.test(body) || /\bimplementation is correct\b/i.test(body)) {
9435
+ return "PASS";
9436
+ }
9437
+ return "UNKNOWN";
9438
+ }
9439
+ function extractVerdictSection(body) {
9440
+ const heading = body.match(/(^|\n)\s*#{1,6}\s*Verdict\b\s*:?\s*/i);
9441
+ if (!heading || heading.index === void 0) return null;
9442
+ const start = heading.index + heading[0].length;
9443
+ const rest = body.slice(start);
9444
+ const nextHeading = rest.search(/\n\s*#{1,6}\s+\S/);
9445
+ return nextHeading >= 0 ? rest.slice(0, nextHeading) : rest;
9446
+ }
9427
9447
  function detectVerdict(body) {
9428
- const m = body.match(/##\s*Verdict\s*:\s*(PASS|CONCERNS|FAIL)\b/i);
9429
- if (!m) return "UNKNOWN";
9430
- return m[1].toUpperCase();
9448
+ const exact = body.match(/(^|\n)\s*#{1,6}\s*Verdict\s*:?\s*(PASS|CONCERNS|FAIL)\b/i);
9449
+ if (exact) return exact[2].toUpperCase();
9450
+ const section = extractVerdictSection(body);
9451
+ if (!section) return inferVerdictFromReviewText(body);
9452
+ const explicit = section.match(/\b(PASS|CONCERNS|FAIL)\b/i);
9453
+ if (explicit) return explicit[1].toUpperCase();
9454
+ const sectionVerdict = inferVerdictFromReviewText(section);
9455
+ if (sectionVerdict !== "UNKNOWN") return sectionVerdict;
9456
+ return inferVerdictFromReviewText(body);
9431
9457
  }
9432
9458
  function reviewAction(verdict, payload) {
9433
9459
  const type = verdict === "PASS" ? "REVIEW_PASS" : verdict === "CONCERNS" ? "REVIEW_CONCERNS" : verdict === "FAIL" ? "REVIEW_FAIL" : "REVIEW_COMPLETED";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kody-ade/kody-engine",
3
- "version": "0.4.268",
3
+ "version": "0.4.270",
4
4
  "description": "kody — autonomous development engine. Single-session Claude Code agent behind a generic executor + declarative executable profiles.",
5
5
  "license": "MIT",
6
6
  "type": "module",