agently 4.0.6.1__tar.gz → 4.0.6.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.
Files changed (76) hide show
  1. {agently-4.0.6.1 → agently-4.0.6.3}/PKG-INFO +1 -2
  2. {agently-4.0.6.1 → agently-4.0.6.3}/agently/builtins/plugins/ToolManager/AgentlyToolManager.py +15 -2
  3. {agently-4.0.6.1 → agently-4.0.6.3}/agently/utils/Storage.py +2 -1
  4. {agently-4.0.6.1 → agently-4.0.6.3}/agently/utils/__init__.py +2 -1
  5. {agently-4.0.6.1 → agently-4.0.6.3}/pyproject.toml +1 -2
  6. {agently-4.0.6.1 → agently-4.0.6.3}/LICENSE +0 -0
  7. {agently-4.0.6.1 → agently-4.0.6.3}/README.md +0 -0
  8. {agently-4.0.6.1 → agently-4.0.6.3}/agently/__init__.py +0 -0
  9. {agently-4.0.6.1 → agently-4.0.6.3}/agently/_default_init.py +0 -0
  10. {agently-4.0.6.1 → agently-4.0.6.3}/agently/_default_settings.yaml +0 -0
  11. {agently-4.0.6.1 → agently-4.0.6.3}/agently/base.py +0 -0
  12. {agently-4.0.6.1 → agently-4.0.6.3}/agently/builtins/agent_extensions/AutoFuncExtension.py +0 -0
  13. {agently-4.0.6.1 → agently-4.0.6.3}/agently/builtins/agent_extensions/ChatSessionExtension.py +0 -0
  14. {agently-4.0.6.1 → agently-4.0.6.3}/agently/builtins/agent_extensions/ConfigurePromptExtension.py +0 -0
  15. {agently-4.0.6.1 → agently-4.0.6.3}/agently/builtins/agent_extensions/KeyWaiterExtension.py +0 -0
  16. {agently-4.0.6.1 → agently-4.0.6.3}/agently/builtins/agent_extensions/ToolExtension.py +0 -0
  17. {agently-4.0.6.1 → agently-4.0.6.3}/agently/builtins/agent_extensions/__init__.py +0 -0
  18. {agently-4.0.6.1 → agently-4.0.6.3}/agently/builtins/hookers/ConsoleHooker.py +0 -0
  19. {agently-4.0.6.1 → agently-4.0.6.3}/agently/builtins/hookers/PureLoggerHooker.py +0 -0
  20. {agently-4.0.6.1 → agently-4.0.6.3}/agently/builtins/hookers/SystemMessageHooker.py +0 -0
  21. {agently-4.0.6.1 → agently-4.0.6.3}/agently/builtins/plugins/ModelRequester/OpenAICompatible.py +0 -0
  22. {agently-4.0.6.1 → agently-4.0.6.3}/agently/builtins/plugins/PromptGenerator/AgentlyPromptGenerator.py +0 -0
  23. {agently-4.0.6.1 → agently-4.0.6.3}/agently/builtins/plugins/ResponseParser/AgentlyResponseParser.py +0 -0
  24. {agently-4.0.6.1 → agently-4.0.6.3}/agently/builtins/plugins/__init__.py +0 -0
  25. {agently-4.0.6.1 → agently-4.0.6.3}/agently/builtins/tools/Browse.py +0 -0
  26. {agently-4.0.6.1 → agently-4.0.6.3}/agently/builtins/tools/Search.py +0 -0
  27. {agently-4.0.6.1 → agently-4.0.6.3}/agently/builtins/tools/__init__.py +0 -0
  28. {agently-4.0.6.1 → agently-4.0.6.3}/agently/core/Agent.py +0 -0
  29. {agently-4.0.6.1 → agently-4.0.6.3}/agently/core/EventCenter.py +0 -0
  30. {agently-4.0.6.1 → agently-4.0.6.3}/agently/core/ExtensionHandlers.py +0 -0
  31. {agently-4.0.6.1 → agently-4.0.6.3}/agently/core/ModelRequest.py +0 -0
  32. {agently-4.0.6.1 → agently-4.0.6.3}/agently/core/PluginManager.py +0 -0
  33. {agently-4.0.6.1 → agently-4.0.6.3}/agently/core/Prompt.py +0 -0
  34. {agently-4.0.6.1 → agently-4.0.6.3}/agently/core/Tool.py +0 -0
  35. {agently-4.0.6.1 → agently-4.0.6.3}/agently/core/TriggerFlow/BluePrint.py +0 -0
  36. {agently-4.0.6.1 → agently-4.0.6.3}/agently/core/TriggerFlow/Chunk.py +0 -0
  37. {agently-4.0.6.1 → agently-4.0.6.3}/agently/core/TriggerFlow/Execution.py +0 -0
  38. {agently-4.0.6.1 → agently-4.0.6.3}/agently/core/TriggerFlow/Process.py +0 -0
  39. {agently-4.0.6.1 → agently-4.0.6.3}/agently/core/TriggerFlow/TriggerFlow.py +0 -0
  40. {agently-4.0.6.1 → agently-4.0.6.3}/agently/core/TriggerFlow/__init__.py +0 -0
  41. {agently-4.0.6.1 → agently-4.0.6.3}/agently/core/TriggerFlow/process/BaseProcess.py +0 -0
  42. {agently-4.0.6.1 → agently-4.0.6.3}/agently/core/TriggerFlow/process/ForEachProcess.py +0 -0
  43. {agently-4.0.6.1 → agently-4.0.6.3}/agently/core/TriggerFlow/process/MatchCaseProcess.py +0 -0
  44. {agently-4.0.6.1 → agently-4.0.6.3}/agently/core/TriggerFlow/process/__init__.py +0 -0
  45. {agently-4.0.6.1 → agently-4.0.6.3}/agently/core/__init__.py +0 -0
  46. {agently-4.0.6.1 → agently-4.0.6.3}/agently/integrations/chromadb.py +0 -0
  47. {agently-4.0.6.1 → agently-4.0.6.3}/agently/types/__init__.py +0 -0
  48. {agently-4.0.6.1 → agently-4.0.6.3}/agently/types/data/__init__.py +0 -0
  49. {agently-4.0.6.1 → agently-4.0.6.3}/agently/types/data/event.py +0 -0
  50. {agently-4.0.6.1 → agently-4.0.6.3}/agently/types/data/prompt.py +0 -0
  51. {agently-4.0.6.1 → agently-4.0.6.3}/agently/types/data/request.py +0 -0
  52. {agently-4.0.6.1 → agently-4.0.6.3}/agently/types/data/response.py +0 -0
  53. {agently-4.0.6.1 → agently-4.0.6.3}/agently/types/data/serializable.py +0 -0
  54. {agently-4.0.6.1 → agently-4.0.6.3}/agently/types/data/tool.py +0 -0
  55. {agently-4.0.6.1 → agently-4.0.6.3}/agently/types/plugins/EventHooker.py +0 -0
  56. {agently-4.0.6.1 → agently-4.0.6.3}/agently/types/plugins/ModelRequester.py +0 -0
  57. {agently-4.0.6.1 → agently-4.0.6.3}/agently/types/plugins/PromptGenerator.py +0 -0
  58. {agently-4.0.6.1 → agently-4.0.6.3}/agently/types/plugins/ResponseParser.py +0 -0
  59. {agently-4.0.6.1 → agently-4.0.6.3}/agently/types/plugins/ToolManager.py +0 -0
  60. {agently-4.0.6.1 → agently-4.0.6.3}/agently/types/plugins/__init__.py +0 -0
  61. {agently-4.0.6.1 → agently-4.0.6.3}/agently/types/plugins/base.py +0 -0
  62. {agently-4.0.6.1 → agently-4.0.6.3}/agently/types/trigger_flow/__init__.py +0 -0
  63. {agently-4.0.6.1 → agently-4.0.6.3}/agently/types/trigger_flow/trigger_flow.py +0 -0
  64. {agently-4.0.6.1 → agently-4.0.6.3}/agently/utils/DataFormatter.py +0 -0
  65. {agently-4.0.6.1 → agently-4.0.6.3}/agently/utils/DataLocator.py +0 -0
  66. {agently-4.0.6.1 → agently-4.0.6.3}/agently/utils/DataPathBuilder.py +0 -0
  67. {agently-4.0.6.1 → agently-4.0.6.3}/agently/utils/FunctionShifter.py +0 -0
  68. {agently-4.0.6.1 → agently-4.0.6.3}/agently/utils/GeneratorConsumer.py +0 -0
  69. {agently-4.0.6.1 → agently-4.0.6.3}/agently/utils/LazyImport.py +0 -0
  70. {agently-4.0.6.1 → agently-4.0.6.3}/agently/utils/Logger.py +0 -0
  71. {agently-4.0.6.1 → agently-4.0.6.3}/agently/utils/Messenger.py +0 -0
  72. {agently-4.0.6.1 → agently-4.0.6.3}/agently/utils/RuntimeData.py +0 -0
  73. {agently-4.0.6.1 → agently-4.0.6.3}/agently/utils/SerializableRuntimeData.py +0 -0
  74. {agently-4.0.6.1 → agently-4.0.6.3}/agently/utils/Settings.py +0 -0
  75. {agently-4.0.6.1 → agently-4.0.6.3}/agently/utils/StreamingJSONCompleter.py +0 -0
  76. {agently-4.0.6.1 → agently-4.0.6.3}/agently/utils/StreamingJSONParser.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: agently
