datacron 2026.718.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.
Files changed (66) hide show
  1. datacron-2026.718.2/.gitignore +73 -0
  2. datacron-2026.718.2/LICENSE +201 -0
  3. datacron-2026.718.2/PKG-INFO +363 -0
  4. datacron-2026.718.2/README.en.md +314 -0
  5. datacron-2026.718.2/README.md +313 -0
  6. datacron-2026.718.2/docs/fr/spec.md +262 -0
  7. datacron-2026.718.2/pyproject.toml +217 -0
  8. datacron-2026.718.2/src/datacron/__init__.py +28 -0
  9. datacron-2026.718.2/src/datacron/bootstrap.py +161 -0
  10. datacron-2026.718.2/src/datacron/cli.py +1258 -0
  11. datacron-2026.718.2/src/datacron/contradictions.py +971 -0
  12. datacron-2026.718.2/src/datacron/core/__init__.py +16 -0
  13. datacron-2026.718.2/src/datacron/core/config.py +434 -0
  14. datacron-2026.718.2/src/datacron/core/durability.py +315 -0
  15. datacron-2026.718.2/src/datacron/core/frontmatter.py +229 -0
  16. datacron-2026.718.2/src/datacron/core/hashing.py +72 -0
  17. datacron-2026.718.2/src/datacron/core/logger.py +194 -0
  18. datacron-2026.718.2/src/datacron/core/markdown_sections.py +129 -0
  19. datacron-2026.718.2/src/datacron/core/models.py +324 -0
  20. datacron-2026.718.2/src/datacron/core/operation_log.py +459 -0
  21. datacron-2026.718.2/src/datacron/core/paths.py +167 -0
  22. datacron-2026.718.2/src/datacron/core/protocols.py +356 -0
  23. datacron-2026.718.2/src/datacron/core/query_expansion.py +112 -0
  24. datacron-2026.718.2/src/datacron/core/scope.py +223 -0
  25. datacron-2026.718.2/src/datacron/core/security.py +123 -0
  26. datacron-2026.718.2/src/datacron/core/temporal.py +99 -0
  27. datacron-2026.718.2/src/datacron/core/vault.py +435 -0
  28. datacron-2026.718.2/src/datacron/core/vault_writer.py +731 -0
  29. datacron-2026.718.2/src/datacron/eval/__init__.py +51 -0
  30. datacron-2026.718.2/src/datacron/eval/baseline.py +222 -0
  31. datacron-2026.718.2/src/datacron/eval/harness.py +369 -0
  32. datacron-2026.718.2/src/datacron/eval/metrics.py +100 -0
  33. datacron-2026.718.2/src/datacron/eval/transport.py +93 -0
  34. datacron-2026.718.2/src/datacron/indexing/__init__.py +22 -0
  35. datacron-2026.718.2/src/datacron/indexing/chunker.py +422 -0
  36. datacron-2026.718.2/src/datacron/indexing/fts5_store.py +947 -0
  37. datacron-2026.718.2/src/datacron/indexing/rebuild.py +209 -0
  38. datacron-2026.718.2/src/datacron/indexing/reconcile.py +152 -0
  39. datacron-2026.718.2/src/datacron/indexing/ripgrep.py +398 -0
  40. datacron-2026.718.2/src/datacron/indexing/wikilinks.py +180 -0
  41. datacron-2026.718.2/src/datacron/installers/__init__.py +16 -0
  42. datacron-2026.718.2/src/datacron/installers/claude_desktop.py +281 -0
  43. datacron-2026.718.2/src/datacron/installers/mcp_clients.py +559 -0
  44. datacron-2026.718.2/src/datacron/installers/protocol.py +559 -0
  45. datacron-2026.718.2/src/datacron/mcp/__init__.py +16 -0
  46. datacron-2026.718.2/src/datacron/mcp/health.py +200 -0
  47. datacron-2026.718.2/src/datacron/mcp/identity.py +82 -0
  48. datacron-2026.718.2/src/datacron/mcp/resources.py +257 -0
  49. datacron-2026.718.2/src/datacron/mcp/sandbox.py +192 -0
  50. datacron-2026.718.2/src/datacron/mcp/security_manifest.py +65 -0
  51. datacron-2026.718.2/src/datacron/mcp/server.py +401 -0
  52. datacron-2026.718.2/src/datacron/mcp/tool_contract.py +406 -0
  53. datacron-2026.718.2/src/datacron/mcp/tools/__init__.py +54 -0
  54. datacron-2026.718.2/src/datacron/mcp/tools/advisory.py +180 -0
  55. datacron-2026.718.2/src/datacron/mcp/tools/ops.py +167 -0
  56. datacron-2026.718.2/src/datacron/mcp/tools/payloads.py +74 -0
  57. datacron-2026.718.2/src/datacron/mcp/tools/read.py +527 -0
  58. datacron-2026.718.2/src/datacron/mcp/tools/registry.py +458 -0
  59. datacron-2026.718.2/src/datacron/mcp/tools/search.py +485 -0
  60. datacron-2026.718.2/src/datacron/mcp/tools/write.py +651 -0
  61. datacron-2026.718.2/src/datacron/mcp/tools/write_validation.py +287 -0
  62. datacron-2026.718.2/src/datacron/py.typed +0 -0
  63. datacron-2026.718.2/src/datacron/reliability.py +545 -0
  64. datacron-2026.718.2/src/datacron/reliability_evidence.json +23 -0
  65. datacron-2026.718.2/src/datacron/scrubber.py +735 -0
  66. datacron-2026.718.2/src/datacron/setup_wizard.py +547 -0
@@ -0,0 +1,73 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+ *.egg-info/
6
+ *.egg
7
+ build/
8
+ dist/
9
+ dist-installer/
10
+ .pytest_cache/
11
+ .mypy_cache/
12
+ .ruff_cache/
13
+ .coverage
14
+ htmlcov/
15
+ .tox/
16
+ .nox/
17
+ .hypothesis/
18
+ .venv/
19
+ venv/
20
+ env/
21
+
22
+ # Datacron runtime
23
+ .datacron/
24
+ *.db
25
+ *.db-wal
26
+ *.db-shm
27
+
28
+ # Local-only directory (project convention): agent briefs, audits, studies,
29
+ # reviews, session reports, private eval data. Never committed.
30
+ local/
31
+
32
+ # Safety net: legacy locations of local-only artifacts
33
+ docs/audits/
34
+ docs/etudes/
35
+
36
+ # OS
37
+ .DS_Store
38
+ Thumbs.db
39
+ desktop.ini
40
+
41
+ # IDE
42
+ .idea/
43
+ .vscode/
44
+ *.swp
45
+ *.swo
46
+
47
+ # Logs
48
+ logs/
49
+ *.log
50
+
51
+ # Secrets
52
+ .env
53
+ .env.local
54
+ .env.*.local
55
+
56
+ # Local agent session config
57
+ .claude/
58
+
59
+ # AI / agent working artifacts -- kept local, never committed
60
+ CLAUDE.md
61
+ docs/agent-briefs/
62
+ docs/reviews/
63
+ docs/ChatGPT_*.md
64
+ docs/Gemini_*.md
65
+ docs/brief-*.md
66
+ docs/fix-plan*.md
67
+ docs/doc-sync*.md
68
+
69
+ # Local reliability reviews and experiments
70
+ datacron-redteam-data-integrity.md
71
+ lot*_design_review.md
72
+ lot*_report.md
73
+ experiments/
@@ -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 tracking or improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for describing the origin of the Work and
141
+ reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Support. While redistributing the Work or
166
+ Derivative Works thereof, You may choose to offer, and charge a
167
+ fee for, acceptance of support, warranty, indemnity, or other
168
+ liability obligations and/or rights consistent with this License.
169
+ However, in accepting such obligations, You may act only on Your
170
+ own behalf and on Your sole responsibility, not on behalf of any
171
+ other Contributor, and only if You agree to indemnify, defend,
172
+ and hold each Contributor harmless for any liability incurred by,
173
+ or claims asserted against, such Contributor by reason of your
174
+ accepting any such warranty or support.
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 Julien Bombled
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,363 @@
1
+ Metadata-Version: 2.4
2
+ Name: datacron
3
+ Version: 2026.718.2
4
+ Summary: Local-first MCP server that exposes a Markdown vault through MCP.
5
+ Project-URL: Homepage, https://github.com/VBlackJack/Datacron
6
+ Project-URL: Documentation, https://github.com/VBlackJack/Datacron/blob/main/README.md
7
+ Project-URL: Source, https://github.com/VBlackJack/Datacron
8
+ Project-URL: Issues, https://github.com/VBlackJack/Datacron/issues
9
+ Author: Julien Bombled
10
+ License-Expression: Apache-2.0
11
+ License-File: LICENSE
12
+ Keywords: claude,local-first,markdown,mcp,obsidian,vault
13
+ Classifier: Development Status :: 3 - Alpha
14
+ Classifier: Environment :: Console
15
+ Classifier: Intended Audience :: Developers
16
+ Classifier: License :: OSI Approved :: Apache Software License
17
+ Classifier: Operating System :: OS Independent
18
+ Classifier: Programming Language :: Python :: 3
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Programming Language :: Python :: 3.13
22
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
23
+ Classifier: Topic :: Text Processing :: Markup :: Markdown
24
+ Classifier: Typing :: Typed
25
+ Requires-Python: >=3.11
26
+ Requires-Dist: aiosqlite>=0.20
27
+ Requires-Dist: mcp>=1.2
28
+ Requires-Dist: mistletoe>=1.3
29
+ Requires-Dist: pydantic-settings>=2.2
30
+ Requires-Dist: pydantic>=2.6
31
+ Requires-Dist: python-frontmatter>=1.1
32
+ Requires-Dist: python-ulid>=2.4
33
+ Requires-Dist: pyyaml>=6.0
34
+ Requires-Dist: rich>=13.7
35
+ Requires-Dist: tomli-w>=1.0
36
+ Requires-Dist: truststore>=0.10.4
37
+ Requires-Dist: typer>=0.12
38
+ Provides-Extra: build
39
+ Requires-Dist: pyinstaller>=6.0; extra == 'build'
40
+ Provides-Extra: dev
41
+ Requires-Dist: hypothesis>=6.112; extra == 'dev'
42
+ Requires-Dist: mypy>=1.11; extra == 'dev'
43
+ Requires-Dist: pytest-asyncio>=0.24; extra == 'dev'
44
+ Requires-Dist: pytest-cov>=5.0; extra == 'dev'
45
+ Requires-Dist: pytest>=9.0.3; extra == 'dev'
46
+ Requires-Dist: ruff>=0.13.2; extra == 'dev'
47
+ Requires-Dist: types-pyyaml>=6.0; extra == 'dev'
48
+ Description-Content-Type: text/markdown
49
+
50
+ # Datacron
51
+
52
+ > Local MCP server to query and maintain a Markdown vault from Claude Desktop or Claude Code,
53
+ > without sending the whole vault into the context.
54
+
55
+ <!-- mcp-name: io.github.vblackjack/datacron -->
56
+
57
+ [![License: Apache 2.0](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](LICENSE)
58
+ [![Python: 3.11+](https://img.shields.io/badge/Python-3.11%2B-blue)](pyproject.toml)
59
+ [![MCP: local stdio](https://img.shields.io/badge/MCP-local_stdio-purple)](#mcp-tools)
60
+ [![CI](https://github.com/VBlackJack/datacron/actions/workflows/ci.yml/badge.svg)](https://github.com/VBlackJack/datacron/actions/workflows/ci.yml)
61
+
62
+ [Français](README.md) | **English**
63
+
64
+ Datacron indexes a folder of Markdown notes, exposes a local MCP server, then returns the
65
+ relevant notes or chunks to the client instead of a full dump. The vault stays an ordinary
66
+ Markdown folder: Datacron only adds a `.datacron/` sidecar for the index, logs, internal
67
+ ULIDs, history, and the operation journal.
68
+
69
+ ## What is in place
70
+
71
+ | Surface | Current state |
72
+ |---|---|
73
+ | Vault reading | `list_notes`, `get_note`, resources `datacron://vault/map`, `vault/info`, `policy/active` |
74
+ | Search | SQLite FTS5/BM25, FR↔EN query expansion, temporal re-rank, `ripgrep` via `search_regex` |
75
+ | Local graph | Wikilinks and backlinks via `get_backlinks` |
76
+ | Writing | 5 confined, reversible tools, disabled by default without `DATACRON_WRITE_PATHS` |
77
+ | Index | `datacron index` incremental, `datacron reindex` full, automatic repair on read |
78
+ | Evaluation | `datacron eval` over the real MCP pipeline: recall@k, MRR, nDCG, freshness, latency, and payload tokens |
79
+ | Guided setup | `datacron setup`: init + index + MCP registration in one command |
80
+ | Clients | Auto-detect and register via `datacron setup --client all`: Claude Desktop, Claude Code, Cursor, Gemini CLI, Codex CLI, Windsurf, VS Code |
81
+ | Distribution | Windows installer (`Datacron-Setup.exe`), standalone executable (PyInstaller) with no Python required, or installation from source |
82
+
83
+ Local measurement of the `tool/impl` pipeline actually received by the agent, 19 questions,
84
+ 8k-token / 20-result configuration, July 17, 2026:
85
+
86
+ ```text
87
+ recall@5 0.89
88
+ recall@10 0.95
89
+ recall@20 0.95
90
+ MRR 0.73
91
+ nDCG@10 0.79
92
+ latency p50 57 ms
93
+ latency p95 276 ms
94
+ payload tokens 90567
95
+ ```
96
+
97
+ The tool now matches the raw store at recall@5 (0.89): the previous gap came from globally
98
+ comparing scores produced by separate AND and OR queries, not from the response budget or a
99
+ BM25 limitation. Repair-on-read throttling brings its own p50 down to 0.009 ms; the first
100
+ full sweep of the session remains visible in p95. The golden set does not yet contain a
101
+ `forbidden_paths` case and the vault has no indexed `supersedes` relationship.
102
+
103
+ ## Installation
104
+
105
+ ### Windows: one double-click installer
106
+
107
+ The easiest way on Windows: download `Datacron-Setup.exe` from the
108
+ [latest Release](https://github.com/VBlackJack/datacron/releases/latest), double-click it,
109
+ and pick your vault. No Python, no terminal, no administrator rights; Datacron registers
110
+ itself with your AI clients automatically. Full guide:
111
+ [Windows installation](docs/en/installation-windows.md).
112
+
113
+ ### From source
114
+
115
+ From a clone of the repository:
116
+
117
+ ```bash
118
+ python -m pip install -e ".[dev]"
119
+ ```
120
+
121
+ Or, to install only the application:
122
+
123
+ ```bash
124
+ python -m pip install -e .
125
+ ```
126
+
127
+ Runtime prerequisites:
128
+
129
+ - Python 3.11+
130
+ - `ripgrep` available on the `PATH` for `search_regex`
131
+ - a folder of Markdown notes
132
+ - Claude Desktop or another stdio MCP client
133
+
134
+ ## Quick start
135
+
136
+ The easy path - one command detects your AI clients, initializes the vault, indexes it, and
137
+ registers Datacron everywhere:
138
+
139
+ ```bash
140
+ datacron setup # interactive; add --yes for all defaults
141
+ ```
142
+
143
+ See the [installation guide](docs/en/setup.md) for options (`--client`, `--scope`, writing,
144
+ durability). Or step by step:
145
+
146
+ ```bash
147
+ datacron init /path/to/vault
148
+ datacron index --vault /path/to/vault
149
+ datacron status --vault /path/to/vault
150
+ datacron mcp install --client claude-desktop --vault /path/to/vault
151
+ ```
152
+
153
+ Restart the client (e.g. Claude Desktop) after installation.
154
+
155
+ To run the server manually:
156
+
157
+ ```bash
158
+ datacron mcp serve --vault /path/to/vault
159
+ ```
160
+
161
+ The direct script entry used by the installer is also available:
162
+
163
+ ```bash
164
+ datacron-mcp
165
+ ```
166
+
167
+ `datacron-mcp` reads the vault from `DATACRON_VAULT_ROOT`.
168
+
169
+ ## Configuration
170
+
171
+ `datacron init` creates `.datacron/VAULT.yaml`. That file can carry vault-local
172
+ configuration, notably query expansion:
173
+
174
+ ```yaml
175
+ query_expansion:
176
+ supervision: [monitoring]
177
+ sauvegarde: [backup]
178
+ restauration: [restore]
179
+ chiffrement: [encryption]
180
+ sécurité: [security]
181
+ validité: [validity]
182
+ certificat: [certificate]
183
+ ```
184
+
185
+ Useful environment variables:
186
+
187
+ | Variable | Default | Role |
188
+ |---|---:|---|
189
+ | `DATACRON_VAULT_ROOT` | current directory or `--vault` | vault served by the server |
190
+ | `DATACRON_READ_PATHS` | empty | read allowlist; the Claude Desktop installer sets it to the vault |
191
+ | `DATACRON_WRITE_PATHS` | empty | write allowlist; empty = write tools disabled |
192
+ | `DATACRON_MAX_RESULT_COUNT` | `20` | maximum number of results returned |
193
+ | `DATACRON_MAX_RESULT_TOKENS` | `8000` | token budget for search results |
194
+ | `DATACRON_REPAIR_MIN_INTERVAL_SECONDS` | `30` | minimum interval between repair-on-read sweeps; `0` = every read |
195
+ | `DATACRON_GET_NOTE_MAX_TOKENS` | `25000` | budget for `get_note(format="full")` |
196
+ | `DATACRON_CHUNK_MAX_TOKENS` | `1024` | target maximum chunk size |
197
+ | `DATACRON_RIPGREP_PATH` | `rg` | ripgrep binary |
198
+
199
+ Path lists use the OS separator (`:` on Unix, `;` on Windows).
200
+
201
+ ## Writing
202
+
203
+ Writes are deliberately OFF by default. Without `DATACRON_WRITE_PATHS`, write tools return a
204
+ clear error and create no file.
205
+
206
+ To enable writing to a specific subfolder:
207
+
208
+ ```powershell
209
+ $env:DATACRON_VAULT_ROOT = "G:\_DATA"
210
+ $env:DATACRON_READ_PATHS = "G:\_DATA"
211
+ $env:DATACRON_WRITE_PATHS = "G:\_DATA\_memory"
212
+ datacron mcp serve --vault G:\_DATA
213
+ ```
214
+
215
+ Available write tools:
216
+
217
+ - `create_note_ai`: creates a typed Markdown note, without overwrite.
218
+ - `append_journal`: adds an entry under a heading of an existing note.
219
+ - `set_frontmatter`: updates lifecycle fields without modifying the Markdown body.
220
+ - `patch_note_section`: replaces the content under an existing heading with CAS control.
221
+ - `revert_note`: restores the exact bytes of a version kept in history.
222
+
223
+ Guarantees:
224
+
225
+ - strict confinement within `DATACRON_WRITE_PATHS`
226
+ - atomic overwrite via temporary file + `os.replace`
227
+ - content-addressed history before modifying an existing note
228
+ - `reconcile()` after write to make the note immediately searchable
229
+ - local audit log
230
+
231
+ Concurrent multi-machine mode is not supported for writes: keep a single-writer rule on the
232
+ vault.
233
+
234
+ ## MCP Tools
235
+
236
+ ### Reading
237
+
238
+ | Tool | Description |
239
+ |---|---|
240
+ | `list_notes` | returns a paginated list, filterable by folder and tags, with ULID, title, tags, aliases, and dates |
241
+ | `get_note` | reads a note by ULID, chunk id, or relative path, as paginated content, chunk, or heading outline |
242
+ | `search_text` | runs a BM25 search on the FTS5 index with ranked snippets and stale notes demoted by default |
243
+ | `search_regex` | runs a regex search via ripgrep and resolves the found lines to indexed chunks |
244
+ | `get_backlinks` | returns chunks whose wikilinks target a ULID or a resolved alias |
245
+
246
+ ### Writing
247
+
248
+ | Tool | Description |
249
+ |---|---|
250
+ | `create_note_ai` | creates a new typed `_memory` note, confined to allowed paths, without overwrite and with a durable journal |
251
+ | `append_journal` | adds a Markdown entry under a heading, with confinement, exact history, and atomic write |
252
+ | `set_frontmatter` | updates only the lifecycle fields and the `updated` date, preserving the Markdown body |
253
+ | `patch_note_section` | replaces the content of an existing heading with CAS, exact history, and preservation of other sections |
254
+ | `revert_note` | restores a note from its content-addressed history; the operation stays durable, reversible, and audited |
255
+
256
+ ### Operational
257
+
258
+ | Tool | Description |
259
+ |---|---|
260
+ | `get_health` | returns the real state of index freshness, integrity, checksum, durability, and invariants |
261
+ | `get_note_history` | lists the committed operation metadata of a note without reading historical content or modifying the journal |
262
+ | `audit_query` | queries operation metadata by period, tool, or note without modifying the journal or the vault |
263
+
264
+ ### Advisory (experimental)
265
+
266
+ | Tool | Description |
267
+ |---|---|
268
+ | `contradiction_scan` | live, deterministic, bounded scan of contradictions/refinements between sections; proposes and confirms an explicit CAS call read-only, without ever writing automatically |
269
+
270
+ MCP resources:
271
+
272
+ - `datacron://vault/map`
273
+ - `datacron://vault/info`
274
+ - `datacron://policy/active`
275
+
276
+ ## Search
277
+
278
+ `search_text` combines several signals:
279
+
280
+ - FTS5/BM25 for the base lexical score
281
+ - FR↔EN query expansion configured in `VAULT.yaml`
282
+ - conservative temporal re-rank:
283
+ - a note referenced in another note's `supersedes` is strongly demoted
284
+ - `confidence: low` and `confidence: needs_verification` apply a light penalty
285
+ - `include_superseded=true` brings historical notes back up
286
+
287
+ `search_regex` stays literal: it applies neither query expansion nor temporal re-rank.
288
+
289
+ ## Privacy and security
290
+
291
+ - Datacron does no telemetry.
292
+ - Datacron calls no cloud LLM.
293
+ - The MCP client, for example Claude Desktop, may send the chunks that Datacron returns to
294
+ its provider. Datacron does not send it the full vault.
295
+ - Content returned to clients is wrapped in `<vault_content>...</vault_content>`.
296
+ - Results are bounded by count and by token budget.
297
+ - Filesystem access is confined by `DATACRON_READ_PATHS` and `DATACRON_WRITE_PATHS`.
298
+ - MCP operations are audited in the local logs.
299
+
300
+ ## CLI commands
301
+
302
+ ```bash
303
+ datacron setup # guided path: init + index + client config
304
+ datacron setup --yes # all defaults, no prompts
305
+ datacron init /path/to/vault
306
+ datacron status --vault /path/to/vault
307
+ datacron index --vault /path/to/vault
308
+ datacron reindex --vault /path/to/vault
309
+ datacron scrub-init --vault /path/to/vault
310
+ datacron scrub --vault /path/to/vault
311
+ datacron eval --questions examples/eval-questions.example.yaml --vault /path/to/vault
312
+ datacron eval --questions local/golden.yaml --vault /path/to/vault --save-baseline
313
+ datacron eval --questions local/golden.yaml --vault /path/to/vault --compare --json
314
+ datacron mcp serve --vault /path/to/vault
315
+ datacron mcp install --client claude-desktop --vault /path/to/vault
316
+ ```
317
+
318
+ ## Current limitations
319
+
320
+ - No vector search / embeddings: the spike is ruled out on the current golden because
321
+ tool-level recall@5 at 0.89 matches the BM25 store. Re-evaluate if an expanded golden
322
+ falls below 0.85 with the same evaluation.
323
+ - No autonomous agent: the MCP client orchestrates.
324
+ - No GUI.
325
+ - No concurrent multi-machine writes.
326
+ - Client detection in `datacron setup` is best-effort (a config directory or a binary on the
327
+ `PATH`); an install in a non-standard location may be missed and can then be configured by
328
+ hand.
329
+
330
+ ## Documentation
331
+
332
+ Full index: [docs/en/index.md](docs/en/index.md) | [Index français](docs/fr/index.md).
333
+
334
+ To get started:
335
+
336
+ - [Installation and configuration guide](docs/en/setup.md)
337
+ - [User guide](docs/en/user-guide.md)
338
+
339
+ Technical references:
340
+
341
+ - [Vault conventions (SPEC)](docs/en/spec.md)
342
+ - [Architecture and public surface](docs/en/architecture.md)
343
+ - [Settled decisions v2.1](docs/en/decisions-v2.1.md)
344
+ - [Security boundary](docs/en/security-boundary.md)
345
+ - [Integrity scrubber](docs/en/integrity-scrubber.md)
346
+ - [Operational health and durability](docs/en/operational-health.md)
347
+ - [Freshness contract](docs/en/freshness-contract-v1.md)
348
+
349
+ ## Development
350
+
351
+ ```bash
352
+ python -m pip install -e ".[dev]"
353
+ ruff check .
354
+ ruff format --check .
355
+ mypy
356
+ pytest
357
+ ```
358
+
359
+ ## License
360
+
361
+ Copyright 2026 Julien Bombled.
362
+
363
+ Licensed under the [Apache License, Version 2.0](LICENSE).