v0.42.0
Added
- A positional argument of a plugin command accepts a key synonym,
cli_alias. A
plugin command declares such an argument positional only, sowiki-get --page 123
used to fail with "unrecognized arguments" even though the same key works on
wiki-publish. A secondArgument("--page")was not a fix either: the MCP tool
would then carry twopageparameters. The synonym is CLI-only – the MCP tool schema
still has the one parameter it always had – the positional form keeps working, and
giving both at once, or neither of a required argument, is refused by the parser. A
plugin that declares nocli_aliasbehaves exactly as before.
(#34)
Fixed
ELEMCTL_NO_PROXYis now also read from the stand's own.envfile. An MCP tool call
only carriesenv_file, and there was no way to set a process variable for one stand among
several the same server process serves – so a call to a local stand kept failing behind a
proxy that cannot reach it, with the CLI's ownELEMCTL_NO_PROXY=1workaround out of reach.
The environment variable still wins when one is set, and a value read from one stand's file
never reaches a call to another stand served by the same process.
(#32)builds listnow prints its count and truncation notes after the answer, not before it –
the orderapps listalready used. A caller capturing both streams as one (2>&1, or
stderr=STDOUT, a plain way to catch everything a command printed) used to see those notes
ahead of the JSON answer forbuilds list. The two commands agree on the order now, though
reading a merged capture whole is still not guaranteed – only stdout read on its own is safe
to parse as a document. (#32)- The MCP server's client cache now notices an edited
.envfile. The cache used to be
keyed byenv_filealone and held its client for the life of the process, so a stand's file
edited after the server started – addingELEMCTL_NO_PROXY=1, say – stayed invisible until a
restart; the default file (noenv_fileat all) had the same limit. The cache now also
tracks the file's modification time and size, so an edit reaches the very next call for that
stand, and anenv_file(or a startup--env-file) that goes missing after being cached
surfaces the same clear error it always gave, rather than the cache quietly going on with the
client that last worked. An explicit--env-fileis still checked as soon aselemctl mcp
starts, exit 1 before the server ever runs; every other default-stand configuration problem
surfaces on the call that hits it instead. (#33) Config.from_env(no_proxy=...)no longer raisesTypeError. Every other field takes an
explicit argument ahead of the environment and the file, exactly as the docstring promises;
no_proxywas the one exception, because its override was never taken out of**overrides
and fell through to the "unknown configuration parameters" check at the end. The explicit
argument now wins overELEMCTL_NO_PROXYand the file's own copy of it, the same as every
other field – there were no callers passing it yet, which is how the gap went unnoticed.
(#35)- Four small things around the MCP server's client cache.
create_appandensure_app
used to resolveclient(env_file)several times per call – up to four inside the shared
_create_app, plus the tool's own lookup – so a single call could in principle run its
steps against two different clients if the stand's file changed mid-call; each tool now
resolves the client once and passes it through. The client a call is replacing used to be
released BEFORE the new one was stored, so an exception from itsclose()left the cache
pointing at the one that had just failed to close instead of the new, working client;
storing now comes first. A lock now guards the cache dictionary itself – every call still
runs to completion before the next one starts, so nothing exercises the race today, but a
future threaded or async dispatcher would make it real. The fingerprint (modification time
and size) still cannot tell a file that turned unreadable without being edited from one
that has not changed at all; closing that gap would mean reading the file on every lookup
instead of only on a change, and even a lighter, POSIX-only version would still miss it on
Windows – the trade-off is now spelled out where the fingerprint itself is built.
(#35)
What's Changed
- Обход прокси из .env стенда и ответ списков раньше пояснений by @keyfire in #32
- Сервер MCP подхватывает правку .env стенда без перезапуска by @keyfire in #33
- Позиционный аргумент команды плагина принимает синоним-ключ by @keyfire in #34
- Явное переопределение no_proxy и аккуратный кеш клиентов сервера MCP by @keyfire in #35
Full Changelog: v0.41.0...v0.42.0