feat(protocol): Add sync messaging protocol fields for turn-based coordination#239
Open
khaliqgant wants to merge 2 commits intomainfrom
Open
feat(protocol): Add sync messaging protocol fields for turn-based coordination#239khaliqgant wants to merge 2 commits intomainfrom
khaliqgant wants to merge 2 commits intomainfrom
Conversation
🤖 My Senior Dev — Analysis Complete👤 For @khaliqgant📁 Expert in View your contributor analytics → 📊 8 files reviewed • 2 need attention
🚀 Open Interactive Review →The full interface unlocks features not available in GitHub:
💬 Chat here: 📖 View all 12 personas & slash commandsYou can interact with me by mentioning In PR comments or on any line of code:
Slash commands:
AI Personas (mention to get their perspective):
For the best experience, view this PR on myseniordev.com — includes AI chat, file annotations, and interactive reviews. |
…rdination - Fix AckPayload.response type from boolean to string for richer status codes - Add JSDoc documentation for correlationId, response, responseData fields - Update sendSyncAck() signature and call sites to use 'OK'/'ERROR' strings - Add comprehensive unit tests for sync messaging types (16 new tests) This enables request-response patterns and blocking message semantics for turn-based agent coordination scenarios (e.g., card games, workflows). Closes #483 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
d013d27 to
e69d764
Compare
Add 6 new test cases for daemon pending ACK tracking (agent-relay-484): - Duplicate correlationId rejection with ERROR - Missing correlationId in blocking SEND returns ERROR - Connection cleanup clears pending ACKs - ACK without correlationId is ignored (but still routed) - ACK with unmatched correlationId doesn't resolve wrong pending - Default timeout (30s) when timeoutMs not specified Total: 8 tests for blocking SEND and ACK correlation logic. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
khaliqgant
added a commit
that referenced
this pull request
Jan 23, 2026
…240 Cherry-pick key improvements from stabilization PRs: From #239 (sync messaging protocol): - Change AckPayload.response from boolean to string for richer status codes ('OK', 'ERROR', 'ACCEPTED', etc.) - Add JSDoc documentation for sync messaging fields - Update all call sites to use string values From #240 (model selection): - Add model-mapping utility for mapping agent profile models to CLI variants - Enable cost tracking and model selection per agent - Integrate mapModelToCli() into spawner for automatic CLI variant selection 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
AckPayload.responsetype frombooleantostringfor richer status codes ('OK', 'ERROR', custom)correlationId,response,responseDatafields in AckPayloadsendSyncAck()signature and call sites to use string response valuesChanges
src/protocol/types.tsresponse?: boolean→response?: string, add JSDocsrc/wrapper/base-wrapper.tssendSyncAck()parameter typesrc/wrapper/tmux-wrapper.tssrc/wrapper/relay-pty-orchestrator.tssrc/daemon/server.test.tsresponse: 'OK'src/wrapper/client.test.tsresponse: 'OK'src/protocol/sync-messaging.test.tsDesign Decision
Changed
AckPayload.responsefrombooleantostringper design doc (SYNC_MESSAGING_PROTOCOL.md:81) to support richer response status codes like 'OK', 'ERROR', 'ACCEPTED', etc. This is backwards compatible as the field remains optional.Test plan
Closes #483
🤖 Generated with Claude Code