Skip to content

feat(cli): launch.static + --cdn-base-url for framework CDN assets - #1631

Merged
jhaynie merged 2 commits into
mainfrom
feat/launch-static-cdn-base-url
Jul 31, 2026
Merged

feat(cli): launch.static + --cdn-base-url for framework CDN assets#1631
jhaynie merged 2 commits into
mainfrom
feat/launch-static-cdn-base-url

Conversation

@jhaynie

@jhaynie jhaynie commented Jul 31, 2026

Copy link
Copy Markdown
Member

Summary

This PR makes the build output self-describing for CDN upload and gives apps a single flag to bake absolute asset URLs at package time.

  1. launch.json gains an optional static block — directory, public path prefix, and optional absolute CDN base URL.
  2. --cdn-base-url on agentuity build and agentuity deploy (also AGENTUITY_CDN_BASE_URL / AGENTUITY_CDN_ORIGIN env).
  3. Framework-specific asset URL wiring so HTML/SSR payloads point at the CDN when a base is known.
  4. Shared config-wrap + recipe system so Next/Astro/Nuxt/SvelteKit share one lifecycle instead of four copy-pasted modules.
  5. Runtime fix for starts like HOST=0.0.0.0 node … (no longer misclassified as bun from lockfile alone).

Server LaunchMetadataSchema accepts the new optional static field for deploy API validation.


New launch.json contract

Shape

{
  "processes": [
    {
      "type": "web",
      "command": "node server.js",
      "default": true,
      "workingDirectory": "apps/web"
    }
  ],
  "framework": { "name": "nextjs" },
  "runtime": { "name": "node", "port": 3000 },
  "build": { "date": "2026-07-31T21:00:00.000Z", "duration": 5000 },
  "static": {
    "directory": ".next/static",
    "publicPath": "_next/static",
    "baseUrl": "https://cdn.agentuity.com/org_test123/assets/"
  }
}
Field Meaning
static.directory Path to static files relative to process workingDirectory (or deploy root). Posix separators.
static.publicPath URL path prefix for files inside directory (no leading slash). Framework-defined (e.g. _next/static). Empty string "" when the whole directory is the web root.
static.baseUrl Absolute CDN base with trailing slash when known at package time (--cdn-base-url or env). Omitted when CDN wiring was skipped.

URL composition

{baseUrl}{publicPath}/{pathWithinDirectory}

Examples with Next (publicPath: "_next/static"):

--cdn-base-url Example asset URL
https://cdn.agentuity.com/ https://cdn.agentuity.com/_next/static/chunks/main.js
https://cdn.agentuity.com/org_test123/assets/ https://cdn.agentuity.com/org_test123/assets/_next/static/chunks/main.js

Examples with Vite SPA (publicPath: "", files under assets/):

--cdn-base-url Example asset URL
https://cdn.agentuity.com/ https://cdn.agentuity.com/assets/index-abc.js
https://cdn.agentuity.com/org_test123/assets/ https://cdn.agentuity.com/org_test123/assets/assets/index-abc.js

Note: when the CDN path ends in /assets/ and Vite also emits into an assets/ folder, paths double up (…/assets/assets/…). That is compositionally correct; choose a CDN base that matches how you upload keys if you want to avoid the double segment.

When static is omitted

API-only / generic projects with no known static dir (e.g. Hono tsc + node dist/index.js) omit static entirely. CDN flag is a no-op for baking; there is nothing to upload.


CLI usage

# Root CDN host
agentuity build --cdn-base-url 'https://cdn.agentuity.com/'

# Org / path prefix
agentuity build --cdn-base-url 'https://cdn.agentuity.com/org_test123/assets/'

# Same flag on deploy
agentuity deploy --cdn-base-url 'https://cdn.agentuity.com/org_test123/assets/'

Resolution priority for CDN origin

  1. --cdn-base-url / pipeline cdnBaseUrl
  2. AGENTUITY_CDN_BASE_URL
  3. AGENTUITY_CDN_ORIGIN (legacy / adapter-set)
  4. https://cdn.agentuity.com/{deploymentId} (skipped for pack-only sentinel)

Also sets AGENTUITY_CDN_ORIGIN + AGENTUITY_CDN_BASE_URL in the build env (plus framework-specific vars like NUXT_APP_CDN_URL).


Framework matrix (what we wire + what we tested)

Framework Adapter How CDN URLs are baked static.directory static.publicPath Live tested
Next.js nextjs Temporary next.config wrap → assetPrefix .next/static (or monorepo-relative under standalone) _next/static nextjs-genesis
Vite SPA vite Inject vite … --base={cdn}/ into build command . (flattened dist) or dist "" test-tldraw, monorepo Genesis web
Astro astro Temporary config wrap → build.assetsPrefix . (flattened dist) "" test-astro
Nuxt nuxt Temporary config wrap → app.cdnURL + NUXT_APP_CDN_URL .output/public "" test-astro/test-nuxt
SvelteKit sveltekit adapter-autoadapter-node + wrap → kit.paths.assets build/client "" test-astro/test-sk
TanStack Start tanstack-start Generated src/server.ts with baked transformAssets.prefix + Vite base: '' .output/public "" test-tanstack, test-nitro-project (detected as tanstack-start)
static-html generic No bake (plain HTML) . "" /tmp/static
Hono / generic API generic No static / no bake (omitted) test-hono
Monorepo Vite app vite + monorepo stage Vite --base + workingDirectory dist (relative to subpackage) "" genesis-mono/apps/web

Specialized packaging (Next standalone, monorepo tree copy, ignore patterns) is unchanged aside from CDN prep and launch metadata.


Example launch.json outputs from live builds

Next.js (root CDN)

{
  "processes": [
    {
      "type": "web",
      "command": "node nextjs-genesis/server.js",
      "default": true
    }
  ],
  "framework": { "name": "nextjs" },
  "runtime": { "name": "node", "port": 3000 },
  "build": { "date": "", "duration": 9581 },
  "static": {
    "directory": "nextjs-genesis/.next/static",
    "publicPath": "_next/static",
    "baseUrl": "https://cdn.agentuity.com/"
  }
}

Baked HTML / RSC:

https://cdn.agentuity.com/_next/static/chunks/main-app-….js
https://cdn.agentuity.com/_next/static/css/….css

With org subpath (--cdn-base-url 'https://cdn.agentuity.com/org_test123/assets/'):

"static": {
  "directory": "nextjs-genesis/.next/static",
  "publicPath": "_next/static",
  "baseUrl": "https://cdn.agentuity.com/org_test123/assets/"
}
https://cdn.agentuity.com/org_test123/assets/_next/static/chunks/….js

