voxagent 0.1.0__py3-none-any.whl → 0.1.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.
voxagent/_version.py CHANGED
@@ -1,5 +1,2 @@
1
- """Version information for voxagent."""
2
-
3
- __version__ = "0.1.0"
1
+ __version__ = "0.1.1"
4
2
  __version_info__ = tuple(int(x) for x in __version__.split("."))
5
-
voxagent/mcp/tool.py CHANGED
@@ -9,7 +9,8 @@ from __future__ import annotations
9
9
  import re
10
10
  from typing import TYPE_CHECKING, Any
11
11
 
12
- from voxagent.tools.definition import ToolContext, ToolDefinition
12
+ from voxagent.tools.context import ToolContext
13
+ from voxagent.tools.definition import ToolDefinition
13
14
 
14
15
  if TYPE_CHECKING:
15
16
  pass
@@ -86,8 +86,8 @@ def _build_parameters_schema(fn: Callable[..., Any]) -> dict[str, Any]:
86
86
  required: list[str] = []
87
87
 
88
88
  for param_name, param in sig.parameters.items():
89
- # Skip 'context' parameter (ToolContext)
90
- if param_name == "context":
89
+ # Skip 'context' or 'ctx' parameter (ToolContext)
90
+ if param_name in ("context", "ctx"):
91
91
  continue
92
92
 
93
93
  # Skip *args and **kwargs
@@ -1,31 +1,16 @@
1
1
  """Tool definition classes.
2
2
 
3
- This module provides ToolDefinition and ToolContext for the agent tool system.
3
+ This module provides ToolDefinition for the agent tool system.
4
+ ToolContext is now defined in context.py for centralized management.
4
5
  """
5
6
 
6
7
  from __future__ import annotations
7
8
 
8
- import asyncio
9
9
  import inspect
10
- from typing import Any, Callable
10
+ from typing import TYPE_CHECKING, Any, Callable
11
11
 
12
-
13
- class ToolContext:
14
- """Context passed to tool functions during execution.
15
-
16
- Provides access to abort signals, dependencies, and other runtime context.
17
-
18
- Attributes:
19
- abort_signal: An asyncio.Event that can be used to signal cancellation.
20
- """
21
-
22
- def __init__(self, abort_signal: asyncio.Event | None = None) -> None:
23
- """Initialize ToolContext.
24
-
25
- Args:
26
- abort_signal: Optional event for signaling tool cancellation.
27
- """
28
- self.abort_signal = abort_signal
12
+ if TYPE_CHECKING:
13
+ from voxagent.tools.context import ToolContext
29
14
 
30
15
 
31
16
  class ToolDefinition:
@@ -86,15 +71,16 @@ class ToolDefinition:
86
71
  The result from the tool execution.
