alita-sdk 0.3.263__py3-none-any.whl → 0.3.499__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.
Files changed (248) hide show
  1. alita_sdk/cli/__init__.py +10 -0
  2. alita_sdk/cli/__main__.py +17 -0
  3. alita_sdk/cli/agent/__init__.py +5 -0
  4. alita_sdk/cli/agent/default.py +258 -0
  5. alita_sdk/cli/agent_executor.py +155 -0
  6. alita_sdk/cli/agent_loader.py +215 -0
  7. alita_sdk/cli/agent_ui.py +228 -0
  8. alita_sdk/cli/agents.py +3601 -0
  9. alita_sdk/cli/callbacks.py +647 -0
  10. alita_sdk/cli/cli.py +168 -0
  11. alita_sdk/cli/config.py +306 -0
  12. alita_sdk/cli/context/__init__.py +30 -0
  13. alita_sdk/cli/context/cleanup.py +198 -0
  14. alita_sdk/cli/context/manager.py +731 -0
  15. alita_sdk/cli/context/message.py +285 -0
  16. alita_sdk/cli/context/strategies.py +289 -0
  17. alita_sdk/cli/context/token_estimation.py +127 -0
  18. alita_sdk/cli/formatting.py +182 -0
  19. alita_sdk/cli/input_handler.py +419 -0
  20. alita_sdk/cli/inventory.py +1256 -0
  21. alita_sdk/cli/mcp_loader.py +315 -0
  22. alita_sdk/cli/toolkit.py +327 -0
  23. alita_sdk/cli/toolkit_loader.py +85 -0
  24. alita_sdk/cli/tools/__init__.py +43 -0
  25. alita_sdk/cli/tools/approval.py +224 -0
  26. alita_sdk/cli/tools/filesystem.py +1751 -0
  27. alita_sdk/cli/tools/planning.py +389 -0
  28. alita_sdk/cli/tools/terminal.py +414 -0
  29. alita_sdk/community/__init__.py +64 -8
  30. alita_sdk/community/inventory/__init__.py +224 -0
  31. alita_sdk/community/inventory/config.py +257 -0
  32. alita_sdk/community/inventory/enrichment.py +2137 -0
  33. alita_sdk/community/inventory/extractors.py +1469 -0
  34. alita_sdk/community/inventory/ingestion.py +3172 -0
  35. alita_sdk/community/inventory/knowledge_graph.py +1457 -0
  36. alita_sdk/community/inventory/parsers/__init__.py +218 -0
  37. alita_sdk/community/inventory/parsers/base.py +295 -0
  38. alita_sdk/community/inventory/parsers/csharp_parser.py +907 -0
  39. alita_sdk/community/inventory/parsers/go_parser.py +851 -0
  40. alita_sdk/community/inventory/parsers/html_parser.py +389 -0
  41. alita_sdk/community/inventory/parsers/java_parser.py +593 -0
  42. alita_sdk/community/inventory/parsers/javascript_parser.py +629 -0
  43. alita_sdk/community/inventory/parsers/kotlin_parser.py +768 -0
  44. alita_sdk/community/inventory/parsers/markdown_parser.py +362 -0
  45. alita_sdk/community/inventory/parsers/python_parser.py +604 -0
  46. alita_sdk/community/inventory/parsers/rust_parser.py +858 -0
  47. alita_sdk/community/inventory/parsers/swift_parser.py +832 -0
  48. alita_sdk/community/inventory/parsers/text_parser.py +322 -0
  49. alita_sdk/community/inventory/parsers/yaml_parser.py +370 -0
  50. alita_sdk/community/inventory/patterns/__init__.py +61 -0
  51. alita_sdk/community/inventory/patterns/ast_adapter.py +380 -0
  52. alita_sdk/community/inventory/patterns/loader.py +348 -0
  53. alita_sdk/community/inventory/patterns/registry.py +198 -0
  54. alita_sdk/community/inventory/presets.py +535 -0
  55. alita_sdk/community/inventory/retrieval.py +1403 -0
  56. alita_sdk/community/inventory/toolkit.py +173 -0
  57. alita_sdk/community/inventory/visualize.py +1370 -0
  58. alita_sdk/configurations/__init__.py +10 -0
  59. alita_sdk/configurations/ado.py +4 -2
  60. alita_sdk/configurations/azure_search.py +1 -1
  61. alita_sdk/configurations/bigquery.py +1 -1
  62. alita_sdk/configurations/bitbucket.py +94 -2
  63. alita_sdk/configurations/browser.py +18 -0
  64. alita_sdk/configurations/carrier.py +19 -0
  65. alita_sdk/configurations/confluence.py +96 -1
  66. alita_sdk/configurations/delta_lake.py +1 -1
  67. alita_sdk/configurations/figma.py +0 -5
  68. alita_sdk/configurations/github.py +65 -1
  69. alita_sdk/configurations/gitlab.py +79 -0
  70. alita_sdk/configurations/google_places.py +17 -0
  71. alita_sdk/configurations/jira.py +103 -0
  72. alita_sdk/configurations/postman.py +1 -1
  73. alita_sdk/configurations/qtest.py +1 -3
  74. alita_sdk/configurations/report_portal.py +19 -0
  75. alita_sdk/configurations/salesforce.py +19 -0
  76. alita_sdk/configurations/service_now.py +1 -12
  77. alita_sdk/configurations/sharepoint.py +19 -0
  78. alita_sdk/configurations/sonar.py +18 -0
  79. alita_sdk/configurations/sql.py +20 -0
  80. alita_sdk/configurations/testio.py +18 -0
  81. alita_sdk/configurations/testrail.py +88 -0
  82. alita_sdk/configurations/xray.py +94 -1
  83. alita_sdk/configurations/zephyr_enterprise.py +94 -1
  84. alita_sdk/configurations/zephyr_essential.py +95 -0
  85. alita_sdk/runtime/clients/artifact.py +12 -2
  86. alita_sdk/runtime/clients/client.py +235 -66
  87. alita_sdk/runtime/clients/mcp_discovery.py +342 -0
  88. alita_sdk/runtime/clients/mcp_manager.py +262 -0
  89. alita_sdk/runtime/clients/sandbox_client.py +373 -0
  90. alita_sdk/runtime/langchain/assistant.py +123 -17
  91. alita_sdk/runtime/langchain/constants.py +8 -1
  92. alita_sdk/runtime/langchain/document_loaders/AlitaDocxMammothLoader.py +315 -3
  93. alita_sdk/runtime/langchain/document_loaders/AlitaExcelLoader.py +209 -31
  94. alita_sdk/runtime/langchain/document_loaders/AlitaImageLoader.py +1 -1
  95. alita_sdk/runtime/langchain/document_loaders/AlitaJSONLoader.py +8 -2
  96. alita_sdk/runtime/langchain/document_loaders/AlitaMarkdownLoader.py +66 -0
  97. alita_sdk/runtime/langchain/document_loaders/AlitaPDFLoader.py +79 -10
  98. alita_sdk/runtime/langchain/document_loaders/AlitaPowerPointLoader.py +52 -15
  99. alita_sdk/runtime/langchain/document_loaders/AlitaPythonLoader.py +9 -0
  100. alita_sdk/runtime/langchain/document_loaders/AlitaTableLoader.py +1 -4
  101. alita_sdk/runtime/langchain/document_loaders/AlitaTextLoader.py +15 -2
  102. alita_sdk/runtime/langchain/document_loaders/ImageParser.py +30 -0
  103. alita_sdk/runtime/langchain/document_loaders/constants.py +187 -40
  104. alita_sdk/runtime/langchain/interfaces/llm_processor.py +4 -2
  105. alita_sdk/runtime/langchain/langraph_agent.py +406 -91
  106. alita_sdk/runtime/langchain/utils.py +51 -8
  107. alita_sdk/runtime/llms/preloaded.py +2 -6
  108. alita_sdk/runtime/models/mcp_models.py +61 -0
  109. alita_sdk/runtime/toolkits/__init__.py +26 -0
  110. alita_sdk/runtime/toolkits/application.py +9 -2
  111. alita_sdk/runtime/toolkits/artifact.py +19 -7
  112. alita_sdk/runtime/toolkits/datasource.py +13 -6
  113. alita_sdk/runtime/toolkits/mcp.py +780 -0
  114. alita_sdk/runtime/toolkits/planning.py +178 -0
  115. alita_sdk/runtime/toolkits/subgraph.py +11 -6
  116. alita_sdk/runtime/toolkits/tools.py +214 -60
  117. alita_sdk/runtime/toolkits/vectorstore.py +9 -4
  118. alita_sdk/runtime/tools/__init__.py +22 -0
  119. alita_sdk/runtime/tools/application.py +16 -4
  120. alita_sdk/runtime/tools/artifact.py +312 -19
  121. alita_sdk/runtime/tools/function.py +100 -4
  122. alita_sdk/runtime/tools/graph.py +81 -0
  123. alita_sdk/runtime/tools/image_generation.py +212 -0
  124. alita_sdk/runtime/tools/llm.py +539 -180
  125. alita_sdk/runtime/tools/mcp_inspect_tool.py +284 -0
  126. alita_sdk/runtime/tools/mcp_remote_tool.py +181 -0
  127. alita_sdk/runtime/tools/mcp_server_tool.py +3 -1
  128. alita_sdk/runtime/tools/planning/__init__.py +36 -0
  129. alita_sdk/runtime/tools/planning/models.py +246 -0
  130. alita_sdk/runtime/tools/planning/wrapper.py +607 -0
  131. alita_sdk/runtime/tools/router.py +2 -1
  132. alita_sdk/runtime/tools/sandbox.py +375 -0
  133. alita_sdk/runtime/tools/vectorstore.py +62 -63
  134. alita_sdk/runtime/tools/vectorstore_base.py +156 -85
  135. alita_sdk/runtime/utils/AlitaCallback.py +106 -20
  136. alita_sdk/runtime/utils/mcp_client.py +465 -0
  137. alita_sdk/runtime/utils/mcp_oauth.py +244 -0
  138. alita_sdk/runtime/utils/mcp_sse_client.py +405 -0
  139. alita_sdk/runtime/utils/mcp_tools_discovery.py +124 -0
  140. alita_sdk/runtime/utils/streamlit.py +41 -14
  141. alita_sdk/runtime/utils/toolkit_utils.py +28 -9
  142. alita_sdk/runtime/utils/utils.py +14 -0
  143. alita_sdk/tools/__init__.py +78 -35
  144. alita_sdk/tools/ado/__init__.py +0 -1
  145. alita_sdk/tools/ado/repos/__init__.py +10 -6
  146. alita_sdk/tools/ado/repos/repos_wrapper.py +12 -11
  147. alita_sdk/tools/ado/test_plan/__init__.py +10 -7
  148. alita_sdk/tools/ado/test_plan/test_plan_wrapper.py +56 -23
  149. alita_sdk/tools/ado/wiki/__init__.py +10 -11
  150. alita_sdk/tools/ado/wiki/ado_wrapper.py +114 -28
  151. alita_sdk/tools/ado/work_item/__init__.py +10 -11
  152. alita_sdk/tools/ado/work_item/ado_wrapper.py +63 -10
  153. alita_sdk/tools/advanced_jira_mining/__init__.py +10 -7
  154. alita_sdk/tools/aws/delta_lake/__init__.py +13 -11
  155. alita_sdk/tools/azure_ai/search/__init__.py +11 -7
  156. alita_sdk/tools/base_indexer_toolkit.py +392 -86
  157. alita_sdk/tools/bitbucket/__init__.py +18 -11
  158. alita_sdk/tools/bitbucket/api_wrapper.py +52 -9
  159. alita_sdk/tools/bitbucket/cloud_api_wrapper.py +5 -5
  160. alita_sdk/tools/browser/__init__.py +40 -16
  161. alita_sdk/tools/browser/crawler.py +3 -1
  162. alita_sdk/tools/browser/utils.py +15 -6
  163. alita_sdk/tools/carrier/__init__.py +17 -17
  164. alita_sdk/tools/carrier/backend_reports_tool.py +8 -4
  165. alita_sdk/tools/carrier/excel_reporter.py +8 -4
  166. alita_sdk/tools/chunkers/__init__.py +3 -1
  167. alita_sdk/tools/chunkers/code/codeparser.py +1 -1
  168. alita_sdk/tools/chunkers/sematic/json_chunker.py +1 -0
  169. alita_sdk/tools/chunkers/sematic/markdown_chunker.py +97 -6
  170. alita_sdk/tools/chunkers/sematic/proposal_chunker.py +1 -1
  171. alita_sdk/tools/chunkers/universal_chunker.py +270 -0
  172. alita_sdk/tools/cloud/aws/__init__.py +9 -6
  173. alita_sdk/tools/cloud/azure/__init__.py +9 -6
  174. alita_sdk/tools/cloud/gcp/__init__.py +9 -6
  175. alita_sdk/tools/cloud/k8s/__init__.py +9 -6
  176. alita_sdk/tools/code/linter/__init__.py +7 -7
  177. alita_sdk/tools/code/loaders/codesearcher.py +3 -2
  178. alita_sdk/tools/code/sonar/__init__.py +18 -12
  179. alita_sdk/tools/code_indexer_toolkit.py +199 -0
  180. alita_sdk/tools/confluence/__init__.py +14 -11
  181. alita_sdk/tools/confluence/api_wrapper.py +198 -58
  182. alita_sdk/tools/confluence/loader.py +10 -0
  183. alita_sdk/tools/custom_open_api/__init__.py +9 -4
  184. alita_sdk/tools/elastic/__init__.py +8 -7
  185. alita_sdk/tools/elitea_base.py +543 -64
  186. alita_sdk/tools/figma/__init__.py +10 -8
  187. alita_sdk/tools/figma/api_wrapper.py +352 -153
  188. alita_sdk/tools/github/__init__.py +13 -11
  189. alita_sdk/tools/github/api_wrapper.py +9 -26
  190. alita_sdk/tools/github/github_client.py +75 -12
  191. alita_sdk/tools/github/schemas.py +2 -1
  192. alita_sdk/tools/gitlab/__init__.py +11 -10
  193. alita_sdk/tools/gitlab/api_wrapper.py +135 -45
  194. alita_sdk/tools/gitlab_org/__init__.py +11 -9
  195. alita_sdk/tools/google/bigquery/__init__.py +12 -13
  196. alita_sdk/tools/google_places/__init__.py +18 -10
  197. alita_sdk/tools/jira/__init__.py +14 -8
  198. alita_sdk/tools/jira/api_wrapper.py +315 -168
  199. alita_sdk/tools/keycloak/__init__.py +8 -7
  200. alita_sdk/tools/localgit/local_git.py +56 -54
  201. alita_sdk/tools/memory/__init__.py +27 -11
  202. alita_sdk/tools/non_code_indexer_toolkit.py +7 -2
  203. alita_sdk/tools/ocr/__init__.py +8 -7
  204. alita_sdk/tools/openapi/__init__.py +10 -1
  205. alita_sdk/tools/pandas/__init__.py +8 -7
  206. alita_sdk/tools/pandas/api_wrapper.py +7 -25
  207. alita_sdk/tools/postman/__init__.py +8 -10
  208. alita_sdk/tools/postman/api_wrapper.py +19 -8
  209. alita_sdk/tools/postman/postman_analysis.py +8 -1
  210. alita_sdk/tools/pptx/__init__.py +8 -9
  211. alita_sdk/tools/qtest/__init__.py +19 -13
  212. alita_sdk/tools/qtest/api_wrapper.py +1784 -88
  213. alita_sdk/tools/rally/__init__.py +10 -9
  214. alita_sdk/tools/report_portal/__init__.py +20 -15
  215. alita_sdk/tools/salesforce/__init__.py +19 -15
  216. alita_sdk/tools/servicenow/__init__.py +14 -11
  217. alita_sdk/tools/sharepoint/__init__.py +14 -13
  218. alita_sdk/tools/sharepoint/api_wrapper.py +179 -39
  219. alita_sdk/tools/sharepoint/authorization_helper.py +191 -1
  220. alita_sdk/tools/sharepoint/utils.py +8 -2
  221. alita_sdk/tools/slack/__init__.py +10 -7
  222. alita_sdk/tools/sql/__init__.py +19 -18
  223. alita_sdk/tools/sql/api_wrapper.py +71 -23
  224. alita_sdk/tools/testio/__init__.py +18 -12
  225. alita_sdk/tools/testrail/__init__.py +10 -10
  226. alita_sdk/tools/testrail/api_wrapper.py +213 -45
  227. alita_sdk/tools/utils/__init__.py +28 -4
  228. alita_sdk/tools/utils/content_parser.py +181 -61
  229. alita_sdk/tools/utils/text_operations.py +254 -0
  230. alita_sdk/tools/vector_adapters/VectorStoreAdapter.py +83 -27
  231. alita_sdk/tools/xray/__init__.py +12 -7
  232. alita_sdk/tools/xray/api_wrapper.py +58 -113
  233. alita_sdk/tools/zephyr/__init__.py +9 -6
  234. alita_sdk/tools/zephyr_enterprise/__init__.py +13 -8
  235. alita_sdk/tools/zephyr_enterprise/api_wrapper.py +17 -7
  236. alita_sdk/tools/zephyr_essential/__init__.py +13 -9
  237. alita_sdk/tools/zephyr_essential/api_wrapper.py +289 -47
  238. alita_sdk/tools/zephyr_essential/client.py +6 -4
  239. alita_sdk/tools/zephyr_scale/__init__.py +10 -7
  240. alita_sdk/tools/zephyr_scale/api_wrapper.py +6 -2
  241. alita_sdk/tools/zephyr_squad/__init__.py +9 -6
  242. {alita_sdk-0.3.263.dist-info → alita_sdk-0.3.499.dist-info}/METADATA +180 -33
  243. alita_sdk-0.3.499.dist-info/RECORD +433 -0
  244. alita_sdk-0.3.499.dist-info/entry_points.txt +2 -0
  245. alita_sdk-0.3.263.dist-info/RECORD +0 -342
  246. {alita_sdk-0.3.263.dist-info → alita_sdk-0.3.499.dist-info}/WHEEL +0 -0
  247. {alita_sdk-0.3.263.dist-info → alita_sdk-0.3.499.dist-info}/licenses/LICENSE +0 -0
  248. {alita_sdk-0.3.263.dist-info → alita_sdk-0.3.499.dist-info}/top_level.txt +0 -0
