MCPTap v2.4.0 #7
pczerkas
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
[2.4.0]
Highlights
Added
Hot-reload for configuration files — the proxy now polls mtime of
configuration files (
proxy.env,openrouter.env,requesty.env,mcp-intercept.yaml,per-model.yaml,use_tool_hook.py) every 2 secondsand triggers a selective reload cascade when any of them changes:
proxy.env,openrouter.env,requesty.env) → fullSettingsreload + propagation to all dependent components (interceptor,per-model config, tool hook);
mcp-intercept.yaml→ stop old MCP subprocess + start a newMCPInterceptorinstance;per-model.yaml→ reload the per-model config dict;use_tool_hook.py→ reload the tool-hook enabled flag andSettings(path may change).
The reloader runs as a background asyncio task inside the aiohttp event
loop, wired into
on_startup/on_cleanuplifecycle inapp.py._SettingsProxywithreload_settings()—settings.pywas refactoredso the module-level
settingsobject is a transparent proxy that delegates__getattr__/__setattr__to the currentSettingsinstance. Callingreload_settings()rebuilds the instance from env files and swaps theproxy target, so all callers automatically see reloaded values without
re-importing.
Stale provider env key cleanup — before loading a new provider env
file, known provider keys (
MCP_TAP_API_KEY,MCP_TAP_MODEL,MCP_TAP_PLAN_MODE_MODEL,MCP_TAP_OPENROUTER_PROVIDER,MCP_TAP_OPENROUTER_DISABLE_PROVIDER_FALLBACKS) are removed fromos.environto prevent stale values leaking across provider switches.25 new config-reload tests —
tests/test_config_reloader.py(616 lines)covering
_SettingsProxydelegation/swap semantics, stale env key cleanup,mtime detection, selective reload cascade routing, callback failures,
lifecycle wiring, and application-level reload callbacks
(
reload_per_model_config,reload_tool_hook,reload_intercept,reload_env_and_propagate).markdownlintpre-commit hook — added amarkdownlinthook to.pre-commit-config.yaml, wrapped by the sharedwrap_hook.shwrapper.The hook runs
markdownlint-cli2on committed Markdown files at thepre-commitstage (fail_fast: true,pass_filenames: false)..markdownlint-cli2.jsonc— markdownlint CLI configuration thatdisables the
MD013(line length) rule and enables auto-fix mode.Changed
settings.pyrefactored for hot-reload — the monolithicSettings.from_env()classmethod was split into_load_env_files()(envloading + provider selection + stale key cleanup) and
_build_settings_from_env()(readsos.environinto the dataclass).from_env()now delegates to both, preserving the original entry point.The
Settingsdataclass docstring and module docstring were updated todocument the hot-reload mechanism.
Markdownlint directive in changelog-creator skill — added a
<!-- markdownlint-disable-next-line MD034 -->comment to the exampleinvocation blockquote in
.agents/skills/changelog-creator/SKILL.md.Full Changelog
v2.3.0...v2.4.0
This discussion was created from the release MCPTap v2.4.0.
All reactions