@kody-ade/kody-engine 0.4.176 → 0.4.178

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 +15 -6
  2. package/package.json +1 -1
package/dist/bin/kody.js CHANGED
@@ -1309,7 +1309,7 @@ var init_loadPriorArt = __esm({
1309
1309
  // package.json
1310
1310
  var package_default = {
1311
1311
  name: "@kody-ade/kody-engine",
1312
- version: "0.4.176",
1312
+ version: "0.4.178",
1313
1313
  description: "kody \u2014 autonomous development engine. Single-session Claude Code agent behind a generic executor + declarative executable profiles.",
1314
1314
  license: "MIT",
1315
1315
  type: "module",
@@ -12554,28 +12554,37 @@ var runPreviewBuild = async (ctx, _profile, _args) => {
12554
12554
  }
12555
12555
  let repo;
12556
12556
  let ref;
12557
- let flyToken;
12558
12557
  let masterKey;
12559
12558
  let ghToken4;
12560
12559
  try {
12561
12560
  repo = required("GITHUB_REPOSITORY");
12562
12561
  ref = required("GITHUB_SHA");
12563
- flyToken = required("FLY_API_TOKEN");
12564
12562
  masterKey = required("KODY_MASTER_KEY");
12565
- ghToken4 = required("GITHUB_TOKEN");
12563
+ ghToken4 = (process.env.KODY_TOKEN ?? process.env.GH_TOKEN ?? process.env.GITHUB_TOKEN ?? process.env.GH_PAT ?? "").trim();
12564
+ if (!ghToken4) {
12565
+ throw new Error(
12566
+ "GitHub auth token missing (KODY_TOKEN / GH_TOKEN / GITHUB_TOKEN / GH_PAT all empty)"
12567
+ );
12568
+ }
12566
12569
  } catch (err) {
12567
12570
  ctx.output.exitCode = 99;
12568
12571
  ctx.output.reason = `runPreviewBuild: ${err instanceof Error ? err.message : String(err)}`;
12569
12572
  return;
12570
12573
  }
12571
- const orgSlug = (process.env.FLY_ORG_SLUG ?? "personal").trim();
12572
- const region = (process.env.FLY_REGION ?? "fra").trim();
12573
12574
  const ghcrOwner = process.env.KODY_PREVIEW_GHCR_OWNER?.trim() || "";
12574
12575
  const appName = previewAppName(repo, pr);
12575
12576
  const tag = defaultImageTag(repo, ref);
12576
12577
  try {
12577
12578
  const doc = await fetchVaultDoc(repo, ghToken4, masterKey);
12578
12579
  const { buildEnv, buildMode } = buildEnvFromVault(doc);
12580
+ const flyToken = doc.secrets?.FLY_API_TOKEN?.value?.trim();
12581
+ if (!flyToken) {
12582
+ ctx.output.exitCode = 99;
12583
+ ctx.output.reason = "runPreviewBuild: vault has no FLY_API_TOKEN \u2014 add it via the dashboard's /secrets page";
12584
+ return;
12585
+ }
12586
+ const orgSlug = doc.secrets?.FLY_ORG_SLUG?.value?.trim() || (process.env.FLY_ORG_SLUG ?? "personal").trim();
12587
+ const region = doc.secrets?.FLY_DEFAULT_REGION?.value?.trim() || (process.env.FLY_REGION ?? "fra").trim();
12579
12588
  console.log(
12580
12589
  `[preview-build] vault: ${Object.keys(buildEnv).length} secrets, mode=${buildMode}`
12581
12590
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kody-ade/kody-engine",
3
- "version": "0.4.176",
3
+ "version": "0.4.178",
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",