@@ -41,8 +41,18 @@ _safe_import_configuration('bigquery', 'bigquery', 'BigQueryConfiguration')
41
41
  _safe_import_configuration('xray', 'xray', 'XrayConfiguration')
42
42
  _safe_import_configuration('zephyr', 'zephyr', 'ZephyrConfiguration')
43
43
  _safe_import_configuration('zephyr_enterprise', 'zephyr_enterprise', 'ZephyrEnterpriseConfiguration')
44
+ _safe_import_configuration('zephyr_essential', 'zephyr_essential', 'ZephyrEssentialConfiguration')
44
45
  _safe_import_configuration('figma', 'figma', 'FigmaConfiguration')
45
46
  _safe_import_configuration('rally', 'rally', 'RallyConfiguration')
47
+ _safe_import_configuration('sonar', 'sonar', 'SonarConfiguration')
48
+ _safe_import_configuration('sql', 'sql', 'SqlConfiguration')
49
+ _safe_import_configuration('google_places', 'google_places', 'GooglePlacesConfiguration')
50
+ _safe_import_configuration('salesforce', 'salesforce', 'SalesforceConfiguration')
51
+ _safe_import_configuration('browser', 'browser', 'BrowserConfiguration')
52
+ _safe_import_configuration('sharepoint', 'sharepoint', 'SharepointConfiguration')
53
+ _safe_import_configuration('carrier', 'carrier', 'CarrierConfiguration')
54
+ _safe_import_configuration('report_portal', 'report_portal', 'ReportPortalConfiguration')
55
+ _safe_import_configuration('testio', 'testio', 'TestIOConfiguration')
46
56
 
