openhands-agent-server 1.9.0__py3-none-any.whl → 1.9.1__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.
@@ -278,8 +278,10 @@ class DiscriminatedUnionEnvParser(EnvParser):
278
278
 
279
279
  def from_env(self, key: str) -> JsonType:
280
280
  kind = os.environ.get(f"{key}_KIND", MISSING)
281
+ kind_missing = False
281
282
  if kind is MISSING:
282
- # If there is exactly one kind, use it directly
283
+ kind_missing = True
284
+ # If there are other fields and there is exactly one kind, use it directly
283
285
  if len(self.parsers) == 1:
284
286
  kind = next(iter(self.parsers.keys()))
285
287
  else:
@@ -294,6 +296,15 @@ class DiscriminatedUnionEnvParser(EnvParser):
294
296
  # Intentionally raise KeyError for invalid KIND - typos should fail early
295
297
  parser = self.parsers[kind]
296
298
  parser_result = parser.from_env(key)
299
+
300
+ # A kind was defined without other fields
301
+ if parser_result is MISSING:
302
+ # If the kind was not defined, the entry is MISSING
303
+ if kind_missing:
304
+ return MISSING
305
+ # Only a kind was defined
306
+ parser_result = {}
307
+
297
308
  # Type narrowing: discriminated union parsers always return dicts
298
309
  parser_result = cast(dict, parser_result)
299
310
  parser_result["kind"] = kind
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: openhands-agent-server
3
- Version: 1.9.0
3
+ Version: 1.9.1
4
4
  Summary: OpenHands Agent Server - REST/WebSocket interface for OpenHands AI Agent
5
5
  Project-URL: Source, https://github.com/OpenHands/software-agent-sdk
6
6
  Project-URL: Homepage, https://github.com/OpenHands/software-agent-sdk
@@ -9,7 +9,7 @@ openhands/agent_server/conversation_service.py,sha256=Oj8IBSY9ZYbduOOBatd3I0H_kS
9
9
  openhands/agent_server/dependencies.py,sha256=H3zyOc8uthpXseB3E7rWNccKIj7PlyfcgCYwFvmFq4c,2629
10
10
  openhands/agent_server/desktop_router.py,sha256=OaCmevO33eUo3jTwiXBmQ3uT3ONu4-tqgBfYpZWrHSA,1349
11
11
  openhands/agent_server/desktop_service.py,sha256=iCwQJXK4DvGuBXKOQ1oko60wXkf_pYHCubOzBsd2k60,7415
12
- openhands/agent_server/env_parser.py,sha256=GDTLy9-k-GBOvpVI8VlYuqN-kLRZw6ieR2TgWFsOIms,16400
12
+ openhands/agent_server/env_parser.py,sha256=6b4-Iegq82crMbwjo1w4C_nu5B0Wm0xysrhGhfiyMF8,16770
13
13
  openhands/agent_server/event_router.py,sha256=XM46zcqPOXStISfihzsPXPfsW_23E50brmBHk04ncVI,6156
14
14
  openhands/agent_server/event_service.py,sha256=EFjIkWbTrROAv2zFzsIOhcRDTZIhf0uIGQStNDg8nFY,26838
15
15
  openhands/agent_server/file_router.py,sha256=MqFmTcDFE42EEPwRncBtT-Vu8_U78OZfC6pm0tnlBZk,4161
@@ -34,8 +34,8 @@ openhands/agent_server/docker/build.py,sha256=UgHoLkgHZtgWqloG2MQ2RCzc6zTIyttOFL
34
34
  openhands/agent_server/docker/wallpaper.svg,sha256=FR2g_b5mzz0x5EvRTKO93ASnWPagAyeS9RI3vRQBAsw,11532
35
35
  openhands/agent_server/vscode_extensions/openhands-settings/extension.js,sha256=xoCKZ6YXlzlTWnTC52HuzX0sn9s77Vma-47WgEibO88,858
36
36
  openhands/agent_server/vscode_extensions/openhands-settings/package.json,sha256=eCkuBBYEVArEjpp7c_m0H207OCLEygZhBLUEkeFNWOg,289
37
- openhands_agent_server-1.9.0.dist-info/METADATA,sha256=xU9j2XKQ9PD1vPh5e7APdXkY4JzfFRlWv-BBe9ZeIEE,748
38
- openhands_agent_server-1.9.0.dist-info/WHEEL,sha256=qELbo2s1Yzl39ZmrAibXA2jjPLUYfnVhUNTlyF1rq0Y,92
39
- openhands_agent_server-1.9.0.dist-info/entry_points.txt,sha256=uLQzPhqDqe85Dy9DvPiBE2CeqkwCryggr1Ty_mq65NA,70
40
- openhands_agent_server-1.9.0.dist-info/top_level.txt,sha256=jHgVu9I0Blam8BXFgedoGKfglPF8XvW1TsJFIjcgP4E,10
41
- openhands_agent_server-1.9.0.dist-info/RECORD,,
37
+ openhands_agent_server-1.9.1.dist-info/METADATA,sha256=B0VjqaMpQpjLUEpETaqh1uOPDKKE28xDE4G4NOnVkRc,748
38
+ openhands_agent_server-1.9.1.dist-info/WHEEL,sha256=qELbo2s1Yzl39ZmrAibXA2jjPLUYfnVhUNTlyF1rq0Y,92
39
+ openhands_agent_server-1.9.1.dist-info/entry_points.txt,sha256=uLQzPhqDqe85Dy9DvPiBE2CeqkwCryggr1Ty_mq65NA,70
40
+ openhands_agent_server-1.9.1.dist-info/top_level.txt,sha256=jHgVu9I0Blam8BXFgedoGKfglPF8XvW1TsJFIjcgP4E,10
41
+ openhands_agent_server-1.9.1.dist-info/RECORD,,