(assetPrefix in Next config / required-server-files: https://cdn.agentuity.com/org_test123/assets without trailing slash.)


Vite SPA — tldraw (org subpath)

{
  "processes": [
    {
      "type": "web",
      "command": "node _serve.js",
      "default": true
    }
  ],
  "framework": { "name": "vite" },
  "runtime": { "name": "node" },
  "static": {
    "directory": ".",
    "publicPath": "",
    "baseUrl": "https://cdn.agentuity.com/org_test123/assets/"
  }
}

index.html:

<link rel="icon" href="https://cdn.agentuity.com/org_test123/assets/favicon.ico" />
<script type="module" crossorigin src="https://cdn.agentuity.com/org_test123/assets/assets/index-….js"></script>
<link rel="stylesheet" crossorigin href="https://cdn.agentuity.com/org_test123/assets/assets/index-….css">

Log line: ✓ Vite CDN base via CLI: --base=https://cdn.agentuity.com/org_test123/assets/
(Works with compound scripts like tsc && vite build--base is injected only on the vite segment.)


Astro SSG (org subpath)

{
  "processes": [
    {
      "type": "web",
      "command": "node _serve.js",
      "default": true
    }
  ],
  "framework": { "name": "astro" },
  "runtime": { "name": "node" },
  "static": {
    "directory": ".",
    "publicPath": "",
    "baseUrl": "https://cdn.agentuity.com/org_test123/assets/"
  }
}

Hashed /_astro/… assets:

https://cdn.agentuity.com/org_test123/assets/_astro/fonts/….woff
https://cdn.agentuity.com/org_test123/assets/_astro/blog-placeholder-….webp

public/ files (e.g. /favicon.svg) may stay origin-relative — Astro’s normal assetsPrefix behavior.


Nuxt (org subpath)

{
  "processes": [
    {
      "type": "web",
      "command": "HOST=0.0.0.0 node .output/server/index.mjs",
      "default": true
    }
  ],
  "framework": { "name": "nuxt" },
  "runtime": { "name": "node" },
  "static": {
    "directory": ".output/public",
    "publicPath": "",
    "baseUrl": "https://cdn.agentuity.com/org_test123/assets/"
  }
}

Baked into Nitro server config:

"cdnURL": "https://cdn.agentuity.com/org_test123/assets/"

Static files staged under .output/public/_nuxt/….


SvelteKit (org subpath)

{
  "processes": [
    {
      "type": "web",
      "command": "node build/index.js",
      "default": true
    }
  ],
  "framework": { "name": "sveltekit" },
  "runtime": { "name": "node" },
  "static": {
    "directory": "build/client",
    "publicPath": "",
    "baseUrl": "https://cdn.agentuity.com/org_test123/assets/"
  }
}

Prerendered HTML:

href="https://cdn.agentuity.com/org_test123/assets/favicon.svg"
href="https://cdn.agentuity.com/org_test123/assets/_app/immutable/entry/start.….js"
href="https://cdn.agentuity.com/org_test123/assets/_app/immutable/assets/….css"

Also swaps adapter-autoadapter-node for self-hosting (restored after build).


TanStack Start (org subpath)

{
  "processes": [
    {
      "type": "web",
      "command": "HOST=0.0.0.0 node .output/server/index.mjs",
      "default": true
    }
  ],
  "framework": { "name": "tanstack-start" },
  "runtime": { "name": "node" },
  "static": {
    "directory": ".output/public",
    "publicPath": "",
    "baseUrl": "https://cdn.agentuity.com/org_test123/assets/"
  }
}

Baked into Nitro SSR (transformAssets):

transformAssets: {
  prefix: "https://cdn.agentuity.com/org_test123/assets",
  crossOrigin: "anonymous"
}

Temporary src/server.ts is generated for the build and removed after.


Bare static HTML

{
  "processes": [
    {
      "type": "web",
      "command": "npx serve",
      "default": true
    }
  ],
  "framework": { "name": "static-html" },
  "runtime": { "name": "node", "port": 3000 },
  "static": {
    "directory": ".",
    "publicPath": "",
    "baseUrl": "https://cdn.agentuity.com/org_test123/assets/"
  }
}

HTML is copied as-is (no asset rewrite). Upload composition: {baseUrl}index.html.


Hono / generic API (no static)

{
  "processes": [
    {
      "type": "web",
      "command": "node dist/index.js",
      "default": true
    }
  ],
  "framework": { "name": "generic" },
  "runtime": { "name": "node", "port": 3000 },
  "build": { "date": "", "duration": 1011 }
}

No static key. --cdn-base-url does not change the bundle.


Monorepo — Genesis apps/web (pnpm workspace)

{
  "processes": [
    {
      "type": "web",
      "command": "node --import tsx src/index.ts",
      "default": true,
      "workingDirectory": "apps/web"
    }
  ],
  "framework": { "name": "vite" },
  "runtime": { "name": "node" },
  "static": {
    "directory": "dist",
    "publicPath": "",
    "baseUrl": "https://cdn.agentuity.com/org_test123/assets/"
  }
}
  • Staging root: <monorepo>/.agentuity/ (not apps/web/.agentuity/)
  • Package manager forced to pnpm at workspace root for install
  • .agentuityignore applied; protected paths kept when required
  • Vite CDN --base baked into apps/web/dist/index.html
  • Hybrid app: Vite client build + Node start (tsx + src/index.ts), not pure SPA

Architecture (implementation notes)

adapters/
  config-cdn-wrap.ts   # shared: resolve origin, buildEnv, backup/wrap/cleanup
  cdn-recipes.ts       # Next / Astro / Nuxt / SvelteKit recipes only
  with-cdn-prep.ts     # factory: prepare → generic (or custom) build → cleanup
  cdn-origin.ts        # origin / base resolution
  vite/cdn-build.ts    # Vite-specific --base inject
  tanstack-start/…     # server entry + transformAssets bake

Adding another config-based framework ≈ small recipe in cdn-recipes.ts + one-line adapter registration, not another 250-line clone.

Runtime fix

Starts like HOST=0.0.0.0 node .output/server/index.mjs now resolve to runtime.name: "node" via stripCommandEnvPrefixes / resolveRuntimeFromStartCommand (detection + launch packaging). Previously a bun lockfile could force runtime: "bun" even though the process runs node.


Test plan

Unit

  • launch.static generation, monorepo-relative directory, user override merge, HOST=… node → runtime node
  • CDN origin priority (--cdn-base-url > AGENTUITY_CDN_BASE_URL > AGENTUITY_CDN_ORIGIN > deployment id; pack-only skipped)
  • Next / Astro / Nuxt / SvelteKit config wrap + cleanup restore
  • Vite --base inject (including compound tsc && vite build)
  • TanStack server generation + baked origin
  • Adapter registry (astro, nuxt, sveltekit, vite, nextjs, tanstack-start)

Live builds (local CLI, both root CDN and org subpath where noted)

Project Path Result
Next.js /Users/jhaynie/tmp/nextjs-genesis launch.static + assetPrefix URLs
static-html /Users/jhaynie/tmp/static launch.static only
TanStack Start /Users/jhaynie/tmp/test-tanstack launch.static + transformAssets bake
Astro /Users/jhaynie/tmp/test-astro launch.static + assetsPrefix URLs
Vite (tldraw) /Users/jhaynie/tmp/test-tldraw launch.static + --base URLs
Hono /Users/jhaynie/tmp/test-hono no static (correct)
Nuxt /Users/jhaynie/tmp/test-astro/test-nuxt launch.static + nitro cdnURL
SvelteKit /Users/jhaynie/tmp/test-astro/test-sk launch.static + absolute asset hrefs
“nitro” fixture /Users/jhaynie/tmp/test-nitro-project detected as tanstack-start (has @tanstack/react-start)
Monorepo web genesis-mono/apps/web workingDirectory + Vite CDN + pnpm stage

CI

  • CI green on this PR

…ssets

Record static asset directory, publicPath, and optional CDN baseUrl in
launch.json so deploy consumers can upload without re-detecting frameworks.
Add --cdn-base-url for build/deploy so Next, Vite, Astro, Nuxt, SvelteKit,
and TanStack bake absolute CDN URLs at package time. Share config-wrap and
adapter prep so new frameworks only need a small recipe. Fix runtime
inference for HOST=… node start commands.
@agentuity-agent

agentuity-agent Bot commented Jul 31, 2026

Copy link
Copy Markdown

The latest Agentuity deployment details.

Project Deployment Preview Updated (UTC)
docs 🔴 Failed (details) - 2026-07-31T22:17:25Z

exit code 1

View deployment logs with the Agentuity CLI:

agentuity cloud deployment logs deploy_0ee2f756dae5f6cf560b56b3ff5b2995 --project-id=proj_5ed7da797bef771d65e1bd6946a052b1

@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 40 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: c0115a66-72b9-496a-9bcd-f57b286222a7

📥 Commits

Reviewing files that changed from the base of the PR and between dcbf422 and b1d1f74.

📒 Files selected for processing (16)
  • packages/cli/src/cmd/build/adapters/config-cdn-wrap.ts
  • packages/cli/src/cmd/build/adapters/nextjs.ts
  • packages/cli/src/cmd/build/adapters/vite.ts
  • packages/cli/src/cmd/build/adapters/vite/cdn-build.ts
  • packages/cli/src/cmd/build/adapters/with-cdn-prep.ts
  • packages/cli/src/cmd/build/detect/util.ts
  • packages/cli/src/cmd/build/index.ts
  • packages/cli/src/cmd/build/package/launch.ts
  • packages/cli/src/types.ts
  • packages/cli/test/cmd/build/adapters/astro-cdn.test.ts
  • packages/cli/test/cmd/build/adapters/nextjs-cdn.test.ts
  • packages/cli/test/cmd/build/adapters/nuxt-cdn.test.ts
  • packages/cli/test/cmd/build/adapters/sveltekit-cdn.test.ts
  • packages/cli/test/cmd/build/adapters/tanstack-start.test.ts
  • packages/cli/test/cmd/build/adapters/vite-cdn.test.ts
  • packages/cli/test/cmd/build/detect/util.test.ts
📝 Walkthrough

Walkthrough

The CLI adds CDN-aware build preparation for multiple frameworks, propagates cdnBaseUrl through builds and deployments, emits static launch metadata, and centralizes runtime detection for environment-prefixed start commands.

Changes

CDN configuration preparation

Layer / File(s) Summary
CDN resolution and framework configuration
packages/cli/src/cmd/build/adapters/cdn-origin.ts, packages/cli/src/cmd/build/adapters/config-cdn-wrap.ts, packages/cli/src/cmd/build/adapters/cdn-recipes.ts
CDN origins and bases now use explicit options and environment fallbacks. Shared preparation wraps framework configs, applies framework-specific settings, sets build environment values, and restores temporary files.

Framework adapter integration

Layer / File(s) Summary
CDN-enabled framework adapters
packages/cli/src/cmd/build/adapters/with-cdn-prep.ts, packages/cli/src/cmd/build/adapters/{astro,nextjs,nuxt,sveltekit,tanstack-start,vite}*, packages/cli/test/cmd/build/adapters/*
Framework adapters use shared CDN preparation and cleanup. Adapter registry and framework-specific tests cover configuration changes, restoration, URL normalization, and build behavior.

Pipeline and launch metadata

Layer / File(s) Summary
CDN propagation and static launch metadata
packages/cli/src/cmd/build/{index.ts,run.ts}, packages/cli/src/cmd/build/package/*, packages/cli/src/cmd/cloud/deploy.ts, packages/cli/src/types.ts, packages/server/src/api/project/deploy.ts, packages/cli/test/cmd/build/package/launch.test.ts
cdnBaseUrl flows through CLI, deployment, build, and packaging inputs. Launch metadata now includes validated static asset directory, public path, and CDN base URL fields.

Runtime detection

Layer / File(s) Summary
Environment-prefixed start commands
packages/cli/src/cmd/build/detect/*, packages/cli/src/cmd/build/package/launch.ts, packages/cli/test/cmd/build/detect/util.test.ts
Runtime detection strips cross-env and leading environment assignments before resolving Node or Bun from start commands. Launch metadata and build detectors use the shared resolver.
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Jul 31, 2026

Copy link
Copy Markdown

📦 Canary Packages Published

version: 3.1.15-b1d1f74

Packages
Package Version URL
@agentuity/hono 3.1.15-b1d1f74 https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-hono-3.1.15-b1d1f74.tgz
@agentuity/config 3.1.15-b1d1f74 https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-config-3.1.15-b1d1f74.tgz
@agentuity/analytics 3.1.15-b1d1f74 https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-analytics-3.1.15-b1d1f74.tgz
@agentuity/claude-code 3.1.15-b1d1f74 https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-claude-code-3.1.15-b1d1f74.tgz
@agentuity/postgres 3.1.15-b1d1f74 https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-postgres-3.1.15-b1d1f74.tgz
@agentuity/api 3.1.15-b1d1f74 https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-api-3.1.15-b1d1f74.tgz
@agentuity/genesis 3.1.15-b1d1f74 https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-genesis-3.1.15-b1d1f74.tgz
@agentuity/vite 3.1.15-b1d1f74 https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-vite-3.1.15-b1d1f74.tgz
@agentuity/adapter 3.1.15-b1d1f74 https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-adapter-3.1.15-b1d1f74.tgz
create-agentuity 3.1.15-b1d1f74 https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/create-agentuity-3.1.15-b1d1f74.tgz
@agentuity/schedule 3.1.15-b1d1f74 https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-schedule-3.1.15-b1d1f74.tgz
@agentuity/cli 3.1.15-b1d1f74 https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-cli-3.1.15-b1d1f74.tgz
@agentuity/queue 3.1.15-b1d1f74 https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-queue-3.1.15-b1d1f74.tgz
@agentuity/sandbox 3.1.15-b1d1f74 https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-sandbox-3.1.15-b1d1f74.tgz
@agentuity/email 3.1.15-b1d1f74 https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-email-3.1.15-b1d1f74.tgz
@agentuity/vector 3.1.15-b1d1f74 https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-vector-3.1.15-b1d1f74.tgz
@agentuity/client 3.1.15-b1d1f74 https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-client-3.1.15-b1d1f74.tgz
@agentuity/runtime 3.1.15-b1d1f74 https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-runtime-3.1.15-b1d1f74.tgz
@agentuity/pi 3.1.15-b1d1f74 https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-pi-3.1.15-b1d1f74.tgz
@agentuity/coder 3.1.15-b1d1f74 https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-coder-3.1.15-b1d1f74.tgz
@agentuity/aigateway 3.1.15-b1d1f74 https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-aigateway-3.1.15-b1d1f74.tgz
@agentuity/server 3.1.15-b1d1f74 https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-server-3.1.15-b1d1f74.tgz
@agentuity/telemetry 3.1.15-b1d1f74 https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-telemetry-3.1.15-b1d1f74.tgz
@agentuity/db 3.1.15-b1d1f74 https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-db-3.1.15-b1d1f74.tgz
@agentuity/migrate 3.1.15-b1d1f74 https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-migrate-3.1.15-b1d1f74.tgz
@agentuity/task 3.1.15-b1d1f74 https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-task-3.1.15-b1d1f74.tgz
@agentuity/opencode 3.1.15-b1d1f74 https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-opencode-3.1.15-b1d1f74.tgz
@agentuity/core 3.1.15-b1d1f74 https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-core-3.1.15-b1d1f74.tgz
@agentuity/drizzle 3.1.15-b1d1f74 https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-drizzle-3.1.15-b1d1f74.tgz
@agentuity/stream 3.1.15-b1d1f74 https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-stream-3.1.15-b1d1f74.tgz
@agentuity/storage 3.1.15-b1d1f74 https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-storage-3.1.15-b1d1f74.tgz
@agentuity/schema 3.1.15-b1d1f74 https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-schema-3.1.15-b1d1f74.tgz
@agentuity/keyvalue 3.1.15-b1d1f74 https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-keyvalue-3.1.15-b1d1f74.tgz
@agentuity/coder-tui 3.1.15-b1d1f74 https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-coder-tui-3.1.15-b1d1f74.tgz
@agentuity/skills 3.1.15-b1d1f74 https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-skills-3.1.15-b1d1f74.tgz
@agentuity/webhook 3.1.15-b1d1f74 https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-webhook-3.1.15-b1d1f74.tgz
Install

Add to your package.json:

{
  "dependencies": {
    "@agentuity/hono": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-hono-3.1.15-b1d1f74.tgz",
    "@agentuity/config": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-config-3.1.15-b1d1f74.tgz",
    "@agentuity/analytics": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-analytics-3.1.15-b1d1f74.tgz",
    "@agentuity/claude-code": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-claude-code-3.1.15-b1d1f74.tgz",
    "@agentuity/postgres": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-postgres-3.1.15-b1d1f74.tgz",
    "@agentuity/api": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-api-3.1.15-b1d1f74.tgz",
    "@agentuity/genesis": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-genesis-3.1.15-b1d1f74.tgz",
    "@agentuity/vite": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-vite-3.1.15-b1d1f74.tgz",
    "@agentuity/adapter": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-adapter-3.1.15-b1d1f74.tgz",
    "create-agentuity": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/create-agentuity-3.1.15-b1d1f74.tgz",
    "@agentuity/schedule": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-schedule-3.1.15-b1d1f74.tgz",
    "@agentuity/cli": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-cli-3.1.15-b1d1f74.tgz",
    "@agentuity/queue": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-queue-3.1.15-b1d1f74.tgz",
    "@agentuity/sandbox": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-sandbox-3.1.15-b1d1f74.tgz",
    "@agentuity/email": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-email-3.1.15-b1d1f74.tgz",
    "@agentuity/vector": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-vector-3.1.15-b1d1f74.tgz",
    "@agentuity/client": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-client-3.1.15-b1d1f74.tgz",
    "@agentuity/runtime": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-runtime-3.1.15-b1d1f74.tgz",
    "@agentuity/pi": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-pi-3.1.15-b1d1f74.tgz",
    "@agentuity/coder": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-coder-3.1.15-b1d1f74.tgz",
    "@agentuity/aigateway": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-aigateway-3.1.15-b1d1f74.tgz",
    "@agentuity/server": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-server-3.1.15-b1d1f74.tgz",
    "@agentuity/telemetry": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-telemetry-3.1.15-b1d1f74.tgz",
    "@agentuity/db": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-db-3.1.15-b1d1f74.tgz",
    "@agentuity/migrate": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-migrate-3.1.15-b1d1f74.tgz",
    "@agentuity/task": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-task-3.1.15-b1d1f74.tgz",
    "@agentuity/opencode": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-opencode-3.1.15-b1d1f74.tgz",
    "@agentuity/core": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-core-3.1.15-b1d1f74.tgz",
    "@agentuity/drizzle": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-drizzle-3.1.15-b1d1f74.tgz",
    "@agentuity/stream": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-stream-3.1.15-b1d1f74.tgz",
    "@agentuity/storage": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-storage-3.1.15-b1d1f74.tgz",
    "@agentuity/schema": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-schema-3.1.15-b1d1f74.tgz",
    "@agentuity/keyvalue": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-keyvalue-3.1.15-b1d1f74.tgz",
    "@agentuity/coder-tui": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-coder-tui-3.1.15-b1d1f74.tgz",
    "@agentuity/skills": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-skills-3.1.15-b1d1f74.tgz",
    "@agentuity/webhook": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-webhook-3.1.15-b1d1f74.tgz"
  }
}

Or install directly:

bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-hono-3.1.15-b1d1f74.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-config-3.1.15-b1d1f74.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-analytics-3.1.15-b1d1f74.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-claude-code-3.1.15-b1d1f74.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-postgres-3.1.15-b1d1f74.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-api-3.1.15-b1d1f74.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-genesis-3.1.15-b1d1f74.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-vite-3.1.15-b1d1f74.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-adapter-3.1.15-b1d1f74.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/create-agentuity-3.1.15-b1d1f74.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-schedule-3.1.15-b1d1f74.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-cli-3.1.15-b1d1f74.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-queue-3.1.15-b1d1f74.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-sandbox-3.1.15-b1d1f74.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-email-3.1.15-b1d1f74.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-vector-3.1.15-b1d1f74.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-client-3.1.15-b1d1f74.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-runtime-3.1.15-b1d1f74.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-pi-3.1.15-b1d1f74.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-coder-3.1.15-b1d1f74.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-aigateway-3.1.15-b1d1f74.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-server-3.1.15-b1d1f74.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-telemetry-3.1.15-b1d1f74.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-db-3.1.15-b1d1f74.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-migrate-3.1.15-b1d1f74.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-task-3.1.15-b1d1f74.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-opencode-3.1.15-b1d1f74.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-core-3.1.15-b1d1f74.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-drizzle-3.1.15-b1d1f74.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-stream-3.1.15-b1d1f74.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-storage-3.1.15-b1d1f74.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-schema-3.1.15-b1d1f74.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-keyvalue-3.1.15-b1d1f74.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-coder-tui-3.1.15-b1d1f74.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-skills-3.1.15-b1d1f74.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.15-b1d1f74/agentuity-webhook-3.1.15-b1d1f74.tgz

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

🧹 Nitpick comments (5)
packages/cli/src/cmd/build/index.ts (1)

39-46: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Share the flag description with DeployOptionsSchema.

The same cdnBaseUrl field is described in packages/cli/src/types.ts (lines 665-670) with different wording. Two descriptions for one flag will drift. Export the field schema once and reuse it in both places.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/cli/src/cmd/build/index.ts` around lines 39 - 46, Extract the shared
cdnBaseUrl field schema from the build schema and DeployOptionsSchema into one
exported schema symbol, then reuse that symbol in both definitions. Preserve the
existing validation and description while ensuring both commands derive their
help text from the same source.
packages/cli/src/cmd/build/adapters/config-cdn-wrap.ts (1)

286-292: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Share one cleanup runner that isolates failures.

Four call sites repeat for (const c of cleanups.reverse()) c();. reverse() mutates the array, so a second invocation runs in the original order. A throwing cleanup also skips the remaining restores, including the config restore.

Extract a single runner that copies the array and catches per entry.

♻️ Proposed refactor
 	const cleanups: Array<() => void> = [];
+	const runCleanups = () => {
+		for (const c of [...cleanups].reverse()) {
+			try {
+				c();
+			} catch {
+				/* best-effort restore */
+			}
+		}
+	};