87
72
  """
88
73
  # Check if execute function accepts 'context' or 'ctx' parameter
74
+ # Prefer 'ctx' over 'context' since 'context' might be a user parameter
89
75
  sig = inspect.signature(self.execute)
90
- accepts_context = "context" in sig.parameters
91
76
  accepts_ctx = "ctx" in sig.parameters
77
+ accepts_context = "context" in sig.parameters
92
78
 
93
79
  call_params = dict(params)
94
- if accepts_context:
95
- call_params["context"] = context
96
- elif accepts_ctx:
80
+ if accepts_ctx:
97
81
  call_params["ctx"] = context
82
+ elif accepts_context:
83
+ call_params["context"] = context
98
84
 
99
85
  if self.is_async:
100
86
  return await self.execute(**call_params)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: voxagent
3
- Version: 0.1.0
3
+ Version: 0.1.1
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,5 +1,5 @@
1
1
  voxagent/__init__.py,sha256=YMYC95iwWXK26hicGYmd2erNOInrYtohwUVOuNmpTCs,3927
2
- voxagent/_version.py,sha256=UZNgW5i4fgEyRh_mbeD3SQyS6bLMfXkimp37vJd2Kso,129
2
+ voxagent/_version.py,sha256=dci_7AJwV3XNR3Hhs5EbgyENsGHyAr6FK5tHu7zs4M4,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
@@ -7,7 +7,7 @@ voxagent/agent/core.py,sha256=zXDUubx6oWQCj1V997s2zJ0Xj0XCaWIPZNinTNMz2zY,30581
7
7
  voxagent/code/__init__.py,sha256=6-i-FjYxwNay7XvWt9kwwg2nk3wPNzRp54AtEBdQ13U,237
8
8
  voxagent/mcp/__init__.py,sha256=_3Rsn7nIuivdWLv0MzpyjRGsPuCgr4LrXCge6FCb3nE,470
9
9
  voxagent/mcp/manager.py,sha256=sECOhw-f6HB6NV-mBqcgJzsEt28acdQI_O2cT-41Rxw,6606
10
- voxagent/mcp/tool.py,sha256=j_p5Kmra_g69vucohQRr0xguy6lXPFzwSAdX4OFsNK4,5113
10
+ voxagent/mcp/tool.py,sha256=YQQqXNcanDDr5tkL1Z5OjNsDI5dWMEzm_SlJ4pOcUpk,5147
11
11
  voxagent/providers/__init__.py,sha256=lUmbIoiVFSX-CqfrVYiS5Rbriy_U061NR0vC4qChWR8,3202
12
12
  voxagent/providers/anthropic.py,sha256=A9aJUBc2nwqFdtvh5CyHp0GSQR82DaxwJQsgA79cffg,15889
13
13
  voxagent/providers/augment.py,sha256=K8ORZsOh88FBh4d7pYZUgMQHtQXnhJizpjwGkbWf53Y,8623
@@ -40,14 +40,14 @@ voxagent/subagent/context.py,sha256=2JCzHxavVASkeTfS99Q6tzPamT3moLgHM9MFWfFs7m8,
40
40
  voxagent/subagent/definition.py,sha256=pbBvuUdUjfCeFbTASGhd_ljceADHy9hL2iEuMxDtHlk,5803
41
41
  voxagent/tools/__init__.py,sha256=JJ66f_fjwdcVmLwyp3B0sQA1RVPZN0PdS-SJPMU2nGU,867
42
42
  voxagent/tools/context.py,sha256=0DWC2QF-1vWMmst-4IoEtAovzE-g1f8hhmboQpXWH1w,1343
43
- voxagent/tools/decorator.py,sha256=fQj2kOcCeVRZ21XbrZ9TDBx6OOFZ-waxDoLNsGc7z-o,5030
44
- voxagent/tools/definition.py,sha256=OfYwO402gDGbbRjjcr0dJTWsEBOQLkhJmdIIiVSHA6A,4113
43
+ voxagent/tools/decorator.py,sha256=0wQnQa3g4deE95czi9zA8HPIokORtXJBn3THDy7Vs1s,5048
44
+ voxagent/tools/definition.py,sha256=Qxh1XNt15f0723bfBp3W6xbSL7ghACX0FEkjBSgrC3s,3799
45
45
  voxagent/tools/executor.py,sha256=fK3DlS9c3ROVx2ixbAiAn-0e13GYBe6jOyHqze3AJig,2678
46
46
  voxagent/tools/policy.py,sha256=mCdYYnITrVTg9w5bwiCMOiXknrU1SQza_qZo02juQdg,2496
47
47
  voxagent/tools/registry.py,sha256=MNJzgcmKT0AoMWIky9TJY4WVhzn5dkmjIHsUiZ3mv3U,2593
48
48
  voxagent/types/__init__.py,sha256=3VunuprKKEpOR9Cg-UITHJXds_xQ-tfqQb4S7wD3nP4,933
49
49
  voxagent/types/messages.py,sha256=c6hNi9w6C8gbFoFm5fFge35vwJGywaoR_OiPQprfyVs,3494
50
50
  voxagent/types/run.py,sha256=4vYq0pCqH7_7SWbMb1SplWj4TLiE3DELDYMi0HefFmo,5071
51
- voxagent-0.1.0.dist-info/METADATA,sha256=2Rx_AsdBcjXYytjFNIR03hZ-53mN3Nz-rntojpKAVcc,5610
52
- voxagent-0.1.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
53
- voxagent-0.1.0.dist-info/RECORD,,
51
+ voxagent-0.1.1.dist-info/METADATA,sha256=ybDiX1x6IsHgK-mxSOHQhKviowAM0aNyksgcBkQ2BzU,5610
52
+ voxagent-0.1.1.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
53
+ voxagent-0.1.1.dist-info/RECORD,,