Commit graph

656 commits

Author SHA1 Message Date
Ajax Davis
5fafc90e3e fix: reorder collection page sections and add layout to docs page
- Move use cases section above scenarios section on collection detail pages
- Add AppHeader and AppFooter to /docs/developers/guide page for consistent layout
2026-01-20 14:15:16 +10:00
Ajax Davis
92e4f5c467 chore: remove old vitest .ts config files
Replaced with .mjs versions for proper ESM support.
2026-01-20 13:54:25 +10:00
Ajax Davis
192284ad07 fix: update UI test expectations to match actual component classes
Fixed test expectations in Badge, Button, Card, Checkbox, Input,
Select, and Textarea components to match the actual Tailwind utility
classes being applied.

Changes:
- Badge: font-medium, rounded-none, transition-colors
- Card: border-dashed, rounded-none
- Button: rounded-none, focus-visible:ring-2
- Input: font-mono, rounded-none, focus-visible:ring-2
- Select: rounded-none, transition-colors
- Textarea: font-mono, rounded-none, transition-colors
- Checkbox: transition-colors, rounded-none

All 856 tests now pass.
2026-01-20 13:54:25 +10:00
Ajax Davis
01b7295daa fix: resolve build errors and clean up scenario page
- Remove undefined variable reference (run.conversation) in header
- Extract ExpandedRunDetails component to reduce JSX nesting
- Fix vitest configs: rename to .mjs and add ESM-compatible __dirname
- Inline tailwind base config to avoid module resolution issues
- Remove unused imports (Streamdown, viewMode state)

This fixes the Turbopack parsing error that was preventing the build.
2026-01-20 13:54:24 +10:00
Ajax Davis
f5d7364c96 fix: resolve tailwind config import issues
- Inline tailwind config to resolve Turbopack import issues with @tpmjs/config
- Add exports field to @tpmjs/config package.json for proper module resolution
- Add @tpmjs/config to transpilePackages in Next.js config

Note: page.tsx has a pre-existing Turbopack parsing error at line 604
that needs to be addressed separately (it existed before these changes).
2026-01-20 12:12:16 +10:00
Ajax Davis
ffc5807ba0 feat: add E2B sandbox tools and update documentation navigation
- Add new e2b tool package for cloud sandbox code execution
- Update docs navigation with descriptions and developers guide section
- Configure blocks.yml for e2b tool discovery
2026-01-20 08:05:19 +10:00
Ajax Davis
a3436ca5a5 feat: add developers guide to documentation menu
- Add new /docs/developers/guide page with comprehensive scenarios documentation
- Explain what scenarios are, why use them, and how they work
- Cover developer use cases (CI/CD, local testing, quality monitoring)
- Include comparison with traditional testing approaches
- Add to AppHeader developers dropdown menu
2026-01-20 06:49:09 +10:00
Ajax Davis
cf2fd3ad9e feat: add conversation history and view mode toggle to scenario runs
- Add Streamdown for markdown rendering
- Add Message interface for conversation typing
- Add viewMode state (chat/debug) for switching views
- Add conversation history section in expanded run details
- Show conversation in chat format (USER/ASSISTANT/TOOL messages)
- Add view mode toggle to switch between chat and raw JSON views
- Improve usage stats section to show — when data is missing
2026-01-20 06:30:33 +10:00
Ajax Davis
8964e0c237 fix: handle null/undefined evaluator object in scenario runs
- Make evaluator field nullable in TypeScript interface
- Add optional chaining for run.evaluator?.verdict
- Add optional chaining for run.evaluator?.model
- Prevents TypeError when evaluator object is missing
2026-01-20 06:11:23 +10:00
Ajax Davis
2d939ea11b fix: handle null/undefined usage object in scenario runs
- Make usage field nullable in TypeScript interface
- Add optional chaining for run.usage?.executionTimeMs
- Add optional chaining for run.usage?.totalTokens
- Prevents TypeError when usage object is missing
2026-01-20 06:04:58 +10:00
Ajax Davis
474e11fc13 fix: handle null timestamps in scenario details page
- Add optional chaining for run.timestamps?.createdAt
- Make timestamps.createdAt optional in interface
- Add null check for evaluator.reason
- Prevents TypeError when accessing undefined properties
2026-01-20 05:40:33 +10:00
Ajax Davis
c1af7a2bde chore: add OpenCode configuration
- Add AGENTS.md with comprehensive project rules and guidelines
- Add opencode.json with model configuration (Sonnet 4.5 + Haiku 4.5)
- Add .ignore to exclude build artifacts and generated files
- Enable AI-assisted development with proper monorepo context
2026-01-20 05:30:28 +10:00
Ajax Davis
b71fe338c5 feat: allow gh/npm/pnpm/git CLI tools in Claude Code label-trigger job 2026-01-20 04:53:40 +10:00
Ajax Davis
a8fe178dc6 feat: add label-triggered Claude job that extracts prompt from issue comments 2026-01-20 04:49:45 +10:00
Ajax Davis
36d8ec6f09 fix: trigger Claude Code on claude-working label to work around GITHUB_TOKEN limitation 2026-01-20 04:45:52 +10:00
Ajax Davis
e079959cd8 fix: repair YAML syntax in tool-request workflow - avoid asterisk parsing issue 2026-01-20 04:41:43 +10:00
Ajax Davis
f3a73f1457 feat: add workflow_dispatch to tool-request pipeline for manual testing 2026-01-20 04:34:55 +10:00
Ajax Davis
ef95e10a1e feat: add tool-request pipeline for automated tool creation
- Add pipeline spec at .claude/pipelines/tool-request.md
- Add workflow to trigger Claude on 'tool-request' label
- Add auto-close workflow for published issues (24h)
- Update claude.yml with write permissions and NPM_TOKEN
- Create labels: tool-request, claude-working, validation-failed, published, escalated