Then use cleanup: runCleanups at each return.

Also applies to: 309-311, 329-331, 358-360

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/cli/src/cmd/build/adapters/config-cdn-wrap.ts` around lines 286 -
292, Extract a shared runCleanups function for the cleanups collection that
iterates over a copied array in reverse order and isolates each cleanup failure
so later entries still execute. Replace the repeated inline cleanup loops at all
four return sites with cleanup: runCleanups, preserving reverse-order cleanup on
every invocation.
packages/cli/src/types.ts (1)

665-670: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick win

Validate cdnBaseUrl as an HTTP(S) URL.

Use zod.url() with an http/https scheme check. Do not use zod.url() alone because it accepts schemes such as ftp. Its default mode preserves the literal {ORGID} path segment.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/cli/src/types.ts` around lines 665 - 670, Update the cdnBaseUrl
schema to validate URLs using zod.url() with an HTTP/HTTPS scheme restriction,
while retaining optionality and the existing description. Ensure the default URL
parsing mode remains in use so literal {ORGID} path segments continue to be
accepted.
packages/cli/test/cmd/build/adapters/sveltekit-cdn.test.ts (1)

1-102: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Extract the repeated inline logger mock into a shared test util. All three files define the same logger: { debug: () => {} } object inline at each call site instead of a shared mock.

  • packages/cli/test/cmd/build/adapters/sveltekit-cdn.test.ts#L1-L102: replace the three inline logger: { debug: () => {} } occurrences (lines 33, 64, 86) with a shared logger mock.
  • packages/cli/test/cmd/build/adapters/tanstack-start.test.ts#L66-L92: replace the inline logger: { debug: () => {} } at line 77 with the same shared mock.
  • packages/cli/test/cmd/build/adapters/vite-cdn.test.ts#L12-L160: replace the inline logger: { debug: () => {} } at line 153 with the same shared mock.

