@kody-ade/kody-engine 0.4.179 → 0.4.181

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 +33 -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.181",
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,51 @@ 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
+ `curl -fsSL https://get.namespace.so/install.sh | bash -s -- -y || curl -fsSL https://get.namespace.so/install.sh | bash`
12658
+ ],
12659
+ { cwd: ctx.cwd }
12660
+ );
12661
+ const nscPath = [
12662
+ `${process.env.HOME ?? ""}/.local/bin`,
12663
+ "/usr/local/bin",
12664
+ process.env.PATH ?? ""
12665
+ ].filter(Boolean).join(":");
12666
+ await runCmd("bash", ["-c", "nsc version"], {
12667
+ cwd: ctx.cwd,
12668
+ env: { PATH: nscPath }
12669
+ });
12670
+ await runCmd("nsc", ["docker", "buildx", "setup"], {
12671
+ cwd: ctx.cwd,
12672
+ env: { PATH: nscPath }
12673
+ });
12646
12674
  await runCmd(
12647
12675
  "docker",
12648
12676
  ["login", "registry.fly.io", "-u", "x", "--password-stdin"],
12649
12677
  { input: flyToken, cwd: ctx.cwd }
12650
12678
  );
12651
12679
  const buildArgs = [
12680
+ "buildx",
12652
12681
  "build",
12653
12682
  "-f",
12654
12683
  "Dockerfile.preview",
12655
12684
  "-t",
12656
- `registry.fly.io/${appName}:${tag}`
12685
+ `registry.fly.io/${appName}:${tag}`,
12686
+ "--push"
12657
12687
  ];
12658
12688
  if (baseImage) buildArgs.push("--build-arg", `BASE_IMAGE=${baseImage}`);
12659
12689
  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
- });
12690
+ await runCmd("docker", buildArgs, { cwd: ctx.cwd });
12667
12691
  const stale = await flyListMachines(appName, flyToken);
12668
12692
  for (const m of stale) {
12669
12693
  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.181",
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",