@kody-ade/kody-engine 0.4.472 → 0.4.473
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 +14 -6
- 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.473",
|
|
19
19
|
description: "kody \u2014 autonomous development engine. Single-session Claude Code agent behind a generic executor + declarative implementation profiles.",
|
|
20
20
|
license: "MIT",
|
|
21
21
|
type: "module",
|
|
@@ -2316,7 +2316,7 @@ var init_convex_client = __esm({
|
|
|
2316
2316
|
|
|
2317
2317
|
// src/kody-api-client.ts
|
|
2318
2318
|
import { getFunctionName } from "convex/server";
|
|
2319
|
-
function
|
|
2319
|
+
function resolveKodyApiUrl(env) {
|
|
2320
2320
|
return (env.KODY_API_URL?.trim() || env.KODY_DASHBOARD_URL?.trim() || env.DASHBOARD_URL?.trim() || DEFAULT_KODY_API_URL).replace(/\/$/, "");
|
|
2321
2321
|
}
|
|
2322
2322
|
function oidcRequestUrl(env) {
|
|
@@ -2355,7 +2355,7 @@ function operationName(fn) {
|
|
|
2355
2355
|
async function callKodyApi(kind, fn, args, env) {
|
|
2356
2356
|
const call = async (forceToken) => {
|
|
2357
2357
|
const token = await githubOidcToken(env, forceToken);
|
|
2358
|
-
return fetch(`${
|
|
2358
|
+
return fetch(`${resolveKodyApiUrl(env)}/api/kody/engine/backend`, {
|
|
2359
2359
|
method: "POST",
|
|
2360
2360
|
headers: {
|
|
2361
2361
|
Authorization: `Bearer ${token}`,
|
|
@@ -2385,7 +2385,7 @@ function createKodyApiBackendClient(env = process.env) {
|
|
|
2385
2385
|
}
|
|
2386
2386
|
async function readRuntimeSecretFromKody(name, env = process.env) {
|
|
2387
2387
|
const token = await githubOidcToken(env);
|
|
2388
|
-
const response = await fetch(`${
|
|
2388
|
+
const response = await fetch(`${resolveKodyApiUrl(env)}/api/kody/engine/secret`, {
|
|
2389
2389
|
method: "POST",
|
|
2390
2390
|
headers: { Authorization: `Bearer ${token}`, "Content-Type": "application/json" },
|
|
2391
2391
|
body: JSON.stringify({ name }),
|
|
@@ -2398,7 +2398,7 @@ async function readRuntimeSecretFromKody(name, env = process.env) {
|
|
|
2398
2398
|
}
|
|
2399
2399
|
async function readPreviewContextFromKody(env = process.env) {
|
|
2400
2400
|
const token = await githubOidcToken(env);
|
|
2401
|
-
const response = await fetch(`${
|
|
2401
|
+
const response = await fetch(`${resolveKodyApiUrl(env)}/api/kody/engine/preview-context`, {
|
|
2402
2402
|
method: "POST",
|
|
2403
2403
|
headers: { Authorization: `Bearer ${token}` },
|
|
2404
2404
|
signal: AbortSignal.timeout(3e4)
|
|
@@ -2410,7 +2410,7 @@ var DEFAULT_KODY_API_URL, OIDC_AUDIENCE, cachedToken;
|
|
|
2410
2410
|
var init_kody_api_client = __esm({
|
|
2411
2411
|
"src/kody-api-client.ts"() {
|
|
2412
2412
|
"use strict";
|
|
2413
|
-
DEFAULT_KODY_API_URL = "https://dashboard-
|
|
2413
|
+
DEFAULT_KODY_API_URL = "https://kody-dashboard-aguy.vercel.app";
|
|
2414
2414
|
OIDC_AUDIENCE = "kody-api";
|
|
2415
2415
|
cachedToken = null;
|
|
2416
2416
|
}
|
|
@@ -13259,6 +13259,13 @@ var init_loopDefinitions = __esm({
|
|
|
13259
13259
|
|
|
13260
13260
|
// src/scripts/dispatchLoops.ts
|
|
13261
13261
|
import { randomUUID } from "crypto";
|
|
13262
|
+
function assertLoopDispatchesSucceeded(results) {
|
|
13263
|
+
const failed = results.filter((result) => result.status === "failed");
|
|
13264
|
+
if (failed.length === 0) return;
|
|
13265
|
+
throw new Error(
|
|
13266
|
+
`Loop dispatch failed: ${failed.map((result) => `${result.loopId}: ${result.reason}`).join("; ")}`
|
|
13267
|
+
);
|
|
13268
|
+
}
|
|
13262
13269
|
async function dispatchLoopsWith(input) {
|
|
13263
13270
|
const results = [];
|
|
13264
13271
|
for (const loop of input.loops) {
|
|
@@ -13421,6 +13428,7 @@ var init_dispatchLoops = __esm({
|
|
|
13421
13428
|
`);
|
|
13422
13429
|
}
|
|
13423
13430
|
ctx.data.loopDispatchResults = results;
|
|
13431
|
+
assertLoopDispatchesSucceeded(results);
|
|
13424
13432
|
};
|
|
13425
13433
|
}
|
|
13426
13434
|
});
|
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.473",
|
|
4
4
|
"description": "kody — autonomous development engine. Single-session Claude Code agent behind a generic executor + declarative implementation profiles.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|