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,466 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://greaterexpanse.com/itself/schemas/v0alpha/protocol.schema.json",
4
+ "title": "Claim and Evidence Protocol v0alpha",
5
+ "description": "Provider-neutral records for externally inspectable epistemic state.",
6
+ "oneOf": [
7
+ { "$ref": "#/$defs/artifactReference" },
8
+ { "$ref": "#/$defs/claim" },
9
+ { "$ref": "#/$defs/hypothesis" },
10
+ { "$ref": "#/$defs/prediction" },
11
+ { "$ref": "#/$defs/test" },
12
+ { "$ref": "#/$defs/evidence" },
13
+ { "$ref": "#/$defs/verdict" },
14
+ { "$ref": "#/$defs/decision" },
15
+ { "$ref": "#/$defs/statusTransition" }
16
+ ],
17
+ "$defs": {
18
+ "identifier": {
19
+ "type": "string",
20
+ "minLength": 1,
21
+ "maxLength": 256
22
+ },
23
+ "referenceList": {
24
+ "type": "array",
25
+ "items": { "$ref": "#/$defs/identifier" },
26
+ "uniqueItems": true
27
+ },
28
+ "actor": {
29
+ "type": "object",
30
+ "additionalProperties": false,
31
+ "required": ["id", "actor_type", "role"],
32
+ "properties": {
33
+ "id": { "$ref": "#/$defs/identifier" },
34
+ "actor_type": {
35
+ "enum": ["human", "model", "software", "organization"]
36
+ },
37
+ "role": {
38
+ "enum": ["proposer", "evaluator", "reviewer", "authority", "operator"]
39
+ },
40
+ "implementation_ref": { "type": "string", "minLength": 1 }
41
+ }
42
+ },
43
+ "scope": {
44
+ "type": "object",
45
+ "additionalProperties": false,
46
+ "required": ["description"],
47
+ "properties": {
48
+ "description": { "type": "string", "minLength": 1 },
49
+ "dimensions": {
50
+ "type": "object",
51
+ "additionalProperties": {
52
+ "type": ["string", "number", "integer", "boolean", "null"]
53
+ }
54
+ },
55
+ "valid_from": { "type": "string", "format": "date-time" },
56
+ "valid_until": { "type": "string", "format": "date-time" }
57
+ }
58
+ },
59
+ "recordHeader": {
60
+ "type": "object",
61
+ "required": ["protocol_version", "id", "created_at", "created_by"],
62
+ "properties": {
63
+ "protocol_version": { "const": "0.1.0-alpha.2" },
64
+ "id": { "$ref": "#/$defs/identifier" },
65
+ "created_at": { "type": "string", "format": "date-time" },
66
+ "created_by": { "$ref": "#/$defs/actor" }
67
+ }
68
+ },
69
+ "claimStatus": {
70
+ "enum": [
71
+ "proposed",
72
+ "testable",
73
+ "blocked",
74
+ "under_test",
75
+ "supported",
76
+ "refuted",
77
+ "inconclusive",
78
+ "mixed_evidence",
79
+ "corroborated_within_scope",
80
+ "stale",
81
+ "invalidated",
82
+ "withdrawn"
83
+ ]
84
+ },
85
+ "authority": {
86
+ "type": "object",
87
+ "additionalProperties": false,
88
+ "required": ["authority_type", "actor_ref", "basis"],
89
+ "properties": {
90
+ "authority_type": {
91
+ "enum": [
92
+ "deterministic_tool",
93
+ "domain_evaluator",
94
+ "model_evaluator",
95
+ "human_reviewer",
96
+ "policy_engine",
97
+ "external_source"
98
+ ]
99
+ },
100
+ "actor_ref": { "$ref": "#/$defs/identifier" },
101
+ "basis": { "type": "string", "minLength": 1 },
102
+ "independent_of_subject": { "type": "boolean" }
103
+ }
104
+ },
105
+ "oracle": {
106
+ "type": "object",
107
+ "additionalProperties": false,
108
+ "required": ["adapter", "version", "authority_type"],
109
+ "properties": {
110
+ "adapter": { "type": "string", "minLength": 1 },
111
+ "version": { "type": "string", "minLength": 1 },
112
+ "authority_type": { "$ref": "#/$defs/authority/properties/authority_type" },
113
+ "declared_scope": { "type": "string", "minLength": 1 }
114
+ }
115
+ },
116
+ "artifactReference": {
117
+ "allOf": [
118
+ { "$ref": "#/$defs/recordHeader" },
119
+ {
120
+ "type": "object",
121
+ "required": ["kind", "uri", "media_type"],
122
+ "properties": {
123
+ "kind": { "const": "artifact_reference" },
124
+ "uri": { "type": "string", "format": "uri-reference" },
125
+ "media_type": { "type": "string", "minLength": 1 },
126
+ "title": { "type": "string", "minLength": 1 },
127
+ "digest": {
128
+ "type": "object",
129
+ "additionalProperties": false,
130
+ "required": ["algorithm", "value"],
131
+ "properties": {
132
+ "algorithm": { "enum": ["sha256", "sha512", "blake3", "other"] },
133
+ "value": { "type": "string", "minLength": 1 }
134
+ }
135
+ },
136
+ "captured_at": { "type": "string", "format": "date-time" },
137
+ "derived_from_refs": { "$ref": "#/$defs/referenceList" }
138
+ }
139
+ }
140
+ ],
141
+ "unevaluatedProperties": false
142
+ },
143
+ "claim": {
144
+ "allOf": [
145
+ { "$ref": "#/$defs/recordHeader" },
146
+ {
147
+ "type": "object",
148
+ "required": ["kind", "proposition", "claim_type", "status", "scope"],
149
+ "properties": {
150
+ "kind": { "const": "claim" },
151
+ "proposition": { "type": "string", "minLength": 1 },
152
+ "claim_type": {
153
+ "enum": ["factual", "causal", "predictive", "interpretive", "normative"]
154
+ },
155
+ "status": { "$ref": "#/$defs/claimStatus" },
156
+ "scope": { "$ref": "#/$defs/scope" },
157
+ "evidence_refs": { "$ref": "#/$defs/referenceList" },
158
+ "contradicting_evidence_refs": { "$ref": "#/$defs/referenceList" },
159
+ "dependency_refs": { "$ref": "#/$defs/referenceList" },
160
+ "transition_refs": { "$ref": "#/$defs/referenceList" },
161
+ "invalidation_conditions": {
162
+ "type": "array",
163
+ "items": { "type": "string", "minLength": 1 },
164
+ "uniqueItems": true
165
+ }
166
+ }
167
+ }
168
+ ],
169
+ "unevaluatedProperties": false
170
+ },
171
+ "hypothesis": {
172
+ "allOf": [
173
+ { "$ref": "#/$defs/recordHeader" },
174
+ {
175
+ "type": "object",
176
+ "required": ["kind", "statement", "status", "scope"],
177
+ "properties": {
178
+ "kind": { "const": "hypothesis" },
179
+ "statement": { "type": "string", "minLength": 1 },
180
+ "status": { "$ref": "#/$defs/claimStatus" },
181
+ "scope": { "$ref": "#/$defs/scope" },
182
+ "explains_evidence_refs": { "$ref": "#/$defs/referenceList" },
183
+ "alternative_hypothesis_refs": { "$ref": "#/$defs/referenceList" },
184
+ "prediction_refs": { "$ref": "#/$defs/referenceList" },
185
+ "dependency_refs": { "$ref": "#/$defs/referenceList" }
186
+ }
187
+ }
188
+ ],
189
+ "unevaluatedProperties": false
190
+ },
191
+ "prediction": {
192
+ "allOf": [
193
+ { "$ref": "#/$defs/recordHeader" },
194
+ {
195
+ "type": "object",
196
+ "required": [
197
+ "kind",
198
+ "hypothesis_ref",
199
+ "condition",
200
+ "expected_observation",
201
+ "scope"
202
+ ],
203
+ "properties": {
204
+ "kind": { "const": "prediction" },
205
+ "hypothesis_ref": { "$ref": "#/$defs/identifier" },
206
+ "condition": { "enum": ["hypothesis_true", "hypothesis_false"] },
207
+ "expected_observation": { "type": "string", "minLength": 1 },
208
+ "falsified_when": { "type": "string", "minLength": 1 },
209
+ "test_ref": { "$ref": "#/$defs/identifier" },
210
+ "scope": { "$ref": "#/$defs/scope" }
211
+ }
212
+ }
213
+ ],
214
+ "unevaluatedProperties": false
215
+ },
216
+ "test": {
217
+ "allOf": [
218
+ { "$ref": "#/$defs/recordHeader" },
219
+ {
220
+ "type": "object",
221
+ "required": ["kind", "question", "design", "status", "oracle", "scope"],
222
+ "properties": {
223
+ "kind": { "const": "test" },
224
+ "question": { "type": "string", "minLength": 1 },
225
+ "design": {
226
+ "enum": [
227
+ "controlled_ablation",
228
+ "factorial",
229
+ "deterministic_check",
230
+ "replay",
231
+ "query",
232
+ "simulation",
233
+ "source_corroboration",
234
+ "human_review",
235
+ "other"
236
+ ]
237
+ },
238
+ "status": { "enum": ["planned", "running", "completed", "failed", "unavailable"] },
239
+ "subject_refs": { "$ref": "#/$defs/referenceList" },
240
+ "prediction_refs": { "$ref": "#/$defs/referenceList" },
241
+ "plan_ref": { "$ref": "#/$defs/identifier" },
242
+ "oracle": { "$ref": "#/$defs/oracle" },
243
+ "scope": { "$ref": "#/$defs/scope" },
244
+ "evidence_refs": { "$ref": "#/$defs/referenceList" },
245
+ "cost": {
246
+ "type": "object",
247
+ "additionalProperties": false,
248
+ "properties": {
249
+ "model_tokens": { "type": "integer", "minimum": 0 },
250
+ "wall_time_ms": { "type": "integer", "minimum": 0 },
251
+ "human_minutes": { "type": "number", "minimum": 0 }
252
+ }
253
+ }
254
+ }
255
+ },
256
+ {
257
+ "if": {
258
+ "properties": { "status": { "const": "completed" } },
259
+ "required": ["status"]
260
+ },
261
+ "then": {
262
+ "required": ["evidence_refs"],
263
+ "properties": { "evidence_refs": { "minItems": 1 } }
264
+ }
265
+ }
266
+ ],
267
+ "unevaluatedProperties": false
268
+ },
269
+ "evidenceRelation": {
270
+ "type": "object",
271
+ "additionalProperties": false,
272
+ "required": ["subject_ref", "relation"],
273
+ "properties": {
274
+ "subject_ref": { "$ref": "#/$defs/identifier" },
275
+ "relation": { "enum": ["supports", "contradicts", "contextualizes"] },
276
+ "public_note": { "type": "string", "minLength": 1 }
277
+ }
278
+ },
279
+ "evidence": {
280
+ "allOf": [
281
+ { "$ref": "#/$defs/recordHeader" },
282
+ {
283
+ "type": "object",
284
+ "required": ["kind", "evidence_type", "relations", "authority", "scope"],
285
+ "properties": {
286
+ "kind": { "const": "evidence" },
287
+ "evidence_type": {
288
+ "enum": [
289
+ "observation",
290
+ "deterministic_test",
291
+ "benchmark_result",
292
+ "calculation",
293
+ "database_query",
294
+ "simulation",
295
+ "source_record",
296
+ "model_evaluation",
297
+ "human_review",
298
+ "policy_check",
299
+ "other"
300
+ ]
301
+ },
302
+ "relations": {
303
+ "type": "array",
304
+ "items": { "$ref": "#/$defs/evidenceRelation" },
305
+ "minItems": 1
306
+ },
307
+ "authority": { "$ref": "#/$defs/authority" },
308
+ "scope": { "$ref": "#/$defs/scope" },
309
+ "artifact_refs": { "$ref": "#/$defs/referenceList" },
310
+ "test_ref": { "$ref": "#/$defs/identifier" },
311
+ "result": {
312
+ "type": "object",
313
+ "additionalProperties": true
314
+ },
315
+ "expires_at": { "type": "string", "format": "date-time" }
316
+ }
317
+ }
318
+ ],
319
+ "unevaluatedProperties": false
320
+ },
321
+ "verdict": {
322
+ "allOf": [
323
+ { "$ref": "#/$defs/recordHeader" },
324
+ {
325
+ "type": "object",
326
+ "required": [
327
+ "kind",
328
+ "subject_ref",
329
+ "outcome",
330
+ "evidence_refs",
331
+ "authority",
332
+ "scope",
333
+ "public_rationale"
334
+ ],
335
+ "properties": {
336
+ "kind": { "const": "verdict" },
337
+ "subject_ref": { "$ref": "#/$defs/identifier" },
338
+ "outcome": {
339
+ "enum": [
340
+ "supported",
341
+ "refuted",
342
+ "inconclusive",
343
+ "mixed_evidence",
344
+ "corroborated_within_scope"
345
+ ]
346
+ },
347
+ "evidence_refs": {
348
+ "allOf": [
349
+ { "$ref": "#/$defs/referenceList" },
350
+ { "minItems": 1 }
351
+ ]
352
+ },
353
+ "authority": { "$ref": "#/$defs/authority" },
354
+ "policy_ref": { "$ref": "#/$defs/identifier" },
355
+ "scope": { "$ref": "#/$defs/scope" },
356
+ "public_rationale": { "type": "string", "minLength": 1 }
357
+ }
358
+ },
359
+ {
360
+ "if": {
361
+ "properties": { "outcome": { "const": "corroborated_within_scope" } },
362
+ "required": ["outcome"]
363
+ },
364
+ "then": { "required": ["policy_ref"] }
365
+ }
366
+ ],
367
+ "unevaluatedProperties": false
368
+ },
369
+ "decision": {
370
+ "allOf": [
371
+ { "$ref": "#/$defs/recordHeader" },
372
+ {
373
+ "type": "object",
374
+ "required": ["kind", "question", "disposition", "authorized_by", "scope"],
375
+ "properties": {
376
+ "kind": { "const": "decision" },
377
+ "question": { "type": "string", "minLength": 1 },
378
+ "disposition": { "enum": ["approved", "rejected", "deferred", "escalated", "executed"] },
379
+ "authorized_by": { "$ref": "#/$defs/actor" },
380
+ "policy_ref": { "$ref": "#/$defs/identifier" },
381
+ "scope": { "$ref": "#/$defs/scope" },
382
+ "relied_on_claim_refs": { "$ref": "#/$defs/referenceList" },
383
+ "unresolved_claim_refs": { "$ref": "#/$defs/referenceList" },
384
+ "reconsider_when": {
385
+ "type": "array",
386
+ "items": { "type": "string", "minLength": 1 },
387
+ "uniqueItems": true
388
+ },
389
+ "public_rationale": { "type": "string", "minLength": 1 }
390
+ }
391
+ }
392
+ ],
393
+ "unevaluatedProperties": false
394
+ },
395
+ "statusTransition": {
396
+ "allOf": [
397
+ {
398
+ "allOf": [
399
+ { "$ref": "#/$defs/recordHeader" },
400
+ {
401
+ "type": "object",
402
+ "required": [
403
+ "kind",
404
+ "subject_ref",
405
+ "from_status",
406
+ "to_status",
407
+ "authorized_by",
408
+ "reason"
409
+ ],
410
+ "properties": {
411
+ "kind": { "const": "status_transition" },
412
+ "subject_ref": { "$ref": "#/$defs/identifier" },
413
+ "from_status": { "$ref": "#/$defs/claimStatus" },
414
+ "to_status": { "$ref": "#/$defs/claimStatus" },
415
+ "evidence_refs": { "$ref": "#/$defs/referenceList" },
416
+ "authorized_by": { "$ref": "#/$defs/actor" },
417
+ "policy_ref": { "$ref": "#/$defs/identifier" },
418
+ "reason": { "type": "string", "minLength": 1 }
419
+ }
420
+ }
421
+ ]
422
+ },
423
+ {
424
+ "if": {
425
+ "properties": {
426
+ "to_status": {
427
+ "enum": [
428
+ "supported",
429
+ "refuted",
430
+ "inconclusive",
431
+ "mixed_evidence",
432
+ "corroborated_within_scope"
433
+ ]
434
+ }
435
+ },
436
+ "required": ["to_status"]
437
+ },
438
+ "then": {
439
+ "required": ["evidence_refs"],
440
+ "properties": {
441
+ "evidence_refs": { "minItems": 1 },
442
+ "authorized_by": {
443
+ "properties": {
444
+ "actor_type": {
445
+ "enum": ["human", "software", "organization"]
446
+ },
447
+ "role": {
448
+ "enum": ["evaluator", "reviewer", "authority"]
449
+ }
450
+ }
451
+ }
452
+ }
453
+ }
454
+ },
455
+ {
456
+ "if": {
457
+ "properties": { "to_status": { "const": "corroborated_within_scope" } },
458
+ "required": ["to_status"]
459
+ },
460
+ "then": { "required": ["policy_ref"] }
461
+ }
462
+ ],
463
+ "unevaluatedProperties": false
464
+ }
465
+ }
466
+ }