JSONLEventBridge appends one event JSON payload per line and tails the file for inbound events.
Constructor params
path: JSONL file pathpoll_interval: tail polling interval in seconds (default0.25)name: optional bridge label
- Python
- TypeScript
Setup with a bus
- Python
- TypeScript
Behavior
emit(...)appends compact JSON payload + newline to the file.on(...)auto-starts a tail loop and registers inbound handlers.- Start cursor is initialized at current EOF, so only newly appended lines are processed.
- Malformed lines are ignored; valid lines are parsed into events, reset, and emitted on the internal bus.
- Runtime note: TypeScript JSONL bridge is Node.js-only.