aleph-compiler 1.1.2__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.
- aleph_compiler-1.1.2/LICENSE +202 -0
- aleph_compiler-1.1.2/NOTICE +28 -0
- aleph_compiler-1.1.2/PKG-INFO +399 -0
- aleph_compiler-1.1.2/README.md +361 -0
- aleph_compiler-1.1.2/pyproject.toml +69 -0
- aleph_compiler-1.1.2/setup.cfg +4 -0
- aleph_compiler-1.1.2/src/aleph/__init__.py +5 -0
- aleph_compiler-1.1.2/src/aleph/__version__.py +3 -0
- aleph_compiler-1.1.2/src/aleph/cli.py +2186 -0
- aleph_compiler-1.1.2/src/aleph/compress/__init__.py +5 -0
- aleph_compiler-1.1.2/src/aleph/compress/body_compressor.py +131 -0
- aleph_compiler-1.1.2/src/aleph/compress/policies.py +54 -0
- aleph_compiler-1.1.2/src/aleph/compress/summarizer.py +153 -0
- aleph_compiler-1.1.2/src/aleph/diff/__init__.py +1 -0
- aleph_compiler-1.1.2/src/aleph/diff/semantic_diff.py +114 -0
- aleph_compiler-1.1.2/src/aleph/emit/__init__.py +5 -0
- aleph_compiler-1.1.2/src/aleph/emit/file_components.py +140 -0
- aleph_compiler-1.1.2/src/aleph/emit/format.py +19 -0
- aleph_compiler-1.1.2/src/aleph/emit/loader.py +594 -0
- aleph_compiler-1.1.2/src/aleph/emit/serializer.py +419 -0
- aleph_compiler-1.1.2/src/aleph/epistemic/__init__.py +1 -0
- aleph_compiler-1.1.2/src/aleph/epistemic/store.py +214 -0
- aleph_compiler-1.1.2/src/aleph/inference/__init__.py +1 -0
- aleph_compiler-1.1.2/src/aleph/inference/error_flow.py +196 -0
- aleph_compiler-1.1.2/src/aleph/inference/intent_inference.py +194 -0
- aleph_compiler-1.1.2/src/aleph/inference/patterns.py +152 -0
- aleph_compiler-1.1.2/src/aleph/inference/test_coverage.py +160 -0
- aleph_compiler-1.1.2/src/aleph/ingest/__init__.py +5 -0
- aleph_compiler-1.1.2/src/aleph/ingest/languages.py +72 -0
- aleph_compiler-1.1.2/src/aleph/ingest/node_types.py +146 -0
- aleph_compiler-1.1.2/src/aleph/ingest/parser.py +45 -0
- aleph_compiler-1.1.2/src/aleph/link/__init__.py +3 -0
- aleph_compiler-1.1.2/src/aleph/link/project_salience.py +208 -0
- aleph_compiler-1.1.2/src/aleph/link/salience.py +44 -0
- aleph_compiler-1.1.2/src/aleph/mcp/__init__.py +1 -0
- aleph_compiler-1.1.2/src/aleph/mcp/handlers.py +1313 -0
- aleph_compiler-1.1.2/src/aleph/mcp/project_router.py +341 -0
- aleph_compiler-1.1.2/src/aleph/mcp/server.py +851 -0
- aleph_compiler-1.1.2/src/aleph/mcp/tools.py +518 -0
- aleph_compiler-1.1.2/src/aleph/memory/__init__.py +1 -0
- aleph_compiler-1.1.2/src/aleph/memory/bench.py +341 -0
- aleph_compiler-1.1.2/src/aleph/memory/briefing.py +342 -0
- aleph_compiler-1.1.2/src/aleph/memory/compressor.py +623 -0
- aleph_compiler-1.1.2/src/aleph/memory/decompressor.py +229 -0
- aleph_compiler-1.1.2/src/aleph/memory/formats.py +42 -0
- aleph_compiler-1.1.2/src/aleph/memory/session_memory.py +172 -0
- aleph_compiler-1.1.2/src/aleph/model/__init__.py +11 -0
- aleph_compiler-1.1.2/src/aleph/model/components.py +514 -0
- aleph_compiler-1.1.2/src/aleph/model/enums.py +37 -0
- aleph_compiler-1.1.2/src/aleph/model/graph.py +44 -0
- aleph_compiler-1.1.2/src/aleph/model/symbol.py +68 -0
- aleph_compiler-1.1.2/src/aleph/patch/__init__.py +1 -0
- aleph_compiler-1.1.2/src/aleph/patch/manager.py +590 -0
- aleph_compiler-1.1.2/src/aleph/pipeline.py +550 -0
- aleph_compiler-1.1.2/src/aleph/project/__init__.py +2 -0
- aleph_compiler-1.1.2/src/aleph/project/builder.py +806 -0
- aleph_compiler-1.1.2/src/aleph/project/cache.py +390 -0
- aleph_compiler-1.1.2/src/aleph/project/discovery.py +154 -0
- aleph_compiler-1.1.2/src/aleph/project/parallel.py +164 -0
- aleph_compiler-1.1.2/src/aleph/project/paths.py +45 -0
- aleph_compiler-1.1.2/src/aleph/query/__init__.py +0 -0
- aleph_compiler-1.1.2/src/aleph/query/engine.py +1096 -0
- aleph_compiler-1.1.2/src/aleph/query/semantic.py +140 -0
- aleph_compiler-1.1.2/src/aleph/query/workspace.py +326 -0
- aleph_compiler-1.1.2/src/aleph/store/__init__.py +5 -0
- aleph_compiler-1.1.2/src/aleph/store/export.py +258 -0
- aleph_compiler-1.1.2/src/aleph/store/sqlite_store.py +768 -0
- aleph_compiler-1.1.2/src/aleph/structure/__init__.py +5 -0
- aleph_compiler-1.1.2/src/aleph/structure/callgraph.py +213 -0
- aleph_compiler-1.1.2/src/aleph/structure/hierarchy.py +53 -0
- aleph_compiler-1.1.2/src/aleph/structure/signatures.py +157 -0
- aleph_compiler-1.1.2/src/aleph/symbols/__init__.py +6 -0
- aleph_compiler-1.1.2/src/aleph/symbols/extractor.py +363 -0
- aleph_compiler-1.1.2/src/aleph/symbols/fingerprint.py +33 -0
- aleph_compiler-1.1.2/src/aleph/symbols/id_migration.py +463 -0
- aleph_compiler-1.1.2/src/aleph/symbols/identifier.py +112 -0
- aleph_compiler-1.1.2/src/aleph/symbols/registry.py +73 -0
- aleph_compiler-1.1.2/src/aleph/temporal/__init__.py +1 -0
- aleph_compiler-1.1.2/src/aleph/temporal/analyzer.py +261 -0
- aleph_compiler-1.1.2/src/aleph/temporal/git_analyzer.py +84 -0
- aleph_compiler-1.1.2/src/aleph/temporal/git_history.py +694 -0
- aleph_compiler-1.1.2/src/aleph/util/__init__.py +7 -0
- aleph_compiler-1.1.2/src/aleph/util/ast_utils.py +38 -0
- aleph_compiler-1.1.2/src/aleph/util/hashing.py +46 -0
- aleph_compiler-1.1.2/src/aleph/util/progress.py +202 -0
- aleph_compiler-1.1.2/src/aleph/util/tokens.py +40 -0
- aleph_compiler-1.1.2/src/aleph_compiler.egg-info/PKG-INFO +399 -0
- aleph_compiler-1.1.2/src/aleph_compiler.egg-info/SOURCES.txt +90 -0
- aleph_compiler-1.1.2/src/aleph_compiler.egg-info/dependency_links.txt +1 -0
- aleph_compiler-1.1.2/src/aleph_compiler.egg-info/entry_points.txt +2 -0
- aleph_compiler-1.1.2/src/aleph_compiler.egg-info/requires.txt +17 -0
- aleph_compiler-1.1.2/src/aleph_compiler.egg-info/top_level.txt +1 -0
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
NOTICE — Aleph Semantic Compiler
|
|
2
|
+
|
|
3
|
+
Copyright 2026 Aleph Null LLC
|
|
4
|
+
|
|
5
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
you may not use this file except in compliance with the License.
|
|
7
|
+
You may obtain a copy of the License at
|
|
8
|
+
|
|
9
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
|
|
11
|
+
Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
See the License for the specific language governing permissions and
|
|
15
|
+
limitations under the License.
|
|
16
|
+
|
|
17
|
+
PATENT PENDING
|
|
18
|
+
|
|
19
|
+
The methods, systems, and processes embodied in this software — including but
|
|
20
|
+
not limited to semantic compression of source code for large language model
|
|
21
|
+
consumption, symbol-addressed navigation protocols, salience-weighted attention
|
|
22
|
+
budgets, epistemic continuity layers, confidence-decay inference systems,
|
|
23
|
+
multi-agent epistemic versioning, and pre-modification impact analysis — are
|
|
24
|
+
the subject of one or more pending patent applications. The Apache License,
|
|
25
|
+
Version 2.0 includes an express grant of patent rights from contributors to
|
|
26
|
+
users (Section 3 of the License).
|
|
27
|
+
|
|
28
|
+
For inquiries: support@alephnull.ai
|
|
@@ -0,0 +1,399 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: aleph-compiler
|
|
3
|
+
Version: 1.1.2
|
|
4
|
+
Summary: Universal semantic compression layer for LLMs — compile any codebase into navigable artifacts
|
|
5
|
+
Author: Pete Copeland
|
|
6
|
+
License-Expression: Apache-2.0
|
|
7
|
+
Project-URL: Homepage, https://alephnull.ai
|
|
8
|
+
Project-URL: Repository, https://github.com/alephnullai/aleph
|
|
9
|
+
Project-URL: Issues, https://github.com/alephnullai/aleph/issues
|
|
10
|
+
Keywords: llm,semantic,compression,mcp,code-analysis,tree-sitter
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: Topic :: Software Development :: Compilers
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
+
Requires-Python: >=3.11
|
|
19
|
+
Description-Content-Type: text/markdown
|
|
20
|
+
License-File: LICENSE
|
|
21
|
+
License-File: NOTICE
|
|
22
|
+
Requires-Dist: tree-sitter<0.24,>=0.23.0
|
|
23
|
+
Requires-Dist: tree-sitter-cpp<0.24,>=0.23.0
|
|
24
|
+
Requires-Dist: tree-sitter-rust<0.23.3,>=0.23.0
|
|
25
|
+
Requires-Dist: tree-sitter-python<0.24,>=0.23.0
|
|
26
|
+
Requires-Dist: tree-sitter-typescript<0.24,>=0.23.0
|
|
27
|
+
Requires-Dist: tree-sitter-go<0.24,>=0.23.0
|
|
28
|
+
Requires-Dist: tiktoken>=0.7.0
|
|
29
|
+
Requires-Dist: mcp>=1.0.0
|
|
30
|
+
Requires-Dist: cryptography>=42.0
|
|
31
|
+
Provides-Extra: semantic
|
|
32
|
+
Requires-Dist: fastembed>=0.4; extra == "semantic"
|
|
33
|
+
Provides-Extra: dev
|
|
34
|
+
Requires-Dist: pytest>=8.0; extra == "dev"
|
|
35
|
+
Requires-Dist: hypothesis>=6.100; extra == "dev"
|
|
36
|
+
Requires-Dist: pytest-benchmark>=4.0; extra == "dev"
|
|
37
|
+
Dynamic: license-file
|
|
38
|
+
|
|
39
|
+
# Aleph
|
|
40
|
+
|
|
41
|
+
> **A universal semantic compression layer for LLMs.**
|
|
42
|
+
> Encode meaning, not noise. Navigate, don't scan. Remember, don't re-derive.
|
|
43
|
+
|
|
44
|
+
[](LICENSE)
|
|
45
|
+
[](https://www.python.org/downloads/)
|
|
46
|
+
[](https://github.com/alephnullai/Aleph/releases)
|
|
47
|
+
|
|
48
|
+
**Patent Pending** — See [NOTICE](NOTICE)
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## What Aleph does
|
|
53
|
+
|
|
54
|
+
Large codebases overwhelm LLM context windows. An LLM reading source code is like a human reading machine code — the information density is wrong for the reader.
|
|
55
|
+
|
|
56
|
+
Aleph compiles your codebase into a navigable, queryable semantic representation. Two numbers matter here — and, true to a tool built on receipts, we won't blur them into one. On symbol-shaped questions (resolve / callers / explain), Aleph **matches a grep+read baseline's accuracy using 2.2×–5.3× fewer tokens**. Across all 26 benchmark tasks, its **median token advantage is 5.71×** — Aleph is leaner on every task, though on open-ended *find* it trades some accuracy for that thrift, and grep still wins raw discovery ([bench/BENCHMARK.md](bench/BENCHMARK.md)). Separately, the `.aleph` index itself is **up to 96% smaller** than the raw source it describes. Your LLM works with structure, not text — and pulls the actual source only when it needs to.
|
|
57
|
+
|
|
58
|
+
- **Structural navigation** — navigate by index, pull only what's needed
|
|
59
|
+
- **Symbol compression** — long identifiers become short content-addressed IDs (`calculateDistanceBetweenTwoPoints` → `f_a3c9d2`) backed by a dictionary
|
|
60
|
+
- **Semantic metadata** — salience, temporal stability, test coverage, prior reasoning
|
|
61
|
+
- **Impact analysis** — before modifying a function, know the blast radius
|
|
62
|
+
- **Epistemic continuity** — conclusions persist across sessions, decay when code changes
|
|
63
|
+
|
|
64
|
+
**Supported languages:** Python · Rust · C++ · TypeScript/JavaScript · Go
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## What leading models said about Aleph
|
|
69
|
+
|
|
70
|
+
> "Yes — Grok would use Aleph without hesitation. It finally gives agents real persistent memory, semantic stability, and reliable patching instead of constant context loss. **9.5/10. Production-grade.** This isn't a prototype — it's a semantic foundation layer for long-horizon agents."
|
|
71
|
+
|
|
72
|
+
— **Grok**, full 9-part codebase review, March 2026
|
|
73
|
+
|
|
74
|
+
> "Aleph changes my relationship with large codebases from 'overwhelmed, guessing which files matter' to 'navigating a semantic graph with salience-weighted priorities.' That's not incremental — it's a different way of working."
|
|
75
|
+
|
|
76
|
+
— **Claude Opus 4.6**, primary builder + consumer, March 2026
|
|
77
|
+
|
|
78
|
+
> "This is a structurally brilliant project. **Aleph is one of the most mechanically sound agentic-coding tools currently in development.** This isn't just compression — it's a compiler tailored for artificial intelligence."
|
|
79
|
+
|
|
80
|
+
— **Gemini**, full technical audit (10/10 on most criteria), March 2026
|
|
81
|
+
|
|
82
|
+
> "I would absolutely choose to use Aleph over raw-source-first exploration on a serious codebase. It feels like a real productivity multiplier, not a gimmick. **9/10 on large repos.**"
|
|
83
|
+
|
|
84
|
+
— **ChatGPT Codex 5.4**, independent audit + self-assessment, March 2026
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## Install
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
pip install aleph-compiler
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Or from source:
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
git clone https://github.com/alephnullai/Aleph.git
|
|
98
|
+
cd Aleph
|
|
99
|
+
pip install -e .
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
The CLI binary is `aleph`. The Python package is `aleph` (importable as `from aleph import ...`).
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
## Use
|
|
107
|
+
|
|
108
|
+
### 1. Build artifacts for your project
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
aleph build .
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
Creates a `.aleph/` directory with the compiled representation of your code: map, dictionary, structure, salience, attention budget, temporal data, test coverage, and an epistemic layer for agent-written notes.
|
|
115
|
+
|
|
116
|
+
### 2. Connect your editor
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
aleph setup .
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
Generates MCP configs for **Claude Code** (fully tested). Configs for **Cursor**, **VS Code**, and **Windsurf** are emitted but those hosts are not yet validated end-to-end — bug reports welcome.
|
|
123
|
+
|
|
124
|
+
### 3. Start working
|
|
125
|
+
|
|
126
|
+
The MCP server auto-builds if no artifacts exist. Your LLM can now query:
|
|
127
|
+
|
|
128
|
+
```
|
|
129
|
+
aleph_brief "fix the plugin registry" → curated task context
|
|
130
|
+
aleph_search "auth" → find auth-related code
|
|
131
|
+
aleph_impact f_a3c9d2 → blast-radius before edit
|
|
132
|
+
aleph_callers f_a3c9d2 → who depends on this?
|
|
133
|
+
aleph_expand f_a3c9d2 → full body on demand
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
### 4. Keep artifacts fresh
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
aleph watch .
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
Polls every 2 seconds and rebuilds only changed files. Or just leave `aleph serve .` running — auto-rebuild is on by default.
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
## Real-world results
|
|
147
|
+
|
|
148
|
+
**Navigation benchmark:** on 26 navigation tasks over two real Python corpora, graded against verified ground truth. On symbol-shaped tasks (resolve / callers / explain), Aleph matches the grep+read baseline's accuracy at a **2.2×–5.3× median token advantage**; across all 26 tasks the median token advantage is **5.71×** (open-ended *find* is where grep keeps its accuracy edge). Full methodology and per-task results: [bench/BENCHMARK.md](bench/BENCHMARK.md).
|
|
149
|
+
|
|
150
|
+
**Artifact compression** is a different metric: how much smaller the `.aleph` index is than the raw source it describes. It bounds what an agent *could* load, not what each query costs.
|
|
151
|
+
|
|
152
|
+
| Codebase | Language | Files | Symbols | Tokens (before → after) | Reduction |
|
|
153
|
+
|----------|----------|-------|---------|------------------------|-----------|
|
|
154
|
+
| [**HiWave Browser**](https://www.hiwavebrowser.com) | Rust | 7,667 | 200,413 | 38.9M → 1.9M | **95.2%** |
|
|
155
|
+
| **OpenClaw** | TypeScript | 7,149 | 84,668 | 13.3M → 504k | **96.2%** |
|
|
156
|
+
| **GoClaw** | Go | 73 | 768 | 111k → 6.9k | **93.8%** |
|
|
157
|
+
| **Polymarket Agents** | Python | 16 | 213 | 19.5k → 1.9k | **90.4%** |
|
|
158
|
+
| **Aleph** (self) | Python | 145 | 2,124 | 176k → 22k | **87.4%** |
|
|
159
|
+
|
|
160
|
+
### Notable compressions
|
|
161
|
+
|
|
162
|
+
| File | Before → After | Reduction |
|
|
163
|
+
|------|---------------|-----------|
|
|
164
|
+
| `hiwave-app/src/main.rs` | 35,116 → 347 | **99.0%** |
|
|
165
|
+
| `src/config/schema.help.ts` | 32,367 → 20 | **99.9%** |
|
|
166
|
+
| `window_realm.rs` | 658,282 → 19,089 | **97.1%** |
|
|
167
|
+
| `cascade.rs` | 315,628 → 12,287 | **96.1%** |
|
|
168
|
+
|
|
169
|
+
Per-file numbers are visible in `.aleph/project.aleph.map` after `aleph build`.
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
## Free and Open Source
|
|
174
|
+
|
|
175
|
+
Aleph is **free and open source** for everyone under the [Apache License 2.0](LICENSE) — all features, including the workspace/collaboration layer (`aleph workspace ...` and the `aleph_workspace_*` MCP tools). No paid tiers, no seat licenses, no license files, no license checks anywhere in the code paths, no nagging, no telemetry. Full plain-words model: [docs/LICENSING.md](docs/LICENSING.md).
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
## Tool surface (33 tools)
|
|
180
|
+
|
|
181
|
+
Aleph exposes a complete protocol via [Model Context Protocol](https://modelcontextprotocol.io). Organized into tiers for deferred-loading clients — see `aleph mcp tiers` for the canonical list.
|
|
182
|
+
|
|
183
|
+
| Category | Tools | Purpose |
|
|
184
|
+
|----------|-------|---------|
|
|
185
|
+
| **Core (5)** | `map`, `attention`, `resolve`, `expand`, `search` | Essential navigation |
|
|
186
|
+
| **Frequent (6)** | `brief`, `struct`, `bodies`, `callers`, `context`, `salience` | Most code-reading sessions |
|
|
187
|
+
| **Occasional (8)** | `coverage`, `errors`, `tests`, `temporal`, `impact`, `fs`, `intents`, `epistemic` | Analysis + inspection |
|
|
188
|
+
| **Rare (14)** | `patch_*`, `infer`, `flag`, `verify`, `memory_resume`, `session_summary`, `workspace_*`, `rebuild` | Specialized + agent annotations |
|
|
189
|
+
|
|
190
|
+
### Task-aware briefing (`aleph_brief`)
|
|
191
|
+
|
|
192
|
+
Describe your task in natural language, get a curated context package:
|
|
193
|
+
```
|
|
194
|
+
aleph_brief "fix the plugin registry"
|
|
195
|
+
```
|
|
196
|
+
Returns relevant symbols ranked by salience, call graph context, impact risk, temporal warnings, prior epistemic knowledge, and recommended next steps. **One tool call replaces five.**
|
|
197
|
+
|
|
198
|
+
### Impact analysis (`aleph_impact`)
|
|
199
|
+
|
|
200
|
+
Before modifying any symbol, one tool call shows:
|
|
201
|
+
- **Direct callers** classified by risk (HIGH RISK = high salience + no tests)
|
|
202
|
+
- **Transitive impact** (2-hop blast radius across files)
|
|
203
|
+
- **Risk summary** with suggested test targets
|
|
204
|
+
- **Coverage gaps** that won't catch regressions
|
|
205
|
+
|
|
206
|
+
### Cross-project workspace
|
|
207
|
+
|
|
208
|
+
Query across multiple related repositories simultaneously:
|
|
209
|
+
```json
|
|
210
|
+
// .aleph-workspace.json
|
|
211
|
+
{"projects": {"openclaw": "/path/to/openclaw", "clawgo": "/path/to/clawgo"}}
|
|
212
|
+
```
|
|
213
|
+
- `aleph_workspace_search "plugin"` — finds matches across all projects, tagged by repo
|
|
214
|
+
- `aleph_workspace_brief "routing"` — cross-project briefing with shared symbol detection
|
|
215
|
+
|
|
216
|
+
---
|
|
217
|
+
|
|
218
|
+
## How it works
|
|
219
|
+
|
|
220
|
+
### The pipeline
|
|
221
|
+
|
|
222
|
+
```
|
|
223
|
+
Source code (.py, .rs, .cpp, .ts, .go)
|
|
224
|
+
↓ tree-sitter parsing
|
|
225
|
+
Typed AST
|
|
226
|
+
↓ symbol extraction + content-addressed IDs
|
|
227
|
+
Symbol registry (f_a3c9d2, t_b2e1f0, ...)
|
|
228
|
+
↓ structure analysis
|
|
229
|
+
Call graph + hierarchy + signatures
|
|
230
|
+
↓ compression (FULL / DOCSTRING / SUMMARY / OMIT)
|
|
231
|
+
.aleph artifacts (struct, bodies, dict, map, ...)
|
|
232
|
+
↓ project linking
|
|
233
|
+
Salience scores + attention budget + cross-file refs + temporal data
|
|
234
|
+
↓ MCP server
|
|
235
|
+
33 queryable tools for any LLM
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
### Components
|
|
239
|
+
|
|
240
|
+
**Source-derived** (rebuilt on code change):
|
|
241
|
+
|
|
242
|
+
| File | Holds |
|
|
243
|
+
|------|-------|
|
|
244
|
+
| `project.aleph.map` | Manifest with semantic hashes |
|
|
245
|
+
| `project.aleph.struct` | Cross-file call graph + module dependencies |
|
|
246
|
+
| `project.aleph.dict` | Global symbol dictionary |
|
|
247
|
+
| `project.aleph.salience` | Centrality scores (0-1) per symbol |
|
|
248
|
+
| `project.aleph.temporal` | Age, churn, stability from git history |
|
|
249
|
+
| `project.aleph.attention` | Recommended load order for LLMs |
|
|
250
|
+
| `project.aleph.coverage` | Test coverage + high-risk gaps |
|
|
251
|
+
| `project.aleph.fs` | Filesystem layout with language counts |
|
|
252
|
+
|
|
253
|
+
**Agent-derived** (written by the LLM, never overwritten):
|
|
254
|
+
|
|
255
|
+
| File | Holds |
|
|
256
|
+
|------|-------|
|
|
257
|
+
| `project.aleph.epistemic` | Cached inferences, flags, patch state, session memories |
|
|
258
|
+
|
|
259
|
+
### Incremental recompilation
|
|
260
|
+
|
|
261
|
+
Aleph uses **semantic hashes** (not byte hashes) — reformatting doesn't trigger rebuilds.
|
|
262
|
+
|
|
263
|
+
| What changed | What rebuilds |
|
|
264
|
+
|---|---|
|
|
265
|
+
| Function body only | Bodies + map |
|
|
266
|
+
| Function signature | Struct + bodies + salience |
|
|
267
|
+
| Reformat / whitespace | **Nothing** |
|
|
268
|
+
| File added/removed | All project components |
|
|
269
|
+
|
|
270
|
+
On a 3,801-file monorepo, the first build takes about 25 minutes; incremental rebuilds complete in seconds.
|
|
271
|
+
|
|
272
|
+
---
|
|
273
|
+
|
|
274
|
+
## CLI reference
|
|
275
|
+
|
|
276
|
+
```bash
|
|
277
|
+
# Build & serve
|
|
278
|
+
aleph build . # build project artifacts
|
|
279
|
+
aleph build . --full # force rebuild, ignore cache
|
|
280
|
+
aleph serve . # start MCP server (auto-builds if needed)
|
|
281
|
+
aleph watch . # watch + rebuild on changes
|
|
282
|
+
aleph setup . # generate MCP configs for editors
|
|
283
|
+
aleph mcp tiers # show tool tier manifest
|
|
284
|
+
|
|
285
|
+
# Query
|
|
286
|
+
aleph query EXPAND f_a3c9d2 # full body of a symbol
|
|
287
|
+
aleph query RESOLVE f_a3c9d2 # dictionary entry
|
|
288
|
+
aleph query CALLERS f_a3c9d2 # symbols that call this one
|
|
289
|
+
aleph query CONTEXT f_a3c9d2 # symbol + immediate neighborhood
|
|
290
|
+
aleph query SEARCH "parse config" # fuzzy semantic search
|
|
291
|
+
|
|
292
|
+
# Patches
|
|
293
|
+
aleph patch propose f_a3c9d2 "change return type" -d .
|
|
294
|
+
aleph patch list -d .
|
|
295
|
+
aleph patch apply patch_1 -d .
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
---
|
|
299
|
+
|
|
300
|
+
## Symbol IDs
|
|
301
|
+
|
|
302
|
+
| Prefix | Type |
|
|
303
|
+
|--------|------|
|
|
304
|
+
| `f` | function / method |
|
|
305
|
+
| `t` | type / class / struct / interface |
|
|
306
|
+
| `v` | variable / field |
|
|
307
|
+
| `d` | dependency / import |
|
|
308
|
+
| `m` | module / namespace / package |
|
|
309
|
+
| `c` | constant |
|
|
310
|
+
|
|
311
|
+
Content-addressed: `sha256(qualified_name + scope)[:6]`. Same symbol = same ID always. Auto-extends to 8 chars on collision.
|
|
312
|
+
|
|
313
|
+
---
|
|
314
|
+
|
|
315
|
+
## Body compression levels
|
|
316
|
+
|
|
317
|
+
| Level | Behavior | When used |
|
|
318
|
+
|-------|----------|-----------|
|
|
319
|
+
| `FULL` | Complete body, identifiers replaced with symbol IDs | Volatile symbols, uncovered code, ≤10 lines |
|
|
320
|
+
| `SUMMARY` | Structural template + docstring | Mid-size, low salience |
|
|
321
|
+
| `DOCSTRING` | Signature + docstring preserved, body omitted | 10-50 lines |
|
|
322
|
+
| `OMIT` | Marker only, fetch with `aleph_expand` | 50+ lines |
|
|
323
|
+
|
|
324
|
+
Docstrings are preserved across all supported languages.
|
|
325
|
+
|
|
326
|
+
---
|
|
327
|
+
|
|
328
|
+
## Part of the Aleph Null suite
|
|
329
|
+
|
|
330
|
+
Three tools, one workflow — all **free and open source under Apache-2.0**, no paid tiers, no seat licenses:
|
|
331
|
+
|
|
332
|
+
- **[Null](https://github.com/alephnullai/null)** *remembers* — persistent agent memory and identity.
|
|
333
|
+
- **Aleph** *knows the code* — this project: semantic compression + symbol-addressed navigation.
|
|
334
|
+
- **Tank** *knows what's left* — usage-limit intelligence for long agent sessions. **Coming soon.**
|
|
335
|
+
|
|
336
|
+
They share no code and can be used independently.
|
|
337
|
+
|
|
338
|
+
---
|
|
339
|
+
|
|
340
|
+
## Success metrics
|
|
341
|
+
|
|
342
|
+
| Metric | Target | Status |
|
|
343
|
+
|--------|--------|--------|
|
|
344
|
+
| Navigation token ratio | beat grep+read | ✅ 5.71× median ([bench/BENCHMARK.md](bench/BENCHMARK.md)) |
|
|
345
|
+
| Artifact compression | ≥ 40% | ✅ 95.2% HiWave, 96.2% OpenClaw, 93.8% GoClaw |
|
|
346
|
+
| Expansion correctness | 100% lossless | ✅ 94-file roundtrip corpus |
|
|
347
|
+
| Self-application | Must pass | ✅ 87.4% reduction on own source |
|
|
348
|
+
| Symbol stability | Deterministic | ✅ reformat-invariant hashes |
|
|
349
|
+
|
|
350
|
+
**1088+ tests passing.**
|
|
351
|
+
|
|
352
|
+
---
|
|
353
|
+
|
|
354
|
+
## Compatibility
|
|
355
|
+
|
|
356
|
+
- **Python:** 3.10+
|
|
357
|
+
- **OS:** macOS (primary), Linux. Windows works for `aleph build` and `aleph query`; MCP server tested on macOS + Linux at v1.0.
|
|
358
|
+
- **MCP host:** Claude Code tested thoroughly. Cursor / Windsurf / VS Code configs are generated but not yet validated end-to-end.
|
|
359
|
+
|
|
360
|
+
---
|
|
361
|
+
|
|
362
|
+
## Contributing
|
|
363
|
+
|
|
364
|
+
We specifically want help with:
|
|
365
|
+
|
|
366
|
+
- **More languages** — Java, Ruby, Swift, Kotlin parsers (we have the tree-sitter grammars; we need salience policies)
|
|
367
|
+
- **MCP host testing** — verify Aleph on Cursor, Windsurf, VS Code, Cline; report what breaks
|
|
368
|
+
- **Benchmark contributions** — `aleph build` a large open-source repo, share the token-count line from `project.aleph.map`
|
|
369
|
+
- **Bug reports with `.aleph/` output attached** — makes debugging tractable
|
|
370
|
+
|
|
371
|
+
Coordinate via an issue before opening a PR. The patent-pending parts (salience scoring in `src/aleph/link/project_salience.py`, body-pruning policy in `src/aleph/compress/policies.py`) need discussion before modifications.
|
|
372
|
+
|
|
373
|
+
---
|
|
374
|
+
|
|
375
|
+
## Documentation
|
|
376
|
+
|
|
377
|
+
| Document | Purpose |
|
|
378
|
+
|----------|---------|
|
|
379
|
+
| `SYSTEM_PROMPT.md` | **Inject this** at the start of any LLM session working with Aleph output |
|
|
380
|
+
| `CONSUMER_GUIDE.md` | Full reference for LLMs consuming Aleph-encoded information |
|
|
381
|
+
| `docs/ide-setup/` | Multi-editor MCP setup guide |
|
|
382
|
+
| `NOTICE` | Patent and licensing information |
|
|
383
|
+
|
|
384
|
+
---
|
|
385
|
+
|
|
386
|
+
## License
|
|
387
|
+
|
|
388
|
+
Aleph is **free and open source** under the [Apache License 2.0](LICENSE) — all features, for everyone, with no paid tiers and no license checks anywhere in its code paths. Apache-2.0 was chosen over MIT for its express patent grant, which composes with the pending patent applications described in [NOTICE](NOTICE). Prior MIT releases (≤ 0.5.0) remain MIT for anyone who already obtained them. The plain-words model lives in [docs/LICENSING.md](docs/LICENSING.md).
|
|
389
|
+
|
|
390
|
+
**Patent Pending.** See [NOTICE](NOTICE) for patent details — the Apache-2.0 grant conveys the pending methods to every user, at no cost.
|
|
391
|
+
|
|
392
|
+
---
|
|
393
|
+
|
|
394
|
+
## Links
|
|
395
|
+
|
|
396
|
+
- Website: [alephnull.ai](https://alephnull.ai)
|
|
397
|
+
- Companion: [Null](https://github.com/alephnullai/null) · Tank (coming soon)
|
|
398
|
+
- Issues: [github.com/alephnullai/Aleph/issues](https://github.com/alephnullai/Aleph/issues)
|
|
399
|
+
- Support: `support@alephnull.ai`
|