codegraphcontext 0.5.7__tar.gz → 0.6.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 (193) hide show
  1. {codegraphcontext-0.5.7/src/codegraphcontext.egg-info → codegraphcontext-0.6.0}/PKG-INFO +9 -1
  2. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/README.md +7 -0
  3. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/pyproject.toml +4 -3
  4. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/cli/config_manager.py +8 -0
  5. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/cli/main.py +211 -22
  6. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/core/cgc_bundle.py +589 -59
  7. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/core/cgcignore.py +10 -0
  8. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/core/database_embedded_kuzu.py +164 -55
  9. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/core/jobs.py +8 -0
  10. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/core/watcher.py +7 -1
  11. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/server.py +31 -1
  12. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/tool_definitions.py +4 -1
  13. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/tools/code_finder.py +295 -65
  14. codegraphcontext-0.6.0/src/codegraphcontext/tools/graph_builder.py +702 -0
  15. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/tools/handlers/analysis_handlers.py +7 -10
  16. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/tools/indexing/persistence/writer.py +376 -40
  17. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/tools/indexing/pipeline.py +4 -0
  18. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/tools/indexing/resolution/calls.py +14 -2
  19. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/tools/indexing/resolution/inheritance.py +316 -0
  20. codegraphcontext-0.6.0/src/codegraphcontext/tools/indexing/sanitize.py +120 -0
  21. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/tools/indexing/schema.py +62 -44
  22. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/tools/indexing/schema_contract.py +8 -3
  23. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/tools/languages/cpp.py +76 -9
  24. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/tools/languages/csharp.py +3 -7
  25. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/tools/languages/go.py +4 -2
  26. codegraphcontext-0.6.0/src/codegraphcontext/tools/languages/gradle.py +217 -0
  27. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/tools/languages/javascript.py +11 -2
  28. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/tools/languages/kotlin.py +164 -7
  29. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/tools/languages/lua.py +2 -1
  30. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/tools/languages/php.py +21 -12
  31. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/tools/languages/python.py +2 -0
  32. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/tools/languages/typescript.py +11 -2
  33. codegraphcontext-0.6.0/src/codegraphcontext/utils/secret_scanner.py +167 -0
  34. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/utils/tree_sitter_manager.py +31 -4
  35. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0/src/codegraphcontext.egg-info}/PKG-INFO +9 -1
  36. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext.egg-info/SOURCES.txt +1 -0
  37. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext.egg-info/requires.txt +1 -0
  38. codegraphcontext-0.5.7/src/codegraphcontext/tools/graph_builder.py +0 -1250
  39. codegraphcontext-0.5.7/src/codegraphcontext/tools/indexing/sanitize.py +0 -42
  40. codegraphcontext-0.5.7/src/codegraphcontext/tools/languages/gradle.py +0 -116
  41. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/LICENSE +0 -0
  42. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/MANIFEST.in +0 -0
  43. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/setup.cfg +0 -0
  44. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/__init__.py +0 -0
  45. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/__main__.py +0 -0
  46. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/api/__init__.py +0 -0
  47. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/api/app.py +0 -0
  48. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/api/auth.py +0 -0
  49. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/api/mcp_sse.py +0 -0
  50. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/api/router.py +0 -0
  51. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/api/schemas.py +0 -0
  52. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/cli/__init__.py +0 -0
  53. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/cli/cli_helpers.py +0 -0
  54. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/cli/hook_manager.py +0 -0
  55. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/cli/project_config.py +0 -0
  56. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/cli/registry_commands.py +0 -0
  57. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/cli/setup_macos.py +0 -0
  58. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/cli/setup_wizard.py +0 -0
  59. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/cli/simulator.py +0 -0
  60. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/cli/visualizer.py +0 -0
  61. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/core/__init__.py +0 -0
  62. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/core/bundle_registry.py +0 -0
  63. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/core/database.py +0 -0
  64. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/core/database_falkordb.py +0 -0
  65. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/core/database_falkordb_remote.py +0 -0
  66. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/core/database_kuzu.py +0 -0
  67. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/core/database_ladybug.py +0 -0
  68. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/core/database_nornic.py +0 -0
  69. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/core/falkor_worker.py +0 -0
  70. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/core/graph_query.py +0 -0
  71. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/core/simulator.py +0 -0
  72. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/prompts.py +0 -0
  73. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/stdlibs.py +0 -0
  74. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/tools/__init__.py +0 -0
  75. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/tools/advanced_language_query_tool.py +0 -0
  76. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/tools/datasources/__init__.py +0 -0
  77. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/tools/datasources/cassandra_ingester.py +0 -0
  78. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/tools/datasources/mysql_ingester.py +0 -0
  79. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/tools/datasources/redis_ingester.py +0 -0
  80. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/tools/handlers/indexing_handlers.py +0 -0
  81. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/tools/handlers/management_handlers.py +0 -0
  82. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/tools/handlers/query_handlers.py +0 -0
  83. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/tools/handlers/watcher_handlers.py +0 -0
  84. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/tools/indexing/__init__.py +0 -0
  85. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/tools/indexing/constants.py +0 -0
  86. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/tools/indexing/discovery.py +0 -0
  87. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/tools/indexing/embeddings.py +0 -0
  88. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/tools/indexing/persistence/__init__.py +0 -0
  89. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/tools/indexing/persistence/utils.py +0 -0
  90. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/tools/indexing/pre_scan.py +0 -0
  91. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/tools/indexing/resolution/__init__.py +0 -0
  92. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/tools/indexing/resolution/post_resolution.py +0 -0
  93. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/tools/indexing/scip_pipeline.py +0 -0
  94. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/tools/indexing/vector_resolver.py +0 -0
  95. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/tools/languages/c.py +0 -0
  96. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/tools/languages/css.py +0 -0
  97. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/tools/languages/dart.py +0 -0
  98. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/tools/languages/elisp.py +0 -0
  99. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/tools/languages/elixir.py +0 -0
  100. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/tools/languages/haskell.py +0 -0
  101. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/tools/languages/html.py +0 -0
  102. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/tools/languages/java.py +0 -0
  103. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/tools/languages/maven.py +0 -0
  104. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/tools/languages/mybatis.py +0 -0
  105. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/tools/languages/perl.py +0 -0
  106. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/tools/languages/ruby.py +0 -0
  107. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/tools/languages/rust.py +0 -0
  108. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/tools/languages/scala.py +0 -0
  109. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/tools/languages/sfc_common.py +0 -0
  110. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/tools/languages/solidity.py +0 -0
  111. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/tools/languages/solidity_remappings.py +0 -0
  112. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/tools/languages/svelte.py +0 -0
  113. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/tools/languages/swift.py +0 -0
  114. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/tools/languages/typescriptjsx.py +0 -0
  115. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/tools/languages/vue.py +0 -0
  116. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/tools/package_resolver.py +0 -0
  117. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/tools/query_tool_languages/c_toolkit.py +0 -0
  118. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/tools/query_tool_languages/cpp_toolkit.py +0 -0
  119. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/tools/query_tool_languages/csharp_toolkit.py +0 -0
  120. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/tools/query_tool_languages/dart_toolkit.py +0 -0
  121. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/tools/query_tool_languages/elisp_toolkit.py +0 -0
  122. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/tools/query_tool_languages/go_toolkit.py +0 -0
  123. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/tools/query_tool_languages/haskell_toolkit.py +0 -0
  124. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/tools/query_tool_languages/java_toolkit.py +0 -0
  125. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/tools/query_tool_languages/javascript_toolkit.py +0 -0
  126. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/tools/query_tool_languages/perl_toolkit.py +0 -0
  127. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/tools/query_tool_languages/python_toolkit.py +0 -0
  128. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/tools/query_tool_languages/ruby_toolkit.py +0 -0
  129. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/tools/query_tool_languages/rust_toolkit.py +0 -0
  130. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/tools/query_tool_languages/scala_toolkit.py +0 -0
  131. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/tools/query_tool_languages/solidity_toolkit.py +0 -0
  132. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/tools/query_tool_languages/swift_toolkit.py +0 -0
  133. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/tools/query_tool_languages/typescript_toolkit.py +0 -0
  134. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/tools/report_generator.py +0 -0
  135. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/tools/scip_indexer.py +0 -0
  136. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/tools/scip_pb2.py +0 -0
  137. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/tools/system.py +0 -0
  138. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/tools/tree_sitter_parser.py +0 -0
  139. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/tools/type_utils.py +0 -0
  140. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/utils/cypher_ddl.py +0 -0
  141. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/utils/cypher_readonly.py +0 -0
  142. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/utils/debug_log.py +0 -0
  143. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/utils/gcf_encoder.py +0 -0
  144. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/utils/git_utils.py +0 -0
  145. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/utils/path_ignore.py +0 -0
  146. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/utils/path_sandbox.py +0 -0
  147. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/utils/repo_path.py +0 -0
  148. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/utils/tool_limits.py +0 -0
  149. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/utils/visualize_graph.py +0 -0
  150. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/viz/dist/assets/__vite-browser-external-9wXp6ZBx.js +0 -0
  151. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/viz/dist/assets/function-calls-BtRHrqa2.png +0 -0
  152. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/viz/dist/assets/graph-total-D1fBAugo.png +0 -0
  153. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/viz/dist/assets/hero-graph-2voMJp2a.jpg +0 -0
  154. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/viz/dist/assets/hierarchy-DGADo0YT.png +0 -0
  155. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/viz/dist/assets/index-C-187lf0.js +0 -0
  156. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/viz/dist/assets/index-fNAa6jgv.css +0 -0
  157. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/viz/dist/assets/parser-pyodide.worker-BgsDfaad.js +0 -0
  158. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/viz/dist/assets/parser.worker-_nvrecvj.js +0 -0
  159. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/viz/dist/assets/tree-sitter-qKYAACSa.wasm +0 -0
  160. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/viz/dist/cgcIcon.png +0 -0
  161. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/viz/dist/favicon.ico +0 -0
  162. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/viz/dist/index.html +0 -0
  163. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/viz/dist/logo-icon.svg +0 -0
  164. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/viz/dist/logo.svg +0 -0
  165. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/viz/dist/placeholder.svg +0 -0
  166. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/viz/dist/preview-image.png +0 -0
  167. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/viz/dist/robots.txt +0 -0
  168. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/viz/dist/wasm/tree-sitter-c.wasm +0 -0
  169. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/viz/dist/wasm/tree-sitter-c_sharp.wasm +0 -0
  170. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/viz/dist/wasm/tree-sitter-core.js +0 -0
  171. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/viz/dist/wasm/tree-sitter-cpp.wasm +0 -0
  172. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/viz/dist/wasm/tree-sitter-dart.wasm +0 -0
  173. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/viz/dist/wasm/tree-sitter-go.wasm +0 -0
  174. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/viz/dist/wasm/tree-sitter-java.wasm +0 -0
  175. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/viz/dist/wasm/tree-sitter-javascript.wasm +0 -0
  176. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/viz/dist/wasm/tree-sitter-kotlin.wasm +0 -0
  177. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/viz/dist/wasm/tree-sitter-perl.wasm +0 -0
  178. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/viz/dist/wasm/tree-sitter-php.wasm +0 -0
  179. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/viz/dist/wasm/tree-sitter-python.wasm +0 -0
  180. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/viz/dist/wasm/tree-sitter-ruby.wasm +0 -0
  181. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/viz/dist/wasm/tree-sitter-rust.wasm +0 -0
  182. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/viz/dist/wasm/tree-sitter-swift.wasm +0 -0
  183. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/viz/dist/wasm/tree-sitter-tsx.wasm +0 -0
  184. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/viz/dist/wasm/tree-sitter-typescript.wasm +0 -0
  185. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/viz/dist/wasm/tree-sitter.wasm +0 -0
  186. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/viz/dist/wasm/web-tree-sitter.js +0 -0
  187. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/viz/dist/wasm/web-tree-sitter.wasm +0 -0
  188. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext/viz/server.py +0 -0
  189. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext.egg-info/dependency_links.txt +0 -0
  190. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext.egg-info/entry_points.txt +0 -0
  191. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/src/codegraphcontext.egg-info/top_level.txt +0 -0
  192. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/tests/test_issue_806_fix.py +0 -0
  193. {codegraphcontext-0.5.7 → codegraphcontext-0.6.0}/tests/test_mcp_sse.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: codegraphcontext
3
- Version: 0.5.7
3
+ Version: 0.6.0
4
4
  Summary: An MCP server that indexes local code into a graph database to provide context to AI assistants.
5
5
  Author-email: Shashank Shekhar Singh <shashankshekharsingh1205@gmail.com>
6
6
  License: MIT License
@@ -65,6 +65,7 @@ Requires-Dist: ladybug; sys_platform == "win32" or (sys_platform != "win32" and
65
65
  Requires-Dist: mcp<2,>=1.0.0
66
66
  Requires-Dist: fastapi>=0.100.0
67
67
  Requires-Dist: uvicorn>=0.22.0
68
+ Requires-Dist: cryptography>=42.0.0
68
69
  Provides-Extra: parsing
69
70
  Requires-Dist: tree-sitter<0.26.0,>=0.24.0; extra == "parsing"
70
71
  Requires-Dist: tree-sitter-language-pack<2.0,>=1.6; extra == "parsing"
@@ -359,6 +360,13 @@ Each language parser extracts functions, classes, methods, parameters, inheritan
359
360
 
360
361
  **Solidity notes:** `.sol` uses Tree-sitter via `tree-sitter-language-pack` (no SCIP). Supports Foundry remappings, modifier invocations, `using Lib for T`, and `emit` / custom-error `revert` as CALLS. See `docs/docs/contributing_languages.md` § Solidity.
361
362
 
363
+ **Kotlin notes:** Annotations are recorded on functions and classes as `decorators`, retaining
364
+ their arguments (`@Preview(showBackground = true)`). This makes `find_dead_code`'s
365
+ `exclude_decorated_with` usable on Kotlin and Android codebases — for example excluding
366
+ `Composable`, `Preview`, `Test` and `Provides`. That filter matches on functions, so class-level
367
+ annotations do not affect it. Annotations on interfaces, objects, constructors, parameters and
368
+ properties are not yet recorded.
369
+
362
370
  ---
363
371
 
364
372
  ## Database Options
@@ -261,6 +261,13 @@ Each language parser extracts functions, classes, methods, parameters, inheritan
261
261
 
262
262
  **Solidity notes:** `.sol` uses Tree-sitter via `tree-sitter-language-pack` (no SCIP). Supports Foundry remappings, modifier invocations, `using Lib for T`, and `emit` / custom-error `revert` as CALLS. See `docs/docs/contributing_languages.md` § Solidity.
263
263
 
264
+ **Kotlin notes:** Annotations are recorded on functions and classes as `decorators`, retaining
265
+ their arguments (`@Preview(showBackground = true)`). This makes `find_dead_code`'s
266
+ `exclude_decorated_with` usable on Kotlin and Android codebases — for example excluding
267
+ `Composable`, `Preview`, `Test` and `Provides`. That filter matches on functions, so class-level
268
+ annotations do not affect it. Annotations on interfaces, objects, constructors, parameters and
269
+ properties are not yet recorded.
270
+
264
271
  ---
265
272
 
266
273
  ## Database Options
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "codegraphcontext"
3
- version = "0.5.7"
3
+ version = "0.6.0"
4
4
  description = "An MCP server that indexes local code into a graph database to provide context to AI assistants."
5
5
  authors = [{ name = "Shashank Shekhar Singh", email = "shashankshekharsingh1205@gmail.com" }]
6
6
  readme = "README.md"
@@ -81,7 +81,8 @@ dependencies = [
81
81
  # Lift this once mcp_sse.py is ported to the 2.x server API.
82
82
  "mcp>=1.0.0,<2",
83
83
  "fastapi>=0.100.0",
84
- "uvicorn>=0.22.0"
84
+ "uvicorn>=0.22.0",
85
+ "cryptography>=42.0.0"
85
86
  ]
86
87
 
87
88
  [project.optional-dependencies]
@@ -159,8 +160,8 @@ target-version = "py310"
159
160
  select = ["E4", "E7", "E9", "F"]
160
161
 
161
162
  [tool.pytest.ini_options]
163
+ pythonpath = ["src"]
162
164
  testpaths = ["tests"]
163
- python_files = ["test_*.py"]
164
165
  norecursedirs = ["tests/fixtures", "tests/e2e/sample_projects", "venv", ".git", "__pycache__"]
165
166
  markers = [
166
167
  "integration: mark a test as an integration test.",
@@ -129,6 +129,7 @@ DEFAULT_CONFIG = {
129
129
  "CGC_EMBEDDING_BATCH_SIZE": "256",
130
130
  # Default fuzzy matching behavior for `cgc find name` (overridable per-command with --fuzzy/--no-fuzzy)
131
131
  "FUZZY_SEARCH": "true",
132
+ "REDACT_SECRETS": "false",
132
133
  # Default LLM model names used for graph queries when no value is explicitly configured
133
134
  "OPENAI_MODEL": "gpt-4o",
134
135
  "ANTHROPIC_MODEL": "claude-3-5-sonnet-20241022",
@@ -206,6 +207,12 @@ CONFIG_DESCRIPTIONS = {
206
207
  "Enable fuzzy matching by default for `cgc find name` (true|false). "
207
208
  "Per-invocation overrides are available via --fuzzy / --no-fuzzy."
208
209
  ),
210
+ "REDACT_SECRETS": (
211
+ "Scan string literals and variable values for likely secrets (API keys, tokens, "
212
+ "passwords, connection strings) during indexing and replace them with [REDACTED] "
213
+ "before writing to the graph database. When false (default), secrets are still "
214
+ "detected and a warning is logged, but values are stored verbatim."
215
+ ),
209
216
  "OPENAI_MODEL": (
210
217
  "Default OpenAI model used for graph queries. "
211
218
  "Requires OPENAI_API_KEY environment variable. "
@@ -243,6 +250,7 @@ CONFIG_VALIDATORS = {
243
250
  "ENABLE_VECTOR_RESOLVE": ["true", "false"],
244
251
  "CGC_EMBEDDING_MODEL": ["local", "openai"],
245
252
  "FUZZY_SEARCH": ["true", "false"],
253
+ "REDACT_SECRETS": ["true", "false"],
246
254
  }
247
255
 
248
256
  SUPPORTED_DATABASES: List[str] = CONFIG_VALIDATORS["DEFAULT_DATABASE"]
@@ -46,6 +46,7 @@ from .cli_helpers import (
46
46
  setup_scip_helper,
47
47
  )
48
48
  from .hook_manager import HookError, get_hook_status, install_hooks, uninstall_hooks
49
+ from codegraphcontext.utils.tool_limits import get_tool_result_limit
49
50
 
50
51
  # Set the log level for the noisy neo4j, asyncio, and urllib3 loggers to keep the output clean.
51
52
  # Get the log level from config, defaulting to WARNING
@@ -708,6 +709,8 @@ def bundle_export(
708
709
  output: str = typer.Argument(..., help="Output path for the .cgc bundle file"),
709
710
  repo: Optional[str] = typer.Option(None, "--repo", "-r", help="Specific repository path to export (default: export all)"),
710
711
  no_stats: bool = typer.Option(False, "--no-stats", help="Skip statistics generation"),
712
+ sign_key: Optional[str] = typer.Option(None, "--sign-key", envvar="CGC_BUNDLE_SIGN_KEY", help="HMAC signing key (or set CGC_BUNDLE_SIGN_KEY)"),
713
+ encrypt_password: Optional[str] = typer.Option(None, "--encrypt-password", envvar="CGC_BUNDLE_PASSWORD", help="Encrypt bundle with this password (or set CGC_BUNDLE_PASSWORD)", hide_input=True),
711
714
  context: Optional[str] = typer.Option(None, "--context", "-c", help="Specific context to use"),
712
715
  ):
713
716
  """
@@ -723,12 +726,23 @@ def bundle_export(
723
726
  """
724
727
  _load_credentials()
725
728
  from codegraphcontext.core.cgc_bundle import CGCBundle
726
-
729
+
730
+ # Typer resolves defaults only when *it* invokes the command. Called as a
731
+ # plain function (tests/integration/test_parser_goldens.py does this, as can
732
+ # any programmatic caller), an omitted option keeps its OptionInfo sentinel
733
+ # -- which is truthy, so `if sign_key:` passes and `sign_key.encode()` then
734
+ # raises AttributeError. These two are normalized rather than merely
735
+ # forwarded because they are the only options here that get dereferenced.
736
+ if not isinstance(sign_key, (str, type(None))):
737
+ sign_key = None
738
+ if not isinstance(encrypt_password, (str, type(None))):
739
+ encrypt_password = None
740
+
727
741
  services = _initialize_services(context)
728
742
  if not all(services[:3]):
729
743
  raise typer.Exit(code=1)
730
744
  db_manager, _, code_finder = services[:3]
731
-
745
+
732
746
  try:
733
747
  output_path = Path(output)
734
748
  repo_path = Path(repo).resolve() if repo else None
@@ -743,7 +757,9 @@ def bundle_export(
743
757
  success, message = bundle.export_to_bundle(
744
758
  output_path,
745
759
  repo_path=repo_path,
746
- include_stats=not no_stats
760
+ include_stats=not no_stats,
761
+ sign_key=sign_key,
762
+ encrypt_password=encrypt_password,
747
763
  )
748
764
 
749
765
  if success:
@@ -778,6 +794,8 @@ def _confirm_bundle_clear(clear: bool, yes: bool) -> bool:
778
794
  def bundle_import(
779
795
  bundle_file: str = typer.Argument(..., help="Path to the .cgc bundle file to import"),
780
796
  clear: bool = typer.Option(False, "--clear", help="Clear existing graph data before importing"),
797
+ password: Optional[str] = typer.Option(None, "--password", envvar="CGC_BUNDLE_PASSWORD", help="Password for encrypted bundles (or set CGC_BUNDLE_PASSWORD)", hide_input=True),
798
+ verify_key: Optional[str] = typer.Option(None, "--verify-key", envvar="CGC_BUNDLE_VERIFY_KEY", help="HMAC verification key for signed bundles (or set CGC_BUNDLE_VERIFY_KEY)"),
781
799
  yes: bool = typer.Option(False, "--yes", "-y", help="Skip confirmation when using --clear"),
782
800
  context: Optional[str] = typer.Option(None, "--context", "-c", help="Specific context to use"),
783
801
  ):
@@ -814,7 +832,9 @@ def bundle_import(
814
832
  bundle = CGCBundle(db_manager)
815
833
  success, message = bundle.import_from_bundle(
816
834
  bundle_path,
817
- clear_existing=clear
835
+ clear_existing=clear,
836
+ password=password,
837
+ verify_key=verify_key,
818
838
  )
819
839
 
820
840
  if success:
@@ -826,10 +846,117 @@ def bundle_import(
826
846
  finally:
827
847
  db_manager.close_driver()
828
848
 
849
+ @bundle_app.command("verify")
850
+ def bundle_verify(
851
+ bundle_file: str = typer.Argument(..., help="Path to the .cgc bundle file to verify"),
852
+ password: Optional[str] = typer.Option(None, "--password", envvar="CGC_BUNDLE_PASSWORD", help="Password for encrypted bundles (or set CGC_BUNDLE_PASSWORD)", hide_input=True),
853
+ verify_key: Optional[str] = typer.Option(None, "--verify-key", envvar="CGC_BUNDLE_VERIFY_KEY", help="HMAC verification key for signed bundles (or set CGC_BUNDLE_VERIFY_KEY)"),
854
+ ):
855
+ """Verify bundle structure, checksums, optional signature, and encryption envelope."""
856
+ from codegraphcontext.core.cgc_bundle import CGCBundle
857
+
858
+ bundle = CGCBundle(None)
859
+ success, message = bundle.verify_bundle(Path(bundle_file), password=password, verify_key=verify_key)
860
+ if success:
861
+ console.print(f"[bold green]Bundle verified:[/bold green] {message}")
862
+ else:
863
+ console.print(f"[bold red]Bundle verification failed:[/bold red] {message}")
864
+ raise typer.Exit(code=1)
865
+
866
+
867
+ @bundle_app.command("inspect")
868
+ def bundle_inspect(
869
+ bundle_file: str = typer.Argument(..., help="Path to the .cgc bundle file to inspect"),
870
+ password: Optional[str] = typer.Option(None, "--password", envvar="CGC_BUNDLE_PASSWORD", help="Password for encrypted bundles (or set CGC_BUNDLE_PASSWORD)", hide_input=True),
871
+ verify_key: Optional[str] = typer.Option(None, "--verify-key", envvar="CGC_BUNDLE_VERIFY_KEY", help="HMAC verification key for signed bundles (or set CGC_BUNDLE_VERIFY_KEY)"),
872
+ json_output: bool = typer.Option(False, "--json", help="Print raw JSON inspection output"),
873
+ ):
874
+ """Inspect bundle metadata without importing it."""
875
+ from codegraphcontext.core.cgc_bundle import CGCBundle
876
+
877
+ bundle = CGCBundle(None)
878
+ success, info = bundle.inspect_bundle(Path(bundle_file), password=password, verify_key=verify_key)
879
+ if not success:
880
+ console.print(f"[bold red]Inspect failed:[/bold red] {info.get('error', 'unknown error')}")
881
+ raise typer.Exit(code=1)
882
+ if json_output:
883
+ console.print_json(data=info)
884
+ return
885
+
886
+ metadata = info.get("metadata", {})
887
+ stats = info.get("stats", {})
888
+ graph_metrics = metadata.get("graph_metrics", {})
889
+ table = Table(title=f"Bundle: {Path(bundle_file).name}", show_header=False)
890
+ table.add_column("Field", style="cyan")
891
+ table.add_column("Value", overflow="fold")
892
+ table.add_row("Repository", str(metadata.get("repo", "unknown")))
893
+ table.add_row("Name", str(metadata.get("name", Path(bundle_file).name)))
894
+ table.add_row("Format", str(metadata.get("format_version", metadata.get("cgc_version", "unknown"))))
895
+ table.add_row("Exported", str(metadata.get("exported_at", "unknown")))
896
+ table.add_row("Nodes", str(graph_metrics.get("total_nodes", stats.get("node_count", "unknown"))))
897
+ table.add_row("Edges", str(graph_metrics.get("total_edges", stats.get("edge_count", "unknown"))))
898
+ table.add_row("Encrypted", "yes" if info.get("encrypted") else "no")
899
+ table.add_row("Signed", "yes" if info.get("signed") else "no")
900
+ table.add_row("Valid", "yes" if info.get("valid") else f"no ({info.get('validation')})")
901
+ console.print(table)
902
+
903
+
904
+ @bundle_app.command("diff")
905
+ def bundle_diff(
906
+ left_bundle: str = typer.Argument(..., help="Older/base .cgc bundle"),
907
+ right_bundle: str = typer.Argument(..., help="Newer/target .cgc bundle"),
908
+ left_password: Optional[str] = typer.Option(None, "--left-password", help="Password for the left encrypted bundle", hide_input=True),
909
+ right_password: Optional[str] = typer.Option(None, "--right-password", help="Password for the right encrypted bundle", hide_input=True),
910
+ left_verify_key: Optional[str] = typer.Option(None, "--left-verify-key", help="HMAC verification key for the left signed bundle"),
911
+ right_verify_key: Optional[str] = typer.Option(None, "--right-verify-key", help="HMAC verification key for the right signed bundle"),
912
+ json_output: bool = typer.Option(False, "--json", help="Print raw JSON diff output"),
913
+ limit: int = typer.Option(20, "--limit", help="Maximum changed keys to show per category"),
914
+ ):
915
+ """Compare two .cgc bundles without importing them."""
916
+ from codegraphcontext.core.cgc_bundle import CGCBundle
917
+
918
+ bundle = CGCBundle(None)
919
+ success, diff = bundle.diff_bundles(
920
+ Path(left_bundle),
921
+ Path(right_bundle),
922
+ left_password=left_password or os.environ.get("CGC_BUNDLE_PASSWORD"),
923
+ right_password=right_password or os.environ.get("CGC_BUNDLE_PASSWORD"),
924
+ left_verify_key=left_verify_key or os.environ.get("CGC_BUNDLE_VERIFY_KEY"),
925
+ right_verify_key=right_verify_key or os.environ.get("CGC_BUNDLE_VERIFY_KEY"),
926
+ )
927
+ if not success:
928
+ console.print(f"[bold red]Diff failed:[/bold red] {diff.get('error', 'unknown error')}")
929
+ raise typer.Exit(code=1)
930
+ if json_output:
931
+ console.print_json(data=diff)
932
+ return
933
+
934
+ table = Table(title="Bundle Diff")
935
+ table.add_column("Category", style="cyan")
936
+ table.add_column("Added", justify="right", style="green")
937
+ table.add_column("Removed", justify="right", style="red")
938
+ table.add_column("Changed", justify="right", style="yellow")
939
+ for category in ("nodes", "edges"):
940
+ item = diff[category]
941
+ table.add_row(category, str(len(item["added"])), str(len(item["removed"])), str(len(item["changed"])))
942
+ console.print(table)
943
+
944
+ for category in ("nodes", "edges"):
945
+ item = diff[category]
946
+ samples = []
947
+ for label in ("added", "removed", "changed"):
948
+ values = item[label][:limit]
949
+ if values:
950
+ samples.append(f"[bold]{category} {label}[/bold]\n" + "\n".join(f" {value}" for value in values))
951
+ if samples:
952
+ console.print("\n".join(samples))
953
+
829
954
  @bundle_app.command("load")
830
955
  def bundle_load(
831
956
  bundle_name: str = typer.Argument(..., help="Bundle name or path to load (e.g., 'numpy' or 'numpy.cgc')"),
832
957
  clear: bool = typer.Option(False, "--clear", help="Clear existing graph data before loading"),
958
+ password: Optional[str] = typer.Option(None, "--password", envvar="CGC_BUNDLE_PASSWORD", help="Password for encrypted bundles (or set CGC_BUNDLE_PASSWORD)", hide_input=True),
959
+ verify_key: Optional[str] = typer.Option(None, "--verify-key", envvar="CGC_BUNDLE_VERIFY_KEY", help="HMAC verification key for signed bundles (or set CGC_BUNDLE_VERIFY_KEY)"),
833
960
  yes: bool = typer.Option(False, "--yes", "-y", help="Skip confirmation when using --clear"),
834
961
  context: Optional[str] = typer.Option(None, "--context", "-c", help="Specific context to use"),
835
962
  ):
@@ -852,7 +979,7 @@ def bundle_load(
852
979
 
853
980
  # If it's an absolute path or has .cgc extension and exists, use it directly
854
981
  if bundle_path.is_absolute() or (bundle_path.suffix == '.cgc' and bundle_path.exists()):
855
- bundle_import(str(bundle_path), clear=clear, yes=yes, context=context)
982
+ bundle_import(str(bundle_path), clear=clear, password=password, verify_key=verify_key, yes=yes, context=context)
856
983
  return
857
984
 
858
985
  # Add .cgc extension if not present
@@ -862,7 +989,7 @@ def bundle_load(
862
989
  # Check if exists locally
863
990
  if bundle_path.exists():
864
991
  console.print(f"[dim]Found local bundle: {bundle_path}[/dim]")
865
- bundle_import(str(bundle_path), clear=clear, yes=yes, context=context)
992
+ bundle_import(str(bundle_path), clear=clear, password=password, verify_key=verify_key, yes=yes, context=context)
866
993
  return
867
994
 
868
995
  # Try to download from registry
@@ -880,7 +1007,7 @@ def bundle_load(
880
1007
 
881
1008
  if downloaded_path:
882
1009
  # Import the downloaded bundle
883
- bundle_import(downloaded_path, clear=clear, yes=yes, context=context)
1010
+ bundle_import(downloaded_path, clear=clear, password=password, verify_key=verify_key, yes=yes, context=context)
884
1011
  else:
885
1012
  console.print(f"[bold red]Failed to download bundle '{name}'[/bold red]")
886
1013
  raise typer.Exit(code=1)
@@ -1008,22 +1135,33 @@ def export_shortcut(
1008
1135
  output: str = typer.Argument(..., help="Output path for the .cgc bundle file"),
1009
1136
  repo: Optional[str] = typer.Option(None, "--repo", "-r", help="Specific repository path to export"),
1010
1137
  no_stats: bool = typer.Option(False, "--no-stats", help="Skip generating statistics in the bundle"),
1138
+ sign_key: Optional[str] = typer.Option(None, "--sign-key", envvar="CGC_BUNDLE_SIGN_KEY", help="HMAC signing key (or set CGC_BUNDLE_SIGN_KEY)"),
1139
+ encrypt_password: Optional[str] = typer.Option(None, "--encrypt-password", envvar="CGC_BUNDLE_PASSWORD", help="Encrypt bundle with this password (or set CGC_BUNDLE_PASSWORD)", hide_input=True),
1011
1140
  context: Optional[str] = typer.Option(None, "--context", "-c", help="Specific context to use"),
1012
1141
  ):
1013
1142
  """Shortcut for 'cgc bundle export'"""
1014
- bundle_export(output, repo, no_stats, context)
1143
+ bundle_export(
1144
+ output=output,
1145
+ repo=repo,
1146
+ no_stats=no_stats,
1147
+ sign_key=sign_key,
1148
+ encrypt_password=encrypt_password,
1149
+ context=context,
1150
+ )
1015
1151
 
1016
1152
  @app.command("load", rich_help_panel="Bundle Shortcuts")
1017
1153
  def load_shortcut(
1018
1154
  bundle_name: str = typer.Argument(..., help="Bundle name or path to load"),
1019
1155
  clear: bool = typer.Option(False, "--clear", help="Clear existing graph data before loading"),
1156
+ password: Optional[str] = typer.Option(None, "--password", envvar="CGC_BUNDLE_PASSWORD", help="Password for encrypted bundles (or set CGC_BUNDLE_PASSWORD)", hide_input=True),
1157
+ verify_key: Optional[str] = typer.Option(None, "--verify-key", envvar="CGC_BUNDLE_VERIFY_KEY", help="HMAC verification key for signed bundles (or set CGC_BUNDLE_VERIFY_KEY)"),
1020
1158
  yes: bool = typer.Option(False, "--yes", "-y", help="Skip confirmation when using --clear"),
1021
1159
  context: Optional[str] = typer.Option(None, "--context", "-c", help="Specific context to use"),
1022
1160
  ):
1023
1161
  """Shortcut for 'cgc bundle load'"""
1024
- # Must pass `context` explicitly: invoked as a plain function, Typer does not
1162
+ # Must pass every option explicitly: invoked as a plain function, Typer does not
1025
1163
  # resolve defaults, so an omitted parameter keeps its OptionInfo sentinel.
1026
- bundle_load(bundle_name, clear, yes=yes, context=context)
1164
+ bundle_load(bundle_name, clear, password=password, verify_key=verify_key, yes=yes, context=context)
1027
1165
 
1028
1166
  # ============================================================================
1029
1167
  # REGISTRY COMMAND GROUP - Browse and Download Bundles
@@ -1124,7 +1262,7 @@ def registry_download(
1124
1262
 
1125
1263
  if load and bundle_path:
1126
1264
  console.print("\n[cyan]Loading bundle...[/cyan]")
1127
- bundle_import(bundle_path, clear=False, yes=False, context=None)
1265
+ bundle_import(bundle_path, clear=False, password=None, verify_key=None, yes=False, context=None)
1128
1266
 
1129
1267
  @registry_app.command("request")
1130
1268
  def registry_request(
@@ -2274,7 +2412,11 @@ def find_by_decorator_search(
2274
2412
  db_manager, graph_builder, code_finder = services[:3]
2275
2413
 
2276
2414
  try:
2277
- results = code_finder.find_functions_by_decorator(decorator, file)
2415
+ req_limit = get_tool_result_limit("find_functions_by_decorator")
2416
+ results = code_finder.find_functions_by_decorator(decorator, file, limit=req_limit + 1 if req_limit is not None else None)
2417
+ truncated = bool(req_limit and len(results) > req_limit)
2418
+ if truncated:
2419
+ results = results[:req_limit]
2278
2420
 
2279
2421
  if not results:
2280
2422
  console.print(f"[yellow]No functions found with decorator '@{decorator}'[/yellow]")
@@ -2299,6 +2441,8 @@ def find_by_decorator_search(
2299
2441
 
2300
2442
  console.print(f"[cyan]Found {len(results)} function(s) with decorator '@{decorator}':[/cyan]")
2301
2443
  console.print(table)
2444
+ if truncated:
2445
+ console.print(f"[dim]... truncated ({req_limit} shown), more exist[/dim]")
2302
2446
  finally:
2303
2447
  db_manager.close_driver()
2304
2448
 
@@ -2322,7 +2466,11 @@ def find_by_argument_search(
2322
2466
  db_manager, graph_builder, code_finder = services[:3]
2323
2467
 
2324
2468
  try:
2325
- results = code_finder.find_functions_by_argument(argument, file)
2469
+ req_limit = get_tool_result_limit("find_functions_by_argument")
2470
+ results = code_finder.find_functions_by_argument(argument, file, limit=req_limit + 1 if req_limit is not None else None)
2471
+ truncated = bool(req_limit and len(results) > req_limit)
2472
+ if truncated:
2473
+ results = results[:req_limit]
2326
2474
 
2327
2475
  if not results:
2328
2476
  console.print(f"[yellow]No functions found with argument '{argument}'[/yellow]")
@@ -2344,6 +2492,8 @@ def find_by_argument_search(
2344
2492
 
2345
2493
  console.print(f"[cyan]Found {len(results)} function(s) with argument '{argument}':[/cyan]")
2346
2494
  console.print(table)
2495
+ if truncated:
2496
+ console.print(f"[dim]... truncated ({req_limit} shown), more exist[/dim]")
2347
2497
  finally:
2348
2498
  db_manager.close_driver()
2349
2499
 
@@ -2378,7 +2528,11 @@ def analyze_calls(
2378
2528
  db_manager, graph_builder, code_finder = services[:3]
2379
2529
 
2380
2530
  try:
2381
- results = code_finder.what_does_function_call(function, file)
2531
+ req_limit = get_tool_result_limit("find_callees")
2532
+ results = code_finder.what_does_function_call(function, file, limit=req_limit + 1 if req_limit is not None else None)
2533
+ truncated = bool(req_limit and len(results) > req_limit)
2534
+ if truncated:
2535
+ results = results[:req_limit]
2382
2536
 
2383
2537
  if not results:
2384
2538
  console.print(f"[yellow]No function calls found for '{function}'[/yellow]")
@@ -2407,7 +2561,10 @@ def analyze_calls(
2407
2561
 
2408
2562
  console.print(f"\n[bold cyan]Function '{function}' calls:[/bold cyan]")
2409
2563
  console.print(table)
2410
- console.print(f"\n[dim]Total: {len(results)} function(s)[/dim]")
2564
+ if truncated:
2565
+ console.print(f"\n[dim]Total: {len(results)} function(s) (truncated, {req_limit}+ exist)[/dim]")
2566
+ else:
2567
+ console.print(f"\n[dim]Total: {len(results)} function(s)[/dim]")
2411
2568
  finally:
2412
2569
  db_manager.close_driver()
2413
2570
 
@@ -2434,7 +2591,11 @@ def analyze_callers(
2434
2591
  db_manager, graph_builder, code_finder = services[:3]
2435
2592
 
2436
2593
  try:
2437
- results = code_finder.who_calls_function(function, file)
2594
+ req_limit = get_tool_result_limit("find_callers")
2595
+ results = code_finder.who_calls_function(function, file, limit=req_limit + 1 if req_limit is not None else None)
2596
+ truncated = bool(req_limit and len(results) > req_limit)
2597
+ if truncated:
2598
+ results = results[:req_limit]
2438
2599
 
2439
2600
  if not results:
2440
2601
  console.print(f"[yellow]No callers found for '{function}'[/yellow]")
@@ -2465,7 +2626,10 @@ def analyze_callers(
2465
2626
 
2466
2627
  console.print(f"\n[bold cyan]Functions that call '{function}':[/bold cyan]")
2467
2628
  console.print(table)
2468
- console.print(f"\n[dim]Total: {len(results)} caller(s)[/dim]")
2629
+ if truncated:
2630
+ console.print(f"\n[dim]Total: {len(results)} caller(s) (truncated, {req_limit}+ exist)[/dim]")
2631
+ else:
2632
+ console.print(f"\n[dim]Total: {len(results)} caller(s)[/dim]")
2469
2633
  finally:
2470
2634
  db_manager.close_driver()
2471
2635
 
@@ -2495,7 +2659,11 @@ def analyze_chain(
2495
2659
  db_manager, graph_builder, code_finder = services[:3]
2496
2660
 
2497
2661
  try:
2498
- results = code_finder.find_function_call_chain(from_func, to_func, max_depth, from_file, to_file)
2662
+ req_limit = get_tool_result_limit("call_chain")
2663
+ results = code_finder.find_function_call_chain(from_func, to_func, max_depth, from_file, to_file, limit=req_limit + 1 if req_limit is not None else None)
2664
+ truncated = bool(req_limit and len(results) > req_limit)
2665
+ if truncated:
2666
+ results = results[:req_limit]
2499
2667
 
2500
2668
  if not results:
2501
2669
  console.print(f"[yellow]No call chain found between '{from_func}' and '{to_func}' within depth {max_depth}[/yellow]")
@@ -2855,10 +3023,19 @@ def analyze_dead_code(
2855
3023
  # `path` was accepted and then dropped, so running inside one repository
2856
3024
  # still reported dead code from every repository in the database.
2857
3025
  repo_path = Path(path).resolve().as_posix() if path else None
2858
- results = code_finder.find_dead_code(exclude_list, repo_path=repo_path)
3026
+ # find_dead_code used to cap itself at 50 rows inside the query, which
3027
+ # doubled as this table's page size by accident. Now that it returns
3028
+ # the full set, ask for a page explicitly -- otherwise a real codebase
3029
+ # (7,141 dead functions was the reported figure) would print thousands
3030
+ # of table rows. The true count comes from total_count below (#1606).
3031
+ display_limit = get_tool_result_limit("find_dead_code")
3032
+ results = code_finder.find_dead_code(
3033
+ exclude_list, repo_path=repo_path, limit=display_limit
3034
+ )
2859
3035
 
2860
3036
  unused_funcs = results.get('potentially_unused_functions', [])
2861
-
3037
+ total_count = results.get('total_count', len(unused_funcs))
3038
+
2862
3039
  if not unused_funcs:
2863
3040
  console.print("[green]✓ No dead code found![/green]")
2864
3041
  return
@@ -2879,7 +3056,13 @@ def analyze_dead_code(
2879
3056
 
2880
3057
  console.print("\n[bold yellow]⚠️ Potentially Unused Functions:[/bold yellow]")
2881
3058
  console.print(table)
2882
- console.print(f"\n[dim]Total: {len(unused_funcs)} function(s)[/dim]")
3059
+ if total_count > len(unused_funcs):
3060
+ console.print(
3061
+ f"\n[dim]Total: {total_count} function(s); "
3062
+ f"showing the first {len(unused_funcs)} by path[/dim]"
3063
+ )
3064
+ else:
3065
+ console.print(f"\n[dim]Total: {total_count} function(s)[/dim]")
2883
3066
  console.print(f"[dim]Note: {results.get('note', '')}[/dim]")
2884
3067
  finally:
2885
3068
  db_manager.close_driver()
@@ -2908,7 +3091,11 @@ def analyze_overrides(
2908
3091
  db_manager, graph_builder, code_finder = services[:3]
2909
3092
 
2910
3093
  try:
2911
- results = code_finder.find_function_overrides(function_name)
3094
+ req_limit = get_tool_result_limit("overrides")
3095
+ results = code_finder.find_function_overrides(function_name, limit=req_limit + 1 if req_limit is not None else None)
3096
+ truncated = bool(req_limit and len(results) > req_limit)
3097
+ if truncated:
3098
+ results = results[:req_limit]
2912
3099
 
2913
3100
  if not results:
2914
3101
  console.print(f"[yellow]No implementations found for function '{function_name}'[/yellow]")
@@ -2937,6 +3124,8 @@ def analyze_overrides(
2937
3124
 
2938
3125
  console.print(f"\n[bold cyan]Found {len(results)} implementation(s) of '{function_name}':[/bold cyan]")
2939
3126
  console.print(table)
3127
+ if truncated:
3128
+ console.print(f"[dim]... truncated ({req_limit} shown), more exist[/dim]")
2940
3129
  finally:
2941
3130
  db_manager.close_driver()
2942
3131