depfix-ai 0.2.0__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 (220) hide show
  1. depfix_ai-0.2.0/PKG-INFO +207 -0
  2. depfix_ai-0.2.0/README.md +160 -0
  3. depfix_ai-0.2.0/pyproject.toml +181 -0
  4. depfix_ai-0.2.0/setup.cfg +4 -0
  5. depfix_ai-0.2.0/src/depfix/__init__.py +27 -0
  6. depfix_ai-0.2.0/src/depfix/agent/__init__.py +5 -0
  7. depfix_ai-0.2.0/src/depfix/agent/fix_agent.py +236 -0
  8. depfix_ai-0.2.0/src/depfix/agent/scan_agent.py +1026 -0
  9. depfix_ai-0.2.0/src/depfix/agent/scan_tools.py +395 -0
  10. depfix_ai-0.2.0/src/depfix/agent/tools.py +86 -0
  11. depfix_ai-0.2.0/src/depfix/api/__init__.py +1 -0
  12. depfix_ai-0.2.0/src/depfix/apply/__init__.py +11 -0
  13. depfix_ai-0.2.0/src/depfix/apply/models.py +87 -0
  14. depfix_ai-0.2.0/src/depfix/apply/workspace.py +260 -0
  15. depfix_ai-0.2.0/src/depfix/catalog/__init__.py +43 -0
  16. depfix_ai-0.2.0/src/depfix/catalog/detections.py +256 -0
  17. depfix_ai-0.2.0/src/depfix/catalog/learned.py +428 -0
  18. depfix_ai-0.2.0/src/depfix/classify/__init__.py +39 -0
  19. depfix_ai-0.2.0/src/depfix/classify/classifier.py +185 -0
  20. depfix_ai-0.2.0/src/depfix/classify/llm.py +226 -0
  21. depfix_ai-0.2.0/src/depfix/classify/models.py +33 -0
  22. depfix_ai-0.2.0/src/depfix/classify/notes.py +197 -0
  23. depfix_ai-0.2.0/src/depfix/classify/severity.py +5 -0
  24. depfix_ai-0.2.0/src/depfix/classify/spec_rules.py +222 -0
  25. depfix_ai-0.2.0/src/depfix/classify/store.py +194 -0
  26. depfix_ai-0.2.0/src/depfix/classify/synthesize.py +115 -0
  27. depfix_ai-0.2.0/src/depfix/classify/triage.py +133 -0
  28. depfix_ai-0.2.0/src/depfix/classify/usage_candidates.py +307 -0
  29. depfix_ai-0.2.0/src/depfix/cli.py +3144 -0
  30. depfix_ai-0.2.0/src/depfix/clone/__init__.py +5 -0
  31. depfix_ai-0.2.0/src/depfix/clone/service.py +285 -0
  32. depfix_ai-0.2.0/src/depfix/codemods/__init__.py +52 -0
  33. depfix_ai-0.2.0/src/depfix/codemods/base.py +81 -0
  34. depfix_ai-0.2.0/src/depfix/codemods/config_literal.py +64 -0
  35. depfix_ai-0.2.0/src/depfix/codemods/import_path.py +100 -0
  36. depfix_ai-0.2.0/src/depfix/codemods/javascript.py +380 -0
  37. depfix_ai-0.2.0/src/depfix/codemods/lockfile.py +644 -0
  38. depfix_ai-0.2.0/src/depfix/codemods/registry.py +156 -0
  39. depfix_ai-0.2.0/src/depfix/codemods/symbols.py +112 -0
  40. depfix_ai-0.2.0/src/depfix/codemods/text.py +287 -0
  41. depfix_ai-0.2.0/src/depfix/config.py +587 -0
  42. depfix_ai-0.2.0/src/depfix/core/__init__.py +34 -0
  43. depfix_ai-0.2.0/src/depfix/core/agent.py +239 -0
  44. depfix_ai-0.2.0/src/depfix/core/explain.py +179 -0
  45. depfix_ai-0.2.0/src/depfix/core/fix_service.py +837 -0
  46. depfix_ai-0.2.0/src/depfix/core/models.py +309 -0
  47. depfix_ai-0.2.0/src/depfix/core/pipeline.py +340 -0
  48. depfix_ai-0.2.0/src/depfix/core/redaction.py +132 -0
  49. depfix_ai-0.2.0/src/depfix/core/serde.py +61 -0
  50. depfix_ai-0.2.0/src/depfix/core/shortcuts.py +448 -0
  51. depfix_ai-0.2.0/src/depfix/core/upgrade.py +164 -0
  52. depfix_ai-0.2.0/src/depfix/core/upgrade_service.py +286 -0
  53. depfix_ai-0.2.0/src/depfix/defaults.py +98 -0
  54. depfix_ai-0.2.0/src/depfix/doctor.py +432 -0
  55. depfix_ai-0.2.0/src/depfix/ecosystems/__init__.py +39 -0
  56. depfix_ai-0.2.0/src/depfix/ecosystems/base.py +169 -0
  57. depfix_ai-0.2.0/src/depfix/ecosystems/callsites.py +246 -0
  58. depfix_ai-0.2.0/src/depfix/ecosystems/go_lockfile.py +88 -0
  59. depfix_ai-0.2.0/src/depfix/ecosystems/go_manifests.py +202 -0
  60. depfix_ai-0.2.0/src/depfix/ecosystems/go_runtime.py +71 -0
  61. depfix_ai-0.2.0/src/depfix/ecosystems/manifests.py +510 -0
  62. depfix_ai-0.2.0/src/depfix/ecosystems/pypi_manifests.py +185 -0
  63. depfix_ai-0.2.0/src/depfix/ecosystems/python_lockfile.py +85 -0
  64. depfix_ai-0.2.0/src/depfix/ecosystems/python_runtime.py +133 -0
  65. depfix_ai-0.2.0/src/depfix/ecosystems/registry.py +57 -0
  66. depfix_ai-0.2.0/src/depfix/ecosystems/ruby_lockfile.py +41 -0
  67. depfix_ai-0.2.0/src/depfix/ecosystems/ruby_manifests.py +107 -0
  68. depfix_ai-0.2.0/src/depfix/ecosystems/ruby_runtime.py +106 -0
  69. depfix_ai-0.2.0/src/depfix/ecosystems/ruby_validator.py +27 -0
  70. depfix_ai-0.2.0/src/depfix/ecosystems/specs.py +320 -0
  71. depfix_ai-0.2.0/src/depfix/ecosystems/symbol_index.py +239 -0
  72. depfix_ai-0.2.0/src/depfix/evals/__init__.py +41 -0
  73. depfix_ai-0.2.0/src/depfix/evals/loader.py +164 -0
  74. depfix_ai-0.2.0/src/depfix/evals/models.py +160 -0
  75. depfix_ai-0.2.0/src/depfix/evals/runner.py +278 -0
  76. depfix_ai-0.2.0/src/depfix/evals/scoring.py +161 -0
  77. depfix_ai-0.2.0/src/depfix/fixers/__init__.py +7 -0
  78. depfix_ai-0.2.0/src/depfix/fixers/bedrock.py +251 -0
  79. depfix_ai-0.2.0/src/depfix/fixers/gemini.py +313 -0
  80. depfix_ai-0.2.0/src/depfix/fixers/ollama.py +242 -0
  81. depfix_ai-0.2.0/src/depfix/gh/__init__.py +34 -0
  82. depfix_ai-0.2.0/src/depfix/gh/app.py +394 -0
  83. depfix_ai-0.2.0/src/depfix/gh/branch.py +191 -0
  84. depfix_ai-0.2.0/src/depfix/gh/models.py +76 -0
  85. depfix_ai-0.2.0/src/depfix/gh/pr.py +523 -0
  86. depfix_ai-0.2.0/src/depfix/migrations/__init__.py +15 -0
  87. depfix_ai-0.2.0/src/depfix/migrations/env.py +58 -0
  88. depfix_ai-0.2.0/src/depfix/migrations/script.py.mako +28 -0
  89. depfix_ai-0.2.0/src/depfix/migrations/versions/0001_baseline.py +298 -0
  90. depfix_ai-0.2.0/src/depfix/migrations/versions/0002_change_attempt.py +51 -0
  91. depfix_ai-0.2.0/src/depfix/migrations/versions/0003_change_event_body_url.py +27 -0
  92. depfix_ai-0.2.0/src/depfix/migrations/versions/0004_fix_run_confidence.py +32 -0
  93. depfix_ai-0.2.0/src/depfix/migrations/versions/0005_edit_provenance.py +37 -0
  94. depfix_ai-0.2.0/src/depfix/migrations/versions/0006_pr_outcome.py +41 -0
  95. depfix_ai-0.2.0/src/depfix/migrations/versions/0007_severity.py +29 -0
  96. depfix_ai-0.2.0/src/depfix/migrations/versions/0008_repo_scan_change.py +54 -0
  97. depfix_ai-0.2.0/src/depfix/migrations/versions/0009_fix_run_cost_stages.py +35 -0
  98. depfix_ai-0.2.0/src/depfix/obs/__init__.py +8 -0
  99. depfix_ai-0.2.0/src/depfix/obs/cost.py +109 -0
  100. depfix_ai-0.2.0/src/depfix/obs/logging.py +123 -0
  101. depfix_ai-0.2.0/src/depfix/obs/metrics.py +65 -0
  102. depfix_ai-0.2.0/src/depfix/orchestrator/__init__.py +19 -0
  103. depfix_ai-0.2.0/src/depfix/orchestrator/budget.py +55 -0
  104. depfix_ai-0.2.0/src/depfix/orchestrator/grouping.py +132 -0
  105. depfix_ai-0.2.0/src/depfix/orchestrator/models.py +176 -0
  106. depfix_ai-0.2.0/src/depfix/orchestrator/plan.py +329 -0
  107. depfix_ai-0.2.0/src/depfix/orchestrator/policy.py +249 -0
  108. depfix_ai-0.2.0/src/depfix/orchestrator/reconcile.py +88 -0
  109. depfix_ai-0.2.0/src/depfix/orchestrator/runner.py +2048 -0
  110. depfix_ai-0.2.0/src/depfix/providers/__init__.py +12 -0
  111. depfix_ai-0.2.0/src/depfix/providers/loader.py +131 -0
  112. depfix_ai-0.2.0/src/depfix/providers/models.py +33 -0
  113. depfix_ai-0.2.0/src/depfix/redaction.py +242 -0
  114. depfix_ai-0.2.0/src/depfix/registry/__init__.py +31 -0
  115. depfix_ai-0.2.0/src/depfix/registry/client.py +109 -0
  116. depfix_ai-0.2.0/src/depfix/registry/models.py +26 -0
  117. depfix_ai-0.2.0/src/depfix/registry/pypi_client.py +75 -0
  118. depfix_ai-0.2.0/src/depfix/registry/pypi_models.py +15 -0
  119. depfix_ai-0.2.0/src/depfix/registry/rubygems_client.py +73 -0
  120. depfix_ai-0.2.0/src/depfix/repoconfig/__init__.py +21 -0
  121. depfix_ai-0.2.0/src/depfix/repoconfig/loader.py +137 -0
  122. depfix_ai-0.2.0/src/depfix/repoconfig/models.py +134 -0
  123. depfix_ai-0.2.0/src/depfix/retry/__init__.py +11 -0
  124. depfix_ai-0.2.0/src/depfix/retry/loop.py +178 -0
  125. depfix_ai-0.2.0/src/depfix/scanners/__init__.py +90 -0
  126. depfix_ai-0.2.0/src/depfix/scanners/alignment.py +239 -0
  127. depfix_ai-0.2.0/src/depfix/scanners/applicability.py +131 -0
  128. depfix_ai-0.2.0/src/depfix/scanners/base.py +145 -0
  129. depfix_ai-0.2.0/src/depfix/scanners/callsites.py +767 -0
  130. depfix_ai-0.2.0/src/depfix/scanners/drift_summary.py +109 -0
  131. depfix_ai-0.2.0/src/depfix/scanners/judge.py +114 -0
  132. depfix_ai-0.2.0/src/depfix/scanners/language.py +62 -0
  133. depfix_ai-0.2.0/src/depfix/scanners/languages/__init__.py +0 -0
  134. depfix_ai-0.2.0/src/depfix/scanners/languages/elixir.py +163 -0
  135. depfix_ai-0.2.0/src/depfix/scanners/languages/go.py +208 -0
  136. depfix_ai-0.2.0/src/depfix/scanners/languages/java.py +158 -0
  137. depfix_ai-0.2.0/src/depfix/scanners/languages/kotlin.py +177 -0
  138. depfix_ai-0.2.0/src/depfix/scanners/languages/php.py +180 -0
  139. depfix_ai-0.2.0/src/depfix/scanners/languages/python.py +237 -0
  140. depfix_ai-0.2.0/src/depfix/scanners/languages/ruby.py +130 -0
  141. depfix_ai-0.2.0/src/depfix/scanners/limits.py +25 -0
  142. depfix_ai-0.2.0/src/depfix/scanners/manifest.py +428 -0
  143. depfix_ai-0.2.0/src/depfix/scanners/masking.py +141 -0
  144. depfix_ai-0.2.0/src/depfix/scanners/matching.py +154 -0
  145. depfix_ai-0.2.0/src/depfix/scanners/models.py +221 -0
  146. depfix_ai-0.2.0/src/depfix/scanners/reachability.py +89 -0
  147. depfix_ai-0.2.0/src/depfix/scanners/registry.py +135 -0
  148. depfix_ai-0.2.0/src/depfix/scanners/removals.py +144 -0
  149. depfix_ai-0.2.0/src/depfix/scanners/repo.py +846 -0
  150. depfix_ai-0.2.0/src/depfix/scanners/report.py +69 -0
  151. depfix_ai-0.2.0/src/depfix/scanners/severity.py +36 -0
  152. depfix_ai-0.2.0/src/depfix/scanners/store.py +257 -0
  153. depfix_ai-0.2.0/src/depfix/scanners/strategy.py +46 -0
  154. depfix_ai-0.2.0/src/depfix/scanners/typeresolve.py +212 -0
  155. depfix_ai-0.2.0/src/depfix/scanners/workspace.py +38 -0
  156. depfix_ai-0.2.0/src/depfix/severity.py +48 -0
  157. depfix_ai-0.2.0/src/depfix/sources/__init__.py +60 -0
  158. depfix_ai-0.2.0/src/depfix/sources/asyncapi_spec.py +87 -0
  159. depfix_ai-0.2.0/src/depfix/sources/base.py +46 -0
  160. depfix_ai-0.2.0/src/depfix/sources/changelog_file.py +137 -0
  161. depfix_ai-0.2.0/src/depfix/sources/changelog_html.py +102 -0
  162. depfix_ai-0.2.0/src/depfix/sources/factory.py +146 -0
  163. depfix_ai-0.2.0/src/depfix/sources/fixture_change.py +70 -0
  164. depfix_ai-0.2.0/src/depfix/sources/github_release.py +118 -0
  165. depfix_ai-0.2.0/src/depfix/sources/http.py +52 -0
  166. depfix_ai-0.2.0/src/depfix/sources/models.py +235 -0
  167. depfix_ai-0.2.0/src/depfix/sources/npm_dist_tag.py +95 -0
  168. depfix_ai-0.2.0/src/depfix/sources/openapi_diff.py +586 -0
  169. depfix_ai-0.2.0/src/depfix/sources/openapi_spec.py +54 -0
  170. depfix_ai-0.2.0/src/depfix/sources/pypi_dist_tag.py +82 -0
  171. depfix_ai-0.2.0/src/depfix/sources/redis_commands.py +76 -0
  172. depfix_ai-0.2.0/src/depfix/sources/release_age.py +94 -0
  173. depfix_ai-0.2.0/src/depfix/sources/release_notes.py +63 -0
  174. depfix_ai-0.2.0/src/depfix/sources/repo_exports.py +224 -0
  175. depfix_ai-0.2.0/src/depfix/sources/rss.py +140 -0
  176. depfix_ai-0.2.0/src/depfix/sources/rubygems_dist_tag.py +74 -0
  177. depfix_ai-0.2.0/src/depfix/sources/security_advisory.py +226 -0
  178. depfix_ai-0.2.0/src/depfix/sources/semver.py +63 -0
  179. depfix_ai-0.2.0/src/depfix/sources/smithy_spec.py +107 -0
  180. depfix_ai-0.2.0/src/depfix/sources/spec_base.py +178 -0
  181. depfix_ai-0.2.0/src/depfix/sources/ts_exports.py +218 -0
  182. depfix_ai-0.2.0/src/depfix/storage/__init__.py +60 -0
  183. depfix_ai-0.2.0/src/depfix/storage/attempt_store.py +125 -0
  184. depfix_ai-0.2.0/src/depfix/storage/db.py +305 -0
  185. depfix_ai-0.2.0/src/depfix/storage/fix_store.py +151 -0
  186. depfix_ai-0.2.0/src/depfix/storage/lock.py +69 -0
  187. depfix_ai-0.2.0/src/depfix/storage/schema.py +629 -0
  188. depfix_ai-0.2.0/src/depfix/validators/__init__.py +50 -0
  189. depfix_ai-0.2.0/src/depfix/validators/go.py +88 -0
  190. depfix_ai-0.2.0/src/depfix/validators/javascript.py +201 -0
  191. depfix_ai-0.2.0/src/depfix/validators/python.py +74 -0
  192. depfix_ai-0.2.0/src/depfix/validators/ruby.py +90 -0
  193. depfix_ai-0.2.0/src/depfix/validators/typescript.py +175 -0
  194. depfix_ai-0.2.0/src/depfix/verify/__init__.py +58 -0
  195. depfix_ai-0.2.0/src/depfix/verify/attribution.py +142 -0
  196. depfix_ai-0.2.0/src/depfix/verify/characterize.py +422 -0
  197. depfix_ai-0.2.0/src/depfix/verify/confidence.py +88 -0
  198. depfix_ai-0.2.0/src/depfix/verify/contract.py +304 -0
  199. depfix_ai-0.2.0/src/depfix/verify/coverage.py +210 -0
  200. depfix_ai-0.2.0/src/depfix/verify/impact.py +406 -0
  201. depfix_ai-0.2.0/src/depfix/verify/manager.py +458 -0
  202. depfix_ai-0.2.0/src/depfix/verify/models.py +146 -0
  203. depfix_ai-0.2.0/src/depfix/verify/parsers.py +356 -0
  204. depfix_ai-0.2.0/src/depfix/verify/runner.py +397 -0
  205. depfix_ai-0.2.0/src/depfix/verify/sandbox.py +191 -0
  206. depfix_ai-0.2.0/src/depfix/verify/selection.py +235 -0
  207. depfix_ai-0.2.0/src/depfix/verify/severity.py +20 -0
  208. depfix_ai-0.2.0/src/depfix/verify/smoke.py +414 -0
  209. depfix_ai-0.2.0/src/depfix/verify/static_check.py +226 -0
  210. depfix_ai-0.2.0/src/depfix/verify/typecheck.py +237 -0
  211. depfix_ai-0.2.0/src/depfix/verify/verifier.py +960 -0
  212. depfix_ai-0.2.0/src/depfix/watcher/__init__.py +5 -0
  213. depfix_ai-0.2.0/src/depfix/watcher/runner.py +478 -0
  214. depfix_ai-0.2.0/src/depfix/workers/__init__.py +1 -0
  215. depfix_ai-0.2.0/src/depfix_ai.egg-info/PKG-INFO +207 -0
  216. depfix_ai-0.2.0/src/depfix_ai.egg-info/SOURCES.txt +218 -0
  217. depfix_ai-0.2.0/src/depfix_ai.egg-info/dependency_links.txt +1 -0
  218. depfix_ai-0.2.0/src/depfix_ai.egg-info/entry_points.txt +2 -0
  219. depfix_ai-0.2.0/src/depfix_ai.egg-info/requires.txt +24 -0
  220. depfix_ai-0.2.0/src/depfix_ai.egg-info/top_level.txt +1 -0
