codexa 0.4.1__tar.gz → 0.4.3__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 (195) hide show
  1. {codexa-0.4.1 → codexa-0.4.3}/PKG-INFO +37 -3
  2. {codexa-0.4.1 → codexa-0.4.3}/README.md +25 -2
  3. {codexa-0.4.1 → codexa-0.4.3}/codexa.egg-info/PKG-INFO +37 -3
  4. {codexa-0.4.1 → codexa-0.4.3}/codexa.egg-info/requires.txt +11 -0
  5. {codexa-0.4.1 → codexa-0.4.3}/pyproject.toml +12 -1
  6. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/cli/commands/index_cmd.py +5 -0
  7. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/cli/commands/init_cmd.py +5 -0
  8. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/config/settings.py +4 -0
  9. codexa-0.4.3/semantic_code_intelligence/embeddings/generator.py +269 -0
  10. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/indexing/scanner.py +3 -0
  11. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/tests/test_cli.py +2 -1
  12. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/tests/test_config.py +1 -0
  13. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/tests/test_phase13.py +3 -2
  14. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/tests/test_phase14.py +2 -1
  15. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/tests/test_phase15.py +2 -1
  16. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/tests/test_phase16.py +2 -1
  17. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/tests/test_phase17.py +2 -1
  18. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/tests/test_phase18.py +3 -2
  19. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/tests/test_phase19.py +3 -2
  20. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/tests/test_phase22.py +2 -1
  21. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/tests/test_phase23.py +2 -1
  22. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/tests/test_phase24.py +2 -1
  23. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/tests/test_phase25.py +2 -1
  24. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/tests/test_phase26.py +2 -1
  25. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/tests/test_phase27.py +2 -1
  26. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/tests/test_scanner.py +10 -0
  27. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/version.py +1 -1
  28. codexa-0.4.1/semantic_code_intelligence/embeddings/generator.py +0 -155
  29. {codexa-0.4.1 → codexa-0.4.3}/LICENSE +0 -0
  30. {codexa-0.4.1 → codexa-0.4.3}/codexa.egg-info/SOURCES.txt +0 -0
  31. {codexa-0.4.1 → codexa-0.4.3}/codexa.egg-info/dependency_links.txt +0 -0
  32. {codexa-0.4.1 → codexa-0.4.3}/codexa.egg-info/entry_points.txt +0 -0
  33. {codexa-0.4.1 → codexa-0.4.3}/codexa.egg-info/top_level.txt +0 -0
  34. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/__init__.py +0 -0
  35. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/analysis/__init__.py +0 -0
  36. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/analysis/ai_features.py +0 -0
  37. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/bridge/__init__.py +0 -0
  38. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/bridge/context_provider.py +0 -0
  39. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/bridge/protocol.py +0 -0
  40. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/bridge/server.py +0 -0
  41. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/bridge/vscode.py +0 -0
  42. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/ci/__init__.py +0 -0
  43. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/ci/hooks.py +0 -0
  44. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/ci/hotspots.py +0 -0
  45. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/ci/impact.py +0 -0
  46. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/ci/metrics.py +0 -0
  47. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/ci/pr.py +0 -0
  48. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/ci/quality.py +0 -0
  49. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/ci/templates.py +0 -0
  50. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/ci/trace.py +0 -0
  51. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/cli/__init__.py +0 -0
  52. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/cli/commands/__init__.py +0 -0
  53. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/cli/commands/ask_cmd.py +0 -0
  54. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/cli/commands/benchmark_cmd.py +0 -0
  55. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/cli/commands/chat_cmd.py +0 -0
  56. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/cli/commands/ci_gen_cmd.py +0 -0
  57. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/cli/commands/context_cmd.py +0 -0
  58. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/cli/commands/cross_refactor_cmd.py +0 -0
  59. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/cli/commands/deps_cmd.py +0 -0
  60. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/cli/commands/docs_cmd.py +0 -0
  61. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/cli/commands/doctor_cmd.py +0 -0
  62. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/cli/commands/evolve_cmd.py +0 -0
  63. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/cli/commands/explain_cmd.py +0 -0
  64. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/cli/commands/gate_cmd.py +0 -0
  65. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/cli/commands/grep_cmd.py +0 -0
  66. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/cli/commands/hotspots_cmd.py +0 -0
  67. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/cli/commands/impact_cmd.py +0 -0
  68. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/cli/commands/investigate_cmd.py +0 -0
  69. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/cli/commands/languages_cmd.py +0 -0
  70. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/cli/commands/lsp_cmd.py +0 -0
  71. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/cli/commands/mcp_cmd.py +0 -0
  72. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/cli/commands/metrics_cmd.py +0 -0
  73. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/cli/commands/models_cmd.py +0 -0
  74. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/cli/commands/plugin_cmd.py +0 -0
  75. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/cli/commands/pr_summary_cmd.py +0 -0
  76. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/cli/commands/quality_cmd.py +0 -0
  77. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/cli/commands/refactor_cmd.py +0 -0
  78. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/cli/commands/review_cmd.py +0 -0
  79. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/cli/commands/search_cmd.py +0 -0
  80. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/cli/commands/serve_cmd.py +0 -0
  81. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/cli/commands/suggest_cmd.py +0 -0
  82. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/cli/commands/summary_cmd.py +0 -0
  83. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/cli/commands/tool_cmd.py +0 -0
  84. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/cli/commands/trace_cmd.py +0 -0
  85. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/cli/commands/tui_cmd.py +0 -0
  86. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/cli/commands/viz_cmd.py +0 -0
  87. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/cli/commands/watch_cmd.py +0 -0
  88. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/cli/commands/web_cmd.py +0 -0
  89. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/cli/commands/workspace_cmd.py +0 -0
  90. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/cli/main.py +0 -0
  91. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/cli/router.py +0 -0
  92. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/config/__init__.py +0 -0
  93. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/context/__init__.py +0 -0
  94. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/context/engine.py +0 -0
  95. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/context/memory.py +0 -0
  96. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/daemon/__init__.py +0 -0
  97. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/daemon/watcher.py +0 -0
  98. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/docs/__init__.py +0 -0
  99. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/embeddings/__init__.py +0 -0
  100. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/embeddings/enhanced.py +0 -0
  101. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/embeddings/model_registry.py +0 -0
  102. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/evolution/__init__.py +0 -0
  103. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/evolution/budget_guard.py +0 -0
  104. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/evolution/commit_manager.py +0 -0
  105. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/evolution/context_builder.py +0 -0
  106. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/evolution/engine.py +0 -0
  107. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/evolution/patch_generator.py +0 -0
  108. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/evolution/task_selector.py +0 -0
  109. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/evolution/test_runner.py +0 -0
  110. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/indexing/__init__.py +0 -0
  111. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/indexing/chunker.py +0 -0
  112. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/indexing/parallel.py +0 -0
  113. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/indexing/semantic_chunker.py +0 -0
  114. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/llm/__init__.py +0 -0
  115. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/llm/cache.py +0 -0
  116. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/llm/cached_provider.py +0 -0
  117. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/llm/conversation.py +0 -0
  118. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/llm/cross_refactor.py +0 -0
  119. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/llm/investigation.py +0 -0
  120. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/llm/mock_provider.py +0 -0
  121. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/llm/ollama_provider.py +0 -0
  122. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/llm/openai_provider.py +0 -0
  123. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/llm/provider.py +0 -0
  124. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/llm/rate_limiter.py +0 -0
  125. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/llm/reasoning.py +0 -0
  126. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/llm/safety.py +0 -0
  127. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/llm/streaming.py +0 -0
  128. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/lsp/__init__.py +0 -0
  129. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/mcp/__init__.py +0 -0
  130. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/parsing/__init__.py +0 -0
  131. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/parsing/parser.py +0 -0
  132. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/plugins/__init__.py +0 -0
  133. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/plugins/examples/__init__.py +0 -0
  134. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/plugins/examples/code_quality.py +0 -0
  135. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/plugins/examples/search_annotator.py +0 -0
  136. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/scalability/__init__.py +0 -0
  137. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/search/__init__.py +0 -0
  138. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/search/formatter.py +0 -0
  139. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/search/grep.py +0 -0
  140. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/search/hybrid_search.py +0 -0
  141. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/search/keyword_search.py +0 -0
  142. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/search/section_expander.py +0 -0
  143. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/services/__init__.py +0 -0
  144. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/services/indexing_service.py +0 -0
  145. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/services/search_service.py +0 -0
  146. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/storage/__init__.py +0 -0
  147. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/storage/chunk_hash_store.py +0 -0
  148. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/storage/hash_store.py +0 -0
  149. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/storage/index_manifest.py +0 -0
  150. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/storage/index_stats.py +0 -0
  151. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/storage/query_history.py +0 -0
  152. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/storage/symbol_registry.py +0 -0
  153. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/storage/vector_store.py +0 -0
  154. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/tests/__init__.py +0 -0
  155. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/tests/test_ai_features.py +0 -0
  156. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/tests/test_chunker.py +0 -0
  157. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/tests/test_context.py +0 -0
  158. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/tests/test_embeddings.py +0 -0
  159. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/tests/test_endtoend.py +0 -0
  160. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/tests/test_enhanced_embeddings.py +0 -0
  161. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/tests/test_hash_store.py +0 -0
  162. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/tests/test_logging.py +0 -0
  163. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/tests/test_new_cli.py +0 -0
  164. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/tests/test_parser.py +0 -0
  165. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/tests/test_phase10.py +0 -0
  166. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/tests/test_phase11.py +0 -0
  167. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/tests/test_phase12.py +0 -0
  168. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/tests/test_phase20.py +0 -0
  169. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/tests/test_phase20b.py +0 -0
  170. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/tests/test_phase20c.py +0 -0
  171. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/tests/test_phase21.py +0 -0
  172. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/tests/test_phase8.py +0 -0
  173. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/tests/test_phase9.py +0 -0
  174. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/tests/test_plugins.py +0 -0
  175. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/tests/test_priority_features.py +0 -0
  176. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/tests/test_router.py +0 -0
  177. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/tests/test_scalability.py +0 -0
  178. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/tests/test_search.py +0 -0
  179. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/tests/test_semantic_chunker.py +0 -0
  180. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/tests/test_tools.py +0 -0
  181. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/tests/test_vector_store.py +0 -0
  182. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/tests/test_watcher.py +0 -0
  183. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/tools/__init__.py +0 -0
  184. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/tools/executor.py +0 -0
  185. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/tools/protocol.py +0 -0
  186. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/tui/__init__.py +0 -0
  187. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/utils/__init__.py +0 -0
  188. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/utils/logging.py +0 -0
  189. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/web/__init__.py +0 -0
  190. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/web/api.py +0 -0
  191. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/web/server.py +0 -0
  192. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/web/ui.py +0 -0
  193. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/web/visualize.py +0 -0
  194. {codexa-0.4.1 → codexa-0.4.3}/semantic_code_intelligence/workspace/__init__.py +0 -0
  195. {codexa-0.4.1 → codexa-0.4.3}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: codexa
