File size: 3,545 Bytes
1e3bc19 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 | {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "common.schema.json",
"title": "Common definitions of the DeepStack ML contracts v1",
"description": "Shared definitions. Timestamps are UTC with an explicit Z or +00:00 offset; naive or non-UTC clocks are refused at the boundary.",
"$defs": {
"schema_version": {
"const": "ml.v1"
},
"utc": {
"type": "string",
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\\.[0-9]{1,6})?(Z|\\+00:00)$"
},
"sha256": {
"type": "string",
"pattern": "^[0-9a-f]{64}$"
},
"id": {
"type": "string",
"pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
},
"question_id": {
"description": "Exactly the game's testId (pNN-tNN, thNNN-tNN). The pattern only bounds the shape; existence is checked against the catalog on the server.",
"type": "string",
"pattern": "^[a-z0-9]{1,16}(-[a-z0-9]{1,16}){1,3}$"
},
"event_version": {
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991
},
"probability": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"phase": {
"enum": [
"pre_lock",
"post_lock"
]
},
"purpose": {
"enum": [
"analyst",
"forecast_component",
"forecast_pool",
"resolution_explainer",
"evaluation"
]
},
"environment": {
"description": "Where an execution really ran. 'fake' marks test doubles and can never be presented as a real run.",
"enum": [
"fake",
"local",
"staging",
"production"
]
},
"https_url": {
"type": "string",
"pattern": "^https://[^\\s@/]+(/[^\\s]*)?$"
},
"polarity": {
"description": "Stance of a passage towards the question (vocabulary of artifacts/polarity/vault-stance.jsonl).",
"enum": [
"bull",
"bear",
"neutral"
]
},
"relation_kind": {
"description": "How a claim relates to its source (INT-002): the source states it, the source attributes a cause, or the graph inferred it.",
"enum": [
"observed",
"attributed_causal",
"inferred_hypothesis"
]
},
"rights_scope": {
"type": "object",
"additionalProperties": false,
"required": [
"policy_version",
"purposes"
],
"properties": {
"policy_version": {
"$ref": "#/$defs/id"
},
"purposes": {
"type": "array",
"uniqueItems": true,
"items": {
"enum": [
"read",
"process",
"external_provider",
"train",
"retain",
"publish"
]
}
}
}
},
"principal_scope": {
"description": "Built by the server from a verified session. Never an email or a bearer.",
"type": "object",
"additionalProperties": false,
"required": [
"kind",
"subject_id",
"tenant_id"
],
"properties": {
"kind": {
"enum": [
"reader",
"guest",
"anonymous",
"service"
]
},
"subject_id": {
"type": [
"string",
"null"
],
"pattern": "^sub_[A-Za-z0-9_-]{8,64}$"
},
"tenant_id": {
"$ref": "#/$defs/id"
}
}
}
}
}
|