Commit graph

507 commits

Author SHA1 Message Date
Ajax Davis
0792a3dc3a chore: remove deprecated UUID-based API endpoints
Remove old endpoints that have been replaced by pretty URL versions:
- /api/collections/[id]/mcp/[transport] → /api/mcp/[username]/[slug]/[transport]
- /api/agents/[id]/conversation/[conversationId] → /api/agents/[username]/[uid]/conversation/[conversationId]

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-08 21:14:20 +10:00
Ajax Davis
0833ebb58a feat: add pretty URL API endpoints for MCP servers and agent conversations
- Add /api/mcp/[username]/[slug]/[transport] endpoint for MCP servers
  - Supports HTTP and SSE transports
  - Uses username/slug format instead of collection UUID
  - Maintains full JSON-RPC protocol support

- Add /api/agents/[username]/[uid]/conversation/[conversationId] endpoint
  - Uses username/uid format instead of agent UUID
  - Full SSE streaming support for AI responses

- Update collection detail page with new MCP URL section
  - Shows HTTP and SSE transport URLs
  - Includes Claude Desktop config snippet
  - Copy-to-clipboard functionality

- Add fetchAgentByUsernameAndUidWithTools() to build-tools.ts

- Update sharing docs with new API endpoint URLs

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-08 21:07:31 +10:00
Ajax Davis
4ccdc70b24 feat: add usernames, pretty URLs, cloning, and sharing docs
## Usernames
- Add username field to User model (unique, URL-friendly)
- Add slug field to Collection model (unique per user)
- Update sign-up flow to require username with availability checking
- Create username check API endpoint

## Pretty URLs
- Add route group (profile) with pretty URL pages:
  - /{username} - User profile
  - /{username}/agents/{uid} - Agent detail
  - /{username}/agents/{uid}/chat - Chat redirect
  - /{username}/collections/{slug} - Collection detail
- Add client-side redirects from old /agents/[id] and /collections/[id] URLs

## Cloning
- Add clone API endpoints for agents and collections
- Create CloneButton component
- Add AGENT_CLONED and COLLECTION_CLONED activity types

## Documentation
- Add /docs/sharing page explaining all shareable URLs
- Document cloning functionality and visibility settings

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-08 20:47:08 +10:00
Ajax Davis
fac6dae75e fix: use theme-aware bg-surface instead of hardcoded bg-white
- Replace bg-white with bg-surface for proper light/dark mode support
- bg-surface maps to white in light mode, dark gray in dark mode
- Fixes broken dark mode appearance from previous commit

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

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-08 17:27:02 +10:00
Ajax Davis
27337efe8b fix: improve light mode contrast for dashboard inputs and panels
- Replace bg-background with bg-white for form inputs and panel containers
- Fixes gray-on-gray contrast issues in light mode
- Updated pages: agent detail, agent chat, new agent, API keys settings

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

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-08 17:17:44 +10:00
Ajax Davis
fbfa9faaad fix: improve design contrast by using white backgrounds for cards
- Replace bg-background with bg-white for cards and panels across dashboard
- Add hover:shadow-sm for better visual feedback on interactive elements
- Apply fixes to: collections, agents, likes pages, and dashboard overview
- Cards now properly stand out against the light gray page background

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

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-08 16:55:16 +10:00
Ajax Davis
ada4359a6b fix: use correct icon name 'copy' instead of 'clipboard' 2026-01-08 05:08:29 +10:00
Ajax Davis
dbdbd1c4ac feat: add copy button to debug JSON view 2026-01-08 04:55:53 +10:00
Ajax Davis
858d838241 fix: correct message ordering and add debug JSON tab
- Fix chronological ordering by saving ASSISTANT message before TOOL messages
- Collect tool results during streaming, save after assistant message
- Add "Debug JSON" tab to view raw messages array
- Shows all message fields including toolCalls, toolResult, tokens

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

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-08 04:49:13 +10:00
Ajax Davis
3a9746cf17 fix: properly persist and render tool calls in agent chat
- Capture tool call inputs from onChunk and onStepFinish callbacks
- Store toolCalls array in ASSISTANT messages with proper format
- Update chat page to combine ASSISTANT toolCalls (input) with TOOL messages (output)
- Show complete tool call cards with both input args and output results
- Display token usage in assistant messages for debugging
- Handle pending tool calls from ASSISTANT messages without results

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

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-08 04:32:25 +10:00
Ajax Davis
e1bbd80f9b feat: implement user activity stream and multiple API improvements
Activity Stream:
- Add UserActivity model with ActivityType enum to track user actions
- Create activity logging service with fire-and-forget pattern
- Add /api/user/activity endpoint with cursor pagination
- Add cleanup cron job for 90-day activity retention
- Integrate activity logging into 18 mutation API routes
- Add DashboardActivityStream component with virtualized rendering

