Skip to content

Latest commit

 

History

History
385 lines (334 loc) · 25.9 KB

File metadata and controls

385 lines (334 loc) · 25.9 KB

AI Toolkit — Session State

Last updated: 2026-03-29 Last session: Fix Undefined vec Variable and 3 Non-Crash Inaccuracies

Current Phase

Phase 2 — Integration, polish, remaining modules.

What Was Just Completed

Session 54: Fix Undefined vec Variable and 3 Non-Crash Inaccuracies

  1. README.md (3 fixes):
    • queryVector: vecqueryVector: [0.1, 0.2, 0.3] (vec was undefined — crash)
    • variables: ['text']inputVariables: ['text'] (PromptConfig uses inputVariables)
    • parse({ format: 'json', schema: ... })parse({ schema: ..., name: 'summary' }) (ParseConfig has schema and name, no format)
  2. mcp.mdx (4 fixes) + mcp-tools.mdx (3 fixes):
    • All tool handlers returned { content: [{ type: 'text', text: ... }] } but McpServerBuilder.defineTool() wraps handler return values automatically (line 192-199 of server-builder.ts). Fixed all handlers to return raw data.
    • Fixed handler type in API reference table: Promise<McpToolResponse>Promise<unknown>
    • Fixed readResource test assertion from config.content[0].type to config (readResource returns raw handler output)
  3. 720 tests passing, build clean, lint clean, 5/5 semantic checks

Commit: 8ed8d38 fix(docs): fix undefined vec variable and 3 non-crash inaccuracies

Session 53: Fix Last 2 Crashes in RAG Pipeline and Testing Docs

  1. rag-pipeline.mdx (1 fix):
    • store.search() returned raw vectorSearchRaw results ({ data, similarity }) instead of SearchResult[] shape ({ chunk: { content, metadata }, similarity }). Added .map() to transform results.
  2. testing.mdx (1 fix):
    • _tracker.lastArgs example showed ['test 2'] but source records [prompt, opts] — fixed to ['test 2', undefined].
  3. 720 tests passing, build clean, lint clean, 5/5 semantic checks

Commit: 505d331 fix(docs): fix last 2 crashes in rag-pipeline and testing docs

Session 52: Fix 7 Remaining Crashes in README and RAG Pipeline Guide

  1. README.md (5 fixes):
    • createLanguageSplitter('typescript', ...)'js' (SplitterLanguage type has 'js', not 'typescript')
    • createGraph edges missing __start__/__end__ — added required entry/exit edges
    • vectorSearch with string table/column → vectorSearchRaw (string-based API)
    • mockDatabase({ rows: [...] })mockDatabase([...]) (takes array directly, not object)
    • mockKnowledge({ searchResults: [{ content, score }] }){ chunk: { content, metadata }, similarity } (correct shape)
  2. rag-pipeline.mdx (2 fixes):
    • vectorSearch with string table/column → vectorSearchRaw (same as README fix)
    • query variable undeclared in Step 4 monitoring section — added declaration, replaced ragPipeline(query) with ragChain.invoke({ question: query })
  3. self-hosted.mdx: 0 fixes needed — all 3 createDatabase() calls already had await
  4. 720 tests passing, build clean, lint clean, 5/5 semantic checks

Commit: 4c9b9e8 fix(docs): fix 7 remaining crashes in README and rag-pipeline guide

