Improve bridge dispatch and Codex app-server handshake#50
Improve bridge dispatch and Codex app-server handshake#50axeldelafosse merged 2 commits intomainfrom
Conversation
There was a problem hiding this comment.
Code Review
This pull request refactors the bridge messaging system by modularizing dispatch logic and agent guidance into dedicated files. It also enhances the Codex app server integration by implementing a formal initialization handshake and allowing for notification method opt-outs. A validation check for the active bridge conversation was added to the reply tool. Feedback suggests exporting the notification opt-out constant to improve test maintainability.
| const BRIDGE_OPT_OUT_NOTIFICATION_METHODS = [ | ||
| METHOD_ERROR, | ||
| METHOD_ITEM_COMPLETED, | ||
| METHOD_ITEM_DELTA, | ||
| METHOD_TURN_COMPLETED, | ||
| METHOD_TURN_STARTED, | ||
| ] as const; |
There was a problem hiding this comment.
To improve test maintainability and avoid hardcoding values, consider exporting BRIDGE_OPT_OUT_NOTIFICATION_METHODS. This would allow the test file (tests/loop/codex-app-server.test.ts) to import and use this constant directly, making the tests less brittle to future changes in these notification methods.
| const BRIDGE_OPT_OUT_NOTIFICATION_METHODS = [ | |
| METHOD_ERROR, | |
| METHOD_ITEM_COMPLETED, | |
| METHOD_ITEM_DELTA, | |
| METHOD_TURN_COMPLETED, | |
| METHOD_TURN_STARTED, | |
| ] as const; | |
| export const BRIDGE_OPT_OUT_NOTIFICATION_METHODS = [ | |
| METHOD_ERROR, | |
| METHOD_ITEM_COMPLETED, | |
| METHOD_ITEM_DELTA, | |
| METHOD_TURN_COMPLETED, | |
| METHOD_TURN_STARTED, | |
| ] as const; |
Summary
Verification