Skip to content

fix: apply gateway env patching before agent discovery in dev mode#1303

Merged
Huijiro merged 6 commits into
mainfrom
extra-v2-fixes
Mar 29, 2026
Merged

fix: apply gateway env patching before agent discovery in dev mode#1303
Huijiro merged 6 commits into
mainfrom
extra-v2-fixes

Conversation

@Huijiro
Copy link
Copy Markdown
Member

@Huijiro Huijiro commented Mar 29, 2026

Agent discovery imports eval files at build time, which may import LLM
SDKs (e.g. groq-sdk) at module scope. These SDKs check for API keys
like GROQ_API_KEY at import time, but the gateway env patching that
sets these keys was only running later (inside createApp → applyDevPatches).

Move SDK key loading, AGENTUITY_TRANSPORT_URL setup, and gateway env
patching (GROQ_API_KEY, OPENAI_API_KEY, ANTHROPIC_API_KEY) to a new
Step 0b that runs before discoverAgents(), matching the same gateway
logic from runtime/src/dev-patches/gateway.ts.

Also includes template fixes:

  • Remove deprecated agentuity.config.ts
  • Update vite.config.ts
  • Add workbench config to app.ts

Summary by CodeRabbit

  • New Features
    • Added a default Vite configuration template with React and Tailwind pre-configured and a ready HTML entry for web apps.
  • Bug Fixes / Enhancements
    • Improved migration detection and user guidance for incomplete Vite build configurations — now flags missing build entry settings and provides a concrete suggestion to fix them.

Huijiro added 4 commits March 29, 2026 15:51
Agent discovery imports eval files at build time, which may import LLM
SDKs (e.g. groq-sdk) at module scope. These SDKs check for API keys
like GROQ_API_KEY at import time, but the gateway env patching that
sets these keys was only running later (inside createApp → applyDevPatches).

Move SDK key loading, AGENTUITY_TRANSPORT_URL setup, and gateway env
patching (GROQ_API_KEY, OPENAI_API_KEY, ANTHROPIC_API_KEY) to a new
Step 0b that runs before discoverAgents(), matching the same gateway
logic from runtime/src/dev-patches/gateway.ts.

Also includes template fixes:
- Remove deprecated agentuity.config.ts
- Update vite.config.ts
- Add workbench config to app.ts
The _base template enables @tailwindcss/vite in vite.config.ts but
never imports Tailwind, so utilities are never generated. Add
src/web/App.css with the Tailwind import directive and import it from
frontend.tsx (the entry point), matching the pattern used in the
default template.
The _base template uses inline <style> blocks with plain CSS — it
doesn't use Tailwind at all. The Tailwind Vite plugin and CSS import
belong in the default template which actually uses Tailwind classes.

- Remove tailwindcss import and plugin from _base/vite.config.ts
- Add vite.config.ts with Tailwind plugin to default/ overlay
- Remove App.css from _base (added in previous commit, not needed)
- Revert frontend.tsx App.css import in _base

The overlay system ensures default's vite.config.ts overwrites _base's
when the default template is selected, and package.overlay.json already
adds the @tailwindcss/vite and tailwindcss devDependencies.
The Vite build requires build.rollupOptions.input pointing to
src/web/index.html so Vite finds the HTML entry point. The migrate
tool now:

1. Includes rollupOptions.input in the missing-vite-config hint
2. Includes rollupOptions.input in the agentuity-config-vite-keys hint
3. Adds a new vite-config-missing-rollup-input finding when an
   existing vite.config.ts doesn't contain rollupOptions or
   index.html references
@agentuity-agent
Copy link
Copy Markdown

agentuity-agent Bot commented Mar 29, 2026

The latest Agentuity deployment details.

Project Deployment Preview Updated (UTC)
docs 🟢 Ready (deploy_bd9c4793167e5db9e573e4aca5437104) - 2026-03-29T19:38:23Z

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 29, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: c750d20c-f9c1-4908-86cc-46bf83b667d3

📥 Commits

Reviewing files that changed from the base of the PR and between d044a1f and ec44b3e.

📒 Files selected for processing (3)
  • packages/migrate/src/detect.ts
  • templates/_base/vite.config.ts
  • templates/default/vite.config.ts
✅ Files skipped from review due to trivial changes (1)
  • templates/default/vite.config.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/migrate/src/detect.ts
