@kody-ade/kody-engine-lite 0.1.121 → 0.1.122

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 +28 -21
  2. package/package.json +3 -3
package/dist/bin/cli.js CHANGED
@@ -4163,7 +4163,7 @@ function extractSummary(output, cmdName) {
4163
4163
  const lines = output.split("\n").filter((l) => summaryPatterns.test(l));
4164
4164
  return lines.slice(-3).map((l) => `[${cmdName}] ${l.trim()}`);
4165
4165
  }
4166
- function runQualityGates(taskDir, projectRoot) {
4166
+ function runQualityGates(taskDir, projectRoot, options) {
4167
4167
  const config = getProjectConfig();
4168
4168
  const cwd = projectRoot ?? process.cwd();
4169
4169
  const allErrors = [];
@@ -4187,10 +4187,28 @@ function runQualityGates(taskDir, projectRoot) {
4187
4187
  continue;
4188
4188
  }
4189
4189
  if (!result2.success) {
4190
- allPass = false;
4191
4190
  const errors = parseErrors(result2.output);
4192
- allErrors.push(...errors.map((e) => `[${name}] ${e}`));
4193
- rawOutputs.push({ name, output: result2.output.slice(-3e3) });
4191
+ if (name === "typecheck" && options?.onlyFailOnFiles && options.onlyFailOnFiles.length > 0) {
4192
+ const scopedFiles = new Set(options.onlyFailOnFiles);
4193
+ const errorLines = errors.filter((e) => {
4194
+ const fileMatch = e.match(/\b(src\/[^\s(:]+\.[a-z]+)/)?.[1];
4195
+ if (!fileMatch) return false;
4196
+ return scopedFiles.has(fileMatch) || options.onlyFailOnFiles.some((f) => f.endsWith(fileMatch) || fileMatch.endsWith(f));
4197
+ });
4198
+ if (errorLines.length === 0) {
4199
+ logger.warn(` [typecheck] errors found but none in scoped files \u2014 treating as pre-existing, skipping`);
4200
+ rawOutputs.push({ name, output: result2.output.slice(-3e3) });
4201
+ allSummary.push(...extractSummary(result2.output, name));
4202
+ continue;
4203
+ }
4204
+ allPass = false;
4205
+ allErrors.push(...errorLines.map((e) => `[${name}] ${e}`));
4206
+ rawOutputs.push({ name, output: result2.output.slice(-3e3) });
4207
+ } else {
4208
+ allPass = false;
4209
+ allErrors.push(...errors.map((e) => `[${name}] ${e}`));
4210
+ rawOutputs.push({ name, output: result2.output.slice(-3e3) });
4211
+ }
4194
4212
  }
4195
4213
  allSummary.push(...extractSummary(result2.output, name));
4196
4214
  }
@@ -5313,7 +5331,7 @@ ${previousText}
5313
5331
  const model = resolveModel("cheap");
5314
5332
  const config = getProjectConfig();
5315
5333
  const extraEnv = {};
5316
- if (needsLitellmProxy(config)) {
5334
+ if (anyStageNeedsProxy(config)) {
5317
5335
  extraEnv.ANTHROPIC_BASE_URL = getLitellmUrl();
5318
5336
  }
5319
5337
  const result2 = await runner.run("retrospective", prompt, model, 3e4, "", {
@@ -6000,26 +6018,15 @@ async function runResolve(options) {
6000
6018
  return { outcome: "failed", error: `Agent failed: ${result2.error}` };
6001
6019
  }
6002
6020
  logger.info(" Verifying resolution...");
6003
- const verify = runQualityGates(projectDir, projectDir);
6021
+ const verify = runQualityGates(projectDir, projectDir, { onlyFailOnFiles: conflictedFiles });
6004
6022
  if (!verify.pass) {
6005
- const errorText = verify.errors.join("\n");
6006
- const errorFilePaths = errorText.match(/src\/[^\s(:]+\.[a-z]+/g) ?? [];
6007
- const resolvedSet = new Set(conflictedFiles);
6008
- const allPreExisting = errorFilePaths.length > 0 && errorFilePaths.every(
6009
- (f) => !resolvedSet.has(f) && !conflictedFiles.some((c) => c.endsWith(f))
6010
- );
6011
- if (allPreExisting) {
6012
- logger.warn(" Verification: all errors in files not touched by resolution \u2014 treating as pre-existing, proceeding");
6013
- } else {
6014
- const errorSummary = verify.errors.slice(0, 5).join("\n");
6015
- logger.error(` Verification failed:
6023
+ const errorSummary = verify.errors.slice(0, 5).join("\n");
6024
+ logger.error(` Verification failed:
6016
6025
  ${errorSummary}`);
6017
- return { outcome: "failed", error: `Conflict resolution failed verification:
6026
+ return { outcome: "failed", error: `Conflict resolution failed verification:
6018
6027
  ${errorSummary}` };
6019
- }
6020
- } else {
6021
- logger.info(" Verification passed");
6022
6028
  }
6029
+ logger.info(" Verification passed");
6023
6030
  commitAll(`chore: resolve merge conflicts with ${defaultBranch}`, projectDir);
6024
6031
  if (!local) {
6025
6032
  pushBranch(projectDir);
package/package.json CHANGED
@@ -1,7 +1,6 @@
1
1
  {
2
2
  "name": "@kody-ade/kody-engine-lite",
3
-
4
- "version": "0.1.121",
3
+ "version": "0.1.122",
5
4
  "description": "Autonomous SDLC pipeline: Kody orchestration + Claude Code + LiteLLM",
6
5
  "license": "MIT",
7
6
  "type": "module",
@@ -19,7 +18,8 @@
19
18
  "build": "tsup",
20
19
  "test": "vitest run",
21
20
  "typecheck": "tsc --noEmit",
22
- "prepublishOnly": "pnpm build"
21
+ "prepublishOnly": "pnpm build",
22
+ "release": "npm publish --access public && bash scripts/wait-for-npm.sh"
23
23
  },
24
24
  "dependencies": {
25
25
  "dotenv": "^16.4.7"