Commit graph

385 commits

Author SHA1 Message Date
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
Ajax Davis
64fde3fa96 fix: auto sign-in user after email verification 2026-01-01 22:33:09 +10:00
Ajax Davis
20dbafc952 feat: add sign in/dashboard links to header navigation
- Add Sign In button to desktop header (shows Dashboard when logged in)
- Add Sign In/Sign Up links to mobile menu
- Fix auth config to use BETTER_AUTH_SECRET and BETTER_AUTH_URL env vars

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

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-01 20:55:55 +10:00
Ajax Davis
745078f6cc feat: add Better Auth with email/password authentication
- Add User, Session, Account, Verification models to Prisma schema
- Create auth configuration with Prisma adapter
- Add Resend email integration for verification emails
- Create sign-in, sign-up, and verify-email pages
- Create user dashboard with profile display
- Add middleware for /dashboard route protection
- Add better-auth and resend dependencies

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

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-01 20:45:10 +10:00
Ajax Davis
ea548f8112 feat: add 55 new business tools and improve existing implementations
New tools added across multiple domains:
- Sales: lead-score, proposal-outline, objection-response
- Marketing: competitor-brief, campaign-brief, social-post-draft, email-subject-score, audience-persona, content-calendar-plan, pricing-page-copy
- HR: job-description-draft, interview-questions, performance-review-draft, onboarding-checklist, compensation-band, survey-analyze, org-chart-format, offer-letter-draft, exit-interview-summarize, policy-doc-format
- Legal: contract-clause-scan, nda-template-draft, tos-readability, risk-clause-highlight, invoice-terms-extract, gdpr-data-map, copyright-notice, trademark-check
- Finance: expense-categorize, invoice-data-extract, budget-variance, cash-flow-project, revenue-breakdown, ratio-analysis, tax-deduction-scan, reconciliation-match
- Customer Experience: feedback-themes, churn-risk-score, nps-analysis, ticket-categorize, response-template-suggest, health-score-calculate, renewal-forecast
- Education: lesson-plan-outline, quiz-generate, rubric-create, syllabus-format, progress-report-draft, learning-objective-write, curriculum-map

Also includes improvements to 68 existing tool implementations.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-01 19:23:32 +10:00
Ajax Davis
f6cf1aa7c5 fix: move tools-export.json to public/ for Vercel compatibility 2026-01-01 17:46:36 +10:00
Ajax Davis
4fccc796f5 feat: add /tool-ideas page with 10K AI-generated tools
- Add virtualized list using react-virtuoso for smooth scrolling
- Filter by category, verb, quality score, and search
- Expandable cards with parameters, returns, AI guidance
- Add redirect from /tools-ideas to /tool-ideas

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

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-01 17:13:46 +10:00
Ajax Davis
3cd4102caa fix(slo-draft): add min/max constraints to target schema
Helps AI SDK validate that target percentages are between 0-100 before calling the tool
2026-01-01 10:59:36 +10:00
Ajax Davis
faa183b1ec fix: improve tool search with camelCase tokenization and exact name matching
- Split camelCase/PascalCase into words (sitemapReadTool → sitemap read tool)
- Add +100 score boost for exact tool name matches
- Fixes issue where searching exact tool name returned 0 results
2026-01-01 10:51:51 +10:00
Ajax Davis
394d4d83b4 chore: trigger redeploy for @tpmjs/types@0.2.0 2026-01-01 10:27:10 +10:00
Ajax Davis
2390f76ed3 chore: version packages 2026-01-01 10:22:10 +10:00
Ajax Davis
40ba94b32b feat(types): add new tool categories to TPMJS_CATEGORIES
Add core categories used by 100+ official tools:
- research, web, data, documentation, engineering
- security, statistics, ops, agent, utilities
- html, compliance, doc, text

This fixes sync validation failures for tools using these categories.
2026-01-01 10:18:45 +10:00
Ajax Davis
e99bada5a4 feat: rewrite integrations page with case study and simplified diagram
- List HLLM as primary integration with tpmjs.com
- Add BlocksAI case study showing how 106 tools were built
- Display 9 philosophy principles and 11 tool categories
- Simplify ecosystem diagram to show flow: BlocksAI → Tools → HLLM
- Fix lint issues with variable declarations
2026-01-01 10:00:21 +10:00
Ajax Davis
fa5c48047e feat: rewrite integrations page to capture the novel AI infrastructure paradigm
- Frames HLLM, TPMJS, BlocksAI as three layers of an AI infrastructure stack
- HLLM = Orchestration layer (Kubernetes of AI)
- TPMJS = Distribution layer (npm of AI)
- BlocksAI = Semantic layer (TypeScript of AI)
- Articulates the paradigm shift from monolithic agents to composable systems
- Adds web stack analogy to explain separation of concerns
- Focuses on the 5 novel ideas that make this different
- Removes implementation details in favor of big picture vision
2026-01-01 02:42:43 +10:00
Ajax Davis
add1149eec feat: add integrations page with ecosystem diagram
- Add /integrations page documenting HLLM, TPMJS, and BlocksAI relationships
- Create EcosystemDiagram D3.js component showing project connections
- Document HLLM multi-agent integration with TPMJS tools
- Document BlocksAI 3-layer validation pipeline
- Add shared technologies section (AI SDK, D3, Prisma)
- Include integration APIs table and data flow documentation
- Add Integrations link to desktop and mobile navigation
- Fix accessibility issue in MobileMenu backdrop

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

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-01 02:17:05 +10:00
Ajax Davis
6b29f78415 chore: add 12 missing tools to blocks.yml validation
Add validation entries for tools that were published to npm but were
missing from blocks.yml:

