@kody-ade/kody-engine-lite 0.1.96 → 0.1.97

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/cli.js CHANGED
@@ -444,8 +444,8 @@ function ensureFeatureBranch(issueNumber, title, cwd) {
444
444
  logger.info(` Created new branch: ${branchName}`);
445
445
  return branchName;
446
446
  }
447
- function syncWithDefault(cwd) {
448
- const defaultBranch = getDefaultBranch(cwd);
447
+ function syncWithDefault(cwd, branch) {
448
+ const defaultBranch = branch ?? getDefaultBranch(cwd);
449
449
  const current = getCurrentBranch(cwd);
450
450
  if (current === defaultBranch) return;
451
451
  try {
@@ -566,14 +566,6 @@ function getIssue(issueNumber) {
566
566
  return null;
567
567
  }
568
568
  }
569
- function closeIssue(issueNumber) {
570
- try {
571
- gh(["issue", "close", String(issueNumber)]);
572
- logger.info(` Issue #${issueNumber} closed`);
573
- } catch (err) {
574
- logger.warn(` Failed to close issue #${issueNumber}: ${err}`);
575
- }
576
- }
577
569
  function getIssueLabels(issueNumber) {
578
570
  try {
579
571
  const output = gh(["issue", "view", String(issueNumber), "--json", "labels", "--jq", ".labels[].name"]);
@@ -2549,9 +2541,6 @@ PR #${existingPr.number}
2549
2541
  postComment(ctx.input.issueNumber, `\u{1F389} PR created: ${pr.url}`);
2550
2542
  } catch {
2551
2543
  }
2552
- if (ctx.input.issueNumber !== ctx.input.prNumber) {
2553
- closeIssue(ctx.input.issueNumber);
2554
- }
2555
2544
  }
2556
2545
  fs12.writeFileSync(shipPath, `# Ship
2557
2546
 
@@ -3184,7 +3173,7 @@ function ensureFeatureBranchIfNeeded(ctx) {
3184
3173
  if (ctx.input.dryRun) return;
3185
3174
  if (ctx.input.prNumber) {
3186
3175
  try {
3187
- syncWithDefault(ctx.projectDir);
3176
+ syncWithDefault(ctx.projectDir, ctx.input.prBaseBranch);
3188
3177
  } catch (err) {
3189
3178
  logger.warn(` Failed to sync with default branch: ${err}`);
3190
3179
  }
@@ -4218,6 +4207,13 @@ ${input.feedback}`);
4218
4207
  console.error(`Runner "${defaultRunnerName}" health check failed`);
4219
4208
  process.exit(1);
4220
4209
  }
4210
+ let prBaseBranch;
4211
+ if (input.prNumber) {
4212
+ const prDetails = getPRDetails(input.prNumber);
4213
+ if (prDetails) {
4214
+ prBaseBranch = prDetails.baseBranch;
4215
+ }
4216
+ }
4221
4217
  const ctx = {
4222
4218
  taskId,
4223
4219
  taskDir,
@@ -4229,6 +4225,7 @@ ${input.feedback}`);
4229
4225
  dryRun: input.dryRun,
4230
4226
  issueNumber: input.issueNumber,
4231
4227
  prNumber: input.prNumber,
4228
+ prBaseBranch,
4232
4229
  feedback: input.feedback,
4233
4230
  local: input.local,
4234
4231
  complexity: input.complexity
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kody-ade/kody-engine-lite",
3
- "version": "0.1.96",
3
+ "version": "0.1.97",
4
4
  "description": "Autonomous SDLC pipeline: Kody orchestration + Claude Code + LiteLLM",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -113,7 +113,10 @@ jobs:
113
113
  esac
114
114
  FROM_STAGE=$(echo "$KODY_ARGS" | grep -oP '(?<=--from )\S+' || echo "")
115
115
  FEEDBACK=$(echo "$KODY_ARGS" | grep -oP '(?<=--feedback ")[^"]*' || echo "")
116
- COMPLEXITY=$(echo "$KODY_ARGS" | grep -oP '(?<=--complexity )\S+' || echo "")
116
+ COMPLEXITY=""
117
+ if echo "$KODY_ARGS" | grep -q -- '--complexity'; then
118
+ COMPLEXITY=$(echo "$KODY_ARGS" | tr ' ' '\n' | grep -A1 -- '--complexity' | tail -1)
119
+ fi
117
120
  DRY_RUN="false"
118
121
  if echo "$KODY_ARGS" | grep -q -- '--dry-run'; then
119
122
  DRY_RUN="true"