47
57
  # Log import summary
48
58
  available_count = len(AVAILABLE_CONFIGURATIONS)
@@ -10,7 +10,8 @@ class AdoConfiguration(BaseModel):
10
10
  "label": "Ado",
11
11
  "icon_url": None,
12
12
  "section": "credentials",
13
- "type": "ado"
13
+ "type": "ado",
14
+ "categories": ["project management"],
14
15
  }
15
16
  }
16
17
  )
@@ -26,7 +27,8 @@ class AdoReposConfiguration(BaseModel):
26
27
  "label": "ADO repos",
27
28
  "icon_url": "ado-repos-icon.svg",
28
29
  "section": "credentials",
29
- "type": "ado_repos"
30
+ "type": "ado_repos",
31
+ "categories": ["code repositories"],
30
32
  }
31
33
  }
32
34
  )
@@ -12,7 +12,7 @@ class AzureSearchConfiguration(BaseModel):
12
12
  "hidden": True,
13
13
  "section": "credentials",
14
14
  "type": "azure_search",
15
- "categories": ["search"],
15
+ "categories": ["other"],
16
16
  "extra_categories": ["azure", "cognitive search", "vector database", "knowledge base"],
17
17
  }
18
18
  }
@@ -12,7 +12,7 @@ class BigQueryConfiguration(BaseModel):
12
12
  "hidden": True,