Data category tools:
- data.base64Decode
- data.base64Encode
- data.dateParse
- data.hashText
- data.htmlToMarkdown
- data.jsonPathQuery
- data.markdownToHtml
- data.regexExtract
- data.schemaInfer
- data.templateRender
- data.urlParse

Security category tools:
- sec.htmlSanitize
2026-01-01 00:53:37 +10:00
Ajax Davis
1cb254f79f fix: bump url-parse to 0.2.0 for republish
0.1.0 was already published in a previous attempt.
2026-01-01 00:09:33 +10:00
Ajax Davis
3e0f487522 chore: version packages
Initial release of 100+ official TPMJS tools
2025-12-31 23:54:47 +10:00
Ajax Davis
0c9a964d6d fix: remove 7 missing block entries from blocks.yml
Removed blocks that don't have corresponding tool directories:
- web.readabilityExtract
- eng.apiDocsOutline
- ops.runbookFromIncident
- sec.sbomLite
- agent.routerRulesetBuild
- agent.recipeGeneratePMA
- agent.outputContractEnforcer
2025-12-31 23:35:47 +10:00
Ajax Davis
9a0fb5f2d5 feat: add 100+ official TPMJS tools
Implements a comprehensive suite of AI SDK v6 tools across multiple categories:

- Research (5): page-brief, compare-pages, source-credibility, claim-checklist, timeline-from-text
- Web (10): fetch-text, links-catalog, extract-meta, extract-json-ld, redirect-trace, sitemap-read, rss-read, table-extract, robots-policy, url-normalize
- Data (15): csv-parse, csv-stringify, json-repair, json-schema-validate, yaml-parse, yaml-stringify, text-chunk, normalize-whitespace, dedupe-by-key, pivot, rows-filter, rows-sort, rows-group-aggregate, rows-join, schema-infer
- Doc (12): toc-generate, glossary-build, faq-from-text, executive-brief, decision-record-adr, prd-outline, acceptance-criteria, style-rewrite
- Eng (12): diff-text-unified, env-var-docs-generate, dependency-audit-lite, conventional-commit-suggest, markdown-lint-basic, test-case-generate, stacktrace-parse, release-notes, changelog-entry, release-checklist
- Security (7): redact-secrets, secret-scan-text, url-risk-heuristic, csp-compose, hardening-checklist-web, access-control-matrix, data-classification-heuristic
- Stats (9): effect-size-suite, bootstrap-ci, permutation-test, multiple-testing-adjust, linear-regression-ols, logistic-regression, time-series-decompose-lite, anomaly-detect-mad
- Ops (7): slo-draft, runbook-draft, postmortem-draft, postmortem-action-extractor, error-log-triage, coverage-tracker, monitoring-gap-analysis
- Agent (15): prompt-to-workflow-skeleton, workflow-validate-io, workflow-explain, workflow-cost-estimate, tool-call-accuracy-score, eval-fixture-build, guardrail-policy-draft, workflow-auto-repair, tool-selection-plan, novelty-score-workflow, workflow-variant-generate, config-normalize, recipe-*
- Utility (8): base64-encode, base64-decode, hash-text, regex-extract, template-render, date-parse, json-path-query, url-parse
- HTML (3): html-sanitize, html-to-markdown, markdown-to-html

All tools follow AI SDK v6 pattern with tool() and jsonSchema<T>().

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-31 22:55:56 +10:00
Ajax Davis
b682bf0d7b chore: version packages 2025-12-31 21:07:20 +10:00
Ajax Davis
1ea9b83039 feat: fully implement 5 research tools with production-ready functionality
Research tools now have complete implementations:

- **page-brief**: Uses @mozilla/readability + jsdom for content extraction,
  sbd for sentence parsing, comprehensive error handling with timeout and
  network error detection

- **compare-pages**: Uses natural library TF-IDF for text similarity,
  detects agreements via high-similarity sentences, identifies conflicts
  using negation pattern analysis

- **source-credibility**: Uses tldts for domain parsing, cheerio for HTML
  analysis, calculates 6 credibility signals (HTTPS, domain reputation,
  author, date, citations, contact info), weighted scoring system

- **claim-checklist**: Uses sbd for sentence boundary detection, regex
  patterns for claim identification (statistics, quotes, historical,
  scientific, factual), priority levels and evidence suggestions

- **timeline-from-text**: Uses chrono-node for date parsing, sbd for
  context extraction, calculates confidence scores, identifies gaps >30 days

All tools follow AI SDK v6 pattern (tool() + jsonSchema()), include proper
TypeScript types, input validation, comprehensive error handling, and
Node.js 18+ fetch requirement verification.

Updated blocks.yml with comprehensive philosophy and domain rules for
quality validation.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-31 21:04:07 +10:00
Ajax Davis
6990906c6e chore: version packages 2025-12-31 20:31:57 +10:00