feat(cli): launch.static + --cdn-base-url for framework CDN assets - #1631
Conversation
…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.
|
The latest Agentuity deployment details.
View deployment logs with the Agentuity CLI: |
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 40 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the 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 configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (16)
📝 WalkthroughWalkthroughThe CLI adds CDN-aware build preparation for multiple frameworks, propagates ChangesCDN configuration preparation
Framework adapter integration
Pipeline and launch metadata
Runtime detection
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
Comment |
📦 Canary Packages Publishedversion: PackagesInstallAdd to your {
"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 |
There was a problem hiding this comment.
Actionable comments posted: 5
🧹 Nitpick comments (5)
packages/cli/src/cmd/build/index.ts (1)
39-46: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueShare the flag description with
DeployOptionsSchema.The same
cdnBaseUrlfield is described inpackages/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 winShare 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: runCleanupsat 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 winValidate
cdnBaseUrlas an HTTP(S) URL.Use
zod.url()with anhttp/httpsscheme check. Do not usezod.url()alone because it accepts schemes such asftp. 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 winExtract 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 inlinelogger: { 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 inlinelogger: { debug: () => {} }at line 77 with the same shared mock.packages/cli/test/cmd/build/adapters/vite-cdn.test.ts#L12-L160: replace the inlinelogger: { debug: () => {} }at line 153 with the same shared mock.Based on path instructions,
**/packages/*/test/**/*.{ts,tsx}requires "Use@agentuity/test-utilsfor 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 valueExpose
cdnOriginfrom Vite CDN preparation.resolveAgentuityCdnBasecurrently derivescdnBasefrom the same origin, so the adapter's stripping is functionally equivalent. ReturncdnOriginfromprepareViteCdnBuildand use it invite.tsto 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
📒 Files selected for processing (33)
packages/cli/src/cmd/build/adapters/astro.tspackages/cli/src/cmd/build/adapters/cdn-origin.tspackages/cli/src/cmd/build/adapters/cdn-recipes.tspackages/cli/src/cmd/build/adapters/config-cdn-wrap.tspackages/cli/src/cmd/build/adapters/index.tspackages/cli/src/cmd/build/adapters/nextjs.tspackages/cli/src/cmd/build/adapters/nuxt.tspackages/cli/src/cmd/build/adapters/sveltekit.tspackages/cli/src/cmd/build/adapters/tanstack-start.tspackages/cli/src/cmd/build/adapters/tanstack-start/cdn-build.tspackages/cli/src/cmd/build/adapters/types.tspackages/cli/src/cmd/build/adapters/vite.tspackages/cli/src/cmd/build/adapters/vite/cdn-build.tspackages/cli/src/cmd/build/adapters/with-cdn-prep.tspackages/cli/src/cmd/build/detect/generic.tspackages/cli/src/cmd/build/detect/index.tspackages/cli/src/cmd/build/detect/util.tspackages/cli/src/cmd/build/index.tspackages/cli/src/cmd/build/package/index.tspackages/cli/src/cmd/build/package/launch.tspackages/cli/src/cmd/build/run.tspackages/cli/src/cmd/cloud/deploy.tspackages/cli/src/types.tspackages/cli/test/cmd/build/adapters/astro-cdn.test.tspackages/cli/test/cmd/build/adapters/nextjs-cdn.test.tspackages/cli/test/cmd/build/adapters/nuxt-cdn.test.tspackages/cli/test/cmd/build/adapters/registry.test.tspackages/cli/test/cmd/build/adapters/sveltekit-cdn.test.tspackages/cli/test/cmd/build/adapters/tanstack-start.test.tspackages/cli/test/cmd/build/adapters/vite-cdn.test.tspackages/cli/test/cmd/build/detect/util.test.tspackages/cli/test/cmd/build/package/launch.test.tspackages/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 formatusing Biome with tabs (width 3), single quotes, semicolons, lineWidth 100, and trailingCommas es5
Files:
packages/cli/src/cmd/build/adapters/index.tspackages/cli/test/cmd/build/adapters/registry.test.tspackages/cli/test/cmd/build/adapters/tanstack-start.test.tspackages/cli/src/cmd/build/adapters/astro.tspackages/cli/test/cmd/build/detect/util.test.tspackages/server/src/api/project/deploy.tspackages/cli/src/cmd/build/run.tspackages/cli/src/cmd/build/detect/generic.tspackages/cli/src/cmd/build/adapters/with-cdn-prep.tspackages/cli/src/cmd/build/adapters/nuxt.tspackages/cli/src/cmd/build/adapters/vite.tspackages/cli/src/cmd/cloud/deploy.tspackages/cli/src/cmd/build/detect/index.tspackages/cli/test/cmd/build/adapters/sveltekit-cdn.test.tspackages/cli/src/cmd/build/adapters/tanstack-start.tspackages/cli/src/types.tspackages/cli/test/cmd/build/adapters/nextjs-cdn.test.tspackages/cli/src/cmd/build/adapters/types.tspackages/cli/test/cmd/build/adapters/astro-cdn.test.tspackages/cli/src/cmd/build/adapters/sveltekit.tspackages/cli/test/cmd/build/package/launch.test.tspackages/cli/src/cmd/build/detect/util.tspackages/cli/test/cmd/build/adapters/nuxt-cdn.test.tspackages/cli/test/cmd/build/adapters/vite-cdn.test.tspackages/cli/src/cmd/build/adapters/vite/cdn-build.tspackages/cli/src/cmd/build/index.tspackages/cli/src/cmd/build/package/index.tspackages/cli/src/cmd/build/adapters/nextjs.tspackages/cli/src/cmd/build/adapters/cdn-origin.tspackages/cli/src/cmd/build/adapters/cdn-recipes.tspackages/cli/src/cmd/build/adapters/config-cdn-wrap.tspackages/cli/src/cmd/build/adapters/tanstack-start/cdn-build.tspackages/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
UseStructuredErrorfrom@agentuity/corefor error handling
Files:
packages/cli/src/cmd/build/adapters/index.tspackages/cli/test/cmd/build/adapters/registry.test.tspackages/cli/test/cmd/build/adapters/tanstack-start.test.tspackages/cli/src/cmd/build/adapters/astro.tspackages/cli/test/cmd/build/detect/util.test.tspackages/server/src/api/project/deploy.tspackages/cli/src/cmd/build/run.tspackages/cli/src/cmd/build/detect/generic.tspackages/cli/src/cmd/build/adapters/with-cdn-prep.tspackages/cli/src/cmd/build/adapters/nuxt.tspackages/cli/src/cmd/build/adapters/vite.tspackages/cli/src/cmd/cloud/deploy.tspackages/cli/src/cmd/build/detect/index.tspackages/cli/test/cmd/build/adapters/sveltekit-cdn.test.tspackages/cli/src/cmd/build/adapters/tanstack-start.tspackages/cli/src/types.tspackages/cli/test/cmd/build/adapters/nextjs-cdn.test.tspackages/cli/src/cmd/build/adapters/types.tspackages/cli/test/cmd/build/adapters/astro-cdn.test.tspackages/cli/src/cmd/build/adapters/sveltekit.tspackages/cli/test/cmd/build/package/launch.test.tspackages/cli/src/cmd/build/detect/util.tspackages/cli/test/cmd/build/adapters/nuxt-cdn.test.tspackages/cli/test/cmd/build/adapters/vite-cdn.test.tspackages/cli/src/cmd/build/adapters/vite/cdn-build.tspackages/cli/src/cmd/build/index.tspackages/cli/src/cmd/build/package/index.tspackages/cli/src/cmd/build/adapters/nextjs.tspackages/cli/src/cmd/build/adapters/cdn-origin.tspackages/cli/src/cmd/build/adapters/cdn-recipes.tspackages/cli/src/cmd/build/adapters/config-cdn-wrap.tspackages/cli/src/cmd/build/adapters/tanstack-start/cdn-build.tspackages/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 insrc/cmd/with anindex.tsentry point
Always define interfaces for command options using Zod schemas; never useanyfor type safety
Files:
packages/cli/src/cmd/build/adapters/index.tspackages/cli/src/cmd/build/detect/index.tspackages/cli/src/cmd/build/index.tspackages/cli/src/cmd/build/package/index.ts
packages/cli/src/**/*.ts
📄 CodeRabbit inference engine (packages/cli/AGENTS.md)
packages/cli/src/**/*.ts: Usetui.*helpers for formatted output (header,info,success,warning,error,table,progress)
Usectx.loggerfor logging;logger.fatal()logs and exits with code 1
Useawait readFile(p, 'utf-8')andawait writeFile(p, content)fromnode:fs/promisesfor file I/O
ImportpathExistsfromnode-compat/fsfor 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.jsontype checking enforces this
Imports must use explicit.tsextensions for relative paths (e.g.,from './foo.ts', notfrom './foo'); TypeScript'srewriteRelativeImportExtensionswill rewrite them to.jsin output
Always checkisJSONMode()for machine-readable output in command handlers
UserequireAuth(ctx)oroptionalAuth(ctx)for authenticated commands
Files:
packages/cli/src/cmd/build/adapters/index.tspackages/cli/src/cmd/build/adapters/astro.tspackages/cli/src/cmd/build/run.tspackages/cli/src/cmd/build/detect/generic.tspackages/cli/src/cmd/build/adapters/with-cdn-prep.tspackages/cli/src/cmd/build/adapters/nuxt.tspackages/cli/src/cmd/build/adapters/vite.tspackages/cli/src/cmd/cloud/deploy.tspackages/cli/src/cmd/build/detect/index.tspackages/cli/src/cmd/build/adapters/tanstack-start.tspackages/cli/src/types.tspackages/cli/src/cmd/build/adapters/types.tspackages/cli/src/cmd/build/adapters/sveltekit.tspackages/cli/src/cmd/build/detect/util.tspackages/cli/src/cmd/build/adapters/vite/cdn-build.tspackages/cli/src/cmd/build/index.tspackages/cli/src/cmd/build/package/index.tspackages/cli/src/cmd/build/adapters/nextjs.tspackages/cli/src/cmd/build/adapters/cdn-origin.tspackages/cli/src/cmd/build/adapters/cdn-recipes.tspackages/cli/src/cmd/build/adapters/config-cdn-wrap.tspackages/cli/src/cmd/build/adapters/tanstack-start/cdn-build.tspackages/cli/src/cmd/build/package/launch.ts
**/packages/*/test/**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
**/packages/*/test/**/*.{ts,tsx}: Place tests intest/folder parallel tosrc/directory, never insidesrc/or under__tests__/
Import from../src/in test files
Use@agentuity/test-utilsfor shared mocks in tests
Files:
packages/cli/test/cmd/build/adapters/registry.test.tspackages/cli/test/cmd/build/adapters/tanstack-start.test.tspackages/cli/test/cmd/build/detect/util.test.tspackages/cli/test/cmd/build/adapters/sveltekit-cdn.test.tspackages/cli/test/cmd/build/adapters/nextjs-cdn.test.tspackages/cli/test/cmd/build/adapters/astro-cdn.test.tspackages/cli/test/cmd/build/package/launch.test.tspackages/cli/test/cmd/build/adapters/nuxt-cdn.test.tspackages/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.tsextensions in relative imports (e.g.,from '../api.ts', notfrom '../api'). This is required for Node.js ESM compatibility —tscrewrites.ts→.jsin compiled output, but leaves extensionless imports untouched, which breaks Node.js module resolution. This is enforced by theuseImportExtensionsBiome 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.tspackages/cli/test/cmd/build/adapters/registry.test.tspackages/cli/test/cmd/build/adapters/tanstack-start.test.tspackages/cli/src/cmd/build/adapters/astro.tspackages/cli/test/cmd/build/detect/util.test.tspackages/server/src/api/project/deploy.tspackages/cli/src/cmd/build/run.tspackages/cli/src/cmd/build/detect/generic.tspackages/cli/src/cmd/build/adapters/with-cdn-prep.tspackages/cli/src/cmd/build/adapters/nuxt.tspackages/cli/src/cmd/build/adapters/vite.tspackages/cli/src/cmd/cloud/deploy.tspackages/cli/src/cmd/build/detect/index.tspackages/cli/test/cmd/build/adapters/sveltekit-cdn.test.tspackages/cli/src/cmd/build/adapters/tanstack-start.tspackages/cli/src/types.tspackages/cli/test/cmd/build/adapters/nextjs-cdn.test.tspackages/cli/src/cmd/build/adapters/types.tspackages/cli/test/cmd/build/adapters/astro-cdn.test.tspackages/cli/src/cmd/build/adapters/sveltekit.tspackages/cli/test/cmd/build/package/launch.test.tspackages/cli/src/cmd/build/detect/util.tspackages/cli/test/cmd/build/adapters/nuxt-cdn.test.tspackages/cli/test/cmd/build/adapters/vite-cdn.test.tspackages/cli/src/cmd/build/adapters/vite/cdn-build.tspackages/cli/src/cmd/build/index.tspackages/cli/src/cmd/build/package/index.tspackages/cli/src/cmd/build/adapters/nextjs.tspackages/cli/src/cmd/build/adapters/cdn-origin.tspackages/cli/src/cmd/build/adapters/cdn-recipes.tspackages/cli/src/cmd/build/adapters/config-cdn-wrap.tspackages/cli/src/cmd/build/adapters/tanstack-start/cdn-build.tspackages/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.tspackages/cli/src/cmd/build/adapters/astro.tspackages/cli/src/cmd/build/run.tspackages/cli/src/cmd/build/detect/generic.tspackages/cli/src/cmd/build/adapters/with-cdn-prep.tspackages/cli/src/cmd/build/adapters/nuxt.tspackages/cli/src/cmd/build/adapters/vite.tspackages/cli/src/cmd/cloud/deploy.tspackages/cli/src/cmd/build/detect/index.tspackages/cli/src/cmd/build/adapters/tanstack-start.tspackages/cli/src/types.tspackages/cli/src/cmd/build/adapters/types.tspackages/cli/src/cmd/build/adapters/sveltekit.tspackages/cli/src/cmd/build/detect/util.tspackages/cli/src/cmd/build/adapters/vite/cdn-build.tspackages/cli/src/cmd/build/index.tspackages/cli/src/cmd/build/package/index.tspackages/cli/src/cmd/build/adapters/nextjs.tspackages/cli/src/cmd/build/adapters/cdn-origin.tspackages/cli/src/cmd/build/adapters/cdn-recipes.tspackages/cli/src/cmd/build/adapters/config-cdn-wrap.tspackages/cli/src/cmd/build/adapters/tanstack-start/cdn-build.tspackages/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.tspackages/cli/test/cmd/build/adapters/tanstack-start.test.tspackages/cli/test/cmd/build/detect/util.test.tspackages/cli/test/cmd/build/adapters/sveltekit-cdn.test.tspackages/cli/test/cmd/build/adapters/nextjs-cdn.test.tspackages/cli/test/cmd/build/adapters/astro-cdn.test.tspackages/cli/test/cmd/build/package/launch.test.tspackages/cli/test/cmd/build/adapters/nuxt-cdn.test.tspackages/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 & IntegrationNo production consumer requires a change.
generateDeployMetadatareadsbuildResult.staticDirdirectly, and no production code readshasStaticAssetsorpackageResult.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 CorrectnessKeep the plain Nuxt configuration export. Nuxt accepts a plain-object default export;
defineNuxtConfigmainly 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 QualityKeep the positional overload.
packages/cli/test/cmd/build/adapters/tanstack-start.test.tsstill callsprepareTanStackCdnBuild(testDir, logger)at lines 50 and 103. Removing the overload would break these tests.> Likely an incorrect or invalid review comment.
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.
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.
launch.jsongains an optionalstaticblock — directory, public path prefix, and optional absolute CDN base URL.--cdn-base-urlonagentuity buildandagentuity deploy(alsoAGENTUITY_CDN_BASE_URL/AGENTUITY_CDN_ORIGINenv).HOST=0.0.0.0 node …(no longer misclassified asbunfrom lockfile alone).Server
LaunchMetadataSchemaaccepts the new optionalstaticfield for deploy API validation.New
launch.jsoncontractShape
{ "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/" } }static.directoryworkingDirectory(or deploy root). Posix separators.static.publicPathdirectory(no leading slash). Framework-defined (e.g._next/static). Empty string""when the whole directory is the web root.static.baseUrl--cdn-base-urlor env). Omitted when CDN wiring was skipped.URL composition
Examples with Next (
publicPath: "_next/static"):--cdn-base-urlhttps://cdn.agentuity.com/https://cdn.agentuity.com/_next/static/chunks/main.jshttps://cdn.agentuity.com/org_test123/assets/https://cdn.agentuity.com/org_test123/assets/_next/static/chunks/main.jsExamples with Vite SPA (
publicPath: "", files underassets/):--cdn-base-urlhttps://cdn.agentuity.com/https://cdn.agentuity.com/assets/index-abc.jshttps://cdn.agentuity.com/org_test123/assets/https://cdn.agentuity.com/org_test123/assets/assets/index-abc.jsWhen
staticis omittedAPI-only / generic projects with no known static dir (e.g. Hono
tsc+node dist/index.js) omitstaticentirely. CDN flag is a no-op for baking; there is nothing to upload.CLI usage
Resolution priority for CDN origin
--cdn-base-url/ pipelinecdnBaseUrlAGENTUITY_CDN_BASE_URLAGENTUITY_CDN_ORIGIN(legacy / adapter-set)https://cdn.agentuity.com/{deploymentId}(skipped for pack-only sentinel)Also sets
AGENTUITY_CDN_ORIGIN+AGENTUITY_CDN_BASE_URLin the build env (plus framework-specific vars likeNUXT_APP_CDN_URL).Framework matrix (what we wire + what we tested)
static.directorystatic.publicPathnextjsnext.configwrap →assetPrefix.next/static(or monorepo-relative under standalone)_next/staticnextjs-genesisvitevite … --base={cdn}/into build command.(flatteneddist) ordist""test-tldraw, monorepo Genesis webastrobuild.assetsPrefix.(flatteneddist)""test-astronuxtapp.cdnURL+NUXT_APP_CDN_URL.output/public""test-astro/test-nuxtsveltekitadapter-auto→adapter-node+ wrap →kit.paths.assetsbuild/client""test-astro/test-sktanstack-startsrc/server.tswith bakedtransformAssets.prefix+ Vitebase: ''.output/public""test-tanstack,test-nitro-project(detected as tanstack-start).""/tmp/statictest-honovite+ monorepo stage--base+workingDirectorydist(relative to subpackage)""genesis-mono/apps/webSpecialized packaging (Next standalone, monorepo tree copy, ignore patterns) is unchanged aside from CDN prep and launch metadata.
Example
launch.jsonoutputs from live buildsNext.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:
With org subpath (
--cdn-base-url 'https://cdn.agentuity.com/org_test123/assets/'):(
assetPrefixin Next config / required-server-files:https://cdn.agentuity.com/org_test123/assetswithout 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:Log line:
✓ Vite CDN base via CLI: --base=https://cdn.agentuity.com/org_test123/assets/(Works with compound scripts like
tsc && vite build—--baseis 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:public/files (e.g./favicon.svg) may stay origin-relative — Astro’s normalassetsPrefixbehavior.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:
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:
Also swaps
adapter-auto→adapter-nodefor 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):Temporary
src/server.tsis 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
statickey.--cdn-base-urldoes 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/" } }<monorepo>/.agentuity/(notapps/web/.agentuity/).agentuityignoreapplied; protected paths kept when required--basebaked intoapps/web/dist/index.htmltsx+src/index.ts), not pure SPAArchitecture (implementation notes)
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.mjsnow resolve toruntime.name: "node"viastripCommandEnvPrefixes/resolveRuntimeFromStartCommand(detection + launch packaging). Previously a bun lockfile could forceruntime: "bun"even though the process runs node.Test plan
Unit
launch.staticgeneration, monorepo-relativedirectory, user override merge,HOST=… node→ runtime node--cdn-base-url>AGENTUITY_CDN_BASE_URL>AGENTUITY_CDN_ORIGIN> deployment id; pack-only skipped)--baseinject (including compoundtsc && vite build)Live builds (local CLI, both root CDN and org subpath where noted)
/Users/jhaynie/tmp/nextjs-genesis/Users/jhaynie/tmp/static/Users/jhaynie/tmp/test-tanstack/Users/jhaynie/tmp/test-astro/Users/jhaynie/tmp/test-tldraw--baseURLs/Users/jhaynie/tmp/test-hono/Users/jhaynie/tmp/test-astro/test-nuxt/Users/jhaynie/tmp/test-astro/test-sk/Users/jhaynie/tmp/test-nitro-project@tanstack/react-start)genesis-mono/apps/webCI