@kody-ade/kody-engine 0.4.162 → 0.4.164
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 +54 -13
- package/package.json +1 -1
- package/templates/kody.yml +8 -0
package/dist/bin/kody.js
CHANGED
|
@@ -1061,7 +1061,7 @@ var init_loadPriorArt = __esm({
|
|
|
1061
1061
|
// package.json
|
|
1062
1062
|
var package_default = {
|
|
1063
1063
|
name: "@kody-ade/kody-engine",
|
|
1064
|
-
version: "0.4.
|
|
1064
|
+
version: "0.4.164",
|
|
1065
1065
|
description: "kody \u2014 autonomous development engine. Single-session Claude Code agent behind a generic executor + declarative executable profiles.",
|
|
1066
1066
|
license: "MIT",
|
|
1067
1067
|
type: "module",
|
|
@@ -2988,7 +2988,11 @@ function autoDispatch(opts) {
|
|
|
2988
2988
|
if (eventName === "workflow_dispatch") {
|
|
2989
2989
|
const n = parseInt(String(event.inputs?.issue_number ?? ""), 10);
|
|
2990
2990
|
if (!Number.isNaN(n) && n > 0) {
|
|
2991
|
-
|
|
2991
|
+
const exe = String(event.inputs?.executable ?? "").trim() || "run";
|
|
2992
|
+
const base = String(event.inputs?.base ?? "").trim();
|
|
2993
|
+
const cliArgs = { issue: n };
|
|
2994
|
+
if (base) cliArgs.base = base;
|
|
2995
|
+
return { executable: exe, cliArgs, target: n };
|
|
2992
2996
|
}
|
|
2993
2997
|
return null;
|
|
2994
2998
|
}
|
|
@@ -6267,6 +6271,30 @@ function commentOnIssue(issueNumber, body, cwd) {
|
|
|
6267
6271
|
return fail(err);
|
|
6268
6272
|
}
|
|
6269
6273
|
}
|
|
6274
|
+
var GOAL_TASK_WORKFLOW = "kody.yml";
|
|
6275
|
+
function dispatchTaskRun(issueNumber, base, ref, cwd) {
|
|
6276
|
+
try {
|
|
6277
|
+
gh(
|
|
6278
|
+
[
|
|
6279
|
+
"workflow",
|
|
6280
|
+
"run",
|
|
6281
|
+
GOAL_TASK_WORKFLOW,
|
|
6282
|
+
"--ref",
|
|
6283
|
+
ref,
|
|
6284
|
+
"-f",
|
|
6285
|
+
`issue_number=${issueNumber}`,
|
|
6286
|
+
"-f",
|
|
6287
|
+
"executable=classify",
|
|
6288
|
+
"-f",
|
|
6289
|
+
`base=${base}`
|
|
6290
|
+
],
|
|
6291
|
+
{ cwd }
|
|
6292
|
+
);
|
|
6293
|
+
return { ok: true };
|
|
6294
|
+
} catch (err) {
|
|
6295
|
+
return fail(err);
|
|
6296
|
+
}
|
|
6297
|
+
}
|
|
6270
6298
|
function closeIssue(issueNumber, options, cwd) {
|
|
6271
6299
|
try {
|
|
6272
6300
|
if (options.comment) {
|
|
@@ -6930,11 +6958,21 @@ var dispatchClassified = async (ctx) => {
|
|
|
6930
6958
|
|
|
6931
6959
|
${stateBody}`;
|
|
6932
6960
|
try {
|
|
6933
|
-
|
|
6934
|
-
|
|
6935
|
-
|
|
6936
|
-
|
|
6937
|
-
|
|
6961
|
+
const existing = findStateComment("issue", issueNumber, ctx.cwd);
|
|
6962
|
+
if (existing) {
|
|
6963
|
+
execFileSync11("gh", ["api", `repos/{owner}/{repo}/issues/comments/${existing.id}`, "-X", "PATCH", "-F", "body=@-"], {
|
|
6964
|
+
cwd: ctx.cwd,
|
|
6965
|
+
timeout: API_TIMEOUT_MS4,
|
|
6966
|
+
input: body,
|
|
6967
|
+
stdio: ["pipe", "pipe", "pipe"]
|
|
6968
|
+
});
|
|
6969
|
+
} else {
|
|
6970
|
+
execFileSync11("gh", ["issue", "comment", String(issueNumber), "--body", body], {
|
|
6971
|
+
cwd: ctx.cwd,
|
|
6972
|
+
timeout: API_TIMEOUT_MS4,
|
|
6973
|
+
stdio: ["ignore", "pipe", "pipe"]
|
|
6974
|
+
});
|
|
6975
|
+
}
|
|
6938
6976
|
} catch (err) {
|
|
6939
6977
|
process.stderr.write(
|
|
6940
6978
|
`[kody dispatchClassified] failed to post state comment for #${issueNumber}: ${err instanceof Error ? err.message : String(err)}
|
|
@@ -7604,12 +7642,15 @@ var dispatchNextTask = async (ctx) => {
|
|
|
7604
7642
|
return;
|
|
7605
7643
|
}
|
|
7606
7644
|
const base = goal.leafPr?.headRefName ?? goal.defaultBranch;
|
|
7607
|
-
|
|
7645
|
+
const ref = goal.defaultBranch;
|
|
7646
|
+
process.stdout.write(`[goal-tick] dispatching #${next.number} via workflow_dispatch (classify, --base ${base})
|
|
7608
7647
|
`);
|
|
7609
|
-
|
|
7610
|
-
|
|
7611
|
-
|
|
7612
|
-
|
|
7648
|
+
const res = dispatchTaskRun(next.number, base, ref, ctx.cwd);
|
|
7649
|
+
if (!res.ok) {
|
|
7650
|
+
process.stderr.write(`[goal-tick] dispatchNextTask: workflow_dispatch on #${next.number} failed: ${res.error}
|
|
7651
|
+
`);
|
|
7652
|
+
return;
|
|
7653
|
+
}
|
|
7613
7654
|
goal.lastDispatchedIssue = next.number;
|
|
7614
7655
|
};
|
|
7615
7656
|
|
|
@@ -9141,7 +9182,7 @@ function composeAuthBlock(authProfile, login, password) {
|
|
|
9141
9182
|
return `Auth: a saved Playwright \`storageState.json\` is available at \`${authProfile}\`. Pass it to the browser via the \`storageState\` parameter so the session starts pre-authenticated.`;
|
|
9142
9183
|
}
|
|
9143
9184
|
if (login && password) {
|
|
9144
|
-
return `Auth: log in once at the app's login page. Username: \`${login}\` \xB7 Password: \`${password}\`. Re-use the session afterwards.`;
|
|
9185
|
+
return `Auth: log in once at the app's login page. Username: \`${login}\` \xB7 Password: \`${password}\`. Type each field key-by-key (Playwright \`locator.pressSequentially()\` / the MCP \`browser_type\` tool), NOT a one-shot \`fill()\` or value assignment: pasting a value in a single step often fails to fire the login form's framework onChange handler, so the form submits empty and you get a FALSE "invalid email or password". After typing, confirm the field shows the value before clicking submit; if the first attempt is rejected, re-type key-by-key before treating the credentials as wrong. Re-use the session afterwards.`;
|
|
9145
9186
|
}
|
|
9146
9187
|
if (login) {
|
|
9147
9188
|
return `Auth: username \`${login}\` is configured but no \`LOGIN_PASSWORD\` secret was found. Note auth-gated surfaces as gaps.`;
|
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.164",
|
|
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",
|
package/templates/kody.yml
CHANGED
|
@@ -43,6 +43,14 @@ on:
|
|
|
43
43
|
description: "Dashboard event ingest URL with inline ?token=... (chat mode)"
|
|
44
44
|
type: string
|
|
45
45
|
default: ""
|
|
46
|
+
executable:
|
|
47
|
+
description: "Stage to run for issue_number (default: run). goal-tick sets classify."
|
|
48
|
+
type: string
|
|
49
|
+
default: ""
|
|
50
|
+
base:
|
|
51
|
+
description: "Stacked-PR base branch for issue_number (goal-tick stacked dispatch)."
|
|
52
|
+
type: string
|
|
53
|
+
default: ""
|
|
46
54
|
issue_comment:
|
|
47
55
|
types: [created]
|
|
48
56
|
pull_request:
|