Additive minor release on top of 3.1.0 (2026-06-24). No breaking changes; existing 3.1.0 APIs continue to work unchanged. The bundled libchdb engine is unchanged (chdb-core v26.5.1-rc.1), but the native N-API addon gained new exports, so the @chdb/lib-* subpackages are republished as 26.5.3.
What's new
Layer 3 fluent query builder SDK (#55, #59)
First-class typed fluent query API — Kysely-/Drizzle-style:
const db = connect({ session })
const rows = await db
.from('users')
.where(r => r.age.gt(18))
.select('id', 'name')
.execute()src/layer3/{builder,execute,compile,dialect,introspection,connect,types,codegen}/chdb-gen-typesCLI — generates row types from a schema (Drizzle / Prisma / raw SQL sources).stream()terminal with server-side parameter binding- Arrow C Data Interface support: register JS columnar data as
arrowstream()tables - 12 new test files under
test/v3/layer3/
Cross-language agent-tool contract 0.2.0 + 2 framework adapters (#61, #66, #70)
chdb/ai-sdk— Vercel AI SDK tools (generateText/streamText)chdb/mastra— Mastra tools +ChDBVector(HNSW RAG store)- Both are thin wrappers over
ChDBTool.call()fromintegrations/agents/, which implements the cross-language contract shared withchdb-io/chdb(chdb/agents/CONTRACT.md, chdb-io/chdb#597) - 7 canonical tools:
run_select_query/list_databases/list_tables/describe_table/get_sample_data/list_functions/attach_file - 5 pillars enforced: engine-level readonly=2 (P1), value-vs-identifier separation (P2), truncation flag (P3), error envelope for model self-correction (P4), resource/source controls (P5)
- Contract 0.2.0 (#70):
descriptors.jsonas the single source of truth for the model-visible tool surface,toolSpecs(dialect)for anthropic/openai/mcp schema dialects,capabilities()for feature detection, a hardened SQL allowlist scanner (masking, quoted-name normalization,system.table_functionssnapshot), and external-session readonly probing — a mismatched session now fails construction withCONFIG_MISMATCHinstead of being silently reconfigured
chdb/hypequery DatabaseAdapter (#63, #65)
Lets @hypequery/clickhouse query builder run on embedded chDB instead of a remote ClickHouse server. Uses hypequery's own substituteParameters (imported, not copied) so rendered SQL stays byte-identical to hypequery's built-in HTTP adapter.
chdb/connection stabilization for @clickhouse/client 1.23.0
peerDependency: "@clickhouse/client: >=1.23.0"(optional) — old client triggers a clear npm warning instead of a runtime TS error- Parity runner switched to track
ClickHouse/clickhouse-jsrelease tagclient-1.23.0(per the sync-policy table; #52 shipped the initial hook) - Runner auto-detects upstream Vitest layout (pre-/post-clickhouse-js#931)
- Runner re-synced when clickhouse-js reorganized into a monorepo (#62)
AI-discovery docs (#60)
- Top-level
AGENTS.md+llms-full.txt - Per-subpath
AGENTS.md(src/layer3/,src/connection/, etc.) - All packaged in
filesso agents crawling the installed tarball find them
Fixes / infrastructure
- Bind
null/undefinedquery params as SQL\N(contributor @dfrankland, #68) — matches@clickhouse/clientbehavior close()-mid-flight engine abort + ResultSet teardown race (#56)ChDBVectorHNSW granularity / filter binding / dimension guard (#61)- Release workflow: publish →
unverifieddist-tag → clean-install verify matrix → promote tolatest(#64). A broken release now never reacheslatestusers. - Release pipeline tests the just-built addon instead of the previously published
@chdb/lib-*subpackage, and the subpackages are republished as 26.5.3 so the new native exports actually ship (@chibugai, #72, #73) - CI: cache deps + harden npm registry fetch against transient resets
User-facing installation matrix
npm install chdb # base + Layer 3 SDK
npm install chdb @clickhouse/client # + chdb/connection
npm install chdb @hypequery/clickhouse # + chdb/hypequery
npm install chdb ai zod # + chdb/ai-sdk
npm install chdb @mastra/core zod # + chdb/mastra
Native libchdb: chdb-core v26.5.1-rc.1 (packaged as @chdb/lib-* 26.5.3; the addon adds the Arrow C Data Interface and streaming parameter-binding exports).