@juspay/neurolink 11.30.0 → 12.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +55 -3
- package/dist/browser/neurolink.min.js +334 -334
- package/dist/core/baseProvider.js +20 -1
- package/dist/neurolink.js +30 -2
- package/dist/utils/streamCancellation.d.ts +46 -0
- package/dist/utils/streamCancellation.js +90 -0
- package/dist/utils/ttsStream.js +34 -1
- package/dist/voice/livekit/realtimeEventBridge.js +27 -6
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,8 +1,60 @@
|
|
|
1
|
-
## [
|
|
1
|
+
## [12.0.0](https://github.com/juspay/neurolink/compare/v11.30.0...v12.0.0) (2026-08-25)
|
|
2
2
|
|
|
3
|
-
###
|
|
3
|
+
### ⚠ BREAKING CHANGES
|
|
4
|
+
|
|
5
|
+
- **(tts):** out of a TTS-enabled stream blocked the consumer permanently:
|
|
6
|
+
|
|
7
|
+
pnpm run test:tts:unit 2.95s user 1% cpu 5:09.80 total
|
|
8
|
+
|
|
9
|
+
1% CPU over five minutes is not slow work — nothing was running. The
|
|
10
|
+
process sat idle in teardown.
|
|
11
|
+
|
|
12
|
+
interleaveTTSStream's finally awaited Promise.allSettled on the source
|
|
13
|
+
and audio iterators' .return(). `.return()` on an async generator parked
|
|
14
|
+
inside an `await` does not interrupt it: the request is queued behind the
|
|
15
|
+
in-flight next() and only runs when the generator next suspends. A
|
|
16
|
+
provider stream is wrapped several times — lifecycle in baseProvider, MCP
|
|
17
|
+
and pool wrappers in neurolink — and during a pull every one of those
|
|
18
|
+
layers sits in an `await` on the layer below. None can unwind, so those
|
|
19
|
+
promises settle never, not late. Instrumented, at the hang:
|
|
20
|
+
|
|
21
|
+
finally ENTERED completed=false nextSource=true nextAudio=true
|
|
22
|
+
awaiting allSettled of 2 release(s)
|
|
23
|
+
calling sourceIterator.return()
|
|
24
|
+
calling audioIterator.return()
|
|
25
|
+
<neither ever resolved>
|
|
26
|
+
|
|
27
|
+
Two changes, because the generator protocol alone cannot express this.
|
|
28
|
+
|
|
29
|
+
streamCancellation.ts adds an out-of-band channel. A wrapper registers a
|
|
30
|
+
cancel callback on the stream object it returns; the callback closes its
|
|
31
|
+
own upstream iterator and forwards the request downward. These are plain
|
|
32
|
+
function calls, not generator protocol, so they run immediately and do not
|
|
33
|
+
depend on any pending next() settling. baseProvider hoists its upstream
|
|
34
|
+
iterator — iterating the hoisted handle is equivalent to iterating the
|
|
35
|
+
original, it just leaves something reachable from outside the generator —
|
|
36
|
+
and registers a hook. interleaveTTSStream fires it on abandonment before
|
|
37
|
+
asking politely via .return().
|
|
38
|
+
|
|
39
|
+
Registration is optional and reading it is defensive, so a stream that
|
|
40
|
+
knows nothing about this behaves exactly as before.
|
|
41
|
+
|
|
42
|
+
Teardown is also now bounded. Even with the channel, this module cannot
|
|
43
|
+
assume every upstream cooperates, and a consumer's exit must not depend on
|
|
44
|
+
one that may never answer. The releases are still issued and still
|
|
45
|
+
propagate whenever the upstream is responsive.
|
|
46
|
+
|
|
47
|
+
test:tts:unit 327s exit 0, 1 test skipped -> 83s exit 0, 43 passed
|
|
48
|
+
|
|
49
|
+
That test had never passed. It and the cleanup it probes both arrived in
|
|
50
|
+
|
|
51
|
+
### Bug Fixes
|
|
52
|
+
|
|
53
|
+
- **(tts):** stop early stream break from hanging the caller forever ([c8f3d5b](https://github.com/juspay/neurolink/commit/c8f3d5b0ab71621916ec7d9d6970243ff916cae8)), closes [#1336](https://github.com/juspay/neurolink/issues/1336)
|
|
54
|
+
|
|
55
|
+
### Performance Improvements
|
|
4
56
|
|
|
5
|
-
- **(
|
|
57
|
+
- **(ci):** balance extended-suite shards by measured duration, not count ([ed7c300](https://github.com/juspay/neurolink/commit/ed7c300b4171dd2db4dab59e4ef18dfd9477110c))
|
|
6
58
|
|
|
7
59
|
## [11.2.3](https://github.com/juspay/neurolink/compare/v11.2.2...v11.2.3) (2026-08-19)
|
|
8
60
|
|