@kody-ade/kody-engine 0.4.605 → 0.4.607
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 +38 -3
- package/package.json +1 -1
- package/templates/kody.yml +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.607",
|
|
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",
|
|
@@ -2353,7 +2353,7 @@ function parseCapabilityRequirements(raw) {
|
|
|
2353
2353
|
if (raw === void 0) return void 0;
|
|
2354
2354
|
if (!isPlainObject(raw)) throw new Error("contract.json requirements must be an object");
|
|
2355
2355
|
const unsupported = Object.keys(raw).filter(
|
|
2356
|
-
(key) => key !== "browser" && key !== "qaCredentials" && key !== "githubTestToken" && key !== "browserOnly"
|
|
2356
|
+
(key) => key !== "browser" && key !== "qaCredentials" && key !== "githubTestToken" && key !== "qaAccountCredentials" && key !== "qaAccountModelSettings" && key !== "browserOnly"
|
|
2357
2357
|
);
|
|
2358
2358
|
if (unsupported.length > 0) {
|
|
2359
2359
|
throw new Error(`contract.json requirements contains unsupported fields: ${unsupported.join(", ")}`);
|
|
@@ -2367,16 +2367,26 @@ function parseCapabilityRequirements(raw) {
|
|
|
2367
2367
|
if (raw.githubTestToken !== void 0 && typeof raw.githubTestToken !== "boolean") {
|
|
2368
2368
|
throw new Error("contract.json requirements.githubTestToken must be boolean");
|
|
2369
2369
|
}
|
|
2370
|
+
if (raw.qaAccountCredentials !== void 0 && (!Array.isArray(raw.qaAccountCredentials) || raw.qaAccountCredentials.length === 0 || !raw.qaAccountCredentials.every(
|
|
2371
|
+
(name) => typeof name === "string" && /^[A-Z][A-Z0-9_]{0,127}$/.test(name)
|
|
2372
|
+
))) {
|
|
2373
|
+
throw new Error("contract.json requirements.qaAccountCredentials must contain valid credential names");
|
|
2374
|
+
}
|
|
2375
|
+
if (raw.qaAccountModelSettings !== void 0 && !isPlainObject(raw.qaAccountModelSettings)) {
|
|
2376
|
+
throw new Error("contract.json requirements.qaAccountModelSettings must be an object");
|
|
2377
|
+
}
|
|
2370
2378
|
if (raw.browserOnly !== void 0 && typeof raw.browserOnly !== "boolean") {
|
|
2371
2379
|
throw new Error("contract.json requirements.browserOnly must be boolean");
|
|
2372
2380
|
}
|
|
2373
|
-
if ((raw.qaCredentials === true || raw.githubTestToken === true || raw.browserOnly === true) && raw.browser !== true) {
|
|
2381
|
+
if ((raw.qaCredentials === true || raw.githubTestToken === true || raw.qaAccountCredentials !== void 0 || raw.qaAccountModelSettings !== void 0 || raw.browserOnly === true) && raw.browser !== true) {
|
|
2374
2382
|
throw new Error("contract.json authentication requirements require browser");
|
|
2375
2383
|
}
|
|
2376
2384
|
const requirements = {
|
|
2377
2385
|
...raw.browser === true ? { browser: true } : {},
|
|
2378
2386
|
...raw.qaCredentials === true ? { qaCredentials: true } : {},
|
|
2379
2387
|
...raw.githubTestToken === true ? { githubTestToken: true } : {},
|
|
2388
|
+
...Array.isArray(raw.qaAccountCredentials) ? { qaAccountCredentials: [...new Set(raw.qaAccountCredentials)] } : {},
|
|
2389
|
+
...isPlainObject(raw.qaAccountModelSettings) ? { qaAccountModelSettings: raw.qaAccountModelSettings } : {},
|
|
2380
2390
|
...raw.browserOnly === true ? { browserOnly: true } : {}
|
|
2381
2391
|
};
|
|
2382
2392
|
return Object.keys(requirements).length > 0 ? requirements : void 0;
|
|
@@ -18511,6 +18521,25 @@ async function prepareAccountCredentials(ctx, profile, input) {
|
|
|
18511
18521
|
appendAuthMessage(ctx, "Auth: the QA account's required model credentials are already prepared by the engine.");
|
|
18512
18522
|
return true;
|
|
18513
18523
|
}
|
|
18524
|
+
async function prepareAccountModelSettings(ctx, profile, input) {
|
|
18525
|
+
const cookie = browserSessionCookieHeader(profile, input.targetUrl);
|
|
18526
|
+
if (!cookie) {
|
|
18527
|
+
appendAuthMessage(ctx, "Auth: QA Chat model setup could not run because the app session is missing.");
|
|
18528
|
+
return false;
|
|
18529
|
+
}
|
|
18530
|
+
const origin = browserOrigin(input.targetUrl);
|
|
18531
|
+
const response = await fetch(`${origin}/api/kody/models`, {
|
|
18532
|
+
method: "PUT",
|
|
18533
|
+
headers: { "content-type": "application/json", cookie, origin },
|
|
18534
|
+
body: JSON.stringify(input.settings)
|
|
18535
|
+
});
|
|
18536
|
+
if (!response.ok) {
|
|
18537
|
+
appendAuthMessage(ctx, `Auth: QA Chat model setup returned ${response.status}.`);
|
|
18538
|
+
return false;
|
|
18539
|
+
}
|
|
18540
|
+
appendAuthMessage(ctx, "Auth: the QA account's Chat model is already prepared by the engine.");
|
|
18541
|
+
return true;
|
|
18542
|
+
}
|
|
18514
18543
|
function mergeStorageStates(existingPath, nextPath) {
|
|
18515
18544
|
if (existingPath === nextPath || !fs48.existsSync(existingPath)) return;
|
|
18516
18545
|
const existing = JSON.parse(fs48.readFileSync(existingPath, "utf-8"));
|
|
@@ -18908,6 +18937,12 @@ var init_prepareSimpleCapabilityRuntime = __esm({
|
|
|
18908
18937
|
targetUrl
|
|
18909
18938
|
});
|
|
18910
18939
|
}
|
|
18940
|
+
if (requirements.qaAccountModelSettings) {
|
|
18941
|
+
await prepareAccountModelSettings(ctx, profile, {
|
|
18942
|
+
settings: requirements.qaAccountModelSettings,
|
|
18943
|
+
targetUrl
|
|
18944
|
+
});
|
|
18945
|
+
}
|
|
18911
18946
|
}
|
|
18912
18947
|
if (requirements.githubTestToken) {
|
|
18913
18948
|
const capabilityInput = ctx.data.capabilityInput && typeof ctx.data.capabilityInput === "object" && !Array.isArray(ctx.data.capabilityInput) ? ctx.data.capabilityInput : {};
|
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.607",
|
|
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",
|
package/templates/kody.yml
CHANGED
|
@@ -82,7 +82,7 @@ jobs:
|
|
|
82
82
|
GH_PAT: ${{ secrets.GH_PAT }}
|
|
83
83
|
KODY_TOKEN: ${{ secrets.KODY_TOKEN }}
|
|
84
84
|
E2E_GITHUB_TOKEN: ${{ secrets.E2E_GITHUB_TOKEN }}
|
|
85
|
-
|
|
85
|
+
MINIMAX_API_KEY: ${{ secrets.MINIMAX_API_KEY }}
|
|
86
86
|
KODY_APP_ID: ${{ secrets.KODY_APP_ID }}
|
|
87
87
|
KODY_APP_PRIVATE_KEY: ${{ secrets.KODY_APP_PRIVATE_KEY }}
|
|
88
88
|
SESSION_ID: ${{ inputs.sessionId }}
|