kvcs 0.0.1__py3-none-any.whl

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.
@@ -0,0 +1,72 @@
1
+ Metadata-Version: 2.5
2
+ Name: kvcs
3
+ Version: 0.0.1
4
+ Summary: Domain-agnostic Knowledge Version Control System (KVCS) kernel
5
+ License: Apache-2.0
6
+ License-File: LICENSE
7
+ License-File: NOTICE
8
+ Requires-Python: >=3.11
9
+ Description-Content-Type: text/markdown
10
+
11
+ # kvcs
12
+
13
+ **Append-only commit-DAG memory kernel for traceable, horizon-safe LLM retrieval.**
14
+
15
+ Website: [kvcs.xuepoo.xyz](https://kvcs.xuepoo.xyz) · Benchmarks: [`kvcs-bench`](https://github.com/kvcs-labs/kvcs-bench) · Paper Profile: [`kvcs-paper`](https://github.com/kvcs-labs/kvcs-paper)
16
+
17
+ <p align="center">
18
+ <img src="https://cdn.xuepoo.xyz/kvcs/kvcs-explainer.gif" alt="KVCS: Commit DAG, Horizon Isolation, Tiered JTMS, and QCCE walkthrough" width="100%">
19
+ </p>
20
+
21
+ KVCS compiles evolving knowledge into an immutable SQLite commit DAG of **18 typed graph operations** anchored to character-level source spans and SHA-256 digests. Every query projects a deterministic state as a pure function of revision tip, disclosure horizon, and valid time—enforcing `0.00%` pre-horizon context leakage without domain coupling.
22
+
23
+ <p align="center">
24
+ <img src="https://cdn.xuepoo.xyz/kvcs/01-kvcs-architecture.svg" alt="KVCS 4-layer architecture and zero-LLM audit gate" width="100%">
25
+ </p>
26
+
27
+ ## Core Guarantees
28
+
29
+ - **Append-only commit DAG:** Corrections append `CORRECT_COMMIT`, `SUPERSEDE_DOCUMENT`, or `TRANSITION_ASSERTION`; history is never mutated in place.
30
+ - **Orthogonal horizon & valid-time projection:** Guarantees byte-identical state for identical visible prefixes (`0.00%` future/stale leaks; `0.014 ms` zero-copy LRU lookup at 100k assertions).
31
+ - **Tiered truth maintenance & epistemic scopes:** Distinguishes `DEPENDS_ON` pruning from `SUPPORTS` `NEEDS_REVIEW` flagging, plus non-destructive `SPLIT_ENTITY` and ATMS-style isolation scopes.
32
+ - **Zero-LLM audit gate:** `run_doctor()` validates DAG acyclicity, manifest digests, cutoff consistency, and explicit rejection counts.
33
+
34
+ <p align="center">
35
+ <img src="https://cdn.xuepoo.xyz/kvcs/03-horizon-jtms-mechanics.svg" alt="Dual-axis horizon projection and tiered JTMS mechanics" width="100%">
36
+ </p>
37
+
38
+ ## Quick Start
39
+
40
+ ```sh
41
+ uv sync
42
+ just check
43
+
44
+ uv run python -m kvcs_core init --db /tmp/demo.sqlite --work-id demo --edition-key ed_1
45
+ uv run python -m kvcs_core status --db /tmp/demo.sqlite
46
+ ```
47
+
48
+ Register custom ontologies cleanly from any external domain profile:
49
+
50
+ ```python
51
+ from kvcs_core import KvcsRepository, Ontology, Profile, register_profile
52
+
53
+ papers = Profile(
54
+ profile_id="papers",
55
+ profile_version="1",
56
+ ontology=Ontology(
57
+ entity_types=frozenset({"PAPER", "THEOREM", "METHOD", "METRIC"}),
58
+ scope_kinds=frozenset({"main", "section", "appendix"}),
59
+ mention_kinds=frozenset({"term", "citation"}),
60
+ predicates=frozenset({"PROVES", "ASSUMES", "IMPROVES"}),
61
+ ),
62
+ )
63
+ register_profile(papers)
64
+ with KvcsRepository.init(
65
+ "/tmp/papers.sqlite", work_id="papers", edition_key="arxiv:2601.00001", profile=papers
66
+ ) as repo:
67
+ ...
68
+ ```
69
+
70
+ ## License
71
+
72
+ Licensed under **Apache-2.0** (see [LICENSE](LICENSE) and [NOTICE](NOTICE)).
@@ -0,0 +1,35 @@
1
+ kvcs_core/__init__.py,sha256=pgW38iGkt0eQU9EqfthR_v9SQSSmokZMXVRRcrKzV0U,6758
2
+ kvcs_core/__main__.py,sha256=ag275-dMU4TsedX2dXcBmq6Qo33LoMGr_EeoLJHLcek,181
3
+ kvcs_core/citations.py,sha256=9w0Dk8_NOfpg-RKVLOOl7ZSxvDysQk_O43FA5iRXCaE,7322
4
+ kvcs_core/cli.py,sha256=m3ixHB9_9mKfwlDRxNytCjkVLBFZT6kpnPTQCDDpuvc,16031
5
+ kvcs_core/compression.py,sha256=vJTR6RT66nYxN6MpzmcarcZPMB2alTnT7gz5m_9A-9c,4166
6
+ kvcs_core/decisions.py,sha256=ULd1bca8Bf4YchVnT6SH9cccuxfnImwqiBin_Us2RHk,13199
7
+ kvcs_core/doctor.py,sha256=Zb0LJA2RYuYAfPaGXLIn-ncM60eP4GEgdxxIdjzDPzs,41006
8
+ kvcs_core/explain.py,sha256=P9IT4VbP088_94NI3xYj_3KAhpeVPo1i0NBrenjIXT8,49723
9
+ kvcs_core/federation.py,sha256=0PazTy0mrqqGhYlsAGipuYLzN16fsqM6GJn5D7E2d2E,24031
10
+ kvcs_core/ids.py,sha256=In9ztv5pRFCw29CSRBIxMjzgW2KcSMc22f2l2ZtaZwc,4200
11
+ kvcs_core/ingest.py,sha256=7JFOiyEZEm0v_Q88tyRTiH0DmdMMaIqWZhyFrUXHjkc,20061
12
+ kvcs_core/llm_env.py,sha256=5TpO0O48Z8uVJrgsqFuhPJ_JXRMf9GJnKcG3V3PgqbI,7481
13
+ kvcs_core/llm_transport.py,sha256=cmSOXYEvdGnXIgENH2coXpLWy1r_pA6-sM6XFutuzC4,8513
14
+ kvcs_core/migrations.py,sha256=RFUTni6QYyOxM7-YEPd0UOqKpATcjTTY67Ys1dOXdb8,13301
15
+ kvcs_core/models.py,sha256=hoe9i1en0ptDcK-a9rMyydaVr6ChNOJMqChaO0yngL0,11704
16
+ kvcs_core/ops.py,sha256=Uj8dESYnG6oZA0wAbTgqfEYOvbUnPsHB9-8Jvd5QOYg,44907
17
+ kvcs_core/profile.py,sha256=cSGwlWuskjJtAPfLihGPK1rWdu7VqW2DRQ1xWjIdtFM,19660
18
+ kvcs_core/projector.py,sha256=9LLYpj7kST8ziYOvNL8ljFaNBTtqBmTH0p6B4CNyqbo,63674
19
+ kvcs_core/qcce.py,sha256=mE0743-09B35sbk6o_DWoVPRvUEtx3xT1rsrFmX2oS0,43605
20
+ kvcs_core/retrieval.py,sha256=FPRTBttpJ8NS8CTEnuV0M2Cg5Yg9WV8EHhe7VBQqcSc,39147
21
+ kvcs_core/schema.py,sha256=7UdUcFBhHkbHBXUuq8BWL7ti1ijPVlhje1Nv_4yHOoo,7131
22
+ kvcs_core/server.py,sha256=ar2tnND1sGFLG9H9SfEmTl5ms3UDLnZEDNdEqYMR3zY,28366
23
+ kvcs_core/spans.py,sha256=xJmqueem5cXx4j5soVbZK26iG5e0On93nLwDNKO9Kak,959
24
+ kvcs_core/store.py,sha256=_hCEYH6NUbSO-qTDJfVKRTgn8JEXUaUeO4N5kZw2ifY,63762
25
+ kvcs_core/tools.py,sha256=h19KmX-A3NHANaeV5ZofiKRBYm2npYgwja0lu5bMGpA,21833
26
+ kvcs_core/views.py,sha256=gJ2orLux8_L_vbkZmuMPYBBn2b4Wo_Uji5DhCJmpJ-w,25560
27
+ kvcs_core/exporters/__init__.py,sha256=vo-aLjNdlz5eVLLeK5PM5z00sf1GhS5-uoPBgf2r1zw,240
28
+ kvcs_core/exporters/graphpack.py,sha256=cG1iNzIhhnHPUpERlVwlFd_SscLPT4bDHQMQFdGcS-o,7996
29
+ kvcs_core/exporters/state.py,sha256=rfR4ZIC11m55YLZJgUexgIMybJuyKbQ-Q3tfy61ZjRk,2892
30
+ kvcs_core/profiles/narrative_split.py,sha256=OrvQ_hk-zV1A_0-0_6MSIIDJptPihBDiRbE36jtpVaY,8773
31
+ kvcs-0.0.1.dist-info/METADATA,sha256=WpZVJ3-n8PiwRCLq3raDCh1ydnn8y3IYd1mov5tUp2I,3058
32
+ kvcs-0.0.1.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
33
+ kvcs-0.0.1.dist-info/licenses/LICENSE,sha256=EgftiSvRBTOi2U1rKg-HEdwdCrqoP0_3P0tp7Bic92E,11313
34
+ kvcs-0.0.1.dist-info/licenses/NOTICE,sha256=v_pm7ZG811gWh9tHytS2AQLYxk3379lZ5gMe2HffxZM,168
35
+ kvcs-0.0.1.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.33.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -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 reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, software distributed under the License is
145
+ distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
146
+ ANY KIND, either express or implied, including, without limitation,
147
+ any warranties or conditions of title, non-infringement,
148
+ merchantability, or fitness for a particular purpose. You are solely
149
+ responsible for determining the appropriateness of using or
150
+ redistributing the Work and assume any risks associated with Your
151
+ 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 gross
156
+ negligence) or agreed to in writing, shall any Contributor be liable
157
+ 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 choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any 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 The KVCS Authors
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,5 @@
1
+ KVCS — Knowledge Version Control System
2
+ Copyright 2026 The KVCS Authors
3
+
4
+ This product includes software developed by The KVCS Authors
5
+ (https://github.com/kvcs-labs).
kvcs_core/__init__.py ADDED
@@ -0,0 +1,303 @@
1
+ # SPDX-License-Identifier: Apache-2.0
2
+ """Domain-agnostic Knowledge Version Control System (KVCS) kernel (ADR-044)."""
3
+
4
+ from kvcs_core import (
5
+ compression,
6
+ explain,
7
+ ingest,
8
+ migrations,
9
+ ops,
10
+ qcce,
11
+ retrieval,
12
+ server,
13
+ views,
14
+ )
15
+ from kvcs_core.citations import citation_closure
16
+ from kvcs_core.compression import (
17
+ active_checkpoint_codec,
18
+ compress_checkpoint,
19
+ decompress_checkpoint,
20
+ zstd_available,
21
+ )
22
+ from kvcs_core.decisions import (
23
+ DecisionClient,
24
+ DecisionQuestion,
25
+ DecisionResult,
26
+ select_closed_edges,
27
+ )
28
+ from kvcs_core.doctor import run_doctor
29
+ from kvcs_core.explain import (
30
+ VisibilityExplanation,
31
+ VisibilityReason,
32
+ VisibilityReasonCode,
33
+ explain_visibility,
34
+ )
35
+ from kvcs_core.exporters.state import export_state
36
+ from kvcs_core.federation import (
37
+ FederatedWorkspace,
38
+ KvcsUri,
39
+ format_kvcs_uri,
40
+ parse_kvcs_uri,
41
+ )
42
+ from kvcs_core.ids import (
43
+ canonical_json,
44
+ document_version_key,
45
+ make_mention_id,
46
+ new_ulid,
47
+ sha256_hex,
48
+ )
49
+ from kvcs_core.ingest import (
50
+ DocumentIngestor,
51
+ IngestionRejectedError,
52
+ IngestionReport,
53
+ TextChunk,
54
+ chunk_text,
55
+ span_for_substring,
56
+ to_source_span,
57
+ )
58
+ from kvcs_core.llm_transport import (
59
+ ChatResponse,
60
+ LlmChatCallable,
61
+ OpenAiCompatChatClient,
62
+ parse_strict_json_object,
63
+ )
64
+ from kvcs_core.migrations import (
65
+ MIGRATIONS,
66
+ MigrationReport,
67
+ MigrationStep,
68
+ SchemaMigrationError,
69
+ current_schema_version,
70
+ migrate_repository,
71
+ needs_migration,
72
+ )
73
+ from kvcs_core.models import (
74
+ BUDGET_TIERS,
75
+ AuthorKind,
76
+ BindingStatus,
77
+ BudgetLimits,
78
+ BudgetTier,
79
+ CheckpointConfig,
80
+ CommitRecord,
81
+ CommitStage,
82
+ DoctorReport,
83
+ GraphDiff,
84
+ GraphOp,
85
+ JustificationRef,
86
+ JustificationRelation,
87
+ MentionKind,
88
+ OpKind,
89
+ PremiseKind,
90
+ ScopeKind,
91
+ ScopeStatus,
92
+ SourceSpan,
93
+ StagingResult,
94
+ ToolResponseMeta,
95
+ )
96
+ from kvcs_core.ops import make_source_span
97
+ from kvcs_core.profile import (
98
+ DEFAULT_REGISTRY,
99
+ GENERIC_PROFILE,
100
+ AuthorityPolicy,
101
+ GenericSpanPolicy,
102
+ GenericSplitPolicy,
103
+ Horizon,
104
+ HorizonPolicy,
105
+ Ontology,
106
+ OrdinalHorizonPolicy,
107
+ Profile,
108
+ ProfileMismatchError,
109
+ ProfileRegistry,
110
+ SimpleAuthorityPolicy,
111
+ SpanPolicy,
112
+ SplitPolicy,
113
+ get_profile,
114
+ register_profile,
115
+ registered_profile_ids,
116
+ validate_profile_compatibility,
117
+ )
118
+ from kvcs_core.projector import (
119
+ ProjectedState,
120
+ clear_projection_cache,
121
+ compute_tms_impact_set,
122
+ diff_states,
123
+ project_local_state,
124
+ project_state,
125
+ )
126
+ from kvcs_core.qcce import (
127
+ ClosureEvidenceItem,
128
+ EvidenceBundle,
129
+ QccePipeline,
130
+ QcceSynthesisResult,
131
+ QueryIR,
132
+ QueryMode,
133
+ build_closure_bundle,
134
+ compile_rule_ir,
135
+ )
136
+ from kvcs_core.retrieval import (
137
+ HorizonFilteredRetriever,
138
+ IndexableRecord,
139
+ InMemoryLexicalRetriever,
140
+ RetrieverIndexHook,
141
+ SeedCandidate,
142
+ extract_indexable_records,
143
+ )
144
+ from kvcs_core.schema import KVCS_SCHEMA_VERSION
145
+ from kvcs_core.server import KvcsHttpServer, KvcsRpcDispatcher, create_http_server
146
+ from kvcs_core.store import CommitConflictError, ContentPurgeHook, KvcsRepository
147
+ from kvcs_core.tools import KvcsToolSession, build_resume_compact
148
+ from kvcs_core.views import (
149
+ AssertionTransitionView,
150
+ AssertionView,
151
+ DocumentRetractionView,
152
+ DocumentSupersessionView,
153
+ DocumentVersionView,
154
+ EntityNameView,
155
+ EntityStateEntryView,
156
+ EntityView,
157
+ IdentityLinkView,
158
+ MentionBindingView,
159
+ MentionView,
160
+ ProjectedStateView,
161
+ ScopeCitationView,
162
+ ScopeView,
163
+ project_view,
164
+ )
165
+
166
+ __all__ = [
167
+ "BUDGET_TIERS",
168
+ "DEFAULT_REGISTRY",
169
+ "GENERIC_PROFILE",
170
+ "KVCS_SCHEMA_VERSION",
171
+ "MIGRATIONS",
172
+ "AssertionTransitionView",
173
+ "AssertionView",
174
+ "AuthorKind",
175
+ "AuthorityPolicy",
176
+ "BindingStatus",
177
+ "BudgetLimits",
178
+ "BudgetTier",
179
+ "ChatResponse",
180
+ "CheckpointConfig",
181
+ "ClosureEvidenceItem",
182
+ "CommitConflictError",
183
+ "CommitRecord",
184
+ "CommitStage",
185
+ "ContentPurgeHook",
186
+ "DecisionClient",
187
+ "DecisionQuestion",
188
+ "DecisionResult",
189
+ "DoctorReport",
190
+ "DocumentIngestor",
191
+ "DocumentRetractionView",
192
+ "DocumentSupersessionView",
193
+ "DocumentVersionView",
194
+ "EntityNameView",
195
+ "EntityStateEntryView",
196
+ "EntityView",
197
+ "EvidenceBundle",
198
+ "FederatedWorkspace",
199
+ "GenericSpanPolicy",
200
+ "GenericSplitPolicy",
201
+ "GraphDiff",
202
+ "GraphOp",
203
+ "Horizon",
204
+ "HorizonFilteredRetriever",
205
+ "HorizonPolicy",
206
+ "IdentityLinkView",
207
+ "InMemoryLexicalRetriever",
208
+ "IndexableRecord",
209
+ "IngestionRejectedError",
210
+ "IngestionReport",
211
+ "JustificationRef",
212
+ "JustificationRelation",
213
+ "KvcsHttpServer",
214
+ "KvcsRepository",
215
+ "KvcsRpcDispatcher",
216
+ "KvcsToolSession",
217
+ "KvcsUri",
218
+ "LlmChatCallable",
219
+ "MentionBindingView",
220
+ "MentionKind",
221
+ "MentionView",
222
+ "MigrationReport",
223
+ "MigrationStep",
224
+ "Ontology",
225
+ "OpKind",
226
+ "OpenAiCompatChatClient",
227
+ "OrdinalHorizonPolicy",
228
+ "PremiseKind",
229
+ "Profile",
230
+ "ProfileMismatchError",
231
+ "ProfileRegistry",
232
+ "ProjectedState",
233
+ "ProjectedStateView",
234
+ "QccePipeline",
235
+ "QcceSynthesisResult",
236
+ "QueryIR",
237
+ "QueryMode",
238
+ "RetrieverIndexHook",
239
+ "SchemaMigrationError",
240
+ "ScopeCitationView",
241
+ "ScopeKind",
242
+ "ScopeStatus",
243
+ "ScopeView",
244
+ "SeedCandidate",
245
+ "SimpleAuthorityPolicy",
246
+ "SourceSpan",
247
+ "SpanPolicy",
248
+ "SplitPolicy",
249
+ "StagingResult",
250
+ "TextChunk",
251
+ "ToolResponseMeta",
252
+ "VisibilityExplanation",
253
+ "VisibilityReason",
254
+ "VisibilityReasonCode",
255
+ "active_checkpoint_codec",
256
+ "build_closure_bundle",
257
+ "build_resume_compact",
258
+ "canonical_json",
259
+ "chunk_text",
260
+ "citation_closure",
261
+ "clear_projection_cache",
262
+ "compile_rule_ir",
263
+ "compress_checkpoint",
264
+ "compression",
265
+ "compute_tms_impact_set",
266
+ "create_http_server",
267
+ "current_schema_version",
268
+ "decompress_checkpoint",
269
+ "diff_states",
270
+ "document_version_key",
271
+ "explain",
272
+ "explain_visibility",
273
+ "export_state",
274
+ "extract_indexable_records",
275
+ "format_kvcs_uri",
276
+ "get_profile",
277
+ "ingest",
278
+ "make_mention_id",
279
+ "make_source_span",
280
+ "migrate_repository",
281
+ "migrations",
282
+ "needs_migration",
283
+ "new_ulid",
284
+ "ops",
285
+ "parse_kvcs_uri",
286
+ "parse_strict_json_object",
287
+ "project_local_state",
288
+ "project_state",
289
+ "project_view",
290
+ "qcce",
291
+ "register_profile",
292
+ "registered_profile_ids",
293
+ "retrieval",
294
+ "run_doctor",
295
+ "select_closed_edges",
296
+ "server",
297
+ "sha256_hex",
298
+ "span_for_substring",
299
+ "to_source_span",
300
+ "validate_profile_compatibility",
301
+ "views",
302
+ "zstd_available",
303
+ ]
kvcs_core/__main__.py ADDED
@@ -0,0 +1,7 @@
1
+ # SPDX-License-Identifier: Apache-2.0
2
+ """Module entry point for ``python -m kvcs_core``."""
3
+
4
+ from kvcs_core.cli import main
5
+
6
+ if __name__ == "__main__":
7
+ raise SystemExit(main())