fix(cli): route DevMode tunnel traffic through the front-door proxy#1369
fix(cli): route DevMode tunnel traffic through the front-door proxy#1369
Conversation
|
The latest Agentuity deployment details.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📜 Recent review details🧰 Additional context used📓 Path-based instructions (5)packages/cli/src/cmd/**/index.ts📄 CodeRabbit inference engine (packages/cli/AGENTS.md)
Files:
packages/cli/**/*.ts📄 CodeRabbit inference engine (packages/cli/AGENTS.md)
Files:
**/*.{ts,tsx,js,jsx}📄 CodeRabbit inference engine (AGENTS.md)
Files:
**/*.{ts,tsx}📄 CodeRabbit inference engine (AGENTS.md)
Files:
**/index.ts📄 CodeRabbit inference engine (AGENTS.md)
Files:
🧠 Learnings (2)📚 Learning: 2025-12-21T00:31:41.858ZApplied to files:
📚 Learning: 2026-02-17T14:23:15.448ZApplied to files:
🔇 Additional comments (1)
📝 WalkthroughWalkthroughModified the Gravity process launch argument in the dev command to use the user-facing proxy port instead of the internal Vite server port for port specification, aligning runtime endpoint connectivity with front-door TCP proxy HTTP and WebSocket routing behavior. 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/auth": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-0524dac/agentuity-auth-2.0.9-0524dac.tgz",
"@agentuity/keyvalue": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-0524dac/agentuity-keyvalue-2.0.9-0524dac.tgz",
"@agentuity/queue": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-0524dac/agentuity-queue-2.0.9-0524dac.tgz",
"@agentuity/postgres": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-0524dac/agentuity-postgres-2.0.9-0524dac.tgz",
"@agentuity/email": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-0524dac/agentuity-email-2.0.9-0524dac.tgz",
"@agentuity/coder": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-0524dac/agentuity-coder-2.0.9-0524dac.tgz",
"@agentuity/core": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-0524dac/agentuity-core-2.0.9-0524dac.tgz",
"@agentuity/react": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-0524dac/agentuity-react-2.0.9-0524dac.tgz",
"@agentuity/workbench": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-0524dac/agentuity-workbench-2.0.9-0524dac.tgz",
"@agentuity/opencode": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-0524dac/agentuity-opencode-2.0.9-0524dac.tgz",
"@agentuity/claude-code": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-0524dac/agentuity-claude-code-2.0.9-0524dac.tgz",
"@agentuity/sandbox": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-0524dac/agentuity-sandbox-2.0.9-0524dac.tgz",
"@agentuity/db": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-0524dac/agentuity-db-2.0.9-0524dac.tgz",
"@agentuity/runtime": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-0524dac/agentuity-runtime-2.0.9-0524dac.tgz",
"@agentuity/schema": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-0524dac/agentuity-schema-2.0.9-0524dac.tgz",
"@agentuity/migrate": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-0524dac/agentuity-migrate-2.0.9-0524dac.tgz",
"@agentuity/task": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-0524dac/agentuity-task-2.0.9-0524dac.tgz",
"@agentuity/frontend": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-0524dac/agentuity-frontend-2.0.9-0524dac.tgz",
"@agentuity/cli": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-0524dac/agentuity-cli-2.0.9-0524dac.tgz",
"@agentuity/vector": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-0524dac/agentuity-vector-2.0.9-0524dac.tgz",
"@agentuity/server": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-0524dac/agentuity-server-2.0.9-0524dac.tgz",
"@agentuity/webhook": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-0524dac/agentuity-webhook-2.0.9-0524dac.tgz",
"@agentuity/coder-tui": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-0524dac/agentuity-coder-tui-2.0.9-0524dac.tgz",
"@agentuity/schedule": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-0524dac/agentuity-schedule-2.0.9-0524dac.tgz",
"@agentuity/drizzle": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-0524dac/agentuity-drizzle-2.0.9-0524dac.tgz",
"@agentuity/evals": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-0524dac/agentuity-evals-2.0.9-0524dac.tgz"
}
}Or install directly: bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-0524dac/agentuity-auth-2.0.9-0524dac.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-0524dac/agentuity-keyvalue-2.0.9-0524dac.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-0524dac/agentuity-queue-2.0.9-0524dac.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-0524dac/agentuity-postgres-2.0.9-0524dac.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-0524dac/agentuity-email-2.0.9-0524dac.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-0524dac/agentuity-coder-2.0.9-0524dac.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-0524dac/agentuity-core-2.0.9-0524dac.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-0524dac/agentuity-react-2.0.9-0524dac.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-0524dac/agentuity-workbench-2.0.9-0524dac.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-0524dac/agentuity-opencode-2.0.9-0524dac.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-0524dac/agentuity-claude-code-2.0.9-0524dac.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-0524dac/agentuity-sandbox-2.0.9-0524dac.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-0524dac/agentuity-db-2.0.9-0524dac.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-0524dac/agentuity-runtime-2.0.9-0524dac.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-0524dac/agentuity-schema-2.0.9-0524dac.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-0524dac/agentuity-migrate-2.0.9-0524dac.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-0524dac/agentuity-task-2.0.9-0524dac.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-0524dac/agentuity-frontend-2.0.9-0524dac.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-0524dac/agentuity-cli-2.0.9-0524dac.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-0524dac/agentuity-vector-2.0.9-0524dac.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-0524dac/agentuity-server-2.0.9-0524dac.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-0524dac/agentuity-webhook-2.0.9-0524dac.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-0524dac/agentuity-coder-tui-2.0.9-0524dac.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-0524dac/agentuity-schedule-2.0.9-0524dac.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-0524dac/agentuity-drizzle-2.0.9-0524dac.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.9-0524dac/agentuity-evals-2.0.9-0524dac.tgz |
NOTE - I'm not convinced this is the actual solution but it does unblock the issue ive been running in to of the websocket in a sandbox not being able to hit the public tunnel. so leaving this here as an example.
Summary
/api/*websocket routing throughws-proxyto the Bun backendRoot Cause
DevMode starts three listeners:
opts.portopts.port + 1opts.port + 2The tunnel process was started with
--port vitePort, which sent public traffic directly to Vite instead of the front-door proxy.That produced a misleading partial failure mode:
/api/*still worked because Vite proxies normal HTTP requests to Bun/api/*failed because backend websocket upgrades are not proxied by Vite; they are only routed correctly byws-proxyIn practice this meant:
/api/wsopened but never receivedinitFix
Start Gravity against
opts.port, the user-facing front-door proxy, rather thanvitePort.Verification
bun test packages/cli/test/cmd/dev/ws-proxy.test.tswss://<tunnel>/api/wsreturnedinitafter the changeleadConnected: trueanddriverConnected: trueSummary by CodeRabbit