codecortex 0.29.3__tar.gz → 0.30.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 (208) hide show
  1. {codecortex-0.29.3/src/codecortex.egg-info → codecortex-0.30.0}/PKG-INFO +9 -8
  2. {codecortex-0.29.3 → codecortex-0.30.0}/README.md +8 -7
  3. {codecortex-0.29.3 → codecortex-0.30.0}/pyproject.toml +1 -1
  4. {codecortex-0.29.3 → codecortex-0.30.0/src/codecortex.egg-info}/PKG-INFO +9 -8
  5. codecortex-0.30.0/src/codecortex.egg-info/SOURCES.txt +199 -0
  6. codecortex-0.30.0/src/codeintel/__init__.py +1 -0
  7. {codecortex-0.29.3 → codecortex-0.30.0}/src/codeintel/__main__.py +18 -11
  8. codecortex-0.30.0/src/codeintel/c4/__init__.py +1 -0
  9. codecortex-0.29.3/src/codeintel/c4_check.py → codecortex-0.30.0/src/codeintel/c4/check.py +106 -9
  10. codecortex-0.29.3/src/codeintel/c4_layers.py → codecortex-0.30.0/src/codeintel/c4/layers.py +2 -2
  11. codecortex-0.29.3/src/codeintel/c4.py → codecortex-0.30.0/src/codeintel/c4/model.py +18 -10
  12. {codecortex-0.29.3/src/codeintel/commands → codecortex-0.30.0/src/codeintel/cli}/c4.py +7 -7
  13. {codecortex-0.29.3/src/codeintel/commands → codecortex-0.30.0/src/codeintel/cli}/doctor.py +2 -2
  14. {codecortex-0.29.3/src/codeintel/commands → codecortex-0.30.0/src/codeintel/cli}/graph.py +2 -2
  15. {codecortex-0.29.3/src/codeintel/commands → codecortex-0.30.0/src/codeintel/cli}/index.py +34 -11
  16. {codecortex-0.29.3/src/codeintel/commands → codecortex-0.30.0/src/codeintel/cli}/install.py +4 -4
  17. {codecortex-0.29.3/src/codeintel/commands → codecortex-0.30.0/src/codeintel/cli}/map.py +17 -6
  18. {codecortex-0.29.3/src/codeintel/commands → codecortex-0.30.0/src/codeintel/cli}/prompt.py +2 -2
  19. {codecortex-0.29.3/src/codeintel/commands → codecortex-0.30.0/src/codeintel/cli}/query.py +4 -4
  20. {codecortex-0.29.3/src/codeintel/commands → codecortex-0.30.0/src/codeintel/cli}/reset.py +7 -4
  21. {codecortex-0.29.3/src/codeintel/commands → codecortex-0.30.0/src/codeintel/cli}/serve.py +1 -1
  22. {codecortex-0.29.3/src/codeintel/commands → codecortex-0.30.0/src/codeintel/cli}/serve_http.py +2 -2
  23. {codecortex-0.29.3/src/codeintel/commands → codecortex-0.30.0/src/codeintel/cli}/setup.py +2 -2
  24. {codecortex-0.29.3/src/codeintel/commands → codecortex-0.30.0/src/codeintel/cli}/status.py +4 -4
  25. {codecortex-0.29.3/src/codeintel/commands → codecortex-0.30.0/src/codeintel/cli}/uninstall.py +3 -3
  26. codecortex-0.30.0/src/codeintel/core/__init__.py +3 -0
  27. {codecortex-0.29.3/src/codeintel → codecortex-0.30.0/src/codeintel/core}/config.py +1 -1
  28. codecortex-0.30.0/src/codeintel/core/containment.py +265 -0
  29. {codecortex-0.29.3/src/codeintel → codecortex-0.30.0/src/codeintel/core}/filelock.py +1 -1
  30. codecortex-0.30.0/src/codeintel/core/paths.py +104 -0
  31. {codecortex-0.29.3/src/codeintel → codecortex-0.30.0/src/codeintel/core}/provider.py +4 -1
  32. {codecortex-0.29.3/src/codeintel → codecortex-0.30.0/src/codeintel/core}/query_ops.py +2 -2
  33. {codecortex-0.29.3/src/codeintel → codecortex-0.30.0/src/codeintel/core}/redact.py +50 -13
  34. {codecortex-0.29.3/src/codeintel → codecortex-0.30.0/src/codeintel/core}/source_kind.py +10 -0
  35. codecortex-0.30.0/src/codeintel/engines/__init__.py +3 -0
  36. codecortex-0.30.0/src/codeintel/engines/graph/__init__.py +1 -0
  37. codecortex-0.29.3/src/codeintel/graph_answer.py → codecortex-0.30.0/src/codeintel/engines/graph/answer.py +381 -28
  38. codecortex-0.29.3/src/codeintel/graph_backend.py → codecortex-0.30.0/src/codeintel/engines/graph/backend.py +70 -6
  39. codecortex-0.30.0/src/codeintel/engines/graph/blindspots.py +521 -0
  40. codecortex-0.29.3/src/codeintel/graph_changed.py → codecortex-0.30.0/src/codeintel/engines/graph/changed.py +8 -8
  41. {codecortex-0.29.3/src/codeintel → codecortex-0.30.0/src/codeintel/engines/graph}/changed_range.py +86 -26
  42. codecortex-0.29.3/src/codeintel/graph_confidence.py → codecortex-0.30.0/src/codeintel/engines/graph/confidence.py +18 -3
  43. codecortex-0.29.3/src/codeintel/graph_dispatch.py → codecortex-0.30.0/src/codeintel/engines/graph/dispatch.py +334 -12
  44. codecortex-0.29.3/src/codeintel/graph_edges.py → codecortex-0.30.0/src/codeintel/engines/graph/edges.py +10 -1
  45. codecortex-0.29.3/src/codeintel/graph_ops.py → codecortex-0.30.0/src/codeintel/engines/graph/ops.py +266 -25
  46. codecortex-0.29.3/src/codeintel/providers/graph.py → codecortex-0.30.0/src/codeintel/engines/graph/provider.py +283 -49
  47. {codecortex-0.29.3/src/codeintel → codecortex-0.30.0/src/codeintel/engines/graph}/qualifier_scan.py +3 -3
  48. codecortex-0.29.3/src/codeintel/graph_render.py → codecortex-0.30.0/src/codeintel/engines/graph/render.py +24 -13
  49. codecortex-0.29.3/src/codeintel/graph_resolution.py → codecortex-0.30.0/src/codeintel/engines/graph/resolution.py +1 -1
  50. {codecortex-0.29.3/src/codeintel → codecortex-0.30.0/src/codeintel/engines/graph}/symbol_diff.py +2 -2
  51. codecortex-0.29.3/src/codeintel/graph_targets.py → codecortex-0.30.0/src/codeintel/engines/graph/targets.py +1 -1
  52. codecortex-0.30.0/src/codeintel/engines/lsp/__init__.py +1 -0
  53. {codecortex-0.29.3/src/codeintel → codecortex-0.30.0/src/codeintel/engines/lsp}/lang_config.py +3 -3
  54. codecortex-0.29.3/src/codeintel/providers/lsp.py → codecortex-0.30.0/src/codeintel/engines/lsp/provider.py +4 -4
  55. {codecortex-0.29.3/src/codeintel/providers → codecortex-0.30.0/src/codeintel/engines}/none.py +1 -1
  56. codecortex-0.30.0/src/codeintel/engines/semantic/__init__.py +1 -0
  57. codecortex-0.29.3/src/codeintel/semantic_db.py → codecortex-0.30.0/src/codeintel/engines/semantic/db.py +13 -5
  58. {codecortex-0.29.3/src/codeintel → codecortex-0.30.0/src/codeintel/engines/semantic}/indexer.py +11 -11
  59. codecortex-0.29.3/src/codeintel/providers/semantic.py → codecortex-0.30.0/src/codeintel/engines/semantic/provider.py +209 -20
  60. {codecortex-0.29.3/src/codeintel → codecortex-0.30.0/src/codeintel/engines/semantic}/searcher.py +3 -3
  61. codecortex-0.30.0/src/codeintel/gateway/__init__.py +1 -0
  62. {codecortex-0.29.3/src/codeintel → codecortex-0.30.0/src/codeintel/gateway}/auth.py +2 -2
  63. {codecortex-0.29.3/src/codeintel → codecortex-0.30.0/src/codeintel/gateway}/cache.py +17 -7
  64. codecortex-0.30.0/src/codeintel/gateway/factory.py +51 -0
  65. {codecortex-0.29.3/src/codeintel → codecortex-0.30.0/src/codeintel/gateway}/gateway.py +222 -35
  66. {codecortex-0.29.3/src/codeintel → codecortex-0.30.0/src/codeintel/gateway}/reindexer.py +151 -19
  67. codecortex-0.30.0/src/codeintel/mapping/__init__.py +1 -0
  68. {codecortex-0.29.3/src/codeintel → codecortex-0.30.0/src/codeintel/mapping}/grapher.py +3 -3
  69. {codecortex-0.29.3/src/codeintel → codecortex-0.30.0/src/codeintel/mapping}/mapper.py +19 -7
  70. {codecortex-0.29.3/src/codeintel → codecortex-0.30.0/src/codeintel/mapping}/viewer/__init__.py +1 -1
  71. codecortex-0.30.0/src/codeintel/setup/__init__.py +1 -0
  72. {codecortex-0.29.3/src/codeintel → codecortex-0.30.0/src/codeintel/setup}/agent_prompt.py +46 -11
  73. {codecortex-0.29.3/src/codeintel → codecortex-0.30.0/src/codeintel/setup}/doctor.py +19 -6
  74. {codecortex-0.29.3/src/codeintel → codecortex-0.30.0/src/codeintel/setup}/injector.py +40 -36
  75. {codecortex-0.29.3/src/codeintel → codecortex-0.30.0/src/codeintel/setup}/installer.py +1 -1
  76. {codecortex-0.29.3/src/codeintel → codecortex-0.30.0/src/codeintel/setup}/onboarding.py +9 -9
  77. {codecortex-0.29.3/src/codeintel → codecortex-0.30.0/src/codeintel/setup}/reset.py +16 -28
  78. codecortex-0.30.0/src/codeintel/transports/__init__.py +1 -0
  79. codecortex-0.29.3/src/codeintel/http_server.py → codecortex-0.30.0/src/codeintel/transports/http.py +12 -9
  80. codecortex-0.29.3/src/codeintel/server.py → codecortex-0.30.0/src/codeintel/transports/mcp.py +60 -60
  81. codecortex-0.30.0/tests/test_agent_hints.py +349 -0
  82. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_agent_prompt.py +50 -4
  83. codecortex-0.30.0/tests/test_architecture.py +173 -0
  84. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_backend_failure_detail.py +10 -10
  85. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_background_index_failure.py +312 -15
  86. codecortex-0.30.0/tests/test_blindspot_gaps.py +950 -0
  87. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_c4.py +27 -4
  88. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_c4_check.py +122 -2
  89. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_c4_layers.py +2 -2
  90. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_c4_model.py +2 -2
  91. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_c4_output.py +46 -46
  92. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_cache.py +11 -1
  93. codecortex-0.30.0/tests/test_caller_counts.py +319 -0
  94. codecortex-0.30.0/tests/test_chain_destination.py +307 -0
  95. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_changed_range.py +45 -28
  96. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_chunking.py +11 -11
  97. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_cli_commands.py +306 -139
  98. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_cli_help.py +21 -6
  99. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_cli_install_dry_run.py +4 -4
  100. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_cli_install_offer_injection.py +10 -10
  101. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_cold_process.py +5 -6
  102. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_config.py +2 -2
  103. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_corpus.py +8 -8
  104. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_could_not_ask_semantic.py +10 -10
  105. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_dispatch_callers.py +16 -16
  106. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_docs_deadcode_withdrawal.py +3 -3
  107. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_docs_trust_claims.py +7 -7
  108. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_doctor.py +120 -49
  109. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_e2e.py +6 -6
  110. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_edge_confidence.py +22 -21
  111. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_edge_endpoint_cap.py +4 -4
  112. codecortex-0.30.0/tests/test_edge_staleness.py +329 -0
  113. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_engine_adoption.py +4 -4
  114. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_enterprise.py +5 -5
  115. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_gateway.py +23 -23
  116. codecortex-0.30.0/tests/test_gateway_freshness.py +188 -0
  117. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_graph_failure_population.py +44 -24
  118. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_graph_provider.py +39 -39
  119. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_graph_real.py +32 -5
  120. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_graph_stdin.py +9 -9
  121. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_grapher.py +6 -6
  122. codecortex-0.30.0/tests/test_hardening.py +527 -0
  123. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_http_auth.py +1 -1
  124. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_http_server.py +1 -1
  125. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_incompleteness.py +25 -29
  126. codecortex-0.30.0/tests/test_index_age.py +571 -0
  127. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_index_failure_reason.py +16 -16
  128. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_index_incompleteness.py +10 -10
  129. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_index_progress.py +6 -6
  130. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_indexer_binary.py +2 -2
  131. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_installer.py +11 -11
  132. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_integration.py +12 -12
  133. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_lang_config.py +3 -3
  134. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_loc_census.py +14 -16
  135. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_lsp_language_coverage.py +3 -3
  136. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_lsp_provider.py +54 -54
  137. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_lsp_real.py +11 -11
  138. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_mapper.py +21 -21
  139. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_mcp_answer_size.py +23 -2
  140. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_mcp_handshake.py +3 -3
  141. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_mcp_server.py +92 -7
  142. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_missing_target.py +23 -21
  143. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_model_dimension.py +10 -10
  144. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_never_raise.py +17 -17
  145. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_null_reason_and_ripple.py +39 -17
  146. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_onboarding.py +12 -12
  147. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_per_thread.py +4 -4
  148. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_qualifier_scan.py +3 -3
  149. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_query_budget.py +5 -5
  150. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_rbac.py +113 -40
  151. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_redaction_boundary.py +78 -12
  152. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_reindex_lock.py +6 -6
  153. codecortex-0.30.0/tests/test_reindexer.py +821 -0
  154. codecortex-0.30.0/tests/test_render_names.py +32 -0
  155. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_rerank.py +6 -6
  156. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_reset.py +74 -10
  157. codecortex-0.30.0/tests/test_search_fallback.py +206 -0
  158. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_semantic_provider.py +84 -34
  159. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_source_kind.py +3 -3
  160. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_staleness.py +10 -10
  161. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_summary_integrity.py +86 -68
  162. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_symbol_context.py +4 -4
  163. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_symbol_diff.py +1 -1
  164. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_term.py +1 -1
  165. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_treesitter.py +2 -2
  166. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_uninstall.py +5 -5
  167. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_upgrade_path.py +3 -3
  168. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_verify.py +2 -2
  169. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_verify_call.py +1 -1
  170. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_version_skew.py +3 -3
  171. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_wire_text.py +1 -1
  172. codecortex-0.29.3/src/codecortex.egg-info/SOURCES.txt +0 -178
  173. codecortex-0.29.3/src/codeintel/__init__.py +0 -1
  174. codecortex-0.29.3/src/codeintel/containment.py +0 -95
  175. codecortex-0.29.3/src/codeintel/paths.py +0 -31
  176. codecortex-0.29.3/src/codeintel/providers/__init__.py +0 -0
  177. codecortex-0.29.3/tests/test_hardening.py +0 -275
  178. codecortex-0.29.3/tests/test_reindexer.py +0 -384
  179. {codecortex-0.29.3 → codecortex-0.30.0}/LICENSE +0 -0
  180. {codecortex-0.29.3 → codecortex-0.30.0}/setup.cfg +0 -0
  181. {codecortex-0.29.3 → codecortex-0.30.0}/src/codecortex.egg-info/dependency_links.txt +0 -0
  182. {codecortex-0.29.3 → codecortex-0.30.0}/src/codecortex.egg-info/entry_points.txt +0 -0
  183. {codecortex-0.29.3 → codecortex-0.30.0}/src/codecortex.egg-info/requires.txt +0 -0
  184. {codecortex-0.29.3 → codecortex-0.30.0}/src/codecortex.egg-info/top_level.txt +0 -0
  185. {codecortex-0.29.3/src/codeintel/commands → codecortex-0.30.0/src/codeintel/cli}/__init__.py +0 -0
  186. {codecortex-0.29.3/src/codeintel/commands → codecortex-0.30.0/src/codeintel/cli}/_common.py +0 -0
  187. {codecortex-0.29.3/src/codeintel/commands → codecortex-0.30.0/src/codeintel/cli}/gen_token.py +0 -0
  188. {codecortex-0.29.3/src/codeintel → codecortex-0.30.0/src/codeintel/core}/loc.py +0 -0
  189. {codecortex-0.29.3/src/codeintel → codecortex-0.30.0/src/codeintel/core}/logconfig.py +0 -0
  190. {codecortex-0.29.3/src/codeintel → codecortex-0.30.0/src/codeintel/core}/outcome.py +0 -0
  191. {codecortex-0.29.3/src/codeintel → codecortex-0.30.0/src/codeintel/core}/per_thread.py +0 -0
  192. {codecortex-0.29.3/src/codeintel → codecortex-0.30.0/src/codeintel/core}/progress.py +0 -0
  193. {codecortex-0.29.3/src/codeintel → codecortex-0.30.0/src/codeintel/core}/term.py +0 -0
  194. {codecortex-0.29.3/src/codeintel → codecortex-0.30.0/src/codeintel/engines/graph}/wire_text.py +0 -0
  195. {codecortex-0.29.3/src/codeintel → codecortex-0.30.0/src/codeintel/gateway}/policy.py +0 -0
  196. {codecortex-0.29.3/src/codeintel → codecortex-0.30.0/src/codeintel/mapping}/viewer/graph_template.html +0 -0
  197. {codecortex-0.29.3 → codecortex-0.30.0}/src/codeintel/py.typed +0 -0
  198. {codecortex-0.29.3/src/codeintel → codecortex-0.30.0/src/codeintel/setup}/verify.py +0 -0
  199. {codecortex-0.29.3/src/codeintel → codecortex-0.30.0/src/codeintel/transports}/metrics.py +0 -0
  200. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_backend_reaper.py +0 -0
  201. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_bench_corpus_typed.py +0 -0
  202. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_bench_gate.py +0 -0
  203. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_bench_graphify.py +0 -0
  204. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_bench_oracle.py +0 -0
  205. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_bench_oracle_ts.py +0 -0
  206. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_bench_qualified.py +0 -0
  207. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_docs_ci_claims.py +0 -0
  208. {codecortex-0.29.3 → codecortex-0.30.0}/tests/test_hard_exit.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: codecortex
