@kody-ade/kody-engine 0.4.49 → 0.4.51

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 +23 -2
  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.49",
6
+ version: "0.4.51",
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",
@@ -4487,6 +4487,10 @@ var dispatchClassified = async (ctx) => {
4487
4487
  if (!classification || !VALID_CLASSES2.has(classification)) return;
4488
4488
  const baseArg = typeof ctx.args.base === "string" && ctx.args.base.length > 0 ? ` --base ${ctx.args.base}` : "";
4489
4489
  const body = `@kody ${classification}${baseArg}`;
4490
+ process.stderr.write(
4491
+ `[kody dispatchClassified] ctx.args.base=${JSON.stringify(ctx.args.base)} typeof=${typeof ctx.args.base} ctx.args=${JSON.stringify(ctx.args)}
4492
+ `
4493
+ );
4490
4494
  try {
4491
4495
  execFileSync13("gh", ["issue", "comment", String(issueNumber), "--body", body], {
4492
4496
  cwd: ctx.cwd,
@@ -7184,7 +7188,7 @@ var FAILED_LABEL_SPEC = {
7184
7188
  color: "e11d21",
7185
7189
  description: "kody: flow failed"
7186
7190
  };
7187
- var postIssueComment2 = async (ctx) => {
7191
+ var postIssueComment2 = async (ctx, profile) => {
7188
7192
  if (ctx.skipAgent && ctx.output.exitCode !== void 0) return;
7189
7193
  const targetType = ctx.data.commentTargetType;
7190
7194
  const targetNumber = Number(ctx.data.commentTargetNumber ?? 0);
@@ -7195,6 +7199,18 @@ var postIssueComment2 = async (ctx) => {
7195
7199
  if (!commitResult?.committed && !hasCommits) {
7196
7200
  const specific = computeFailureReason2(ctx);
7197
7201
  const reason = specific.length > 0 ? specific : "no changes to commit";
7202
+ const containerParent = process.env.KODY_CONTAINER_PARENT;
7203
+ if (containerParent) {
7204
+ postWith(
7205
+ targetType,
7206
+ targetNumber,
7207
+ `\u2139\uFE0F kody ${profile.name}: ${truncate2(reason, 1200)} \u2014 ${containerParent} container will route to the next stage`,
7208
+ ctx.cwd
7209
+ );
7210
+ ctx.output.exitCode = 3;
7211
+ ctx.output.reason = reason;
7212
+ return;
7213
+ }
7198
7214
  postWith(targetType, targetNumber, `\u26A0\uFE0F kody FAILED: ${truncate2(reason, 1500)}`, ctx.cwd);
7199
7215
  markRunFailed(ctx);
7200
7216
  ctx.output.exitCode = 3;
@@ -9657,6 +9673,8 @@ async function runContainerLoop(profile, ctx, input) {
9657
9673
  }
9658
9674
  let childOut;
9659
9675
  const childStartedAt = Date.now();
9676
+ const priorParent = process.env.KODY_CONTAINER_PARENT;
9677
+ process.env.KODY_CONTAINER_PARENT = profile.name;
9660
9678
  try {
9661
9679
  childOut = await runChild(child.exec, {
9662
9680
  cliArgs,
@@ -9689,6 +9707,9 @@ async function runContainerLoop(profile, ctx, input) {
9689
9707
  ctx.output.exitCode = 1;
9690
9708
  ctx.output.reason = `child "${child.exec}" crashed: ${msg}`;
9691
9709
  return;
9710
+ } finally {
9711
+ if (priorParent === void 0) delete process.env.KODY_CONTAINER_PARENT;
9712
+ else process.env.KODY_CONTAINER_PARENT = priorParent;
9692
9713
  }
9693
9714
  const priorAttempts = priorState.core?.attempts?.[child.exec] ?? 0;
9694
9715
  const next = readContainerState(ctx, child, reader);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kody-ade/kody-engine",
3
- "version": "0.4.49",
3
+ "version": "0.4.51",
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",