@kody-ade/kody-engine 0.4.8 → 0.4.9

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 +15 -3
  2. package/package.json +1 -1
package/dist/bin/kody.js CHANGED
@@ -3,7 +3,7 @@
3
3
  // package.json
4
4
  var package_default = {
5
5
  name: "@kody-ade/kody-engine",
6
- version: "0.4.8",
6
+ version: "0.4.9",
7
7
  description: "kody \u2014 autonomous development engine. Single-session Claude Code agent behind a generic executor + declarative executable profiles.",
8
8
  license: "MIT",
9
9
  type: "module",
@@ -6518,14 +6518,18 @@ var runFlow = async (ctx) => {
6518
6518
  ctx.data.issue = issue;
6519
6519
  ctx.data.commentTargetType = "issue";
6520
6520
  ctx.data.commentTargetNumber = issueNumber;
6521
+ const labelBase = resolveBaseFromLabels(issue.labels ?? []);
6522
+ const argBase = resolveBaseOverride(ctx.args.base);
6521
6523
  const baseRaw = ctx.args.base;
6522
- const base = resolveBaseOverride(baseRaw);
6523
- if (baseRaw && !base) {
6524
+ if (baseRaw && !argBase) {
6524
6525
  process.stderr.write(`[kody runFlow] ignoring --base "${baseRaw}" (must match /^goal-[a-z0-9-]+$/)
6525
6526
  `);
6526
6527
  }
6528
+ const base = labelBase ?? argBase;
6527
6529
  if (base) {
6528
6530
  ctx.data.baseBranch = base;
6531
+ process.stderr.write(`[kody runFlow] resolved base branch: ${base} (${labelBase ? "from labels" : "from --base"})
6532
+ `);
6529
6533
  }
6530
6534
  try {
6531
6535
  const branchInfo = ensureFeatureBranch(issueNumber, issue.title, ctx.config.git.defaultBranch, ctx.cwd, base ?? void 0);
@@ -6554,6 +6558,14 @@ function resolveBaseOverride(value) {
6554
6558
  if (!value) return null;
6555
6559
  return /^goal-[a-z0-9-]+$/.test(value) ? value : null;
6556
6560
  }
6561
+ function resolveBaseFromLabels(labels) {
6562
+ if (!labels.includes("goal-runner:dispatched")) return null;
6563
+ const goalLabel = labels.find((l) => l.startsWith("goal:"));
6564
+ if (!goalLabel) return null;
6565
+ const goalId = goalLabel.slice("goal:".length);
6566
+ if (!/^[a-z0-9-]+$/.test(goalId)) return null;
6567
+ return `goal-${goalId}`;
6568
+ }
6557
6569
 
6558
6570
  // src/scripts/saveTaskState.ts
6559
6571
  var saveTaskState = async (ctx, profile) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kody-ade/kody-engine",
3
- "version": "0.4.8",
3
+ "version": "0.4.9",
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",