@kody-ade/kody-engine 0.4.619 → 0.4.620
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 +13 -8
- package/package.json +1 -1
package/dist/bin/kody.js
CHANGED
|
@@ -15,7 +15,7 @@ var init_package = __esm({
|
|
|
15
15
|
"package.json"() {
|
|
16
16
|
package_default = {
|
|
17
17
|
name: "@kody-ade/kody-engine",
|
|
18
|
-
version: "0.4.
|
|
18
|
+
version: "0.4.620",
|
|
19
19
|
description: "kody \u2014 autonomous development engine. Single-session Claude Code agent behind a generic executor + declarative implementation profiles.",
|
|
20
20
|
license: "MIT",
|
|
21
21
|
repository: {
|
|
@@ -9039,13 +9039,13 @@ function commitAndPush(branch, agentMessage, cwd, deliveryPathAllowlist = [], de
|
|
|
9039
9039
|
const allowedFiles = allChanged.filter(
|
|
9040
9040
|
(f) => !isForbiddenPath(f, deliveryPathAllowlist) || isTrustedConfigActivationChange(f, deliveryPathAllowlist, deliveryConfigAllowlist, cwd)
|
|
9041
9041
|
);
|
|
9042
|
-
const mergeHeadExists = fs29.existsSync(path28.join(cwd ?? process.cwd(), ".git", "MERGE_HEAD"));
|
|
9043
|
-
if (allowedFiles.length === 0 && !mergeHeadExists) {
|
|
9044
|
-
return { committed: false, pushed: false, sha: "", message: "" };
|
|
9045
|
-
}
|
|
9046
9042
|
const forbiddenFiles = allChanged.filter(
|
|
9047
9043
|
(f) => isForbiddenPath(f, deliveryPathAllowlist) && !isTrustedConfigActivationChange(f, deliveryPathAllowlist, deliveryConfigAllowlist, cwd)
|
|
9048
9044
|
);
|
|
9045
|
+
const mergeHeadExists = fs29.existsSync(path28.join(cwd ?? process.cwd(), ".git", "MERGE_HEAD"));
|
|
9046
|
+
if (allowedFiles.length === 0 && !mergeHeadExists) {
|
|
9047
|
+
return { committed: false, pushed: false, sha: "", message: "", omittedFiles: forbiddenFiles };
|
|
9048
|
+
}
|
|
9049
9049
|
for (const f of forbiddenFiles) {
|
|
9050
9050
|
try {
|
|
9051
9051
|
git(["reset", "-q", "--", f], cwd);
|
|
@@ -9072,9 +9072,9 @@ function commitAndPush(branch, agentMessage, cwd, deliveryPathAllowlist = [], de
|
|
|
9072
9072
|
const sha = git(["rev-parse", "HEAD"], cwd).slice(0, 7);
|
|
9073
9073
|
const pushResult = pushWithRetry({ cwd, branch, setUpstream: true });
|
|
9074
9074
|
if (pushResult.ok) {
|
|
9075
|
-
return { committed: true, pushed: true, sha, message };
|
|
9075
|
+
return { committed: true, pushed: true, sha, message, omittedFiles: forbiddenFiles };
|
|
9076
9076
|
}
|
|
9077
|
-
return { committed: true, pushed: false, sha, message, pushError: pushResult.reason };
|
|
9077
|
+
return { committed: true, pushed: false, sha, message, pushError: pushResult.reason, omittedFiles: forbiddenFiles };
|
|
9078
9078
|
}
|
|
9079
9079
|
function hasCommitsAhead(branch, defaultBranch, cwd) {
|
|
9080
9080
|
try {
|
|
@@ -12718,6 +12718,7 @@ var init_commitAndPush = __esm({
|
|
|
12718
12718
|
try {
|
|
12719
12719
|
const result2 = commitAndPush(branch, message, ctx.cwd, deliveryPathAllowlist, deliveryConfigAllowlist);
|
|
12720
12720
|
ctx.data.commitResult = result2;
|
|
12721
|
+
if (result2.omittedFiles?.length) ctx.data.deliveryOmissions = result2.omittedFiles;
|
|
12721
12722
|
const postCommitFiles = result2.committed ? listFilesInCommit("HEAD", ctx.cwd) : listChangedFiles(ctx.cwd);
|
|
12722
12723
|
ctx.data.changedFiles = postCommitFiles.filter((f) => !isForbiddenPath(f, deliveryPathAllowlist));
|
|
12723
12724
|
if (result2.committed && !result2.pushed) {
|
|
@@ -18306,6 +18307,10 @@ function renderMessage(input) {
|
|
|
18306
18307
|
}
|
|
18307
18308
|
}
|
|
18308
18309
|
function computeFailureReason2(ctx) {
|
|
18310
|
+
const omissions = Array.isArray(ctx.data.deliveryOmissions) ? ctx.data.deliveryOmissions.filter((file) => typeof file === "string") : [];
|
|
18311
|
+
if (omissions.length > 0) {
|
|
18312
|
+
return `delivery blocked protected files: ${omissions.join(", ")}`;
|
|
18313
|
+
}
|
|
18309
18314
|
const misses = ctx.data.coverageMisses ?? [];
|
|
18310
18315
|
if (misses.length > 0) return `missing tests: ${misses.map((m) => m.expectedTest).join(", ")}`;
|
|
18311
18316
|
const agentDone = Boolean(ctx.data.agentDone);
|
|
@@ -18439,7 +18444,7 @@ var init_postIssueComment = __esm({
|
|
|
18439
18444
|
const agentDone = Boolean(ctx.data.agentDone);
|
|
18440
18445
|
const verifyOk = ctx.data.verifyOk !== false;
|
|
18441
18446
|
const misses = ctx.data.coverageMisses ?? [];
|
|
18442
|
-
if (!agentDone || misses.length > 0) exitCode = 1;
|
|
18447
|
+
if (isFailure || !agentDone || misses.length > 0) exitCode = 1;
|
|
18443
18448
|
else if (!verifyOk) exitCode = 2;
|
|
18444
18449
|
exitCode = Math.max(ctx.output.exitCode ?? 0, exitCode);
|
|
18445
18450
|
if (exitCode !== 0) markRunFailed(ctx);
|
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.620",
|
|
4
4
|
"description": "kody — autonomous development engine. Single-session Claude Code agent behind a generic executor + declarative implementation profiles.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|