fix(cli): CDN Next public/ assets and rewrite origin-absolute URLs - #1634
Conversation
Next assetPrefix only covers /_next/*; public/ files (e.g. /next.svg) stayed on the app origin and broke when bootstrap was cold. Stage public/ for CDN upload via launch.static.include, rewrite packaged HTML/JS refs to baseUrl, and leave a shared public-cdn helper for Remix-class split layouts.
|
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: 7 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 (51)
Comment |
📦 Canary Packages Publishedversion: PackagesInstallAdd to your {
"dependencies": {
"@agentuity/telemetry": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.17-170421f/agentuity-telemetry-3.1.17-170421f.tgz",
"@agentuity/config": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.17-170421f/agentuity-config-3.1.17-170421f.tgz",
"@agentuity/schedule": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.17-170421f/agentuity-schedule-3.1.17-170421f.tgz",
"@agentuity/stream": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.17-170421f/agentuity-stream-3.1.17-170421f.tgz",
"@agentuity/coder": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.17-170421f/agentuity-coder-3.1.17-170421f.tgz",
"@agentuity/coder-tui": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.17-170421f/agentuity-coder-tui-3.1.17-170421f.tgz",
"@agentuity/server": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.17-170421f/agentuity-server-3.1.17-170421f.tgz",
"@agentuity/core": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.17-170421f/agentuity-core-3.1.17-170421f.tgz",
"@agentuity/skills": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.17-170421f/agentuity-skills-3.1.17-170421f.tgz",
"@agentuity/storage": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.17-170421f/agentuity-storage-3.1.17-170421f.tgz",
"@agentuity/api": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.17-170421f/agentuity-api-3.1.17-170421f.tgz",
"@agentuity/genesis": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.17-170421f/agentuity-genesis-3.1.17-170421f.tgz",
"@agentuity/adapter": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.17-170421f/agentuity-adapter-3.1.17-170421f.tgz",
"@agentuity/sandbox": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.17-170421f/agentuity-sandbox-3.1.17-170421f.tgz",
"@agentuity/claude-code": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.17-170421f/agentuity-claude-code-3.1.17-170421f.tgz",
"@agentuity/aigateway": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.17-170421f/agentuity-aigateway-3.1.17-170421f.tgz",
"@agentuity/postgres": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.17-170421f/agentuity-postgres-3.1.17-170421f.tgz",
"@agentuity/opencode": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.17-170421f/agentuity-opencode-3.1.17-170421f.tgz",
"@agentuity/drizzle": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.17-170421f/agentuity-drizzle-3.1.17-170421f.tgz",
"@agentuity/hono": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.17-170421f/agentuity-hono-3.1.17-170421f.tgz",
"@agentuity/keyvalue": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.17-170421f/agentuity-keyvalue-3.1.17-170421f.tgz",
"create-agentuity": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.17-170421f/create-agentuity-3.1.17-170421f.tgz",
"@agentuity/webhook": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.17-170421f/agentuity-webhook-3.1.17-170421f.tgz",
"@agentuity/task": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.17-170421f/agentuity-task-3.1.17-170421f.tgz",
"@agentuity/schema": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.17-170421f/agentuity-schema-3.1.17-170421f.tgz",
"@agentuity/vector": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.17-170421f/agentuity-vector-3.1.17-170421f.tgz",
"@agentuity/migrate": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.17-170421f/agentuity-migrate-3.1.17-170421f.tgz",
"@agentuity/client": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.17-170421f/agentuity-client-3.1.17-170421f.tgz",
"@agentuity/analytics": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.17-170421f/agentuity-analytics-3.1.17-170421f.tgz",
"@agentuity/db": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.17-170421f/agentuity-db-3.1.17-170421f.tgz",
"@agentuity/pi": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.17-170421f/agentuity-pi-3.1.17-170421f.tgz",
"@agentuity/queue": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.17-170421f/agentuity-queue-3.1.17-170421f.tgz",
"@agentuity/vite": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.17-170421f/agentuity-vite-3.1.17-170421f.tgz",
"@agentuity/email": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.17-170421f/agentuity-email-3.1.17-170421f.tgz",
"@agentuity/runtime": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.17-170421f/agentuity-runtime-3.1.17-170421f.tgz",
"@agentuity/cli": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.17-170421f/agentuity-cli-3.1.17-170421f.tgz"
}
}Or install directly: bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.17-170421f/agentuity-telemetry-3.1.17-170421f.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.17-170421f/agentuity-config-3.1.17-170421f.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.17-170421f/agentuity-schedule-3.1.17-170421f.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.17-170421f/agentuity-stream-3.1.17-170421f.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.17-170421f/agentuity-coder-3.1.17-170421f.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.17-170421f/agentuity-coder-tui-3.1.17-170421f.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.17-170421f/agentuity-server-3.1.17-170421f.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.17-170421f/agentuity-core-3.1.17-170421f.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.17-170421f/agentuity-skills-3.1.17-170421f.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.17-170421f/agentuity-storage-3.1.17-170421f.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.17-170421f/agentuity-api-3.1.17-170421f.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.17-170421f/agentuity-genesis-3.1.17-170421f.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.17-170421f/agentuity-adapter-3.1.17-170421f.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.17-170421f/agentuity-sandbox-3.1.17-170421f.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.17-170421f/agentuity-claude-code-3.1.17-170421f.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.17-170421f/agentuity-aigateway-3.1.17-170421f.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.17-170421f/agentuity-postgres-3.1.17-170421f.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.17-170421f/agentuity-opencode-3.1.17-170421f.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.17-170421f/agentuity-drizzle-3.1.17-170421f.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.17-170421f/agentuity-hono-3.1.17-170421f.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.17-170421f/agentuity-keyvalue-3.1.17-170421f.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.17-170421f/create-agentuity-3.1.17-170421f.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.17-170421f/agentuity-webhook-3.1.17-170421f.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.17-170421f/agentuity-task-3.1.17-170421f.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.17-170421f/agentuity-schema-3.1.17-170421f.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.17-170421f/agentuity-vector-3.1.17-170421f.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.17-170421f/agentuity-migrate-3.1.17-170421f.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.17-170421f/agentuity-client-3.1.17-170421f.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.17-170421f/agentuity-analytics-3.1.17-170421f.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.17-170421f/agentuity-db-3.1.17-170421f.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.17-170421f/agentuity-pi-3.1.17-170421f.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.17-170421f/agentuity-queue-3.1.17-170421f.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.17-170421f/agentuity-vite-3.1.17-170421f.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.17-170421f/agentuity-email-3.1.17-170421f.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.17-170421f/agentuity-runtime-3.1.17-170421f.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/3.1.17-170421f/agentuity-cli-3.1.17-170421f.tgz |
Move public asset URL rewrite and launch.static.include emission into packageBuildOutput so adapters only stage publicStaticDir. Gate include on baseUrl, enumerate public roots in deploy-metadata, and expand tests.
Summary
Next.js
assetPrefixonly rewrites/_next/*. Files underpublic/(e.g./next.svg,/vercel.svg) stay origin-relative and break when the app/bootstrap is cold while CDN chunks still load.This change:
public/next to the standalone server and records it onBuildResult.publicStaticDir(adapter only stages)packageBuildOutput):{baseUrl}{relpath}when CDN base is knownlaunch.static.include: [{ directory: "public", publicPath: "" }]only whenbaseUrlis set (split layout)publicStaticDirwith an empty public-path prefix soassets[]andlaunch.static.includestay alignedjoinCdnAssetUrl, process-root path helpers, single-pass public URL rewritelaunch.staticshape (additive){ "directory": ".next/static", "publicPath": "_next/static", "baseUrl": "https://cdn.agentcompany.com/genesis/", "include": [{ "directory": "public", "publicPath": "" }] }Empty
publicPathmeans files live at the CDN base root. Consumers should join withjoinCdnAssetUrl(or equivalent): no double-slash whenpublicPathis empty.Follow-up (deployer)
deployerctlmust walkstatic.includeand upload those roots with the givenpublicPath(empty → keys at CDN base). Without that, rewritten HTML will 404 until the deploy client is updated. CLI-sidemetadata.assetsalready lists public files for the same layout.Test plan
bun testpublic-cdn + launch + static-assets + nextjs-cdn + nextjs-standalonebun run typecheckin packages/cli