Skip to content

v0.8.0

Choose a tag to compare

@github-actions github-actions released this 09 Mar 04:05
· 20 commits to master since this release
3af21b8

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 via expand_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 ResumeSessionAsync from inside a tool handler deadlocked because the CLI blocks on the tool result via JSON-RPC. Replaced with deferred sync that calls ResumeSession before the next SendAsync.
  • 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

  • ToolBridge decomposed into three focused types: ToolCatalogStore (shared data), ToolBridge (read), ToolRegistrar (write)
  • SessionHolder upgraded from nullable property to TaskCompletionSource for thread-safe session binding
  • CallerRegistry.TryRelease TOCTOU race fixed (try/catch SemaphoreFullException)
  • ToolExpander cleaned 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