@kody-ade/kody-engine 0.4.222 → 0.4.224

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.
@@ -44,6 +44,7 @@ dry_run="${KODY_ARG_DRY_RUN:-false}"
44
44
  prefer="${KODY_ARG_PREFER:-}"
45
45
 
46
46
  default_branch="${KODY_CFG_GIT_DEFAULTBRANCH:-main}"
47
+ release_branch="${KODY_CFG_RELEASE_RELEASEBRANCH:-}"
47
48
  notify_cmd="${KODY_CFG_RELEASE_NOTIFYCOMMAND:-}"
48
49
  notify_timeout_s=$(( ${KODY_CFG_RELEASE_TIMEOUTMS:-600000} / 1000 ))
49
50
 
@@ -68,6 +69,97 @@ if [[ ! -f package.json ]]; then
68
69
  exit 1
69
70
  fi
70
71
 
72
+ read_pkg_version_from_ref() {
73
+ local ref="$1"
74
+ git show "${ref}:package.json" 2>/dev/null | node -e 'let s=""; process.stdin.on("data", c => s += c); process.stdin.on("end", () => { try { console.log(JSON.parse(s).version || "") } catch { process.exit(1) } })'
75
+ }
76
+
77
+ finish_release_with_deploy() {
78
+ local version="$1"
79
+ local tag="$2"
80
+ local release_url="${3:-}"
81
+
82
+ current_step="deploy"
83
+ set +e
84
+ deploy_pr_url=$(open_deploy_pr "$version" "$issue")
85
+ deploy_rc=$?
86
+ set -e
87
+ if [[ "$deploy_rc" -ne 0 ]]; then
88
+ echo "[release] deploy step failed (rc=${deploy_rc}) — published v${version} but ${default_branch}→${release_branch} promotion PR was not opened" >&2
89
+ echo "KODY_REASON=release v${version}: published, but ${default_branch}→${release_branch} deploy PR failed"
90
+ echo "RELEASE_TAG=${tag}"
91
+ [[ -n "$release_url" ]] && echo "RELEASE_URL=${release_url}"
92
+ echo "RELEASE_FAILED=true"
93
+ exit 1
94
+ fi
95
+ if [[ -z "$deploy_pr_url" ]]; then
96
+ echo " (deploy: no-op — single-branch repo)"
97
+ else
98
+ echo "✓ deploy: ${deploy_pr_url}"
99
+ fi
100
+
101
+ current_step="notify"
102
+ notify_status="skipped"
103
+ if [[ -n "$notify_cmd" ]]; then
104
+ cmd="${notify_cmd//\$VERSION/$version}"
105
+ cmd="${cmd//\$DEPLOY_PR_URL/${deploy_pr_url:-}}"
106
+ echo " notify: ${cmd}"
107
+ if timeout "$notify_timeout_s" bash -c "$cmd"; then
108
+ notify_status="ok"
109
+ else
110
+ notify_status="failed"
111
+ echo "[release] notifyCommand failed (non-fatal)" >&2
112
+ fi
113
+ fi
114
+
115
+ current_step="done"
116
+ [[ -n "$deploy_pr_url" ]] && echo "KODY_PR_URL=${deploy_pr_url}"
117
+ echo "RELEASE_TAG=${tag}"
118
+ [[ -n "$release_url" ]] && echo "RELEASE_URL=${release_url}"
119
+ [[ -n "$deploy_pr_url" ]] && echo "RELEASE_DEPLOY_PR=${deploy_pr_url}"
120
+ echo "KODY_REASON=release v${version} complete (notify=${notify_status})"
121
+ echo "RELEASE_COMPLETED=true"
122
+ echo "KODY_SKIP_AGENT=true"
123
+ }
124
+
125
+ resume_prepared_release_if_needed() {
126
+ [[ -n "$release_branch" && "$release_branch" != "$default_branch" ]] || return 1
127
+
128
+ current_step="resume-check"
129
+ git fetch origin "$default_branch" "$release_branch" --tags
130
+
131
+ local default_version release_version
132
+ default_version=$(read_pkg_version_from_ref "origin/${default_branch}" || echo "")
133
+ release_version=$(read_pkg_version_from_ref "origin/${release_branch}" || echo "")
134
+ [[ -n "$default_version" && -n "$release_version" ]] || return 1
135
+ [[ "$default_version" != "$release_version" ]] || return 1
136
+
137
+ local version="$default_version"
138
+ local tag="v${version}"
139
+ echo "→ release: resuming prepared ${tag}; ${default_branch} is not promoted to ${release_branch}"
140
+
141
+ current_step="publish"
142
+ git checkout "$default_branch"
143
+ git reset --hard "origin/$default_branch"
144
+
145
+ local publish_status release_url
146
+ publish_status=$(tag_and_publish "$version")
147
+ release_url=$(create_gh_release "$tag" || echo "")
148
+ echo "✓ publish: tag=${tag} status=${publish_status} release_url=${release_url:-<none>}"
149
+ if [[ "$publish_status" == "failed" ]]; then
150
+ echo "[release] publishCommand failed but tag + GH release exist" >&2
151
+ echo "KODY_REASON=tag + GH release created, but publishCommand failed"
152
+ echo "RELEASE_FAILED=true"
153
+ echo "KODY_SKIP_AGENT=true"
154
+ exit 1
155
+ fi
156
+
157
+ finish_release_with_deploy "$version" "$tag" "$release_url"
158
+ exit 0
159
+ }
160
+
161
+ resume_prepared_release_if_needed
162
+
71
163
  # ── 1. Prepare ────────────────────────────────────────────────────────────