13
13
  "section": "credentials",
14
14
  "type": "bigquery",
15
- "categories": ["database"],
15
+ "categories": ["other"],
16
16
  "extra_categories": ["google", "gcp", "data warehouse", "analytics"],
17
17
  }
18
18
  }
@@ -1,5 +1,3 @@
1
- from typing import Optional
2
-
3
1
  from pydantic import BaseModel, ConfigDict, Field, SecretStr
4
2
 
5
3
 
@@ -30,3 +28,97 @@ class BitbucketConfiguration(BaseModel):
30
28
  url: str = Field(description="Bitbucket URL")
31
29
  username: str = Field(description="Bitbucket Username")
32
30
  password: SecretStr = Field(description="Bitbucket Password/App Password")
31
+
32
+ @staticmethod
33
+ def check_connection(settings: dict) -> str | None:
34
+ """
35
+ Check the connection to Bitbucket.
36
+
37
+ Args:
38
+ settings: Dictionary containing Bitbucket configuration
39
+ - url: Bitbucket instance URL (required)
40
+ - username: Bitbucket username (required)
41
+ - password: Password or App Password (required)
42
+
43
+ Returns:
44
+ None if connection successful, error message string if failed
45
+ """
46
+ import requests
47
+ from requests.auth import HTTPBasicAuth
48
+
49
+ # Validate url
50
+ url = settings.get("url", "").strip()
51
+ if not url:
52
+ return "Bitbucket URL is required"
53
+
54
+ # Normalize URL - remove trailing slashes
55
+ url = url.rstrip("/")
56
+
57
+ # Basic URL validation
58
+ if not url.startswith(("http://", "https://")):
59
+ return "Bitbucket URL must start with http:// or https://"
60
+
61
+ # Validate username
62
+ username = settings.get("username", "").strip()
63
+ if not username:
64
+ return "Bitbucket username is required"
65
+
66
+ # Validate password
67
+ password = settings.get("password")
68
+ if not password:
69
+ return "Bitbucket password is required"
70
+
71
+ # Extract password value if it's a SecretStr
72
+ password_value = password.get_secret_value() if hasattr(password, 'get_secret_value') else password
73
+
74
+ if not password_value or not str(password_value).strip():
75
+ return "Bitbucket password cannot be empty"
76
+
77
+ # Detect if this is Bitbucket Cloud or Server/Data Center
78
+ is_cloud = "bitbucket.org" in url.lower() or "api.bitbucket.org" in url.lower()
79
+ is_correct_bitbucket_domain = "bitbucket" in url.lower()
80
+
81
+ if is_cloud:
82
+ # Bitbucket Cloud: Use API v2.0
83
+ # Endpoint: /2.0/user - returns current authenticated user
84
+ test_url = f"{url}/2.0/user"
85
+ else:
86
+ # Bitbucket Server/Data Center: Use API v1.0
87
+ # Endpoint: /rest/api/1.0/users/{username}
88
+ test_url = f"{url}/rest/api/1.0/users/{username}"
89
+
90
+ try:
91
+ response = requests.get(
92
+ test_url,
93
+ auth=HTTPBasicAuth(username, str(password_value).strip()),
94
+ timeout=10
95
+ )
96
+
97
+ # Check response status
98
+ if response.status_code == 200:
99
+ # Successfully connected and authenticated
100
+ return None
101
+ elif response.status_code == 401:
102
+ return "Authentication failed: invalid username or password"
103
+ elif response.status_code == 403:
104
+ return "Access forbidden: check user permissions"
105
+ elif response.status_code == 404:
106
+ if not is_correct_bitbucket_domain:
107
+ return f"Url you provided is incorrect. Please provide correct server or cloud bitbucket url."
108
+ if is_cloud:
109
+ return "Bitbucket API endpoint not found: please provide the correct bitbucket cloud URL"
110
+ else:
111
+ return "Bitbucket API endpoint not found: please provide the correct bitbucket server URL"
112
+ else:
113
+ return f"Bitbucket API returned status code {response.status_code}"
114
+
115
+ except requests.exceptions.SSLError as e:
116
+ return f"SSL certificate verification failed: {str(e)}"
117
+ except requests.exceptions.ConnectionError:
118
+ return f"Cannot connect to Bitbucket at {url if not is_cloud else 'api.bitbucket.org'}: connection refused"
119
+ except requests.exceptions.Timeout:
120
+ return f"Connection to Bitbucket at {url if not is_cloud else 'api.bitbucket.org'} timed out"
121
+ except requests.exceptions.RequestException as e:
122
+ return f"Error connecting to Bitbucket: {str(e)}"
123
+ except Exception as e:
124
+ return f"Unexpected error: {str(e)}"
@@ -0,0 +1,18 @@
1
+ from pydantic import BaseModel, ConfigDict, Field, SecretStr
2
+
3
+
4
+ class BrowserConfiguration(BaseModel):
5
+ model_config = ConfigDict(
6
+ json_schema_extra={
7
+ "metadata": {
8
+ "label": "Browser",
9
+ "icon_url": "browser.svg",
10
+ "section": "credentials",
11
+ "type": "browser",
12
+ "categories": ["testing"],
13
+ "extra_categories": ["browser", "google", "search", "web"],
14
+ }
15
+ }
16
+ )
17
+ google_cse_id: str = Field(description="Google CSE id", default=None)
18
+ google_api_key: SecretStr = Field(description="Google API key", json_schema_extra={'secret': True})
@@ -0,0 +1,19 @@
1
+ from pydantic import BaseModel, ConfigDict, Field, SecretStr
2
+
3
+
4
+ class CarrierConfiguration(BaseModel):
5
+ model_config = ConfigDict(
6
+ json_schema_extra={
7
+ "metadata": {
8
+ "label": "Carrier",
9
+ "icon_url": "carrier.svg",
10
+ "section": "credentials",
11
+ "type": "carrier",
12
+ "categories": ["testing"],
13
+ "extra_categories": ["carrier", "security", "testing", "vulnerability"],
14
+ }
15
+ }
16
+ )
17
+ organization: str = Field(description="Carrier Organization")
18
+ url: str = Field(description="Carrier URL")
19
+ private_token: SecretStr = Field(description="Carrier Private Token")
@@ -34,4 +34,99 @@ class ConfluenceConfiguration(BaseModel):
34
34
  base_url: str = Field(description="Confluence URL")
