cg-code-graph 0.10.1__tar.gz → 0.12.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 (310) hide show
  1. {cg_code_graph-0.10.1/cg_code_graph.egg-info → cg_code_graph-0.12.0}/PKG-INFO +15 -13
  2. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/README.md +13 -11
  3. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0/cg_code_graph.egg-info}/PKG-INFO +15 -13
  4. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/cg_code_graph.egg-info/SOURCES.txt +44 -1
  5. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/cg_code_graph.egg-info/requires.txt +1 -1
  6. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/__init__.py +1 -1
  7. cg_code_graph-0.12.0/codegraph/agent_rules.py +57 -0
  8. cg_code_graph-0.12.0/codegraph/agents.py +150 -0
  9. cg_code_graph-0.12.0/codegraph/android_ipc.py +400 -0
  10. cg_code_graph-0.12.0/codegraph/apple_ipc.py +184 -0
  11. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/blindspots.py +25 -0
  12. cg_code_graph-0.12.0/codegraph/brokers.py +1460 -0
  13. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/cli.py +28 -2
  14. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/core/model.py +2 -0
  15. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/coverage.py +21 -1
  16. cg_code_graph-0.12.0/codegraph/dart_isolates.py +149 -0
  17. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/external.py +383 -5
  18. cg_code_graph-0.12.0/codegraph/graphql.py +1040 -0
  19. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/indexer.py +84 -0
  20. cg_code_graph-0.12.0/codegraph/jobs.py +997 -0
  21. cg_code_graph-0.12.0/codegraph/local_ipc.py +676 -0
  22. cg_code_graph-0.12.0/codegraph/local_sockets.py +462 -0
  23. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/mcp_server.py +17 -3
  24. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/platforms.py +3 -2
  25. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/cfamily/plugin.py +26 -1
  26. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/cfamily/syntax.py +104 -2
  27. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/django/plugin.py +34 -2
  28. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/django/urls.py +134 -1
  29. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/express/plugin.py +8 -1
  30. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/kotlin/exact.py +43 -5
  31. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/kotlin/plugin.py +588 -42
  32. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/laravel/plugin.py +109 -12
  33. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/native/scipread.py +9 -1
  34. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/nest/plugin.py +76 -3
  35. cg_code_graph-0.12.0/codegraph/plugins/nuxt/plugin.py +923 -0
  36. cg_code_graph-0.12.0/codegraph/plugins/php/external.py +191 -0
  37. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/php/extractor/extract.php +212 -15
  38. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/php/plugin.py +3 -0
  39. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/python/aitools.py +31 -1
  40. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/python/external.py +36 -7
  41. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/python/socketio.py +11 -1
  42. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/rust/plugin.py +68 -8
  43. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/rust/syntax.py +74 -3
  44. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/swift/plugin.py +9 -8
  45. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/ts/extractor/extract.mjs +445 -6
  46. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/ts/extractor/fw.mjs +316 -3
  47. cg_code_graph-0.12.0/codegraph/plugins/ts/nav.py +252 -0
  48. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/ts/plugin.py +257 -2
  49. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/tsweb/common.py +4 -3
  50. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/tsweb/data.py +239 -4
  51. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/presets/django.yaml +5 -0
  52. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/process_runs.py +48 -0
  53. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/protocols/__init__.py +59 -3
  54. cg_code_graph-0.12.0/codegraph/protocols/builtin.py +158 -0
  55. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/protocols/matchers.py +43 -2
  56. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/protocols/view.py +98 -15
  57. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/query.py +310 -29
  58. cg_code_graph-0.12.0/codegraph/realtime_events.py +470 -0
  59. cg_code_graph-0.12.0/codegraph/realtime_native.py +267 -0
  60. cg_code_graph-0.12.0/codegraph/realtime_ws.py +362 -0
  61. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/routes.py +16 -2
  62. cg_code_graph-0.12.0/codegraph/rpc.py +1217 -0
  63. cg_code_graph-0.12.0/codegraph/sockets.py +1144 -0
  64. cg_code_graph-0.12.0/codegraph/udp_apps.py +389 -0
  65. cg_code_graph-0.12.0/codegraph/webhooks.py +598 -0
  66. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/pyproject.toml +1 -1
  67. cg_code_graph-0.12.0/tests/test_agents_install.py +123 -0
  68. cg_code_graph-0.12.0/tests/test_agents_md.py +17 -0
  69. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/tests/test_ai_tools.py +103 -0
  70. cg_code_graph-0.12.0/tests/test_android_ipc.py +123 -0
  71. cg_code_graph-0.12.0/tests/test_apple_ipc.py +55 -0
  72. cg_code_graph-0.12.0/tests/test_brokers.py +166 -0
  73. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/tests/test_coverage_ts_hint.py +27 -0
  74. cg_code_graph-0.12.0/tests/test_dart_isolates.py +65 -0
  75. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/tests/test_django_flutter.py +112 -0
  76. cg_code_graph-0.12.0/tests/test_external.py +541 -0
  77. cg_code_graph-0.12.0/tests/test_graphql.py +148 -0
  78. cg_code_graph-0.12.0/tests/test_jobs.py +200 -0
  79. cg_code_graph-0.12.0/tests/test_js_refs.py +54 -0
  80. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/tests/test_kotlin.py +50 -1
  81. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/tests/test_kotlin_mixed.py +24 -0
  82. cg_code_graph-0.12.0/tests/test_laravel_resources.py +138 -0
  83. cg_code_graph-0.12.0/tests/test_local_ipc.py +119 -0
  84. cg_code_graph-0.12.0/tests/test_local_sockets.py +104 -0
  85. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/tests/test_native_cfamily.py +77 -0
  86. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/tests/test_native_rust.py +36 -0
  87. cg_code_graph-0.12.0/tests/test_nuxt_import_dirs.py +136 -0
  88. cg_code_graph-0.12.0/tests/test_plain_js.py +76 -0
  89. cg_code_graph-0.12.0/tests/test_process_ipc.py +72 -0
  90. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/tests/test_process_runs.py +38 -5
  91. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/tests/test_protocols.py +8 -1
  92. cg_code_graph-0.12.0/tests/test_realtime.py +117 -0
  93. cg_code_graph-0.12.0/tests/test_realtime_native.py +90 -0
  94. cg_code_graph-0.12.0/tests/test_route_tables.py +186 -0
  95. cg_code_graph-0.12.0/tests/test_rpc.py +185 -0
  96. cg_code_graph-0.12.0/tests/test_snippet.py +106 -0
  97. cg_code_graph-0.12.0/tests/test_sockets.py +169 -0
  98. cg_code_graph-0.12.0/tests/test_vue_nav.py +122 -0
  99. cg_code_graph-0.12.0/tests/test_webhooks.py +134 -0
  100. cg_code_graph-0.12.0/tests/test_websockets.py +142 -0
  101. cg_code_graph-0.10.1/codegraph/plugins/nuxt/plugin.py +0 -308
  102. cg_code_graph-0.10.1/codegraph/protocols/builtin.py +0 -67
  103. cg_code_graph-0.10.1/tests/test_external.py +0 -288
  104. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/LICENSE +0 -0
  105. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/MANIFEST.in +0 -0
  106. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/cg_code_graph.egg-info/dependency_links.txt +0 -0
  107. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/cg_code_graph.egg-info/entry_points.txt +0 -0
  108. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/cg_code_graph.egg-info/top_level.txt +0 -0
  109. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/aitools.py +0 -0
  110. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/apps.py +0 -0
  111. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/bridges.py +0 -0
  112. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/concepts.py +0 -0
  113. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/config.py +0 -0
  114. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/core/__init__.py +0 -0
  115. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/core/cache.py +0 -0
  116. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/core/detect.py +0 -0
  117. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/core/extractors.py +0 -0
  118. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/core/fsutil.py +0 -0
  119. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/core/generated.py +0 -0
  120. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/core/paths.py +0 -0
  121. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/core/plugin.py +0 -0
  122. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/core/store.py +0 -0
  123. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/core/syntax_errors.py +0 -0
  124. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/doctor.py +0 -0
  125. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/link.py +0 -0
  126. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/lint_async.py +0 -0
  127. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/parity.py +0 -0
  128. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/parity_structure.py +0 -0
  129. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/payload.py +0 -0
  130. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plans.py +0 -0
  131. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/platform_scan.py +0 -0
  132. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/__init__.py +0 -0
  133. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/cfamily/__init__.py +0 -0
  134. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/dart/__init__.py +0 -0
  135. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/dart/bridges.py +0 -0
  136. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/dart/extractor/bin/extract.dart +0 -0
  137. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/dart/extractor/pubspec.lock +0 -0
  138. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/dart/extractor/pubspec.yaml +0 -0
  139. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/dart/http.py +0 -0
  140. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/dart/models.py +0 -0
  141. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/dart/plugin.py +0 -0
  142. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/dart/program.py +0 -0
  143. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/django/__init__.py +0 -0
  144. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/django/extras.py +0 -0
  145. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/django/models.py +0 -0
  146. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/django/schemas.py +0 -0
  147. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/django/shapes.py +0 -0
  148. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/express/__init__.py +0 -0
  149. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/flutter/__init__.py +0 -0
  150. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/flutter/plugin.py +0 -0
  151. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/kotlin/__init__.py +0 -0
  152. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/kotlin/reparse.py +0 -0
  153. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/laravel/__init__.py +0 -0
  154. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/laravel/broadcast.py +0 -0
  155. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/laravel/tests.py +0 -0
  156. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/laravel/values.py +0 -0
  157. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/native/__init__.py +0 -0
  158. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/native/gates.py +0 -0
  159. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/native/runner.py +0 -0
  160. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/native/ts.py +0 -0
  161. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/nest/__init__.py +0 -0
  162. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/nextjs/__init__.py +0 -0
  163. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/nextjs/plugin.py +0 -0
  164. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/nuxt/__init__.py +0 -0
  165. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/php/__init__.py +0 -0
  166. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/php/extractor/composer.json +0 -0
  167. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/php/extractor/composer.lock +0 -0
  168. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/php/gating.py +0 -0
  169. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/php/strings.py +0 -0
  170. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/python/__init__.py +0 -0
  171. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/python/fields.py +0 -0
  172. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/python/plugin.py +0 -0
  173. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/python/refs.py +0 -0
  174. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/python/roots.py +0 -0
  175. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/python/subproc.py +0 -0
  176. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/python/tests.py +0 -0
  177. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/python/values.py +0 -0
  178. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/pyweb/__init__.py +0 -0
  179. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/pyweb/plugin.py +0 -0
  180. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/pyweb/values.py +0 -0
  181. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/rust/__init__.py +0 -0
  182. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/rust/cargo.py +0 -0
  183. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/scip/__init__.py +0 -0
  184. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/scip/importer.py +0 -0
  185. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/scip/scip.proto +0 -0
  186. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/scip/scip_pb2.py +0 -0
  187. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/stubs/__init__.py +0 -0
  188. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/stubs/plugins.py +0 -0
  189. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/swift/__init__.py +0 -0
  190. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/swift/baseurl.py +0 -0
  191. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/swift/exact.py +0 -0
  192. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/swift/indexstore.py +0 -0
  193. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/swift/packages.py +0 -0
  194. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/ts/__init__.py +0 -0
  195. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/ts/baseurl.py +0 -0
  196. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/ts/extractor/package-lock.json +0 -0
  197. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/ts/extractor/package.json +0 -0
  198. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/plugins/tsweb/__init__.py +0 -0
  199. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/presets/__init__.py +0 -0
  200. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/presets/c_cpp.yaml +0 -0
  201. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/presets/common.yaml +0 -0
  202. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/presets/dart.yaml +0 -0
  203. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/presets/django-ninja.yaml +0 -0
  204. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/presets/djangorestframework.yaml +0 -0
  205. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/presets/express.yaml +0 -0
  206. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/presets/kotlin.yaml +0 -0
  207. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/presets/laravel.yaml +0 -0
  208. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/presets/nest.yaml +0 -0
  209. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/presets/nextjs.yaml +0 -0
  210. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/presets/nuxt.yaml +0 -0
  211. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/presets/php.yaml +0 -0
  212. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/presets/python.yaml +0 -0
  213. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/presets/rust.yaml +0 -0
  214. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/presets/swift.yaml +0 -0
  215. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/presets/typescript.yaml +0 -0
  216. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/realtime.py +0 -0
  217. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/roundtrip.py +0 -0
  218. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/starters.py +0 -0
  219. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/tests_index.py +0 -0
  220. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/viz/__init__.py +0 -0
  221. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/viz/graph.py +0 -0
  222. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/viz/server.py +0 -0
  223. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/viz/static/app.css +0 -0
  224. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/viz/static/app.js +0 -0
  225. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/viz/static/index.html +0 -0
  226. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/viz/static/layered.js +0 -0
  227. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/viz/static/vendor/VERSIONS.txt +0 -0
  228. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/viz/static/vendor/cose-base.js +0 -0
  229. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/viz/static/vendor/cytoscape-fcose.js +0 -0
  230. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/viz/static/vendor/cytoscape.min.js +0 -0
  231. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/viz/static/vendor/layout-base.js +0 -0
  232. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/viz/tools/package-lock.json +0 -0
  233. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/viz/tools/package.json +0 -0
  234. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/viz/tools/shoot.mjs +0 -0
  235. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/codegraph/xcode.py +0 -0
  236. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/setup.cfg +0 -0
  237. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/tests/test_bridges.py +0 -0
  238. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/tests/test_bridges_pigeon_monorepo.py +0 -0
  239. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/tests/test_cache_clean.py +0 -0
  240. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/tests/test_cache_invalidation.py +0 -0
  241. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/tests/test_channels_tests.py +0 -0
  242. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/tests/test_cli_output.py +0 -0
  243. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/tests/test_completeness.py +0 -0
  244. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/tests/test_config_extras.py +0 -0
  245. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/tests/test_coverage.py +0 -0
  246. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/tests/test_dispatch_interfaces.py +0 -0
  247. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/tests/test_enum_constants.py +0 -0
  248. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/tests/test_gating.py +0 -0
  249. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/tests/test_generated.py +0 -0
  250. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/tests/test_impact_overrides.py +0 -0
  251. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/tests/test_index_isolation.py +0 -0
  252. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/tests/test_inherited_overrides.py +0 -0
  253. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/tests/test_kotlin_binding.py +0 -0
  254. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/tests/test_kotlin_exact.py +0 -0
  255. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/tests/test_kotlin_fields.py +0 -0
  256. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/tests/test_kotlin_nav_consts.py +0 -0
  257. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/tests/test_kotlin_props.py +0 -0
  258. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/tests/test_laravel_determinism.py +0 -0
  259. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/tests/test_lint_async.py +0 -0
  260. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/tests/test_mcp.py +0 -0
  261. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/tests/test_mcp_index.py +0 -0
  262. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/tests/test_native_concurrency.py +0 -0
  263. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/tests/test_nuxt_rootsrc.py +0 -0
  264. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/tests/test_packaging.py +0 -0
  265. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/tests/test_parity.py +0 -0
  266. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/tests/test_parity_structure.py +0 -0
  267. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/tests/test_php_props.py +0 -0
  268. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/tests/test_plans.py +0 -0
  269. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/tests/test_platform_gaps.py +0 -0
  270. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/tests/test_platform_type_variants.py +0 -0
  271. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/tests/test_platforms.py +0 -0
  272. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/tests/test_platforms_apple.py +0 -0
  273. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/tests/test_presets_config.py +0 -0
  274. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/tests/test_python_app_tests_module.py +0 -0
  275. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/tests/test_python_collection_chains.py +0 -0
  276. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/tests/test_python_compat.py +0 -0
  277. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/tests/test_python_entry_refs.py +0 -0
  278. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/tests/test_python_fields.py +0 -0
  279. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/tests/test_python_infer_cycles.py +0 -0
  280. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/tests/test_python_roots.py +0 -0
  281. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/tests/test_python_subprocess_tests.py +0 -0
  282. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/tests/test_python_tests.py +0 -0
  283. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/tests/test_python_web_hosts.py +0 -0
  284. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/tests/test_python_web_routes.py +0 -0
  285. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/tests/test_python_web_routes_more.py +0 -0
  286. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/tests/test_roundtrip.py +0 -0
  287. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/tests/test_routes_search_explain.py +0 -0
  288. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/tests/test_scip_health.py +0 -0
  289. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/tests/test_starters_budget.py +0 -0
  290. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/tests/test_swift.py +0 -0
  291. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/tests/test_swift_binding.py +0 -0
  292. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/tests/test_swift_exact.py +0 -0
  293. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/tests/test_swift_facts.py +0 -0
  294. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/tests/test_swift_fields.py +0 -0
  295. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/tests/test_swift_modules.py +0 -0
  296. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/tests/test_swift_more.py +0 -0
  297. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/tests/test_swift_nav_values.py +0 -0
  298. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/tests/test_swift_parse_errors.py +0 -0
  299. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/tests/test_swift_props.py +0 -0
  300. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/tests/test_swift_sdk.py +0 -0
  301. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/tests/test_swift_testing.py +0 -0
  302. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/tests/test_swift_values.py +0 -0
  303. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/tests/test_tests_scope.py +0 -0
  304. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/tests/test_ts_fields.py +0 -0
  305. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/tests/test_ts_fields_js_vue.py +0 -0
  306. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/tests/test_ts_file_specs.py +0 -0
  307. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/tests/test_ts_frameworks.py +0 -0
  308. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/tests/test_ts_nuxt.py +0 -0
  309. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/tests/test_values.py +0 -0
  310. {cg_code_graph-0.10.1 → cg_code_graph-0.12.0}/tests/test_viz.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cg-code-graph
