alita-sdk 0.3.440__py3-none-any.whl → 0.3.441__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.

Potentially problematic release.


This version of alita-sdk might be problematic. Click here for more details.

@@ -756,7 +756,23 @@ class AlitaClient:
756
756
  }
757
757
 
758
758
  # Instantiate the toolkit with client and LLM support
759
- tools = instantiate_toolkit_with_client(toolkit_config, llm, self)
759
+ try:
760
+ tools = instantiate_toolkit_with_client(toolkit_config, llm, self)
761
+ except Exception as toolkit_error:
762
+ # Re-raise McpAuthorizationRequired to allow proper handling upstream
763
+ from ..utils.mcp_oauth import McpAuthorizationRequired
764
+ if isinstance(toolkit_error, McpAuthorizationRequired):
765
+ raise
766
+ # For other errors, return error response
767
+ return {
768
+ "success": False,
769
+ "error": f"Failed to instantiate toolkit '{toolkit_config.get('toolkit_name')}': {str(toolkit_error)}",
770
+ "tool_name": tool_name,
771
+ "toolkit_config": toolkit_config_parsed_json,
772
+ "llm_model": llm_model,
773
+ "events_dispatched": events_dispatched,
774
+ "execution_time_seconds": 0.0
775
+ }
760
776
 
761
777
  if not tools:
