Changelog
All notable changes to this project are documented in this file.
[Unreleased]
Added
- Interactive playground — Vue 3 + Vite dev environment (
playground/) for testing library features in-browser. Run withpnpm playground:dev. Includes demos foruseKatanaFetch,useQuery,useWatch, anduseBuildUrlwith real API calls (PokeAPI, JSONPlaceholder). - Notion REST API adapter (
katanakit-js/adapters/notion) — typed client for the Notion API withuseInitNotionfor token registration. Covers Pages (get, create, update, archive), Blocks (get, get children, append, update, delete), Databases (get schema, query, create, update), Users (get, list), and Search. Includes auto-pagination helpers:useNotionListAllBlockChildrenanduseNotionListAllDatabasePagesthat handle cursor-based pagination automatically. All functions returnFetchResult<T>(safe result pattern). - WordPress REST API adapter (
katanakit-js/adapters/wordpress) — typed client for the WordPress REST API withuseInitWordPresssupporting Application Passwords, JWT, Basic Auth, and nonce-based authentication. Covers Posts, Pages, Media (with file upload viauseWpUploadMedia), Categories, Tags, Comments, Users, and Custom Post Types with full CRUD operations. Includes batch operations (useWpBatch), auto-pagination (useWpListAllPosts), search (useWpSearchAllPosts), and slug-based routing (useWpFindPostBySlug). All functions returnFetchResult<T>. - WordPress
_fieldssupport — newWpQueryParams._fieldsparameter to limit response fields, reducing payload by 60-80% for list views. Supports nested field selection:"id,title,link"or"id,title.rendered,acf.hero_image". - WordPress
_embedas string —WpQueryParams._embednow acceptsboolean | stringfor selective resource embedding:"_embed: author,wp:featuredmedia"embeds only author and featured media. TypedWpEmbeddedinterface for_embeddedresponses with properauthor[],wp:featuredmedia[],wp:term[][], andreplies[][]types. - WordPress ACF (Advanced Custom Fields) support —
WpAcfFieldstype for ACF field data on posts, pages, media, taxonomies, users, and options. ACF fields are accessible viapost.acf?.field_namewhen using_fields: "id,acf". - WordPress
media_detailscomplete types — addedfilesize,image_meta(EXIF data), and completesizesstructure withfile,mime_type, andfilesizeper size. - Vue and Nuxt framework examples — SFC examples for blog listings and dynamic
[slug]routes usinguseQuery(Vue) anduseAsyncData(Nuxt) with SSR support. - Framework examples — Astro and Next.js (React) demos for both adapters showing real-world usage: blog listings, dynamic
[slug]routes, database queries, block rendering, media uploads, and taxonomy management. Examples live inexamples/notion/andexamples/wordpress/.
Changed
- npm v12 security hardening — added
.npmrcwithallow-scripts=to block dependency lifecycle scripts (npm v12 default). Added.github/workflows/release.ymlwith OIDC trusted publishing for automated releases without long-lived NPM_TOKEN. Updated AGENTS.md with new release workflow and security notes. - Improved documentation — expanded
useBuildUrlsection with real-world use cases (navigation links, image URLs, third-party libraries, debugging, SSR), updatedCONTRIBUTING.mdto reflect current tooling (pnpm), added contribution invitation to README. - Kitt AI assistant documentation — added "When to use Kitt" and "When to use alternatives" comparison table with links to Vercel AI SDK, LangChain, CrewAI, and Botpress.
[3.1.0] - 2026-09-14
Added
- Generic
useKatanaWatch/useWatchcomposables — watcher inkatanakit-js/adapters/vue(re-exported fromkatanakit-js/adapters/nuxt) wrapping the native Vuewatchwithdeep: trueby default. Props (WatchSource,WatchCallback,WatchOptions,WatchStopHandle) are taken from the nativewatchand live insrc/types/; the callback accepts any internal function (sync/async, with or without args). Accepts a ref, reactive object, getter function or array of sources, stops automatically on unmount, and powers use cases like revalidating a form (safeParsewith Zod, Valibot, Standard Schema or custom validators) on every nested change. Schema-agnostic types (FieldErrors,ValidationSchema) also live insrc/types/.
[3.0.1] - 2026-09-13
Fixed
express-rate-limitwas imported by the assistant adapter but never declared — the published package crashed withERR_MODULE_NOT_FOUNDfor consumers ofkatanakit-js/adapters/assistant. It is now a runtime dependency (8.7.0, which ships its own types); the deprecated@types/express-rate-limitstub was removed.- Prisma client was initialized eagerly on import —
src/prisma/use-prisma.tsexported a module-levelprismainstance that threw on import whenDATABASE_URLwas missing, breaking any app that importedkatanakit-js/prismaand making the documentedusePrismaClient(url)override unusable. The eager export was removed (it was not re-exported from any barrel, so this is non-breaking). - Release cards never badged
major— the version regex inscripts/sync-docs-releases.mjswas double-escaped, sox.0.0releases rendered asMinor release. Fixed and regenerated.
Changed
- Migrated the repository from Yarn 4 to pnpm 12 —
packageManagerpinned topnpm@12.4.1,pnpm-lock.yamlreplacesyarn.lock, workspace declared inpnpm-workspace.yaml(replacing theworkspacesfield), Yarnresolutionsmoved to pnpmoverrides, CI usespnpm/action-setup+pnpm install --frozen-lockfile, Husky pre-commit runspnpm lint-staged, and all docs/config/scripts references updated. Release bumping now goes throughscripts/bump-version.mjs(pnpm'sversionrefuses a dirty working tree). .gitignorenow ignores all.env*variants (previously only the exact.env), with.env.examplestill tracked.
[3.0.0] - 2026-09-13
Breaking
- Prisma model
Userrenamed toAccount(@@map("accounts"));Post.authornow points toAccount. Consumers ofkatanakit-js/prismamust switchdb.public.Usertodb.public.Account. Table renameusers→accountsrequires a migration on live databases.
Added
- Access-control service — pure role/capability registry in
src/core/services/access.service.tswith hierarchy-based inheritance:owner>admin>editor>author>member>guest. ExposesuseCan,useHasRole,useCapabilitiesFor,useRegisterRole,useRolesanduseResetRoles. Types (AccessRole,AccessCapability,AccessRoleDefinition,AccessSubject,IAccessService) live insrc/types/. - Express access guard —
useRequireCapability(capability, resolveSubject)inkatanakit-js/adapters/expressbuilds aRequestHandlerthat returns 401 for anonymous requests and 403 when the capability is missing. Plugs into the existingguardseam of the assistant router; unwired by default.
Changed
- Docs releases automated —
scripts/sync-docs-releases.mjsgenerates the homepage release cards, the docs changelog and the navbar Releases dropdown from git tags + Conventional Commits.yarn docs:buildsyncs first; CI runsyarn docs:checkand fails on drift. The navbar now lists the latest 8 release tags with direct links to GitHub. - Merge-into-dev-first workflow — feature branches must be merged into
dev(git checkout dev && git merge <branch>) before any PR; PRs tomaincome only fromdev. Documented inAGENTS.md.
[2.15.0] - 2026-09-13
Added
- QueryClient —
QueryClient+QueryCachebuilt on the reactive kernel. Features: cache with GC, query keys, stale-while-revalidate, retry with exponential backoff, deduplication, invalidation, refetch-on-window-focus, andprefetchQuery. Integrates with the existing API manager (useFetch,useGetApi) and Safe Results pattern. - Vue
useQuery/useMutationcomposables — reactive composables inkatanakit-js/adapters/vuethat wrap the QueryClient with Vue 3 reactivity (data,error,isLoading,status,refetch,mutate). - Husky + lint-staged pre-commit hook — runs
eslint --fixon stagedsrc/**/*.tsfiles before every commit (installed viayarn install). Prevents lint failures from reaching CI. AGENTS.md— compact instruction file for AI agents (commands, architecture, git/CI workflow, Prisma skills).
Added (Tests)
- 13 new tests for QueryClient (
tests/query.service.test.ts) — 127 tests total.
Changed
- Replaced Biome with ESLint + Prettier — migrated linting and formatting from Biome 2.5.12 (Rust, 38ms) to ESLint 10 + Prettier 3.9 (JS, ~4.3s). Same rules enforced: tabs, double quotes, semicolons, trailing commas, import sorting (
eslint-plugin-simple-import-sort), recommended lint rules. TypeScript 7.0 has no compiler API; aliasedtypescriptto@typescript/typescript6@6.0.2for type-aware linting.tsc6replacestscfor type checking. - CI matrix
fail-fast: false— the Node 22/24 jobs now run to completion even if one version fails, so a failure on one version no longer cancels the other.
[2.14.2] - 2026-09-13
Added
- Katana UI documentation — new docs section describing the planned framework-agnostic UI kit: vision, layered architecture, full inventory (dashboards, e-commerce, apps, auth, blocks, layouts, interactions, charts and themes), LLM files strategy and delivery roadmap.
- Navbar theme switch — the docs site replaces the default color mode button with a checkbox switch (swizzled
ColorModeToggle) with keyboard focus, reduced-motion support and pre-hydration styling.
Changed
- Docs sidebar includes a UI Kit category, and the toolkit roadmap links to it.
[2.14.1] - 2026-09-10
Changed
- Pinned all dependency versions to exact (removed
^/~ranges) for deterministic installs and supply chain safety. - Added
resolutionsfor transitive floating deps:pathe@2.0.3,jsbi@4.3.2.
Removed
- Removed unused
@types/bundev dependency.
Added
- Added
socket.ymlfor Socket.dev supply chain security configuration.
[2.14.0] - 2026-09-10
Added
- Kitt AI agent system — OpenAI-compatible provider with tool-calling loop, session management, and conversation store. Built on a generic
AgentServicethat handles system prompts, tool registration, and iterative LLM interaction until task completion. - REST assistant adapter (
katanakit-js/adapters/assistant) —POST /chatfor sending messages,GET /sessionsfor listing conversations,DELETE /sessions/:idfor cleanup. Includes auth guard, per-session context, and conversation persistence. - Telegram adapter (
katanakit-js/adapters/telegram) — long-polling bot viagetUpdates,sendMessagereply with Markdown formatting, BotFather integration guide. Configurable polling interval and error handling. - WhatsApp adapter (
katanakit-js/adapters/whatsapp) — Meta Cloud API webhook receiver, HMAC signature verification (X-Hub-Signature-256), rate limiting (60 req/min), and async message processing withmessages.update/messages.receivedevent types. - Prisma conversation store —
Conversation+Messagemodels inprisma/schema.prismawith session tracking, timestamps, and message history. Newassistant.store.tsservice for create/list/get/delete operations. - GitHub Actions CI —
.github/workflows/ci.ymlruns lint, typecheck, build, and 114 tests on Node 22 and 24. - Rate limiting —
express-rate-limiton assistant routes (20 req/min) and WhatsApp webhook (60 req/min) with standard rate-limit headers. examples/assistant/— full demo with knowledge base, system prompt, and session management.examples/agent/— agent demo showing tool-calling loop with multiple registered tools.- New test suites:
agent.service.test.ts,assistant.service.test.ts,telegram.service.test.ts,whatsapp.service.test.ts,express.server.test.ts— 114 tests total.
Changed
- Express server restructured — idempotent
create()/finalize()pattern prevents double-initialization;rawBodycapture viaverifycallback for signature verification; route ordering fix so static paths match before parameterized routes. - Type definitions expanded — new agent, assistant, and adapter types in
src/types/index.tscoveringAgentConfig,ToolDefinition,SessionMessage,AssistantConfig,TelegramConfig,WhatsAppConfig, and webhook event types. - Prisma schema updated — new
ConversationandMessagemodels; schema types regenerated.
Fixed
- Timing-safe HMAC comparison — WhatsApp signature verification uses
crypto.timingSafeEqualinstead of string===to prevent timing attacks. - HTTPS enforcement — WhatsApp webhook rejects non-HTTPS requests in production.
- Path confinement — file operations in storage service restricted to project root to prevent directory traversal.
- Per-tool error capture — agent tool failures are captured individually without crashing the entire tool-calling loop.
- Build output directory —
outDirintsconfig.jsoncorrected;yarn cleanensures clean builds before each release.
[2.0.0] - 2026-09-03
Developed and published as katanakit-dev.
Added
- Reorganized the project with hexagonal architecture into
types/,core/services/,infrastructure/,adapters/,config/, andprisma/. - Exposed the public API through barrel files (
src/index.tsand per-layerindex.ts). - Added Vitest unit tests for the HTTP client, logger, storage, DOM, and reactive services.
- Added English documentation (
README.md,CONTRIBUTING.md,docs/,SECURITY.md).
Fixed
- Fixed TypeScript compile errors: broken imports, broken singleton guards (
TimingServiceandViewportService), theFIND_ENTRYscope bug inAstroService, and ExpressRequest/Responsetyping. - Removed all side effects on import (top-level
fetchto dummyjson.com,console.logcalls, storage writes and timers). - Fixed the Express server:
listennow uses the configured port/host, the user router is mounted, and handler(req, res)argument order is correct. - Fixed the logger call sites (level is now the first argument of
useLog).
Removed
- Removed duplicate type definitions (unified in
src/types/). - Dead code, empty files and the broken signals draft.
- Moved demos to
examples/and dropped the obsoletewiki/documentation.
[1.x] - Earlier
Initial release series focusing on core KatanaKit functionality and framework adapters.
[0.1.0] - Initial release
First public release of KatanaKit.
License
MIT