Files
operations/test/subscribe.test.ts
glm-5.1 6290feffb0 feat(subscribe): wrap yields in ResponseEnvelope
- Change subscribe() return type to AsyncGenerator<ResponseEnvelope, void, unknown>
- Check isResponseEnvelope() on each yielded value: pass through if already an envelope
- Wrap raw values with localEnvelope(value, operationId) with fresh timestamp per yield
- Preserve generator cleanup (generator.return()) in finally block
- Preserve existing spec/handler not-found error behavior
- Add 13 tests covering wrapping, passthrough, timestamps, mixed yields, early termination
2026-05-11 02:06:20 +00:00

9.4 KiB