@kody-ade/kody-engine 0.4.583 → 0.4.585
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 +21 -4
- 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.585",
|
|
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",
|
|
@@ -8632,6 +8632,7 @@ function git(args, cwd) {
|
|
|
8632
8632
|
return execFileSync6("git", args, {
|
|
8633
8633
|
encoding: "utf-8",
|
|
8634
8634
|
timeout: 12e4,
|
|
8635
|
+
maxBuffer: GIT_MAX_BUFFER_BYTES,
|
|
8635
8636
|
cwd,
|
|
8636
8637
|
env: { ...process.env, HUSKY: "0", SKIP_HOOKS: "1" },
|
|
8637
8638
|
stdio: ["pipe", "pipe", "pipe"]
|
|
@@ -8746,6 +8747,7 @@ function isTrustedConfigActivationChange(filePath, deliveryPathAllowlist, cwd) {
|
|
|
8746
8747
|
function listChangedFiles(cwd) {
|
|
8747
8748
|
const raw = execFileSync6("git", ["status", "--porcelain=v1", "-z", "--untracked-files=all"], {
|
|
8748
8749
|
encoding: "utf-8",
|
|
8750
|
+
maxBuffer: GIT_MAX_BUFFER_BYTES,
|
|
8749
8751
|
cwd,
|
|
8750
8752
|
env: { ...process.env, HUSKY: "0", SKIP_HOOKS: "1" },
|
|
8751
8753
|
stdio: ["pipe", "pipe", "pipe"]
|
|
@@ -8754,10 +8756,22 @@ function listChangedFiles(cwd) {
|
|
|
8754
8756
|
const entries = raw.split("\0").filter((e) => e.length > 0);
|
|
8755
8757
|
return entries.map((e) => e.slice(3)).filter(Boolean);
|
|
8756
8758
|
}
|
|
8759
|
+
function listAllowlistedIgnoredFiles(deliveryPathAllowlist, cwd) {
|
|
8760
|
+
if (deliveryPathAllowlist.length === 0) return [];
|
|
8761
|
+
const raw = execFileSync6("git", ["ls-files", "--others", "--ignored", "--exclude-standard", "-z"], {
|
|
8762
|
+
encoding: "utf-8",
|
|
8763
|
+
maxBuffer: GIT_MAX_BUFFER_BYTES,
|
|
8764
|
+
cwd,
|
|
8765
|
+
env: { ...process.env, HUSKY: "0", SKIP_HOOKS: "1" },
|
|
8766
|
+
stdio: ["pipe", "pipe", "pipe"]
|
|
8767
|
+
});
|
|
8768
|
+
return raw.split("\0").filter(Boolean).filter((filePath) => isExplicitlyAllowed(filePath, deliveryPathAllowlist));
|
|
8769
|
+
}
|
|
8757
8770
|
function listFilesInCommit(ref = "HEAD", cwd) {
|
|
8758
8771
|
try {
|
|
8759
8772
|
const raw = execFileSync6("git", ["show", "--name-only", "--pretty=format:", "-z", ref], {
|
|
8760
8773
|
encoding: "utf-8",
|
|
8774
|
+
maxBuffer: GIT_MAX_BUFFER_BYTES,
|
|
8761
8775
|
cwd,
|
|
8762
8776
|
env: { ...process.env, HUSKY: "0", SKIP_HOOKS: "1" },
|
|
8763
8777
|
stdio: ["pipe", "pipe", "pipe"]
|
|
@@ -8777,7 +8791,9 @@ function normalizeCommitMessage(raw) {
|
|
|
8777
8791
|
return `chore: ${trimmed}`;
|
|
8778
8792
|
}
|
|
8779
8793
|
function commitAndPush(branch, agentMessage, cwd, deliveryPathAllowlist = []) {
|
|
8780
|
-
const
|
|
8794
|
+
const ignoredAllowedFiles = listAllowlistedIgnoredFiles(deliveryPathAllowlist, cwd);
|
|
8795
|
+
const ignoredAllowedSet = new Set(ignoredAllowedFiles);
|
|
8796
|
+
const allChanged = [.../* @__PURE__ */ new Set([...listChangedFiles(cwd), ...ignoredAllowedFiles])];
|
|
8781
8797
|
const allowedFiles = allChanged.filter(
|
|
8782
8798
|
(f) => !isForbiddenPath(f, deliveryPathAllowlist) || isTrustedConfigActivationChange(f, deliveryPathAllowlist, cwd)
|
|
8783
8799
|
);
|
|
@@ -8796,7 +8812,7 @@ function commitAndPush(branch, agentMessage, cwd, deliveryPathAllowlist = []) {
|
|
|
8796
8812
|
}
|
|
8797
8813
|
for (const f of allowedFiles) {
|
|
8798
8814
|
try {
|
|
8799
|
-
git(["add", "--", f], cwd);
|
|
8815
|
+
git(["add", ...ignoredAllowedSet.has(f) ? ["--force"] : [], "--", f], cwd);
|
|
8800
8816
|
} catch {
|
|
8801
8817
|
}
|
|
8802
8818
|
}
|
|
@@ -8831,11 +8847,12 @@ function hasCommitsAhead(branch, defaultBranch, cwd) {
|
|
|
8831
8847
|
}
|
|
8832
8848
|
}
|
|
8833
8849
|
}
|
|
8834
|
-
var FORBIDDEN_PATH_PREFIXES, ALLOWED_PATH_PREFIXES, FORBIDDEN_PATH_EXACT, FORBIDDEN_PATH_SUFFIXES, ACTIVATION_FIELDS, CONVENTIONAL_PREFIXES;
|
|
8850
|
+
var GIT_MAX_BUFFER_BYTES, FORBIDDEN_PATH_PREFIXES, ALLOWED_PATH_PREFIXES, FORBIDDEN_PATH_EXACT, FORBIDDEN_PATH_SUFFIXES, ACTIVATION_FIELDS, CONVENTIONAL_PREFIXES;
|
|
8835
8851
|
var init_commit = __esm({
|
|
8836
8852
|
"src/commit.ts"() {
|
|
8837
8853
|
"use strict";
|
|
8838
8854
|
init_pushWithRetry();
|
|
8855
|
+
GIT_MAX_BUFFER_BYTES = 64 * 1024 * 1024;
|
|
8839
8856
|
FORBIDDEN_PATH_PREFIXES = [
|
|
8840
8857
|
".kody/",
|
|
8841
8858
|
// legacy consumer state must never be reintroduced or committed
|
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.585",
|
|
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",
|