@kody-ade/kody-engine-lite 0.1.39 → 0.1.41

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/cli.js +24 -4
  2. package/package.json +1 -1
package/dist/bin/cli.js CHANGED
@@ -1081,7 +1081,7 @@ var init_verify_runner = __esm({
1081
1081
 
1082
1082
  // src/observer.ts
1083
1083
  import { execFileSync as execFileSync5 } from "child_process";
1084
- async function diagnoseFailure(stageName, errorOutput, modifiedFiles, runner, model) {
1084
+ async function diagnoseFailure(stageName, errorOutput, modifiedFiles, runner, model, options) {
1085
1085
  const context = [
1086
1086
  `Stage: ${stageName}`,
1087
1087
  ``,
@@ -1100,7 +1100,8 @@ ${modifiedFiles.map((f) => `- ${f}`).join("\n")}` : "No files were modified (bui
1100
1100
  model,
1101
1101
  3e4,
1102
1102
  // 30s timeout — this should be fast
1103
- ""
1103
+ "",
1104
+ options
1104
1105
  );
1105
1106
  if (result.outcome === "completed" && result.output) {
1106
1107
  const cleaned = result.output.replace(/^```json\s*\n?/m, "").replace(/\n?```\s*$/m, "").trim();
@@ -1247,12 +1248,18 @@ async function executeVerifyWithAutofix(ctx, def) {
1247
1248
  const errorOutput = fs7.existsSync(verifyPath) ? fs7.readFileSync(verifyPath, "utf-8") : "Unknown error";
1248
1249
  const modifiedFiles = getModifiedFiles(ctx.projectDir);
1249
1250
  const defaultRunner = getRunnerForStage(ctx, "taskify");
1251
+ const diagConfig = getProjectConfig();
1252
+ const diagEnv = {};
1253
+ if (diagConfig.agent.litellmUrl) {
1254
+ diagEnv.ANTHROPIC_BASE_URL = diagConfig.agent.litellmUrl;
1255
+ }
1250
1256
  const diagnosis = await diagnoseFailure(
1251
1257
  "verify",
1252
1258
  errorOutput,
1253
1259
  modifiedFiles,
1254
1260
  defaultRunner,
1255
- resolveModel("cheap")
1261
+ resolveModel("cheap"),
1262
+ { cwd: ctx.projectDir, env: diagEnv }
1256
1263
  );
1257
1264
  if (diagnosis.classification === "infrastructure") {
1258
1265
  logger.warn(` Infrastructure issue: ${diagnosis.reason}`);
@@ -1988,7 +1995,15 @@ ${previousText}
1988
1995
  `;
1989
1996
  const runner = getRunnerForStage(ctx, "taskify");
1990
1997
  const model = resolveModel("cheap");
1991
- const result = await runner.run("retrospective", prompt, model, 3e4, "");
1998
+ const config = getProjectConfig();
1999
+ const extraEnv = {};
2000
+ if (config.agent.litellmUrl) {
2001
+ extraEnv.ANTHROPIC_BASE_URL = config.agent.litellmUrl;
2002
+ }
2003
+ const result = await runner.run("retrospective", prompt, model, 3e4, "", {
2004
+ cwd: ctx.projectDir,
2005
+ env: extraEnv
2006
+ });
1992
2007
  let observation = "Retrospective analysis unavailable";
1993
2008
  let patternMatch = null;
1994
2009
  let suggestion = "No suggestion";
@@ -2049,6 +2064,7 @@ var init_retrospective = __esm({
2049
2064
  "use strict";
2050
2065
  init_definitions();
2051
2066
  init_context();
2067
+ init_config();
2052
2068
  init_runner_selection();
2053
2069
  init_logger();
2054
2070
  RETROSPECTIVE_PROMPT = `You are a pipeline retrospective analyst. You observe automated software development pipeline runs and identify flaws, patterns, and improvement opportunities.
@@ -2706,6 +2722,10 @@ ${issue.body ?? ""}`;
2706
2722
  } else {
2707
2723
  logger.info(`LiteLLM proxy already running at ${config.agent.litellmUrl}`);
2708
2724
  }
2725
+ if (config.agent.litellmUrl) {
2726
+ process.env.ANTHROPIC_BASE_URL = config.agent.litellmUrl;
2727
+ logger.info(`ANTHROPIC_BASE_URL set to ${config.agent.litellmUrl}`);
2728
+ }
2709
2729
  }
2710
2730
  const runners = createRunners(config);
2711
2731
  const defaultRunnerName = config.agent.defaultRunner ?? Object.keys(runners)[0] ?? "claude";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kody-ade/kody-engine-lite",
3
- "version": "0.1.39",
3
+ "version": "0.1.41",
4
4
  "description": "Autonomous SDLC pipeline: Kody orchestration + Claude Code + LiteLLM",
5
5
  "license": "MIT",
6
6
  "type": "module",