35
35
  username: Optional[str] = Field(description="Confluence Username", default=None)
36
36
  api_key: Optional[SecretStr] = Field(description="Confluence API Key", default=None)
37
- token: Optional[SecretStr] = Field(description="Confluence Token", default=None)
37
+ token: Optional[SecretStr] = Field(description="Confluence Token", default=None)
38
+
39
+ @staticmethod
40
+ def check_connection(settings: dict) -> str | None:
41
+ """
42
+ Check the connection to Confluence.
43
+
44
+ Args:
45
+ settings: Dictionary containing Confluence configuration
46
+ - base_url: Confluence instance URL (required)
47
+ - username: Username for Basic Auth (optional)
48
+ - api_key: API key/password for Basic Auth (optional)
49
+ - token: Bearer token for authentication (optional)
50
+
51
+ Returns:
52
+ None if connection successful, error message string if failed
53
+ """
54
+ import requests
55
+ from requests.auth import HTTPBasicAuth
56
+
57
+ # Validate base_url
58
+ base_url = settings.get("base_url", "").strip()
59
+ if not base_url:
60
+ return "Confluence URL is required"
61
+
62
+ # Normalize URL - remove trailing slashes
63
+ base_url = base_url.rstrip("/")
64
+
65
+ # Basic URL validation
66
+ if not base_url.startswith(("http://", "https://")):
67
+ return "Confluence URL must start with http:// or https://"
68
+
69
+ # Check authentication credentials
70
+ username = settings.get("username")
71
+ api_key = settings.get("api_key")
72
+ token = settings.get("token")
73
+
74
+ # Validate authentication - at least one method must be provided
75
+ has_basic_auth = bool(username and api_key)
76
+ has_token = bool(token and str(token).strip())
77
+
78
+ # Determine authentication method
79
+ auth_headers = {}
80
+ auth = None
81
+
82
+ if has_token:
83
+ # Bearer token authentication
84
+ token_value = token.get_secret_value() if hasattr(token, 'get_secret_value') else token
85
+ auth_headers["Authorization"] = f"Bearer {token_value}"
86
+ elif has_basic_auth:
87
+ # Basic authentication
88
+ api_key_value = api_key.get_secret_value() if hasattr(api_key, 'get_secret_value') else api_key
89
+ auth = HTTPBasicAuth(username, api_key_value)
90
+ else:
91
+ return "Authentication required: provide either token or both username and api_key"
92
+
93
+ # Test connection using /rest/api/user/current endpoint
94
+ # This endpoint returns current user info and validates authentication
95
+ test_url = f"{base_url}/rest/api/user/current"
96
+
97
+ try:
98
+ response = requests.get(
99
+ test_url,
100
+ auth=auth,
101
+ headers=auth_headers,
102
+ timeout=10
103
+ )
104
+
105
+ # Check response status
106
+ if response.status_code == 200:
107
+ # Successfully connected and authenticated
108
+ return None
109
+ elif response.status_code == 401:
110
+ # Authentication failed
111
+ if has_token:
112
+ return "Authentication failed: Invalid token"
113
+ else:
114
+ return "Authentication failed: Invalid username or API key"
115
+ elif response.status_code == 403:
116
+ return """Access forbidden: check permissions and verify the credentials you provided.
117
+ Most probably you provided incorrect credentials (user name and api key or token)"""
118
+ elif response.status_code == 404:
119
+ return "Confluence API endpoint not found: verify the Confluence URL"
120
+ else:
121
+ return f"Confluence API returned status code {response.status_code}"
122
+
123
+ except requests.exceptions.SSLError as e:
124
+ return f"SSL certificate verification failed: {str(e)}"
125
+ except requests.exceptions.ConnectionError:
126
+ return f"Cannot connect to Confluence at {base_url}: connection refused"
127
+ except requests.exceptions.Timeout:
128
+ return f"Connection to Confluence at {base_url} timed out"
129
+ except requests.exceptions.RequestException as e:
130
+ return f"Error connecting to Confluence: {str(e)}"
131
+ except Exception as e:
132
+ return f"Unexpected error: {str(e)}"
@@ -12,7 +12,7 @@ class DeltaLakeConfiguration(BaseModel):
12
12
  "hidden": True,
