docorbit 0.1.0 → 0.1.1

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 (402) hide show
  1. package/bin/docorbit.js +2 -2
  2. package/dist/apps/cli/src/commands/add.d.ts +7 -0
  3. package/dist/apps/cli/src/commands/add.js +35 -0
  4. package/dist/apps/cli/src/commands/api.d.ts +2 -0
  5. package/dist/apps/cli/src/commands/api.js +35 -0
  6. package/dist/apps/cli/src/commands/context.d.ts +10 -0
  7. package/dist/apps/cli/src/commands/context.js +36 -0
  8. package/dist/apps/cli/src/commands/dashboard.d.ts +8 -0
  9. package/dist/apps/cli/src/commands/dashboard.js +43 -0
  10. package/dist/apps/cli/src/commands/diff.d.ts +2 -0
  11. package/dist/apps/cli/src/commands/diff.js +29 -0
  12. package/dist/apps/cli/src/commands/evaluate.d.ts +11 -0
  13. package/dist/apps/cli/src/commands/evaluate.js +101 -0
  14. package/dist/apps/cli/src/commands/examples.d.ts +2 -0
  15. package/dist/apps/cli/src/commands/examples.js +36 -0
  16. package/dist/apps/cli/src/commands/export.d.ts +11 -0
  17. package/dist/apps/cli/src/commands/export.js +72 -0
  18. package/dist/apps/cli/src/commands/impact.d.ts +2 -0
  19. package/dist/apps/cli/src/commands/impact.js +30 -0
  20. package/dist/apps/cli/src/commands/init.d.ts +5 -0
  21. package/dist/apps/cli/src/commands/init.js +52 -0
  22. package/dist/apps/cli/src/commands/inspect.d.ts +5 -0
  23. package/dist/apps/cli/src/commands/inspect.js +24 -0
  24. package/dist/apps/cli/src/commands/mcp.d.ts +8 -0
  25. package/dist/apps/cli/src/commands/mcp.js +49 -0
  26. package/dist/apps/cli/src/commands/pitfalls.d.ts +2 -0
  27. package/dist/apps/cli/src/commands/pitfalls.js +35 -0
  28. package/dist/apps/cli/src/commands/recipes.d.ts +2 -0
  29. package/dist/apps/cli/src/commands/recipes.js +33 -0
  30. package/dist/apps/cli/src/commands/search.d.ts +11 -0
  31. package/dist/apps/cli/src/commands/search.js +36 -0
  32. package/dist/apps/cli/src/commands/update.d.ts +6 -0
  33. package/dist/apps/cli/src/commands/update.js +53 -0
  34. package/dist/apps/cli/src/commands/verify.d.ts +2 -0
  35. package/dist/apps/cli/src/commands/verify.js +44 -0
  36. package/dist/apps/cli/src/formatters/colors.d.ts +21 -0
  37. package/dist/apps/cli/src/formatters/colors.js +22 -0
  38. package/dist/apps/cli/src/formatters/inspection.d.ts +3 -0
  39. package/dist/apps/cli/src/formatters/inspection.js +88 -0
  40. package/dist/apps/cli/src/formatters/knowledge.d.ts +5 -0
  41. package/dist/apps/cli/src/formatters/knowledge.js +229 -0
  42. package/dist/apps/cli/src/formatters/retrieval.d.ts +3 -0
  43. package/dist/apps/cli/src/formatters/retrieval.js +61 -0
  44. package/{apps/cli/src/formatters/terminal.ts → dist/apps/cli/src/formatters/terminal.d.ts} +0 -1
  45. package/dist/apps/cli/src/formatters/terminal.js +5 -0
  46. package/dist/apps/cli/src/formatters/verification.d.ts +4 -0
  47. package/dist/apps/cli/src/formatters/verification.js +102 -0
  48. package/dist/apps/cli/src/index.d.ts +1 -0
  49. package/dist/apps/cli/src/index.js +376 -0
  50. package/dist/packages/core/src/dashboard/server.d.ts +33 -0
  51. package/dist/packages/core/src/dashboard/server.js +267 -0
  52. package/dist/packages/core/src/dashboard/ui.d.ts +5 -0
  53. package/{packages/core/src/dashboard/ui.ts → dist/packages/core/src/dashboard/ui.js} +2 -2
  54. package/dist/packages/core/src/implementation-service.d.ts +73 -0
  55. package/dist/packages/core/src/implementation-service.js +325 -0
  56. package/{packages/core/src/index.ts → dist/packages/core/src/index.d.ts} +0 -1
  57. package/dist/packages/core/src/index.js +6 -0
  58. package/dist/packages/core/src/inspector.d.ts +22 -0
  59. package/dist/packages/core/src/inspector.js +38 -0
  60. package/dist/packages/core/src/pipeline.d.ts +45 -0
  61. package/dist/packages/core/src/pipeline.js +246 -0
  62. package/dist/packages/crawler/src/config.d.ts +2 -0
  63. package/dist/packages/crawler/src/config.js +10 -0
  64. package/dist/packages/crawler/src/fetcher.d.ts +31 -0
  65. package/dist/packages/crawler/src/fetcher.js +139 -0
  66. package/dist/packages/crawler/src/index.js +2 -0
  67. package/dist/packages/discovery/src/index.d.ts +11 -0
  68. package/dist/packages/discovery/src/index.js +29 -0
  69. package/dist/packages/discovery/src/provider.d.ts +12 -0
  70. package/dist/packages/discovery/src/provider.js +30 -0
  71. package/dist/packages/discovery/src/providers/generic.d.ts +7 -0
  72. package/dist/packages/discovery/src/providers/generic.js +94 -0
  73. package/dist/packages/discovery/src/providers/github.d.ts +7 -0
  74. package/dist/packages/discovery/src/providers/github.js +52 -0
  75. package/dist/packages/discovery/src/providers/llms-txt.d.ts +7 -0
  76. package/dist/packages/discovery/src/providers/llms-txt.js +60 -0
  77. package/dist/packages/discovery/src/providers/markdown.d.ts +7 -0
  78. package/dist/packages/discovery/src/providers/markdown.js +38 -0
  79. package/dist/packages/discovery/src/providers/openapi.d.ts +7 -0
  80. package/dist/packages/discovery/src/providers/openapi.js +77 -0
  81. package/dist/packages/discovery/src/providers/sitemap.d.ts +7 -0
  82. package/dist/packages/discovery/src/providers/sitemap.js +53 -0
  83. package/dist/packages/discovery/src/providers/skill.d.ts +7 -0
  84. package/dist/packages/discovery/src/providers/skill.js +46 -0
  85. package/dist/packages/discovery/src/ranker.d.ts +6 -0
  86. package/dist/packages/discovery/src/ranker.js +107 -0
  87. package/dist/packages/evaluation/src/dataset.d.ts +2 -0
  88. package/dist/packages/evaluation/src/dataset.js +944 -0
  89. package/dist/packages/evaluation/src/index.js +8 -0
  90. package/dist/packages/evaluation/src/runner.d.ts +7 -0
  91. package/dist/packages/evaluation/src/runner.js +196 -0
  92. package/dist/packages/evaluation/src/strategies/context7-runner.d.ts +24 -0
  93. package/dist/packages/evaluation/src/strategies/context7-runner.js +229 -0
  94. package/dist/packages/evaluation/src/strategies/docorbit-runner.d.ts +5 -0
  95. package/dist/packages/evaluation/src/strategies/docorbit-runner.js +210 -0
  96. package/dist/packages/evaluation/src/strategies/firecrawl-runner.d.ts +24 -0
  97. package/dist/packages/evaluation/src/strategies/firecrawl-runner.js +151 -0
  98. package/dist/packages/evaluation/src/strategies/web-search-runner.d.ts +32 -0
  99. package/dist/packages/evaluation/src/strategies/web-search-runner.js +161 -0
  100. package/dist/packages/evaluation/src/types.d.ts +15 -0
  101. package/dist/packages/evaluation/src/types.js +1 -0
  102. package/dist/packages/evaluation/src/version-matcher.d.ts +11 -0
  103. package/dist/packages/evaluation/src/version-matcher.js +61 -0
  104. package/dist/packages/export/src/agents-md.d.ts +19 -0
  105. package/dist/packages/export/src/agents-md.js +170 -0
  106. package/dist/packages/export/src/claude-md.d.ts +17 -0
  107. package/dist/packages/export/src/claude-md.js +118 -0
  108. package/dist/packages/export/src/docs-map.d.ts +14 -0
  109. package/dist/packages/export/src/docs-map.js +118 -0
  110. package/dist/packages/export/src/index.js +6 -0
  111. package/dist/packages/export/src/llms-txt.d.ts +15 -0
  112. package/dist/packages/export/src/llms-txt.js +73 -0
  113. package/dist/packages/export/src/service.d.ts +23 -0
  114. package/dist/packages/export/src/service.js +210 -0
  115. package/dist/packages/export/src/skill-md.d.ts +14 -0
  116. package/dist/packages/export/src/skill-md.js +107 -0
  117. package/{packages/mcp/src/index.ts → dist/packages/mcp/src/index.d.ts} +2 -35
  118. package/dist/packages/mcp/src/index.js +6 -0
  119. package/dist/packages/mcp/src/resources/index.d.ts +12 -0
  120. package/dist/packages/mcp/src/resources/index.js +165 -0
  121. package/dist/packages/mcp/src/server.d.ts +30 -0
  122. package/dist/packages/mcp/src/server.js +243 -0
  123. package/dist/packages/mcp/src/tools/analyze-impact.d.ts +6 -0
  124. package/dist/packages/mcp/src/tools/analyze-impact.js +64 -0
  125. package/dist/packages/mcp/src/tools/check-api.d.ts +6 -0
  126. package/dist/packages/mcp/src/tools/check-api.js +74 -0
  127. package/dist/packages/mcp/src/tools/diff-docs.d.ts +6 -0
  128. package/dist/packages/mcp/src/tools/diff-docs.js +58 -0
  129. package/dist/packages/mcp/src/tools/export-context.d.ts +6 -0
  130. package/dist/packages/mcp/src/tools/export-context.js +61 -0
  131. package/dist/packages/mcp/src/tools/find-api.d.ts +6 -0
  132. package/dist/packages/mcp/src/tools/find-api.js +91 -0
  133. package/dist/packages/mcp/src/tools/find-example.d.ts +6 -0
  134. package/dist/packages/mcp/src/tools/find-example.js +92 -0
  135. package/dist/packages/mcp/src/tools/find-pitfall.d.ts +6 -0
  136. package/dist/packages/mcp/src/tools/find-pitfall.js +85 -0
  137. package/dist/packages/mcp/src/tools/find-recipe.d.ts +6 -0
  138. package/dist/packages/mcp/src/tools/find-recipe.js +89 -0
  139. package/dist/packages/mcp/src/tools/get-doc.d.ts +6 -0
  140. package/dist/packages/mcp/src/tools/get-doc.js +118 -0
  141. package/dist/packages/mcp/src/tools/get-docs-map.d.ts +6 -0
  142. package/dist/packages/mcp/src/tools/get-docs-map.js +54 -0
  143. package/dist/packages/mcp/src/tools/get-version.d.ts +6 -0
  144. package/dist/packages/mcp/src/tools/get-version.js +104 -0
  145. package/dist/packages/mcp/src/tools/implementation-context.d.ts +6 -0
  146. package/dist/packages/mcp/src/tools/implementation-context.js +82 -0
  147. package/dist/packages/mcp/src/tools/index.d.ts +18 -0
  148. package/dist/packages/mcp/src/tools/index.js +39 -0
  149. package/dist/packages/mcp/src/tools/list-sources.d.ts +6 -0
  150. package/dist/packages/mcp/src/tools/list-sources.js +76 -0
  151. package/dist/packages/mcp/src/tools/search-docs.d.ts +6 -0
  152. package/dist/packages/mcp/src/tools/search-docs.js +113 -0
  153. package/dist/packages/mcp/src/tools/types.d.ts +22 -0
  154. package/dist/packages/mcp/src/tools/types.js +1 -0
  155. package/dist/packages/mcp/src/transports/http.d.ts +31 -0
  156. package/dist/packages/mcp/src/transports/http.js +215 -0
  157. package/dist/packages/mcp/src/transports/stdio.d.ts +22 -0
  158. package/dist/packages/mcp/src/transports/stdio.js +86 -0
  159. package/{packages/mcp/src/transports/types.ts → dist/packages/mcp/src/transports/types.d.ts} +2 -3
  160. package/dist/packages/mcp/src/transports/types.js +1 -0
  161. package/dist/packages/mcp/src/types.d.ts +89 -0
  162. package/dist/packages/mcp/src/types.js +7 -0
  163. package/dist/packages/normalizer/src/example-indexer.d.ts +5 -0
  164. package/dist/packages/normalizer/src/example-indexer.js +200 -0
  165. package/dist/packages/normalizer/src/html.d.ts +13 -0
  166. package/dist/packages/normalizer/src/html.js +221 -0
  167. package/{packages/normalizer/src/index.ts → dist/packages/normalizer/src/index.d.ts} +0 -1
  168. package/dist/packages/normalizer/src/index.js +7 -0
  169. package/dist/packages/normalizer/src/llms.d.ts +3 -0
  170. package/dist/packages/normalizer/src/llms.js +71 -0
  171. package/dist/packages/normalizer/src/openapi/endpoint-parser.d.ts +11 -0
  172. package/dist/packages/normalizer/src/openapi/endpoint-parser.js +357 -0
  173. package/dist/packages/normalizer/src/openapi/schema-resolver.d.ts +10 -0
  174. package/dist/packages/normalizer/src/openapi/schema-resolver.js +82 -0
  175. package/dist/packages/normalizer/src/openapi.js +2 -0
  176. package/dist/packages/normalizer/src/page.d.ts +13 -0
  177. package/dist/packages/normalizer/src/page.js +150 -0
  178. package/dist/packages/normalizer/src/pitfall-extractor.d.ts +6 -0
  179. package/dist/packages/normalizer/src/pitfall-extractor.js +153 -0
  180. package/dist/packages/normalizer/src/slicer.d.ts +30 -0
  181. package/dist/packages/normalizer/src/slicer.js +360 -0
  182. package/dist/packages/retrieval/src/engine.d.ts +17 -0
  183. package/dist/packages/retrieval/src/engine.js +93 -0
  184. package/{packages/retrieval/src/index.ts → dist/packages/retrieval/src/index.d.ts} +0 -1
  185. package/dist/packages/retrieval/src/index.js +6 -0
  186. package/dist/packages/retrieval/src/intent.d.ts +6 -0
  187. package/dist/packages/retrieval/src/intent.js +39 -0
  188. package/dist/packages/retrieval/src/packer.d.ts +2 -0
  189. package/dist/packages/retrieval/src/packer.js +108 -0
  190. package/dist/packages/retrieval/src/recipe-engine.d.ts +18 -0
  191. package/dist/packages/retrieval/src/recipe-engine.js +265 -0
  192. package/dist/packages/retrieval/src/scorer.d.ts +13 -0
  193. package/dist/packages/retrieval/src/scorer.js +110 -0
  194. package/dist/packages/retrieval/src/weights.d.ts +3 -0
  195. package/dist/packages/retrieval/src/weights.js +28 -0
  196. package/dist/packages/security/src/annotations.d.ts +10 -0
  197. package/dist/packages/security/src/annotations.js +100 -0
  198. package/dist/packages/security/src/index.js +2 -0
  199. package/dist/packages/security/src/ssrf.d.ts +17 -0
  200. package/dist/packages/security/src/ssrf.js +132 -0
  201. package/dist/packages/shared/src/errors.d.ts +22 -0
  202. package/dist/packages/shared/src/errors.js +44 -0
  203. package/dist/packages/shared/src/hashing.d.ts +3 -0
  204. package/dist/packages/shared/src/hashing.js +21 -0
  205. package/dist/packages/shared/src/index.js +3 -0
  206. package/dist/packages/shared/src/types.d.ts +715 -0
  207. package/dist/packages/shared/src/types.js +1 -0
  208. package/dist/packages/storage/src/db.d.ts +10 -0
  209. package/dist/packages/storage/src/db.js +61 -0
  210. package/dist/packages/storage/src/index.js +10 -0
  211. package/dist/packages/storage/src/interfaces.d.ts +83 -0
  212. package/dist/packages/storage/src/interfaces.js +1 -0
  213. package/dist/packages/storage/src/repositories/api-repository.d.ts +16 -0
  214. package/dist/packages/storage/src/repositories/api-repository.js +169 -0
  215. package/dist/packages/storage/src/repositories/chunk-repository.d.ts +32 -0
  216. package/dist/packages/storage/src/repositories/chunk-repository.js +250 -0
  217. package/dist/packages/storage/src/repositories/example-repository.d.ts +16 -0
  218. package/dist/packages/storage/src/repositories/example-repository.js +158 -0
  219. package/dist/packages/storage/src/repositories/page-repository.d.ts +16 -0
  220. package/dist/packages/storage/src/repositories/page-repository.js +161 -0
  221. package/dist/packages/storage/src/repositories/pitfall-repository.d.ts +15 -0
  222. package/dist/packages/storage/src/repositories/pitfall-repository.js +144 -0
  223. package/dist/packages/storage/src/repositories/source-repository.d.ts +33 -0
  224. package/dist/packages/storage/src/repositories/source-repository.js +153 -0
  225. package/dist/packages/storage/src/repository.d.ts +92 -0
  226. package/dist/packages/storage/src/repository.js +157 -0
  227. package/dist/packages/storage/src/schema.d.ts +2 -0
  228. package/{packages/storage/src/schema.ts → dist/packages/storage/src/schema.js} +0 -3
  229. package/dist/packages/storage/src/search-tokens.d.ts +6 -0
  230. package/dist/packages/storage/src/search-tokens.js +26 -0
  231. package/dist/packages/verification/src/diff-engine.d.ts +18 -0
  232. package/dist/packages/verification/src/diff-engine.js +218 -0
  233. package/dist/packages/verification/src/extractor.d.ts +29 -0
  234. package/dist/packages/verification/src/extractor.js +302 -0
  235. package/dist/packages/verification/src/impact-scanner.d.ts +9 -0
  236. package/dist/packages/verification/src/impact-scanner.js +181 -0
  237. package/dist/packages/verification/src/index.js +5 -0
  238. package/dist/packages/verification/src/services.d.ts +55 -0
  239. package/dist/packages/verification/src/services.js +189 -0
  240. package/dist/packages/verification/src/verifier.d.ts +15 -0
  241. package/dist/packages/verification/src/verifier.js +315 -0
  242. package/dist/packages/workspace/src/detector.d.ts +7 -0
  243. package/dist/packages/workspace/src/detector.js +117 -0
  244. package/dist/packages/workspace/src/ecosystems/cargo.d.ts +10 -0
  245. package/dist/packages/workspace/src/ecosystems/cargo.js +69 -0
  246. package/dist/packages/workspace/src/ecosystems/composer.d.ts +7 -0
  247. package/dist/packages/workspace/src/ecosystems/composer.js +40 -0
  248. package/dist/packages/workspace/src/ecosystems/go.d.ts +7 -0
  249. package/dist/packages/workspace/src/ecosystems/go.js +49 -0
  250. package/{packages/workspace/src/ecosystems/index.ts → dist/packages/workspace/src/ecosystems/index.d.ts} +2 -24
  251. package/dist/packages/workspace/src/ecosystems/index.js +21 -0
  252. package/dist/packages/workspace/src/ecosystems/maven.d.ts +7 -0
  253. package/dist/packages/workspace/src/ecosystems/maven.js +28 -0
  254. package/dist/packages/workspace/src/ecosystems/npm.d.ts +10 -0
  255. package/dist/packages/workspace/src/ecosystems/npm.js +73 -0
  256. package/dist/packages/workspace/src/ecosystems/pub.d.ts +7 -0
  257. package/dist/packages/workspace/src/ecosystems/pub.js +34 -0
  258. package/dist/packages/workspace/src/ecosystems/pypi.d.ts +9 -0
  259. package/dist/packages/workspace/src/ecosystems/pypi.js +94 -0
  260. package/dist/packages/workspace/src/ecosystems/rubygems.d.ts +7 -0
  261. package/dist/packages/workspace/src/ecosystems/rubygems.js +25 -0
  262. package/dist/packages/workspace/src/ecosystems/types.d.ts +9 -0
  263. package/dist/packages/workspace/src/ecosystems/types.js +1 -0
  264. package/dist/packages/workspace/src/index.js +5 -0
  265. package/dist/packages/workspace/src/lockfile.d.ts +21 -0
  266. package/dist/packages/workspace/src/lockfile.js +153 -0
  267. package/dist/packages/workspace/src/resolver.d.ts +39 -0
  268. package/dist/packages/workspace/src/resolver.js +164 -0
  269. package/dist/packages/workspace/src/semver.d.ts +33 -0
  270. package/dist/packages/workspace/src/semver.js +235 -0
  271. package/package.json +8 -7
  272. package/apps/cli/bin/docorbit.js +0 -8
  273. package/apps/cli/src/commands/add.ts +0 -44
  274. package/apps/cli/src/commands/api.ts +0 -38
  275. package/apps/cli/src/commands/context.ts +0 -47
  276. package/apps/cli/src/commands/dashboard.ts +0 -55
  277. package/apps/cli/src/commands/diff.ts +0 -30
  278. package/apps/cli/src/commands/evaluate.ts +0 -133
  279. package/apps/cli/src/commands/examples.ts +0 -39
  280. package/apps/cli/src/commands/export.ts +0 -89
  281. package/apps/cli/src/commands/impact.ts +0 -31
  282. package/apps/cli/src/commands/init.ts +0 -69
  283. package/apps/cli/src/commands/inspect.ts +0 -30
  284. package/apps/cli/src/commands/mcp.ts +0 -72
  285. package/apps/cli/src/commands/pitfalls.ts +0 -38
  286. package/apps/cli/src/commands/recipes.ts +0 -35
  287. package/apps/cli/src/commands/search.ts +0 -48
  288. package/apps/cli/src/commands/update.ts +0 -73
  289. package/apps/cli/src/commands/verify.ts +0 -48
  290. package/apps/cli/src/formatters/colors.ts +0 -23
  291. package/apps/cli/src/formatters/inspection.ts +0 -102
  292. package/apps/cli/src/formatters/knowledge.ts +0 -272
  293. package/apps/cli/src/formatters/retrieval.ts +0 -74
  294. package/apps/cli/src/formatters/verification.ts +0 -126
  295. package/apps/cli/src/index.ts +0 -409
  296. package/packages/core/src/dashboard/server.ts +0 -314
  297. package/packages/core/src/implementation-service.ts +0 -451
  298. package/packages/core/src/inspector.ts +0 -71
  299. package/packages/core/src/pipeline.ts +0 -331
  300. package/packages/crawler/src/config.ts +0 -12
  301. package/packages/crawler/src/fetcher.ts +0 -185
  302. package/packages/discovery/src/index.ts +0 -31
  303. package/packages/discovery/src/provider.ts +0 -47
  304. package/packages/discovery/src/providers/generic.ts +0 -98
  305. package/packages/discovery/src/providers/github.ts +0 -61
  306. package/packages/discovery/src/providers/llms-txt.ts +0 -73
  307. package/packages/discovery/src/providers/markdown.ts +0 -48
  308. package/packages/discovery/src/providers/openapi.ts +0 -91
  309. package/packages/discovery/src/providers/sitemap.ts +0 -62
  310. package/packages/discovery/src/providers/skill.ts +0 -54
  311. package/packages/discovery/src/ranker.ts +0 -123
  312. package/packages/evaluation/src/dataset.ts +0 -963
  313. package/packages/evaluation/src/runner.ts +0 -241
  314. package/packages/evaluation/src/strategies/context7-runner.ts +0 -269
  315. package/packages/evaluation/src/strategies/docorbit-runner.ts +0 -228
  316. package/packages/evaluation/src/strategies/firecrawl-runner.ts +0 -172
  317. package/packages/evaluation/src/strategies/web-search-runner.ts +0 -194
  318. package/packages/evaluation/src/types.ts +0 -34
  319. package/packages/evaluation/src/version-matcher.ts +0 -73
  320. package/packages/export/src/agents-md.ts +0 -200
  321. package/packages/export/src/claude-md.ts +0 -141
  322. package/packages/export/src/docs-map.ts +0 -150
  323. package/packages/export/src/llms-txt.ts +0 -96
  324. package/packages/export/src/service.ts +0 -250
  325. package/packages/export/src/skill-md.ts +0 -128
  326. package/packages/mcp/src/resources/index.ts +0 -189
  327. package/packages/mcp/src/server.ts +0 -278
  328. package/packages/mcp/src/tools/analyze-impact.ts +0 -74
  329. package/packages/mcp/src/tools/check-api.ts +0 -86
  330. package/packages/mcp/src/tools/diff-docs.ts +0 -68
  331. package/packages/mcp/src/tools/export-context.ts +0 -73
  332. package/packages/mcp/src/tools/find-api.ts +0 -99
  333. package/packages/mcp/src/tools/find-example.ts +0 -100
  334. package/packages/mcp/src/tools/find-pitfall.ts +0 -94
  335. package/packages/mcp/src/tools/find-recipe.ts +0 -98
  336. package/packages/mcp/src/tools/get-doc.ts +0 -130
  337. package/packages/mcp/src/tools/get-docs-map.ts +0 -64
  338. package/packages/mcp/src/tools/get-version.ts +0 -118
  339. package/packages/mcp/src/tools/implementation-context.ts +0 -88
  340. package/packages/mcp/src/tools/index.ts +0 -59
  341. package/packages/mcp/src/tools/list-sources.ts +0 -85
  342. package/packages/mcp/src/tools/search-docs.ts +0 -123
  343. package/packages/mcp/src/tools/types.ts +0 -28
  344. package/packages/mcp/src/transports/http.ts +0 -256
  345. package/packages/mcp/src/transports/stdio.ts +0 -105
  346. package/packages/mcp/src/types.ts +0 -102
  347. package/packages/normalizer/src/example-indexer.ts +0 -240
  348. package/packages/normalizer/src/html.ts +0 -253
  349. package/packages/normalizer/src/llms.ts +0 -83
  350. package/packages/normalizer/src/openapi/endpoint-parser.ts +0 -406
  351. package/packages/normalizer/src/openapi/schema-resolver.ts +0 -111
  352. package/packages/normalizer/src/page.ts +0 -184
  353. package/packages/normalizer/src/pitfall-extractor.ts +0 -190
  354. package/packages/normalizer/src/slicer.ts +0 -455
  355. package/packages/retrieval/src/engine.ts +0 -120
  356. package/packages/retrieval/src/intent.ts +0 -43
  357. package/packages/retrieval/src/packer.ts +0 -145
  358. package/packages/retrieval/src/recipe-engine.ts +0 -313
  359. package/packages/retrieval/src/scorer.ts +0 -139
  360. package/packages/retrieval/src/weights.ts +0 -31
  361. package/packages/security/src/annotations.ts +0 -112
  362. package/packages/security/src/ssrf.ts +0 -153
  363. package/packages/shared/src/errors.ts +0 -53
  364. package/packages/shared/src/hashing.ts +0 -23
  365. package/packages/shared/src/types.ts +0 -881
  366. package/packages/storage/src/db.ts +0 -72
  367. package/packages/storage/src/interfaces.ts +0 -115
  368. package/packages/storage/src/repositories/api-repository.ts +0 -219
  369. package/packages/storage/src/repositories/chunk-repository.ts +0 -316
  370. package/packages/storage/src/repositories/example-repository.ts +0 -206
  371. package/packages/storage/src/repositories/page-repository.ts +0 -205
  372. package/packages/storage/src/repositories/pitfall-repository.ts +0 -188
  373. package/packages/storage/src/repositories/source-repository.ts +0 -205
  374. package/packages/storage/src/repository.ts +0 -256
  375. package/packages/storage/src/search-tokens.ts +0 -28
  376. package/packages/verification/src/diff-engine.ts +0 -258
  377. package/packages/verification/src/extractor.ts +0 -339
  378. package/packages/verification/src/impact-scanner.ts +0 -203
  379. package/packages/verification/src/services.ts +0 -238
  380. package/packages/verification/src/verifier.ts +0 -375
  381. package/packages/workspace/src/detector.ts +0 -143
  382. package/packages/workspace/src/ecosystems/cargo.ts +0 -84
  383. package/packages/workspace/src/ecosystems/composer.ts +0 -42
  384. package/packages/workspace/src/ecosystems/go.ts +0 -54
  385. package/packages/workspace/src/ecosystems/maven.ts +0 -34
  386. package/packages/workspace/src/ecosystems/npm.ts +0 -83
  387. package/packages/workspace/src/ecosystems/pub.ts +0 -40
  388. package/packages/workspace/src/ecosystems/pypi.ts +0 -100
  389. package/packages/workspace/src/ecosystems/rubygems.ts +0 -30
  390. package/packages/workspace/src/ecosystems/types.ts +0 -18
  391. package/packages/workspace/src/lockfile.ts +0 -194
  392. package/packages/workspace/src/resolver.ts +0 -234
  393. package/packages/workspace/src/semver.ts +0 -259
  394. /package/{packages/crawler/src/index.ts → dist/packages/crawler/src/index.d.ts} +0 -0
  395. /package/{packages/evaluation/src/index.ts → dist/packages/evaluation/src/index.d.ts} +0 -0
  396. /package/{packages/export/src/index.ts → dist/packages/export/src/index.d.ts} +0 -0
  397. /package/{packages/normalizer/src/openapi.ts → dist/packages/normalizer/src/openapi.d.ts} +0 -0
  398. /package/{packages/security/src/index.ts → dist/packages/security/src/index.d.ts} +0 -0
  399. /package/{packages/shared/src/index.ts → dist/packages/shared/src/index.d.ts} +0 -0
  400. /package/{packages/storage/src/index.ts → dist/packages/storage/src/index.d.ts} +0 -0
  401. /package/{packages/verification/src/index.ts → dist/packages/verification/src/index.d.ts} +0 -0
  402. /package/{packages/workspace/src/index.ts → dist/packages/workspace/src/index.d.ts} +0 -0
