Commit graph

348 commits

Author SHA1 Message Date
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
Ajax Davis
072489fd50 fix: use 'tpmjs' keyword instead of deprecated 'tpmjs-tool'
- Add 'research' to valid TPMJS_CATEGORIES
- Update all tutorial slides to reference 'tpmjs' keyword
- Deprecate 'tpmjs-tool' keyword for package discovery
2025-12-31 20:28:37 +10:00
Ajax Davis
81405982ce chore: version packages 2025-12-31 19:52:33 +10:00
Ajax Davis
aaf3cdd424 feat: add 5 research tools and blocks framework setup
- Add @tpmjs/tools-page-brief for URL content extraction
- Add @tpmjs/tools-compare-pages for cross-source validation
- Add @tpmjs/tools-source-credibility for credibility scoring
- Add @tpmjs/tools-claim-checklist for factual claim extraction
- Add @tpmjs/tools-timeline-from-text for timeline generation
- Move createBlogPost to packages/tools/official/
- Add blocks.yml for Blocks framework validation
- Update pnpm-workspace.yaml to include official tools
2025-12-31 19:47:02 +10:00
Ajax Davis
7edd4f43b2 refactor: redesign spec page with clean toggle between specification and example views
- Convert to client component with useState for view toggling
- Add "Specification" view with clean schema reference and sidebar
- Add "Full Example" view with complete package.json and tool code examples
- Remove explanatory content (moved elsewhere)
- Create layout.tsx for metadata since page is client component
- Reduce page complexity from 839 to 406 lines
2025-12-31 13:15:49 +10:00
Ajax Davis
4043df2f91 docs: add feature roadmap for users, collections, and ratings 2025-12-31 12:54:46 +10:00
Ajax Davis
e9a7a689a1 perf: reduce Neon compute usage with cron + caching optimizations
- Reduce cron frequency: changes 2min→4hr, keyword 15min→6hr, metrics hourly→daily
- Add Prisma directUrl for connection pooling support
- Add Vercel KV caching to /api/tools endpoint (graceful degradation if not configured)
- Add X-Cache header to indicate cache hit/miss
- Add NEON_COMPUTE_OPTIMIZATION.md with full strategy guide

These changes should reduce Neon CU usage from 100+ to ~20-30 CU-hrs/month.
2025-12-31 12:14:00 +10:00
Ajax Davis
24bc48bcef fix: allow scrolling on tutorials index page 2025-12-31 01:35:40 +10:00
Ajax Davis
10116cd460 fix: escape JSX entities in tutorial slides 2025-12-31 01:11:08 +10:00
Ajax Davis
5d9e256660 feat: add 3 new tutorials (first-tool, agent-example, playground)
- Build Your First Tool: Step-by-step guide from npm init to published
- Real-World Agent: Complete working example with meta-tools
- Interactive Playground: How to test tools in browser

Each tutorial has 5-6 slides with code examples and animations.
Updated main page to show all 6 tutorials in grid.
2025-12-31 01:02:21 +10:00
Ajax Davis
6ef33735a7 feat: add general overview tutorial
- Add 6-slide overview tutorial covering TPMJS concepts
- Slides: Welcome, What is TPMJS, Ecosystem, Architecture, Use Cases, Explore
- Add OverviewSlideshow component and page route at /overview
- Update main tutorial page with overview as first card
2025-12-30 13:53:54 +10:00
Ajax Davis
d132da9c20 fix: use z.toJSONSchema for Zod v4 schema conversion
Import zod@4 directly and use z.toJSONSchema method with fallback
to z.default.toJSONSchema for compatibility.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-29 23:29:06 +10:00
Ajax Davis
bfdb4064b1 fix: use dynamic import for Zod v4 JSON schema conversion
Static import from 'zod@4/json-schema' was failing and crashing executor.
Use dynamic import inside the schema extraction logic instead.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-29 23:25:40 +10:00
Ajax Davis
1fd5407944 fix: add Zod v4 schema extraction support in Railway executor
- Import Zod v4's toJSONSchema from zod@4/json-schema
- Add Strategy 3: Detect Zod v4 schemas via ._zod property
- Convert Zod v4 schemas using native toJSONSchema function
- Update error message to mention both Zod v4 and v3 support