3
- Version: 0.4.1
3
+ Version: 0.4.3
4
4
  Summary: Developer intelligence CLI — semantic code search, AI-assisted understanding, and agent tooling for codebases
5
5
  License: MIT
6
6
  Project-URL: Homepage, https://codex-a.dev
@@ -28,7 +28,18 @@ License-File: LICENSE
28
28
  Requires-Dist: click>=8.1.0
29
29
  Requires-Dist: pydantic>=2.0.0
30
30
  Requires-Dist: rich>=13.0.0
31
+ Requires-Dist: numpy>=1.24.0
31
32
  Requires-Dist: tree-sitter>=0.21.0
33
+ Requires-Dist: tree-sitter-python>=0.21.0
34
+ Requires-Dist: tree-sitter-javascript>=0.21.0
35
+ Requires-Dist: tree-sitter-typescript>=0.21.0
36
+ Requires-Dist: tree-sitter-java>=0.21.0
37
+ Requires-Dist: tree-sitter-go>=0.21.0
38
+ Requires-Dist: tree-sitter-rust>=0.21.0
39
+ Requires-Dist: tree-sitter-cpp>=0.21.0
40
+ Requires-Dist: tree-sitter-c-sharp>=0.21.0
41
+ Requires-Dist: tree-sitter-ruby>=0.21.0
42
+ Requires-Dist: tree-sitter-php>=0.22.0
32
43
  Requires-Dist: radon>=6.0.0
