@kody-ade/kody-engine 0.4.73 → 0.4.74

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 +9 -5
  2. package/package.json +1 -1
package/dist/bin/kody.js CHANGED
@@ -495,9 +495,10 @@ function parseAgentResult(finalText) {
495
495
  markerMissing: false
496
496
  };
497
497
  const MARKDOWN_PREFIX = "[\\s>*_#`~\\-]*";
498
- const FAILED_RE = new RegExp(`(?:^|\\n)${MARKDOWN_PREFIX}FAILED${MARKDOWN_PREFIX}\\s*:\\s*(.+?)\\s*$`, "is");
499
- const DONE_RE = new RegExp(`(?:^|\\n)${MARKDOWN_PREFIX}DONE\\b`, "i");
500
- const failedMatch = text.match(FAILED_RE);
498
+ const FAILED_RE = new RegExp(`(?:^|\\n)${MARKDOWN_PREFIX}FAILED${MARKDOWN_PREFIX}\\s*:\\s*(.+?)\\s*$`, "s");
499
+ const DONE_RE = new RegExp(`(?:^|\\n)${MARKDOWN_PREFIX}DONE\\b`);
500
+ const scanText = stripFencedCodeBlocks(text);
501
+ const failedMatch = scanText.match(FAILED_RE);
501
502
  if (failedMatch) {
502
503
  return {
503
504
  done: false,
@@ -510,7 +511,7 @@ function parseAgentResult(finalText) {
510
511
  markerMissing: false
511
512
  };
512
513
  }
513
- const hasDoneMarker = DONE_RE.test(text);
514
+ const hasDoneMarker = DONE_RE.test(scanText);
514
515
  const hasCommitMsg = /^[\s>*_#`~-]*COMMIT_MSG\s*:/im.test(text);
515
516
  const hasPrSummary = /^[\s>*_#`~-]*PR_SUMMARY\s*:/im.test(text);
516
517
  const markerMissing = !hasDoneMarker && !hasCommitMsg && !hasPrSummary;
@@ -553,6 +554,9 @@ function parseAgentResult(finalText) {
553
554
  function stripMarkdownEmphasis(s) {
554
555
  return s.trim().replace(/^[*_`~]+|[*_`~]+$/g, "").trim();
555
556
  }
557
+ function stripFencedCodeBlocks(s) {
558
+ return s.replace(/```[\s\S]*?```/g, "").replace(/~~~[\s\S]*?~~~/g, "");
559
+ }
556
560
  function extractBlock(text, startMarker, endMarker) {
557
561
  const startIdx = text.search(startMarker);
558
562
  if (startIdx === -1) return "";
@@ -864,7 +868,7 @@ var init_loadPriorArt = __esm({
864
868
  // package.json
865
869
  var package_default = {
866
870
  name: "@kody-ade/kody-engine",
867
- version: "0.4.73",
871
+ version: "0.4.74",
868
872
  description: "kody \u2014 autonomous development engine. Single-session Claude Code agent behind a generic executor + declarative executable profiles.",
869
873
  license: "MIT",
870
874
  type: "module",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kody-ade/kody-engine",
3
- "version": "0.4.73",
3
+ "version": "0.4.74",
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",