Pipeline flow:
1. Maintainer applies 'tool-request' label to issue
2. Claude analyzes, designs, implements, validates, publishes
3. Issue auto-closes 24h after successful publish
2026-01-20 04:22:43 +10:00
Thomas Davis
3acb6f49e5 Merge pull request #15 from tpmjs/add-claude-github-actions-1768842720159
Add Claude Code GitHub Workflow
2026-01-20 03:12:31 +10:00
Thomas Davis
c56534a4ae "Update Claude Code Review workflow" 2026-01-20 03:12:04 +10:00
Ajax Davis
ac6fdb87e7 feat(web): add tweet button and OG tags to collection page
- Add ShareButton component for Twitter/X sharing
- Refactor collection page to server component with generateMetadata
- Add proper OpenGraph and Twitter Card meta tags for social sharing
- Extract client-side logic to CollectionDetailClient component
2026-01-19 18:16:17 +10:00
Ajax Davis
3c5c218207 feat(web): add scenarios UI - explorer, detail, and homepage section
- Add global scenarios explorer page at /scenarios
- Add scenario detail page with run history at /scenarios/[id]
- Add collection-scoped scenario detail page
- Add featured scenarios section to homepage
- Add useScenarios hook for data fetching
- Regenerate CLI manifest
2026-01-19 05:57:29 +10:00
Ajax Davis
dc684d3b0e chore(cli): bump version to 0.1.4 for npm publish 2026-01-19 05:50:32 +10:00
Ajax Davis
ad2f8a629b feat(web): add ScenariosSection component to collection page
- Create ScenariosSection component with scenario list, status badges, and metrics
- Allow generating new scenarios with AI (owner only)
- Allow running scenarios and showing run progress
- Display quality scores and pass/fail streaks
- Link to scenario detail pages for run history
2026-01-19 05:43:43 +10:00
Ajax Davis
ee3dd3dcd0 feat(scenarios): implement real agent execution with collection tools
- Replace simulated execution with real AI SDK generateText() calls
- Build tools from collection with executor config cascade
- Support multi-step tool execution with MAX_TOOL_STEPS limit
- Capture full conversation history, token usage, and execution time
- Use gpt-4.1-mini for consistent execution model
2026-01-19 05:37:59 +10:00
Ajax Davis
a1f45fa33a fix: switch scenario evaluator to gpt-4.1-mini
Changed default evaluator from claude-3-5-haiku-latest to gpt-4.1-mini
since OPENAI_API_KEY is configured in production but ANTHROPIC_API_KEY
is not.
2026-01-19 05:20:05 +10:00
Ajax Davis
c52e6eaf24 docs: add scenarios user guide and API reference
- Add /docs/scenarios page with comprehensive user guide
  - Overview of what scenarios are
  - Common archetypes for different tool types
  - CLI commands: generate, list, run, test, info
  - Quality scoring explanation
  - CI/CD integration examples
  - Rate limits documentation

