120 lines
3.2 KiB
JSON
120 lines
3.2 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"title": "AdapterResponse",
|
|
"description": "Strict adapter response envelope.",
|
|
"type": "object",
|
|
"properties": {
|
|
"invocation_id": {
|
|
"description": "Echoed invocation identifier.",
|
|
"$ref": "#/$defs/InvocationId"
|
|
},
|
|
"operation": {
|
|
"description": "Echoed operation.",
|
|
"$ref": "#/$defs/Operation"
|
|
},
|
|
"protocol_version": {
|
|
"type": "integer",
|
|
"const": 1
|
|
},
|
|
"result": {
|
|
"description": "Exactly one typed success or error result.",
|
|
"$ref": "#/$defs/AdapterResult"
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"protocol_version",
|
|
"invocation_id",
|
|
"operation",
|
|
"result"
|
|
],
|
|
"$defs": {
|
|
"AdapterResult": {
|
|
"description": "Adapter result, with operation data validated by the harness afterward.",
|
|
"oneOf": [
|
|
{
|
|
"description": "Complete operation-specific result.",
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"description": "Strictly schema-validated by the operation dispatcher."
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"const": "success"
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"status",
|
|
"data"
|
|
]
|
|
},
|
|
{
|
|
"description": "Typed adapter failure with no partial Query data.",
|
|
"type": "object",
|
|
"properties": {
|
|
"code": {
|
|
"description": "Stable adapter error code.",
|
|
"type": "string"
|
|
},
|
|
"details": {
|
|
"description": "Operation-specific error facts.",
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
},
|
|
"message": {
|
|
"description": "Concise diagnostic context.",
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"const": "error"
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"status",
|
|
"code",
|
|
"message",
|
|
"details"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"InvocationId": {
|
|
"description": "A random 128-bit invocation identifier encoded as 32 lowercase hex digits.",
|
|
"type": "string"
|
|
},
|
|
"Operation": {
|
|
"description": "Version 0.1 operation identifier shared with Java.",
|
|
"oneOf": [
|
|
{
|
|
"description": "Installation diagnosis.",
|
|
"type": "string",
|
|
"const": "doctor"
|
|
},
|
|
{
|
|
"description": "Sample metadata inspection.",
|
|
"type": "string",
|
|
"const": "inspect"
|
|
},
|
|
{
|
|
"description": "Stable Function collection.",
|
|
"type": "string",
|
|
"const": "functions"
|
|
},
|
|
{
|
|
"description": "Targeted Function decompilation.",
|
|
"type": "string",
|
|
"const": "decompile"
|
|
},
|
|
{
|
|
"description": "Explicit Analysis Store cleanup.",
|
|
"type": "string",
|
|
"const": "clean"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|