@kody-ade/kody-engine 0.3.32 → 0.3.34

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.3.32",
6
+ version: "0.3.34",
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",
@@ -4967,8 +4967,8 @@ function postKodyComment(target, issueNumber, state, next, cwd) {
4967
4967
 
4968
4968
  // src/scripts/syncFlow.ts
4969
4969
  import { execFileSync as execFileSync19 } from "child_process";
4970
- var syncFlow = async (ctx) => {
4971
- ctx.skipAgent = true;
4970
+ var syncFlow = async (ctx, _profile, args) => {
4971
+ const announceOnSuccess = Boolean(args?.announceOnSuccess);
4972
4972
  const prNumber = ctx.args.pr;
4973
4973
  const pr = getPr(prNumber, ctx.cwd);
4974
4974
  if (pr.state !== "OPEN") {
@@ -4976,8 +4976,10 @@ var syncFlow = async (ctx) => {
4976
4976
  return;
4977
4977
  }
4978
4978
  ctx.data.pr = pr;
4979
- ctx.data.commentTargetType = "pr";
4980
- ctx.data.commentTargetNumber = prNumber;
4979
+ if (announceOnSuccess) {
4980
+ ctx.data.commentTargetType = "pr";
4981
+ ctx.data.commentTargetNumber = prNumber;
4982
+ }
4981
4983
  checkoutPrBranch(prNumber, ctx.cwd);
4982
4984
  ctx.data.branch = getCurrentBranch(ctx.cwd);
4983
4985
  const baseBranch = pr.baseRefName || ctx.config.git.defaultBranch;
@@ -4998,9 +5000,12 @@ var syncFlow = async (ctx) => {
4998
5000
  }
4999
5001
  const headAfter = revParseHead(ctx.cwd);
5000
5002
  if (headAfter === headBefore) {
5001
- ctx.output.exitCode = 0;
5002
- ctx.output.reason = `already up to date with origin/${baseBranch}`;
5003
- tryPostPr5(prNumber, `\u2139\uFE0F kody sync: already up to date with origin/${baseBranch}`, ctx.cwd);
5003
+ ctx.data.syncResult = "noop";
5004
+ if (announceOnSuccess) {
5005
+ ctx.output.exitCode = 0;
5006
+ ctx.output.reason = `already up to date with origin/${baseBranch}`;
5007
+ tryPostPr5(prNumber, `\u2139\uFE0F kody sync: already up to date with origin/${baseBranch}`, ctx.cwd);
5008
+ }
5004
5009
  return;
5005
5010
  }
5006
5011
  try {
@@ -5010,13 +5015,21 @@ var syncFlow = async (ctx) => {
5010
5015
  bail2(ctx, prNumber, `merge succeeded but push failed: ${msg}`);
5011
5016
  return;
5012
5017
  }
5013
- ctx.output.exitCode = 0;
5014
- ctx.output.reason = `merged origin/${baseBranch} into ${ctx.data.branch}`;
5015
- const runUrl = getRunUrl();
5016
- const runSuffix = runUrl ? ` ([logs](${runUrl}))` : "";
5017
- tryPostPr5(prNumber, `\u2705 kody sync: merged \`origin/${baseBranch}\` into \`${ctx.data.branch}\`${runSuffix}`, ctx.cwd);
5018
+ ctx.data.syncResult = "merged";
5019
+ if (announceOnSuccess) {
5020
+ ctx.output.exitCode = 0;
5021
+ ctx.output.reason = `merged origin/${baseBranch} into ${ctx.data.branch}`;
5022
+ const runUrl = getRunUrl();
5023
+ const runSuffix = runUrl ? ` ([logs](${runUrl}))` : "";
5024
+ tryPostPr5(
5025
+ prNumber,
5026
+ `\u2705 kody sync: merged \`origin/${baseBranch}\` into \`${ctx.data.branch}\`${runSuffix}`,
5027
+ ctx.cwd
5028
+ );
5029
+ }
5018
5030
  };
5019
5031
  function bail2(ctx, prNumber, reason) {
5032
+ ctx.skipAgent = true;
5020
5033
  ctx.output.exitCode = 1;
5021
5034
  ctx.output.reason = reason;
5022
5035
  const runUrl = getRunUrl();
@@ -60,6 +60,7 @@
60
60
  ],
61
61
  "scripts": {
62
62
  "preflight": [
63
+ { "script": "syncFlow" },
63
64
  {
64
65
  "script": "setLifecycleLabel",
65
66
  "with": {
@@ -41,6 +41,7 @@
41
41
  "cliTools": [],
42
42
  "scripts": {
43
43
  "preflight": [
44
+ { "script": "syncFlow" },
44
45
  {
45
46
  "script": "setLifecycleLabel",
46
47
  "with": {
File without changes
File without changes
File without changes
File without changes
@@ -16,8 +16,9 @@ If the plan above is non-empty, TREAT IT AS AUTHORITATIVE — follow its file li
16
16
  1. **Research** — read the issue carefully. Use Grep/Glob/Read to investigate the codebase: locate relevant files, understand existing patterns, check related tests, identify constraints. Do not edit anything yet.
17
17
  2. **Plan** — before any Edit/Write, output a short plan (5–10 lines): what files you'll change, the approach, what could go wrong. No fluff.
18
18
  3. **Build** — Edit/Write to implement the change. Stay within the plan; if you discover the plan was wrong, briefly say so and adjust.
19
- 4. **Verify** — run each quality command with Bash. On failure, fix the root cause and re-run. When reporting that a command passed, you MUST have just run it and seen exit code 0 in this session do not paraphrase prior output.
20
- 5. Your FINAL message must use this exact format (or a single `FAILED: <reason>` line on failure). The `PLAN_DEVIATIONS:` block is REQUIRED whenever a plan was provided.
19
+ 4. **Test** — for every new module you added and every behavior you changed, write or update tests. If the plan above contains a "Test plan" section, treat it as authoritative: every item there must produce a corresponding test. Match the repo's existing test layout (look at `tests/` or sibling `*.test.ts` files in the codebase to see the convention). Cover at least one happy path and one failure path per change. Skipping tests is a hard failure. A change may only be declared untestable if you can name the specific blocker (e.g., "no fake exists for the X SDK and stubbing it would mock the entire call surface"); vague "this is just config" claims are rejected. Untestable changes go in `PLAN_DEVIATIONS:` with the named blocker.
20
+ 5. **Verify** run each quality command with Bash. On failure, fix the root cause and re-run. When reporting that a command passed, you MUST have just run it and seen exit code 0 in this session — do not paraphrase prior output.
21
+ 6. Your FINAL message must use this exact format (or a single `FAILED: <reason>` line on failure). The `PLAN_DEVIATIONS:` block is REQUIRED whenever a plan was provided.
21
22
 
22
23
  ```
23
24
  DONE
@@ -36,7 +36,11 @@
36
36
  }
37
37
  },
38
38
  {
39
- "script": "syncFlow"
39
+ "script": "syncFlow",
40
+ "with": { "announceOnSuccess": true }
41
+ },
42
+ {
43
+ "script": "skipAgent"
40
44
  }
41
45
  ],
42
46
  "postflight": []
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kody-ade/kody-engine",
3
- "version": "0.3.32",
3
+ "version": "0.3.34",
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,6 +12,18 @@
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
+ },
15
27
  "dependencies": {
16
28
  "@anthropic-ai/claude-agent-sdk": "0.2.119"
17
29
  },
@@ -31,16 +43,5 @@
31
43
  "url": "git+https://github.com/aharonyaircohen/kody-engine.git"
32
44
  },
33
45
  "homepage": "https://github.com/aharonyaircohen/kody-engine",
34
- "bugs": "https://github.com/aharonyaircohen/kody-engine/issues",
35
- "scripts": {
36
- "kody": "tsx bin/kody.ts",
37
- "build": "tsup && node scripts/copy-assets.cjs",
38
- "test": "vitest run tests/unit tests/int --no-coverage",
39
- "test:e2e": "vitest run tests/e2e --no-coverage",
40
- "test:all": "vitest run tests --no-coverage",
41
- "typecheck": "tsc --noEmit",
42
- "lint": "biome check",
43
- "lint:fix": "biome check --write",
44
- "format": "biome format --write"
45
- }
46
- }
46
+ "bugs": "https://github.com/aharonyaircohen/kody-engine/issues"
47
+ }