Session 51: Fix 7 Remaining Crashes in README and Docs

  1. README.md (4 fixes):
    • createAgent({ instructions: ... })systemPrompt (matches AgentConfigSchema)
    • createGraph({ agents: { researcher, writer } })agents: [researcher, writer] (array, not object — matches GraphConfigSchema)
    • humanInTheLoop(step, { prompt, timeout }){ stepId, event, timeout } (matches HITLOptionsSchema)
    • aiStep(step, { name: ... }){ stepId: ... } (matches AIStepOptionsSchema)
  2. security.mdx (1 fix):
    • Inverted guardrail test logic — test: (text) => detectPII(text).length === 0 returned true when no PII (= false violation), flipped to > 0 (true = violation). Same for max-length: < 10000>= 10000.
  3. knowledge.mdx (1 fix):
    • Wrong search(knowledge, query, options?) signature → search(query, embedder, store, options?) (matches standalone search() in operations.ts). Added note about knowledge.search() client method.
  4. rag-pipeline.mdx (1 fix):
    • knowledge.embedder and knowledge.store don't exist on KnowledgeClient — replaced ingest('./handbook.pdf', knowledge.embedder, knowledge.store, ...) with knowledge.ingest('./handbook.pdf', ...).
  5. No propagation needed: agents.mdx and workflow.mdx already had correct signatures.
  6. 720 tests passing, build clean

Commit: 6767cd6 fix(docs): fix 7 remaining crashes in README and docs

Session 50: Fix 8 README Crashes + Doc Contradictions

  1. README.md (8 crash fixes):
    • rag() — fixed to show Chain return with .invoke(), added promptTemplate and model params
    • createDatabase() — added missing await
    • vectorSearch()queryqueryVector
    • vectorSearchRaw()queryqueryVector
    • getVectorColumn() — removed args, added await, returns factory function
    • migrate() — fixed from (db, options) to (options?)
    • serve() — fixed from (workflow, { framework }) to ({ client, functions })
    • createLogger() — fixed from ({ level }) to ('service', { level })
  2. README.md (3 peer dep fixes): Added openai, @anthropic-ai/sdk to ai module; @neondatabase/serverless to database module
  3. README.md (1 count fix): "8 subtypes" → "7 subtypes"
  4. LLMS.md (3 fixes): rag() return type, route() targets → destinations, ToolkitError contextstatusCode/retryable/cause
  5. errors.mdx: Removed nonexistent context property, added statusCode, retryable, cause
  6. auth.mdx: getTenantContext(request.headers)getTenantContext(request)
  7. data.mdx: ApiResult error type ErrorResponseErrorResponse['error']
  8. overview.mdx: Fixed ToolkitError class definition (same context → real props)
  9. Lint fixes: Removed unused durationMs in monitor catch block; template literal in penetration test
  10. 720 tests passing, build clean, lint clean (0 warnings), 5/5 semantic checks, 37 static pages

Commit: d07ea72 fix(docs): fix 8 README crashes, 3 LLMS.md errors, 4 doc contradictions, 2 lint warnings

Session 49: Fix 4 Runtime Crashes in Doc Examples

  1. knowledge.mdx: search(knowledge, ...)knowledge.search(...) (method on KnowledgeClient, not standalone)
  2. security.mdx: limiter.check(...)await limiter.check(...) (async method)
  3. llm-resources.mdx: Added missing import { createAI } for createAI() usage
  4. quick-start.mdx: Added missing import { createAI } and const ai = createAI() for monitor example
  5. installation.mdx: initToolkit({ name: 'test-app' })initToolkit() (takes optional env Record, not named params)
  6. 720 tests passing, build clean, 37 static pages

Commit: 1676440 fix(docs): fix 4 runtime crashes in code examples

Session 48: Fix Runtime-Blocking Doc Errors

  1. security-compliance.mdx (3 fixes):
    • Inverted guardrail test logic — true = violation, not true = pass. Fixed all 3 rules.
    • Added missing await on limiter.check() (async method)
    • Fixed createApiKeyGuard signature from { keys: [...] } + .validate()(expectedKey) + new Guard() + .canActivate()
  2. index.mdx (1 fix): initToolkit({ name, aiProvider, aiModel })initToolkit() (takes optional env Record, not named params)
  3. testing.mdx (3 fixes): mockAI({ response: '...' }){ text: '...' } (source accepts text/texts, not response)
  4. mcp.mdx (2 fixes) + mcp-tools.mdx (1 fix): Removed z.object() wrapper from schemas — source expects Record<string, ZodTypeAny>, not ZodObject
  5. agents.mdx (2 fixes): Removed nonexistent process prop from createAgent config and parameter table
  6. aria-hidden (6 SVGs): Added aria-hidden="true" to decorative SVGs in copy-page-dropdown.tsx (5) and page.tsx GitHubIcon (1)
  7. 720 tests passing, build clean, 37 static pages

