alita-sdk 0.3.280__py3-none-any.whl → 0.3.282__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.
- alita_sdk/runtime/clients/client.py +0 -21
- alita_sdk/runtime/tools/vectorstore.py +1 -0
- alita_sdk/tools/ado/test_plan/test_plan_wrapper.py +18 -3
- alita_sdk/tools/base_indexer_toolkit.py +1 -0
- {alita_sdk-0.3.280.dist-info → alita_sdk-0.3.282.dist-info}/METADATA +1 -1
- {alita_sdk-0.3.280.dist-info → alita_sdk-0.3.282.dist-info}/RECORD +9 -9
- {alita_sdk-0.3.280.dist-info → alita_sdk-0.3.282.dist-info}/WHEEL +0 -0
- {alita_sdk-0.3.280.dist-info → alita_sdk-0.3.282.dist-info}/licenses/LICENSE +0 -0
- {alita_sdk-0.3.280.dist-info → alita_sdk-0.3.282.dist-info}/top_level.txt +0 -0
@@ -900,24 +900,3 @@ class AlitaClient:
|
|
900
900
|
"events_dispatched": [],
|
901
901
|
"execution_time_seconds": 0.0
|
902
902
|
}
|
903
|
-
|
904
|
-
def _get_real_user_id(self) -> str:
|
905
|
-
"""Extract the real user ID from the auth token for MCP tool calls."""
|
906
|
-
try:
|
907
|
-
import base64
|
908
|
-
import json
|
909
|
-
# Assuming JWT token, extract user ID from payload
|
910
|
-
# This is a basic implementation - adjust based on your token format
|
911
|
-
token_parts = self.auth_token.split('.')
|
912
|
-
if len(token_parts) >= 2:
|
913
|
-
payload_part = token_parts[1]
|
914
|
-
# Add padding if needed
|
915
|
-
padding = len(payload_part) % 4
|
916
|
-
if padding:
|
917
|
-
payload_part += '=' * (4 - padding)
|
918
|
-
payload = json.loads(base64.b64decode(payload_part))
|
919
|
-
return payload.get('user_id') or payload.get('sub') or payload.get('uid')
|
920
|
-
except Exception as e:
|
921
|
-
logger.error(f"Error extracting user ID from token: {e}")
|
922
|
-
return None
|
923
|
-
|
@@ -283,6 +283,7 @@ class VectorStoreWrapper(BaseToolApiWrapper):
|
|
283
283
|
|
284
284
|
for document in documents:
|
285
285
|
key = key_fn(document)
|
286
|
+
key = key if isinstance(key, str) else str(key)
|
286
287
|
if key in indexed_keys and collection_suffix == indexed_data[key]['metadata'].get('collection'):
|
287
288
|
if compare_fn(document, indexed_data[key]):
|
288
289
|
# Disabled addition of new collection to already indexed documents
|
@@ -363,8 +363,20 @@ class TestPlanApiWrapper(NonCodeIndexerToolkit):
|
|
363
363
|
logger.error(f"Error getting test cases: {e}")
|
364
364
|
return ToolException(f"Error getting test cases: {e}")
|
365
365
|
|
366
|
-
def
|
366
|
+
def get_suites_in_plan(self, plan_id: int) -> List[dict]:
|
367
|
+
"""Get all test suites in a test plan."""
|
368
|
+
try:
|
369
|
+
test_suites = self._client.get_test_suites_for_plan(self.project, plan_id)
|
370
|
+
return [suite.as_dict() for suite in test_suites]
|
371
|
+
except Exception as e:
|
372
|
+
logger.error(f"Error getting test suites: {e}")
|
373
|
+
return ToolException(f"Error getting test suites: {e}")
|
374
|
+
|
375
|
+
def _base_loader(self, plan_id: int, suite_ids: Optional[List[int]] = [], chunking_tool: str = None, **kwargs) -> Generator[Document, None, None]:
|
367
376
|
cases = []
|
377
|
+
if not suite_ids:
|
378
|
+
suites = self.get_suites_in_plan(plan_id)
|
379
|
+
suite_ids = [suite['id'] for suite in suites if 'id' in suite]
|
368
380
|
for sid in suite_ids:
|
369
381
|
cases.extend(self.get_test_cases(plan_id, sid))
|
370
382
|
#
|
@@ -381,6 +393,7 @@ class TestPlanApiWrapper(NonCodeIndexerToolkit):
|
|
381
393
|
'suite_id': case.get('test_suite', {}).get('id', ''),
|
382
394
|
'description': data.get('System.Description', ''),
|
383
395
|
'updated_on': data.get('System.Rev', ''),
|
396
|
+
# content is in metadata for chunking tool post-processing
|
384
397
|
IndexerKeywords.CONTENT_IN_BYTES.value: data.get('Microsoft.VSTS.TCM.Steps', '').encode("utf-8")
|
385
398
|
})
|
386
399
|
else:
|
@@ -398,8 +411,10 @@ class TestPlanApiWrapper(NonCodeIndexerToolkit):
|
|
398
411
|
def _index_tool_params(self):
|
399
412
|
"""Return the parameters for indexing data."""
|
400
413
|
return {
|
401
|
-
"plan_id": (
|
402
|
-
"suite_ids": (Optional[List[
|
414
|
+
"plan_id": (int, Field(description="ID of the test plan for which test cases are requested")),
|
415
|
+
"suite_ids": (Optional[List[int]], Field(description='List of test suite IDs for which test cases are requested '
|
416
|
+
'(can be empty for all suites indexing from the plan). '
|
417
|
+
'Example: [2, 23]', default=[])),
|
403
418
|
'chunking_tool':(Literal['html'], Field(description="Name of chunking tool", default='html'))
|
404
419
|
}
|
405
420
|
|
@@ -240,6 +240,7 @@ class BaseIndexerToolkit(VectorStoreWrapperBase):
|
|
240
240
|
|
241
241
|
for document in documents:
|
242
242
|
key = self.key_fn(document)
|
243
|
+
key = key if isinstance(key, str) else str(key)
|
243
244
|
if key in indexed_keys and collection_suffix == indexed_data[key]['metadata'].get('collection'):
|
244
245
|
if self.compare_fn(document, indexed_data[key]):
|
245
246
|
continue
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: alita_sdk
|
3
|
-
Version: 0.3.
|
3
|
+
Version: 0.3.282
|
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
|
@@ -36,7 +36,7 @@ alita_sdk/configurations/zephyr_essential.py,sha256=dXZHw4Yn_Mg-VhUn7qeCbd4hVpt9
|
|
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=TPvROw1qu4IyUEGuf7x40IKRpb5eFZpYGN3-8LfQE0M,3461
|
39
|
-
alita_sdk/runtime/clients/client.py,sha256=
|
39
|
+
alita_sdk/runtime/clients/client.py,sha256=Q9y-Sv1cQu8x69KSgbe1UTGxxt_dOxIh4cJcI40t8NY,42650
|
40
40
|
alita_sdk/runtime/clients/datasource.py,sha256=HAZovoQN9jBg0_-lIlGBQzb4FJdczPhkHehAiVG3Wx0,1020
|
41
41
|
alita_sdk/runtime/clients/prompt.py,sha256=li1RG9eBwgNK_Qf0qUaZ8QNTmsncFrAL2pv3kbxZRZg,1447
|
42
42
|
alita_sdk/runtime/langchain/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -118,7 +118,7 @@ alita_sdk/runtime/tools/pgvector_search.py,sha256=NN2BGAnq4SsDHIhUcFZ8d_dbEOM8Qw
|
|
118
118
|
alita_sdk/runtime/tools/prompt.py,sha256=nJafb_e5aOM1Rr3qGFCR-SKziU9uCsiP2okIMs9PppM,741
|
119
119
|
alita_sdk/runtime/tools/router.py,sha256=wCvZjVkdXK9dMMeEerrgKf5M790RudH68pDortnHSz0,1517
|
120
120
|
alita_sdk/runtime/tools/tool.py,sha256=lE1hGi6qOAXG7qxtqxarD_XMQqTghdywf261DZawwno,5631
|
121
|
-
alita_sdk/runtime/tools/vectorstore.py,sha256=
|
121
|
+
alita_sdk/runtime/tools/vectorstore.py,sha256=PN_Im5pkbFR6vXUhlBppEwHEhsg-UsO9eYrMS8UstFk,35826
|
122
122
|
alita_sdk/runtime/tools/vectorstore_base.py,sha256=CTAsQXImOHjlcddU2hoqyRAf8iNaDMTfr0pJbIaOG7o,27744
|
123
123
|
alita_sdk/runtime/utils/AlitaCallback.py,sha256=E4LlSBuCHWiUq6W7IZExERHZY0qcmdjzc_rJlF2iQIw,7356
|
124
124
|
alita_sdk/runtime/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -131,7 +131,7 @@ alita_sdk/runtime/utils/toolkit_runtime.py,sha256=MU63Fpxj0b5_r1IUUc0Q3-PN9VwL7r
|
|
131
131
|
alita_sdk/runtime/utils/toolkit_utils.py,sha256=I9QFqnaqfVgN26LUr6s3XlBlG6y0CoHURnCzG7XcwVs,5311
|
132
132
|
alita_sdk/runtime/utils/utils.py,sha256=VXNLsdeTmf6snn9EtUyobv4yL-xzLhUcH8P_ORMifYc,675
|
133
133
|
alita_sdk/tools/__init__.py,sha256=8oFahbggsv8h7hEqqeQ4iF6g2m85Ki17iSeknviCNis,10613
|
134
|
-
alita_sdk/tools/base_indexer_toolkit.py,sha256=
|
134
|
+
alita_sdk/tools/base_indexer_toolkit.py,sha256=h3KnF4_tgAkxWUjW8djPUyNEKpI24kU6LDjCnJtxE-o,19322
|
135
135
|
alita_sdk/tools/elitea_base.py,sha256=aoh4fjNHIem8jzPPqtvxD4PtkGgN3KBQwrMqb9f6k00,32991
|
136
136
|
alita_sdk/tools/non_code_indexer_toolkit.py,sha256=v9uq1POE1fQKCd152mbqDtF-HSe0qoDj83k4E5LAkMI,1080
|
137
137
|
alita_sdk/tools/ado/__init__.py,sha256=u2tdDgufGuDb-7lIgKKQlqgStL9Wd1gzNmRNYems2c0,1267
|
@@ -139,7 +139,7 @@ alita_sdk/tools/ado/utils.py,sha256=PTCludvaQmPLakF2EbCGy66Mro4-rjDtavVP-xcB2Wc,
|
|
139
139
|
alita_sdk/tools/ado/repos/__init__.py,sha256=n-IhKED05RwQGWT4LfCaxJ85uDyG4S9zTjSjK6A8N4o,5192
|
140
140
|
alita_sdk/tools/ado/repos/repos_wrapper.py,sha256=e3bGsM03m0UggSQfoVh5Gg_M1MYt_BTKS-s9G2Unc1k,49739
|
141
141
|
alita_sdk/tools/ado/test_plan/__init__.py,sha256=4fEw_3cm4shuZ868HhAU-uMH3xNXPyb3uRjyNWoBKls,5243
|
142
|
-
alita_sdk/tools/ado/test_plan/test_plan_wrapper.py,sha256=
|
142
|
+
alita_sdk/tools/ado/test_plan/test_plan_wrapper.py,sha256=p3mbBiu0jthZG-Bj2-duO7DDZQ4LHYZ6Q1nOVd-KTrc,21944
|
143
143
|
alita_sdk/tools/ado/wiki/__init__.py,sha256=uBKo_Meu2ZxMxcxGsMmvCXyplRE2um1_PIRvdYd37rM,5171
|
144
144
|
alita_sdk/tools/ado/wiki/ado_wrapper.py,sha256=AjavSE3peuQ-uONQmmfT3MS_8mxeSBRv7Q5QHt0Z2KU,14952
|
145
145
|
alita_sdk/tools/ado/work_item/__init__.py,sha256=HNcdIMwTSNe-25_Pg-KmVVXTFci3vNa84tkTFkls36c,5373
|
@@ -347,8 +347,8 @@ alita_sdk/tools/zephyr_scale/api_wrapper.py,sha256=HOt9ShtJI_1tVPcwd3Rwk-VS0SMLq
|
|
347
347
|
alita_sdk/tools/zephyr_squad/__init__.py,sha256=0AI_j27xVO5Gk5HQMFrqPTd4uvuVTpiZUicBrdfEpKg,2796
|
348
348
|
alita_sdk/tools/zephyr_squad/api_wrapper.py,sha256=kmw_xol8YIYFplBLWTqP_VKPRhL_1ItDD0_vXTe_UuI,14906
|
349
349
|
alita_sdk/tools/zephyr_squad/zephyr_squad_cloud_client.py,sha256=R371waHsms4sllHCbijKYs90C-9Yu0sSR3N4SUfQOgU,5066
|
350
|
-
alita_sdk-0.3.
|
351
|
-
alita_sdk-0.3.
|
352
|
-
alita_sdk-0.3.
|
353
|
-
alita_sdk-0.3.
|
354
|
-
alita_sdk-0.3.
|
350
|
+
alita_sdk-0.3.282.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
351
|
+
alita_sdk-0.3.282.dist-info/METADATA,sha256=hfPjY5I-dvK_iVEukdJdK4zKc8hZz8hOBvMm9ZD0TWs,18897
|
352
|
+
alita_sdk-0.3.282.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
353
|
+
alita_sdk-0.3.282.dist-info/top_level.txt,sha256=0vJYy5p_jK6AwVb1aqXr7Kgqgk3WDtQ6t5C-XI9zkmg,10
|
354
|
+
alita_sdk-0.3.282.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|