762
778
  return {
@@ -29,13 +29,14 @@ def instantiate_toolkit_with_client(toolkit_config: Dict[str, Any],
29
29
 
30
30
  Raises:
31
31
  ValueError: If required configuration or client is missing
32
+ McpAuthorizationRequired: If MCP server requires OAuth authorization
32
33
  Exception: If toolkit instantiation fails
33
34
  """
35
+ toolkit_name = toolkit_config.get('toolkit_name', 'unknown')
34
36
  try:
35
37
  from ..toolkits.tools import get_tools
36
38
 
37
- toolkit_name = toolkit_config.get('toolkit_name')
38
- if not toolkit_name:
39
+ if not toolkit_name or toolkit_name == 'unknown':
39
40
  raise ValueError("toolkit_name is required in configuration")
40
41
 
41
42
  if not llm_client:
@@ -70,6 +71,12 @@ def instantiate_toolkit_with_client(toolkit_config: Dict[str, Any],
70
71
  return tools
71
72
 
72
73
  except Exception as e:
74
+ # Re-raise McpAuthorizationRequired without logging as error
75
+ from ..utils.mcp_oauth import McpAuthorizationRequired
76
+ if isinstance(e, McpAuthorizationRequired):
77
+ logger.info(f"Toolkit {toolkit_name} requires MCP OAuth authorization")
78
+ raise
79
+ # Log and re-raise other errors
73
80
  logger.error(f"Error instantiating toolkit {toolkit_name} with client: {str(e)}")
74
81
  raise
75
82
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: alita_sdk
3
- Version: 0.3.440
3
+ Version: 0.3.441
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 <lifedj27@gmail.com>, Artem Dubrovskiy <ad13box@gmail.com>
6
6
  License-Expression: Apache-2.0
@@ -36,7 +36,7 @@ alita_sdk/configurations/zephyr_essential.py,sha256=TiZedsBlfIDroflipvoqxjJeEWPo
36
36
  alita_sdk/runtime/__init__.py,sha256=4W0UF-nl3QF2bvET5lnah4o24CoTwSoKXhuN0YnwvEE,828
37
37
  alita_sdk/runtime/clients/__init__.py,sha256=BdehU5GBztN1Qi1Wul0cqlU46FxUfMnI6Vq2Zd_oq1M,296
38
38
  alita_sdk/runtime/clients/artifact.py,sha256=b7hVuGRROt6qUcT11uAZqzJqslzmlgW-Y6oGsiwNmjI,4029
39
- alita_sdk/runtime/clients/client.py,sha256=ll4_t2MN7acL6SXU7LVQ5f063WdUf6pn7A5aLXnIzEs,46512
39
+ alita_sdk/runtime/clients/client.py,sha256=3GAbPSBq4P2Tgkn4kQK4zHfjzkHxKvzcsLWM-i3-JoM,47362
40
40
  alita_sdk/runtime/clients/datasource.py,sha256=HAZovoQN9jBg0_-lIlGBQzb4FJdczPhkHehAiVG3Wx0,1020
41
41
  alita_sdk/runtime/clients/mcp_discovery.py,sha256=aFJ0wYQ8EAmXa9qLUusHZfQXkNec1wbgkqHdVeSFX-g,11697
42
42
  alita_sdk/runtime/clients/mcp_manager.py,sha256=DRbqiO761l7UgOdv_keHbD2g0oZodtPHejpArXYZIoE,9050
@@ -140,7 +140,7 @@ alita_sdk/runtime/utils/mcp_oauth.py,sha256=fh4jM0UjV65-MGNno7o-7_kpRd6pY57fgZ63
140
140
  alita_sdk/runtime/utils/save_dataframe.py,sha256=i-E1wp-t4wb17Zq3nA3xYwgSILjoXNizaQAA9opWvxY,1576
141
141
  alita_sdk/runtime/utils/streamlit.py,sha256=yIb4YIGH8HRAXZtZlywjxI07Xdcb5eUt7rMA-elFTdc,107261
142
142
  alita_sdk/runtime/utils/toolkit_runtime.py,sha256=MU63Fpxj0b5_r1IUUc0Q3-PN9VwL7rUxp2MRR4tmYR8,5136
143
- alita_sdk/runtime/utils/toolkit_utils.py,sha256=n11byeV6uLHAT7D8lPgIA0FE7tergbaRfbrwTWh5Twk,5447
143
+ alita_sdk/runtime/utils/toolkit_utils.py,sha256=_6cKy514v4ueIZynXTA8LwGC9Q447MfgrQKkDwDI4qM,5886
144
144
  alita_sdk/runtime/utils/utils.py,sha256=PJK8A-JVIzY1IowOjGG8DIqsIiEFe65qDKvFcjJCKWA,1041
145
145
  alita_sdk/tools/__init__.py,sha256=uQzvtnyOsgfdHl3pdo2LqK49Hb3SKFXDBXW_szN2R3k,10992
146
146
  alita_sdk/tools/base_indexer_toolkit.py,sha256=hK1Q2dvNctZCw2K1-khlQrR1Q0JDQviZjqDUiqpnazg,27180
@@ -360,8 +360,8 @@ alita_sdk/tools/zephyr_scale/api_wrapper.py,sha256=kT0TbmMvuKhDUZc0i7KO18O38JM9S
360
360
  alita_sdk/tools/zephyr_squad/__init__.py,sha256=0ne8XLJEQSLOWfzd2HdnqOYmQlUliKHbBED5kW_Vias,2895
361
361
  alita_sdk/tools/zephyr_squad/api_wrapper.py,sha256=kmw_xol8YIYFplBLWTqP_VKPRhL_1ItDD0_vXTe_UuI,14906
362
362
  alita_sdk/tools/zephyr_squad/zephyr_squad_cloud_client.py,sha256=R371waHsms4sllHCbijKYs90C-9Yu0sSR3N4SUfQOgU,5066
363
- alita_sdk-0.3.440.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
364
- alita_sdk-0.3.440.dist-info/METADATA,sha256=X9efgtHSm9QCNR4rA-wYidnNg9psy8DvpieYnfQiQDc,19071
365
- alita_sdk-0.3.440.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
366
- alita_sdk-0.3.440.dist-info/top_level.txt,sha256=0vJYy5p_jK6AwVb1aqXr7Kgqgk3WDtQ6t5C-XI9zkmg,10
367
- alita_sdk-0.3.440.dist-info/RECORD,,
363
+ alita_sdk-0.3.441.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
364
+ alita_sdk-0.3.441.dist-info/METADATA,sha256=C0gyyRq4qwLPvIy-IjF6z7JR6JnXcmRtRlUKYKH0FfY,19071
365
+ alita_sdk-0.3.441.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
366
+ alita_sdk-0.3.441.dist-info/top_level.txt,sha256=0vJYy5p_jK6AwVb1aqXr7Kgqgk3WDtQ6t5C-XI9zkmg,10
367
+ alita_sdk-0.3.441.dist-info/RECORD,,