@kody-ade/kody-engine 0.4.214-live.2 → 0.4.215
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 +23 -11
- 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.
|
|
18
|
+
version: "0.4.215",
|
|
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",
|
|
@@ -7937,8 +7937,10 @@ var init_dispatchDutyFileTicks = __esm({
|
|
|
7937
7937
|
return;
|
|
7938
7938
|
}
|
|
7939
7939
|
const filtered = onlyDuty ? ` matching ${onlyDuty}` : "";
|
|
7940
|
-
process.stdout.write(
|
|
7941
|
-
`)
|
|
7940
|
+
process.stdout.write(
|
|
7941
|
+
`[jobs] ticking ${slugs.length + folderSlugList.length} job(s)${filtered} via ${targetExecutable}
|
|
7942
|
+
`
|
|
7943
|
+
);
|
|
7942
7944
|
const results = [];
|
|
7943
7945
|
const now = Date.now();
|
|
7944
7946
|
const folderDutySlugs = new Set(folderSlugList);
|
|
@@ -17746,6 +17748,11 @@ var FlyClient = class {
|
|
|
17746
17748
|
}
|
|
17747
17749
|
/** Create + start a pooled machine in serve mode, tagged for `repoTag`. */
|
|
17748
17750
|
async createPooled(input) {
|
|
17751
|
+
const env = {
|
|
17752
|
+
RUNNER_API_KEY: input.runnerApiKey,
|
|
17753
|
+
PORT: String(input.port ?? 8080)
|
|
17754
|
+
};
|
|
17755
|
+
if (input.litellmUrl?.trim()) env.KODY_LITELLM_URL = input.litellmUrl.trim();
|
|
17749
17756
|
const body = {
|
|
17750
17757
|
region: input.region,
|
|
17751
17758
|
config: {
|
|
@@ -17758,11 +17765,7 @@ var FlyClient = class {
|
|
|
17758
17765
|
[POOL_METADATA_KEY]: POOL_METADATA_VALUE,
|
|
17759
17766
|
[POOL_REPO_METADATA_KEY]: input.repoTag
|
|
17760
17767
|
},
|
|
17761
|
-
env
|
|
17762
|
-
RUNNER_API_KEY: input.runnerApiKey,
|
|
17763
|
-
KODY_LITELLM_URL: input.litellmUrl,
|
|
17764
|
-
PORT: String(input.port ?? 8080)
|
|
17765
|
-
}
|
|
17768
|
+
env
|
|
17766
17769
|
}
|
|
17767
17770
|
};
|
|
17768
17771
|
const m = await this.call(`/apps/${enc(this.opts.app)}/machines`, { method: "POST", body });
|
|
@@ -18202,10 +18205,19 @@ var PoolRegistry = class {
|
|
|
18202
18205
|
};
|
|
18203
18206
|
return pm.claim(job);
|
|
18204
18207
|
}
|
|
18205
|
-
/** Status for a single repo's pool
|
|
18208
|
+
/** Status for a single repo's pool already known to this owner. */
|
|
18206
18209
|
status(owner, repo) {
|
|
18207
18210
|
return this.pools.get(this.key(owner, repo))?.status() ?? null;
|
|
18208
18211
|
}
|
|
18212
|
+
/**
|
|
18213
|
+
* Status for a repo, creating/adopting its pool on first read when the repo
|
|
18214
|
+
* has pool credentials. This lets a restarted owner recover from existing
|
|
18215
|
+
* pooled machines without waiting for the next claim.
|
|
18216
|
+
*/
|
|
18217
|
+
async statusFor(owner, repo) {
|
|
18218
|
+
const pm = await this.getPool(owner, repo);
|
|
18219
|
+
return pm?.status() ?? null;
|
|
18220
|
+
}
|
|
18209
18221
|
/** Resync every active repo pool (periodic self-heal). Also re-reads each
|
|
18210
18222
|
* repo's POOL_MIN from its vault so a dashboard resize warms up/drains within
|
|
18211
18223
|
* one tick — no owner restart needed. */
|
|
@@ -18323,7 +18335,7 @@ async function poolServe() {
|
|
|
18323
18335
|
const region = process.env.POOL_REGION ?? "fra";
|
|
18324
18336
|
const perf = process.env.POOL_PERF ?? "medium";
|
|
18325
18337
|
const guest = PERF_GUEST[perf] ?? PERF_GUEST.medium;
|
|
18326
|
-
const litellmUrl = process.env.KODY_LITELLM_URL
|
|
18338
|
+
const litellmUrl = process.env.KODY_LITELLM_URL?.trim() || void 0;
|
|
18327
18339
|
const min = envInt("POOL_MIN", 2);
|
|
18328
18340
|
const runnerPort = envInt("RUNNER_PORT", 8080);
|
|
18329
18341
|
const apiPort = envInt("POOL_API_PORT", 4100);
|
|
@@ -18380,7 +18392,7 @@ async function poolServe() {
|
|
|
18380
18392
|
const repoParam = (url.searchParams.get("repo") ?? "").trim();
|
|
18381
18393
|
const [owner, repo] = repoParam.split("/");
|
|
18382
18394
|
if (!owner || !repo) return sendJson2(res, 400, { error: "repo query (owner/name) required" });
|
|
18383
|
-
return sendJson2(res, 200, { status: registry.
|
|
18395
|
+
return sendJson2(res, 200, { status: await registry.statusFor(owner, repo) });
|
|
18384
18396
|
}
|
|
18385
18397
|
if (req.method === "POST" && url.pathname === "/pool/claim") {
|
|
18386
18398
|
let body;
|
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.215",
|
|
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",
|