Commit: 5502cf4 fix(docs): fix runtime-blocking errors in examples

Session 47: Final Preflight Audit + Last 2 Doc Fixes

  1. Full preflight audit — read all 30 MDX files against source code, checked infrastructure
  2. Fixed retriever shape in 2 pages:
    • chain.mdx line 123: bare async (query) =>{ retrieve: async (query) => ... } (matches chain.ts:148 validation)
    • rag-pipeline.mdx line 74: same fix — wrapped in { retrieve: ... } object
  3. Added aria-labels to Star/Issues/Fork links in page.tsx
  4. Audit results: 30/30 MDX pages clean, 0 console.log, 0 TODO/FIXME, all deps pinned exact, 37 static pages build with 0 warnings
  5. Pushed to origin/main — all sessions 44-47 now on remote
  6. 720 tests passing, build clean

Commit: f08ab71 fix(docs): fix retriever shape in chain and rag-pipeline examples, add aria-labels

Session 46: Fix Remaining 26 Doc Errors + Infrastructure Blocker

  1. Infrastructure fix: Removed duplicate local GITHUB_REPO const from page.tsx, now imports from @/lib/constants. Added aria-hidden="true" to StarIcon, IssueIcon, ForkIcon SVGs.
  2. Fixed 26 code errors across 13 pages:
    • quick-start.mdx (4): removed fake { name: '...' } from initToolkit() in all 3 framework tabs, fixed structured() call (removed non-existent prompt option field)
    • chain.mdx (4): removed non-existent config.prompt from createChain params, fixed ChatMessage type from tuple to { role, content } interface, fixed 'typescript''js' in createLanguageSplitter example, fixed SplitterLanguage list to actual 13 values
    • monitor.mdx (3): totalCosttotalEstimatedCostUsd, requestsoperations, data.totalCostdata.estimatedCostUsd, fixed CostReport type definition
    • database.mdx (3): fixed vectorSearch params from string to Drizzle types, fixed select from string[] to Record<string, unknown>, fixed getVectorColumn() signature (no args, returns factory), renamed VectorSearchOptions → VectorSearchTableOptions
    • storage.mdx (3): fixed validateFile param from File to { size, type, name? }, uploadDocument from File to Blob | Buffer | ReadableStream, added contentType to UploadResult
    • data.mdx (2 — REGRESSION fix): PaginatedResponse now has nested pagination object with totalPages, ErrorResponse now has nested error object with code, message, statusCode, retryable, fields?
    • mcp.mdx (1) + mcp-tools.mdx (2): new McpTestHarness(server)server.createTestHarness() in all 3 places
    • cache.mdx (1): remaining cache.del()cache.invalidate()
    • api.mdx (1): maxRetries default 3 → 2
    • config.mdx (1): replaced fake env var names with real initToolkit() usage showing has() feature detection
    • rag-pipeline.mdx (1): retriever return textcontent (matches ChainDocument shape)
  3. All 37 pages build, 720 tests passing, 5/5 semantic checks pass

Commit: 773eec4 fix(docs): fix 26 code errors across 13 pages, remove duplicate GITHUB_REPO const

