harness-sdk-python 0.32.1__py3-none-any.whl → 0.32.2__py3-none-any.whl
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.
harness_sdk/voice.py
CHANGED
|
@@ -20,7 +20,10 @@ clears the entry. The session is bound to the issuing client's connection: ``voi
|
|
|
20
20
|
provider ``closed`` event, or the owner staying detached past the
|
|
21
21
|
``departure_grace`` window (the host's ``client_departed`` hook starts the
|
|
22
22
|
timer, the re-check runs at expiry) ends it; ``voice/start`` while the live
|
|
23
|
-
session's owner is detached ends the orphan and starts the new session
|
|
23
|
+
session's owner is detached ends the orphan and starts the new session, and
|
|
24
|
+
``voice/start`` from the owner itself supersedes its own session — the owner
|
|
25
|
+
holds one media leg, so a fresh start is the definitive signal the old leg
|
|
26
|
+
died.
|
|
24
27
|
Provider turn
|
|
25
28
|
events render live in ``state["messages"]`` through
|
|
26
29
|
``Host.upsert_ephemeral_message`` (message id = turn id), tagged
|
|
@@ -45,8 +48,8 @@ same ``toolCalls`` projection: the client's ``voice/temp-frontend-tool-result``
|
|
|
45
48
|
resolves the await instead of forwarding to the provider, and session end
|
|
46
49
|
fails outstanding awaits.
|
|
47
50
|
|
|
48
|
-
Rejections: ``voice-active`` (
|
|
49
|
-
attached), ``no-voice``
|
|
51
|
+
Rejections: ``voice-active`` (another client's session is live and its
|
|
52
|
+
owner attached), ``no-voice``
|
|
50
53
|
(no voice manager declared, or ``voice/end`` with no session),
|
|
51
54
|
``not-voice-owner`` (``voice/end`` from another client),
|
|
52
55
|
``voice-unavailable`` (the factory or ``provider.start`` raised).
|
|
@@ -602,12 +605,20 @@ class VoiceManagerNamespace(TrayMapNamespace):
|
|
|
602
605
|
if self._starting:
|
|
603
606
|
raise _reject("voice-active", "a voice session is already live")
|
|
604
607
|
session = self.live()
|
|
605
|
-
if
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
608
|
+
if (
|
|
609
|
+
session is not None
|
|
610
|
+
and session.clientId.value != ctx.caller.client_id
|
|
611
|
+
and self._api.has_subscriber(session.clientId.value)
|
|
612
|
+
):
|
|
613
|
+
raise _reject("voice-active", "a voice session is already live")
|
|
609
614
|
self._starting = True
|
|
610
615
|
try:
|
|
616
|
+
if session is not None:
|
|
617
|
+
await session._end(
|
|
618
|
+
"superseded"
|
|
619
|
+
if session.clientId.value == ctx.caller.client_id
|
|
620
|
+
else "connection-drop"
|
|
621
|
+
)
|
|
611
622
|
seed = _capped_seed(await self._api.get_voice_seed())
|
|
612
623
|
tray = await self.get_or_create(uuid4().hex)
|
|
613
624
|
assert isinstance(tray, VoiceManager)
|
|
@@ -4,7 +4,7 @@ harness_sdk/deepagents.py,sha256=cMipZ9ndZ3zUR3-VqOMf5CiPVMmym74ytIeguQAjYZo,122
|
|
|
4
4
|
harness_sdk/fenced_postgres.py,sha256=hbbrMR1WaqrHTNgd4wFrXfRrzQFGnyim-c8nZXgwWp4,13235
|
|
5
5
|
harness_sdk/linear_thread.py,sha256=laDRXKLFsMlyWS4snqNAM6t38wO26gevLWXRNivhHSM,1810
|
|
6
6
|
harness_sdk/run_manager.py,sha256=ECj7j_xkGn81IngEEGA3MWXUejk9ZqNcH6vzxG6o9yU,78085
|
|
7
|
-
harness_sdk/voice.py,sha256=
|
|
8
|
-
harness_sdk_python-0.32.
|
|
9
|
-
harness_sdk_python-0.32.
|
|
10
|
-
harness_sdk_python-0.32.
|
|
7
|
+
harness_sdk/voice.py,sha256=Piv5ZiXDHxwHjyYT2LPV8SkZYpuhIHav-eBcc-d7d7s,29030
|
|
8
|
+
harness_sdk_python-0.32.2.dist-info/METADATA,sha256=tSCM18hCZyOsrLAvnK1QEMW9DSBK604AFjaRGukAJp8,2200
|
|
9
|
+
harness_sdk_python-0.32.2.dist-info/WHEEL,sha256=zOwg4jB6zX2kU910N-cMawjivD6tO8NEWvE12je1bVk,87
|
|
10
|
+
harness_sdk_python-0.32.2.dist-info/RECORD,,
|
|
File without changes
|