@kody-ade/kody-engine 0.4.52 → 0.4.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.
- package/dist/bin/kody.js +22 -13
- 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.4.
|
|
6
|
+
version: "0.4.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",
|
|
@@ -5413,32 +5413,41 @@ var finalizeGoal = async (ctx) => {
|
|
|
5413
5413
|
if (!goal) return;
|
|
5414
5414
|
process.stdout.write(`[goal-tick] all task(s) done \u2014 finalising goal ${goal.id}
|
|
5415
5415
|
`);
|
|
5416
|
-
const
|
|
5417
|
-
if (
|
|
5418
|
-
|
|
5419
|
-
process.stdout.write(`[goal-tick] promoting draft leaf PR #${leaf.number} \u2192 ready
|
|
5416
|
+
const taskPrs = goal.openTaskPrs ?? [];
|
|
5417
|
+
if (taskPrs.length === 0) {
|
|
5418
|
+
process.stdout.write(`[goal-tick] no open task PRs \u2014 marking goal done without merge
|
|
5420
5419
|
`);
|
|
5421
|
-
|
|
5420
|
+
goal.state = "done";
|
|
5421
|
+
return;
|
|
5422
|
+
}
|
|
5423
|
+
const ordered = [...taskPrs].sort((a, b) => extractIssueNumber(a) - extractIssueNumber(b));
|
|
5424
|
+
for (const pr of ordered) {
|
|
5425
|
+
if (pr.isDraft) {
|
|
5426
|
+
process.stdout.write(`[goal-tick] promoting draft PR #${pr.number} \u2192 ready
|
|
5427
|
+
`);
|
|
5428
|
+
const ready = markPrReady(pr.number, ctx.cwd);
|
|
5422
5429
|
if (!ready.ok) {
|
|
5423
|
-
process.stderr.write(`[goal-tick] finalizeGoal: markPrReady failed: ${ready.error}
|
|
5430
|
+
process.stderr.write(`[goal-tick] finalizeGoal: markPrReady #${pr.number} failed: ${ready.error}
|
|
5424
5431
|
`);
|
|
5425
5432
|
return;
|
|
5426
5433
|
}
|
|
5427
5434
|
}
|
|
5428
|
-
process.stdout.write(`[goal-tick] squash-merging
|
|
5435
|
+
process.stdout.write(`[goal-tick] squash-merging PR #${pr.number} (base=${pr.baseRefName}, head=${pr.headRefName})
|
|
5429
5436
|
`);
|
|
5430
|
-
const merged = mergePrSquash(
|
|
5437
|
+
const merged = mergePrSquash(pr.number, ctx.cwd);
|
|
5431
5438
|
if (!merged.ok) {
|
|
5432
|
-
process.stderr.write(`[goal-tick] finalizeGoal: mergePrSquash failed: ${merged.error}
|
|
5439
|
+
process.stderr.write(`[goal-tick] finalizeGoal: mergePrSquash #${pr.number} failed: ${merged.error}
|
|
5433
5440
|
`);
|
|
5434
5441
|
return;
|
|
5435
5442
|
}
|
|
5436
|
-
} else {
|
|
5437
|
-
process.stdout.write(`[goal-tick] no leaf PR \u2014 marking goal done without merge
|
|
5438
|
-
`);
|
|
5439
5443
|
}
|
|
5440
5444
|
goal.state = "done";
|
|
5441
5445
|
};
|
|
5446
|
+
function extractIssueNumber(pr) {
|
|
5447
|
+
const m = pr.headRefName.match(/^(\d+)-/);
|
|
5448
|
+
if (m?.[1]) return Number.parseInt(m[1], 10);
|
|
5449
|
+
return pr.number;
|
|
5450
|
+
}
|
|
5442
5451
|
|
|
5443
5452
|
// src/scripts/finishFlow.ts
|
|
5444
5453
|
import { execFileSync as execFileSync14 } from "child_process";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kody-ade/kody-engine",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.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",
|