@kody-ade/kody-engine 0.4.582 → 0.4.584
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 +28 -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.584",
|
|
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
|
type: "module",
|
|
@@ -8711,11 +8711,19 @@ function isSafeConfigActivationChange(before, after) {
|
|
|
8711
8711
|
if (!isRecord(before) || !isRecord(after)) return false;
|
|
8712
8712
|
const beforeRest = { ...before };
|
|
8713
8713
|
const afterRest = { ...after };
|
|
8714
|
+
const beforeCompany = before.company;
|
|
8715
|
+
const afterCompany = after.company;
|
|
8716
|
+
if (!isRecord(beforeCompany) || !isRecord(afterCompany)) return false;
|
|
8717
|
+
delete beforeRest.company;
|
|
8718
|
+
delete afterRest.company;
|
|
8719
|
+
if (!isDeepStrictEqual(beforeRest, afterRest)) return false;
|
|
8720
|
+
const beforeCompanyRest = { ...beforeCompany };
|
|
8721
|
+
const afterCompanyRest = { ...afterCompany };
|
|
8714
8722
|
for (const field of ACTIVATION_FIELDS) {
|
|
8715
|
-
const previous =
|
|
8716
|
-
const next =
|
|
8717
|
-
delete
|
|
8718
|
-
delete
|
|
8723
|
+
const previous = beforeCompany[field];
|
|
8724
|
+
const next = afterCompany[field];
|
|
8725
|
+
delete beforeCompanyRest[field];
|
|
8726
|
+
delete afterCompanyRest[field];
|
|
8719
8727
|
if (previous === void 0 && next === void 0) continue;
|
|
8720
8728
|
if (!Array.isArray(previous ?? []) || !Array.isArray(next)) return false;
|
|
8721
8729
|
if (!next.every((value) => typeof value === "string")) return false;
|
|
@@ -8723,7 +8731,7 @@ function isSafeConfigActivationChange(before, after) {
|
|
|
8723
8731
|
const nextValues = new Set(next);
|
|
8724
8732
|
if (!previous.every((value) => nextValues.has(value))) return false;
|
|
8725
8733
|
}
|
|
8726
|
-
return isDeepStrictEqual(
|
|
8734
|
+
return isDeepStrictEqual(beforeCompanyRest, afterCompanyRest);
|
|
8727
8735
|
}
|
|
8728
8736
|
function isTrustedConfigActivationChange(filePath, deliveryPathAllowlist, cwd) {
|
|
8729
8737
|
if (filePath !== "kody.config.json" || !deliveryPathAllowlist.includes(filePath)) return false;
|
|
@@ -8746,6 +8754,16 @@ function listChangedFiles(cwd) {
|
|
|
8746
8754
|
const entries = raw.split("\0").filter((e) => e.length > 0);
|
|
8747
8755
|
return entries.map((e) => e.slice(3)).filter(Boolean);
|
|
8748
8756
|
}
|
|
8757
|
+
function listAllowlistedIgnoredFiles(deliveryPathAllowlist, cwd) {
|
|
8758
|
+
if (deliveryPathAllowlist.length === 0) return [];
|
|
8759
|
+
const raw = execFileSync6("git", ["ls-files", "--others", "--ignored", "--exclude-standard", "-z"], {
|
|
8760
|
+
encoding: "utf-8",
|
|
8761
|
+
cwd,
|
|
8762
|
+
env: { ...process.env, HUSKY: "0", SKIP_HOOKS: "1" },
|
|
8763
|
+
stdio: ["pipe", "pipe", "pipe"]
|
|
8764
|
+
});
|
|
8765
|
+
return raw.split("\0").filter(Boolean).filter((filePath) => isExplicitlyAllowed(filePath, deliveryPathAllowlist));
|
|
8766
|
+
}
|
|
8749
8767
|
function listFilesInCommit(ref = "HEAD", cwd) {
|
|
8750
8768
|
try {
|
|
8751
8769
|
const raw = execFileSync6("git", ["show", "--name-only", "--pretty=format:", "-z", ref], {
|
|
@@ -8769,7 +8787,9 @@ function normalizeCommitMessage(raw) {
|
|
|
8769
8787
|
return `chore: ${trimmed}`;
|
|
8770
8788
|
}
|
|
8771
8789
|
function commitAndPush(branch, agentMessage, cwd, deliveryPathAllowlist = []) {
|
|
8772
|
-
const
|
|
8790
|
+
const ignoredAllowedFiles = listAllowlistedIgnoredFiles(deliveryPathAllowlist, cwd);
|
|
8791
|
+
const ignoredAllowedSet = new Set(ignoredAllowedFiles);
|
|
8792
|
+
const allChanged = [.../* @__PURE__ */ new Set([...listChangedFiles(cwd), ...ignoredAllowedFiles])];
|
|
8773
8793
|
const allowedFiles = allChanged.filter(
|
|
8774
8794
|
(f) => !isForbiddenPath(f, deliveryPathAllowlist) || isTrustedConfigActivationChange(f, deliveryPathAllowlist, cwd)
|
|
8775
8795
|
);
|
|
@@ -8788,7 +8808,7 @@ function commitAndPush(branch, agentMessage, cwd, deliveryPathAllowlist = []) {
|
|
|
8788
8808
|
}
|
|
8789
8809
|
for (const f of allowedFiles) {
|
|
8790
8810
|
try {
|
|
8791
|
-
git(["add", "--", f], cwd);
|
|
8811
|
+
git(["add", ...ignoredAllowedSet.has(f) ? ["--force"] : [], "--", f], cwd);
|
|
8792
8812
|
} catch {
|
|
8793
8813
|
}
|
|
8794
8814
|
}
|
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.584",
|
|
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
|
"type": "module",
|