@kody-ade/kody-engine 0.3.67 → 0.3.69
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
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.69",
|
|
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",
|
|
@@ -5163,20 +5163,30 @@ var mergeReleasePr = async (ctx) => {
|
|
|
5163
5163
|
if (state) state.core.lastOutcome = ctx.data.action;
|
|
5164
5164
|
return;
|
|
5165
5165
|
}
|
|
5166
|
+
process.stderr.write(`[kody mergeReleasePr] merging PR #${prNumber} (${prUrl})
|
|
5167
|
+
`);
|
|
5166
5168
|
try {
|
|
5167
|
-
execFileSync16("gh", ["pr", "merge", String(prNumber), "--merge"], {
|
|
5169
|
+
const out = execFileSync16("gh", ["pr", "merge", String(prNumber), "--merge"], {
|
|
5168
5170
|
timeout: API_TIMEOUT_MS7,
|
|
5169
5171
|
cwd: ctx.cwd,
|
|
5170
5172
|
stdio: ["ignore", "pipe", "pipe"]
|
|
5171
5173
|
});
|
|
5174
|
+
const stdout = out.toString().trim();
|
|
5175
|
+
if (stdout) process.stderr.write(`[kody mergeReleasePr] gh stdout: ${stdout}
|
|
5176
|
+
`);
|
|
5172
5177
|
} catch (err) {
|
|
5173
|
-
const
|
|
5174
|
-
|
|
5178
|
+
const e = err;
|
|
5179
|
+
const stdout = e.stdout?.toString().trim() ?? "";
|
|
5180
|
+
const stderr = e.stderr?.toString().trim() ?? "";
|
|
5181
|
+
const detail = [stderr, stdout].filter(Boolean).join(" | ") || e.message || String(err);
|
|
5182
|
+
process.stderr.write(`[kody mergeReleasePr] gh pr merge failed (exit ${e.status ?? "?"}): ${detail}
|
|
5183
|
+
`);
|
|
5184
|
+
if (/already merged/i.test(detail)) {
|
|
5175
5185
|
ctx.data.action = makeAction("RELEASE_MERGE_COMPLETED", { prUrl, alreadyMerged: true });
|
|
5176
5186
|
if (state) state.core.lastOutcome = ctx.data.action;
|
|
5177
5187
|
return;
|
|
5178
5188
|
}
|
|
5179
|
-
ctx.data.action = makeAction("RELEASE_MERGE_FAILED", { reason:
|
|
5189
|
+
ctx.data.action = makeAction("RELEASE_MERGE_FAILED", { reason: detail, prUrl });
|
|
5180
5190
|
if (state) state.core.lastOutcome = ctx.data.action;
|
|
5181
5191
|
return;
|
|
5182
5192
|
}
|
|
@@ -6975,8 +6985,21 @@ async function runExecutable(profileName, input) {
|
|
|
6975
6985
|
agentResult = await invokeAgent(prompt);
|
|
6976
6986
|
}
|
|
6977
6987
|
for (const entry of profile.scripts.postflight) {
|
|
6978
|
-
|
|
6979
|
-
|
|
6988
|
+
const entryLabel = entry.script ?? entry.shell ?? "<unknown>";
|
|
6989
|
+
if (!shouldRun(entry, ctx)) {
|
|
6990
|
+
if (entry.runWhen) {
|
|
6991
|
+
const reasons = [];
|
|
6992
|
+
for (const [key, want] of Object.entries(entry.runWhen)) {
|
|
6993
|
+
const actual = resolveDottedPath(ctx, key);
|
|
6994
|
+
const wanted = Array.isArray(want) ? want.join("|") : String(want);
|
|
6995
|
+
reasons.push(`${key}=${JSON.stringify(actual)} (need ${wanted})`);
|
|
6996
|
+
}
|
|
6997
|
+
process.stderr.write(`[kody postflight] skip ${entryLabel}: ${reasons.join("; ")}
|
|
6998
|
+
`);
|
|
6999
|
+
}
|
|
7000
|
+
continue;
|
|
7001
|
+
}
|
|
7002
|
+
const label = entryLabel;
|
|
6980
7003
|
try {
|
|
6981
7004
|
if (entry.shell) {
|
|
6982
7005
|
await runShellEntry(entry, ctx, profile);
|
|
@@ -53,9 +53,13 @@
|
|
|
53
53
|
"postflight": [
|
|
54
54
|
{ "script": "startFlow", "with": { "entry": "release-prepare", "target": "issue" } },
|
|
55
55
|
|
|
56
|
-
{ "script": "
|
|
56
|
+
{ "script": "waitForCi",
|
|
57
|
+
"with": { "timeoutMinutes": 60, "pollSeconds": 30, "initialWaitSeconds": 15, "maxFixCiAttempts": 0 },
|
|
57
58
|
"runWhen": { "data.taskState.core.lastOutcome.type": "RELEASE_PREPARE_COMPLETED" } },
|
|
58
59
|
|
|
60
|
+
{ "script": "mergeReleasePr",
|
|
61
|
+
"runWhen": { "data.action.type": "CI_PASSED" } },
|
|
62
|
+
|
|
59
63
|
{ "script": "dispatch", "with": { "next": "release-publish", "target": "issue" },
|
|
60
64
|
"runWhen": { "data.taskState.core.lastOutcome.type": "RELEASE_MERGE_COMPLETED" } },
|
|
61
65
|
|
|
@@ -63,7 +67,7 @@
|
|
|
63
67
|
"runWhen": { "data.taskState.core.lastOutcome.type": "RELEASE_PUBLISH_COMPLETED" } },
|
|
64
68
|
|
|
65
69
|
{ "script": "waitForCi",
|
|
66
|
-
"with": { "timeoutMinutes":
|
|
70
|
+
"with": { "timeoutMinutes": 60, "pollSeconds": 30, "initialWaitSeconds": 15, "maxFixCiAttempts": 3 },
|
|
67
71
|
"runWhen": { "data.taskState.core.lastOutcome.type": ["RELEASE_DEPLOY_COMPLETED", "FIX_CI_COMPLETED"] } },
|
|
68
72
|
|
|
69
73
|
{ "script": "dispatch", "with": { "next": "fix-ci", "target": "pr" },
|
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.69",
|
|
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",
|