-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
172 lines (163 loc) · 8.48 KB
/
Copy pathpyproject.toml
File metadata and controls
172 lines (163 loc) · 8.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
[build-system]
requires = ["setuptools>=61.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "mscodebase-intelligence"
version = "3.4.0"
description = "AI-powered semantic code search for Zed IDE via MCP. Hybrid BM25 + vector search with 57 analysis tools. Multi-window with per-project Indexer registry."
readme = "README.md"
license = {text = "MIT"}
authors = [{name = "ManSio"}]
requires-python = ">=3.10"
keywords = ["zed", "mcp", "code-search", "embeddings", "ai", "lancedb", "semantic-search", "zed-extension"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Text Processing :: Indexing",
"Environment :: Plugins",
]
dependencies = [
# Политика пинов (2026-08-18, аудит unpinned-dependency): ВСЕ runtime-зависимости
# запинены к точным версиям (==). Источник версий — requirements-lock.txt (венв
# расширения, Python 3.14, live-проверка) + проверка колёс PyPI на 3.10..3.14.
# Бамп — только по §5.19: проверка API целевой версии + verify_clean_state.
# Исключение: numpy/pandas/onnxruntime на Python<3.11 (CI matrix включает 3.10,
# EOL 2026-10; lock-версия требует >=3.11) — там per-Python диапазон; после дропа 3.10 запинить.
# MCP Protocol
"mcp==1.28.1", # 1.x: транспортный протокол; 2.x меняет его — не бампить без проверки
# LSP Protocol
"pygls==2.1.1",
"lsprotocol==2025.0.0",
# Vector DB & Embeddings
# Pinned: lancedb 0.x менял публичный API внутри минорных релизов
# (сломал тест-сьют 2026-07 через lancedb.LanceDB). Ребилд/бамп —
# только после проверки совместимости API + прогона verify_clean_state.
"lancedb==0.34.0",
# Pinned: lancedb>=0.30 требует отдельный пакет для table.to_lance()
# (known_hashes bulk load, index_project_runner.py). Проверено 2026-08-01:
# pylance 9.0.0 + lance-namespace 0.8.6, API to_lance().to_pandas() работает.
"pylance==9.0.0",
"pyarrow==25.0.0", # + pyarrow.compute для to_arrow
"huggingface_hub==1.24.0",
"numpy==2.4.6; python_version >= '3.11'",
"numpy>=1.24.0,<3; python_version < '3.11'", # 3.10: lock-версия требует >=3.11
# Code parsing (Tree-sitter) — 23 пакета для 23 языков
# Core: полный граф (chunking + calls + data flow + imports).
# Все грамматики: abi3-колёса (cp39/cp310-abi3) — один пин работает 3.10..3.14.
# Импортируются лениво (src/core/indexing/parser.py) — отсутствие грамматики
# деградирует язык, а не роняет индексацию.
"tree-sitter==0.26.0",
"tree-sitter-python==0.25.0",
"tree-sitter-rust==0.24.2",
"tree-sitter-typescript==0.23.2", # .ts/.tsx
"tree-sitter-javascript==0.25.0", # .js/.jsx
"tree-sitter-go==0.25.0",
"tree-sitter-java==0.23.5",
"tree-sitter-c-sharp==0.23.5",
"tree-sitter-ruby==0.23.1",
"tree-sitter-php==0.24.1",
"tree-sitter-kotlin==1.1.0",
"tree-sitter-swift==0.7.3",
"tree-sitter-c==0.24.2",
"tree-sitter-cpp==0.23.4",
"tree-sitter-scala==0.26.2",
"tree-sitter-dart==0.1.0",
"tree-sitter-bash==0.25.1", # shell, без data flow
# Context-языки (только AST-парсинг и чанкинг)
"tree-sitter-sql==0.3.11",
"tree-sitter-yaml==0.7.2",
"tree-sitter-toml==0.7.0",
"tree-sitter-html==0.23.2",
"tree-sitter-css==0.25.0",
"tree-sitter-hcl==1.2.0", # HCL/Terraform
# Search & Utils
"pathspec==1.1.1",
"httpx==0.28.1",
"python-dotenv==1.2.2",
"pandas==3.0.3; python_version >= '3.11'",
"pandas>=2.0.0; python_version < '3.11'", # 3.10: lock-версия требует >=3.11
"python-dateutil==2.9.0.post0",
# ONNX Embedder
"onnxruntime==1.27.0; python_version >= '3.11'",
"onnxruntime>=1.17.0; python_version < '3.11'", # 3.10: lock-версия требует >=3.11
"openvino==2026.2.1",
# Reranker (transformers-based; легаси — llama.cpp, но tokenizers используются)
# Pinned: >=5.3.0 закрывает CVE-2026-1839 (фикс 5.0.0) и CVE-2026-4372
# (RCE через _attn_implementation_internal, обходит trust_remote_code — фикс ТОЛЬКО 5.3.0).
# 5.14.1 — из lock (проверено 2026-08-08, OSV); верхняя граница <5.15.0 сохранена пином.
"transformers==5.14.1",
"tokenizers==0.22.2",
]
[project.optional-dependencies]
dev = [
"pytest>=7.4.0",
"pytest-asyncio>=0.21.0",
"pytest-cov>=7.1.0", # CI coverage reporting (проверено: 7.1.0 + pytest 9.0.3)
# Pinned: ruff 0.16+ ужесточил I001 (сортировка вложенных импорт-блоков) —
# CI падал на lint 2026-08-05 (10 ошибок в 8 файлах). Бамп — только после
# прогона ruff check + verify_clean_state.
"ruff>=0.5.0,<0.16",
"black",
"isort",
# tomllib — Python 3.11+; CI matrix включает 3.10 (test_versions.py).
"tomli>=2.0; python_version < '3.11'",
# Mutation testing (negative arm для dual-arm health check).
# ⚠️ mutmut требует fork() — на Windows работает ТОЛЬКО в WSL.
# CI (ubuntu matrix) запускает полный mutmut; локально — опционально через
# MSCODEBASE_MUTMUT=1 (требует WSL). Без WSL — health-only + warning.
"mutmut>=3.7.0,<4",
]
# ⚠️ COPyleft-зависимости (GPL): leidenalg = GPL-3.0, igraph = GPL-2.0.
# НЕ совместимы с MIT-дистрибуцией как обязательные — только опциональный extra.
# Кто ставит [community] — принимает GPL-условия для этого расширения.
community = [
"leidenalg>=0.12.0,<1", # Leiden algorithm (GPL-3.0-or-later)
"igraph>=1.0.0,<2", # Graph backend (GPL-2.0-or-later)
]
# Опциональный слой +56 языков с tags.scm (symbol extraction).
# Парсеры скачиваются при первом использовании (нужна сеть) — см. src/core/language_pack.py.
# Включение: MSCODEBASE_LANGUAGE_PACK=true в .env
language-pack = [
"tree-sitter-language-pack>=1.14.3,<2", # MIT
]
[project.urls]
Homepage = "https://github.com/ManSio/mscodebase-intelligence"
Repository = "https://github.com/ManSio/mscodebase-intelligence"
Issues = "https://github.com/ManSio/mscodebase-intelligence/issues"
Documentation = "https://github.com/ManSio/mscodebase-intelligence/blob/main/README.md"
[project.scripts]
mscodebase = "src.main:main"
mscodebase-mcp = "src.main:main"
[tool.setuptools.packages.find]
where = ["."]
include = ["src*", "scripts*"]
[tool.setuptools.package-data]
"*" = ["*.json", "*.md", "*.bat", "*.cfg", "*.scm"]
"src" = ["*.json", "*.txt", "*.cfg", "*.scm"]
[tool.pytest.ini_options]
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "function"
python_files = ["test_*.py", "*_test.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
markers = [
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
"integration: marks tests as integration tests",
"asyncio: marks tests as asyncio tests",
"benchmark: marks tests as benchmark tests (deselect with '-m \"not benchmark\"')",
]
norecursedirs = [
".git", ".venv", "venv", ".idea", ".vscode",
".codebase_index", ".codebase_indices",
# experiments/ — throwaway-пробы (гигиена корня §0.6): их *_test.py
# ломали сборку полного набора (capture ValueError, 2026-08-18)
# и не должны авто-собираться в основной suite (pytest tests/).
"experiments",
]
addopts = "-v --tb=short -m 'not slow and not benchmark'"