3
- Version: 0.29.3
3
+ Version: 0.30.0
4
4
  Summary: Local-first, MCP-native code-intelligence server — graph, LSP, and semantic search behind one safe code.query tool for coding agents.
5
5
  Author: Shammai Hamilton
6
6
  License-Expression: MIT
@@ -242,7 +242,7 @@ It's one call: `code.query(op, target, engine="auto")`. In `auto` mode (the defa
242
242
  | Who calls this? | `callers` | graph | caller symbols + files |
243
243
  | What does this call? | `callees` | graph | callee symbols + files |
244
244
  | Blast radius of a change | `impact` | graph | callers **and** callees together |
245
- | Trace a call chain up/downstream | `chain` | graph | ordered hops, each labelled with how it was resolved |
245
+ | Trace a call chain up/downstream | `chain` (`"A->B"` for the path from A to B) | graph | ordered hops, each labelled with how it was resolved (`[unstated]` when the backend did not say) |
246
246
  | Find symbols by pattern | `pattern` | graph | matching nodes + locations |
247
247
  | Project shape at a glance | `overview` | graph → lsp | modules, node/edge counts, languages |
248
248
  | Everything about one symbol | `context` | graph + lsp | both views merged |
@@ -306,7 +306,7 @@ model {
306
306
  providers = area 'providers' {
307
307
  lsp = module 'lsp' {
308
308
  technology 'Python'
309
- metadata { path 'src/codeintel/providers/lsp.py' churn '12' fan_out '2' }
309
+ metadata { path 'src/codeintel/engines/lsp/provider.py' churn '12' fan_out '2' }
310
310
  }
311
311
  graph = module 'graph' { /* … */ }
312
312
  }
@@ -345,7 +345,7 @@ Full reference: **[docs/c4.md](docs/c4.md)**. Why LikeC4 and not something else,
345
345
  - **It never throws.** Every call returns the same JSON envelope; a missing or broken backend degrades to `null` *with a reason*. No exceptions, no 500s, no malformed output for the agent to trip over — so you never wrap `code.query` in a `try`.
346
346
  - **One tool, not three.** Register a single MCP server and it auto-routes each question to graph, LSP, or semantic — instead of wiring up three backends with three response shapes and three failure modes.
347
347
  - **Degrades instead of breaking.** No graph backend installed? That engine returns `null` and the agent falls back to grep. The semantic engine needs nothing external, so codeintel is useful the moment it's installed and only gets sharper as you add backends.
348
- - **Fast on repeat, and the cache never lies.** A content-hash cache returns instantly for unchanged code and self-invalidates when a background reindex advances the index, so you never read a cached answer for code that moved on. The cache is bounded (LRU), so a long-running server holds steady memory. (The *cache* is always consistent with the index; how current the index itself is depends on the engine — see [Keeping answers fresh](#keeping-answers-fresh).)
348
+ - **Fast on repeat, and the cache follows the index.** A content-hash cache returns instantly for unchanged code and is invalidated by a reindex from any process — the server's own background pass, a `codeintel index` in another terminal, or a `codeintel reset` that deletes the index — because its key includes the index files' modification times. The semantic index is one file per embedding model, shared by every project on the machine, so indexing one project also invalidates other projects' cached answers: a re-ask costs a recompute, never a stale answer. It never serves an answer from an index that has since been rewritten. The cache is bounded (LRU), so a long-running server holds steady memory. (The *cache* is always consistent with the index; how current the index itself is depends on the engine — see [Keeping answers fresh](#keeping-answers-fresh).)
349
349
  - **Concurrency-safe.** The HTTP transport handles requests on threads, so one slow query (an LSP session warming, a first-time index) can't block every other agent.
350
350
  - **Honest about its own health.** `codeintel doctor` answers three separate questions per engine — *installed?* *runnable?* *is this repo indexed?* — with the single command to fix each gap, so "installed" is never mistaken for "working". And a readiness claim is one a query can actually honor: install a missing backend mid-session and the running server picks it up on the next call, rather than reporting the engine healthy while quietly routing around it until you restart the host.
351
351
 
@@ -424,8 +424,9 @@ rather than a bare reason.
424
424
 
425
425
  One more honest caveat. For targets that are **symbol names or free text** (most of them —
426
426
  `callers`, `impact`, `hotspots`, `search`), there is no file whose content hash could change, so a
427
- cached answer is invalidated only when a background reindex completes, and those are debounced
428
- (~30s). An edit followed immediately by the same query can therefore return the pre-edit answer.
427
+ cached answer is invalidated only when the index is rewritten (a background reindex completes,
428
+ or `codeintel index` runs), and background passes are debounced (~30s). An edit followed
429
+ immediately by the same query can therefore return the pre-edit answer.
429
430
  Targets that are real file paths are content-hashed and refresh as soon as the bytes change.
430
431
 
431
432
  Pass `--engine auto` (the default) and codeintel chooses the best engine per operation. Pass `--engine both` or `--engine all` to fan out to multiple engines and merge results.
@@ -497,7 +498,7 @@ Config is **validated on load** — an out-of-range number, a misspelled enum, o
497
498
  | `CODEINTEL_LOG_FORMAT=json` | Structured (JSON-per-line) logs for ELK / Splunk / Datadog |
498
499
  | `CODEINTEL_HTTP_ACCESS_LOG=1` | One log line per HTTP request (method, path, status, latency) |
499
500
  | `CODEINTEL_DEBUG=1` | Log the full traceback of any error the never-throw contract swallows (silent by default) — the switch for diagnosing an unexpected `null` |
500
- | `CODEINTEL_REINDEX=off` | Disable the background reindexer; queries then index inline to stay fresh |
501
+ | `CODEINTEL_REINDEX=off` | Disable the background reindexer. Graph answers are **not** indexed inline: run `codeintel index <root>` to refresh them, and the cache notices the new index on the next query. (Semantic `search` still indexes inline, on every query, while the reindexer is off.) |
501
502
  | `CODEINTEL_HOME` | Where per-machine state lives (default `~/.codeintel`) — the index cache, the global `config.toml`, and `auth.toml`. Set this when the process has **no resolvable home directory** — a container running as a UID with no passwd entry and no `$HOME`, which is common when an agent runs in one. Without it, `Path.home()` raises and every command fails somewhere far from the cause. |
502
503
 
503
504
  ## Privacy & dependencies
@@ -630,7 +631,7 @@ jobs cover the contract itself: `graph-contract` installs the pinned `codebase-m
630
631
  the live graph tests — and **fails if they skipped**, because a silently-skipped contract test is
631
632
  how a total backend outage stayed green here once — while the nightly corpus job runs that same
632
633
  real backend against pinned third-party repositories. `lsp-contract` runs the live serena tests
633
- against the exact serena commit the provider launches (`providers/lsp.py`'s `_SERENA_REV`), and it
634
+ against the exact serena commit the provider launches (`engines/lsp/provider.py`'s `_SERENA_REV`), and it
634
635
  **gates**: a serena regression turns CI red, and moving to a newer serena means bumping that pin
635
636
  with the contract job green against it. The release canary — the only check that
636
637
  asserts on real answer text from a built wheel — still covers **the semantic engine only**.
@@ -201,7 +201,7 @@ It's one call: `code.query(op, target, engine="auto")`. In `auto` mode (the defa
201
201
  | Who calls this? | `callers` | graph | caller symbols + files |
202
202
  | What does this call? | `callees` | graph | callee symbols + files |
203
203
  | Blast radius of a change | `impact` | graph | callers **and** callees together |
204
- | Trace a call chain up/downstream | `chain` | graph | ordered hops, each labelled with how it was resolved |
204
+ | Trace a call chain up/downstream | `chain` (`"A->B"` for the path from A to B) | graph | ordered hops, each labelled with how it was resolved (`[unstated]` when the backend did not say) |
205
205
  | Find symbols by pattern | `pattern` | graph | matching nodes + locations |
206
206
  | Project shape at a glance | `overview` | graph → lsp | modules, node/edge counts, languages |
207
207
  | Everything about one symbol | `context` | graph + lsp | both views merged |
@@ -265,7 +265,7 @@ model {
265
265
  providers = area 'providers' {
266
266
  lsp = module 'lsp' {
267
267
  technology 'Python'
268
- metadata { path 'src/codeintel/providers/lsp.py' churn '12' fan_out '2' }
268
+ metadata { path 'src/codeintel/engines/lsp/provider.py' churn '12' fan_out '2' }
269
269
  }
270
270
  graph = module 'graph' { /* … */ }
271
271
  }
@@ -304,7 +304,7 @@ Full reference: **[docs/c4.md](docs/c4.md)**. Why LikeC4 and not something else,
304
304
  - **It never throws.** Every call returns the same JSON envelope; a missing or broken backend degrades to `null` *with a reason*. No exceptions, no 500s, no malformed output for the agent to trip over — so you never wrap `code.query` in a `try`.
305
305
  - **One tool, not three.** Register a single MCP server and it auto-routes each question to graph, LSP, or semantic — instead of wiring up three backends with three response shapes and three failure modes.
306
306
  - **Degrades instead of breaking.** No graph backend installed? That engine returns `null` and the agent falls back to grep. The semantic engine needs nothing external, so codeintel is useful the moment it's installed and only gets sharper as you add backends.
307
- - **Fast on repeat, and the cache never lies.** A content-hash cache returns instantly for unchanged code and self-invalidates when a background reindex advances the index, so you never read a cached answer for code that moved on. The cache is bounded (LRU), so a long-running server holds steady memory. (The *cache* is always consistent with the index; how current the index itself is depends on the engine — see [Keeping answers fresh](#keeping-answers-fresh).)
307
+ - **Fast on repeat, and the cache follows the index.** A content-hash cache returns instantly for unchanged code and is invalidated by a reindex from any process — the server's own background pass, a `codeintel index` in another terminal, or a `codeintel reset` that deletes the index — because its key includes the index files' modification times. The semantic index is one file per embedding model, shared by every project on the machine, so indexing one project also invalidates other projects' cached answers: a re-ask costs a recompute, never a stale answer. It never serves an answer from an index that has since been rewritten. The cache is bounded (LRU), so a long-running server holds steady memory. (The *cache* is always consistent with the index; how current the index itself is depends on the engine — see [Keeping answers fresh](#keeping-answers-fresh).)
308
308
  - **Concurrency-safe.** The HTTP transport handles requests on threads, so one slow query (an LSP session warming, a first-time index) can't block every other agent.
309
309
  - **Honest about its own health.** `codeintel doctor` answers three separate questions per engine — *installed?* *runnable?* *is this repo indexed?* — with the single command to fix each gap, so "installed" is never mistaken for "working". And a readiness claim is one a query can actually honor: install a missing backend mid-session and the running server picks it up on the next call, rather than reporting the engine healthy while quietly routing around it until you restart the host.
310
310
 
@@ -383,8 +383,9 @@ rather than a bare reason.
383
383
 
384
384
  One more honest caveat. For targets that are **symbol names or free text** (most of them —
385
385
  `callers`, `impact`, `hotspots`, `search`), there is no file whose content hash could change, so a
386
- cached answer is invalidated only when a background reindex completes, and those are debounced
387
- (~30s). An edit followed immediately by the same query can therefore return the pre-edit answer.
386
+ cached answer is invalidated only when the index is rewritten (a background reindex completes,
387
+ or `codeintel index` runs), and background passes are debounced (~30s). An edit followed
388
+ immediately by the same query can therefore return the pre-edit answer.
388
389
  Targets that are real file paths are content-hashed and refresh as soon as the bytes change.
389
390
 
390
391
  Pass `--engine auto` (the default) and codeintel chooses the best engine per operation. Pass `--engine both` or `--engine all` to fan out to multiple engines and merge results.
@@ -456,7 +457,7 @@ Config is **validated on load** — an out-of-range number, a misspelled enum, o
456
457
  | `CODEINTEL_LOG_FORMAT=json` | Structured (JSON-per-line) logs for ELK / Splunk / Datadog |
457
458
  | `CODEINTEL_HTTP_ACCESS_LOG=1` | One log line per HTTP request (method, path, status, latency) |
458
459
  | `CODEINTEL_DEBUG=1` | Log the full traceback of any error the never-throw contract swallows (silent by default) — the switch for diagnosing an unexpected `null` |
459
- | `CODEINTEL_REINDEX=off` | Disable the background reindexer; queries then index inline to stay fresh |
460
+ | `CODEINTEL_REINDEX=off` | Disable the background reindexer. Graph answers are **not** indexed inline: run `codeintel index <root>` to refresh them, and the cache notices the new index on the next query. (Semantic `search` still indexes inline, on every query, while the reindexer is off.) |
460
461
  | `CODEINTEL_HOME` | Where per-machine state lives (default `~/.codeintel`) — the index cache, the global `config.toml`, and `auth.toml`. Set this when the process has **no resolvable home directory** — a container running as a UID with no passwd entry and no `$HOME`, which is common when an agent runs in one. Without it, `Path.home()` raises and every command fails somewhere far from the cause. |
461
462
 
462
463
  ## Privacy & dependencies
@@ -589,7 +590,7 @@ jobs cover the contract itself: `graph-contract` installs the pinned `codebase-m
589
590
  the live graph tests — and **fails if they skipped**, because a silently-skipped contract test is
590
591
  how a total backend outage stayed green here once — while the nightly corpus job runs that same
591
592
  real backend against pinned third-party repositories. `lsp-contract` runs the live serena tests
592
- against the exact serena commit the provider launches (`providers/lsp.py`'s `_SERENA_REV`), and it
593
+ against the exact serena commit the provider launches (`engines/lsp/provider.py`'s `_SERENA_REV`), and it
593
594
  **gates**: a serena regression turns CI red, and moving to a newer serena means bumping that pin
594
595
  with the contract job green against it. The release canary — the only check that
595
596
  asserts on real answer text from a built wheel — still covers **the semantic engine only**.
@@ -75,7 +75,7 @@ where = ["src"]
75
75
  # without which the `Typing :: Typed` classifier is a promise the installed package cannot keep —
76
76
  # type checkers ignore an installed package's annotations entirely unless py.typed is present.
77
77
  [tool.setuptools.package-data]
78
- "codeintel.viewer" = ["*.html"]
78
+ "codeintel.mapping.viewer" = ["*.html"]
79
79
  "codeintel" = ["py.typed"]
80
80
 
81
81
  [tool.ruff]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: codecortex
3
- Version: 0.29.3
3
+ Version: 0.30.0
4
4
  Summary: Local-first, MCP-native code-intelligence server — graph, LSP, and semantic search behind one safe code.query tool for coding agents.
5
5
  Author: Shammai Hamilton
6
6
  License-Expression: MIT
@@ -242,7 +242,7 @@ It's one call: `code.query(op, target, engine="auto")`. In `auto` mode (the defa
242
242
  | Who calls this? | `callers` | graph | caller symbols + files |
243
243
  | What does this call? | `callees` | graph | callee symbols + files |
244
244
  | Blast radius of a change | `impact` | graph | callers **and** callees together |
245
- | Trace a call chain up/downstream | `chain` | graph | ordered hops, each labelled with how it was resolved |
245
+ | Trace a call chain up/downstream | `chain` (`"A->B"` for the path from A to B) | graph | ordered hops, each labelled with how it was resolved (`[unstated]` when the backend did not say) |
246
246
  | Find symbols by pattern | `pattern` | graph | matching nodes + locations |
247
247
  | Project shape at a glance | `overview` | graph → lsp | modules, node/edge counts, languages |
248
248
  | Everything about one symbol | `context` | graph + lsp | both views merged |
@@ -306,7 +306,7 @@ model {
306
306
  providers = area 'providers' {
307
307
  lsp = module 'lsp' {
308
308
  technology 'Python'
309
- metadata { path 'src/codeintel/providers/lsp.py' churn '12' fan_out '2' }
309
+ metadata { path 'src/codeintel/engines/lsp/provider.py' churn '12' fan_out '2' }
310
310
  }
311
311
  graph = module 'graph' { /* … */ }
312
312
  }
@@ -345,7 +345,7 @@ Full reference: **[docs/c4.md](docs/c4.md)**. Why LikeC4 and not something else,
345
345
  - **It never throws.** Every call returns the same JSON envelope; a missing or broken backend degrades to `null` *with a reason*. No exceptions, no 500s, no malformed output for the agent to trip over — so you never wrap `code.query` in a `try`.
346
346
  - **One tool, not three.** Register a single MCP server and it auto-routes each question to graph, LSP, or semantic — instead of wiring up three backends with three response shapes and three failure modes.
347
347
  - **Degrades instead of breaking.** No graph backend installed? That engine returns `null` and the agent falls back to grep. The semantic engine needs nothing external, so codeintel is useful the moment it's installed and only gets sharper as you add backends.
348
- - **Fast on repeat, and the cache never lies.** A content-hash cache returns instantly for unchanged code and self-invalidates when a background reindex advances the index, so you never read a cached answer for code that moved on. The cache is bounded (LRU), so a long-running server holds steady memory. (The *cache* is always consistent with the index; how current the index itself is depends on the engine — see [Keeping answers fresh](#keeping-answers-fresh).)
348
+ - **Fast on repeat, and the cache follows the index.** A content-hash cache returns instantly for unchanged code and is invalidated by a reindex from any process — the server's own background pass, a `codeintel index` in another terminal, or a `codeintel reset` that deletes the index — because its key includes the index files' modification times. The semantic index is one file per embedding model, shared by every project on the machine, so indexing one project also invalidates other projects' cached answers: a re-ask costs a recompute, never a stale answer. It never serves an answer from an index that has since been rewritten. The cache is bounded (LRU), so a long-running server holds steady memory. (The *cache* is always consistent with the index; how current the index itself is depends on the engine — see [Keeping answers fresh](#keeping-answers-fresh).)
349
349
  - **Concurrency-safe.** The HTTP transport handles requests on threads, so one slow query (an LSP session warming, a first-time index) can't block every other agent.
350
350
  - **Honest about its own health.** `codeintel doctor` answers three separate questions per engine — *installed?* *runnable?* *is this repo indexed?* — with the single command to fix each gap, so "installed" is never mistaken for "working". And a readiness claim is one a query can actually honor: install a missing backend mid-session and the running server picks it up on the next call, rather than reporting the engine healthy while quietly routing around it until you restart the host.
351
351
 
@@ -424,8 +424,9 @@ rather than a bare reason.
424
424
 
425
425
  One more honest caveat. For targets that are **symbol names or free text** (most of them —
426
426
  `callers`, `impact`, `hotspots`, `search`), there is no file whose content hash could change, so a
427
- cached answer is invalidated only when a background reindex completes, and those are debounced
428
- (~30s). An edit followed immediately by the same query can therefore return the pre-edit answer.
427
+ cached answer is invalidated only when the index is rewritten (a background reindex completes,
428
+ or `codeintel index` runs), and background passes are debounced (~30s). An edit followed
429
+ immediately by the same query can therefore return the pre-edit answer.
429
430
  Targets that are real file paths are content-hashed and refresh as soon as the bytes change.
430
431
 
431
432
  Pass `--engine auto` (the default) and codeintel chooses the best engine per operation. Pass `--engine both` or `--engine all` to fan out to multiple engines and merge results.
@@ -497,7 +498,7 @@ Config is **validated on load** — an out-of-range number, a misspelled enum, o
497
498
  | `CODEINTEL_LOG_FORMAT=json` | Structured (JSON-per-line) logs for ELK / Splunk / Datadog |
498
499
  | `CODEINTEL_HTTP_ACCESS_LOG=1` | One log line per HTTP request (method, path, status, latency) |
499
500
  | `CODEINTEL_DEBUG=1` | Log the full traceback of any error the never-throw contract swallows (silent by default) — the switch for diagnosing an unexpected `null` |
500
- | `CODEINTEL_REINDEX=off` | Disable the background reindexer; queries then index inline to stay fresh |
501
+ | `CODEINTEL_REINDEX=off` | Disable the background reindexer. Graph answers are **not** indexed inline: run `codeintel index <root>` to refresh them, and the cache notices the new index on the next query. (Semantic `search` still indexes inline, on every query, while the reindexer is off.) |
501
502
  | `CODEINTEL_HOME` | Where per-machine state lives (default `~/.codeintel`) — the index cache, the global `config.toml`, and `auth.toml`. Set this when the process has **no resolvable home directory** — a container running as a UID with no passwd entry and no `$HOME`, which is common when an agent runs in one. Without it, `Path.home()` raises and every command fails somewhere far from the cause. |
502
503
 
503
504
  ## Privacy & dependencies
@@ -630,7 +631,7 @@ jobs cover the contract itself: `graph-contract` installs the pinned `codebase-m
630
631
  the live graph tests — and **fails if they skipped**, because a silently-skipped contract test is
631
632
  how a total backend outage stayed green here once — while the nightly corpus job runs that same
632
633
  real backend against pinned third-party repositories. `lsp-contract` runs the live serena tests
633
- against the exact serena commit the provider launches (`providers/lsp.py`'s `_SERENA_REV`), and it
634
+ against the exact serena commit the provider launches (`engines/lsp/provider.py`'s `_SERENA_REV`), and it
634
635
  **gates**: a serena regression turns CI red, and moving to a newer serena means bumping that pin
635
636
  with the contract job green against it. The release canary — the only check that
636
637
  asserts on real answer text from a built wheel — still covers **the semantic engine only**.
@@ -0,0 +1,199 @@
1
+ LICENSE
2
+ README.md
3
+ pyproject.toml
4
+ src/codecortex.egg-info/PKG-INFO
5
+ src/codecortex.egg-info/SOURCES.txt
6
+ src/codecortex.egg-info/dependency_links.txt
7
+ src/codecortex.egg-info/entry_points.txt
8
+ src/codecortex.egg-info/requires.txt
9
+ src/codecortex.egg-info/top_level.txt
10
+ src/codeintel/__init__.py
11
+ src/codeintel/__main__.py
12
+ src/codeintel/py.typed
13
+ src/codeintel/c4/__init__.py
14
+ src/codeintel/c4/check.py
15
+ src/codeintel/c4/layers.py
16
+ src/codeintel/c4/model.py
17
+ src/codeintel/cli/__init__.py
18
+ src/codeintel/cli/_common.py
19
+ src/codeintel/cli/c4.py
20
+ src/codeintel/cli/doctor.py
21
+ src/codeintel/cli/gen_token.py
22
+ src/codeintel/cli/graph.py
23
+ src/codeintel/cli/index.py
24
+ src/codeintel/cli/install.py
25
+ src/codeintel/cli/map.py
26
+ src/codeintel/cli/prompt.py
27
+ src/codeintel/cli/query.py
28
+ src/codeintel/cli/reset.py
29
+ src/codeintel/cli/serve.py
30
+ src/codeintel/cli/serve_http.py
31
+ src/codeintel/cli/setup.py
32
+ src/codeintel/cli/status.py
33
+ src/codeintel/cli/uninstall.py
34
+ src/codeintel/core/__init__.py
35
+ src/codeintel/core/config.py
36
+ src/codeintel/core/containment.py
37
+ src/codeintel/core/filelock.py
38
+ src/codeintel/core/loc.py
39
+ src/codeintel/core/logconfig.py
40
+ src/codeintel/core/outcome.py
41
+ src/codeintel/core/paths.py
42
+ src/codeintel/core/per_thread.py
43
+ src/codeintel/core/progress.py
44
+ src/codeintel/core/provider.py
45
+ src/codeintel/core/query_ops.py
46
+ src/codeintel/core/redact.py
47
+ src/codeintel/core/source_kind.py
48
+ src/codeintel/core/term.py
49
+ src/codeintel/engines/__init__.py
50
+ src/codeintel/engines/none.py
51
+ src/codeintel/engines/graph/__init__.py
52
+ src/codeintel/engines/graph/answer.py
53
+ src/codeintel/engines/graph/backend.py
54
+ src/codeintel/engines/graph/blindspots.py
55
+ src/codeintel/engines/graph/changed.py
56
+ src/codeintel/engines/graph/changed_range.py
57
+ src/codeintel/engines/graph/confidence.py
58
+ src/codeintel/engines/graph/dispatch.py
59
+ src/codeintel/engines/graph/edges.py
60
+ src/codeintel/engines/graph/ops.py
61
+ src/codeintel/engines/graph/provider.py
62
+ src/codeintel/engines/graph/qualifier_scan.py
63
+ src/codeintel/engines/graph/render.py
64
+ src/codeintel/engines/graph/resolution.py
65
+ src/codeintel/engines/graph/symbol_diff.py
66
+ src/codeintel/engines/graph/targets.py
67
+ src/codeintel/engines/graph/wire_text.py
68
+ src/codeintel/engines/lsp/__init__.py
69
+ src/codeintel/engines/lsp/lang_config.py
70
+ src/codeintel/engines/lsp/provider.py
71
+ src/codeintel/engines/semantic/__init__.py
72
+ src/codeintel/engines/semantic/db.py
73
+ src/codeintel/engines/semantic/indexer.py
74
+ src/codeintel/engines/semantic/provider.py
75
+ src/codeintel/engines/semantic/searcher.py
76
+ src/codeintel/gateway/__init__.py
77
+ src/codeintel/gateway/auth.py
78
+ src/codeintel/gateway/cache.py
79
+ src/codeintel/gateway/factory.py
80
+ src/codeintel/gateway/gateway.py
81
+ src/codeintel/gateway/policy.py
82
+ src/codeintel/gateway/reindexer.py
83
+ src/codeintel/mapping/__init__.py
84
+ src/codeintel/mapping/grapher.py
85
+ src/codeintel/mapping/mapper.py
86
+ src/codeintel/mapping/viewer/__init__.py
87
+ src/codeintel/mapping/viewer/graph_template.html
88
+ src/codeintel/setup/__init__.py
89
+ src/codeintel/setup/agent_prompt.py
90
+ src/codeintel/setup/doctor.py
91
+ src/codeintel/setup/injector.py
92
+ src/codeintel/setup/installer.py
93
+ src/codeintel/setup/onboarding.py
94
+ src/codeintel/setup/reset.py
95
+ src/codeintel/setup/verify.py
96
+ src/codeintel/transports/__init__.py
97
+ src/codeintel/transports/http.py
98
+ src/codeintel/transports/mcp.py
99
+ src/codeintel/transports/metrics.py
100
+ tests/test_agent_hints.py
101
+ tests/test_agent_prompt.py
102
+ tests/test_architecture.py
103
+ tests/test_backend_failure_detail.py
104
+ tests/test_backend_reaper.py
105
+ tests/test_background_index_failure.py
106
+ tests/test_bench_corpus_typed.py
107
+ tests/test_bench_gate.py
108
+ tests/test_bench_graphify.py
109
+ tests/test_bench_oracle.py
110
+ tests/test_bench_oracle_ts.py
111
+ tests/test_bench_qualified.py
112
+ tests/test_blindspot_gaps.py
113
+ tests/test_c4.py
114
+ tests/test_c4_check.py
115
+ tests/test_c4_layers.py
116
+ tests/test_c4_model.py
117
+ tests/test_c4_output.py
118
+ tests/test_cache.py
119
+ tests/test_caller_counts.py
120
+ tests/test_chain_destination.py
121
+ tests/test_changed_range.py
122
+ tests/test_chunking.py
123
+ tests/test_cli_commands.py
124
+ tests/test_cli_help.py
125
+ tests/test_cli_install_dry_run.py
126
+ tests/test_cli_install_offer_injection.py
127
+ tests/test_cold_process.py
128
+ tests/test_config.py
129
+ tests/test_corpus.py
130
+ tests/test_could_not_ask_semantic.py
131
+ tests/test_dispatch_callers.py
132
+ tests/test_docs_ci_claims.py
133
+ tests/test_docs_deadcode_withdrawal.py
134
+ tests/test_docs_trust_claims.py
135
+ tests/test_doctor.py
136
+ tests/test_e2e.py
137
+ tests/test_edge_confidence.py
138
+ tests/test_edge_endpoint_cap.py
139
+ tests/test_edge_staleness.py
140
+ tests/test_engine_adoption.py
141
+ tests/test_enterprise.py
142
+ tests/test_gateway.py
143
+ tests/test_gateway_freshness.py
144
+ tests/test_graph_failure_population.py
145
+ tests/test_graph_provider.py
146
+ tests/test_graph_real.py
147
+ tests/test_graph_stdin.py
148
+ tests/test_grapher.py
149
+ tests/test_hard_exit.py
150
+ tests/test_hardening.py
151
+ tests/test_http_auth.py
152
+ tests/test_http_server.py
153
+ tests/test_incompleteness.py
154
+ tests/test_index_age.py
155
+ tests/test_index_failure_reason.py
156
+ tests/test_index_incompleteness.py
157
+ tests/test_index_progress.py
158
+ tests/test_indexer_binary.py
159
+ tests/test_installer.py
160
+ tests/test_integration.py
161
+ tests/test_lang_config.py
162
+ tests/test_loc_census.py
163
+ tests/test_lsp_language_coverage.py
164
+ tests/test_lsp_provider.py
165
+ tests/test_lsp_real.py
166
+ tests/test_mapper.py
167
+ tests/test_mcp_answer_size.py
168
+ tests/test_mcp_handshake.py
169
+ tests/test_mcp_server.py
170
+ tests/test_missing_target.py
171
+ tests/test_model_dimension.py
172
+ tests/test_never_raise.py
173
+ tests/test_null_reason_and_ripple.py
174
+ tests/test_onboarding.py
175
+ tests/test_per_thread.py
176
+ tests/test_qualifier_scan.py
177
+ tests/test_query_budget.py
178
+ tests/test_rbac.py
179
+ tests/test_redaction_boundary.py
180
+ tests/test_reindex_lock.py
181
+ tests/test_reindexer.py
182
+ tests/test_render_names.py
183
+ tests/test_rerank.py
184
+ tests/test_reset.py
185
+ tests/test_search_fallback.py
186
+ tests/test_semantic_provider.py
187
+ tests/test_source_kind.py
188
+ tests/test_staleness.py
189
+ tests/test_summary_integrity.py
190
+ tests/test_symbol_context.py
191
+ tests/test_symbol_diff.py
192
+ tests/test_term.py
193
+ tests/test_treesitter.py
194
+ tests/test_uninstall.py
195
+ tests/test_upgrade_path.py
196
+ tests/test_verify.py
197
+ tests/test_verify_call.py
198
+ tests/test_version_skew.py
199
+ tests/test_wire_text.py
@@ -0,0 +1 @@
1
+ __version__ = "0.30.0"
@@ -7,9 +7,9 @@ from importlib import import_module
7
7
  from typing import NoReturn
8
8
 
9
9
  from codeintel import __version__
10
- from codeintel.query_ops import QUERY_OPS
10
+ from codeintel.core.query_ops import QUERY_OPS
11
11
 
12
- # `--engine`'s canonical values live in `codeintel.gateway._KNOWN_ENGINES` (a set — order is not
12
+ # `--engine`'s canonical values live in `codeintel.gateway.gateway._KNOWN_ENGINES` (a set — order is not
13
13
  # meaningful there). This fixes a presentation order for help text and `choices=`. Membership is
14
14
  # pinned to the gateway's set by test_cli_help.py, which is where the guard belongs: importing
15
15
  # gateway here just to assert at module scope would pull it into every CLI startup.
@@ -50,7 +50,7 @@ _COMMAND_GROUPS: list[tuple[str, list[tuple[str, str]]]] = [
50
50
  ("Check health", [
51
51
  ("doctor", "Per-engine health + index status, with the fix for each gap"),
52
52
  ("status", "Engine readiness and index age at a glance"),
53
- ("reset", "Clear the semantic index (recover from a corrupt or stale DB)"),
53
+ ("reset", "Clear the semantic and graph indexes (corrupt or stale DB)"),
54
54
  ]),
55
55
  ("Run as a server", [
56
56
  ("serve", "Start the MCP server over stdio — what an agent host launches"),
@@ -68,7 +68,7 @@ _COMMANDS = [name for _group, items in _COMMAND_GROUPS for name, _desc in items]
68
68
  # engine" after `_COMMAND_GROUPS` had moved on to naming the actual ops).
69
69
  _DESCRIPTIONS: dict[str, str] = {name: desc for _group, items in _COMMAND_GROUPS for name, desc in items}
70
70
 
71
- # Each command's body lives in codeintel.commands.<module> as `run(args) -> int`. The mapping is
71
+ # Each command's body lives in codeintel.cli.<module> as `run(args) -> int`. The mapping is
72
72
  # spelled out rather than derived from the command name so the target of any command is greppable,
73
73
  # and the import happens at dispatch time so `codeintel serve` never pays for the semantic
74
74
  # engine's imports (nor serve-http for the graph's).
@@ -152,9 +152,9 @@ def _formatter_class(prog: str) -> argparse.RawDescriptionHelpFormatter:
152
152
  def render_help() -> str:
153
153
  """The `codeintel` / `codeintel help` screen: grouped, colored, with real examples.
154
154
 
155
- Color comes from codeintel.term, so it auto-degrades on a pipe, under NO_COLOR, and on a dumb
155
+ Color comes from codeintel.core.term, so it auto-degrades on a pipe, under NO_COLOR, and on a dumb
156
156
  terminal — same as every other human-facing command."""
157
- from codeintel.term import c
157
+ from codeintel.core.term import c
158
158
 
159
159
  width = max(len(name) for name in _COMMANDS)
160
160
  out = [
@@ -235,7 +235,7 @@ def _suggest(unknown: str) -> list[str]:
235
235
  def _unknown_command(name: str) -> int:
236
236
  """Report an unrecognized command with a way forward. argparse's own error dumps the full list
237
237
  of choices and stops there, which is a dead end for a one-character typo."""
238
- from codeintel.term import c_err as e
238
+ from codeintel.core.term import c_err as e
239
239
 
240
240
  print(e.red(f"unknown command: {name!r}"), file=sys.stderr)
241
241
  matches = _suggest(name)
@@ -353,6 +353,7 @@ For agents that cannot read an MCP config: paste the output into the
353
353
  conversation.""",
354
354
  "reset": """examples:
355
355
  codeintel reset .
356
+ codeintel reset --semantic-only . clear semantic only, keep the graph
356
357
  codeintel reset --all --yes wipe every repo, no prompt
357
358
 
358
359
  Recovers from a corrupt or stale index. Re-index afterwards.""",
@@ -384,7 +385,7 @@ class _RootArgumentParser(argparse.ArgumentParser):
384
385
  subcommand's own short, specific usage line — only the wide top-level wall is replaced."""
385
386
 
386
387
  def error(self, message: str) -> NoReturn:
387
- from codeintel.term import c_err as e
388
+ from codeintel.core.term import c_err as e
388
389
 
389
390
  print(e.red(f"codeintel: error: {message}"), file=sys.stderr)
390
391
  print("\n " + e.dim("run `codeintel help` to see every command, grouped"), file=sys.stderr)
@@ -658,6 +659,8 @@ def build_parser() -> argparse.ArgumentParser:
658
659
  reset_parser.add_argument("project_root", nargs="?", default=None, help="Project root (default: cwd)")
659
660
  reset_parser.add_argument("--all", action="store_true",
660
661
  help="Clear the ENTIRE index (all projects), not just this repo")
662
+ reset_parser.add_argument("--semantic-only", action="store_true",
663
+ help="Clear only the semantic index; keep the graph index")
661
664
  reset_parser.add_argument("--yes", "-y", action="store_true", help="Skip the confirmation prompt")
662
665
  reset_parser.add_argument("--json", action="store_true", help="Emit the structured JSON report")
663
666
 
@@ -694,14 +697,14 @@ def main() -> None:
694
697
  # screen. Without this, the command a new user actually types was the ONE path that missed
695
698
  # render_help() and fell back to stock argparse.
696
699
  if not argv or argv[0] in ("help", "-h", "--help"):
697
- from codeintel import term
700
+ from codeintel.core import term
698
701
  term.configure(no_color=False, ascii_mode=None)
699
702
  print(render_help())
700
703
  sys.exit(0)
701
704
 
702
705
  args = parser.parse_args()
703
706
 
704
- from codeintel import term
707
+ from codeintel.core import term
705
708
  term.configure(
706
709
  no_color=getattr(args, "no_color", False),
707
710
  ascii_mode=(True if getattr(args, "ascii", False) else None),
@@ -712,7 +715,11 @@ def main() -> None:
712
715
  print(render_help()) # "help" (`codeintel --no-color help`) — both skip the early-return
713
716
  # above because argv[0] is the flag, not the command/"help" itself
714
717
  sys.exit(0)
715
- status = int(import_module(f"codeintel.commands.{module}").run(args))
718
+ try:
719
+ status = int(import_module(f"codeintel.cli.{module}").run(args))
720
+ except KeyboardInterrupt:
721
+ print("interrupted", file=sys.stderr)
722
+ status = 130
716
723
  if args.command in _NATIVE_RUNTIME_COMMANDS:
717
724
  _native_safe_exit(status)
718
725
  sys.exit(status)
@@ -0,0 +1 @@
1
+ """Layer 3 (tools): the `codeintel c4` architecture model, layer inference and layer check."""