13
13
  "section": "credentials",
14
14
  "type": "delta_lake",
15
- "categories": ["database"],
15
+ "categories": ["other"],
16
16
  "extra_categories": ["aws", "data lake", "analytics", "storage"],
17
17
  }
18
18
  }
@@ -16,10 +16,6 @@ class FigmaConfiguration(BaseModel):
16
16
  {
17
17
  "name": "Token",
18
18
  "fields": ["token"]
19
- },
20
- {
21
- "name": "Oath2",
22
- "fields": ["oauth2"]
23
19
  }
24
20
  ]
25
21
  }
@@ -32,4 +28,3 @@ class FigmaConfiguration(BaseModel):
32
28
  }
33
29
  )
34
30
  token: Optional[SecretStr] = Field(description="Figma Token", json_schema_extra={"secret": True}, default=None)
35
- oauth2: Optional[SecretStr] = Field(description="OAuth2 Token", json_schema_extra={"secret": True}, default=None)
@@ -84,4 +84,68 @@ class GithubConfiguration(BaseModel):
84
84
  "Authentication is misconfigured: provide either Token (access_token), "
85
85
  "Password (username + password), App private key (app_id + app_private_key), "
86
86
  "or leave all blank for anonymous access."
87
- )
87
+ )
88
+
89
+ @staticmethod
90
+ def check_connection(settings: dict) -> str | None:
91
+ """
92
+ Check GitHub connection using provided settings.
93
+ Returns None if connection is successful, error message otherwise.
94
+ """
95
+ import requests
96
+ from requests.auth import HTTPBasicAuth
97
+ import jwt
98
+ import time
99
+
100
+ base_url = settings.get('base_url', 'https://api.github.com')
101
+ access_token = settings.get('access_token')
102
+ username = settings.get('username')
103
+ password = settings.get('password')
104
+ app_id = settings.get('app_id')
105
+ app_private_key = settings.get('app_private_key')
106
+
107
+ # if all auth methods are None or empty, allow anonymous access
108
+ if not any([access_token, (username and password), (app_id and app_private_key)]):
109
+ return None
110
+
111
+ headers = {'Accept': 'application/vnd.github.v3+json'}
112
+ auth = None
113
+
114
+ try:
115
+ # Determine authentication method
116
+ if access_token:
117
+ headers['Authorization'] = f'token {access_token}'
118
+ elif username and password:
119
+ auth = HTTPBasicAuth(username, password)
120
+ elif app_id and app_private_key:
121
+ # Generate JWT for GitHub App authentication
122
+ payload = {
123
+ 'iat': int(time.time()),
124
+ 'exp': int(time.time()) + 600, # 10 minutes
125
+ 'iss': app_id
126
+ }
127
+ jwt_token = jwt.encode(payload, app_private_key, algorithm='RS256')
128
+ headers['Authorization'] = f'Bearer {jwt_token}'
129
+
130
+ # Test connection with user endpoint
131
+ response = requests.get(f'{base_url}/user', headers=headers, auth=auth, timeout=10)
132
+
133
+ if response.status_code == 200:
134
+ return None
135
+ elif response.status_code == 401:
136
+ return "Authentication failed: Invalid credentials"
137
+ elif response.status_code == 403:
138
+ return "Access forbidden: Check your permissions"
139
+ elif response.status_code == 404:
140
+ return "GitHub API endpoint not found"
141
+ else:
142
+ return f"Connection failed with status {response.status_code}: {response.text}"
143
+
144
+ except requests.exceptions.ConnectionError:
145
+ return "Connection error: Unable to reach GitHub API"
146
+ except requests.exceptions.Timeout:
147
+ return "Connection timeout: GitHub API did not respond in time"
148
+ except jwt.InvalidKeyError:
149
+ return "Invalid private key format for GitHub App authentication"
150
+ except Exception as e:
151
+ return f"Unexpected error: {str(e)}"
@@ -29,3 +29,82 @@ class GitlabConfiguration(BaseModel):
29
29
  )