33
44
  Requires-Dist: bandit>=1.7.0
34
45
  Requires-Dist: mcp>=1.0.0
@@ -55,7 +66,7 @@ Dynamic: license-file
55
66
  <p align="center">
56
67
  <a href="https://github.com/M9nx/CodexA/actions"><img src="https://github.com/M9nx/CodexA/actions/workflows/ci.yml/badge.svg" alt="CI"></a>
57
68
  <img src="https://img.shields.io/badge/python-3.11%2B-blue" alt="Python 3.11+">
58
- <img src="https://img.shields.io/badge/version-0.4.0-green" alt="Version">
69
+ <img src="https://img.shields.io/badge/version-0.4.3-green" alt="Version">
59
70
  <img src="https://img.shields.io/badge/tests-2595-brightgreen" alt="Tests">
60
71
  <img src="https://img.shields.io/badge/coverage-79%25-brightgreen" alt="Coverage">
61
72
  <img src="https://img.shields.io/badge/mypy-strict-blue" alt="mypy strict">
@@ -95,6 +106,12 @@ structured tool protocol that any AI agent can call over HTTP or CLI.
95
106
  pip install codexa
96
107
  ```
97
108
 
109
+ For semantic indexing and vector search, install the ML extras:
110
+
111
+ ```bash
112
+ pip install "codexa[ml]"
113
+ ```
114
+
98
115
  Or install from source:
99
116
 
100
117
  ```bash
@@ -133,6 +150,23 @@ codexa index .
133
150
 
