All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Stateless HTTP sync — new
POST /syncendpoint enables CRDT synchronization without WebSocket connections, designed for serverless environments HttpSyncProvider— client-side connection provider that translates sync operations into HTTP POST requests with configurable polling interval (pollIntervalMs)AutoConnectionProvider— automatically selects WebSocket or HTTP transport with transparent fallback after configurable retry attempts (maxWsAttempts)HttpSyncHandler— lightweight, stateless server-side handler for processing sync requests in serverless functions (Vercel Edge, AWS Lambda, Cloudflare Workers)- HTTP sync Zod schemas —
HttpSyncRequestSchemaandHttpSyncResponseSchemafor request/response validation with msgpackr serialization - Delta computation via HLC — efficient timestamp-based filtering using
HLC.compare()instead of Merkle tree round-trips
VirtualClock— injectable time source for deterministic test executionclockSourceinjection — HLC, LWWMap, and ORMap now accept pluggable clock sources- DST infrastructure —
SeededRNG,VirtualNetwork,InvariantChecker,ScenarioRunnerexported from core package
- Point lookup optimization —
QueryOptimizerdetects equality filters on indexed fields and generatesPointLookupStep/MultiPointLookupStepexecution plans - Network-aware cost model — distributed query cost estimation accounting for network latency, partition count, and data transfer
- Index hints —
QueryOptions.indexHintsallows explicit index selection (force,prefer,ignore) for query planning
- server: Correct
HttpSyncErrorfield types and add optionality markers - server: Preserve TLS status message in HTTP sync handler
- client: Align
requestTimeoutMsdefault with spec (30s) - core: Consolidate
ClockSourceinterface to single definition
- Serverless deployment guide with Vercel Edge, AWS Lambda, and Cloudflare Workers examples
HttpSyncProviderandAutoConnectionProviderAPI referencePOST /syncendpoint reference with request/response schemas- HTTP Sync section in transport decision guide
- "TopGun Goes Serverless" blog post
- "Merkle Trees & Delta Sync" blog post
- Minor fixes and stability improvements
See MIGRATION.md for upgrade instructions.
- client: Remove deprecated
ClusterClient.sendMessage()- usesend(data, key)instead - core: Remove legacy constructor from
QueryOptimizer- use options object - core: Remove legacy array format from
CRDTDebugger.importHistory()- use v1.0 format
- CRDTDebugger - Full CRDT operation recording, replay, conflict detection, and export (JSON/CSV/NDJSON)
- SearchDebugger - BM25 TF-IDF breakdown, RRF rank contributions, timing analysis
- PrometheusExporter - Comprehensive metrics: connections, operations, CRDT merges, sync, cluster, storage, queries
- Grafana Dashboard - Pre-built dashboard JSON for TopGun monitoring
- SetupWizard - 6-step guided setup for new deployments
- DataExplorer - Browse and edit map data with JSON editor
- QueryPlayground - Monaco editor with Cmd+Enter execution
- ClusterTopology - Visual cluster ring and partition distribution
- CommandPalette - Cmd+K quick navigation
- Settings - Hot-reloadable runtime configuration
- Login/Auth - JWT-based admin authentication
- ClusterSearchCoordinator - Scatter-gather distributed FTS with RRF merge
- DistributedSubscriptionCoordinator - Live query subscriptions across cluster nodes
- QueryCursor - Cursor-based pagination for distributed queries
- SearchCursor - Cursor-based pagination for distributed search
- CLUSTER_SEARCH_REQ/RESP - New cluster protocol messages
- CLUSTER_SUB_REGISTER/UPDATE - Distributed subscription protocol
- CLI Commands -
topgun doctor,setup,dev,test,config,cluster,debug:crdt,debug:search - BetterSqlite3Adapter - SQLite storage adapter for server-side persistence
- DevContainer - VS Code/Codespaces development environment
- Docker Compose Profiles -
admin,monitoring,dbtoolsprofiles
- Environment Validation - Zod schema for server configuration
- TOPGUN_DEBUG_ENDPOINTS - Security control for debug endpoints (disabled by default)
- foreignKeyMap - Custom database schema support for better-auth adapter
- server: Refactor DistributedSubscriptionCoordinator into focused coordinators (Base, Search, Query)
- server: Wire SearchCoordinator.dispose() into LifecycleManager for timer cleanup
- server: Extract handlers from ServerCoordinator into domain modules
- core: Split schemas.ts (1160 lines) into domain-focused modules
- core: Structured logging with pino throughout codebase
- Dead code from ServerCoordinator (~1,263 lines)
- Phase/Spec/Bug references from code comments (488 occurrences)
jest.retryTimesfrom flaky tests (proper fixes applied)
- Timer cleanup in SearchCoordinator preventing memory leaks
- Type safety improvements across client message handlers
- WebCrypto polyfill for consistent test environment
- CLI command tests (28 tests covering all commands)
- 1814 tests in core package
- Cluster E2E tests for partition routing, node failure, replication
- @topgunbuild/mcp-server - New package enabling AI assistants (Claude Desktop, Cursor) to interact with TopGun databases via Model Context Protocol (MCP)
- Query, mutate, and search data using natural language
- Full-text hybrid search (BM25 + exact matching)
- Real-time subscriptions for watching changes
- Schema inspection and query explanation
- HTTP and stdio transports
- Security controls: restricted maps, read-only mode, auth tokens
- Comprehensive MCP Server guide
- Reciprocal Rank Fusion (RRF) for merging search results from multiple sources
- QueryExecutor with parallel FTS + filter execution
- LiveFTSIndex for live hybrid query updates
- HybridQueryHandle for client-side hybrid queries
- useHybridQuery React hook for faceted search UIs
- _score sorting for relevance-based results
- FTS:
match(),matchPhrase(),matchPrefix() - Filters:
eq(),gt(),lt(),gte(),lte(),contains() - Logical:
and(),or()
- BM25 Ranked Search - Industry-standard relevance algorithm with Porter stemming and 174 English stopwords
- Server-side FTS Indexes - Centralized indexes with automatic updates on data changes
- Live Search Subscriptions - Real-time search results with delta updates (ENTER/UPDATE/LEAVE events)
- useSearch React Hook - Easy integration with debounce support for search-as-you-type UIs
- O(1) Live Updates - scoreSingleDocument optimization for 1000x faster live search updates
- Notification Batching - 16ms batching window to prevent update storms
- scoreDocument (1K docs): 1000× faster
- scoreDocument (10K docs): 10000× faster
- ReplicationPipeline - Async and sync replication with configurable consistency levels (EVENTUAL, QUORUM, STRONG)
- Gossip Protocol - Automatic cluster member discovery
- Partition-aware routing - Direct operations to partition owners
- MerkleTreeManager - Efficient hash-based data verification using Merkle trees
- RepairScheduler - Automated periodic repair with configurable scan intervals
- Bucket-level comparison - Minimizes network traffic
- PartitionReassigner - Automatic partition rebalancing on node failure
- Phi Accrual Failure Detector - Adaptive failure detection
- ReadReplicaHandler - Support for reading from replica nodes
- New "Cluster Replication" guide
- 38 E2E cluster tests covering replication, failover, and partition routing
LazyHashIndex,LazyNavigableIndex,LazyInvertedIndexclasses- Deferred index construction until first query for fast startup
- Progress callbacks for index materialization
lazyIndexBuildingoption inIndexedLWWMap
generateAttributes<V>()with curried type inferenceattr()andmultiAttr()helper functionscreateSchema<V>()fluent builder- Nested path support (e.g.,
'address.city')
CompoundIndexclass for multi-attribute O(1) lookups- Compound query tracking in
QueryPatternTracker - Compound index suggestions in
IndexAdvisor - Automatic
CompoundIndexusage inQueryOptimizer
- 140+ new tests for Phase 9 features
- 1264 total tests in core package
- HashIndex - O(1) equality lookups
- NavigableIndex - O(log N) range queries with SkipList-based SortedMap
- QueryOptimizer - Cost-based query planning with automatic index selection
- StandingQueryIndex - Pre-computed results for live queries
- ResultSet Pipeline - Lazy, composable query results
- InvertedIndex - Token-based indexing for text search
- New query predicates:
contains,containsAll,containsAny - Configurable tokenization with filters (lowercase, stop words, min length)
- Multi-value attribute support
- QueryPatternTracker - Runtime statistics collection
- IndexAdvisor - Intelligent index suggestions based on query patterns
- AutoIndexManager - Optional automatic index creation
- DefaultIndexingStrategy - Auto-index scalar fields
IndexedLWWMap- LWWMap with index supportIndexedORMap- ORMap with index support
- Equality queries: 100-1000× faster than full scan
- Range queries: O(log N) instead of O(N)
- Text search: Sub-millisecond on 100K+ documents
- PN Counter (Phase 5.2) - Positive-Negative counter CRDT supporting increment/decrement operations with eventual consistency
- Event Journal (Phase 5.04) - Append-only event log for event sourcing patterns with full CRDT synchronization
- Entry Processor (Phase 5.03) - Atomic server-side map operations with sandboxed execution via isolated-vm
- Custom Conflict Resolvers (Phase 5.05) - Register custom conflict resolution strategies for domain-specific merge logic
- Delta Updates for Subscriptions (Phase 5.1) - Incremental updates instead of full data snapshots for improved performance
- Offline Persistence for PNCounter (Phase 5.02) - Full offline support for counter operations
usePNCounter- Hook for working with PN Counter in React applicationsuseEventJournal- Hook for subscribing to Event Journal streams- Enhanced
useQuerywith delta update support
- PNCounter guide and API reference
- Entry Processor guide and API reference
- Event Journal guide and API reference
- Conflict resolution blog post with ML/AI integration examples
- react: Added
maxChangesoption to prevent memory leaks in change tracking - server: Mark isolated-vm as external for bundling
- server: Add production warning when isolated-vm is unavailable
- client: Replace console.log with logger in QueryHandle for better debugging
- Phase 4 completion: Cluster support with split-brain protection
- FailureDetector and FencingManager for cluster resilience
- Cluster Client documentation
- Test alignment with current implementation
- Minor bug fixes and stability improvements
- Phase 0 complete: Core CRDT implementation
- LWWMap and ORMap with HLC timestamps
- MerkleTree for efficient delta sync
- Basic client-server synchronization