Repository navigation
v0.8.0
What's New
🔧 Tool Bridge — Provider Abstraction & Registry
The headline feature of v0.8.0 is the Tool Bridge, a complete provider-based abstraction for bridging external tool sources onto Copilot SDK sessions. This enables MsClaw agents to discover and invoke tools from any registered provider (MCPorter, cron, bundled utilities, and more).
Architecture highlights:
IToolProvider— plug-in interface for tool sources. Implement one method to expose your tools to the agent.IToolCatalog/IToolRegistrar— ISP-compliant read/write split. The catalog is the shared store; the registrar handles provider lifecycle.IToolExpander— session-aware lazy expansion. Only default tools are loaded at session creation; additional tools are loaded on-demand viaexpand_tools(supports both explicit load-by-name and keyword query modes).ToolBridgeHostedService— background service that registers providers at startup and refreshes them on surface changes.
🔒 Deadlock & Race Condition Fixes
Two subtle concurrency bugs were discovered and resolved during tool bridge development:
- Tool handler deadlock — calling
ResumeSessionAsyncfrom inside a tool handler deadlocked because the CLI blocks on the tool result via JSON-RPC. Replaced with deferred sync that callsResumeSessionbefore the nextSendAsync. - Abort race condition — the concurrency gate and stream CTS are now released atomically, preventing "already has an active run" errors. The UI disposes the event subscription before awaiting server-side abort for instant feedback.
🏠 Tilde Path Expansion
--mind and --new-mind arguments now expand a leading ~ to the user's home directory, so --mind ~/src/ernist works as expected on all platforms.
📐 Design Refinements
ToolBridgedecomposed into three focused types:ToolCatalogStore(shared data),ToolBridge(read),ToolRegistrar(write)SessionHolderupgraded from nullable property toTaskCompletionSourcefor thread-safe session bindingCallerRegistry.TryReleaseTOCTOU race fixed (try/catchSemaphoreFullException)ToolExpandercleaned up — vestigial gateway client and session holder parameters removed
📊 By the Numbers
- 52 tasks across 4 implementation phases
- Built with strict TDD (red → green → refactor) throughout
Full Changelog: v0.7.2...v0.8.0