Commit graph

507 commits

Author SHA1 Message Date
Ajax Davis
d35cf92e98 fix: reorder navbar for better UX and logical grouping
Closes #7

New order:
- Core Product: Tools, Agents, How It Works, Playground, Integrations
- Separator
- Developer Section: Docs, SDK, Spec, Changelog, FAQ, Stats

Changes:
- Reorder links in AppHeader for desktop navigation
- Add visual separator between product and developer sections
- Make Tools/Agents links bold for visual hierarchy
- Update MobileMenu with same ordering

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

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-07 13:49:46 +10:00
Ajax Davis
4cb2ae3f6d fix: replace hardcoded colors with theme-aware tokens in Markdown component
Closes #12

- Replace zinc-900/zinc-100 with text-foreground for headings
- Replace zinc-700/zinc-300 with text-foreground-secondary for paragraphs, lists, blockquotes
- Replace zinc-* borders with border-border
- Replace zinc-100/zinc-800 backgrounds with bg-surface-secondary
- README content now properly respects the page theme context

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

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-07 13:46:28 +10:00
Ajax Davis
fa842cb045 fix: replace outdated changelog section with link to dedicated page
Closes #10

- Remove hardcoded v1.0.0 changelog entry from docs page
- Add link to the dedicated /changelog page instead
- Prevents documentation from becoming stale

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

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-07 13:43:43 +10:00
Ajax Davis
945e876974 fix: add missing navigation header to stats page
Closes #9

- Import and add AppHeader component to stats page
- Users can now navigate away from the stats page using the global nav
- Fix pre-existing lint issues (complexity and array key)

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

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-07 13:41:00 +10:00
Ajax Davis
5b8dc2c36f chore: trigger redeploy for updated API_KEY_ENCRYPTION_SECRET 2026-01-03 19:50:19 +10:00
Ajax Davis
9b62cc371a feat: add createBlogPostTool and accept both q/query params in search API 2026-01-03 19:21:05 +10:00
Ajax Davis
86b73af639 fix: add helpful error message for API key decryption failure 2026-01-03 19:20:07 +10:00
Ajax Davis
596d987f74 fix: wrap Prisma calls in try-catch for agent tests 2026-01-03 18:49:35 +10:00
Ajax Davis
368e1289e9 fix: update AI SDK message serialization to follow best practices
- Use ModelMessage type instead of any[] for type safety
- Format assistant messages with tool calls using ToolCallPart in content array
- Format tool messages with ToolResultPart using proper output structure
- Add ToolCallCard component for sexy debug display of tool calls in chat
- Remove debug console.log statements

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

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-03 18:47:02 +10:00
Ajax Davis
33629dc51a fix: skip agent integration tests when server unavailable 2026-01-03 17:21:18 +10:00
Ajax Davis
4e16cccebf feat: add agent logs and stats endpoints
- Add GET /api/agents/[id]/logs - conversation activity logs with filtering
- Add GET /api/agents/[id]/stats - aggregated statistics (conversations, tokens, tools)
- Add comprehensive agent endpoint tests (agents.test.ts)
- Fix TypeScript errors in logs route with proper Prisma type inference

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

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-03 17:14:17 +10:00
Ajax Davis
b064a3e481 Add agent logs and stats endpoints 2026-01-03 17:05:45 +10:00
Ajax Davis
ef95c37984 feat: generic env variable CRUD - any key name, not locked to providers
- Changed schema from AIProvider enum to arbitrary keyName string
- Updated API routes for generic key storage
- Simple CRUD UI with optional .env import
2026-01-03 14:35:19 +10:00
Ajax Davis
dca55f1faf refactor: traditional API key UI with optional .env import 2026-01-03 14:28:43 +10:00
Ajax Davis
51b9b455e5 refactor: simplify API keys page - just paste .env and save 2026-01-03 14:24:32 +10:00
Ajax Davis
749cf478b6 fix: add build config to root vercel.json for tpmjs project 2026-01-03 14:22:07 +10:00
Ajax Davis
075eff0602 fix: add build:web script to only build web and dependencies for Vercel 2026-01-03 14:18:28 +10:00
Ajax Davis
7ceacd0bc4 fix: use turbo filter for Vercel build to exclude playground/storybook 2026-01-03 14:11:19 +10:00
Ajax Davis
0923726bac fix: exclude playground and storybook from Vercel build filter 2026-01-03 14:02:14 +10:00
Ajax Davis
a8939c9834 debug: add comprehensive logging to api-keys POST endpoint
- Log each step: auth, body parsing, schema validation, encryption, db upsert
- Check for API_KEY_ENCRYPTION_SECRET presence before encrypt
- Log timing, error details with stack traces
- Return specific error messages for each failure point
2026-01-03 13:49:23 +10:00
Ajax Davis
92711f5369 feat: redesign API keys settings page with .env paste support
- Add Quick Import section to paste entire .env files
- Auto-detect supported providers (OPENAI_API_KEY, ANTHROPIC_API_KEY, etc.)
- Add per-provider inline inputs with auto-save on blur/debounce
- Show save status indicators (loading spinner, checkmark)
- Simplify UI with compact provider rows
- Add supported models reference section

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

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-03 13:27:48 +10:00
Ajax Davis
44b1fa10c9 chore: trigger redeploy for API_KEY_ENCRYPTION_SECRET 2026-01-03 03:59:19 +10:00
Ajax Davis
90aa90af41 fix: correct tools search API response mapping and add collection search
- Map tools search response from data.results.tools to expected format
- Map package.npmPackageName to top-level npmPackageName for UI
- Add search parameter support to collections API
2026-01-03 03:34:17 +10:00
Ajax Davis
753c13d18a feat: add tools and collections management UI to agent detail page
- Add Tools section with search/add/remove functionality
- Add Collections section with search/add/remove functionality
- Add GET endpoints to /api/agents/[id]/tools and /api/agents/[id]/collections
- Use debounced search with dropdown for adding tools/collections
- Include click-outside handling to close dropdowns
2026-01-03 03:10:53 +10:00
Ajax Davis
3a395e9c7c feat: add interactive tutorial slideshows for Agents and MCP
- Add /docs/tutorials page with tutorial index
- Create step-by-step Agents tutorial (7 slides)
  - API key setup
  - Agent creation
  - Tool attachment
  - Chat interface usage
