nitelos 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.
- nitelos-0.1.0/.gitignore +15 -0
- nitelos-0.1.0/LICENSE +202 -0
- nitelos-0.1.0/PKG-INFO +142 -0
- nitelos-0.1.0/README.md +116 -0
- nitelos-0.1.0/docs/planning/README.md +41 -0
- nitelos-0.1.0/pyproject.toml +99 -0
- nitelos-0.1.0/src/nitelos/__init__.py +124 -0
- nitelos-0.1.0/src/nitelos/_json.py +242 -0
- nitelos-0.1.0/src/nitelos/backends/__init__.py +33 -0
- nitelos-0.1.0/src/nitelos/backends/base.py +203 -0
- nitelos-0.1.0/src/nitelos/backends/deterministic.py +261 -0
- nitelos-0.1.0/src/nitelos/backends/smolvlm.py +596 -0
- nitelos-0.1.0/src/nitelos/context.py +74 -0
- nitelos-0.1.0/src/nitelos/diagnostics.py +77 -0
- nitelos-0.1.0/src/nitelos/errors.py +135 -0
- nitelos-0.1.0/src/nitelos/evaluation/__init__.py +17 -0
- nitelos-0.1.0/src/nitelos/evaluation/__main__.py +13 -0
- nitelos-0.1.0/src/nitelos/evaluation/metrics.py +677 -0
- nitelos-0.1.0/src/nitelos/evaluation/report_validation.py +226 -0
- nitelos-0.1.0/src/nitelos/evaluation/runner.py +946 -0
- nitelos-0.1.0/src/nitelos/evaluation/statistics.py +199 -0
- nitelos-0.1.0/src/nitelos/evidence.py +553 -0
- nitelos-0.1.0/src/nitelos/policy.py +454 -0
- nitelos-0.1.0/src/nitelos/py.typed +0 -0
- nitelos-0.1.0/src/nitelos/schemas.py +1346 -0
- nitelos-0.1.0/src/nitelos/trace.py +209 -0
- nitelos-0.1.0/src/nitelos/verifier.py +625 -0
- nitelos-0.1.0/tests/_async_lifecycle_check.py +129 -0
- nitelos-0.1.0/tests/_async_race_check.py +52 -0
- nitelos-0.1.0/tests/_imagekit.py +120 -0
- nitelos-0.1.0/tests/conftest.py +22 -0
- nitelos-0.1.0/tests/fixtures/smoke/README.md +99 -0
- nitelos-0.1.0/tests/fixtures/smoke/cases.json +145 -0
- nitelos-0.1.0/tests/fixtures/smoke/generate_smoke.py +296 -0
- nitelos-0.1.0/tests/fixtures/smoke/smoke-01.png +0 -0
- nitelos-0.1.0/tests/fixtures/smoke/smoke-02.png +0 -0
- nitelos-0.1.0/tests/fixtures/smoke/smoke-03.png +0 -0
- nitelos-0.1.0/tests/fixtures/smoke/smoke-04.png +0 -0
- nitelos-0.1.0/tests/fixtures/smoke/smoke-05.png +0 -0
- nitelos-0.1.0/tests/fixtures/smoke/smoke-06a.png +0 -0
- nitelos-0.1.0/tests/fixtures/smoke/smoke-06b.png +0 -0
- nitelos-0.1.0/tests/fixtures/smoke/smoke-07.png +0 -0
- nitelos-0.1.0/tests/fixtures/smoke/smoke-08.png +0 -0
- nitelos-0.1.0/tests/fixtures/smoke/smoke-09.png +0 -0
- nitelos-0.1.0/tests/fixtures/smoke/smoke-10.png +0 -0
- nitelos-0.1.0/tests/fixtures/smoke/smoke-11a.png +0 -0
- nitelos-0.1.0/tests/fixtures/smoke/smoke-11b.png +0 -0
- nitelos-0.1.0/tests/fixtures/smoke/smoke-12.png +0 -0
- nitelos-0.1.0/tests/integration/test_local_model.py +88 -0
- nitelos-0.1.0/tests/schemas/README.md +33 -0
- nitelos-0.1.0/tests/schemas/request.v1.json +580 -0
- nitelos-0.1.0/tests/schemas/result.v1.json +859 -0
- nitelos-0.1.0/tests/test_backend_contract.py +652 -0
- nitelos-0.1.0/tests/test_benchmark_data.py +593 -0
- nitelos-0.1.0/tests/test_contract.py +1353 -0
- nitelos-0.1.0/tests/test_deterministic.py +366 -0
- nitelos-0.1.0/tests/test_evaluation.py +1164 -0
- nitelos-0.1.0/tests/test_evidence.py +439 -0
- nitelos-0.1.0/tests/test_examples.py +244 -0
- nitelos-0.1.0/tests/test_license_inventory.py +147 -0
- nitelos-0.1.0/tests/test_lifecycle.py +186 -0
- nitelos-0.1.0/tests/test_metrics.py +626 -0
- nitelos-0.1.0/tests/test_packaging.py +113 -0
- nitelos-0.1.0/tests/test_policy.py +844 -0
- nitelos-0.1.0/tests/test_release_conformance.py +288 -0
- nitelos-0.1.0/tests/test_run_reports.py +352 -0
- nitelos-0.1.0/tests/test_security.py +543 -0
- nitelos-0.1.0/tests/test_smoke_fixtures.py +234 -0
- nitelos-0.1.0/tests/test_smolvlm_contract.py +858 -0
- nitelos-0.1.0/tests/test_statistics.py +343 -0
- nitelos-0.1.0/tests/test_trace.py +484 -0
- nitelos-0.1.0/tests/test_verifier.py +475 -0
nitelos-0.1.0/.gitignore
ADDED
nitelos-0.1.0/LICENSE
ADDED
|
@@ -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.
|
nitelos-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: nitelos
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Verify the outcome, not the attempt: evidence-based success verification for AI agents.
|
|
5
|
+
Author: Nitelos contributors
|
|
6
|
+
License-Expression: Apache-2.0
|
|
7
|
+
License-File: LICENSE
|
|
8
|
+
Classifier: Development Status :: 3 - Alpha
|
|
9
|
+
Classifier: Intended Audience :: Developers
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
13
|
+
Classifier: Typing :: Typed
|
|
14
|
+
Requires-Python: <3.14,>=3.12
|
|
15
|
+
Requires-Dist: pillow<13,>=12.3.0
|
|
16
|
+
Requires-Dist: pydantic<3,>=2.14.1
|
|
17
|
+
Provides-Extra: eval
|
|
18
|
+
Requires-Dist: numpy>=2.5.4; extra == 'eval'
|
|
19
|
+
Requires-Dist: scipy>=1.18.1; extra == 'eval'
|
|
20
|
+
Provides-Extra: local
|
|
21
|
+
Requires-Dist: num2words>=0.5.14; extra == 'local'
|
|
22
|
+
Requires-Dist: torch==2.14.1+cpu; extra == 'local'
|
|
23
|
+
Requires-Dist: torchvision==0.29.1+cpu; extra == 'local'
|
|
24
|
+
Requires-Dist: transformers==5.19.0; extra == 'local'
|
|
25
|
+
Description-Content-Type: text/markdown
|
|
26
|
+
|
|
27
|
+
# Nitelos
|
|
28
|
+
|
|
29
|
+
**Verify the outcome, not the attempt.**
|
|
30
|
+
|
|
31
|
+
Nitelos is a Python SDK that checks whether an agent's success criteria are supported
|
|
32
|
+
by evidence you supply — normalized observations, screenshots, actions and
|
|
33
|
+
host-authorized external reads. It never acts on the agent's behalf: no clicks, no
|
|
34
|
+
network fetches, no retries. A result is a time-scoped judgment over explicit
|
|
35
|
+
criteria, not a transaction guarantee.
|
|
36
|
+
|
|
37
|
+
## What "verified" means here
|
|
38
|
+
|
|
39
|
+
Verification is scope-relative. A criterion says exactly what final condition must
|
|
40
|
+
hold, for which subject, at which checkpoint — and Nitelos reports
|
|
41
|
+
`success`/`failure`/`abstained` **for those criteria against that evidence**:
|
|
42
|
+
|
|
43
|
+
- A **deterministic assertion** (JSON pointer + equals/in/exists over a normalized
|
|
44
|
+
observation) is fully checked by the SDK: `supported`, `refuted` or `unknown`,
|
|
45
|
+
with the exact evidence references that decided it.
|
|
46
|
+
- An **external** criterion additionally requires a host-constructed
|
|
47
|
+
`TrustBinding` — imported JSON can never authorize its own external claims.
|
|
48
|
+
- A **visual** criterion (optional, experimental) is decided by a local
|
|
49
|
+
image model only when you explicitly opt in; every such result is labeled
|
|
50
|
+
`model_inferred` and carries the `VISUAL_GROUNDING_UNVERIFIED` limitation.
|
|
51
|
+
|
|
52
|
+
Missing evidence abstains. Contradictions become unknown. A tool reporting
|
|
53
|
+
"completed" never proves an outcome.
|
|
54
|
+
|
|
55
|
+
## Quickstart (deterministic, offline)
|
|
56
|
+
|
|
57
|
+
```python
|
|
58
|
+
import hashlib, json
|
|
59
|
+
from nitelos import Verifier, canonical_json, parse_request
|
|
60
|
+
|
|
61
|
+
observation = {
|
|
62
|
+
"id": "obs-form",
|
|
63
|
+
"kind": "observation",
|
|
64
|
+
"sequence": 0,
|
|
65
|
+
"captured_at": "2026-10-20T10:00:00Z",
|
|
66
|
+
"checkpoint_id": "cp-final",
|
|
67
|
+
"source_id": "my-agent-runner",
|
|
68
|
+
"subject": {"form": "registration-1"},
|
|
69
|
+
"phase": "final",
|
|
70
|
+
"channel": "dom",
|
|
71
|
+
"data": {"validation_error": False, "email_filled": True},
|
|
72
|
+
}
|
|
73
|
+
observation["sha256"] = hashlib.sha256(canonical_json(observation["data"]).encode("utf-8")).hexdigest()
|
|
74
|
+
|
|
75
|
+
request = parse_request(
|
|
76
|
+
json.dumps(
|
|
77
|
+
{
|
|
78
|
+
"schema_version": "1",
|
|
79
|
+
"request_id": "quickstart-1",
|
|
80
|
+
"objective": "Complete the registration form",
|
|
81
|
+
"checkpoint_id": "cp-final",
|
|
82
|
+
"as_of": "2026-10-20T10:01:00Z",
|
|
83
|
+
"criteria": [
|
|
84
|
+
{
|
|
85
|
+
"id": "no-errors",
|
|
86
|
+
"description": "No validation error remains on the form",
|
|
87
|
+
"kind": "assertion",
|
|
88
|
+
"scope": "observed_state",
|
|
89
|
+
"evidence_ids": ["obs-form"],
|
|
90
|
+
"subject": {"form": "registration-1"},
|
|
91
|
+
"pointer": "/validation_error",
|
|
92
|
+
"operator": "equals",
|
|
93
|
+
"expected": False,
|
|
94
|
+
}
|
|
95
|
+
],
|
|
96
|
+
"evidence": [observation],
|
|
97
|
+
}
|
|
98
|
+
)
|
|
99
|
+
)
|
|
100
|
+
|
|
101
|
+
result = Verifier().verify(request)
|
|
102
|
+
print(result.decision) # success | failure | abstained (or None on execution errors)
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
The default is a plain `Verifier()` with the strict `VerificationPolicy`
|
|
106
|
+
(model inference disallowed); screenshots arrive via `Evidence.screenshot(...)`
|
|
107
|
+
plus a raw-bytes mapping, and `ArtifactStore`/`TrustBinding` cover the
|
|
108
|
+
image-store and external-trust cases in the guides below. Field names follow
|
|
109
|
+
the schema-1 `VerificationRequest` contract.
|
|
110
|
+
|
|
111
|
+
See [examples/quickstart.py](examples/quickstart.py) for the runnable script and
|
|
112
|
+
[docs/quickstart.md](docs/quickstart.md) for the walkthrough. The agent-summary
|
|
113
|
+
demo — a claim of success refuted by a `validation_error` observation — is
|
|
114
|
+
[examples/demo_incomplete_form.py](examples/demo_incomplete_form.py); the
|
|
115
|
+
pending-external abstention is
|
|
116
|
+
[examples/demo_external_pending.py](examples/demo_external_pending.py).
|
|
117
|
+
|
|
118
|
+
## Deterministic vs experimental
|
|
119
|
+
|
|
120
|
+
Everything in the quickstart is deterministic and offline: assertions, eligibility
|
|
121
|
+
(subject/checkpoint/freshness/phase), trust bindings, aggregation and every error
|
|
122
|
+
code. The optional local visual backend (SmolVLM) is **experimental**; its
|
|
123
|
+
executability gate is under review, and it is disallowed by the default policy.
|
|
124
|
+
No benchmark numbers are published yet — evaluation runs have not been executed.
|
|
125
|
+
|
|
126
|
+
## Documentation
|
|
127
|
+
|
|
128
|
+
- [Installation](docs/installation.md) — core / `eval` / `local` extras
|
|
129
|
+
- [Quickstart](docs/quickstart.md)
|
|
130
|
+
- [What verified success means](docs/success-criteria.md)
|
|
131
|
+
- [Evidence and provenance limits](docs/evidence-limits.md)
|
|
132
|
+
- [Sync/async lifecycle](docs/lifecycle.md)
|
|
133
|
+
- [Errors and abstention](docs/errors-and-abstention.md)
|
|
134
|
+
- [Backends and compatibility](docs/backends.md)
|
|
135
|
+
- [Custom adapter conformance](docs/custom-adapters.md)
|
|
136
|
+
- [Traces and caller collection](docs/traces.md)
|
|
137
|
+
- [Evaluation and calibration limitations](docs/evaluation.md)
|
|
138
|
+
- [Security and privacy](docs/security-privacy.md)
|
|
139
|
+
- [Performance measurement](docs/performance.md)
|
|
140
|
+
- [Contributing](CONTRIBUTING.md) · [Security policy](SECURITY.md)
|
|
141
|
+
|
|
142
|
+
Apache-2.0. Python 3.12/3.13.
|
nitelos-0.1.0/README.md
ADDED
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
# Nitelos
|
|
2
|
+
|
|
3
|
+
**Verify the outcome, not the attempt.**
|
|
4
|
+
|
|
5
|
+
Nitelos is a Python SDK that checks whether an agent's success criteria are supported
|
|
6
|
+
by evidence you supply — normalized observations, screenshots, actions and
|
|
7
|
+
host-authorized external reads. It never acts on the agent's behalf: no clicks, no
|
|
8
|
+
network fetches, no retries. A result is a time-scoped judgment over explicit
|
|
9
|
+
criteria, not a transaction guarantee.
|
|
10
|
+
|
|
11
|
+
## What "verified" means here
|
|
12
|
+
|
|
13
|
+
Verification is scope-relative. A criterion says exactly what final condition must
|
|
14
|
+
hold, for which subject, at which checkpoint — and Nitelos reports
|
|
15
|
+
`success`/`failure`/`abstained` **for those criteria against that evidence**:
|
|
16
|
+
|
|
17
|
+
- A **deterministic assertion** (JSON pointer + equals/in/exists over a normalized
|
|
18
|
+
observation) is fully checked by the SDK: `supported`, `refuted` or `unknown`,
|
|
19
|
+
with the exact evidence references that decided it.
|
|
20
|
+
- An **external** criterion additionally requires a host-constructed
|
|
21
|
+
`TrustBinding` — imported JSON can never authorize its own external claims.
|
|
22
|
+
- A **visual** criterion (optional, experimental) is decided by a local
|
|
23
|
+
image model only when you explicitly opt in; every such result is labeled
|
|
24
|
+
`model_inferred` and carries the `VISUAL_GROUNDING_UNVERIFIED` limitation.
|
|
25
|
+
|
|
26
|
+
Missing evidence abstains. Contradictions become unknown. A tool reporting
|
|
27
|
+
"completed" never proves an outcome.
|
|
28
|
+
|
|
29
|
+
## Quickstart (deterministic, offline)
|
|
30
|
+
|
|
31
|
+
```python
|
|
32
|
+
import hashlib, json
|
|
33
|
+
from nitelos import Verifier, canonical_json, parse_request
|
|
34
|
+
|
|
35
|
+
observation = {
|
|
36
|
+
"id": "obs-form",
|
|
37
|
+
"kind": "observation",
|
|
38
|
+
"sequence": 0,
|
|
39
|
+
"captured_at": "2026-10-20T10:00:00Z",
|
|
40
|
+
"checkpoint_id": "cp-final",
|
|
41
|
+
"source_id": "my-agent-runner",
|
|
42
|
+
"subject": {"form": "registration-1"},
|
|
43
|
+
"phase": "final",
|
|
44
|
+
"channel": "dom",
|
|
45
|
+
"data": {"validation_error": False, "email_filled": True},
|
|
46
|
+
}
|
|
47
|
+
observation["sha256"] = hashlib.sha256(canonical_json(observation["data"]).encode("utf-8")).hexdigest()
|
|
48
|
+
|
|
49
|
+
request = parse_request(
|
|
50
|
+
json.dumps(
|
|
51
|
+
{
|
|
52
|
+
"schema_version": "1",
|
|
53
|
+
"request_id": "quickstart-1",
|
|
54
|
+
"objective": "Complete the registration form",
|
|
55
|
+
"checkpoint_id": "cp-final",
|
|
56
|
+
"as_of": "2026-10-20T10:01:00Z",
|
|
57
|
+
"criteria": [
|
|
58
|
+
{
|
|
59
|
+
"id": "no-errors",
|
|
60
|
+
"description": "No validation error remains on the form",
|
|
61
|
+
"kind": "assertion",
|
|
62
|
+
"scope": "observed_state",
|
|
63
|
+
"evidence_ids": ["obs-form"],
|
|
64
|
+
"subject": {"form": "registration-1"},
|
|
65
|
+
"pointer": "/validation_error",
|
|
66
|
+
"operator": "equals",
|
|
67
|
+
"expected": False,
|
|
68
|
+
}
|
|
69
|
+
],
|
|
70
|
+
"evidence": [observation],
|
|
71
|
+
}
|
|
72
|
+
)
|
|
73
|
+
)
|
|
74
|
+
|
|
75
|
+
result = Verifier().verify(request)
|
|
76
|
+
print(result.decision) # success | failure | abstained (or None on execution errors)
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
The default is a plain `Verifier()` with the strict `VerificationPolicy`
|
|
80
|
+
(model inference disallowed); screenshots arrive via `Evidence.screenshot(...)`
|
|
81
|
+
plus a raw-bytes mapping, and `ArtifactStore`/`TrustBinding` cover the
|
|
82
|
+
image-store and external-trust cases in the guides below. Field names follow
|
|
83
|
+
the schema-1 `VerificationRequest` contract.
|
|
84
|
+
|
|
85
|
+
See [examples/quickstart.py](examples/quickstart.py) for the runnable script and
|
|
86
|
+
[docs/quickstart.md](docs/quickstart.md) for the walkthrough. The agent-summary
|
|
87
|
+
demo — a claim of success refuted by a `validation_error` observation — is
|
|
88
|
+
[examples/demo_incomplete_form.py](examples/demo_incomplete_form.py); the
|
|
89
|
+
pending-external abstention is
|
|
90
|
+
[examples/demo_external_pending.py](examples/demo_external_pending.py).
|
|
91
|
+
|
|
92
|
+
## Deterministic vs experimental
|
|
93
|
+
|
|
94
|
+
Everything in the quickstart is deterministic and offline: assertions, eligibility
|
|
95
|
+
(subject/checkpoint/freshness/phase), trust bindings, aggregation and every error
|
|
96
|
+
code. The optional local visual backend (SmolVLM) is **experimental**; its
|
|
97
|
+
executability gate is under review, and it is disallowed by the default policy.
|
|
98
|
+
No benchmark numbers are published yet — evaluation runs have not been executed.
|
|
99
|
+
|
|
100
|
+
## Documentation
|
|
101
|
+
|
|
102
|
+
- [Installation](docs/installation.md) — core / `eval` / `local` extras
|
|
103
|
+
- [Quickstart](docs/quickstart.md)
|
|
104
|
+
- [What verified success means](docs/success-criteria.md)
|
|
105
|
+
- [Evidence and provenance limits](docs/evidence-limits.md)
|
|
106
|
+
- [Sync/async lifecycle](docs/lifecycle.md)
|
|
107
|
+
- [Errors and abstention](docs/errors-and-abstention.md)
|
|
108
|
+
- [Backends and compatibility](docs/backends.md)
|
|
109
|
+
- [Custom adapter conformance](docs/custom-adapters.md)
|
|
110
|
+
- [Traces and caller collection](docs/traces.md)
|
|
111
|
+
- [Evaluation and calibration limitations](docs/evaluation.md)
|
|
112
|
+
- [Security and privacy](docs/security-privacy.md)
|
|
113
|
+
- [Performance measurement](docs/performance.md)
|
|
114
|
+
- [Contributing](CONTRIBUTING.md) · [Security policy](SECURITY.md)
|
|
115
|
+
|
|
116
|
+
Apache-2.0. Python 3.12/3.13.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Nitelos planning index
|
|
2
|
+
|
|
3
|
+
**Status: planning complete; implementation not started.** Baseline 2026-10-14. This directory specifies the first release of Nitelos: **Verify the outcome, not the attempt.** No application source, models, installed dependencies or test results accompany this plan.
|
|
4
|
+
|
|
5
|
+
## Recommended reading order
|
|
6
|
+
|
|
7
|
+
For project review: 00 → 01 → 09 → 02 → 03 → 05 → 14. For GLM 5.3: read 11 and 10 after those foundations, then 04/07/08/12; read 06 before evaluation work. Start implementation at **NIT-001**, only in a separately authorized implementation phase. Do not start from the future roadmap.
|
|
8
|
+
|
|
9
|
+
| Document | Purpose / dependency |
|
|
10
|
+
|---|---|
|
|
11
|
+
| [00 Executive summary](00-executive-summary.md) | Vision, recommendation and independent value hypothesis |
|
|
12
|
+
| [01 Competitive landscape](01-competitive-landscape.md) | Primary-source research, overlap, licenses and maintenance evidence |
|
|
13
|
+
| [02 System architecture](02-system-architecture.md) | Modules, lifecycle, data flow and diagnostics; depends on 03/05 |
|
|
14
|
+
| [03 Domain model and API](03-domain-model-and-api.md) | Authoritative types, state semantics, bounds and examples |
|
|
15
|
+
| [04 Verification backends](04-verification-backends.md) | Capabilities, deterministic/local procedures, future adapters |
|
|
16
|
+
| [05 Evidence and policies](05-evidence-and-policies.md) | Authoritative eligibility, trust and aggregation algorithm |
|
|
17
|
+
| [06 Evaluation methodology](06-evaluation-methodology.md) | Data, metrics, calibration design and scientific integrity |
|
|
18
|
+
| [07 Security and privacy](07-security-and-privacy.md) | Trust boundaries, controls, tests and limitations |
|
|
19
|
+
| [08 Technology decisions](08-technology-decisions.md) | Stack, alternatives, dependency and license inventory |
|
|
20
|
+
| [09 MVP scope](09-mvp-scope.md) | Authoritative committed features/exclusions and G1–G8 |
|
|
21
|
+
| [10 Implementation roadmap](10-implementation-roadmap.md) | Fifteen tickets, dependency graph, acceptance and review points |
|
|
22
|
+
| [11 GLM implementation handoff](11-glm-implementation-handoff.md) | Standalone execution instructions and trace schema |
|
|
23
|
+
| [12 Testing and CI](12-testing-and-ci.md) | Test matrix, future verification commands and quality gates |
|
|
24
|
+
| [13 Open-source release](13-open-source-release.md) | Docs, demo, packaging, rights and maintainer release procedure |
|
|
25
|
+
| [14 Risks and ADRs](14-risks-and-adrs.md) | Ten decisions, risk register and adversarial self-review |
|
|
26
|
+
| [15 Future roadmap](15-future-roadmap.md) | Optional priorities; no committed implementation authorization |
|
|
27
|
+
| [16 Requirements traceability](16-requirements-traceability.md) | Requirement→task→test→gate mapping and completion audit |
|
|
28
|
+
|
|
29
|
+
## Authority and conflict resolution
|
|
30
|
+
|
|
31
|
+
User-approved scope/instructions take precedence. Within this baseline: document 09 defines what ships; document 03 defines public schemas and errors; document 05 defines evidence/decision semantics; document 07 defines security boundaries; document 06 defines scientific metrics and dataset protocol; document 04 defines the chosen adapter behavior. These documents govern within their domains. Document 14 explains the decisions. The roadmap/handoff/testing documents operationalize them; summaries and pseudocode cannot override normative tables.
|
|
32
|
+
|
|
33
|
+
If two normative requirements genuinely conflict, GLM must record the contradiction and proposed resolution in an ADR amendment and request architectural approval before changing the contract. Do not silently choose the more convenient interpretation. Routine implementation details within the documented contract can be resolved autonomously. Cross-document links are relative for portability.
|
|
34
|
+
|
|
35
|
+
## Decisions to understand before coding
|
|
36
|
+
|
|
37
|
+
ADR-001 modular package; ADR-002 execution/decision separation; ADR-003 evidence list and host-bound external trust; ADR-004 fixed assertions/conjunction; ADR-005 advisory visual inference; ADR-006 experimental local SmolVLM; ADR-007 no calibrated confidence at launch; ADR-008 sync backend with bounded async facade; ADR-009 reuse existing ecosystems; ADR-010 authored reproducible fixtures before real-world claims.
|
|
38
|
+
|
|
39
|
+
## Scope of examples and research
|
|
40
|
+
|
|
41
|
+
All interface examples are non-executable specifications. Shell commands describe future implementation verification, not commands run during planning. Candidate dependency versions are observed metadata, not a tested lock. Research was current at access time and must be revalidated when locking release dependencies. Local model accuracy, latency and calibration have not been measured. MK-SH-V is future-only and has no released final checkpoint assumed by this plan.
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "nitelos"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
description = "Verify the outcome, not the attempt: evidence-based success verification for AI agents."
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
requires-python = ">=3.12,<3.14"
|
|
7
|
+
license = "Apache-2.0"
|
|
8
|
+
license-files = ["LICENSE"]
|
|
9
|
+
authors = [{ name = "Nitelos contributors" }]
|
|
10
|
+
classifiers = [
|
|
11
|
+
"Development Status :: 3 - Alpha",
|
|
12
|
+
"Intended Audience :: Developers",
|
|
13
|
+
"Programming Language :: Python :: 3",
|
|
14
|
+
"Programming Language :: Python :: 3.12",
|
|
15
|
+
"Programming Language :: Python :: 3.13",
|
|
16
|
+
"Typing :: Typed",
|
|
17
|
+
]
|
|
18
|
+
dependencies = [
|
|
19
|
+
"pydantic>=2.14.1,<3",
|
|
20
|
+
"pillow>=12.3.0,<13",
|
|
21
|
+
]
|
|
22
|
+
|
|
23
|
+
[project.optional-dependencies]
|
|
24
|
+
eval = [
|
|
25
|
+
"numpy>=2.5.4",
|
|
26
|
+
"scipy>=1.18.1",
|
|
27
|
+
]
|
|
28
|
+
local = [
|
|
29
|
+
"torch==2.14.1+cpu",
|
|
30
|
+
"torchvision==0.29.1+cpu",
|
|
31
|
+
"transformers==5.19.0",
|
|
32
|
+
"num2words>=0.5.14",
|
|
33
|
+
]
|
|
34
|
+
|
|
35
|
+
[dependency-groups]
|
|
36
|
+
dev = [
|
|
37
|
+
"hatchling>=1.32.4",
|
|
38
|
+
"mypy>=2.4.0",
|
|
39
|
+
"pytest>=9.1.1",
|
|
40
|
+
"pytest-asyncio>=1.4.0",
|
|
41
|
+
"pytest-cov>=7.1.0",
|
|
42
|
+
"ruff>=0.17.0",
|
|
43
|
+
]
|
|
44
|
+
|
|
45
|
+
[build-system]
|
|
46
|
+
requires = ["hatchling"]
|
|
47
|
+
build-backend = "hatchling.build"
|
|
48
|
+
|
|
49
|
+
[[tool.uv.index]]
|
|
50
|
+
name = "pytorch-cpu"
|
|
51
|
+
url = "https://download.pytorch.org/whl/cpu"
|
|
52
|
+
explicit = true
|
|
53
|
+
|
|
54
|
+
[tool.uv.sources]
|
|
55
|
+
torch = { index = "pytorch-cpu" }
|
|
56
|
+
torchvision = { index = "pytorch-cpu" }
|
|
57
|
+
|
|
58
|
+
[tool.hatch.build.targets.wheel]
|
|
59
|
+
packages = ["src/nitelos"]
|
|
60
|
+
|
|
61
|
+
[tool.hatch.build.targets.sdist]
|
|
62
|
+
include = ["src/nitelos", "tests", "README.md", "LICENSE", "pyproject.toml"]
|
|
63
|
+
exclude = ["tests/**/*.safetensors"]
|
|
64
|
+
|
|
65
|
+
[tool.pytest.ini_options]
|
|
66
|
+
testpaths = ["tests"]
|
|
67
|
+
addopts = ["-ra", "--strict-markers", "--strict-config", "-m", "not local_model and not paid_api"]
|
|
68
|
+
markers = [
|
|
69
|
+
"local_model: real local model inference; requires NITELOS_RUN_LOCAL=1 and NITELOS_MODEL_DIR",
|
|
70
|
+
"paid_api: reserved; v0.1 ships no paid adapter",
|
|
71
|
+
]
|
|
72
|
+
asyncio_mode = "strict"
|
|
73
|
+
asyncio_default_fixture_loop_scope = "function"
|
|
74
|
+
filterwarnings = ["error"]
|
|
75
|
+
|
|
76
|
+
[tool.ruff]
|
|
77
|
+
line-length = 110
|
|
78
|
+
target-version = "py312"
|
|
79
|
+
src = ["src", "tests"]
|
|
80
|
+
|
|
81
|
+
[tool.ruff.lint]
|
|
82
|
+
select = ["E", "F", "W", "I", "B", "UP", "S", "BLE", "RUF", "SIM", "PT", "C4", "PL"]
|
|
83
|
+
ignore = ["PLR0911", "PLR0912", "PLR0913", "PLR0915", "PLR2004"]
|
|
84
|
+
|
|
85
|
+
[tool.ruff.lint.per-file-ignores]
|
|
86
|
+
"tests/**" = ["S101", "S603", "S607", "S108", "PLC0415"]
|
|
87
|
+
|
|
88
|
+
[tool.mypy]
|
|
89
|
+
strict = true
|
|
90
|
+
python_version = "3.12"
|
|
91
|
+
mypy_path = "src"
|
|
92
|
+
packages = ["nitelos"]
|
|
93
|
+
warn_unreachable = true
|
|
94
|
+
|
|
95
|
+
[[tool.mypy.overrides]]
|
|
96
|
+
# optional local-model dependencies (NIT-008 local extra): absent in core-only
|
|
97
|
+
# environments, imported lazily inside nitelos.backends.smolvlm functions
|
|
98
|
+
module = ["torch", "transformers"]
|
|
99
|
+
ignore_missing_imports = true
|