meshagent-anthropic 0.22.2__tar.gz → 0.23.0__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_anthropic-0.22.2 → meshagent_anthropic-0.23.0}/CHANGELOG.md +6 -0
- {meshagent_anthropic-0.22.2/meshagent_anthropic.egg-info → meshagent_anthropic-0.23.0}/PKG-INFO +4 -4
- {meshagent_anthropic-0.22.2 → meshagent_anthropic-0.23.0}/meshagent/anthropic/messages_adapter.py +60 -40
- meshagent_anthropic-0.23.0/meshagent/anthropic/version.py +1 -0
- {meshagent_anthropic-0.22.2 → meshagent_anthropic-0.23.0/meshagent_anthropic.egg-info}/PKG-INFO +4 -4
- meshagent_anthropic-0.23.0/meshagent_anthropic.egg-info/requires.txt +6 -0
- {meshagent_anthropic-0.22.2 → meshagent_anthropic-0.23.0}/pyproject.toml +3 -3
- meshagent_anthropic-0.22.2/meshagent/anthropic/version.py +0 -1
- meshagent_anthropic-0.22.2/meshagent_anthropic.egg-info/requires.txt +0 -6
- {meshagent_anthropic-0.22.2 → meshagent_anthropic-0.23.0}/LICENSE +0 -0
- {meshagent_anthropic-0.22.2 → meshagent_anthropic-0.23.0}/MANIFEST.in +0 -0
- {meshagent_anthropic-0.22.2 → meshagent_anthropic-0.23.0}/README.md +0 -0
- {meshagent_anthropic-0.22.2 → meshagent_anthropic-0.23.0}/meshagent/anthropic/__init__.py +0 -0
- {meshagent_anthropic-0.22.2 → meshagent_anthropic-0.23.0}/meshagent/anthropic/mcp.py +0 -0
- {meshagent_anthropic-0.22.2 → meshagent_anthropic-0.23.0}/meshagent/anthropic/openai_responses_stream_adapter.py +0 -0
- {meshagent_anthropic-0.22.2 → meshagent_anthropic-0.23.0}/meshagent/anthropic/proxy/__init__.py +0 -0
- {meshagent_anthropic-0.22.2 → meshagent_anthropic-0.23.0}/meshagent/anthropic/proxy/proxy.py +0 -0
- {meshagent_anthropic-0.22.2 → meshagent_anthropic-0.23.0}/meshagent/anthropic/tests/anthropic_live_test.py +0 -0
- {meshagent_anthropic-0.22.2 → meshagent_anthropic-0.23.0}/meshagent/anthropic/tests/mcp_test.py +0 -0
- {meshagent_anthropic-0.22.2 → meshagent_anthropic-0.23.0}/meshagent/anthropic/tests/messages_adapter_test.py +0 -0
- {meshagent_anthropic-0.22.2 → meshagent_anthropic-0.23.0}/meshagent/anthropic/tests/openai_responses_stream_adapter_test.py +0 -0
- {meshagent_anthropic-0.22.2 → meshagent_anthropic-0.23.0}/meshagent_anthropic.egg-info/SOURCES.txt +0 -0
- {meshagent_anthropic-0.22.2 → meshagent_anthropic-0.23.0}/meshagent_anthropic.egg-info/dependency_links.txt +0 -0
- {meshagent_anthropic-0.22.2 → meshagent_anthropic-0.23.0}/meshagent_anthropic.egg-info/top_level.txt +0 -0
- {meshagent_anthropic-0.22.2 → meshagent_anthropic-0.23.0}/setup.cfg +0 -0
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
## [0.23.0]
|
|
2
|
+
- Breaking: service template APIs now expect YAML template strings and ServiceTemplateSpec.to_service_spec() no longer accepts values; use ServiceTemplateSpec.from_yaml(..., values) for Jinja rendering
|
|
3
|
+
- Added Jinja/YAML template parsing and ServiceSpec.from_yaml for loading service specs from YAML
|
|
4
|
+
- Added file storage mounts and token role fields in service/container specs
|
|
5
|
+
- Added render_template client method plus new User/UserRoomGrant models and a none project role
|
|
6
|
+
|
|
1
7
|
## [0.22.2]
|
|
2
8
|
- Stability
|
|
3
9
|
|
{meshagent_anthropic-0.22.2/meshagent_anthropic.egg-info → meshagent_anthropic-0.23.0}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: meshagent-anthropic
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.23.0
|
|
4
4
|
Summary: Anthropic Building Blocks for Meshagent
|
|
5
5
|
License-Expression: Apache-2.0
|
|
6
6
|
Project-URL: Documentation, https://docs.meshagent.com
|
|
@@ -11,9 +11,9 @@ Description-Content-Type: text/markdown
|
|
|
11
11
|
License-File: LICENSE
|
|
12
12
|
Requires-Dist: pytest~=8.4
|
|
13
13
|
Requires-Dist: pytest-asyncio~=0.26
|
|
14
|
-
Requires-Dist: meshagent-api~=0.
|
|
15
|
-
Requires-Dist: meshagent-agents~=0.
|
|
16
|
-
Requires-Dist: meshagent-tools~=0.
|
|
14
|
+
Requires-Dist: meshagent-api~=0.23.0
|
|
15
|
+
Requires-Dist: meshagent-agents~=0.23.0
|
|
16
|
+
Requires-Dist: meshagent-tools~=0.23.0
|
|
17
17
|
Requires-Dist: anthropic<1.0,>=0.25
|
|
18
18
|
Dynamic: license-file
|
|
19
19
|
|
{meshagent_anthropic-0.22.2 → meshagent_anthropic-0.23.0}/meshagent/anthropic/messages_adapter.py
RENAMED
|
@@ -153,50 +153,56 @@ class AnthropicMessagesToolResponseAdapter(ToolResponseAdapter):
|
|
|
153
153
|
return [{"role": "user", "content": response.outputs}]
|
|
154
154
|
|
|
155
155
|
tool_result_content: list[dict]
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
156
|
+
try:
|
|
157
|
+
if isinstance(response, FileResponse):
|
|
158
|
+
mime_type = (response.mime_type or "").lower()
|
|
159
|
+
|
|
160
|
+
if mime_type == "image/jpg":
|
|
161
|
+
mime_type = "image/jpeg"
|
|
162
|
+
|
|
163
|
+
if mime_type.startswith("image/"):
|
|
164
|
+
allowed = {"image/jpeg", "image/png", "image/gif", "image/webp"}
|
|
165
|
+
if mime_type not in allowed:
|
|
166
|
+
output = f"{response.name} was returned as {response.mime_type}, which Anthropic does not accept as an image block"
|
|
167
|
+
tool_result_content = [_text_block(output)]
|
|
168
|
+
else:
|
|
169
|
+
tool_result_content = [
|
|
170
|
+
{
|
|
171
|
+
"type": "image",
|
|
172
|
+
"source": {
|
|
173
|
+
"type": "base64",
|
|
174
|
+
"media_type": mime_type,
|
|
175
|
+
"data": base64.b64encode(response.data).decode(
|
|
176
|
+
"utf-8"
|
|
177
|
+
),
|
|
178
|
+
},
|
|
179
|
+
}
|
|
180
|
+
]
|
|
181
|
+
|
|
182
|
+
elif mime_type == "application/pdf":
|
|
169
183
|
tool_result_content = [
|
|
170
184
|
{
|
|
171
|
-
"type": "
|
|
185
|
+
"type": "document",
|
|
186
|
+
"title": response.name,
|
|
172
187
|
"source": {
|
|
173
188
|
"type": "base64",
|
|
174
|
-
"media_type":
|
|
189
|
+
"media_type": "application/pdf",
|
|
175
190
|
"data": base64.b64encode(response.data).decode("utf-8"),
|
|
176
191
|
},
|
|
177
192
|
}
|
|
178
193
|
]
|
|
179
194
|
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
"type": "document",
|
|
184
|
-
"title": response.name,
|
|
185
|
-
"source": {
|
|
186
|
-
"type": "base64",
|
|
187
|
-
"media_type": "application/pdf",
|
|
188
|
-
"data": base64.b64encode(response.data).decode("utf-8"),
|
|
189
|
-
},
|
|
190
|
-
}
|
|
191
|
-
]
|
|
195
|
+
else:
|
|
196
|
+
output = await self.to_plain_text(room=room, response=response)
|
|
197
|
+
tool_result_content = [_text_block(output)]
|
|
192
198
|
|
|
193
199
|
else:
|
|
194
200
|
output = await self.to_plain_text(room=room, response=response)
|
|
195
201
|
tool_result_content = [_text_block(output)]
|
|
196
202
|
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
tool_result_content = [_text_block(
|
|
203
|
+
except Exception as ex:
|
|
204
|
+
logger.error("unable to process tool call results", exc_info=ex)
|
|
205
|
+
tool_result_content = [_text_block(f"Error: {ex}")]
|
|
200
206
|
|
|
201
207
|
message = {
|
|
202
208
|
"role": "user",
|
|
@@ -533,16 +539,30 @@ class AnthropicMessagesAdapter(LLMAdapter[dict]):
|
|
|
533
539
|
on_behalf_of=on_behalf_of,
|
|
534
540
|
caller_context={"chat": context.to_json()},
|
|
535
541
|
)
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
542
|
+
try:
|
|
543
|
+
tool_response = await tool_bundle.execute(
|
|
544
|
+
context=tool_context,
|
|
545
|
+
tool_use=tool_use,
|
|
546
|
+
)
|
|
547
|
+
return await tool_adapter.create_messages(
|
|
548
|
+
context=context,
|
|
549
|
+
tool_call=tool_use,
|
|
550
|
+
room=room,
|
|
551
|
+
response=tool_response,
|
|
552
|
+
)
|
|
553
|
+
except Exception as ex:
|
|
554
|
+
tool_result_content = [_text_block(f"Error: {ex}")]
|
|
555
|
+
message = {
|
|
556
|
+
"role": "user",
|
|
557
|
+
"content": [
|
|
558
|
+
{
|
|
559
|
+
"type": "tool_result",
|
|
560
|
+
"tool_use_id": tool_use.get("id"),
|
|
561
|
+
"content": tool_result_content,
|
|
562
|
+
}
|
|
563
|
+
],
|
|
564
|
+
}
|
|
565
|
+
return [message]
|
|
546
566
|
|
|
547
567
|
for tool_use in tool_uses:
|
|
548
568
|
tasks.append(asyncio.create_task(do_tool(tool_use)))
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.23.0"
|
{meshagent_anthropic-0.22.2 → meshagent_anthropic-0.23.0/meshagent_anthropic.egg-info}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: meshagent-anthropic
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.23.0
|
|
4
4
|
Summary: Anthropic Building Blocks for Meshagent
|
|
5
5
|
License-Expression: Apache-2.0
|
|
6
6
|
Project-URL: Documentation, https://docs.meshagent.com
|
|
@@ -11,9 +11,9 @@ Description-Content-Type: text/markdown
|
|
|
11
11
|
License-File: LICENSE
|
|
12
12
|
Requires-Dist: pytest~=8.4
|
|
13
13
|
Requires-Dist: pytest-asyncio~=0.26
|
|
14
|
-
Requires-Dist: meshagent-api~=0.
|
|
15
|
-
Requires-Dist: meshagent-agents~=0.
|
|
16
|
-
Requires-Dist: meshagent-tools~=0.
|
|
14
|
+
Requires-Dist: meshagent-api~=0.23.0
|
|
15
|
+
Requires-Dist: meshagent-agents~=0.23.0
|
|
16
|
+
Requires-Dist: meshagent-tools~=0.23.0
|
|
17
17
|
Requires-Dist: anthropic<1.0,>=0.25
|
|
18
18
|
Dynamic: license-file
|
|
19
19
|
|
|
@@ -12,9 +12,9 @@ keywords = []
|
|
|
12
12
|
dependencies = [
|
|
13
13
|
"pytest~=8.4",
|
|
14
14
|
"pytest-asyncio~=0.26",
|
|
15
|
-
"meshagent-api~=0.
|
|
16
|
-
"meshagent-agents~=0.
|
|
17
|
-
"meshagent-tools~=0.
|
|
15
|
+
"meshagent-api~=0.23.0",
|
|
16
|
+
"meshagent-agents~=0.23.0",
|
|
17
|
+
"meshagent-tools~=0.23.0",
|
|
18
18
|
"anthropic>=0.25,<1.0"
|
|
19
19
|
]
|
|
20
20
|
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.22.2"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{meshagent_anthropic-0.22.2 → meshagent_anthropic-0.23.0}/meshagent/anthropic/proxy/__init__.py
RENAMED
|
File without changes
|
{meshagent_anthropic-0.22.2 → meshagent_anthropic-0.23.0}/meshagent/anthropic/proxy/proxy.py
RENAMED
|
File without changes
|
|
File without changes
|
{meshagent_anthropic-0.22.2 → meshagent_anthropic-0.23.0}/meshagent/anthropic/tests/mcp_test.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{meshagent_anthropic-0.22.2 → meshagent_anthropic-0.23.0}/meshagent_anthropic.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{meshagent_anthropic-0.22.2 → meshagent_anthropic-0.23.0}/meshagent_anthropic.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|