@kody-ade/kody-engine 0.4.606 → 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 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.606",
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 !== "qaAccountCredentials" && 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(", ")}`);
@@ -2372,10 +2372,13 @@ function parseCapabilityRequirements(raw) {
2372
2372
  ))) {
2373
2373
  throw new Error("contract.json requirements.qaAccountCredentials must contain valid credential names");
2374
2374
  }
2375
+ if (raw.qaAccountModelSettings !== void 0 && !isPlainObject(raw.qaAccountModelSettings)) {
2376
+ throw new Error("contract.json requirements.qaAccountModelSettings must be an object");
2377
+ }
2375
2378
  if (raw.browserOnly !== void 0 && typeof raw.browserOnly !== "boolean") {
2376
2379
  throw new Error("contract.json requirements.browserOnly must be boolean");
2377
2380
  }
2378
- if ((raw.qaCredentials === true || raw.githubTestToken === true || raw.qaAccountCredentials !== void 0 || 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) {
2379
2382
  throw new Error("contract.json authentication requirements require browser");
2380
2383
  }
2381
2384
  const requirements = {
@@ -2383,6 +2386,7 @@ function parseCapabilityRequirements(raw) {
2383
2386
  ...raw.qaCredentials === true ? { qaCredentials: true } : {},
2384
2387
  ...raw.githubTestToken === true ? { githubTestToken: true } : {},
2385
2388
  ...Array.isArray(raw.qaAccountCredentials) ? { qaAccountCredentials: [...new Set(raw.qaAccountCredentials)] } : {},
2389
+ ...isPlainObject(raw.qaAccountModelSettings) ? { qaAccountModelSettings: raw.qaAccountModelSettings } : {},
2386
2390
  ...raw.browserOnly === true ? { browserOnly: true } : {}
2387
2391
  };
2388
2392
  return Object.keys(requirements).length > 0 ? requirements : void 0;
@@ -18517,6 +18521,25 @@ async function prepareAccountCredentials(ctx, profile, input) {
18517
18521
  appendAuthMessage(ctx, "Auth: the QA account's required model credentials are already prepared by the engine.");
18518
18522
  return true;
18519
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
+ }
18520
18543
  function mergeStorageStates(existingPath, nextPath) {
18521
18544
  if (existingPath === nextPath || !fs48.existsSync(existingPath)) return;
18522
18545
  const existing = JSON.parse(fs48.readFileSync(existingPath, "utf-8"));
@@ -18914,6 +18937,12 @@ var init_prepareSimpleCapabilityRuntime = __esm({
18914
18937
  targetUrl
18915
18938
  });
18916
18939
  }
18940
+ if (requirements.qaAccountModelSettings) {
18941
+ await prepareAccountModelSettings(ctx, profile, {
18942
+ settings: requirements.qaAccountModelSettings,
18943
+ targetUrl
18944
+ });
18945
+ }
18917
18946
  }
18918
18947
  if (requirements.githubTestToken) {
18919
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.606",
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",
@@ -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
- OPENROUTER_API_KEY: ${{ secrets.OPENROUTER_API_KEY }}
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 }}