@kody-ade/kody-engine 0.4.53 → 0.4.55

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/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.53",
6
+ version: "0.4.55",
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",
@@ -3821,6 +3821,14 @@ function mergePrSquash(prNumber, cwd) {
3821
3821
  return fail(err);
3822
3822
  }
3823
3823
  }
3824
+ function editPrBase(prNumber, baseBranch, cwd) {
3825
+ try {
3826
+ gh(["pr", "edit", String(prNumber), "--base", baseBranch], { cwd });
3827
+ return { ok: true };
3828
+ } catch (err) {
3829
+ return fail(err);
3830
+ }
3831
+ }
3824
3832
  function markPrReady(prNumber, cwd) {
3825
3833
  try {
3826
3834
  gh(["pr", "ready", String(prNumber)], { cwd });
@@ -5432,7 +5440,19 @@ var finalizeGoal = async (ctx) => {
5432
5440
  return;
5433
5441
  }
5434
5442
  }
5435
- process.stdout.write(`[goal-tick] squash-merging PR #${pr.number} (base=${pr.baseRefName}, head=${pr.headRefName})
5443
+ if (pr.baseRefName !== goal.defaultBranch) {
5444
+ process.stdout.write(
5445
+ `[goal-tick] retargeting PR #${pr.number} base ${pr.baseRefName} \u2192 ${goal.defaultBranch}
5446
+ `
5447
+ );
5448
+ const retarget = editPrBase(pr.number, goal.defaultBranch, ctx.cwd);
5449
+ if (!retarget.ok) {
5450
+ process.stderr.write(`[goal-tick] finalizeGoal: editPrBase #${pr.number} failed: ${retarget.error}
5451
+ `);
5452
+ return;
5453
+ }
5454
+ }
5455
+ process.stdout.write(`[goal-tick] squash-merging PR #${pr.number} \u2192 ${goal.defaultBranch} (head=${pr.headRefName})
5436
5456
  `);
5437
5457
  const merged = mergePrSquash(pr.number, ctx.cwd);
5438
5458
  if (!merged.ok) {
@@ -5451,6 +5471,12 @@ function extractIssueNumber(pr) {
5451
5471
 
5452
5472
  // src/scripts/finishFlow.ts
5453
5473
  import { execFileSync as execFileSync14 } from "child_process";
5474
+ var TERMINAL_PHASE = {
5475
+ "review-passed": { phase: "shipped", status: "succeeded" },
5476
+ "fix-applied": { phase: "shipped", status: "succeeded" },
5477
+ "review-failed": { phase: "failed", status: "failed" },
5478
+ aborted: { phase: "failed", status: "failed" }
5479
+ };
5454
5480
  var API_TIMEOUT_MS6 = 3e4;
5455
5481
  var STATUS_ICON = {
5456
5482
  "review-passed": "\u2705",
@@ -5495,6 +5521,22 @@ var finishFlow = async (ctx, profile, _agentResult, args) => {
5495
5521
  `
5496
5522
  );
5497
5523
  }
5524
+ const terminal = TERMINAL_PHASE[reason];
5525
+ if (terminal && state) {
5526
+ state.core.phase = terminal.phase;
5527
+ state.core.status = terminal.status;
5528
+ state.core.currentExecutable = null;
5529
+ const target = ctx.data.commentTargetType ?? "issue";
5530
+ const targetNumber = ctx.data.commentTargetNumber ?? issueNumber;
5531
+ try {
5532
+ writeTaskState(target, targetNumber, state, ctx.cwd);
5533
+ } catch (err) {
5534
+ process.stderr.write(
5535
+ `[kody finishFlow] failed to update state mirror: ${err instanceof Error ? err.message : String(err)}
5536
+ `
5537
+ );
5538
+ }
5539
+ }
5498
5540
  };
5499
5541
 
5500
5542
  // src/branch.ts
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kody-ade/kody-engine",
3
- "version": "0.4.53",
3
+ "version": "0.4.55",
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",
@@ -12,18 +12,6 @@
12
12
  "templates",
13
13
  "kody.config.schema.json"
14
14
  ],
15
- "scripts": {
16
- "kody": "tsx bin/kody.ts",
17
- "build": "tsup && node scripts/copy-assets.cjs",
18
- "test": "vitest run tests/unit tests/int --no-coverage",
19
- "test:e2e": "vitest run tests/e2e --no-coverage",
20
- "test:all": "vitest run tests --no-coverage",
21
- "typecheck": "tsc --noEmit",
22
- "lint": "biome check",
23
- "lint:fix": "biome check --write",
24
- "format": "biome format --write",
25
- "prepublishOnly": "pnpm build"
26
- },
27
15
  "dependencies": {
28
16
  "@actions/cache": "^6.0.0",
29
17
  "@anthropic-ai/claude-agent-sdk": "0.2.119"
@@ -44,5 +32,16 @@
44
32
  "url": "git+https://github.com/aharonyaircohen/kody-engine.git"
45
33
  },
46
34
  "homepage": "https://github.com/aharonyaircohen/kody-engine",
47
- "bugs": "https://github.com/aharonyaircohen/kody-engine/issues"
48
- }
35
+ "bugs": "https://github.com/aharonyaircohen/kody-engine/issues",
36
+ "scripts": {
37
+ "kody": "tsx bin/kody.ts",
38
+ "build": "tsup && node scripts/copy-assets.cjs",
39
+ "test": "vitest run tests/unit tests/int --no-coverage",
40
+ "test:e2e": "vitest run tests/e2e --no-coverage",
41
+ "test:all": "vitest run tests --no-coverage",
42
+ "typecheck": "tsc --noEmit",
43
+ "lint": "biome check",
44
+ "lint:fix": "biome check --write",
45
+ "format": "biome format --write"
46
+ }
47
+ }