@kody-ade/kody-engine 0.4.215 → 0.4.216

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.
Files changed (2) hide show
  1. package/dist/bin/kody.js +8 -41
  2. package/package.json +1 -1
package/dist/bin/kody.js CHANGED
@@ -15,7 +15,7 @@ var init_package = __esm({
15
15
  "package.json"() {
16
16
  package_default = {
17
17
  name: "@kody-ade/kody-engine",
18
- version: "0.4.215",
18
+ version: "0.4.216",
19
19
  description: "kody \u2014 autonomous development engine. Single-session Claude Code agent behind a generic executor + declarative executable profiles.",
20
20
  license: "MIT",
21
21
  type: "module",
@@ -4331,10 +4331,10 @@ async function startLitellmIfNeeded(model, projectDir, url = LITELLM_DEFAULT_URL
4331
4331
  let child;
4332
4332
  let logPath;
4333
4333
  const spawnProxy = () => {
4334
- const configPath = path17.join(os3.tmpdir(), `kody-litellm-${Date.now()}.yaml`);
4334
+ const configPath = path17.join(os3.tmpdir(), `kody-local-litellm-${Date.now()}.yaml`);
4335
4335
  fs19.writeFileSync(configPath, generateLitellmConfigYaml(model));
4336
4336
  const args = ["--config", configPath, "--port", port];
4337
- const nextLogPath = path17.join(os3.tmpdir(), `kody-litellm-${Date.now()}.log`);
4337
+ const nextLogPath = path17.join(os3.tmpdir(), `kody-local-litellm-${Date.now()}.log`);
4338
4338
  const outFd = fs19.openSync(nextLogPath, "w");
4339
4339
  child = spawn3(cmd, args, { stdio: ["ignore", outFd, outFd], detached: true, env: childEnv });
4340
4340
  fs19.closeSync(outFd);
@@ -17613,7 +17613,6 @@ init_executor();
17613
17613
  init_registry();
17614
17614
 
17615
17615
  // src/servers/pool-serve.ts
17616
- import { spawn as spawn8 } from "child_process";
17617
17616
  import { createServer as createServer4 } from "http";
17618
17617
 
17619
17618
  // src/github-health.ts
@@ -17752,7 +17751,6 @@ var FlyClient = class {
17752
17751
  RUNNER_API_KEY: input.runnerApiKey,
17753
17752
  PORT: String(input.port ?? 8080)
17754
17753
  };
17755
- if (input.litellmUrl?.trim()) env.KODY_LITELLM_URL = input.litellmUrl.trim();
17756
17754
  const body = {
17757
17755
  region: input.region,
17758
17756
  config: {
@@ -17982,7 +17980,6 @@ var PoolManager = class {
17982
17980
  region: cfg.region,
17983
17981
  guest: cfg.guest,
17984
17982
  runnerApiKey: cfg.runnerApiKey,
17985
- litellmUrl: cfg.litellmUrl,
17986
17983
  repoTag: cfg.repoTag,
17987
17984
  port: cfg.port
17988
17985
  });
@@ -18297,32 +18294,6 @@ function parseClaimRequest(body) {
18297
18294
  if (typeof b.dashboardUrl === "string" && b.dashboardUrl.trim()) req.dashboardUrl = b.dashboardUrl.trim();
18298
18295
  return { req };
18299
18296
  }
18300
- function superviseLitellm() {
18301
- if (process.env.POOL_DISABLE_LITELLM === "1") return null;
18302
- const port = String(envInt("LITELLM_PORT", 4e3));
18303
- const config = process.env.LITELLM_CONFIG ?? "/app/config.yaml";
18304
- const host = process.env.LITELLM_HOST ?? "::";
18305
- let restarts = 0;
18306
- const start = () => {
18307
- log(`starting litellm child (port ${port}, host ${host})`);
18308
- const child = spawn8("litellm", ["--config", config, "--port", port, "--host", host], {
18309
- stdio: "inherit"
18310
- });
18311
- child.on("exit", (code) => {
18312
- restarts++;
18313
- if (restarts > 50) {
18314
- process.stderr.write("[pool-serve] litellm restarted too many times \u2014 giving up\n");
18315
- return;
18316
- }
18317
- log(`litellm exited (${code}) \u2014 restarting in 2s`);
18318
- setTimeout(start, 2e3);
18319
- });
18320
- child.on("error", (err) => process.stderr.write(`[pool-serve] litellm spawn error: ${err.message}
18321
- `));
18322
- return child;
18323
- };
18324
- return start();
18325
- }
18326
18297
  async function poolServe() {
18327
18298
  const masterRaw = process.env.KODY_MASTER_KEY?.trim();
18328
18299
  if (!masterRaw) throw new Error("KODY_MASTER_KEY required for pool-serve");
@@ -18335,12 +18306,10 @@ async function poolServe() {
18335
18306
  const region = process.env.POOL_REGION ?? "fra";
18336
18307
  const perf = process.env.POOL_PERF ?? "medium";
18337
18308
  const guest = PERF_GUEST[perf] ?? PERF_GUEST.medium;
18338
- const litellmUrl = process.env.KODY_LITELLM_URL?.trim() || void 0;
18339
18309
  const min = envInt("POOL_MIN", 2);
18340
18310
  const runnerPort = envInt("RUNNER_PORT", 8080);
18341
18311
  const apiPort = envInt("POOL_API_PORT", 4100);
18342
18312
  const healthTimeoutMs = envInt("POOL_HEALTH_TIMEOUT_MS", 12e4);
18343
- const litellm = superviseLitellm();
18344
18313
  const registry = new PoolRegistry({
18345
18314
  githubToken,
18346
18315
  masterKey: master,
@@ -18350,7 +18319,6 @@ async function poolServe() {
18350
18319
  region,
18351
18320
  guest,
18352
18321
  runnerApiKey,
18353
- litellmUrl,
18354
18322
  port: runnerPort,
18355
18323
  healthTimeoutMs,
18356
18324
  app
@@ -18378,7 +18346,6 @@ async function poolServe() {
18378
18346
  if (req.method === "GET" && url.pathname === "/healthz") {
18379
18347
  return sendJson2(res, 200, {
18380
18348
  ok: true,
18381
- litellm: litellm ? "supervised" : "off",
18382
18349
  repos: registry.activeRepos()
18383
18350
  });
18384
18351
  }
@@ -18439,7 +18406,7 @@ async function poolServe() {
18439
18406
  }
18440
18407
 
18441
18408
  // src/servers/runner-serve.ts
18442
- import { spawn as spawn9 } from "child_process";
18409
+ import { spawn as spawn8 } from "child_process";
18443
18410
  import * as fs45 from "fs";
18444
18411
  import { createServer as createServer5 } from "http";
18445
18412
  var DEFAULT_PORT2 = 8080;
@@ -18551,7 +18518,7 @@ async function defaultRunJob(job) {
18551
18518
  ...interactive && job.hardCapMs ? { KODY_HARD_CAP_MS: String(job.hardCapMs) } : {}
18552
18519
  };
18553
18520
  const run = (cmd, args, cwd) => new Promise((resolve6) => {
18554
- const child = spawn9(cmd, args, { stdio: "inherit", env: childEnv, cwd });
18521
+ const child = spawn8(cmd, args, { stdio: "inherit", env: childEnv, cwd });
18555
18522
  child.on("exit", (code) => resolve6(code ?? 0));
18556
18523
  child.on("error", (err) => {
18557
18524
  process.stderr.write(`[runner-serve] ${cmd} failed: ${err.message}
@@ -18655,7 +18622,7 @@ async function runnerServe() {
18655
18622
  // src/servers/serve.ts
18656
18623
  init_config();
18657
18624
  init_litellm();
18658
- import { spawn as spawn10 } from "child_process";
18625
+ import { spawn as spawn9 } from "child_process";
18659
18626
  function parseTarget(positional) {
18660
18627
  if (!Array.isArray(positional) || positional.length === 0) return "none";
18661
18628
  const first = String(positional[0]).toLowerCase();
@@ -18705,7 +18672,7 @@ async function serve(opts) {
18705
18672
  if (usesProxy) process.stdout.write(` ANTHROPIC_BASE_URL=${url}
18706
18673
  `);
18707
18674
  const args = ["--dangerously-skip-permissions", "--model", model.model];
18708
- const child = spawn10("claude", args, { stdio: "inherit", env: editorEnv, cwd: opts.cwd });
18675
+ const child = spawn9("claude", args, { stdio: "inherit", env: editorEnv, cwd: opts.cwd });
18709
18676
  const exitCode = await new Promise((resolve6) => {
18710
18677
  child.on("exit", (code) => resolve6(code ?? 0));
18711
18678
  child.on("error", (err) => {
@@ -18725,7 +18692,7 @@ async function serve(opts) {
18725
18692
  if (usesProxy) process.stdout.write(` ANTHROPIC_BASE_URL=${url}
18726
18693
  `);
18727
18694
  try {
18728
- const code = spawn10("code", [opts.cwd], { stdio: "inherit", env: editorEnv, detached: true });
18695
+ const code = spawn9("code", [opts.cwd], { stdio: "inherit", env: editorEnv, detached: true });
18729
18696
  code.on("error", (err) => {
18730
18697
  process.stderr.write(`[kody serve] failed to launch VS Code: ${err.message}
18731
18698
  `);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kody-ade/kody-engine",
3
- "version": "0.4.215",
3
+ "version": "0.4.216",
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",