@kody-ade/kody-engine 0.2.49 → 0.2.51
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/kody2.js +36 -22
- package/package.json +1 -1
package/dist/bin/kody2.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.2.
|
|
6
|
+
version: "0.2.51",
|
|
7
7
|
description: "kody2 \u2014 autonomous development engine. Single-session Claude Code agent behind a generic executor + declarative executable profiles.",
|
|
8
8
|
license: "MIT",
|
|
9
9
|
type: "module",
|
|
@@ -1209,7 +1209,7 @@ var advanceFlow = async (ctx, profile) => {
|
|
|
1209
1209
|
);
|
|
1210
1210
|
}
|
|
1211
1211
|
}
|
|
1212
|
-
const body =
|
|
1212
|
+
const body = "@kody2 orchestrate";
|
|
1213
1213
|
try {
|
|
1214
1214
|
execFileSync3("gh", ["issue", "comment", String(flow.issueNumber), "--body", body], {
|
|
1215
1215
|
timeout: API_TIMEOUT_MS2,
|
|
@@ -2810,26 +2810,40 @@ function reactToTriggerComment(cwd) {
|
|
|
2810
2810
|
const repo = process.env.GITHUB_REPOSITORY;
|
|
2811
2811
|
if (!commentId || !repo) return;
|
|
2812
2812
|
const token = process.env.KODY_TOKEN?.trim() || process.env.GH_TOKEN || process.env.GITHUB_TOKEN;
|
|
2813
|
+
const args = [
|
|
2814
|
+
"api",
|
|
2815
|
+
"-X",
|
|
2816
|
+
"POST",
|
|
2817
|
+
"-H",
|
|
2818
|
+
"Accept: application/vnd.github+json",
|
|
2819
|
+
`/repos/${repo}/issues/comments/${commentId}/reactions`,
|
|
2820
|
+
"-f",
|
|
2821
|
+
"content=eyes"
|
|
2822
|
+
];
|
|
2823
|
+
const opts = {
|
|
2824
|
+
cwd,
|
|
2825
|
+
env: { ...process.env, GH_TOKEN: token ?? process.env.GH_TOKEN ?? "" },
|
|
2826
|
+
stdio: "pipe",
|
|
2827
|
+
timeout: 15e3
|
|
2828
|
+
};
|
|
2829
|
+
let lastErr = null;
|
|
2830
|
+
for (let attempt = 0; attempt < 3; attempt++) {
|
|
2831
|
+
if (attempt > 0) sleepMs(attempt === 1 ? 500 : 1500);
|
|
2832
|
+
try {
|
|
2833
|
+
execFileSync11("gh", args, opts);
|
|
2834
|
+
return;
|
|
2835
|
+
} catch (err) {
|
|
2836
|
+
lastErr = err;
|
|
2837
|
+
}
|
|
2838
|
+
}
|
|
2839
|
+
process.stderr.write(
|
|
2840
|
+
`[kody2] \u{1F440} reaction failed after 3 attempts on comment ${commentId}: ${lastErr instanceof Error ? lastErr.message : String(lastErr)}
|
|
2841
|
+
`
|
|
2842
|
+
);
|
|
2843
|
+
}
|
|
2844
|
+
function sleepMs(ms) {
|
|
2813
2845
|
try {
|
|
2814
|
-
execFileSync11(
|
|
2815
|
-
"gh",
|
|
2816
|
-
[
|
|
2817
|
-
"api",
|
|
2818
|
-
"-X",
|
|
2819
|
-
"POST",
|
|
2820
|
-
"-H",
|
|
2821
|
-
"Accept: application/vnd.github+json",
|
|
2822
|
-
`/repos/${repo}/issues/comments/${commentId}/reactions`,
|
|
2823
|
-
"-f",
|
|
2824
|
-
"content=eyes"
|
|
2825
|
-
],
|
|
2826
|
-
{
|
|
2827
|
-
cwd,
|
|
2828
|
-
env: { ...process.env, GH_TOKEN: token ?? process.env.GH_TOKEN ?? "" },
|
|
2829
|
-
stdio: "pipe",
|
|
2830
|
-
timeout: 15e3
|
|
2831
|
-
}
|
|
2832
|
-
);
|
|
2846
|
+
execFileSync11("sleep", [(ms / 1e3).toString()], { stdio: "ignore", timeout: ms + 1e3 });
|
|
2833
2847
|
} catch {
|
|
2834
2848
|
}
|
|
2835
2849
|
}
|
|
@@ -3354,7 +3368,7 @@ var loadCoverageRules = async (ctx) => {
|
|
|
3354
3368
|
|
|
3355
3369
|
// src/scripts/loadIssueContext.ts
|
|
3356
3370
|
var DEFAULT_COMMENT_LIMIT = 12;
|
|
3357
|
-
var DEFAULT_COMMENT_MAX_BYTES =
|
|
3371
|
+
var DEFAULT_COMMENT_MAX_BYTES = 16e3;
|
|
3358
3372
|
var loadIssueContext = async (ctx) => {
|
|
3359
3373
|
const issueNumber = ctx.args.issue;
|
|
3360
3374
|
if (typeof issueNumber !== "number" || issueNumber <= 0) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kody-ade/kody-engine",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.51",
|
|
4
4
|
"description": "kody2 — autonomous development engine. Single-session Claude Code agent behind a generic executor + declarative executable profiles.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|