- Add platform-specific optimized file watcher
- Linux: inotify with rapid polling after changes
- macOS: FSEvents + periodic checks to overcome batching
- Windows: ReadDirectoryChangesW with debouncing
- Add direct in-process notifications via StreamNotifier
- Bypasses file watching for same-process sessions
- Near-instant latency for server-created sessions
- Update StreamWatcher to use both mechanisms
- Primary: Direct notifications (microsecond latency)
- Fallback: Optimized file watching (for fwd.ts)
- Add latency and stress test scripts
This should significantly reduce streaming latency, especially
for sessions created by the server process.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>