@@ -0,0 +1,207 @@
1
+ Metadata-Version: 2.4
2
+ Name: depfix-ai
3
+ Version: 0.2.0
4
+ Summary: AI-powered automatic fixing of breaking dependency changes.
5
+ Author: Tohir Saidzoda
6
+ Author-email: Bedil Karimov <bedil.karimov@gmail.com>
7
+ License-Expression: LicenseRef-depfix-Source-Available
8
+ Project-URL: Homepage, https://github.com/bedilk/depfix-agents
9
+ Project-URL: Repository, https://github.com/bedilk/depfix-agents
10
+ Project-URL: Issues, https://github.com/bedilk/depfix-agents/issues
11
+ Project-URL: Changelog, https://github.com/bedilk/depfix-agents/releases
12
+ Keywords: ai,llm,dependencies,migration,codemod
13
+ Classifier: Development Status :: 4 - Beta
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Operating System :: OS Independent
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
20
+ Classifier: Topic :: Software Development :: Code Generators
21
+ Classifier: Topic :: Software Development :: Quality Assurance
22
+ Requires-Python: >=3.11
23
+ Description-Content-Type: text/markdown
24
+ Requires-Dist: google-genai>=1.0.0
25
+ Requires-Dist: python-dotenv>=1.0.0
26
+ Requires-Dist: pydantic>=2.6.0
27
+ Requires-Dist: pydantic-settings>=2.2.0
28
+ Requires-Dist: rich>=13.7.0
29
+ Requires-Dist: httpx>=0.27.0
30
+ Requires-Dist: SQLAlchemy>=2.0.0
31
+ Requires-Dist: alembic>=1.13.0
32
+ Requires-Dist: psycopg[binary]>=3.1.0
33
+ Requires-Dist: PyYAML>=6.0
34
+ Requires-Dist: PyJWT[crypto]>=2.8.0
35
+ Requires-Dist: sentry-sdk>=2.0.0
36
+ Provides-Extra: dev
37
+ Requires-Dist: pytest>=8.0.0; extra == "dev"
38
+ Requires-Dist: pytest-cov>=5.0.0; extra == "dev"
39
+ Requires-Dist: pytest-mock>=3.12.0; extra == "dev"
40
+ Requires-Dist: ruff>=0.5.0; extra == "dev"
41
+ Requires-Dist: mypy>=1.10.0; extra == "dev"
42
+ Requires-Dist: types-requests; extra == "dev"
43
+ Requires-Dist: types-PyYAML; extra == "dev"
44
+ Requires-Dist: pre-commit>=3.7.0; extra == "dev"
45
+ Requires-Dist: bandit[toml]>=1.7.0; extra == "dev"
46
+ Requires-Dist: respx>=0.21.0; extra == "dev"
47
+
48
+ # depfix
49
+
50
+ **Dependabot for APIs.** Automatically detects breaking API/SDK changes, finds every affected line in your code, generates fixes, runs your tests, and opens a PR.
51
+
52
+ [![CI](https://github.com/bedilk/depfix-agents/actions/workflows/ci.yml/badge.svg)](https://github.com/bedilk/depfix-agents/actions)
53
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
54
+ [![Python 3.11+](https://img.shields.io/badge/python-3.11+-blue.svg)](https://www.python.org/)
55
+
56
+ ---
57
+
58
+ ## The problem
59
+
60
+ Over 30% of service downtime traces back to external API/package changes going unnoticed. Breaking changes ship with little warning. Changelogs don't get read. Teams discover the breakage in production.
61
+
62
+ Dependabot bumps version numbers. **depfix fixes your code.**
63
+
64
+ ## How it works
65
+
66
+ ```
67
+ watch → scan → plan → apply → PR
68
+ ```
69
+
70
+ | Step | What happens |
71
+ |------|-------------|
72
+ | **Watch** | Polls 27+ provider feeds (npm, PyPI, GitHub releases, OpenAPI diffs) for new versions and breaking changes |
73
+ | **Scan** | Clones your repo, finds every call-site using the affected API, detects version drift |
74
+ | **Plan** | Generates LLM-written fixes for breaking changes, version bumps for minor drift, runs your test suite to verify |
75
+ | **Apply** | Applies the verified fixes and opens a pull request |
76
+
77
+ ## Quick start
78
+
79
+ ```bash
80
+ pip install depfix
81
+
82
+ # Scan a repo for OpenAI breaking changes
83
+ depfix scan --repo your-org/your-app --provider openai
84
+
85
+ # Generate a fix plan (no PR yet)
86
+ depfix plan your-org/your-app --provider stripe
87
+
88
+ # Apply fixes and open a PR
89
+ depfix apply your-org/your-app --provider sentry
90
+ ```
91
+
92
+ ## GitHub Action
93
+
94
+ Add to `.github/workflows/depfix.yml`:
95
+
96
+ ```yaml
97
+ name: depfix
98
+ on:
99
+ schedule:
100
+ - cron: '0 8 * * 1' # every Monday at 8am
101
+ workflow_dispatch:
102
+
103
+ jobs:
104
+ depfix:
105
+ runs-on: ubuntu-latest
106
+ steps:
107
+ - uses: bedilk/depfix-agents@main
108
+ with:
109
+ provider: openai,stripe,sentry
110
+ mode: apply
111
+ api-key: ${{ secrets.GOOGLE_API_KEY }}
112
+ ```
113
+
114
+ ## Supported providers
115
+
116
+ 27+ providers out of the box. depfix auto-discovers new providers from npm, PyPI, and RubyGems.
117
+
118
+ | Category | Providers |
119
+ |----------|-----------|
120
+ | **AI/ML** | OpenAI, Anthropic, Google Cloud AI, LangChain, Vercel AI SDK |
121
+ | **Payments** | Stripe |
122
+ | **Auth** | Clerk, Supabase, Auth0 |
123
+ | **Databases** | MongoDB, Redis, PostgreSQL, MySQL, Prisma, Elasticsearch |
124
+ | **Observability** | Sentry, PostHog, Datadog, New Relic |
125
+ | **Messaging** | Twilio, SendGrid, Slack, Discord |
126
+ | **Cloud** | AWS S3, Firebase, Google Cloud, Cloudflare |
127
+ | **Other** | Algolia, Kafka, RabbitMQ, Astro, Octokit |
128
+
129
+ ## Supported ecosystems
130
+
131
+ | Ecosystem | Scan | Fix | Verify |
132
+ |-----------|------|-----|--------|
133
+ | JavaScript/TypeScript (npm) | Yes | Yes | Yes |
134
+ | Python (PyPI) | Yes | Yes | Yes |
135
+ | Ruby (RubyGems) | Yes | Yes | Yes |
136
+ | Go | Yes | -- | -- |
137
+ | Java, Kotlin, Rust, PHP, C#, Swift | Yes | -- | -- |
138
+
139
+ ## What makes depfix different
140
+
141
+ - **Finds call-sites, not just version numbers.** depfix traces imports to actual API usage across your codebase.
142
+ - **Verified fixes.** Every generated fix runs your test suite before and after. Broken fixes never reach a PR.
143
+ - **Deterministic where possible.** OpenAPI diffs and semver comparisons don't need an LLM. Only actual code rewrites use one.
144
+ - **27+ providers.** Not just OpenAI and Stripe. Real coverage across the APIs developers actually use.
145
+ - **Honest confidence.** Every finding has a confidence level (HIGH/MEDIUM/LOW). depfix doesn't guess.
146
+
147
+ ## CLI reference
148
+
149
+ ```bash
150
+ depfix init # set up local database and integrations
151
+ depfix watch --once # poll feeds for new changes
152
+ depfix scan --repo org/app --provider stripe # find affected call-sites
153
+ depfix plan org/app --provider stripe # generate verified fixes
154
+ depfix apply org/app --provider stripe # open a PR with the fixes
155
+ depfix eval --no-llm # run deterministic test corpus
156
+ ```
157
+
158
+ ## Configuration
159
+
160
+ All config is via environment variables or `.env` file:
161
+
162
+ | Variable | Purpose |
163
+ |----------|---------|
164
+ | `GOOGLE_API_KEY` | Google Generative AI key (for Gemini) |
165
+ | `LLM_PROVIDER` | `gemini`, `bedrock`, or `ollama` |
166
+ | `GITHUB_APP_ID` | GitHub App for remote repo scanning |
167
+ | `DATABASE_URL` | SQLite (default) or Postgres DSN |
168
+
169
+ See [.env.example](.env.example) for the full list.
170
+
171
+ ## Self-hosted
172
+
173
+ ```bash
174
+ git clone https://github.com/bedilk/depfix-agents
175
+ cd depfix-agents
176
+ python -m venv .venv && source .venv/bin/activate
177
+ pip install -e ".[dev]"
178
+ cp .env.example .env # edit with your keys
179
+ depfix init
180
+ ```
181
+
182
+ Docker:
183
+ ```bash
184
+ docker compose up -d --build
185
+ docker compose exec app depfix scan --repo org/app --provider openai
186
+ ```
187
+
188
+ ## Testing
189
+
190
+ ```bash
191
+ make test # 893 unit tests, no network
192
+ make lint # ruff check
193
+ make typecheck # mypy
194
+ make eval # deterministic eval corpus (CI gate, 91%+)
195
+ ```
196
+
197
+ ## Built by
198
+
199
+ **Bedil Karimov** and **Tohir Saidzoda**
200
+
201
+ We spent a year working with 50+ API vendors. The pattern was consistent: API communication is broken. Breaking changes ship with little warning. Useful features quietly launch and go unnoticed.
202
+
203
+ The infrastructure for automated code changes exists now. What was missing is the application layer connecting API providers to their customers' codebases. That's depfix.
204
+
205
+ ## License
206
+
207
+ MIT
@@ -0,0 +1,160 @@
1
+ # depfix
2
+
3
+ **Dependabot for APIs.** Automatically detects breaking API/SDK changes, finds every affected line in your code, generates fixes, runs your tests, and opens a PR.
4
+
5
+ [![CI](https://github.com/bedilk/depfix-agents/actions/workflows/ci.yml/badge.svg)](https://github.com/bedilk/depfix-agents/actions)
6
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
7
+ [![Python 3.11+](https://img.shields.io/badge/python-3.11+-blue.svg)](https://www.python.org/)
8
+
9
+ ---
10
+
11
+ ## The problem
12
+
13
+ Over 30% of service downtime traces back to external API/package changes going unnoticed. Breaking changes ship with little warning. Changelogs don't get read. Teams discover the breakage in production.
14
+
15
+ Dependabot bumps version numbers. **depfix fixes your code.**
16
+
17
+ ## How it works
18
+
19
+ ```
20
+ watch → scan → plan → apply → PR
21
+ ```
22
+
23
+ | Step | What happens |
24
+ |------|-------------|
25
+ | **Watch** | Polls 27+ provider feeds (npm, PyPI, GitHub releases, OpenAPI diffs) for new versions and breaking changes |
26
+ | **Scan** | Clones your repo, finds every call-site using the affected API, detects version drift |
27
+ | **Plan** | Generates LLM-written fixes for breaking changes, version bumps for minor drift, runs your test suite to verify |
28
+ | **Apply** | Applies the verified fixes and opens a pull request |
29
+
30
+ ## Quick start
31
+
32
+ ```bash
33
+ pip install depfix
34
+
35
+ # Scan a repo for OpenAI breaking changes
36
+ depfix scan --repo your-org/your-app --provider openai
37
+
38
+ # Generate a fix plan (no PR yet)
39
+ depfix plan your-org/your-app --provider stripe
40
+
41
+ # Apply fixes and open a PR
42
+ depfix apply your-org/your-app --provider sentry
43
+ ```
44
+
45
+ ## GitHub Action
46
+
47
+ Add to `.github/workflows/depfix.yml`:
48
+
49
+ ```yaml
50
+ name: depfix
51
+ on:
52
+ schedule:
53
+ - cron: '0 8 * * 1' # every Monday at 8am
54
+ workflow_dispatch:
55
+
56
+ jobs:
57
+ depfix:
58
+ runs-on: ubuntu-latest
59
+ steps:
60
+ - uses: bedilk/depfix-agents@main
61
+ with:
62
+ provider: openai,stripe,sentry
63
+ mode: apply
64
+ api-key: ${{ secrets.GOOGLE_API_KEY }}
65
+ ```
66
+
67
+ ## Supported providers
68
+
69
+ 27+ providers out of the box. depfix auto-discovers new providers from npm, PyPI, and RubyGems.
70
+
71
+ | Category | Providers |
72
+ |----------|-----------|
73
+ | **AI/ML** | OpenAI, Anthropic, Google Cloud AI, LangChain, Vercel AI SDK |
74
+ | **Payments** | Stripe |
75
+ | **Auth** | Clerk, Supabase, Auth0 |
76
+ | **Databases** | MongoDB, Redis, PostgreSQL, MySQL, Prisma, Elasticsearch |
77
+ | **Observability** | Sentry, PostHog, Datadog, New Relic |
78
+ | **Messaging** | Twilio, SendGrid, Slack, Discord |
79
+ | **Cloud** | AWS S3, Firebase, Google Cloud, Cloudflare |
80
+ | **Other** | Algolia, Kafka, RabbitMQ, Astro, Octokit |
81
+
82
+ ## Supported ecosystems
83
+
84
+ | Ecosystem | Scan | Fix | Verify |
85
+ |-----------|------|-----|--------|
86
+ | JavaScript/TypeScript (npm) | Yes | Yes | Yes |
87
+ | Python (PyPI) | Yes | Yes | Yes |
88
+ | Ruby (RubyGems) | Yes | Yes | Yes |
89
+ | Go | Yes | -- | -- |
90
+ | Java, Kotlin, Rust, PHP, C#, Swift | Yes | -- | -- |
91
+
92
+ ## What makes depfix different
93
+
94
+ - **Finds call-sites, not just version numbers.** depfix traces imports to actual API usage across your codebase.
95
+ - **Verified fixes.** Every generated fix runs your test suite before and after. Broken fixes never reach a PR.
96
+ - **Deterministic where possible.** OpenAPI diffs and semver comparisons don't need an LLM. Only actual code rewrites use one.
97
+ - **27+ providers.** Not just OpenAI and Stripe. Real coverage across the APIs developers actually use.
98
+ - **Honest confidence.** Every finding has a confidence level (HIGH/MEDIUM/LOW). depfix doesn't guess.
99
+
100
+ ## CLI reference
101
+
102
+ ```bash
103
+ depfix init # set up local database and integrations
104
+ depfix watch --once # poll feeds for new changes
105
+ depfix scan --repo org/app --provider stripe # find affected call-sites
106
+ depfix plan org/app --provider stripe # generate verified fixes
107
+ depfix apply org/app --provider stripe # open a PR with the fixes
108
+ depfix eval --no-llm # run deterministic test corpus
109
+ ```
110
+
111
+ ## Configuration
112
+
113
+ All config is via environment variables or `.env` file:
114
+
115
+ | Variable | Purpose |
116
+ |----------|---------|
117
+ | `GOOGLE_API_KEY` | Google Generative AI key (for Gemini) |
118
+ | `LLM_PROVIDER` | `gemini`, `bedrock`, or `ollama` |
119
+ | `GITHUB_APP_ID` | GitHub App for remote repo scanning |
120
+ | `DATABASE_URL` | SQLite (default) or Postgres DSN |
121
+
122
+ See [.env.example](.env.example) for the full list.
123
+
124
+ ## Self-hosted
125
+
126
+ ```bash
127
+ git clone https://github.com/bedilk/depfix-agents
128
+ cd depfix-agents
129
+ python -m venv .venv && source .venv/bin/activate
130
+ pip install -e ".[dev]"
131
+ cp .env.example .env # edit with your keys
132
+ depfix init
133
+ ```
134
+
135
+ Docker:
136
+ ```bash
137
+ docker compose up -d --build
138
+ docker compose exec app depfix scan --repo org/app --provider openai
139
+ ```
140
+
141
+ ## Testing
142
+
143
+ ```bash
144
+ make test # 893 unit tests, no network
145
+ make lint # ruff check
146
+ make typecheck # mypy
147
+ make eval # deterministic eval corpus (CI gate, 91%+)
148
+ ```
149
+
150
+ ## Built by
151
+
152
+ **Bedil Karimov** and **Tohir Saidzoda**
153
+
154
+ We spent a year working with 50+ API vendors. The pattern was consistent: API communication is broken. Breaking changes ship with little warning. Useful features quietly launch and go unnoticed.
155
+
156
+ The infrastructure for automated code changes exists now. What was missing is the application layer connecting API providers to their customers' codebases. That's depfix.
157
+
158
+ ## License
159
+
160
+ MIT
@@ -0,0 +1,181 @@
1
+ [build-system]
2
+ requires = ["setuptools>=68", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ # ============================================================================
6
+ # depfix — AI-powered dependency migration agent
7
+ # ============================================================================
8
+
9
+ [project]
10
+ name = "depfix-ai"
11
+ version = "0.2.0"
12
+ description = "AI-powered automatic fixing of breaking dependency changes."
13
+ readme = "README.md"
14
+ requires-python = ">=3.11"
15
+ license = "LicenseRef-depfix-Source-Available"
16
+ license-files = ["LICENSE"]
17
+ authors = [
18
+ { name = "Bedil Karimov", email = "bedil.karimov@gmail.com" },
19
+ { name = "Tohir Saidzoda" },
20
+ ]
21
+ keywords = ["ai", "llm", "dependencies", "migration", "codemod"]
22
+ classifiers = [
23
+ "Development Status :: 4 - Beta",
24
+ "Intended Audience :: Developers",
25
+ "Operating System :: OS Independent",
26
+ "Programming Language :: Python :: 3",
27
+ "Programming Language :: Python :: 3.11",
28
+ "Programming Language :: Python :: 3.12",
29
+ "Programming Language :: Python :: 3.13",
30
+ "Topic :: Software Development :: Code Generators",
31
+ "Topic :: Software Development :: Quality Assurance",
32
+ ]
33
+
34
+ # Runtime dependencies. Keep in sync with requirements.txt.
35
+ dependencies = [
36
+ "google-genai>=1.0.0",
37
+ "python-dotenv>=1.0.0",
38
+ "pydantic>=2.6.0",
39
+ "pydantic-settings>=2.2.0",
40
+ "rich>=13.7.0",
41
+ "httpx>=0.27.0",
42
+ "SQLAlchemy>=2.0.0",
43
+ "alembic>=1.13.0",
44
+ "psycopg[binary]>=3.1.0",
45
+ "PyYAML>=6.0",
46
+ "PyJWT[crypto]>=2.8.0",
47
+ "sentry-sdk>=2.0.0",
48
+ ]
49
+
50
+ [project.optional-dependencies]
51
+ dev = [
52
+ "pytest>=8.0.0",
53
+ "pytest-cov>=5.0.0",
54
+ "pytest-mock>=3.12.0",
55
+ "ruff>=0.5.0",
56
+ "mypy>=1.10.0",
57
+ "types-requests",
58
+ "types-PyYAML",
59
+ "pre-commit>=3.7.0",
60
+ "bandit[toml]>=1.7.0",
61
+ "respx>=0.21.0",
62
+ ]
63
+
64
+ [project.scripts]
65
+ depfix = "depfix.cli:main"
66
+
67
+ [project.urls]
68
+ Homepage = "https://github.com/bedilk/depfix-agents"
69
+ Repository = "https://github.com/bedilk/depfix-agents"
70
+ Issues = "https://github.com/bedilk/depfix-agents/issues"
71
+ Changelog = "https://github.com/bedilk/depfix-agents/releases"
72
+
73
+ # ============================================================================
74
+ # Setuptools: src-layout package discovery
75
+ # ============================================================================
76
+
77
+ [tool.setuptools.packages.find]
78
+ where = ["src"]
79
+ include = ["depfix*"]
80
+
81
+ [tool.setuptools.package-data]
82
+ depfix = [
83
+ "py.typed",
84
+ "migrations/*.py",
85
+ "migrations/*.mako",
86
+ "migrations/versions/*.py",
87
+ "catalog/*.yaml",
88
+ ]
89
+
90
+ # ============================================================================
91
+ # Ruff: lint + format (replaces flake8 + black + isort)
92
+ # ============================================================================
93
+
94
+ [tool.ruff]
95
+ line-length = 100
96
+ target-version = "py311"
97
+ src = ["src", "tests"]
98
+ exclude = [
99
+ ".venv", "venv", "build", "dist",
100
+ "tests/fixtures",
101
+ "output",
102
+ ]
103
+
104
+ [tool.ruff.lint]
105
+ select = [
106
+ "E", "F", "W", # pycodestyle + pyflakes
107
+ "I", # isort
108
+ "UP", # pyupgrade
109
+ "B", # flake8-bugbear
110
+ "SIM", # flake8-simplify
111
+ "C4", # comprehensions
112
+ "TID", # tidy-imports
113
+ "RUF", # ruff-native
114
+ ]
115
+ ignore = ["E501"] # line-length is enforced by the formatter
116
+
117
+ [tool.ruff.lint.per-file-ignores]
118
+ "tests/**/*.py" = ["B011", "SIM117"]
119
+
120
+ [tool.ruff.format]
121
+ quote-style = "double"
122
+
123
+ # ============================================================================
124
+ # mypy: static typing
125
+ # ============================================================================
126
+
127
+ [tool.mypy]
128
+ python_version = "3.12"
129
+ files = ["src", "tests"]
130
+ strict_optional = true
131
+ warn_unused_ignores = true
132
+ warn_redundant_casts = true
133
+ check_untyped_defs = true
134
+ ignore_missing_imports = true # third-party LLM SDK stubs are patchy
135
+ exclude = ["tests/fixtures/", "build/", "dist/"]
136
+
137
+ [[tool.mypy.overrides]]
138
+ module = ["numpy.*"]
139
+ ignore_errors = true
140
+
141
+ # ============================================================================
142
+ # pytest
143
+ # ============================================================================
144
+
145
+ [tool.bandit]
146
+ # B101: asserts are used for internal invariants (e.g. "engine was already
147
+ # initialized"), never for validating untrusted input.
148
+ # B404/B603: subprocess is used exactly once, to shell out to a full-path-
149
+ # resolved `node` binary with a static argv list, to syntax-check generated
150
+ # JS/TS — not attacker-controlled input, shell=False throughout.
151
+ skips = ["B101", "B404", "B603"]
152
+
153
+ [tool.pytest.ini_options]
154
+ minversion = "8.0"
155
+ testpaths = ["tests"]
156
+ addopts = "-ra --strict-markers --strict-config"
157
+ markers = [
158
+ "integration: hits real external services (LLM API). Slow and costs $.",
159
+ "e2e: end-to-end test running the full pipeline.",
160
+ ]
161
+ pythonpath = ["src"]
162
+
163
+ # ============================================================================
164
+ # coverage
165
+ # ============================================================================
166
+
167
+ [tool.coverage.run]
168
+ source = ["src/depfix"]
169
+ branch = true
170
+ omit = ["*/__init__.py"]
171
+
172
+ [tool.coverage.report]
173
+ precision = 1
174
+ show_missing = true
175
+ skip_covered = false
176
+ exclude_lines = [
177
+ "pragma: no cover",
178
+ "raise NotImplementedError",
179
+ "if __name__ == .__main__.:",
180
+ "if TYPE_CHECKING:",
181
+ ]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,27 @@
1
+ """depfix — AI-powered fixer for breaking dependency changes."""
2
+
3
+ from depfix.core.agent import DependencyFixAgent
4
+ from depfix.core.models import (
5
+ AgentResult,
6
+ BreakingChange,
7
+ ChangeKind,
8
+ ClassificationSource,
9
+ FileUsage,
10
+ FixResult,
11
+ Usage,
12
+ ValidationResult,
13
+ )
14
+
15
+ __all__ = [
16
+ "AgentResult",
17
+ "BreakingChange",
18
+ "ChangeKind",
19
+ "ClassificationSource",
20
+ "DependencyFixAgent",
21
+ "FileUsage",
22
+ "FixResult",
23
+ "Usage",
24
+ "ValidationResult",
25
+ ]
26
+
27
+ __version__ = "0.2.0"
@@ -0,0 +1,5 @@
1
+ """Bounded, opt-in tool-assisted fix generation."""
2
+
3
+ from depfix.agent.fix_agent import FixAgent, make_fix_strategy
4
+
5
+ __all__ = ["FixAgent", "make_fix_strategy"]