hyf

Context-aware query service for Radroots
git clone https://radroots.dev/git/hyf.git
Log | Files | Refs | README | LICENSE

buyer_request_interpret.response.schema.json (6163B)


      1 {
      2   "type": "object",
      3   "properties": {
      4     "version": {
      5       "type": "integer",
      6       "const": 1
      7     },
      8     "request_id": {
      9       "type": "string"
     10     },
     11     "trace_id": {
     12       "type": "string",
     13       "minLength": 1,
     14       "pattern": "\\S"
     15     },
     16     "ok": {
     17       "type": "boolean"
     18     },
     19     "output": {
     20       "type": "object",
     21       "properties": {
     22         "versions": {
     23           "$ref": "common.schema.json#/$defs/versions"
     24         },
     25         "provenance": {
     26           "type": "object",
     27           "properties": {
     28             "source": {
     29               "$ref": "common.schema.json#/$defs/identity"
     30             },
     31             "clarification": {
     32               "anyOf": [
     33                 {
     34                   "$ref": "common.schema.json#/$defs/identity"
     35                 },
     36                 {
     37                   "type": "null"
     38                 }
     39               ]
     40             }
     41           },
     42           "required": [
     43             "source",
     44             "clarification"
     45           ],
     46           "additionalProperties": false
     47         },
     48         "review": {
     49           "$ref": "common.schema.json#/$defs/review"
     50         },
     51         "execution": {
     52           "$ref": "common.schema.json#/$defs/execution"
     53         },
     54         "demand_lines": {
     55           "type": "array",
     56           "items": {
     57             "type": "object",
     58             "properties": {
     59               "line_id": {
     60                 "type": "string",
     61                 "minLength": 1,
     62                 "pattern": "\\S"
     63               },
     64               "product": {
     65                 "$ref": "common.schema.json#/$defs/product_ref"
     66               },
     67               "quantity": {
     68                 "$ref": "common.schema.json#/$defs/reported_quantity"
     69               },
     70               "conditions": {
     71                 "type": "array",
     72                 "items": {
     73                   "type": "object",
     74                   "properties": {
     75                     "kind": {
     76                       "type": "string",
     77                       "enum": [
     78                         "fulfillment",
     79                         "window",
     80                         "grade",
     81                         "price",
     82                         "attribute",
     83                         "substitution"
     84                       ]
     85                     },
     86                     "strength": {
     87                       "type": "string",
     88                       "enum": [
     89                         "mandatory",
     90                         "preferred",
     91                         "excluded",
     92                         "permitted"
     93                       ]
     94                     },
     95                     "value": {
     96                       "anyOf": [
     97                         {
     98                           "type": "string",
     99                           "minLength": 1,
    100                           "pattern": "\\S"
    101                         },
    102                         {
    103                           "type": "null"
    104                         }
    105                       ]
    106                     },
    107                     "evidence": {
    108                       "type": "array",
    109                       "items": {
    110                         "$ref": "common.schema.json#/$defs/evidence_ref"
    111                       },
    112                       "maxItems": 128
    113                     }
    114                   },
    115                   "required": [
    116                     "kind",
    117                     "strength",
    118                     "value",
    119                     "evidence"
    120                   ],
    121                   "additionalProperties": false
    122                 },
    123                 "maxItems": 128
    124               },
    125               "evidence": {
    126                 "type": "array",
    127                 "items": {
    128                   "$ref": "common.schema.json#/$defs/evidence_ref"
    129                 },
    130                 "maxItems": 128
    131               },
    132               "review_required": {
    133                 "type": "boolean"
    134               }
    135             },
    136             "required": [
    137               "line_id",
    138               "product",
    139               "quantity",
    140               "conditions",
    141               "evidence",
    142               "review_required"
    143             ],
    144             "additionalProperties": false
    145           },
    146           "maxItems": 128
    147         }
    148       },
    149       "required": [
    150         "versions",
    151         "provenance",
    152         "review",
    153         "execution",
    154         "demand_lines"
    155       ],
    156       "additionalProperties": false
    157     },
    158     "error": {
    159       "type": "object",
    160       "properties": {
    161         "code": {
    162           "type": "string",
    163           "enum": [
    164             "invalid_request",
    165             "unsupported_capability",
    166             "capability_disabled",
    167             "capability_unavailable",
    168             "internal_error"
    169           ]
    170         },
    171         "message": {
    172           "type": "string"
    173         }
    174       },
    175       "required": [
    176         "code",
    177         "message"
    178       ],
    179       "additionalProperties": false
    180     },
    181     "meta": {
    182       "type": "object",
    183       "properties": {
    184         "schema_version": {
    185           "type": "integer",
    186           "const": 1
    187         }
    188       },
    189       "required": [
    190         "schema_version"
    191       ],
    192       "additionalProperties": false
    193     }
    194   },
    195   "required": [
    196     "version",
    197     "request_id",
    198     "ok"
    199   ],
    200   "additionalProperties": false,
    201   "oneOf": [
    202     {
    203       "properties": {
    204         "ok": {
    205           "const": true
    206         },
    207         "request_id": {
    208           "type": "string",
    209           "minLength": 1,
    210           "pattern": "\\S"
    211         }
    212       },
    213       "required": [
    214         "output"
    215       ],
    216       "not": {
    217         "required": [
    218           "error"
    219         ]
    220       }
    221     },
    222     {
    223       "properties": {
    224         "ok": {
    225           "const": false
    226         }
    227       },
    228       "required": [
    229         "error"
    230       ],
    231       "not": {
    232         "anyOf": [
    233           {
    234             "required": [
    235               "output"
    236             ]
    237           },
    238           {
    239             "required": [
    240               "meta"
    241             ]
    242           }
    243         ]
    244       }
    245     }
    246   ],
    247   "$schema": "https://json-schema.org/draft/2020-12/schema",
    248   "$id": "hyf_ops_v3/buyer_request_interpret.response.schema.json",
    249   "$comment": "D57 hyf_ops_v3 pre-activation contract. No business write or trusted context can be minted by source/model text. Full semantic input-use and SDK revalidation remain required."
    250 }