@urun-sh/core 0.4.3 → 0.5.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 CHANGED
@@ -1,5 +1,38 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.5.0
4
+
5
+ - **BREAKING: `end()` PARKS, and `cancel()` is the admission-ticket verb** (owner ruling D3,
6
+ 2026-09-06; Review A §5.1 "two end verbs", §3.3 residue).
7
+ - `Session.end()` / `sessionDirectory().end(id)` both go through the one implementation
8
+ `endSession()` → `POST /api/sessions/{id}/end` → `urun_park_session(client_ended)`.
9
+ It resolves `{ status: 'paused', sessionId, reason }`. `'paused'` can never throw; a
10
+ TERMINAL word on that route is now the loud error (`invalid_end_response`), because a
11
+ terminal write on the session plane is what the model forbids.
12
+ - `Session.cancel()` (new) → `POST /api/session-requests/{id}/cancel`. Request plane only,
13
+ never addressed by session id. Every outcome the control plane can answer maps to
14
+ `{ status: 'canceled' }`; an unrecognized word stays loud.
15
+ - `SessionEndResult` is now `{ status: 'paused'; sessionId; reason } | { status: 'canceled';
16
+ requestId; platformStatus? }` — the `'ended'` member is gone.
17
+ - `SessionEndError.requestId` is optional and `sessionId` is new.
18
+ - `allocateSession`'s `onRequest` handle carries `sessionId` as soon as the create envelope
19
+ names one, so a hang-up racing allocation parks the session instead of cancelling the
20
+ ticket of a session that already exists.
21
+ - `SessionGatewayStatus` gains `'paused'`.
22
+ - The end request is `keepalive`, like the teardown beacon: an `end()` can race the tab
23
+ close that triggered it. It sends NO body: the verb names the cause server-side, and
24
+ session-api reads a wire `reason` only to tolerate it — so `end()` now speaks the same
25
+ wire shape as the pagehide beacon hitting that same route.
26
+ - **The one routing rule holds on the paths that are not the two verbs** (review findings):
27
+ a page teardown that cancelled a still-queued TICKET finishes on the SESSION plane if
28
+ promotion won the race (otherwise the promoted session holds a GPU seat with no client),
29
+ and the give-up cancel parks instead of cancelling when allocation threw AFTER the control
30
+ plane allocated (an unusable `session_api_base` / `ws_url` — the ticket-cancel route
31
+ refuses those with 409 `request_has_session`).
32
+ - A REFUSED `cancel()` is not a cancel: the release claim and the re-attach bookmark are
33
+ only taken on success, so a later `pagehide` still beacons the ticket cancel instead of
34
+ being suppressed by a release that never happened.
35
+
3
36
  ## 0.4.3
4
37
 
5
38
  - **FIX: no server status word can reach a user as a benign lie — on EITHER path.**
@@ -109,7 +142,6 @@
109
142
 
110
143
  ## 0.4.1
111
144
 
112
-
113
145
  - **FIX: a re-dial no longer leaves the playout element bound to a DEAD track**
114
146
  (urun-infra#2132; the prod qwen-voice "assistant audio drops mid-session and
115
147
  never self-heals, reload fixes it" signature). `recvTransport.consume()` /