3
- Version: 4.0.6.1
3
+ Version: 4.0.6.3
4
4
  Summary:
5
5
  License: Apache-2.0
6
6
  License-File: LICENSE
@@ -14,7 +14,6 @@ Classifier: Programming Language :: Python :: 3.11
14
14
  Classifier: Programming Language :: Python :: 3.12
15
15
  Classifier: Programming Language :: Python :: 3.13
16
16
  Classifier: Programming Language :: Python :: 3.14
17
- Requires-Dist: aiosqlite (>=0.21.0,<0.22.0)
18
17
  Requires-Dist: greenlet (>=3.2.3,<4.0.0)
19
18
  Requires-Dist: httpx (>=0.28.1,<0.29.0)
20
19
  Requires-Dist: httpx-sse (>=0.4.1,<0.5.0)
@@ -12,7 +12,7 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
-
15
+ import json
16
16
  import inspect
17
17
 
18
18
  from typing import (
@@ -206,6 +206,7 @@ class AgentlyToolManager(ToolManager):
206
206
  ):
207
207
  async def _call_mcp_tool(**kwargs):
208
208
  from fastmcp import Client
209
+ from mcp.types import TextContent, ImageContent, AudioContent, ResourceLink, EmbeddedResource
209
210
 
210
211
  async with Client(transport) as client: # type: ignore
