@kody-ade/kody-engine 0.4.267 → 0.4.268
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 +26 -8
- 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.
|
|
18
|
+
version: "0.4.268",
|
|
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",
|
|
@@ -166,7 +166,10 @@ function gh(args, options) {
|
|
|
166
166
|
}).trim();
|
|
167
167
|
}
|
|
168
168
|
function getIssue(issueNumber, cwd) {
|
|
169
|
-
const output = gh(["issue", "view", String(issueNumber), "--json", "number,title,body,comments,labels,url"], {
|
|
169
|
+
const output = gh(["issue", "view", String(issueNumber), "--json", "number,title,body,comments,labels,url"], {
|
|
170
|
+
cwd,
|
|
171
|
+
preferRepoToken: true
|
|
172
|
+
});
|
|
170
173
|
const parsed = JSON.parse(output);
|
|
171
174
|
if (typeof parsed?.title !== "string") {
|
|
172
175
|
throw new Error(`Issue #${issueNumber}: unexpected response shape`);
|
|
@@ -206,7 +209,11 @@ function postIssueComment(issueNumber, body, cwd) {
|
|
|
206
209
|
if (slug2) throw new BotDispatchCommentError(slug2);
|
|
207
210
|
}
|
|
208
211
|
try {
|
|
209
|
-
gh(["issue", "comment", String(issueNumber), "--body-file", "-"], {
|
|
212
|
+
gh(["issue", "comment", String(issueNumber), "--body-file", "-"], {
|
|
213
|
+
input: stripKodyMentions(body),
|
|
214
|
+
cwd,
|
|
215
|
+
preferRepoToken: true
|
|
216
|
+
});
|
|
210
217
|
} catch (err) {
|
|
211
218
|
process.stderr.write(
|
|
212
219
|
`[kody] failed to post comment on #${issueNumber}: ${err instanceof Error ? err.message : String(err)}
|
|
@@ -233,7 +240,8 @@ function parsePrNumber(url) {
|
|
|
233
240
|
}
|
|
234
241
|
function getPr(prNumber, cwd) {
|
|
235
242
|
const output = gh(["pr", "view", String(prNumber), "--json", "number,title,body,headRefName,baseRefName,state"], {
|
|
236
|
-
cwd
|
|
243
|
+
cwd,
|
|
244
|
+
preferRepoToken: true
|
|
237
245
|
});
|
|
238
246
|
const parsed = JSON.parse(output);
|
|
239
247
|
if (typeof parsed?.title !== "string") {
|
|
@@ -250,7 +258,7 @@ function getPr(prNumber, cwd) {
|
|
|
250
258
|
}
|
|
251
259
|
function getPrDiff(prNumber, cwd) {
|
|
252
260
|
try {
|
|
253
|
-
return gh(["pr", "diff", String(prNumber)], { cwd });
|
|
261
|
+
return gh(["pr", "diff", String(prNumber)], { cwd, preferRepoToken: true });
|
|
254
262
|
} catch (err) {
|
|
255
263
|
process.stderr.write(
|
|
256
264
|
`[kody] failed to fetch diff for PR #${prNumber}: ${err instanceof Error ? err.message : String(err)}
|
|
@@ -261,7 +269,10 @@ function getPrDiff(prNumber, cwd) {
|
|
|
261
269
|
}
|
|
262
270
|
function getPrReviews(prNumber, cwd) {
|
|
263
271
|
try {
|
|
264
|
-
const output = gh(["pr", "view", String(prNumber), "--json", "reviews"], {
|
|
272
|
+
const output = gh(["pr", "view", String(prNumber), "--json", "reviews"], {
|
|
273
|
+
cwd,
|
|
274
|
+
preferRepoToken: true
|
|
275
|
+
});
|
|
265
276
|
const parsed = JSON.parse(output);
|
|
266
277
|
if (!Array.isArray(parsed?.reviews)) return [];
|
|
267
278
|
return parsed.reviews.map(
|
|
@@ -278,7 +289,10 @@ function getPrReviews(prNumber, cwd) {
|
|
|
278
289
|
}
|
|
279
290
|
function getPrComments(prNumber, cwd) {
|
|
280
291
|
try {
|
|
281
|
-
const output = gh(["pr", "view", String(prNumber), "--json", "comments"], {
|
|
292
|
+
const output = gh(["pr", "view", String(prNumber), "--json", "comments"], {
|
|
293
|
+
cwd,
|
|
294
|
+
preferRepoToken: true
|
|
295
|
+
});
|
|
282
296
|
const parsed = JSON.parse(output);
|
|
283
297
|
if (!Array.isArray(parsed?.comments)) return [];
|
|
284
298
|
return parsed.comments.map((c) => ({
|
|
@@ -307,7 +321,11 @@ function postPrReviewComment(prNumber, body, cwd) {
|
|
|
307
321
|
if (slug2) throw new BotDispatchCommentError(slug2);
|
|
308
322
|
}
|
|
309
323
|
try {
|
|
310
|
-
gh(["pr", "comment", String(prNumber), "--body-file", "-"], {
|
|
324
|
+
gh(["pr", "comment", String(prNumber), "--body-file", "-"], {
|
|
325
|
+
input: stripKodyMentions(body),
|
|
326
|
+
cwd,
|
|
327
|
+
preferRepoToken: true
|
|
328
|
+
});
|
|
311
329
|
} catch (err) {
|
|
312
330
|
process.stderr.write(
|
|
313
331
|
`[kody] failed to post review comment on PR #${prNumber}: ${err instanceof Error ? err.message : String(err)}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kody-ade/kody-engine",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.268",
|
|
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",
|