- Add /docs/api/scenarios page with API reference
  - List scenarios endpoint
  - Get scenario details
  - List collection scenarios
  - Create scenario
  - Generate scenarios with AI
  - Run scenario
  - Get run history
  - Check prompt similarity
  - Featured scenarios
  - Error responses
2026-01-18 09:53:36 +10:00
Ajax Davis
ea742c9386 feat: add scenarios system for collection testing
Implements the complete scenarios feature for TPMJS:

API endpoints:
- GET/POST /api/scenarios - list/create scenarios
- GET/PATCH/DELETE /api/scenarios/:id - scenario CRUD
- POST /api/scenarios/:id/run - execute scenario
- GET /api/scenarios/:id/runs - run history
- POST /api/scenarios/check-similarity - vector similarity check
- GET /api/scenarios/featured - featured scenarios
- POST /api/collections/:id/scenarios/generate - AI scenario generation
- GET /api/collections/:id/scenarios - list collection scenarios

Services:
- generate-prompt.ts - AI prompt generation using GPT-4o-mini
- similarity.ts - vector embedding and cosine similarity
- evaluate.ts - LLM-based success evaluation
- execute.ts - scenario execution orchestration

CLI commands:
- tpm scenario list [collection] - list scenarios
- tpm scenario run <collection> - run all scenarios
- tpm scenario test <id> - run single scenario
- tpm scenario generate <collection> - generate scenarios
- tpm scenario info <id> - scenario details

Database:
- Scenario, ScenarioEmbedding, ScenarioRun, ScenarioQuota models
- Streak-based quality scoring
- Daily quota management

Migration script included for converting existing useCases.
2026-01-18 09:31:31 +10:00
Ajax Davis
154f000505 feat(cli): add @tpmjs/cli package and browser auth page
- Create comprehensive CLI with oclif framework
- Add commands: auth, tool, agent, collection, mcp, publish
- Add doctor, playground, and update commands
- Add /cli/auth page for browser-based OAuth flow
- Publish to npm as @tpmjs/cli@0.1.2
2026-01-18 06:12:34 +10:00
Ajax Davis
aa438078f9 feat: add hidden /features page for development 2026-01-18 02:13:23 +10:00
Ajax Davis
028c87056a chore: temporarily disable FeaturesSection 2026-01-18 02:11:18 +10:00
Ajax Davis
5abc85dafc fix: replace non-existent icon names to fix production crash
Changed invalid icon names that were causing viewBox undefined error:
- shield → key
- zap → star
- users → user
- code → terminal
2026-01-18 02:06:17 +10:00
Ajax Davis
69cec40fe1 docs: add MCP double-dash naming convention explanation 2026-01-18 01:53:09 +10:00
Ajax Davis
21b2c46516 fix(hllm): update package configuration and exports 2026-01-18 01:52:36 +10:00
Ajax Davis
08cd131088 feat(web): add interactive animated features section to homepage
- Add FeaturesSection with animated counters, terminal demo, and flow diagram
- Add ToolConnectionViz canvas animation showing tools → TPMJS → agents flow
- Add interactive tool grid with hover effects
- Add feature cards with scroll-triggered reveal animations
- Add FEATURES.md documenting all platform capabilities
2026-01-18 01:52:02 +10:00
Ajax Davis
c677110bfe fix(ui): resolve table dark mode styling issues
- Update Table component to use bg-surface instead of hardcoded bg-white
- Fix TableRow hover and selected states to use design system tokens
- Update virtualized tables in agents, collections, and tool-search pages
2026-01-18 01:51:41 +10:00
Ajax Davis
257aa55282 fix(auth): use correct better-auth method for password reset
Change forgetPassword to requestPasswordReset per better-auth docs.
2026-01-17 11:33:49 +10:00
Ajax Davis
7e401c82eb chore: update lockfile for judge package 2026-01-17 11:21:58 +10:00
Ajax Davis
7f907660c8 fix(auth): use better-auth client for password reset
- Use authClient.forgetPassword() instead of raw fetch
- Use authClient.resetPassword() instead of raw fetch
- Fixes 404 error on /api/auth/forget-password
2026-01-17 11:17:47 +10:00
Ajax Davis
3cd2fc9674 fix(auth): implement password reset functionality
- Add sendResetPasswordEmail function to email.ts
- Configure sendResetPassword in better-auth config
- Create /reset-password page to handle password reset after email link click
2026-01-17 11:09:24 +10:00
Ajax Davis
1234b383e7 feat(judge): add AI conversation quality evaluation tool
- Evaluates conversations across 10 metrics:
  taskCompletion, accuracy, relevance, clarity, efficiency,
  userIntentAlignment, actionability, progress, errorHandling, completeness
