forked from 1b-agent/opencadstudio-upstream
fix(mcp): harden discovery, serialize launches, expose build identity
Discovery skips pid-verified dead sessions and deletes stale descriptors; probes are bounded so dead sessions delay discovery by at most one timeout. The bridge exits after the in-flight request once it detects a rebuild, and error results omit structuredContent so strict clients surface real errors. Concurrent launches are serialized with automation/starting.lock: the first caller spawns the GUI, later callers wait for the same descriptor instead of opening another window. Session states and hello/capabilities responses now carry the bridge build identity (version, build_rev, tool_schema), and the agent instructions point the build announcement at it.
This commit is contained in:
1 parent
d2a4e3f8e7
commit
d31b9d1a35
2 files changed
+397
-33
No files matched your search
@@ -20,6 +20,15 @@ The server provides four tools:
|
||||
- `ocs_execute` performs one operation, an atomic record update, or a sequential batch against the real editor.
|
||||
- `ocs_capture` returns a bounded PNG of the drawing viewport or complete window.
|
||||
|
||||
### Stale sessions clean themselves up
|
||||
|
||||
Dead editor sessions used to leave descriptor files behind that slowed down
|
||||
session discovery. Discovery now skips processes that are gone (and removes
|
||||
their leftover files), and a bridge started from an older build exits on its
|
||||
own once it detects a rebuild so the client starts a fresh one. No action is
|
||||
needed on your side; if a client reports version errors after an upgrade,
|
||||
reconnecting its MCP servers picks up the new build.
|
||||
|
||||
Run `python docs/automation/mcp_acceptance.py target/debug/OpenCADStudio.exe`
|
||||
for a repeatable end-to-end acceptance. It creates visible geometry through
|
||||
MCP, audits and verified-saves DWG 2000/2013/2018 plus DXF 2000, and records a
|
||||
|
||||
Reference in new issue
Block a user