30
30
  url: str = Field(description="GitLab URL")
31
31
  private_token: SecretStr = Field(description="GitLab private token")
32
+
33
+ @staticmethod
34
+ def check_connection(settings: dict) -> str | None:
35
+ """
36
+ Check the connection to GitLab.
37
+
38
+ Args:
39
+ settings: Dictionary containing GitLab configuration
40
+ - url: GitLab instance URL (required)
41
+ - private_token: GitLab private token for authentication (required)
42
+
43
+ Returns:
44
+ None if connection successful, error message string if failed
45
+ """
46
+ import requests
47
+
48
+ # Validate url
49
+ url = settings.get("url", "").strip()
50
+ if not url:
51
+ return "GitLab URL is required"
52
+
53
+ # Normalize URL - remove trailing slashes
54
+ url = url.rstrip("/")
55
+
56
+ # Basic URL validation
57
+ if not url.startswith(("http://", "https://")):
58
+ return "GitLab URL must start with http:// or https://"
59
+
60
+ # Validate private_token
61
+ private_token = settings.get("private_token")
62
+ if not private_token:
63
+ return "GitLab private token is required"
64
+
65
+ # Extract token value if it's a SecretStr
66
+ token_value = private_token.get_secret_value() if hasattr(private_token, 'get_secret_value') else private_token
67
+
68
+ if not token_value or not str(token_value).strip():
69
+ return "GitLab private token cannot be empty"
70
+
71
+ # Test connection using /api/v4/user endpoint
72
+ # This endpoint returns current authenticated user info
73
+ test_url = f"{url}/api/v4/user"
74
+
75
+ # GitLab supports both PRIVATE-TOKEN header and Authorization Bearer
76
+ # Using PRIVATE-TOKEN is GitLab-specific and more explicit
77
+ headers = {
78
+ "PRIVATE-TOKEN": str(token_value).strip()
79
+ }
80
+
81
+ try:
82
+ response = requests.get(
83
+ test_url,
84
+ headers=headers,
85
+ timeout=10
86
+ )
87
+
88
+ # Check response status
89
+ if response.status_code == 200:
90
+ # Successfully connected and authenticated
91
+ return None
92
+ elif response.status_code == 401:
93
+ return "Authentication failed: invalid private token"
94
+ elif response.status_code == 403:
95
+ return "Access forbidden: token lacks required permissions"
96
+ elif response.status_code == 404:
97
+ return "GitLab API endpoint not found: verify the GitLab URL"
98
+ else:
99
+ return f"GitLab API returned status code {response.status_code}"
100
+
101
+ except requests.exceptions.SSLError as e:
102
+ return f"SSL certificate verification failed: {str(e)}"
103
+ except requests.exceptions.ConnectionError:
104
+ return f"Cannot connect to GitLab at {url}: connection refused"
105
+ except requests.exceptions.Timeout:
106
+ return f"Connection to GitLab at {url} timed out"
107
+ except requests.exceptions.RequestException as e:
108
+ return f"Error connecting to GitLab: {str(e)}"
109
+ except Exception as e:
110
+ return f"Unexpected error: {str(e)}"
@@ -0,0 +1,17 @@
1
+ from pydantic import BaseModel, ConfigDict, Field, SecretStr
2
+
3
+
4
+ class GooglePlacesConfiguration(BaseModel):
5
+ model_config = ConfigDict(
6
+ json_schema_extra={
7
+ "metadata": {
8
+ "label": "Google Places",
9
+ "icon_url": "google.svg",
10
+ "section": "credentials",
11
+ "type": "google_places",
12
+ "categories": ["other"],
13
+ "extra_categories": ["google", "places", "maps", "location", "geocoding"],
14
+ }
15
+ }
16
+ )
17
+ api_key: SecretStr = Field(description="Google Places API Key")
@@ -35,3 +35,106 @@ class JiraConfiguration(BaseModel):
35
35
  username: Optional[str] = Field(description="Jira Username", default=None)
36
36
  api_key: Optional[SecretStr] = Field(description="Jira API Key", default=None)
37
37
  token: Optional[SecretStr] = Field(description="Jira Token", default=None)
