@kody-ade/kody-engine-lite 0.1.50 → 0.1.52
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/README.md +1 -1
- package/dist/bin/cli.js +25 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -23,7 +23,7 @@ Most AI coding tools are **autocomplete** (Copilot) or **chat-based** (Cursor, C
|
|
|
23
23
|
| **Incremental codebase improvement** | Step files encode gaps to fix — every task raises quality | No | No | No |
|
|
24
24
|
| **Model flexible** | Any LLM via LiteLLM | GitHub models only | Proprietary | Cursor models |
|
|
25
25
|
| **Open source** | MIT | Proprietary | Proprietary | Proprietary |
|
|
26
|
-
| **Cost** |
|
|
26
|
+
| **Cost** | **Free** with free-tier models (Gemini, etc.) or pay-per-use with any LLM | $10-39/month | $20-500/month | Subscription |
|
|
27
27
|
|
|
28
28
|
[Full comparison →](docs/COMPARISON.md)
|
|
29
29
|
|
package/dist/bin/cli.js
CHANGED
|
@@ -1651,9 +1651,14 @@ function executeShipStage(ctx, _def) {
|
|
|
1651
1651
|
const existingPr = getPRForBranch(head);
|
|
1652
1652
|
if (existingPr) {
|
|
1653
1653
|
updatePR(existingPr.number, body);
|
|
1654
|
-
if (
|
|
1654
|
+
if (!ctx.input.local) {
|
|
1655
|
+
const msg = `\u2705 Fix pushed to PR #${existingPr.number}: ${existingPr.url}`;
|
|
1655
1656
|
try {
|
|
1656
|
-
|
|
1657
|
+
if (ctx.input.prNumber) {
|
|
1658
|
+
postPRComment(ctx.input.prNumber, msg);
|
|
1659
|
+
} else if (ctx.input.issueNumber) {
|
|
1660
|
+
postComment(ctx.input.issueNumber, msg);
|
|
1661
|
+
}
|
|
1657
1662
|
} catch {
|
|
1658
1663
|
}
|
|
1659
1664
|
}
|
|
@@ -2244,6 +2249,7 @@ If no pipeline flaw is detected, set "pipelineFlaw" to null.
|
|
|
2244
2249
|
import * as fs14 from "fs";
|
|
2245
2250
|
import * as path14 from "path";
|
|
2246
2251
|
function ensureFeatureBranchIfNeeded(ctx) {
|
|
2252
|
+
if (ctx.input.prNumber) return;
|
|
2247
2253
|
if (!ctx.input.issueNumber || ctx.input.dryRun) return;
|
|
2248
2254
|
try {
|
|
2249
2255
|
const taskMdPath = path14.join(ctx.taskDir, "task.md");
|
|
@@ -2872,7 +2878,8 @@ async function main() {
|
|
|
2872
2878
|
setGhCwd(projectDir);
|
|
2873
2879
|
logger.info(`Working directory: ${projectDir}`);
|
|
2874
2880
|
}
|
|
2875
|
-
|
|
2881
|
+
const isPRFix = input.command === "fix" && !!input.prNumber;
|
|
2882
|
+
if (input.issueNumber && input.command !== "review" && !isPRFix) {
|
|
2876
2883
|
const taskAction = resolveForIssue(input.issueNumber, projectDir);
|
|
2877
2884
|
logger.info(`Task action: ${taskAction.action}`);
|
|
2878
2885
|
if (taskAction.action === "already-completed") {
|
|
@@ -2904,7 +2911,9 @@ async function main() {
|
|
|
2904
2911
|
}
|
|
2905
2912
|
let taskId = input.taskId;
|
|
2906
2913
|
if (!taskId) {
|
|
2907
|
-
if (
|
|
2914
|
+
if (isPRFix) {
|
|
2915
|
+
taskId = `fix-pr-${input.prNumber}-${generateTaskId()}`;
|
|
2916
|
+
} else if (input.issueNumber) {
|
|
2908
2917
|
taskId = `${input.issueNumber}-${generateTaskId()}`;
|
|
2909
2918
|
} else if (input.command === "run" && input.task) {
|
|
2910
2919
|
taskId = generateTaskId();
|
|
@@ -3005,7 +3014,17 @@ async function main() {
|
|
|
3005
3014
|
fs20.writeFileSync(path19.join(taskDir, "task.md"), input.task);
|
|
3006
3015
|
}
|
|
3007
3016
|
const taskMdPath = path19.join(taskDir, "task.md");
|
|
3008
|
-
if (!fs20.existsSync(taskMdPath) && input.
|
|
3017
|
+
if (!fs20.existsSync(taskMdPath) && isPRFix && input.prNumber) {
|
|
3018
|
+
logger.info(`Fetching PR #${input.prNumber} details as task context...`);
|
|
3019
|
+
const prDetails = getPRDetails(input.prNumber);
|
|
3020
|
+
if (prDetails) {
|
|
3021
|
+
const taskContent = `# ${prDetails.title}
|
|
3022
|
+
|
|
3023
|
+
${prDetails.body ?? ""}`;
|
|
3024
|
+
fs20.writeFileSync(taskMdPath, taskContent);
|
|
3025
|
+
logger.info(` Task loaded from PR #${input.prNumber}: ${prDetails.title}`);
|
|
3026
|
+
}
|
|
3027
|
+
} else if (!fs20.existsSync(taskMdPath) && input.issueNumber) {
|
|
3009
3028
|
logger.info(`Fetching issue #${input.issueNumber} body as task...`);
|
|
3010
3029
|
const issue = getIssue(input.issueNumber);
|
|
3011
3030
|
if (issue) {
|
|
@@ -3092,6 +3111,7 @@ ${input.feedback}` : reviewContext;
|
|
|
3092
3111
|
fromStage: input.fromStage,
|
|
3093
3112
|
dryRun: input.dryRun,
|
|
3094
3113
|
issueNumber: input.issueNumber,
|
|
3114
|
+
prNumber: input.prNumber,
|
|
3095
3115
|
feedback: input.feedback,
|
|
3096
3116
|
local: input.local,
|
|
3097
3117
|
complexity: input.complexity
|