- Returns weighted overall score (0-10)
- Provides verdict (pass/retry/fail) with reasons
- Detects conversation loops and stuck states
- Lists must-dos, suggestions, and next steps
- Designed for frequent use in agentic loops
2026-01-17 10:49:40 +10:00
Ajax Davis
aad8b58031 fix(hllm): use correct base URL hllm.dev instead of hllm.ai 2026-01-17 10:10:31 +10:00
Ajax Davis
6fbb104380 fix(mcp): use actual tool name from DB instead of parsed name
The tool name shortening logic was correctly finding the tool in the
database but then passing the reconstructed parsed.toolName (which may
have an incorrect 'Tool' suffix) to the executor instead of using the
actual tool name from the database record.

This caused 'tool not found' errors when executing tools via MCP SSE
even though the tools were listed correctly.
2026-01-17 09:21:32 +10:00
Ajax Davis
9ebb5ee02e fix(hllm): ensure tool descriptions meet 20 char minimum
- Updated deleteApiKey description from 'Delete an API key.' (18 chars)
  to 'Delete an existing API key from the account.' (44 chars)
- Bumped version to 0.1.1
2026-01-17 08:50:48 +10:00
Ajax Davis
0fa4374d9e feat(tools): add @tpmjs/tools-hllm package
Add HLLM API client tools for AI agents with 36 tools:
- Topology execution (executeTopology)
- Chat sessions (list, create, get, update, delete)
- Session messages (add, clear)
- Prompt library (CRUD + usage tracking)
- User profile and stats
- Environment variables
- File management
- Models listing
- Execution logs and agent metrics
- TPMJS tools (list, describe, execute)
- Prompt generation and improvement
- Data export/import
- Health check and public stats
- API keys management

Published as @tpmjs/tools-hllm@0.1.0
2026-01-17 08:35:27 +10:00
Ajax Davis
c46a02247a fix(agents): correct model id to 5.1-mini 2026-01-17 07:42:50 +10:00
Ajax Davis
ba451a6b4b feat(agents): add gpt-5.1-mini to OpenAI models 2026-01-17 07:24:23 +10:00
Ajax Davis
3cde10faf4 feat(tools): add utility.sleep tool with cute nap messages 2026-01-17 07:13:35 +10:00
github-actions[bot]
4973679cbf chore: sync 1 new tools from Vercel AI registry
Added 1 tools from Vercel AI SDK registry:
- Total tools in registry: 13
- Already synced: 12
- Newly added: 1
- Errors: 0

🤖 Automated by GitHub Actions
Run: https://github.com/tpmjs/tpmjs/actions/runs/21078181125
2026-01-16 19:24:41 +00:00
Ajax Davis
2f02f0f412 fix(agents): simplify copy dropdown with agent-specific options
- Remove MCP server options from agent copy dropdown
- Add: Agent UID, Chat URL (with random convo ID), cURL command
- Fix dropdown styling with proper sizing and monospace fonts
2026-01-17 05:18:21 +10:00