alita-sdk 0.3.602__py3-none-any.whl → 0.3.603__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.
- alita_sdk/tools/github/github_client.py +18 -10
- {alita_sdk-0.3.602.dist-info → alita_sdk-0.3.603.dist-info}/METADATA +1 -1
- {alita_sdk-0.3.602.dist-info → alita_sdk-0.3.603.dist-info}/RECORD +7 -7
- {alita_sdk-0.3.602.dist-info → alita_sdk-0.3.603.dist-info}/WHEEL +0 -0
- {alita_sdk-0.3.602.dist-info → alita_sdk-0.3.603.dist-info}/entry_points.txt +0 -0
- {alita_sdk-0.3.602.dist-info → alita_sdk-0.3.603.dist-info}/licenses/LICENSE +0 -0
- {alita_sdk-0.3.602.dist-info → alita_sdk-0.3.603.dist-info}/top_level.txt +0 -0
|
@@ -1156,13 +1156,18 @@ class GitHubClient(BaseModel):
|
|
|
1156
1156
|
file_path, edit_content = file_query.split("\n", 1)
|
|
1157
1157
|
file_path = file_path.strip()
|
|
1158
1158
|
|
|
1159
|
-
#
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1159
|
+
# Set temporary repo override for internal helpers
|
|
1160
|
+
self._tmp_repo_for_edit = repo_name
|
|
1161
|
+
try:
|
|
1162
|
+
return self.edit_file(
|
|
1163
|
+
file_path=file_path,
|
|
1164
|
+
file_query=edit_content,
|
|
1165
|
+
branch=branch,
|
|
1166
|
+
commit_message=commit_message or f"Update {file_path}",
|
|
1167
|
+
)
|
|
1168
|
+
finally:
|
|
1169
|
+
if hasattr(self, "_tmp_repo_for_edit"):
|
|
1170
|
+
delattr(self, "_tmp_repo_for_edit")
|
|
1166
1171
|
except Exception as e:
|
|
1167
1172
|
return f"Unable to update file due to error:\n{str(e)}"
|
|
1168
1173
|
|
|
@@ -1400,11 +1405,12 @@ class GitHubClient(BaseModel):
|
|
|
1400
1405
|
str: The file decoded as a string, or an error message if not found
|
|
1401
1406
|
"""
|
|
1402
1407
|
try:
|
|
1403
|
-
repo
|
|
1408
|
+
# Prefer temporary repo set by update_file, then explicit repo_name
|
|
1409
|
+
effective_repo = getattr(self, "_tmp_repo_for_edit", None) or repo_name
|
|
1410
|
+
repo = self.github_api.get_repo(effective_repo) if effective_repo else self.github_repo_instance
|
|
1404
1411
|
file = repo.get_contents(file_path, ref=branch)
|
|
1405
1412
|
return file.decoded_content.decode("utf-8")
|
|
1406
1413
|
except Exception as e:
|
|
1407
|
-
from traceback import format_exc
|
|
1408
1414
|
return f"File not found `{file_path}` on branch `{branch}`. Error: {str(e)}"
|
|
1409
1415
|
|
|
1410
1416
|
def read_file(self, file_path: str, branch: Optional[str] = None, repo_name: Optional[str] = None) -> str:
|
|
@@ -1442,7 +1448,9 @@ class GitHubClient(BaseModel):
|
|
|
1442
1448
|
Success message
|
|
1443
1449
|
"""
|
|
1444
1450
|
try:
|
|
1445
|
-
repo
|
|
1451
|
+
# Prefer temporary repo set by update_file, then explicit repo_name
|
|
1452
|
+
effective_repo = getattr(self, "_tmp_repo_for_edit", None) or repo_name
|
|
1453
|
+
repo = self.github_api.get_repo(effective_repo) if effective_repo else self.github_repo_instance
|
|
1446
1454
|
branch = branch or self.active_branch
|
|
1447
1455
|
|
|
1448
1456
|
if branch == self.github_base_branch:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: alita_sdk
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.603
|
|
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
|
|
@@ -331,7 +331,7 @@ alita_sdk/tools/figma/figma_client.py,sha256=SQwZIFMrDk09Hqp-kbjECpwTIJyHmXDkTAj
|
|
|
331
331
|
alita_sdk/tools/figma/toon_tools.py,sha256=AWpdqHk3cKdVXPVLkjpwAG6HoaKWSySIsM1sXai4JnE,103563
|
|
332
332
|
alita_sdk/tools/github/__init__.py,sha256=_beRvKqr-nQ9D_Z1eY0beX8REVntwpuGIQyvPWVa-c0,5016
|
|
333
333
|
alita_sdk/tools/github/api_wrapper.py,sha256=mX23Rro6xnRa35tpeWhKYcRCJx0cDTzIe32pZAKDYno,7986
|
|
334
|
-
alita_sdk/tools/github/github_client.py,sha256=
|
|
334
|
+
alita_sdk/tools/github/github_client.py,sha256=9pL7AWosL_wBWSfHxSxlP5wLmVKlY1pUjsB6jQQIU38,88166
|
|
335
335
|
alita_sdk/tools/github/graphql_client_wrapper.py,sha256=d3AGjzLGH_hdQV2V8HeAX92dJ4dlnE5OXqUlCO_PBr0,71539
|
|
336
336
|
alita_sdk/tools/github/schemas.py,sha256=GTvw_2QV9Dm179_8d-4fHs1Q133y7zDzXA_Pt1VvLD8,14024
|
|
337
337
|
alita_sdk/tools/github/tool.py,sha256=Vs57WMn6_AVAmDTE5nsByNYwZ4B1z9WGboBbIy2CRDw,1278
|
|
@@ -445,9 +445,9 @@ alita_sdk/tools/zephyr_scale/api_wrapper.py,sha256=ppJayzkKRhTbQVVd2EhQmvADwdosl
|
|
|
445
445
|
alita_sdk/tools/zephyr_squad/__init__.py,sha256=cUSc0ZhpGmWnTQ3ZjllU9QmNlCfaHZ21HCFjfenSMH8,3081
|
|
446
446
|
alita_sdk/tools/zephyr_squad/api_wrapper.py,sha256=kmw_xol8YIYFplBLWTqP_VKPRhL_1ItDD0_vXTe_UuI,14906
|
|
447
447
|
alita_sdk/tools/zephyr_squad/zephyr_squad_cloud_client.py,sha256=R371waHsms4sllHCbijKYs90C-9Yu0sSR3N4SUfQOgU,5066
|
|
448
|
-
alita_sdk-0.3.
|
|
449
|
-
alita_sdk-0.3.
|
|
450
|
-
alita_sdk-0.3.
|
|
451
|
-
alita_sdk-0.3.
|
|
452
|
-
alita_sdk-0.3.
|
|
453
|
-
alita_sdk-0.3.
|
|
448
|
+
alita_sdk-0.3.603.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
449
|
+
alita_sdk-0.3.603.dist-info/METADATA,sha256=REPfT6MkDtYUhVzsIkKOq7oC-A2nwrk9q0ikhB1cvuE,24339
|
|
450
|
+
alita_sdk-0.3.603.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
451
|
+
alita_sdk-0.3.603.dist-info/entry_points.txt,sha256=VijN0h4alp1WXm8tfS3P7vuGxN4a5RZqHjXAoEIBZnI,49
|
|
452
|
+
alita_sdk-0.3.603.dist-info/top_level.txt,sha256=0vJYy5p_jK6AwVb1aqXr7Kgqgk3WDtQ6t5C-XI9zkmg,10
|
|
453
|
+
alita_sdk-0.3.603.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|