3
- Version: 0.10.1
3
+ Version: 0.12.0
4
4
  Summary: cg: a code graph of routes, calls, data access and platform boundaries for agents and humans (CLI + MCP server)
5
5
  Author: cyberchronos00
6
6
  License-Expression: MIT
@@ -17,7 +17,7 @@ Requires-Dist: tree-sitter-rust>=0.23
17
17
  Requires-Dist: tree-sitter-c>=0.23
18
18
  Requires-Dist: tree-sitter-cpp>=0.23
19
19
  Requires-Dist: tree-sitter-kotlin>=1.0
20
- Requires-Dist: tree-sitter-swift>=0.6
20
+ Requires-Dist: tree-sitter-swift<0.7.4,>=0.6
21
21
  Provides-Extra: dev
22
22
  Requires-Dist: pytest>=8; extra == "dev"
23
23
  Dynamic: license-file
@@ -93,10 +93,11 @@ other tools; see [Prerequisites per language](#prerequisites-per-language).
93
93
  options and updates):
94
94
 
95
95
  ```bash
96
- curl -fsSL https://raw.githubusercontent.com/cyberchronos00/code-graph/main/install.sh | sh
97
- # or: uv tool install git+https://github.com/cyberchronos00/code-graph
98
- # or: pipx install git+https://github.com/cyberchronos00/code-graph
99
- # or from PyPI: pip install cg-code-graph (uv tool install cg-code-graph / pipx install cg-code-graph)
96
+ pipx install cg-code-graph # or: uv tool install cg-code-graph (PyPI; the commands are cg and cg-mcp)
97
+ # or the script (also installs exact-mode tools with --with c,rust,...):
98
+ # curl -fsSL https://raw.githubusercontent.com/cyberchronos00/code-graph/main/install.sh | sh
99
+ # or the latest commit: uv tool install git+https://github.com/cyberchronos00/code-graph
100
+ # or: pipx install git+https://github.com/cyberchronos00/code-graph
100
101
  cg doctor # what indexes exact / heuristic on this machine, and what to install for the rest
101
102
  git clone https://github.com/cyberchronos00/code-graph.git && cd code-graph # the sample apps used below
102
103
  ```