API Improvements:
- Add distributed rate limiting via Vercel KV (with in-memory fallback)
- Add rate limiting to chat endpoint (30 req/min)
- Optimize BM25 search with database-level pre-filtering
- Fix JSON parse crash in search endpoint
- Add pagination to collection tools response (toolsLimit/toolsOffset)
- Add take limits to agent detail query to prevent excessive data fetch
- Fix hardcoded tool count calculation in agents dashboard

Schema Extraction:
- Add schemaExtractionAttemptAt and schemaExtractionError fields
- Separate rate limiting for failed (1 min) vs successful (1 hour) attempts
- Allow retry of failed extractions

Standardization:
- Create api-response.ts with standardized response helpers
- Add apiSuccess, apiError, apiNotFound, apiForbidden, etc.
- Update agents routes to use standardized format

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-08 04:11:01 +10:00
Ajax Davis
1b0cff7332 feat: show tooltip for like button when not logged in
- LikeButton now shows 'Sign in to like' tooltip instead of redirecting
- Added interactive LikeButton to tools table (was static display)
- All three public list pages (tools, collections, agents) now have like functionality
2026-01-08 01:20:16 +10:00
Ajax Davis
fd9eda2e3f feat: use path segments for chat URLs instead of query params
- /agents/[id]/chat/[chatId] instead of /agents/[id]/chat?c=...
- /dashboard/agents/[id]/chat/[chatId] instead of ?c=...
- Base chat routes redirect to new chat with generated ID
- Cleaner URL structure for bookmarking and sharing
2026-01-08 00:54:33 +10:00
Ajax Davis
0027bac6e4 feat: include conversation ID in URL immediately on chat page load
- Public chat page: redirect to include ?c= parameter on mount
- Dashboard chat page: sync URL with active conversation ID
- New conversations get ID in URL immediately, not after first message
2026-01-08 00:31:39 +10:00
Ajax Davis
08703f67be style: add spacer between primary nav and dropdown menus in header 2026-01-08 00:25:44 +10:00
Ajax Davis
c72c3c5ae2 feat: add Chat button and redesign chat page with sidebar layout
- Add Chat button to public agent detail page
- Redesign chat page with collapsible sidebar:
  - Left sidebar shows agent config, tools, and collections
  - Right side shows chat interface
  - Toggle button to show/hide sidebar
  - Sidebar displays provider, model, temperature, system prompt
  - Links to individual tools and collections
