@kody-ade/kody-engine-lite 0.1.15 → 0.1.17

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
@@ -1,11 +1,5 @@
1
1
  #!/usr/bin/env node
2
2
  var __getOwnPropNames = Object.getOwnPropertyNames;
3
- var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
4
- get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
5
- }) : x)(function(x) {
6
- if (typeof require !== "undefined") return require.apply(this, arguments);
7
- throw Error('Dynamic require of "' + x + '" is not supported');
8
- });
9
3
  var __esm = (fn, res) => function __init() {
10
4
  return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
11
5
  };
@@ -1677,6 +1671,7 @@ var init_preflight = __esm({
1677
1671
  var entry_exports = {};
1678
1672
  import * as fs6 from "fs";
1679
1673
  import * as path5 from "path";
1674
+ import { execFileSync as execFileSync7 } from "child_process";
1680
1675
  function getArg(args2, flag) {
1681
1676
  const idx = args2.indexOf(flag);
1682
1677
  if (idx !== -1 && args2[idx + 1] && !args2[idx + 1].startsWith("--")) {
@@ -1726,8 +1721,7 @@ function findLatestTaskForIssue(issueNumber, projectDir) {
1726
1721
  const direct = allDirs.find((d) => d.startsWith(prefix));
1727
1722
  if (direct) return direct;
1728
1723
  try {
1729
- const { execFileSync: execFileSync8 } = __require("child_process");
1730
- const branch = execFileSync8("git", ["branch", "--show-current"], {
1724
+ const branch = execFileSync7("git", ["branch", "--show-current"], {
1731
1725
  encoding: "utf-8",
1732
1726
  cwd: projectDir,
1733
1727
  timeout: 5e3,
@@ -1955,7 +1949,7 @@ var init_entry = __esm({
1955
1949
  // src/bin/cli.ts
1956
1950
  import * as fs7 from "fs";
1957
1951
  import * as path6 from "path";
1958
- import { execFileSync as execFileSync7 } from "child_process";
1952
+ import { execFileSync as execFileSync8 } from "child_process";
1959
1953
  import { fileURLToPath } from "url";
1960
1954
  var __dirname = path6.dirname(fileURLToPath(import.meta.url));
1961
1955
  var PKG_ROOT = path6.resolve(__dirname, "..", "..");
@@ -1966,7 +1960,7 @@ function getVersion() {
1966
1960
  }
1967
1961
  function checkCommand2(name, args2, fix) {
1968
1962
  try {
1969
- const output = execFileSync7(name, args2, {
1963
+ const output = execFileSync8(name, args2, {
1970
1964
  encoding: "utf-8",
1971
1965
  timeout: 1e4,
1972
1966
  stdio: ["pipe", "pipe", "pipe"]
@@ -1984,7 +1978,7 @@ function checkFile(filePath, description, fix) {
1984
1978
  }
1985
1979
  function checkGhAuth(cwd) {
1986
1980
  try {
1987
- const output = execFileSync7("gh", ["auth", "status"], {
1981
+ const output = execFileSync8("gh", ["auth", "status"], {
1988
1982
  encoding: "utf-8",
1989
1983
  timeout: 1e4,
1990
1984
  cwd,
@@ -2002,7 +1996,7 @@ function checkGhAuth(cwd) {
2002
1996
  }
2003
1997
  function checkGhRepoAccess(cwd) {
2004
1998
  try {
2005
- const remote = execFileSync7("git", ["remote", "get-url", "origin"], {
1999
+ const remote = execFileSync8("git", ["remote", "get-url", "origin"], {
2006
2000
  encoding: "utf-8",
2007
2001
  timeout: 5e3,
2008
2002
  cwd,
@@ -2013,7 +2007,7 @@ function checkGhRepoAccess(cwd) {
2013
2007
  return { name: "GitHub repo", ok: false, fix: "Set git remote origin to a GitHub URL" };
2014
2008
  }
2015
2009
  const repoSlug = `${match[1]}/${match[2]}`;
2016
- execFileSync7("gh", ["repo", "view", repoSlug, "--json", "name"], {
2010
+ execFileSync8("gh", ["repo", "view", repoSlug, "--json", "name"], {
2017
2011
  encoding: "utf-8",
2018
2012
  timeout: 1e4,
2019
2013
  cwd,
@@ -2026,7 +2020,7 @@ function checkGhRepoAccess(cwd) {
2026
2020
  }
2027
2021
  function checkGhSecret(repoSlug, secretName) {
2028
2022
  try {
2029
- const output = execFileSync7("gh", ["secret", "list", "--repo", repoSlug], {
2023
+ const output = execFileSync8("gh", ["secret", "list", "--repo", repoSlug], {
2030
2024
  encoding: "utf-8",
2031
2025
  timeout: 1e4,
2032
2026
  stdio: ["pipe", "pipe", "pipe"]
@@ -2112,7 +2106,7 @@ function detectBasicConfig(cwd) {
2112
2106
  else if (!fs7.existsSync(path6.join(cwd, "pnpm-lock.yaml")) && fs7.existsSync(path6.join(cwd, "package-lock.json"))) pm = "npm";
2113
2107
  let defaultBranch = "main";
2114
2108
  try {
2115
- const ref = execFileSync7("git", ["symbolic-ref", "refs/remotes/origin/HEAD"], {
2109
+ const ref = execFileSync8("git", ["symbolic-ref", "refs/remotes/origin/HEAD"], {
2116
2110
  encoding: "utf-8",
2117
2111
  timeout: 5e3,
2118
2112
  cwd,
@@ -2121,7 +2115,7 @@ function detectBasicConfig(cwd) {
2121
2115
  defaultBranch = ref.replace("refs/remotes/origin/", "");
2122
2116
  } catch {
2123
2117
  try {
2124
- execFileSync7("git", ["rev-parse", "--verify", "origin/dev"], {
2118
+ execFileSync8("git", ["rev-parse", "--verify", "origin/dev"], {
2125
2119
  encoding: "utf-8",
2126
2120
  timeout: 5e3,
2127
2121
  cwd,
@@ -2134,7 +2128,7 @@ function detectBasicConfig(cwd) {
2134
2128
  let owner = "";
2135
2129
  let repo = "";
2136
2130
  try {
2137
- const remote = execFileSync7("git", ["remote", "get-url", "origin"], {
2131
+ const remote = execFileSync8("git", ["remote", "get-url", "origin"], {
2138
2132
  encoding: "utf-8",
2139
2133
  timeout: 5e3,
2140
2134
  cwd,
@@ -2258,7 +2252,7 @@ Output ONLY valid JSON. No markdown fences. No explanation before or after.
2258
2252
  ${context}`;
2259
2253
  console.log(" \u23F3 Analyzing project with Claude Code...");
2260
2254
  try {
2261
- const output = execFileSync7("claude", [
2255
+ const output = execFileSync8("claude", [
2262
2256
  "--print",
2263
2257
  "--model",
2264
2258
  "haiku",
@@ -2462,7 +2456,7 @@ function initCommand(opts) {
2462
2456
  console.log("\n\u2500\u2500 Labels \u2500\u2500");
2463
2457
  for (const label of labels) {
2464
2458
  try {
2465
- execFileSync7("gh", [
2459
+ execFileSync8("gh", [
2466
2460
  "label",
2467
2461
  "create",
2468
2462
  label.name,
@@ -2481,7 +2475,7 @@ function initCommand(opts) {
2481
2475
  console.log(` \u2713 ${label.name}`);
2482
2476
  } catch {
2483
2477
  try {
2484
- execFileSync7("gh", ["label", "list", "--repo", repoSlug, "--search", label.name], {
2478
+ execFileSync8("gh", ["label", "list", "--repo", repoSlug, "--search", label.name], {
2485
2479
  encoding: "utf-8",
2486
2480
  timeout: 1e4,
2487
2481
  stdio: ["pipe", "pipe", "pipe"]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kody-ade/kody-engine-lite",
3
- "version": "0.1.15",
3
+ "version": "0.1.17",
4
4
  "description": "Autonomous SDLC pipeline: Kody orchestration + Claude Code + LiteLLM",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -176,6 +176,8 @@ jobs:
176
176
 
177
177
  - name: Checkout PR branch (for fix/rerun on PRs)
178
178
  if: github.event.issue.pull_request && (needs.parse.outputs.mode == 'fix' || needs.parse.outputs.mode == 'rerun')
179
+ env:
180
+ GH_TOKEN: ${{ steps.app-token.outputs.token || secrets.GITHUB_TOKEN }}
179
181
  run: |
180
182
  PR_NUM="${{ github.event.issue.number }}"
181
183
  PR_BRANCH=$(gh pr view "$PR_NUM" --json headRefName -q '.headRefName')