Session 45: Fix All 52 Doc Code Errors

  1. Fixed 38 errors across 13 module pages — rewrote all code examples to match actual source exports:
    • security.mdx (13): PIIFinding.value→match, PIITypes reduced to 5, createRateLimiter(cache, config?), max/windowSeconds, resetAt, createAuditLogger(serviceName), audit.log(action, event?), removed getEvents(), checkOutput(response, rules) with {id,description,test} rules
    • cache.mdx (5): .del()→.invalidate(), createCache options type, RedisCacheAdapter constructor
    • api.mdx (4): removed .request(), use .get()/.post()/.put()/.delete(), maxRetries/timeout
    • auth.mdx (3): createApiKeyGuard(expectedKey), removed .validate(), requireApiKey()
    • monitor.mdx (3): removed span.event(), use span.update(), createLogger(service, options?)
    • testing.mdx (3): ai._tracker.callCount, mockDatabase usage
    • knowledge.mdx (2): chunk() return type, ingest() 4 params
    • chain.mdx (2): rag() returns Chain not Promise, createLanguageSplitter positional args
    • database.mdx (2): added aws-rds provider, vectorSearch options
    • health.mdx (2): checks is Record, createHealthCheck returns function
    • storage.mdx (2): maxSizeBytes→maxSizeMB
    • workflow.mdx (1): serve() options object
    • ai.mdx (1): structured() prompt first arg
    • config.mdx (1): initToolkit env Record param
  2. Fixed 14 errors across 3 guide pages — security-compliance (10), rag-pipeline (3), self-hosted (1 — hyperlinked Ollama/vLLM)
  3. Fixed 3 other page errors — llm-resources defineResource handler, quick-start chunk import, title props on index/installation code blocks
  4. Infrastructure improvements:
    • Added GITHUB_REPO constant to lib/constants.ts, imported in layout.config.tsx and page.tsx
    • Added try/catch error handling to llms.txt and llms-full.txt routes
    • Added aria-hidden="true" to decorative SVGs (nav icon, feature cards)
    • Added aria-label to copy dropdown trigger
    • Added width/height to badge images on landing page
  5. All 37 pages build, 720 tests passing, 5/5 semantic checks pass

Commit: 8bb83a6 fix(docs): fix 52 code errors across 20 pages, add infrastructure improvements

