Expand description
semlith mcp forwarding to a running semlith start.
Without this the daemon would reintroduce the very conflict it exists to
remove. The daemon holds every store’s write lock for its life, so an
agent’s semlith_index against a store a portal is open on would be refused
for as long as the portal stayed open — which is worse than 0.8.0, not
better.
So when a daemon is running for a store this process would have opened,
semlith mcp stops being a server and becomes a pipe: each JSON-RPC line
goes to the daemon’s /api/mcp route and the daemon’s answer comes back
unchanged. The daemon runs the same crate::mcp::answer this process
would have run, so every supported protocol revision behaves identically
through the proxy — there is no second implementation to drift.
When no daemon is running, or one is recorded but does not answer, nothing
here happens and semlith mcp behaves exactly as 0.8.0 did.
Structs§
- Upstream
- A daemon this process should forward to.
Functions§
- candidates
- Which store directory a proxy should look in first.
- daemon_
recorded - Whether this directory currently has a daemon recorded against it.
- find
- Find a live daemon among the stores this process was going to open.
- proxy_
pid - The pid a forwarding process announces, so the Agents view can count them.
- serve
- Be the pipe: every line in, the daemon’s answer out.