38
+
39
+ @staticmethod
40
+ def check_connection(settings: dict) -> str | None:
41
+ """
42
+ Check Jira connection using provided settings.
43
+ Returns None if connection is successful, error message otherwise.
44
+
45
+ Tests authentication by calling the /rest/api/latest/myself endpoint,
46
+ which returns information about the currently authenticated user.
47
+ """
48
+ import requests
49
+ from requests.auth import HTTPBasicAuth
50
+
51
+ # Extract and validate settings
52
+ base_url = settings.get('base_url', '').rstrip('/')
53
+ username = settings.get('username')
54
+ api_key = settings.get('api_key')
55
+ token = settings.get('token')
56
+
57
+ # Validate base URL
58
+ if not base_url:
59
+ return "Base URL is required"
60
+
61
+ if not base_url.startswith(('http://', 'https://')):
62
+ return "Base URL must start with http:// or https://"
63
+
64
+ # Validate authentication - at least one method must be provided
65
+ has_basic_auth = bool(username and api_key)
66
+ has_token = bool(token and str(token).strip())
67
+
68
+ if not (has_basic_auth or has_token):
69
+ return "Authentication required: Provide either username + API key, or bearer token"
70
+
71
+ # Setup authentication headers
72
+ headers = {'Accept': 'application/json'}
73
+ auth = None
74
+
75
+ if has_token:
76
+ # Bearer token authentication
77
+ token_value = token.get_secret_value() if hasattr(token, 'get_secret_value') else token
78
+ headers['Authorization'] = f'Bearer {token_value}'
79
+ elif has_basic_auth:
80
+ # Basic authentication
81
+ api_key_value = api_key.get_secret_value() if hasattr(api_key, 'get_secret_value') else api_key
82
+ auth = HTTPBasicAuth(username, api_key_value)
83
+
84
+ # Build API endpoint - using 'latest' for version independence
85
+ api_endpoint = f"{base_url}/rest/api/latest/myself"
86
+
87
+ try:
88
+ # Make authenticated request to verify credentials
89
+ response = requests.get(
90
+ api_endpoint,
91
+ headers=headers,
92
+ auth=auth,
93
+ timeout=10
94
+ )
95
+
96
+ # Handle different response codes
97
+ if response.status_code == 200:
98
+ return None # Success - credentials are valid
99
+
100
+ elif response.status_code == 401:
101
+ # Authentication failed
102
+ if has_token:
103
+ return "Authentication failed: Invalid bearer token"
104
+ else:
105
+ return "Authentication failed: Invalid username or API key"
106
+
107
+ elif response.status_code == 403:
108
+ # Authenticated but insufficient permissions
109
+ return "Access forbidden: Your account has insufficient permissions to access Jira API"
110
+
111
+ elif response.status_code == 404:
112
+ # API endpoint not found - likely wrong URL
113
+ return "Jira API endpoint not found: Verify your base URL (e.g., 'https://yourinstance.atlassian.net')"
114
+
115
+ else:
116
+ # Other HTTP errors - try to extract Jira error messages
117
+ error_detail = ""
118
+ try:
119
+ error_json = response.json()
120
+ if 'errorMessages' in error_json and error_json['errorMessages']:
121
+ error_detail = ": " + ", ".join(error_json['errorMessages'])
122
+ elif 'message' in error_json:
123
+ error_detail = f": {error_json['message']}"
124
+ except:
125
+ pass
126
+
127
+ return f"Connection failed with status {response.status_code}{error_detail}"
128
+
129
+ except requests.exceptions.SSLError:
130
+ return "SSL certificate verification failed: Check your Jira URL or network settings"
131
+ except requests.exceptions.ConnectionError:
132
+ return "Connection error: Unable to reach Jira server - check URL and network connectivity"
133
+ except requests.exceptions.Timeout:
134
+ return "Connection timeout: Jira server did not respond within 10 seconds"
135
+ except requests.exceptions.MissingSchema:
136
+ return "Invalid URL format: URL must include protocol (http:// or https://)"
137
+ except requests.exceptions.InvalidURL:
138
+ return "Invalid URL format: Please check your Jira base URL"
139
+ except Exception as e:
140
+ return f"Unexpected error: {str(e)}"
@@ -22,7 +22,7 @@ class PostmanConfiguration(BaseModel):
22
22
  },
23
23
  "section": "credentials",
24
24
  "type": "postman",
25
- "categories": ["api testing"],
25
+ "categories": ["other"],
26
26
  "extra_categories": ["postman", "api", "testing", "collection"],
27
27
  }
28
28
  }
@@ -1,5 +1,3 @@
1
- from typing import Optional
2
-
3
1
  from pydantic import BaseModel, ConfigDict, Field, SecretStr
4
2
 
5
3
 
@@ -17,5 +15,5 @@ class QtestConfiguration(BaseModel):
17
15
  }
18
16
  )
19
17
  base_url: str = Field(description="QTest base url")
20
- qtest_api_token: Optional[SecretStr] = Field(description="QTest API token", default=None)
18
+ qtest_api_token: SecretStr = Field(description="QTest API token")
21
19
 
@@ -0,0 +1,19 @@
1
+ from pydantic import BaseModel, ConfigDict, Field, SecretStr
2
+
3
+
4
+ class ReportPortalConfiguration(BaseModel):
5
+ model_config = ConfigDict(
6
+ json_schema_extra={
7
+ "metadata": {
8
+ "label": "Report Portal",
9
+ "icon_url": "report_portal.svg",
10
+ "section": "credentials",
11
+ "type": "report_portal",
12
+ "categories": ["testing"],
13
+ "extra_categories": ["report portal", "testing", "automation", "reports"],
14
+ }
15
+ }
16
+ )
17
+ project: str = Field(description="Report Portal Project Name")
18
+ endpoint: str = Field(description="Report Portal Endpoint URL")
19
+ api_key: SecretStr = Field(description="Report Portal API Key")