@kody-ade/kody-engine 0.4.179 → 0.4.180

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 +21 -9
  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.179",
1312
+ version: "0.4.180",
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",
@@ -12643,27 +12643,39 @@ var runPreviewBuild = async (ctx, _profile, _args) => {
12643
12643
  await flyCreateApp(appName, orgSlug, flyToken);
12644
12644
  }
12645
12645
  await flyAllocateSharedIps(appName, flyToken);
12646
+ const nscToken = doc.secrets?.NSC_TOKEN?.value?.trim();
12647
+ if (!nscToken) {
12648
+ ctx.output.exitCode = 99;
12649
+ ctx.output.reason = "runPreviewBuild: vault has no NSC_TOKEN \u2014 add it via the dashboard's /secrets page";
12650
+ return;
12651
+ }
12652
+ process.env.NSC_TOKEN = nscToken;
12653
+ await runCmd(
12654
+ "bash",
12655
+ [
12656
+ "-c",
12657
+ "command -v nsc >/dev/null 2>&1 || curl -fsSL https://get.namespace.so/install.sh | sh"
12658
+ ],
12659
+ { cwd: ctx.cwd }
12660
+ );
12661
+ await runCmd("nsc", ["docker", "buildx", "setup"], { cwd: ctx.cwd });
12646
12662
  await runCmd(
12647
12663
  "docker",
12648
12664
  ["login", "registry.fly.io", "-u", "x", "--password-stdin"],
12649
12665
  { input: flyToken, cwd: ctx.cwd }
12650
12666
  );
12651
12667
  const buildArgs = [
12668
+ "buildx",
12652
12669
  "build",
12653
12670
  "-f",
12654
12671
  "Dockerfile.preview",
12655
12672
  "-t",
12656
- `registry.fly.io/${appName}:${tag}`
12673
+ `registry.fly.io/${appName}:${tag}`,
12674
+ "--push"
12657
12675
  ];
12658
12676
  if (baseImage) buildArgs.push("--build-arg", `BASE_IMAGE=${baseImage}`);
12659
12677
  buildArgs.push(".");
12660
- await runCmd("docker", buildArgs, {
12661
- cwd: ctx.cwd,
12662
- env: { DOCKER_BUILDKIT: "1" }
12663
- });
12664
- await runCmd("docker", ["push", `registry.fly.io/${appName}:${tag}`], {
12665
- cwd: ctx.cwd
12666
- });
12678
+ await runCmd("docker", buildArgs, { cwd: ctx.cwd });
12667
12679
  const stale = await flyListMachines(appName, flyToken);
12668
12680
  for (const m of stale) {
12669
12681
  await flyDestroyMachine(appName, m.id, flyToken).catch(() => void 0);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kody-ade/kody-engine",
3
- "version": "0.4.179",
3
+ "version": "0.4.180",
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",