@kody-ade/kody-engine-lite 0.1.0 → 0.1.2

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/cli.js CHANGED
@@ -575,6 +575,21 @@ function gh(args2, options) {
575
575
  stdio: options?.input ? ["pipe", "pipe", "pipe"] : ["inherit", "pipe", "pipe"]
576
576
  }).trim();
577
577
  }
578
+ function getIssue(issueNumber) {
579
+ try {
580
+ const output = gh([
581
+ "issue",
582
+ "view",
583
+ String(issueNumber),
584
+ "--json",
585
+ "body,title"
586
+ ]);
587
+ return JSON.parse(output);
588
+ } catch (err) {
589
+ logger.error(` Failed to get issue #${issueNumber}: ${err}`);
590
+ return null;
591
+ }
592
+ }
578
593
  function setLabel(issueNumber, label) {
579
594
  try {
580
595
  gh(["issue", "edit", String(issueNumber), "--add-label", label]);
@@ -1411,10 +1426,21 @@ async function main() {
1411
1426
  if (input.task) {
1412
1427
  fs6.writeFileSync(path5.join(taskDir, "task.md"), input.task);
1413
1428
  }
1429
+ const taskMdPath = path5.join(taskDir, "task.md");
1430
+ if (!fs6.existsSync(taskMdPath) && input.issueNumber) {
1431
+ logger.info(`Fetching issue #${input.issueNumber} body as task...`);
1432
+ const issue = getIssue(input.issueNumber);
1433
+ if (issue) {
1434
+ const taskContent = `# ${issue.title}
1435
+
1436
+ ${issue.body ?? ""}`;
1437
+ fs6.writeFileSync(taskMdPath, taskContent);
1438
+ logger.info(` Task loaded from issue #${input.issueNumber}: ${issue.title}`);
1439
+ }
1440
+ }
1414
1441
  if (input.command === "run") {
1415
- const taskMdPath = path5.join(taskDir, "task.md");
1416
1442
  if (!fs6.existsSync(taskMdPath)) {
1417
- console.error("No task.md found. Provide --task or ensure .tasks/<id>/task.md exists.");
1443
+ console.error("No task.md found. Provide --task, --issue-number, or ensure .tasks/<id>/task.md exists.");
1418
1444
  process.exit(1);
1419
1445
  }
1420
1446
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kody-ade/kody-engine-lite",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Autonomous SDLC pipeline: Kody orchestration + Claude Code + LiteLLM",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -126,6 +126,8 @@ jobs:
126
126
  persist-credentials: true
127
127
 
128
128
  - uses: pnpm/action-setup@v4
129
+ with:
130
+ version: latest
129
131
  - uses: actions/setup-node@v4
130
132
  with:
131
133
  node-version: 22
@@ -154,7 +156,7 @@ jobs:
154
156
  ISSUE_NUMBER: ${{ github.event.inputs.issue_number || needs.parse.outputs.issue_number }}
155
157
  FEEDBACK: ${{ github.event.inputs.feedback || needs.parse.outputs.feedback }}
156
158
  DRY_RUN: ${{ github.event.inputs.dry_run || 'false' }}
157
- run: kody-engine-lite
159
+ run: kody-engine-lite run --task-id "$TASK_ID" --issue-number "$ISSUE_NUMBER"
158
160
 
159
161
  - name: Pipeline summary
160
162
  if: always()