- Create step-by-step MCP tutorial (8 slides)
  - What is MCP
  - Creating collections
  - Configuring Claude Desktop
  - Configuring Cursor
  - Using tools

Each tutorial features:
- Progress bar and slide indicators
- Previous/Next navigation
- Direct links to relevant dashboard pages
2026-01-02 21:21:13 +10:00
Ajax Davis
9f9e940b2b feat: add dedicated Agents documentation page at /docs/agents
- Create separate /docs/agents page with comprehensive documentation
- Clean up main /docs page by removing duplicate Agents content
- Add link card in main docs pointing to Agents documentation
- Fix Badge variant from "destructive" to "error"
- Fix Footer import (AppFooter)

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

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-02 20:40:23 +10:00
Ajax Davis
77c4432d35 feat: add AI Agents feature with multi-provider support and documentation
- Add Agent, AgentCollection, AgentTool, UserApiKey, Conversation, Message models to Prisma schema
- Create agent types and Zod schemas in @tpmjs/types
- Implement AES-256 API key encryption utilities
- Add CRUD API endpoints for agents, tools, collections, and user API keys
- Create conversation streaming endpoint with SSE events
- Build agent tool builder to merge collections and individual tools
- Add dashboard pages: agents list, new agent form, agent detail/edit, chat interface
- Add API keys settings page for managing provider keys
- Add comprehensive Agents documentation section to /docs
- Update navigation to include Agents link in header and mobile menu
- Add new icons: terminal, puzzle, message, key, info, send

Supported providers: OpenAI, Anthropic, Google, Groq, Mistral
2026-01-02 20:08:52 +10:00
Ajax Davis
8731101ed8 fix: use hardcoded sandbox URL in MCP handler 2026-01-02 12:27:12 +10:00
Ajax Davis
0f00d1b58a debug: add MCP logging 2026-01-02 12:13:31 +10:00
Ajax Davis
2eff25ae08 fix: evaluate SANDBOX_EXECUTOR_URL at runtime 2026-01-02 12:06:38 +10:00
Ajax Davis
48b6beaeaa fix: use correct executor endpoint and field names 2026-01-02 11:49:48 +10:00
Ajax Davis
88a78581aa chore: trigger redeploy for SANDBOX_EXECUTOR_URL 2026-01-02 11:40:48 +10:00
Ajax Davis
46e28e02a2 feat: add transport parameter to MCP endpoint
- Move endpoint from /api/collections/[id]/mcp to /api/collections/[id]/mcp/[transport]
- Support both 'http' and 'sse' transports
- HTTP: standard JSON-RPC over HTTP
- SSE: Server-Sent Events for streaming responses
- Add test script for validating MCP endpoints
2026-01-02 10:50:34 +10:00
Ajax Davis
fcaa36001b feat: add MCP endpoint for collections
Add Model Context Protocol (MCP) server endpoint for collections,
allowing users to connect Claude Desktop, Cursor, and other MCP
clients to use tools from their collections.

