feat: Add command queuing for disconnection resilience#100
Conversation
Implements command queue that stores commands when Unity connection is unavailable (reconnecting/connecting) and replays them when connection is restored. - Add CommandQueue class with configurable size (100) and timeout (60s) - Integrate queue with McpUnity for automatic queuing during reconnection - Add per-request queueIfDisconnected option in SendRequestOptions - Auto-cleanup expired commands with periodic timer - Replay queued commands on connection restore - Add 14 Jest tests for CommandQueue 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
CoderGamester
left a comment
There was a problem hiding this comment.
Nice work @PhilipLudington
This is a very good solution for the annoying connection losses for the domain reload problems with Unity.
Thank you very much
|
@CoderGamester Thank you, love a good solution to a problem! |
Summary
queueIfDisconnectedoption in SendRequestOptions for opt-in queuing behaviorChanges
Server~/src/unity/commandQueue.ts- New CommandQueue class implementationServer~/src/unity/mcpUnity.ts- Integration with connection state managementServer~/src/__tests__/commandQueue.test.ts- 21 Jest tests for comprehensive coverageTest plan
🤖 Generated with Claude Code