aixtools 0.2.13__tar.gz → 0.2.15__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.

Potentially problematic release.


This version of aixtools might be problematic. Click here for more details.

Files changed (96) hide show
  1. {aixtools-0.2.13 → aixtools-0.2.15}/PKG-INFO +1 -1
  2. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/_version.py +3 -3
  3. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/logging/log_objects.py +6 -5
  4. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/logging/model_patch_logging.py +6 -6
  5. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/mcp/__init__.py +2 -0
  6. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/mcp/client.py +2 -2
  7. aixtools-0.2.15/aixtools/mcp/exceptions.py +5 -0
  8. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools.egg-info/SOURCES.txt +1 -0
  9. {aixtools-0.2.13 → aixtools-0.2.15}/README.md +0 -0
  10. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/.chainlit/config.toml +0 -0
  11. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/.chainlit/translations/bn.json +0 -0
  12. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/.chainlit/translations/en-US.json +0 -0
  13. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/.chainlit/translations/gu.json +0 -0
  14. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/.chainlit/translations/he-IL.json +0 -0
  15. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/.chainlit/translations/hi.json +0 -0
  16. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/.chainlit/translations/ja.json +0 -0
  17. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/.chainlit/translations/kn.json +0 -0
  18. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/.chainlit/translations/ml.json +0 -0
  19. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/.chainlit/translations/mr.json +0 -0
  20. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/.chainlit/translations/nl.json +0 -0
  21. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/.chainlit/translations/ta.json +0 -0
  22. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/.chainlit/translations/te.json +0 -0
  23. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/.chainlit/translations/zh-CN.json +0 -0
  24. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/__init__.py +0 -0
  25. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/a2a/app.py +0 -0
  26. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/a2a/google_sdk/__init__.py +0 -0
  27. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/a2a/google_sdk/pydantic_ai_adapter/agent_executor.py +0 -0
  28. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/a2a/google_sdk/pydantic_ai_adapter/storage.py +0 -0
  29. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/a2a/google_sdk/remote_agent_connection.py +0 -0
  30. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/a2a/google_sdk/utils.py +0 -0
  31. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/a2a/utils.py +0 -0
  32. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/agents/__init__.py +0 -0
  33. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/agents/agent.py +0 -0
  34. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/agents/agent_batch.py +0 -0
  35. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/agents/print_nodes.py +0 -0
  36. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/agents/prompt.py +0 -0
  37. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/app.py +0 -0
  38. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/auth/__init__.py +0 -0
  39. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/auth/auth.py +0 -0
  40. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/chainlit.md +0 -0
  41. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/compliance/__init__.py +0 -0
  42. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/compliance/private_data.py +0 -0
  43. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/context.py +0 -0
  44. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/db/__init__.py +0 -0
  45. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/db/database.py +0 -0
  46. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/db/vector_db.py +0 -0
  47. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/evals/__init__.py +0 -0
  48. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/evals/__main__.py +0 -0
  49. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/evals/dataset.py +0 -0
  50. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/evals/discovery.py +0 -0
  51. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/evals/run_evals.py +0 -0
  52. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/google/client.py +0 -0
  53. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/log_view/__init__.py +0 -0
  54. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/log_view/app.py +0 -0
  55. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/log_view/display.py +0 -0
  56. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/log_view/export.py +0 -0
  57. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/log_view/filters.py +0 -0
  58. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/log_view/log_utils.py +0 -0
  59. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/log_view/node_summary.py +0 -0
  60. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/logfilters/__init__.py +0 -0
  61. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/logfilters/context_filter.py +0 -0
  62. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/logging/__init__.py +0 -0
  63. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/logging/logging_config.py +0 -0
  64. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/logging/mcp_log_models.py +0 -0
  65. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/logging/mcp_logger.py +0 -0
  66. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/logging/open_telemetry.py +0 -0
  67. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/mcp/example_client.py +0 -0
  68. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/mcp/example_server.py +0 -0
  69. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/mcp/fast_mcp_log.py +0 -0
  70. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/mcp/faulty_mcp.py +0 -0
  71. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/model_patch/model_patch.py +0 -0
  72. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/server/__init__.py +0 -0
  73. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/server/app_mounter.py +0 -0
  74. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/server/path.py +0 -0
  75. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/server/utils.py +0 -0
  76. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/testing/__init__.py +0 -0
  77. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/testing/aix_test_model.py +0 -0
  78. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/testing/mock_tool.py +0 -0
  79. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/testing/model_patch_cache.py +0 -0
  80. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/tools/doctor/__init__.py +0 -0
  81. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/tools/doctor/mcp_tool_doctor.py +0 -0
  82. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/tools/doctor/tool_doctor.py +0 -0
  83. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/tools/doctor/tool_recommendation.py +0 -0
  84. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/utils/__init__.py +0 -0
  85. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/utils/chainlit/cl_agent_show.py +0 -0
  86. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/utils/chainlit/cl_utils.py +0 -0
  87. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/utils/config.py +0 -0
  88. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/utils/config_util.py +0 -0
  89. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/utils/enum_with_description.py +0 -0
  90. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/utils/files.py +0 -0
  91. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/utils/persisted_dict.py +0 -0
  92. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/utils/utils.py +0 -0
  93. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/vault/__init__.py +0 -0
  94. {aixtools-0.2.13 → aixtools-0.2.15}/aixtools/vault/vault.py +0 -0
  95. {aixtools-0.2.13 → aixtools-0.2.15}/pyproject.toml +0 -0
  96. {aixtools-0.2.13 → aixtools-0.2.15}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aixtools
