itself 0.2.0__py3-none-any.whl

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,366 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://greaterexpanse.com/itself/schemas/v0alpha/reasoning-receipt.schema.json",
4
+ "title": "Itself Reasoning Receipt v0alpha",
5
+ "description": "A deterministic public projection of a validated Claim and Evidence Protocol ledger.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": [
9
+ "receipt_version",
10
+ "receipt_id",
11
+ "source_ledger",
12
+ "assurance_basis",
13
+ "limitations",
14
+ "record_counts",
15
+ "subjects",
16
+ "artifacts",
17
+ "tests",
18
+ "evidence",
19
+ "verdicts",
20
+ "transitions",
21
+ "decisions"
22
+ ],
23
+ "properties": {
24
+ "receipt_version": { "const": "0.1.0-alpha.1" },
25
+ "receipt_id": {
26
+ "type": "string",
27
+ "pattern": "^urn:sha256:[0-9a-f]{64}$"
28
+ },
29
+ "source_ledger": { "$ref": "#/$defs/sourceLedger" },
30
+ "assurance_basis": {
31
+ "type": "array",
32
+ "items": {
33
+ "enum": [
34
+ "protocol_schema_conformance",
35
+ "bundle_reference_integrity",
36
+ "deterministic_state_replay",
37
+ "canonical_ledger_digest"
38
+ ]
39
+ },
40
+ "minItems": 1,
41
+ "uniqueItems": true
42
+ },
43
+ "limitations": {
44
+ "type": "array",
45
+ "items": { "type": "string", "minLength": 1 },
46
+ "minItems": 1,
47
+ "uniqueItems": true
48
+ },
49
+ "record_counts": {
50
+ "type": "object",
51
+ "additionalProperties": { "type": "integer", "minimum": 0 }
52
+ },
53
+ "subjects": {
54
+ "type": "array",
55
+ "items": { "$ref": "#/$defs/subject" }
56
+ },
57
+ "artifacts": {
58
+ "type": "array",
59
+ "items": { "$ref": "#/$defs/artifact" }
60
+ },
61
+ "tests": {
62
+ "type": "array",
63
+ "items": { "$ref": "#/$defs/test" }
64
+ },
65
+ "evidence": {
66
+ "type": "array",
67
+ "items": { "$ref": "#/$defs/evidence" }
68
+ },
69
+ "verdicts": {
70
+ "type": "array",
71
+ "items": { "$ref": "#/$defs/verdict" }
72
+ },
73
+ "transitions": {
74
+ "type": "array",
75
+ "items": { "$ref": "#/$defs/transition" }
76
+ },
77
+ "decisions": {
78
+ "type": "array",
79
+ "items": { "$ref": "#/$defs/decision" }
80
+ }
81
+ },
82
+ "$defs": {
83
+ "identifier": {
84
+ "type": "string",
85
+ "minLength": 1,
86
+ "maxLength": 256
87
+ },
88
+ "nonEmptyString": {
89
+ "type": "string",
90
+ "minLength": 1
91
+ },
92
+ "referenceList": {
93
+ "type": "array",
94
+ "items": { "$ref": "#/$defs/identifier" },
95
+ "uniqueItems": true
96
+ },
97
+ "digest": {
98
+ "type": "object",
99
+ "additionalProperties": false,
100
+ "required": ["algorithm", "value"],
101
+ "properties": {
102
+ "algorithm": { "enum": ["sha256", "sha512", "blake3", "other"] },
103
+ "value": { "$ref": "#/$defs/nonEmptyString" }
104
+ }
105
+ },
106
+ "sourceLedger": {
107
+ "type": "object",
108
+ "additionalProperties": false,
109
+ "required": [
110
+ "canonicalization",
111
+ "record_count",
112
+ "protocol_versions",
113
+ "digest"
114
+ ],
115
+ "properties": {
116
+ "canonicalization": { "const": "gxp-jsonl-v1" },
117
+ "record_count": { "type": "integer", "minimum": 0 },
118
+ "protocol_versions": {
119
+ "type": "array",
120
+ "items": { "$ref": "#/$defs/nonEmptyString" },
121
+ "uniqueItems": true
122
+ },
123
+ "digest": {
124
+ "type": "object",
125
+ "additionalProperties": false,
126
+ "required": ["algorithm", "value"],
127
+ "properties": {
128
+ "algorithm": { "const": "sha256" },
129
+ "value": {
130
+ "type": "string",
131
+ "pattern": "^[0-9a-f]{64}$"
132
+ }
133
+ }
134
+ }
135
+ }
136
+ },
137
+ "claimStatus": {
138
+ "enum": [
139
+ "proposed",
140
+ "testable",
141
+ "blocked",
142
+ "under_test",
143
+ "supported",
144
+ "refuted",
145
+ "inconclusive",
146
+ "mixed_evidence",
147
+ "corroborated_within_scope",
148
+ "stale",
149
+ "invalidated",
150
+ "withdrawn"
151
+ ]
152
+ },
153
+ "actor": {
154
+ "type": "object",
155
+ "additionalProperties": false,
156
+ "required": ["id", "actor_type", "role"],
157
+ "properties": {
158
+ "id": { "$ref": "#/$defs/identifier" },
159
+ "actor_type": {
160
+ "enum": ["human", "model", "software", "organization"]
161
+ },
162
+ "role": {
163
+ "enum": ["proposer", "evaluator", "reviewer", "authority", "operator"]
164
+ },
165
+ "implementation_ref": { "$ref": "#/$defs/nonEmptyString" }
166
+ }
167
+ },
168
+ "authority": {
169
+ "type": "object",
170
+ "additionalProperties": false,
171
+ "required": ["authority_type", "actor_ref", "basis"],
172
+ "properties": {
173
+ "authority_type": {
174
+ "enum": [
175
+ "deterministic_tool",
176
+ "domain_evaluator",
177
+ "model_evaluator",
178
+ "human_reviewer",
179
+ "policy_engine",
180
+ "external_source"
181
+ ]
182
+ },
183
+ "actor_ref": { "$ref": "#/$defs/identifier" },
184
+ "basis": { "$ref": "#/$defs/nonEmptyString" },
185
+ "independent_of_subject": { "type": "boolean" }
186
+ }
187
+ },
188
+ "subject": {
189
+ "type": "object",
190
+ "additionalProperties": false,
191
+ "required": [
192
+ "subject_id",
193
+ "kind",
194
+ "text",
195
+ "scope_description",
196
+ "initial_status",
197
+ "current_status",
198
+ "transition_ids"
199
+ ],
200
+ "properties": {
201
+ "subject_id": { "$ref": "#/$defs/identifier" },
202
+ "kind": { "enum": ["claim", "hypothesis"] },
203
+ "text": { "$ref": "#/$defs/nonEmptyString" },
204
+ "scope_description": { "$ref": "#/$defs/nonEmptyString" },
205
+ "initial_status": { "$ref": "#/$defs/claimStatus" },
206
+ "current_status": { "$ref": "#/$defs/claimStatus" },
207
+ "transition_ids": { "$ref": "#/$defs/referenceList" }
208
+ }
209
+ },
210
+ "artifact": {
211
+ "type": "object",
212
+ "additionalProperties": false,
213
+ "required": ["id", "uri", "media_type"],
214
+ "properties": {
215
+ "id": { "$ref": "#/$defs/identifier" },
216
+ "uri": { "type": "string", "format": "uri-reference" },
217
+ "media_type": { "$ref": "#/$defs/nonEmptyString" },
218
+ "title": { "$ref": "#/$defs/nonEmptyString" },
219
+ "digest": { "$ref": "#/$defs/digest" }
220
+ }
221
+ },
222
+ "oracle": {
223
+ "type": "object",
224
+ "additionalProperties": false,
225
+ "required": ["adapter", "version", "authority_type"],
226
+ "properties": {
227
+ "adapter": { "$ref": "#/$defs/nonEmptyString" },
228
+ "version": { "$ref": "#/$defs/nonEmptyString" },
229
+ "authority_type": { "$ref": "#/$defs/authority/properties/authority_type" },
230
+ "declared_scope": { "$ref": "#/$defs/nonEmptyString" }
231
+ }
232
+ },
233
+ "cost": {
234
+ "type": "object",
235
+ "additionalProperties": false,
236
+ "properties": {
237
+ "model_tokens": { "type": "integer", "minimum": 0 },
238
+ "wall_time_ms": { "type": "integer", "minimum": 0 },
239
+ "human_minutes": { "type": "number", "minimum": 0 }
240
+ }
241
+ },
242
+ "test": {
243
+ "type": "object",
244
+ "additionalProperties": false,
245
+ "required": [
246
+ "id",
247
+ "status",
248
+ "design",
249
+ "subject_refs",
250
+ "prediction_refs",
251
+ "evidence_refs",
252
+ "oracle"
253
+ ],
254
+ "properties": {
255
+ "id": { "$ref": "#/$defs/identifier" },
256
+ "status": { "enum": ["planned", "running", "completed", "failed", "unavailable"] },
257
+ "design": { "$ref": "#/$defs/nonEmptyString" },
258
+ "subject_refs": { "$ref": "#/$defs/referenceList" },
259
+ "prediction_refs": { "$ref": "#/$defs/referenceList" },
260
+ "plan_ref": { "$ref": "#/$defs/identifier" },
261
+ "evidence_refs": { "$ref": "#/$defs/referenceList" },
262
+ "oracle": { "$ref": "#/$defs/oracle" },
263
+ "cost": { "$ref": "#/$defs/cost" }
264
+ }
265
+ },
266
+ "evidenceRelation": {
267
+ "type": "object",
268
+ "additionalProperties": false,
269
+ "required": ["subject_ref", "relation"],
270
+ "properties": {
271
+ "subject_ref": { "$ref": "#/$defs/identifier" },
272
+ "relation": { "enum": ["supports", "contradicts", "contextualizes"] },
273
+ "public_note": { "$ref": "#/$defs/nonEmptyString" }
274
+ }
275
+ },
276
+ "evidence": {
277
+ "type": "object",
278
+ "additionalProperties": false,
279
+ "required": [
280
+ "id",
281
+ "evidence_type",
282
+ "relations",
283
+ "authority",
284
+ "artifact_refs"
285
+ ],
286
+ "properties": {
287
+ "id": { "$ref": "#/$defs/identifier" },
288
+ "evidence_type": { "$ref": "#/$defs/nonEmptyString" },
289
+ "relations": {
290
+ "type": "array",
291
+ "items": { "$ref": "#/$defs/evidenceRelation" },
292
+ "minItems": 1
293
+ },
294
+ "authority": { "$ref": "#/$defs/authority" },
295
+ "artifact_refs": { "$ref": "#/$defs/referenceList" },
296
+ "test_ref": { "$ref": "#/$defs/identifier" },
297
+ "expires_at": { "type": "string", "format": "date-time" }
298
+ }
299
+ },
300
+ "verdict": {
301
+ "type": "object",
302
+ "additionalProperties": false,
303
+ "required": [
304
+ "id",
305
+ "subject_ref",
306
+ "outcome",
307
+ "evidence_refs",
308
+ "authority",
309
+ "public_rationale"
310
+ ],
311
+ "properties": {
312
+ "id": { "$ref": "#/$defs/identifier" },
313
+ "subject_ref": { "$ref": "#/$defs/identifier" },
314
+ "outcome": { "$ref": "#/$defs/claimStatus" },
315
+ "evidence_refs": { "$ref": "#/$defs/referenceList" },
316
+ "authority": { "$ref": "#/$defs/authority" },
317
+ "policy_ref": { "$ref": "#/$defs/identifier" },
318
+ "public_rationale": { "$ref": "#/$defs/nonEmptyString" }
319
+ }
320
+ },
321
+ "transition": {
322
+ "type": "object",
323
+ "additionalProperties": false,
324
+ "required": [
325
+ "id",
326
+ "subject_ref",
327
+ "from_status",
328
+ "to_status",
329
+ "evidence_refs",
330
+ "authorized_by",
331
+ "reason"
332
+ ],
333
+ "properties": {
334
+ "id": { "$ref": "#/$defs/identifier" },
335
+ "subject_ref": { "$ref": "#/$defs/identifier" },
336
+ "from_status": { "$ref": "#/$defs/claimStatus" },
337
+ "to_status": { "$ref": "#/$defs/claimStatus" },
338
+ "evidence_refs": { "$ref": "#/$defs/referenceList" },
339
+ "authorized_by": { "$ref": "#/$defs/actor" },
340
+ "policy_ref": { "$ref": "#/$defs/identifier" },
341
+ "reason": { "$ref": "#/$defs/nonEmptyString" }
342
+ }
343
+ },
344
+ "decision": {
345
+ "type": "object",
346
+ "additionalProperties": false,
347
+ "required": [
348
+ "id",
349
+ "question",
350
+ "disposition",
351
+ "authorized_by",
352
+ "relied_on_claim_refs",
353
+ "unresolved_claim_refs"
354
+ ],
355
+ "properties": {
356
+ "id": { "$ref": "#/$defs/identifier" },
357
+ "question": { "$ref": "#/$defs/nonEmptyString" },
358
+ "disposition": { "enum": ["approved", "rejected", "deferred", "escalated", "executed"] },
359
+ "authorized_by": { "$ref": "#/$defs/actor" },
360
+ "policy_ref": { "$ref": "#/$defs/identifier" },
361
+ "relied_on_claim_refs": { "$ref": "#/$defs/referenceList" },
362
+ "unresolved_claim_refs": { "$ref": "#/$defs/referenceList" }
363
+ }
364
+ }
365
+ }
366
+ }
@@ -0,0 +1,145 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://greaterexpanse.com/itself/schemas/v0alpha2/evidence-bundle.schema.json",
4
+ "title": "Itself Evidence Bundle v0alpha2",
5
+ "description": "A closed, digest-inventoried package containing an evidence ledger, its reasoning receipt, and referenced artifacts.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": [
9
+ "bundle_version",
10
+ "bundle_id",
11
+ "title",
12
+ "created_at",
13
+ "closed_artifacts",
14
+ "files",
15
+ "limitations"
16
+ ],
17
+ "properties": {
18
+ "bundle_version": {
19
+ "const": "0.1.0-alpha.2"
20
+ },
21
+ "bundle_id": {
22
+ "type": "string",
23
+ "pattern": "^urn:sha256:[0-9a-f]{64}$"
24
+ },
25
+ "title": {
26
+ "type": "string",
27
+ "minLength": 1
28
+ },
29
+ "created_at": {
30
+ "type": "string",
31
+ "format": "date-time"
32
+ },
33
+ "closed_artifacts": {
34
+ "const": true
35
+ },
36
+ "files": {
37
+ "type": "array",
38
+ "minItems": 3,
39
+ "items": {
40
+ "$ref": "#/$defs/file"
41
+ }
42
+ },
43
+ "limitations": {
44
+ "type": "array",
45
+ "minItems": 1,
46
+ "uniqueItems": true,
47
+ "items": {
48
+ "type": "string",
49
+ "minLength": 1
50
+ }
51
+ }
52
+ },
53
+ "$defs": {
54
+ "sha256": {
55
+ "type": "string",
56
+ "pattern": "^[0-9a-f]{64}$"
57
+ },
58
+ "identifier": {
59
+ "type": "string",
60
+ "minLength": 1,
61
+ "maxLength": 256,
62
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$"
63
+ },
64
+ "file": {
65
+ "type": "object",
66
+ "additionalProperties": false,
67
+ "required": [
68
+ "path",
69
+ "role",
70
+ "media_type",
71
+ "size_bytes",
72
+ "digest"
73
+ ],
74
+ "properties": {
75
+ "path": {
76
+ "type": "string",
77
+ "minLength": 1
78
+ },
79
+ "role": {
80
+ "enum": [
81
+ "input",
82
+ "artifact",
83
+ "ledger",
84
+ "reasoning_receipt",
85
+ "supplemental"
86
+ ]
87
+ },
88
+ "record_ref": {
89
+ "$ref": "#/$defs/identifier"
90
+ },
91
+ "media_type": {
92
+ "type": "string",
93
+ "minLength": 1
94
+ },
95
+ "size_bytes": {
96
+ "type": "integer",
97
+ "minimum": 0,
98
+ "maximum": 9007199254740991
99
+ },
100
+ "digest": {
101
+ "type": "object",
102
+ "additionalProperties": false,
103
+ "required": [
104
+ "algorithm",
105
+ "value"
106
+ ],
107
+ "properties": {
108
+ "algorithm": {
109
+ "const": "sha256"
110
+ },
111
+ "value": {
112
+ "$ref": "#/$defs/sha256"
113
+ }
114
+ }
115
+ }
116
+ },
117
+ "allOf": [
118
+ {
119
+ "if": {
120
+ "properties": {
121
+ "role": {
122
+ "const": "artifact"
123
+ }
124
+ },
125
+ "required": [
126
+ "role"
127
+ ]
128
+ },
129
+ "then": {
130
+ "required": [
131
+ "record_ref"
132
+ ]
133
+ },
134
+ "else": {
135
+ "not": {
136
+ "required": [
137
+ "record_ref"
138
+ ]
139
+ }
140
+ }
141
+ }
142
+ ]
143
+ }
144
+ }
145
+ }