modelcertify 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -0,0 +1,147 @@
1
+ Metadata-Version: 2.4
2
+ Name: modelcertify
3
+ Version: 0.1.0
4
+ Summary: Supply-chain certification for trained models
5
+ License: Apache-2.0
6
+ Classifier: Development Status :: 3 - Alpha
7
+ Classifier: Intended Audience :: Developers
8
+ Classifier: License :: OSI Approved :: Apache Software License
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: Programming Language :: Python :: 3.10
11
+ Classifier: Programming Language :: Python :: 3.11
12
+ Classifier: Programming Language :: Python :: 3.12
13
+ Classifier: Programming Language :: Python :: 3.13
14
+ Classifier: Programming Language :: Python :: 3.14
15
+ Classifier: Programming Language :: Python :: 3.15
16
+ Requires-Python: >=3.10
17
+ Description-Content-Type: text/markdown
18
+ License-File: LICENSE
19
+ Provides-Extra: dev
20
+ Requires-Dist: pytest>=8.0; extra == "dev"
21
+ Requires-Dist: pytest-asyncio>=0.23; extra == "dev"
22
+ Requires-Dist: ruff>=0.5; extra == "dev"
23
+ Requires-Dist: mypy>=1.10; extra == "dev"
24
+ Dynamic: license-file
25
+
26
+ # modelcertify
27
+
28
+ Supply-chain certification for trained models.
29
+
30
+ A model is only as trustworthy as the run that produced it. modelcertify
31
+ makes that run auditable and certifies it against a written policy.
32
+
33
+ * A **run proof** hashes every artefact the run produced (config, metrics,
34
+ checkpoints, weights) and combines the hashes into a Merkle **root**. Change
35
+ one byte of one artefact and the root changes.
36
+ * An **attestation** is a signed statement by an issuer that they vouch for a
37
+ proof root.
38
+ * A **certificate** is a policy evaluated against a run's evidence: it
39
+ records every gate, how each one came out, the proof root it is bound to,
40
+ and the issuer who signed it.
41
+
42
+ The certificate never overstates. It carries the gate results, so a reader can
43
+ see *why* something was certified, not just that it was.
44
+
45
+ ## Install
46
+
47
+ ```bash
48
+ pip install modelcertify
49
+ pip install -e ".[dev]" # from a checkout
50
+ ```
51
+
52
+ modelcertify has **no runtime dependencies**: it is stdlib-only on purpose, so
53
+ it can be dropped into an air-gapped review environment.
54
+
55
+ ## Relationship to iroh-tinker
56
+
57
+ modelcertify is a standalone product. It does not import iroh-tinker, and it
58
+ does not need to: it certifies a run's *artefacts*, wherever they were
59
+ produced.
60
+
61
+ The natural pairing is that an iroh-tinker run writes its artefacts (the
62
+ launch spec, the metrics, the checkpoints) to a directory, and
63
+ `modelcertify proof --dir <that directory>` turns them into a proof.
64
+
65
+ ## CLI
66
+
67
+ ```bash
68
+ modelcertify proof --run-id run-1 --dir ./artifacts --out proof.json
69
+ modelcertify policy --file policy.json --json
70
+ modelcertify certify --evidence evidence.json --policy policy.json \
71
+ --issuer scai --key "$MODELCERTIFY_KEY" --out certificate.json
72
+ modelcertify verify --certificate certificate.json --key "$MODELCERTIFY_KEY"
73
+ ```
74
+
75
+ Every command accepts `--json`.
76
+
77
+ Exit codes: `0` success, `1` the run was not certified (or the certificate did
78
+ not verify), `2` a usage or input error.
79
+
80
+ The signing key is hex. Pass it with `--key` or set `MODELCERTIFY_KEY`.
81
+
82
+ ## Evidence and policies
83
+
84
+ An **evidence** document is what a policy is allowed to look at:
85
+
86
+ ```json
87
+ {
88
+ "proof": {"run_id": "run-1", "artifacts": [{"name": "model.safetensors", "digest": "..."}]},
89
+ "metrics": {"eval_loss": 0.21, "eval_accuracy": 0.94},
90
+ "provenance": {"dataset_id": "ds-1", "licence": "cc-by-4.0"}
91
+ }
92
+ ```
93
+
94
+ A **policy** is a set of gates over that evidence:
95
+
96
+ ```json
97
+ {
98
+ "policy_id": "baseline",
99
+ "name": "Baseline release policy",
100
+ "required_artifacts": ["config.json", "model.safetensors"],
101
+ "gates": [
102
+ {"name": "loss", "kind": "metric", "field": "eval_loss", "op": "<=", "threshold": 0.5},
103
+ {"name": "dataset", "kind": "provenance", "field": "dataset_id", "op": "!=", "threshold": null}
104
+ ]
105
+ }
106
+ ```
107
+
108
+ Gate kinds:
109
+
110
+ | kind | what it checks |
111
+ |---|---|
112
+ | `metric` | a measured metric against a threshold |
113
+ | `artifact` | that a named artefact is in the proof |
114
+ | `provenance` | a field of the run's provenance record |
115
+
116
+ Operators: `>=`, `<=`, `>`, `<`, `==`, `!=`, `in`.
117
+
118
+ ## What it does not do
119
+
120
+ * It does not prove the *code* was correct, only that the artefacts are the
121
+ ones that were certified.
122
+ * The signature is an HMAC, not a public-key signature: the verifier needs
123
+ the issuer's key. That is deliberate for v1 (no key ceremony before there
124
+ is a customer), and the interface is narrow enough to swap in Ed25519 later.
125
+ * A failed policy still produces a certificate. The point of a certificate is
126
+ to record the outcome, including a refusal.
127
+
128
+ ## Tests
129
+
130
+ ```bash
131
+ pip install -e ".[dev]"
132
+ pytest
133
+ ```
134
+
135
+ ## Layout
136
+
137
+ ```
138
+ src/modelcertify/
139
+ proof.py run proofs, artefacts, the Merkle root
140
+ attestation.py signed statements about a proof root
141
+ certify.py policies, gates, evidence, certificates
142
+ cli.py modelcertify proof | policy | certify | verify
143
+ ```
144
+
145
+ ## Licence
146
+
147
+ Apache-2.0.
@@ -0,0 +1,122 @@
1
+ # modelcertify
2
+
3
+ Supply-chain certification for trained models.
4
+
5
+ A model is only as trustworthy as the run that produced it. modelcertify
6
+ makes that run auditable and certifies it against a written policy.
7
+
8
+ * A **run proof** hashes every artefact the run produced (config, metrics,
9
+ checkpoints, weights) and combines the hashes into a Merkle **root**. Change
10
+ one byte of one artefact and the root changes.
11
+ * An **attestation** is a signed statement by an issuer that they vouch for a
12
+ proof root.
13
+ * A **certificate** is a policy evaluated against a run's evidence: it
14
+ records every gate, how each one came out, the proof root it is bound to,
15
+ and the issuer who signed it.
16
+
17
+ The certificate never overstates. It carries the gate results, so a reader can
18
+ see *why* something was certified, not just that it was.
19
+
20
+ ## Install
21
+
22
+ ```bash
23
+ pip install modelcertify
24
+ pip install -e ".[dev]" # from a checkout
25
+ ```
26
+
27
+ modelcertify has **no runtime dependencies**: it is stdlib-only on purpose, so
28
+ it can be dropped into an air-gapped review environment.
29
+
30
+ ## Relationship to iroh-tinker
31
+
32
+ modelcertify is a standalone product. It does not import iroh-tinker, and it
33
+ does not need to: it certifies a run's *artefacts*, wherever they were
34
+ produced.
35
+
36
+ The natural pairing is that an iroh-tinker run writes its artefacts (the
37
+ launch spec, the metrics, the checkpoints) to a directory, and
38
+ `modelcertify proof --dir <that directory>` turns them into a proof.
39
+
40
+ ## CLI
41
+
42
+ ```bash
43
+ modelcertify proof --run-id run-1 --dir ./artifacts --out proof.json
44
+ modelcertify policy --file policy.json --json
45
+ modelcertify certify --evidence evidence.json --policy policy.json \
46
+ --issuer scai --key "$MODELCERTIFY_KEY" --out certificate.json
47
+ modelcertify verify --certificate certificate.json --key "$MODELCERTIFY_KEY"
48
+ ```
49
+
50
+ Every command accepts `--json`.
51
+
52
+ Exit codes: `0` success, `1` the run was not certified (or the certificate did
53
+ not verify), `2` a usage or input error.
54
+
55
+ The signing key is hex. Pass it with `--key` or set `MODELCERTIFY_KEY`.
56
+
57
+ ## Evidence and policies
58
+
59
+ An **evidence** document is what a policy is allowed to look at:
60
+
61
+ ```json
62
+ {
63
+ "proof": {"run_id": "run-1", "artifacts": [{"name": "model.safetensors", "digest": "..."}]},
64
+ "metrics": {"eval_loss": 0.21, "eval_accuracy": 0.94},
65
+ "provenance": {"dataset_id": "ds-1", "licence": "cc-by-4.0"}
66
+ }
67
+ ```
68
+
69
+ A **policy** is a set of gates over that evidence:
70
+
71
+ ```json
72
+ {
73
+ "policy_id": "baseline",
74
+ "name": "Baseline release policy",
75
+ "required_artifacts": ["config.json", "model.safetensors"],
76
+ "gates": [
77
+ {"name": "loss", "kind": "metric", "field": "eval_loss", "op": "<=", "threshold": 0.5},
78
+ {"name": "dataset", "kind": "provenance", "field": "dataset_id", "op": "!=", "threshold": null}
79
+ ]
80
+ }
81
+ ```
82
+
83
+ Gate kinds:
84
+
85
+ | kind | what it checks |
86
+ |---|---|
87
+ | `metric` | a measured metric against a threshold |
88
+ | `artifact` | that a named artefact is in the proof |
89
+ | `provenance` | a field of the run's provenance record |
90
+
91
+ Operators: `>=`, `<=`, `>`, `<`, `==`, `!=`, `in`.
92
+
93
+ ## What it does not do
94
+
95
+ * It does not prove the *code* was correct, only that the artefacts are the
96
+ ones that were certified.
97
+ * The signature is an HMAC, not a public-key signature: the verifier needs
98
+ the issuer's key. That is deliberate for v1 (no key ceremony before there
99
+ is a customer), and the interface is narrow enough to swap in Ed25519 later.
100
+ * A failed policy still produces a certificate. The point of a certificate is
101
+ to record the outcome, including a refusal.
102
+
103
+ ## Tests
104
+
105
+ ```bash
106
+ pip install -e ".[dev]"
107
+ pytest
108
+ ```
109
+
110
+ ## Layout
111
+
112
+ ```
113
+ src/modelcertify/
114
+ proof.py run proofs, artefacts, the Merkle root
115
+ attestation.py signed statements about a proof root
116
+ certify.py policies, gates, evidence, certificates
117
+ cli.py modelcertify proof | policy | certify | verify
118
+ ```
119
+
120
+ ## Licence
121
+
122
+ Apache-2.0.
@@ -0,0 +1,75 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "modelcertify"
7
+ version = "0.1.0"
8
+ description = "Supply-chain certification for trained models"
9
+ readme = "README.md"
10
+ license = {text = "Apache-2.0"}
11
+ requires-python = ">=3.10"
12
+ dependencies = []
13
+ classifiers = [
14
+ "Development Status :: 3 - Alpha",
15
+ "Intended Audience :: Developers",
16
+ "License :: OSI Approved :: Apache Software License",
17
+ "Programming Language :: Python :: 3",
18
+ "Programming Language :: Python :: 3.10",
19
+ "Programming Language :: Python :: 3.11",
20
+ "Programming Language :: Python :: 3.12",
21
+ "Programming Language :: Python :: 3.13",
22
+ "Programming Language :: Python :: 3.14",
23
+ "Programming Language :: Python :: 3.15",
24
+ ]
25
+
26
+ [project.scripts]
27
+ modelcertify = "modelcertify.cli:main"
28
+
29
+ [project.optional-dependencies]
30
+ dev = [
31
+ "pytest>=8.0",
32
+ "pytest-asyncio>=0.23",
33
+ "ruff>=0.5",
34
+ "mypy>=1.10",
35
+ ]
36
+
37
+ [tool.setuptools.packages.find]
38
+ where = ["src"]
39
+
40
+ [tool.setuptools.package-data]
41
+ modelcertify = ["py.typed"]
42
+
43
+ [tool.ruff]
44
+ line-length = 100
45
+ target-version = "py310"
46
+ src = ["src", "tests"]
47
+
48
+ [tool.ruff.lint]
49
+ select = ["E", "F", "I", "UP", "W", "B", "C4", "PTH", "T20", "TID"]
50
+ ignore = []
51
+
52
+ [tool.ruff.lint.per-file-ignores]
53
+ # The CLI is the one place that is allowed to print.
54
+ "src/modelcertify/cli.py" = ["T20"]
55
+
56
+ [tool.mypy]
57
+ python_version = "3.10"
58
+ ignore_missing_imports = true
59
+ warn_return_any = true
60
+ warn_unused_configs = true
61
+ disallow_untyped_defs = true
62
+ disallow_incomplete_defs = true
63
+ check_untyped_defs = true
64
+ no_implicit_optional = true
65
+ strict_optional = true
66
+ warn_redundant_casts = true
67
+ warn_unused_ignores = true
68
+ show_error_codes = true
69
+ pretty = true
70
+
71
+ [tool.pytest.ini_options]
72
+ asyncio_mode = "auto"
73
+ testpaths = ["tests"]
74
+ python_files = ["test_*.py"]
75
+ python_functions = ["test_*"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,63 @@
1
+ """modelcertify: certify the supply chain of a trained model.
2
+
3
+ A model is only as trustworthy as the run that produced it. modelcertify
4
+ makes that run auditable:
5
+
6
+ * :mod:`modelcertify.proof` builds a **run proof**: every artefact of the run
7
+ hashed, combined into a Merkle **root** that changes if any artefact does.
8
+ * :mod:`modelcertify.attestation` lets an issuer **vouch** for a proof root,
9
+ signed so tampering is detectable.
10
+ * :mod:`modelcertify.certify` checks a run against a **policy** -- metric,
11
+ artefact and provenance gates -- and issues a **certificate** that records
12
+ every gate and how it came out.
13
+
14
+ The certificate never overstates: it carries the gate results, the proof root
15
+ it is bound to, and the issuer that signed it.
16
+ """
17
+ from __future__ import annotations
18
+
19
+ __version__ = "0.1.0"
20
+
21
+ from .attestation import (
22
+ Attestation,
23
+ AttestationError,
24
+ sign_body,
25
+ verify_body,
26
+ )
27
+ from .certify import (
28
+ Certificate,
29
+ Evidence,
30
+ Gate,
31
+ GateResult,
32
+ Policy,
33
+ PolicyResult,
34
+ certify,
35
+ evidence_from_dict,
36
+ load_evidence,
37
+ )
38
+ from .proof import Artifact, RunProof, merkle_root, sha256_bytes, sha256_file
39
+
40
+ __all__ = [
41
+ "__version__",
42
+ # proof
43
+ "Artifact",
44
+ "RunProof",
45
+ "merkle_root",
46
+ "sha256_bytes",
47
+ "sha256_file",
48
+ # attestation
49
+ "Attestation",
50
+ "AttestationError",
51
+ "sign_body",
52
+ "verify_body",
53
+ # certification
54
+ "Certificate",
55
+ "Evidence",
56
+ "Gate",
57
+ "GateResult",
58
+ "Policy",
59
+ "PolicyResult",
60
+ "certify",
61
+ "evidence_from_dict",
62
+ "load_evidence",
63
+ ]