Replaced n8n-specific JSON output instructions with proper Vercel AI SDK
tool calling format. Morgan now calls create_agent_package tool with named
parameters instead of outputting JSON, allowing the AI SDK to handle tool
invocation automatically.
Changes:
- Replace JSON output instructions with parameter-based tool calling
- Clarify required and optional parameters for create_agent_package
- Update example flow to show tool calling instead of JSON output
- Remove references to messageType and toolCall JSON structure
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Morgan's system prompt is now generated at build time and embedded directly
in the code, making it available in Cloudflare Worker environments where
file system access isn't available.
Changes:
- Add scripts/generate-morgan-prompt.js to generate TypeScript constant from markdown
- Generate src/lib/agents/morgan-system-prompt.ts with full Fortura Agent Bundle
- Update agent definitions to import and use the embedded constant
- Update package.json build scripts to generate prompt before building
- Remove runtime file system access (readFileSync) that failed on Cloudflare
This ensures Morgan agent has full system prompt capabilities on all deployments.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Update `wrangler.jsonc` to correct the `CUSTOM_AGENT_WEBHOOK` URL.
- Enhance `page.tsx` to load custom agents from localStorage and merge them with predefined agents.
- Modify `route.ts` to validate `systemPrompt` for custom agents and include it in the webhook payload.
- Adjust `chat-interface.tsx` to handle custom agents more effectively, including system prompt integration and event dispatching for pinned agents.
- Remove obsolete `CUSTOM_AGENT_EXECUTION_PRD.md` and `DIFF_TOOL_USAGE.md` files as part of cleanup.
- Remove --env flag usage from deployment checklist
- Add explicit note: Do NOT use --env flags
- Remove 'Multiple environments warning' troubleshooting (no longer applicable)
- Keep all other important deployment steps and troubleshooting
- Move route and vars to top level in wrangler.jsonc (remove env.production wrapper)
- Update deployment instructions: use 'npx wrangler deploy' without --env flags
- Update all documentation (README.md, .cursorrules, CLAUDE.md) to reflect correct deployment process
- Route configured as agents.nicholai.work at top level
- Add UI/UX refinements section to .cursorrules with message display, button layout, scrollbar, pill animations, and Create New button details
- Update CLAUDE.md with message display formatting and top button layout information
- Update README.md key features with polished UI and custom agents information
- Move new chat button to left side, bookmark button stays on right
- Add max-width constraint (75%) to user messages with proper text wrapping
- Remove right-align text from user message frames (keep bubbles on right)
- Add overflow handling for code blocks in messages
- Change scrollbar color from orange to gray in light and dark modes
- Fix pill loading animation flicker by initializing pinnedAgents from localStorage
- Add 0.2s base delay to pill animations for staggered reveal
- Improve Create new button animation: longer duration (0.6s), bouncy scale sequence, easeInOut easing
Key features:
- Multi-agent support with dynamic agent configuration via environment variables
- Floating shadcn Dialog for elegant agent selection
- Per-agent chat sessions and message history with localStorage persistence
- Image upload support with base64 encoding
- Dynamic webhook routing based on selected agent
- Refactored components: ChatInterface, Header, and new AgentSelector
- New API endpoints: GET /api/agents and updated POST /api/chat
- Centralized TypeScript types in src/lib/types.ts
- Comprehensive CLAUDE.md documentation
Agent Configuration:
- Set environment variables: AGENT_N_URL, AGENT_N_NAME, AGENT_N_DESCRIPTION
- Agent selector automatically discovers agents on first visit
- Seamless switching between agents without page reload
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>