repomind-local 0.3.2__tar.gz

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 (38) hide show
  1. repomind_local-0.3.2/MANIFEST.in +4 -0
  2. repomind_local-0.3.2/PKG-INFO +119 -0
  3. repomind_local-0.3.2/README.md +98 -0
  4. repomind_local-0.3.2/pyproject.toml +42 -0
  5. repomind_local-0.3.2/setup.cfg +4 -0
  6. repomind_local-0.3.2/src/repomind/__init__.py +3 -0
  7. repomind_local-0.3.2/src/repomind/analysis/__init__.py +1 -0
  8. repomind_local-0.3.2/src/repomind/analysis/checks.py +482 -0
  9. repomind_local-0.3.2/src/repomind/analysis/detectors.py +234 -0
  10. repomind_local-0.3.2/src/repomind/analysis/fixes.py +309 -0
  11. repomind_local-0.3.2/src/repomind/analysis/index.py +124 -0
  12. repomind_local-0.3.2/src/repomind/analysis/proof.py +155 -0
  13. repomind_local-0.3.2/src/repomind/analysis/search.py +99 -0
  14. repomind_local-0.3.2/src/repomind/analysis/symptoms.py +114 -0
  15. repomind_local-0.3.2/src/repomind/cases.py +13 -0
  16. repomind_local-0.3.2/src/repomind/cli.py +157 -0
  17. repomind_local-0.3.2/src/repomind/fixtures/paystream/README.md +9 -0
  18. repomind_local-0.3.2/src/repomind/fixtures/paystream/ops/incident_notes.md +3 -0
  19. repomind_local-0.3.2/src/repomind/fixtures/paystream/paystream/__init__.py +1 -0
  20. repomind_local-0.3.2/src/repomind/fixtures/paystream/paystream/activity.py +11 -0
  21. repomind_local-0.3.2/src/repomind/fixtures/paystream/paystream/auth/__init__.py +1 -0
  22. repomind_local-0.3.2/src/repomind/fixtures/paystream/paystream/auth/tokens.py +19 -0
  23. repomind_local-0.3.2/src/repomind/fixtures/paystream/paystream/ledger.py +22 -0
  24. repomind_local-0.3.2/src/repomind/fixtures/paystream/paystream/routes.py +24 -0
  25. repomind_local-0.3.2/src/repomind/fixtures/paystream/pytest.ini +3 -0
  26. repomind_local-0.3.2/src/repomind/fixtures/paystream/tests/test_activity.py +24 -0
  27. repomind_local-0.3.2/src/repomind/fixtures/paystream/tests/test_tokens.py +13 -0
  28. repomind_local-0.3.2/src/repomind/model.py +93 -0
  29. repomind_local-0.3.2/src/repomind/render.py +77 -0
  30. repomind_local-0.3.2/src/repomind/workflow.py +555 -0
  31. repomind_local-0.3.2/src/repomind_local.egg-info/PKG-INFO +119 -0
  32. repomind_local-0.3.2/src/repomind_local.egg-info/SOURCES.txt +36 -0
  33. repomind_local-0.3.2/src/repomind_local.egg-info/dependency_links.txt +1 -0
  34. repomind_local-0.3.2/src/repomind_local.egg-info/entry_points.txt +2 -0
  35. repomind_local-0.3.2/src/repomind_local.egg-info/requires.txt +11 -0
  36. repomind_local-0.3.2/src/repomind_local.egg-info/top_level.txt +1 -0
  37. repomind_local-0.3.2/tests/test_investigation.py +66 -0
  38. repomind_local-0.3.2/tests/test_scope.py +161 -0