📜 Recent 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). (13)
  • GitHub Check: Sandbox CLI Tests
  • GitHub Check: Framework Integration Tests (TanStack & Next.js)
  • GitHub Check: Queue CLI Tests
  • GitHub Check: Package Installation & Usage Test
  • GitHub Check: Playwright E2E Smoke Test
  • GitHub Check: Postgres SSL Integration Test
  • GitHub Check: Template Integration Tests
  • GitHub Check: SDK Integration Test Suite
  • GitHub Check: Cloud Deployment Tests
  • GitHub Check: Standalone Agent Test
  • GitHub Check: Pack & Upload
  • GitHub Check: Build
  • GitHub Check: Agentuity Deployment
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{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:

  • templates/_base/vite.config.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

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

Files:

  • templates/_base/vite.config.ts
🧠 Learnings (1)
📚 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:

  • templates/_base/vite.config.ts
🔇 Additional comments (1)
templates/_base/vite.config.ts (1)

11-11: Good switch to ESM-safe path resolution.

Using join(import.meta.dirname, 'src/web/index.html') aligns this template with migration guidance and avoids CommonJS __dirname assumptions.


📝 Walkthrough

Walkthrough

Vite detection in the migration package now checks for an explicit Rollup input pointing to src/web/index.html and updates guidance to use join(import.meta.dirname, 'src/web/index.html'). Added a default Vite config template and adjusted the base template to resolve entry via import.meta.dirname.

Changes

Cohort / File(s) Summary
Vite Detection Logic
packages/migrate/src/detect.ts
Updated hints to include import { join } from 'node:path' and to require build.rollupOptions.input = join(import.meta.dirname, 'src/web/index.html'). Added new guided finding vite-config-missing-rollup-input that reads vite.config.ts when src/web and vite.config.ts exist and flags missing references to rollupOptions, input, or src/web/index.html.
Template Configuration (new default)
templates/default/vite.config.ts
Added new default Vite config exporting defineConfig(...) that registers React and Tailwind plugins, sets root to ., and sets build.rollupOptions.input to join(import.meta.dirname, 'src/web/index.html').
Template Configuration (base update)
templates/_base/vite.config.ts
Changed Rollup input resolution from join(__dirname, 'src/web/index.html') to join(import.meta.dirname, 'src/web/index.html') to align runtime resolution with new guidance.
🚥 Pre-merge checks | ✅ 1
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 29, 2026

📦 Canary Packages Published

version: 2.0.2-ec44b3e

Packages
Package Version URL
@agentuity/cli 2.0.2-ec44b3e https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.2-ec44b3e/agentuity-cli-2.0.2-ec44b3e.tgz
@agentuity/auth 2.0.2-ec44b3e https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.2-ec44b3e/agentuity-auth-2.0.2-ec44b3e.tgz
@agentuity/coder 2.0.2-ec44b3e https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.2-ec44b3e/agentuity-coder-2.0.2-ec44b3e.tgz
@agentuity/migrate 2.0.2-ec44b3e https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.2-ec44b3e/agentuity-migrate-2.0.2-ec44b3e.tgz
@agentuity/evals 2.0.2-ec44b3e https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.2-ec44b3e/agentuity-evals-2.0.2-ec44b3e.tgz
@agentuity/schema 2.0.2-ec44b3e https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.2-ec44b3e/agentuity-schema-2.0.2-ec44b3e.tgz
@agentuity/keyvalue 2.0.2-ec44b3e https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.2-ec44b3e/agentuity-keyvalue-2.0.2-ec44b3e.tgz
@agentuity/task 2.0.2-ec44b3e https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.2-ec44b3e/agentuity-task-2.0.2-ec44b3e.tgz
@agentuity/drizzle 2.0.2-ec44b3e https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.2-ec44b3e/agentuity-drizzle-2.0.2-ec44b3e.tgz
@agentuity/vector 2.0.2-ec44b3e https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.2-ec44b3e/agentuity-vector-2.0.2-ec44b3e.tgz
@agentuity/schedule 2.0.2-ec44b3e https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.2-ec44b3e/agentuity-schedule-2.0.2-ec44b3e.tgz
@agentuity/email 2.0.2-ec44b3e https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.2-ec44b3e/agentuity-email-2.0.2-ec44b3e.tgz
@agentuity/claude-code 2.0.2-ec44b3e https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.2-ec44b3e/agentuity-claude-code-2.0.2-ec44b3e.tgz
@agentuity/workbench 2.0.2-ec44b3e https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.2-ec44b3e/agentuity-workbench-2.0.2-ec44b3e.tgz
@agentuity/runtime 2.0.2-ec44b3e https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.2-ec44b3e/agentuity-runtime-2.0.2-ec44b3e.tgz
@agentuity/core 2.0.2-ec44b3e https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.2-ec44b3e/agentuity-core-2.0.2-ec44b3e.tgz
@agentuity/opencode 2.0.2-ec44b3e https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.2-ec44b3e/agentuity-opencode-2.0.2-ec44b3e.tgz
@agentuity/react 2.0.2-ec44b3e https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.2-ec44b3e/agentuity-react-2.0.2-ec44b3e.tgz
@agentuity/webhook 2.0.2-ec44b3e https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.2-ec44b3e/agentuity-webhook-2.0.2-ec44b3e.tgz
@agentuity/queue 2.0.2-ec44b3e https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.2-ec44b3e/agentuity-queue-2.0.2-ec44b3e.tgz
@agentuity/db 2.0.2-ec44b3e https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.2-ec44b3e/agentuity-db-2.0.2-ec44b3e.tgz
@agentuity/frontend 2.0.2-ec44b3e https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.2-ec44b3e/agentuity-frontend-2.0.2-ec44b3e.tgz
@agentuity/postgres 2.0.2-ec44b3e https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.2-ec44b3e/agentuity-postgres-2.0.2-ec44b3e.tgz
@agentuity/server 2.0.2-ec44b3e https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.2-ec44b3e/agentuity-server-2.0.2-ec44b3e.tgz
@agentuity/sandbox 2.0.2-ec44b3e https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.2-ec44b3e/agentuity-sandbox-2.0.2-ec44b3e.tgz
Install

Add to your package.json:

{
  "dependencies": {
    "@agentuity/cli": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.2-ec44b3e/agentuity-cli-2.0.2-ec44b3e.tgz",
    "@agentuity/auth": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.2-ec44b3e/agentuity-auth-2.0.2-ec44b3e.tgz",
    "@agentuity/coder": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.2-ec44b3e/agentuity-coder-2.0.2-ec44b3e.tgz",
    "@agentuity/migrate": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.2-ec44b3e/agentuity-migrate-2.0.2-ec44b3e.tgz",
    "@agentuity/evals": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.2-ec44b3e/agentuity-evals-2.0.2-ec44b3e.tgz",
    "@agentuity/schema": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.2-ec44b3e/agentuity-schema-2.0.2-ec44b3e.tgz",
    "@agentuity/keyvalue": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.2-ec44b3e/agentuity-keyvalue-2.0.2-ec44b3e.tgz",
    "@agentuity/task": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.2-ec44b3e/agentuity-task-2.0.2-ec44b3e.tgz",
    "@agentuity/drizzle": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.2-ec44b3e/agentuity-drizzle-2.0.2-ec44b3e.tgz",
    "@agentuity/vector": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.2-ec44b3e/agentuity-vector-2.0.2-ec44b3e.tgz",
    "@agentuity/schedule": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.2-ec44b3e/agentuity-schedule-2.0.2-ec44b3e.tgz",
    "@agentuity/email": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.2-ec44b3e/agentuity-email-2.0.2-ec44b3e.tgz",
    "@agentuity/claude-code": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.2-ec44b3e/agentuity-claude-code-2.0.2-ec44b3e.tgz",
    "@agentuity/workbench": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.2-ec44b3e/agentuity-workbench-2.0.2-ec44b3e.tgz",
    "@agentuity/runtime": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.2-ec44b3e/agentuity-runtime-2.0.2-ec44b3e.tgz",
    "@agentuity/core": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.2-ec44b3e/agentuity-core-2.0.2-ec44b3e.tgz",
    "@agentuity/opencode": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.2-ec44b3e/agentuity-opencode-2.0.2-ec44b3e.tgz",
    "@agentuity/react": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.2-ec44b3e/agentuity-react-2.0.2-ec44b3e.tgz",
    "@agentuity/webhook": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.2-ec44b3e/agentuity-webhook-2.0.2-ec44b3e.tgz",
    "@agentuity/queue": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.2-ec44b3e/agentuity-queue-2.0.2-ec44b3e.tgz",
    "@agentuity/db": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.2-ec44b3e/agentuity-db-2.0.2-ec44b3e.tgz",
    "@agentuity/frontend": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.2-ec44b3e/agentuity-frontend-2.0.2-ec44b3e.tgz",
    "@agentuity/postgres": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.2-ec44b3e/agentuity-postgres-2.0.2-ec44b3e.tgz",
    "@agentuity/server": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.2-ec44b3e/agentuity-server-2.0.2-ec44b3e.tgz",
    "@agentuity/sandbox": "https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.2-ec44b3e/agentuity-sandbox-2.0.2-ec44b3e.tgz"
  }
}

Or install directly:

bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.2-ec44b3e/agentuity-cli-2.0.2-ec44b3e.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.2-ec44b3e/agentuity-auth-2.0.2-ec44b3e.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.2-ec44b3e/agentuity-coder-2.0.2-ec44b3e.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.2-ec44b3e/agentuity-migrate-2.0.2-ec44b3e.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.2-ec44b3e/agentuity-evals-2.0.2-ec44b3e.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.2-ec44b3e/agentuity-schema-2.0.2-ec44b3e.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.2-ec44b3e/agentuity-keyvalue-2.0.2-ec44b3e.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.2-ec44b3e/agentuity-task-2.0.2-ec44b3e.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.2-ec44b3e/agentuity-drizzle-2.0.2-ec44b3e.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.2-ec44b3e/agentuity-vector-2.0.2-ec44b3e.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.2-ec44b3e/agentuity-schedule-2.0.2-ec44b3e.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.2-ec44b3e/agentuity-email-2.0.2-ec44b3e.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.2-ec44b3e/agentuity-claude-code-2.0.2-ec44b3e.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.2-ec44b3e/agentuity-workbench-2.0.2-ec44b3e.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.2-ec44b3e/agentuity-runtime-2.0.2-ec44b3e.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.2-ec44b3e/agentuity-core-2.0.2-ec44b3e.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.2-ec44b3e/agentuity-opencode-2.0.2-ec44b3e.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.2-ec44b3e/agentuity-react-2.0.2-ec44b3e.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.2-ec44b3e/agentuity-webhook-2.0.2-ec44b3e.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.2-ec44b3e/agentuity-queue-2.0.2-ec44b3e.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.2-ec44b3e/agentuity-db-2.0.2-ec44b3e.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.2-ec44b3e/agentuity-frontend-2.0.2-ec44b3e.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.2-ec44b3e/agentuity-postgres-2.0.2-ec44b3e.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.2-ec44b3e/agentuity-server-2.0.2-ec44b3e.tgz
bun add https://agentuity-sdk-objects.t3.storageapi.dev/npm/2.0.2-ec44b3e/agentuity-sandbox-2.0.2-ec44b3e.tgz

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 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/migrate/src/detect.ts`:
- Around line 751-752: The current detection checks viteSrc for 'rollupOptions'
but not for the actual 'input' property, so update the condition that references
viteSrc (the one that currently does if (!viteSrc.includes('rollupOptions') ||
!viteSrc.includes('index.html')) { ... findings.push(...) }) to ensure it looks
for the input key too (e.g. check for 'build.rollupOptions.input' or a regex
that matches rollupOptions followed by an input property) so configs missing
build.rollupOptions.input are flagged; modify the check on viteSrc accordingly
before pushing to findings.
- Around line 490-503: The Vite config examples use join(__dirname,
'src/web/index.html') which will throw in ESM where __dirname is undefined;
update the examples that set build.rollupOptions.input to use an ESM-safe path
resolution instead — either compute __dirname from import.meta.url via
fileURLToPath and dirname (referencing fileURLToPath, dirname, import.meta.url)
or use node:path.resolve/resolve('./src/web/index.html') (referencing resolve)
and replace join(__dirname, ...) occurrences accordingly so the example works in
"type":"module" projects.

In `@templates/default/vite.config.ts`:
- Line 11: The Vite config uses join(__dirname, 'src/web/index.html') which
breaks in ESM; replace use of __dirname with an ESM-safe resolved directory by
computing the config file directory via fileURLToPath(new URL('.',
import.meta.url)) (or equivalent) and then join that directory with
'src/web/index.html' so the input property uses the resolved path; update the
expression where join(__dirname, 'src/web/index.html') appears (in the Vite
config input option) to use the new ESM-safe directory variable.
🪄 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: 32192691-f84d-40ee-b6e0-cad862b36682

📥 Commits

Reviewing files that changed from the base of the PR and between bb19aee and d044a1f.

📒 Files selected for processing (2)
  • packages/migrate/src/detect.ts
  • templates/default/vite.config.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). (6)
  • GitHub Check: Build
  • GitHub Check: Playwright E2E Smoke Test
  • GitHub Check: Sandbox CLI Tests
  • GitHub Check: Cloud Deployment Tests
  • GitHub Check: SDK Integration Test Suite
  • GitHub Check: Agentuity Deployment
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{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:

  • templates/default/vite.config.ts
  • packages/migrate/src/detect.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

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

Files:

  • templates/default/vite.config.ts
  • packages/migrate/src/detect.ts
🧠 Learnings (1)
📚 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:

  • templates/default/vite.config.ts
  • packages/migrate/src/detect.ts

Comment thread packages/migrate/src/detect.ts
Comment thread packages/migrate/src/detect.ts Outdated
Comment thread templates/default/vite.config.ts Outdated
…upOptions.input detection

- Replace __dirname with import.meta.dirname in all vite.config.ts hint
  strings in detect.ts (3 locations) and in template vite.config.ts files
  for ESM compatibility
- Tighten the vite-config-missing-rollup-input detection to also check
  for 'input' keyword and 'src/web/index.html' path specifically

Resolves CodeRabbit review conversations.
@Huijiro Huijiro merged commit cee4167 into main Mar 29, 2026
18 checks passed
@Huijiro Huijiro deleted the extra-v2-fixes branch March 29, 2026 19:38
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