211
212
  mcp_result = await client.call_tool(
@@ -216,7 +217,19 @@ class AgentlyToolManager(ToolManager):
216
217
  if mcp_result.is_error:
217
218
  return {"error": mcp_result.content[0].text} # type: ignore
218
219
  else:
219
- return mcp_result.structured_content
220
+ if mcp_result.structured_content:
221
+ return mcp_result.structured_content
222
+ try:
223
+ result = mcp_result.content[0]
224
+ if isinstance(result, TextContent):
225
+ try:
226
+ return json.loads(result.text)
227
+ except json.decoder.JSONDecodeError:
228
+ return result.text
229
+ elif isinstance(result, (ImageContent, AudioContent, ResourceLink, EmbeddedResource)):
230
+ return result.model_dump()
231
+ except:
232
+ return None
220
233
 
221
234
  return _call_mcp_tool
222
235
 
@@ -25,10 +25,11 @@ from typing import (
25
25
  )
26
26
  from contextlib import asynccontextmanager
27
27
 
28
- from agently.utils import LazyImport
28
+ from .LazyImport import LazyImport
29
29
 
30
30
  LazyImport.import_package("sqlmodel")
31
31
  LazyImport.import_package("sqlalchemy")
32
+ LazyImport.import_package("aiosqlite")
32
33
 
33
34
  from sqlmodel import SQLModel, select, inspect, create_engine, Session # type: ignore
34
35
  from sqlalchemy.ext.asyncio import create_async_engine, AsyncSession, async_sessionmaker # type: ignore
@@ -17,7 +17,8 @@ from .Messenger import create_messenger
17
17
  from .RuntimeData import RuntimeData, RuntimeDataNamespace
18
18
  from .SerializableRuntimeData import SerializableRuntimeData, SerializableRuntimeDataNamespace
19
19
  from .Settings import Settings, SettingsNamespace
20
- from .Storage import Storage, AsyncStorage
20
+
21
+ # from .Storage import Storage, AsyncStorage
21
22
  from .FunctionShifter import FunctionShifter
22
23
  from .DataFormatter import DataFormatter
23
24
  from .DataPathBuilder import DataPathBuilder
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "agently"
3
- version = "4.0.6.1"
3
+ version = "4.0.6.3"
4
4
  description = ""
5
5
  authors = [
6
6
  {name = "Agently Team",email = "developer@agently.tech"},
@@ -17,7 +17,6 @@ dependencies = [
17
17
  "pyyaml (>=6.0.2,<7.0.0)",
18
18
  "httpx-sse (>=0.4.1,<0.5.0)",
19
19
  "json5 (>=0.12.0,<0.13.0)",
20
- "aiosqlite (>=0.21.0,<0.22.0)",
21
20
  "greenlet (>=3.2.3,<4.0.0)",
22
21
  "packaging (>=25.0,<26.0)"
23
22
  ]
File without changes
File without changes
File without changes
File without changes