* feat(managed): decode .NET resource set headers and values
Parse the ResourceManager and RuntimeResourceSet headers of a .resources
stream, its name table and each entry's type code and payload range, as
System.Resources.ResourceReader lays them out. Fixed-size primitives get a
decoded value; strings, byte arrays and streams are payload ranges;
serialized user types are named from the type table and never decoded.
The test fixture writes resource sets the way ResourceWriter does, and its
output is byte-identical to .NET Framework 4.8 ResourceWriter for the same
values.
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* feat(artifacts): bound .NET resource set admission
Add the dotnet_resources reader limit group: the resource count follows the
session member count, and the type count and header bytes bound what a
reader holds before it reaches the data section.
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* feat(artifacts): read .NET resource sets as members
Serve each named resource of a .resources stream as a member whose bytes
are one range of the set: a string's UTF-8 bytes, a byte array's or
stream's payload, or a primitive's stored bytes with its decoded value in
the entry metadata. Serialized objects are listed by type name. Names that
are not safe paths, malformed values, hash table damage and version 1 sets
are reported as limitations.
Entry heads are read through windows of the data section in offset order,
so a large set costs few reads.
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* feat(artifacts): recognize .NET resource sets for inventory and extraction
Claim a .resources stream by its 0xBEEFCACE magic and a usable
ResourceManager header, open it as an archive target, and register the
extractable dotnet-resources container so inspect_artifact,
extract_artifact and inventory views reach its members.
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* test(artifacts): cover .NET resource sets through the artifact provider
Open a resource set as a target, inventory its members with value facts,
extract payloads, and recover from a resource count limit.
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* docs(managed): document .NET resource set inventory
Describe how resource sets are recognized, what each member's bytes and
metadata hold, which values stay unknown, extraction, and reader admission.
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* docs(reference): list .NET resource set limits and compared metadata
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* docs(skill): route .NET resource sets to artifact inventory
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* refactor(managed): read resource set fields through BinaryReader
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* docs(skill): sync the Cursor plugin skill
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* test(artifacts): select the .NET resource count among explicit member counts
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* test(artifacts): resolve .NET resource limits from the member count setting
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* fix(managed): reject negative type codes and show Local dates as UTC instants
A version 2 type code decoded as a negative Int32 is malformed, so the
entry is omitted instead of failing the metadata schema. DateTime.ToBinary
stores a Local value's UTC instant, so it is shown with a Z suffix like a
Utc value. Name records are read without decoding, so callers can bound
decoded names.
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* feat(artifacts): bound retained .NET resource names
Count every decoded name, including names several table entries share,
against dotnet_resources.retained_name_bytes.
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* fix(artifacts): bound shared resource names and keep neighbors' data ranges
Entry data ranges now come from every record with a data offset, so an
entry whose name does not decode no longer extends its neighbor. Decoded
names are charged against retained_name_bytes; a set that exceeds it keeps
the members read before the limit.
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* fix(artifacts): inventory .NET resource names that collide as paths
Resource names are flat keys, so a and a/b are distinct resources. Inventory
lists both, as for PyInstaller, Bun and Deno members, and extraction still
refuses to write colliding destinations together.
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* docs(managed): describe resource name limits, flat keys and DateTime instants
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* refactor(managed): report resource set header failures through ParseFailureError
The header parser now throws the shared parse failure with the format,
offset and field: truncated with the available and required bytes,
unsupported for a set version ResourceReader does not read, limit naming
the exceeded artifact_limits.dotnet_resources field, and malformed
otherwise. Name and value decoders take the caller's BinaryReader instead
of allocating one per record, and the metadata schemas live in
formatMetadata.
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* fix(artifacts): report the full retained name requirement in bytes
The retained name refusal now names every reference's bytes, which are
known before decoding, so retrying with that value succeeds, and both byte
allowances report the bytes unit. The reader maps shared parse failures,
grows its header read on truncation inside the set, and holds one reader
per name section and data window.
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* ci: select the Apple artifact lane for .NET resource set changes
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* docs(cli): show .NET resource set inventory and extraction
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* docs(skill): describe .NET resource set members for agents
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
---------
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* feat(website): add a beginner's guide, case-study pictures and FAQ answers
Start the site in dark with the logo palette, and show the homepage case
studies as tabbed product images below the setup box. Add Contributors and
the X and Discord links near the top, and keep the star count from moving
the navigation after load.
Add a "New to AI agents?" guide, link it from the homepage, Get started,
Guides and every README edition, and link the case-study index, the reverse
engineering intro and the Ghidra and IDA guide from the READMEs.
Balance heading and paragraph wrapping, cap article text near 80
characters, add pictures to the case-study and blog indexes, fix skipped
heading levels in three case studies, and remove the small labels above
headings, keeping each target's name and version in its details line.
Add FAQ answers about coding experience, platforms, choosing an agent,
removing REA, copy protection and suspicious files, and reword the privacy
answer. All new text is translated into the 26 site languages.
Ignore local Impeccable design tool files.
* fix(website): keep the homepage tabs usable at the edges and without scripts
Show the tab row only once the script runs, so visitors without
JavaScript see the first picture and no controls that do nothing. Handle
Home and End on the first and last tab so they no longer scroll the page,
and stop the progress animation as soon as reduced motion is turned on.
* fix(ghidra)!: refuse Xtensa ELF unless .xtensa.info declares PC-relative literals
Ghidra's Xtensa language computes every L32R address from the instruction's
own address and never reads LITBASE, so a build with absolute (LITBASE)
literals decodes to wrong literal values and references without any sign of
error. Main admitted every Xtensa ELF without reading the build declaration.
Target resolution now reads the `.xtensa.info` note once, by section name,
and records its USE_ABSOLUTE_LITERALS and ABI declarations beside the header
facts. Ghidra admission refuses absolute literals and any declaration it
cannot establish, with architecture_unsupported and a reason that names the
declaration. Call0 builds stay admitted and carry a limitation naming the
calling-convention mismatch until a call0 lane assigns Ghidra's __call0
prototype. The header-selected language and profile from #11178 are kept.
The reader, note parser, fixture and real-Ghidra lane come from #7486; its
header gates, pinned language and separate guide page are not ported.
BREAKING CHANGE: Ghidra now refuses Xtensa ELF files whose .xtensa.info
section declares absolute literals (USE_ABSOLUTE_LITERALS=1), declares a
literal or ABI value other than 0 or 1, cannot be read, or is missing. Main
opened them and decoded every L32R as PC-relative. No setting restores the
old behavior.
* refactor(ghidra): move the processor dispatch out of the PSP profile
ghidraProcessorUnsupportedReason selects each architecture's profile for
every Ghidra target, so it now lives in GhidraProcessorAdmission.ts.
GhidraPspProfile.ts keeps only the Allegrex predicate and the PSPSDK
declaration checks, as ghidraPspUnsupportedReason. The callers' result
is renamed from mipsReason to processorReason.
* refactor(targets): read .xtensa.info through the shared ELF section walk
The .xtensa.info lookup had its own batched section-header loop and its
own cancellable file reader. It is now a declaration reader like the
RISC-V one: readXtensaElfDeclarations walks the headers with
visitElfSectionHeaders, and target resolution drives it with
readElfDeclarations, which owns the descriptor reads and cancellation.
The section-name table is copied in reads of at most 64 KiB, within the
driver's window.
The boundary tests drive the reader with a recording source for the
bounded-request check, and check cancellation through parseBinaryTarget
at the note payload read.
---------
Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
* feat(artifacts): inventory and extract ESP32 firmware images
ESP32-family app and bootloader images (magic 0xE9) had no reader, so
open_binary refused OTA downloads, app partitions and bootloaders.
Add the esp-image container format behind inspect_artifact and
extract_artifact. A pure decoder reads each byte once and keeps only
fixed-size fields. Derived facts cover the chip, from a table cited to
ESP-IDF v6.1; segment classification as ESP-IDF's should_map and
should_load; checksum and appended SHA-256 results; app and bootloader
descriptors; Secure Boot v2 signature blocks, observed and unverified;
and undescribed trailing byte ranges. Truncation and undescribed bytes
make coverage unknown. ESP8266 images are refused with a specific
reason, and ciphertext stays unrecognized.
Add the format to every target, Evidence, snapshot, live-summary and
artifact vocabulary, document it, and add an optional verify:esp-images
lane that compares esptool-built images with esptool image-info and
espsecure signature-info-v2.
Refs #3615
* test(artifacts): run the ESP image lane on esptool v5.6.0
The lane compared descriptor fields only when esptool image-info printed
one, so a descriptor that REA reports and esptool does not print passed
without comparison. Compare the descriptor kind in both directions.
Record that the lane passed for all 13 images with esptool and espsecure
v5.6.0, the version the layout facts cite, as well as with 4.12.0.
* refactor(artifacts): define ESP image layout sizes once
The decoder and the derived facts each defined the segment-header,
appended-digest and flash-sector sizes, the erased-byte scan and the
offset formatter. Define them once with the other fixed-layout structures
and import them in both places. The signature slot count is the one
constant that drives the slot scan.
Correct the observedEnd comment: it is the end of the last chunk read.
* fix(artifacts): report ESP-IDF's segment length limit by chip
ESP-IDF's verify_segment_header rejects a segment of 16 MiB or more
unless the chip maps flash through 32-bit cache addresses
(SOC_SPI_MEM_SUPPORT_CACHE_32BIT_ADDR_MAP: ESP32-S3, P4, C5, C61, H4 and
S31 in v6.1). Record that capability in the chip table and add a
limitation for such segments; unknown chips get none.
`loaded` repeats should_load. It does not mean the bootloader accepts the
segment: verify_load_addresses still rejects one outside the chip's RAM,
which REA does not model. Say so in the docs, the skill reference and the
inventory limitation.
* test(artifacts): check ESP lane tools first and verify extraction
The lane started work before checking its tools, so a missing RISC-V
target, ld.lld, esptool or espsecure surfaced as a raw spawn or command
error. Check each one before building and name the variable to set. Warn
when esptool is not v5.6.0, the release the layout facts cite.
Assert each segment's class for the ESP32-C3 app, its variants and the
bootloader, as the Xtensa image already did. Extract the app and the
signed image through the CLI and compare every file with the bytes at
esptool's segment offsets or in the appended signature sector; the
source's SHA-256 must be unchanged and equal the reported root_sha256.
* docs(artifacts): state what the ESP image lane does not establish
The Verification section listed the lane's checks but not its gaps: only
ESP32-C3 and ESP32 images come from a real producer, no real project
build, OTA download or flash dump is inspected, no signature is verified,
and the lane does not run in CI.
Record the timing of the final lane run on esptool v5.6.0.
* fix(artifacts): compare ESP segment declarations
Segment entries hash only their data, so compare_artifacts reported a
segment that moved to another load address with the same bytes as
unchanged; only the image itself changed. Compare each segment's
load_addr and data_len as its declaration, as Node SEA and PyInstaller
members are compared, and count a changed declaration as a metadata
change, also when content is unavailable.
Header offsets are layout and the classification is derived, so neither
is compared.
* test(artifacts): run ESP lane commands as owned process trees
The lane ran its tools through execFile. A timeout killed only the direct
child, so a linker or assembler that Clang or GCC had started could keep
running while the lane removed its workspace. Run every command through
createVerifierCommands, check the tools inside withVerifierCleanup, and
remove the workspace only after commands.close() has stopped every tree;
a failed close keeps the workspace.
Only a nonzero exit now counts as a refusal or an expected esptool
failure; timeouts and spawn failures propagate. Supervising each command
roughly doubles the lane's run time.
* test(artifacts): cancel ESP decoding after its first decoded chunk
The cancellation test requested cancel or close on setImmediate, which
can land while the file is still being opened and checked, so it never
showed that decoding had started. It also passed against a reader that
ignored both requests while decoding. Acknowledge the decoder's first
chunk, then cancel or close, join the operation, and assert that no
later chunk reaches the decoder and that the reader ends closed.
* docs(artifacts): record which ESP metadata comparison ignores
Segments are compared by their declaration. The image's and the
signature blocks' format_metadata are not: every field comes from their
own bytes, which content comparison already covers, and a block's
image_digest_matches follows the image's content.
* docs(artifacts): state that ESP mmu_page_size is a base-2 logarithm
The app descriptor's mmu_page_size keeps ESP-IDF's name and value, the
MMU page size in log base 2 as esp_app_desc_t declares it, so 16 means
64 KiB. Say so in docs/esp-image.md and the schema comment; a reader
could otherwise take 16 as 16 KiB.
* fix(esp-image): retain member consumption and share lifecycle regressions
* test(artifacts): scope MCP catalogs and budget full-schema validation
* test(artifacts): verify compact output profiles and document bounded catalogs
* test(artifacts): close readers when cleanup-test admission fails
* test(artifacts): compare ESP image limitations with their owners
The decoder and reader tests froze complete limitation sentences, so a
harmless rewording failed them. The wording now has two owners:
ESP_IMAGE_LIMITATIONS in espImageFacts.ts, which the decoder, the inventory
and the reader use, and ESP_DESCRIPTOR_LIMITATIONS beside the descriptor
decoder. Tests compare delivered limitations with the owner, called with the
facts each case establishes (segment index, declared and available bytes,
offsets, chip, page range), next to the structured assertions they already
make. Delivered text is unchanged.
* test(esp-image): assert structured facts and owned guidance
* fix(esp-image): keep spi_flash_mode and descriptor fields before a truncated tail
ESP-IDF v6.1's esp_app_desc_t declares spi_flash_mode at byte 181, after
mmu_page_size, as the committed reference layout shows; the descriptor now
keeps it as stored. The decoder also required all 256 descriptor bytes,
though it reads none past byte 181, so a file ending in the reserved tail
lost the version, project, digest and revision facts it does hold. The app
descriptor now needs only its fields; the segment's truncation is reported
as before.
* test(esp-image): pin the P-192 public key digest to espsecure's layout
espsecure packs ECDSA signature blocks as "<BBBx32sB64s64s1031x" and
zero-pads a 48-byte P-192 point to 64 bytes, so the signature starts at
byte 101 for every SHA-256 curve. signature_info_v2 hashes sig_block[36:101]
and _digest_sbv2_public_key the curve ID with the padded point. No test built
a P-192 block; this one checks public_key_sha256 against that definition.
* fix(esp-image): keep each app descriptor field the file holds in full
A file can end anywhere inside the 256-byte esp_app_desc_t. The decoder
needed every field byte, so a cut at byte 176 dropped the version, project
and app_elf_sha256 it does hold. Once the 4-byte magic identifies an app
descriptor, each field is now kept when the file holds all of its bytes and
is null otherwise; observed_length records where the descriptor ends, so a
cut field is told apart from text that is not UTF-8. The fields after the
magic become nullable in the metadata schema.
* fix(esp-image): report a signature block whose image digest does not match
A CRC-valid Secure Boot v2 block can carry another image's digest. The
block recorded image_digest_matches false, but no limitation said so, unlike
a checksum or appended-SHA mismatch, so CLI and MCP summaries showed only
the generic unverified note. The mismatch is now a limitation; coverage
stays complete and signature_status stays unverified. The three other
signature-sector limitations move into ESP_IMAGE_LIMITATIONS with their
text unchanged, so all ESP image wording has one owner.
* feat(artifacts): read ESP8266 images when the caller names the chip
An ESP8266 image shares the 0xE9 magic with ESP32-family images, and its
8-byte header does not name the chip, so REA still never detects one.
The caller now names it with one additive explicit format,
`esp8266-image`: `open_binary` `format`, or `--target-format` on
`inspect-artifact` and `extract-artifact`. The native `--target-format`
excludes it, because the target is an archive.
With the chip named, REA reads the file as esptool v5.6.0's
ESP8266ROMFirmwareImage does: the 8-byte header, the header-declared
segments and the XOR checksum seeded with 0xEF. The shared streaming
decoder takes the layout from the caller's format, and one domain function
admits the header for the resolver, inventory classification and the
decoder. Integrity, truncation and coverage follow the ESP32 rules where
they apply. Segments keep `esp-image-segment` metadata and its comparison
declaration, but their classification is always unknown, because ESP-IDF's
should_map and should_load do not describe the ESP8266 loaders. A segment
that esptool warns about, or that esptool would not write, gets a
limitation, which also shows when an ESP32-family image was named
ESP8266. Magic 0xEA (esptool's version 2) is refused as unsupported.
The auto-detection refusal now names the explicit format. Inventory and
extraction receive the caller's format, so byte classification does not
reclassify the root.
Contract: `esp8266-image` joins the explicit format, Evidence subject,
artifact graph, snapshot target and live summary enums, and
`format_metadata` gains the `esp8266-image` root kind. The ESP32 schemas
are unchanged: the shared checksum and byte-range shapes are separate
instances, so the advertised JSON Schema keeps them inline.
* fix(artifacts): name every ESP8266 route and own the caller's root format (panel review)
The refusal for an unnamed ESP8266 image told CLI users to pass
`--target-format esp8266-image`, which the native commands reject. It now
names `open_binary` `format` and the two artifact commands.
`CALLER_SELECTED_ROOT_FORMATS`, next to the explicit-format enum, owns the
formats whose root inventory must not reclassify. The CLI option, the
native exclusion, the artifact selection type and inventory derive from it,
and extraction derives the format from its input format instead of taking
a second field.
Other changes:
- The 8-byte common header has one parser.
- Reader messages name an ESP8266 image as one.
- The lane's version 3 digest check no longer assumes the digest begins
with a byte other than 0xFF.
- The docs no longer call the absent digest fields established, and no
longer claim that snapshots record the format. Artifact sessions cannot
be saved as snapshots.
- New tests cover esptool's segment-warning bounds.
- The lane passed with esptool v5.6.0 and 4.12.0.
* chore(plugin): regenerate the skill bundle from the authored skill
* refactor(firmware): format the ESP8266 magic byte with the shared byteToHex owner
Main's architecture guard admits no new inline byte-to-hex formatting; the
header refusal now uses src/kernel/byteToHex.
* chore(verify): record open_binary's input schema with esp8266-image
CI's package build compares the committed advertised-schema summaries with
the packaged catalog; regenerated with
`node scripts/verify-advertised-schemas.mjs --update-summary`.
* fix(artifacts): say how to read an ESP8266 image inside an ESP flash dump
A partition or bootloader region of an ESP flash dump that begins with an
ESP8266 image header carried the whole-file refusal, which tells the caller
to open "this file" as esp8266-image. Inside a dump that file is the dump.
The region now carries ESP8266_REGION_REFUSAL: extract the region, then
open the extracted file with format esp8266-image. Both refusals share the
reason ESP8266 images are never detected. The test follows that advice
through extraction and a named read, and fails with the old message.
* refactor(artifacts): skip ESP32-only decoder state for ESP8266 images
---------
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
* docs: rebuild the README around the website and real showcase images
Shorten the README to a hero, a short setup section and six showcase rows,
each with an image built from a real capture of its case study. Move setup
detail, the FAQ and updates to rea.tools, keep one Discord link, and remove
unsourced community and star numbers. Rewrite all 26 translations to match.
The in-page README link test now proves parsing by counting headings, since
a README may have no in-page links.
* docs: say the dinosaur speed grows while it is below 13
The recovered rule adds 0.001 only while the speed is below 13, so the
speed ends just above 13 rather than stopping at it. Match the homepage
wording in the README image, its alt text and all translations.