mirror of
https://github.com/morluto/rea.git
synced 2026-10-31 20:06:14 +00:00
* feat(artifacts): inventory and extract UF2 and DfuSe regions open_binary refused UF2 and DfuSe firmware containers as an unsupported format, so inspect_artifact and extract_artifact could not show which bytes a drag-and-drop or DFU update writes at which addresses. UF2 is recognized by a complete first block with all three magic numbers. Valid main-flash payloads are joined into address-contiguous regions per familyID, named family-0x<id>/0x<start>-0x<end>.bin, and known IDs are named from a small table copied from Microsoft's uf2families.json at a pinned commit. Numbering is counted per familyID and block count: absent, repeated, out-of-order and out-of-range block numbers are reported, and absent blocks leave coverage unknown. Not-main-flash blocks are excluded and reported; file-container blocks are reported and leave coverage unknown; invalid blocks and a partial final block are excluded with their position. A rewrite of one address with different bytes fails closed, naming both block spans. DfuSe is recognized only by its prefix together with a DFU 1.1a suffix. Each element becomes one region at its file range with its target's alternate setting and name. Structural faults fail closed with a byte offset; overlapping elements stay separate and are reported. A suffix CRC mismatch follows integrity_policy: fail refuses with a dfu-crc32 integrity error, and record-and-continue records a root contradiction that extraction also carries. HEX, UF2 and DfuSe share one retained-region reader and one run merger, so the HEX decoder and reader lose their private copies. * docs(artifacts): document UF2 and DfuSe images and their esptool lane Describe recognition, region names, metadata, numbering, failures, the DfuSe suffix CRC under integrity_policy, and limits, and link the page from the CLI and firmware guides and the agent skill reference. npm run verify:uf2 runs esptool merge-bin --format uf2 on generated inputs at known addresses, with and without MD5, with 256-byte payloads, and on a concatenation of two chips' outputs. Inspection and extraction through the built CLI must return every input at its address under the familyID esptool itself reports. * fix(artifacts): accept both DfuSe image size conventions UM0391 calls DFUImageSize the file length, and dfu-util's dfuse-pack.py writes that value, while ST's DfuFileMgr, MicroPython's dfu.py and pydfu leave the 16-byte suffix out. The decoder accepted only the second form, so it refused dfuse-pack.py output as malformed. Accept either value and keep the declared one in image_size; any other value still fails with the suffix offset and the file length. The tests pin both producers' output for one image, CRC included, from their build() functions transcribed and run under Python 3. * fix(artifacts): keep reused UF2 block numbers from hiding missing blocks esptool numbers every merged input from 0, so two inputs with the same block count share one numbering group. A block lost from one input left its number present in the other, and the file reported complete coverage. Each block number now records the target addresses it was seen at: equal address counts are complete copies, a resend to the same address is one block, and unequal counts make coverage unknown with a limitation and ambiguous_numbering_group_count. sequence_count becomes numbering_group_count, and region block positions become first_file_block and last_file_block. Review follow-ups in the same change: - compare_artifacts compares a DfuSe element's alternate setting and target name, so bytes moved to another device memory are changed; - the shared reader keeps no region bytes outside its map after close; - one domain type replaces four identical decoder failure types; - the UF2 decoder returns a typed limit instead of throwing on bytes beyond its admitted size, and caps retained regions, not runs; - DfuSe caps elements with bytes only, names empty elements and element-less targets, drops the constant bVersion and bcdDFU fields, and says whether the CRC matches when DFUImageSize fits neither convention; - classification evidence carries a suffix only when the probe saw the end, and root classification reads the tail only for a DfuSe prefix; - the UF2 domain region owns family_name, and the root records the family registry revision; the table's MIT notice is preserved; - docs pin the producer revisions (dfu-util ee6b393d and f9a537c9, MicroPython cb99ca98), give the MD5 structure's real meaning, and describe container contradictions in the MCP contract guide; - tests and the esptool lane add the equal-count inputs and a block lost from one of them, accepted boundaries beside each refusal, a DfuSe root larger than the classification prefix, and CLI refusals. * feat(artifacts): name the UF2 families that LibreTiny builds for LibreTiny writes UF2 for Realtek, Beken and Bouffalo Lab modules. The Microsoft registry revision REA already cites (cf3bd7f9) lists eight of those families: RTL8710A, RTL8710B, RTL8720C, RTL8720D, BK7231U, BK7231N, BK7251 and BL602. Their regions now carry those names. LN882H, which that revision omits, keeps its familyID with no name. * fix(artifacts): count DfuSe declarations without bytes instead of listing them Empty DfuSe elements have no entry, so DFUSE_MAX_ELEMENTS does not cap them, and the target walk kept a description string for each one. At 8 bytes per element, a file under the 128 MiB ceiling can declare about 16.7 million of them. The walk now counts every declaration without bytes and builds only the first NAMED_ELEMENTS descriptions, which is all that the limitation shows. The limitation text and empty_element_count do not change. The guide now says that both DfuSe limitations name the first four. On this host, decoding 4,000,000 empty elements (a 32 MB file) ran out of memory under a 128 MB V8 heap before this change, and it peaked at 1.59 GB RSS with the default heap. It now decodes in 114 ms with a 220 MB peak. --------- Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
1340 lines
42 KiB
JSON
1340 lines
42 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"oneOf": [
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"code": { "type": "string", "const": "invalid_request" },
|
|
"category": {
|
|
"type": "string",
|
|
"enum": [
|
|
"invalid_input",
|
|
"unsupported_provider",
|
|
"unsupported_target",
|
|
"integrity_mismatch",
|
|
"truncated",
|
|
"cancelled",
|
|
"timeout",
|
|
"resource_constraint",
|
|
"unavailable",
|
|
"execution_failure"
|
|
]
|
|
},
|
|
"message": { "type": "string", "minLength": 1 },
|
|
"retryable": { "type": "boolean" },
|
|
"remediation": {
|
|
"type": "object",
|
|
"properties": { "action": { "type": "string", "minLength": 1 } },
|
|
"required": ["action"],
|
|
"additionalProperties": false
|
|
},
|
|
"recovery": {
|
|
"oneOf": [
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"kind": { "type": "string", "const": "inspect_input_contract" },
|
|
"operation": { "type": "string", "minLength": 1 }
|
|
},
|
|
"required": ["kind", "operation"],
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"kind": { "type": "string", "const": "inspect_timeout_state" },
|
|
"operation": { "type": "string", "minLength": 1 },
|
|
"timeout_ms": {
|
|
"type": "integer",
|
|
"exclusiveMinimum": 0,
|
|
"maximum": 9007199254740991
|
|
}
|
|
},
|
|
"required": ["kind", "operation", "timeout_ms"],
|
|
"additionalProperties": false
|
|
}
|
|
]
|
|
},
|
|
"details": {
|
|
"type": "object",
|
|
"propertyNames": { "type": "string" },
|
|
"additionalProperties": {}
|
|
}
|
|
},
|
|
"required": ["code", "category", "message", "retryable", "remediation"],
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"code": { "type": "string", "const": "access_denied" },
|
|
"category": {
|
|
"type": "string",
|
|
"enum": [
|
|
"invalid_input",
|
|
"unsupported_provider",
|
|
"unsupported_target",
|
|
"integrity_mismatch",
|
|
"truncated",
|
|
"cancelled",
|
|
"timeout",
|
|
"resource_constraint",
|
|
"unavailable",
|
|
"execution_failure"
|
|
]
|
|
},
|
|
"message": { "type": "string", "minLength": 1 },
|
|
"retryable": { "type": "boolean" },
|
|
"remediation": {
|
|
"type": "object",
|
|
"properties": { "action": { "type": "string", "minLength": 1 } },
|
|
"required": ["action"],
|
|
"additionalProperties": false
|
|
},
|
|
"recovery": {
|
|
"oneOf": [
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"kind": { "type": "string", "const": "inspect_input_contract" },
|
|
"operation": { "type": "string", "minLength": 1 }
|
|
},
|
|
"required": ["kind", "operation"],
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"kind": { "type": "string", "const": "inspect_timeout_state" },
|
|
"operation": { "type": "string", "minLength": 1 },
|
|
"timeout_ms": {
|
|
"type": "integer",
|
|
"exclusiveMinimum": 0,
|
|
"maximum": 9007199254740991
|
|
}
|
|
},
|
|
"required": ["kind", "operation", "timeout_ms"],
|
|
"additionalProperties": false
|
|
}
|
|
]
|
|
},
|
|
"details": {
|
|
"type": "object",
|
|
"propertyNames": { "type": "string" },
|
|
"additionalProperties": {}
|
|
}
|
|
},
|
|
"required": ["code", "category", "message", "retryable", "remediation"],
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"code": { "type": "string", "const": "artifact_changed" },
|
|
"category": {
|
|
"type": "string",
|
|
"enum": [
|
|
"invalid_input",
|
|
"unsupported_provider",
|
|
"unsupported_target",
|
|
"integrity_mismatch",
|
|
"truncated",
|
|
"cancelled",
|
|
"timeout",
|
|
"resource_constraint",
|
|
"unavailable",
|
|
"execution_failure"
|
|
]
|
|
},
|
|
"message": { "type": "string", "minLength": 1 },
|
|
"retryable": { "type": "boolean" },
|
|
"remediation": {
|
|
"type": "object",
|
|
"properties": { "action": { "type": "string", "minLength": 1 } },
|
|
"required": ["action"],
|
|
"additionalProperties": false
|
|
},
|
|
"recovery": {
|
|
"oneOf": [
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"kind": { "type": "string", "const": "inspect_input_contract" },
|
|
"operation": { "type": "string", "minLength": 1 }
|
|
},
|
|
"required": ["kind", "operation"],
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"kind": { "type": "string", "const": "inspect_timeout_state" },
|
|
"operation": { "type": "string", "minLength": 1 },
|
|
"timeout_ms": {
|
|
"type": "integer",
|
|
"exclusiveMinimum": 0,
|
|
"maximum": 9007199254740991
|
|
}
|
|
},
|
|
"required": ["kind", "operation", "timeout_ms"],
|
|
"additionalProperties": false
|
|
}
|
|
]
|
|
},
|
|
"details": {
|
|
"type": "object",
|
|
"propertyNames": { "type": "string" },
|
|
"additionalProperties": {}
|
|
}
|
|
},
|
|
"required": ["code", "category", "message", "retryable", "remediation"],
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"code": { "type": "string", "const": "unreadable_output" },
|
|
"category": {
|
|
"type": "string",
|
|
"enum": [
|
|
"invalid_input",
|
|
"unsupported_provider",
|
|
"unsupported_target",
|
|
"integrity_mismatch",
|
|
"truncated",
|
|
"cancelled",
|
|
"timeout",
|
|
"resource_constraint",
|
|
"unavailable",
|
|
"execution_failure"
|
|
]
|
|
},
|
|
"message": { "type": "string", "minLength": 1 },
|
|
"retryable": { "type": "boolean" },
|
|
"remediation": {
|
|
"type": "object",
|
|
"properties": { "action": { "type": "string", "minLength": 1 } },
|
|
"required": ["action"],
|
|
"additionalProperties": false
|
|
},
|
|
"recovery": {
|
|
"oneOf": [
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"kind": { "type": "string", "const": "inspect_input_contract" },
|
|
"operation": { "type": "string", "minLength": 1 }
|
|
},
|
|
"required": ["kind", "operation"],
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"kind": { "type": "string", "const": "inspect_timeout_state" },
|
|
"operation": { "type": "string", "minLength": 1 },
|
|
"timeout_ms": {
|
|
"type": "integer",
|
|
"exclusiveMinimum": 0,
|
|
"maximum": 9007199254740991
|
|
}
|
|
},
|
|
"required": ["kind", "operation", "timeout_ms"],
|
|
"additionalProperties": false
|
|
}
|
|
]
|
|
},
|
|
"details": {
|
|
"type": "object",
|
|
"propertyNames": { "type": "string" },
|
|
"additionalProperties": {}
|
|
}
|
|
},
|
|
"required": ["code", "category", "message", "retryable", "remediation"],
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"code": { "type": "string", "const": "capability_unavailable" },
|
|
"category": {
|
|
"type": "string",
|
|
"enum": [
|
|
"invalid_input",
|
|
"unsupported_provider",
|
|
"unsupported_target",
|
|
"integrity_mismatch",
|
|
"truncated",
|
|
"cancelled",
|
|
"timeout",
|
|
"resource_constraint",
|
|
"unavailable",
|
|
"execution_failure"
|
|
]
|
|
},
|
|
"message": { "type": "string", "minLength": 1 },
|
|
"retryable": { "type": "boolean" },
|
|
"remediation": {
|
|
"type": "object",
|
|
"properties": { "action": { "type": "string", "minLength": 1 } },
|
|
"required": ["action"],
|
|
"additionalProperties": false
|
|
},
|
|
"recovery": {
|
|
"oneOf": [
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"kind": { "type": "string", "const": "inspect_input_contract" },
|
|
"operation": { "type": "string", "minLength": 1 }
|
|
},
|
|
"required": ["kind", "operation"],
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"kind": { "type": "string", "const": "inspect_timeout_state" },
|
|
"operation": { "type": "string", "minLength": 1 },
|
|
"timeout_ms": {
|
|
"type": "integer",
|
|
"exclusiveMinimum": 0,
|
|
"maximum": 9007199254740991
|
|
}
|
|
},
|
|
"required": ["kind", "operation", "timeout_ms"],
|
|
"additionalProperties": false
|
|
}
|
|
]
|
|
},
|
|
"details": {
|
|
"type": "object",
|
|
"propertyNames": { "type": "string" },
|
|
"additionalProperties": {}
|
|
}
|
|
},
|
|
"required": ["code", "category", "message", "retryable", "remediation"],
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"code": { "type": "string", "const": "unsupported_target" },
|
|
"category": {
|
|
"type": "string",
|
|
"enum": [
|
|
"invalid_input",
|
|
"unsupported_provider",
|
|
"unsupported_target",
|
|
"integrity_mismatch",
|
|
"truncated",
|
|
"cancelled",
|
|
"timeout",
|
|
"resource_constraint",
|
|
"unavailable",
|
|
"execution_failure"
|
|
]
|
|
},
|
|
"message": { "type": "string", "minLength": 1 },
|
|
"retryable": { "type": "boolean" },
|
|
"remediation": {
|
|
"type": "object",
|
|
"properties": { "action": { "type": "string", "minLength": 1 } },
|
|
"required": ["action"],
|
|
"additionalProperties": false
|
|
},
|
|
"recovery": {
|
|
"oneOf": [
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"kind": { "type": "string", "const": "inspect_input_contract" },
|
|
"operation": { "type": "string", "minLength": 1 }
|
|
},
|
|
"required": ["kind", "operation"],
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"kind": { "type": "string", "const": "inspect_timeout_state" },
|
|
"operation": { "type": "string", "minLength": 1 },
|
|
"timeout_ms": {
|
|
"type": "integer",
|
|
"exclusiveMinimum": 0,
|
|
"maximum": 9007199254740991
|
|
}
|
|
},
|
|
"required": ["kind", "operation", "timeout_ms"],
|
|
"additionalProperties": false
|
|
}
|
|
]
|
|
},
|
|
"details": {
|
|
"type": "object",
|
|
"propertyNames": { "type": "string" },
|
|
"additionalProperties": {}
|
|
}
|
|
},
|
|
"required": ["code", "category", "message", "retryable", "remediation"],
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"code": { "type": "string", "const": "provider_unavailable" },
|
|
"category": {
|
|
"type": "string",
|
|
"enum": [
|
|
"invalid_input",
|
|
"unsupported_provider",
|
|
"unsupported_target",
|
|
"integrity_mismatch",
|
|
"truncated",
|
|
"cancelled",
|
|
"timeout",
|
|
"resource_constraint",
|
|
"unavailable",
|
|
"execution_failure"
|
|
]
|
|
},
|
|
"message": { "type": "string", "minLength": 1 },
|
|
"retryable": { "type": "boolean" },
|
|
"remediation": {
|
|
"type": "object",
|
|
"properties": { "action": { "type": "string", "minLength": 1 } },
|
|
"required": ["action"],
|
|
"additionalProperties": false
|
|
},
|
|
"recovery": {
|
|
"oneOf": [
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"kind": { "type": "string", "const": "inspect_input_contract" },
|
|
"operation": { "type": "string", "minLength": 1 }
|
|
},
|
|
"required": ["kind", "operation"],
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"kind": { "type": "string", "const": "inspect_timeout_state" },
|
|
"operation": { "type": "string", "minLength": 1 },
|
|
"timeout_ms": {
|
|
"type": "integer",
|
|
"exclusiveMinimum": 0,
|
|
"maximum": 9007199254740991
|
|
}
|
|
},
|
|
"required": ["kind", "operation", "timeout_ms"],
|
|
"additionalProperties": false
|
|
}
|
|
]
|
|
},
|
|
"details": {
|
|
"type": "object",
|
|
"propertyNames": { "type": "string" },
|
|
"additionalProperties": {}
|
|
}
|
|
},
|
|
"required": ["code", "category", "message", "retryable", "remediation"],
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"code": { "type": "string", "const": "provider_timeout" },
|
|
"category": {
|
|
"type": "string",
|
|
"enum": [
|
|
"invalid_input",
|
|
"unsupported_provider",
|
|
"unsupported_target",
|
|
"integrity_mismatch",
|
|
"truncated",
|
|
"cancelled",
|
|
"timeout",
|
|
"resource_constraint",
|
|
"unavailable",
|
|
"execution_failure"
|
|
]
|
|
},
|
|
"message": { "type": "string", "minLength": 1 },
|
|
"retryable": { "type": "boolean" },
|
|
"remediation": {
|
|
"type": "object",
|
|
"properties": { "action": { "type": "string", "minLength": 1 } },
|
|
"required": ["action"],
|
|
"additionalProperties": false
|
|
},
|
|
"recovery": {
|
|
"oneOf": [
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"kind": { "type": "string", "const": "inspect_input_contract" },
|
|
"operation": { "type": "string", "minLength": 1 }
|
|
},
|
|
"required": ["kind", "operation"],
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"kind": { "type": "string", "const": "inspect_timeout_state" },
|
|
"operation": { "type": "string", "minLength": 1 },
|
|
"timeout_ms": {
|
|
"type": "integer",
|
|
"exclusiveMinimum": 0,
|
|
"maximum": 9007199254740991
|
|
}
|
|
},
|
|
"required": ["kind", "operation", "timeout_ms"],
|
|
"additionalProperties": false
|
|
}
|
|
]
|
|
},
|
|
"details": {
|
|
"type": "object",
|
|
"propertyNames": { "type": "string" },
|
|
"additionalProperties": {}
|
|
}
|
|
},
|
|
"required": ["code", "category", "message", "retryable", "remediation"],
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"code": { "type": "string", "const": "resource_constraint" },
|
|
"category": {
|
|
"type": "string",
|
|
"enum": [
|
|
"invalid_input",
|
|
"unsupported_provider",
|
|
"unsupported_target",
|
|
"integrity_mismatch",
|
|
"truncated",
|
|
"cancelled",
|
|
"timeout",
|
|
"resource_constraint",
|
|
"unavailable",
|
|
"execution_failure"
|
|
]
|
|
},
|
|
"message": { "type": "string", "minLength": 1 },
|
|
"retryable": { "type": "boolean" },
|
|
"remediation": {
|
|
"type": "object",
|
|
"properties": { "action": { "type": "string", "minLength": 1 } },
|
|
"required": ["action"],
|
|
"additionalProperties": false
|
|
},
|
|
"recovery": {
|
|
"oneOf": [
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"kind": { "type": "string", "const": "inspect_input_contract" },
|
|
"operation": { "type": "string", "minLength": 1 }
|
|
},
|
|
"required": ["kind", "operation"],
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"kind": { "type": "string", "const": "inspect_timeout_state" },
|
|
"operation": { "type": "string", "minLength": 1 },
|
|
"timeout_ms": {
|
|
"type": "integer",
|
|
"exclusiveMinimum": 0,
|
|
"maximum": 9007199254740991
|
|
}
|
|
},
|
|
"required": ["kind", "operation", "timeout_ms"],
|
|
"additionalProperties": false
|
|
}
|
|
]
|
|
},
|
|
"details": {
|
|
"type": "object",
|
|
"propertyNames": { "type": "string" },
|
|
"additionalProperties": {}
|
|
}
|
|
},
|
|
"required": ["code", "category", "message", "retryable", "remediation"],
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"code": { "type": "string", "const": "cancelled" },
|
|
"category": {
|
|
"type": "string",
|
|
"enum": [
|
|
"invalid_input",
|
|
"unsupported_provider",
|
|
"unsupported_target",
|
|
"integrity_mismatch",
|
|
"truncated",
|
|
"cancelled",
|
|
"timeout",
|
|
"resource_constraint",
|
|
"unavailable",
|
|
"execution_failure"
|
|
]
|
|
},
|
|
"message": { "type": "string", "minLength": 1 },
|
|
"retryable": { "type": "boolean" },
|
|
"remediation": {
|
|
"type": "object",
|
|
"properties": { "action": { "type": "string", "minLength": 1 } },
|
|
"required": ["action"],
|
|
"additionalProperties": false
|
|
},
|
|
"recovery": {
|
|
"oneOf": [
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"kind": { "type": "string", "const": "inspect_input_contract" },
|
|
"operation": { "type": "string", "minLength": 1 }
|
|
},
|
|
"required": ["kind", "operation"],
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"kind": { "type": "string", "const": "inspect_timeout_state" },
|
|
"operation": { "type": "string", "minLength": 1 },
|
|
"timeout_ms": {
|
|
"type": "integer",
|
|
"exclusiveMinimum": 0,
|
|
"maximum": 9007199254740991
|
|
}
|
|
},
|
|
"required": ["kind", "operation", "timeout_ms"],
|
|
"additionalProperties": false
|
|
}
|
|
]
|
|
},
|
|
"details": {
|
|
"type": "object",
|
|
"propertyNames": { "type": "string" },
|
|
"additionalProperties": {}
|
|
}
|
|
},
|
|
"required": ["code", "category", "message", "retryable", "remediation"],
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"code": { "type": "string", "const": "artifact_integrity_mismatch" },
|
|
"category": {
|
|
"type": "string",
|
|
"enum": [
|
|
"invalid_input",
|
|
"unsupported_provider",
|
|
"unsupported_target",
|
|
"integrity_mismatch",
|
|
"truncated",
|
|
"cancelled",
|
|
"timeout",
|
|
"resource_constraint",
|
|
"unavailable",
|
|
"execution_failure"
|
|
]
|
|
},
|
|
"message": { "type": "string", "minLength": 1 },
|
|
"retryable": { "type": "boolean" },
|
|
"remediation": {
|
|
"type": "object",
|
|
"properties": { "action": { "type": "string", "minLength": 1 } },
|
|
"required": ["action"],
|
|
"additionalProperties": false
|
|
},
|
|
"recovery": {
|
|
"oneOf": [
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"kind": { "type": "string", "const": "inspect_input_contract" },
|
|
"operation": { "type": "string", "minLength": 1 }
|
|
},
|
|
"required": ["kind", "operation"],
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"kind": { "type": "string", "const": "inspect_timeout_state" },
|
|
"operation": { "type": "string", "minLength": 1 },
|
|
"timeout_ms": {
|
|
"type": "integer",
|
|
"exclusiveMinimum": 0,
|
|
"maximum": 9007199254740991
|
|
}
|
|
},
|
|
"required": ["kind", "operation", "timeout_ms"],
|
|
"additionalProperties": false
|
|
}
|
|
]
|
|
},
|
|
"details": {
|
|
"anyOf": [
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"logical_path": { "type": "string" },
|
|
"declared_sha256": { "type": ["string", "null"] },
|
|
"calculated_sha256": { "type": ["string", "null"] },
|
|
"unpacked": { "type": "boolean" }
|
|
},
|
|
"required": [
|
|
"logical_path",
|
|
"declared_sha256",
|
|
"calculated_sha256",
|
|
"unpacked"
|
|
],
|
|
"additionalProperties": {}
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"logical_path": { "type": "string" },
|
|
"algorithm": { "type": "string", "const": "md5" },
|
|
"declared_md5": {
|
|
"type": "string",
|
|
"pattern": "^[a-f0-9]{32}$"
|
|
},
|
|
"calculated_md5": {
|
|
"anyOf": [
|
|
{ "type": "string", "pattern": "^[a-f0-9]{32}$" },
|
|
{ "type": "null" }
|
|
]
|
|
},
|
|
"unpacked": { "type": "boolean" }
|
|
},
|
|
"required": [
|
|
"logical_path",
|
|
"algorithm",
|
|
"declared_md5",
|
|
"calculated_md5",
|
|
"unpacked"
|
|
],
|
|
"additionalProperties": {}
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"logical_path": { "type": "string" },
|
|
"algorithm": { "type": "string", "const": "dfu-crc32" },
|
|
"declared_crc32": {
|
|
"type": "string",
|
|
"pattern": "^[a-f0-9]{8}$"
|
|
},
|
|
"calculated_crc32": {
|
|
"anyOf": [
|
|
{ "type": "string", "pattern": "^[a-f0-9]{8}$" },
|
|
{ "type": "null" }
|
|
]
|
|
},
|
|
"unpacked": { "type": "boolean" }
|
|
},
|
|
"required": [
|
|
"logical_path",
|
|
"algorithm",
|
|
"declared_crc32",
|
|
"calculated_crc32",
|
|
"unpacked"
|
|
],
|
|
"additionalProperties": {}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"code",
|
|
"category",
|
|
"message",
|
|
"retryable",
|
|
"remediation",
|
|
"details"
|
|
],
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"code": { "type": "string", "const": "artifact_operation_failed" },
|
|
"category": {
|
|
"type": "string",
|
|
"enum": [
|
|
"invalid_input",
|
|
"unsupported_provider",
|
|
"unsupported_target",
|
|
"integrity_mismatch",
|
|
"truncated",
|
|
"cancelled",
|
|
"timeout",
|
|
"resource_constraint",
|
|
"unavailable",
|
|
"execution_failure"
|
|
]
|
|
},
|
|
"message": { "type": "string", "minLength": 1 },
|
|
"retryable": { "type": "boolean" },
|
|
"remediation": {
|
|
"type": "object",
|
|
"properties": { "action": { "type": "string", "minLength": 1 } },
|
|
"required": ["action"],
|
|
"additionalProperties": false
|
|
},
|
|
"recovery": {
|
|
"oneOf": [
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"kind": { "type": "string", "const": "inspect_input_contract" },
|
|
"operation": { "type": "string", "minLength": 1 }
|
|
},
|
|
"required": ["kind", "operation"],
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"kind": { "type": "string", "const": "inspect_timeout_state" },
|
|
"operation": { "type": "string", "minLength": 1 },
|
|
"timeout_ms": {
|
|
"type": "integer",
|
|
"exclusiveMinimum": 0,
|
|
"maximum": 9007199254740991
|
|
}
|
|
},
|
|
"required": ["kind", "operation", "timeout_ms"],
|
|
"additionalProperties": false
|
|
}
|
|
]
|
|
},
|
|
"details": {
|
|
"type": "object",
|
|
"propertyNames": { "type": "string" },
|
|
"additionalProperties": {}
|
|
}
|
|
},
|
|
"required": ["code", "category", "message", "retryable", "remediation"],
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"code": { "type": "string", "const": "evidence_integrity_mismatch" },
|
|
"category": {
|
|
"type": "string",
|
|
"enum": [
|
|
"invalid_input",
|
|
"unsupported_provider",
|
|
"unsupported_target",
|
|
"integrity_mismatch",
|
|
"truncated",
|
|
"cancelled",
|
|
"timeout",
|
|
"resource_constraint",
|
|
"unavailable",
|
|
"execution_failure"
|
|
]
|
|
},
|
|
"message": { "type": "string", "minLength": 1 },
|
|
"retryable": { "type": "boolean" },
|
|
"remediation": {
|
|
"type": "object",
|
|
"properties": { "action": { "type": "string", "minLength": 1 } },
|
|
"required": ["action"],
|
|
"additionalProperties": false
|
|
},
|
|
"recovery": {
|
|
"oneOf": [
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"kind": { "type": "string", "const": "inspect_input_contract" },
|
|
"operation": { "type": "string", "minLength": 1 }
|
|
},
|
|
"required": ["kind", "operation"],
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"kind": { "type": "string", "const": "inspect_timeout_state" },
|
|
"operation": { "type": "string", "minLength": 1 },
|
|
"timeout_ms": {
|
|
"type": "integer",
|
|
"exclusiveMinimum": 0,
|
|
"maximum": 9007199254740991
|
|
}
|
|
},
|
|
"required": ["kind", "operation", "timeout_ms"],
|
|
"additionalProperties": false
|
|
}
|
|
]
|
|
},
|
|
"details": {
|
|
"type": "object",
|
|
"propertyNames": { "type": "string" },
|
|
"additionalProperties": {}
|
|
}
|
|
},
|
|
"required": ["code", "category", "message", "retryable", "remediation"],
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"code": { "type": "string", "const": "truncated" },
|
|
"category": {
|
|
"type": "string",
|
|
"enum": [
|
|
"invalid_input",
|
|
"unsupported_provider",
|
|
"unsupported_target",
|
|
"integrity_mismatch",
|
|
"truncated",
|
|
"cancelled",
|
|
"timeout",
|
|
"resource_constraint",
|
|
"unavailable",
|
|
"execution_failure"
|
|
]
|
|
},
|
|
"message": { "type": "string", "minLength": 1 },
|
|
"retryable": { "type": "boolean" },
|
|
"remediation": {
|
|
"type": "object",
|
|
"properties": { "action": { "type": "string", "minLength": 1 } },
|
|
"required": ["action"],
|
|
"additionalProperties": false
|
|
},
|
|
"recovery": {
|
|
"oneOf": [
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"kind": { "type": "string", "const": "inspect_input_contract" },
|
|
"operation": { "type": "string", "minLength": 1 }
|
|
},
|
|
"required": ["kind", "operation"],
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"kind": { "type": "string", "const": "inspect_timeout_state" },
|
|
"operation": { "type": "string", "minLength": 1 },
|
|
"timeout_ms": {
|
|
"type": "integer",
|
|
"exclusiveMinimum": 0,
|
|
"maximum": 9007199254740991
|
|
}
|
|
},
|
|
"required": ["kind", "operation", "timeout_ms"],
|
|
"additionalProperties": false
|
|
}
|
|
]
|
|
},
|
|
"details": {
|
|
"type": "object",
|
|
"propertyNames": { "type": "string" },
|
|
"additionalProperties": {}
|
|
}
|
|
},
|
|
"required": ["code", "category", "message", "retryable", "remediation"],
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"code": { "type": "string", "const": "process_capture_failed" },
|
|
"category": {
|
|
"type": "string",
|
|
"enum": [
|
|
"invalid_input",
|
|
"unsupported_provider",
|
|
"unsupported_target",
|
|
"integrity_mismatch",
|
|
"truncated",
|
|
"cancelled",
|
|
"timeout",
|
|
"resource_constraint",
|
|
"unavailable",
|
|
"execution_failure"
|
|
]
|
|
},
|
|
"message": { "type": "string", "minLength": 1 },
|
|
"retryable": { "type": "boolean" },
|
|
"remediation": {
|
|
"type": "object",
|
|
"properties": { "action": { "type": "string", "minLength": 1 } },
|
|
"required": ["action"],
|
|
"additionalProperties": false
|
|
},
|
|
"recovery": {
|
|
"oneOf": [
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"kind": { "type": "string", "const": "inspect_input_contract" },
|
|
"operation": { "type": "string", "minLength": 1 }
|
|
},
|
|
"required": ["kind", "operation"],
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"kind": { "type": "string", "const": "inspect_timeout_state" },
|
|
"operation": { "type": "string", "minLength": 1 },
|
|
"timeout_ms": {
|
|
"type": "integer",
|
|
"exclusiveMinimum": 0,
|
|
"maximum": 9007199254740991
|
|
}
|
|
},
|
|
"required": ["kind", "operation", "timeout_ms"],
|
|
"additionalProperties": false
|
|
}
|
|
]
|
|
},
|
|
"details": {
|
|
"type": "object",
|
|
"propertyNames": { "type": "string" },
|
|
"additionalProperties": {}
|
|
}
|
|
},
|
|
"required": ["code", "category", "message", "retryable", "remediation"],
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"code": { "type": "string", "const": "cleanup_incomplete" },
|
|
"category": {
|
|
"type": "string",
|
|
"enum": [
|
|
"invalid_input",
|
|
"unsupported_provider",
|
|
"unsupported_target",
|
|
"integrity_mismatch",
|
|
"truncated",
|
|
"cancelled",
|
|
"timeout",
|
|
"resource_constraint",
|
|
"unavailable",
|
|
"execution_failure"
|
|
]
|
|
},
|
|
"message": { "type": "string", "minLength": 1 },
|
|
"retryable": { "type": "boolean" },
|
|
"remediation": {
|
|
"type": "object",
|
|
"properties": { "action": { "type": "string", "minLength": 1 } },
|
|
"required": ["action"],
|
|
"additionalProperties": false
|
|
},
|
|
"recovery": {
|
|
"oneOf": [
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"kind": { "type": "string", "const": "inspect_input_contract" },
|
|
"operation": { "type": "string", "minLength": 1 }
|
|
},
|
|
"required": ["kind", "operation"],
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"kind": { "type": "string", "const": "inspect_timeout_state" },
|
|
"operation": { "type": "string", "minLength": 1 },
|
|
"timeout_ms": {
|
|
"type": "integer",
|
|
"exclusiveMinimum": 0,
|
|
"maximum": 9007199254740991
|
|
}
|
|
},
|
|
"required": ["kind", "operation", "timeout_ms"],
|
|
"additionalProperties": false
|
|
}
|
|
]
|
|
},
|
|
"details": {
|
|
"type": "object",
|
|
"propertyNames": { "type": "string" },
|
|
"additionalProperties": {}
|
|
}
|
|
},
|
|
"required": ["code", "category", "message", "retryable", "remediation"],
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"code": { "type": "string", "const": "revision_conflict" },
|
|
"category": {
|
|
"type": "string",
|
|
"enum": [
|
|
"invalid_input",
|
|
"unsupported_provider",
|
|
"unsupported_target",
|
|
"integrity_mismatch",
|
|
"truncated",
|
|
"cancelled",
|
|
"timeout",
|
|
"resource_constraint",
|
|
"unavailable",
|
|
"execution_failure"
|
|
]
|
|
},
|
|
"message": { "type": "string", "minLength": 1 },
|
|
"retryable": { "type": "boolean" },
|
|
"remediation": {
|
|
"type": "object",
|
|
"properties": { "action": { "type": "string", "minLength": 1 } },
|
|
"required": ["action"],
|
|
"additionalProperties": false
|
|
},
|
|
"recovery": {
|
|
"oneOf": [
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"kind": { "type": "string", "const": "inspect_input_contract" },
|
|
"operation": { "type": "string", "minLength": 1 }
|
|
},
|
|
"required": ["kind", "operation"],
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"kind": { "type": "string", "const": "inspect_timeout_state" },
|
|
"operation": { "type": "string", "minLength": 1 },
|
|
"timeout_ms": {
|
|
"type": "integer",
|
|
"exclusiveMinimum": 0,
|
|
"maximum": 9007199254740991
|
|
}
|
|
},
|
|
"required": ["kind", "operation", "timeout_ms"],
|
|
"additionalProperties": false
|
|
}
|
|
]
|
|
},
|
|
"details": {
|
|
"type": "object",
|
|
"propertyNames": { "type": "string" },
|
|
"additionalProperties": {}
|
|
}
|
|
},
|
|
"required": ["code", "category", "message", "retryable", "remediation"],
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"code": { "type": "string", "const": "configuration_invalid" },
|
|
"category": {
|
|
"type": "string",
|
|
"enum": [
|
|
"invalid_input",
|
|
"unsupported_provider",
|
|
"unsupported_target",
|
|
"integrity_mismatch",
|
|
"truncated",
|
|
"cancelled",
|
|
"timeout",
|
|
"resource_constraint",
|
|
"unavailable",
|
|
"execution_failure"
|
|
]
|
|
},
|
|
"message": { "type": "string", "minLength": 1 },
|
|
"retryable": { "type": "boolean" },
|
|
"remediation": {
|
|
"type": "object",
|
|
"properties": { "action": { "type": "string", "minLength": 1 } },
|
|
"required": ["action"],
|
|
"additionalProperties": false
|
|
},
|
|
"recovery": {
|
|
"oneOf": [
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"kind": { "type": "string", "const": "inspect_input_contract" },
|
|
"operation": { "type": "string", "minLength": 1 }
|
|
},
|
|
"required": ["kind", "operation"],
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"kind": { "type": "string", "const": "inspect_timeout_state" },
|
|
"operation": { "type": "string", "minLength": 1 },
|
|
"timeout_ms": {
|
|
"type": "integer",
|
|
"exclusiveMinimum": 0,
|
|
"maximum": 9007199254740991
|
|
}
|
|
},
|
|
"required": ["kind", "operation", "timeout_ms"],
|
|
"additionalProperties": false
|
|
}
|
|
]
|
|
},
|
|
"details": {
|
|
"type": "object",
|
|
"propertyNames": { "type": "string" },
|
|
"additionalProperties": {}
|
|
}
|
|
},
|
|
"required": ["code", "category", "message", "retryable", "remediation"],
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"code": { "type": "string", "const": "target_unavailable" },
|
|
"category": {
|
|
"type": "string",
|
|
"enum": [
|
|
"invalid_input",
|
|
"unsupported_provider",
|
|
"unsupported_target",
|
|
"integrity_mismatch",
|
|
"truncated",
|
|
"cancelled",
|
|
"timeout",
|
|
"resource_constraint",
|
|
"unavailable",
|
|
"execution_failure"
|
|
]
|
|
},
|
|
"message": { "type": "string", "minLength": 1 },
|
|
"retryable": { "type": "boolean" },
|
|
"remediation": {
|
|
"type": "object",
|
|
"properties": { "action": { "type": "string", "minLength": 1 } },
|
|
"required": ["action"],
|
|
"additionalProperties": false
|
|
},
|
|
"recovery": {
|
|
"oneOf": [
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"kind": { "type": "string", "const": "inspect_input_contract" },
|
|
"operation": { "type": "string", "minLength": 1 }
|
|
},
|
|
"required": ["kind", "operation"],
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"kind": { "type": "string", "const": "inspect_timeout_state" },
|
|
"operation": { "type": "string", "minLength": 1 },
|
|
"timeout_ms": {
|
|
"type": "integer",
|
|
"exclusiveMinimum": 0,
|
|
"maximum": 9007199254740991
|
|
}
|
|
},
|
|
"required": ["kind", "operation", "timeout_ms"],
|
|
"additionalProperties": false
|
|
}
|
|
]
|
|
},
|
|
"details": {
|
|
"type": "object",
|
|
"propertyNames": { "type": "string" },
|
|
"additionalProperties": {}
|
|
}
|
|
},
|
|
"required": ["code", "category", "message", "retryable", "remediation"],
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"code": { "type": "string", "const": "execution_failure" },
|
|
"category": {
|
|
"type": "string",
|
|
"enum": [
|
|
"invalid_input",
|
|
"unsupported_provider",
|
|
"unsupported_target",
|
|
"integrity_mismatch",
|
|
"truncated",
|
|
"cancelled",
|
|
"timeout",
|
|
"resource_constraint",
|
|
"unavailable",
|
|
"execution_failure"
|
|
]
|
|
},
|
|
"message": { "type": "string", "minLength": 1 },
|
|
"retryable": { "type": "boolean" },
|
|
"remediation": {
|
|
"type": "object",
|
|
"properties": { "action": { "type": "string", "minLength": 1 } },
|
|
"required": ["action"],
|
|
"additionalProperties": false
|
|
},
|
|
"recovery": {
|
|
"oneOf": [
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"kind": { "type": "string", "const": "inspect_input_contract" },
|
|
"operation": { "type": "string", "minLength": 1 }
|
|
},
|
|
"required": ["kind", "operation"],
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"kind": { "type": "string", "const": "inspect_timeout_state" },
|
|
"operation": { "type": "string", "minLength": 1 },
|
|
"timeout_ms": {
|
|
"type": "integer",
|
|
"exclusiveMinimum": 0,
|
|
"maximum": 9007199254740991
|
|
}
|
|
},
|
|
"required": ["kind", "operation", "timeout_ms"],
|
|
"additionalProperties": false
|
|
}
|
|
]
|
|
},
|
|
"details": {
|
|
"type": "object",
|
|
"propertyNames": { "type": "string" },
|
|
"additionalProperties": {}
|
|
}
|
|
},
|
|
"required": ["code", "category", "message", "retryable", "remediation"],
|
|
"additionalProperties": false
|
|
}
|
|
]
|
|
}
|