voxagent 0.2.2__py3-none-any.whl → 0.2.3__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.
voxagent/_version.py CHANGED
@@ -1,2 +1,2 @@
1
- __version__ = "0.2.2"
1
+ __version__ = "0.2.3"
2
2
  __version_info__ = tuple(int(x) for x in __version__.split("."))
voxagent/code/agent.py CHANGED
@@ -161,12 +161,34 @@ class CodeModeExecutor:
161
161
  Returns:
162
162
  Tool result or error message
163
163
  """
164
+ import asyncio
165
+ import inspect
166
+
164
167
  key = f"{category}.{tool_name}"
165
168
  if key not in self._tool_implementations:
166
169
  return f"Error: Tool '{key}' not found"
167
170
  try:
168
171
  impl = self._tool_implementations[key]
169
- return impl(**kwargs)
172
+ result = impl(**kwargs)
173
+
174
+ # Handle async functions
175
+ if inspect.iscoroutine(result):
176
+ try:
177
+ loop = asyncio.get_running_loop()
178
+ except RuntimeError:
179
+ loop = None
180
+
181
+ if loop is not None:
182
+ # Already in an async context - create task
183
+ import concurrent.futures
184
+ with concurrent.futures.ThreadPoolExecutor() as executor:
185
+ future = executor.submit(asyncio.run, result)
186
+ return future.result()
187
+ else:
188
+ # Not in async context - run directly
189
+ return asyncio.run(result)
190
+
191
+ return result
170
192
  except Exception as e:
171
193
  return f"Error calling {key}: {e}"
172
194
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: voxagent
3
- Version: 0.2.2
3
+ Version: 0.2.3
4
4
  Summary: A lightweight, model-agnostic LLM provider abstraction with streaming and tool support
5
5
  Project-URL: Homepage, https://github.com/lensator/voxagent
6
6
  Project-URL: Documentation, https://github.com/lensator/voxagent#readme
@@ -1,11 +1,11 @@
1
1
  voxagent/__init__.py,sha256=YMYC95iwWXK26hicGYmd2erNOInrYtohwUVOuNmpTCs,3927
2
- voxagent/_version.py,sha256=J7wj9QEd8bUunHKyIRePkNVXgkSski9nkyTkSv05eO0,87
2
+ voxagent/_version.py,sha256=avoaFz2ddynhpdQn-udgPxrhqWOcXWc2liIjyh_vgkI,87
3
3
  voxagent/py.typed,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
4
4
  voxagent/agent/__init__.py,sha256=eASoU7Zhvw8BtJ-iUqVN06S4fMLkHwDgUZbHeH2AUOM,755
5
5
  voxagent/agent/abort.py,sha256=2Wnnxq8Dcn7wQkKPHrba2o0OeOdzF4NNsl-usgE4CJw,5191
6
6
  voxagent/agent/core.py,sha256=zXDUubx6oWQCj1V997s2zJ0Xj0XCaWIPZNinTNMz2zY,30581
7
7
  voxagent/code/__init__.py,sha256=MzbrYReislAB-lCZEZn_lBEPGjYZyPK-c9RFCq1nSm0,1379
8
- voxagent/code/agent.py,sha256=JJ0Nt7JcbLzzfxbQpJDcUzUWLQcl_m1-oKGNAk9-1h4,8862
8
+ voxagent/code/agent.py,sha256=fVaOlJNvnHJedPCCW5Rmm4_-YRvgcYpaLicXA-8HWxU,9634
9
9
  voxagent/code/sandbox.py,sha256=LP2cwXchDk6mtiYGRb_RmkGNoyPv5OEKQC2h4M89dC0,11669
10
10
  voxagent/code/tool_proxy.py,sha256=wZvRqXoz2SfYTHLpe8tIkpJL6b8fmlU96DSGeYw-HfM,8091
11
11
  voxagent/code/virtual_fs.py,sha256=wgkH7voirgDEeD2xg0yaOxU08qWwF-iqXEWy94n0I5U,7435
@@ -52,6 +52,6 @@ voxagent/tools/registry.py,sha256=MNJzgcmKT0AoMWIky9TJY4WVhzn5dkmjIHsUiZ3mv3U,25
52
52
  voxagent/types/__init__.py,sha256=3VunuprKKEpOR9Cg-UITHJXds_xQ-tfqQb4S7wD3nP4,933
53
53
  voxagent/types/messages.py,sha256=c6hNi9w6C8gbFoFm5fFge35vwJGywaoR_OiPQprfyVs,3494
54
54
  voxagent/types/run.py,sha256=4vYq0pCqH7_7SWbMb1SplWj4TLiE3DELDYMi0HefFmo,5071
55
- voxagent-0.2.2.dist-info/METADATA,sha256=T01f3z-CMqWlAm4QKzRZS5LcuaCxEuu2GA1p1ULNOnc,5685
56
- voxagent-0.2.2.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
57
- voxagent-0.2.2.dist-info/RECORD,,
55
+ voxagent-0.2.3.dist-info/METADATA,sha256=lxBJ9wIDJhCCLGb4P_ps9C0d5kfYVdTAHZNyDer9vYU,5685
56
+ voxagent-0.2.3.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
57
+ voxagent-0.2.3.dist-info/RECORD,,