sqlew 2.1.0 → 2.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,69 @@ All notable changes to sqlew will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [2.1.2] - 2025-10-15
9
+
10
+ ### Fixed
11
+ - **v2.1.0 Migration Bug:** Fixed initialization order issue preventing v2.0.0 databases from migrating to v2.1.0
12
+ - **Problem:** Schema validation ran before v2.1.0 migration check, causing v2.0.0 databases to fail validation and exit
13
+ - **Solution:** Moved v2.1.0 migration check to run before schema validation (src/database.ts:96-113)
14
+ - **Impact:** v2.0.0 databases now automatically migrate to v2.1.0 on startup without errors
15
+ - Database components added by migration: `t_activity_log`, `t_decision_templates`, 4 activity logging triggers
16
+
17
+ ### Changed
18
+ - **Batch Operations Help Documentation:** Enhanced help text for all batch operations with AI agent guidance
19
+ - Added detailed ATOMIC MODE behavior explanation (all-or-nothing transaction with rollback)
20
+ - Added detailed NON-ATOMIC MODE behavior explanation (best-effort processing with partial results)
21
+ - Added RECOMMENDATION FOR AI AGENTS section suggesting `atomic:false` by default
22
+ - Applies to: `set_batch` (decision tool), `send_batch` (message tool), `record_batch` (file tool)
23
+ - **Zero token impact:** Help text is on-demand only (called with `action: "help"`)
24
+ - Helps prevent "cannot start a transaction within a transaction" errors from incorrect usage
25
+
26
+ ### Technical Details
27
+ - v2.1.0 migration now runs before schema validation to ensure all required components exist
28
+ - Help documentation improvements have no effect on MCP tool schema (zero upfront token cost)
29
+ - Batch operation help text expanded from ~150 to ~350 characters per action
30
+
31
+ ### Migration from v2.1.0/v2.1.1
32
+ - No breaking changes
33
+ - Existing v2.0.0 databases will now migrate successfully on first startup
34
+ - No action required for v2.1.0+ users
35
+
36
+ ## [2.1.1] - 2025-10-15
37
+
38
+ ### Fixed
39
+ - **Bin Command Configuration:** Fixed `npx sqlew` to launch MCP server by default instead of CLI
40
+ - Changed `package.json` bin mapping: `sqlew` now points to MCP server (`dist/index.js`)
41
+ - CLI mode moved to `sqlew-cli` command (`dist/cli.js`)
42
+ - **Before:** `npx sqlew` → CLI mode
43
+ - **After:** `npx sqlew` → MCP server (default), `sqlew-cli` → CLI mode (after installing the package)
44
+ - Fixes user experience issue where MCP server launch required non-intuitive command
45
+
46
+ - **Batch Operations Nested Transaction Bug:** Fixed `set_batch` failing with "cannot start a transaction within a transaction" error
47
+ - Root cause: `setDecision()` wraps logic in `transaction()`, but `setDecisionBatch()` also wraps calls in `transaction()` for atomic mode
48
+ - Solution: Created `setDecisionInternal()` helper function with core logic but no transaction wrapper
49
+ - `setDecision()` now calls `setDecisionInternal()` wrapped in transaction
50
+ - `setDecisionBatch()` now calls `setDecisionInternal()` directly (batch manages its own transaction)
51
+ - All batch operations verified working: `set_batch`, `send_batch`, `record_batch`
52
+ - Location: `src/tools/context.ts:40-152` (setDecisionInternal), `context.ts:154-174` (setDecision), `context.ts:883` (setDecisionBatch)
53
+
54
+ ### Changed
55
+ - **Documentation Improvements:**
56
+ - **README Benefits Section:** Rewrote to emphasize organizational memory for AI agents as the core value proposition
57
+ - Added comparison table: Git history (WHAT) vs Code comments (HOW) vs sqlew decisions (WHY)
58
+ - Added real-world example showing cross-session context survival
59
+ - Highlighted 4 key LLM benefits: context survival, prevents regression, historical reasoning, knowledge discovery
60
+ - **README Token Savings:** Replaced internal architecture metrics with honest real-world token reduction analysis
61
+ - Shows concrete scenario: 5 agents, 10 sessions, 20,000 → 7,400 tokens (63% reduction)
62
+ - Explains 4 savings mechanisms: selective retrieval, structured vs unstructured, cross-session persistence, search vs scan
63
+ - Provides realistic ranges: Conservative (50-65%), Realistic (60-75%), Optimal (70-85%)
64
+ - Clarified that 96%/67% metrics are internal v1.0→v2.0 improvements, not usage benefits
65
+
66
+ ### Migration Notes
67
+ - No breaking changes for MCP tool API
68
+ - Users who relied on `npx sqlew` for CLI should install the package and use `sqlew-cli` command
69
+ - MCP server configuration unchanged (still uses stdio transport)
70
+
8
71
  ## [2.1.0] - 2025-10-14
9
72
 
10
73
  ### 🎉 Feature Release
@@ -437,6 +500,8 @@ First production release of sqlew - MCP server for efficient context sharing bet
437
500
  - Full type safety
438
501
  - Comprehensive error handling
439
502
 
503
+ [2.1.2]: https://github.com/sin5ddd/mcp-sqlew/releases/tag/v2.1.2
504
+ [2.1.1]: https://github.com/sin5ddd/mcp-sqlew/releases/tag/v2.1.1
440
505
  [2.1.0]: https://github.com/sin5ddd/mcp-sqlew/releases/tag/v2.1.0
441
506
  [2.0.0]: https://github.com/sin5ddd/mcp-sqlew/releases/tag/v2.0.0
442
507
  [1.1.2]: https://github.com/sin5ddd/mcp-sqlew/releases/tag/v1.1.2