* feat(artifacts): inspect MetaTrader 5 EX5 program headers and resources
Recognize compiled MQL5 programs by their EX5 magic and inventory them
through inspect_artifact and extract_artifact. Report the program type,
compiler build, copyright/link/version property slots, nonzero header
fields of unknown meaning, and the resource table. List the opaque body
and resource payloads as stored byte ranges; nothing is decrypted,
decompressed or decompiled.
Refs #16495
* feat(artifacts): read MetaTrader 4 EX4 programs with the EX5 layout
EX4 (magic EX-) shares the EX5 header, property slots and resource
table, so both containers become one mql-program format with a
container field. The version slot is 64 bytes and the opaque body
starts at 0x2E8 in both containers; the earlier 0x3A8 header length
counted 192 opaque bytes as part of the version slot. EX4 type code 3
is a library; build is reported under a neutral name because its EX4
meaning is not established.
* fix(artifacts): bound repeated MQL resource ranges and let tar outrank printable magics
Resource records may share one payload range, and each occurrence is
hashed and extractable, so the reader now charges every record against
artifact_limits.expanded_bytes, as the DTBO reader does.
A checksum-valid tar header now runs before the recognizers that match a
printable magic at offset 0. A tar whose first member was named EX-...,
GDPC... or UnityFS was claimed as an MQL program, Godot PCK or UnityFS.
Slot text keeps a leading U+FEFF, which is declared content rather than
an encoding mark.
* fix(artifacts): refuse an invalid tar header only after leading-magic formats
Only a checksum-valid tar header outranks the printable leading magics. A
Godot pack can hold ustar at 257 inside its own content without a valid
tar checksum; refusing that header first rejected the valid pack.
* fix(artifacts): compare MetaTrader resource declarations
A resource's name, kind, record index and unpacked size live in the
resource table, outside the stored payload that content comparison
hashes, so a renamed resource compared as unchanged. Compare them as
the resource's declaration, as tar, ar and UnityFS members do.
* fix(artifacts): keep unreadable MetaTrader resource names unknown in comparison
* fix(artifacts): report an unrecognized file's leading bytes and working fallbacks
A file no format route recognizes was refused with only the raw-binary
load as recovery, which suits headerless machine code but not data
containers. The refusal now reports the file size and first 16 bytes,
names inspect_byte_entropy and inspect_yara_matches, which accept any
file, and keeps raw-binary for machine code. The REA skill gains a
workflow for continuing analysis when no route recognizes a file.
* docs(development): require recovery fallbacks to fit and accept the refused input
* docs(skill): describe entropy ranges as places to inspect, not content labels
FIT charged its images against the default expansion budget inside the
structure parser, ignoring a configured artifact_limits.expanded_bytes
and refusing without limit facts. The reader now charges every image,
including image-data links that repeat one range, through a helper the
DTBO reader also uses, and reports the standard expanded_bytes refusal.
The parser's untyped copy is removed.
* docs(development): add an artifact format guide and contributor skill
Document the files, registration points, parsing rules, limits, tests
and docs a new inspect_artifact format needs, and add a
rea-artifact-format skill for the judgment calls: establishing a layout
from samples, naming only established fields, and what a reader exposes.
* docs(development): correct artifact format registration and evidence guidance