- POST /api/collections/[id]/mcp - JSON-RPC endpoint for MCP
- GET /api/collections/[id]/mcp - Server info for discovery
- Tool name conversion (e.g., @tpmjs/hello → tpmjs-hello--helloWorldTool)
- Handlers for initialize, tools/list, tools/call methods
- Executes tools via existing sandbox executor

Only public collections are accessible (no auth required).
2026-01-02 04:25:33 +10:00
Ajax Davis
572493d56c fix: add AppHeader to dashboard pages for consistent navigation
- Add AppHeader component to dashboard main page
- Add AppHeader to collections list page (loading, error, and main states)
- Add AppHeader to collection detail page (loading, error, and main states)

Ensures top navigation menu is visible on all dashboard pages for
both authenticated and unauthenticated users.
2026-01-02 02:52:17 +10:00
Ajax Davis
2335e89b31 feat: add collections feature for organizing tools
- Add Collection and CollectionTool models to Prisma schema
- Create Zod validation schemas for collections
- Implement full CRUD API routes for collections
- Add tool management endpoints (add/remove tools)
- Create UI components: CollectionCard, CollectionForm, CollectionList,
  AddToolSearch, CollectionToolList
- Add /dashboard/collections pages for list and detail views
- Add new icons to @tpmjs/ui: folder, plus, trash, edit, box, search,
  loader, arrowLeft, alertCircle, globe
- Add xs size variant to Icon component
- Add Collections link to dashboard page

Features:
- Full CRUD for named collections
- Public/private visibility toggle
- Tool search to add tools to collections
- Ownership-based access control
- Collection limit: 50 per user
- Tool limit: 100 per collection
2026-01-02 02:35:32 +10:00
Ajax Davis
e1fa27334c fix: add biome-ignore comments and config overrides for lint issues
- Add ToolSearchResult interface with biome-ignore for dynamic tool types
- Add biome-ignore comments for UIMessage.parts type casting
- Add biome config overrides for complexity warnings in MessageBubble.tsx
- Add biome config override for MobileMenu.tsx a11y rule
- Add biome config override for railway-executor complexity
- Fix unused template literal in railway-executor
- All lint tasks now pass with 0 errors

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

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-02 01:51:46 +10:00
Ajax Davis
89f64a5515 feat: add minimal header to auth pages
- Create AuthHeader component with logo and contextual auth link
- Show "Sign Up" on sign-in page and vice versa
- Keep centered form layout with header at top

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

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-02 01:28:04 +10:00
Ajax Davis
fdd40ff8d7 fix: check for __Secure- prefixed session cookie in middleware
better-auth uses __Secure- prefix for session cookies on HTTPS,
but middleware was only checking for the unprefixed cookie name

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

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-02 01:11:09 +10:00
Ajax Davis
a82534fb5b fix: improve auth sign-in handling and cookie configuration
- Add onSuccess/onError callbacks to signIn.email() for better response handling
- Add trustedOrigins configuration for production domain
- Configure explicit cookie attributes (sameSite, secure, httpOnly)
- Enable session cookie caching for better performance
- Handle edge case where signIn returns neither data nor error

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

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-02 01:04:29 +10:00
Ajax Davis
524c12406b fix: add Prisma client to web app for Vercel monorepo compatibility
- Add @prisma/client and prisma as direct dependencies
- Add postinstall and build scripts to generate Prisma client
- Points to schema in packages/db
2026-01-02 00:37:00 +10:00
Ajax Davis
498462eb48 fix: use custom domain for auth baseURL in production
VERCEL_URL returns deployment URL (tpmjs-xxx.vercel.app) not custom domain.
This was causing session cookies to be set for wrong domain.
Now prioritizes BETTER_AUTH_URL, then checks VERCEL_ENV=production to use tpmjs.com.
2026-01-02 00:12:55 +10:00
Ajax Davis
ceb4d991b9 fix: change label to span for display-only text in dashboard 2026-01-01 23:52:36 +10:00
Ajax Davis
e1f7c8f7a4 fix: remove unused router import from auth pages 2026-01-01 23:43:18 +10:00
Ajax Davis
260107c52a fix: simplify auth client and use window.location for redirects 2026-01-01 23:33:44 +10:00
Ajax Davis
5d4d25c8ad chore: trigger deployment 2026-01-01 23:22:59 +10:00
Ajax Davis
655bd98017 fix: use callbackURL and onSuccess/onError for Better Auth sign-in/sign-up 2026-01-01 23:07:59 +10:00
Ajax Davis
e04d92e439 fix: auto-detect baseURL for Better Auth in production 2026-01-01 22:59:56 +10:00
Ajax Davis
0a06a15789 fix: improve auth error logging and display 2026-01-01 22:46:47 +10:00
Ajax Davis
61d6d8abfe fix: lazy init Resend to avoid build-time errors 2026-01-01 22:43:39 +10:00