2026-01-08 00:08:20 +10:00
Ajax Davis
eec648e5ca fix: preserve conversation ID in URL for chat history persistence 2026-01-07 23:57:42 +10:00
Ajax Davis
3701df6312 feat: add chat history with scroll-up loading to public agent chat
- Update conversation API to support cursor-based pagination (before/after params)
- Default behavior now returns most recent messages first
- Add react-virtuoso for efficient virtualized message rendering
- Implement scroll-up loading of older messages
- Show loading indicator when fetching history
2026-01-07 23:44:07 +10:00
Ajax Davis
728aeb8487 feat: add build info to /api/health for deployment verification
- Return commitSha, commitMessage, and deploymentUrl from Vercel env vars
- Document verification workflow in CLAUDE.md
2026-01-07 23:25:12 +10:00
Ajax Davis
efb28029ce feat: add public chat page for agents
- Create public chat page at /agents/[id]/chat with unique conversation ID per page load
- Add Chat column to public agents table with link to start new conversations
- Full chat UI with streaming responses, tool call visualization, and error handling
- Uses agent owner's API keys so no authentication required for users
2026-01-07 23:06:05 +10:00
Ajax Davis
99d0d6a9cf feat: add public visibility toggle to agent edit page
- Add isPublic field to form state and save handler
- Add Switch toggle in edit mode to control visibility
- Display public/private status in view mode with icon
2026-01-07 22:31:33 +10:00
Ajax Davis
30f6047e03 fix: add admin endpoint to make existing agents public 2026-01-07 22:24:32 +10:00
Ajax Davis
5c99c1f3a5 fix: add description column to tools page and make agents public by default
- Add description column to tools registry table
- Change agent isPublic default from false to true in Prisma schema
- Update CreateAgentSchema Zod default to true
2026-01-07 22:07:36 +10:00
Ajax Davis
3ccacf9d5b feat: redesign public pages with virtualized tables
- Add sonner for toast notifications
- Create CopyButton component for simple copy actions
- Create CopyDropdown component with entity-specific copy options
- Create PackageManagerSelector with localStorage persistence
- Redesign tools page with TableVirtuoso, sort by downloads/likes/recent/name
- Redesign collections page with TableVirtuoso and infinite scroll
- Redesign agents page with TableVirtuoso and infinite scroll
- All tables have fast client-side filtering and copy functionality
2026-01-07 21:55:13 +10:00
Ajax Davis
acb01b59ae feat: add like/love system for tools, collections, and agents
- Add ToolLike, CollectionLike, AgentLike junction tables with likeCount fields
- Create like/unlike API endpoints for all entity types
- Add user likes endpoints and public listings endpoints
- Create LikeButton component with optimistic UI updates
- Add collapsible Likes section in dashboard sidebar
- Create dashboard likes pages (overview, tools, collections, agents)
- Add public collections and agents pages with detail views
- Update AppHeader and MobileMenu with Collections/Agents navigation
- Auto-like on collection/agent creation
- Add heart icons to UI package

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

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-07 21:04:31 +10:00
Ajax Davis
4fcd5e50b2 fix: mobile UI bugs and documentation improvements
- docs: add clarifying comment for AI SDK provider imports on /docs and /sdk pages
- fix: remove duplicate footer on /docs page (was rendered in both page and root layout)
- fix: prevent "Official" badge from overflowing on mobile tool cards (/home)
- fix: center Specification/Full Example toggle buttons on mobile (/spec)
- fix: ecosystem diagram layout on mobile - increase height and reposition legend (/integrations)
2026-01-07 20:58:33 +10:00
github-actions[bot]
929e0382cf chore: sync 1 new tools from Vercel AI registry
Added 1 tools from Vercel AI SDK registry:
- Total tools in registry: 12
- Already synced: 11
- Newly added: 1
- Errors: 0