Fixes schema extraction for @tpmjs/emoji-magic and other Zod v4 tools

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-29 23:21:05 +10:00
Ajax Davis
957cfd5828 fix: URL-decode slug to handle scoped packages with encoded @ symbol
The @ in scoped package names was being URL-encoded to %40, causing
parseSlug to treat them as unscoped packages. Now we decode the slug
components first.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-29 22:16:15 +10:00
Ajax Davis
a03e7a560b fix: format CSS 2025-12-29 22:03:57 +10:00
Ajax Davis
5200f271f9 fix: remove unused error variable in cache.ts
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-29 21:56:48 +10:00
Ajax Davis
7e6c0194c6 fix: use two-step query to fix scoped package 404s on tool detail page
The relation filter `package: { npmPackageName }` was not working correctly.
Now first find the package, then find the tool by packageId.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-29 21:50:48 +10:00
Ajax Davis
364f507518 fix: add force-dynamic to tool detail page to fix scoped package 404s
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-29 21:42:26 +10:00
Ajax Davis
f24eebc196 feat: add npm-like features to tool detail page and update keyword to tpmjs
- Add download trend sparkline chart showing 30-day download history
- Add bundle size component with minified/gzipped sizes via bundlephobia proxy
- Add more install commands: yarn, bun, deno (in addition to npm, pnpm)
- Change discovery keyword from "tpmjs-tool" to "tpmjs" across entire codebase
- Update sync endpoints to use new keyword
- Update all documentation and package.json files

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-29 21:30:42 +10:00
Ajax Davis
6c28f01633 feat: add two-tutorial structure with landing page
- Create landing page at / with cards linking to both tutorials
- Add /agents route for agent developers (search & execute)
- Add /authors route for package authors (publish tools)
- Create 9 author slides covering the publishing workflow
- Rename Slideshow.tsx to AgentSlideshow.tsx
- Add back navigation buttons to both slideshows
- Fix array key lint errors using unique slide IDs

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-29 13:36:57 +10:00
Ajax Davis
1e779007be refactor: rewrite tutorial slides with coherent AI SDK narrative
Complete rewrite of all 9 slides to create a coherent story for engineers:

1. Welcome - TPMJS: A Tool Registry for the AI SDK
2. Problem - AI SDK Tools Are Static (compiled in, bundle grows)
3. Solution - Two imports enable dynamic tools at runtime
4. HowItWorks - The two meta-tools (search + execute)
5. Discovery - searchTpmjsToolsTool schema and response
6. Integration - registryExecuteTool execution flow
7. Quality - What gets indexed (schemas, scores, health)
8. ToolDetail - Full agent conversation flow example
9. GetStarted - How to publish tools to the registry

Also adds eslint.config.mjs to ignore .next build directory.
2025-12-29 12:03:56 +10:00
Ajax Davis
bda49615fb content: update tutorial slides with grounded TPMJS content
- WelcomeSlide: "The missing layer between npm and AI agents"
- ProblemSlide: "npm has 2 million packages. Which ones work?"
- SolutionSlide: Registry that extracts schemas, scores quality, checks health
- HowItWorksSlide: Automated pipeline flow
- DiscoverySlide: Schema extraction from sandbox
- IntegrationSlide: Quality scoring algorithm
- QualitySlide: Health checks (import + execution)
- ToolDetailSlide: What we store (inputSchema, returnSchema, envKeys, tier)
- GetStartedSlide: CTAs with accurate descriptions

All content now grounded in actual codebase functionality.
Includes TPMJS_TALK.md as source of truth document.
2025-12-29 11:40:39 +10:00
Ajax Davis
20f5fcc4b0 content: update tutorial slides with pitch deck messaging
- WelcomeSlide: 'Tool Discovery for AI Agents'
- ProblemSlide: 'Tool Sprawl' with integration tax framing
- SolutionSlide: Registry that normalizes + enriches tool metadata
- HowItWorksSlide: What TPMJS stores (description, schema, env, signals)
- DiscoverySlide: Two users - engineers browsing & agents selecting
- IntegrationSlide: Immediate benefits (less spelunking, schemas, vocab)
- QualitySlide: The Multipliers (signals, health, playground, remote exec)
- ToolDetailSlide: Tool-shaped results, remove guesswork
- GetStartedSlide: Engineering-friendly CTAs
2025-12-29 01:49:47 +10:00
Ajax Davis
4f191d64c0 chore: add Vercel config for tutorial deployment 2025-12-29 00:34:00 +10:00
Ajax Davis
06029fbc60 feat: add interactive tutorial slideshow app
Create apps/tutorial - a beautiful, animated Next.js slideshow that explains
TPMJS concepts from basic to advanced:

Slides:
- Welcome: Gradient TPMJS title with animated floating orbs
- Problem: Chaotic floating icons showing fragmented AI tools
- Solution: Icons organizing into a neat grid
- How It Works: Flow diagram (npm → Discovery → Registry → AI Agent)
- Discovery: Animated counters showing real-time sync stats
- Integration: Typewriter code animation showing SDK usage
- Quality Scoring: Animated gauge and progress bars
- Tool Detail: Mock tool card with all metadata
- Get Started: CTA buttons linking to tpmjs.com

