refactor: move event system to reducer, remove engine package #32

Merged
mvhutz merged 7 commits from refactor/move-events-to-reducer into main 2026-01-17 00:27:37 +00:00

7 Commits

Author SHA1 Message Date
8dc5d986fd feat: stuff 2026-01-16 19:27:16 -05:00
d9639ecc2b style: moved isViable to reducer 2026-01-16 19:09:27 -05:00
cb4f42c91d docs: add guidance for commenting on PR updates
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 19:03:16 -05:00
475d79c334 docs: replace tea pr edit with tea comment in CLAUDE.md
The tea CLI does not have a pr edit command.
Updated documentation to use tea comment instead.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 19:02:29 -05:00
b69898cf39 docs: add tea pr edit instructions to CLAUDE.md 2026-01-16 18:58:08 -05:00
aeffe64804 fix: update main and tests for new Reducer API
Update call sites to match the new Reducer interface where the expression
is passed to the constructor and Reduce() takes no arguments.
2026-01-16 18:56:03 -05:00
bcc0331149 refactor: move event system to reducer, remove engine package
Move the event emitter and lifecycle events from the engine into the reducer,
making the reducer the single point of orchestration for reduction.
This eliminates the engine package entirely.

- Add events.go to pkg/reducer with Start, Step, and Stop events.
- Extend Reducer interface to embed Emitter and add Expression() method.
- Update NormalOrderReducer to embed BaseEmitter and emit lifecycle events.
- Update all plugins to attach to Reducer instead of Engine.
- Remove internal/engine package.
- Add Off() method to BaseEmitter to complete Emitter interface.
- Fix Emitter.On signature to use generic type E instead of string.
2026-01-16 18:50:52 -05:00