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