meshagent-tools 0.25.1__tar.gz → 0.25.3__tar.gz
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.
- {meshagent_tools-0.25.1 → meshagent_tools-0.25.3}/CHANGELOG.md +10 -0
- {meshagent_tools-0.25.1/meshagent_tools.egg-info → meshagent_tools-0.25.3}/PKG-INFO +2 -2
- {meshagent_tools-0.25.1 → meshagent_tools-0.25.3}/meshagent/tools/tests/tool_decorator_test.py +25 -0
- {meshagent_tools-0.25.1 → meshagent_tools-0.25.3}/meshagent/tools/tool.py +35 -4
- meshagent_tools-0.25.3/meshagent/tools/version.py +1 -0
- {meshagent_tools-0.25.1 → meshagent_tools-0.25.3/meshagent_tools.egg-info}/PKG-INFO +2 -2
- {meshagent_tools-0.25.1 → meshagent_tools-0.25.3}/meshagent_tools.egg-info/requires.txt +1 -1
- {meshagent_tools-0.25.1 → meshagent_tools-0.25.3}/pyproject.toml +1 -1
- meshagent_tools-0.25.1/meshagent/tools/version.py +0 -1
- {meshagent_tools-0.25.1 → meshagent_tools-0.25.3}/LICENSE +0 -0
- {meshagent_tools-0.25.1 → meshagent_tools-0.25.3}/MANIFEST.in +0 -0
- {meshagent_tools-0.25.1 → meshagent_tools-0.25.3}/README.md +0 -0
- {meshagent_tools-0.25.1 → meshagent_tools-0.25.3}/meshagent/tools/__init__.py +0 -0
- {meshagent_tools-0.25.1 → meshagent_tools-0.25.3}/meshagent/tools/blob.py +0 -0
- {meshagent_tools-0.25.1 → meshagent_tools-0.25.3}/meshagent/tools/config.py +0 -0
- {meshagent_tools-0.25.1 → meshagent_tools-0.25.3}/meshagent/tools/container_shell.py +0 -0
- {meshagent_tools-0.25.1 → meshagent_tools-0.25.3}/meshagent/tools/database.py +0 -0
- {meshagent_tools-0.25.1 → meshagent_tools-0.25.3}/meshagent/tools/datetime.py +0 -0
- {meshagent_tools-0.25.1 → meshagent_tools-0.25.3}/meshagent/tools/discovery.py +0 -0
- {meshagent_tools-0.25.1 → meshagent_tools-0.25.3}/meshagent/tools/document_tools.py +0 -0
- {meshagent_tools-0.25.1 → meshagent_tools-0.25.3}/meshagent/tools/hosting.py +0 -0
- {meshagent_tools-0.25.1 → meshagent_tools-0.25.3}/meshagent/tools/multi_tool.py +0 -0
- {meshagent_tools-0.25.1 → meshagent_tools-0.25.3}/meshagent/tools/pydantic.py +0 -0
- {meshagent_tools-0.25.1 → meshagent_tools-0.25.3}/meshagent/tools/script.py +0 -0
- {meshagent_tools-0.25.1 → meshagent_tools-0.25.3}/meshagent/tools/storage.py +0 -0
- {meshagent_tools-0.25.1 → meshagent_tools-0.25.3}/meshagent/tools/strict_schema.py +0 -0
- {meshagent_tools-0.25.1 → meshagent_tools-0.25.3}/meshagent/tools/toolkit.py +0 -0
- {meshagent_tools-0.25.1 → meshagent_tools-0.25.3}/meshagent/tools/uuid.py +0 -0
- {meshagent_tools-0.25.1 → meshagent_tools-0.25.3}/meshagent/tools/web_toolkit.py +0 -0
- {meshagent_tools-0.25.1 → meshagent_tools-0.25.3}/meshagent_tools.egg-info/SOURCES.txt +0 -0
- {meshagent_tools-0.25.1 → meshagent_tools-0.25.3}/meshagent_tools.egg-info/dependency_links.txt +0 -0
- {meshagent_tools-0.25.1 → meshagent_tools-0.25.3}/meshagent_tools.egg-info/top_level.txt +0 -0
- {meshagent_tools-0.25.1 → meshagent_tools-0.25.3}/setup.cfg +0 -0
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
## [0.25.3]
|
|
2
|
+
- Stability
|
|
3
|
+
|
|
4
|
+
## [0.25.2]
|
|
5
|
+
- BREAKING: Agent metadata field renamed from labels to annotations across Python agents and examples.
|
|
6
|
+
- Thread history now limits appended messages to a context window and exposes search/count/range tools for conversation history outside that window.
|
|
7
|
+
- Tool decorator now supports bound instance/class methods as tools.
|
|
8
|
+
- Anthropic adapters omit null/unset fields in serialized payloads and log tool call errors for easier diagnostics.
|
|
9
|
+
- Schema document grep now requires keyword arguments for options like ignore_case.
|
|
10
|
+
|
|
1
11
|
## [0.25.1]
|
|
2
12
|
- Added Anthropic web search and web fetch toolkits, including beta header injection and request middleware support.
|
|
3
13
|
- Added a container-based shell tool to run commands in persistent containers with configurable image, mounts, and environment.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: meshagent-tools
|
|
3
|
-
Version: 0.25.
|
|
3
|
+
Version: 0.25.3
|
|
4
4
|
Summary: Tools for Meshagent
|
|
5
5
|
License-Expression: Apache-2.0
|
|
6
6
|
Project-URL: Documentation, https://docs.meshagent.com
|
|
@@ -12,7 +12,7 @@ License-File: LICENSE
|
|
|
12
12
|
Requires-Dist: pyjwt~=2.10
|
|
13
13
|
Requires-Dist: pytest~=8.4
|
|
14
14
|
Requires-Dist: pytest-asyncio~=0.26
|
|
15
|
-
Requires-Dist: meshagent-api~=0.25.
|
|
15
|
+
Requires-Dist: meshagent-api~=0.25.3
|
|
16
16
|
Requires-Dist: html-to-markdown~=2.24.3
|
|
17
17
|
Requires-Dist: aiohttp[speedups]~=3.13.0
|
|
18
18
|
Requires-Dist: opentelemetry-distro~=0.54b1
|
{meshagent_tools-0.25.1 → meshagent_tools-0.25.3}/meshagent/tools/tests/tool_decorator_test.py
RENAMED
|
@@ -36,6 +36,31 @@ async def test_decorated_tool_executes_with_toolkit():
|
|
|
36
36
|
assert result.json == {"name": "alpha", "count": 2, "flag": True}
|
|
37
37
|
|
|
38
38
|
|
|
39
|
+
class Greeter:
|
|
40
|
+
def __init__(self, prefix: str) -> None:
|
|
41
|
+
self._prefix = prefix
|
|
42
|
+
|
|
43
|
+
@tool(name="greet")
|
|
44
|
+
def greet(self, *, name: str) -> str:
|
|
45
|
+
return f"{self._prefix}{name}"
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
@pytest.mark.asyncio
|
|
49
|
+
async def test_decorated_method_executes_with_toolkit():
|
|
50
|
+
greeter = Greeter("hello ")
|
|
51
|
+
toolkit = Toolkit(name="test", tools=[greeter.greet])
|
|
52
|
+
context = ToolContext(room=object(), caller=object())
|
|
53
|
+
|
|
54
|
+
result = await toolkit.execute(
|
|
55
|
+
context=context,
|
|
56
|
+
name="greet",
|
|
57
|
+
arguments={"name": "mesh"},
|
|
58
|
+
)
|
|
59
|
+
|
|
60
|
+
assert isinstance(result, JsonResponse)
|
|
61
|
+
assert result.json == "hello mesh"
|
|
62
|
+
|
|
63
|
+
|
|
39
64
|
def test_decorator_schema_is_strict():
|
|
40
65
|
schema = make_payload.input_schema
|
|
41
66
|
|
|
@@ -147,7 +147,16 @@ def tool(
|
|
|
147
147
|
supports_context = False
|
|
148
148
|
fields: dict[str, tuple[Any, Any]] = {}
|
|
149
149
|
|
|
150
|
-
|
|
150
|
+
parameters = list(signature.parameters.items())
|
|
151
|
+
bound_param_name = None
|
|
152
|
+
if parameters:
|
|
153
|
+
first_param_name, _first_param = parameters[0]
|
|
154
|
+
if first_param_name in ("self", "cls"):
|
|
155
|
+
bound_param_name = first_param_name
|
|
156
|
+
|
|
157
|
+
for param_name, param in parameters:
|
|
158
|
+
if bound_param_name == param_name:
|
|
159
|
+
continue
|
|
151
160
|
annotation = hints.get(param_name, Any)
|
|
152
161
|
if annotation is ToolContext:
|
|
153
162
|
supports_context = True
|
|
@@ -167,7 +176,7 @@ def tool(
|
|
|
167
176
|
)
|
|
168
177
|
|
|
169
178
|
class FunctionTool(Tool):
|
|
170
|
-
def __init__(self):
|
|
179
|
+
def __init__(self, bound_instance: Optional[object] = None):
|
|
171
180
|
super().__init__(
|
|
172
181
|
name=tool_name,
|
|
173
182
|
title=tool_title,
|
|
@@ -178,6 +187,20 @@ def tool(
|
|
|
178
187
|
supports_context=supports_context,
|
|
179
188
|
)
|
|
180
189
|
self.strict = True
|
|
190
|
+
self._bound_instance = bound_instance
|
|
191
|
+
|
|
192
|
+
def __get__(self, instance, owner):
|
|
193
|
+
if instance is None:
|
|
194
|
+
if bound_param_name == "cls" and owner is not None:
|
|
195
|
+
if self._bound_instance is owner:
|
|
196
|
+
return self
|
|
197
|
+
return FunctionTool(bound_instance=owner)
|
|
198
|
+
return self
|
|
199
|
+
|
|
200
|
+
if self._bound_instance is instance:
|
|
201
|
+
return self
|
|
202
|
+
|
|
203
|
+
return FunctionTool(bound_instance=instance)
|
|
181
204
|
|
|
182
205
|
async def invoke(
|
|
183
206
|
self,
|
|
@@ -188,10 +211,18 @@ def tool(
|
|
|
188
211
|
data = InputModel.model_validate(arguments)
|
|
189
212
|
parsed_args = {field: getattr(data, field) for field in fields}
|
|
190
213
|
|
|
214
|
+
bound_instance = self._bound_instance
|
|
215
|
+
|
|
191
216
|
if supports_context:
|
|
192
|
-
|
|
217
|
+
if bound_instance is not None:
|
|
218
|
+
result = fn(bound_instance, context, **parsed_args)
|
|
219
|
+
else:
|
|
220
|
+
result = fn(context, **parsed_args)
|
|
193
221
|
else:
|
|
194
|
-
|
|
222
|
+
if bound_instance is not None:
|
|
223
|
+
result = fn(bound_instance, **parsed_args)
|
|
224
|
+
else:
|
|
225
|
+
result = fn(**parsed_args)
|
|
195
226
|
|
|
196
227
|
if inspect.isawaitable(result):
|
|
197
228
|
result = await result
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.25.3"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: meshagent-tools
|
|
3
|
-
Version: 0.25.
|
|
3
|
+
Version: 0.25.3
|
|
4
4
|
Summary: Tools for Meshagent
|
|
5
5
|
License-Expression: Apache-2.0
|
|
6
6
|
Project-URL: Documentation, https://docs.meshagent.com
|
|
@@ -12,7 +12,7 @@ License-File: LICENSE
|
|
|
12
12
|
Requires-Dist: pyjwt~=2.10
|
|
13
13
|
Requires-Dist: pytest~=8.4
|
|
14
14
|
Requires-Dist: pytest-asyncio~=0.26
|
|
15
|
-
Requires-Dist: meshagent-api~=0.25.
|
|
15
|
+
Requires-Dist: meshagent-api~=0.25.3
|
|
16
16
|
Requires-Dist: html-to-markdown~=2.24.3
|
|
17
17
|
Requires-Dist: aiohttp[speedups]~=3.13.0
|
|
18
18
|
Requires-Dist: opentelemetry-distro~=0.54b1
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.25.1"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{meshagent_tools-0.25.1 → meshagent_tools-0.25.3}/meshagent_tools.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|