codenib 0.1.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 (451) hide show
  1. codenib-0.1.0/CHANGELOG.md +42 -0
  2. codenib-0.1.0/CONTRIBUTING.md +80 -0
  3. codenib-0.1.0/LICENSE +201 -0
  4. codenib-0.1.0/MANIFEST.in +12 -0
  5. codenib-0.1.0/PKG-INFO +293 -0
  6. codenib-0.1.0/README.md +199 -0
  7. codenib-0.1.0/codenib/__init__.py +62 -0
  8. codenib-0.1.0/codenib/__main__.py +7 -0
  9. codenib-0.1.0/codenib/_lazy.py +36 -0
  10. codenib-0.1.0/codenib/_version.py +26 -0
  11. codenib-0.1.0/codenib/agent/__init__.py +159 -0
  12. codenib-0.1.0/codenib/agent/agent_types.py +40 -0
  13. codenib-0.1.0/codenib/agent/boundary.py +129 -0
  14. codenib-0.1.0/codenib/agent/compile.py +219 -0
  15. codenib-0.1.0/codenib/agent/extract_agent.py +101 -0
  16. codenib-0.1.0/codenib/agent/harness.py +326 -0
  17. codenib-0.1.0/codenib/agent/history.py +242 -0
  18. codenib-0.1.0/codenib/agent/lsp_graph.py +878 -0
  19. codenib-0.1.0/codenib/agent/lsp_provider.py +484 -0
  20. codenib-0.1.0/codenib/agent/rerank_agent.py +419 -0
  21. codenib-0.1.0/codenib/agent/resource_guard.py +90 -0
  22. codenib-0.1.0/codenib/agent/route_context.py +391 -0
  23. codenib-0.1.0/codenib/agent/runner.py +2005 -0
  24. codenib-0.1.0/codenib/agent/runtime/__init__.py +16 -0
  25. codenib-0.1.0/codenib/agent/runtime/context.py +189 -0
  26. codenib-0.1.0/codenib/agent/runtime/trace.py +101 -0
  27. codenib-0.1.0/codenib/agent/skills/__init__.py +25 -0
  28. codenib-0.1.0/codenib/agent/skills/_graphnav.py +235 -0
  29. codenib-0.1.0/codenib/agent/skills/bm25_search/__init__.py +0 -0
  30. codenib-0.1.0/codenib/agent/skills/bm25_search/config.yaml +63 -0
  31. codenib-0.1.0/codenib/agent/skills/bm25_search/executor.py +80 -0
  32. codenib-0.1.0/codenib/agent/skills/bm25_search/skill.md +47 -0
  33. codenib-0.1.0/codenib/agent/skills/code_to_query/__init__.py +0 -0
  34. codenib-0.1.0/codenib/agent/skills/code_to_query/config.yaml +38 -0
  35. codenib-0.1.0/codenib/agent/skills/code_to_query/executor.py +69 -0
  36. codenib-0.1.0/codenib/agent/skills/code_to_query/skill.md +7 -0
  37. codenib-0.1.0/codenib/agent/skills/codenib_context/__init__.py +0 -0
  38. codenib-0.1.0/codenib/agent/skills/codenib_context/config.yaml +44 -0
  39. codenib-0.1.0/codenib/agent/skills/codenib_context/executor.py +184 -0
  40. codenib-0.1.0/codenib/agent/skills/codenib_context/skill.md +21 -0
  41. codenib-0.1.0/codenib/agent/skills/context.py +107 -0
  42. codenib-0.1.0/codenib/agent/skills/core.py +153 -0
  43. codenib-0.1.0/codenib/agent/skills/crossencoder_rerank/__init__.py +3 -0
  44. codenib-0.1.0/codenib/agent/skills/crossencoder_rerank/config.yaml +41 -0
  45. codenib-0.1.0/codenib/agent/skills/crossencoder_rerank/executor.py +62 -0
  46. codenib-0.1.0/codenib/agent/skills/crossencoder_rerank/skill.md +7 -0
  47. codenib-0.1.0/codenib/agent/skills/embedding_search/__init__.py +0 -0
  48. codenib-0.1.0/codenib/agent/skills/embedding_search/config.yaml +53 -0
  49. codenib-0.1.0/codenib/agent/skills/embedding_search/executor.py +57 -0
  50. codenib-0.1.0/codenib/agent/skills/embedding_search/skill.md +47 -0
  51. codenib-0.1.0/codenib/agent/skills/find_callees/__init__.py +0 -0
  52. codenib-0.1.0/codenib/agent/skills/find_callees/config.yaml +22 -0
  53. codenib-0.1.0/codenib/agent/skills/find_callees/executor.py +23 -0
  54. codenib-0.1.0/codenib/agent/skills/find_callees/skill.md +11 -0
  55. codenib-0.1.0/codenib/agent/skills/find_callers/__init__.py +0 -0
  56. codenib-0.1.0/codenib/agent/skills/find_callers/config.yaml +22 -0
  57. codenib-0.1.0/codenib/agent/skills/find_callers/executor.py +23 -0
  58. codenib-0.1.0/codenib/agent/skills/find_callers/skill.md +11 -0
  59. codenib-0.1.0/codenib/agent/skills/hybrid_search/__init__.py +0 -0
  60. codenib-0.1.0/codenib/agent/skills/hybrid_search/config.yaml +38 -0
  61. codenib-0.1.0/codenib/agent/skills/hybrid_search/executor.py +132 -0
  62. codenib-0.1.0/codenib/agent/skills/hybrid_search/skill.md +53 -0
  63. codenib-0.1.0/codenib/agent/skills/llm_rerank/__init__.py +0 -0
  64. codenib-0.1.0/codenib/agent/skills/llm_rerank/config.yaml +33 -0
  65. codenib-0.1.0/codenib/agent/skills/llm_rerank/executor.py +37 -0
  66. codenib-0.1.0/codenib/agent/skills/llm_rerank/skill.md +7 -0
  67. codenib-0.1.0/codenib/agent/skills/loader.py +240 -0
  68. codenib-0.1.0/codenib/agent/skills/lsp_definition/config.yaml +35 -0
  69. codenib-0.1.0/codenib/agent/skills/lsp_definition/executor.py +32 -0
  70. codenib-0.1.0/codenib/agent/skills/lsp_definition/skill.md +18 -0
  71. codenib-0.1.0/codenib/agent/skills/lsp_references/config.yaml +40 -0
  72. codenib-0.1.0/codenib/agent/skills/lsp_references/executor.py +34 -0
  73. codenib-0.1.0/codenib/agent/skills/lsp_references/skill.md +17 -0
  74. codenib-0.1.0/codenib/agent/skills/lsp_route/config.yaml +35 -0
  75. codenib-0.1.0/codenib/agent/skills/lsp_route/executor.py +34 -0
  76. codenib-0.1.0/codenib/agent/skills/lsp_route/skill.md +23 -0
  77. codenib-0.1.0/codenib/agent/skills/registry.py +136 -0
  78. codenib-0.1.0/codenib/agent/skills/repository_search/config.yaml +49 -0
  79. codenib-0.1.0/codenib/agent/skills/repository_search/executor.py +512 -0
  80. codenib-0.1.0/codenib/agent/skills/repository_search/skill.md +28 -0
  81. codenib-0.1.0/codenib/agent/skills/trace/__init__.py +0 -0
  82. codenib-0.1.0/codenib/agent/skills/trace/config.yaml +30 -0
  83. codenib-0.1.0/codenib/agent/skills/trace/executor.py +27 -0
  84. codenib-0.1.0/codenib/agent/skills/trace/skill.md +12 -0
  85. codenib-0.1.0/codenib/agent/skills/typecheck.py +302 -0
  86. codenib-0.1.0/codenib/agent/tool_schema.py +158 -0
  87. codenib-0.1.0/codenib/agent/tools/__init__.py +41 -0
  88. codenib-0.1.0/codenib/agent/tools/defaults.py +1045 -0
  89. codenib-0.1.0/codenib/agent/tools/spec.py +103 -0
  90. codenib-0.1.0/codenib/agent/utils.py +149 -0
  91. codenib-0.1.0/codenib/cli.py +1079 -0
  92. codenib-0.1.0/codenib/clients/__init__.py +5 -0
  93. codenib-0.1.0/codenib/clients/claude_agent.py +534 -0
  94. codenib-0.1.0/codenib/clients/codex_agent.py +314 -0
  95. codenib-0.1.0/codenib/code_chunker.py +730 -0
  96. codenib-0.1.0/codenib/code_chunking/__init__.py +113 -0
  97. codenib-0.1.0/codenib/code_chunking/base.py +592 -0
  98. codenib-0.1.0/codenib/code_chunking/cpp_chunker.py +278 -0
  99. codenib-0.1.0/codenib/code_chunking/csharp_chunker.py +210 -0
  100. codenib-0.1.0/codenib/code_chunking/go_chunker.py +213 -0
  101. codenib-0.1.0/codenib/code_chunking/java_chunker.py +188 -0
  102. codenib-0.1.0/codenib/code_chunking/js_chunker.py +251 -0
  103. codenib-0.1.0/codenib/code_chunking/kotlin_chunker.py +253 -0
  104. codenib-0.1.0/codenib/code_chunking/lua_chunker.py +94 -0
  105. codenib-0.1.0/codenib/code_chunking/php_chunker.py +204 -0
  106. codenib-0.1.0/codenib/code_chunking/python_chunker.py +267 -0
  107. codenib-0.1.0/codenib/code_chunking/ruby_chunker.py +198 -0
  108. codenib-0.1.0/codenib/code_chunking/rust_chunker.py +195 -0
  109. codenib-0.1.0/codenib/code_chunking/scala_chunker.py +182 -0
  110. codenib-0.1.0/codenib/code_chunking/swift_chunker.py +182 -0
  111. codenib-0.1.0/codenib/compat_pickle.py +48 -0
  112. codenib-0.1.0/codenib/compiler/__init__.py +93 -0
  113. codenib-0.1.0/codenib/compiler/index_builders.py +868 -0
  114. codenib-0.1.0/codenib/compiler/index_compiler.py +488 -0
  115. codenib-0.1.0/codenib/compiler/manifest.py +221 -0
  116. codenib-0.1.0/codenib/compiler/params.py +126 -0
  117. codenib-0.1.0/codenib/compiler/resources.py +267 -0
  118. codenib-0.1.0/codenib/compiler/skill_context.py +641 -0
  119. codenib-0.1.0/codenib/compiler/snapshot_store.py +311 -0
  120. codenib-0.1.0/codenib/compiler/verification.py +131 -0
  121. codenib-0.1.0/codenib/dataset/__init__.py +21 -0
  122. codenib-0.1.0/codenib/dataset/base.py +78 -0
  123. codenib-0.1.0/codenib/dataset/codenib_base.py +374 -0
  124. codenib-0.1.0/codenib/dataset/codenib_synthesis.py +540 -0
  125. codenib-0.1.0/codenib/dataset/collect/difficulty_classifier.py +511 -0
  126. codenib-0.1.0/codenib/dataset/collect/swebench_sample.py +766 -0
  127. codenib-0.1.0/codenib/dataset/gt_locate.py +831 -0
  128. codenib-0.1.0/codenib/dataset/local_json.py +184 -0
  129. codenib-0.1.0/codenib/dataset/locbench.py +254 -0
  130. codenib-0.1.0/codenib/dataset/swebench.py +344 -0
  131. codenib-0.1.0/codenib/dataset/swebench_multilingual.py +283 -0
  132. codenib-0.1.0/codenib/dataset/synthesize/__init__.py +71 -0
  133. codenib-0.1.0/codenib/dataset/synthesize/_agent.py +125 -0
  134. codenib-0.1.0/codenib/dataset/synthesize/_types.py +146 -0
  135. codenib-0.1.0/codenib/dataset/synthesize/context_loader.py +601 -0
  136. codenib-0.1.0/codenib/dataset/synthesize/query_curator.py +713 -0
  137. codenib-0.1.0/codenib/dataset/synthesize/query_synthesizer.py +546 -0
  138. codenib-0.1.0/codenib/dataset/synthesize/verifier.py +425 -0
  139. codenib-0.1.0/codenib/dataset/synthesize/vocab_guard.py +264 -0
  140. codenib-0.1.0/codenib/dataset/utils.py +380 -0
  141. codenib-0.1.0/codenib/eval/agent_runner/__init__.py +296 -0
  142. codenib-0.1.0/codenib/eval/agent_runner/baseline.py +299 -0
  143. codenib-0.1.0/codenib/eval/agent_runner/batch.py +176 -0
  144. codenib-0.1.0/codenib/eval/agent_runner/contexts.py +135 -0
  145. codenib-0.1.0/codenib/eval/agent_runner/feedback.py +135 -0
  146. codenib-0.1.0/codenib/eval/agent_runner/feedback_summary.py +326 -0
  147. codenib-0.1.0/codenib/eval/agent_runner/format_diagnostics.py +115 -0
  148. codenib-0.1.0/codenib/eval/agent_runner/live_lsp_provider.py +377 -0
  149. codenib-0.1.0/codenib/eval/agent_runner/loc_baseline.py +355 -0
  150. codenib-0.1.0/codenib/eval/agent_runner/lsp_agent_ab.py +577 -0
  151. codenib-0.1.0/codenib/eval/agent_runner/lsp_agent_study.py +408 -0
  152. codenib-0.1.0/codenib/eval/agent_runner/lsp_agent_study_analysis.py +411 -0
  153. codenib-0.1.0/codenib/eval/agent_runner/lsp_agent_study_artifacts.py +413 -0
  154. codenib-0.1.0/codenib/eval/agent_runner/lsp_agent_study_manifest.py +402 -0
  155. codenib-0.1.0/codenib/eval/agent_runner/lsp_agent_study_runner.py +694 -0
  156. codenib-0.1.0/codenib/eval/agent_runner/lsp_baseline.py +251 -0
  157. codenib-0.1.0/codenib/eval/agent_runner/lsp_latency.py +267 -0
  158. codenib-0.1.0/codenib/eval/agent_runner/lsp_provider_cli.py +273 -0
  159. codenib-0.1.0/codenib/eval/agent_runner/lsp_provider_validation.py +594 -0
  160. codenib-0.1.0/codenib/eval/agent_runner/lsp_readiness.py +167 -0
  161. codenib-0.1.0/codenib/eval/agent_runner/lsp_replay_benchmark.py +1072 -0
  162. codenib-0.1.0/codenib/eval/agent_runner/metrics.py +80 -0
  163. codenib-0.1.0/codenib/eval/agent_runner/orchestrator.py +173 -0
  164. codenib-0.1.0/codenib/eval/agent_runner/pareto.py +154 -0
  165. codenib-0.1.0/codenib/eval/agent_runner/prebuilt.py +484 -0
  166. codenib-0.1.0/codenib/eval/agent_runner/preload.py +219 -0
  167. codenib-0.1.0/codenib/eval/agent_runner/promotion.py +172 -0
  168. codenib-0.1.0/codenib/eval/agent_runner/query_sweep.py +432 -0
  169. codenib-0.1.0/codenib/eval/agent_runner/results.py +69 -0
  170. codenib-0.1.0/codenib/eval/agent_runner/scoring.py +134 -0
  171. codenib-0.1.0/codenib/eval/agent_runner/sweep.py +619 -0
  172. codenib-0.1.0/codenib/eval/agent_runner/sweep_config.py +160 -0
  173. codenib-0.1.0/codenib/eval/agent_runner/symbols.py +67 -0
  174. codenib-0.1.0/codenib/eval/agent_runner/trace_summary.py +405 -0
  175. codenib-0.1.0/codenib/eval/agent_runner/verify_expand.py +219 -0
  176. codenib-0.1.0/codenib/eval/artifact_bundle.py +322 -0
  177. codenib-0.1.0/codenib/eval/artifact_integrity.py +332 -0
  178. codenib-0.1.0/codenib/eval/artifact_manifest.py +236 -0
  179. codenib-0.1.0/codenib/eval/experiments/__init__.py +5 -0
  180. codenib-0.1.0/codenib/eval/experiments/lsp_agent_study_policy.py +55 -0
  181. codenib-0.1.0/codenib/eval/loc_agent_runner.py +37 -0
  182. codenib-0.1.0/codenib/eval/reports/__init__.py +5 -0
  183. codenib-0.1.0/codenib/eval/reports/cost_arm_report.py +810 -0
  184. codenib-0.1.0/codenib/eval/retrieval_eval.py +557 -0
  185. codenib-0.1.0/codenib/graph/__init__.py +44 -0
  186. codenib-0.1.0/codenib/graph/backend_alignment.py +184 -0
  187. codenib-0.1.0/codenib/graph/code_graph.py +1218 -0
  188. codenib-0.1.0/codenib/graph/dependency.py +229 -0
  189. codenib-0.1.0/codenib/graph/hierarchy.py +828 -0
  190. codenib-0.1.0/codenib/graph/incremental/__init__.py +15 -0
  191. codenib-0.1.0/codenib/graph/incremental/change_mgr.py +165 -0
  192. codenib-0.1.0/codenib/graph/incremental/graph_patcher.py +139 -0
  193. codenib-0.1.0/codenib/graph/incremental/lsp_client.py +1271 -0
  194. codenib-0.1.0/codenib/graph/incremental/patcher_base.py +1364 -0
  195. codenib-0.1.0/codenib/graph/incremental/patcher_cpp.py +796 -0
  196. codenib-0.1.0/codenib/graph/incremental/patcher_go.py +56 -0
  197. codenib-0.1.0/codenib/graph/incremental/patcher_python.py +43 -0
  198. codenib-0.1.0/codenib/graph/incremental/patcher_rust.py +113 -0
  199. codenib-0.1.0/codenib/graph/incremental/patcher_ts.py +49 -0
  200. codenib-0.1.0/codenib/graph/incremental/subgraph_mgr.py +1028 -0
  201. codenib-0.1.0/codenib/graph/layers.py +325 -0
  202. codenib-0.1.0/codenib/graph/roi_subgraph.py +394 -0
  203. codenib-0.1.0/codenib/graph/setup.py +689 -0
  204. codenib-0.1.0/codenib/graph/traverse_graph.py +237 -0
  205. codenib-0.1.0/codenib/index/__init__.py +42 -0
  206. codenib-0.1.0/codenib/index/embedding/__init__.py +48 -0
  207. codenib-0.1.0/codenib/index/embedding/builders.py +190 -0
  208. codenib-0.1.0/codenib/index/embedding/model_policy.py +62 -0
  209. codenib-0.1.0/codenib/index/embedding/prompt_registry.py +87 -0
  210. codenib-0.1.0/codenib/index/embedding/vector_store.py +1458 -0
  211. codenib-0.1.0/codenib/index/incremental/__init__.py +30 -0
  212. codenib-0.1.0/codenib/index/incremental/chunk_store.py +409 -0
  213. codenib-0.1.0/codenib/index/incremental/embeddings_cache.py +196 -0
  214. codenib-0.1.0/codenib/index/incremental/git_diff.py +221 -0
  215. codenib-0.1.0/codenib/index/incremental/index_updater.py +283 -0
  216. codenib-0.1.0/codenib/index/incremental/state.py +92 -0
  217. codenib-0.1.0/codenib/index/regex_idx/__init__.py +7 -0
  218. codenib-0.1.0/codenib/index/regex_idx/regex_idx.py +150 -0
  219. codenib-0.1.0/codenib/index/rerank/__init__.py +23 -0
  220. codenib-0.1.0/codenib/index/rerank/cross_encoder.py +356 -0
  221. codenib-0.1.0/codenib/index/sparse_idx/__init__.py +9 -0
  222. codenib-0.1.0/codenib/index/sparse_idx/bm25_index.py +724 -0
  223. codenib-0.1.0/codenib/index/trigram/__init__.py +17 -0
  224. codenib-0.1.0/codenib/index/trigram/zoekt_searcher.py +371 -0
  225. codenib-0.1.0/codenib/languages.py +1035 -0
  226. codenib-0.1.0/codenib/llm/__init__.py +33 -0
  227. codenib-0.1.0/codenib/llm/diagnostics.py +170 -0
  228. codenib-0.1.0/codenib/llm/litellm_chat.py +422 -0
  229. codenib-0.1.0/codenib/llm/options.py +139 -0
  230. codenib-0.1.0/codenib/llm/usage.py +182 -0
  231. codenib-0.1.0/codenib/log_utils.py +301 -0
  232. codenib-0.1.0/codenib/ls_index/__init__.py +17 -0
  233. codenib-0.1.0/codenib/ls_index/clangd_decode.py +912 -0
  234. codenib-0.1.0/codenib/ls_index/clangd_indexer.py +1400 -0
  235. codenib-0.1.0/codenib/ls_index/index_quality.py +442 -0
  236. codenib-0.1.0/codenib/ls_index/lsp_graph_decode.py +449 -0
  237. codenib-0.1.0/codenib/ls_index/lsp_indexer.py +246 -0
  238. codenib-0.1.0/codenib/ls_router.py +507 -0
  239. codenib-0.1.0/codenib/mcp/__init__.py +13 -0
  240. codenib-0.1.0/codenib/mcp/__main__.py +9 -0
  241. codenib-0.1.0/codenib/mcp/context.py +211 -0
  242. codenib-0.1.0/codenib/mcp/prompts.py +76 -0
  243. codenib-0.1.0/codenib/mcp/server.py +463 -0
  244. codenib-0.1.0/codenib/mcp/tools/__init__.py +9 -0
  245. codenib-0.1.0/codenib/mcp/tools/dependency.py +56 -0
  246. codenib-0.1.0/codenib/mcp/tools/lsp.py +119 -0
  247. codenib-0.1.0/codenib/mcp/tools/search.py +224 -0
  248. codenib-0.1.0/codenib/model/__init__.py +49 -0
  249. codenib-0.1.0/codenib/model/agentless_pipeline.py +484 -0
  250. codenib-0.1.0/codenib/model/bm25_retrieve_pipeline.py +100 -0
  251. codenib-0.1.0/codenib/model/dense_graph_expand_rerank_pipeline.py +300 -0
  252. codenib-0.1.0/codenib/model/embedding_retrieve_pipeline.py +152 -0
  253. codenib-0.1.0/codenib/model/graph_augmented_rerank_pipeline.py +19 -0
  254. codenib-0.1.0/codenib/model/graph_retrieve_pipeline.py +259 -0
  255. codenib-0.1.0/codenib/model/hybrid_retrieve_pipeline.py +256 -0
  256. codenib-0.1.0/codenib/model/retrieval_planner.py +377 -0
  257. codenib-0.1.0/codenib/model/retrieve_rerank_pipeline.py +1023 -0
  258. codenib-0.1.0/codenib/ops/expand.py +299 -0
  259. codenib-0.1.0/codenib/ops/filter.py +159 -0
  260. codenib-0.1.0/codenib/ops/rerank.py +246 -0
  261. codenib-0.1.0/codenib/ops/retrieve.py +293 -0
  262. codenib-0.1.0/codenib/ops/transform.py +34 -0
  263. codenib-0.1.0/codenib/paths.py +91 -0
  264. codenib-0.1.0/codenib/profiler.py +506 -0
  265. codenib-0.1.0/codenib/repository_filters.py +103 -0
  266. codenib-0.1.0/codenib/repository_summary.py +161 -0
  267. codenib-0.1.0/codenib/scip_interface/__init__.py +120 -0
  268. codenib-0.1.0/codenib/scip_interface/lsp_occurrence_index.py +327 -0
  269. codenib-0.1.0/codenib/scip_interface/rust_analyzer.py +29 -0
  270. codenib-0.1.0/codenib/scip_interface/scip-environment.yml +14 -0
  271. codenib-0.1.0/codenib/scip_interface/scip.proto +890 -0
  272. codenib-0.1.0/codenib/scip_interface/scip_decode_core.py +190 -0
  273. codenib-0.1.0/codenib/scip_interface/scip_decode_csharp.py +143 -0
  274. codenib-0.1.0/codenib/scip_interface/scip_decode_go.py +433 -0
  275. codenib-0.1.0/codenib/scip_interface/scip_decode_java.py +1117 -0
  276. codenib-0.1.0/codenib/scip_interface/scip_decode_php.py +194 -0
  277. codenib-0.1.0/codenib/scip_interface/scip_decode_python.py +400 -0
  278. codenib-0.1.0/codenib/scip_interface/scip_decode_ruby.py +464 -0
  279. codenib-0.1.0/codenib/scip_interface/scip_decode_rust.py +584 -0
  280. codenib-0.1.0/codenib/scip_interface/scip_decode_ts.py +542 -0
  281. codenib-0.1.0/codenib/scip_interface/scip_decode_utils.py +52 -0
  282. codenib-0.1.0/codenib/scip_interface/scip_indexer_base.py +728 -0
  283. codenib-0.1.0/codenib/scip_interface/scip_indexer_csharp.py +166 -0
  284. codenib-0.1.0/codenib/scip_interface/scip_indexer_go.py +164 -0
  285. codenib-0.1.0/codenib/scip_interface/scip_indexer_java.py +201 -0
  286. codenib-0.1.0/codenib/scip_interface/scip_indexer_php.py +548 -0
  287. codenib-0.1.0/codenib/scip_interface/scip_indexer_python.py +500 -0
  288. codenib-0.1.0/codenib/scip_interface/scip_indexer_ruby.py +369 -0
  289. codenib-0.1.0/codenib/scip_interface/scip_indexer_rust.py +183 -0
  290. codenib-0.1.0/codenib/scip_interface/scip_indexer_ts.py +616 -0
  291. codenib-0.1.0/codenib/scip_interface/scip_install.sh +8 -0
  292. codenib-0.1.0/codenib/scip_interface/scip_pb2.py +80 -0
  293. codenib-0.1.0/codenib/search.py +371 -0
  294. codenib-0.1.0/codenib/source_fingerprint.py +198 -0
  295. codenib-0.1.0/codenib/types.py +105 -0
  296. codenib-0.1.0/codenib/utils.py +93 -0
  297. codenib-0.1.0/codenib/web/__init__.py +9 -0
  298. codenib-0.1.0/codenib/web/app.py +467 -0
  299. codenib-0.1.0/codenib/web/codemap.py +753 -0
  300. codenib-0.1.0/codenib/web/commit_window.py +296 -0
  301. codenib-0.1.0/codenib/web/config.py +331 -0
  302. codenib-0.1.0/codenib/web/edge_label.py +332 -0
  303. codenib-0.1.0/codenib/web/launcher.py +252 -0
  304. codenib-0.1.0/codenib/web/local.py +196 -0
  305. codenib-0.1.0/codenib/web/repo_registry.py +561 -0
  306. codenib-0.1.0/codenib/web/schemas.py +329 -0
  307. codenib-0.1.0/codenib/web/static_server.py +213 -0
  308. codenib-0.1.0/codenib/wiki/__init__.py +15 -0
  309. codenib-0.1.0/codenib/wiki/agent_wiki.py +4665 -0
  310. codenib-0.1.0/codenib/wiki/builder.py +849 -0
  311. codenib-0.1.0/codenib/wiki/evidence.py +905 -0
  312. codenib-0.1.0/codenib/wiki/narrator.py +258 -0
  313. codenib-0.1.0/codenib/wiki/outline.py +1432 -0
  314. codenib-0.1.0/codenib/wiki/quality.py +932 -0
  315. codenib-0.1.0/codenib.egg-info/PKG-INFO +293 -0
  316. codenib-0.1.0/codenib.egg-info/SOURCES.txt +449 -0
  317. codenib-0.1.0/codenib.egg-info/dependency_links.txt +1 -0
  318. codenib-0.1.0/codenib.egg-info/entry_points.txt +13 -0
  319. codenib-0.1.0/codenib.egg-info/requires.txt +78 -0
  320. codenib-0.1.0/codenib.egg-info/top_level.txt +1 -0
  321. codenib-0.1.0/pyproject.toml +187 -0
  322. codenib-0.1.0/setup.cfg +4 -0
  323. codenib-0.1.0/setup.py +33 -0
  324. codenib-0.1.0/test/test_cli.py +772 -0
  325. codenib-0.1.0/test/test_cli_entrypoints.py +78 -0
  326. codenib-0.1.0/test/test_compat_pickle.py +53 -0
  327. codenib-0.1.0/test/test_language_capability_matrix.py +18 -0
  328. codenib-0.1.0/test/test_languages.py +430 -0
  329. codenib-0.1.0/test/test_lazy_imports.py +98 -0
  330. codenib-0.1.0/test/test_log_utils.py +11 -0
  331. codenib-0.1.0/test/test_ls_router_registry.py +528 -0
  332. codenib-0.1.0/test/test_namespace.py +99 -0
  333. codenib-0.1.0/test/test_namespace_contract.py +86 -0
  334. codenib-0.1.0/test/test_paths.py +86 -0
  335. codenib-0.1.0/test/test_release_artifacts.py +82 -0
  336. codenib-0.1.0/test/test_release_metadata.py +96 -0
  337. codenib-0.1.0/test/test_repository_summary.py +85 -0
  338. codenib-0.1.0/test/test_source_fingerprint.py +90 -0
  339. codenib-0.1.0/web/app/[repoId]/ask/page.tsx +254 -0
  340. codenib-0.1.0/web/app/[repoId]/page.tsx +739 -0
  341. codenib-0.1.0/web/app/add-repo/page.tsx +85 -0
  342. codenib-0.1.0/web/app/globals.css +3835 -0
  343. codenib-0.1.0/web/app/page.tsx +188 -0
  344. codenib-0.1.0/web/components/AskBar.tsx +120 -0
  345. codenib-0.1.0/web/components/AskPanel.tsx +128 -0
  346. codenib-0.1.0/web/components/CitationItem.tsx +44 -0
  347. codenib-0.1.0/web/components/CodeGraph.tsx +1876 -0
  348. codenib-0.1.0/web/components/CodePanel.tsx +188 -0
  349. codenib-0.1.0/web/components/Codemap.tsx +286 -0
  350. codenib-0.1.0/web/components/GraphView.tsx +324 -0
  351. codenib-0.1.0/web/components/Header.tsx +96 -0
  352. codenib-0.1.0/web/components/HierarchyMap.tsx +257 -0
  353. codenib-0.1.0/web/components/HighlightedBlock.tsx +42 -0
  354. codenib-0.1.0/web/components/HighlightedCode.tsx +58 -0
  355. codenib-0.1.0/web/components/Markdown.test.tsx +27 -0
  356. codenib-0.1.0/web/components/Markdown.tsx +244 -0
  357. codenib-0.1.0/web/components/Mermaid.tsx +110 -0
  358. codenib-0.1.0/web/components/SystemMap.tsx +460 -0
  359. codenib-0.1.0/web/dist/assets/AskBar-Q_2zSw_D.js +31 -0
  360. codenib-0.1.0/web/dist/assets/CodeGraph-C5zIOx4j.js +3 -0
  361. codenib-0.1.0/web/dist/assets/CodePanel-BE7Wg1wI.js +1 -0
  362. codenib-0.1.0/web/dist/assets/Codemap-C5Xm7Go_.js +2 -0
  363. codenib-0.1.0/web/dist/assets/GraphView-CBBbxS9a.js +2 -0
  364. codenib-0.1.0/web/dist/assets/Header-CUW7gfQl.js +1 -0
  365. codenib-0.1.0/web/dist/assets/HighlightedBlock-H7FGwbAI.js +1 -0
  366. codenib-0.1.0/web/dist/assets/HighlightedCode-CTRFPFV9.js +2 -0
  367. codenib-0.1.0/web/dist/assets/Mermaid-NhydXLyh.js +303 -0
  368. codenib-0.1.0/web/dist/assets/api-DMyba6Hn.js +1 -0
  369. codenib-0.1.0/web/dist/assets/arc-Cj6TUG7b.js +1 -0
  370. codenib-0.1.0/web/dist/assets/architectureDiagram-3BPJPVTR-BXC7SbpZ.js +36 -0
  371. codenib-0.1.0/web/dist/assets/blockDiagram-GPEHLZMM-BYhhgH_O.js +132 -0
  372. codenib-0.1.0/web/dist/assets/c4Diagram-AAUBKEIU-BPe9Xb1K.js +10 -0
  373. codenib-0.1.0/web/dist/assets/channel-DGptmZnr.js +1 -0
  374. codenib-0.1.0/web/dist/assets/chunk-2J33WTMH-mJuoTx1I.js +1 -0
  375. codenib-0.1.0/web/dist/assets/chunk-4BX2VUAB-DyIPfnHV.js +1 -0
  376. codenib-0.1.0/web/dist/assets/chunk-55IACEB6-C8bSn9Qq.js +1 -0
  377. codenib-0.1.0/web/dist/assets/chunk-727SXJPM-CgiBqZFm.js +206 -0
  378. codenib-0.1.0/web/dist/assets/chunk-AQP2D5EJ-DOOlLotN.js +231 -0
  379. codenib-0.1.0/web/dist/assets/chunk-FMBD7UC4-mf47mSz2.js +15 -0
  380. codenib-0.1.0/web/dist/assets/chunk-ND2GUHAM-D6lobpla.js +1 -0
  381. codenib-0.1.0/web/dist/assets/chunk-QZHKN3VN-D9a00sWs.js +1 -0
  382. codenib-0.1.0/web/dist/assets/classDiagram-4FO5ZUOK-wDtvnBsq.js +1 -0
  383. codenib-0.1.0/web/dist/assets/classDiagram-v2-Q7XG4LA2-wDtvnBsq.js +1 -0
  384. codenib-0.1.0/web/dist/assets/cose-bilkent-S5V4N54A-JwC1FU9v.js +1 -0
  385. codenib-0.1.0/web/dist/assets/cytoscape.esm-CkSuTymj.js +321 -0
  386. codenib-0.1.0/web/dist/assets/dagre-BM42HDAG-BTm6Sb-x.js +4 -0
  387. codenib-0.1.0/web/dist/assets/defaultLocale-DX6XiGOO.js +1 -0
  388. codenib-0.1.0/web/dist/assets/diagram-2AECGRRQ-C7XNwfvk.js +43 -0
  389. codenib-0.1.0/web/dist/assets/diagram-5GNKFQAL-DcLriIgZ.js +10 -0
  390. codenib-0.1.0/web/dist/assets/diagram-KO2AKTUF-Bo-6Bpfo.js +3 -0
  391. codenib-0.1.0/web/dist/assets/diagram-LMA3HP47-M4Nh-qq-.js +24 -0
  392. codenib-0.1.0/web/dist/assets/diagram-OG6HWLK6-BUT1QVEf.js +24 -0
  393. codenib-0.1.0/web/dist/assets/erDiagram-TEJ5UH35-DViEMoeP.js +85 -0
  394. codenib-0.1.0/web/dist/assets/flowDiagram-I6XJVG4X-DjBB1gSM.js +162 -0
  395. codenib-0.1.0/web/dist/assets/ganttDiagram-6RSMTGT7-Drhb89TN.js +292 -0
  396. codenib-0.1.0/web/dist/assets/gitGraphDiagram-PVQCEYII-CwqblmoY.js +106 -0
  397. codenib-0.1.0/web/dist/assets/graph--OzhPTMs.js +1 -0
  398. codenib-0.1.0/web/dist/assets/highlight-CDab0zVI.css +1 -0
  399. codenib-0.1.0/web/dist/assets/highlight-CnfLc-V2.js +5 -0
  400. codenib-0.1.0/web/dist/assets/index-BHP8c3Tq.js +9 -0
  401. codenib-0.1.0/web/dist/assets/index-CKJrqu86.css +1 -0
  402. codenib-0.1.0/web/dist/assets/infoDiagram-5YYISTIA-BKq62LUG.js +2 -0
  403. codenib-0.1.0/web/dist/assets/init-Gi6I4Gst.js +1 -0
  404. codenib-0.1.0/web/dist/assets/ishikawaDiagram-YF4QCWOH-DBAgfp9d.js +70 -0
  405. codenib-0.1.0/web/dist/assets/journeyDiagram-JHISSGLW-DwHStEV9.js +139 -0
  406. codenib-0.1.0/web/dist/assets/kanban-definition-UN3LZRKU-CWPLLTQn.js +89 -0
  407. codenib-0.1.0/web/dist/assets/katex-HP8lGamR.js +257 -0
  408. codenib-0.1.0/web/dist/assets/layout-SsrduOYp.js +1 -0
  409. codenib-0.1.0/web/dist/assets/linear-DNcGZFnN.js +1 -0
  410. codenib-0.1.0/web/dist/assets/mindmap-definition-RKZ34NQL-FZHYTpdO.js +96 -0
  411. codenib-0.1.0/web/dist/assets/ordinal-Cboi1Yqb.js +1 -0
  412. codenib-0.1.0/web/dist/assets/page-Bn-Q8MBy.js +6 -0
  413. codenib-0.1.0/web/dist/assets/page-CESv5Ezw.js +2 -0
  414. codenib-0.1.0/web/dist/assets/page-CHsElUu2.js +1 -0
  415. codenib-0.1.0/web/dist/assets/page-D1WhIRzi.js +1 -0
  416. codenib-0.1.0/web/dist/assets/pieDiagram-4H26LBE5-DKlC7xtb.js +30 -0
  417. codenib-0.1.0/web/dist/assets/quadrantDiagram-W4KKPZXB-DldkGUZS.js +7 -0
  418. codenib-0.1.0/web/dist/assets/requirementDiagram-4Y6WPE33-Dndb6w-j.js +84 -0
  419. codenib-0.1.0/web/dist/assets/sankeyDiagram-5OEKKPKP-B2ewtJAC.js +40 -0
  420. codenib-0.1.0/web/dist/assets/sequenceDiagram-3UESZ5HK-2N2KbYFt.js +162 -0
  421. codenib-0.1.0/web/dist/assets/stateDiagram-AJRCARHV-CLwUuVlz.js +1 -0
  422. codenib-0.1.0/web/dist/assets/stateDiagram-v2-BHNVJYJU-IiZdW_Og.js +1 -0
  423. codenib-0.1.0/web/dist/assets/timeline-definition-PNZ67QCA-D_IdllIp.js +120 -0
  424. codenib-0.1.0/web/dist/assets/vennDiagram-CIIHVFJN-CSU7pI9M.js +34 -0
  425. codenib-0.1.0/web/dist/assets/wardley-L42UT6IY-Bv1Eg1Al.js +161 -0
  426. codenib-0.1.0/web/dist/assets/wardleyDiagram-YWT4CUSO-Di3bYwLm.js +78 -0
  427. codenib-0.1.0/web/dist/assets/xychartDiagram-2RQKCTM6-CPHWEBiN.js +7 -0
  428. codenib-0.1.0/web/dist/codenib-icon.svg +34 -0
  429. codenib-0.1.0/web/dist/index.html +29 -0
  430. codenib-0.1.0/web/dist/runtime-config.js +1 -0
  431. codenib-0.1.0/web/index.html +28 -0
  432. codenib-0.1.0/web/lib/api.ts +434 -0
  433. codenib-0.1.0/web/lib/citations.test.ts +73 -0
  434. codenib-0.1.0/web/lib/citations.ts +96 -0
  435. codenib-0.1.0/web/lib/filesLayout.test.ts +143 -0
  436. codenib-0.1.0/web/lib/filesLayout.ts +243 -0
  437. codenib-0.1.0/web/lib/highlight.test.ts +18 -0
  438. codenib-0.1.0/web/lib/highlight.ts +88 -0
  439. codenib-0.1.0/web/lib/router.tsx +68 -0
  440. codenib-0.1.0/web/loopshot.mjs +128 -0
  441. codenib-0.1.0/web/package-lock.json +5713 -0
  442. codenib-0.1.0/web/package.json +44 -0
  443. codenib-0.1.0/web/public/codenib-icon.svg +34 -0
  444. codenib-0.1.0/web/public/runtime-config.js +1 -0
  445. codenib-0.1.0/web/qa_verify.mjs +73 -0
  446. codenib-0.1.0/web/src/main.tsx +52 -0
  447. codenib-0.1.0/web/tsconfig.json +19 -0
  448. codenib-0.1.0/web/types/cytoscape-dagre.d.ts +7 -0
  449. codenib-0.1.0/web/types/cytoscape-fcose.d.ts +7 -0
  450. codenib-0.1.0/web/verify.mjs +61 -0
  451. codenib-0.1.0/web/vite.config.ts +27 -0
