@kody-ade/kody-engine 0.4.294 → 0.4.296

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 +31 -8
  2. 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.294",
18
+ version: "0.4.296",
19
19
  description: "kody \u2014 autonomous development engine. Single-session Claude Code agent behind a generic executor + declarative executable profiles.",
20
20
  license: "MIT",
21
21
  type: "module",
@@ -2208,15 +2208,19 @@ function listExecutables(roots = getExecutableRoots()) {
2208
2208
  return out.sort((a, b) => a.name.localeCompare(b.name));
2209
2209
  }
2210
2210
  function resolveExecutable(name, roots = getExecutableRoots()) {
2211
- if (!isSafeName(name)) return null;
2211
+ return resolveExecutableCandidates(name, roots)[0] ?? null;
2212
+ }
2213
+ function resolveExecutableCandidates(name, roots = getExecutableRoots()) {
2214
+ if (!isSafeName(name)) return [];
2212
2215
  const rootList = typeof roots === "string" ? [roots] : roots;
2216
+ const out = [];
2213
2217
  for (const root of rootList) {
2214
2218
  const profilePath = path8.join(root, name, "profile.json");
2215
2219
  if (fs6.existsSync(profilePath) && fs6.statSync(profilePath).isFile() && isImplementationProfile(profilePath, isCapabilityRoot(root))) {
2216
- return profilePath;
2220
+ out.push(profilePath);
2217
2221
  }
2218
2222
  }
2219
- return null;
2223
+ return out;
2220
2224
  }
2221
2225
  function listCapabilityActions(projectCapabilitiesRoot = getProjectCapabilitiesRoot()) {
2222
2226
  const seen = /* @__PURE__ */ new Set();
@@ -17967,11 +17971,13 @@ async function runExecutable(profileName, input) {
17967
17971
  `);
17968
17972
  return out;
17969
17973
  };
17970
- const profilePath = resolveProfilePath(profileName);
17971
- const profile = loadProfile(profilePath);
17972
- const missing = validateScriptReferences(profile, allScriptNames);
17974
+ const resolved = loadRunnableProfile(profileName);
17975
+ const { profilePath, profile, missing } = resolved;
17973
17976
  if (missing.length > 0) {
17974
- return finishAndEnd({ exitCode: 99, reason: `profile references unknown scripts: ${missing.join(", ")}` });
17977
+ return finishAndEnd({
17978
+ exitCode: 99,
17979
+ reason: `profile references unknown scripts: ${missing.join(", ")} (profile: ${profilePath})`
17980
+ });
17975
17981
  }
17976
17982
  let args;
17977
17983
  try {
@@ -18459,6 +18465,23 @@ function resolveProfilePath(profileName) {
18459
18465
  }
18460
18466
  return candidates[0];
18461
18467
  }
18468
+ function loadRunnableProfile(profileName) {
18469
+ const candidates = resolveExecutableCandidates(profileName);
18470
+ const skipped = [];
18471
+ for (const profilePath2 of candidates) {
18472
+ const profile2 = loadProfile(profilePath2);
18473
+ const missing = validateScriptReferences(profile2, allScriptNames);
18474
+ if (missing.length === 0) return { profilePath: profilePath2, profile: profile2, missing };
18475
+ skipped.push(`${profilePath2}: ${missing.join(", ")}`);
18476
+ }
18477
+ if (skipped.length > 0) {
18478
+ process.stderr.write(`[kody] skipping invalid profile override(s): ${skipped.join("; ")}
18479
+ `);
18480
+ }
18481
+ const profilePath = resolveProfilePath(profileName);
18482
+ const profile = loadProfile(profilePath);
18483
+ return { profilePath, profile, missing: validateScriptReferences(profile, allScriptNames) };
18484
+ }
18462
18485
  function validateInputs(specs, raw) {
18463
18486
  const out = {};
18464
18487
  const allowedKeys = /* @__PURE__ */ new Set(["_", "cwd", "verbose", "quiet"]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kody-ade/kody-engine",
3
- "version": "0.4.294",
3
+ "version": "0.4.296",
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",