Based on path instructions, **/packages/*/test/**/*.{ts,tsx} requires "Use @agentuity/test-utils for shared mocks in tests."

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/cli/test/cmd/build/adapters/sveltekit-cdn.test.ts` around lines 1 -
102, Extract the repeated inline logger mock into a shared mock from
`@agentuity/test-utils`, then replace all listed call sites in
packages/cli/test/cmd/build/adapters/sveltekit-cdn.test.ts (lines 1-102),
packages/cli/test/cmd/build/adapters/tanstack-start.test.ts (lines 66-92), and
packages/cli/test/cmd/build/adapters/vite-cdn.test.ts (lines 12-160) with that
shared logger.

Source: Path instructions

packages/cli/src/cmd/build/adapters/vite/cdn-build.ts (1)

34-42: 🗄️ Data Integrity & Integration | 🔵 Trivial | 💤 Low value

Expose cdnOrigin from Vite CDN preparation. resolveAgentuityCdnBase currently derives cdnBase from the same origin, so the adapter's stripping is functionally equivalent. Return cdnOrigin from prepareViteCdnBuild and use it in vite.ts to keep the adapter result consistent with other adapters.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/cli/src/cmd/build/adapters/vite/cdn-build.ts` around lines 34 - 42,
Update prepareViteCdnBuild in
packages/cli/src/cmd/build/adapters/vite/cdn-build.ts to return the resolved
cdnOrigin alongside the existing ViteCdnBuildOverrides fields. In
packages/cli/src/cmd/build/adapters/vite.ts, consume that returned cdnOrigin
when constructing the adapter result instead of deriving it by stripping
cdnBase, keeping the result consistent with other adapters.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/cli/src/cmd/build/adapters/config-cdn-wrap.ts`:
- Around line 204-215: Make writeConfigWrapper failure-safe: after renameSync
moves the original config, wrap moduleKind, generateWrapperSource, and
writeFileSync in a try/catch; on any failure, restore backupPath to configPath
before rethrowing the original error. Ensure restoration occurs before the
caller’s restore closure registration path so no config is left missing or
backup orphaned.
- Around line 141-159: Update the CJS branch in the wrapper generation logic
around moduleKind/exportStyle so exportStyle === 'value' cannot emit a Promise
through module.exports. Reject this unsupported CJS/value combination
explicitly, or route it to ESM output, while preserving the existing CJS
function export behavior.

In `@packages/cli/src/cmd/build/adapters/with-cdn-prep.ts`:
- Around line 34-68: Make CDN preparation transactional in withCdnPrep and the
Next.js adapter: ensure any mutation performed by prepareConfigCdn is registered
for rollback immediately, including mutations before or during prePatch,
readFileSync, and wrapper writeFileSync operations, so failures before a cleanup
handle is returned restore the project files. Update both
packages/cli/src/cmd/build/adapters/with-cdn-prep.ts (lines 34-68) and
packages/cli/src/cmd/build/adapters/nextjs.ts (lines 102-105); moving
preparation inside try is insufficient. Preserve normal cleanup after successful
preparation and build completion.

In `@packages/cli/src/cmd/build/detect/util.ts`:
- Around line 99-105: Update stripCommandEnvPrefixes to recognize and remove
environment assignments whose values are quoted and contain spaces before
applying the existing unquoted-assignment matching; preserve repeated prefix
stripping and normal command parsing. Add a test covering cross-env NAME="value
with spaces" node server.js and verify resolveRuntimeFromStartCommand identifies
Node rather than Bun.

In `@packages/cli/src/cmd/build/package/launch.ts`:
- Around line 308-316: Update resolveLaunchStatic to resolve the CDN base
through resolveAgentuityCdnBase, preserving the existing precedence and fallback
behavior used by config-cdn-wrap instead of relying only on cdnBaseUrl. Apply
the same resolution in the static override-fill path so user-supplied static
configurations missing baseUrl receive the resolved CDN prefix.

---

Nitpick comments:
In `@packages/cli/src/cmd/build/adapters/config-cdn-wrap.ts`:
- Around line 286-292: Extract a shared runCleanups function for the cleanups
collection that iterates over a copied array in reverse order and isolates each
cleanup failure so later entries still execute. Replace the repeated inline
cleanup loops at all four return sites with cleanup: runCleanups, preserving
reverse-order cleanup on every invocation.

In `@packages/cli/src/cmd/build/adapters/vite/cdn-build.ts`:
- Around line 34-42: Update prepareViteCdnBuild in
packages/cli/src/cmd/build/adapters/vite/cdn-build.ts to return the resolved
cdnOrigin alongside the existing ViteCdnBuildOverrides fields. In
packages/cli/src/cmd/build/adapters/vite.ts, consume that returned cdnOrigin
when constructing the adapter result instead of deriving it by stripping
cdnBase, keeping the result consistent with other adapters.

In `@packages/cli/src/cmd/build/index.ts`:
- Around line 39-46: Extract the shared cdnBaseUrl field schema from the build
schema and DeployOptionsSchema into one exported schema symbol, then reuse that
symbol in both definitions. Preserve the existing validation and description
while ensuring both commands derive their help text from the same source.

In `@packages/cli/src/types.ts`:
- Around line 665-670: Update the cdnBaseUrl schema to validate URLs using
zod.url() with an HTTP/HTTPS scheme restriction, while retaining optionality and
the existing description. Ensure the default URL parsing mode remains in use so
literal {ORGID} path segments continue to be accepted.

In `@packages/cli/test/cmd/build/adapters/sveltekit-cdn.test.ts`:
- Around line 1-102: Extract the repeated inline logger mock into a shared mock
from `@agentuity/test-utils`, then replace all listed call sites in
packages/cli/test/cmd/build/adapters/sveltekit-cdn.test.ts (lines 1-102),
packages/cli/test/cmd/build/adapters/tanstack-start.test.ts (lines 66-92), and
packages/cli/test/cmd/build/adapters/vite-cdn.test.ts (lines 12-160) with that
shared logger.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 1fb96b5c-0223-4a6c-8de8-0cc282161658

📥 Commits

Reviewing files that changed from the base of the PR and between edb47d1 and dcbf422.

📒 Files selected for processing (33)
  • packages/cli/src/cmd/build/adapters/astro.ts
  • packages/cli/src/cmd/build/adapters/cdn-origin.ts
  • packages/cli/src/cmd/build/adapters/cdn-recipes.ts
  • packages/cli/src/cmd/build/adapters/config-cdn-wrap.ts
  • packages/cli/src/cmd/build/adapters/index.ts
  • packages/cli/src/cmd/build/adapters/nextjs.ts
  • packages/cli/src/cmd/build/adapters/nuxt.ts
  • packages/cli/src/cmd/build/adapters/sveltekit.ts
  • packages/cli/src/cmd/build/adapters/tanstack-start.ts
  • packages/cli/src/cmd/build/adapters/tanstack-start/cdn-build.ts
  • packages/cli/src/cmd/build/adapters/types.ts
  • packages/cli/src/cmd/build/adapters/vite.ts
  • packages/cli/src/cmd/build/adapters/vite/cdn-build.ts
  • packages/cli/src/cmd/build/adapters/with-cdn-prep.ts
  • packages/cli/src/cmd/build/detect/generic.ts
  • packages/cli/src/cmd/build/detect/index.ts
  • packages/cli/src/cmd/build/detect/util.ts
  • packages/cli/src/cmd/build/index.ts
  • packages/cli/src/cmd/build/package/index.ts
  • packages/cli/src/cmd/build/package/launch.ts
  • packages/cli/src/cmd/build/run.ts
  • packages/cli/src/cmd/cloud/deploy.ts
  • packages/cli/src/types.ts
  • packages/cli/test/cmd/build/adapters/astro-cdn.test.ts
  • packages/cli/test/cmd/build/adapters/nextjs-cdn.test.ts
  • packages/cli/test/cmd/build/adapters/nuxt-cdn.test.ts
  • packages/cli/test/cmd/build/adapters/registry.test.ts
  • packages/cli/test/cmd/build/adapters/sveltekit-cdn.test.ts
  • packages/cli/test/cmd/build/adapters/tanstack-start.test.ts
  • packages/cli/test/cmd/build/adapters/vite-cdn.test.ts
  • packages/cli/test/cmd/build/detect/util.test.ts
  • packages/cli/test/cmd/build/package/launch.test.ts
  • packages/server/src/api/project/deploy.ts
📜 Review details
⏰ Context from checks skipped due to timeout. (17)
  • GitHub Check: Native install (macOS)
  • GitHub Check: Bun version checks
  • GitHub Check: Native install (Linux)
  • GitHub Check: Installer scenarios
  • GitHub Check: Linux distro install smoke
  • GitHub Check: Agentuity - docs-docs
  • GitHub Check: Framework Demo Tests
  • GitHub Check: Queue CLI Tests (node)
  • GitHub Check: Postgres SSL Integration Test
  • GitHub Check: Queue CLI Tests (bun)
  • GitHub Check: Service Client Smoke Tests
  • GitHub Check: Package Installation & Usage Test (node)
  • GitHub Check: Package Installation & Usage Test (bun)
  • GitHub Check: Migrate Chain (v1 → v2 → v3)
  • GitHub Check: Windows WSL CLI Smoke Test
  • GitHub Check: Pack & Upload
  • GitHub Check: Build
🧰 Additional context used
📓 Path-based instructions (7)
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (AGENTS.md)

Run bun run format using Biome with tabs (width 3), single quotes, semicolons, lineWidth 100, and trailingCommas es5

Files:

  • packages/cli/src/cmd/build/adapters/index.ts
  • packages/cli/test/cmd/build/adapters/registry.test.ts
  • packages/cli/test/cmd/build/adapters/tanstack-start.test.ts
  • packages/cli/src/cmd/build/adapters/astro.ts
  • packages/cli/test/cmd/build/detect/util.test.ts
  • packages/server/src/api/project/deploy.ts
  • packages/cli/src/cmd/build/run.ts
  • packages/cli/src/cmd/build/detect/generic.ts
  • packages/cli/src/cmd/build/adapters/with-cdn-prep.ts
  • packages/cli/src/cmd/build/adapters/nuxt.ts
  • packages/cli/src/cmd/build/adapters/vite.ts
  • packages/cli/src/cmd/cloud/deploy.ts
  • packages/cli/src/cmd/build/detect/index.ts
  • packages/cli/test/cmd/build/adapters/sveltekit-cdn.test.ts
  • packages/cli/src/cmd/build/adapters/tanstack-start.ts
  • packages/cli/src/types.ts
  • packages/cli/test/cmd/build/adapters/nextjs-cdn.test.ts
  • packages/cli/src/cmd/build/adapters/types.ts
  • packages/cli/test/cmd/build/adapters/astro-cdn.test.ts
  • packages/cli/src/cmd/build/adapters/sveltekit.ts
  • packages/cli/test/cmd/build/package/launch.test.ts
  • packages/cli/src/cmd/build/detect/util.ts
  • packages/cli/test/cmd/build/adapters/nuxt-cdn.test.ts
  • packages/cli/test/cmd/build/adapters/vite-cdn.test.ts
  • packages/cli/src/cmd/build/adapters/vite/cdn-build.ts
  • packages/cli/src/cmd/build/index.ts
  • packages/cli/src/cmd/build/package/index.ts
  • packages/cli/src/cmd/build/adapters/nextjs.ts
  • packages/cli/src/cmd/build/adapters/cdn-origin.ts
  • packages/cli/src/cmd/build/adapters/cdn-recipes.ts
  • packages/cli/src/cmd/build/adapters/config-cdn-wrap.ts
  • packages/cli/src/cmd/build/adapters/tanstack-start/cdn-build.ts
  • packages/cli/src/cmd/build/package/launch.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx}: Use TypeScript in strict mode with ESNext target and bundler moduleResolution
Use StructuredError from @agentuity/core for error handling

Files:

  • packages/cli/src/cmd/build/adapters/index.ts
  • packages/cli/test/cmd/build/adapters/registry.test.ts
  • packages/cli/test/cmd/build/adapters/tanstack-start.test.ts
  • packages/cli/src/cmd/build/adapters/astro.ts
  • packages/cli/test/cmd/build/detect/util.test.ts
  • packages/server/src/api/project/deploy.ts
  • packages/cli/src/cmd/build/run.ts
  • packages/cli/src/cmd/build/detect/generic.ts
  • packages/cli/src/cmd/build/adapters/with-cdn-prep.ts
  • packages/cli/src/cmd/build/adapters/nuxt.ts
  • packages/cli/src/cmd/build/adapters/vite.ts
  • packages/cli/src/cmd/cloud/deploy.ts
  • packages/cli/src/cmd/build/detect/index.ts
  • packages/cli/test/cmd/build/adapters/sveltekit-cdn.test.ts
  • packages/cli/src/cmd/build/adapters/tanstack-start.ts
  • packages/cli/src/types.ts
  • packages/cli/test/cmd/build/adapters/nextjs-cdn.test.ts
  • packages/cli/src/cmd/build/adapters/types.ts
  • packages/cli/test/cmd/build/adapters/astro-cdn.test.ts
  • packages/cli/src/cmd/build/adapters/sveltekit.ts
  • packages/cli/test/cmd/build/package/launch.test.ts
  • packages/cli/src/cmd/build/detect/util.ts
  • packages/cli/test/cmd/build/adapters/nuxt-cdn.test.ts
  • packages/cli/test/cmd/build/adapters/vite-cdn.test.ts
  • packages/cli/src/cmd/build/adapters/vite/cdn-build.ts
  • packages/cli/src/cmd/build/index.ts
  • packages/cli/src/cmd/build/package/index.ts
  • packages/cli/src/cmd/build/adapters/nextjs.ts
  • packages/cli/src/cmd/build/adapters/cdn-origin.ts
  • packages/cli/src/cmd/build/adapters/cdn-recipes.ts
  • packages/cli/src/cmd/build/adapters/config-cdn-wrap.ts
  • packages/cli/src/cmd/build/adapters/tanstack-start/cdn-build.ts
  • packages/cli/src/cmd/build/package/launch.ts
packages/cli/src/cmd/**/index.ts

📄 CodeRabbit inference engine (packages/cli/AGENTS.md)

packages/cli/src/cmd/**/index.ts: Each command must be a directory in src/cmd/ with an index.ts entry point
Always define interfaces for command options using Zod schemas; never use any for type safety

Files:

  • packages/cli/src/cmd/build/adapters/index.ts
  • packages/cli/src/cmd/build/detect/index.ts
  • packages/cli/src/cmd/build/index.ts
  • packages/cli/src/cmd/build/package/index.ts
packages/cli/src/**/*.ts

📄 CodeRabbit inference engine (packages/cli/AGENTS.md)

packages/cli/src/**/*.ts: Use tui.* helpers for formatted output (header, info, success, warning, error, table, progress)
Use ctx.logger for logging; logger.fatal() logs and exits with code 1
Use await readFile(p, 'utf-8') and await writeFile(p, content) from node:fs/promises for file I/O
Import pathExists from node-compat/fs for file existence checks instead of using Node's built-in
Do not use Bun globals (Bun.file, Bun.spawn, Bun.color, Bun.stringWidth, etc.) in production source code; tsconfig.json type checking enforces this
Imports must use explicit .ts extensions for relative paths (e.g., from './foo.ts', not from './foo'); TypeScript's rewriteRelativeImportExtensions will rewrite them to .js in output
Always check isJSONMode() for machine-readable output in command handlers
Use requireAuth(ctx) or optionalAuth(ctx) for authenticated commands

Files:

  • packages/cli/src/cmd/build/adapters/index.ts
  • packages/cli/src/cmd/build/adapters/astro.ts
  • packages/cli/src/cmd/build/run.ts
  • packages/cli/src/cmd/build/detect/generic.ts
  • packages/cli/src/cmd/build/adapters/with-cdn-prep.ts
  • packages/cli/src/cmd/build/adapters/nuxt.ts
  • packages/cli/src/cmd/build/adapters/vite.ts
  • packages/cli/src/cmd/cloud/deploy.ts
  • packages/cli/src/cmd/build/detect/index.ts
  • packages/cli/src/cmd/build/adapters/tanstack-start.ts
  • packages/cli/src/types.ts
  • packages/cli/src/cmd/build/adapters/types.ts
  • packages/cli/src/cmd/build/adapters/sveltekit.ts
  • packages/cli/src/cmd/build/detect/util.ts
  • packages/cli/src/cmd/build/adapters/vite/cdn-build.ts
  • packages/cli/src/cmd/build/index.ts
  • packages/cli/src/cmd/build/package/index.ts
  • packages/cli/src/cmd/build/adapters/nextjs.ts
  • packages/cli/src/cmd/build/adapters/cdn-origin.ts
  • packages/cli/src/cmd/build/adapters/cdn-recipes.ts
  • packages/cli/src/cmd/build/adapters/config-cdn-wrap.ts
  • packages/cli/src/cmd/build/adapters/tanstack-start/cdn-build.ts
  • packages/cli/src/cmd/build/package/launch.ts
**/packages/*/test/**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/packages/*/test/**/*.{ts,tsx}: Place tests in test/ folder parallel to src/ directory, never inside src/ or under __tests__/
Import from ../src/ in test files
Use @agentuity/test-utils for shared mocks in tests

Files:

  • packages/cli/test/cmd/build/adapters/registry.test.ts
  • packages/cli/test/cmd/build/adapters/tanstack-start.test.ts
  • packages/cli/test/cmd/build/detect/util.test.ts
  • packages/cli/test/cmd/build/adapters/sveltekit-cdn.test.ts
  • packages/cli/test/cmd/build/adapters/nextjs-cdn.test.ts
  • packages/cli/test/cmd/build/adapters/astro-cdn.test.ts
  • packages/cli/test/cmd/build/package/launch.test.ts
  • packages/cli/test/cmd/build/adapters/nuxt-cdn.test.ts
  • packages/cli/test/cmd/build/adapters/vite-cdn.test.ts
packages/server/src/**/*.{ts,tsx}

📄 CodeRabbit inference engine (packages/server/AGENTS.md)

All code must be TypeScript

Files:

  • packages/server/src/api/project/deploy.ts
packages/server/src/**/*.ts

📄 CodeRabbit inference engine (packages/server/AGENTS.md)

packages/server/src/**/*.ts: Use zod for runtime validation
Always use .ts extensions in relative imports (e.g., from '../api.ts', not from '../api'). This is required for Node.js ESM compatibility — tsc rewrites .ts.js in compiled output, but leaves extensionless imports untouched, which breaks Node.js module resolution. This is enforced by the useImportExtensions Biome lint rule.

Files:

  • packages/server/src/api/project/deploy.ts
🧠 Learnings (6)
📚 Learning: 2025-12-21T00:31:41.858Z
Learnt from: jhaynie
Repo: agentuity/sdk PR: 274
File: packages/cli/src/cmd/build/vite/server-bundler.ts:12-41
Timestamp: 2025-12-21T00:31:41.858Z
Learning: In Bun runtime, BuildMessage and ResolveMessage are global types and are not exported from the bun module. Do not import { BuildMessage } from 'bun' or similar; these types are available globally and should be used without import. This applies to all TypeScript files that target the Bun runtime within the repository.

Applied to files:

  • packages/cli/src/cmd/build/adapters/index.ts
  • packages/cli/test/cmd/build/adapters/registry.test.ts
  • packages/cli/test/cmd/build/adapters/tanstack-start.test.ts
  • packages/cli/src/cmd/build/adapters/astro.ts
  • packages/cli/test/cmd/build/detect/util.test.ts
  • packages/server/src/api/project/deploy.ts
  • packages/cli/src/cmd/build/run.ts
  • packages/cli/src/cmd/build/detect/generic.ts
  • packages/cli/src/cmd/build/adapters/with-cdn-prep.ts
  • packages/cli/src/cmd/build/adapters/nuxt.ts
  • packages/cli/src/cmd/build/adapters/vite.ts
  • packages/cli/src/cmd/cloud/deploy.ts
  • packages/cli/src/cmd/build/detect/index.ts
  • packages/cli/test/cmd/build/adapters/sveltekit-cdn.test.ts
  • packages/cli/src/cmd/build/adapters/tanstack-start.ts
  • packages/cli/src/types.ts
  • packages/cli/test/cmd/build/adapters/nextjs-cdn.test.ts
  • packages/cli/src/cmd/build/adapters/types.ts
  • packages/cli/test/cmd/build/adapters/astro-cdn.test.ts
  • packages/cli/src/cmd/build/adapters/sveltekit.ts
  • packages/cli/test/cmd/build/package/launch.test.ts
  • packages/cli/src/cmd/build/detect/util.ts
  • packages/cli/test/cmd/build/adapters/nuxt-cdn.test.ts
  • packages/cli/test/cmd/build/adapters/vite-cdn.test.ts
  • packages/cli/src/cmd/build/adapters/vite/cdn-build.ts
  • packages/cli/src/cmd/build/index.ts
  • packages/cli/src/cmd/build/package/index.ts
  • packages/cli/src/cmd/build/adapters/nextjs.ts
  • packages/cli/src/cmd/build/adapters/cdn-origin.ts
  • packages/cli/src/cmd/build/adapters/cdn-recipes.ts
  • packages/cli/src/cmd/build/adapters/config-cdn-wrap.ts
  • packages/cli/src/cmd/build/adapters/tanstack-start/cdn-build.ts
  • packages/cli/src/cmd/build/package/launch.ts
📚 Learning: 2026-02-17T14:23:15.448Z
Learnt from: potofpie
Repo: agentuity/sdk PR: 974
File: packages/cli/src/cmd/git/account/list.ts:39-40
Timestamp: 2026-02-17T14:23:15.448Z
Learning: In the Agentuity CLI framework (packages/cli), when a subcommand declares requires: { auth: true }, the framework will automatically call requireAuth() before invoking the handler. Do not call requireAuth(ctx) manually inside command handlers. This applies to all TypeScript command files under packages/cli/src, including paths like packages/cli/src/cmd/git/account/list.ts.

Applied to files:

  • packages/cli/src/cmd/build/adapters/index.ts
  • packages/cli/src/cmd/build/adapters/astro.ts
  • packages/cli/src/cmd/build/run.ts
  • packages/cli/src/cmd/build/detect/generic.ts
  • packages/cli/src/cmd/build/adapters/with-cdn-prep.ts
  • packages/cli/src/cmd/build/adapters/nuxt.ts
  • packages/cli/src/cmd/build/adapters/vite.ts
  • packages/cli/src/cmd/cloud/deploy.ts
  • packages/cli/src/cmd/build/detect/index.ts
  • packages/cli/src/cmd/build/adapters/tanstack-start.ts
  • packages/cli/src/types.ts
  • packages/cli/src/cmd/build/adapters/types.ts
  • packages/cli/src/cmd/build/adapters/sveltekit.ts
  • packages/cli/src/cmd/build/detect/util.ts
  • packages/cli/src/cmd/build/adapters/vite/cdn-build.ts
  • packages/cli/src/cmd/build/index.ts
  • packages/cli/src/cmd/build/package/index.ts
  • packages/cli/src/cmd/build/adapters/nextjs.ts
  • packages/cli/src/cmd/build/adapters/cdn-origin.ts
  • packages/cli/src/cmd/build/adapters/cdn-recipes.ts
  • packages/cli/src/cmd/build/adapters/config-cdn-wrap.ts
  • packages/cli/src/cmd/build/adapters/tanstack-start/cdn-build.ts
  • packages/cli/src/cmd/build/package/launch.ts
📚 Learning: 2026-02-21T02:05:57.982Z
Learnt from: jhaynie
Repo: agentuity/sdk PR: 1010
File: packages/drizzle/test/proxy.test.ts:594-603
Timestamp: 2026-02-21T02:05:57.982Z
Learning: Do not rely on StructuredError from agentuity/core in test files or simple error handling paths. In tests and straightforward error handling, use plain Error objects to represent failures, reserving StructuredError for more complex error scenarios in application logic.

Applied to files:

  • packages/cli/test/cmd/build/adapters/registry.test.ts
  • packages/cli/test/cmd/build/adapters/tanstack-start.test.ts
  • packages/cli/test/cmd/build/detect/util.test.ts
  • packages/cli/test/cmd/build/adapters/sveltekit-cdn.test.ts
  • packages/cli/test/cmd/build/adapters/nextjs-cdn.test.ts
  • packages/cli/test/cmd/build/adapters/astro-cdn.test.ts
  • packages/cli/test/cmd/build/package/launch.test.ts
  • packages/cli/test/cmd/build/adapters/nuxt-cdn.test.ts
  • packages/cli/test/cmd/build/adapters/vite-cdn.test.ts
📚 Learning: 2025-12-19T14:19:33.765Z
Learnt from: jhaynie
Repo: agentuity/sdk PR: 259
File: packages/cli/src/cmd/build/vite/registry-generator.ts:306-312
Timestamp: 2025-12-19T14:19:33.765Z
Learning: Route files under src/api should use the .ts extension only (no .tsx) and regex patterns for such paths should anchor to \.ts$ (e.g., /\/.ts$/). Agent files may support both .ts and .tsx, but route files in the Agentuity SDK codebase are restricted to .ts. This guideline applies to all similar route files under src/api across the repository.

Applied to files:

  • packages/server/src/api/project/deploy.ts
📚 Learning: 2025-12-30T00:13:37.849Z
Learnt from: jhaynie
Repo: agentuity/sdk PR: 355
File: packages/server/src/api/sandbox/util.ts:2-6
Timestamp: 2025-12-30T00:13:37.849Z
Learning: In the packages/server tree, treat code as runtime-agnostic between Node.js and Bun. Ensure TypeScript files (e.g., util.ts) import and use APIs in a way that works under both runtimes. It is acceptable to rely on Bun’s Node.js compatibility for built-ins accessed via the node: namespace (e.g., node:events, node:stream, node:buffer). During reviews, prefer patterns and imports that remain compatible with Bun's environment, and flag any hard dependencies on runtime-specific globals or non-portable Node APIs.

Applied to files:

  • packages/server/src/api/project/deploy.ts
📚 Learning: 2026-01-13T04:32:02.691Z
Learnt from: jhaynie
Repo: agentuity/sdk PR: 565
File: packages/cli/src/cmd/cloud/region-lookup.ts:14-26
Timestamp: 2026-01-13T04:32:02.691Z
Learning: Enforce sandbox identifier prefixes in new code within the CLI cloud region lookup: new sandboxes must use the sbx_ prefix. The snbx_ prefix may appear in legacy code or examples, but do not use snbx_ for new sandboxes. When reviewing changes in packages/cli/src/cmd/cloud/, ensure any created sandbox identifiers use sbx_ and remove or migrate any snbx_ usages in newly added code.

Applied to files:

  • packages/cli/src/cmd/cloud/deploy.ts
🪛 OpenGrep (1.26.0)
packages/cli/src/cmd/build/adapters/config-cdn-wrap.ts

[ERROR] 110-110: Dynamic command passed to child_process.exec/execSync. Use child_process.execFile or spawn with an argument array instead.

(coderabbit.command-injection.exec-js)

🔇 Additional comments (32)
packages/cli/src/cmd/build/detect/generic.ts (2)

15-19: LGTM!


75-85: LGTM!

packages/cli/src/cmd/build/detect/index.ts (3)

20-20: LGTM!


57-63: LGTM!


227-233: LGTM!

packages/cli/src/cmd/build/detect/util.ts (1)

108-123: LGTM!

packages/cli/test/cmd/build/detect/util.test.ts (2)

15-16: LGTM!


308-327: LGTM!

packages/cli/src/cmd/build/adapters/cdn-origin.ts (1)

28-88: LGTM!

Also applies to: 91-91

packages/cli/src/cmd/build/index.ts (1)

127-127: LGTM!

packages/cli/src/cmd/build/run.ts (1)

70-80: LGTM!

Also applies to: 202-204, 221-236

packages/cli/src/cmd/cloud/deploy.ts (1)

551-551: LGTM!

packages/cli/src/cmd/build/package/launch.ts (1)

8-17: LGTM!

Also applies to: 58-68, 103-103, 197-226, 248-333, 362-365, 401-401

packages/server/src/api/project/deploy.ts (1)

87-105: LGTM!

Also applies to: 120-122

packages/cli/test/cmd/build/package/launch.test.ts (1)

178-263: LGTM!

Also applies to: 265-320, 322-360

packages/cli/src/cmd/build/package/index.ts (1)

72-77: 🗄️ Data Integrity & Integration

No production consumer requires a change. generateDeployMetadata reads buildResult.staticDir directly, and no production code reads hasStaticAssets or packageResult.staticDir.

			> Likely an incorrect or invalid review comment.
packages/cli/src/cmd/build/adapters/cdn-recipes.ts (3)

15-53: LGTM!

Also applies to: 57-102, 106-152, 174-194


196-223: LGTM!


130-152: 🎯 Functional Correctness

Keep the plain Nuxt configuration export. Nuxt accepts a plain-object default export; defineNuxtConfig mainly adds TypeScript support and editor autocomplete.

			> Likely an incorrect or invalid review comment.
packages/cli/src/cmd/build/adapters/astro.ts (1)

1-12: LGTM!

packages/cli/src/cmd/build/adapters/index.ts (1)

10-14: LGTM!

Also applies to: 23-26

packages/cli/src/cmd/build/adapters/nextjs.ts (1)

106-239: LGTM!

packages/cli/src/cmd/build/adapters/nuxt.ts (1)

1-12: LGTM!

packages/cli/src/cmd/build/adapters/sveltekit.ts (1)

1-18: LGTM!

packages/cli/test/cmd/build/adapters/vite-cdn.test.ts (1)

12-34: LGTM!

Also applies to: 58-66, 147-160

packages/cli/src/cmd/build/adapters/tanstack-start.ts (1)

1-33: LGTM!

packages/cli/src/cmd/build/adapters/types.ts (1)

85-91: LGTM!

packages/cli/test/cmd/build/adapters/astro-cdn.test.ts (1)

1-99: LGTM!

packages/cli/test/cmd/build/adapters/nextjs-cdn.test.ts (1)

1-135: LGTM!

packages/cli/test/cmd/build/adapters/nuxt-cdn.test.ts (1)

1-70: LGTM!

packages/cli/test/cmd/build/adapters/registry.test.ts (1)

25-43: LGTM!

packages/cli/src/cmd/build/adapters/tanstack-start/cdn-build.ts (1)

170-178: 📐 Maintainability & Code Quality

Keep the positional overload.

packages/cli/test/cmd/build/adapters/tanstack-start.test.ts still calls prepareTanStackCdnBuild(testDir, logger) at lines 50 and 103. Removing the overload would break these tests.

			> Likely an incorrect or invalid review comment.

Comment thread packages/cli/src/cmd/build/adapters/config-cdn-wrap.ts
Comment thread packages/cli/src/cmd/build/adapters/config-cdn-wrap.ts
Comment thread packages/cli/src/cmd/build/adapters/with-cdn-prep.ts
Comment thread packages/cli/src/cmd/build/detect/util.ts
Comment thread packages/cli/src/cmd/build/package/launch.ts
Make config-cdn-wrap transactional (restore on wrap failure; rollback
registered cleanups if prep throws). Reject CJS+exportStyle value to avoid
exporting a Promise. Strip quoted env assignments in runtime inference.
Resolve launch.static.baseUrl via the same CDN origin chain as adapters.
Share CdnBaseUrlSchema (http/https URL) for build and deploy. Return
cdnOrigin from Vite CDN prep; use createMockLogger in CDN adapter tests.
@jhaynie
jhaynie merged commit 9cfbf84 into main Jul 31, 2026
28 of 29 checks passed
@jhaynie
jhaynie deleted the feat/launch-static-cdn-base-url branch July 31, 2026 22:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant