@kody-ade/kody-engine 0.4.295 → 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 +27 -10
  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.295",
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();
@@ -17654,9 +17658,6 @@ var init_scripts = __esm({
17654
17658
  postReviewResult,
17655
17659
  persistArtifacts,
17656
17660
  writeAgentRunSummary,
17657
- // Deprecated profile compatibility. Older external capability profiles used
17658
- // this name before the summary writer was made agent-result specific.
17659
- writeRunSummary: writeAgentRunSummary,
17660
17661
  saveTaskState,
17661
17662
  mirrorStateToPr,
17662
17663
  startFlow,
@@ -17970,9 +17971,8 @@ async function runExecutable(profileName, input) {
17970
17971
  `);
17971
17972
  return out;
17972
17973
  };
17973
- const profilePath = resolveProfilePath(profileName);
17974
- const profile = loadProfile(profilePath);
17975
- const missing = validateScriptReferences(profile, allScriptNames);
17974
+ const resolved = loadRunnableProfile(profileName);
17975
+ const { profilePath, profile, missing } = resolved;
17976
17976
  if (missing.length > 0) {
17977
17977
  return finishAndEnd({
17978
17978
  exitCode: 99,
@@ -18465,6 +18465,23 @@ function resolveProfilePath(profileName) {
18465
18465
  }
18466
18466
  return candidates[0];
18467
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
+ }
18468
18485
  function validateInputs(specs, raw) {
18469
18486
  const out = {};
18470
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.295",
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",