@@ -0,0 +1,944 @@
1
+ export const BENCHMARK_DATASET = [
2
+ // ==========================================
3
+ // TRAIN / DEVELOPMENT SPLIT (4 tasks)
4
+ // ==========================================
5
+ {
6
+ id: 'train_nextjs_14_route_sync',
7
+ split: 'train',
8
+ title: 'Next.js 14 Synchronous Dynamic Route Parameters',
9
+ ecosystem: 'typescript',
10
+ library: 'next',
11
+ targetVersion: '14.2.5',
12
+ taskPrompt: 'Implement dynamic route parameter handling in Next.js 14 App Router GET handler',
13
+ docsUrl: 'https://nextjs.org/docs/14/app/api-reference/file-conventions/route',
14
+ workspaceFiles: {
15
+ 'package.json': JSON.stringify({
16
+ name: 'my-next-app',
17
+ dependencies: {
18
+ next: '^14.2.0',
19
+ react: '^18.2.0',
20
+ },
21
+ }, null, 2),
22
+ },
23
+ docs: [
24
+ {
25
+ url: 'https://nextjs.org/docs/14/routing',
26
+ title: 'Next.js 14 App Router: Route Handlers and Params',
27
+ version: '14.2.5',
28
+ content: `# Next.js 14 Route Handlers
29
+ In Next.js 14, Route Handlers receive context with synchronous parameters:
30
+ \`export async function GET(request: Request, { params }: { params: { id: string } })\`.
31
+ The params object is a plain synchronous object: \`const id = params.id;\`.
32
+ Do not await params in Next.js 14.`,
33
+ },
34
+ {
35
+ url: 'https://nextjs.org/docs/15/routing',
36
+ title: 'Next.js 15 Asynchronous Route Parameters Breaking Change',
37
+ version: '15.0.0',
38
+ content: `# Next.js 15 Async Dynamic Route Parameters
39
+ Breaking Change: In Next.js 15, route handler parameters are asynchronous Promises.
40
+ Must use: \`const { id } = await params;\`. Accessing properties synchronously causes a runtime warning/error.`,
41
+ },
42
+ ],
43
+ groundTruth: {
44
+ expectedVersion: '14.2.5',
45
+ expectedApi: {
46
+ symbol: 'GET',
47
+ path: '/api/users/[id]',
48
+ },
49
+ fatalPitfalls: ['await params in Next.js 14 is unnecessary and params is synchronous'],
50
+ validCode: `export async function GET(request: Request, { params }: { params: { id: string } }) {
51
+ const userId = params.id;
52
+ return Response.json({ id: userId });
53
+ }`,
54
+ invalidCode: {
55
+ snippet: `export async function GET(request: Request, { params }: { params: Promise<{ id: string }> }) {
56
+ const { id } = await params;
57
+ return Response.json({ id });
58
+ }`,
59
+ expectedRule: 'version_mismatch',
60
+ },
61
+ dynamicCode: `export async function GET(req: Request, ctx: any) {
62
+ const field = eval("ctx.params.id");
63
+ return Response.json({ field });
64
+ }`,
65
+ },
66
+ },
67
+ {
68
+ id: 'train_stripe_v1_charges',
69
+ split: 'train',
70
+ title: 'Stripe Legacy Charges Direct Payment',
71
+ ecosystem: 'javascript',
72
+ library: 'stripe',
73
+ targetVersion: '12.18.0',
74
+ taskPrompt: 'Create a direct credit card charge with Stripe API legacy charges endpoint',
75
+ docsUrl: 'https://stripe.com/docs/api/charges/create',
76
+ workspaceFiles: {
77
+ 'package.json': JSON.stringify({
78
+ name: 'legacy-store',
79
+ dependencies: {
80
+ stripe: '^12.0.0',
81
+ },
82
+ }, null, 2),
83
+ },
84
+ docs: [
85
+ {
86
+ url: 'https://stripe.com/docs/api/charges',
87
+ title: 'Stripe API: Charges Resource',
88
+ version: '12.18.0',
89
+ content: `# Charges API
90
+ POST /v1/charges
91
+ Creates a new charge object.
92
+ Required parameters:
93
+ - amount: integer (required)
94
+ - currency: string (required)
95
+ - source: string (required token or card ID)`,
96
+ },
97
+ ],
98
+ groundTruth: {
99
+ expectedVersion: '12.18.0',
100
+ expectedApi: {
101
+ method: 'POST',
102
+ path: '/v1/charges',
103
+ requiredParams: ['amount', 'currency'],
104
+ },
105
+ fatalPitfalls: ['Do not omit amount or currency when creating a charge'],
106
+ validCode: `const charge = await stripe.charges.create({
107
+ amount: 2000,
108
+ currency: 'usd',
109
+ source: 'tok_visa'
110
+ });`,
111
+ invalidCode: {
112
+ snippet: `const charge = await stripe.charges.create({
113
+ currency: 'usd',
114
+ source: 'tok_visa'
115
+ });`,
116
+ expectedRule: 'required_parameters',
117
+ },
118
+ dynamicCode: `const fn = stripe['charges']['create'];
119
+ await fn({ amount: 1000, currency: 'usd' });`,
120
+ },
121
+ },
122
+ {
123
+ id: 'train_pydantic_v1_validator',
124
+ split: 'train',
125
+ title: 'Pydantic v1 Custom Field Validator',
126
+ ecosystem: 'python',
127
+ library: 'pydantic',
128
+ targetVersion: '1.10.12',
129
+ taskPrompt: 'Validate age field using Pydantic v1 validator decorator',
130
+ docsUrl: 'https://docs.pydantic.dev/1.10/usage/validators/',
131
+ workspaceFiles: {
132
+ 'pyproject.toml': `[tool.poetry.dependencies]\npython = "^3.10"\npydantic = "^1.10.0"\n`,
133
+ },
134
+ docs: [
135
+ {
136
+ url: 'https://docs.pydantic.dev/1.10/usage/validators/',
137
+ title: 'Pydantic 1.10 Validators',
138
+ version: '1.10.12',
139
+ content: `# Pydantic 1.x Validators
140
+ Use @validator decorator with pre=True/False.
141
+ Example:
142
+ \`\`\`python
143
+ from pydantic import BaseModel, validator
144
+ class User(BaseModel):
145
+ age: int
146
+ @validator('age')
147
+ def check_age(cls, v):
148
+ if v < 0: raise ValueError('Age cannot be negative')
149
+ return v
150
+ \`\`\``,
151
+ },
152
+ ],
153
+ groundTruth: {
154
+ expectedVersion: '1.10.12',
155
+ expectedApi: {
156
+ symbol: 'validator',
157
+ },
158
+ fatalPitfalls: ['@field_validator is not supported in Pydantic 1.x; use @validator'],
159
+ validCode: `from pydantic import BaseModel, validator
160
+ class User(BaseModel):
161
+ age: int
162
+ @validator('age')
163
+ def validate_age(cls, v):
164
+ if v < 0: raise ValueError('invalid age')
165
+ return v`,
166
+ invalidCode: {
167
+ snippet: `from pydantic import BaseModel, field_validator
168
+ class User(BaseModel):
169
+ age: int
170
+ @field_validator('age')
171
+ @classmethod
172
+ def validate_age(cls, v): return v`,
173
+ expectedRule: 'version_mismatch',
174
+ },
175
+ dynamicCode: `def make_validator():
176
+ return getattr(__import__('pydantic'), 'validator')('age')`,
177
+ },
178
+ },
179
+ {
180
+ id: 'train_fastapi_095_sync_dep',
181
+ split: 'train',
182
+ title: 'FastAPI 0.95 Database Dependency Injection',
183
+ ecosystem: 'python',
184
+ library: 'fastapi',
185
+ targetVersion: '0.95.2',
186
+ taskPrompt: 'Inject database session in FastAPI 0.95 endpoint using Depends',
187
+ docsUrl: 'https://fastapi.tiangolo.com/tutorial/dependencies/',
188
+ workspaceFiles: {
189
+ 'pyproject.toml': `[tool.poetry.dependencies]\npython = "^3.10"\nfastapi = "^0.95.0"\n`,
190
+ },
191
+ docs: [
192
+ {
193
+ url: 'https://fastapi.tiangolo.com/0.95/dependencies/',
194
+ title: 'FastAPI Dependencies with yield',
195
+ version: '0.95.2',
196
+ content: `# FastAPI Dependencies
197
+ Use \`Depends(get_db)\` where get_db yields a database session and closes it in a finally block.`,
198
+ },
199
+ ],
200
+ groundTruth: {
201
+ expectedVersion: '0.95.2',
202
+ expectedApi: {
203
+ symbol: 'Depends',
204
+ },
205
+ fatalPitfalls: ['Ensure DB connection closes after yield in generator dependency'],
206
+ validCode: `from fastapi import FastAPI, Depends
207
+ app = FastAPI()
208
+ def get_db():
209
+ db = SessionLocal()
210
+ try: yield db
211
+ finally: db.close()
212
+ @app.get('/items')
213
+ def read_items(db = Depends(get_db)):
214
+ return db.query(Item).all()`,
215
+ invalidCode: {
216
+ snippet: `@app.get('/items')
217
+ def read_items(db = get_db()): # Missing Depends wrapper
218
+ return db.query(Item).all()`,
219
+ expectedRule: 'parameter_misconfiguration',
220
+ },
221
+ },
222
+ },
223
+ // ==========================================
224
+ // HELD-OUT EVALUATION SPLIT (6 tasks)
225
+ // ==========================================
226
+ {
227
+ id: 'eval_nextjs_15_async_params',
228
+ split: 'eval',
229
+ title: 'Next.js 15 Async Dynamic Route Parameters Breaking Change',
230
+ ecosystem: 'typescript',
231
+ library: 'next',
232
+ targetVersion: '15.0.3',
233
+ taskPrompt: 'Implement dynamic route parameter handling in Next.js 15 App Router GET route handler',
234
+ docsUrl: 'https://nextjs.org/docs/app/api-reference/file-conventions/route',
235
+ workspaceFiles: {
236
+ 'package.json': JSON.stringify({
237
+ name: 'modern-next15',
238
+ dependencies: {
239
+ next: '^15.0.0',
240
+ react: '^19.0.0',
241
+ },
242
+ }, null, 2),
243
+ },
244
+ docs: [
245
+ {
246
+ url: 'https://nextjs.org/docs/15/routing',
247
+ title: 'Next.js 15 Asynchronous Route Parameters',
248
+ version: '15.0.3',
249
+ content: `# Next.js 15 Dynamic Route Parameters
250
+ Breaking change in Next.js 15: \`params\` in Page and Route Handlers is now an asynchronous Promise.
251
+ You must use: \`const { id } = await params;\`.
252
+ Accessing \`params.id\` directly without await is deprecated and throws runtime errors in production.`,
253
+ },
254
+ ],
255
+ groundTruth: {
256
+ expectedVersion: '15.0.3',
257
+ expectedApi: {
258
+ symbol: 'GET',
259
+ path: '/api/items/[id]',
260
+ },
261
+ fatalPitfalls: ['Do not access params synchronously in Next.js 15; it is a Promise that must be awaited'],
262
+ validCode: `export async function GET(request: Request, { params }: { params: Promise<{ id: string }> }) {
263
+ const { id } = await params;
264
+ return Response.json({ id });
265
+ }`,
266
+ invalidCode: {
267
+ snippet: `export async function GET(request: Request, { params }: { params: { id: string } }) {
268
+ const id = params.id;
269
+ return Response.json({ id });
270
+ }`,
271
+ expectedRule: 'version_mismatch',
272
+ },
273
+ dynamicCode: `export async function GET(req: Request, ctx: any) {
274
+ const p = await (ctx['params']);
275
+ return Response.json(p);
276
+ }`,
277
+ },
278
+ },
279
+ {
280
+ id: 'eval_stripe_payment_intents_2024',
281
+ split: 'eval',
282
+ title: 'Stripe Modern Payment Intents Creation',
283
+ ecosystem: 'typescript',
284
+ library: 'stripe',
285
+ targetVersion: '16.12.0',
286
+ taskPrompt: 'Create a Stripe Payment Intent with automatic payment methods enabled',
287
+ docsUrl: 'https://stripe.com/docs/api/payment_intents/create',
288
+ workspaceFiles: {
289
+ 'package.json': JSON.stringify({
290
+ name: 'modern-payments',
291
+ dependencies: {
292
+ stripe: '^16.0.0',
293
+ },
294
+ }, null, 2),
295
+ },
296
+ docs: [
297
+ {
298
+ url: 'https://stripe.com/docs/api/payment_intents',
299
+ title: 'Stripe API: Payment Intents Resource',
300
+ version: '16.12.0',
301
+ content: `# Payment Intents API
302
+ POST /v1/payment_intents
303
+ Creates a PaymentIntent object.
304
+ Required parameters:
305
+ - amount: integer (required)
306
+ - currency: string (required)
307
+ Recommended:
308
+ - automatic_payment_methods: object with enabled: boolean
309
+ Notice: Direct charges via /v1/charges are deprecated for standard checkout.`,
310
+ },
311
+ ],
312
+ groundTruth: {
313
+ expectedVersion: '16.12.0',
314
+ expectedApi: {
315
+ method: 'POST',
316
+ path: '/v1/payment_intents',
317
+ requiredParams: ['amount', 'currency'],
318
+ },
319
+ fatalPitfalls: ['Do not use /v1/charges in modern Stripe integrations; use /v1/payment_intents'],
320
+ validCode: `const intent = await stripe.paymentIntents.create({
321
+ amount: 5000,
322
+ currency: 'usd',
323
+ automatic_payment_methods: { enabled: true }
324
+ });`,
325
+ invalidCode: {
326
+ snippet: `const intent = await stripe.paymentIntents.create({
327
+ amount: 5000
328
+ });`,
329
+ expectedRule: 'required_parameters',
330
+ },
331
+ dynamicCode: `const res = await stripe[Math.random() > 0 ? 'paymentIntents' : 'charges'].create({ amount: 100 });`,
332
+ },
333
+ },
334
+ {
335
+ id: 'eval_pydantic_v2_field_validator',
336
+ split: 'eval',
337
+ title: 'Pydantic v2 Migration: field_validator Replacement',
338
+ ecosystem: 'python',
339
+ library: 'pydantic',
340
+ targetVersion: '2.6.0',
341
+ taskPrompt: 'Implement custom field validation for email field in Pydantic v2',
342
+ docsUrl: 'https://docs.pydantic.dev/latest/concepts/validators/',
343
+ workspaceFiles: {
344
+ 'pyproject.toml': `[tool.poetry.dependencies]\npython = "^3.11"\npydantic = "^2.6.0"\n`,
345
+ },
346
+ docs: [
347
+ {
348
+ url: 'https://docs.pydantic.dev/2.6/migration/',
349
+ title: 'Pydantic 2.6 Migration Guide: @validator to @field_validator',
350
+ version: '2.6.0',
351
+ content: `# Pydantic V2 Migration
352
+ Breaking change: @validator is deprecated in V2.
353
+ Replace with @field_validator('fieldname', mode='before'|'after') combined with @classmethod.
354
+ Example:
355
+ \`\`\`python
356
+ from pydantic import BaseModel, field_validator
357
+ class User(BaseModel):
358
+ email: str
359
+ @field_validator('email', mode='before')
360
+ @classmethod
361
+ def lower_email(cls, v: str) -> str:
362
+ return v.lower()
363
+ \`\`\``,
364
+ },
365
+ ],
366
+ groundTruth: {
367
+ expectedVersion: '2.6.0',
368
+ expectedApi: {
369
+ symbol: 'field_validator',
370
+ },
371
+ fatalPitfalls: ['@validator is removed/deprecated in Pydantic v2; use @field_validator with @classmethod'],
372
+ validCode: `from pydantic import BaseModel, field_validator
373
+ class User(BaseModel):
374
+ email: str
375
+ @field_validator('email', mode='before')
376
+ @classmethod
377
+ def validate_email(cls, v: str) -> str:
378
+ if '@' not in v: raise ValueError('invalid email')
379
+ return v.lower()`,
380
+ invalidCode: {
381
+ snippet: `from pydantic import BaseModel, validator
382
+ class User(BaseModel):
383
+ email: str
384
+ @validator('email') # Deprecated in v2
385
+ def validate_email(cls, v): return v`,
386
+ expectedRule: 'deprecation',
387
+ },
388
+ dynamicCode: `validator_decorator = getattr(__import__('pydantic'), 'field_validator')`,
389
+ },
390
+ },
391
+ {
392
+ id: 'eval_fastapi_100_lifespan',
393
+ split: 'eval',
394
+ title: 'FastAPI 0.100+ Lifespan Handler Deprecation of on_event',
395
+ ecosystem: 'python',
396
+ library: 'fastapi',
397
+ targetVersion: '0.110.0',
398
+ taskPrompt: 'Manage application startup and shutdown events using FastAPI modern lifespan context manager',
399
+ docsUrl: 'https://fastapi.tiangolo.com/advanced/events/',
400
+ workspaceFiles: {
401
+ 'pyproject.toml': `[tool.poetry.dependencies]\npython = "^3.11"\nfastapi = "^0.110.0"\n`,
402
+ },
403
+ docs: [
404
+ {
405
+ url: 'https://fastapi.tiangolo.com/advanced/events/',
406
+ title: 'FastAPI Lifespan Events',
407
+ version: '0.110.0',
408
+ content: `# FastAPI Lifespan Events
409
+ In FastAPI 0.100+, \`@app.on_event('startup')\` and \`@app.on_event('shutdown')\` are deprecated.
410
+ Use the \`lifespan\` async context manager parameter on \`FastAPI(lifespan=...)\`.
411
+ Example:
412
+ \`\`\`python
413
+ from contextlib import asynccontextmanager
414
+ from fastapi import FastAPI
415
+ @asynccontextmanager
416
+ async def lifespan(app: FastAPI):
417
+ yield
418
+ app = FastAPI(lifespan=lifespan)
419
+ \`\`\``,
420
+ },
421
+ ],
422
+ groundTruth: {
423
+ expectedVersion: '0.110.0',
424
+ expectedApi: {
425
+ symbol: 'lifespan',
426
+ },
427
+ fatalPitfalls: ['@app.on_event is deprecated; use asynccontextmanager lifespan parameter'],
428
+ validCode: `from contextlib import asynccontextmanager
429
+ from fastapi import FastAPI
430
+
431
+ @asynccontextmanager
432
+ async def lifespan(app: FastAPI):
433
+ # Startup tasks
434
+ yield
435
+ # Shutdown tasks
436
+
437
+ app = FastAPI(lifespan=lifespan)`,
438
+ invalidCode: {
439
+ snippet: `from fastapi import FastAPI
440
+ app = FastAPI()
441
+ @app.on_event('startup') # Deprecated in FastAPI 0.100+
442
+ async def startup_event(): pass`,
443
+ expectedRule: 'deprecation',
444
+ },
445
+ },
446
+ },
447
+ {
448
+ id: 'eval_tokio_postgres_07',
449
+ split: 'eval',
450
+ title: 'Tokio-Postgres 0.7 Asynchronous Connection and Query Execution',
451
+ ecosystem: 'rust',
452
+ library: 'tokio-postgres',
453
+ targetVersion: '0.7.10',
454
+ taskPrompt: 'Connect asynchronously to Postgres and spawn the connection worker task in Tokio',
455
+ docsUrl: 'https://docs.rs/tokio-postgres/0.7.10/tokio_postgres/',
456
+ workspaceFiles: {
457
+ 'Cargo.toml': `[package]\nname = "rust-pg"\nversion = "0.1.0"\n\n[dependencies]\ntokio = { version = "1.36", features = ["full"] }\ntokio-postgres = "0.7.10"\n`,
458
+ },
459
+ docs: [
460
+ {
461
+ url: 'https://docs.rs/tokio-postgres/0.7.10/tokio_postgres/',
462
+ title: 'tokio_postgres 0.7.10 Documentation',
463
+ version: '0.7.10',
464
+ content: `# tokio_postgres
465
+ The connect function returns a client and a Connection object.
466
+ The connection object must be spawned onto an executor (tokio::spawn) to drive network I/O.
467
+ Example:
468
+ \`\`\`rust
469
+ let (client, connection) = tokio_postgres::connect("host=localhost user=postgres", NoTls).await?;
470
+ tokio::spawn(async move {
471
+ if let Err(e) = connection.await {
472
+ eprintln!("connection error: {}", e);
473
+ }
474
+ });
475
+ \`\`\``,
476
+ },
477
+ ],
478
+ groundTruth: {
479
+ expectedVersion: '0.7.10',
480
+ expectedApi: {
481
+ symbol: 'connect',
482
+ },
483
+ fatalPitfalls: ['Connection object must be spawned onto Tokio runtime or queries will hang indefinitely'],
484
+ validCode: `let (client, connection) = tokio_postgres::connect("host=localhost user=postgres", tokio_postgres::NoTls).await?;
485
+ tokio::spawn(async move {
486
+ if let Err(e) = connection.await {
487
+ eprintln!("connection error: {}", e);
488
+ }
489
+ });
490
+ let rows = client.query("SELECT id, name FROM users", &[]).await?;`,
491
+ invalidCode: {
492
+ snippet: `let (client, connection) = tokio_postgres::connect("host=localhost user=postgres", tokio_postgres::NoTls).await?;
493
+ // Forgot tokio::spawn(connection) - queries will block indefinitely!
494
+ let rows = client.query("SELECT id, name FROM users", &[]).await?;`,
495
+ expectedRule: 'concurrency_deadlock',
496
+ },
497
+ },
498
+ },
499
+ {
500
+ id: 'eval_gin_gonic_v19',
501
+ split: 'eval',
502
+ title: 'Gin Gonic v1.9 JSON Binding via ShouldBindJSON',
503
+ ecosystem: 'go',
504
+ library: 'github.com/gin-gonic/gin',
505
+ targetVersion: '1.9.1',
506
+ taskPrompt: 'Bind and validate incoming JSON request payload in Gin route handler',
507
+ docsUrl: 'https://gin-gonic.com/docs/examples/binding-and-validation/',
508
+ workspaceFiles: {
509
+ 'go.mod': `module myapi\n\ngo 1.21\n\nrequire github.com/gin-gonic/gin v1.9.1\n`,
510
+ },
511
+ docs: [
512
+ {
513
+ url: 'https://gin-gonic.com/docs/examples/binding-and-validation/',
514
+ title: 'Gin Model Binding and Validation',
515
+ version: '1.9.1',
516
+ content: `# Gin JSON Binding
517
+ In Gin 1.9+, use \`c.ShouldBindJSON(&obj)\` to parse request body into a struct.
518
+ \`c.BindWith\` is deprecated and sets HTTP 400 automatically without programmatic recovery.
519
+ \`ShouldBindJSON\` allows custom error formatting.`,
520
+ },
521
+ ],
522
+ groundTruth: {
523
+ expectedVersion: '1.9.1',
524
+ expectedApi: {
525
+ symbol: 'ShouldBindJSON',
526
+ },
527
+ fatalPitfalls: ['Do not use deprecated BindWith; use ShouldBindJSON for custom error responses'],
528
+ validCode: `func HandleCreate(c *gin.Context) {
529
+ var req CreateRequest
530
+ if err := c.ShouldBindJSON(&req); err != nil {
531
+ c.JSON(http.StatusBadRequest, gin.H{"error": err.Error()})
532
+ return
533
+ }
534
+ c.JSON(http.StatusOK, gin.H{"status": "ok"})
535
+ }`,
536
+ invalidCode: {
537
+ snippet: `func HandleCreate(c *gin.Context) {
538
+ var req CreateRequest
539
+ c.BindWith(&req, binding.JSON) // Deprecated BindWith
540
+ }`,
541
+ expectedRule: 'deprecation',
542
+ },
543
+ },
544
+ },
545
+ // ==========================================
546
+ // DEDICATED VERIFICATION SPLIT (7 tasks)
547
+ // Intentionally incorrect generated code testing:
548
+ // - wrong endpoint
549
+ // - wrong HTTP method
550
+ // - missing required parameter
551
+ // - deprecated API
552
+ // - removed API
553
+ // - version mismatch
554
+ // - dynamic/ambiguous code
555
+ // ==========================================
556
+ {
557
+ id: 'verify_wrong_endpoint',
558
+ split: 'verification',
559
+ title: 'Verification: Non-Existent Endpoint Detection',
560
+ ecosystem: 'javascript',
561
+ library: 'stripe',
562
+ targetVersion: 'v14',
563
+ verificationCategory: 'wrong_endpoint',
564
+ taskPrompt: 'Verify detection of non-existent API endpoint',
565
+ docsUrl: 'https://docs.stripe.com/api',
566
+ workspaceFiles: {
567
+ 'package.json': JSON.stringify({ name: 'stripe-test', dependencies: { stripe: '^14.0.0' } }, null, 2),
568
+ },
569
+ docs: [
570
+ {
571
+ url: 'https://docs.stripe.com/api',
572
+ title: 'Stripe API Reference',
573
+ version: 'v14',
574
+ content: '# Stripe API v14\nPOST /v1/webhook_endpoints\nCreate a webhook endpoint.',
575
+ },
576
+ ],
577
+ endpoints: [
578
+ {
579
+ id: 'ep_v1_wh',
580
+ pageId: 'p_wh',
581
+ snapshotId: 'snap_v14',
582
+ method: 'post',
583
+ path: '/v1/webhook_endpoints',
584
+ summary: 'Create webhook endpoint',
585
+ parameters: [{ name: 'url', in: 'query', required: true, type: 'string' }],
586
+ docVersion: 'v14',
587
+ },
588
+ ],
589
+ groundTruth: {
590
+ expectedVersion: 'v14',
591
+ expectedApi: { symbol: 'webhook_endpoints', path: '/v1/webhook_endpoints' },
592
+ fatalPitfalls: ['Endpoint does not exist'],
593
+ validCode: `const res = await fetch('https://api.stripe.com/v1/webhook_endpoints', {
594
+ method: 'POST',
595
+ body: JSON.stringify({ url: 'https://example.com/wh', enabled_events: ['charge.failed'] })
596
+ });`,
597
+ invalidCode: {
598
+ snippet: `fetch('https://api.stripe.com/v1/non_existent_portal_endpoint', { method: 'POST' });`,
599
+ expectedRule: 'endpoint_validity',
600
+ },
601
+ },
602
+ },
603
+ {
604
+ id: 'verify_wrong_http_method',
605
+ split: 'verification',
606
+ title: 'Verification: Unsupported HTTP Method Detection',
607
+ ecosystem: 'javascript',
608
+ library: 'stripe',
609
+ targetVersion: 'v14',
610
+ verificationCategory: 'wrong_http_method',
611
+ taskPrompt: 'Verify detection of unsupported HTTP method on valid endpoint',
612
+ docsUrl: 'https://docs.stripe.com/api',
613
+ workspaceFiles: {
614
+ 'package.json': JSON.stringify({ name: 'stripe-test', dependencies: { stripe: '^14.0.0' } }, null, 2),
615
+ },
616
+ docs: [
617
+ {
618
+ url: 'https://docs.stripe.com/api',
619
+ title: 'Stripe API Reference',
620
+ version: 'v14',
621
+ content: '# Stripe API v14\nPOST /v1/webhook_endpoints\nCreate a webhook endpoint.',
622
+ },
623
+ ],
624
+ endpoints: [
625
+ {
626
+ id: 'ep_v2_wh',
627
+ pageId: 'p_wh',
628
+ snapshotId: 'snap_v14',
629
+ method: 'post',
630
+ path: '/v1/webhook_endpoints',
631
+ summary: 'Create webhook endpoint',
632
+ parameters: [{ name: 'url', in: 'query', required: true, type: 'string' }],
633
+ docVersion: 'v14',
634
+ },
635
+ ],
636
+ groundTruth: {
637
+ expectedVersion: 'v14',
638
+ expectedApi: { symbol: 'webhook_endpoints', path: '/v1/webhook_endpoints' },
639
+ fatalPitfalls: ['GET is not supported on /v1/webhook_endpoints'],
640
+ validCode: `const res = await fetch('https://api.stripe.com/v1/webhook_endpoints', {
641
+ method: 'POST',
642
+ body: JSON.stringify({ url: 'https://example.com/wh', enabled_events: ['charge.failed'] })
643
+ });`,
644
+ invalidCode: {
645
+ snippet: `fetch('https://api.stripe.com/v1/webhook_endpoints', { method: 'GET' });`,
646
+ expectedRule: 'method_validity',
647
+ },
648
+ },
649
+ },
650
+ {
651
+ id: 'verify_missing_required_param',
652
+ split: 'verification',
653
+ title: 'Verification: Missing Required Parameter Detection',
654
+ ecosystem: 'javascript',
655
+ library: 'stripe',
656
+ targetVersion: 'v14',
657
+ verificationCategory: 'missing_required_parameter',
658
+ taskPrompt: 'Verify detection of missing required request body parameters',
659
+ docsUrl: 'https://docs.stripe.com/api',
660
+ workspaceFiles: {
661
+ 'package.json': JSON.stringify({ name: 'stripe-test', dependencies: { stripe: '^14.0.0' } }, null, 2),
662
+ },
663
+ docs: [
664
+ {
665
+ url: 'https://docs.stripe.com/api',
666
+ title: 'Stripe API Reference',
667
+ version: 'v14',
668
+ content: '# Stripe API v14\nPOST /v1/webhook_endpoints\nRequires url and enabled_events.',
669
+ },
670
+ ],
671
+ endpoints: [
672
+ {
673
+ id: 'ep_v3_wh',
674
+ pageId: 'p_wh',
675
+ snapshotId: 'snap_v14',
676
+ method: 'post',
677
+ path: '/v1/webhook_endpoints',
678
+ summary: 'Create webhook endpoint',
679
+ parameters: [{ name: 'url', in: 'query', required: true, type: 'string' }],
680
+ requestSchema: {
681
+ type: 'object',
682
+ required: ['enabled_events'],
683
+ properties: {
684
+ url: { type: 'string' },
685
+ enabled_events: { type: 'array' },
686
+ },
687
+ },
688
+ docVersion: 'v14',
689
+ },
690
+ ],
691
+ groundTruth: {
692
+ expectedVersion: 'v14',
693
+ expectedApi: { symbol: 'webhook_endpoints', path: '/v1/webhook_endpoints' },
694
+ fatalPitfalls: ['Missing required body field enabled_events'],
695
+ validCode: `fetch('https://api.stripe.com/v1/webhook_endpoints', {
696
+ method: 'POST',
697
+ body: JSON.stringify({ url: 'https://example.com/wh', enabled_events: ['charge.failed'] })
698
+ });`,
699
+ invalidCode: {
700
+ snippet: `fetch('https://api.stripe.com/v1/webhook_endpoints', {
701
+ method: 'POST',
702
+ body: JSON.stringify({ url: 'https://example.com/wh' })
703
+ });`,
704
+ expectedRule: 'required_parameters',
705
+ },
706
+ },
707
+ },
708
+ {
709
+ id: 'verify_deprecated_api',
710
+ split: 'verification',
711
+ title: 'Verification: Deprecated API Detection',
712
+ ecosystem: 'javascript',
713
+ library: 'stripe',
714
+ targetVersion: 'v14',
715
+ verificationCategory: 'deprecated_api',
716
+ taskPrompt: 'Verify warning detection on deprecated API endpoints',
717
+ docsUrl: 'https://docs.stripe.com/api',
718
+ workspaceFiles: {
719
+ 'package.json': JSON.stringify({ name: 'stripe-test', dependencies: { stripe: '^14.0.0' } }, null, 2),
720
+ },
721
+ docs: [
722
+ {
723
+ url: 'https://docs.stripe.com/api',
724
+ title: 'Stripe API Reference',
725
+ version: 'v14',
726
+ content: '# Stripe API v14\nPOST /v1/charges\nDeprecated in favor of PaymentIntents.\nPOST /v1/payment_intents\nModern payment intents.',
727
+ },
728
+ ],
729
+ endpoints: [
730
+ {
731
+ id: 'ep_v4_charges',
732
+ pageId: 'p_charges',
733
+ snapshotId: 'snap_v14',
734
+ method: 'post',
735
+ path: '/v1/charges',
736
+ summary: 'Create charge (deprecated)',
737
+ deprecated: true,
738
+ docVersion: 'v14',
739
+ },
740
+ {
741
+ id: 'ep_v4_pi',
742
+ pageId: 'p_pi',
743
+ snapshotId: 'snap_v14',
744
+ method: 'post',
745
+ path: '/v1/payment_intents',
746
+ summary: 'Create payment intent',
747
+ deprecated: false,
748
+ docVersion: 'v14',
749
+ },
750
+ ],
751
+ pitfalls: [
752
+ {
753
+ id: 'pit_dep_charges',
754
+ pageId: 'p_charges',
755
+ snapshotId: 'snap_v14',
756
+ kind: 'deprecated',
757
+ title: 'Charges API Deprecated',
758
+ content: 'Use /v1/payment_intents instead of /v1/charges.',
759
+ relatedApi: '/v1/charges',
760
+ docVersion: 'v14',
761
+ createdAt: '2026-09-07T00:00:00Z',
762
+ },
763
+ ],
764
+ groundTruth: {
765
+ expectedVersion: 'v14',
766
+ expectedApi: { symbol: 'payment_intents', path: '/v1/payment_intents' },
767
+ fatalPitfalls: ['Charges API is deprecated'],
768
+ validCode: `fetch('https://api.stripe.com/v1/payment_intents', {
769
+ method: 'POST',
770
+ body: JSON.stringify({ amount: 2000, currency: 'usd' })
771
+ });`,
772
+ invalidCode: {
773
+ snippet: `fetch('https://api.stripe.com/v1/charges', {
774
+ method: 'POST',
775
+ body: JSON.stringify({ amount: 2000 })
776
+ });`,
777
+ expectedRule: 'deprecation',
778
+ },
779
+ },
780
+ },
781
+ {
782
+ id: 'verify_removed_api',
783
+ split: 'verification',
784
+ title: 'Verification: Removed API Endpoint Detection',
785
+ ecosystem: 'javascript',
786
+ library: 'stripe',
787
+ targetVersion: 'v14',
788
+ verificationCategory: 'removed_api',
789
+ taskPrompt: 'Verify error detection on removed legacy endpoints',
790
+ docsUrl: 'https://docs.stripe.com/api',
791
+ workspaceFiles: {
792
+ 'package.json': JSON.stringify({ name: 'stripe-test', dependencies: { stripe: '^14.0.0' } }, null, 2),
793
+ },
794
+ docs: [
795
+ {
796
+ url: 'https://docs.stripe.com/api',
797
+ title: 'Stripe API Reference',
798
+ version: 'v14',
799
+ content: '# Stripe API v14\nPOST /v1/payment_methods\nSources API has been removed.',
800
+ },
801
+ ],
802
+ endpoints: [
803
+ {
804
+ id: 'ep_v5_pm',
805
+ pageId: 'p_pm',
806
+ snapshotId: 'snap_v14',
807
+ method: 'post',
808
+ path: '/v1/payment_methods',
809
+ summary: 'Payment methods',
810
+ deprecated: false,
811
+ docVersion: 'v14',
812
+ },
813
+ // Note: /v1/sources exists in older snapshot v12, but was removed in v14
814
+ {
815
+ id: 'ep_v5_sources_legacy',
816
+ pageId: 'p_sources',
817
+ snapshotId: 'snap_v12',
818
+ method: 'post',
819
+ path: '/v1/sources',
820
+ summary: 'Sources (legacy v12)',
821
+ deprecated: true,
822
+ docVersion: 'v12',
823
+ },
824
+ ],
825
+ pitfalls: [
826
+ {
827
+ id: 'pit_rem_sources',
828
+ pageId: 'p_pm',
829
+ snapshotId: 'snap_v14',
830
+ kind: 'removed',
831
+ title: 'Sources API Removed in v14',
832
+ content: 'Endpoint /v1/sources was removed in API version v14; migrate to PaymentMethods.',
833
+ relatedApi: '/v1/sources',
834
+ docVersion: 'v14',
835
+ createdAt: '2026-09-07T00:00:00Z',
836
+ },
837
+ ],
838
+ groundTruth: {
839
+ expectedVersion: 'v14',
840
+ expectedApi: { symbol: 'payment_methods', path: '/v1/payment_methods' },
841
+ fatalPitfalls: ['/v1/sources was removed in v14'],
842
+ validCode: `fetch('https://api.stripe.com/v1/payment_methods', {
843
+ method: 'POST',
844
+ body: JSON.stringify({ type: 'card' })
845
+ });`,
846
+ invalidCode: {
847
+ snippet: `fetch('https://api.stripe.com/v1/sources', {
848
+ method: 'POST',
849
+ body: JSON.stringify({ type: 'card' })
850
+ });`,
851
+ expectedRule: 'removed_api',
852
+ },
853
+ },
854
+ },
855
+ {
856
+ id: 'verify_version_mismatch',
857
+ split: 'verification',
858
+ title: 'Verification: Version Syntax Conflict Detection (Next.js 14 sync vs 15 async)',
859
+ ecosystem: 'typescript',
860
+ library: 'next',
861
+ targetVersion: '14.2.0',
862
+ verificationCategory: 'version_mismatch',
863
+ taskPrompt: 'Verify detection of Next.js 15 async route parameters in a Next.js 14 project',
864
+ docsUrl: 'https://nextjs.org/docs/14/app/api-reference/file-conventions/route',
865
+ workspaceFiles: {
866
+ 'package.json': JSON.stringify({ name: 'next-app', dependencies: { next: '^14.2.0', react: '^18.2.0' } }, null, 2),
867
+ },
868
+ docs: [
869
+ {
870
+ url: 'https://nextjs.org/docs/14/routing',
871
+ title: 'Next.js 14 Routing',
872
+ version: '14.2.0',
873
+ content: '# Next.js 14 Route Handlers\nNext.js 14 parameters are synchronous.',
874
+ },
875
+ ],
876
+ groundTruth: {
877
+ expectedVersion: '14.2.0',
878
+ expectedApi: { symbol: 'GET', path: '/api/users/[id]' },
879
+ fatalPitfalls: ['Do not use await params in Next.js 14'],
880
+ validCode: `export default function Page({ params }: { params: { slug: string } }) {
881
+ const { slug } = params;
882
+ return <div>{slug}</div>;
883
+ }`,
884
+ invalidCode: {
885
+ snippet: `export default async function Page({ params }: { params: Promise<{ slug: string }> }) {
886
+ const { slug } = await params;
887
+ return <div>{slug}</div>;
888
+ }`,
889
+ expectedRule: 'version_mismatch',
890
+ },
891
+ },
892
+ },
893
+ {
894
+ id: 'verify_dynamic_ambiguous_code',
895
+ split: 'verification',
896
+ title: 'Verification: Dynamic / Ambiguous Expression Safe Fallback',
897
+ ecosystem: 'javascript',
898
+ library: 'stripe',
899
+ targetVersion: 'v14',
900
+ verificationCategory: 'dynamic_ambiguous_code',
901
+ taskPrompt: 'Verify dynamic expression returns insufficient_evidence without false rejections',
902
+ docsUrl: 'https://docs.stripe.com/api',
903
+ workspaceFiles: {
904
+ 'package.json': JSON.stringify({ name: 'stripe-test', dependencies: { stripe: '^14.0.0' } }, null, 2),
905
+ },
906
+ docs: [
907
+ {
908
+ url: 'https://docs.stripe.com/api',
909
+ title: 'Stripe API Reference',
910
+ version: 'v14',
911
+ content: '# Stripe API v14\nPOST /v1/webhook_endpoints',
912
+ },
913
+ ],
914
+ endpoints: [
915
+ {
916
+ id: 'ep_v7_wh',
917
+ pageId: 'p_wh',
918
+ snapshotId: 'snap_v14',
919
+ method: 'post',
920
+ path: '/v1/webhook_endpoints',
921
+ summary: 'Create webhook endpoint',
922
+ docVersion: 'v14',
923
+ },
924
+ ],
925
+ groundTruth: {
926
+ expectedVersion: 'v14',
927
+ expectedApi: { symbol: 'webhook_endpoints', path: '/v1/webhook_endpoints' },
928
+ fatalPitfalls: ['Dynamic URLs cannot be statically verified'],
929
+ validCode: `fetch('https://api.stripe.com/v1/webhook_endpoints', {
930
+ method: 'POST',
931
+ body: JSON.stringify({ url: 'https://example.com/wh', enabled_events: ['charge.failed'] })
932
+ });`,
933
+ invalidCode: {
934
+ snippet: `async function callDynamic(userSuppliedUrl: string) {
935
+ return fetch(userSuppliedUrl);
936
+ }`,
937
+ expectedRule: 'endpoint_validity',
938
+ },
939
+ dynamicCode: `async function callDynamic(userSuppliedUrl: string) {
940
+ return fetch(userSuppliedUrl);
941
+ }`,
942
+ },
943
+ },
944
+ ];