@kody-ade/kody-engine 0.3.43 → 0.3.45

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 +15 -2
  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.43",
6
+ version: "0.3.45",
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",
@@ -1332,6 +1332,7 @@ var FORBIDDEN_PATH_PREFIXES = [
1332
1332
  "dist/",
1333
1333
  "build/"
1334
1334
  ];
1335
+ var ALLOWED_PATH_PREFIXES = [".kody/vault/"];
1335
1336
  var FORBIDDEN_PATH_EXACT = /* @__PURE__ */ new Set([".env", ".kody-pip-requirements.txt"]);
1336
1337
  var FORBIDDEN_PATH_SUFFIXES = [".log"];
1337
1338
  var CONVENTIONAL_PREFIXES = [
@@ -1402,6 +1403,7 @@ function abortUnfinishedGitOps(cwd) {
1402
1403
  }
1403
1404
  function isForbiddenPath(p) {
1404
1405
  if (FORBIDDEN_PATH_EXACT.has(p)) return true;
1406
+ for (const pre of ALLOWED_PATH_PREFIXES) if (p.startsWith(pre)) return false;
1405
1407
  for (const pre of FORBIDDEN_PATH_PREFIXES) if (p.startsWith(pre)) return true;
1406
1408
  for (const suf of FORBIDDEN_PATH_SUFFIXES) if (p.endsWith(suf)) return true;
1407
1409
  return false;
@@ -2087,8 +2089,11 @@ var commitAndPush2 = async (ctx) => {
2087
2089
  const postCommitFiles = result.committed ? listFilesInCommit("HEAD", ctx.cwd) : listChangedFiles(ctx.cwd);
2088
2090
  ctx.data.changedFiles = postCommitFiles.filter((f) => !isForbiddenPath(f));
2089
2091
  } catch (err) {
2090
- ctx.data.commitCrash = err instanceof Error ? err.message : String(err);
2092
+ const reason = err instanceof Error ? err.message : String(err);
2093
+ ctx.data.commitCrash = reason;
2091
2094
  ctx.data.commitResult = { committed: false, pushed: false };
2095
+ process.stderr.write(`[kody commitAndPush] failed: ${reason}
2096
+ `);
2092
2097
  }
2093
2098
  ctx.data.hasCommitsAhead = hasCommitsAhead(branch, ctx.config.git.defaultBranch, ctx.cwd);
2094
2099
  };
@@ -3175,6 +3180,14 @@ var ensureMemorizePr = async (ctx) => {
3175
3180
  ctx.output.reason = "no vault changes";
3176
3181
  return;
3177
3182
  }
3183
+ if (commitResult?.committed && commitResult.pushed === false) {
3184
+ const reason = ctx.data.commitCrash ?? "push failed";
3185
+ ctx.output.exitCode = 4;
3186
+ ctx.output.reason = `memorize: branch not pushed to origin \u2014 ${reason}`;
3187
+ process.stderr.write(`[kody memorize] not opening PR: ${ctx.output.reason}
3188
+ `);
3189
+ return;
3190
+ }
3178
3191
  const branch = ctx.data.branch;
3179
3192
  if (!branch) {
3180
3193
  ctx.output.exitCode = 4;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kody-ade/kody-engine",
3
- "version": "0.3.43",
3
+ "version": "0.3.45",
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",