@kody-ade/kody-engine 0.3.70-beta.3 → 0.3.70-beta.5

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.70-beta.3",
6
+ version: "0.3.70-beta.5",
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",
@@ -91,8 +91,23 @@ open_deploy_pr() {
91
91
  if [[ -n "$existing" ]]; then
92
92
  echo " reusing existing deploy PR: ${existing}" >&2
93
93
  pr_url="$existing"
94
- if ! printf '%s' "$body" | gh pr edit "$pr_url" --body-file - >/dev/null 2>&1; then
95
- echo "[deploy] WARN: failed to refresh deploy PR body" >&2
94
+ # Refresh body via REST API instead of `gh pr edit` gh's edit path
95
+ # uses GraphQL which requires read:org scope on KODY_TOKEN. REST PATCH
96
+ # works with plain `repo` scope.
97
+ local pr_num="${pr_url##*/}"
98
+ local owner="${KODY_CFG_GITHUB_OWNER:-}"
99
+ local repo="${KODY_CFG_GITHUB_REPO:-}"
100
+ if [[ -z "$owner" || -z "$repo" ]]; then
101
+ # Fall back to extracting from the URL if config missing.
102
+ local stripped="${pr_url#https://github.com/}"
103
+ owner="${stripped%%/*}"
104
+ repo=$(echo "$stripped" | cut -d/ -f2)
105
+ fi
106
+ local edit_err
107
+ if ! edit_err=$(gh api --method PATCH "repos/${owner}/${repo}/pulls/${pr_num}" -f body="$body" 2>&1 >/dev/null); then
108
+ echo "[deploy] WARN: failed to refresh deploy PR body for ${pr_url}: ${edit_err}" >&2
109
+ else
110
+ echo " refreshed deploy PR body via REST" >&2
96
111
  fi
97
112
  else
98
113
  if ! pr_url=$(printf '%s' "$body" | gh pr create --head "$default_branch" --base "$release_branch" --title "deploy: ${default_branch} → ${release_branch} (v${new_version})" --body-file -); then
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kody-ade/kody-engine",
3
- "version": "0.3.70-beta.3",
3
+ "version": "0.3.70-beta.5",
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",