@kody-ade/kody-engine 0.4.247 → 0.4.248
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 +20 -12
- 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.248",
|
|
19
19
|
description: "kody \u2014 autonomous development engine. Single-session Claude Code agent behind a generic executor + declarative agentAction profiles.",
|
|
20
20
|
license: "MIT",
|
|
21
21
|
type: "module",
|
|
@@ -145,11 +145,15 @@ var init_claudeBinary = __esm({
|
|
|
145
145
|
|
|
146
146
|
// src/issue.ts
|
|
147
147
|
import { execFileSync } from "child_process";
|
|
148
|
-
function ghToken() {
|
|
149
|
-
|
|
148
|
+
function ghToken(preferRepoToken = false) {
|
|
149
|
+
const githubToken = process.env.GITHUB_TOKEN?.trim();
|
|
150
|
+
const kodyToken = process.env.KODY_TOKEN?.trim();
|
|
151
|
+
const ghToken3 = process.env.GH_TOKEN?.trim();
|
|
152
|
+
const ghPat = process.env.GH_PAT?.trim();
|
|
153
|
+
return preferRepoToken ? githubToken || kodyToken || ghToken3 || ghPat : ghPat || ghToken3 || kodyToken || githubToken;
|
|
150
154
|
}
|
|
151
155
|
function gh(args, options) {
|
|
152
|
-
const token = ghToken();
|
|
156
|
+
const token = ghToken(options?.preferRepoToken);
|
|
153
157
|
const env = token ? { ...process.env, GH_TOKEN: token } : { ...process.env };
|
|
154
158
|
return execFileSync("gh", args, {
|
|
155
159
|
encoding: "utf-8",
|
|
@@ -1480,14 +1484,18 @@ function readThread(repoSlug, number, limit = 10) {
|
|
|
1480
1484
|
};
|
|
1481
1485
|
}
|
|
1482
1486
|
function readCheckRuns(repoSlug, ref, ignoreNames) {
|
|
1483
|
-
const
|
|
1484
|
-
const
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1487
|
+
const ghOptions = { preferRepoToken: true };
|
|
1488
|
+
const sha = gh(["api", `repos/${repoSlug}/commits/${ref}`, "--jq", ".sha"], ghOptions).trim();
|
|
1489
|
+
const raw = gh(
|
|
1490
|
+
[
|
|
1491
|
+
"api",
|
|
1492
|
+
`repos/${repoSlug}/commits/${sha}/check-runs`,
|
|
1493
|
+
"--paginate",
|
|
1494
|
+
"--jq",
|
|
1495
|
+
".check_runs[] | {name, status, conclusion, details_url}"
|
|
1496
|
+
],
|
|
1497
|
+
ghOptions
|
|
1498
|
+
);
|
|
1491
1499
|
const ignore = new Set(ignoreNames.map((n) => n.toLowerCase()));
|
|
1492
1500
|
const checks = raw.split("\n").map((l) => l.trim()).filter(Boolean).map((l) => JSON.parse(l)).filter((c) => !ignore.has(String(c.name).toLowerCase()));
|
|
1493
1501
|
const failing = checks.filter((c) => CHECK_FAIL_CONCLUSIONS.has(String(c.conclusion ?? "").toUpperCase())).map((c) => ({ name: c.name, conclusion: String(c.conclusion), detailsUrl: c.details_url }));
|
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.248",
|
|
4
4
|
"description": "kody — autonomous development engine. Single-session Claude Code agent behind a generic executor + declarative agentAction profiles.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|