134
151
  This parses all source files (Python, JS/TS, Java, Go, Rust, C#, Ruby, C++),
135
152
  extracts symbols, generates embeddings, and stores them in a local FAISS index.
153
+ Semantic indexing requires `codexa[ml]`.
154
+
155
+ If you need to keep secrets, generated files, or local config files out of the
156
+ index, add patterns to `.codexaignore` at the project root or configure
157
+ `index.exclude_files` in `.codexa/config.json`.
158
+
159
+ Typical `.codexaignore` example:
160
+
161
+ ```text
162
+ .env*
163
+ secrets/*.json
164
+ config/local-*.yml
165
+ vendor/*
166
+ ```
167
+
168
+ The default embedding model is small, but the PyTorch backend still needs about
169
+ 2 GB of available RAM. On lower-memory machines, prefer the ONNX backend.
136
170
 
137
171
  ### 4. Semantic Search
138
172
 
@@ -250,7 +284,7 @@ cd CodexA
250
284
  pip install -e ".[dev]"
251
285
 
252
286
  # Verify
253
- codexa --version # → codexa, version 0.4.0
287
+ codexa --version # → codexa, version 0.4.3
254
288
  ```
255
289
 
256
290
  ### Step 2 — Initialize your target project
@@ -6,7 +6,7 @@
6
6
  <p align="center">
7
7
  <a href="https://github.com/M9nx/CodexA/actions"><img src="https://github.com/M9nx/CodexA/actions/workflows/ci.yml/badge.svg" alt="CI"></a>
8
8
  <img src="https://img.shields.io/badge/python-3.11%2B-blue" alt="Python 3.11+">
9
- <img src="https://img.shields.io/badge/version-0.4.0-green" alt="Version">
9
+ <img src="https://img.shields.io/badge/version-0.4.3-green" alt="Version">
10
10
  <img src="https://img.shields.io/badge/tests-2595-brightgreen" alt="Tests">
11
11
  <img src="https://img.shields.io/badge/coverage-79%25-brightgreen" alt="Coverage">
12
12
  <img src="https://img.shields.io/badge/mypy-strict-blue" alt="mypy strict">
@@ -46,6 +46,12 @@ structured tool protocol that any AI agent can call over HTTP or CLI.
46
46
  pip install codexa
47
47
  ```
48
48
 
49
+ For semantic indexing and vector search, install the ML extras:
50
+
51
+ ```bash
52
+ pip install "codexa[ml]"
53
+ ```
54
+
49
55
  Or install from source:
50
56
 
51
57
  ```bash
@@ -84,6 +90,23 @@ codexa index .
84
90
 
85
91
  This parses all source files (Python, JS/TS, Java, Go, Rust, C#, Ruby, C++),
86
92
  extracts symbols, generates embeddings, and stores them in a local FAISS index.
93
+ Semantic indexing requires `codexa[ml]`.
94
+
95
+ If you need to keep secrets, generated files, or local config files out of the
96
+ index, add patterns to `.codexaignore` at the project root or configure
97
+ `index.exclude_files` in `.codexa/config.json`.
98
+
99
+ Typical `.codexaignore` example:
100
+
101
+ ```text
102
+ .env*
103
+ secrets/*.json
104
+ config/local-*.yml
105
+ vendor/*
106
+ ```
107
+
108
+ The default embedding model is small, but the PyTorch backend still needs about
109
+ 2 GB of available RAM. On lower-memory machines, prefer the ONNX backend.
87
110
 
88
111
  ### 4. Semantic Search
89
112
 
@@ -201,7 +224,7 @@ cd CodexA
201
224
  pip install -e ".[dev]"
202
225
 
203
226
  # Verify
204
- codexa --version # → codexa, version 0.4.0
227
+ codexa --version # → codexa, version 0.4.3
205
228
  ```
206
229
 
207
230
  ### Step 2 — Initialize your target project
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: codexa
3
- Version: 0.4.1
3
+ Version: 0.4.3
4
4
  Summary: Developer intelligence CLI — semantic code search, AI-assisted understanding, and agent tooling for codebases
5
5
  License: MIT
6
6
  Project-URL: Homepage, https://codex-a.dev
@@ -28,7 +28,18 @@ License-File: LICENSE
28
28
  Requires-Dist: click>=8.1.0
29
29
  Requires-Dist: pydantic>=2.0.0
30
30
  Requires-Dist: rich>=13.0.0
31
+ Requires-Dist: numpy>=1.24.0
31
32
  Requires-Dist: tree-sitter>=0.21.0
33
+ Requires-Dist: tree-sitter-python>=0.21.0
34
+ Requires-Dist: tree-sitter-javascript>=0.21.0
35
+ Requires-Dist: tree-sitter-typescript>=0.21.0
36
+ Requires-Dist: tree-sitter-java>=0.21.0
37
+ Requires-Dist: tree-sitter-go>=0.21.0
38
+ Requires-Dist: tree-sitter-rust>=0.21.0
39
+ Requires-Dist: tree-sitter-cpp>=0.21.0
40
+ Requires-Dist: tree-sitter-c-sharp>=0.21.0
41
+ Requires-Dist: tree-sitter-ruby>=0.21.0
42
+ Requires-Dist: tree-sitter-php>=0.22.0
32
43
  Requires-Dist: radon>=6.0.0
33
44
  Requires-Dist: bandit>=1.7.0
34
45
  Requires-Dist: mcp>=1.0.0
@@ -55,7 +66,7 @@ Dynamic: license-file
55
66
  <p align="center">
56
67
  <a href="https://github.com/M9nx/CodexA/actions"><img src="https://github.com/M9nx/CodexA/actions/workflows/ci.yml/badge.svg" alt="CI"></a>
57
68
  <img src="https://img.shields.io/badge/python-3.11%2B-blue" alt="Python 3.11+">
58
- <img src="https://img.shields.io/badge/version-0.4.0-green" alt="Version">
69
+ <img src="https://img.shields.io/badge/version-0.4.3-green" alt="Version">
59
70
  <img src="https://img.shields.io/badge/tests-2595-brightgreen" alt="Tests">
60
71
  <img src="https://img.shields.io/badge/coverage-79%25-brightgreen" alt="Coverage">
61
72
  <img src="https://img.shields.io/badge/mypy-strict-blue" alt="mypy strict">
@@ -95,6 +106,12 @@ structured tool protocol that any AI agent can call over HTTP or CLI.
95
106
  pip install codexa
96
107
  ```
97
108
 
109
+ For semantic indexing and vector search, install the ML extras:
110
+
111
+ ```bash
112
+ pip install "codexa[ml]"
113
+ ```
114
+
98
115
  Or install from source:
99
116
 
100
117
  ```bash
@@ -133,6 +150,23 @@ codexa index .
133
150
 
134
151
  This parses all source files (Python, JS/TS, Java, Go, Rust, C#, Ruby, C++),
135
152
  extracts symbols, generates embeddings, and stores them in a local FAISS index.
153
+ Semantic indexing requires `codexa[ml]`.
154
+
155
+ If you need to keep secrets, generated files, or local config files out of the
156
+ index, add patterns to `.codexaignore` at the project root or configure
157
+ `index.exclude_files` in `.codexa/config.json`.
158
+
159
+ Typical `.codexaignore` example:
160
+
161
+ ```text
162
+ .env*
163
+ secrets/*.json
164
+ config/local-*.yml
165
+ vendor/*
166
+ ```
167
+
168
+ The default embedding model is small, but the PyTorch backend still needs about
169
+ 2 GB of available RAM. On lower-memory machines, prefer the ONNX backend.
136
170
 
137
171
  ### 4. Semantic Search
138
172
 
@@ -250,7 +284,7 @@ cd CodexA
250
284
  pip install -e ".[dev]"
251
285
 
252
286
  # Verify
253
- codexa --version # → codexa, version 0.4.0
287
+ codexa --version # → codexa, version 0.4.3
254
288
  ```
255
289
 
256
290
  ### Step 2 — Initialize your target project
@@ -1,7 +1,18 @@
1
1
  click>=8.1.0
2
2
  pydantic>=2.0.0
3
3
  rich>=13.0.0
4
+ numpy>=1.24.0
4
5
  tree-sitter>=0.21.0
6
+ tree-sitter-python>=0.21.0
7
+ tree-sitter-javascript>=0.21.0
8
+ tree-sitter-typescript>=0.21.0
9
+ tree-sitter-java>=0.21.0
10
+ tree-sitter-go>=0.21.0
11
+ tree-sitter-rust>=0.21.0
12
+ tree-sitter-cpp>=0.21.0
13
+ tree-sitter-c-sharp>=0.21.0
14
+ tree-sitter-ruby>=0.21.0
15
+ tree-sitter-php>=0.22.0
5
16
  radon>=6.0.0
6
17
  bandit>=1.7.0
7
18
  mcp>=1.0.0
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "codexa"
7
- version = "0.4.1"
7
+ version = "0.4.3"
8
8
  description = "Developer intelligence CLI — semantic code search, AI-assisted understanding, and agent tooling for codebases"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.11"
@@ -40,7 +40,18 @@ dependencies = [
40
40
  "click>=8.1.0",
41
41
  "pydantic>=2.0.0",
42
42
  "rich>=13.0.0",
43
+ "numpy>=1.24.0",
43
44
  "tree-sitter>=0.21.0",
45
+ "tree-sitter-python>=0.21.0",
46
+ "tree-sitter-javascript>=0.21.0",
47
+ "tree-sitter-typescript>=0.21.0",
48
+ "tree-sitter-java>=0.21.0",
49
+ "tree-sitter-go>=0.21.0",
50
+ "tree-sitter-rust>=0.21.0",
51
+ "tree-sitter-cpp>=0.21.0",
52
+ "tree-sitter-c-sharp>=0.21.0",
53
+ "tree-sitter-ruby>=0.21.0",
54
+ "tree-sitter-php>=0.22.0",
44
55
  "radon>=6.0.0",
45
56
  "bandit>=1.7.0",
46
57
  "mcp>=1.0.0",
@@ -122,6 +122,11 @@ def index_cmd(ctx: click.Context, path: str, force: bool, watch: bool) -> None:
122
122
 
123
123
  try:
124
124
  result = run_indexing(project_root=root, force=force)
125
+ except MemoryError as e:
126
+ print_error(f"Indexing failed: {e}")
127
+ print_info("Tip: semantic indexing needs the ML extras and enough RAM. Install with 'pip install codexa[ml]' and prefer ONNX or a machine with at least 2 GB available RAM.")
128
+ ctx.exit(1)
129
+ return
125
130
  except Exception as e:
126
131
  print_error(f"Indexing failed: {e}")
127
132
  logger.debug("Indexing error details:", exc_info=True)
@@ -131,9 +131,11 @@ def init_cmd(ctx: click.Context, path: str, auto_index: bool, setup_vscode: bool
131
131
  else:
132
132
  print_info("")
133
133
  print_info("Next steps:")
134
+ print_info(" pip install 'codexa[ml]' — Enable semantic indexing and vector search")
134
135
  print_info(" codexa index — Build the search index")
135
136
  print_info(" codexa search — Search your code")
136
137
  print_info(" codexa grep — Raw file search (no index needed)")
138
+ print_info(" .codexaignore — Exclude secrets or generated files from indexing")
137
139
 
138
140
 
139
141
  def _run_index(root: Path) -> None:
@@ -147,6 +149,9 @@ def _run_index(root: Path) -> None:
147
149
  f"Indexed {result.chunks_stored} chunks from "
148
150
  f"{result.files_scanned} files"
149
151
  )
152
+ except MemoryError as e:
153
+ print_warning(f"Indexing failed: {e}")
154
+ print_info("Tip: install 'codexa[ml]' for semantic indexing and use a machine with at least 2 GB available RAM, or prefer the ONNX backend.")
150
155
  except Exception as e:
151
156
  print_warning(f"Indexing failed: {e}")
152
157
  print_info("Run 'codexa index' manually to build the index.")
@@ -100,6 +100,10 @@ class IndexConfig(BaseModel):
100
100
 
101
101
  ignore_dirs: set[str] = Field(default_factory=lambda: DEFAULT_IGNORE_DIRS.copy())
102
102
  extensions: set[str] = Field(default_factory=lambda: DEFAULT_EXTENSIONS.copy())
103
+ exclude_files: set[str] = Field(
104
+ default_factory=set,
105
+ description="Glob patterns for files to exclude from indexing.",
106
+ )
103
107
  use_incremental: bool = Field(
104
108
  default=True,
105
109
  description="Enable incremental indexing using file hashes.",
@@ -0,0 +1,269 @@
1
+ """Embedding generator — converts code chunks into vector embeddings.
2
+
3
+ Supports two backends:
4
+ - **sentence-transformers** (default): PyTorch-based, full-featured.
5
+ - **onnx**: Lightweight ONNX Runtime backend via ``optimum`` — lower
6
+ memory (~50% less) and often faster inference on CPU.
7
+ """
8
+
9
+ from __future__ import annotations
10
+
11
+ import logging
12
+ import os
13
+ from pathlib import Path
14
+ import sys
15
+ from typing import TYPE_CHECKING, Any
16
+
17
+ import numpy as np
18
+
19
+ from semantic_code_intelligence.embeddings.model_registry import resolve_model_name
20
+ from semantic_code_intelligence.utils.logging import get_logger
21
+
22
+ if TYPE_CHECKING:
23
+ from sentence_transformers import SentenceTransformer
24
+
25
+ logger = get_logger("embeddings")
26
+
27
+ # Module-level cache for loaded model instances
28
+ _model_cache: dict[str, "SentenceTransformer"] = {}
29
+ _MIN_TORCH_RAM_BYTES = 2 * 1024 * 1024 * 1024
30
+
31
+
32
+ def _configure_hf_token() -> None:
33
+ """Set HF_TOKEN from common env vars if not already set.
34
+
35
+ Checks ``HF_TOKEN``, ``HUGGING_FACE_HUB_TOKEN``, and
36
+ ``HUGGINGFACE_TOKEN`` so the user only needs to export one.
37
+ """
38
+ if os.environ.get("HF_TOKEN"):
39
+ return
40
+ for var in ("HUGGING_FACE_HUB_TOKEN", "HUGGINGFACE_TOKEN"):
41
+ value = os.environ.get(var)
42
+ if value:
43
+ os.environ["HF_TOKEN"] = value
44
+ return
45
+
46
+
47
+ def _onnx_available() -> bool:
48
+ """Check if the ONNX Runtime backend is available."""
49
+ try:
50
+ import optimum # noqa: F401
51
+ import onnxruntime # noqa: F401
52
+ return True
53
+ except ImportError:
54
+ return False
55
+
56
+
57
+ def _model_cached_locally(model_name: str) -> bool:
58
+ """Check if a HuggingFace model is already downloaded to the local cache.
59
+
60
+ Looks in the standard ``HF_HOME`` / ``TRANSFORMERS_CACHE`` directory
61
+ for a snapshot of the model so we can skip network calls when loading.
62
+ """
63
+ try:
64
+ from huggingface_hub import try_to_load_from_cache
65
+ # Check for key model file in the cache
66
+ result = try_to_load_from_cache(model_name, "config.json")
67
+ return isinstance(result, str) # str path means it's cached
68
+ except Exception:
69
+ # Also check via the default HF cache directory structure
70
+ hf_home = Path(os.environ.get("HF_HOME", Path.home() / ".cache" / "huggingface"))
71
+ hub_dir = hf_home / "hub"
72
+ if not hub_dir.exists():
73
+ return False
74
+ # HF stores models as models--org--name
75
+ model_dir_name = "models--" + model_name.replace("/", "--")
76
+ model_dir = hub_dir / model_dir_name
77
+ return model_dir.exists() and any(model_dir.rglob("config.json"))
78
+
79
+
80
+ def _get_available_memory_bytes() -> int | None:
81
+ """Return approximate available system memory, if detectable."""
82
+ if sys.platform.startswith("linux"):
83
+ try:
84
+ with open("/proc/meminfo", encoding="utf-8") as handle:
85
+ for line in handle:
86
+ if line.startswith("MemAvailable:"):
87
+ parts = line.split()
88
+ return int(parts[1]) * 1024
89
+ except OSError:
90
+ return None
91
+
92
+ if sys.platform == "win32":
93
+ try:
94
+ import ctypes
95
+
96
+ class MEMORYSTATUSEX(ctypes.Structure):
97
+ _fields_ = [
98
+ ("dwLength", ctypes.c_ulong),
99
+ ("dwMemoryLoad", ctypes.c_ulong),
100
+ ("ullTotalPhys", ctypes.c_ulonglong),
101
+ ("ullAvailPhys", ctypes.c_ulonglong),
102
+ ("ullTotalPageFile", ctypes.c_ulonglong),
103
+ ("ullAvailPageFile", ctypes.c_ulonglong),
104
+ ("ullTotalVirtual", ctypes.c_ulonglong),
105
+ ("ullAvailVirtual", ctypes.c_ulonglong),
106
+ ("sullAvailExtendedVirtual", ctypes.c_ulonglong),
107
+ ]
108
+
109
+ status = MEMORYSTATUSEX()
110
+ status.dwLength = ctypes.sizeof(MEMORYSTATUSEX)
111
+ if ctypes.windll.kernel32.GlobalMemoryStatusEx(ctypes.byref(status)):
112
+ return int(status.ullAvailPhys)
113
+ except Exception:
114
+ return None
115
+
116
+ return None
117
+
118
+
119
+ def _check_memory_requirements(use_onnx: bool) -> None:
120
+ """Warn on low-memory systems when using the torch backend."""
121
+ if use_onnx:
122
+ return
123
+
124
+ available_memory = _get_available_memory_bytes()
125
+ if available_memory is None or available_memory >= _MIN_TORCH_RAM_BYTES:
126
+ return
127
+
128
+ available_gb = available_memory / (1024 * 1024 * 1024)
129
+ required_gb = _MIN_TORCH_RAM_BYTES / (1024 * 1024 * 1024)
130
+ logger.warning(
131
+ "Low available RAM detected for the PyTorch embedding backend "
132
+ "(%.1f GB available, about %.0f GB recommended). If indexing fails, "
133
+ "prefer the ONNX backend or a machine with more memory.",
134
+ available_gb,
135
+ required_gb,
136
+ )
137
+
138
+
139
+ def get_model(
140
+ model_name: str = "all-MiniLM-L6-v2",
141
+ backend: str = "auto",
142
+ ) -> "SentenceTransformer":
143
+ """Load and cache a sentence-transformers model.
144
+
145
+ Args:
146
+ model_name: Name of the model to load (full HF name or alias).
147
+ backend: ``"auto"`` (ONNX if available, else PyTorch),
148
+ ``"onnx"``, or ``"torch"``.
149
+
150
+ Returns:
151
+ A SentenceTransformer model instance.
152
+ """
153
+ model_name = resolve_model_name(model_name)
154
+ cache_key = f"{model_name}:{backend}"
155
+
156
+ if cache_key not in _model_cache:
157
+ _configure_hf_token()
158
+ try:
159
+ from sentence_transformers import SentenceTransformer
160
+ except ImportError:
161
+ raise ImportError(
162
+ "sentence-transformers is required for embeddings. "
163
+ "Install it with: pip install codexa[ml]"
164
+ ) from None
165
+
166
+ # Suppress noisy HuggingFace Hub HTTP logs when model is cached
167
+ local_only = _model_cached_locally(model_name)
168
+ if local_only:
169
+ logger.debug("Model %s found in local cache — skipping network checks.", model_name)
170
+ # Quieten HF/transformers loggers that spam HTTP HEAD requests
171
+ for noisy_logger in ("huggingface_hub", "transformers", "sentence_transformers"):
172
+ logging.getLogger(noisy_logger).setLevel(logging.WARNING)
173
+
174
+ use_onnx = False
175
+ if backend == "onnx":
176
+ if _onnx_available():
177
+ use_onnx = True
178
+ else:
179
+ logger.warning("ONNX requested but optimum/onnxruntime not installed; falling back to PyTorch.")
180
+ elif backend == "auto" and _onnx_available():
181
+ use_onnx = True
182
+
183
+ _check_memory_requirements(use_onnx)
184
+
185
+ logger.info("Loading embedding model: %s (backend=%s)", model_name, "onnx" if use_onnx else "torch")
186
+
187
+ load_kwargs: dict[str, Any] = {}
188
+ if local_only:
189
+ load_kwargs["local_files_only"] = True
190
+
191
+ if use_onnx:
192
+ try:
193
+ _model_cache[cache_key] = SentenceTransformer(model_name, backend="onnx", **load_kwargs)
194
+ logger.info("Model loaded with ONNX backend.")
195
+ return _model_cache[cache_key]
196
+ except Exception:
197
+ logger.warning("ONNX load failed; falling back to PyTorch.")
198
+
199
+ try:
200
+ _model_cache[cache_key] = SentenceTransformer(model_name, **load_kwargs)
201
+ except OSError:
202
+ if local_only:
203
+ # Cache may be corrupted — retry with network access
204
+ logger.warning("Local cache load failed; re-downloading model.")
205
+ _model_cache[cache_key] = SentenceTransformer(model_name)
206
+ else:
207
+ raise
208
+ except RuntimeError as exc:
209
+ if "out of memory" in str(exc).lower():
210
+ raise MemoryError(
211
+ "Embedding model loading ran out of memory. Try the ONNX backend or use a machine with at least 2 GB of available RAM."
212
+ ) from exc
213
+ raise
214
+ logger.info("Model loaded successfully (PyTorch).")
215
+
216
+ return _model_cache[cache_key]
217
+
218
+
219
+ def generate_embeddings(
220
+ texts: list[str],
221
+ model_name: str = "all-MiniLM-L6-v2",
222
+ batch_size: int = 64,
223
+ show_progress: bool = False,
224
+ backend: str = "auto",
225
+ ) -> np.ndarray:
226
+ """Generate vector embeddings for a list of text strings.
227
+
228
+ Args:
229
+ texts: List of code/text strings to embed.
230
+ model_name: Name of the sentence-transformers model (or alias).
231
+ batch_size: Batch size for encoding.
232
+ show_progress: Whether to show a progress bar.
233
+ backend: ``"auto"``, ``"onnx"``, or ``"torch"``.
234
+
235
+ Returns:
236
+ NumPy array of shape (len(texts), embedding_dim).
237
+ """
238
+ if not texts:
239
+ return np.array([], dtype=np.float32).reshape(0, 0)
240
+
241
+ model = get_model(model_name, backend=backend)
242
+ embeddings = model.encode(
243
+ texts,
244
+ batch_size=batch_size,
245
+ show_progress_bar=show_progress,
246
+ convert_to_numpy=True,
247
+ normalize_embeddings=True,
248
+ )
249
+ return embeddings.astype(np.float32)
250
+
251
+
252
+ def get_embedding_dimension(
253
+ model_name: str = "all-MiniLM-L6-v2",
254
+ backend: str = "auto",
255
+ ) -> int:
256
+ """Return the dimensionality of embeddings produced by the given model.
257
+
258
+ Args:
259
+ model_name: Name of the sentence-transformers model (or alias).
260
+ backend: ``"auto"``, ``"onnx"``, or ``"torch"``.
261
+
262
+ Returns:
263
+ Integer dimension of the embedding vectors.
264
+ """
265
+ model = get_model(model_name, backend=backend)
266
+ dim = model.get_sentence_embedding_dimension()
267
+ if dim is None:
268
+ raise RuntimeError(f"Model {model_name!r} returned None for embedding dimension")
269
+ return dim
@@ -108,6 +108,7 @@ def scan_repository(
108
108
 
109
109
  root = root.resolve()
110
110
  ignore_patterns = _load_ignore_patterns(root)
111
+ config_exclude_patterns = [pattern.replace("\\", "/") for pattern in index_config.exclude_files]
111
112
  results: list[ScannedFile] = []
112
113
 
113
114
  for file_path in sorted(root.rglob("*")):
@@ -127,6 +128,8 @@ def scan_repository(
127
128
  continue
128
129
  if ignore_patterns and _matches_ignore_patterns(rel, ignore_patterns):
129
130
  continue
131
+ if config_exclude_patterns and _matches_ignore_patterns(rel, config_exclude_patterns):
132
+ continue
130
133
 
131
134
  try:
132
135
  size = file_path.stat().st_size
@@ -38,7 +38,7 @@ class TestCLIMain:
38
38
  def test_cli_version(self, runner: CliRunner):
39
39
  result = runner.invoke(cli, ["--version"])
40
40
  assert result.exit_code == 0
41
- assert "0.4.1" in result.output
41
+ assert "0.4.3" in result.output
42
42
 
43
43
  def test_cli_verbose_flag(self, runner: CliRunner):
44
44
  result = runner.invoke(cli, ["--verbose", "--help"])
@@ -186,3 +186,4 @@ class TestCommandRouting:
186
186
  def test_unknown_command_fails(self, runner: CliRunner):
187
187
  result = runner.invoke(cli, ["nonexistent"])
188
188
  assert result.exit_code != 0
189
+
@@ -38,6 +38,7 @@ class TestDefaultConfigs:
38
38
  cfg = IndexConfig()
39
39
  assert cfg.ignore_dirs == DEFAULT_IGNORE_DIRS
40
40
  assert cfg.extensions == DEFAULT_EXTENSIONS
41
+ assert cfg.exclude_files == set()
41
42
  assert cfg.use_incremental is True
42
43
 
43
44
  def test_app_config_defaults(self):
@@ -492,7 +492,7 @@ class TestPipelineMode:
492
492
  def test_version_option(self):
493
493
  runner = CliRunner()
494
494
  result = runner.invoke(cli, ["--version"])
495
- assert "0.4.1" in result.output
495
+ assert "0.4.3" in result.output
496
496
 
497
497
 
498
498
  # =========================================================================
@@ -652,7 +652,7 @@ class TestProjectMetadata:
652
652
 
653
653
  def test_version_is_0_13(self):
654
654
  from semantic_code_intelligence import __version__
655
- assert __version__ == "0.4.1"
655
+ assert __version__ == "0.4.3"
656
656
 
657
657
  def test_app_name(self):
658
658
  from semantic_code_intelligence import __app_name__
@@ -661,3 +661,4 @@ class TestProjectMetadata:
661
661
  def test_pyproject_exists(self):
662
662
  root = Path(__file__).resolve().parent.parent.parent
663
663
  assert (root / "pyproject.toml").is_file()
664
+
@@ -515,7 +515,7 @@ class TestRouterPhase14:
515
515
  class TestVersionBump:
516
516
  def test_version_is_014(self):
517
517
  from semantic_code_intelligence import __version__
518
- assert __version__ == "0.4.1"
518
+ assert __version__ == "0.4.3"
519
519
 
520
520
 
521
521
  # =========================================================================
@@ -566,3 +566,4 @@ class TestWebServerBackground:
566
566
  assert server._thread is None
567
567
  # stop() should be safe when not started
568
568
  server.stop()
569
+
@@ -713,7 +713,7 @@ class TestVersionBump:
713
713
  def test_version_is_015(self):
714
714
  from semantic_code_intelligence import __version__
715
715
 
716
- assert __version__ == "0.4.1"
716
+ assert __version__ == "0.4.3"
717
717
 
718
718
 
719
719
  class TestCIModuleStructure:
@@ -812,3 +812,4 @@ class TestBackwardCompatibility:
812
812
  validator = SafetyValidator()
813
813
  report = validator.validate("x = 1\n")
814
814
  assert report.safe is True
815
+