🤖 Automated by GitHub Actions
Run: https://github.com/tpmjs/tpmjs/actions/runs/20778503544
2026-01-07 10:32:56 +00:00
Ajax Davis
60933f702a refactor: move configuration to top and remove stats cards on agent details 2026-01-07 20:16:49 +10:00
Ajax Davis
fdb334cf19 refactor: replace language tabs with dropdown in API reference section 2026-01-07 20:10:31 +10:00
Ajax Davis
b8364e9b6c feat: combine API usage sections into single tabbed component
- Merge 'Send Message' and 'Fetch Conversations' into unified 'API Reference' section
- Two-level tabs: section selector (Send/Fetch) + language selector (cURL/TS/Python/AI SDK)
- Reduces vertical space by ~50%
- Send Message is default tab
2026-01-07 20:02:04 +10:00
Ajax Davis
7a3790fb10 feat: update agent chat page to use DashboardLayout with fullHeight mode
- Add fullHeight prop to DashboardLayout for chat-style interfaces
- When fullHeight is true, content fills viewport and disables padding
- Chat page now shows sidebar navigation with breadcrumbs
- Conversations sidebar remains as inner content panel
- New Chat button moved to header actions
2026-01-07 19:51:52 +10:00
Ajax Davis
be0d631ed7 feat: add conversation fetch code snippets with pagination support
- Add pagination to GET /api/agents/[id]/conversation/[conversationId]
  - limit and offset query params (default: 50/0, max: 100)
  - Returns hasMore in pagination object
- Add "Fetch Conversations" section on agent details page
  - cURL, TypeScript, Python examples
  - Shows list, get, and delete endpoints
  - Demonstrates pagination handling
2026-01-07 19:47:34 +10:00
Ajax Davis
62b7e96e91 feat: add API usage code snippets with tabs on agent details page
- Added CodeBlock import for syntax-highlighted code examples
- Added Tabs for switching between cURL, TypeScript, Python, and AI SDK
- Shows working examples with the agent's actual endpoint URL
- AI SDK tab shows both hosted usage and self-hosted option with tool packages
- Includes helpful note about conversation IDs

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

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-07 19:32:36 +10:00
Ajax Davis
b88a3e6504 feat: convert agent tools and collections to table view
- Tools section now uses Table component with search above
- Collections section now uses Table component with search above
- Both tables have proper empty states with helpful descriptions
- Consistent styling with other dashboard tables

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

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-07 19:23:14 +10:00
Ajax Davis
3584dc70ad feat: update agent and collection detail pages to use DashboardLayout
- Agent detail page now uses DashboardLayout with sidebar navigation
- Collection detail page now uses DashboardLayout with sidebar navigation
- Both pages have consistent back button, title, subtitle, and actions
- Edit mode in collection page integrates with layout title

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

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-07 19:14:59 +10:00
Ajax Davis
227064eb41 feat: update dashboard and API keys pages to use DashboardLayout
- Convert dashboard overview to use DashboardLayout with sidebar
- Update API keys page with DashboardLayout and table layout
- Add upload icon to icon library
- Consistent sidebar navigation across all dashboard pages
2026-01-07 19:03:45 +10:00
Ajax Davis
95ba5d5a56 fix: auto-detect dark mode in CodeBlock component
- Add useDarkMode hook that watches for .dark class on html element
- Remove hardcoded #24292e color override that broke dark mode syntax highlighting
- CodeBlock now auto-detects theme and uses vscDarkPlus style in dark mode
- Theme prop is now optional, only override when explicitly needed
2026-01-07 18:51:00 +10:00
Ajax Davis
fa36b12802 feat: redesign dashboard with sidebar layout and table components
- Add new Table UI component with rich features (sorting, empty states, interactive rows)
- Create DashboardLayout component with sidebar navigation
- Redesign Agents page with table layout showing provider, tools, and actions
- Redesign Collections page with table layout showing visibility and tool counts
- Add surface-secondary color token for proper dark mode support
- Add home and user icons to icon library
- Fix missing foreground-quaternary with muted color

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

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-07 18:40:52 +10:00
Ajax Davis
73b54e0196 feat: reorganize navigation menu for better UX
- Group links into Developers and Resources dropdowns
- Primary nav shows only Tools and Playground
- Segment auth section (Dashboard/Agents when logged in, Sign In when not)
- Mobile menu uses same structure with section headers
- Add descriptions to help users find what they need

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

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-07 17:58:01 +10:00
Ajax Davis
c37603287a style: fix biome formatting in dashboard pages
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-07 17:40:10 +10:00
Ajax Davis
5c5c5631dc fix: resolve type errors and lint issues for CI
- Fix SkeletonWithRelations type mapping in batch-processor.ts by explicitly mapping only the required fields
- Escape unescaped entities in tutorial pages (apostrophes and quotes)
2026-01-07 15:40:50 +10:00
Ajax Davis
4de971f065 fix: remove Prisma internal module import in parameters route 2026-01-07 15:27:15 +10:00
Ajax Davis
726ee18e91 fix: resolve type and lint errors in tool-ideas package
- Remove unused imports (sql, categories, processingBatches, EnrichedTool, desc)
- Fix drizzle query type by using conditional expression instead of reassignment
- Add null coalescing for JSON fields that could be null
- Update AI SDK usage property names (inputTokens/outputTokens)
- Fix array swap type assertion in shuffle function
- Replace non-null assertions with proper null checks

