(messages)
| 1755 | void transport.writeBatch(events) |
| 1756 | }, |
| 1757 | writeSdkMessages(messages) { |
| 1758 | // Daemon path: query() already yields SDKMessage, skip conversion. |
| 1759 | // Still run echo dedup (server bounces writes back on the WS). |
| 1760 | // No initialMessageUUIDs filter — daemon has no initial messages. |
| 1761 | // No flushGate — daemon never starts it (no initial flush). |
| 1762 | const filtered = messages.filter( |
| 1763 | m => !m.uuid || !recentPostedUUIDs.has(m.uuid), |
| 1764 | ) |
| 1765 | if (filtered.length === 0) return |
| 1766 | if (!transport) { |
| 1767 | logForDebugging( |
| 1768 | `[bridge:repl] Transport not configured, dropping ${filtered.length} SDK message(s) for session=${currentSessionId}`, |
| 1769 | { level: 'warn' }, |
| 1770 | ) |
| 1771 | return |
| 1772 | } |
| 1773 | for (const msg of filtered) { |
| 1774 | if (msg.uuid) recentPostedUUIDs.add(msg.uuid) |
| 1775 | } |
| 1776 | const events = filtered.map(m => ({ ...m, session_id: currentSessionId })) |
| 1777 | void transport.writeBatch(events) |
| 1778 | }, |
| 1779 | sendControlRequest(request: SDKControlRequest) { |
| 1780 | if (!transport) { |
| 1781 | logForDebugging( |
nothing calls this directly
no test coverage detected