You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
✨ Route reduction through api.Reducer middleware and export internals
Add api.Reducer as a middleware interception point for effect reduction,
enabling external packages (e.g., @effectionx/durably) to intercept
instruction processing without forking Effection.
Changes:
- lib/api.ts: Define ReducerApi interface and api.Reducer with createApi
- lib/coroutine.ts: Route reduce calls through reducerApi.invoke() instead
of directly calling ReducerContext, using routine.scope for correct
middleware chain resolution
- lib/scope-internal.ts: Install stock Reducer as base-layer api.Reducer
middleware on the global scope
- experimental.ts: Export InstructionQueue, Instruction type, and
DelimiterContext for custom reducer implementations
- lib/callcc.ts, lib/delimiter.ts, lib/each.ts, lib/future.ts,
lib/scope-internal.ts: Add description labels to withResolvers() calls
so custom reducers can distinguish infrastructure effects from
user-facing effects
0 commit comments