@kody-ade/kody-engine 0.3.52 → 0.3.53

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 +13 -7
  2. package/package.json +1 -1
package/dist/bin/kody.js CHANGED
@@ -3,7 +3,7 @@
3
3
  // package.json
4
4
  var package_default = {
5
5
  name: "@kody-ade/kody-engine",
6
- version: "0.3.52",
6
+ version: "0.3.53",
7
7
  description: "kody \u2014 autonomous development engine. Single-session Claude Code agent behind a generic executor + declarative executable profiles.",
8
8
  license: "MIT",
9
9
  type: "module",
@@ -1940,7 +1940,10 @@ function parseAgentResult(finalText) {
1940
1940
  priorArt: "",
1941
1941
  failureReason: "agent produced no final message"
1942
1942
  };
1943
- const failedMatch = text.match(/(?:^|\n)\s*FAILED\s*:\s*(.+?)\s*$/s);
1943
+ const MARKDOWN_PREFIX = "[\\s>*_#`~\\-]*";
1944
+ const FAILED_RE = new RegExp(`(?:^|\\n)${MARKDOWN_PREFIX}FAILED${MARKDOWN_PREFIX}\\s*:\\s*(.+?)\\s*$`, "is");
1945
+ const DONE_RE = new RegExp(`(?:^|\\n)${MARKDOWN_PREFIX}DONE\\b`, "i");
1946
+ const failedMatch = text.match(FAILED_RE);
1944
1947
  if (failedMatch) {
1945
1948
  return {
1946
1949
  done: false,
@@ -1949,11 +1952,11 @@ function parseAgentResult(finalText) {
1949
1952
  feedbackActions: "",
1950
1953
  planDeviations: "",
1951
1954
  priorArt: "",
1952
- failureReason: failedMatch[1].trim()
1955
+ failureReason: stripMarkdownEmphasis(failedMatch[1])
1953
1956
  };
1954
1957
  }
1955
- const hasDoneMarker = /(^|\n)\s*DONE\b/i.test(text);
1956
- const hasCommitMsg = /^[ \t]*COMMIT_MSG\s*:/im.test(text);
1958
+ const hasDoneMarker = DONE_RE.test(text);
1959
+ const hasCommitMsg = /^[\s>*_#`~\-]*COMMIT_MSG\s*:/im.test(text);
1957
1960
  if (!hasDoneMarker && !hasCommitMsg) {
1958
1961
  return {
1959
1962
  done: false,
@@ -1965,8 +1968,8 @@ function parseAgentResult(finalText) {
1965
1968
  failureReason: "no DONE or FAILED marker in agent output"
1966
1969
  };
1967
1970
  }
1968
- const commitMatch = text.match(/^[ \t]*COMMIT_MSG\s*:\s*(.+)$/im);
1969
- const commitMessage = commitMatch ? commitMatch[1].trim() : "";
1971
+ const commitMatch = text.match(/^[\s>*_#`~\-]*COMMIT_MSG[\s>*_#`~\-]*\s*:\s*(.+)$/im);
1972
+ const commitMessage = commitMatch ? stripMarkdownEmphasis(commitMatch[1]) : "";
1970
1973
  const feedbackActions = extractBlock(
1971
1974
  text,
1972
1975
  /(?:^|\n)[ \t]*FEEDBACK_ACTIONS\s*:[ \t]*\n/i,
@@ -1992,6 +1995,9 @@ function parseAgentResult(finalText) {
1992
1995
  }
1993
1996
  return { done: true, commitMessage, prSummary, feedbackActions, planDeviations, priorArt, failureReason: "" };
1994
1997
  }
1998
+ function stripMarkdownEmphasis(s) {
1999
+ return s.trim().replace(/^[*_`~]+|[*_`~]+$/g, "").trim();
2000
+ }
1995
2001
  function extractBlock(text, startMarker, endMarker) {
1996
2002
  const startIdx = text.search(startMarker);
1997
2003
  if (startIdx === -1) return "";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kody-ade/kody-engine",
3
- "version": "0.3.52",
3
+ "version": "0.3.53",
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",