evarness 0.1.0a1__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.
- evarness-0.1.0a1/LICENSE +201 -0
- evarness-0.1.0a1/PKG-INFO +165 -0
- evarness-0.1.0a1/README.md +132 -0
- evarness-0.1.0a1/evarness/__init__.py +123 -0
- evarness-0.1.0a1/evarness/cli/__init__.py +557 -0
- evarness-0.1.0a1/evarness/core/__init__.py +5 -0
- evarness-0.1.0a1/evarness/core/attest.py +130 -0
- evarness-0.1.0a1/evarness/core/config.py +52 -0
- evarness-0.1.0a1/evarness/core/errors.py +47 -0
- evarness-0.1.0a1/evarness/core/executor.py +218 -0
- evarness-0.1.0a1/evarness/core/graph.py +174 -0
- evarness-0.1.0a1/evarness/core/interfaces.py +39 -0
- evarness-0.1.0a1/evarness/core/invariants.py +266 -0
- evarness-0.1.0a1/evarness/core/prove.py +714 -0
- evarness-0.1.0a1/evarness/core/registry.py +227 -0
- evarness-0.1.0a1/evarness/core/store.py +420 -0
- evarness-0.1.0a1/evarness/core/trace.py +97 -0
- evarness-0.1.0a1/evarness/domains/__init__.py +7 -0
- evarness-0.1.0a1/evarness/domains/agents/__init__.py +92 -0
- evarness-0.1.0a1/evarness/domains/agents/catalog.py +71 -0
- evarness-0.1.0a1/evarness/domains/agents/classification.py +207 -0
- evarness-0.1.0a1/evarness/domains/agents/classification.yaml +26 -0
- evarness-0.1.0a1/evarness/domains/agents/contracts.yaml +88 -0
- evarness-0.1.0a1/evarness/domains/agents/grounding.py +426 -0
- evarness-0.1.0a1/evarness/domains/agents/grounding.yaml +90 -0
- evarness-0.1.0a1/evarness/domains/agents/judges.py +220 -0
- evarness-0.1.0a1/evarness/domains/agents/judges.yaml +33 -0
- evarness-0.1.0a1/evarness/domains/agents/lint.py +39 -0
- evarness-0.1.0a1/evarness/domains/agents/nodes/__init__.py +61 -0
- evarness-0.1.0a1/evarness/domains/agents/nodes/base.py +222 -0
- evarness-0.1.0a1/evarness/domains/agents/nodes/basic.py +230 -0
- evarness-0.1.0a1/evarness/domains/agents/nodes/governance.py +719 -0
- evarness-0.1.0a1/evarness/domains/agents/nodes/loop.py +440 -0
- evarness-0.1.0a1/evarness/domains/agents/nodes/memory.py +283 -0
- evarness-0.1.0a1/evarness/domains/agents/nodes/observability.py +130 -0
- evarness-0.1.0a1/evarness/domains/agents/nodes/rag.py +138 -0
- evarness-0.1.0a1/evarness/domains/agents/nodes/tools.py +188 -0
- evarness-0.1.0a1/evarness/domains/agents/patterns/__init__.py +272 -0
- evarness-0.1.0a1/evarness/domains/agents/patterns/approval_gated_send/fixtures/send.yaml +16 -0
- evarness-0.1.0a1/evarness/domains/agents/patterns/approval_gated_send/graph.json +41 -0
- evarness-0.1.0a1/evarness/domains/agents/patterns/approval_gated_send/invariants.yaml +17 -0
- evarness-0.1.0a1/evarness/domains/agents/patterns/approval_gated_send/lesson.md +83 -0
- evarness-0.1.0a1/evarness/domains/agents/patterns/governed_email_assistant/fixtures/failure.yaml +20 -0
- evarness-0.1.0a1/evarness/domains/agents/patterns/governed_email_assistant/fixtures/happy.yaml +17 -0
- evarness-0.1.0a1/evarness/domains/agents/patterns/governed_email_assistant/graph.json +50 -0
- evarness-0.1.0a1/evarness/domains/agents/patterns/governed_email_assistant/lesson.md +12 -0
- evarness-0.1.0a1/evarness/domains/agents/patterns/single_shot_qa/fixtures/happy.yaml +7 -0
- evarness-0.1.0a1/evarness/domains/agents/patterns/single_shot_qa/graph.json +25 -0
- evarness-0.1.0a1/evarness/domains/agents/patterns/single_shot_qa/lesson.md +3 -0
- evarness-0.1.0a1/evarness/domains/agents/prompts.py +33 -0
- evarness-0.1.0a1/evarness/domains/agents/prompts.yaml +94 -0
- evarness-0.1.0a1/evarness/domains/agents/providers.py +55 -0
- evarness-0.1.0a1/evarness/domains/agents/sim.py +214 -0
- evarness-0.1.0a1/evarness/domains/agents/state.py +42 -0
- evarness-0.1.0a1/evarness/domains/agents/tiers.py +130 -0
- evarness-0.1.0a1/evarness/domains/agents/tiers.yaml +26 -0
- evarness-0.1.0a1/evarness/domains/agents/tools.yaml +138 -0
- evarness-0.1.0a1/evarness/domains/agents/toolspec.py +328 -0
- evarness-0.1.0a1/evarness/io/__init__.py +0 -0
- evarness-0.1.0a1/evarness/io/exporters.py +469 -0
- evarness-0.1.0a1/evarness/io/exporters.yaml +11 -0
- evarness-0.1.0a1/evarness/io/render.py +841 -0
- evarness-0.1.0a1/evarness/py.typed +0 -0
- evarness-0.1.0a1/evarness.egg-info/PKG-INFO +165 -0
- evarness-0.1.0a1/evarness.egg-info/SOURCES.txt +84 -0
- evarness-0.1.0a1/evarness.egg-info/dependency_links.txt +1 -0
- evarness-0.1.0a1/evarness.egg-info/entry_points.txt +2 -0
- evarness-0.1.0a1/evarness.egg-info/requires.txt +12 -0
- evarness-0.1.0a1/evarness.egg-info/top_level.txt +1 -0
- evarness-0.1.0a1/pyproject.toml +62 -0
- evarness-0.1.0a1/setup.cfg +4 -0
- evarness-0.1.0a1/tests/test_architecture_boundaries.py +242 -0
- evarness-0.1.0a1/tests/test_attest.py +193 -0
- evarness-0.1.0a1/tests/test_cli_error_rendering.py +86 -0
- evarness-0.1.0a1/tests/test_context_extensions.py +62 -0
- evarness-0.1.0a1/tests/test_core.py +1009 -0
- evarness-0.1.0a1/tests/test_export_bundle.py +124 -0
- evarness-0.1.0a1/tests/test_exporters.py +236 -0
- evarness-0.1.0a1/tests/test_golden_digests.py +74 -0
- evarness-0.1.0a1/tests/test_invariants.py +295 -0
- evarness-0.1.0a1/tests/test_judge_panel.py +213 -0
- evarness-0.1.0a1/tests/test_prove.py +187 -0
- evarness-0.1.0a1/tests/test_providers_sim_only.py +85 -0
- evarness-0.1.0a1/tests/test_render.py +259 -0
- evarness-0.1.0a1/tests/test_render_bundle.py +179 -0
- evarness-0.1.0a1/tests/test_trace.py +79 -0
evarness-0.1.0a1/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright 2026 The Evarness Authors
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: evarness
|
|
3
|
+
Version: 0.1.0a1
|
|
4
|
+
Summary: Prove an AI agent harness before it touches real data: canonical traces, invariant contracts, portable proof bundles, offline verification.
|
|
5
|
+
Author: Evarness contributors
|
|
6
|
+
License: Apache-2.0
|
|
7
|
+
Project-URL: Homepage, https://github.com/evarness-ai/evarness
|
|
8
|
+
Project-URL: Repository, https://github.com/evarness-ai/evarness
|
|
9
|
+
Keywords: ai-agents,harness,determinism,invariants,provenance,verification
|
|
10
|
+
Classifier: Development Status :: 3 - Alpha
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
19
|
+
Classifier: Topic :: Software Development :: Testing
|
|
20
|
+
Requires-Python: >=3.10
|
|
21
|
+
Description-Content-Type: text/markdown
|
|
22
|
+
License-File: LICENSE
|
|
23
|
+
Requires-Dist: pydantic<3,>=2.5
|
|
24
|
+
Requires-Dist: pyyaml<7,>=6.0
|
|
25
|
+
Provides-Extra: dev
|
|
26
|
+
Requires-Dist: pytest>=8.0; extra == "dev"
|
|
27
|
+
Provides-Extra: sign
|
|
28
|
+
Requires-Dist: cryptography>=42; extra == "sign"
|
|
29
|
+
Provides-Extra: docs
|
|
30
|
+
Requires-Dist: mkdocs==1.6.1; extra == "docs"
|
|
31
|
+
Requires-Dist: mkdocs-material==9.7.7; extra == "docs"
|
|
32
|
+
Dynamic: license-file
|
|
33
|
+
|
|
34
|
+
# Evarness
|
|
35
|
+
|
|
36
|
+
**Prove an AI agent harness before it touches real data.**
|
|
37
|
+
|
|
38
|
+
[](https://github.com/evarness-ai/evarness/actions/workflows/ci.yml)
|
|
39
|
+
[](https://pypi.org/project/evarness/)
|
|
40
|
+
[](https://github.com/evarness-ai/evarness/releases)
|
|
41
|
+
[](LICENSE)
|
|
42
|
+
[](https://github.com/evarness-ai/evarness/actions/workflows/ci.yml)
|
|
43
|
+
|
|
44
|
+
[Documentation](https://evarness-ai.github.io/evarness/) ·
|
|
45
|
+
[Live demos](https://evarness-ai.github.io/evarness/demos/) ·
|
|
46
|
+
[Tutorials](https://evarness-ai.github.io/evarness/tutorial-custom-node/) ·
|
|
47
|
+
[Blog](https://evarness-ai.github.io/evarness/blog/) ·
|
|
48
|
+
[Discussions](https://github.com/evarness-ai/evarness/discussions) ·
|
|
49
|
+
[Studio](https://github.com/evarness-ai/evarness-studio)
|
|
50
|
+
|
|
51
|
+
Your agent has an approval gate in front of its send tool — but yesterday's
|
|
52
|
+
refactor may or may not have kept every path behind it, and when a security
|
|
53
|
+
review asks you to *demonstrate* that nothing sends without a human, a green
|
|
54
|
+
test suite isn't a demonstration. Evarness is **harness assurance**: run the
|
|
55
|
+
harness in simulation, prove its declared rules held, and hand anyone a
|
|
56
|
+
proof bundle they can verify on their own machine.
|
|
57
|
+
|
|
58
|
+
An agent is a harness plus a model. The model reasons — but the **harness**,
|
|
59
|
+
the deterministic scaffolding that routes, gates, and audits every turn, is
|
|
60
|
+
what decides whether the system is safe to run. Evarness turns its safety
|
|
61
|
+
story into **evidence anyone can check**.
|
|
62
|
+
|
|
63
|
+
## Why Evarness
|
|
64
|
+
|
|
65
|
+
- **Canonical traces** — same graph, fixture, and seed ⇒ the same digest
|
|
66
|
+
(`c1:sha256:…`) — designed and regression-tested to stay identical across
|
|
67
|
+
supported machines, OSes, and Pythons. Reproduced, not asserted.
|
|
68
|
+
- **Invariant contracts** — "a blocked run never reaches the model",
|
|
69
|
+
"approval precedes send": declared in YAML, checked on every run.
|
|
70
|
+
- **Proof bundles** — `evarness prove` runs every scenario twice, evaluates
|
|
71
|
+
the contracts, and states what was **not** proven, in the bundle itself.
|
|
72
|
+
- **Offline verification** — `evarness verify` re-checks any bundle with no
|
|
73
|
+
network and no trust in the machine that produced it. Signing optional.
|
|
74
|
+
|
|
75
|
+
## Simulation is the point, not the limitation
|
|
76
|
+
|
|
77
|
+
Every model and tool response comes from a scripted fixture — which is
|
|
78
|
+
precisely what makes hostile scenarios exact, repeatable, and safe to run a
|
|
79
|
+
thousand times. The harness is the *deterministic* part of an agent: the
|
|
80
|
+
gates, routes, redactions, and budgets. If you can't prove the deterministic
|
|
81
|
+
part holds, the model's quality is irrelevant — a leak through an unguarded
|
|
82
|
+
edge doesn't care how good the model was. You're proving the seatbelt, not
|
|
83
|
+
the driver. Real providers and real tools are refused with an actionable
|
|
84
|
+
error, never silently simulated: this package makes no network calls, by
|
|
85
|
+
design.
|
|
86
|
+
|
|
87
|
+
## Try it in sixty seconds
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
pip install evarness==0.1.0a1
|
|
91
|
+
|
|
92
|
+
# expected: PROOF: PENDING, exit 1 — nothing sends without a human approval
|
|
93
|
+
evarness prove approval_gated_send -o proof.json
|
|
94
|
+
|
|
95
|
+
evarness prove approval_gated_send --approve n3=approve -o proof.json
|
|
96
|
+
evarness verify proof.json # → VERIFY: OK, offline
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
**The digest challenge:** your digest should match the
|
|
100
|
+
[v0.1.0 release receipt](https://github.com/evarness-ai/evarness/releases/tag/v0.1.0)
|
|
101
|
+
byte for byte. If it doesn't, that's a bug —
|
|
102
|
+
[file it](https://github.com/evarness-ai/evarness/issues). If it does, you
|
|
103
|
+
just reproduced the product's central claim on your own machine. Every
|
|
104
|
+
command runs headless:
|
|
105
|
+
`validate | run | render | prove | verify | export | patterns`.
|
|
106
|
+
|
|
107
|
+
## See it before you install it
|
|
108
|
+
|
|
109
|
+
The [live demos](https://evarness-ai.github.io/evarness/demos/) are generated
|
|
110
|
+
by Evarness itself when the docs site builds — a replay you can scrub, a
|
|
111
|
+
[blocked run](https://evarness-ai.github.io/evarness/demos/blocked.html)
|
|
112
|
+
stopping before the model, and a proof browser carrying a real bundle you can
|
|
113
|
+
extract and verify. The site build **fails** if their digests drift.
|
|
114
|
+
|
|
115
|
+
## Learn
|
|
116
|
+
|
|
117
|
+
- [Guide](docs/GUIDE.md) — run graphs, read traces, declare invariants, gate CI
|
|
118
|
+
- [End-to-end walkthrough](docs/E2E.md) — every feature, with the digests your machine should reproduce
|
|
119
|
+
- [Build a custom node in five minutes](docs/tutorial-custom-node.md) · [a domain plugin, without touching core](docs/tutorial-domain-plugin.md)
|
|
120
|
+
- [Architecture](ARCHITECTURE.md) · [Decision log](DECISIONS.md) — every rule the engine enforces traces to a reasoned entry
|
|
121
|
+
|
|
122
|
+
## Build with us
|
|
123
|
+
|
|
124
|
+
Evarness is a young project with a big thesis: `evarness.core` is a
|
|
125
|
+
domain-agnostic assurance kernel — graphs, events, digests, contracts,
|
|
126
|
+
proofs — and **agents are its first domain**, built entirely through public,
|
|
127
|
+
typed extension seams. The same machinery can govern ML pipelines, data
|
|
128
|
+
flows, any workflow where "we always do X before Y" deserves to be a
|
|
129
|
+
verified contract instead of a wiki page. That future is exactly what we
|
|
130
|
+
want to build with the community:
|
|
131
|
+
|
|
132
|
+
- **Run it and tell us.** `prove` → `verify` on your machine — did the
|
|
133
|
+
digest match the release receipt? Either answer helps.
|
|
134
|
+
- **Build a node.** The [five-minute tutorial](docs/tutorial-custom-node.md)
|
|
135
|
+
is real: three files, no core changes, your event in the canonical trace.
|
|
136
|
+
- **Dream up a domain.** If your pipeline has rules worth proving, [start a
|
|
137
|
+
discussion](https://github.com/evarness-ai/evarness/discussions) — domain
|
|
138
|
+
packs are the project's future, and early ideas shape the seams.
|
|
139
|
+
- **Found something wrong?** A graph, a fixture, and a seed make a perfect,
|
|
140
|
+
deterministic bug report — [open an issue](https://github.com/evarness-ai/evarness/issues).
|
|
141
|
+
|
|
142
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for the design rules (determinism
|
|
143
|
+
contract, verdicts never touch evidence, refuse-don't-degrade) — they're
|
|
144
|
+
what make the project provable, and they're enforced kindly but firmly.
|
|
145
|
+
|
|
146
|
+
## What a proof establishes — and what it doesn't
|
|
147
|
+
|
|
148
|
+
A bundle demonstrates that declared invariants held over scripted scenarios,
|
|
149
|
+
reproducibly, with the trace as evidence. It does **not** establish universal
|
|
150
|
+
safety, and a signature proves integrity — not that the runs happened. Every
|
|
151
|
+
bundle says this about itself. Scope in [SECURITY.md](SECURITY.md).
|
|
152
|
+
|
|
153
|
+
## Status
|
|
154
|
+
|
|
155
|
+
**Alpha, evaluated in the open.** This first release is the assurance spine,
|
|
156
|
+
simulation-only — on PyPI as the pre-release `evarness==0.1.0a1`. Real
|
|
157
|
+
providers, sandboxed tools, and adapters for other agent frameworks are on
|
|
158
|
+
the roadmap, each arriving as a separately proven release. The **stable**
|
|
159
|
+
0.1.0 follows community evaluation — that gate hasn't moved. The optional visual client
|
|
160
|
+
is [Evarness Studio](https://github.com/evarness-ai/evarness-studio) —
|
|
161
|
+
nothing here requires it.
|
|
162
|
+
|
|
163
|
+
## License
|
|
164
|
+
|
|
165
|
+
[Apache-2.0](LICENSE).
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
# Evarness
|
|
2
|
+
|
|
3
|
+
**Prove an AI agent harness before it touches real data.**
|
|
4
|
+
|
|
5
|
+
[](https://github.com/evarness-ai/evarness/actions/workflows/ci.yml)
|
|
6
|
+
[](https://pypi.org/project/evarness/)
|
|
7
|
+
[](https://github.com/evarness-ai/evarness/releases)
|
|
8
|
+
[](LICENSE)
|
|
9
|
+
[](https://github.com/evarness-ai/evarness/actions/workflows/ci.yml)
|
|
10
|
+
|
|
11
|
+
[Documentation](https://evarness-ai.github.io/evarness/) ·
|
|
12
|
+
[Live demos](https://evarness-ai.github.io/evarness/demos/) ·
|
|
13
|
+
[Tutorials](https://evarness-ai.github.io/evarness/tutorial-custom-node/) ·
|
|
14
|
+
[Blog](https://evarness-ai.github.io/evarness/blog/) ·
|
|
15
|
+
[Discussions](https://github.com/evarness-ai/evarness/discussions) ·
|
|
16
|
+
[Studio](https://github.com/evarness-ai/evarness-studio)
|
|
17
|
+
|
|
18
|
+
Your agent has an approval gate in front of its send tool — but yesterday's
|
|
19
|
+
refactor may or may not have kept every path behind it, and when a security
|
|
20
|
+
review asks you to *demonstrate* that nothing sends without a human, a green
|
|
21
|
+
test suite isn't a demonstration. Evarness is **harness assurance**: run the
|
|
22
|
+
harness in simulation, prove its declared rules held, and hand anyone a
|
|
23
|
+
proof bundle they can verify on their own machine.
|
|
24
|
+
|
|
25
|
+
An agent is a harness plus a model. The model reasons — but the **harness**,
|
|
26
|
+
the deterministic scaffolding that routes, gates, and audits every turn, is
|
|
27
|
+
what decides whether the system is safe to run. Evarness turns its safety
|
|
28
|
+
story into **evidence anyone can check**.
|
|
29
|
+
|
|
30
|
+
## Why Evarness
|
|
31
|
+
|
|
32
|
+
- **Canonical traces** — same graph, fixture, and seed ⇒ the same digest
|
|
33
|
+
(`c1:sha256:…`) — designed and regression-tested to stay identical across
|
|
34
|
+
supported machines, OSes, and Pythons. Reproduced, not asserted.
|
|
35
|
+
- **Invariant contracts** — "a blocked run never reaches the model",
|
|
36
|
+
"approval precedes send": declared in YAML, checked on every run.
|
|
37
|
+
- **Proof bundles** — `evarness prove` runs every scenario twice, evaluates
|
|
38
|
+
the contracts, and states what was **not** proven, in the bundle itself.
|
|
39
|
+
- **Offline verification** — `evarness verify` re-checks any bundle with no
|
|
40
|
+
network and no trust in the machine that produced it. Signing optional.
|
|
41
|
+
|
|
42
|
+
## Simulation is the point, not the limitation
|
|
43
|
+
|
|
44
|
+
Every model and tool response comes from a scripted fixture — which is
|
|
45
|
+
precisely what makes hostile scenarios exact, repeatable, and safe to run a
|
|
46
|
+
thousand times. The harness is the *deterministic* part of an agent: the
|
|
47
|
+
gates, routes, redactions, and budgets. If you can't prove the deterministic
|
|
48
|
+
part holds, the model's quality is irrelevant — a leak through an unguarded
|
|
49
|
+
edge doesn't care how good the model was. You're proving the seatbelt, not
|
|
50
|
+
the driver. Real providers and real tools are refused with an actionable
|
|
51
|
+
error, never silently simulated: this package makes no network calls, by
|
|
52
|
+
design.
|
|
53
|
+
|
|
54
|
+
## Try it in sixty seconds
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
pip install evarness==0.1.0a1
|
|
58
|
+
|
|
59
|
+
# expected: PROOF: PENDING, exit 1 — nothing sends without a human approval
|
|
60
|
+
evarness prove approval_gated_send -o proof.json
|
|
61
|
+
|
|
62
|
+
evarness prove approval_gated_send --approve n3=approve -o proof.json
|
|
63
|
+
evarness verify proof.json # → VERIFY: OK, offline
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
**The digest challenge:** your digest should match the
|
|
67
|
+
[v0.1.0 release receipt](https://github.com/evarness-ai/evarness/releases/tag/v0.1.0)
|
|
68
|
+
byte for byte. If it doesn't, that's a bug —
|
|
69
|
+
[file it](https://github.com/evarness-ai/evarness/issues). If it does, you
|
|
70
|
+
just reproduced the product's central claim on your own machine. Every
|
|
71
|
+
command runs headless:
|
|
72
|
+
`validate | run | render | prove | verify | export | patterns`.
|
|
73
|
+
|
|
74
|
+
## See it before you install it
|
|
75
|
+
|
|
76
|
+
The [live demos](https://evarness-ai.github.io/evarness/demos/) are generated
|
|
77
|
+
by Evarness itself when the docs site builds — a replay you can scrub, a
|
|
78
|
+
[blocked run](https://evarness-ai.github.io/evarness/demos/blocked.html)
|
|
79
|
+
stopping before the model, and a proof browser carrying a real bundle you can
|
|
80
|
+
extract and verify. The site build **fails** if their digests drift.
|
|
81
|
+
|
|
82
|
+
## Learn
|
|
83
|
+
|
|
84
|
+
- [Guide](docs/GUIDE.md) — run graphs, read traces, declare invariants, gate CI
|
|
85
|
+
- [End-to-end walkthrough](docs/E2E.md) — every feature, with the digests your machine should reproduce
|
|
86
|
+
- [Build a custom node in five minutes](docs/tutorial-custom-node.md) · [a domain plugin, without touching core](docs/tutorial-domain-plugin.md)
|
|
87
|
+
- [Architecture](ARCHITECTURE.md) · [Decision log](DECISIONS.md) — every rule the engine enforces traces to a reasoned entry
|
|
88
|
+
|
|
89
|
+
## Build with us
|
|
90
|
+
|
|
91
|
+
Evarness is a young project with a big thesis: `evarness.core` is a
|
|
92
|
+
domain-agnostic assurance kernel — graphs, events, digests, contracts,
|
|
93
|
+
proofs — and **agents are its first domain**, built entirely through public,
|
|
94
|
+
typed extension seams. The same machinery can govern ML pipelines, data
|
|
95
|
+
flows, any workflow where "we always do X before Y" deserves to be a
|
|
96
|
+
verified contract instead of a wiki page. That future is exactly what we
|
|
97
|
+
want to build with the community:
|
|
98
|
+
|
|
99
|
+
- **Run it and tell us.** `prove` → `verify` on your machine — did the
|
|
100
|
+
digest match the release receipt? Either answer helps.
|
|
101
|
+
- **Build a node.** The [five-minute tutorial](docs/tutorial-custom-node.md)
|
|
102
|
+
is real: three files, no core changes, your event in the canonical trace.
|
|
103
|
+
- **Dream up a domain.** If your pipeline has rules worth proving, [start a
|
|
104
|
+
discussion](https://github.com/evarness-ai/evarness/discussions) — domain
|
|
105
|
+
packs are the project's future, and early ideas shape the seams.
|
|
106
|
+
- **Found something wrong?** A graph, a fixture, and a seed make a perfect,
|
|
107
|
+
deterministic bug report — [open an issue](https://github.com/evarness-ai/evarness/issues).
|
|
108
|
+
|
|
109
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for the design rules (determinism
|
|
110
|
+
contract, verdicts never touch evidence, refuse-don't-degrade) — they're
|
|
111
|
+
what make the project provable, and they're enforced kindly but firmly.
|
|
112
|
+
|
|
113
|
+
## What a proof establishes — and what it doesn't
|
|
114
|
+
|
|
115
|
+
A bundle demonstrates that declared invariants held over scripted scenarios,
|
|
116
|
+
reproducibly, with the trace as evidence. It does **not** establish universal
|
|
117
|
+
safety, and a signature proves integrity — not that the runs happened. Every
|
|
118
|
+
bundle says this about itself. Scope in [SECURITY.md](SECURITY.md).
|
|
119
|
+
|
|
120
|
+
## Status
|
|
121
|
+
|
|
122
|
+
**Alpha, evaluated in the open.** This first release is the assurance spine,
|
|
123
|
+
simulation-only — on PyPI as the pre-release `evarness==0.1.0a1`. Real
|
|
124
|
+
providers, sandboxed tools, and adapters for other agent frameworks are on
|
|
125
|
+
the roadmap, each arriving as a separately proven release. The **stable**
|
|
126
|
+
0.1.0 follows community evaluation — that gate hasn't moved. The optional visual client
|
|
127
|
+
is [Evarness Studio](https://github.com/evarness-ai/evarness-studio) —
|
|
128
|
+
nothing here requires it.
|
|
129
|
+
|
|
130
|
+
## License
|
|
131
|
+
|
|
132
|
+
[Apache-2.0](LICENSE).
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
"""evarness — prove an AI agent harness before it touches real data.
|
|
2
|
+
|
|
3
|
+
``import evarness`` gives you the batteries-included surface: the kernel plus
|
|
4
|
+
the agents domain, with plugins discovered — loaded lazily, on first
|
|
5
|
+
attribute access. For the bare kernel (e.g. when building your own domain),
|
|
6
|
+
import from ``evarness.core`` directly — it never loads a domain behind your
|
|
7
|
+
back, and ``tests/test_architecture_boundaries.py`` holds that promise.
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
from __future__ import annotations
|
|
11
|
+
|
|
12
|
+
from typing import TYPE_CHECKING, Any
|
|
13
|
+
|
|
14
|
+
if TYPE_CHECKING: # static types for the lazy surface
|
|
15
|
+
from evarness.core.errors import (
|
|
16
|
+
EvarnessError as EvarnessError,
|
|
17
|
+
GraphValidationError as GraphValidationError,
|
|
18
|
+
NodeBlocked as NodeBlocked,
|
|
19
|
+
RegistryError as RegistryError,
|
|
20
|
+
RunPaused as RunPaused,
|
|
21
|
+
)
|
|
22
|
+
from evarness.core.executor import (
|
|
23
|
+
Emitter as Emitter,
|
|
24
|
+
RunContext as RunContext,
|
|
25
|
+
RunResult as RunResult,
|
|
26
|
+
execute as execute,
|
|
27
|
+
)
|
|
28
|
+
from evarness.core.graph import (
|
|
29
|
+
GraphModel as GraphModel,
|
|
30
|
+
lint as lint,
|
|
31
|
+
migrate as migrate,
|
|
32
|
+
topological_order as topological_order,
|
|
33
|
+
)
|
|
34
|
+
from evarness.core.invariants import (
|
|
35
|
+
check_invariants as check_invariants,
|
|
36
|
+
load_invariant_defs as load_invariant_defs,
|
|
37
|
+
)
|
|
38
|
+
from evarness.core.prove import prove as prove, verify_proof as verify_proof
|
|
39
|
+
from evarness.core.registry import (
|
|
40
|
+
NODE_TYPES as NODE_TYPES,
|
|
41
|
+
load_entry_point_plugins as load_entry_point_plugins,
|
|
42
|
+
)
|
|
43
|
+
from evarness.core.trace import canonical_trace as canonical_trace, trace_digest as trace_digest
|
|
44
|
+
from evarness.domains import agents as agents
|
|
45
|
+
from evarness.domains.agents.sim import Fixture as Fixture, load_fixture as load_fixture
|
|
46
|
+
|
|
47
|
+
__version__ = "0.1.0a1"
|
|
48
|
+
|
|
49
|
+
__all__ = [
|
|
50
|
+
"EvarnessError",
|
|
51
|
+
"GraphValidationError",
|
|
52
|
+
"NodeBlocked",
|
|
53
|
+
"RegistryError",
|
|
54
|
+
"RunPaused",
|
|
55
|
+
"Emitter",
|
|
56
|
+
"RunContext",
|
|
57
|
+
"RunResult",
|
|
58
|
+
"execute",
|
|
59
|
+
"GraphModel",
|
|
60
|
+
"lint",
|
|
61
|
+
"migrate",
|
|
62
|
+
"topological_order",
|
|
63
|
+
"check_invariants",
|
|
64
|
+
"load_invariant_defs",
|
|
65
|
+
"prove",
|
|
66
|
+
"verify_proof",
|
|
67
|
+
"NODE_TYPES",
|
|
68
|
+
"load_entry_point_plugins",
|
|
69
|
+
"canonical_trace",
|
|
70
|
+
"trace_digest",
|
|
71
|
+
"Fixture",
|
|
72
|
+
"load_fixture",
|
|
73
|
+
"agents",
|
|
74
|
+
"__version__",
|
|
75
|
+
]
|
|
76
|
+
|
|
77
|
+
_surface: dict[str, Any] = {}
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
def _load_surface() -> dict[str, Any]:
|
|
81
|
+
from evarness.core import errors, executor, graph, invariants, prove, registry, trace
|
|
82
|
+
from evarness.domains import agents
|
|
83
|
+
from evarness.domains.agents import sim
|
|
84
|
+
|
|
85
|
+
registry.load_entry_point_plugins()
|
|
86
|
+
return {
|
|
87
|
+
"EvarnessError": errors.EvarnessError,
|
|
88
|
+
"GraphValidationError": errors.GraphValidationError,
|
|
89
|
+
"NodeBlocked": errors.NodeBlocked,
|
|
90
|
+
"RegistryError": errors.RegistryError,
|
|
91
|
+
"RunPaused": errors.RunPaused,
|
|
92
|
+
"Emitter": executor.Emitter,
|
|
93
|
+
"RunContext": executor.RunContext,
|
|
94
|
+
"RunResult": executor.RunResult,
|
|
95
|
+
"execute": executor.execute,
|
|
96
|
+
"GraphModel": graph.GraphModel,
|
|
97
|
+
"lint": graph.lint,
|
|
98
|
+
"migrate": graph.migrate,
|
|
99
|
+
"topological_order": graph.topological_order,
|
|
100
|
+
"check_invariants": invariants.check_invariants,
|
|
101
|
+
"load_invariant_defs": invariants.load_invariant_defs,
|
|
102
|
+
"prove": prove.prove,
|
|
103
|
+
"verify_proof": prove.verify_proof,
|
|
104
|
+
"NODE_TYPES": registry.NODE_TYPES,
|
|
105
|
+
"load_entry_point_plugins": registry.load_entry_point_plugins,
|
|
106
|
+
"canonical_trace": trace.canonical_trace,
|
|
107
|
+
"trace_digest": trace.trace_digest,
|
|
108
|
+
"Fixture": sim.Fixture,
|
|
109
|
+
"load_fixture": sim.load_fixture,
|
|
110
|
+
"agents": agents,
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
def __getattr__(name: str) -> Any:
|
|
115
|
+
if name in __all__:
|
|
116
|
+
if not _surface:
|
|
117
|
+
_surface.update(_load_surface())
|
|
118
|
+
return _surface[name]
|
|
119
|
+
raise AttributeError(f"module 'evarness' has no attribute {name!r}")
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
def __dir__() -> list[str]:
|
|
123
|
+
return sorted(set(globals()) | set(__all__))
|