@@ -206,7 +207,7 @@ The 7 plan gaps are the admin update path, `UpdateBookRequest`, `Book::$fillable
206
207
 
207
208
  ### 1. A CLI for impact questions
208
209
 
209
- `reaches`, `impact`, `downstream`, `path`, `writers`, `siblings`, `routes`, `search`, `api-calls`, `channels`, `tests`
210
+ `reaches`, `impact`, `downstream`, `path`, `writers`, `siblings`, `routes`, `search`, `snippet`, `api-calls`, `channels`, `tests`
210
211
  and `platforms` all work on one SQLite graph, and across repos once the frontend and backend are linked. Every hop shows its evidence:
211
212
 
212
213
  ```text
@@ -314,7 +315,7 @@ Full reference: [docs/cli.md](docs/cli.md) · value facts: [docs/value-facts.md]
314
315
 
315
316
  ### 2. An MCP server for AI agents
316
317
 
317
- The same queries as MCP tools (`reaches`, `impact`, `callers`, `siblings`, `path`, `downstream`, `routes`, `search`, `api_calls`,
318
+ The same queries as MCP tools (`reaches`, `impact`, `callers`, `siblings`, `path`, `downstream`, `routes`, `search`, `snippet`, `api_calls`,
318
319
  `channels`, `tests_covering`, `resolutions`, `plan_check`, `index`, `coverage`, `starters`, `platform_divergence`, …), so an agent can check the blast radius before it edits. Replies are compact,
319
320
  use repo-relative paths, and `plan_check` starts with a summary (`details=true` for the full report). Every reply also
320
321
  carries a machine-readable `completeness` object, so the agent knows when an answer covers the whole repository and
@@ -385,7 +386,7 @@ without configuration; `cg config show` lists what was applied ([docs/configurat
385
386
  | Django REST Framework | resolved | routers, ViewSets (+ `@action`), APIView/generic views, `permission_classes`, serializer fields |
386
387
  | FastAPI / Starlette | resolved | `FastAPI` / `APIRouter` / `Starlette` / `Router` objects, `include_router` / `mount` prefix chains across files (prefixes from constants and settings attributes such as `settings.API_V1_STR`), verb decorators, `api_route`, `add_api_route`, Starlette `routes=[Route, Mount, WebSocketRoute]`, websockets, path parameters, `Depends()` / `Security()` dependencies (parameters, `Annotated` aliases, `dependencies=`) as route access with what each checks (raised 401 / 403, security schemes, nested dependencies), `name=` for `url_path_for`; apps / routers received as parameters or fixtures or returned by factories, Starlette `Host`, `@cbv` / `InferringRouter`, classy-fastapi `Routable` |
387
388
  | Flask | resolved | `Flask` / `Blueprint` objects, `register_blueprint` (`url_prefix` from the blueprint or the registration, nested blueprints), `@route` / verb decorators, `add_url_rule` incl. `MethodView.as_view()` (and its `methods`), endpoint-only rules, werkzeug `Rule` / `Submount`, the built-in static route, views defined in an app factory, apps received as parameters or pytest fixtures, flask-restful / flask-restx resources, `subdomain=` / `defaults=`, `<int:id>` parameters, `blueprint.endpoint` names for `url_for`, view decorators (`login_required`) as route access |
388
- | Celery / Channels | resolved | tasks + `.delay`/`.apply_async` dispatches; websocket routing to consumers |
389
+ | Celery / RQ / Dramatiq / Channels | resolved | tasks + `.delay`/`.apply_async` dispatches; job and queue endpoints by task name across repos (`send_task`, RQ import paths, Dramatiq actors) with worker processes from Procfile / compose; websocket routing to consumers |
389
390
  | Dart | resolved (package:analyzer parse, declared types) + heuristic fallback | libraries/parts, classes, methods, functions, calls with import resolution |
390
391
  | Flutter | resolved + heuristic fallback | widgets/State, bloc/cubit events → handlers → states → UI, Navigator/go_router/auto_route pages, HTTP calls (package:http, Dio, dart:io, Retrofit/Chopper), WebSockets, json_serializable/freezed and hand-written JSON keys |
391
392
  | Rust | **exact** with rust-analyzer (SCIP); **heuristic** without | crates, modules, `pub` API, traits → impls (dyn/generic dispatch), bins, tests, benches, examples, `build.rs`, FFI, `unsafe`, `#[cfg(feature)]` gates, env keys, `#[tokio::main]`, axum/actix routes ([docs/native.md](docs/native.md)) |
@@ -400,7 +401,7 @@ without configuration; `cg config show` lists what was applied ([docs/configurat
400
401
  | Desktop processes | Electron `ipcMain` / `ipcRenderer` / `webContents.send` and `contextBridge.exposeInMainWorld`; Tauri `invoke` → `#[tauri::command]` | `endpoint:electron-ipc:<channel>`, `endpoint:electron-preload:<key>#<member>`, `endpoint:tauri:<command>` with SENDS_TO / RECEIVED_BY across the processes, process roles (main / preload / renderer, webview / core) on module nodes; checks for channels nobody receives and unregistered commands ([docs/bridges.md](docs/bridges.md#desktop-process-boundaries-electron-and-tauri)) |
401
402
  | AI harnesses | MCP servers (FastMCP / MCPServer / low-level) and clients, OpenAI / Anthropic tool schemas, Agents SDK, LangChain, LlamaIndex tools, hand-written agent loops (Python) | `endpoint:llm_tool:<name>` / `endpoint:mcp_tool:<server>/<name>` (resources, prompts) with the handler as an `llm_tool` entry, `agent:<name>` with OFFERS_TOOL / HANDS_OFF_TO; `cg tools` lists handlers, tables reached, agents, no_receiver / no_sender, dynamic dispatch and model calls ([docs/ai-tools.md](docs/ai-tools.md)) |
402
403
  | External systems | Laravel database connections, env keys read by code (`DB_*`, `DATABASE_URL`, `REDIS_*`, `SMTP_*`, `MONGO*`, `AMQP_*`, `LDAP_*`, `SFTP_*`, `S3_*` ...), Python settings (`DATABASES`, `CACHES`, `CELERY_BROKER_URL` ...), `.env.example` values, docker-compose services, DSNs | `external:<protocol>:<host:port>` (or `env:<KEY>`) with CONNECTS_TO from code and connections, CONFIGURED_BY, CREDENTIAL_FROM (location only, never the value), TLS; one node per system across linked repos; `cg external` ([docs/external.md](docs/external.md)) |
403
- | Protocol links | HTTP calls / routes, Pusher channels, NestJS messages, Bull / Laravel / Celery jobs, application events, bridges and IPC in one view; python-socketio / Flask-SocketIO events | `endpoint:<protocol>:<name>` with SENDS_TO / RECEIVED_BY and MATCHES_ENDPOINT (path, MQTT, NATS, AMQP topic, glob and template matchers in a registry plugins extend); `cg protocols` lists senders, receivers, guards and the checks no_receiver, no_sender, ambiguous, schema_mismatch, unguarded; `.cg.yaml` `protocols.external` for known outside parties ([docs/protocols.md](docs/protocols.md)) |
404
+ | Protocol links | HTTP calls / routes, Pusher channels, NestJS messages, Bull / Laravel / Celery jobs, Celery / RQ / Dramatiq / Bull / Laravel / Symfony Messenger job and queue endpoints, application events, Kafka / RabbitMQ / Redis pub/sub and streams / MQTT / NATS producers and consumers, bridges and IPC in one view; python-socketio / Flask-SocketIO events | `endpoint:<protocol>:<name>` with SENDS_TO / RECEIVED_BY and MATCHES_ENDPOINT (path, MQTT, NATS, AMQP, glob and template matchers in a registry plugins extend); `cg protocols` lists senders, receivers, guards and the checks no_receiver, no_sender, ambiguous, schema_mismatch, unguarded, no_consumer; `.cg.yaml` `protocols.external` for known outside parties ([docs/protocols.md](docs/protocols.md)) |
404
405
  | Generated and copied files | detected (`.gitattributes`, generator banners, framework build paths, generator file names, Capacitor / Cordova copy targets, `.openapi-generator/FILES`) | kept out of the graph and listed by `cg coverage` by reason; copies map back to their source; `--include-generated` indexes them labelled `attrs.generated` ([docs/generated.md](docs/generated.md)) |
405
406
 
406
407
  ## Prerequisites per language
@@ -564,7 +565,8 @@ The scope as of v0.3, so you know how far each answer reaches. The full list is
564
565
  (`getattr`, DI containers, Riverpod/Provider lookups without a type) fall back to `heuristic` or stay unresolved.
565
566
  Python dispatch tables, plugin lists, callbacks and registering decorators are followed as function references
566
567
  ([docs/python.md](docs/python.md#entry-points-and-function-references)).
567
- GraphQL APIs (graphene/strawberry) and Django template rendering are not modelled.
568
+ GraphQL root fields (graphene / strawberry / ariadne) are protocol endpoints ([docs/protocols.md](docs/protocols.md#graphql-root-fields));
569
+ object-type fields and Django template rendering are not modelled.
568
570
  - **Next to index:** seeders, `Artisan::command` closures, observers fired by model writes, Nuxt server routes, and
569
571
  navigation edges (`NuxtLink`, `navigateTo`).
570
572
  - **Broadcast channels** are read from `Broadcast::channel` and `broadcastOn()`; names cg cannot evaluate keep a
@@ -624,14 +626,14 @@ Ideas we are exploring after v0.3. Feedback on priorities is welcome.
624
626
  - Swift: `URLComponents` and helper-built URLs, `Info.plist` / `.xcconfig` base URLs, OS-version conditions, App Intents /
625
627
  widget entries, value navigation through variables ([docs/swift.md](docs/swift.md#not-covered-yet)).
626
628
  - Protocol links: extraction for MQTT, NATS, AMQP, Kafka and Redis pub/sub (matchers registered), Socket.IO outside
627
- Python, raw WebSocket / SSE message names, gRPC / GraphQL / webhooks (epic #29; [docs/protocols.md](docs/protocols.md#not-covered-yet)).
629
+ Python, raw WebSocket / SSE message names, GraphQL object-type fields, webhooks (epic #29; [docs/protocols.md](docs/protocols.md#not-covered-yet)).
628
630
  - AI harnesses: TypeScript MCP servers / clients and the Vercel AI SDK, LangGraph graphs, agent runners, tools declared
629
631
  inside functions ([docs/ai-tools.md](docs/ai-tools.md#not-covered-yet)).
630
632
  - External systems: client constructors with literal arguments (`psycopg.connect(host=)`, `new Redis()`, ...),
631
633
  Spring / Rails / Kubernetes configuration, env reads through config schemas ([docs/external.md](docs/external.md#not-covered-yet)).
632
634
  - Web / native bridges beyond Capacitor, React Native, Flutter channels and Pigeon: React Native events, Capacitor
633
635
  `notifyListeners`, Cordova plugins and native UI components ([docs/bridges.md](docs/bridges.md#not-covered-yet)).
634
- - More HTTP clients beyond fetch, axios, ofetch and ky, and response-field modelling for the TypeScript client (setting → API response → client state); GraphQL APIs.
636
+ - More HTTP clients beyond fetch, axios, ofetch and ky, and response-field modelling for the TypeScript client (setting → API response → client state).
635
637
 
636
638
  ## Documentation
637
639
 
@@ -69,10 +69,11 @@ other tools; see [Prerequisites per language](#prerequisites-per-language).
69
69
  options and updates):
70
70
 
71
71
  ```bash
72
- curl -fsSL https://raw.githubusercontent.com/cyberchronos00/code-graph/main/install.sh | sh
73
- # or: uv tool install git+https://github.com/cyberchronos00/code-graph
74
- # or: pipx install git+https://github.com/cyberchronos00/code-graph
75
- # or from PyPI: pip install cg-code-graph (uv tool install cg-code-graph / pipx install cg-code-graph)
72
+ pipx install cg-code-graph # or: uv tool install cg-code-graph (PyPI; the commands are cg and cg-mcp)
73
+ # or the script (also installs exact-mode tools with --with c,rust,...):
74
+ # curl -fsSL https://raw.githubusercontent.com/cyberchronos00/code-graph/main/install.sh | sh
75
+ # or the latest commit: uv tool install git+https://github.com/cyberchronos00/code-graph
76
+ # or: pipx install git+https://github.com/cyberchronos00/code-graph
76
77
  cg doctor # what indexes exact / heuristic on this machine, and what to install for the rest
77
78
  git clone https://github.com/cyberchronos00/code-graph.git && cd code-graph # the sample apps used below
78
79
  ```
@@ -182,7 +183,7 @@ The 7 plan gaps are the admin update path, `UpdateBookRequest`, `Book::$fillable
182
183
 
183
184
  ### 1. A CLI for impact questions
184
185
 
185
- `reaches`, `impact`, `downstream`, `path`, `writers`, `siblings`, `routes`, `search`, `api-calls`, `channels`, `tests`
186
+ `reaches`, `impact`, `downstream`, `path`, `writers`, `siblings`, `routes`, `search`, `snippet`, `api-calls`, `channels`, `tests`
186
187
  and `platforms` all work on one SQLite graph, and across repos once the frontend and backend are linked. Every hop shows its evidence:
187
188
 
188
189
  ```text
@@ -290,7 +291,7 @@ Full reference: [docs/cli.md](docs/cli.md) · value facts: [docs/value-facts.md]
290
291
 
291
292
  ### 2. An MCP server for AI agents
292
293
 
293
- The same queries as MCP tools (`reaches`, `impact`, `callers`, `siblings`, `path`, `downstream`, `routes`, `search`, `api_calls`,
294
+ The same queries as MCP tools (`reaches`, `impact`, `callers`, `siblings`, `path`, `downstream`, `routes`, `search`, `snippet`, `api_calls`,
294
295
  `channels`, `tests_covering`, `resolutions`, `plan_check`, `index`, `coverage`, `starters`, `platform_divergence`, …), so an agent can check the blast radius before it edits. Replies are compact,
295
296
  use repo-relative paths, and `plan_check` starts with a summary (`details=true` for the full report). Every reply also
296
297
  carries a machine-readable `completeness` object, so the agent knows when an answer covers the whole repository and
@@ -361,7 +362,7 @@ without configuration; `cg config show` lists what was applied ([docs/configurat
361
362
  | Django REST Framework | resolved | routers, ViewSets (+ `@action`), APIView/generic views, `permission_classes`, serializer fields |
362
363
  | FastAPI / Starlette | resolved | `FastAPI` / `APIRouter` / `Starlette` / `Router` objects, `include_router` / `mount` prefix chains across files (prefixes from constants and settings attributes such as `settings.API_V1_STR`), verb decorators, `api_route`, `add_api_route`, Starlette `routes=[Route, Mount, WebSocketRoute]`, websockets, path parameters, `Depends()` / `Security()` dependencies (parameters, `Annotated` aliases, `dependencies=`) as route access with what each checks (raised 401 / 403, security schemes, nested dependencies), `name=` for `url_path_for`; apps / routers received as parameters or fixtures or returned by factories, Starlette `Host`, `@cbv` / `InferringRouter`, classy-fastapi `Routable` |
363
364
  | Flask | resolved | `Flask` / `Blueprint` objects, `register_blueprint` (`url_prefix` from the blueprint or the registration, nested blueprints), `@route` / verb decorators, `add_url_rule` incl. `MethodView.as_view()` (and its `methods`), endpoint-only rules, werkzeug `Rule` / `Submount`, the built-in static route, views defined in an app factory, apps received as parameters or pytest fixtures, flask-restful / flask-restx resources, `subdomain=` / `defaults=`, `<int:id>` parameters, `blueprint.endpoint` names for `url_for`, view decorators (`login_required`) as route access |
364
- | Celery / Channels | resolved | tasks + `.delay`/`.apply_async` dispatches; websocket routing to consumers |
365
+ | Celery / RQ / Dramatiq / Channels | resolved | tasks + `.delay`/`.apply_async` dispatches; job and queue endpoints by task name across repos (`send_task`, RQ import paths, Dramatiq actors) with worker processes from Procfile / compose; websocket routing to consumers |
365
366
  | Dart | resolved (package:analyzer parse, declared types) + heuristic fallback | libraries/parts, classes, methods, functions, calls with import resolution |
366
367
  | Flutter | resolved + heuristic fallback | widgets/State, bloc/cubit events → handlers → states → UI, Navigator/go_router/auto_route pages, HTTP calls (package:http, Dio, dart:io, Retrofit/Chopper), WebSockets, json_serializable/freezed and hand-written JSON keys |
367
368
  | Rust | **exact** with rust-analyzer (SCIP); **heuristic** without | crates, modules, `pub` API, traits → impls (dyn/generic dispatch), bins, tests, benches, examples, `build.rs`, FFI, `unsafe`, `#[cfg(feature)]` gates, env keys, `#[tokio::main]`, axum/actix routes ([docs/native.md](docs/native.md)) |
@@ -376,7 +377,7 @@ without configuration; `cg config show` lists what was applied ([docs/configurat
376
377
  | Desktop processes | Electron `ipcMain` / `ipcRenderer` / `webContents.send` and `contextBridge.exposeInMainWorld`; Tauri `invoke` → `#[tauri::command]` | `endpoint:electron-ipc:<channel>`, `endpoint:electron-preload:<key>#<member>`, `endpoint:tauri:<command>` with SENDS_TO / RECEIVED_BY across the processes, process roles (main / preload / renderer, webview / core) on module nodes; checks for channels nobody receives and unregistered commands ([docs/bridges.md](docs/bridges.md#desktop-process-boundaries-electron-and-tauri)) |
377
378
  | AI harnesses | MCP servers (FastMCP / MCPServer / low-level) and clients, OpenAI / Anthropic tool schemas, Agents SDK, LangChain, LlamaIndex tools, hand-written agent loops (Python) | `endpoint:llm_tool:<name>` / `endpoint:mcp_tool:<server>/<name>` (resources, prompts) with the handler as an `llm_tool` entry, `agent:<name>` with OFFERS_TOOL / HANDS_OFF_TO; `cg tools` lists handlers, tables reached, agents, no_receiver / no_sender, dynamic dispatch and model calls ([docs/ai-tools.md](docs/ai-tools.md)) |
378
379
  | External systems | Laravel database connections, env keys read by code (`DB_*`, `DATABASE_URL`, `REDIS_*`, `SMTP_*`, `MONGO*`, `AMQP_*`, `LDAP_*`, `SFTP_*`, `S3_*` ...), Python settings (`DATABASES`, `CACHES`, `CELERY_BROKER_URL` ...), `.env.example` values, docker-compose services, DSNs | `external:<protocol>:<host:port>` (or `env:<KEY>`) with CONNECTS_TO from code and connections, CONFIGURED_BY, CREDENTIAL_FROM (location only, never the value), TLS; one node per system across linked repos; `cg external` ([docs/external.md](docs/external.md)) |
379
- | Protocol links | HTTP calls / routes, Pusher channels, NestJS messages, Bull / Laravel / Celery jobs, application events, bridges and IPC in one view; python-socketio / Flask-SocketIO events | `endpoint:<protocol>:<name>` with SENDS_TO / RECEIVED_BY and MATCHES_ENDPOINT (path, MQTT, NATS, AMQP topic, glob and template matchers in a registry plugins extend); `cg protocols` lists senders, receivers, guards and the checks no_receiver, no_sender, ambiguous, schema_mismatch, unguarded; `.cg.yaml` `protocols.external` for known outside parties ([docs/protocols.md](docs/protocols.md)) |
380
+ | Protocol links | HTTP calls / routes, Pusher channels, NestJS messages, Bull / Laravel / Celery jobs, Celery / RQ / Dramatiq / Bull / Laravel / Symfony Messenger job and queue endpoints, application events, Kafka / RabbitMQ / Redis pub/sub and streams / MQTT / NATS producers and consumers, bridges and IPC in one view; python-socketio / Flask-SocketIO events | `endpoint:<protocol>:<name>` with SENDS_TO / RECEIVED_BY and MATCHES_ENDPOINT (path, MQTT, NATS, AMQP, glob and template matchers in a registry plugins extend); `cg protocols` lists senders, receivers, guards and the checks no_receiver, no_sender, ambiguous, schema_mismatch, unguarded, no_consumer; `.cg.yaml` `protocols.external` for known outside parties ([docs/protocols.md](docs/protocols.md)) |
380
381
  | Generated and copied files | detected (`.gitattributes`, generator banners, framework build paths, generator file names, Capacitor / Cordova copy targets, `.openapi-generator/FILES`) | kept out of the graph and listed by `cg coverage` by reason; copies map back to their source; `--include-generated` indexes them labelled `attrs.generated` ([docs/generated.md](docs/generated.md)) |
381
382
 
382
383
  ## Prerequisites per language
@@ -540,7 +541,8 @@ The scope as of v0.3, so you know how far each answer reaches. The full list is
540
541
  (`getattr`, DI containers, Riverpod/Provider lookups without a type) fall back to `heuristic` or stay unresolved.
541
542
  Python dispatch tables, plugin lists, callbacks and registering decorators are followed as function references
542
543
  ([docs/python.md](docs/python.md#entry-points-and-function-references)).
543
- GraphQL APIs (graphene/strawberry) and Django template rendering are not modelled.
544
+ GraphQL root fields (graphene / strawberry / ariadne) are protocol endpoints ([docs/protocols.md](docs/protocols.md#graphql-root-fields));
545
+ object-type fields and Django template rendering are not modelled.
544
546
  - **Next to index:** seeders, `Artisan::command` closures, observers fired by model writes, Nuxt server routes, and
545
547
  navigation edges (`NuxtLink`, `navigateTo`).
546
548
  - **Broadcast channels** are read from `Broadcast::channel` and `broadcastOn()`; names cg cannot evaluate keep a
@@ -600,14 +602,14 @@ Ideas we are exploring after v0.3. Feedback on priorities is welcome.
600
602
  - Swift: `URLComponents` and helper-built URLs, `Info.plist` / `.xcconfig` base URLs, OS-version conditions, App Intents /
601
603
  widget entries, value navigation through variables ([docs/swift.md](docs/swift.md#not-covered-yet)).
602
604
  - Protocol links: extraction for MQTT, NATS, AMQP, Kafka and Redis pub/sub (matchers registered), Socket.IO outside
603
- Python, raw WebSocket / SSE message names, gRPC / GraphQL / webhooks (epic #29; [docs/protocols.md](docs/protocols.md#not-covered-yet)).
605
+ Python, raw WebSocket / SSE message names, GraphQL object-type fields, webhooks (epic #29; [docs/protocols.md](docs/protocols.md#not-covered-yet)).
604
606
  - AI harnesses: TypeScript MCP servers / clients and the Vercel AI SDK, LangGraph graphs, agent runners, tools declared
605
607
  inside functions ([docs/ai-tools.md](docs/ai-tools.md#not-covered-yet)).
606
608
  - External systems: client constructors with literal arguments (`psycopg.connect(host=)`, `new Redis()`, ...),
607
609
  Spring / Rails / Kubernetes configuration, env reads through config schemas ([docs/external.md](docs/external.md#not-covered-yet)).
608
610
  - Web / native bridges beyond Capacitor, React Native, Flutter channels and Pigeon: React Native events, Capacitor
609
611
  `notifyListeners`, Cordova plugins and native UI components ([docs/bridges.md](docs/bridges.md#not-covered-yet)).
610
- - More HTTP clients beyond fetch, axios, ofetch and ky, and response-field modelling for the TypeScript client (setting → API response → client state); GraphQL APIs.
612
+ - More HTTP clients beyond fetch, axios, ofetch and ky, and response-field modelling for the TypeScript client (setting → API response → client state).
611
613
 
612
614
  ## Documentation
613
615
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cg-code-graph
3
- Version: 0.10.1
3
+ Version: 0.12.0
4
4
  Summary: cg: a code graph of routes, calls, data access and platform boundaries for agents and humans (CLI + MCP server)
5
5
  Author: cyberchronos00
6
6
  License-Expression: MIT
@@ -17,7 +17,7 @@ Requires-Dist: tree-sitter-rust>=0.23
17
17
  Requires-Dist: tree-sitter-c>=0.23
18
18
  Requires-Dist: tree-sitter-cpp>=0.23
19
19
  Requires-Dist: tree-sitter-kotlin>=1.0
20
- Requires-Dist: tree-sitter-swift>=0.6
20
+ Requires-Dist: tree-sitter-swift<0.7.4,>=0.6
21
21
  Provides-Extra: dev
22
22
  Requires-Dist: pytest>=8; extra == "dev"
23
23
  Dynamic: license-file
@@ -93,10 +93,11 @@ other tools; see [Prerequisites per language](#prerequisites-per-language).
93
93
  options and updates):
94
94
 
95
95
  ```bash
96
- curl -fsSL https://raw.githubusercontent.com/cyberchronos00/code-graph/main/install.sh | sh
97
- # or: uv tool install git+https://github.com/cyberchronos00/code-graph
98
- # or: pipx install git+https://github.com/cyberchronos00/code-graph
99
- # or from PyPI: pip install cg-code-graph (uv tool install cg-code-graph / pipx install cg-code-graph)
96
+ pipx install cg-code-graph # or: uv tool install cg-code-graph (PyPI; the commands are cg and cg-mcp)
97
+ # or the script (also installs exact-mode tools with --with c,rust,...):
98
+ # curl -fsSL https://raw.githubusercontent.com/cyberchronos00/code-graph/main/install.sh | sh
99
+ # or the latest commit: uv tool install git+https://github.com/cyberchronos00/code-graph
100
+ # or: pipx install git+https://github.com/cyberchronos00/code-graph
100
101
  cg doctor # what indexes exact / heuristic on this machine, and what to install for the rest
101
102
  git clone https://github.com/cyberchronos00/code-graph.git && cd code-graph # the sample apps used below
102
103
  ```
@@ -206,7 +207,7 @@ The 7 plan gaps are the admin update path, `UpdateBookRequest`, `Book::$fillable
206
207
 
207
208
  ### 1. A CLI for impact questions
208
209
 
209
- `reaches`, `impact`, `downstream`, `path`, `writers`, `siblings`, `routes`, `search`, `api-calls`, `channels`, `tests`
210
+ `reaches`, `impact`, `downstream`, `path`, `writers`, `siblings`, `routes`, `search`, `snippet`, `api-calls`, `channels`, `tests`
210
211
  and `platforms` all work on one SQLite graph, and across repos once the frontend and backend are linked. Every hop shows its evidence:
211
212
 
212
213
  ```text
@@ -314,7 +315,7 @@ Full reference: [docs/cli.md](docs/cli.md) · value facts: [docs/value-facts.md]
314
315
 
315
316
  ### 2. An MCP server for AI agents
316
317
 
317
- The same queries as MCP tools (`reaches`, `impact`, `callers`, `siblings`, `path`, `downstream`, `routes`, `search`, `api_calls`,
318
+ The same queries as MCP tools (`reaches`, `impact`, `callers`, `siblings`, `path`, `downstream`, `routes`, `search`, `snippet`, `api_calls`,
318
319
  `channels`, `tests_covering`, `resolutions`, `plan_check`, `index`, `coverage`, `starters`, `platform_divergence`, …), so an agent can check the blast radius before it edits. Replies are compact,
319
320
  use repo-relative paths, and `plan_check` starts with a summary (`details=true` for the full report). Every reply also
320
321
  carries a machine-readable `completeness` object, so the agent knows when an answer covers the whole repository and
@@ -385,7 +386,7 @@ without configuration; `cg config show` lists what was applied ([docs/configurat
385
386
  | Django REST Framework | resolved | routers, ViewSets (+ `@action`), APIView/generic views, `permission_classes`, serializer fields |
386
387
  | FastAPI / Starlette | resolved | `FastAPI` / `APIRouter` / `Starlette` / `Router` objects, `include_router` / `mount` prefix chains across files (prefixes from constants and settings attributes such as `settings.API_V1_STR`), verb decorators, `api_route`, `add_api_route`, Starlette `routes=[Route, Mount, WebSocketRoute]`, websockets, path parameters, `Depends()` / `Security()` dependencies (parameters, `Annotated` aliases, `dependencies=`) as route access with what each checks (raised 401 / 403, security schemes, nested dependencies), `name=` for `url_path_for`; apps / routers received as parameters or fixtures or returned by factories, Starlette `Host`, `@cbv` / `InferringRouter`, classy-fastapi `Routable` |
387
388
  | Flask | resolved | `Flask` / `Blueprint` objects, `register_blueprint` (`url_prefix` from the blueprint or the registration, nested blueprints), `@route` / verb decorators, `add_url_rule` incl. `MethodView.as_view()` (and its `methods`), endpoint-only rules, werkzeug `Rule` / `Submount`, the built-in static route, views defined in an app factory, apps received as parameters or pytest fixtures, flask-restful / flask-restx resources, `subdomain=` / `defaults=`, `<int:id>` parameters, `blueprint.endpoint` names for `url_for`, view decorators (`login_required`) as route access |
388
- | Celery / Channels | resolved | tasks + `.delay`/`.apply_async` dispatches; websocket routing to consumers |
389
+ | Celery / RQ / Dramatiq / Channels | resolved | tasks + `.delay`/`.apply_async` dispatches; job and queue endpoints by task name across repos (`send_task`, RQ import paths, Dramatiq actors) with worker processes from Procfile / compose; websocket routing to consumers |
389
390
  | Dart | resolved (package:analyzer parse, declared types) + heuristic fallback | libraries/parts, classes, methods, functions, calls with import resolution |
390
391
  | Flutter | resolved + heuristic fallback | widgets/State, bloc/cubit events → handlers → states → UI, Navigator/go_router/auto_route pages, HTTP calls (package:http, Dio, dart:io, Retrofit/Chopper), WebSockets, json_serializable/freezed and hand-written JSON keys |
391
392
  | Rust | **exact** with rust-analyzer (SCIP); **heuristic** without | crates, modules, `pub` API, traits → impls (dyn/generic dispatch), bins, tests, benches, examples, `build.rs`, FFI, `unsafe`, `#[cfg(feature)]` gates, env keys, `#[tokio::main]`, axum/actix routes ([docs/native.md](docs/native.md)) |
@@ -400,7 +401,7 @@ without configuration; `cg config show` lists what was applied ([docs/configurat
400
401
  | Desktop processes | Electron `ipcMain` / `ipcRenderer` / `webContents.send` and `contextBridge.exposeInMainWorld`; Tauri `invoke` → `#[tauri::command]` | `endpoint:electron-ipc:<channel>`, `endpoint:electron-preload:<key>#<member>`, `endpoint:tauri:<command>` with SENDS_TO / RECEIVED_BY across the processes, process roles (main / preload / renderer, webview / core) on module nodes; checks for channels nobody receives and unregistered commands ([docs/bridges.md](docs/bridges.md#desktop-process-boundaries-electron-and-tauri)) |
401
402
  | AI harnesses | MCP servers (FastMCP / MCPServer / low-level) and clients, OpenAI / Anthropic tool schemas, Agents SDK, LangChain, LlamaIndex tools, hand-written agent loops (Python) | `endpoint:llm_tool:<name>` / `endpoint:mcp_tool:<server>/<name>` (resources, prompts) with the handler as an `llm_tool` entry, `agent:<name>` with OFFERS_TOOL / HANDS_OFF_TO; `cg tools` lists handlers, tables reached, agents, no_receiver / no_sender, dynamic dispatch and model calls ([docs/ai-tools.md](docs/ai-tools.md)) |
402
403
  | External systems | Laravel database connections, env keys read by code (`DB_*`, `DATABASE_URL`, `REDIS_*`, `SMTP_*`, `MONGO*`, `AMQP_*`, `LDAP_*`, `SFTP_*`, `S3_*` ...), Python settings (`DATABASES`, `CACHES`, `CELERY_BROKER_URL` ...), `.env.example` values, docker-compose services, DSNs | `external:<protocol>:<host:port>` (or `env:<KEY>`) with CONNECTS_TO from code and connections, CONFIGURED_BY, CREDENTIAL_FROM (location only, never the value), TLS; one node per system across linked repos; `cg external` ([docs/external.md](docs/external.md)) |
403
- | Protocol links | HTTP calls / routes, Pusher channels, NestJS messages, Bull / Laravel / Celery jobs, application events, bridges and IPC in one view; python-socketio / Flask-SocketIO events | `endpoint:<protocol>:<name>` with SENDS_TO / RECEIVED_BY and MATCHES_ENDPOINT (path, MQTT, NATS, AMQP topic, glob and template matchers in a registry plugins extend); `cg protocols` lists senders, receivers, guards and the checks no_receiver, no_sender, ambiguous, schema_mismatch, unguarded; `.cg.yaml` `protocols.external` for known outside parties ([docs/protocols.md](docs/protocols.md)) |
404
+ | Protocol links | HTTP calls / routes, Pusher channels, NestJS messages, Bull / Laravel / Celery jobs, Celery / RQ / Dramatiq / Bull / Laravel / Symfony Messenger job and queue endpoints, application events, Kafka / RabbitMQ / Redis pub/sub and streams / MQTT / NATS producers and consumers, bridges and IPC in one view; python-socketio / Flask-SocketIO events | `endpoint:<protocol>:<name>` with SENDS_TO / RECEIVED_BY and MATCHES_ENDPOINT (path, MQTT, NATS, AMQP, glob and template matchers in a registry plugins extend); `cg protocols` lists senders, receivers, guards and the checks no_receiver, no_sender, ambiguous, schema_mismatch, unguarded, no_consumer; `.cg.yaml` `protocols.external` for known outside parties ([docs/protocols.md](docs/protocols.md)) |
404
405
  | Generated and copied files | detected (`.gitattributes`, generator banners, framework build paths, generator file names, Capacitor / Cordova copy targets, `.openapi-generator/FILES`) | kept out of the graph and listed by `cg coverage` by reason; copies map back to their source; `--include-generated` indexes them labelled `attrs.generated` ([docs/generated.md](docs/generated.md)) |
405
406
 
406
407
  ## Prerequisites per language
@@ -564,7 +565,8 @@ The scope as of v0.3, so you know how far each answer reaches. The full list is
564
565
  (`getattr`, DI containers, Riverpod/Provider lookups without a type) fall back to `heuristic` or stay unresolved.
565
566
  Python dispatch tables, plugin lists, callbacks and registering decorators are followed as function references
566
567
  ([docs/python.md](docs/python.md#entry-points-and-function-references)).
567
- GraphQL APIs (graphene/strawberry) and Django template rendering are not modelled.
568
+ GraphQL root fields (graphene / strawberry / ariadne) are protocol endpoints ([docs/protocols.md](docs/protocols.md#graphql-root-fields));
569
+ object-type fields and Django template rendering are not modelled.
568
570
  - **Next to index:** seeders, `Artisan::command` closures, observers fired by model writes, Nuxt server routes, and
569
571
  navigation edges (`NuxtLink`, `navigateTo`).
570
572
  - **Broadcast channels** are read from `Broadcast::channel` and `broadcastOn()`; names cg cannot evaluate keep a
@@ -624,14 +626,14 @@ Ideas we are exploring after v0.3. Feedback on priorities is welcome.
624
626
  - Swift: `URLComponents` and helper-built URLs, `Info.plist` / `.xcconfig` base URLs, OS-version conditions, App Intents /
625
627
  widget entries, value navigation through variables ([docs/swift.md](docs/swift.md#not-covered-yet)).
626
628
  - Protocol links: extraction for MQTT, NATS, AMQP, Kafka and Redis pub/sub (matchers registered), Socket.IO outside
627
- Python, raw WebSocket / SSE message names, gRPC / GraphQL / webhooks (epic #29; [docs/protocols.md](docs/protocols.md#not-covered-yet)).
629
+ Python, raw WebSocket / SSE message names, GraphQL object-type fields, webhooks (epic #29; [docs/protocols.md](docs/protocols.md#not-covered-yet)).
628
630
  - AI harnesses: TypeScript MCP servers / clients and the Vercel AI SDK, LangGraph graphs, agent runners, tools declared
629
631
  inside functions ([docs/ai-tools.md](docs/ai-tools.md#not-covered-yet)).
630
632
  - External systems: client constructors with literal arguments (`psycopg.connect(host=)`, `new Redis()`, ...),
631
633
  Spring / Rails / Kubernetes configuration, env reads through config schemas ([docs/external.md](docs/external.md#not-covered-yet)).
632
634
  - Web / native bridges beyond Capacitor, React Native, Flutter channels and Pigeon: React Native events, Capacitor
633
635
  `notifyListeners`, Cordova plugins and native UI components ([docs/bridges.md](docs/bridges.md#not-covered-yet)).
634
- - More HTTP clients beyond fetch, axios, ofetch and ky, and response-field modelling for the TypeScript client (setting → API response → client state); GraphQL APIs.
636
+ - More HTTP clients beyond fetch, axios, ofetch and ky, and response-field modelling for the TypeScript client (setting → API response → client state).
635
637
 
636
638
  ## Documentation
637
639
 
@@ -9,19 +9,29 @@ cg_code_graph.egg-info/entry_points.txt
9
9
  cg_code_graph.egg-info/requires.txt
10
10
  cg_code_graph.egg-info/top_level.txt
11
11
  codegraph/__init__.py
12
+ codegraph/agent_rules.py
13
+ codegraph/agents.py
12
14
  codegraph/aitools.py
15
+ codegraph/android_ipc.py
16
+ codegraph/apple_ipc.py
13
17
  codegraph/apps.py
14
18
  codegraph/blindspots.py
15
19
  codegraph/bridges.py
20
+ codegraph/brokers.py
16
21
  codegraph/cli.py
17
22
  codegraph/concepts.py
18
23
  codegraph/config.py
19
24
  codegraph/coverage.py
25
+ codegraph/dart_isolates.py
20
26
  codegraph/doctor.py
21
27
  codegraph/external.py
28
+ codegraph/graphql.py
22
29
  codegraph/indexer.py
30
+ codegraph/jobs.py
23
31
  codegraph/link.py
24
32
  codegraph/lint_async.py
33
+ codegraph/local_ipc.py
34
+ codegraph/local_sockets.py
25
35
  codegraph/mcp_server.py
26
36
  codegraph/parity.py
27
37
  codegraph/parity_structure.py
@@ -32,10 +42,17 @@ codegraph/platforms.py
32
42
  codegraph/process_runs.py
33
43
  codegraph/query.py
34
44
  codegraph/realtime.py
45
+ codegraph/realtime_events.py
46
+ codegraph/realtime_native.py
47
+ codegraph/realtime_ws.py
35
48
  codegraph/roundtrip.py
36
49
  codegraph/routes.py
50
+ codegraph/rpc.py
51
+ codegraph/sockets.py
37
52
  codegraph/starters.py
38
53
  codegraph/tests_index.py
54
+ codegraph/udp_apps.py
55
+ codegraph/webhooks.py
39
56
  codegraph/xcode.py
40
57
  codegraph/core/__init__.py
41
58
  codegraph/core/cache.py
@@ -93,6 +110,7 @@ codegraph/plugins/nextjs/plugin.py
93
110
  codegraph/plugins/nuxt/__init__.py
94
111
  codegraph/plugins/nuxt/plugin.py
95
112
  codegraph/plugins/php/__init__.py
113
+ codegraph/plugins/php/external.py
96
114
  codegraph/plugins/php/gating.py
97
115
  codegraph/plugins/php/plugin.py
98
116
  codegraph/plugins/php/strings.py
@@ -131,6 +149,7 @@ codegraph/plugins/swift/packages.py
131
149
  codegraph/plugins/swift/plugin.py
132
150
  codegraph/plugins/ts/__init__.py
133
151
  codegraph/plugins/ts/baseurl.py
152
+ codegraph/plugins/ts/nav.py
134
153
  codegraph/plugins/ts/plugin.py
135
154
  codegraph/plugins/ts/extractor/extract.mjs
136
155
  codegraph/plugins/ts/extractor/fw.mjs
@@ -176,9 +195,14 @@ codegraph/viz/static/vendor/layout-base.js
176
195
  codegraph/viz/tools/package-lock.json
177
196
  codegraph/viz/tools/package.json
178
197
  codegraph/viz/tools/shoot.mjs
198
+ tests/test_agents_install.py
199
+ tests/test_agents_md.py
179
200
  tests/test_ai_tools.py
201
+ tests/test_android_ipc.py
202
+ tests/test_apple_ipc.py
180
203
  tests/test_bridges.py
181
204
  tests/test_bridges_pigeon_monorepo.py
205
+ tests/test_brokers.py
182
206
  tests/test_cache_clean.py
183
207
  tests/test_cache_invalidation.py
184
208
  tests/test_channels_tests.py
@@ -187,15 +211,19 @@ tests/test_completeness.py
187
211
  tests/test_config_extras.py
188
212
  tests/test_coverage.py
189
213
  tests/test_coverage_ts_hint.py
214
+ tests/test_dart_isolates.py
190
215
  tests/test_dispatch_interfaces.py
191
216
  tests/test_django_flutter.py
192
217
  tests/test_enum_constants.py
193
218
  tests/test_external.py
194
219
  tests/test_gating.py
195
220
  tests/test_generated.py
221
+ tests/test_graphql.py
196
222
  tests/test_impact_overrides.py
197
223
  tests/test_index_isolation.py
198
224
  tests/test_inherited_overrides.py
225
+ tests/test_jobs.py
226
+ tests/test_js_refs.py
199
227
  tests/test_kotlin.py
200
228
  tests/test_kotlin_binding.py
201
229
  tests/test_kotlin_exact.py
@@ -204,23 +232,29 @@ tests/test_kotlin_mixed.py
204
232
  tests/test_kotlin_nav_consts.py
205
233
  tests/test_kotlin_props.py
206
234
  tests/test_laravel_determinism.py
235
+ tests/test_laravel_resources.py
207
236
  tests/test_lint_async.py
237
+ tests/test_local_ipc.py
238
+ tests/test_local_sockets.py
208
239
  tests/test_mcp.py
209
240
  tests/test_mcp_index.py
210
241
  tests/test_native_cfamily.py
211
242
  tests/test_native_concurrency.py
212
243
  tests/test_native_rust.py
244
+ tests/test_nuxt_import_dirs.py
213
245
  tests/test_nuxt_rootsrc.py
214
246
  tests/test_packaging.py
215
247
  tests/test_parity.py
216
248
  tests/test_parity_structure.py
217
249
  tests/test_php_props.py
250
+ tests/test_plain_js.py
218
251
  tests/test_plans.py
219
252
  tests/test_platform_gaps.py
220
253
  tests/test_platform_type_variants.py
221
254
  tests/test_platforms.py
222
255
  tests/test_platforms_apple.py
223
256
  tests/test_presets_config.py
257
+ tests/test_process_ipc.py
224
258
  tests/test_process_runs.py
225
259
  tests/test_protocols.py
226
260
  tests/test_python_app_tests_module.py
@@ -235,9 +269,15 @@ tests/test_python_tests.py
235
269
  tests/test_python_web_hosts.py
236
270
  tests/test_python_web_routes.py
237
271
  tests/test_python_web_routes_more.py
272
+ tests/test_realtime.py
273
+ tests/test_realtime_native.py
238
274
  tests/test_roundtrip.py
275
+ tests/test_route_tables.py
239
276
  tests/test_routes_search_explain.py
277
+ tests/test_rpc.py
240
278
  tests/test_scip_health.py
279
+ tests/test_snippet.py
280
+ tests/test_sockets.py
241
281
  tests/test_starters_budget.py
242
282
  tests/test_swift.py
243
283
  tests/test_swift_binding.py
@@ -259,4 +299,7 @@ tests/test_ts_file_specs.py
259
299
  tests/test_ts_frameworks.py
260
300
  tests/test_ts_nuxt.py
261
301
  tests/test_values.py
262
- tests/test_viz.py
302
+ tests/test_viz.py
303
+ tests/test_vue_nav.py
304
+ tests/test_webhooks.py
305
+ tests/test_websockets.py
@@ -6,7 +6,7 @@ tree-sitter-rust>=0.23
6
6
  tree-sitter-c>=0.23
7
7
  tree-sitter-cpp>=0.23
8
8
  tree-sitter-kotlin>=1.0
9
- tree-sitter-swift>=0.6
9
+ tree-sitter-swift<0.7.4,>=0.6
10
10
 
11
11
  [dev]
12
12
  pytest>=8
@@ -1,2 +1,2 @@
1
1
  """code-graph: deterministic code knowledge graph (beta)."""
2
- __version__ = "0.10.1"
2
+ __version__ = "0.12.0"
@@ -0,0 +1,57 @@
1
+ """Canonical "how to read this codebase with cg" guidance.
2
+
3
+ Single source for this repo's AGENTS.md and for the blocks that `cg agents` installs into a
4
+ project's AGENTS.md / CLAUDE.md / Cursor rules, so the wording never drifts. TEXT is the body;
5
+ wrap it between BEGIN_MARK and END_MARK to get a block that can be replaced in place."""
6
+
7
+ BEGIN_MARK = "<!-- BEGIN cg agent rules (managed by `cg agents`; edit cg, not here) -->"
8
+ END_MARK = "<!-- END cg agent rules -->"
9
+
10
+ TEXT = """\
11
+ # Reading this codebase with cg
12
+
13
+ This repository ships `cg`, a code-graph tool. Read the code by symbol through the index
14
+ instead of opening whole files.
15
+
16
+ ## Build the index first
17
+ pip install -e . -q # make `cg` this checkout's version
18
+ cg index . --db out/graph.db --name repo
19
+ There is no incremental index: re-run `cg index` after large changes.
20
+
21
+ ## Find code (get file:line; avoid ls / cat / broad grep)
22
+ cg search <name> --db out/graph.db # nodes by name or FQN substring
23
+ cg impact <symbol> --db out/graph.db # callers up to entry points (reverse)
24
+ cg downstream <symbol> --db out/graph.db # what the symbol calls and reaches (forward)
25
+ cg node <symbol> --db out/graph.db # one node's location, kind and edges
26
+ `<symbol>` is a name, an FQN, `Class.method`, or a node id. Ambiguous names list candidates.
27
+
28
+ ## Read source (never cat a whole file; never more than ~200 lines at once)
29
+ cg snippet <symbol> --db out/graph.db # just that symbol's source, numbered
30
+ cg snippet <symbol> --db out/graph.db --context 5 # a few lines around it
31
+ sed -n '120,180p' path/to/file # a plain line range when needed
32
+ `cg snippet` prints a `path:start-end` header then the body; `--max-lines` caps long bodies.
33
+
34
+ ## Follow an edge only when your change reaches it
35
+ Use `cg impact` and `cg downstream` to decide whether a caller or callee matters before
36
+ opening it. Chase a dependency only if your edit changes what crosses that edge.
37
+
38
+ ## After editing, re-query instead of rereading
39
+ Re-run `cg index`, then `cg snippet` or `cg impact` on the changed spot to confirm the new
40
+ shape, rather than reopening files.
41
+
42
+ ## Keep output small
43
+ Pipe long output through `head` or `tail`:
44
+ cg impact <symbol> --db out/graph.db | head -n 40
45
+ While iterating, run one file: `pytest -q -x tests/test_x.py`.
46
+ Run the full suite once at the end: `pytest -q 2>&1 | tail -n 30`.
47
+ """
48
+
49
+
50
+ def document() -> str:
51
+ """The repo-root AGENTS.md content (TEXT, newline-terminated)."""
52
+ return TEXT
53
+
54
+
55
+ def block() -> str:
56
+ """The marked block `cg agents` writes into a project file; replaced in place on re-run."""
57
+ return BEGIN_MARK + "\n" + TEXT + END_MARK + "\n"