dependencyproof-mcp 0.1.1__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.
- dependencyproof_mcp-0.1.1/LICENSE +21 -0
- dependencyproof_mcp-0.1.1/MANIFEST.in +4 -0
- dependencyproof_mcp-0.1.1/PKG-INFO +215 -0
- dependencyproof_mcp-0.1.1/README.md +197 -0
- dependencyproof_mcp-0.1.1/THIRD_PARTY.md +10 -0
- dependencyproof_mcp-0.1.1/assets/proof-ledger.svg +21 -0
- dependencyproof_mcp-0.1.1/dependencyproof/__init__.py +3 -0
- dependencyproof_mcp-0.1.1/dependencyproof/__main__.py +46 -0
- dependencyproof_mcp-0.1.1/dependencyproof/core.py +713 -0
- dependencyproof_mcp-0.1.1/dependencyproof/server.py +35 -0
- dependencyproof_mcp-0.1.1/dependencyproof_mcp.egg-info/PKG-INFO +215 -0
- dependencyproof_mcp-0.1.1/dependencyproof_mcp.egg-info/SOURCES.txt +23 -0
- dependencyproof_mcp-0.1.1/dependencyproof_mcp.egg-info/dependency_links.txt +1 -0
- dependencyproof_mcp-0.1.1/dependencyproof_mcp.egg-info/entry_points.txt +3 -0
- dependencyproof_mcp-0.1.1/dependencyproof_mcp.egg-info/requires.txt +7 -0
- dependencyproof_mcp-0.1.1/dependencyproof_mcp.egg-info/top_level.txt +1 -0
- dependencyproof_mcp-0.1.1/examples/npm-request.json +15 -0
- dependencyproof_mcp-0.1.1/examples/python-request.json +14 -0
- dependencyproof_mcp-0.1.1/pyproject.toml +36 -0
- dependencyproof_mcp-0.1.1/server.json +23 -0
- dependencyproof_mcp-0.1.1/setup.cfg +4 -0
- dependencyproof_mcp-0.1.1/tests/test_cli.py +37 -0
- dependencyproof_mcp-0.1.1/tests/test_core.py +229 -0
- dependencyproof_mcp-0.1.1/tests/test_properties.py +24 -0
- dependencyproof_mcp-0.1.1/tests/test_protocol.py +41 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Ahmed Saeed
|
|
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.
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: dependencyproof-mcp
|
|
3
|
+
Version: 0.1.1
|
|
4
|
+
Summary: Offline verification of explicit dependency, import and configuration claims.
|
|
5
|
+
Author: Ahmed Saeed
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Repository, https://github.com/ahmedsaeed1-eng/dependencyproof-mcp
|
|
8
|
+
Requires-Python: >=3.11
|
|
9
|
+
Description-Content-Type: text/markdown
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Requires-Dist: mcp==1.29.0
|
|
12
|
+
Requires-Dist: packaging<27,>=24
|
|
13
|
+
Provides-Extra: test
|
|
14
|
+
Requires-Dist: hypothesis<7,>=6; extra == "test"
|
|
15
|
+
Requires-Dist: ruff==0.17.6; extra == "test"
|
|
16
|
+
Requires-Dist: black==26.10.1; extra == "test"
|
|
17
|
+
Dynamic: license-file
|
|
18
|
+
|
|
19
|
+
# DependencyProof MCP
|
|
20
|
+
|
|
21
|
+
<!-- mcp-name: io.github.ahmedsaeed1-eng/dependencyproof-mcp -->
|
|
22
|
+
|
|
23
|
+