Features:
- Framer Motion animations with spring physics
- Keyboard navigation (arrows, space, enter)
- Mouse navigation (arrows, progress dots)
- Touch-friendly swipe support
- Dark theme with cyan/purple gradient accents
- Responsive design
2025-12-28 23:41:15 +10:00
Ajax Davis
fa9b2c626d feat: add OG images for all 78 tool pages
- Generate unique AI images for each tool using gpt-image-1-mini
- Update script to fetch tools from production API
- Images served from public/og/tool/{package-name}-{tool-name}.png

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-28 21:35:27 +10:00
Ajax Davis
87b200a735 feat: add build-time OG image generation with OpenAI
- Create generate-og-images.ts script for build-time image generation
- Generate 13 static page OG images using gpt-image-1-mini
- Update API route to serve pre-generated images from public/og/
- Add 30-day cache headers and fallback to default image
- Images regenerate if older than 30 days

Run with: pnpm --filter=@tpmjs/web generate-og

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-28 20:45:02 +10:00
Ajax Davis
6cb172f87b feat: upgrade to gpt-image-1 with comprehensive premium prompts
- Switch from gpt-image-1-mini to gpt-image-1 for higher quality
- Upgrade quality setting to 'high'
- Completely rewrite prompts with detailed visual concepts
- Add glassmorphism, neon accents, and premium SaaS aesthetic
- Include specific typography and composition instructions
- Add page-specific visual elements and iconography
2025-12-28 19:55:01 +10:00
Ajax Davis
0f7f17ba94 feat: improve OG images with landscape dimensions and text content
- Use 1536x1024 landscape format for proper OG aspect ratio
- Include page titles, taglines, and descriptions in generated images
- Add typography guidelines for consistent text rendering
- Upgrade quality from low to medium for better visuals
2025-12-28 19:34:08 +10:00
Ajax Davis
d5efd970c2 fix: use base64 response format for gpt-image-1-mini 2025-12-28 19:16:18 +10:00
Ajax Davis
16f8f79fbf fix: use gpt-image-1-mini model for OG image generation 2025-12-28 19:13:23 +10:00
Ajax Davis
6c5e1a84c5 chore: trigger redeploy for new env vars 2025-12-28 19:01:53 +10:00
Ajax Davis
75a386359c feat: add AI-generated OG images with OpenAI and Vercel Blob caching
- Add /api/og/[...path] endpoint for dynamic OG image generation
- Use OpenAI gpt-image-1 for image generation with page-specific prompts
- Cache images in Vercel Blob storage with 30-day TTL
- Extract page content for contextual prompts (static pages, tool details)
- Update all page metadata to use dynamic OG image URLs
- Refactor tool detail page to server component for generateMetadata support
- Fall back to static /public/og-image.png on generation errors
2025-12-28 18:21:11 +10:00
Ajax Davis
7a23181339 fix: wrap ORDER BY CASE with MIN() for PostgreSQL GROUP BY compatibility 2025-12-28 17:26:55 +10:00
Ajax Davis
cd895c10cb feat: add historical stats tracking with daily snapshots
- Add StatsSnapshot model to store daily registry metrics
- Create /api/sync/stats-snapshot endpoint for daily cron captures
- Add GET endpoint to retrieve historical snapshots (up to 365 days)
- Update stats page with Historical Trends section showing:
  - Tools & packages growth over time
  - Health status trends
  - Daily executions history
  - NPM downloads trends
- Add cron job running at midnight UTC daily
- Fix PostgreSQL GROUP BY issue in quality distribution query
2025-12-28 17:19:46 +10:00
Ajax Davis
c7c375138a fix: use explicit CASE in GROUP BY for PostgreSQL compatibility 2025-12-28 17:14:03 +10:00
Ajax Davis
b4f6eb46b8 feat: add comprehensive stats dashboard with D3 charts
- Add /stats page with animated D3 visualizations
- Create reusable chart components: AnimatedCounter, DonutChart, BarChart, AreaChart
- Expand stats API endpoints: /api/stats, /api/stats/health, /api/stats/executions, /api/stats/sync, /api/stats/tools
- Add Stats link to desktop and mobile navigation
- Add AI SDK v6 integration tests with vitest

Dashboard displays:
- Registry overview metrics with count-up animations
- Health distribution donut charts (import/execution)
- Quality score distribution
- Package tier breakdown
- Execution trends area chart with success/error series
- Token usage statistics
- Top categories bar chart
- Recent sync operations status
2025-12-28 17:08:19 +10:00