@@ -0,0 +1,42 @@
1
+ <!--
2
+ SPDX-FileCopyrightText: 2025-2026 CodeNib Contributors
3
+
4
+ SPDX-License-Identifier: Apache-2.0
5
+ -->
6
+
7
+ # Changelog
8
+
9
+ All notable user-facing changes are recorded here. CodeNib follows
10
+ [Semantic Versioning](https://semver.org/).
11
+
12
+ ## [Unreleased]
13
+
14
+ ## [0.1.0] - 2026-07-26
15
+
16
+ ### Added
17
+
18
+ - A unified `codenib` CLI with `index`, `wiki`, `mcp`, and `doctor` commands.
19
+ - A two-command local Wiki path with automatic language detection and reusable
20
+ repository manifests.
21
+ - Fast, semantic, and full indexing presets with explicit optional
22
+ dependencies.
23
+ - A deterministic static Wiki that requires no LLM credentials.
24
+ - A source-linked MCP server for retrieval, graph, and static navigation tools.
25
+ - Multi-view incremental maintenance and evaluation infrastructure.
26
+
27
+ ### Changed
28
+
29
+ - Renamed the maintained package, command, state, and protocol namespace to
30
+ CodeNib.
31
+ - Reduced the default installation to the BM25 and Wiki runtime; model, graph,
32
+ dataset, MCP, and agent dependencies now use named extras.
33
+ - Made public package imports lazy so CLI startup does not initialize model or
34
+ graph runtimes.
35
+
36
+ ### Security
37
+
38
+ - Prepared secretless PyPI publishing through a dedicated GitHub Actions OIDC
39
+ workflow.
40
+
41
+ [Unreleased]: https://github.com/sysevol-ai/CodeNib/compare/v0.1.0...HEAD
42
+ [0.1.0]: https://github.com/sysevol-ai/CodeNib/releases/tag/v0.1.0
@@ -0,0 +1,80 @@
1
+ <!--
2
+ SPDX-FileCopyrightText: 2025-2026 CodeNib Contributors
3
+
4
+ SPDX-License-Identifier: Apache-2.0
5
+ -->
6
+
7
+ # Contributing To CodeNib
8
+
9
+ CodeNib accepts bug reports, design proposals, documentation fixes, and focused
10
+ code changes. Open an issue before starting a broad architectural change so its
11
+ scope and ownership boundary are explicit.
12
+
13
+ ## Development Setup
14
+
15
+ ```bash
16
+ git clone https://github.com/sysevol-ai/CodeNib.git
17
+ cd CodeNib
18
+ make dev
19
+ pre-commit install
20
+ ```
21
+
22
+ Toolchain-heavy graph work may also need:
23
+
24
+ ```bash
25
+ make bootstrap
26
+ make toolchain-doctor
27
+ ```
28
+
29
+ ## Change Workflow
30
+
31
+ 1. Create a focused branch from current `main`.
32
+ 2. Add or update tests at the lightest tier that exercises the behavior.
33
+ 3. Run the targeted test first, then the matching wider tier.
34
+ 4. Run `pre-commit run --all-files`.
35
+ 5. Open a PR using the repository template and include exact verification
36
+ commands.
37
+
38
+ Use Conventional Commit subjects such as
39
+ `fix(cli): reject missing manifests`. Keep unrelated refactors out of the same
40
+ change. Do not commit generated caches, credentials, model weights, or
41
+ repository-local `.codenib_cache` artifacts.
42
+
43
+ ## Test Tiers
44
+
45
+ The default unit tier is:
46
+
47
+ ```bash
48
+ pytest -m "not slow and not integration and not integration_serial and not integration_serial_consumer" -x --tb=short
49
+ ```
50
+
51
+ Run heavier tiers only when the changed surface requires them:
52
+
53
+ ```bash
54
+ pytest -m integration --tb=short
55
+ pytest -m integration_serial -v --tb=short
56
+ make lsp-smoke
57
+ make scip-cold-start-smoke
58
+ ```
59
+
60
+ Tests marked slow may require LLM credentials, GPU resources, external
61
+ repositories, or language toolchains. A failing infrastructure prerequisite
62
+ should be reported separately from a code regression.
63
+
64
+ ## Code And Documentation
65
+
66
+ - Python targets 3.10+ and is formatted with Black at line length 88.
67
+ - Use the language registry and centralized graph types instead of adding
68
+ isolated dispatch maps or string literals.
69
+ - Persisted graph schema changes require a schema-version bump and C++ decoder
70
+ parity review.
71
+ - User-facing commands and docs use CodeNib's canonical package and repository
72
+ names.
73
+
74
+ See [AGENTS.md](AGENTS.md) for the full repository contract and
75
+ [Contributing a Language](docs/contributing-a-language.md) for backend work.
76
+
77
+ ## License
78
+
79
+ By submitting a contribution, you agree that it may be distributed under the
80
+ repository's [Apache License 2.0](LICENSE).
codenib-0.1.0/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for describing the origin of the Work and
141
+ reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Support. While redistributing the Work or
166
+ Derivative Works thereof, You may choose to offer, and charge a
167
+ fee for, acceptance of support, warranty, indemnity, or other
168
+ liability obligations and/or rights consistent with this License.
169
+ However, in accepting such obligations, You may act only on Your
170
+ own behalf and on Your sole responsibility, not on behalf of any
171
+ other Contributor, and only if You agree to indemnify, defend, and
172
+ hold each Contributor harmless for any liability incurred by, or
173
+ claims asserted against, such Contributor by reason of your accepting
174
+ any such warranty or support.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
200
+ implied. See the License for the specific language governing permissions
201
+ and limitations under the License.
@@ -0,0 +1,12 @@
1
+ # SPDX-FileCopyrightText: 2025-2026 CodeNib Contributors
2
+ #
3
+ # SPDX-License-Identifier: Apache-2.0
4
+
5
+ graft web
6
+ include CHANGELOG.md
7
+ include CONTRIBUTING.md
8
+ prune web/.next
9
+ prune web/node_modules
10
+ prune web/playwright-report
11
+ prune web/test-results
12
+ global-exclude *.py[cod]
codenib-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,293 @@
1
+ Metadata-Version: 2.4
2
+ Name: codenib
3
+ Version: 0.1.0
4
+ Summary: A multi-view data system for serving repository context to coding agents
5
+ Author-email: Zhongming Yu <zhy025@ucsd.edu>
6
+ License-Expression: Apache-2.0
7
+ Project-URL: Documentation, https://docs.codenib.ai/
8
+ Project-URL: Homepage, https://codenib.ai
9
+ Project-URL: Issues, https://github.com/sysevol-ai/CodeNib/issues
10
+ Project-URL: Repository, https://github.com/sysevol-ai/CodeNib.git
11
+ Keywords: code-search,coding-agents,model-context-protocol,repository-context,static-analysis
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Programming Language :: Python :: 3 :: Only
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
20
+ Classifier: Programming Language :: Python :: 3.14
21
+ Classifier: Operating System :: OS Independent
22
+ Classifier: Topic :: Software Development
23
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
24
+ Requires-Python: >=3.10
25
+ Description-Content-Type: text/markdown
26
+ License-File: LICENSE
27
+ Requires-Dist: fastapi>=0.100.0
28
+ Requires-Dist: pydantic>=2.0.0
29
+ Requires-Dist: pyyaml>=6.0
30
+ Requires-Dist: rank_bm25>=0.2.2
31
+ Requires-Dist: rich>=14.0.0
32
+ Requires-Dist: tree-sitter>=0.25.2
33
+ Requires-Dist: tree-sitter-language-pack<1.9.0,>=1.8.1
34
+ Requires-Dist: uvicorn>=0.20.0
35
+ Provides-Extra: agent
36
+ Requires-Dist: litellm>=1.40.0; extra == "agent"
37
+ Provides-Extra: datasets
38
+ Requires-Dist: datasets>=4.0.0; extra == "datasets"
39
+ Provides-Extra: graph
40
+ Requires-Dist: igraph>=0.11.6; extra == "graph"
41
+ Requires-Dist: protobuf>=3.20.0; extra == "graph"
42
+ Provides-Extra: mcp
43
+ Requires-Dist: mcp<3,>=2.0.0; extra == "mcp"
44
+ Provides-Extra: semantic
45
+ Requires-Dist: einops>=0.8.0; extra == "semantic"
46
+ Requires-Dist: faiss-cpu>=1.7.0; extra == "semantic"
47
+ Requires-Dist: numpy>=1.24.0; extra == "semantic"
48
+ Requires-Dist: openai>=1.0.0; extra == "semantic"
49
+ Requires-Dist: sentence-transformers>=2.2.0; extra == "semantic"
50
+ Provides-Extra: vertex
51
+ Requires-Dist: litellm[google]>=1.93.0; extra == "vertex"
52
+ Provides-Extra: zoekt
53
+ Requires-Dist: requests>=2.25.0; extra == "zoekt"
54
+ Provides-Extra: full
55
+ Requires-Dist: datasets>=4.0.0; extra == "full"
56
+ Requires-Dist: einops>=0.8.0; extra == "full"
57
+ Requires-Dist: faiss-cpu>=1.7.0; extra == "full"
58
+ Requires-Dist: igraph>=0.11.6; extra == "full"
59
+ Requires-Dist: litellm[google]>=1.93.0; extra == "full"
60
+ Requires-Dist: mcp<3,>=2.0.0; extra == "full"
61
+ Requires-Dist: numpy>=1.24.0; extra == "full"
62
+ Requires-Dist: openai>=1.0.0; extra == "full"
63
+ Requires-Dist: protobuf>=3.20.0; extra == "full"
64
+ Requires-Dist: requests>=2.25.0; extra == "full"
65
+ Requires-Dist: sentence-transformers>=2.2.0; extra == "full"
66
+ Provides-Extra: dev
67
+ Requires-Dist: black>=22.3.0; extra == "dev"
68
+ Requires-Dist: build>=1.2.0; extra == "dev"
69
+ Requires-Dist: isort>=5.10.1; extra == "dev"
70
+ Requires-Dist: mypy>=0.950; extra == "dev"
71
+ Requires-Dist: flake8>=4.0.1; extra == "dev"
72
+ Requires-Dist: flake8-bugbear>=24.4.0; extra == "dev"
73
+ Requires-Dist: mkdocs-material>=9.5.0; extra == "dev"
74
+ Provides-Extra: test
75
+ Requires-Dist: datasets>=4.0.0; extra == "test"
76
+ Requires-Dist: einops>=0.8.0; extra == "test"
77
+ Requires-Dist: faiss-cpu>=1.7.0; extra == "test"
78
+ Requires-Dist: filelock>=3.0.0; extra == "test"
79
+ Requires-Dist: igraph>=0.11.6; extra == "test"
80
+ Requires-Dist: litellm>=1.40.0; extra == "test"
81
+ Requires-Dist: matplotlib>=3.4.0; extra == "test"
82
+ Requires-Dist: mcp<3,>=2.0.0; extra == "test"
83
+ Requires-Dist: numpy>=1.24.0; extra == "test"
84
+ Requires-Dist: openai>=1.0.0; extra == "test"
85
+ Requires-Dist: protobuf>=3.20.0; extra == "test"
86
+ Requires-Dist: pytest>=6.0.0; extra == "test"
87
+ Requires-Dist: pytest-cov>=3.0.0; extra == "test"
88
+ Requires-Dist: pytest-timeout>=2.1.0; extra == "test"
89
+ Requires-Dist: pytest-xdist>=3.0.0; extra == "test"
90
+ Requires-Dist: requests>=2.25.0; extra == "test"
91
+ Requires-Dist: sentence-transformers>=2.2.0; extra == "test"
92
+ Requires-Dist: tomli>=1.1.0; python_version < "3.11" and extra == "test"
93
+ Dynamic: license-file
94
+
95
+ <!--
96
+ SPDX-FileCopyrightText: 2025-2026 CodeNib Contributors
97
+
98
+ SPDX-License-Identifier: Apache-2.0
99
+ -->
100
+
101
+ <div align="center">
102
+ <img src="https://raw.githubusercontent.com/sysevol-ai/CodeNib/main/assets/codenib_logo.svg" alt="CodeNib" width="560">
103
+ <h1>A Multi-View Data System for Serving Repository Context to Coding Agents</h1>
104
+ <p>
105
+ Incremental compilation, explicit per-view manifests, and agent-native context serving.
106
+ </p>
107
+ <p>
108
+ <a href="#quickstart">Quickstart</a>
109
+ &nbsp;&middot;&nbsp;
110
+ <a href="https://codenib.ai">Website</a>
111
+ &nbsp;&middot;&nbsp;
112
+ <a href="https://discord.gg/ySer6CGn4">Discord</a>
113
+ &nbsp;&middot;&nbsp;
114
+ <a href="https://docs.codenib.ai/">Documentation</a>
115
+ &nbsp;&middot;&nbsp;
116
+ <a href="https://docs.codenib.ai/mcp/">MCP</a>
117
+ &nbsp;&middot;&nbsp;
118
+ <a href="https://docs.codenib.ai/language_capabilities/">Languages</a>
119
+ </p>
120
+ <p>
121
+ <a href="https://github.com/sysevol-ai/CodeNib/actions/workflows/ci.yml"><img src="https://github.com/sysevol-ai/CodeNib/actions/workflows/ci.yml/badge.svg" alt="CI"></a>
122
+ <a href="https://github.com/sysevol-ai/CodeNib/blob/main/LICENSE"><img src="https://img.shields.io/badge/License-Apache_2.0-blue.svg" alt="License: Apache 2.0"></a>
123
+ <a href="https://github.com/sysevol-ai/CodeNib/blob/main/pyproject.toml"><img src="https://img.shields.io/badge/Python-3.10%2B-3776AB.svg" alt="Python 3.10+"></a>
124
+ <img src="https://img.shields.io/badge/Release-Developer_Preview-EA580C.svg" alt="Developer Preview">
125
+ </p>
126
+ </div>
127
+
128
+ CodeNib is a multi-view data system for serving repository context to coding
129
+ agents. Its native runtime compiles a checkout into manifest-linked lexical,
130
+ semantic, structural, and static-navigation views, incrementally maintains
131
+ supported transitions, and serves bounded source evidence through MCP,
132
+ LSP-shaped providers, Python, and HTTP APIs.
133
+
134
+ The Wiki, Ask view, and Dependency Map are inspection clients of that same
135
+ runtime, not the system boundary. The core implementation lives in CodeNib;
136
+ optional model endpoints and language servers are providers rather than a host
137
+ agent or code-Wiki framework.
138
+
139
+ ## System Architecture
140
+
141
+ | Layer | Responsibility |
142
+ |---|---|
143
+ | Incremental compiler | Chunk source and materialize BM25, dense, graph, and navigation views; reuse or repair supported artifacts and rebuild when an update cannot be admitted |
144
+ | View manifest | Record repository identity, source fingerprint, builder profile, capabilities, status, and artifact location independently for each view |
145
+ | Context serving | Execute lexical, semantic, hybrid, reranked, and structural query plans while preserving repository-relative source locations |
146
+ | Agent runtime | Expose capability-aware MCP and LSP-shaped tools, assemble bounded evidence, and return citations that agents and humans can inspect |
147
+
148
+ ```text
149
+ repository change
150
+ -> materialize or repair affected views
151
+ -> publish a capability-bearing manifest
152
+ -> plan repository queries
153
+ -> deliver bounded, source-linked context
154
+ ```
155
+
156
+ On a later commit, CodeNib can reuse unchanged vector content and patch
157
+ supported graph transitions at file or symbol granularity. Unsupported,
158
+ inconsistent, or unverified transitions fall back to a fresh build instead of
159
+ publishing a partially updated view.
160
+
161
+ ## Quickstart
162
+
163
+ Requires Python 3.10+ and Git.
164
+
165
+ ```bash
166
+ pip install codenib
167
+ codenib wiki /path/to/repository
168
+ ```
169
+
170
+ CodeNib detects the repository languages, builds a reusable index under
171
+ `~/.codenib/repositories`, launches the local Wiki, and opens
172
+ [http://localhost:3000](http://localhost:3000). The wheel includes the
173
+ production Wiki frontend, so normal use does not require Node.js or npm and
174
+ the target repository stays untouched. This command exercises the same compiler
175
+ and serving runtime used by agents. Set `CODENIB_HOME` to relocate state.
176
+
177
+ Check the environment or index without opening the Wiki:
178
+
179
+ ```bash
180
+ codenib doctor --require core --require wiki
181
+ codenib index /path/to/repository
182
+ ```
183
+
184
+ See the
185
+ [Quickstart](https://docs.codenib.ai/quickstart/)
186
+ for ports, advanced indexing, and troubleshooting.
187
+
188
+ <p align="center">
189
+ <img src="https://raw.githubusercontent.com/sysevol-ai/CodeNib/main/assets/codenib_wiki.png" alt="CodeNib Wiki showing the source-linked reverse proxy guide for Caddy" width="100%">
190
+ </p>
191
+
192
+ ## Serve An Agent
193
+
194
+ Install the MCP extra, build once, and serve the same repository manifest over
195
+ stdio:
196
+
197
+ ```bash
198
+ pip install "codenib[mcp]"
199
+ codenib index /path/to/repository
200
+ codenib mcp /path/to/repository
201
+ ```
202
+
203
+ The MCP server advertises its full tool set and uses the compiled manifest to
204
+ decide which calls have a fresh backing view. An agent can therefore reuse
205
+ available repository work instead of rebuilding context through unbounded
206
+ `grep` and `read` loops, while unavailable searches fail explicitly. BM25,
207
+ semantic, regex, Zoekt, dependency, and static-navigation results retain source
208
+ locations for follow-up reads and citations. See
209
+ [MCP Server](https://docs.codenib.ai/mcp/)
210
+ for client configuration and tool contracts.
211
+
212
+ ## What CodeNib Provides
213
+
214
+ | Surface | Purpose |
215
+ |---|---|
216
+ | Incremental compiler | Build independently managed views, reuse unchanged content, repair supported transitions, and conservatively rebuild outside those boundaries |
217
+ | Agent context runtime | Plan capability-aware retrieval and navigation, then assemble bounded source-linked evidence |
218
+ | Retrieval | BM25, dense-vector, regex/trigram, Zoekt, fusion, and reranking paths |
219
+ | Structural context | SCIP/LSP-backed symbol graphs with source locations and typed edges |
220
+ | MCP and LSP-shaped tools | Serve one manifest to coding agents without tying the runtime to one agent framework |
221
+ | Local inspection | Audit the same context through Wiki pages, Ask answers, citations, and the Dependency Map |
222
+ | Evaluation harness | Measure retrieval, navigation, incremental maintenance, and context policies on the same artifacts |
223
+
224
+ Language support varies by surface. The generated
225
+ [capability matrix](https://docs.codenib.ai/language_capabilities/)
226
+ records chunking, graph, incremental, and C++ decoder support.
227
+
228
+ ## Documentation
229
+
230
+ - [Quickstart](https://docs.codenib.ai/quickstart/)
231
+ - [MCP Server](https://docs.codenib.ai/mcp/)
232
+ - [Web UI](https://docs.codenib.ai/web_demo/)
233
+ - [Language Capabilities](https://docs.codenib.ai/language_capabilities/)
234
+ - [Concepts and development guides](https://docs.codenib.ai/)
235
+
236
+ Build the documentation site locally with:
237
+
238
+ ```bash
239
+ pip install "codenib[dev]"
240
+ mkdocs serve
241
+ ```
242
+
243
+ ## Development
244
+
245
+ ```bash
246
+ git clone https://github.com/sysevol-ai/CodeNib.git
247
+ cd CodeNib
248
+ make dev
249
+ make test
250
+ ```
251
+
252
+ The test suite is split into unit, integration, serial integration, core,
253
+ graph-consumer, and slow tiers. See
254
+ [CI/CD](https://docs.codenib.ai/ci_cd/) before
255
+ running the credential- or toolchain-dependent tiers.
256
+
257
+ ## Status
258
+
259
+ CodeNib `0.1.0` is a developer preview. The CLI and manifest format are usable,
260
+ but public interfaces may still change before a stable release. Historical
261
+ research artifacts retain their published dataset identifiers; the maintained
262
+ package, import namespace, commands, and repository use `CodeNib`. See
263
+ [Naming](https://docs.codenib.ai/branding/).
264
+
265
+ ## Citation
266
+
267
+ If you use CodeNib in your research, please cite our
268
+ [arXiv paper](https://arxiv.org/abs/2607.25431):
269
+
270
+ ```bibtex
271
+ @misc{yu2026codenibmultiviewdataserving,
272
+ title={CodeNib: A Multi-View Data System for Serving Repository Context to Coding Agents},
273
+ author={Zhongming Yu and Hengjia Yu and Boqin Yuan and Shuting Zhao and Yizhao Chen and Aryan Dokania and Mihir Jagtap and Jiayu Chang and Yitong Ma and Yash Jayswal and Wentao Ni and Hejia Zhang and Zhaoling Chen and Gangda Deng and Jishen Zhao},
274
+ year={2026},
275
+ eprint={2607.25431},
276
+ archivePrefix={arXiv},
277
+ primaryClass={cs.SE},
278
+ url={https://arxiv.org/abs/2607.25431},
279
+ }
280
+ ```
281
+
282
+ ## Project
283
+
284
+ [Website](https://codenib.ai)
285
+ &nbsp;&middot;&nbsp;
286
+ [Changelog](https://github.com/sysevol-ai/CodeNib/blob/main/CHANGELOG.md)
287
+ &nbsp;&middot;&nbsp;
288
+ [Contributing](https://github.com/sysevol-ai/CodeNib/blob/main/CONTRIBUTING.md)
289
+
290
+ ## License
291
+
292
+ CodeNib is licensed under the
293
+ [Apache License, Version 2.0](https://github.com/sysevol-ai/CodeNib/blob/main/LICENSE).