|
|
24
|
+
|
|
25
|
+
**Do not install a package or trust a configuration just because an assistant suggested it. Verify the evidence first.**
|
|
26
|
+
|
|
27
|
+
[](pyproject.toml)
|
|
28
|
+
[](tests/)
|
|
29
|
+
[](https://github.com/ahmedsaeed1-eng/dependencyproof-mcp/actions/workflows/ci.yml)
|
|
30
|
+
[](https://github.com/ahmedsaeed1-eng/dependencyproof-mcp/stargazers)
|
|
31
|
+
|
|
32
|
+
[](pyproject.toml)
|
|
33
|
+
[](https://modelcontextprotocol.io/)
|
|
34
|
+
[](#evidence-boundary)
|
|
35
|
+
[](LICENSE)
|
|
36
|
+
|
|
37
|
+
DependencyProof is a local evidence checker for coding agents and human reviewers. It compares explicit dependency declarations, imports, version observations and configuration claims. It is not a registry client. A missing record in a caller-provided version list never proves that a version does not exist.
|
|
38
|
+
|
|
39
|
+
The focus is motivated by developer feedback on generated code and dependency/configuration errors in the [2026 Stack Overflow Developer Survey — technology disruption data](https://survey.stackoverflow.co/2026/technology/data/disruption). This independent project does not claim to solve every hallucination or verify live package/API availability.
|
|
40
|
+
|
|
41
|
+
## Evidence ledger
|
|
42
|
+
|
|
43
|
+
| Verdict | Meaning |
|
|
44
|
+
|:--|:--|
|
|
45
|
+
| **supported** | The claim matches the explicit supplied declaration or observed metadata. This is not live verification. |
|
|
46
|
+
| **contradicted** | The supplied evidence has a definite declaration/value mismatch, or a supported version predicate fails. |
|
|
47
|
+
| **unknown** | Evidence or parser coverage is insufficient; do not invent an answer. |
|
|
48
|
+
| **warning** | Review a possible conflict; deployment or dependency context may affect it. |
|
|
49
|
+
|
|
50
|
+
The example npm review uses invented package names and illustrative metadata, not real registry records.
|
|
51
|
+
|
|
52
|
+
| Claim | Supplied evidence | Result |
|
|
53
|
+
|:--|:--|:--|
|
|
54
|
+
| example-ui at 1.2.0 | exact declaration and listed version | supported |
|
|
55
|
+
| example-ui at 1.3.0 | declared 1.2.0, metadata lists 1.3.0 | contradicted |
|
|
56
|
+
| example-router at 3.1.0 | declared ^3.0.0; no npm range parser | unknown |
|
|
57
|
+
| scripts.build exists | absent from supplied package.json | contradicted |
|
|
58
|
+
|
|
59
|
+
See [npm example input](examples/npm-request.json) and [Python example input](examples/python-request.json).
|
|
60
|
+
|
|
61
|
+
## Install and connect
|
|
62
|
+
|
|
63
|
+
Python 3.11 or newer is required for the standard-library TOML parser.
|
|
64
|
+
|
|
65
|
+
```sh
|
|
66
|
+
git clone https://github.com/ahmedsaeed1-eng/dependencyproof-mcp.git
|
|
67
|
+
cd dependencyproof-mcp
|
|
68
|
+
python -m pip install .
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Installation uses the package manager; the MCP server itself never installs anything, invokes external commands or accesses a network.
|
|
72
|
+
|
|
73
|
+
### Codex
|
|
74
|
+
|
|
75
|
+
```sh
|
|
76
|
+
codex mcp add dependencyproof -- dependencyproof-mcp
|
|
77
|
+
codex mcp list
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
If the entry point is not on PATH, use the absolute path of the Python interpreter in the environment containing this project:
|
|
81
|
+
|
|
82
|
+
```toml
|
|
83
|
+
[mcp_servers.dependencyproof]
|
|
84
|
+
command = "/absolute/path/to/python"
|
|
85
|
+
args = ["-m", "dependencyproof.server"]
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Claude Desktop
|
|
89
|
+
|
|
90
|
+
```json
|
|
91
|
+
{
|
|
92
|
+
"mcpServers": {
|
|
93
|
+
"dependencyproof": {
|
|
94
|
+
"command": "/absolute/path/to/python",
|
|
95
|
+
"args": ["-m", "dependencyproof.server"]
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
These are configuration examples; check the host's current MCP settings. The included protocol test uses the official MCP client, not a live Codex or Claude host.
|
|
102
|
+
|
|
103
|
+
### Standalone CLI
|
|
104
|
+
|
|
105
|
+
```sh
|
|
106
|
+
dependencyproof < examples/npm-request.json
|
|
107
|
+
dependencyproof --fail-on-contradiction < examples/python-request.json
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
From the checkout with dependencies installed, use `python -m dependencyproof` as an alternative. The CLI accepts explicit request JSON on stdin and returns a JSON report on stdout. Exit codes: 0 (report produced), 1 (contradicted evidence, when the flag is enabled), 2 (invalid request). Unknowns are not counted as verified.
|
|
111
|
+
|
|
112
|
+
## MCP tool: verify_dependencies
|
|
113
|
+
|
|
114
|
+
| Argument | Purpose |
|
|
115
|
+
|:--|:--|
|
|
116
|
+
| format | package.json, requirements.txt, or pyproject.toml |
|
|
117
|
+
| manifest | Complete manifest text in the chosen format |
|
|
118
|
+
| imports | Python source/import statements or simple standalone JavaScript static statements; optional |
|
|
119
|
+
| metadata | Caller-provided package information; optional |
|
|
120
|
+
| claims | Explicit assertions to compare against supplied data; optional |
|
|
121
|
+
| local_modules | Explicit local/workspace module names that should not be treated as external dependencies; optional |
|
|
122
|
+
|
|
123
|
+
### Claim and metadata examples
|
|
124
|
+
|
|
125
|
+
```json
|
|
126
|
+
{
|
|
127
|
+
"format":"requirements.txt",
|
|
128
|
+
"manifest":"Pillow==10.4.0",
|
|
129
|
+
"imports":"import PIL",
|
|
130
|
+
"metadata":[
|
|
131
|
+
{
|
|
132
|
+
"name":"Pillow",
|
|
133
|
+
"versions":["10.4.0"],
|
|
134
|
+
"import_names":["PIL"],
|
|
135
|
+
"provenance":"caller-supplied metadata"
|
|
136
|
+
}
|
|
137
|
+
],
|
|
138
|
+
"claims":[
|
|
139
|
+
{"kind":"dependency","name":"Pillow","version":"10.4.0"}
|
|
140
|
+
]
|
|
141
|
+
}
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
The manifest declares a distribution named Pillow, whereas the import is PIL. Python imports are not assumed to share their distribution names. Only a supplied mapping can connect the two; otherwise the import is unresolved. Names are classified against the Python runtime's standard-library names or explicitly supplied local module labels.
|
|
145
|
+
|
|
146
|
+
A dependency claim may add:
|
|
147
|
+
|
|
148
|
+
- `section`: exact manifest section or declaration group name.
|
|
149
|
+
- `constraint`: expected declaration string. Python specifiers are represented using PyPA's parsed specifier string; npm constraints remain verbatim. This check is string equality, not mathematical range equivalence.
|
|
150
|
+
- `version`: requested version. Status is supported only when that exact version appears in caller metadata and the supported constraint check passes. Contradiction comes from the manifest predicate, never absence from nonexhaustive metadata. Multiple mandatory Python constraints are checked conjunctively. Conditional requirements and direct references remain unresolved.
|
|
151
|
+
|
|
152
|
+
A config claim uses a path of object/table keys and optionally an expected JSON value:
|
|
153
|
+
|
|
154
|
+
```json
|
|
155
|
+
{"kind":"config","path":["scripts","test"],"expected":"node --test"}
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
This checks key/value presence in the supplied manifest. It cannot determine whether a particular framework actually recognizes or supports that key.
|
|
159
|
+
|
|
160
|
+
### Coverage by ecosystem
|
|
161
|
+
|
|
162
|
+
| Check | npm | Python |
|
|
163
|
+
|:--|:--|:--|
|
|
164
|
+
| Declared dependencies | dependencies, devDependencies, peerDependencies, optionalDependencies | PEP 508 requirements and PEP 621 project dependencies/optional groups |
|
|
165
|
+
| Imports | standalone static import, export-from, simple require assignment | built-in AST, including relative imports |
|
|
166
|
+
| Versions | plain stable exact numeric versions only | PEP 440 parsed predicates using packaging |
|
|
167
|
+
| Conflicts | warning for multiple distinct exact declarations | contradiction for distinct unconditional nonoptional exact pins |
|
|
168
|
+
| Config values | package.json | pyproject.toml |
|
|
169
|
+
|
|
170
|
+
Not supported: JavaScript multiline/dynamic import syntax, project resolution aliases unless supplied, npm version range intersection, workspace resolution, resolved lockfiles, Python installer flags/includes, dynamic dependency declarations, optional group selection, registry existence, dependency graph or API symbol compatibility.
|
|
171
|
+
|
|
172
|
+
The report gives declaration records, per-import status, claim detail, provenance labels, observations with source locations and recommended next actions. Manifest locations identify logical JSON/TOML keys, while requirements/import locations include line numbers; no source file is opened.
|
|
173
|
+
|
|
174
|
+
## Agent workflow
|
|
175
|
+
|
|
176
|
+
Paste this into project-specific instructions to encourage evidence-based changes:
|
|
177
|
+
|
|
178
|
+
```text
|
|
179
|
+
Before adding or changing a dependency or configuration:
|
|
180
|
+
1. Provide the relevant manifest text and proposed import/claim to DependencyProof.
|
|
181
|
+
2. For Python imports, provide a verified import-to-distribution mapping.
|
|
182
|
+
3. For version claims, provide trusted metadata separately and identify its provenance.
|
|
183
|
+
4. Investigate contradicted and unknown results. Do not invent a package,
|
|
184
|
+
version, or API example to resolve them.
|
|
185
|
+
5. If necessary, consult official documentation through the normal authorized
|
|
186
|
+
workflow and run the project's existing tests. DependencyProof itself never
|
|
187
|
+
installs dependencies, modifies files, or executes tests.
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
## Evidence boundary
|
|
191
|
+
|
|
192
|
+
- Inputs are explicit text. No implicit repository traversal, filesystem reads, registry access, telemetry, credentials, mutation or external command execution.
|
|
193
|
+
- Text limit: 256 KiB and 10,000 LF characters per source; 300 records per list; up to 300 findings. Auxiliary evidence is limited by a 1 MiB serialized size check. The CLI request itself is limited to 256 KiB.
|
|
194
|
+
- Caller metadata is not independently verified. Presence is not proof that a package exists in a registry or that a declared dependency is installed.
|
|
195
|
+
- A declaration can be conditional, optional or supplied in distinct contexts; a missing declaration in supplied text is not proof that software cannot run.
|
|
196
|
+
- PEP 508 markers are not evaluated, and direct references are not followed. Python standard-library classification uses the running Python version's module names, not an arbitrary target runtime. Node builtin classification uses a fixed name list and does not verify target-version availability.
|
|
197
|
+
- No security or vulnerability assessment. Do not supply credential-bearing URLs or confidential manifest values.
|
|
198
|
+
|
|
199
|
+
## Reproduce the tests
|
|
200
|
+
|
|
201
|
+
```sh
|
|
202
|
+
python -m pip install ".[test]"
|
|
203
|
+
ruff check dependencyproof tests
|
|
204
|
+
black --check dependencyproof tests
|
|
205
|
+
python -m unittest discover -s tests -v
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
Local tests cover malformed/duplicate JSON, PEP 440 version evidence, name normalization, ambiguous Python mapping, missing declarations, incomplete installer configurations, nested config value mismatch, exact npm versions, unknown ranges and prereleases, CLI behavior, and a real official MCP stdio client session. 19 local tests (including 75 generated property examples), Ruff and Black passed on Linux/Python 3.12. CI is configured for Python 3.11/3.12 on Linux, macOS and Windows, but passing results on those hosts must be established by the workflow itself.
|
|
209
|
+
|
|
210
|
+
MIT license. See [LICENSE](LICENSE) and [THIRD_PARTY.md](THIRD_PARTY.md).
|
|
211
|
+
|
|
212
|
+
### Distribution
|
|
213
|
+
|
|
214
|
+
A release workflow is prepared for future PyPI Trusted Publishing and requires explicit dispatch with publishing enabled plus configured publisher authorization. The package is not yet published; use the source installation above.
|
|
215
|
+
The included MCP server metadata prepares its registry entry, not a claim that it is already listed.
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
# DependencyProof MCP
|
|
2
|
+
|
|
3
|
+
<!-- mcp-name: io.github.ahmedsaeed1-eng/dependencyproof-mcp -->
|
|
4
|
+
|
|
5
|
+

|
|
6
|
+
|
|
7
|
+
**Do not install a package or trust a configuration just because an assistant suggested it. Verify the evidence first.**
|
|
8
|
+
|
|
9
|
+
[](pyproject.toml)
|
|
10
|
+
[](tests/)
|
|
11
|
+
[](https://github.com/ahmedsaeed1-eng/dependencyproof-mcp/actions/workflows/ci.yml)
|
|
12
|
+
[](https://github.com/ahmedsaeed1-eng/dependencyproof-mcp/stargazers)
|
|
13
|
+
|
|
14
|
+
[](pyproject.toml)
|
|
15
|
+
[](https://modelcontextprotocol.io/)
|
|
16
|
+
[](#evidence-boundary)
|
|
17
|
+
[](LICENSE)
|
|
18
|
+
|
|
19
|
+
DependencyProof is a local evidence checker for coding agents and human reviewers. It compares explicit dependency declarations, imports, version observations and configuration claims. It is not a registry client. A missing record in a caller-provided version list never proves that a version does not exist.
|
|
20
|
+
|
|
21
|
+
The focus is motivated by developer feedback on generated code and dependency/configuration errors in the [2026 Stack Overflow Developer Survey — technology disruption data](https://survey.stackoverflow.co/2026/technology/data/disruption). This independent project does not claim to solve every hallucination or verify live package/API availability.
|
|
22
|
+
|
|
23
|
+
## Evidence ledger
|
|
24
|
+
|
|
25
|
+
| Verdict | Meaning |
|
|
26
|
+
|:--|:--|
|
|
27
|
+
| **supported** | The claim matches the explicit supplied declaration or observed metadata. This is not live verification. |
|
|
28
|
+
| **contradicted** | The supplied evidence has a definite declaration/value mismatch, or a supported version predicate fails. |
|
|
29
|
+
| **unknown** | Evidence or parser coverage is insufficient; do not invent an answer. |
|
|
30
|
+
| **warning** | Review a possible conflict; deployment or dependency context may affect it. |
|
|
31
|
+
|
|
32
|
+
The example npm review uses invented package names and illustrative metadata, not real registry records.
|
|
33
|
+
|
|
34
|
+
| Claim | Supplied evidence | Result |
|
|
35
|
+
|:--|:--|:--|
|
|
36
|
+
| example-ui at 1.2.0 | exact declaration and listed version | supported |
|
|
37
|
+
| example-ui at 1.3.0 | declared 1.2.0, metadata lists 1.3.0 | contradicted |
|
|
38
|
+
| example-router at 3.1.0 | declared ^3.0.0; no npm range parser | unknown |
|
|
39
|
+
| scripts.build exists | absent from supplied package.json | contradicted |
|
|
40
|
+
|
|
41
|
+
See [npm example input](examples/npm-request.json) and [Python example input](examples/python-request.json).
|
|
42
|
+
|
|
43
|
+
## Install and connect
|
|
44
|
+
|
|
45
|
+
Python 3.11 or newer is required for the standard-library TOML parser.
|
|
46
|
+
|
|
47
|
+
```sh
|
|
48
|
+
git clone https://github.com/ahmedsaeed1-eng/dependencyproof-mcp.git
|
|
49
|
+
cd dependencyproof-mcp
|
|
50
|
+
python -m pip install .
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Installation uses the package manager; the MCP server itself never installs anything, invokes external commands or accesses a network.
|
|
54
|
+
|
|
55
|
+
### Codex
|
|
56
|
+
|
|
57
|
+
```sh
|
|
58
|
+
codex mcp add dependencyproof -- dependencyproof-mcp
|
|
59
|
+
codex mcp list
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
If the entry point is not on PATH, use the absolute path of the Python interpreter in the environment containing this project:
|
|
63
|
+
|
|
64
|
+
```toml
|
|
65
|
+
[mcp_servers.dependencyproof]
|
|
66
|
+
command = "/absolute/path/to/python"
|
|
67
|
+
args = ["-m", "dependencyproof.server"]
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### Claude Desktop
|
|
71
|
+
|
|
72
|
+
```json
|
|
73
|
+
{
|
|
74
|
+
"mcpServers": {
|
|
75
|
+
"dependencyproof": {
|
|
76
|
+
"command": "/absolute/path/to/python",
|
|
77
|
+
"args": ["-m", "dependencyproof.server"]
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
These are configuration examples; check the host's current MCP settings. The included protocol test uses the official MCP client, not a live Codex or Claude host.
|
|
84
|
+
|
|
85
|
+
### Standalone CLI
|
|
86
|
+
|
|
87
|
+
```sh
|
|
88
|
+
dependencyproof < examples/npm-request.json
|
|
89
|
+
dependencyproof --fail-on-contradiction < examples/python-request.json
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
From the checkout with dependencies installed, use `python -m dependencyproof` as an alternative. The CLI accepts explicit request JSON on stdin and returns a JSON report on stdout. Exit codes: 0 (report produced), 1 (contradicted evidence, when the flag is enabled), 2 (invalid request). Unknowns are not counted as verified.
|
|
93
|
+
|
|
94
|
+
## MCP tool: verify_dependencies
|
|
95
|
+
|
|
96
|
+
| Argument | Purpose |
|
|
97
|
+
|:--|:--|
|
|
98
|
+
| format | package.json, requirements.txt, or pyproject.toml |
|
|
99
|
+
| manifest | Complete manifest text in the chosen format |
|
|
100
|
+
| imports | Python source/import statements or simple standalone JavaScript static statements; optional |
|
|
101
|
+
| metadata | Caller-provided package information; optional |
|
|
102
|
+
| claims | Explicit assertions to compare against supplied data; optional |
|
|
103
|
+
| local_modules | Explicit local/workspace module names that should not be treated as external dependencies; optional |
|
|
104
|
+
|
|
105
|
+
### Claim and metadata examples
|
|
106
|
+
|
|
107
|
+
```json
|
|
108
|
+
{
|
|
109
|
+
"format":"requirements.txt",
|
|
110
|
+
"manifest":"Pillow==10.4.0",
|
|
111
|
+
"imports":"import PIL",
|
|
112
|
+
"metadata":[
|
|
113
|
+
{
|
|
114
|
+
"name":"Pillow",
|
|
115
|
+
"versions":["10.4.0"],
|
|
116
|
+
"import_names":["PIL"],
|
|
117
|
+
"provenance":"caller-supplied metadata"
|
|
118
|
+
}
|
|
119
|
+
],
|
|
120
|
+
"claims":[
|
|
121
|
+
{"kind":"dependency","name":"Pillow","version":"10.4.0"}
|
|
122
|
+
]
|
|
123
|
+
}
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
The manifest declares a distribution named Pillow, whereas the import is PIL. Python imports are not assumed to share their distribution names. Only a supplied mapping can connect the two; otherwise the import is unresolved. Names are classified against the Python runtime's standard-library names or explicitly supplied local module labels.
|
|
127
|
+
|
|
128
|
+
A dependency claim may add:
|
|
129
|
+
|
|
130
|
+
- `section`: exact manifest section or declaration group name.
|
|
131
|
+
- `constraint`: expected declaration string. Python specifiers are represented using PyPA's parsed specifier string; npm constraints remain verbatim. This check is string equality, not mathematical range equivalence.
|
|
132
|
+
- `version`: requested version. Status is supported only when that exact version appears in caller metadata and the supported constraint check passes. Contradiction comes from the manifest predicate, never absence from nonexhaustive metadata. Multiple mandatory Python constraints are checked conjunctively. Conditional requirements and direct references remain unresolved.
|
|
133
|
+
|
|
134
|
+
A config claim uses a path of object/table keys and optionally an expected JSON value:
|
|
135
|
+
|
|
136
|
+
```json
|
|
137
|
+
{"kind":"config","path":["scripts","test"],"expected":"node --test"}
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
This checks key/value presence in the supplied manifest. It cannot determine whether a particular framework actually recognizes or supports that key.
|
|
141
|
+
|
|
142
|
+
### Coverage by ecosystem
|
|
143
|
+
|
|
144
|
+
| Check | npm | Python |
|
|
145
|
+
|:--|:--|:--|
|
|
146
|
+
| Declared dependencies | dependencies, devDependencies, peerDependencies, optionalDependencies | PEP 508 requirements and PEP 621 project dependencies/optional groups |
|
|
147
|
+
| Imports | standalone static import, export-from, simple require assignment | built-in AST, including relative imports |
|
|
148
|
+
| Versions | plain stable exact numeric versions only | PEP 440 parsed predicates using packaging |
|
|
149
|
+
| Conflicts | warning for multiple distinct exact declarations | contradiction for distinct unconditional nonoptional exact pins |
|
|
150
|
+
| Config values | package.json | pyproject.toml |
|
|
151
|
+
|
|
152
|
+
Not supported: JavaScript multiline/dynamic import syntax, project resolution aliases unless supplied, npm version range intersection, workspace resolution, resolved lockfiles, Python installer flags/includes, dynamic dependency declarations, optional group selection, registry existence, dependency graph or API symbol compatibility.
|
|
153
|
+
|
|
154
|
+
The report gives declaration records, per-import status, claim detail, provenance labels, observations with source locations and recommended next actions. Manifest locations identify logical JSON/TOML keys, while requirements/import locations include line numbers; no source file is opened.
|
|
155
|
+
|
|
156
|
+
## Agent workflow
|
|
157
|
+
|
|
158
|
+
Paste this into project-specific instructions to encourage evidence-based changes:
|
|
159
|
+
|
|
160
|
+
```text
|
|
161
|
+
Before adding or changing a dependency or configuration:
|
|
162
|
+
1. Provide the relevant manifest text and proposed import/claim to DependencyProof.
|
|
163
|
+
2. For Python imports, provide a verified import-to-distribution mapping.
|
|
164
|
+
3. For version claims, provide trusted metadata separately and identify its provenance.
|
|
165
|
+
4. Investigate contradicted and unknown results. Do not invent a package,
|
|
166
|
+
version, or API example to resolve them.
|
|
167
|
+
5. If necessary, consult official documentation through the normal authorized
|
|
168
|
+
workflow and run the project's existing tests. DependencyProof itself never
|
|
169
|
+
installs dependencies, modifies files, or executes tests.
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
## Evidence boundary
|
|
173
|
+
|
|
174
|
+
- Inputs are explicit text. No implicit repository traversal, filesystem reads, registry access, telemetry, credentials, mutation or external command execution.
|
|
175
|
+
- Text limit: 256 KiB and 10,000 LF characters per source; 300 records per list; up to 300 findings. Auxiliary evidence is limited by a 1 MiB serialized size check. The CLI request itself is limited to 256 KiB.
|
|
176
|
+
- Caller metadata is not independently verified. Presence is not proof that a package exists in a registry or that a declared dependency is installed.
|
|
177
|
+
- A declaration can be conditional, optional or supplied in distinct contexts; a missing declaration in supplied text is not proof that software cannot run.
|
|
178
|
+
- PEP 508 markers are not evaluated, and direct references are not followed. Python standard-library classification uses the running Python version's module names, not an arbitrary target runtime. Node builtin classification uses a fixed name list and does not verify target-version availability.
|
|
179
|
+
- No security or vulnerability assessment. Do not supply credential-bearing URLs or confidential manifest values.
|
|
180
|
+
|
|
181
|
+
## Reproduce the tests
|
|
182
|
+
|
|
183
|
+
```sh
|
|
184
|
+
python -m pip install ".[test]"
|
|
185
|
+
ruff check dependencyproof tests
|
|
186
|
+
black --check dependencyproof tests
|
|
187
|
+
python -m unittest discover -s tests -v
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
Local tests cover malformed/duplicate JSON, PEP 440 version evidence, name normalization, ambiguous Python mapping, missing declarations, incomplete installer configurations, nested config value mismatch, exact npm versions, unknown ranges and prereleases, CLI behavior, and a real official MCP stdio client session. 19 local tests (including 75 generated property examples), Ruff and Black passed on Linux/Python 3.12. CI is configured for Python 3.11/3.12 on Linux, macOS and Windows, but passing results on those hosts must be established by the workflow itself.
|
|
191
|
+
|
|
192
|
+
MIT license. See [LICENSE](LICENSE) and [THIRD_PARTY.md](THIRD_PARTY.md).
|
|
193
|
+
|
|
194
|
+
### Distribution
|
|
195
|
+
|
|
196
|
+
A release workflow is prepared for future PyPI Trusted Publishing and requires explicit dispatch with publishing enabled plus configured publisher authorization. The package is not yet published; use the source installation above.
|
|
197
|
+
The included MCP server metadata prepares its registry entry, not a claim that it is already listed.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Credits and dependencies
|
|
2
|
+
|
|
3
|
+
DependencyProof code, examples and visual identity are original. Runtime dependencies:
|
|
4
|
+
|
|
5
|
+
- [Model Context Protocol Python SDK](https://github.com/modelcontextprotocol/python-sdk), MIT, 1.29.0.
|
|
6
|
+
- [PyPA packaging](https://github.com/pypa/packaging), Apache-2.0 or BSD-2-Clause, version range 24.x–26.x; used for PEP 508 and PEP 440 parsing.
|
|
7
|
+
|
|
8
|
+
They are installed separately and retain their own notices. No upstream implementation or survey text is copied.
|
|
9
|
+
|
|
10
|
+
Problem-selection context: [Stack Overflow Developer Survey 2026 — technology disruption data](https://survey.stackoverflow.co/2026/technology/data/disruption). The survey informed the focus on unverified dependencies and configurations; it does not endorse this project. Documentation badges are external image resources; the runtime does not fetch them.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="920" height="315" viewBox="0 0 920 315" role="img" aria-labelledby="title description">
|
|
2
|
+
<title id="title">DependencyProof</title><desc id="description">An evidence ledger maps a dependency claim to supported, contradicted, or unknown, using only provided evidence.</desc>
|
|
3
|
+
<rect width="920" height="315" rx="12" fill="#eef3ee"/>
|
|
4
|
+
<rect x="0" y="0" width="920" height="80" rx="12" fill="#244f48"/><rect x="0" y="60" width="920" height="20" fill="#244f48"/>
|
|
5
|
+
<g font-family="Arial,sans-serif">
|
|
6
|
+
<g transform="translate(29 19)"><rect width="42" height="42" rx="8" fill="#deedd6"/><path d="M10 12h22M10 21h15M10 30h7m7-4 5 5 8-10" stroke="#244f48" stroke-width="2.3" fill="none" stroke-linecap="round" stroke-linejoin="round"/></g>
|
|
7
|
+
<text x="88" y="43" font-size="29" font-weight="bold" fill="#f5fff5">DependencyProof</text>
|
|
8
|
+
<text x="88" y="61" font-size="12" fill="#c7dfc9">DECLARATIONS / IMPORTS / VERSION EVIDENCE</text>
|
|
9
|
+
<text x="889" y="43" font-size="13" text-anchor="end" fill="#c7dfc9" letter-spacing="2">LOCAL MCP</text>
|
|
10
|
+
<g fill="#324d45"><text x="30" y="112" font-weight="bold" font-size="13" letter-spacing="2">EVIDENCE LEDGER</text><text x="889" y="112" text-anchor="end" font-size="12">ILLUSTRATIVE RECORDS</text></g>
|
|
11
|
+
<rect x="30" y="127" width="860" height="136" rx="6" fill="#fff" stroke="#c6d7cb"/>
|
|
12
|
+
<path d="M30 161h860m-860 34h860m-860 34h860M325 127v136M646 127v136" stroke="#d8e3db"/>
|
|
13
|
+
<g fill="#526960" font-size="12" font-weight="bold"><text x="47" y="149">CLAIM</text><text x="342" y="149">SUPPLIED EVIDENCE</text><text x="664" y="149">VERDICT</text></g>
|
|
14
|
+
<g fill="#29473e" font-size="15"><text x="47" y="183">example-ui @ 1.2.0</text><text x="342" y="183">Exact pin, version listed</text>
|
|
15
|
+
<text x="47" y="217">example-ui @ 1.3.0</text><text x="342" y="217">Exact pin is 1.2.0</text>
|
|
16
|
+
<text x="47" y="251">example-router @ 3.1.0</text><text x="342" y="251">Range needs parser</text></g>
|
|
17
|
+
<rect x="664" y="167" width="118" height="22" rx="11" fill="#c9e6cb"/><text x="723" y="182" font-size="12" text-anchor="middle" font-weight="bold" fill="#245a38">SUPPORTED</text>
|
|
18
|
+
<rect x="664" y="201" width="137" height="22" rx="11" fill="#f5dbd3"/><text x="732" y="216" font-size="12" text-anchor="middle" font-weight="bold" fill="#8b4236">CONTRADICTED</text>
|
|
19
|
+
<rect x="664" y="235" width="105" height="22" rx="11" fill="#f4e7c3"/><text x="716" y="250" font-size="12" text-anchor="middle" font-weight="bold" fill="#745a21">UNKNOWN</text>
|
|
20
|
+
<text x="30" y="291" font-size="13" fill="#526960">Verify supplied evidence. Do not invent missing evidence.</text><text x="889" y="291" font-size="12" text-anchor="end" fill="#526960">v0.1.1</text>
|
|
21
|
+
</g></svg>
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"""Read a single structured review request from stdin; no implicit file access."""
|
|
2
|
+
|
|
3
|
+
import argparse
|
|
4
|
+
import json
|
|
5
|
+
import sys
|
|
6
|
+
from .core import review, InputError, strict_json, MAX_BYTES
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
def main():
|
|
10
|
+
parser = argparse.ArgumentParser(
|
|
11
|
+
description="DependencyProof: verify explicit offline dependency evidence from JSON stdin."
|
|
12
|
+
)
|
|
13
|
+
parser.add_argument(
|
|
14
|
+
"--fail-on-contradiction",
|
|
15
|
+
action="store_true",
|
|
16
|
+
help="Exit 1 when supplied claims or observations contradict evidence.",
|
|
17
|
+
)
|
|
18
|
+
args = parser.parse_args()
|
|
19
|
+
try:
|
|
20
|
+
raw = sys.stdin.buffer.read(MAX_BYTES + 1)
|
|
21
|
+
if len(raw) > MAX_BYTES:
|
|
22
|
+
raise InputError("CLI request exceeds 256 KiB")
|
|
23
|
+
request = strict_json(raw.decode("utf-8"))
|
|
24
|
+
if (
|
|
25
|
+
not isinstance(request, dict)
|
|
26
|
+
or not {"manifest", "format"} <= request.keys()
|
|
27
|
+
or set(request)
|
|
28
|
+
- {"manifest", "format", "imports", "metadata", "claims", "local_modules"}
|
|
29
|
+
):
|
|
30
|
+
raise InputError("Invalid review request keys")
|
|
31
|
+
result = review(**request)
|
|
32
|
+
print(json.dumps(result, indent=2, ensure_ascii=True))
|
|
33
|
+
return int(
|
|
34
|
+
args.fail_on_contradiction
|
|
35
|
+
and any(
|
|
36
|
+
f["status"] == "contradicted"
|
|
37
|
+
for f in result["claims"] + result["findings"]
|
|
38
|
+
)
|
|
39
|
+
)
|
|
40
|
+
except (InputError, UnicodeError) as e:
|
|
41
|
+
print(json.dumps({"error": str(e)}, ensure_ascii=True), file=sys.stderr)
|
|
42
|
+
return 2
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
if __name__ == "__main__":
|
|
46
|
+
raise SystemExit(main())
|