@kody-ade/kody-engine 0.4.266 → 0.4.267

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 +11 -5
  2. package/package.json +1 -1
package/dist/bin/kody.js CHANGED
@@ -15,7 +15,7 @@ var init_package = __esm({
15
15
  "package.json"() {
16
16
  package_default = {
17
17
  name: "@kody-ade/kody-engine",
18
- version: "0.4.266",
18
+ version: "0.4.267",
19
19
  description: "kody \u2014 autonomous development engine. Single-session Claude Code agent behind a generic executor + declarative executable profiles.",
20
20
  license: "MIT",
21
21
  type: "module",
@@ -10651,7 +10651,10 @@ var init_dispatchNextTaskJob = __esm({
10651
10651
  import { execFileSync as execFileSync11 } from "child_process";
10652
10652
  function prMergeStatus(prNumber, cwd) {
10653
10653
  try {
10654
- const out = gh(["pr", "view", String(prNumber), "--json", "mergeable,mergeStateStatus"], { cwd });
10654
+ const out = gh(["pr", "view", String(prNumber), "--json", "mergeable,mergeStateStatus"], {
10655
+ cwd,
10656
+ preferRepoToken: true
10657
+ });
10655
10658
  const parsed = JSON.parse(out);
10656
10659
  const mergeable = parsed.mergeable ?? "UNKNOWN";
10657
10660
  const mergeStateStatus = parsed.mergeStateStatus ?? "UNKNOWN";
@@ -10738,7 +10741,7 @@ function findExistingPr(branch, cwd) {
10738
10741
  try {
10739
10742
  const output = gh(
10740
10743
  ["pr", "list", "--head", branch, "--state", "open", "--json", "number,url,body", "--limit", "1"],
10741
- { cwd }
10744
+ { cwd, preferRepoToken: true }
10742
10745
  );
10743
10746
  const arr = JSON.parse(output);
10744
10747
  const first = Array.isArray(arr) ? arr[0] : null;
@@ -10781,7 +10784,10 @@ function updateExistingPr(existing, body, draft, cwd) {
10781
10784
  const stripped = existing.url.replace(/^https:\/\/github\.com\//, "");
10782
10785
  const [owner, repo] = stripped.split("/");
10783
10786
  try {
10784
- gh(["api", "--method", "PATCH", `repos/${owner}/${repo}/pulls/${existing.number}`, "-f", `body=${body}`], { cwd });
10787
+ gh(["api", "--method", "PATCH", `repos/${owner}/${repo}/pulls/${existing.number}`, "-f", `body=${body}`], {
10788
+ cwd,
10789
+ preferRepoToken: true
10790
+ });
10785
10791
  } catch (err) {
10786
10792
  throw new Error(`gh api PATCH #${existing.number} failed: ${err instanceof Error ? err.message : String(err)}`);
10787
10793
  }
@@ -10790,7 +10796,7 @@ function updateExistingPr(existing, body, draft, cwd) {
10790
10796
  function createPr(branch, base, title, body, draft, cwd) {
10791
10797
  const args = ["pr", "create", "--head", branch, "--base", base, "--title", title, "--body-file", "-"];
10792
10798
  if (draft) args.push("--draft");
10793
- const url = gh(args, { input: body, cwd }).trim();
10799
+ const url = gh(args, { input: body, cwd, preferRepoToken: true }).trim();
10794
10800
  const match = url.match(/\/pull\/(\d+)$/);
10795
10801
  const number = match ? parseInt(match[1], 10) : 0;
10796
10802
  return { url, number, draft, action: "created" };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kody-ade/kody-engine",
3
- "version": "0.4.266",
3
+ "version": "0.4.267",
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",