3
- Version: 0.2.13
3
+ Version: 0.2.15
4
4
  Summary: Tools for AI exploration and debugging
5
5
  Requires-Python: >=3.11.2
6
6
  Description-Content-Type: text/markdown
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
28
28
  commit_id: COMMIT_ID
29
29
  __commit_id__: COMMIT_ID
30
30
 
31
- __version__ = version = '0.2.13'
32
- __version_tuple__ = version_tuple = (0, 2, 13)
31
+ __version__ = version = '0.2.15'
32
+ __version_tuple__ = version_tuple = (0, 2, 15)
33
33
 
34
- __commit_id__ = commit_id = 'gb809b4cc2'
34
+ __commit_id__ = commit_id = 'g03781cdd0'
@@ -107,11 +107,11 @@ def safe_deepcopy(obj):
107
107
  return None # fallback for non-serializable, non-introspectable objects
108
108
 
109
109
 
110
- def save_objects_to_logfile(objects: list, log_dir=LOGS_DIR):
110
+ async def save_objects_to_logfile(objects: list, log_dir=LOGS_DIR):
111
111
  """Save the objects to a (pickle) log file"""
112
112
  with ObjectLogger(log_dir=log_dir) as object_logger:
113
113
  for obj in objects:
114
- object_logger.log(obj)
114
+ await object_logger.log(obj)
115
115
 
116
116
 
117
117
  class BaseLogger:
@@ -144,7 +144,7 @@ class ObjectLogger(BaseLogger):
144
144
  log_dir=LOGS_DIR,
145
145
  verbose: bool = True,
146
146
  debug: bool | None = None,
147
- parent_logger: Union["ObjectLogger", NoneType] = None,
147
+ parent_logger: Union["BaseLogger", NoneType] = None,
148
148
  ):
149
149
  self.verbose = verbose