@@ -0,0 +1,4 @@
1
+ recursive-include src/repomind/fixtures *
2
+ global-exclude __pycache__
3
+ global-exclude *.pyc
4
+ global-exclude .pytest_cache
@@ -0,0 +1,119 @@
1
+ Metadata-Version: 2.4
2
+ Name: repomind-local
3
+ Version: 0.3.2
4
+ Summary: Local repository investigations with specialist agents, a critic, and test-proven patches. Command: repomind
5
+ Author: Md Azhar
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/Mdazar123
8
+ Project-URL: Repository, https://github.com/Mdazar123/repomind
9
+ Keywords: agents,langgraph,static-analysis,cli
10
+ Requires-Python: >=3.11
11
+ Description-Content-Type: text/markdown
12
+ Requires-Dist: langgraph>=0.4
13
+ Requires-Dist: typer>=0.12
14
+ Requires-Dist: rich>=13
15
+ Requires-Dist: ruff>=0.9
16
+ Requires-Dist: pytest>=8
17
+ Provides-Extra: model
18
+ Requires-Dist: llama-cpp-python>=0.3; extra == "model"
19
+ Requires-Dist: huggingface-hub>=0.26; extra == "model"
20
+ Provides-Extra: dev
21
+
22
+ # RepoMind
23
+
24
+ RepoMind investigates a Python repository **on your machine**. A security agent and a performance agent file only what they can point at. A critic rejects a theory that does not explain the symptom. A patch counts only when a targeted test fails before the edit and passes after it.
25
+
26
+ The repository is not uploaded. The public site shows one finished case from the bundled Paystream service: https://mdazar123.github.io/repomind/
27
+
28
+ ## Install
29
+
30
+ The name `repomind` on PyPI already belongs to a different project. This package is `repomind-local`. The command is still `repomind`.
31
+
32
+ ```bash
33
+ pip install "git+https://github.com/Mdazar123/repomind.git"
34
+ repomind demo
35
+ ```
36
+
37
+ From a checkout:
38
+
39
+ ```bash
40
+ pip install -e .
41
+ repomind demo
42
+ ```
43
+
44
+ ## Commands
45
+
46
+ ```bash
47
+ repomind doctor
48
+ repomind demo
49
+ repomind explain "Fresh tokens are rejected with 401" .
50
+ repomind scan .
51
+ repomind fix 1
52
+ ```
53
+
54
+ `fix` prints the diff and asks before it writes. Pass `--yes` to apply it in a script.
55
+
56
+ ## Check a project of your own
57
+
58
+ ```bash
59
+ cd C:\path\to\your-python-project
60
+ repomind scan .
61
+ repomind explain "Why does login fail?" .
62
+ repomind fix 1
63
+ ```
64
+
65
+ `scan` checks a Python folder for this set:
66
+
67
+ - hardcoded secrets, `shell=True`, and SQL built with string interpolation
68
+ - JWT checks that disable signature verification, and expiry compared in the wrong unit
69
+ - blocking calls inside `async` functions, awaits inside loops, queries inside loops, and HTTP calls with no timeout
70
+ - FastAPI routes with no `response_model`, blocking work in an async route, and `Depends` used incorrectly
71
+ - undefined names, bare or swallowed exceptions, external calls with no retry, and opened files or sessions that are never closed
72
+
73
+ It prepares a patch only for the patterns it can change without guessing: the clock unit, a batch call, `asyncio.gather`, `timeout=10`, `asyncio.sleep`, `Depends(fn)` instead of `Depends(fn())`, a bare `except`, and turning JWT verification back on. A patch is marked proven only when a related test fails before the edit and passes after it. The other checks are reported with a file and a line, and left for you to change.
74
+
75
+ ## What `repomind demo` shows
76
+
77
+ Paystream is a small ledger with two real defects and tests that fail:
78
+
79
+ - `token_is_active` compares a unix-second expiry with `now * 1000`, so a fresh token looks expired.
80
+ - `load_user_activity` calls `transactions_for` once per account even though `transactions_for_accounts` exists.
81
+
82
+ On-call notes mention latency first. For the token case, the hypothesis agent follows that lead, the critic rejects it, and the clock-unit fix is the one that turns `tests/test_tokens.py` green.
83
+
84
+ ## Optional local model
85
+
86
+ Findings do not come from a hosted model. If you want the case note rewritten locally:
87
+
88
+ ```bash
89
+ pip install "repomind-local[model]"
90
+ repomind model download --size 1.5b
91
+ ```
92
+
93
+ That downloads Qwen2.5-Coder 1.5B Q4 from Hugging Face into `~/.cache/repomind/models`. `--size 7b` is the larger option. No API key.
94
+
95
+ ## Layout
96
+
97
+ ```text
98
+ src/repomind/ CLI, LangGraph workflow, detectors, fixes, sandbox proof
99
+ src/repomind/fixtures/paystream
100
+ web/ Next.js case file
101
+ tests/ The token case and the latency case must prove their patches
102
+ ```
103
+
104
+ ## Tests
105
+
106
+ ```bash
107
+ pip install -e ".[dev]"
108
+ pytest
109
+ ```
110
+
111
+ ## Site
112
+
113
+ ```bash
114
+ cd web
115
+ npm install
116
+ npm run dev
117
+ ```
118
+
119
+ The dev server listens on port 8742.
@@ -0,0 +1,98 @@
1
+ # RepoMind
2
+
3
+ RepoMind investigates a Python repository **on your machine**. A security agent and a performance agent file only what they can point at. A critic rejects a theory that does not explain the symptom. A patch counts only when a targeted test fails before the edit and passes after it.
4
+
5
+ The repository is not uploaded. The public site shows one finished case from the bundled Paystream service: https://mdazar123.github.io/repomind/
6
+
7
+ ## Install
8
+
9
+ The name `repomind` on PyPI already belongs to a different project. This package is `repomind-local`. The command is still `repomind`.
10
+
11
+ ```bash
12
+ pip install "git+https://github.com/Mdazar123/repomind.git"
13
+ repomind demo
14
+ ```
15
+
16
+ From a checkout:
17
+
18
+ ```bash
19
+ pip install -e .
20
+ repomind demo
21
+ ```
22
+
23
+ ## Commands
24
+
25
+ ```bash
26
+ repomind doctor
27
+ repomind demo
28
+ repomind explain "Fresh tokens are rejected with 401" .
29
+ repomind scan .
30
+ repomind fix 1
31
+ ```
32
+
33
+ `fix` prints the diff and asks before it writes. Pass `--yes` to apply it in a script.
34
+
35
+ ## Check a project of your own
36
+
37
+ ```bash
38
+ cd C:\path\to\your-python-project
39
+ repomind scan .
40
+ repomind explain "Why does login fail?" .
41
+ repomind fix 1
42
+ ```
43
+
44
+ `scan` checks a Python folder for this set:
45
+
46
+ - hardcoded secrets, `shell=True`, and SQL built with string interpolation
47
+ - JWT checks that disable signature verification, and expiry compared in the wrong unit
48
+ - blocking calls inside `async` functions, awaits inside loops, queries inside loops, and HTTP calls with no timeout
49
+ - FastAPI routes with no `response_model`, blocking work in an async route, and `Depends` used incorrectly
50
+ - undefined names, bare or swallowed exceptions, external calls with no retry, and opened files or sessions that are never closed
51
+
52
+ It prepares a patch only for the patterns it can change without guessing: the clock unit, a batch call, `asyncio.gather`, `timeout=10`, `asyncio.sleep`, `Depends(fn)` instead of `Depends(fn())`, a bare `except`, and turning JWT verification back on. A patch is marked proven only when a related test fails before the edit and passes after it. The other checks are reported with a file and a line, and left for you to change.
53
+
54
+ ## What `repomind demo` shows
55
+
56
+ Paystream is a small ledger with two real defects and tests that fail:
57
+
58
+ - `token_is_active` compares a unix-second expiry with `now * 1000`, so a fresh token looks expired.
59
+ - `load_user_activity` calls `transactions_for` once per account even though `transactions_for_accounts` exists.
60
+
61
+ On-call notes mention latency first. For the token case, the hypothesis agent follows that lead, the critic rejects it, and the clock-unit fix is the one that turns `tests/test_tokens.py` green.
62
+
63
+ ## Optional local model
64
+
65
+ Findings do not come from a hosted model. If you want the case note rewritten locally:
66
+
67
+ ```bash
68
+ pip install "repomind-local[model]"
69
+ repomind model download --size 1.5b
70
+ ```
71
+
72
+ That downloads Qwen2.5-Coder 1.5B Q4 from Hugging Face into `~/.cache/repomind/models`. `--size 7b` is the larger option. No API key.
73
+
74
+ ## Layout
75
+
76
+ ```text
77
+ src/repomind/ CLI, LangGraph workflow, detectors, fixes, sandbox proof
78
+ src/repomind/fixtures/paystream
79
+ web/ Next.js case file
80
+ tests/ The token case and the latency case must prove their patches
81
+ ```
82
+
83
+ ## Tests
84
+
85
+ ```bash
86
+ pip install -e ".[dev]"
87
+ pytest
88
+ ```
89
+
90
+ ## Site
91
+
92
+ ```bash
93
+ cd web
94
+ npm install
95
+ npm run dev
96
+ ```
97
+
98
+ The dev server listens on port 8742.
@@ -0,0 +1,42 @@
1
+ [project]
2
+ name = "repomind-local"
3
+ version = "0.3.2"
4
+ description = "Local repository investigations with specialist agents, a critic, and test-proven patches. Command: repomind"
5
+ readme = "README.md"
6
+ requires-python = ">=3.11"
7
+ license = "MIT"
8
+ authors = [{ name = "Md Azhar" }]
9
+ keywords = ["agents", "langgraph", "static-analysis", "cli"]
10
+ dependencies = [
11
+ "langgraph>=0.4",
12
+ "typer>=0.12",
13
+ "rich>=13",
14
+ "ruff>=0.9",
15
+ "pytest>=8",
16
+ ]
17
+
18
+ [project.optional-dependencies]
19
+ model = ["llama-cpp-python>=0.3", "huggingface-hub>=0.26"]
20
+ dev = []
21
+
22
+ [project.scripts]
23
+ repomind = "repomind.cli:main"
24
+
25
+ [project.urls]
26
+ Homepage = "https://github.com/Mdazar123"
27
+ Repository = "https://github.com/Mdazar123/repomind"
28
+
29
+ [build-system]
30
+ requires = ["setuptools>=68"]
31
+ build-backend = "setuptools.build_meta"
32
+
33
+ [tool.setuptools.packages.find]
34
+ where = ["src"]
35
+
36
+ [tool.setuptools.package-data]
37
+ repomind = ["fixtures/**/*"]
38
+
39
+ [tool.pytest.ini_options]
40
+ pythonpath = ["src"]
41
+ testpaths = ["tests"]
42
+ addopts = "-p no:cacheprovider"
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,3 @@
1
+ """RepoMind investigates a repository on your machine and proves a patch with tests."""
2
+
3
+ __version__ = "0.3.2"
@@ -0,0 +1 @@
1
+ """Static analysis used by the specialist agents."""