Refactor loop bridge runtime and storage#47
Conversation
There was a problem hiding this comment.
Code Review
This pull request refactors the bridge implementation by splitting the monolithic src/loop/bridge.ts into several specialized modules: bridge-config.ts, bridge-constants.ts, bridge-runtime.ts, and bridge-store.ts. This change improves code organization and modularity across the bridge runtime, configuration, and storage layers. One piece of feedback was provided regarding the naming of stringifyToml, which currently uses JSON.stringify and could be misleading.
| mkdirSync(dirname(path), { recursive: true }); | ||
| }; | ||
|
|
||
| const stringifyToml = (value: string): string => JSON.stringify(value); |
There was a problem hiding this comment.
The function stringifyToml uses JSON.stringify, which produces JSON output, not TOML. This naming is misleading. Additionally, please ensure that when communicating between agents in a paired tmux runtime, you use newline-delimited JSON on stdout for agent CLIs, as Content-Length framing can break registration/connection.
| const stringifyToml = (value: string): string => JSON.stringify(value); | |
| const stringifyJsonForToml = (value: string): string => JSON.stringify(value); |
References
- When communicating between agents in a paired tmux runtime, use newline-delimited JSON on stdout for agent CLIs, as Content-Length framing can break registration/connection.
Summary
Verification
Review