Context
PR #23 review flagged that createStreamingRehydrator() holds incomplete lines in SSE mode but doesn't expose a flush() mechanism — could orphan buffered data on stream close.
Location: src/vault/token-vault.ts:140-146
Proposal
Add explicit finalize() or flush() method to the streaming rehydrator closure that releases any buffered content on stream end.
Priority
Low — current code works correctly for normal stream termination since data: [DONE] is always on its own line. Only affects abnormal disconnects.
Context
PR #23 review flagged that
createStreamingRehydrator()holds incomplete lines in SSE mode but doesn't expose aflush()mechanism — could orphan buffered data on stream close.Location:
src/vault/token-vault.ts:140-146Proposal
Add explicit
finalize()orflush()method to the streaming rehydrator closure that releases any buffered content on stream end.Priority
Low — current code works correctly for normal stream termination since
data: [DONE]is always on its own line. Only affects abnormal disconnects.