reactor-sdk 0.1.0__py3-none-any.whl → 0.1.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.
reactor_sdk/__init__.py CHANGED
@@ -20,6 +20,13 @@ Example:
20
20
  await reactor.connect()
21
21
  """
22
22
 
23
+ from importlib.metadata import version, PackageNotFoundError
24
+
25
+ try:
26
+ __version__ = version("reactor-sdk")
27
+ except PackageNotFoundError:
28
+ __version__ = "0.0.0.dev"
29
+
23
30
  # Main class
24
31
  from reactor_sdk.interface import Reactor
25
32
 
@@ -52,6 +59,5 @@ __all__ = [
52
59
  "GPUMachineEvent",
53
60
  "FrameCallback",
54
61
  "ConflictError",
62
+ "__version__",
55
63
  ]
56
-
57
- __version__ = "0.1.0"
reactor_sdk/reactor.py CHANGED
@@ -700,7 +700,15 @@ class _ReactorImpl:
700
700
  return
701
701
 
702
702
  def on_application(message: Any) -> None:
703
- self._emit("new_message", message)
703
+ # Unwrap "application" envelope if present - the runtime wraps
704
+ # outgoing app messages in {"type": "application", "data": ...}
705
+ if isinstance(message, dict) and message.get("type") == "application" and "data" in message:
706
+ self._emit("new_message", message["data"])
707
+ else:
708
+ # Emit full message when no envelope wrapper is present.
709
+ # This is crucial for compatibility with capabilities responses
710
+ # which are sent as raw {"commands": {...}} without envelope.
711
+ self._emit("new_message", message)
704
712
 
705
713
  def on_status_changed(status: GPUMachineStatus) -> None:
706
714
  if status == GPUMachineStatus.CONNECTED:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: reactor-sdk
3
- Version: 0.1.0
3
+ Version: 0.1.2
4
4
  Summary: Python SDK for Reactor - Real-time AI video streaming
5
5
  Project-URL: Homepage, https://reactor.inc
6
6
  Project-URL: Documentation, https://docs.reactor.inc
@@ -1,7 +1,7 @@
1
- reactor_sdk/__init__.py,sha256=ArlbpKS9m9Lnk_qPzQCKr9cLnbo2QafhqbtVZvPhSM4,1141
1
+ reactor_sdk/__init__.py,sha256=lbNSQmKyzl3ZhKfYNAdlEd0y5ntRdweKXgPS9Vj3tAc,1305
2
2
  reactor_sdk/interface.py,sha256=KZepoLJgIpw5DUUud-fgSf_37NwIRVLBwaH3zECMEWI,6356
3
3
  reactor_sdk/py.typed,sha256=SHDQjboaDzPjXhn4h87KOQ0MfRZ2aE-z-5GO9p6eUsY,67
4
- reactor_sdk/reactor.py,sha256=YWlj6LtWQ8AqJEkRQmcXGyXB85pwoGpAfMMXeRKj8TA,25346
4
+ reactor_sdk/reactor.py,sha256=LQ2p7AESCUno779oXW3EaagKN44cCx6Uhhqdxh5TegQ,25914
5
5
  reactor_sdk/types.py,sha256=Z1rryNF8d4OlXpCgB9qWQSCUBRzZq6bkJ_b7uvEInfc,6486
6
6
  reactor_sdk/coordinator/__init__.py,sha256=J4rU6pLpaK2F9B8WwJ5Bq1vZuA4GDtTs00x94dWv6Xs,331
7
7
  reactor_sdk/coordinator/client.py,sha256=_W5yWL_hpq6NyKeMj-1LtE-oZBhTerg1OQbdvbsMAzw,12210
@@ -11,7 +11,7 @@ reactor_sdk/model/client.py,sha256=g0Ep_krVpYXaQV6yVQ7w2vDw2gpq3dNdxff9F8tpc-A,2
11
11
  reactor_sdk/utils/__init__.py,sha256=bFoJC1xKWp0yJtFpe3m92713peW-hkY0lAFVk6TOGog,579
12
12
  reactor_sdk/utils/tokens.py,sha256=12ruVwM-G6IHB6E0wtwyP5l_SR5J1oR15-QHrcQfYMQ,1722
13
13
  reactor_sdk/utils/webrtc.py,sha256=8VOFy2z7yEJzv7qbY6032qECmxs5VeFbC1LYLVunEvo,8268
14
- reactor_sdk-0.1.0.dist-info/METADATA,sha256=Y20MW84oa0BoGTK2MtPLWVVkqhsHES7I-DbmLPf2uQI,5828
15
- reactor_sdk-0.1.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
16
- reactor_sdk-0.1.0.dist-info/licenses/LICENSE,sha256=CkDoTv8jJieKzduDY7CaXPOki4G_w6Y6FispatCeSeE,1083
17
- reactor_sdk-0.1.0.dist-info/RECORD,,
14
+ reactor_sdk-0.1.2.dist-info/METADATA,sha256=9B5H5BPjs1LD3rBTIPVZOHeYsAfIqSFiMaGFkZlq9sc,5828
15
+ reactor_sdk-0.1.2.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
16
+ reactor_sdk-0.1.2.dist-info/licenses/LICENSE,sha256=CkDoTv8jJieKzduDY7CaXPOki4G_w6Y6FispatCeSeE,1083
17
+ reactor_sdk-0.1.2.dist-info/RECORD,,