Skip to content

Commit 6f769d3

Browse files
author
Nicola Spieser
committed
feat: MCPStateStore — key-value state store with change tracking, transactions, TTL, namespaces, JSON serialization — 45 new tests — bump to v0.41.0
1 parent fc63e1a commit 6f769d3

8 files changed

Lines changed: 1076 additions & 5 deletions

File tree

CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,24 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## [0.41.0] — 2026-02-23
6+
7+
### Added
8+
- **State Store** (`MCPStateStore.h`): General-purpose key-value state store for microcontrollers. Designed for storing device state, calibration data, user preferences, and runtime config that persists across application logic (pair with NVS/EEPROM for reboot persistence).
9+
- `StateStore`: Bounded or unlimited key-value store with `set()`, `get()`, `has()`, `remove()`, `clear()`.
10+
- **Namespaced keys**: Use dotted keys (e.g., `"sensor.temp"`, `"config.name"`) and filter with `keys("sensor.")`.
11+
- **Change listeners**: `onChange()` callback with old/new values, listener removal by ID.
12+
- **Dirty tracking**: `isDirty()`, `dirtyKeys()`, `clearDirty()` for efficient persistence — only write changed keys to flash.
13+
- **Bounded size**: Optional `maxEntries` with LRU-style eviction (evicts oldest-accessed entry).
14+
- **TTL support**: Optional per-key expiry with `purgeExpired()`.
15+
- **Transactions**: `begin()` / `commit()` / `rollback()` for atomic batch updates — changes buffered until commit, listeners fire only on commit.
16+
- **JSON serialization**: `toJSON()` / `fromJSON()` for snapshot export/import, `toDetailedJSON()` with metadata, `statsJSON()`.
17+
- Eviction and deletion notify listeners for consistent state tracking.
18+
- **45 new tests**: Full coverage of StateStore operations, namespaces, dirty tracking, listeners, eviction, TTL, transactions, JSON round-trip, and edge cases. **Total: 1457 tests**.
19+
20+
### Fixed
21+
- Version sync: `library.properties` now matches `MCPD_VERSION`.
22+
523
## [0.36.0] — 2026-02-22
624

725
### Added

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
|---|:---:|:---:|:---:|
3434
| Runs on the MCU ||| ❌ CLI tool |
3535
| MCP spec compliant | ✅ 2025-11-25 | ❌ custom WS ||
36-
| Actually compiles |1412 tests | ❌ self-described | N/A |
36+
| Actually compiles |1457 tests | ❌ self-described | N/A |
3737
| Streamable HTTP + SSE ||||
3838
| WebSocket transport ||||
3939
| Claude Desktop bridge ||||

library.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mcpd",
3-
"version": "0.40.0",
3+
"version": "0.41.0",
44
"description": "MCP Server SDK for Microcontrollers — Expose ESP32/RP2040/STM32 hardware as AI-accessible tools via Model Context Protocol",
55
"keywords": [
66
"mcp",

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=mcpd
2-
version=0.37.0
2+
version=0.41.0
33
author=Nicola Spieser
44
maintainer=Nicola Spieser <redbasecap-buiss@users.noreply.github.com>
55
sentence=MCP Server SDK for Microcontrollers

0 commit comments

Comments
 (0)