72
164
  current_step="prepare"
73
165
  old_version=$(read_pkg_version)
@@ -134,50 +226,5 @@ if [[ "$publish_status" == "failed" ]]; then
134
226
  exit 1
135
227
  fi
136
228
 
137
- # ── 5. Deploy PR (default → release branch) ───────────────────────────────
138
- # Distinguish three outcomes: rc!=0 is a real failure (do NOT mask as no-op);
139
- # rc==0 + empty URL is a genuine single-branch no-op; rc==0 + URL is success.
140
- current_step="deploy"
141
- set +e
142
- deploy_pr_url=$(open_deploy_pr "$new_version" "$issue")
143
- deploy_rc=$?
144
- set -e
145
- release_branch="${KODY_CFG_RELEASE_RELEASEBRANCH:-}"
146
- if [[ "$deploy_rc" -ne 0 ]]; then
147
- echo "[release] deploy step failed (rc=${deploy_rc}) — published v${new_version} but the ${default_branch}→${release_branch} promotion PR was not opened" >&2
148
- echo "KODY_REASON=release v${new_version}: published, but the ${default_branch}→${release_branch} deploy PR failed"
149
- echo "RELEASE_TAG=${tag}"
150
- [[ -n "$release_url" ]] && echo "RELEASE_URL=${release_url}"
151
- echo "RELEASE_FAILED=true"
152
- exit 1
153
- fi
154
- if [[ -z "$deploy_pr_url" ]]; then
155
- echo " (deploy: no-op — single-branch repo)"
156
- else
157
- echo "✓ deploy: ${deploy_pr_url}"
158
- fi
159
-
160
- # ── 6. Notify ─────────────────────────────────────────────────────────────
161
- current_step="notify"
162
- notify_status="skipped"
163
- if [[ -n "$notify_cmd" ]]; then
164
- cmd="${notify_cmd//\$VERSION/$new_version}"
165
- cmd="${cmd//\$DEPLOY_PR_URL/${deploy_pr_url:-}}"
166
- echo " notify: ${cmd}"
167
- if timeout "$notify_timeout_s" bash -c "$cmd"; then
168
- notify_status="ok"
169
- else
170
- notify_status="failed"
171
- echo "[release] notifyCommand failed (non-fatal)" >&2
172
- fi
173
- fi
174
-
175
- # ── 7. Done ───────────────────────────────────────────────────────────────
176
- current_step="done"
177
- [[ -n "$deploy_pr_url" ]] && echo "KODY_PR_URL=${deploy_pr_url}"
178
- echo "RELEASE_TAG=${tag}"
179
- [[ -n "$release_url" ]] && echo "RELEASE_URL=${release_url}"
180
- [[ -n "$deploy_pr_url" ]] && echo "RELEASE_DEPLOY_PR=${deploy_pr_url}"
181
- echo "KODY_REASON=release v${new_version} complete (notify=${notify_status})"
182
- echo "RELEASE_COMPLETED=true"
183
- echo "KODY_SKIP_AGENT=true"
229
+ finish_release_with_deploy "$new_version" "$tag" "$release_url"
230
+ exit 0
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -63,6 +63,11 @@
63
63
  "pattern": "^[^/]+/.+$",
