alita-sdk 0.3.177__py3-none-any.whl → 0.3.178__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.
@@ -15,19 +15,19 @@ def _safe_import_tool(tool_name, module_path, get_tools_name=None, toolkit_class
15
15
  """Safely import a tool module and register available functions/classes."""
16
16
  try:
17
17
  module = __import__(f'alita_sdk.tools.{module_path}', fromlist=[''])
18
-
18
+
19
19
  imported = {}
20
20
  if get_tools_name and hasattr(module, get_tools_name):
21
21
  imported['get_tools'] = getattr(module, get_tools_name)
22
-
22
+
23
23
  if toolkit_class_name and hasattr(module, toolkit_class_name):
24
24
  imported['toolkit_class'] = getattr(module, toolkit_class_name)
25
25
  AVAILABLE_TOOLKITS[toolkit_class_name] = getattr(module, toolkit_class_name)
26
-
26
+
27
27
  if imported:
28
28
  AVAILABLE_TOOLS[tool_name] = imported
29
29
  logger.debug(f"Successfully imported {tool_name}")
30
-
30
+
31
31
  except Exception as e:
32
32
  FAILED_IMPORTS[tool_name] = str(e)
33
33
  logger.debug(f"Failed to import {tool_name}: {e}")
@@ -92,7 +92,7 @@ def get_tools(tools_list, alita, llm, store: Optional[BaseStore] = None, *args,
92
92
  for tool_name in tool.get('settings', {}).get('selected_tools', []):
93
93
  if isinstance(tool_name, str) and tool_name.startswith('_'):
94
94
  raise ValueError(f"Tool name '{tool_name}' from toolkit '{tool.get('type', '')}' cannot start with '_'")
95
-
95
+
96
96
  tool['settings']['alita'] = alita
97
97
  tool['settings']['llm'] = llm
98
98
  tool['settings']['store'] = store
@@ -107,10 +107,10 @@ def get_tools(tools_list, alita, llm, store: Optional[BaseStore] = None, *args,
107
107
  try:
108
108
  get_tools_func = AVAILABLE_TOOLS[tool_type]['get_tools']
109
109
  tools.extend(get_tools_func(tool))
110
-
110
+
111
111
  except Exception as e:
112
112
  logger.error(f"Error getting tools for {tool_type}: {e}")
113
-
113
+
114
114
  # Handle ADO repos special case (it might be requested as azure_devops_repos)
115
115
  elif tool_type in ['ado_repos', 'azure_devops_repos'] and 'ado_repos' in AVAILABLE_TOOLS:
116
116
  try:
@@ -118,31 +118,35 @@ def get_tools(tools_list, alita, llm, store: Optional[BaseStore] = None, *args,
118
118
  tools.extend(get_tools_func(tool))
119
119
  except Exception as e:
120
120
  logger.error(f"Error getting ADO repos tools: {e}")
121
-
121
+
122
122
  # Handle custom modules
123
123
  elif tool.get("settings", {}).get("module"):
124
124
  try:
125
125
  settings = tool.get("settings", {})
126
126
  mod = import_module(settings.pop("module"))
127
127
  tkitclass = getattr(mod, settings.pop("class"))
128
- toolkit = tkitclass.get_toolkit(**tool["settings"])
128
+ #
129
+ get_toolkit_params = tool["settings"].copy()
130
+ get_toolkit_params["name"] = tool.get("name")
131
+ #
132
+ toolkit = tkitclass.get_toolkit(**get_toolkit_params)
129
133
  tools.extend(toolkit.get_tools())
130
134
  except Exception as e:
131
135
  logger.error(f"Error in getting custom toolkit: {e}")
132
-
136
+
133
137
  else:
134
138
  # Tool not available or not found
135
139
  if tool_type in FAILED_IMPORTS:
136
140
  logger.warning(f"Tool '{tool_type}' is not available: {FAILED_IMPORTS[tool_type]}")
137
141
  else:
138
142
  logger.warning(f"Unknown tool type: {tool_type}")
139
-
143
+
140
144
  return tools
141
145
 
142
146
  def get_toolkits():
143
147
  """Return toolkit configurations for all successfully imported toolkits."""
144
148
  toolkit_configs = []
145
-
149
+
146
150
  for toolkit_name, toolkit_class in AVAILABLE_TOOLKITS.items():
147
151
  try:
148
152
  if hasattr(toolkit_class, 'toolkit_config_schema'):
@@ -151,7 +155,7 @@ def get_toolkits():
151
155
  logger.debug(f"Toolkit {toolkit_name} does not have toolkit_config_schema method")
152
156
  except Exception as e:
153
157
  logger.error(f"Error getting config schema for {toolkit_name}: {e}")
154
-
158
+
155
159
  logger.info(f"Successfully loaded {len(toolkit_configs)} toolkit configurations")
156
160
  return toolkit_configs
157
161
 
@@ -172,13 +176,13 @@ def diagnose_imports():
172
176
  available_count = len(AVAILABLE_TOOLS)
173
177
  failed_count = len(FAILED_IMPORTS)
174
178
  total_count = available_count + failed_count
175
-
179
+
176
180
  print(f"=== Tool Import Diagnostic ===")
177
181
  print(f"Total tools: {total_count}")
178
182
  print(f"Successfully imported: {available_count}")
179
183
  print(f"Failed imports: {failed_count}")
180
184
  print(f"Success rate: {(available_count/total_count*100):.1f}%")
181
-
185
+
182
186
  if AVAILABLE_TOOLS:
183
187
  print(f"\n✅ Available tools ({len(AVAILABLE_TOOLS)}):")
184
188
  for tool_name in sorted(AVAILABLE_TOOLS.keys()):
@@ -188,12 +192,12 @@ def diagnose_imports():
188
192
  if 'toolkit_class' in AVAILABLE_TOOLS[tool_name]:
189
193
  functions.append('toolkit')
190
194
  print(f" - {tool_name}: {', '.join(functions)}")
191
-
195
+
192
196
  if FAILED_IMPORTS:
193
197
  print(f"\n❌ Failed imports ({len(FAILED_IMPORTS)}):")
194
198
  for tool_name, error in FAILED_IMPORTS.items():
195
199
  print(f" - {tool_name}: {error}")
196
-
200
+
197
201
  if AVAILABLE_TOOLKITS:
198
202
  print(f"\n🔧 Available toolkits ({len(AVAILABLE_TOOLKITS)}):")
199
203
  for toolkit_name in sorted(AVAILABLE_TOOLKITS.keys()):
@@ -204,7 +208,7 @@ __all__ = [
204
208
  'get_tools',
205
209
  'get_toolkits',
206
210
  'get_available_tools',
207
- 'get_failed_imports',
211
+ 'get_failed_imports',
208
212
  'get_available_toolkits',
209
213
  'diagnose_imports'
210
214
  ]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: alita_sdk
3
- Version: 0.3.177
3
+ Version: 0.3.178
4
4
  Summary: SDK for building langchain agents using resources from Alita
5
5
  Author-email: Artem Rozumenko <artyom.rozumenko@gmail.com>, Mikalai Biazruchka <mikalai_biazruchka@epam.com>, Roman Mitusov <roman_mitusov@epam.com>, Ivan Krakhmaliuk <lifedjik@gmail.com>, Artem Dubrovskiy <ad13box@gmail.com>
6
6
  License-Expression: Apache-2.0
@@ -98,7 +98,7 @@ alita_sdk/runtime/utils/logging.py,sha256=svPyiW8ztDfhqHFITv5FBCj8UhLxz6hWcqGIY6
98
98
  alita_sdk/runtime/utils/save_dataframe.py,sha256=i-E1wp-t4wb17Zq3nA3xYwgSILjoXNizaQAA9opWvxY,1576
99
99
  alita_sdk/runtime/utils/streamlit.py,sha256=z4J_bdxkA0zMROkvTB4u379YBRFCkKh-h7PD8RlnZWQ,85644
100
100
  alita_sdk/runtime/utils/utils.py,sha256=dM8whOJAuFJFe19qJ69-FLzrUp6d2G-G6L7d4ss2XqM,346
101
- alita_sdk/tools/__init__.py,sha256=48DhEi14KkaYhNb-KvXuM9XJ4WGC-v9sRcWfN7GFWd4,9963
101
+ alita_sdk/tools/__init__.py,sha256=l3KxV-Qtu-04QQ9YYcovbLtEkZ30fGWDZ7o9nuRF16o,9967
102
102
  alita_sdk/tools/elitea_base.py,sha256=NQaIxPX6DVIerHCb18jwUR6maZxxk73NZaTsFHkBQWE,21119
103
103
  alita_sdk/tools/ado/__init__.py,sha256=mD6GHcYMTtffPJkJvFPe2rzvye_IRmXmWfI7xYuZhO4,912
104
104
  alita_sdk/tools/ado/utils.py,sha256=PTCludvaQmPLakF2EbCGy66Mro4-rjDtavVP-xcB2Wc,1252
@@ -295,8 +295,8 @@ alita_sdk/tools/zephyr_scale/api_wrapper.py,sha256=UHVQUVqcBc3SZvDfO78HSuBzwAsRw
295
295
  alita_sdk/tools/zephyr_squad/__init__.py,sha256=rq4jOb3lRW2GXvAguk4H1KinO5f-zpygzhBJf-E1Ucw,2773
296
296
  alita_sdk/tools/zephyr_squad/api_wrapper.py,sha256=iOMxyE7vOc_LwFB_nBMiSFXkNtvbptA4i-BrTlo7M0A,5854
297
297
  alita_sdk/tools/zephyr_squad/zephyr_squad_cloud_client.py,sha256=IYUJoMFOMA70knLhLtAnuGoy3OK80RuqeQZ710oyIxE,3631
298
- alita_sdk-0.3.177.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
299
- alita_sdk-0.3.177.dist-info/METADATA,sha256=avoSyHmQjQ--BnjrSryL8zpwaJdw0q8FJpy9Mc3R7fA,18753
300
- alita_sdk-0.3.177.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
301
- alita_sdk-0.3.177.dist-info/top_level.txt,sha256=0vJYy5p_jK6AwVb1aqXr7Kgqgk3WDtQ6t5C-XI9zkmg,10
302
- alita_sdk-0.3.177.dist-info/RECORD,,
298
+ alita_sdk-0.3.178.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
299
+ alita_sdk-0.3.178.dist-info/METADATA,sha256=eWCrlvpO3Mjv3AQ7AMghklM9k8wTzrQN2k-jp5ymvGg,18753
300
+ alita_sdk-0.3.178.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
301
+ alita_sdk-0.3.178.dist-info/top_level.txt,sha256=0vJYy5p_jK6AwVb1aqXr7Kgqgk3WDtQ6t5C-XI9zkmg,10
302
+ alita_sdk-0.3.178.dist-info/RECORD,,