szl-second-brain 1.5.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.
- szl_second_brain-1.5.0/LICENSE +202 -0
- szl_second_brain-1.5.0/PKG-INFO +354 -0
- szl_second_brain-1.5.0/README.md +326 -0
- szl_second_brain-1.5.0/data/__init__.py +5 -0
- szl_second_brain-1.5.0/data/brain-corpus.public.jsonl +575 -0
- szl_second_brain-1.5.0/data/frontier-candidates.public.jsonl +144 -0
- szl_second_brain-1.5.0/data/frontier-state.v1.json +135 -0
- szl_second_brain-1.5.0/data/khipu.schema.json +191 -0
- szl_second_brain-1.5.0/data/manifest.json +20 -0
- szl_second_brain-1.5.0/data/navigator.schema.json +61 -0
- szl_second_brain-1.5.0/data/neomme-260m.lock.json +53 -0
- szl_second_brain-1.5.0/data/public-research-metadata.v1.json +1 -0
- szl_second_brain-1.5.0/data/refinement-patterns.public.json +16 -0
- szl_second_brain-1.5.0/pyproject.toml +57 -0
- szl_second_brain-1.5.0/second_brain/__init__.py +59 -0
- szl_second_brain-1.5.0/second_brain/__main__.py +7 -0
- szl_second_brain-1.5.0/second_brain/_data.py +27 -0
- szl_second_brain-1.5.0/second_brain/admission.py +134 -0
- szl_second_brain-1.5.0/second_brain/console.py +73 -0
- szl_second_brain-1.5.0/second_brain/corpus.py +103 -0
- szl_second_brain-1.5.0/second_brain/embedding_cache.py +63 -0
- szl_second_brain-1.5.0/second_brain/frontier.py +667 -0
- szl_second_brain-1.5.0/second_brain/hirag.py +351 -0
- szl_second_brain-1.5.0/second_brain/hybrid.py +348 -0
- szl_second_brain-1.5.0/second_brain/local_memory.py +449 -0
- szl_second_brain-1.5.0/second_brain/neomme.py +244 -0
- szl_second_brain-1.5.0/second_brain/plan.py +129 -0
- szl_second_brain-1.5.0/second_brain/public_research.py +356 -0
- szl_second_brain-1.5.0/second_brain/refinement_memory.py +386 -0
- szl_second_brain-1.5.0/second_brain/retrieve.py +281 -0
- szl_second_brain-1.5.0/second_brain/routes_legacy.py +225 -0
- szl_second_brain-1.5.0/second_brain/routes_operational.py +164 -0
- szl_second_brain-1.5.0/second_brain/routes_refinement.py +119 -0
- szl_second_brain-1.5.0/second_brain/web.py +86 -0
- szl_second_brain-1.5.0/second_brain/web_contracts.py +26 -0
- szl_second_brain-1.5.0/second_brain/workbench.py +75 -0
- szl_second_brain-1.5.0/setup.cfg +4 -0
- szl_second_brain-1.5.0/static/__init__.py +1 -0
- szl_second_brain-1.5.0/static/chamber.html +206 -0
- szl_second_brain-1.5.0/static/index.html +266 -0
- szl_second_brain-1.5.0/szl_second_brain.egg-info/PKG-INFO +354 -0
- szl_second_brain-1.5.0/szl_second_brain.egg-info/SOURCES.txt +77 -0
- szl_second_brain-1.5.0/szl_second_brain.egg-info/dependency_links.txt +1 -0
- szl_second_brain-1.5.0/szl_second_brain.egg-info/requires.txt +9 -0
- szl_second_brain-1.5.0/szl_second_brain.egg-info/top_level.txt +1 -0
- szl_second_brain-1.5.0/tests/test_admission_wiring.py +170 -0
- szl_second_brain-1.5.0/tests/test_app.py +68 -0
- szl_second_brain-1.5.0/tests/test_app_operational.py +56 -0
- szl_second_brain-1.5.0/tests/test_app_refinement.py +67 -0
- szl_second_brain-1.5.0/tests/test_citation_metadata.py +24 -0
- szl_second_brain-1.5.0/tests/test_configuration_observation.py +69 -0
- szl_second_brain-1.5.0/tests/test_continuous_frontier_workflow.py +45 -0
- szl_second_brain-1.5.0/tests/test_embedding_cache.py +86 -0
- szl_second_brain-1.5.0/tests/test_fixture_checkout_policy.py +47 -0
- szl_second_brain-1.5.0/tests/test_forum_public_projection.py +78 -0
- szl_second_brain-1.5.0/tests/test_frontier.py +295 -0
- szl_second_brain-1.5.0/tests/test_frontier_dataset_publish.py +330 -0
- szl_second_brain-1.5.0/tests/test_frontier_fetch.py +79 -0
- szl_second_brain-1.5.0/tests/test_frontier_markdown.py +117 -0
- szl_second_brain-1.5.0/tests/test_frontier_metadata_order.py +108 -0
- szl_second_brain-1.5.0/tests/test_frontier_receipts.py +79 -0
- szl_second_brain-1.5.0/tests/test_frontier_state_boundary.py +220 -0
- szl_second_brain-1.5.0/tests/test_frontier_top_choice_binding.py +59 -0
- szl_second_brain-1.5.0/tests/test_generation_upgrade.py +208 -0
- szl_second_brain-1.5.0/tests/test_hirag.py +202 -0
- szl_second_brain-1.5.0/tests/test_hybrid.py +153 -0
- szl_second_brain-1.5.0/tests/test_local_memory.py +584 -0
- szl_second_brain-1.5.0/tests/test_neomme_cache_evidence.py +50 -0
- szl_second_brain-1.5.0/tests/test_plan.py +33 -0
- szl_second_brain-1.5.0/tests/test_public_research.py +276 -0
- szl_second_brain-1.5.0/tests/test_pypi_wheel_isolation.py +121 -0
- szl_second_brain-1.5.0/tests/test_refinement_memory.py +221 -0
- szl_second_brain-1.5.0/tests/test_retrieve.py +108 -0
- szl_second_brain-1.5.0/tests/test_showcase.py +236 -0
- szl_second_brain-1.5.0/tests/test_showcase_evaluation.py +132 -0
- szl_second_brain-1.5.0/tests/test_showcase_visuals.py +261 -0
- szl_second_brain-1.5.0/tests/test_space_payload_manifest.py +122 -0
- szl_second_brain-1.5.0/tests/test_training_loss_label.py +59 -0
- szl_second_brain-1.5.0/tests/test_web_integration.py +123 -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,354 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: szl-second-brain
|
|
3
|
+
Version: 1.5.0
|
|
4
|
+
Summary: Governed hybrid retrieval and review-gated continuous frontier memory. Public handles only; controller-only hydration; Lambda = Conjecture 1.
|
|
5
|
+
Author: SZL Holdings
|
|
6
|
+
License-Expression: Apache-2.0
|
|
7
|
+
Project-URL: Homepage, https://github.com/szl-holdings/szl-second-brain
|
|
8
|
+
Project-URL: Source, https://github.com/szl-holdings/szl-second-brain
|
|
9
|
+
Project-URL: Issues, https://github.com/szl-holdings/szl-second-brain/issues
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
14
|
+
Classifier: Framework :: FastAPI
|
|
15
|
+
Classifier: Operating System :: OS Independent
|
|
16
|
+
Requires-Python: >=3.11
|
|
17
|
+
Description-Content-Type: text/markdown
|
|
18
|
+
License-File: LICENSE
|
|
19
|
+
Requires-Dist: fastapi>=0.115.0
|
|
20
|
+
Requires-Dist: pydantic>=2.9.0
|
|
21
|
+
Requires-Dist: uvicorn[standard]>=0.32.0
|
|
22
|
+
Provides-Extra: test
|
|
23
|
+
Requires-Dist: pytest>=8.0; extra == "test"
|
|
24
|
+
Requires-Dist: httpx2>=2.0.0; extra == "test"
|
|
25
|
+
Requires-Dist: httpx>=0.28.1; extra == "test"
|
|
26
|
+
Requires-Dist: build>=1.2; extra == "test"
|
|
27
|
+
Dynamic: license-file
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
title: SZL Second Brain
|
|
31
|
+
emoji: 🧠
|
|
32
|
+
colorFrom: indigo
|
|
33
|
+
colorTo: green
|
|
34
|
+
sdk: docker
|
|
35
|
+
app_port: 7860
|
|
36
|
+
pinned: false
|
|
37
|
+
license: apache-2.0
|
|
38
|
+
short_description: Governed retrieval; review-gated continuous frontier memory.
|
|
39
|
+
tags:
|
|
40
|
+
- retrieval
|
|
41
|
+
- hybrid-search
|
|
42
|
+
- governance
|
|
43
|
+
- fail-closed
|
|
44
|
+
- evidence
|
|
45
|
+
- szl-holdings
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
# SZL Second Brain
|
|
49
|
+
|
|
50
|
+
<!-- szl:header v1 -->
|
|
51
|
+
<!-- Native identity: szl-brand@4309f6fce89179331b0b3ed8c99494e76c5be256; Orbit v2 icon. -->
|
|
52
|
+
<p>
|
|
53
|
+
<a href="https://github.com/szl-holdings">
|
|
54
|
+
<img src="https://raw.githubusercontent.com/szl-holdings/szl-brand/4309f6fce89179331b0b3ed8c99494e76c5be256/kit/logos/orbit-v2/suite/szl-icon-32.svg" alt="SZL Holdings — Orbit v2" width="32" height="32" />
|
|
55
|
+
</a>
|
|
56
|
+
</p>
|
|
57
|
+
|
|
58
|
+
**Control before action. Evidence after.**
|
|
59
|
+
|
|
60
|
+
[Product](https://a-11-oy.com) · [Proof](https://a11oy.net) · [GitHub organization](https://github.com/szl-holdings)
|
|
61
|
+
<!-- /szl:header -->
|
|
62
|
+
|
|
63
|
+
A governed memory plane for SZL inference: **public handles and digests outside;
|
|
64
|
+
authorized content hydration inside the trusted controller**.
|
|
65
|
+
|
|
66
|
+
The public projection contains 575 governed chunks. The private 9,464-node graph
|
|
67
|
+
is not published, is not queried by this package, and is never admitted to
|
|
68
|
+
gradients. The index is data, not model weights. Lambda uniqueness remains
|
|
69
|
+
**Conjecture 1**.
|
|
70
|
+
|
|
71
|
+
Public retrieval handles now retain an admitted row's `sourceId` so a reviewer
|
|
72
|
+
can follow its citation. This is an additive handle field; model-facing
|
|
73
|
+
navigator handles still omit it and never expose text. The separate
|
|
74
|
+
[science-forum corpus pilot](https://github.com/szl-holdings/szl-science-forum-corpus/tree/330f519c8208eb2d6ba29492c778a0a40018195b)
|
|
75
|
+
emits compatible, rights-gated candidate rows. Its two operator-authored
|
|
76
|
+
summaries are included in the separate **review-required frontier** at an exact
|
|
77
|
+
source revision. It is **not admitted** to this 575-chunk retrieval corpus,
|
|
78
|
+
model weights, or the existing Hugging Face/Anatomy projections. The source
|
|
79
|
+
index is also [mirrored on Hugging Face at an exact revision](https://huggingface.co/datasets/SZLHOLDINGS/szl-science-forum-corpus/tree/76e90b85678b501d14090c2964f50c01907dfe1b);
|
|
80
|
+
that mirror does not grant training or promotion authority. An Anatomy source
|
|
81
|
+
refresh and provider readback are separate release steps.
|
|
82
|
+
|
|
83
|
+
## Python frontend and backend
|
|
84
|
+
|
|
85
|
+
The primary page is a Python-rendered evidence console. Run it with:
|
|
86
|
+
|
|
87
|
+
```sh
|
|
88
|
+
python -m pip install -e ".[test]"
|
|
89
|
+
python -m second_brain.web
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Open `http://127.0.0.1:8101`. The search form and `GET/POST /api/v1/query`
|
|
93
|
+
use the same retrieval transaction, plan and unsigned evidence receipt. The
|
|
94
|
+
console displays public corpus handles separately from research/formula review
|
|
95
|
+
candidates. It never hydrates private content. The hologram remains available at
|
|
96
|
+
`/hologram` and uses the combined query API. The three older ASGI module names
|
|
97
|
+
all resolve to `second_brain.web:app`.
|
|
98
|
+
|
|
99
|
+
`/readyz` now returns HTTP 503 if the corpus, frontier or refinement projection
|
|
100
|
+
is unavailable. It qualifies the public retrieval/review surface only; dense
|
|
101
|
+
retrieval, model generation and production deployment remain separate checks.
|
|
102
|
+
Malformed POST objects and invalid `k` return HTTP 400 rather than being coerced
|
|
103
|
+
or clipped. Legacy plan callers may select only exact, unique handles returned
|
|
104
|
+
by the current retrieval; invented or altered handles return HTTP 422.
|
|
105
|
+
|
|
106
|
+
The wheel includes the Python web app and hologram assets. Historical training
|
|
107
|
+
receipt/evaluation files are container inputs; installations without those files
|
|
108
|
+
report them unavailable through their existing routes.
|
|
109
|
+
|
|
110
|
+
See [the gap analysis and primary-source research](docs/INTEGRATION_RESEARCH_20261101.md)
|
|
111
|
+
for the implementation decisions, remaining gaps and the proposed SZL math
|
|
112
|
+
experiments.
|
|
113
|
+
|
|
114
|
+
## Installed-mode guarantee
|
|
115
|
+
|
|
116
|
+
Version 1.5 packages the public corpus, schemas, and the review-gated frontier
|
|
117
|
+
candidate index into the wheel. Installing `szl-second-brain` in a clean
|
|
118
|
+
environment can build the 575-chunk index, run governed hybrid retrieval, inspect
|
|
119
|
+
the exact frontier state, search review candidates by handles, and perform
|
|
120
|
+
controller-only authorized hydration without a source checkout.
|
|
121
|
+
|
|
122
|
+
The wheel contains only public material. It contains no private graph rows,
|
|
123
|
+
credentials, model weights, signing keys, or execution authority. CI builds the
|
|
124
|
+
wheel, installs it into an isolated environment, changes outside the repository,
|
|
125
|
+
and proves corpus discovery, frontier discovery, retrieval, digest parity,
|
|
126
|
+
Living Anatomy feed generation, and authorized hydration.
|
|
127
|
+
|
|
128
|
+
An operator may still provide a different governed projection through
|
|
129
|
+
`SECOND_BRAIN_CORPUS` or `AYLLU_BRAIN_CORPUS`. Explicit corpus paths remain
|
|
130
|
+
controller decisions and must pass the same per-row digest checks.
|
|
131
|
+
|
|
132
|
+
## Continuous frontier memory
|
|
133
|
+
|
|
134
|
+
The hourly `Continuous frontier memory` workflow is a bounded discovery loop,
|
|
135
|
+
not autonomous retraining. It reads only eight fixed public source contracts:
|
|
136
|
+
|
|
137
|
+
- the exact `szl-formulas` formula/quant atlas;
|
|
138
|
+
- the canonical `szl-ouroboros` bounded-loop kernel README;
|
|
139
|
+
- the canonical `szl-kernels` governed suite and MiniEmbed truth card;
|
|
140
|
+
- the Living Anatomy README;
|
|
141
|
+
- the A11oy public-estate manifest;
|
|
142
|
+
- the Forge production-controller contract;
|
|
143
|
+
- the Nemo witness README;
|
|
144
|
+
- the reviewed, operator-authored science-forum insight index.
|
|
145
|
+
|
|
146
|
+
Each source is resolved to the latest exact commit that changed its admitted
|
|
147
|
+
path, fetched from immutable raw GitHub, scanned for secret-like material, and
|
|
148
|
+
converted into content-addressed candidates. The committed state records the
|
|
149
|
+
exact candidate count and digest, including 30 attributed formulas, 21
|
|
150
|
+
executable formulas, nine quant domains, the active kernel/model truth cards,
|
|
151
|
+
the A11oy public topology, Forge controller contracts, and source-document
|
|
152
|
+
sections.
|
|
153
|
+
The forum parser accepts exactly the two reviewed operator records for topics
|
|
154
|
+
#396 and #426 in either order. It rejects unknown or duplicate topics, unapproved
|
|
155
|
+
rights, duplicate JSON keys, extra raw-post fields, and a changed source count.
|
|
156
|
+
It consumes the producer's attribution-free public projection; private reviewer
|
|
157
|
+
attribution is not a required field and is rejected if reintroduced. The exact
|
|
158
|
+
reviewed producer bytes are retained as a regression fixture. Scheduled source
|
|
159
|
+
receipts bind each candidate to the discovered immutable source revision.
|
|
160
|
+
It contributes two `forum-insight` candidates while preserving the other 129
|
|
161
|
+
candidate rows byte-for-byte and keeping all candidates review-required.
|
|
162
|
+
This convenience sample is not a forum-wide scrape. Topic #396 comes from the
|
|
163
|
+
operator's text supplied in the corpus task; its forum page was not independently
|
|
164
|
+
accessible. Source links and original summaries grant no model-training authority.
|
|
165
|
+
|
|
166
|
+
A changed candidate set creates one content-addressed review branch and attempts
|
|
167
|
+
to open its pull request. When organization policy blocks Actions from opening
|
|
168
|
+
pull requests, the receipt reports `BRANCH_READY_EXTERNAL_PR_REQUIRED` and an
|
|
169
|
+
authorized founder must open that exact branch without rewriting it. The workflow
|
|
170
|
+
cannot force-push, merge, train, publish weights, reveal candidate content through
|
|
171
|
+
the public API, load the private graph, or mutate a provider. Candidate state is
|
|
172
|
+
always `DISCOVERED_REVIEW_REQUIRED` until a separate reviewed process acts.
|
|
173
|
+
|
|
174
|
+
This is the operational meaning of “the Brain keeps learning” here:
|
|
175
|
+
|
|
176
|
+
```text
|
|
177
|
+
fixed public sources
|
|
178
|
+
↓ exact path revisions + SHA-256
|
|
179
|
+
bounded candidate extraction
|
|
180
|
+
↓
|
|
181
|
+
handles-only review index
|
|
182
|
+
↓
|
|
183
|
+
content-addressed review PR
|
|
184
|
+
↓
|
|
185
|
+
human-governed acceptance or rejection
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
It is continuous evidence acquisition, not silent model self-modification.
|
|
189
|
+
|
|
190
|
+
## Public research metadata
|
|
191
|
+
|
|
192
|
+
The reviewed research snapshot adds six real metadata nodes to the existing 131
|
|
193
|
+
frontier candidates: Shannon on communication, Wigner on mathematics in natural
|
|
194
|
+
science, LeCun/Bengio/Hinton on deep learning, LeCun and colleagues on document
|
|
195
|
+
recognition, Angelopoulos/Bates on conformal uncertainty, and Cranmer on symbolic
|
|
196
|
+
regression for science. The eight reviewed Git source contracts remain exact;
|
|
197
|
+
the two metadata providers bring the current source count to ten.
|
|
198
|
+
|
|
199
|
+
`scripts/collect_public_research.py` accepts explicit DOI and arXiv identifiers.
|
|
200
|
+
It uses the public HTTPS APIs with no credentials, one connection, no redirects,
|
|
201
|
+
and limits of twelve requests, 256 KiB per response, 32 authors, and 96 retained
|
|
202
|
+
record versions. It records titles, authors, publication dates, categories,
|
|
203
|
+
source links and declared metadata licences. It does not download paper text,
|
|
204
|
+
follow supplied links, train a model, or grant execution authority. A missing
|
|
205
|
+
full-text licence remains `NOT_INFERRED`.
|
|
206
|
+
|
|
207
|
+
```sh
|
|
208
|
+
python scripts/collect_public_research.py \
|
|
209
|
+
--doi 10.1002/cpa.3160130102 --report reports/research-collection.json
|
|
210
|
+
python scripts/refresh_frontier_memory.py
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
The collector writes `data/public-research-metadata.v1.json` atomically only
|
|
214
|
+
after all requested records pass. Its changes still require normal Git review;
|
|
215
|
+
the hourly frontier refresh consumes the reviewed snapshot without making
|
|
216
|
+
research API calls. Identical metadata preserves the first capture and creates
|
|
217
|
+
no extra node. Changed projected bytes retain the earlier capture and create a
|
|
218
|
+
new content-addressed version. An arXiv run also requires `--exclusive-arxiv`
|
|
219
|
+
after coordinating the single collector across all controlled machines; calls
|
|
220
|
+
are at least three seconds apart, including failures.
|
|
221
|
+
|
|
222
|
+
Research handles declare `revisionKind: metadata-capture-sha256` and include a
|
|
223
|
+
source identity, canonical link, observation time, and licence status. Git
|
|
224
|
+
handles retain exact Git revisions. Captured-byte integrity is separate from
|
|
225
|
+
independent source attestation. Public handles never contain paper abstracts or
|
|
226
|
+
captured raw bytes. Authorized hydration requires the complete offered handle,
|
|
227
|
+
rejects duplicate or altered source bindings, and rechecks the 180-day metadata
|
|
228
|
+
age even when the index has been loaded for a long time. Expired captures fail
|
|
229
|
+
closed; they do not grant a freshness or correctness claim.
|
|
230
|
+
|
|
231
|
+
The public research nodes use the existing lexical relevance index. There is no
|
|
232
|
+
new embedding model or dense-vector qualification in this release. Small local
|
|
233
|
+
retrieval fixtures establish software integration; they are not a general
|
|
234
|
+
retrieval benchmark, scientific proof, or AGI result.
|
|
235
|
+
|
|
236
|
+
## Formula and quant authority
|
|
237
|
+
|
|
238
|
+
The frontier memory consumes `szl-holdings/szl-formulas` as the active executable
|
|
239
|
+
kernel and its source-attributed formula/quant atlas. The atlas preserves all 30
|
|
240
|
+
attributed records and nine quant domains while keeping three different concepts
|
|
241
|
+
strictly separate:
|
|
242
|
+
|
|
243
|
+
- per-obligation `PROOF_STATUS` on the 21 executable functions;
|
|
244
|
+
- source-reported status on the attributed formula corpus;
|
|
245
|
+
- membership in the locked-proven set of exactly eight formulas.
|
|
246
|
+
|
|
247
|
+
No status string promotes a formula. The F-number-to-executable mapping remains
|
|
248
|
+
`UNKNOWN_NOT_INFERRED`, and Lambda remains `CONJECTURE_1_OPEN_ADVISORY_ONLY`.
|
|
249
|
+
Empirical and conjectural records are evidence or review inputs, never execution
|
|
250
|
+
authority.
|
|
251
|
+
|
|
252
|
+
## Retrieval modes
|
|
253
|
+
|
|
254
|
+
`HybridSecondBrain` is an engine-neutral retrieval coordinator:
|
|
255
|
+
|
|
256
|
+
```text
|
|
257
|
+
BM25 candidates
|
|
258
|
+
+
|
|
259
|
+
optional revision-pinned dense candidates
|
|
260
|
+
↓
|
|
261
|
+
reciprocal-rank fusion
|
|
262
|
+
↓
|
|
263
|
+
optional reranker
|
|
264
|
+
↓
|
|
265
|
+
source-diversity limit
|
|
266
|
+
↓
|
|
267
|
+
handles + source/content digests only
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
The public Space deliberately has no opaque dense provider configured, so it
|
|
271
|
+
reports `BM25_ONLY`. A trusted Forge deployment can inject a qualified dense
|
|
272
|
+
provider and reranker. If a provider fails, the response either blocks or
|
|
273
|
+
explicitly reports `BM25_FALLBACK_DENSE_UNAVAILABLE`; it never claims a hybrid
|
|
274
|
+
run that did not occur. Similarity and ranking are never represented as
|
|
275
|
+
correctness.
|
|
276
|
+
|
|
277
|
+
## Local persistent memory prototype
|
|
278
|
+
|
|
279
|
+
`second_brain.local_memory.LocalMemory` is an opt-in, stdlib SQLite/FTS5
|
|
280
|
+
store for a trusted local controller. It has no API keys, provider calls, or
|
|
281
|
+
network ingestion. It is separate from the admitted public corpus, the hourly
|
|
282
|
+
review frontier, and all public routes. Search returns provenance handles;
|
|
283
|
+
text needs an explicit controller authorizer. Unknown-rights sources remain
|
|
284
|
+
metadata-only. See [local memory usage and limits](docs/LOCAL_MEMORY.md).
|
|
285
|
+
|
|
286
|
+
## Authorized hydration
|
|
287
|
+
|
|
288
|
+
`AuthorizedHydrator` and `AuthorizedFrontierHydrator` are library-only controller
|
|
289
|
+
components. They require:
|
|
290
|
+
|
|
291
|
+
- a non-empty principal ID and tenant ID;
|
|
292
|
+
- an immutable policy revision;
|
|
293
|
+
- an explicit per-node authorization callback;
|
|
294
|
+
- matching node identity, source, and SHA-256;
|
|
295
|
+
- an untampered public corpus or frontier-candidate row.
|
|
296
|
+
|
|
297
|
+
Any denial, provider error, duplicate, unknown handle, source mismatch, or digest
|
|
298
|
+
mismatch fails the whole hydration request closed. Hydrated text is never exposed
|
|
299
|
+
by the public FastAPI application.
|
|
300
|
+
|
|
301
|
+
```python
|
|
302
|
+
from second_brain import (
|
|
303
|
+
AuthorizedFrontierHydrator,
|
|
304
|
+
AuthorizedHydrator,
|
|
305
|
+
HybridSecondBrain,
|
|
306
|
+
frontier_search,
|
|
307
|
+
)
|
|
308
|
+
|
|
309
|
+
retriever = HybridSecondBrain(
|
|
310
|
+
dense_provider=my_dense_provider,
|
|
311
|
+
reranker=my_reranker,
|
|
312
|
+
)
|
|
313
|
+
context = retriever.context("locked formula authority", k=6)
|
|
314
|
+
|
|
315
|
+
hydrator = AuthorizedHydrator(my_authorizer)
|
|
316
|
+
hydrated = hydrator.hydrate(
|
|
317
|
+
context["handles"],
|
|
318
|
+
principal_id="principal-123",
|
|
319
|
+
tenant_id="tenant-abc",
|
|
320
|
+
policy_revision="<full immutable revision>",
|
|
321
|
+
)
|
|
322
|
+
|
|
323
|
+
review = frontier_search("formula quant anatomy ouroboros", k=12)
|
|
324
|
+
review_hydrator = AuthorizedFrontierHydrator(my_frontier_authorizer)
|
|
325
|
+
review_content = review_hydrator.hydrate(
|
|
326
|
+
review["handles"],
|
|
327
|
+
principal_id="reviewer-123",
|
|
328
|
+
tenant_id="tenant-abc",
|
|
329
|
+
policy_revision="<review policy revision>",
|
|
330
|
+
)
|
|
331
|
+
```
|
|
332
|
+
|
|
333
|
+
## Public surfaces
|
|
334
|
+
|
|
335
|
+
| Surface | Contract |
|
|
336
|
+
|---|---|
|
|
337
|
+
| `GET /health` | Base 575-chunk index state |
|
|
338
|
+
| `GET /api/v1/index` | Public chunk counts by source |
|
|
339
|
+
| `GET /api/v1/retrieve?q=` | Legacy lexical handles-only retrieval |
|
|
340
|
+
| `GET /api/v1/navigator?q=` | Legacy navigator context |
|
|
341
|
+
| `GET /api/v1/hybrid?q=` | Governed retrieval with an explicit ranking receipt |
|
|
342
|
+
| `POST /api/v1/hybrid` | JSON alias for governed retrieval |
|
|
343
|
+
| `GET /api/v1/retrieval-capabilities` | Truthful runtime capability declaration |
|
|
344
|
+
| `GET /api/v1/frontier-status` | Exact candidate/source/digest state, no content |
|
|
345
|
+
| `GET /api/v1/frontier-handles?q=` | Handles-only review-candidate search |
|
|
346
|
+
| `GET /api/v1/anatomy-feed` | Read-only Brain/formula/quant/Ouroboros feed for Living Anatomy |
|
|
347
|
+
|
|
348
|
+
GitHub is the source of truth; the Hugging Face Space is a deployed public
|
|
349
|
+
surface. Apache-2.0. Doctrine v11.
|
|
350
|
+
|
|
351
|
+
On Hugging Face, this repository's Space is
|
|
352
|
+
[SZLHOLDINGS/szl-second-brain](https://huggingface.co/spaces/SZLHOLDINGS/szl-second-brain);
|
|
353
|
+
the estate's models, datasets and Spaces are published under the
|
|
354
|
+
[SZLHOLDINGS](https://huggingface.co/SZLHOLDINGS) org.
|