64
64
  "description": "Base provider/model string, for example minimax/MiniMax-M3 or claude/claude-sonnet-4-6."
65
65
  },
66
+ "reasoningEffort": {
67
+ "type": "string",
68
+ "enum": ["off", "low", "medium", "high"],
69
+ "description": "Default thinking effort for the Claude Agent SDK. Maps to maxThinkingTokens. 'off' (default) skips the thinking block entirely — no reasoning preamble, no extra tokens. 'low'/'medium'/'high' enable extended thinking with budgets 2_048/10_000/32_000. Overridable per-session via the REASONING_EFFORT env var or the dashboard's chat-level thinking dropdown."
70
+ },
66
71
  "perExecutable": {
67
72
  "type": "object",
68
73
  "description": "Optional provider/model override by executable name.",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kody-ade/kody-engine",
3
- "version": "0.4.222",
3
+ "version": "0.4.224",
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,26 @@
12
12
  "templates",
13
13
  "kody.config.schema.json"
14
14
  ],
15
+ "scripts": {
16
+ "kody:run": "tsx bin/kody.ts",
17
+ "serve": "tsx bin/kody.ts serve",
18
+ "serve:vscode": "tsx bin/kody.ts serve vscode",
19
+ "serve:claude": "tsx bin/kody.ts serve claude",
20
+ "build": "tsup && node scripts/copy-assets.cjs",
21
+ "check:modularity": "tsx scripts/check-script-modularity.ts",
22
+ "pretest": "pnpm check:modularity",
23
+ "test": "vitest run tests/unit tests/int --coverage",
24
+ "posttest": "tsx scripts/check-coverage-floor.ts",
25
+ "test:smoke": "vitest run tests/smoke --no-coverage",
26
+ "test:e2e": "vitest run tests/e2e --no-coverage",
27
+ "test:all": "vitest run tests --no-coverage",
28
+ "typecheck": "tsc --noEmit",
29
+ "lint": "biome check",
30
+ "lint:fix": "biome check --write",
31
+ "format": "biome format --write",
32
+ "brain:publish": "docker buildx build --platform linux/amd64 -f runner/Dockerfile.brain -t ghcr.io/${KODY_BRAIN_GHCR_OWNER:-aharonyaircohen}/kody-brain:latest --push runner",
33
+ "prepublishOnly": "pnpm typecheck && vitest run tests/unit tests/int --no-coverage && pnpm build"
34
+ },
15
35
  "dependencies": {
16
36
  "@actions/cache": "^6.0.0",
17
37
  "@anthropic-ai/claude-agent-sdk": "0.2.119",
@@ -35,24 +55,5 @@
35
55
  "url": "git+https://github.com/aharonyaircohen/kody-engine.git"
36
56
  },
37
57
  "homepage": "https://github.com/aharonyaircohen/kody-engine",
38
- "bugs": "https://github.com/aharonyaircohen/kody-engine/issues",
39
- "scripts": {
40
- "kody:run": "tsx bin/kody.ts",
41
- "serve": "tsx bin/kody.ts serve",
42
- "serve:vscode": "tsx bin/kody.ts serve vscode",
43
- "serve:claude": "tsx bin/kody.ts serve claude",
44
- "build": "tsup && node scripts/copy-assets.cjs",
45
- "check:modularity": "tsx scripts/check-script-modularity.ts",
46
- "pretest": "pnpm check:modularity",
47
- "test": "vitest run tests/unit tests/int --coverage",
48
- "posttest": "tsx scripts/check-coverage-floor.ts",
49
- "test:smoke": "vitest run tests/smoke --no-coverage",
50
- "test:e2e": "vitest run tests/e2e --no-coverage",
51
- "test:all": "vitest run tests --no-coverage",
52
- "typecheck": "tsc --noEmit",
53
- "lint": "biome check",
54
- "lint:fix": "biome check --write",
55
- "format": "biome format --write",
56
- "brain:publish": "docker buildx build --platform linux/amd64 -f runner/Dockerfile.brain -t ghcr.io/${KODY_BRAIN_GHCR_OWNER:-aharonyaircohen}/kody-brain:latest --push runner"
57
- }
58
- }
58
+ "bugs": "https://github.com/aharonyaircohen/kody-engine/issues"
59
+ }