fix(cli): remove src/generated codegen and suppress proxy errors duri…#1326
fix(cli): remove src/generated codegen and suppress proxy errors duri…#1326
Conversation
…ng restart - Remove env-types-generator, lifecycle-generator, and docs-generator along with their invocations in the build pipeline and tests - Delete stale src/generated/ folders from apps/testing/* and apps/docs - Remove src/generated from file-watcher ignore lists - Simplify getGeneratedSqlDir (no longer checks for v1 registry.ts) - Suppress Vite proxy errors during backend --hot reload by downgrading transient connection errors to debug level and responding with 503
|
The latest Agentuity deployment details.
|
📝 WalkthroughWalkthroughRemoved automatic generation of documentation, environment type definitions, and lifecycle types during the build process. Enhanced the Vite asset server with backend proxy error handling. Updated the file watcher to include generated files and simplified SQL directory resolution. Changes
🚥 Pre-merge checks | ✅ 1✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
📦 Canary Packages Publishedversion: PackagesInstallAdd to your {
"dependencies": {
"@agentuity/webhook": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.7-b83ff39/agentuity-webhook-2.0.7-b83ff39.tgz",
"@agentuity/cli": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.7-b83ff39/agentuity-cli-2.0.7-b83ff39.tgz",
"@agentuity/postgres": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.7-b83ff39/agentuity-postgres-2.0.7-b83ff39.tgz",
"@agentuity/react": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.7-b83ff39/agentuity-react-2.0.7-b83ff39.tgz",
"@agentuity/server": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.7-b83ff39/agentuity-server-2.0.7-b83ff39.tgz",
"@agentuity/frontend": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.7-b83ff39/agentuity-frontend-2.0.7-b83ff39.tgz",
"@agentuity/db": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.7-b83ff39/agentuity-db-2.0.7-b83ff39.tgz",
"@agentuity/auth": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.7-b83ff39/agentuity-auth-2.0.7-b83ff39.tgz",
"@agentuity/opencode": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.7-b83ff39/agentuity-opencode-2.0.7-b83ff39.tgz",
"@agentuity/email": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.7-b83ff39/agentuity-email-2.0.7-b83ff39.tgz",
"@agentuity/sandbox": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.7-b83ff39/agentuity-sandbox-2.0.7-b83ff39.tgz",
"@agentuity/keyvalue": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.7-b83ff39/agentuity-keyvalue-2.0.7-b83ff39.tgz",
"@agentuity/schedule": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.7-b83ff39/agentuity-schedule-2.0.7-b83ff39.tgz",
"@agentuity/workbench": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.7-b83ff39/agentuity-workbench-2.0.7-b83ff39.tgz",
"@agentuity/schema": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.7-b83ff39/agentuity-schema-2.0.7-b83ff39.tgz",
"@agentuity/drizzle": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.7-b83ff39/agentuity-drizzle-2.0.7-b83ff39.tgz",
"@agentuity/task": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.7-b83ff39/agentuity-task-2.0.7-b83ff39.tgz",
"@agentuity/coder": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.7-b83ff39/agentuity-coder-2.0.7-b83ff39.tgz",
"@agentuity/claude-code": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.7-b83ff39/agentuity-claude-code-2.0.7-b83ff39.tgz",
"@agentuity/evals": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.7-b83ff39/agentuity-evals-2.0.7-b83ff39.tgz",
"@agentuity/queue": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.7-b83ff39/agentuity-queue-2.0.7-b83ff39.tgz",
"@agentuity/runtime": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.7-b83ff39/agentuity-runtime-2.0.7-b83ff39.tgz",
"@agentuity/migrate": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.7-b83ff39/agentuity-migrate-2.0.7-b83ff39.tgz",
"@agentuity/vector": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.7-b83ff39/agentuity-vector-2.0.7-b83ff39.tgz",
"@agentuity/core": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.7-b83ff39/agentuity-core-2.0.7-b83ff39.tgz"
}
}Or install directly: bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.7-b83ff39/agentuity-webhook-2.0.7-b83ff39.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.7-b83ff39/agentuity-cli-2.0.7-b83ff39.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.7-b83ff39/agentuity-postgres-2.0.7-b83ff39.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.7-b83ff39/agentuity-react-2.0.7-b83ff39.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.7-b83ff39/agentuity-server-2.0.7-b83ff39.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.7-b83ff39/agentuity-frontend-2.0.7-b83ff39.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.7-b83ff39/agentuity-db-2.0.7-b83ff39.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.7-b83ff39/agentuity-auth-2.0.7-b83ff39.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.7-b83ff39/agentuity-opencode-2.0.7-b83ff39.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.7-b83ff39/agentuity-email-2.0.7-b83ff39.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.7-b83ff39/agentuity-sandbox-2.0.7-b83ff39.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.7-b83ff39/agentuity-keyvalue-2.0.7-b83ff39.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.7-b83ff39/agentuity-schedule-2.0.7-b83ff39.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.7-b83ff39/agentuity-workbench-2.0.7-b83ff39.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.7-b83ff39/agentuity-schema-2.0.7-b83ff39.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.7-b83ff39/agentuity-drizzle-2.0.7-b83ff39.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.7-b83ff39/agentuity-task-2.0.7-b83ff39.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.7-b83ff39/agentuity-coder-2.0.7-b83ff39.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.7-b83ff39/agentuity-claude-code-2.0.7-b83ff39.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.7-b83ff39/agentuity-evals-2.0.7-b83ff39.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.7-b83ff39/agentuity-queue-2.0.7-b83ff39.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.7-b83ff39/agentuity-runtime-2.0.7-b83ff39.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.7-b83ff39/agentuity-migrate-2.0.7-b83ff39.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.7-b83ff39/agentuity-vector-2.0.7-b83ff39.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.7-b83ff39/agentuity-core-2.0.7-b83ff39.tgz |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@packages/cli/src/cmd/build/vite/vite-builder.ts`:
- Line 162: ViteBuildOptions contains an unused property `profile`; remove
`profile` from the ViteBuildOptions interface and from any function signatures
that declare it (notably in runViteBuild and runAllBuilds) and ensure calls to
viteBundle and other build helpers do not expect or pass a `profile` argument;
search for the symbols ViteBuildOptions, runViteBuild, runAllBuilds, and
viteBundle to update their signatures and any related type annotations so the
code compiles without the unused `profile` field.
🪄 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: 88de6f89-0d09-461a-9626-9c081ea4efce
⛔ Files ignored due to path filters (20)
apps/docs/src/generated/AGENTS.mdis excluded by!**/generated/**apps/docs/src/generated/README.mdis excluded by!**/generated/**apps/testing/cloud-deployment/src/generated/AGENTS.mdis excluded by!**/generated/**apps/testing/cloud-deployment/src/generated/README.mdis excluded by!**/generated/**apps/testing/cloud-deployment/src/generated/env.d.tsis excluded by!**/generated/**apps/testing/e2e-web/src/generated/AGENTS.mdis excluded by!**/generated/**apps/testing/e2e-web/src/generated/README.mdis excluded by!**/generated/**apps/testing/e2e-web/src/generated/env.d.tsis excluded by!**/generated/**apps/testing/integration-suite/src/generated/AGENTS.mdis excluded by!**/generated/**apps/testing/integration-suite/src/generated/README.mdis excluded by!**/generated/**apps/testing/integration-suite/src/generated/env.d.tsis excluded by!**/generated/**apps/testing/oauth/src/generated/AGENTS.mdis excluded by!**/generated/**apps/testing/oauth/src/generated/README.mdis excluded by!**/generated/**apps/testing/oauth/src/generated/analytics-config.tsis excluded by!**/generated/**apps/testing/oauth/src/generated/app.tsis excluded by!**/generated/**apps/testing/oauth/src/generated/registry.tsis excluded by!**/generated/**apps/testing/oauth/src/generated/routes.tsis excluded by!**/generated/**apps/testing/oauth/src/generated/webanalytics.tsis excluded by!**/generated/**apps/testing/svelte-web/src/generated/AGENTS.mdis excluded by!**/generated/**apps/testing/svelte-web/src/generated/README.mdis excluded by!**/generated/**
📒 Files selected for processing (9)
packages/cli/src/cmd/build/vite/docs-generator.tspackages/cli/src/cmd/build/vite/env-types-generator.tspackages/cli/src/cmd/build/vite/lifecycle-generator.tspackages/cli/src/cmd/build/vite/vite-asset-server-config.tspackages/cli/src/cmd/build/vite/vite-builder.tspackages/cli/src/cmd/dev/file-watcher.tspackages/cli/src/cmd/project/auth/shared.tspackages/cli/test/cmd/build/lifecycle-generator.test.tspackages/cli/test/cmd/build/vite/env-types-generator.test.ts
💤 Files with no reviewable changes (7)
- packages/cli/src/cmd/dev/file-watcher.ts
- packages/cli/src/cmd/project/auth/shared.ts
- packages/cli/src/cmd/build/vite/docs-generator.ts
- packages/cli/src/cmd/build/vite/env-types-generator.ts
- packages/cli/test/cmd/build/lifecycle-generator.test.ts
- packages/cli/src/cmd/build/vite/lifecycle-generator.ts
- packages/cli/test/cmd/build/vite/env-types-generator.test.ts
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (15)
- GitHub Check: Framework Integration Tests (TanStack & Next.js)
- GitHub Check: Playwright E2E Smoke Test
- GitHub Check: Template Integration Tests
- GitHub Check: Storage CLI Tests
- GitHub Check: Queue CLI Tests
- GitHub Check: Sandbox CLI Tests
- GitHub Check: Postgres SSL Integration Test
- GitHub Check: Queue SDK Tests
- GitHub Check: SDK Integration Test Suite
- GitHub Check: Cloud Deployment Tests
- GitHub Check: Package Installation & Usage Test
- GitHub Check: Standalone Agent Test
- GitHub Check: Build
- GitHub Check: Pack & Upload
- GitHub Check: Agentuity Deployment
🧰 Additional context used
📓 Path-based instructions (3)
packages/cli/**/*.ts
📄 CodeRabbit inference engine (packages/cli/AGENTS.md)
Use
Bun.file(f).exists()instead ofexistsSync(f)for file existence checks
Files:
packages/cli/src/cmd/build/vite/vite-builder.tspackages/cli/src/cmd/build/vite/vite-asset-server-config.ts
**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (AGENTS.md)
Use Biome as code formatter with tabs (width 3), single quotes, semicolons, lineWidth 100, and trailingCommas es5
Files:
packages/cli/src/cmd/build/vite/vite-builder.tspackages/cli/src/cmd/build/vite/vite-asset-server-config.ts
**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
**/*.{ts,tsx}: Use TypeScript Strict mode with ESNext target and bundler moduleResolution
UseStructuredErrorfrom@agentuity/corefor error handling
Files:
packages/cli/src/cmd/build/vite/vite-builder.tspackages/cli/src/cmd/build/vite/vite-asset-server-config.ts
🧠 Learnings (2)
📚 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/vite/vite-builder.tspackages/cli/src/cmd/build/vite/vite-asset-server-config.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/vite/vite-builder.tspackages/cli/src/cmd/build/vite/vite-asset-server-config.ts
🔇 Additional comments (3)
packages/cli/src/cmd/build/vite/vite-asset-server-config.ts (3)
180-197: Well-structured proxy error handling for hot reload scenarios.The defensive check correctly filters out WebSocket upgrade responses and prevents double-writes. The 503 status with
Retry-After: 1header is semantically appropriate for transient backend unavailability.One consideration: per the
useAgentSchemas.tshook (Context snippet 1), HTTP 503 responses are treated as hard errors without automatic retry—users may see a brief error state in the workbench during backend restarts. This is acceptable for dev mode and preferable to connection reset errors.
262-298: LGTM!The
backendProxyConfigurecallback is consistently applied to all backend proxy targets, ensuring uniform error handling across user-defined routes, system routes, and legacy health check endpoints.
361-368: LGTM!The error suppression complements the 503 response handling—together they provide a clean UX during backend restarts. Downgrading to debug level (rather than silently dropping) preserves diagnostic information when needed.
| */ | ||
| export async function runViteBuild(options: ViteBuildOptions): Promise<void> { | ||
| const { rootDir, mode, dev = false, logger, profile } = options; | ||
| const { rootDir, mode, dev = false, logger } = options; |
There was a problem hiding this comment.
🛠️ Refactor suggestion | 🟠 Major
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Description: Check if `profile` is still used in ViteBuildOptions consumers
# Search for usages of the `profile` property in ViteBuildOptions contexts
rg -n --type=ts 'profile' packages/cli/src/cmd/build/
# Search for any runViteBuild or runAllBuilds calls that pass profile
rg -n --type=ts -A 3 'runViteBuild|runAllBuilds' packages/cli/src/ | rg -i 'profile'Repository: agentuity/sdk
Length of output: 390
🏁 Script executed:
# Check the context around line 125 in packages/cli/src/cmd/build/index.ts
sed -n '115,135p' packages/cli/src/cmd/build/index.tsRepository: agentuity/sdk
Length of output: 823
🏁 Script executed:
# Search for all usages of profile property assignment or parameter passing
rg -n --type=ts 'profile\s*[:=]' packages/cli/src/cmd/build/Repository: agentuity/sdk
Length of output: 39
🏁 Script executed:
# Search for ViteBuildOptions being used and passed with properties
rg -n --type=ts -B 2 -A 5 'ViteBuildOptions' packages/cli/src/cmd/build/Repository: agentuity/sdk
Length of output: 2141
🏁 Script executed:
# Check if profile is used in the broader codebase outside of just definitions
rg -n --type=ts '\.profile\b' packages/cli/src/Repository: agentuity/sdk
Length of output: 39
Remove unused profile parameter from interface and function signature.
The profile property is declared in ViteBuildOptions (line 154) but is completely unused—it's not destructured in runViteBuild or runAllBuilds, never passed when calling viteBundle(), and has zero usages in the codebase. Remove it from the interface definition to complete the cleanup.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@packages/cli/src/cmd/build/vite/vite-builder.ts` at line 162,
ViteBuildOptions contains an unused property `profile`; remove `profile` from
the ViteBuildOptions interface and from any function signatures that declare it
(notably in runViteBuild and runAllBuilds) and ensure calls to viteBundle and
other build helpers do not expect or pass a `profile` argument; search for the
symbols ViteBuildOptions, runViteBuild, runAllBuilds, and viteBundle to update
their signatures and any related type annotations so the code compiles without
the unused `profile` field.
…ng restart
Summary by CodeRabbit
New Features
Refactor