@kody-ade/kody-engine 0.3.7 → 0.3.9
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/kody.js +26 -10
- package/dist/executables/fix/profile.json +1 -1
- package/dist/executables/plan/profile.json +1 -1
- package/dist/executables/research/profile.json +1 -1
- package/dist/executables/review/profile.json +1 -1
- package/dist/executables/ui-review/profile.json +1 -1
- 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.
|
|
6
|
+
version: "0.3.9",
|
|
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",
|
|
@@ -2065,11 +2065,11 @@ var diagMcp = async (_ctx) => {
|
|
|
2065
2065
|
process.stderr.write(`[kody diag] chromium present: ${hasChromium ? "yes" : "no"}
|
|
2066
2066
|
`);
|
|
2067
2067
|
try {
|
|
2068
|
-
const v = execFileSync7(
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
encoding: "utf8"
|
|
2072
|
-
|
|
2068
|
+
const v = execFileSync7(
|
|
2069
|
+
"npx",
|
|
2070
|
+
["-y", "--package=@playwright/mcp@latest", "--", "playwright-mcp", "--version"],
|
|
2071
|
+
{ stdio: "pipe", timeout: 6e4, encoding: "utf8" }
|
|
2072
|
+
).trim();
|
|
2073
2073
|
process.stderr.write(`[kody diag] @playwright/mcp version: ${v}
|
|
2074
2074
|
`);
|
|
2075
2075
|
} catch (e) {
|
|
@@ -2810,20 +2810,36 @@ function firstLine(s) {
|
|
|
2810
2810
|
}
|
|
2811
2811
|
function findExistingPr(branch, cwd) {
|
|
2812
2812
|
try {
|
|
2813
|
-
const output = gh2(["pr", "view", branch, "--json", "number,url"], { cwd });
|
|
2813
|
+
const output = gh2(["pr", "view", branch, "--json", "number,url,body"], { cwd });
|
|
2814
2814
|
const parsed = JSON.parse(output);
|
|
2815
2815
|
if (typeof parsed?.number === "number" && typeof parsed?.url === "string") {
|
|
2816
|
-
|
|
2816
|
+
const body = typeof parsed.body === "string" ? parsed.body : "";
|
|
2817
|
+
return { number: parsed.number, url: parsed.url, body };
|
|
2817
2818
|
}
|
|
2818
2819
|
return null;
|
|
2819
2820
|
} catch {
|
|
2820
2821
|
return null;
|
|
2821
2822
|
}
|
|
2822
2823
|
}
|
|
2824
|
+
function recoverSourceIssueNumber(existingBody, branch, prNumber) {
|
|
2825
|
+
const bodyMatch = existingBody.match(/\bCloses #(\d+)\b/i);
|
|
2826
|
+
if (bodyMatch) {
|
|
2827
|
+
const n = parseInt(bodyMatch[1], 10);
|
|
2828
|
+
if (n > 0 && n !== prNumber) return n;
|
|
2829
|
+
}
|
|
2830
|
+
const branchMatch = branch.match(/^(\d+)-/);
|
|
2831
|
+
if (branchMatch) {
|
|
2832
|
+
const n = parseInt(branchMatch[1], 10);
|
|
2833
|
+
if (n > 0 && n !== prNumber) return n;
|
|
2834
|
+
}
|
|
2835
|
+
return null;
|
|
2836
|
+
}
|
|
2823
2837
|
function ensurePr(opts) {
|
|
2824
|
-
const title = buildPrTitle(opts.issueNumber, opts.issueTitle, opts.draft);
|
|
2825
|
-
const body = buildPrBody(opts);
|
|
2826
2838
|
const existing = findExistingPr(opts.branch, opts.cwd);
|
|
2839
|
+
const effectiveIssueNumber = existing ? recoverSourceIssueNumber(existing.body, opts.branch, existing.number) ?? opts.issueNumber : opts.issueNumber;
|
|
2840
|
+
const effectiveOpts = { ...opts, issueNumber: effectiveIssueNumber };
|
|
2841
|
+
const title = buildPrTitle(effectiveOpts.issueNumber, effectiveOpts.issueTitle, effectiveOpts.draft);
|
|
2842
|
+
const body = buildPrBody(effectiveOpts);
|
|
2827
2843
|
if (existing) {
|
|
2828
2844
|
try {
|
|
2829
2845
|
gh2(["pr", "edit", String(existing.number), "--body-file", "-"], { input: body, cwd: opts.cwd });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kody-ade/kody-engine",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.9",
|
|
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",
|