Session 44: Fix Docs Before Deployment

  1. Removed misleading badges — removed npm downloads, GitHub stars, build status badges from landing page. Kept npm version and MIT license only.
  2. Removed broken dropdown options — removed "Connect to Cursor" and "Connect to VS Code" from copy-page-dropdown (no MCP package exists). Kept Copy page, Open in ChatGPT, Open in Claude.
  3. Removed console.log from prompt.txt route — replaced with comment in code example
  4. Removed localhost references — replaced hardcoded localhost URLs in self-hosted.mdx with env vars (process.env.DATABASE_URL!, process.env.LANGFUSE_BASE_URL!, redis://your-redis-host:6379)
  5. No TODO/FIXME/HACK found — docs were already clean
  6. Fixed code examples across 5 MDX files:
    • index.mdx: generate(ai, ...)ai.generate(...) (standalone generate doesn't exist)
    • knowledge.mdx: maxChunkSize/overlapchunkSize/chunkOverlap, doc.textdoc.content, added await to async chunk(), fixed SearchResult properties (r.chunk.content/r.similarity)
    • rag-pipeline.mdx: same chunk param fixes, fixed SearchResult property access
    • mcp.mdx: addTool()defineTool(), addResource()defineResource()
    • mcp-tools.mdx: same addTool/addResourcedefineTool/defineResource
  7. All 37 pages build, 720 tests passing, semantic checks pass

Commit: bcf0bbb fix(docs): remove misleading badges, broken dropdown options, fix code examples

Session 43: Final Docs Polish — Links, Badges, Quickstarts

  1. Removed feedback widget — no analytics backend, console-only logging was useless
  2. Hyperlinked all library references across 12 MDX files (Vercel AI SDK, LangChain, LangGraph, LlamaIndex, Langfuse, Inngest, Drizzle ORM, MCP SDK, Groq, OpenRouter, Neon, Supabase)
  3. Landing page library pills are now clickable links to official sites
  4. Shields.io badges on landing page: npm version, downloads, GitHub stars, build status, MIT license
  5. Framework quickstart tabs — Next.js / Node.js / Express setup examples in quick-start.mdx
  6. "Built with AI Toolkit" badge section added to getting-started page
  7. Code block filenames — title props on Quick Start examples across all 12 module pages
  8. All 37 pages build, 720 tests passing, semantic checks pass

Commit: 424dc1b feat(docs): hyperlink libraries, add badges, framework tabs, code filenames

Session 42: Docs Upgrade — Copy Dropdown, Changelog, Breadcrumbs

  1. Mintlify-style CopyPageDropdown — split button with Radix Popover, 5 options:
    • Copy page as Markdown, Open in ChatGPT, Open in Claude
    • Connect to Cursor (copies MCP command), Connect to VS Code (copies MCP command)
    • Checkmark flash on each action, proper brand SVG icons
  2. GitHub links — replaced Edit on GitHub with Star / Report Issue / Contribute in page footer
  3. Changelog page — full CHANGELOG.md content rendered as MDX, added to sidebar navigation
  4. Breadcrumbs — enabled via Fumadocs DocsPage props (Docs > Section > Page)
  5. "On this page" heading — added above right sidebar TOC via tableOfContent.header
  6. Verified built-in DX — code copy buttons (default on), prev/next navigation (default on)
  7. Removed old copy-markdown.tsx — replaced by copy-page-dropdown.tsx
  8. All 37 pages build, 720 tests passing, semantic checks pass

Commit: 01a3792 feat(docs): add copy dropdown, GitHub links, changelog, breadcrumbs

Session 41: Docs UI Polish & LLM Resources

  1. InstallTabs component — yarn/npm/pnpm tabs using Fumadocs Tabs, defaults to yarn
  2. Replaced all npm install blocks across 12 MDX pages with <InstallTabs />
  3. Edit on GitHub link on every docs page (links to correct MDX file)
  4. Feedback widget — "Was this helpful?" thumbs up/down on every docs page
  5. Landing page redesign — hero with module count badge, feature grid (4 cards), social proof (8 libraries)
  6. /llms-full.txt route — complete API reference with all 17 modules, every function signature, every type
  7. /prompt.txt route — ready-to-use system prompt for AI assistants
  8. LLM Resources page — docs page explaining all LLM endpoints with usage examples
  9. Sidebar update — added LLM Resources section to navigation
  10. Fix: sitemap.ts — imports BASE_URL from lib/constants instead of hardcoding
  11. All 36 pages build, 720 tests passing, semantic checks pass

Commit: fddf2f7 feat(docs): improve UI with install tabs, feedback widget, LLM resources

Session 40: LLM-Friendly Docs Features

  1. /llms.txt route — serves LLMS.md as text/plain for LLM crawlers
  2. /sitemap.xml — auto-generated from all docs pages for SEO
  3. SEO metadata — Open Graph, Twitter cards, canonical URLs on every page
  4. JSON-LD structured data — TechArticle schema on every docs page
  5. Copy Markdown button — extracts page prose to clipboard as Markdown
  6. Open in Claude link — deep-links to claude.ai with page context
  7. All 33 pages build successfully, 720 tests passing

Commit: 25fbc27 feat(docs): add LLM-friendly features — llms.txt, sitemap, SEO, copy markdown

Session 39: Fumadocs Documentation Site

  1. Created packages/docs — Fumadocs-powered documentation site
  2. 28 MDX content pages covering all modules, guides, and architecture
  3. All 31 static pages build successfully (Next.js 16.2.1 + Fumadocs 16.7.7)
  4. Structure: Getting Started (3), Modules (17+1), Guides (4), Architecture (3), Home (1)
  5. Updated root workspaces and turbo.json to include docs
  6. 720 tests still passing, 5/5 semantic checks pass

Pages created:

  • Getting Started: index, installation, quick-start
  • Modules: ai, chain, agents, knowledge, database, monitor, workflow, mcp, security, auth, cache, storage, config, errors, health, testing, api, data
  • Guides: rag-pipeline, mcp-tools, self-hosted, security-compliance
  • Architecture: overview, adapter-pattern, adrs

Commit: 7c7de0f feat(docs): add Fumadocs documentation site with 28 pages

Session 38: Publish 0.3.2

  1. Updated CHANGELOG.md with 0.3.2 entry (refactor + test fix)
  2. Bumped version to 0.3.2 in package.json
  3. Published @jamaalbuilds/ai-toolkit@0.3.2 to npm
  4. Verified: npm view returns 0.3.2

Commit: 2c88817 docs(toolkit): bump to 0.3.2 with CHANGELOG

Session 37: Refactor Long Functions

  1. Extracted helpers from 10 functions across 9 files — every public function now under 50 lines
  2. All 720 tests passing with zero test changes
  3. Build, typecheck, lint, semantic checks all clean

Functions refactored:

Function File Before After Extracted Helpers
createGraph() agents/agents.ts 145 27 validateUniqueAgentNames, buildStateGraph, addAgentNodes, addGraphEdges, addConditionalEdge, createGraphInvoker
request() api/client.ts 131 32 buildHeaders, executeRequest, handleErrorResponse, wrapFetchError, isRetryable
createDatabase() database/database.ts 147 27 loadDriver, createQueryFn, createQueryOneFn, createWithTenantFn, createEndFn, wrapQueryError
defineJob() workflow/workflow.ts 128 37 buildInngestConfig, wrapJobContext
trace() monitor/monitor.ts 103 28 buildStoredTrace, scoreOnError, scoreOnSuccess
createSplitter() chain/splitter.ts 110 14 validateChunkConfig, splitTextWithFallback, splitDocsWithFallback
createLanguageSplitter() chain/splitter.ts 106 14 (shares helpers with createSplitter)
ingest() knowledge/operations.ts 87 22 validateIngestArgs, embedChunks, attachEmbeddings, storeChunks
vectorSearch() database/vector.ts 83 28 validateVectorOptions, buildSimilarityExpr, executeVectorQuery
aiStep() workflow/workflow.ts 71 16 generateWithFallback
migrate() database/migrate.ts 71 26 loadMigrationDeps

Commit: d0cb150 refactor(toolkit): extract helpers from 10 long functions — all under 50 lines

Session 36: Fix Last Auditor Note

  1. Added expect.assertions(2) to "rate limit error has retryable flag" test in stream-fallback.test.ts
  2. All 720 tests passing, build clean
  3. Commit: 406d14e fix(ai): add expect.assertions to rate limit test

What's Next (Exact Next Step)

Phase 2 continues:

  • Deploy docs to Vercel (link repo, set root to packages/docs)
  • Set NEXT_PUBLIC_SITE_URL env var in Vercel for correct OG URLs
  • MCP module update (add MCP client support)
  • Realtime module (Pusher / SSE wrapper)
  • API module rewrite (GraphQL Yoga + tRPC)
  • Database module enhancements (migrations CLI)

Blockers / Issues Found

  • None

Test Baseline

  • Total tests: 720 passing, 0 todo (33 test files)
  • Build: PASS (typecheck clean)
  • Lint: PASS (0 warnings)
  • Semantic checks: 5/5 passing
  • Fresh install: 20/20 subpath imports resolve
  • Post-publish: 20/20 imports verified on 0.3.2
  • Package size: 151.4 kB (269 files, dist-only)

Module Status

Module Status Tests Notes
agents ✅ Working (v5) 39 createAgent, createGraph, route — reducer fixed
workflow ✅ Working (v5) 38 createWorkflow, defineJob, humanInTheLoop, aiStep, serve
knowledge ✅ Working (v5) 68 parseDocument, chunk, ingest, search, createKnowledge
chain ✅ Working (v5) 84 prompt, parse, createChain, rag, createSplitter, createLanguageSplitter
monitor ✅ Working (v5) 61 createMonitor, trace, evaluate, getCostReport, getTraces, getTrace, onTrace, exportMetrics, createLogger
database ✅ Working (v5) 52 createDatabase, vectorSearch, migrate + SQL injection prevention
ai ✅ Working (v5) 37 createAI, generate, stream, structured, fallback, rate-limit + legacy createLLM
security ✅ Working (v5) 51 rate limiter, audit logger, PII, guardrails
config ✅ Working 15 All exports covered incl. toolkitConfigSchema
errors ✅ Working 17 All error classes covered
health ✅ Working 7 All scenarios covered
testing ✅ Working 76 mockCache, mockLLM, mockDb, mockDatabase + v5: mockAI, mockMonitor, mockKnowledge, mockChain, mockWorkflow, mockAgents
mcp ✅ Working 22 defineTool, defineResource, readResource, test harness, McpContent variants
auth ✅ Working 17 Timing-safe comparison, createApiKeyGuard
cache ✅ Working 20 MemoryCacheAdapter + RedisCacheAdapter
storage ✅ Working 20 validateFile, uploadDocument, deleteDocument, listDocuments
internal ✅ New builtInSplit shared utility
integration ✅ New 16 7 cross-module pipeline tests
security ✅ New 34 4 adversarial test suites
api ✅ Working 23 HTTP client with retry, error wrapping, rate limit detection
observability 🔄 Deprecated 0 Re-exports from monitor/
data ✅ Types only 0 No runtime code
verification ✅ Working 5 All semantic checks pass

Infrastructure Status

Item Status
biome.json ✅ Explicit rules configured
CI (ci.yml) ✅ typecheck, lint, test:coverage, semantic-checks, build, bundle size, license audit
CI (codeql.yml) ✅ Security scanning on PRs to main
CI (scheduled.yml) ✅ Nightly test + build
PR template ✅ Quality checklist
CONTRIBUTING.md ✅ Full contributor guide
SECURITY.md ✅ Vulnerability reporting + features
LICENSE ✅ MIT
Renovate ✅ Pin strategy, weekly schedule
Husky hooks ✅ pre-commit (lint-staged), pre-push (test + build)

Published Versions

Package Version Date
@jamaalbuilds/ai-toolkit 0.3.2 2026-03-28
@jamaalbuilds/ai-toolkit 0.3.1 2026-03-28
@jamaalbuilds/ai-toolkit 0.3.0 2026-03-28
@jamaalbuilds/ai-toolkit 0.2.0 2026-03-28
@jamaalbuilds/ai-toolkit 0.1.1 2026-03-28
@jamaalbuilds/ai-toolkit 0.1.0 2026-03-28

Spikes Completed

Library Version Decision Module
ai (Vercel AI SDK) 6.0.141 ✅ USE ai
@ai-sdk/groq 3.0.31 ✅ USE ai
@openrouter/ai-sdk-provider 2.3.3 ✅ USE ai
drizzle-orm 0.45.2 ✅ USE database
langfuse 3.38.6 ✅ USE monitor
inngest 4.1.0 ✅ USE (peer dep) workflow
@langchain/core 1.1.36 ✅ USE chain
@langchain/textsplitters 1.0.1 ✅ USE chain
@langchain/langgraph 1.2.6 ✅ USE (peer dep) agents
@llamaindex/liteparse 1.4.0 ✅ USE knowledge

ADRs

  • ADR-001 through ADR-008 (see docs/adrs/)

Key Decisions

  • @vitest/coverage-v8 must match vitest version exactly (3.2.4), not latest (4.1.2)
  • createMonitor() is now async — breaking change from sync in session 13
  • builtInSplit extracted to internal/split.ts — shared by chain and knowledge modules
  • Variable indirection pattern for optional peer dep imports (prevents TS resolution in CI)
  • CallTracker pattern for v5 mocks: shared tracker with callCount/lastArgs/allArgs
  • ESM-only package — no CJS require() support, use import syntax
  • Peer dep strategy: exact pins for wrapped libs, >= for user-installed libs