code-context-control 2.28.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 (176) hide show
  1. code_context_control-2.28.0/LICENSE +201 -0
  2. code_context_control-2.28.0/PKG-INFO +248 -0
  3. code_context_control-2.28.0/README.md +187 -0
  4. code_context_control-2.28.0/cli/__init__.py +1 -0
  5. code_context_control-2.28.0/cli/_hook_utils.py +99 -0
  6. code_context_control-2.28.0/cli/c3.py +6152 -0
  7. code_context_control-2.28.0/cli/commands/__init__.py +1 -0
  8. code_context_control-2.28.0/cli/commands/common.py +312 -0
  9. code_context_control-2.28.0/cli/commands/parser.py +286 -0
  10. code_context_control-2.28.0/cli/docs.html +3178 -0
  11. code_context_control-2.28.0/cli/edits.html +878 -0
  12. code_context_control-2.28.0/cli/hook_auto_snapshot.py +142 -0
  13. code_context_control-2.28.0/cli/hook_c3_signal.py +61 -0
  14. code_context_control-2.28.0/cli/hook_c3read.py +116 -0
  15. code_context_control-2.28.0/cli/hook_edit_ledger.py +213 -0
  16. code_context_control-2.28.0/cli/hook_edit_unlock.py +170 -0
  17. code_context_control-2.28.0/cli/hook_filter.py +130 -0
  18. code_context_control-2.28.0/cli/hook_ghost_files.py +238 -0
  19. code_context_control-2.28.0/cli/hook_pretool_enforce.py +334 -0
  20. code_context_control-2.28.0/cli/hook_read.py +200 -0
  21. code_context_control-2.28.0/cli/hook_session_stats.py +62 -0
  22. code_context_control-2.28.0/cli/hook_terse_advisor.py +190 -0
  23. code_context_control-2.28.0/cli/hub.html +3764 -0
  24. code_context_control-2.28.0/cli/hub_server.py +1619 -0
  25. code_context_control-2.28.0/cli/mcp_proxy.py +428 -0
  26. code_context_control-2.28.0/cli/mcp_server.py +660 -0
  27. code_context_control-2.28.0/cli/server.py +2985 -0
  28. code_context_control-2.28.0/cli/tools/__init__.py +4 -0
  29. code_context_control-2.28.0/cli/tools/_helpers.py +65 -0
  30. code_context_control-2.28.0/cli/tools/agent.py +1165 -0
  31. code_context_control-2.28.0/cli/tools/compress.py +215 -0
  32. code_context_control-2.28.0/cli/tools/delegate.py +1184 -0
  33. code_context_control-2.28.0/cli/tools/edit.py +313 -0
  34. code_context_control-2.28.0/cli/tools/edits.py +118 -0
  35. code_context_control-2.28.0/cli/tools/filter.py +285 -0
  36. code_context_control-2.28.0/cli/tools/impact.py +163 -0
  37. code_context_control-2.28.0/cli/tools/memory.py +469 -0
  38. code_context_control-2.28.0/cli/tools/read.py +224 -0
  39. code_context_control-2.28.0/cli/tools/search.py +337 -0
  40. code_context_control-2.28.0/cli/tools/session.py +95 -0
  41. code_context_control-2.28.0/cli/tools/shell.py +193 -0
  42. code_context_control-2.28.0/cli/tools/status.py +306 -0
  43. code_context_control-2.28.0/cli/tools/validate.py +310 -0
  44. code_context_control-2.28.0/cli/ui/api.js +36 -0
  45. code_context_control-2.28.0/cli/ui/app.js +207 -0
  46. code_context_control-2.28.0/cli/ui/components/chat.js +758 -0
  47. code_context_control-2.28.0/cli/ui/components/dashboard.js +689 -0
  48. code_context_control-2.28.0/cli/ui/components/edits.js +220 -0
  49. code_context_control-2.28.0/cli/ui/components/instructions.js +481 -0
  50. code_context_control-2.28.0/cli/ui/components/memory.js +626 -0
  51. code_context_control-2.28.0/cli/ui/components/sessions.js +606 -0
  52. code_context_control-2.28.0/cli/ui/components/settings.js +1404 -0
  53. code_context_control-2.28.0/cli/ui/components/sidebar.js +156 -0
  54. code_context_control-2.28.0/cli/ui/icons.js +51 -0
  55. code_context_control-2.28.0/cli/ui/shared.js +119 -0
  56. code_context_control-2.28.0/cli/ui/theme.js +22 -0
  57. code_context_control-2.28.0/cli/ui.html +168 -0
  58. code_context_control-2.28.0/cli/ui_legacy.html +6797 -0
  59. code_context_control-2.28.0/cli/ui_nano.html +503 -0
  60. code_context_control-2.28.0/code_context_control.egg-info/PKG-INFO +248 -0
  61. code_context_control-2.28.0/code_context_control.egg-info/SOURCES.txt +174 -0
  62. code_context_control-2.28.0/code_context_control.egg-info/dependency_links.txt +1 -0
  63. code_context_control-2.28.0/code_context_control.egg-info/entry_points.txt +4 -0
  64. code_context_control-2.28.0/code_context_control.egg-info/requires.txt +38 -0
  65. code_context_control-2.28.0/code_context_control.egg-info/top_level.txt +5 -0
  66. code_context_control-2.28.0/core/__init__.py +75 -0
  67. code_context_control-2.28.0/core/config.py +269 -0
  68. code_context_control-2.28.0/core/ide.py +188 -0
  69. code_context_control-2.28.0/oracle/__init__.py +1 -0
  70. code_context_control-2.28.0/oracle/config.py +75 -0
  71. code_context_control-2.28.0/oracle/oracle.html +3900 -0
  72. code_context_control-2.28.0/oracle/oracle_server.py +663 -0
  73. code_context_control-2.28.0/oracle/services/__init__.py +1 -0
  74. code_context_control-2.28.0/oracle/services/c3_bridge.py +210 -0
  75. code_context_control-2.28.0/oracle/services/chat_engine.py +1103 -0
  76. code_context_control-2.28.0/oracle/services/chat_store.py +155 -0
  77. code_context_control-2.28.0/oracle/services/cross_memory.py +154 -0
  78. code_context_control-2.28.0/oracle/services/federated_graph.py +463 -0
  79. code_context_control-2.28.0/oracle/services/health_checker.py +117 -0
  80. code_context_control-2.28.0/oracle/services/insight_engine.py +307 -0
  81. code_context_control-2.28.0/oracle/services/memory_reader.py +106 -0
  82. code_context_control-2.28.0/oracle/services/memory_writer.py +182 -0
  83. code_context_control-2.28.0/oracle/services/ollama_bridge.py +332 -0
  84. code_context_control-2.28.0/oracle/services/project_scanner.py +87 -0
  85. code_context_control-2.28.0/oracle/services/review_agent.py +206 -0
  86. code_context_control-2.28.0/pyproject.toml +162 -0
  87. code_context_control-2.28.0/services/__init__.py +1 -0
  88. code_context_control-2.28.0/services/activity_log.py +93 -0
  89. code_context_control-2.28.0/services/agent_base.py +124 -0
  90. code_context_control-2.28.0/services/agents.py +1529 -0
  91. code_context_control-2.28.0/services/auto_memory.py +407 -0
  92. code_context_control-2.28.0/services/bench/__init__.py +6 -0
  93. code_context_control-2.28.0/services/bench/external/__init__.py +29 -0
  94. code_context_control-2.28.0/services/bench/external/aider_polyglot.py +405 -0
  95. code_context_control-2.28.0/services/bench/external/swe_bench.py +485 -0
  96. code_context_control-2.28.0/services/benchmark_dashboard.py +596 -0
  97. code_context_control-2.28.0/services/claude_md.py +785 -0
  98. code_context_control-2.28.0/services/compressor.py +592 -0
  99. code_context_control-2.28.0/services/context_snapshot.py +356 -0
  100. code_context_control-2.28.0/services/conversation_store.py +870 -0
  101. code_context_control-2.28.0/services/doc_index.py +537 -0
  102. code_context_control-2.28.0/services/e2e_benchmark.py +2884 -0
  103. code_context_control-2.28.0/services/e2e_evaluator.py +396 -0
  104. code_context_control-2.28.0/services/e2e_tasks.py +743 -0
  105. code_context_control-2.28.0/services/edit_ledger.py +459 -0
  106. code_context_control-2.28.0/services/embedding_index.py +341 -0
  107. code_context_control-2.28.0/services/error_reporting.py +123 -0
  108. code_context_control-2.28.0/services/file_memory.py +734 -0
  109. code_context_control-2.28.0/services/hub_service.py +585 -0
  110. code_context_control-2.28.0/services/indexer.py +712 -0
  111. code_context_control-2.28.0/services/memory.py +318 -0
  112. code_context_control-2.28.0/services/memory_consolidator.py +538 -0
  113. code_context_control-2.28.0/services/memory_graph.py +382 -0
  114. code_context_control-2.28.0/services/memory_grounder.py +304 -0
  115. code_context_control-2.28.0/services/memory_scorer.py +246 -0
  116. code_context_control-2.28.0/services/metrics.py +86 -0
  117. code_context_control-2.28.0/services/notifications.py +209 -0
  118. code_context_control-2.28.0/services/ollama_client.py +201 -0
  119. code_context_control-2.28.0/services/output_filter.py +488 -0
  120. code_context_control-2.28.0/services/parser.py +1238 -0
  121. code_context_control-2.28.0/services/project_manager.py +579 -0
  122. code_context_control-2.28.0/services/protocol.py +306 -0
  123. code_context_control-2.28.0/services/proxy_state.py +152 -0
  124. code_context_control-2.28.0/services/retrieval_broker.py +129 -0
  125. code_context_control-2.28.0/services/router.py +414 -0
  126. code_context_control-2.28.0/services/runtime.py +326 -0
  127. code_context_control-2.28.0/services/session_benchmark.py +1945 -0
  128. code_context_control-2.28.0/services/session_manager.py +1026 -0
  129. code_context_control-2.28.0/services/session_preloader.py +251 -0
  130. code_context_control-2.28.0/services/text_index.py +90 -0
  131. code_context_control-2.28.0/services/tool_classifier.py +176 -0
  132. code_context_control-2.28.0/services/transcript_index.py +340 -0
  133. code_context_control-2.28.0/services/validation_cache.py +155 -0
  134. code_context_control-2.28.0/services/vector_store.py +299 -0
  135. code_context_control-2.28.0/services/version_tracker.py +271 -0
  136. code_context_control-2.28.0/services/watcher.py +192 -0
  137. code_context_control-2.28.0/setup.cfg +4 -0
  138. code_context_control-2.28.0/tests/test_aider_polyglot.py +217 -0
  139. code_context_control-2.28.0/tests/test_c3_shell.py +181 -0
  140. code_context_control-2.28.0/tests/test_cli_smoke.py +58 -0
  141. code_context_control-2.28.0/tests/test_e2e_benchmark.py +892 -0
  142. code_context_control-2.28.0/tests/test_edit_normalization.py +183 -0
  143. code_context_control-2.28.0/tests/test_enforcement_flip.py +92 -0
  144. code_context_control-2.28.0/tests/test_federated_graph.py +193 -0
  145. code_context_control-2.28.0/tests/test_ghost_files.py +111 -0
  146. code_context_control-2.28.0/tests/test_hub_server_smoke.py +43 -0
  147. code_context_control-2.28.0/tests/test_mcp_server_smoke.py +74 -0
  148. code_context_control-2.28.0/tests/test_memory_graph_api.py +129 -0
  149. code_context_control-2.28.0/tests/test_memory_system.py +176 -0
  150. code_context_control-2.28.0/tests/test_notification_discipline.py +62 -0
  151. code_context_control-2.28.0/tests/test_output_filter.py +42 -0
  152. code_context_control-2.28.0/tests/test_permissions.py +195 -0
  153. code_context_control-2.28.0/tests/test_project_manager.py +134 -0
  154. code_context_control-2.28.0/tests/test_session_benchmark.py +202 -0
  155. code_context_control-2.28.0/tests/test_session_budget.py +75 -0
  156. code_context_control-2.28.0/tests/test_swe_bench.py +240 -0
  157. code_context_control-2.28.0/tests/test_validate.py +70 -0
  158. code_context_control-2.28.0/tests/test_windows_reliability.py +116 -0
  159. code_context_control-2.28.0/tui/__init__.py +0 -0
  160. code_context_control-2.28.0/tui/backend.py +59 -0
  161. code_context_control-2.28.0/tui/main.py +145 -0
  162. code_context_control-2.28.0/tui/screens/__init__.py +1 -0
  163. code_context_control-2.28.0/tui/screens/benchmark_view.py +109 -0
  164. code_context_control-2.28.0/tui/screens/claudemd_view.py +46 -0
  165. code_context_control-2.28.0/tui/screens/compress_view.py +52 -0
  166. code_context_control-2.28.0/tui/screens/index_view.py +74 -0
  167. code_context_control-2.28.0/tui/screens/init_view.py +82 -0
  168. code_context_control-2.28.0/tui/screens/mcp_view.py +73 -0
  169. code_context_control-2.28.0/tui/screens/optimize_view.py +41 -0
  170. code_context_control-2.28.0/tui/screens/pipe_view.py +46 -0
  171. code_context_control-2.28.0/tui/screens/projects_view.py +355 -0
  172. code_context_control-2.28.0/tui/screens/search_view.py +55 -0
  173. code_context_control-2.28.0/tui/screens/session_view.py +143 -0
  174. code_context_control-2.28.0/tui/screens/stats.py +158 -0
  175. code_context_control-2.28.0/tui/screens/ui_view.py +54 -0
  176. code_context_control-2.28.0/tui/theme.tcss +335 -0
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for describing the origin of the Work and
141
+ reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may accept and charge a
167
+ fee for, or grant indemnity, warranty, support, or other liability
168
+ obligations and/or rights consistent with this License. However,
169
+ in accepting such obligations, You may act only on Your own behalf
170
+ and on Your sole responsibility, not on behalf of any other
171
+ Contributor, and only if You agree to indemnify, defend, and hold
172
+ each Contributor harmless for any liability incurred by, or claims
173
+ asserted against, such Contributor by reason of your accepting any
174
+ such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2026 Dimitri Tselenchuk
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -0,0 +1,248 @@
1
+ Metadata-Version: 2.4
2
+ Name: code-context-control
3
+ Version: 2.28.0
4
+ Summary: Local code-intelligence layer for AI coding tools (Claude Code, Codex, Gemini, Copilot). Retrieve less, read less, edit safer.
5
+ Author-email: Dimitri Tselenchuk <dtselenc@gmail.com>
6
+ License-Expression: Apache-2.0
7
+ Project-URL: Homepage, https://github.com/drknowhow/code-context-control
8
+ Project-URL: Documentation, https://github.com/drknowhow/code-context-control#readme
9
+ Project-URL: Repository, https://github.com/drknowhow/code-context-control
10
+ Project-URL: Changelog, https://github.com/drknowhow/code-context-control/blob/main/CHANGELOG.md
11
+ Project-URL: Issues, https://github.com/drknowhow/code-context-control/issues
12
+ Keywords: claude,claude-code,mcp,ai,code-intelligence,code-context,developer-tools,llm-tools
13
+ Classifier: Development Status :: 4 - Beta
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Operating System :: OS Independent
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Topic :: Software Development
21
+ Classifier: Topic :: Software Development :: Code Generators
22
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
23
+ Requires-Python: >=3.10
24
+ Description-Content-Type: text/markdown
25
+ License-File: LICENSE
26
+ Requires-Dist: tiktoken>=0.7.0
27
+ Requires-Dist: fastmcp>=2.0.0
28
+ Requires-Dist: watchdog>=4.0.0
29
+ Requires-Dist: tree-sitter>=0.22.0
30
+ Requires-Dist: tree-sitter-python>=0.21.0
31
+ Requires-Dist: tree-sitter-javascript>=0.21.0
32
+ Requires-Dist: tree-sitter-typescript>=0.21.0
33
+ Requires-Dist: tree-sitter-html>=0.21.0
34
+ Requires-Dist: tree-sitter-markdown>=0.3.2
35
+ Requires-Dist: tree-sitter-css>=0.21.0
36
+ Requires-Dist: tree-sitter-go>=0.21.0
37
+ Requires-Dist: tree-sitter-rust>=0.21.0
38
+ Requires-Dist: tree-sitter-json>=0.21.0
39
+ Requires-Dist: tree-sitter-yaml>=0.6.0
40
+ Requires-Dist: flask>=3.0.0
41
+ Requires-Dist: rich>=13.0.0
42
+ Requires-Dist: click>=8.0.0
43
+ Requires-Dist: pyyaml>=6.0.0
44
+ Provides-Extra: vector
45
+ Requires-Dist: scikit-learn>=1.3.0; extra == "vector"
46
+ Requires-Dist: numpy>=1.24.0; extra == "vector"
47
+ Requires-Dist: chromadb>=0.4.24; extra == "vector"
48
+ Provides-Extra: tui
49
+ Requires-Dist: textual>=0.50.0; extra == "tui"
50
+ Provides-Extra: telemetry
51
+ Requires-Dist: sentry-sdk>=2.0.0; extra == "telemetry"
52
+ Provides-Extra: dev
53
+ Requires-Dist: pytest>=7.0.0; extra == "dev"
54
+ Requires-Dist: pyright>=1.1.350; extra == "dev"
55
+ Requires-Dist: ruff>=0.6.0; extra == "dev"
56
+ Requires-Dist: build>=1.0.0; extra == "dev"
57
+ Requires-Dist: twine>=5.0.0; extra == "dev"
58
+ Requires-Dist: numpy>=1.24.0; extra == "dev"
59
+ Requires-Dist: scikit-learn>=1.3.0; extra == "dev"
60
+ Dynamic: license-file
61
+
62
+ <h1 align="center">Code Context Control (C3)</h1>
63
+
64
+ <p align="center">
65
+ <strong>The local code-intelligence layer for AI coding tools.</strong><br>
66
+ Stop burning tokens on whole-file reads, blind greps, and unbounded log dumps.<br>
67
+ Works with Claude Code, Codex, Gemini CLI, and VS Code Copilot.
68
+ </p>
69
+
70
+ <p align="center">
71
+ <a href="LICENSE"><img alt="License: Apache-2.0" src="https://img.shields.io/badge/license-Apache--2.0-blue.svg"></a>
72
+ <img alt="Python 3.10+" src="https://img.shields.io/badge/python-3.10%2B-blue.svg">
73
+ <img alt="Platforms" src="https://img.shields.io/badge/platform-windows%20%7C%20macos%20%7C%20linux-lightgrey">
74
+ <img alt="Status: Beta" src="https://img.shields.io/badge/status-beta-yellow">
75
+ </p>
76
+
77
+ <p align="center">
78
+ <img src="https://raw.githubusercontent.com/drknowhow/code-context-control/main/docs/screenshots/c3_ui.png" alt="C3 web dashboard" width="820">
79
+ </p>
80
+
81
+ ---
82
+
83
+ ## Why C3?
84
+
85
+ LLM-driven coding tools have one expensive failure mode: they read too much. They `cat` whole files, regex the entire repo, dump 10k-line logs into context, and burn through budget before they touch a single line of code.
86
+
87
+ **C3 is a thin, local layer that sits between your IDE and your repo and forces the model to read like a senior engineer:**
88
+
89
+ | Without C3 | With C3 |
90
+ |---|---|
91
+ | `Read` whole 2k-line file | `c3_compress` → 70% smaller map, then `c3_read(symbols=…)` for the exact function |
92
+ | `Grep` the whole repo blindly | `c3_search` returns ranked candidates with TF-IDF + symbol awareness |
93
+ | Dump full `pytest` output into the prompt | `c3_filter` distills 500 lines → 30 actionable ones |
94
+ | Edit, hope it compiled | `c3_edit` writes via a ledger + `c3_validate` runs pyright/tsc automatically |
95
+ | `Bash` test runs that hang on Windows | `c3_shell` returns structured `{exit_code, stdout, stderr, duration}` with auto-filter |
96
+ | Lose context on `/clear` | `c3_session(snapshot)` + `c3_memory` persist decisions across sessions |
97
+
98
+ Everything runs **locally**. No source code or prompts ever leave your machine unless you explicitly opt into a third-party model API.
99
+
100
+ ---
101
+
102
+ ## Install
103
+
104
+ Requires Python 3.10+.
105
+
106
+ ```bash
107
+ # Clone and install
108
+ git clone https://github.com/drknowhow/code-context-control.git
109
+ cd code-context-control
110
+ pip install .
111
+
112
+ # Initialize a project (interactive)
113
+ c3 init /path/to/your/project
114
+ ```
115
+
116
+ This walks you through:
117
+ 1. IDE selection (Claude Code / Codex / Gemini / VS Code).
118
+ 2. Optional local `git init`.
119
+ 3. MCP server registration.
120
+ 4. (Claude Code only) Permission tier selection.
121
+
122
+ Headless / scripted install:
123
+
124
+ ```bash
125
+ c3 init /path/to/project --force --ide claude --mcp-mode direct --permissions standard
126
+ ```
127
+
128
+ ---
129
+
130
+ ## What you get
131
+
132
+ ### Surgical reads
133
+ ```text
134
+ c3_compress(file_path="services/router.py", mode="map") # structural outline (~30% tokens)
135
+ c3_read(file_path="services/router.py", symbols=["ModelRouter._classify_features"])
136
+ ```
137
+
138
+ ### Ranked search
139
+ ```text
140
+ c3_search(query="prompt cache hit rate", action="code", top_k=5)
141
+ ```
142
+
143
+ ### Safer edits + automatic validation
144
+ ```text
145
+ c3_edit(file_path=..., old_string=..., new_string=..., summary="fix off-by-one")
146
+ c3_validate(file_path=...) # pyright/tsc if installed; syntax check otherwise
147
+ ```
148
+
149
+ ### Distilled output
150
+ ```text
151
+ c3_filter(text=pytest_output) # 500 lines → 30 actionable
152
+ c3_shell(cmd="pytest -x") # structured, auto-filtered
153
+ ```
154
+
155
+ ### Persistent memory
156
+ ```text
157
+ c3_memory(action="recall", query="why did we switch to direct MCP mode")
158
+ c3_session(action="snapshot") # before /clear
159
+ ```
160
+
161
+ ### A web dashboard for everything you've done
162
+ <p align="center">
163
+ <img src="https://raw.githubusercontent.com/drknowhow/code-context-control/main/docs/screenshots/c3_hub.png" alt="C3 Project Hub" width="820">
164
+ </p>
165
+
166
+ ```bash
167
+ c3-hub # http://127.0.0.1:3330
168
+ ```
169
+
170
+ The Hub gives you per-project edit ledgers, session history, memory graphs, benchmark dashboards, and IDE/MCP profile management.
171
+
172
+ <p align="center">
173
+ <img src="https://raw.githubusercontent.com/drknowhow/code-context-control/main/docs/screenshots/c3_hub_notifications.png" alt="C3 Notifications" width="400">
174
+ <img src="https://raw.githubusercontent.com/drknowhow/code-context-control/main/docs/screenshots/c3_hub_ide_modal.png" alt="C3 IDE config" width="400">
175
+ </p>
176
+
177
+ ---
178
+
179
+ ## Tiered local AI (optional)
180
+
181
+ C3 ships with optional Ollama integration for offload work the primary model shouldn't waste context on:
182
+
183
+ | Tier | Model class | Used for |
184
+ |---|---|---|
185
+ | **Nano** | `qwen2:0.5b` | Sub-100 ms intent routing |
186
+ | **Micro** | `deepseek-r1:1.5b` | Last-turn Q&A, summarization |
187
+ | **Base** | `llama3.2:3b`+ | Code analysis, technical reasoning |
188
+
189
+ ```text
190
+ c3_delegate(task="summarize this 4k-line stacktrace", backend="ollama")
191
+ ```
192
+
193
+ Ollama is **optional**. C3 works fine without it.
194
+
195
+ ---
196
+
197
+ ## Permissions (Claude Code only)
198
+
199
+ C3 can manage Claude Code permission tiers via `.claude/settings.local.json`:
200
+
201
+ | Tier | What it allows |
202
+ |---|---|
203
+ | `read-only` | Exploration — no file writes, no git writes, no installs |
204
+ | `standard` | Normal dev workflow — edit, build, test, local git **(recommended)** |
205
+ | `permissive` | Full trust — everything except destructive ops |
206
+
207
+ All tiers always allow C3 MCP tools and include a deny list that blocks `rm -rf`, `sudo`, `git push --force`, etc.
208
+
209
+ ```bash
210
+ c3 permissions show
211
+ c3 permissions standard
212
+ ```
213
+
214
+ ---
215
+
216
+ ## Benchmarks
217
+
218
+ ```bash
219
+ c3 benchmark /path/to/project
220
+ ```
221
+
222
+ Runs C3 against open task suites (Aider Polyglot, SWE-bench Lite) with local-Ollama delegate measurement included.
223
+
224
+ ---
225
+
226
+ ## Security & Privacy
227
+
228
+ C3 runs locally. The Hub binds to `127.0.0.1` by default. **Do not expose the Hub to a public network without putting auth/TLS in front of it.**
229
+
230
+ **No telemetry by default.** Opt-in Sentry crash reporting is available via the `[telemetry]` extra and requires both `SENTRY_DSN` (your project) and `C3_TELEMETRY_OPT_IN=1` to activate. Even when enabled, request bodies, local variables, and prompts are stripped before sending.
231
+
232
+ See [`SECURITY.md`](SECURITY.md) for vulnerability reports, the full hardening guide, and the telemetry scrubbing details.
233
+
234
+ ---
235
+
236
+ ## License
237
+
238
+ - **Core / OSS** — Apache License 2.0 (see [`LICENSE`](LICENSE)).
239
+ - **Pro tier** (planned: license-key activation, hosted team Hub, advanced memory) — separate commercial EULA (see [`EULA-PRO.md`](EULA-PRO.md)).
240
+ - **Third-party deps** — listed in [`THIRD_PARTY_LICENSES.md`](THIRD_PARTY_LICENSES.md).
241
+
242
+ ---
243
+
244
+ ## Links
245
+
246
+ - **Changelog:** [`CHANGELOG.md`](CHANGELOG.md)
247
+ - **Security policy:** [`SECURITY.md`](SECURITY.md)
248
+ - **Issues / questions:** open a GitHub issue or email `dtselenc@gmail.com`
@@ -0,0 +1,187 @@
1
+ <h1 align="center">Code Context Control (C3)</h1>
2
+
3
+ <p align="center">
4
+ <strong>The local code-intelligence layer for AI coding tools.</strong><br>
5
+ Stop burning tokens on whole-file reads, blind greps, and unbounded log dumps.<br>
6
+ Works with Claude Code, Codex, Gemini CLI, and VS Code Copilot.
7
+ </p>
8
+
9
+ <p align="center">
10
+ <a href="LICENSE"><img alt="License: Apache-2.0" src="https://img.shields.io/badge/license-Apache--2.0-blue.svg"></a>
11
+ <img alt="Python 3.10+" src="https://img.shields.io/badge/python-3.10%2B-blue.svg">
12
+ <img alt="Platforms" src="https://img.shields.io/badge/platform-windows%20%7C%20macos%20%7C%20linux-lightgrey">
13
+ <img alt="Status: Beta" src="https://img.shields.io/badge/status-beta-yellow">
14
+ </p>
15
+
16
+ <p align="center">
17
+ <img src="https://raw.githubusercontent.com/drknowhow/code-context-control/main/docs/screenshots/c3_ui.png" alt="C3 web dashboard" width="820">
18
+ </p>
19
+
20
+ ---
21
+
22
+ ## Why C3?
23
+
24
+ LLM-driven coding tools have one expensive failure mode: they read too much. They `cat` whole files, regex the entire repo, dump 10k-line logs into context, and burn through budget before they touch a single line of code.
25
+
26
+ **C3 is a thin, local layer that sits between your IDE and your repo and forces the model to read like a senior engineer:**
27
+
28
+ | Without C3 | With C3 |
29
+ |---|---|
30
+ | `Read` whole 2k-line file | `c3_compress` → 70% smaller map, then `c3_read(symbols=…)` for the exact function |
31
+ | `Grep` the whole repo blindly | `c3_search` returns ranked candidates with TF-IDF + symbol awareness |
32
+ | Dump full `pytest` output into the prompt | `c3_filter` distills 500 lines → 30 actionable ones |
33
+ | Edit, hope it compiled | `c3_edit` writes via a ledger + `c3_validate` runs pyright/tsc automatically |
34
+ | `Bash` test runs that hang on Windows | `c3_shell` returns structured `{exit_code, stdout, stderr, duration}` with auto-filter |
35
+ | Lose context on `/clear` | `c3_session(snapshot)` + `c3_memory` persist decisions across sessions |
36
+
37
+ Everything runs **locally**. No source code or prompts ever leave your machine unless you explicitly opt into a third-party model API.
38
+
39
+ ---
40
+
41
+ ## Install
42
+
43
+ Requires Python 3.10+.
44
+
45
+ ```bash
46
+ # Clone and install
47
+ git clone https://github.com/drknowhow/code-context-control.git
48
+ cd code-context-control
49
+ pip install .
50
+
51
+ # Initialize a project (interactive)
52
+ c3 init /path/to/your/project
53
+ ```
54
+
55
+ This walks you through:
56
+ 1. IDE selection (Claude Code / Codex / Gemini / VS Code).
57
+ 2. Optional local `git init`.
58
+ 3. MCP server registration.
59
+ 4. (Claude Code only) Permission tier selection.
60
+
61
+ Headless / scripted install:
62
+
63
+ ```bash
64
+ c3 init /path/to/project --force --ide claude --mcp-mode direct --permissions standard
65
+ ```
66
+
67
+ ---
68
+
69
+ ## What you get
70
+
71
+ ### Surgical reads
72
+ ```text
73
+ c3_compress(file_path="services/router.py", mode="map") # structural outline (~30% tokens)
74
+ c3_read(file_path="services/router.py", symbols=["ModelRouter._classify_features"])
75
+ ```
76
+
77
+ ### Ranked search
78
+ ```text
79
+ c3_search(query="prompt cache hit rate", action="code", top_k=5)
80
+ ```
81
+
82
+ ### Safer edits + automatic validation
83
+ ```text
84
+ c3_edit(file_path=..., old_string=..., new_string=..., summary="fix off-by-one")
85
+ c3_validate(file_path=...) # pyright/tsc if installed; syntax check otherwise
86
+ ```
87
+
88
+ ### Distilled output
89
+ ```text
90
+ c3_filter(text=pytest_output) # 500 lines → 30 actionable
91
+ c3_shell(cmd="pytest -x") # structured, auto-filtered
92
+ ```
93
+
94
+ ### Persistent memory
95
+ ```text
96
+ c3_memory(action="recall", query="why did we switch to direct MCP mode")
97
+ c3_session(action="snapshot") # before /clear
98
+ ```
99
+
100
+ ### A web dashboard for everything you've done
101
+ <p align="center">
102
+ <img src="https://raw.githubusercontent.com/drknowhow/code-context-control/main/docs/screenshots/c3_hub.png" alt="C3 Project Hub" width="820">
103
+ </p>
104
+
105
+ ```bash
106
+ c3-hub # http://127.0.0.1:3330
107
+ ```
108
+
109
+ The Hub gives you per-project edit ledgers, session history, memory graphs, benchmark dashboards, and IDE/MCP profile management.
110
+
111
+ <p align="center">
112
+ <img src="https://raw.githubusercontent.com/drknowhow/code-context-control/main/docs/screenshots/c3_hub_notifications.png" alt="C3 Notifications" width="400">
113
+ <img src="https://raw.githubusercontent.com/drknowhow/code-context-control/main/docs/screenshots/c3_hub_ide_modal.png" alt="C3 IDE config" width="400">
114
+ </p>
115
+
116
+ ---
117
+
118
+ ## Tiered local AI (optional)
119
+
120
+ C3 ships with optional Ollama integration for offload work the primary model shouldn't waste context on:
121
+
122
+ | Tier | Model class | Used for |
123
+ |---|---|---|
124
+ | **Nano** | `qwen2:0.5b` | Sub-100 ms intent routing |
125
+ | **Micro** | `deepseek-r1:1.5b` | Last-turn Q&A, summarization |
126
+ | **Base** | `llama3.2:3b`+ | Code analysis, technical reasoning |
127
+
128
+ ```text
129
+ c3_delegate(task="summarize this 4k-line stacktrace", backend="ollama")
130
+ ```
131
+
132
+ Ollama is **optional**. C3 works fine without it.
133
+
134
+ ---
135
+
136
+ ## Permissions (Claude Code only)
137
+
138
+ C3 can manage Claude Code permission tiers via `.claude/settings.local.json`:
139
+
140
+ | Tier | What it allows |
141
+ |---|---|
142
+ | `read-only` | Exploration — no file writes, no git writes, no installs |
143
+ | `standard` | Normal dev workflow — edit, build, test, local git **(recommended)** |
144
+ | `permissive` | Full trust — everything except destructive ops |
145
+
146
+ All tiers always allow C3 MCP tools and include a deny list that blocks `rm -rf`, `sudo`, `git push --force`, etc.
147
+
148
+ ```bash
149
+ c3 permissions show
150
+ c3 permissions standard
151
+ ```
152
+
153
+ ---
154
+
155
+ ## Benchmarks
156
+
157
+ ```bash
158
+ c3 benchmark /path/to/project
159
+ ```
160
+
161
+ Runs C3 against open task suites (Aider Polyglot, SWE-bench Lite) with local-Ollama delegate measurement included.
162
+
163
+ ---
164
+
165
+ ## Security & Privacy
166
+
167
+ C3 runs locally. The Hub binds to `127.0.0.1` by default. **Do not expose the Hub to a public network without putting auth/TLS in front of it.**
168
+
169
+ **No telemetry by default.** Opt-in Sentry crash reporting is available via the `[telemetry]` extra and requires both `SENTRY_DSN` (your project) and `C3_TELEMETRY_OPT_IN=1` to activate. Even when enabled, request bodies, local variables, and prompts are stripped before sending.
170
+
171
+ See [`SECURITY.md`](SECURITY.md) for vulnerability reports, the full hardening guide, and the telemetry scrubbing details.
172
+
173
+ ---
174
+
175
+ ## License
176
+
177
+ - **Core / OSS** — Apache License 2.0 (see [`LICENSE`](LICENSE)).
178
+ - **Pro tier** (planned: license-key activation, hosted team Hub, advanced memory) — separate commercial EULA (see [`EULA-PRO.md`](EULA-PRO.md)).
179
+ - **Third-party deps** — listed in [`THIRD_PARTY_LICENSES.md`](THIRD_PARTY_LICENSES.md).
180
+
181
+ ---
182
+
183
+ ## Links
184
+
185
+ - **Changelog:** [`CHANGELOG.md`](CHANGELOG.md)
186
+ - **Security policy:** [`SECURITY.md`](SECURITY.md)
187
+ - **Issues / questions:** open a GitHub issue or email `dtselenc@gmail.com`
@@ -0,0 +1 @@
1
+ """C3 CLI package."""