Traves is da greatest
2026-01-07 15:19:23 +10:00
Ajax Davis
5609a2c541 fix: skip integration tests unless explicitly enabled
Integration tests in agents.test.ts require a running server and test
database. They now properly skip using describe.skipIf when the
INTEGRATION_TESTS environment variable is not set to 'true'.

To run integration tests manually:
  INTEGRATION_TESTS=true pnpm --filter=@tpmjs/web test

Traves is da greatest
2026-01-07 15:07:47 +10:00
Ajax Davis
2ca0da7d90 fix: dynamically discover changelog files from package directories
- Replace hardcoded package paths with dynamic discovery
- Automatically find CHANGELOG.md files in SDK packages
- Discover tools from both packages/tools and packages/tools/official
- Read package names from package.json for accurate display

Traves is da greatest
2026-01-07 15:00:01 +10:00
Ajax Davis
75a71974fd feat: add GetToolParameters API endpoint
- Add GET /api/tools/parameters endpoint
- Accepts packageName and name query params
- Supports 'schema' format (raw JSON Schema) or 'parameters' format (simplified array)
- Returns parameter definitions with types, descriptions, and required flags
- Falls back to author-provided parameters if inputSchema not available

Closes #5

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

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-07 14:13:38 +10:00
Ajax Davis
df24b55f84 feat: add GitHub stars syncing to metrics sync
- Add github.ts to npm-client with functions to fetch GitHub stars
- Add parseGitHubUrl to handle various GitHub URL formats
- Update metrics sync endpoint to fetch and store GitHub stars
- GitHub stars now factor into tool quality score calculation
- Optional GITHUB_TOKEN env var for higher API rate limits

Closes #8

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

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-07 14:11:06 +10:00
Ajax Davis
6ef19d0aaa feat: add dark mode toggle to navigation
- Add ThemeToggle component to desktop AppHeader navbar
- Add ThemeToggle to mobile MobileMenu with label
- Reorganize social links in mobile menu for cleaner layout
- Toggle uses existing ThemeToggle component with sun/moon icons

Closes #4

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

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-07 14:05:03 +10:00
Ajax Davis
19c98758d4 fix: prevent horizontal overflow on mobile devices
- Add overflow-x: hidden to html and body elements
- Set max-width: 100vw to constrain content to viewport width
- Fixes responsive layout issues on mobile screens

Closes #6

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

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-07 14:00:48 +10:00
Ajax Davis
6c5fa54fc6 feat: add password visibility toggle and forgot password flow
Closes #11

Sign-in page improvements:
- Add show/hide password toggle with eye icons (inline SVG)
- Add "Forgot password?" link next to password label

New forgot-password page:
- Email input for password reset request
- Success state with confirmation message
- Calls /api/auth/forget-password endpoint
- Theme-aware styling for alerts

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

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-07 13:56:00 +10:00