alita-sdk 0.3.257__py3-none-any.whl → 0.3.584__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/cli/__init__.py +10 -0
- alita_sdk/cli/__main__.py +17 -0
- alita_sdk/cli/agent/__init__.py +5 -0
- alita_sdk/cli/agent/default.py +258 -0
- alita_sdk/cli/agent_executor.py +155 -0
- alita_sdk/cli/agent_loader.py +215 -0
- alita_sdk/cli/agent_ui.py +228 -0
- alita_sdk/cli/agents.py +3794 -0
- alita_sdk/cli/callbacks.py +647 -0
- alita_sdk/cli/cli.py +168 -0
- alita_sdk/cli/config.py +306 -0
- alita_sdk/cli/context/__init__.py +30 -0
- alita_sdk/cli/context/cleanup.py +198 -0
- alita_sdk/cli/context/manager.py +731 -0
- alita_sdk/cli/context/message.py +285 -0
- alita_sdk/cli/context/strategies.py +289 -0
- alita_sdk/cli/context/token_estimation.py +127 -0
- alita_sdk/cli/formatting.py +182 -0
- alita_sdk/cli/input_handler.py +419 -0
- alita_sdk/cli/inventory.py +1073 -0
- alita_sdk/cli/mcp_loader.py +315 -0
- alita_sdk/cli/toolkit.py +327 -0
- alita_sdk/cli/toolkit_loader.py +85 -0
- alita_sdk/cli/tools/__init__.py +43 -0
- alita_sdk/cli/tools/approval.py +224 -0
- alita_sdk/cli/tools/filesystem.py +1751 -0
- alita_sdk/cli/tools/planning.py +389 -0
- alita_sdk/cli/tools/terminal.py +414 -0
- alita_sdk/community/__init__.py +72 -12
- alita_sdk/community/inventory/__init__.py +236 -0
- alita_sdk/community/inventory/config.py +257 -0
- alita_sdk/community/inventory/enrichment.py +2137 -0
- alita_sdk/community/inventory/extractors.py +1469 -0
- alita_sdk/community/inventory/ingestion.py +3172 -0
- alita_sdk/community/inventory/knowledge_graph.py +1457 -0
- alita_sdk/community/inventory/parsers/__init__.py +218 -0
- alita_sdk/community/inventory/parsers/base.py +295 -0
- alita_sdk/community/inventory/parsers/csharp_parser.py +907 -0
- alita_sdk/community/inventory/parsers/go_parser.py +851 -0
- alita_sdk/community/inventory/parsers/html_parser.py +389 -0
- alita_sdk/community/inventory/parsers/java_parser.py +593 -0
- alita_sdk/community/inventory/parsers/javascript_parser.py +629 -0
- alita_sdk/community/inventory/parsers/kotlin_parser.py +768 -0
- alita_sdk/community/inventory/parsers/markdown_parser.py +362 -0
- alita_sdk/community/inventory/parsers/python_parser.py +604 -0
- alita_sdk/community/inventory/parsers/rust_parser.py +858 -0
- alita_sdk/community/inventory/parsers/swift_parser.py +832 -0
- alita_sdk/community/inventory/parsers/text_parser.py +322 -0
- alita_sdk/community/inventory/parsers/yaml_parser.py +370 -0
- alita_sdk/community/inventory/patterns/__init__.py +61 -0
- alita_sdk/community/inventory/patterns/ast_adapter.py +380 -0
- alita_sdk/community/inventory/patterns/loader.py +348 -0
- alita_sdk/community/inventory/patterns/registry.py +198 -0
- alita_sdk/community/inventory/presets.py +535 -0
- alita_sdk/community/inventory/retrieval.py +1403 -0
- alita_sdk/community/inventory/toolkit.py +173 -0
- alita_sdk/community/inventory/toolkit_utils.py +176 -0
- alita_sdk/community/inventory/visualize.py +1370 -0
- alita_sdk/configurations/__init__.py +11 -0
- alita_sdk/configurations/ado.py +148 -2
- alita_sdk/configurations/azure_search.py +1 -1
- alita_sdk/configurations/bigquery.py +1 -1
- alita_sdk/configurations/bitbucket.py +94 -2
- alita_sdk/configurations/browser.py +18 -0
- alita_sdk/configurations/carrier.py +19 -0
- alita_sdk/configurations/confluence.py +130 -1
- alita_sdk/configurations/delta_lake.py +1 -1
- alita_sdk/configurations/figma.py +76 -5
- alita_sdk/configurations/github.py +65 -1
- alita_sdk/configurations/gitlab.py +81 -0
- alita_sdk/configurations/google_places.py +17 -0
- alita_sdk/configurations/jira.py +103 -0
- alita_sdk/configurations/openapi.py +323 -0
- alita_sdk/configurations/postman.py +1 -1
- alita_sdk/configurations/qtest.py +72 -3
- alita_sdk/configurations/report_portal.py +115 -0
- alita_sdk/configurations/salesforce.py +19 -0
- alita_sdk/configurations/service_now.py +1 -12
- alita_sdk/configurations/sharepoint.py +167 -0
- alita_sdk/configurations/sonar.py +18 -0
- alita_sdk/configurations/sql.py +20 -0
- alita_sdk/configurations/testio.py +101 -0
- alita_sdk/configurations/testrail.py +88 -0
- alita_sdk/configurations/xray.py +94 -1
- alita_sdk/configurations/zephyr_enterprise.py +94 -1
- alita_sdk/configurations/zephyr_essential.py +95 -0
- alita_sdk/runtime/clients/artifact.py +21 -4
- alita_sdk/runtime/clients/client.py +458 -67
- alita_sdk/runtime/clients/mcp_discovery.py +342 -0
- alita_sdk/runtime/clients/mcp_manager.py +262 -0
- alita_sdk/runtime/clients/sandbox_client.py +352 -0
- alita_sdk/runtime/langchain/_constants_bkup.py +1318 -0
- alita_sdk/runtime/langchain/assistant.py +183 -43
- alita_sdk/runtime/langchain/constants.py +647 -1
- alita_sdk/runtime/langchain/document_loaders/AlitaDocxMammothLoader.py +315 -3
- alita_sdk/runtime/langchain/document_loaders/AlitaExcelLoader.py +209 -31
- alita_sdk/runtime/langchain/document_loaders/AlitaImageLoader.py +1 -1
- alita_sdk/runtime/langchain/document_loaders/AlitaJSONLinesLoader.py +77 -0
- alita_sdk/runtime/langchain/document_loaders/AlitaJSONLoader.py +10 -3
- alita_sdk/runtime/langchain/document_loaders/AlitaMarkdownLoader.py +66 -0
- alita_sdk/runtime/langchain/document_loaders/AlitaPDFLoader.py +79 -10
- alita_sdk/runtime/langchain/document_loaders/AlitaPowerPointLoader.py +52 -15
- alita_sdk/runtime/langchain/document_loaders/AlitaPythonLoader.py +9 -0
- alita_sdk/runtime/langchain/document_loaders/AlitaTableLoader.py +1 -4
- alita_sdk/runtime/langchain/document_loaders/AlitaTextLoader.py +15 -2
- alita_sdk/runtime/langchain/document_loaders/ImageParser.py +30 -0
- alita_sdk/runtime/langchain/document_loaders/constants.py +189 -41
- alita_sdk/runtime/langchain/interfaces/llm_processor.py +4 -2
- alita_sdk/runtime/langchain/langraph_agent.py +493 -105
- alita_sdk/runtime/langchain/utils.py +118 -8
- alita_sdk/runtime/llms/preloaded.py +2 -6
- alita_sdk/runtime/models/mcp_models.py +61 -0
- alita_sdk/runtime/skills/__init__.py +91 -0
- alita_sdk/runtime/skills/callbacks.py +498 -0
- alita_sdk/runtime/skills/discovery.py +540 -0
- alita_sdk/runtime/skills/executor.py +610 -0
- alita_sdk/runtime/skills/input_builder.py +371 -0
- alita_sdk/runtime/skills/models.py +330 -0
- alita_sdk/runtime/skills/registry.py +355 -0
- alita_sdk/runtime/skills/skill_runner.py +330 -0
- alita_sdk/runtime/toolkits/__init__.py +28 -0
- alita_sdk/runtime/toolkits/application.py +14 -4
- alita_sdk/runtime/toolkits/artifact.py +25 -9
- alita_sdk/runtime/toolkits/datasource.py +13 -6
- alita_sdk/runtime/toolkits/mcp.py +782 -0
- alita_sdk/runtime/toolkits/planning.py +178 -0
- alita_sdk/runtime/toolkits/skill_router.py +238 -0
- alita_sdk/runtime/toolkits/subgraph.py +11 -6
- alita_sdk/runtime/toolkits/tools.py +314 -70
- alita_sdk/runtime/toolkits/vectorstore.py +11 -5
- alita_sdk/runtime/tools/__init__.py +24 -0
- alita_sdk/runtime/tools/application.py +16 -4
- alita_sdk/runtime/tools/artifact.py +367 -33
- alita_sdk/runtime/tools/data_analysis.py +183 -0
- alita_sdk/runtime/tools/function.py +100 -4
- alita_sdk/runtime/tools/graph.py +81 -0
- alita_sdk/runtime/tools/image_generation.py +218 -0
- alita_sdk/runtime/tools/llm.py +1032 -177
- alita_sdk/runtime/tools/loop.py +3 -1
- alita_sdk/runtime/tools/loop_output.py +3 -1
- alita_sdk/runtime/tools/mcp_inspect_tool.py +284 -0
- alita_sdk/runtime/tools/mcp_remote_tool.py +181 -0
- alita_sdk/runtime/tools/mcp_server_tool.py +3 -1
- alita_sdk/runtime/tools/planning/__init__.py +36 -0
- alita_sdk/runtime/tools/planning/models.py +246 -0
- alita_sdk/runtime/tools/planning/wrapper.py +607 -0
- alita_sdk/runtime/tools/router.py +2 -1
- alita_sdk/runtime/tools/sandbox.py +375 -0
- alita_sdk/runtime/tools/skill_router.py +776 -0
- alita_sdk/runtime/tools/tool.py +3 -1
- alita_sdk/runtime/tools/vectorstore.py +69 -65
- alita_sdk/runtime/tools/vectorstore_base.py +163 -90
- alita_sdk/runtime/utils/AlitaCallback.py +137 -21
- alita_sdk/runtime/utils/constants.py +5 -1
- alita_sdk/runtime/utils/mcp_client.py +492 -0
- alita_sdk/runtime/utils/mcp_oauth.py +361 -0
- alita_sdk/runtime/utils/mcp_sse_client.py +434 -0
- alita_sdk/runtime/utils/mcp_tools_discovery.py +124 -0
- alita_sdk/runtime/utils/streamlit.py +41 -14
- alita_sdk/runtime/utils/toolkit_utils.py +28 -9
- alita_sdk/runtime/utils/utils.py +48 -0
- alita_sdk/tools/__init__.py +135 -37
- alita_sdk/tools/ado/__init__.py +2 -2
- alita_sdk/tools/ado/repos/__init__.py +16 -19
- alita_sdk/tools/ado/repos/repos_wrapper.py +12 -20
- alita_sdk/tools/ado/test_plan/__init__.py +27 -8
- alita_sdk/tools/ado/test_plan/test_plan_wrapper.py +56 -28
- alita_sdk/tools/ado/wiki/__init__.py +28 -12
- alita_sdk/tools/ado/wiki/ado_wrapper.py +114 -40
- alita_sdk/tools/ado/work_item/__init__.py +28 -12
- alita_sdk/tools/ado/work_item/ado_wrapper.py +95 -11
- alita_sdk/tools/advanced_jira_mining/__init__.py +13 -8
- alita_sdk/tools/aws/delta_lake/__init__.py +15 -11
- alita_sdk/tools/aws/delta_lake/tool.py +5 -1
- alita_sdk/tools/azure_ai/search/__init__.py +14 -8
- alita_sdk/tools/base/tool.py +5 -1
- alita_sdk/tools/base_indexer_toolkit.py +454 -110
- alita_sdk/tools/bitbucket/__init__.py +28 -19
- alita_sdk/tools/bitbucket/api_wrapper.py +285 -27
- alita_sdk/tools/bitbucket/cloud_api_wrapper.py +5 -5
- alita_sdk/tools/browser/__init__.py +41 -16
- alita_sdk/tools/browser/crawler.py +3 -1
- alita_sdk/tools/browser/utils.py +15 -6
- alita_sdk/tools/carrier/__init__.py +18 -17
- alita_sdk/tools/carrier/backend_reports_tool.py +8 -4
- alita_sdk/tools/carrier/excel_reporter.py +8 -4
- alita_sdk/tools/chunkers/__init__.py +3 -1
- alita_sdk/tools/chunkers/code/codeparser.py +1 -1
- alita_sdk/tools/chunkers/sematic/json_chunker.py +2 -1
- alita_sdk/tools/chunkers/sematic/markdown_chunker.py +97 -6
- alita_sdk/tools/chunkers/sematic/proposal_chunker.py +1 -1
- alita_sdk/tools/chunkers/universal_chunker.py +270 -0
- alita_sdk/tools/cloud/aws/__init__.py +12 -7
- alita_sdk/tools/cloud/azure/__init__.py +12 -7
- alita_sdk/tools/cloud/gcp/__init__.py +12 -7
- alita_sdk/tools/cloud/k8s/__init__.py +12 -7
- alita_sdk/tools/code/linter/__init__.py +10 -8
- alita_sdk/tools/code/loaders/codesearcher.py +3 -2
- alita_sdk/tools/code/sonar/__init__.py +21 -13
- alita_sdk/tools/code_indexer_toolkit.py +199 -0
- alita_sdk/tools/confluence/__init__.py +22 -14
- alita_sdk/tools/confluence/api_wrapper.py +197 -58
- alita_sdk/tools/confluence/loader.py +14 -2
- alita_sdk/tools/custom_open_api/__init__.py +12 -5
- alita_sdk/tools/elastic/__init__.py +11 -8
- alita_sdk/tools/elitea_base.py +546 -64
- alita_sdk/tools/figma/__init__.py +60 -11
- alita_sdk/tools/figma/api_wrapper.py +1400 -167
- alita_sdk/tools/figma/figma_client.py +73 -0
- alita_sdk/tools/figma/toon_tools.py +2748 -0
- alita_sdk/tools/github/__init__.py +18 -17
- alita_sdk/tools/github/api_wrapper.py +9 -26
- alita_sdk/tools/github/github_client.py +81 -12
- alita_sdk/tools/github/schemas.py +2 -1
- alita_sdk/tools/github/tool.py +5 -1
- alita_sdk/tools/gitlab/__init__.py +19 -13
- alita_sdk/tools/gitlab/api_wrapper.py +256 -80
- alita_sdk/tools/gitlab_org/__init__.py +14 -10
- alita_sdk/tools/google/bigquery/__init__.py +14 -13
- alita_sdk/tools/google/bigquery/tool.py +5 -1
- alita_sdk/tools/google_places/__init__.py +21 -11
- alita_sdk/tools/jira/__init__.py +22 -11
- alita_sdk/tools/jira/api_wrapper.py +315 -168
- alita_sdk/tools/keycloak/__init__.py +11 -8
- alita_sdk/tools/localgit/__init__.py +9 -3
- alita_sdk/tools/localgit/local_git.py +62 -54
- alita_sdk/tools/localgit/tool.py +5 -1
- alita_sdk/tools/memory/__init__.py +38 -14
- alita_sdk/tools/non_code_indexer_toolkit.py +7 -2
- alita_sdk/tools/ocr/__init__.py +11 -8
- alita_sdk/tools/openapi/__init__.py +491 -106
- alita_sdk/tools/openapi/api_wrapper.py +1357 -0
- alita_sdk/tools/openapi/tool.py +20 -0
- alita_sdk/tools/pandas/__init__.py +20 -12
- alita_sdk/tools/pandas/api_wrapper.py +40 -45
- alita_sdk/tools/pandas/dataframe/generator/base.py +3 -1
- alita_sdk/tools/postman/__init__.py +11 -11
- alita_sdk/tools/postman/api_wrapper.py +19 -8
- alita_sdk/tools/postman/postman_analysis.py +8 -1
- alita_sdk/tools/pptx/__init__.py +11 -10
- alita_sdk/tools/qtest/__init__.py +22 -14
- alita_sdk/tools/qtest/api_wrapper.py +1784 -88
- alita_sdk/tools/rally/__init__.py +13 -10
- alita_sdk/tools/report_portal/__init__.py +23 -16
- alita_sdk/tools/salesforce/__init__.py +22 -16
- alita_sdk/tools/servicenow/__init__.py +21 -16
- alita_sdk/tools/servicenow/api_wrapper.py +1 -1
- alita_sdk/tools/sharepoint/__init__.py +17 -14
- alita_sdk/tools/sharepoint/api_wrapper.py +179 -39
- alita_sdk/tools/sharepoint/authorization_helper.py +191 -1
- alita_sdk/tools/sharepoint/utils.py +8 -2
- alita_sdk/tools/slack/__init__.py +13 -8
- alita_sdk/tools/sql/__init__.py +22 -19
- alita_sdk/tools/sql/api_wrapper.py +71 -23
- alita_sdk/tools/testio/__init__.py +21 -13
- alita_sdk/tools/testrail/__init__.py +13 -11
- alita_sdk/tools/testrail/api_wrapper.py +214 -46
- alita_sdk/tools/utils/__init__.py +28 -4
- alita_sdk/tools/utils/content_parser.py +241 -55
- alita_sdk/tools/utils/text_operations.py +254 -0
- alita_sdk/tools/vector_adapters/VectorStoreAdapter.py +83 -27
- alita_sdk/tools/xray/__init__.py +18 -14
- alita_sdk/tools/xray/api_wrapper.py +58 -113
- alita_sdk/tools/yagmail/__init__.py +9 -3
- alita_sdk/tools/zephyr/__init__.py +12 -7
- alita_sdk/tools/zephyr_enterprise/__init__.py +16 -9
- alita_sdk/tools/zephyr_enterprise/api_wrapper.py +30 -15
- alita_sdk/tools/zephyr_essential/__init__.py +16 -10
- alita_sdk/tools/zephyr_essential/api_wrapper.py +297 -54
- alita_sdk/tools/zephyr_essential/client.py +6 -4
- alita_sdk/tools/zephyr_scale/__init__.py +13 -8
- alita_sdk/tools/zephyr_scale/api_wrapper.py +39 -31
- alita_sdk/tools/zephyr_squad/__init__.py +12 -7
- {alita_sdk-0.3.257.dist-info → alita_sdk-0.3.584.dist-info}/METADATA +184 -37
- alita_sdk-0.3.584.dist-info/RECORD +452 -0
- alita_sdk-0.3.584.dist-info/entry_points.txt +2 -0
- alita_sdk/tools/bitbucket/tools.py +0 -304
- alita_sdk-0.3.257.dist-info/RECORD +0 -343
- {alita_sdk-0.3.257.dist-info → alita_sdk-0.3.584.dist-info}/WHEEL +0 -0
- {alita_sdk-0.3.257.dist-info → alita_sdk-0.3.584.dist-info}/licenses/LICENSE +0 -0
- {alita_sdk-0.3.257.dist-info → alita_sdk-0.3.584.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,535 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Standard ingestion presets for common programming languages and frameworks.
|
|
3
|
+
|
|
4
|
+
These presets provide sensible defaults for whitelist/blacklist patterns
|
|
5
|
+
to efficiently ingest code repositories while excluding unnecessary files.
|
|
6
|
+
|
|
7
|
+
Usage:
|
|
8
|
+
from alita_sdk.community.inventory.presets import PYTHON_PRESET, JAVASCRIPT_PRESET
|
|
9
|
+
|
|
10
|
+
result = pipeline.run(
|
|
11
|
+
source='github',
|
|
12
|
+
**PYTHON_PRESET
|
|
13
|
+
)
|
|
14
|
+
|
|
15
|
+
# Or combine presets
|
|
16
|
+
custom_preset = {
|
|
17
|
+
**PYTHON_PRESET,
|
|
18
|
+
'blacklist': PYTHON_PRESET['blacklist'] + ['**/custom_exclude/**']
|
|
19
|
+
}
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
# ============================================================================
|
|
23
|
+
# PYTHON PRESETS
|
|
24
|
+
# ============================================================================
|
|
25
|
+
|
|
26
|
+
PYTHON_PRESET = {
|
|
27
|
+
'whitelist': [
|
|
28
|
+
'*.py', # Python source files
|
|
29
|
+
'*.pyi', # Python stub files
|
|
30
|
+
'*.pyx', # Cython files
|
|
31
|
+
'requirements.txt',
|
|
32
|
+
'setup.py',
|
|
33
|
+
'pyproject.toml',
|
|
34
|
+
'Pipfile',
|
|
35
|
+
],
|
|
36
|
+
'blacklist': [
|
|
37
|
+
# Dependencies
|
|
38
|
+
'**/venv/**',
|
|
39
|
+
'**/.venv/**',
|
|
40
|
+
'**/env/**',
|
|
41
|
+
'**/virtualenv/**',
|
|
42
|
+
'**/site-packages/**',
|
|
43
|
+
|
|
44
|
+
# Build outputs
|
|
45
|
+
'**/build/**',
|
|
46
|
+
'**/dist/**',
|
|
47
|
+
'**/*.egg-info/**',
|
|
48
|
+
|
|
49
|
+
# Caches
|
|
50
|
+
'**/__pycache__/**',
|
|
51
|
+
'**/.pytest_cache/**',
|
|
52
|
+
'**/.mypy_cache/**',
|
|
53
|
+
'**/.ruff_cache/**',
|
|
54
|
+
'**/.coverage/**',
|
|
55
|
+
'**/htmlcov/**',
|
|
56
|
+
|
|
57
|
+
# Tests (optional - remove if you want to include tests)
|
|
58
|
+
'**/test_*.py',
|
|
59
|
+
'**/*_test.py',
|
|
60
|
+
'**/tests/**',
|
|
61
|
+
|
|
62
|
+
# Version control
|
|
63
|
+
'**/.git/**',
|
|
64
|
+
|
|
65
|
+
# IDE
|
|
66
|
+
'**/.vscode/**',
|
|
67
|
+
'**/.idea/**',
|
|
68
|
+
'**/.pydevproject/**',
|
|
69
|
+
]
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
PYTHON_PRESET_WITH_TESTS = {
|
|
73
|
+
**PYTHON_PRESET,
|
|
74
|
+
'blacklist': [b for b in PYTHON_PRESET['blacklist']
|
|
75
|
+
if 'test' not in b.lower()]
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
# ============================================================================
|
|
79
|
+
# JAVASCRIPT / TYPESCRIPT PRESETS
|
|
80
|
+
# ============================================================================
|
|
81
|
+
|
|
82
|
+
JAVASCRIPT_PRESET = {
|
|
83
|
+
'whitelist': [
|
|
84
|
+
'*.js',
|
|
85
|
+
'*.jsx',
|
|
86
|
+
'*.mjs',
|
|
87
|
+
'*.cjs',
|
|
88
|
+
'package.json',
|
|
89
|
+
'package-lock.json',
|
|
90
|
+
'tsconfig.json',
|
|
91
|
+
'jsconfig.json',
|
|
92
|
+
],
|
|
93
|
+
'blacklist': [
|
|
94
|
+
# Dependencies
|
|
95
|
+
'**/node_modules/**',
|
|
96
|
+
|
|
97
|
+
# Build outputs
|
|
98
|
+
'**/dist/**',
|
|
99
|
+
'**/build/**',
|
|
100
|
+
'**/out/**',
|
|
101
|
+
'**/.next/**',
|
|
102
|
+
'**/.nuxt/**',
|
|
103
|
+
'**/.output/**',
|
|
104
|
+
'**/.vercel/**',
|
|
105
|
+
|
|
106
|
+
# Bundler outputs
|
|
107
|
+
'**/bundle.js',
|
|
108
|
+
'**/bundle.*.js',
|
|
109
|
+
'**/*.min.js',
|
|
110
|
+
|
|
111
|
+
# Caches
|
|
112
|
+
'**/.cache/**',
|
|
113
|
+
'**/.parcel-cache/**',
|
|
114
|
+
'**/.eslintcache',
|
|
115
|
+
|
|
116
|
+
# Tests (optional)
|
|
117
|
+
'**/*.test.js',
|
|
118
|
+
'**/*.spec.js',
|
|
119
|
+
'**/__tests__/**',
|
|
120
|
+
'**/tests/**',
|
|
121
|
+
|
|
122
|
+
# Version control
|
|
123
|
+
'**/.git/**',
|
|
124
|
+
|
|
125
|
+
# IDE
|
|
126
|
+
'**/.vscode/**',
|
|
127
|
+
'**/.idea/**',
|
|
128
|
+
|
|
129
|
+
# Config/tooling
|
|
130
|
+
'**/.storybook/**',
|
|
131
|
+
]
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
TYPESCRIPT_PRESET = {
|
|
135
|
+
'whitelist': [
|
|
136
|
+
'*.ts',
|
|
137
|
+
'*.tsx',
|
|
138
|
+
'*.js',
|
|
139
|
+
'*.jsx',
|
|
140
|
+
'*.mjs',
|
|
141
|
+
'*.cjs',
|
|
142
|
+
'package.json',
|
|
143
|
+
'tsconfig.json',
|
|
144
|
+
'*.d.ts',
|
|
145
|
+
],
|
|
146
|
+
'blacklist': [
|
|
147
|
+
# Dependencies
|
|
148
|
+
'**/node_modules/**',
|
|
149
|
+
|
|
150
|
+
# Build outputs
|
|
151
|
+
'**/dist/**',
|
|
152
|
+
'**/build/**',
|
|
153
|
+
'**/out/**',
|
|
154
|
+
'**/lib/**',
|
|
155
|
+
'**/.next/**',
|
|
156
|
+
'**/.nuxt/**',
|
|
157
|
+
|
|
158
|
+
# TypeScript outputs
|
|
159
|
+
'**/*.js.map',
|
|
160
|
+
'**/*.d.ts.map',
|
|
161
|
+
|
|
162
|
+
# Caches
|
|
163
|
+
'**/.cache/**',
|
|
164
|
+
'**/.tsbuildinfo',
|
|
165
|
+
'**/.eslintcache',
|
|
166
|
+
|
|
167
|
+
# Tests (optional)
|
|
168
|
+
'**/*.test.ts',
|
|
169
|
+
'**/*.test.tsx',
|
|
170
|
+
'**/*.spec.ts',
|
|
171
|
+
'**/*.spec.tsx',
|
|
172
|
+
'**/__tests__/**',
|
|
173
|
+
'**/tests/**',
|
|
174
|
+
|
|
175
|
+
# Version control
|
|
176
|
+
'**/.git/**',
|
|
177
|
+
|
|
178
|
+
# IDE
|
|
179
|
+
'**/.vscode/**',
|
|
180
|
+
'**/.idea/**',
|
|
181
|
+
]
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
REACT_PRESET = {
|
|
185
|
+
**TYPESCRIPT_PRESET,
|
|
186
|
+
'blacklist': TYPESCRIPT_PRESET['blacklist'] + [
|
|
187
|
+
'**/public/**',
|
|
188
|
+
'**/static/**',
|
|
189
|
+
'**/*.stories.tsx',
|
|
190
|
+
'**/*.stories.ts',
|
|
191
|
+
]
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
NEXTJS_PRESET = {
|
|
195
|
+
**TYPESCRIPT_PRESET,
|
|
196
|
+
'blacklist': TYPESCRIPT_PRESET['blacklist'] + [
|
|
197
|
+
'**/.next/**',
|
|
198
|
+
'**/public/**',
|
|
199
|
+
]
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
# ============================================================================
|
|
203
|
+
# JAVA PRESETS
|
|
204
|
+
# ============================================================================
|
|
205
|
+
|
|
206
|
+
JAVA_PRESET = {
|
|
207
|
+
'whitelist': [
|
|
208
|
+
'*.java',
|
|
209
|
+
'pom.xml',
|
|
210
|
+
'build.gradle',
|
|
211
|
+
'settings.gradle',
|
|
212
|
+
'build.gradle.kts',
|
|
213
|
+
'settings.gradle.kts',
|
|
214
|
+
],
|
|
215
|
+
'blacklist': [
|
|
216
|
+
# Build outputs
|
|
217
|
+
'**/target/**',
|
|
218
|
+
'**/build/**',
|
|
219
|
+
'**/out/**',
|
|
220
|
+
'**/bin/**',
|
|
221
|
+
|
|
222
|
+
# Dependencies
|
|
223
|
+
'**/.gradle/**',
|
|
224
|
+
'**/.m2/**',
|
|
225
|
+
'**/lib/**',
|
|
226
|
+
|
|
227
|
+
# IDE
|
|
228
|
+
'**/.idea/**',
|
|
229
|
+
'**/.eclipse/**',
|
|
230
|
+
'**/.settings/**',
|
|
231
|
+
'**/.classpath',
|
|
232
|
+
'**/.project',
|
|
233
|
+
'**/*.iml',
|
|
234
|
+
|
|
235
|
+
# Tests (optional)
|
|
236
|
+
'**/test/**',
|
|
237
|
+
'**/*Test.java',
|
|
238
|
+
'**/*Tests.java',
|
|
239
|
+
|
|
240
|
+
# Generated code
|
|
241
|
+
'**/generated/**',
|
|
242
|
+
'**/generated-sources/**',
|
|
243
|
+
'**/generated-test-sources/**',
|
|
244
|
+
|
|
245
|
+
# Version control
|
|
246
|
+
'**/.git/**',
|
|
247
|
+
|
|
248
|
+
# Logs
|
|
249
|
+
'**/*.log',
|
|
250
|
+
]
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
SPRING_BOOT_PRESET = {
|
|
254
|
+
**JAVA_PRESET,
|
|
255
|
+
'whitelist': JAVA_PRESET['whitelist'] + [
|
|
256
|
+
'application.properties',
|
|
257
|
+
'application.yml',
|
|
258
|
+
'application.yaml',
|
|
259
|
+
'application-*.properties',
|
|
260
|
+
'application-*.yml',
|
|
261
|
+
]
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
MAVEN_PRESET = {
|
|
265
|
+
**JAVA_PRESET,
|
|
266
|
+
'whitelist': JAVA_PRESET['whitelist'] + [
|
|
267
|
+
'pom.xml',
|
|
268
|
+
'**/pom.xml',
|
|
269
|
+
]
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
GRADLE_PRESET = {
|
|
273
|
+
**JAVA_PRESET,
|
|
274
|
+
'whitelist': JAVA_PRESET['whitelist'] + [
|
|
275
|
+
'build.gradle',
|
|
276
|
+
'build.gradle.kts',
|
|
277
|
+
'settings.gradle',
|
|
278
|
+
'settings.gradle.kts',
|
|
279
|
+
'gradle.properties',
|
|
280
|
+
]
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
# ============================================================================
|
|
284
|
+
# .NET / C# PRESETS
|
|
285
|
+
# ============================================================================
|
|
286
|
+
|
|
287
|
+
DOTNET_PRESET = {
|
|
288
|
+
'whitelist': [
|
|
289
|
+
'*.cs',
|
|
290
|
+
'*.csproj',
|
|
291
|
+
'*.sln',
|
|
292
|
+
'*.vb',
|
|
293
|
+
'*.vbproj',
|
|
294
|
+
'*.fsproj',
|
|
295
|
+
'*.fs',
|
|
296
|
+
],
|
|
297
|
+
'blacklist': [
|
|
298
|
+
# Build outputs
|
|
299
|
+
'**/bin/**',
|
|
300
|
+
'**/obj/**',
|
|
301
|
+
|
|
302
|
+
# Dependencies
|
|
303
|
+
'**/packages/**',
|
|
304
|
+
|
|
305
|
+
# IDE
|
|
306
|
+
'**/.vs/**',
|
|
307
|
+
'**/.vscode/**',
|
|
308
|
+
'**/*.user',
|
|
309
|
+
'**/*.suo',
|
|
310
|
+
|
|
311
|
+
# Tests (optional)
|
|
312
|
+
'**/*Test.cs',
|
|
313
|
+
'**/*Tests.cs',
|
|
314
|
+
'**/test/**',
|
|
315
|
+
'**/tests/**',
|
|
316
|
+
|
|
317
|
+
# Version control
|
|
318
|
+
'**/.git/**',
|
|
319
|
+
|
|
320
|
+
# Logs and temp
|
|
321
|
+
'**/*.log',
|
|
322
|
+
'**/temp/**',
|
|
323
|
+
'**/tmp/**',
|
|
324
|
+
]
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
CSHARP_PRESET = DOTNET_PRESET
|
|
328
|
+
|
|
329
|
+
ASPNET_PRESET = {
|
|
330
|
+
**DOTNET_PRESET,
|
|
331
|
+
'whitelist': DOTNET_PRESET['whitelist'] + [
|
|
332
|
+
'appsettings.json',
|
|
333
|
+
'appsettings.*.json',
|
|
334
|
+
'web.config',
|
|
335
|
+
'Program.cs',
|
|
336
|
+
'Startup.cs',
|
|
337
|
+
]
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
# ============================================================================
|
|
341
|
+
# MULTI-LANGUAGE PRESETS
|
|
342
|
+
# ============================================================================
|
|
343
|
+
|
|
344
|
+
FULLSTACK_JS_PRESET = {
|
|
345
|
+
'whitelist': [
|
|
346
|
+
'*.js',
|
|
347
|
+
'*.jsx',
|
|
348
|
+
'*.ts',
|
|
349
|
+
'*.tsx',
|
|
350
|
+
'*.json',
|
|
351
|
+
],
|
|
352
|
+
'blacklist': [
|
|
353
|
+
'**/node_modules/**',
|
|
354
|
+
'**/dist/**',
|
|
355
|
+
'**/build/**',
|
|
356
|
+
'**/.next/**',
|
|
357
|
+
'**/*.test.js',
|
|
358
|
+
'**/*.test.ts',
|
|
359
|
+
'**/*.spec.js',
|
|
360
|
+
'**/*.spec.ts',
|
|
361
|
+
'**/.git/**',
|
|
362
|
+
'**/.vscode/**',
|
|
363
|
+
]
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
MONOREPO_PRESET = {
|
|
367
|
+
'whitelist': [
|
|
368
|
+
'*.js',
|
|
369
|
+
'*.jsx',
|
|
370
|
+
'*.ts',
|
|
371
|
+
'*.tsx',
|
|
372
|
+
'*.py',
|
|
373
|
+
'*.java',
|
|
374
|
+
'*.cs',
|
|
375
|
+
'package.json',
|
|
376
|
+
'pom.xml',
|
|
377
|
+
'*.csproj',
|
|
378
|
+
],
|
|
379
|
+
'blacklist': [
|
|
380
|
+
# Universal excludes
|
|
381
|
+
'**/node_modules/**',
|
|
382
|
+
'**/venv/**',
|
|
383
|
+
'**/.venv/**',
|
|
384
|
+
'**/target/**',
|
|
385
|
+
'**/bin/**',
|
|
386
|
+
'**/obj/**',
|
|
387
|
+
'**/dist/**',
|
|
388
|
+
'**/build/**',
|
|
389
|
+
'**/__pycache__/**',
|
|
390
|
+
'**/.git/**',
|
|
391
|
+
'**/.vscode/**',
|
|
392
|
+
'**/.idea/**',
|
|
393
|
+
|
|
394
|
+
# Tests
|
|
395
|
+
'**/*test*/**',
|
|
396
|
+
'**/*Test*',
|
|
397
|
+
'**/*test*.*',
|
|
398
|
+
]
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
# ============================================================================
|
|
402
|
+
# DOCUMENTATION PRESETS
|
|
403
|
+
# ============================================================================
|
|
404
|
+
|
|
405
|
+
DOCUMENTATION_PRESET = {
|
|
406
|
+
'whitelist': [
|
|
407
|
+
'*.md',
|
|
408
|
+
'*.mdx',
|
|
409
|
+
'*.rst',
|
|
410
|
+
'*.txt',
|
|
411
|
+
'README*',
|
|
412
|
+
'CHANGELOG*',
|
|
413
|
+
'LICENSE*',
|
|
414
|
+
'CONTRIBUTING*',
|
|
415
|
+
],
|
|
416
|
+
'blacklist': [
|
|
417
|
+
'**/node_modules/**',
|
|
418
|
+
'**/.git/**',
|
|
419
|
+
'**/build/**',
|
|
420
|
+
'**/dist/**',
|
|
421
|
+
]
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
# ============================================================================
|
|
425
|
+
# PRESET REGISTRY
|
|
426
|
+
# ============================================================================
|
|
427
|
+
|
|
428
|
+
PRESETS = {
|
|
429
|
+
# Python
|
|
430
|
+
'python': PYTHON_PRESET,
|
|
431
|
+
'python-with-tests': PYTHON_PRESET_WITH_TESTS,
|
|
432
|
+
|
|
433
|
+
# JavaScript/TypeScript
|
|
434
|
+
'javascript': JAVASCRIPT_PRESET,
|
|
435
|
+
'js': JAVASCRIPT_PRESET,
|
|
436
|
+
'typescript': TYPESCRIPT_PRESET,
|
|
437
|
+
'ts': TYPESCRIPT_PRESET,
|
|
438
|
+
'react': REACT_PRESET,
|
|
439
|
+
'nextjs': NEXTJS_PRESET,
|
|
440
|
+
'next': NEXTJS_PRESET,
|
|
441
|
+
|
|
442
|
+
# Java
|
|
443
|
+
'java': JAVA_PRESET,
|
|
444
|
+
'spring-boot': SPRING_BOOT_PRESET,
|
|
445
|
+
'spring': SPRING_BOOT_PRESET,
|
|
446
|
+
'maven': MAVEN_PRESET,
|
|
447
|
+
'gradle': GRADLE_PRESET,
|
|
448
|
+
|
|
449
|
+
# .NET
|
|
450
|
+
'dotnet': DOTNET_PRESET,
|
|
451
|
+
'csharp': CSHARP_PRESET,
|
|
452
|
+
'cs': CSHARP_PRESET,
|
|
453
|
+
'aspnet': ASPNET_PRESET,
|
|
454
|
+
|
|
455
|
+
# Multi-language
|
|
456
|
+
'fullstack-js': FULLSTACK_JS_PRESET,
|
|
457
|
+
'fullstack': FULLSTACK_JS_PRESET,
|
|
458
|
+
'monorepo': MONOREPO_PRESET,
|
|
459
|
+
|
|
460
|
+
# Documentation
|
|
461
|
+
'docs': DOCUMENTATION_PRESET,
|
|
462
|
+
'documentation': DOCUMENTATION_PRESET,
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
|
|
466
|
+
def get_preset(name: str) -> dict:
|
|
467
|
+
"""
|
|
468
|
+
Get a preset by name.
|
|
469
|
+
|
|
470
|
+
Args:
|
|
471
|
+
name: Preset name (e.g., 'python', 'typescript', 'java')
|
|
472
|
+
|
|
473
|
+
Returns:
|
|
474
|
+
Dictionary with 'whitelist' and 'blacklist' keys
|
|
475
|
+
|
|
476
|
+
Raises:
|
|
477
|
+
KeyError: If preset name not found
|
|
478
|
+
|
|
479
|
+
Example:
|
|
480
|
+
preset = get_preset('python')
|
|
481
|
+
result = pipeline.run(source='github', **preset)
|
|
482
|
+
"""
|
|
483
|
+
if name not in PRESETS:
|
|
484
|
+
available = ', '.join(sorted(PRESETS.keys()))
|
|
485
|
+
raise KeyError(f"Unknown preset '{name}'. Available presets: {available}")
|
|
486
|
+
return PRESETS[name]
|
|
487
|
+
|
|
488
|
+
|
|
489
|
+
def list_presets() -> list:
|
|
490
|
+
"""List all available preset names."""
|
|
491
|
+
return sorted(PRESETS.keys())
|
|
492
|
+
|
|
493
|
+
|
|
494
|
+
def combine_presets(*preset_names: str) -> dict:
|
|
495
|
+
"""
|
|
496
|
+
Combine multiple presets into one.
|
|
497
|
+
|
|
498
|
+
Args:
|
|
499
|
+
*preset_names: Names of presets to combine
|
|
500
|
+
|
|
501
|
+
Returns:
|
|
502
|
+
Dictionary with merged whitelist and blacklist
|
|
503
|
+
|
|
504
|
+
Example:
|
|
505
|
+
# Combine Python and JavaScript presets
|
|
506
|
+
preset = combine_presets('python', 'javascript')
|
|
507
|
+
result = pipeline.run(source='github', **preset)
|
|
508
|
+
"""
|
|
509
|
+
combined_whitelist = []
|
|
510
|
+
combined_blacklist = []
|
|
511
|
+
|
|
512
|
+
for name in preset_names:
|
|
513
|
+
preset = get_preset(name)
|
|
514
|
+
combined_whitelist.extend(preset.get('whitelist', []))
|
|
515
|
+
combined_blacklist.extend(preset.get('blacklist', []))
|
|
516
|
+
|
|
517
|
+
# Remove duplicates while preserving order
|
|
518
|
+
seen_wl = set()
|
|
519
|
+
unique_whitelist = []
|
|
520
|
+
for item in combined_whitelist:
|
|
521
|
+
if item not in seen_wl:
|
|
522
|
+
seen_wl.add(item)
|
|
523
|
+
unique_whitelist.append(item)
|
|
524
|
+
|
|
525
|
+
seen_bl = set()
|
|
526
|
+
unique_blacklist = []
|
|
527
|
+
for item in combined_blacklist:
|
|
528
|
+
if item not in seen_bl:
|
|
529
|
+
seen_bl.add(item)
|
|
530
|
+
unique_blacklist.append(item)
|
|
531
|
+
|
|
532
|
+
return {
|
|
533
|
+
'whitelist': unique_whitelist,
|
|
534
|
+
'blacklist': unique_blacklist,
|
|
535
|
+
}
|