@urun-sh/core 0.3.3 → 0.3.4

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 CHANGED
@@ -1,5 +1,22 @@
1
1
  # Changelog
2
2
 
3
+ ## Unreleased
4
+
5
+ - **WT uplink lanes now share ONE datagram writer (`getWriter` lock).**
6
+ `WritableStream.getWriter()` LOCKS the stream — the WHATWG contract is one
7
+ writer at a time. `WebTransportSession.start()` built its uplink sink by
8
+ calling `datagrams.writable.getWriter()` once PER LANE, so on a leg granted
9
+ more than one uplink the SECOND lane threw
10
+ `Cannot create writer when WritableStream is locked` and reverted to a WebRTC
11
+ produce path that a fully-granted WT-only leg does not have (qwen-avatar
12
+ 2026-09-01, iPhone Safari AND desktop Chrome: `WT video uplink failed to
13
+ engage (...)` on every session; the camera lane was dead from bring-up).
14
+ Audio-only legs (qwen-voice) never hit it — exactly one lane, one acquire.
15
+ The writer is now acquired lazily ONCE per session, shared by every lane, and
16
+ `releaseLock()`-ed on stop/death. The pre-existing fakes handed back a fresh
17
+ writer on every call, hiding the double-acquire; the new
18
+ `wt-uplink-writer-lock.test.ts` fake implements the real lock contract.
19
+
3
20
  ## 0.3.0
4
21
 
5
22
  - **BREAKING (types): `SessionPhaseName` widens 9 → 11 members** — adds
@@ -1012,6 +1012,8 @@ declare class WebTransportSession implements MediaSession {
1012
1012
 
1013
1013
  private decoderErrorsAt;
1014
1014
  private writer;
1015
+
1016
+ private dgramWriter;
1015
1017
  private deadCb;
1016
1018
  private deadFired;
1017
1019
  private stopped;
@@ -1055,6 +1057,10 @@ declare class WebTransportSession implements MediaSession {
1055
1057
  start(): Promise<void>;
1056
1058
  stop(): Promise<void>;
1057
1059
 
1060
+ private datagramWriter;
1061
+
1062
+ private releaseDatagramWriter;
1063
+
1058
1064
  private dropUplinks;
1059
1065
  onDead(cb: (reason: string) => void): void;
1060
1066
  stats(): {
@@ -1012,6 +1012,8 @@ declare class WebTransportSession implements MediaSession {
1012
1012
 
1013
1013
  private decoderErrorsAt;
1014
1014
  private writer;
1015
+
1016
+ private dgramWriter;
1015
1017
  private deadCb;
1016
1018
  private deadFired;
1017
1019
  private stopped;
@@ -1055,6 +1057,10 @@ declare class WebTransportSession implements MediaSession {
1055
1057
  start(): Promise<void>;
1056
1058
  stop(): Promise<void>;
1057
1059
 
1060
+ private datagramWriter;
1061
+
1062
+ private releaseDatagramWriter;
1063
+
1058
1064
  private dropUplinks;
1059
1065
  onDead(cb: (reason: string) => void): void;
1060
1066
  stats(): {