forked from josephsenior/Grinta-Coding-Agent
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
335 lines (319 loc) · 8.65 KB
/
Copy pathpyproject.toml
File metadata and controls
335 lines (319 loc) · 8.65 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
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
[build-system]
build-backend = "hatchling.build"
requires = [
"hatchling",
]
[project]
name = "grinta"
version = "1.0.0"
description = "Local-first autonomous coding agent with provider-agnostic inference, LSP, debugging, durable sessions, and a terminal UI"
readme = "README.md"
keywords = [
"ai-agent",
"autonomous-agent",
"coding-agent",
"debugger",
"developer-tools",
"llm",
"local-ai",
"lsp",
"terminal",
]
license = "MIT"
authors = [ { name = "Youssef Mejdi" } ]
requires-python = ">=3.12,<3.14"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Software Development :: Build Tools",
"Topic :: Software Development :: Debuggers",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Software Development :: Testing",
"Topic :: Utilities",
]
dependencies = [
"aiohttp>=3.14.1",
"anthropic>=0.40,<1",
"anyio>=4.9,<5",
"bashlex>=0.18,<0.19",
"binaryornot>=0.4.4,<0.7",
"chardet>=3.0.2,<8",
"charset-normalizer>=2,<4",
"fastmcp>=3.2,<4",
"google-genai>=0.1",
"httpx>=0.27,<1",
"json-repair>=0.48,<1",
"libtmux>=0.37,<0.63",
"mcp>=1.28.1,<3",
"openai>=1.40,<3",
"orjson>=3.10,<4",
"pathspec>=0.12,<2",
"prompt-toolkit>=3.0.50,<4",
"psutil>=7,<8",
"ptyprocess>=0.7,<1; sys_platform!='win32'",
"pyfiglet>=1.0.4",
"pygit2>=1.16,<2",
"pylatexenc>=2.10,<3",
"pypdf>=6.13.3,<7",
"pyperclip>=1.9,<2",
"python-docx>=1.1,<2",
"python-dotenv>=1.2.2,<2",
"python-frontmatter>=1.1,<2",
"python-json-logger>=3.2.1,<5",
"python-pptx>=1,<2",
"pywinpty>=2,<4; sys_platform=='win32'",
"rapidfuzz>=3.9,<4",
"requests>=2.32.4,<3",
"rich>=14,<16",
"ripgrep==15.1; sys_platform!='win32'",
"tenacity>=8.5,<10",
"termcolor>=3.1,<4",
"textual>=1,<9",
"tree-sitter>=0.24,<0.27",
"tree-sitter-language-pack>=0.7.3,<1.14",
"truststore>=0.10,<1",
"urllib3>=2.7,<3",
]
optional-dependencies.all = [
"browser-use>=0.12,<0.15",
"chromadb>=1.4,<2",
"fastembed>=0.2,<1",
"flashrank>=0.2,<1",
]
optional-dependencies.browser = [
"browser-use>=0.12,<0.15",
]
optional-dependencies.rag = [
"chromadb>=1.4,<2",
"fastembed>=0.2,<1",
"flashrank>=0.2,<1",
]
urls = { Homepage = "https://github.com/josephsenior/Grinta-Coding-Agent", Repository = "https://github.com/josephsenior/Grinta-Coding-Agent", Documentation = "https://github.com/josephsenior/Grinta-Coding-Agent/tree/main/docs", Changelog = "https://github.com/josephsenior/Grinta-Coding-Agent/blob/main/CHANGELOG.md", Issues = "https://github.com/josephsenior/Grinta-Coding-Agent/issues", Discussions = "https://github.com/josephsenior/Grinta-Coding-Agent/discussions" }
# User-installable extras. Base install includes PDF/DOCX/PPTX/LaTeX parsers.
# pip install "grinta[rag]" — long-term semantic memory (Chroma + ONNX embeddings)
# pip install "grinta[browser]" — native browser automation (browser-use)
# pip install "grinta[all]" — rag + browser
scripts.grinta = "launch.entry:main"
[dependency-groups]
dev = [
"bandit>=1.9.3",
"build>=1.2.2",
"debugpy>=1.8,<2",
"grpcio>=1.70",
"grpcio-tools>=1.70",
"mypy==2.3",
"pip-audit>=2.9",
"pre-commit==4.6.1",
"pylint>=4.0.5,<5",
"pytest>=9.0.3",
"pytest-asyncio>=1.4,<2",
"ruff==0.16",
"tiktoken>=0.12",
"types-pyyaml>=6.0.12.20250516",
"types-requests>=2.32.4.20260107",
"types-setuptools>=80.9.0.20250529",
"types-toml>=0.10.8.20240310",
"vulture>=2.14",
]
test = [
"pytest>=9.0.3",
"pytest-asyncio>=1.4,<2",
"pytest-cov>=4.1,<8",
"pytest-timeout>=2.4",
"pytest-xdist>=3.8,<4",
"requests>=2.32.4,<3",
]
[tool.hatch.build]
exclude = [
"/backend/.grinta/**",
"/backend/conftest.py",
"/backend/scripts/refactor/**",
"/backend/tests/**",
"/docs/assets/**",
"/traces/**",
"/rustup-init.exe",
]
[tool.hatch.build.targets.wheel]
packages = [
"backend",
"launch",
]
[tool.hatch.build.targets.sdist]
include = [
"/backend",
"/launch",
"/docs",
"/packaging",
"/scripts",
"/README.md",
"/SHOWCASE.md",
"/CHANGELOG.md",
"/CITATION.cff",
"/LICENSE",
"/SECURITY.md",
"/CONTRIBUTING.md",
"/CODE_OF_CONDUCT.md",
"/GOVERNANCE.md",
"/SUPPORT.md",
"/MANIFEST.in",
"/pyproject.toml",
"/mypy.ini",
"/pytest.ini",
"/rigour.yml",
"/pydoc-markdown.yml",
]
exclude = [
"**/__pycache__",
"**/*.pyc",
"**/.pytest_cache",
"**/.mypy_cache",
"**/.ruff_cache",
"backend/tests",
"backend/conftest.py",
"backend/scripts/refactor",
"scripts/__pycache__",
]
[tool.hatch.version]
path = "backend/__init__.py"
[tool.ruff]
format.quote-style = "single"
lint.select = [
"ASYNC",
"B",
"D",
"E",
"F",
"I",
"Q",
"UP006", # Use `list` instead of `List` for annotations
"UP007", # Use `X | Y` instead of `Union[X, Y]`
"UP008", # Use `X | None` instead of `Optional[X]`
"W",
]
lint.ignore = [
"B003",
"B007",
"B009",
"B010",
"B018",
"B904",
"D1", # Ignore warnings for missing docstrings
"E501",
]
lint.per-file-ignores."backend/cli/event_renderer.py" = [ "E402" ]
lint.per-file-ignores."backend/cli/repl/session.py" = [ "E402" ]
lint.per-file-ignores."backend/cli/settings/onboarding.py" = [ "E402" ]
lint.per-file-ignores."backend/cli/settings/query.py" = [ "E402" ]
lint.per-file-ignores."backend/cli/settings/storage.py" = [ "E402" ]
lint.per-file-ignores."backend/integrations/mcp/mcp_utils.py" = [ "E402" ]
lint.per-file-ignores."backend/persistence/data_models/settings.py" = [ "E402" ]
lint.per-file-ignores."backend/scripts/**" = [ "ASYNC" ]
lint.per-file-ignores."backend/tests/**" = [
"ASYNC",
"B017",
"B028",
"D205",
"D301",
"D417",
"E402",
"F403",
"F405",
"F841",
]
lint.per-file-ignores."backend/tests/unit/cli/**/_shared.py" = [ "F401" ]
lint.per-file-ignores."packaging/vulture_whitelist.py" = [ "F821" ]
lint.flake8-bugbear.extend-immutable-calls = [ "Depends" ]
lint.flake8-quotes.docstring-quotes = "double"
lint.flake8-quotes.inline-quotes = "single"
lint.pydocstyle.convention = "google"
[tool.coverage.run]
source = [
"backend",
]
omit = [
"*/tests/*",
"*/test_*.py",
"*/__pycache__/*",
]
[tool.coverage.paths]
source = [
"backend",
"/home/runner/work/Grinta-Coding-Agent/Grinta-Coding-Agent/backend",
"D:\\a\\Grinta-Coding-Agent\\Grinta-Coding-Agent\\backend",
]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"raise AssertionError",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
"@abstractmethod",
]
precision = 2
show_missing = true
skip_covered = true
fail_under = 74
[tool.bandit]
# Security scanning configuration
# B101: assert used — acceptable in tests and internal assertions
# B103: set_bad_file_permissions — chmod calls are intentional for file operations
# B104: hardcoded_bind_all_interfaces — 0.0.0.0 is intentional for dev servers
# B105: hardcoded_password_string — false positives on non-password strings
# B106: hardcoded_password_funcarg — false positives on config arguments
# B107: hardcoded_password_default — false positives on empty string defaults
# B108: hardcoded_tmp_directory — /tmp paths are intentional defaults
# B110: try/except/pass — used intentionally for graceful degradation
# B112: try/except/continue — used intentionally for retry loops
# B404: import subprocess — needed for runtime command execution
# B603: subprocess_without_shell — all calls use list args (no shell injection)
# B607: start_process_with_partial_path — standard system executables (git, node, etc.)
# B310: urllib uses validated URLs only
# B608: SQL uses bound parameters; Bandit flags f-string clause assembly
skips = [
"B101",
"B103",
"B104",
"B105",
"B106",
"B107",
"B108",
"B110",
"B112",
"B404",
"B603",
"B607",
"B310",
"B608",
]
exclude_dirs = [ "backend/tests", "tests" ]
# Use a project-local environment only: prefer `python scripts/bootstrap_env.py base`
# (or another named profile) in this repo, then `uv run …`.
# Avoid `pip install` into the global Python alongside unrelated agent stacks; that causes resolver conflicts.
[tool.vulture]
# Find dead code: `uv run vulture` (optionally: `--min-confidence 100`).
paths = [ "backend", "launch", "packaging/vulture_whitelist.py" ]
exclude = [
"backend/evaluation",
"backend/tests",
"backend/conftest.py",
"**/__pycache__",
]
min_confidence = 90
sort_by_size = true
[tool.uv]
constraint-dependencies = [
"transformers<4.47.0",
"pypdf>=6.12.0",
]
override-dependencies = [
"aiohttp>=3.14.1",
"mcp>=1.28.1,<3",
"pypdf>=6.12.0",
]