v0.1.20
Two new config-load validators harden upstream prefix handling, plus a CLI dispatch parity fix, the 64-char tool name overflow guard, and a test-suite flake fix accumulated since v0.1.19.
Headline
- Duplicate upstream prefix →
ValidationErrorat config load (#265). Two upstreams sharing a prefix used to silently drop the second-loaded duplicate atProxyManager.start()with only alogger.warning. The new@model_validator(mode="after")onProxyConfigraises with every collision group named in one error so both the upstream dict keys (what the user edited) and the prefix value (what collides) surface together. Hot-reload (ProxyConfigLoader.get) keeps the previous good config on validation failure. - Empty / whitespace-only upstream prefix →
ValidationErrorat config load (#266).prefix=""used to validate fine and produce composed names like__list_itemsthat surfaced as broken entries intools/list, also skewing the 64-char overflow guard. Sibling validator placed before the uniqueness check so aprefix=""/prefix=""pair surfaces the more actionable empty error rather than the duplicate one. - Tool name overflow check against the 64-char MCP limit (#261). Three layers:
mms addrejects prefixes that guarantee overflow;ProxyManager._connect_serverper-tool checks the composed length at boot and skips offending tools (better one missing tool than the whole upstream);mms health --namesre-runs the check on demand.MMS_CLIENT_SERVER_NAMEenv var lets users who registered STM under a shorter alias get accurate budget arithmetic. - All three console scripts now boot the MCP stdio server when invoked bare with a piped stdin (#260). Previously only
memtomem-stmworked as an MCP-server registration target;memtomem-stm-proxyandmmsresolved to the Click group whose bare invocation printed help and exited 2. Now all three[project.scripts]entry points dispatch identically based onsys.stdin.isatty().
Internal
TestAutoIndexStartupWarningno longer flakes under full-suite event-loop pressure (#264). The MCP SDK's stdio reader can surfaceecho-upstream handshake failure asasyncio.CancelledError(BaseException);try/except Exceptiondidn't catch it. Catch widened to(Exception, asyncio.CancelledError)with a comment naming the SDK cancellation path. No production code touched.- Docs sync (#270).
mms health --namesflag and the new prefix invariants are now documented indocs/cli.mdanddocs/configuration.mdrespectively.
Behavior change
- Configs that used to load with silent partial drops (#265) or visually broken composed names from
prefix=""(#266) now fail at startup withValidationError. Hot-reload retains the last-good config on validation failure, so a running proxy keeps serving its last known-good upstreams instead of going dark. - Upstreams whose composed name exceeds 64 chars are now skipped at boot with a
WARNINGlog naming the tool and the suggested fix; previously the tool just disappeared from the client's catalogue. mmsandmemtomem-stm-proxyregistered as an MCP client'scommandnow boot the stdio server identically tomemtomem-stminstead of failing with: calling "initialize": EOF.- No SQLite migration. No env-var rename. No new MCP tool.
Full changelog: https://github.com/memtomem/memtomem-stm/blob/main/CHANGELOG.md