150
150
  self.debug = (
@@ -195,8 +195,9 @@ class ObjectLogger(BaseLogger):
195
195
  elif self.verbose:
196
196
  print(obj, flush=True)
197
197
  obj_to_save = safe_deepcopy(obj)
198
- pickle.dump(obj_to_save, self.file)
199
- self.file.flush() # ensure it's written immediately
198
+ if self.file is not None:
199
+ pickle.dump(obj_to_save, self.file)
200
+ self.file.flush() # ensure it's written immediately
200
201
  except Exception as e: # pylint: disable=broad-exception-caught
201
202
  logger.error("Failed to log object: %s", e)
202
203
  logger.error(traceback.format_exc())
@@ -27,16 +27,16 @@ def log_async_method(fn, agent_logger):
27
27
  # Log request
28
28
  uuid = str(uuid4()) # Create a unique ID for this request
29
29
  log_object = ModelRawRequest(method_name=fn.__name__, request_id=uuid, args=args, kwargs=kwargs)
30
- agent_logger.log(log_object)
30
+ await agent_logger.log(log_object)
31
31
  # Invoke the original method
32
32
  try:
33
33
  result = await fn(*args, **kwargs)
34
34
  # Log results
35
35
  log_object = ModelRawRequestResult(method_name=fn.__name__, request_id=uuid, result=result)
36
- agent_logger.log(log_object)
36
+ await agent_logger.log(log_object)
37
37
  except Exception as e:
38
38
  # Log exception
39
- agent_logger.log(e)
39
+ await agent_logger.log(e)
40
40
  raise e
41
41
  return result
42
42
 
@@ -52,7 +52,7 @@ def log_async_stream(fn, agent_logger):
52
52
  # Log request
53
53
  uuid = str(uuid4()) # Create a unique ID for this request
54
54
  log_object = ModelRawRequest(method_name=fn.__name__, request_id=uuid, args=args, kwargs=kwargs)
55
- agent_logger.log(log_object)
55
+ await agent_logger.log(log_object)
56
56
  # Invoke the original method
57
57
  async with fn(*args, **kwargs) as stream:
58
58
 
@@ -64,12 +64,12 @@ def log_async_stream(fn, agent_logger):
64
64
  log_object = ModelRawRequestYieldItem(
65
65
  method_name=fn.__name__, request_id=uuid, item=item, item_num=item_num
66
66
  )
67
- agent_logger.log(log_object)
67
+ await agent_logger.log(log_object)
68
68
  item_num += 1
69
69
  yield item
70
70
  except Exception as e:
71
71
  # Log exception
72
- agent_logger.log(e)
72
+ await agent_logger.log(e)
73
73
  raise e
74
74
 
75
75
  yield gen()
@@ -2,8 +2,10 @@
2
2
  Model Context Protocol (MCP) implementation for AI agent communication.
3
3
  """
4
4
 
5
+ from aixtools.mcp.exceptions import AixToolError
5
6
  from aixtools.mcp.fast_mcp_log import FastMcpLog
6
7
 
7
8
  __all__ = [
8
9
  "FastMcpLog",
10
+ "AixToolError",
9
11
  ]
@@ -52,7 +52,7 @@ async def default_mcp_log_handler(message: LogMessage):
52
52
  def get_mcp_client(
53
53
  url: str | None = None,
54
54
  command: str | None = None,
55
- args: list[str] = None,
55
+ args: list[str] | None = None,
56
56
  log_handler: callable = default_mcp_log_handler, # type: ignore
57
57
  ) -> MCPServerStreamableHTTP | MCPServerStdio:
58
58
  """
@@ -67,7 +67,7 @@ def get_mcp_client(
67
67
  if args is None:
68
68
  args = []
69
69
  if url:
70
- return MCPServerStreamableHTTP(url="http://127.0.0.1:8089/mcp/", log_handler=log_handler)
70
+ return MCPServerStreamableHTTP(url=url, log_handler=log_handler)
71
71
  if command:
72
72
  return MCPServerStdio(command=command, args=args, log_handler=log_handler)
73
73
  raise ValueError("Either url or command must be provided to create MCP client.")
@@ -0,0 +1,5 @@
1
+ """Custom exceptions for MCP services."""
2
+
3
+
4
+ class AixToolError(Exception):
5
+ """Retryable tool error. Raise this when a tool fails but the operation should be retried."""
@@ -64,6 +64,7 @@ aixtools/mcp/__init__.py
64
64
  aixtools/mcp/client.py
65
65
  aixtools/mcp/example_client.py
66
66
  aixtools/mcp/example_server.py
67
+ aixtools/mcp/exceptions.py
67
68
  aixtools/mcp/fast_mcp_log.py
68
69
  aixtools/mcp/faulty_mcp.py
69
70
  aixtools/model_patch/model_patch.py
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes