relinkra 0.1.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- relinkra-0.1.2/LICENSE +21 -0
- relinkra-0.1.2/PKG-INFO +190 -0
- relinkra-0.1.2/README.md +165 -0
- relinkra-0.1.2/pyproject.toml +57 -0
- relinkra-0.1.2/relinkra/__init__.py +47 -0
- relinkra-0.1.2/relinkra/app_service.py +1678 -0
- relinkra-0.1.2/relinkra/backend_detection.py +1220 -0
- relinkra-0.1.2/relinkra/backend_policy.py +1043 -0
- relinkra-0.1.2/relinkra/cbm.py +53 -0
- relinkra-0.1.2/relinkra/cbm_acquire.py +497 -0
- relinkra-0.1.2/relinkra/cbm_adapter.py +1160 -0
- relinkra-0.1.2/relinkra/cbm_indexing.py +672 -0
- relinkra-0.1.2/relinkra/cbm_support.py +825 -0
- relinkra-0.1.2/relinkra/cli.py +124 -0
- relinkra-0.1.2/relinkra/code_reference.py +429 -0
- relinkra-0.1.2/relinkra/config_formats.py +125 -0
- relinkra-0.1.2/relinkra/config_merge.py +401 -0
- relinkra-0.1.2/relinkra/connect_cli.py +737 -0
- relinkra-0.1.2/relinkra/connect_render.py +583 -0
- relinkra-0.1.2/relinkra/connect_verification.py +802 -0
- relinkra-0.1.2/relinkra/connector.py +495 -0
- relinkra-0.1.2/relinkra/connector_apply.py +1596 -0
- relinkra-0.1.2/relinkra/connectors.py +2043 -0
- relinkra-0.1.2/relinkra/context_budget.py +1390 -0
- relinkra-0.1.2/relinkra/context_builder.py +1485 -0
- relinkra-0.1.2/relinkra/context_cli.py +361 -0
- relinkra-0.1.2/relinkra/context_packet.py +604 -0
- relinkra-0.1.2/relinkra/contradictions.py +365 -0
- relinkra-0.1.2/relinkra/engram_adapter.py +667 -0
- relinkra-0.1.2/relinkra/explainability.py +901 -0
- relinkra-0.1.2/relinkra/freshness.py +1032 -0
- relinkra-0.1.2/relinkra/git_cli.py +163 -0
- relinkra-0.1.2/relinkra/git_intelligence.py +1546 -0
- relinkra-0.1.2/relinkra/handoff.py +917 -0
- relinkra-0.1.2/relinkra/host_discovery.py +290 -0
- relinkra-0.1.2/relinkra/identity.py +468 -0
- relinkra-0.1.2/relinkra/linkage.py +667 -0
- relinkra-0.1.2/relinkra/mcp_cli.py +188 -0
- relinkra-0.1.2/relinkra/mcp_server.py +824 -0
- relinkra-0.1.2/relinkra/memory.py +874 -0
- relinkra-0.1.2/relinkra/memory_cli.py +319 -0
- relinkra-0.1.2/relinkra/memory_ownership.py +530 -0
- relinkra-0.1.2/relinkra/metrics_model.py +415 -0
- relinkra-0.1.2/relinkra/product_cli.py +2436 -0
- relinkra-0.1.2/relinkra/registry.py +411 -0
- relinkra-0.1.2/relinkra/relevance.py +937 -0
- relinkra-0.1.2/relinkra/safe_write.py +554 -0
- relinkra-0.1.2/relinkra/toml_edit.py +569 -0
- relinkra-0.1.2/relinkra/workspace_resolution.py +130 -0
- relinkra-0.1.2/relinkra.egg-info/PKG-INFO +190 -0
- relinkra-0.1.2/relinkra.egg-info/SOURCES.txt +111 -0
- relinkra-0.1.2/relinkra.egg-info/dependency_links.txt +1 -0
- relinkra-0.1.2/relinkra.egg-info/entry_points.txt +3 -0
- relinkra-0.1.2/relinkra.egg-info/top_level.txt +1 -0
- relinkra-0.1.2/setup.cfg +4 -0
- relinkra-0.1.2/tests/test_artifact_contents.py +450 -0
- relinkra-0.1.2/tests/test_backend_detection.py +718 -0
- relinkra-0.1.2/tests/test_backend_policy.py +608 -0
- relinkra-0.1.2/tests/test_cbm_backend.py +2081 -0
- relinkra-0.1.2/tests/test_cbm_indexing.py +958 -0
- relinkra-0.1.2/tests/test_cbm_indexing_cli.py +770 -0
- relinkra-0.1.2/tests/test_cbm_setup.py +519 -0
- relinkra-0.1.2/tests/test_ci_hygiene.py +615 -0
- relinkra-0.1.2/tests/test_cli.py +221 -0
- relinkra-0.1.2/tests/test_code_reference.py +288 -0
- relinkra-0.1.2/tests/test_compose_run_evidence.py +290 -0
- relinkra-0.1.2/tests/test_config_merge.py +354 -0
- relinkra-0.1.2/tests/test_connect_apply.py +1741 -0
- relinkra-0.1.2/tests/test_connect_apply_codex.py +1364 -0
- relinkra-0.1.2/tests/test_connect_apply_devin_desktop.py +1131 -0
- relinkra-0.1.2/tests/test_connect_apply_opencode.py +1450 -0
- relinkra-0.1.2/tests/test_connect_cli.py +757 -0
- relinkra-0.1.2/tests/test_connect_devin_desktop.py +729 -0
- relinkra-0.1.2/tests/test_connectors.py +1160 -0
- relinkra-0.1.2/tests/test_context_budget.py +1871 -0
- relinkra-0.1.2/tests/test_context_builder.py +534 -0
- relinkra-0.1.2/tests/test_context_packet.py +1448 -0
- relinkra-0.1.2/tests/test_contradiction_hardening.py +556 -0
- relinkra-0.1.2/tests/test_emit_run_evidence.py +189 -0
- relinkra-0.1.2/tests/test_git_cli.py +251 -0
- relinkra-0.1.2/tests/test_git_intelligence.py +985 -0
- relinkra-0.1.2/tests/test_git_intelligence_models.py +323 -0
- relinkra-0.1.2/tests/test_git_intelligence_parse.py +277 -0
- relinkra-0.1.2/tests/test_git_intelligence_runner.py +389 -0
- relinkra-0.1.2/tests/test_git_proofs.py +482 -0
- relinkra-0.1.2/tests/test_handoff.py +611 -0
- relinkra-0.1.2/tests/test_host_discovery.py +391 -0
- relinkra-0.1.2/tests/test_identity.py +790 -0
- relinkra-0.1.2/tests/test_install_e2e.py +629 -0
- relinkra-0.1.2/tests/test_linkage.py +945 -0
- relinkra-0.1.2/tests/test_mcp_cli.py +279 -0
- relinkra-0.1.2/tests/test_mcp_hardening.py +994 -0
- relinkra-0.1.2/tests/test_mcp_proof.py +698 -0
- relinkra-0.1.2/tests/test_mcp_server.py +1491 -0
- relinkra-0.1.2/tests/test_memory.py +666 -0
- relinkra-0.1.2/tests/test_memory_cli.py +813 -0
- relinkra-0.1.2/tests/test_memory_ownership.py +565 -0
- relinkra-0.1.2/tests/test_memory_roundtrip.py +664 -0
- relinkra-0.1.2/tests/test_metrics_model.py +249 -0
- relinkra-0.1.2/tests/test_packaging.py +396 -0
- relinkra-0.1.2/tests/test_platform_honesty.py +202 -0
- relinkra-0.1.2/tests/test_product_cli.py +1016 -0
- relinkra-0.1.2/tests/test_project_autoresolution.py +361 -0
- relinkra-0.1.2/tests/test_r4d.py +1530 -0
- relinkra-0.1.2/tests/test_r4d_git_integration.py +357 -0
- relinkra-0.1.2/tests/test_r5e2d_structural.py +305 -0
- relinkra-0.1.2/tests/test_release_check.py +270 -0
- relinkra-0.1.2/tests/test_release_gates.py +499 -0
- relinkra-0.1.2/tests/test_relevance.py +1645 -0
- relinkra-0.1.2/tests/test_routing_diagnostics.py +666 -0
- relinkra-0.1.2/tests/test_safe_write.py +438 -0
- relinkra-0.1.2/tests/test_sdist_install_e2e.py +134 -0
- relinkra-0.1.2/tests/test_tools_core_runner.py +107 -0
relinkra-0.1.2/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 José Julián Sánchez Rodríguez
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
relinkra-0.1.2/PKG-INFO
ADDED
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: relinkra
|
|
3
|
+
Version: 0.1.2
|
|
4
|
+
Summary: Shared code intelligence, persistent memory and optimized context for AI coding agents.
|
|
5
|
+
Author: José Julián Sánchez Rodríguez
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/jojusa/relinkra
|
|
8
|
+
Project-URL: Repository, https://github.com/jojusa/relinkra
|
|
9
|
+
Project-URL: Issues, https://github.com/jojusa/relinkra/issues
|
|
10
|
+
Classifier: Environment :: Console
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: Operating System :: OS Independent
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
20
|
+
Classifier: Topic :: Software Development
|
|
21
|
+
Requires-Python: >=3.9
|
|
22
|
+
Description-Content-Type: text/markdown
|
|
23
|
+
License-File: LICENSE
|
|
24
|
+
Dynamic: license-file
|
|
25
|
+
|
|
26
|
+
# Relinkra
|
|
27
|
+
|
|
28
|
+
## What Relinkra does
|
|
29
|
+
|
|
30
|
+
Relinkra gives AI coding agents shared code intelligence, persistent memory, and optimized context: one codebase, one shared context, many agents. Every connected agent sees the same project memory, handoffs, and code references instead of re-discovering the repository alone. Relinkra optimizes the path to information; it does not restrict the agent's ability to search, reason, edit, or validate by itself.
|
|
31
|
+
|
|
32
|
+
## Quick start
|
|
33
|
+
|
|
34
|
+
Requirements: Python 3.9+ and Git. The quick start does not require any optional component.
|
|
35
|
+
|
|
36
|
+
### Install
|
|
37
|
+
|
|
38
|
+
The normal installation path after publication is:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
python -m pip install relinkra
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
The literal `pip install relinkra` command is the equivalent user-facing
|
|
45
|
+
contract. Relinkra is not being published to PyPI in this checkpoint, so this
|
|
46
|
+
is the post-publication path rather than a claim of current public availability.
|
|
47
|
+
|
|
48
|
+
For local validation or unreleased development only, install a built artifact
|
|
49
|
+
or a source checkout:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
# Install a locally built wheel or sdist
|
|
53
|
+
python -m pip install path/to/relinkra-<version>-py3-none-any.whl
|
|
54
|
+
|
|
55
|
+
# Or install from an unreleased source checkout
|
|
56
|
+
git clone https://github.com/jojusa/relinkra.git
|
|
57
|
+
cd relinkra
|
|
58
|
+
python -m pip install .
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Use `python -m pip install -e .` only when actively developing Relinkra. The
|
|
62
|
+
source-checkout paths are not the normal user installation.
|
|
63
|
+
|
|
64
|
+
### Initialize
|
|
65
|
+
|
|
66
|
+
From inside the Git repository you want your agents to share:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
relinkra --version
|
|
70
|
+
relinkra init
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Connect an agent
|
|
74
|
+
|
|
75
|
+
Run the supported command sequence for the host you use:
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
relinkra doctor
|
|
79
|
+
relinkra connect check <host>
|
|
80
|
+
relinkra connect plan <host>
|
|
81
|
+
relinkra connect apply <host>
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Supported hosts include `claude`, `opencode`, `codex`, `zcode`, and
|
|
85
|
+
`devin-desktop`. OpenCode and Codex receive global, bare `relinkra-mcp`
|
|
86
|
+
registrations; Codex uses `args = []`. ZCode receives a workspace-local
|
|
87
|
+
configuration with the repository-root `cwd`.
|
|
88
|
+
|
|
89
|
+
For the complete host list, run `relinkra connect list`. `connect check` is
|
|
90
|
+
read-only, `connect plan` previews changes, and `connect apply` writes the
|
|
91
|
+
configuration after creating a backup where supported.
|
|
92
|
+
|
|
93
|
+
### Verify
|
|
94
|
+
|
|
95
|
+
Restart the host so it can reread its configuration and launch Relinkra as its
|
|
96
|
+
MCP (Model Context Protocol) server. Then record host-side proof:
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
relinkra connect verify <host> --proof <proof-file>
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
`connect apply` and `connect check` validate configuration only; they do not
|
|
103
|
+
prove that a real host launched the server.
|
|
104
|
+
|
|
105
|
+
### Use
|
|
106
|
+
|
|
107
|
+
Once the connector is configured, ask normal project questions. You should not
|
|
108
|
+
normally need to say "use Relinkra": the MCP server advertises when its shared
|
|
109
|
+
context, memory, architecture, relationship, Git, or bounded-packet tools can
|
|
110
|
+
reduce redundant exploration. It does not force those tools for trivial work,
|
|
111
|
+
replace native tools, or make stale context authoritative.
|
|
112
|
+
|
|
113
|
+
## What just happened?
|
|
114
|
+
|
|
115
|
+
- `relinkra init` registered a portable identity for your repository and this workspace under `.relinkra/` — nothing else was touched.
|
|
116
|
+
- `connect apply` added one MCP server entry named `relinkra` to the selected host configuration, after creating a timestamped backup where that host uses a writable config target.
|
|
117
|
+
- Your agent can now request shared project context — memory, code references, and handoffs — through Relinkra instead of starting from zero.
|
|
118
|
+
- Optional integrations are not required; their absence is reported honestly, and your agent's native tools remain untouched.
|
|
119
|
+
|
|
120
|
+
## How do I know it worked?
|
|
121
|
+
|
|
122
|
+
Run `relinkra doctor`, then `relinkra connect check <agent>`. After applying the
|
|
123
|
+
configuration and restarting the host, use
|
|
124
|
+
`relinkra connect verify <agent> --proof <proof-file>` when host-side evidence
|
|
125
|
+
is required.
|
|
126
|
+
|
|
127
|
+
Healthy means: no FAIL entries in `doctor` (WARN entries are typically optional components in degraded mode — safe to ignore for now), and `check` reports the registration as valid. This confirms configuration only; host runtime proof is a separate `connect verify` concern.
|
|
128
|
+
|
|
129
|
+
## If something fails
|
|
130
|
+
|
|
131
|
+
- **Python too old** — Relinkra requires Python 3.9+; check with `python --version`. See [Installation](docs/installation.md).
|
|
132
|
+
- **Commands not found** — the virtual environment is not activated (or the console scripts directory is not on `PATH`). See [Troubleshooting](docs/troubleshooting.md).
|
|
133
|
+
- **`init` refuses** — you are not inside a git repository. Run it from your project root. See [Installation](docs/installation.md).
|
|
134
|
+
- **Outside Git or before `init`** — binding fails closed and does not create `.relinkra`; run `git init` for a new repository, then `relinkra init` before connecting a host.
|
|
135
|
+
- **`doctor` reports a degraded backend** — an optional component is missing; the core still works. See [Troubleshooting](docs/troubleshooting.md).
|
|
136
|
+
- **Host connector not detected** — the agent's config was not found; `connect inspect <agent>` shows what Relinkra probed. See [Connectors](docs/connectors.md).
|
|
137
|
+
- **CBM unavailable or not certified on this platform** — code intelligence is unavailable; everything else works. See [CBM backend](docs/cbm-backend.md).
|
|
138
|
+
- **Engram unavailable** — memory and handoffs report as unavailable; commands still succeed. See [Installation](docs/installation.md).
|
|
139
|
+
|
|
140
|
+
Direct Engram use remains independently available; host binding does not depend
|
|
141
|
+
on it and does not require direct CBM configuration.
|
|
142
|
+
|
|
143
|
+
## Conflicting and stale context
|
|
144
|
+
|
|
145
|
+
Relinkra combines evidence from source, Git, CBM graphs, memory, and handoffs.
|
|
146
|
+
When those sources disagree it does not silently collapse them into one truth:
|
|
147
|
+
older evidence stays visible and is marked stale/historical, current-source
|
|
148
|
+
evidence is presented as current for current-code claims, and unresolvable
|
|
149
|
+
conflicts are surfaced as unresolved rather than guessed away. See
|
|
150
|
+
[Freshness, contradictions, and explainability](docs/freshness-explainability.md).
|
|
151
|
+
|
|
152
|
+
## Optional external integrations
|
|
153
|
+
|
|
154
|
+
Both are third-party projects, installed and managed independently. Neither is bundled with Relinkra, and neither is required for the quick start. Direct CBM setup is optional advanced/local configuration, not part of the normal public installation path.
|
|
155
|
+
|
|
156
|
+
- **Codebase Memory (CBM)** — code intelligence backend maintained by [DeusData](https://github.com/DeusData/codebase-memory-mcp) (MIT license). Certified with the real binary on Windows; on Linux/macOS it is NOT certified, and Relinkra keeps working without it. Manage its index with `relinkra cbm status/index/refresh` — see [CBM backend](docs/cbm-backend.md).
|
|
157
|
+
- **Engram** — persistent memory backend maintained by Gentleman Programming (MIT license). External and optional; without it, memory and handoffs report as unavailable and commands still exit successfully.
|
|
158
|
+
|
|
159
|
+
## Current state
|
|
160
|
+
|
|
161
|
+
- Python 3.9 through 3.14 is covered by the repository's CI matrix, with zero runtime dependencies.
|
|
162
|
+
- Windows is currently certified. Linux/macOS exact-SHA certification and hosted CI evidence are pending; runner quota/billing availability is infrastructure evidence, not a product defect.
|
|
163
|
+
- The package is pure Python. Public release requires retained exact wheel and sdist E2E results for both CLI and MCP, supplied as the mandatory `INSTALLED_CLI_MCP` evidence; unsupported platforms are not certified.
|
|
164
|
+
- CBM managed certification is Windows-focused; Linux/macOS remain an honest degraded path.
|
|
165
|
+
- The ZCode connector is structurally validated, but runtime certification is pending; broader host certification remains visible as external PARTIAL debt. Devin Cloud is unsupported (roadmap).
|
|
166
|
+
- The public release check requires local regression/package evidence plus exact-SHA external evidence:
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
RELEASE_SHA="$(git rev-parse HEAD)"
|
|
170
|
+
python tools/release_check.py --run-regression --run-packaging \
|
|
171
|
+
--evidence exact-release-head-evidence.json \
|
|
172
|
+
--require-sha "$RELEASE_SHA" --require public
|
|
173
|
+
```
|
|
174
|
+
The evidence file must include the retained exact-artifact CLI/MCP results;
|
|
175
|
+
`release_check` does not collect installed E2E proof.
|
|
176
|
+
- PyPI publication is not performed in this checkpoint; local validation uses built artifacts or a source checkout.
|
|
177
|
+
|
|
178
|
+
## License
|
|
179
|
+
|
|
180
|
+
Relinkra is released under the [MIT License](LICENSE).
|
|
181
|
+
|
|
182
|
+
## Learn more
|
|
183
|
+
|
|
184
|
+
- [Installation](docs/installation.md) — install, upgrade, and uninstall.
|
|
185
|
+
- [Connectors](docs/connectors.md) — how agent hosts are connected.
|
|
186
|
+
- [Product CLI](docs/cli.md) — the full command reference.
|
|
187
|
+
- [Freshness, contradictions, and explainability](docs/freshness-explainability.md) — why context was shown and whether it is current.
|
|
188
|
+
- [Release verification](docs/release.md) — CI, verification levels, and release gates (maintainer-facing).
|
|
189
|
+
- [Contributing](CONTRIBUTING.md) — set up a development checkout and run the tests.
|
|
190
|
+
- [Security](SECURITY.md) — supported versions and how to report a vulnerability.
|
relinkra-0.1.2/README.md
ADDED
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
# Relinkra
|
|
2
|
+
|
|
3
|
+
## What Relinkra does
|
|
4
|
+
|
|
5
|
+
Relinkra gives AI coding agents shared code intelligence, persistent memory, and optimized context: one codebase, one shared context, many agents. Every connected agent sees the same project memory, handoffs, and code references instead of re-discovering the repository alone. Relinkra optimizes the path to information; it does not restrict the agent's ability to search, reason, edit, or validate by itself.
|
|
6
|
+
|
|
7
|
+
## Quick start
|
|
8
|
+
|
|
9
|
+
Requirements: Python 3.9+ and Git. The quick start does not require any optional component.
|
|
10
|
+
|
|
11
|
+
### Install
|
|
12
|
+
|
|
13
|
+
The normal installation path after publication is:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
python -m pip install relinkra
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
The literal `pip install relinkra` command is the equivalent user-facing
|
|
20
|
+
contract. Relinkra is not being published to PyPI in this checkpoint, so this
|
|
21
|
+
is the post-publication path rather than a claim of current public availability.
|
|
22
|
+
|
|
23
|
+
For local validation or unreleased development only, install a built artifact
|
|
24
|
+
or a source checkout:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
# Install a locally built wheel or sdist
|
|
28
|
+
python -m pip install path/to/relinkra-<version>-py3-none-any.whl
|
|
29
|
+
|
|
30
|
+
# Or install from an unreleased source checkout
|
|
31
|
+
git clone https://github.com/jojusa/relinkra.git
|
|
32
|
+
cd relinkra
|
|
33
|
+
python -m pip install .
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Use `python -m pip install -e .` only when actively developing Relinkra. The
|
|
37
|
+
source-checkout paths are not the normal user installation.
|
|
38
|
+
|
|
39
|
+
### Initialize
|
|
40
|
+
|
|
41
|
+
From inside the Git repository you want your agents to share:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
relinkra --version
|
|
45
|
+
relinkra init
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Connect an agent
|
|
49
|
+
|
|
50
|
+
Run the supported command sequence for the host you use:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
relinkra doctor
|
|
54
|
+
relinkra connect check <host>
|
|
55
|
+
relinkra connect plan <host>
|
|
56
|
+
relinkra connect apply <host>
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Supported hosts include `claude`, `opencode`, `codex`, `zcode`, and
|
|
60
|
+
`devin-desktop`. OpenCode and Codex receive global, bare `relinkra-mcp`
|
|
61
|
+
registrations; Codex uses `args = []`. ZCode receives a workspace-local
|
|
62
|
+
configuration with the repository-root `cwd`.
|
|
63
|
+
|
|
64
|
+
For the complete host list, run `relinkra connect list`. `connect check` is
|
|
65
|
+
read-only, `connect plan` previews changes, and `connect apply` writes the
|
|
66
|
+
configuration after creating a backup where supported.
|
|
67
|
+
|
|
68
|
+
### Verify
|
|
69
|
+
|
|
70
|
+
Restart the host so it can reread its configuration and launch Relinkra as its
|
|
71
|
+
MCP (Model Context Protocol) server. Then record host-side proof:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
relinkra connect verify <host> --proof <proof-file>
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
`connect apply` and `connect check` validate configuration only; they do not
|
|
78
|
+
prove that a real host launched the server.
|
|
79
|
+
|
|
80
|
+
### Use
|
|
81
|
+
|
|
82
|
+
Once the connector is configured, ask normal project questions. You should not
|
|
83
|
+
normally need to say "use Relinkra": the MCP server advertises when its shared
|
|
84
|
+
context, memory, architecture, relationship, Git, or bounded-packet tools can
|
|
85
|
+
reduce redundant exploration. It does not force those tools for trivial work,
|
|
86
|
+
replace native tools, or make stale context authoritative.
|
|
87
|
+
|
|
88
|
+
## What just happened?
|
|
89
|
+
|
|
90
|
+
- `relinkra init` registered a portable identity for your repository and this workspace under `.relinkra/` — nothing else was touched.
|
|
91
|
+
- `connect apply` added one MCP server entry named `relinkra` to the selected host configuration, after creating a timestamped backup where that host uses a writable config target.
|
|
92
|
+
- Your agent can now request shared project context — memory, code references, and handoffs — through Relinkra instead of starting from zero.
|
|
93
|
+
- Optional integrations are not required; their absence is reported honestly, and your agent's native tools remain untouched.
|
|
94
|
+
|
|
95
|
+
## How do I know it worked?
|
|
96
|
+
|
|
97
|
+
Run `relinkra doctor`, then `relinkra connect check <agent>`. After applying the
|
|
98
|
+
configuration and restarting the host, use
|
|
99
|
+
`relinkra connect verify <agent> --proof <proof-file>` when host-side evidence
|
|
100
|
+
is required.
|
|
101
|
+
|
|
102
|
+
Healthy means: no FAIL entries in `doctor` (WARN entries are typically optional components in degraded mode — safe to ignore for now), and `check` reports the registration as valid. This confirms configuration only; host runtime proof is a separate `connect verify` concern.
|
|
103
|
+
|
|
104
|
+
## If something fails
|
|
105
|
+
|
|
106
|
+
- **Python too old** — Relinkra requires Python 3.9+; check with `python --version`. See [Installation](docs/installation.md).
|
|
107
|
+
- **Commands not found** — the virtual environment is not activated (or the console scripts directory is not on `PATH`). See [Troubleshooting](docs/troubleshooting.md).
|
|
108
|
+
- **`init` refuses** — you are not inside a git repository. Run it from your project root. See [Installation](docs/installation.md).
|
|
109
|
+
- **Outside Git or before `init`** — binding fails closed and does not create `.relinkra`; run `git init` for a new repository, then `relinkra init` before connecting a host.
|
|
110
|
+
- **`doctor` reports a degraded backend** — an optional component is missing; the core still works. See [Troubleshooting](docs/troubleshooting.md).
|
|
111
|
+
- **Host connector not detected** — the agent's config was not found; `connect inspect <agent>` shows what Relinkra probed. See [Connectors](docs/connectors.md).
|
|
112
|
+
- **CBM unavailable or not certified on this platform** — code intelligence is unavailable; everything else works. See [CBM backend](docs/cbm-backend.md).
|
|
113
|
+
- **Engram unavailable** — memory and handoffs report as unavailable; commands still succeed. See [Installation](docs/installation.md).
|
|
114
|
+
|
|
115
|
+
Direct Engram use remains independently available; host binding does not depend
|
|
116
|
+
on it and does not require direct CBM configuration.
|
|
117
|
+
|
|
118
|
+
## Conflicting and stale context
|
|
119
|
+
|
|
120
|
+
Relinkra combines evidence from source, Git, CBM graphs, memory, and handoffs.
|
|
121
|
+
When those sources disagree it does not silently collapse them into one truth:
|
|
122
|
+
older evidence stays visible and is marked stale/historical, current-source
|
|
123
|
+
evidence is presented as current for current-code claims, and unresolvable
|
|
124
|
+
conflicts are surfaced as unresolved rather than guessed away. See
|
|
125
|
+
[Freshness, contradictions, and explainability](docs/freshness-explainability.md).
|
|
126
|
+
|
|
127
|
+
## Optional external integrations
|
|
128
|
+
|
|
129
|
+
Both are third-party projects, installed and managed independently. Neither is bundled with Relinkra, and neither is required for the quick start. Direct CBM setup is optional advanced/local configuration, not part of the normal public installation path.
|
|
130
|
+
|
|
131
|
+
- **Codebase Memory (CBM)** — code intelligence backend maintained by [DeusData](https://github.com/DeusData/codebase-memory-mcp) (MIT license). Certified with the real binary on Windows; on Linux/macOS it is NOT certified, and Relinkra keeps working without it. Manage its index with `relinkra cbm status/index/refresh` — see [CBM backend](docs/cbm-backend.md).
|
|
132
|
+
- **Engram** — persistent memory backend maintained by Gentleman Programming (MIT license). External and optional; without it, memory and handoffs report as unavailable and commands still exit successfully.
|
|
133
|
+
|
|
134
|
+
## Current state
|
|
135
|
+
|
|
136
|
+
- Python 3.9 through 3.14 is covered by the repository's CI matrix, with zero runtime dependencies.
|
|
137
|
+
- Windows is currently certified. Linux/macOS exact-SHA certification and hosted CI evidence are pending; runner quota/billing availability is infrastructure evidence, not a product defect.
|
|
138
|
+
- The package is pure Python. Public release requires retained exact wheel and sdist E2E results for both CLI and MCP, supplied as the mandatory `INSTALLED_CLI_MCP` evidence; unsupported platforms are not certified.
|
|
139
|
+
- CBM managed certification is Windows-focused; Linux/macOS remain an honest degraded path.
|
|
140
|
+
- The ZCode connector is structurally validated, but runtime certification is pending; broader host certification remains visible as external PARTIAL debt. Devin Cloud is unsupported (roadmap).
|
|
141
|
+
- The public release check requires local regression/package evidence plus exact-SHA external evidence:
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
RELEASE_SHA="$(git rev-parse HEAD)"
|
|
145
|
+
python tools/release_check.py --run-regression --run-packaging \
|
|
146
|
+
--evidence exact-release-head-evidence.json \
|
|
147
|
+
--require-sha "$RELEASE_SHA" --require public
|
|
148
|
+
```
|
|
149
|
+
The evidence file must include the retained exact-artifact CLI/MCP results;
|
|
150
|
+
`release_check` does not collect installed E2E proof.
|
|
151
|
+
- PyPI publication is not performed in this checkpoint; local validation uses built artifacts or a source checkout.
|
|
152
|
+
|
|
153
|
+
## License
|
|
154
|
+
|
|
155
|
+
Relinkra is released under the [MIT License](LICENSE).
|
|
156
|
+
|
|
157
|
+
## Learn more
|
|
158
|
+
|
|
159
|
+
- [Installation](docs/installation.md) — install, upgrade, and uninstall.
|
|
160
|
+
- [Connectors](docs/connectors.md) — how agent hosts are connected.
|
|
161
|
+
- [Product CLI](docs/cli.md) — the full command reference.
|
|
162
|
+
- [Freshness, contradictions, and explainability](docs/freshness-explainability.md) — why context was shown and whether it is current.
|
|
163
|
+
- [Release verification](docs/release.md) — CI, verification levels, and release gates (maintainer-facing).
|
|
164
|
+
- [Contributing](CONTRIBUTING.md) — set up a development checkout and run the tests.
|
|
165
|
+
- [Security](SECURITY.md) — supported versions and how to report a vulnerability.
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# Relinkra packaging contract.
|
|
2
|
+
#
|
|
3
|
+
# The version lives in exactly one place: relinkra/__init__.py (__version__).
|
|
4
|
+
# This file reads it dynamically; never duplicate the version string here.
|
|
5
|
+
# tests/test_packaging.py guards that contract.
|
|
6
|
+
|
|
7
|
+
[build-system]
|
|
8
|
+
requires = ["setuptools>=77"]
|
|
9
|
+
build-backend = "setuptools.build_meta"
|
|
10
|
+
|
|
11
|
+
[project]
|
|
12
|
+
name = "relinkra"
|
|
13
|
+
dynamic = ["version"]
|
|
14
|
+
description = "Shared code intelligence, persistent memory and optimized context for AI coding agents."
|
|
15
|
+
readme = "README.md"
|
|
16
|
+
requires-python = ">=3.9"
|
|
17
|
+
authors = [
|
|
18
|
+
{ name = "José Julián Sánchez Rodríguez" },
|
|
19
|
+
]
|
|
20
|
+
# PEP 639 SPDX expression (setuptools >= 77). Per PyPA rules this must not
|
|
21
|
+
# be combined with a deprecated "License ::" classifier.
|
|
22
|
+
license = "MIT"
|
|
23
|
+
classifiers = [
|
|
24
|
+
"Environment :: Console",
|
|
25
|
+
"Intended Audience :: Developers",
|
|
26
|
+
"Operating System :: OS Independent",
|
|
27
|
+
"Programming Language :: Python :: 3",
|
|
28
|
+
"Programming Language :: Python :: 3.9",
|
|
29
|
+
"Programming Language :: Python :: 3.10",
|
|
30
|
+
"Programming Language :: Python :: 3.11",
|
|
31
|
+
"Programming Language :: Python :: 3.12",
|
|
32
|
+
"Programming Language :: Python :: 3.13",
|
|
33
|
+
"Programming Language :: Python :: 3.14",
|
|
34
|
+
"Topic :: Software Development",
|
|
35
|
+
]
|
|
36
|
+
|
|
37
|
+
[project.urls]
|
|
38
|
+
Homepage = "https://github.com/jojusa/relinkra"
|
|
39
|
+
Repository = "https://github.com/jojusa/relinkra"
|
|
40
|
+
Issues = "https://github.com/jojusa/relinkra/issues"
|
|
41
|
+
|
|
42
|
+
# Console entry points. Every target is an existing `main() -> int`;
|
|
43
|
+
# no wrappers, no generated launch logic.
|
|
44
|
+
# relinkra — the user-facing front door (init/status/doctor/project/version/connect)
|
|
45
|
+
# relinkra-mcp — the MCP server endpoint hosts connect to
|
|
46
|
+
# (name pre-agreed in relinkra/connectors.py: CONSOLE_SCRIPT)
|
|
47
|
+
[project.scripts]
|
|
48
|
+
relinkra = "relinkra.product_cli:main"
|
|
49
|
+
relinkra-mcp = "relinkra.mcp_cli:main"
|
|
50
|
+
|
|
51
|
+
[tool.setuptools]
|
|
52
|
+
# Flat layout, declared explicitly: auto-discovery would also see tests/
|
|
53
|
+
# and fail or, worse, silently ship the test suite inside the package.
|
|
54
|
+
packages = ["relinkra"]
|
|
55
|
+
|
|
56
|
+
[tool.setuptools.dynamic]
|
|
57
|
+
version = { attr = "relinkra.__version__" }
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"""Relinkra — portable logical project identity above path-derived CBM identity."""
|
|
2
|
+
|
|
3
|
+
from .identity import (
|
|
4
|
+
AmbiguousIdentityError,
|
|
5
|
+
CASE_INSENSITIVE_HOSTS,
|
|
6
|
+
LogicalProject,
|
|
7
|
+
RepositoryIdentity,
|
|
8
|
+
Workspace,
|
|
9
|
+
canonicalize_path,
|
|
10
|
+
choose_remote,
|
|
11
|
+
derive_project_id,
|
|
12
|
+
derive_workspace_id,
|
|
13
|
+
discover_repository_identity,
|
|
14
|
+
explicit_identity,
|
|
15
|
+
local_root_identity,
|
|
16
|
+
normalize_os_family,
|
|
17
|
+
normalize_remote_url,
|
|
18
|
+
redact_url,
|
|
19
|
+
)
|
|
20
|
+
from .registry import Registry, RegistryError
|
|
21
|
+
from .cbm import CBMBinaryInfo, CBMProjectIdentity, cbm_db_path, workspace_cbm_record
|
|
22
|
+
|
|
23
|
+
__version__ = "0.1.2"
|
|
24
|
+
|
|
25
|
+
__all__ = [
|
|
26
|
+
"AmbiguousIdentityError",
|
|
27
|
+
"CASE_INSENSITIVE_HOSTS",
|
|
28
|
+
"CBMBinaryInfo",
|
|
29
|
+
"CBMProjectIdentity",
|
|
30
|
+
"LogicalProject",
|
|
31
|
+
"Registry",
|
|
32
|
+
"RegistryError",
|
|
33
|
+
"RepositoryIdentity",
|
|
34
|
+
"Workspace",
|
|
35
|
+
"canonicalize_path",
|
|
36
|
+
"cbm_db_path",
|
|
37
|
+
"choose_remote",
|
|
38
|
+
"derive_project_id",
|
|
39
|
+
"derive_workspace_id",
|
|
40
|
+
"discover_repository_identity",
|
|
41
|
+
"explicit_identity",
|
|
42
|
+
"local_root_identity",
|
|
43
|
+
"normalize_os_family",
|
|
44
|
+
"normalize_remote_url",
|
|
45
|
+
"redact_url",
|
|
46
|
+
"workspace_cbm_record",
|
|
47
|
+
]
|