16 Commits

Author SHA1 Message Date
17436862e0 route 2025-11-17 05:00:35 -07:00
d4eb9ae899 feat: switch to Claude Haiku 4.5 and add tool debug logging
Updated model from gpt-oss-120b (no function calling support) to
anthropic/claude-haiku-4.5 which has excellent function calling support
for enabling Morgan's agent creation tool.

Changes:
- Update OPENROUTER_MODEL to anthropic/claude-haiku-4.5
- Add debug logging to show available tools for each agent
- Claude Haiku 4.5 provides fast, cost-effective function calling

This enables tool calling for Morgan's create_agent_package functionality.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-16 17:58:57 -07:00
af781f2c58 feat: enable Morgan's create_agent_package tool with Vercel AI SDK
Re-enabled the create_agent_package tool with proper parameter typing using
z.infer for runtime type safety. The tool now works with Vercel AI SDK's
tool calling mechanism.

Changes:
- Update create-agent-package.ts with z.infer type annotations
- Update qdrant-rag.ts with consistent z.infer typing pattern
- Re-enable tool import in definitions.ts
- Activate create_agent_package in Morgan's agent configuration
- Add explanatory comments about Vercel AI SDK typing workarounds

This enables Morgan to create custom AI agents through the native Vercel AI SDK
tool calling interface. The  workaround is necessary due to TypeScript
overload resolution limitations in the tool() function, but the tool executes
correctly at runtime.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-16 17:14:24 -07:00
e366a4bfcd docs: update Morgan system prompt for Vercel AI SDK tool calling
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>
2025-11-16 15:24:22 -07:00
dc9673005b fix: embed Morgan system prompt for Cloudflare deployment
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>
2025-11-16 14:32:51 -07:00
99613f9ad4 fix: update custom agent handling and improve agent loading
- 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.
2025-11-15 08:52:25 -07:00
ee254fc5c3 chore: tighten deploy checklist and lint setup 2025-11-15 08:51:46 -07:00
1849dde46e data 2025-11-15 07:37:21 -07:00
5305c1839c UI refinements: button positioning, message formatting, scrollbar, and animations
- 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
2025-11-15 07:17:28 -07:00
61f4121237 updated readme, added testing suite. 2025-11-15 01:09:21 -07:00
f9e71c4839 added mobile support 2025-11-14 20:01:04 -07:00
2a8023fa0a fixed scrolling 2025-11-14 06:32:36 -07:00
4a2c042ea0 finally got it deployed 2025-11-13 22:33:26 -07:00
2a5f3e3f99 total UI redesign, added support for multiple agents 2025-11-13 17:32:44 -07:00
6189c87bb2 Implement multi-agent chat platform with shadcn Dialog agent selector
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>
2025-11-13 13:39:17 -07:00
207c0fbc98 first commit 2025-11-13 13:13:34 -07:00