* feat(managed): generate WPF's known BAML type and property IDs
BAML names WPF's own types, properties and strings by negative IDs. The
table is generated from KnownTypes.cs and Baml2006KnownTypes.cs at a
pinned dotnet/wpf commit, with the source digests recorded and the MIT
license preserved.
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* feat(managed): describe the BAML document report and its read budgets
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* feat(managed): decode BAML record streams into their element tree
Read the BAML 0.96 records WPF's Baml2006Reader reads, without loading
any type: the element tree with names, keys and code-behind connection
IDs; property values with their converters, markup extensions and known
binary serializers; dictionary keys and their static resources from the
deferred key section; bindings and resource references. WPF's own types,
properties and strings are named from the generated known-type table.
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* feat(analysis): summarize retained BAML documents
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* feat(managed): read BAML files through an identity-checked provider
The provider reads one bounded regular file and decodes it; a refusal at
max_records, max_elements or max_file_bytes names the budget to raise.
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* feat(managed): add the inspect_baml tool
CLI inspect-baml and MCP inspect_baml decode a WPF BAML document, such as
a view extracted from <Assembly>.g.resources, without loading WPF or the
document's assemblies. Large reports return the retained summary within
the agent budget.
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* feat(artifacts): point .NET resource sets with BAML views at inspect_baml
A resource set now proposes extraction, and inspect_baml when it holds
.baml members.
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* docs(managed): describe WPF BAML document inspection
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* docs(skill): route extracted BAML views to inspect_baml
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* ci: scope the BAML reader with the managed formats
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* build: expose the BAML provider and its identity as dotnet entry files
Composition constructs the provider and the capability declarations name
its identity, as they do for the managed static provider.
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* refactor(managed): fold BAML coverage through the coverage accumulator
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* refactor(managed): refuse oversized BAML files through the shared parse-limit owner
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* chore(schemas): record the advertised inspect_baml catalog summary
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* build: fetch the pinned WPF sources for the BAML known-type table
The generator now downloads KnownTypes.cs and Baml2006KnownTypes.cs at the
pinned dotnet/wpf commit and checks their recorded digests, instead of
reading a caller-supplied checkout, and runs as
npm run generate:wpf-baml-known-types. The regenerated table is unchanged.
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* test(managed): cover inspect-baml through the CLI and declare its conformance case
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* feat(artifacts): recognise BAML documents and route them to inspect_baml
A file that starts with the MSBAML FormatVersion header is a standalone
baml artifact; inspect_artifact proposes inspect_baml for it, as it does
for other formats a dedicated tool reads.
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* feat(managed): add a max_text_bytes budget for reported BAML text
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* fix(managed): bound BAML expansion and validate its nesting and dictionaries
- Every reported copy of a declared name counts against max_text_bytes,
so repeated references to one long name cannot expand without bound.
- The nearest open element is kept on its own stack, and a property or
constructor scope must open directly inside an element.
- Deferred content must fit its document and enclosing section; each
dictionary key's value position must start a value element.
- Bindings inside MultiBinding or PriorityBinding report the container's
target property.
- A test names WPF's known IDs by the literal numbers of the pinned source.
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* docs(managed): describe BAML recognition and the text budget
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* chore(schemas): record the inspect_baml max_text_bytes input
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* fix(managed): inherit BAML binding targets instead of walking ancestors
Each element records the binding target it inherits, so a binding inside
nested MultiBinding or PriorityBinding containers resolves its target in
constant time. TemplateBinding and resource-extension elements now also
charge their reported copies against max_text_bytes.
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* fix(managed): count declared BAML type and assembly names against the text budget
Every declared type reports its assembly's name, so many types can repeat
one long assembly name; those copies now count against max_text_bytes too.
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
---------
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* refactor(managed): read ManifestResource rows and the CLI Resources directory separately
Split a ManifestResource row's columns from its data, so a caller that
holds only the metadata can list resources, and let the CLI header prefix
report its Resources directory when it is read that far.
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* feat(artifacts): bound .NET assembly manifest resource admission
Add the dotnet_assembly reader limit group: the resource count follows the
session member count, and metadata bytes bound the CLI metadata read to
list ManifestResource rows.
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* feat(artifacts): locate a managed image's metadata and Resources directory
Read only the PE headers, section table and CLI header to find where a
managed image keeps its metadata and embedded manifest resources, so
recognition does not load the image.
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* feat(artifacts): list the manifest resources a .NET assembly embeds
Add the dotnet-assembly reader. It reads the ManifestResource rows from
the CLI metadata and lists each resource embedded in the Resources
directory as its stored bytes. Linked resources are named in the root
metadata, since their bytes live in other files.
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* feat(artifacts): open managed assemblies with embedded resources as containers
A PE whose CLI header declares a Resources directory, and that carries no
other package, now inventories as dotnet-assembly, so a WPF assembly's
.g.resources can be extracted and inspected as a resource set. Managed
inspection still leads its next probes; extraction follows.
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* docs(managed): describe resources embedded in a .NET assembly
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* docs(skill): route assemblies with embedded resources to extraction
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* ci: scope the .NET assembly resource reader with the managed formats
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* fix(artifacts): keep located managed directories inside the file
A section can declare raw data past the end of the file. A metadata or
Resources directory mapped there is now malformed at location, instead of
failing the later exact read.
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* fix(artifacts): report invalid manifest resource rows once
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* fix(artifacts): require a complete CLI header before locating managed directories
Check the declared header size against the 72-byte header and the CLI
directory, and that the whole header lies in the file, as the managed PE
reader does.
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* test(managed): build fixtures that embed several manifest resources
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* fix(artifacts): inventory manifest resource names as flat keys
Names such as `a` and `a/b` are distinct resources. Inventory keeps both,
as it does for resource set names; extraction still refuses to write
conflicting paths together.
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* feat(artifacts): add decode and retained-name controls for .NET assemblies
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* fix(artifacts): bound assembly resource names and keep readable rows
The metadata decode budget is now the group's representation_bytes
control, so a refusal names a field the caller can raise. Every listed
name counts against retained_name_bytes before output is built, since
rows can share one stored name. A row whose name cannot be read is
skipped and counted instead of refusing the whole assembly.
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* docs(managed): list the .NET assembly reader controls
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* refactor(artifacts): pass the classified managed location to the assembly reader
Classification carries the located metadata and Resources directory in a
typed admission for the same descriptor, so the reader does not locate
them again.
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* fix(artifacts): explain a damaged CLI Resources directory on extraction
Extraction now refuses such a PE with the location's reason instead of
reporting that the format has no reader. Inspection keeps the PE root,
where managed inspection reports the CLI header.
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* fix(artifacts): require the CLI header's declared size inside the file
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(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(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.
* feat(artifacts): inspect PlayStation PS-X EXE headers
A file starting with the PS-X EXE magic is inventoried as psx-exe. Root
metadata reports the initial PC and GP, the text, data and BSS ranges,
the stack base and offset with the initial SP, the region marker and
its licensed region, and whether the file length agrees with 0x800 plus
the declared text size. header.bin and text.bin are stored ranges;
text.bin carries its load address and holds only the bytes present.
A file shorter or longer than the declared text, or a text size that is
not a whole number of 2048-byte sectors, leaves coverage unknown with
the offset involved. A file that ends inside the header is refused as
truncated with the offset where it ends. Nothing is executed.
* fix(artifacts): read PS-X EXE fields through BinaryReader and match regions exactly
A region marker such as constructor matched an inherited property of the
region table, so the metadata held a function and inventory failed when
it was cloned. Regions now come from a Map. Header words are read
through BinaryReader instead of a local decoder. The fixture writes
literal offsets with distinct non-zero values, including data and a
stack offset, and the guide says inventory reads the members to hash
them.
* fix(artifacts): validate PS-X file sizes and name the omitted text member
* test(artifacts): extract PS-X EXE members in the reader test
* style(artifacts): format the PS-X reader test
---------
Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
* feat(native): identify Nim, Zig, GHC, OCaml and D toolchains
Add identify_native_toolchain, a static, read-only reader that reports
whether a local ELF, PE or thin or universal Mach-O image was built by
Nim, Zig, Haskell (GHC), OCaml or D, including stripped images without
a DWARF producer.
The reader searches a bounded part of the selected image for a fixed
table of runtime symbol names, runtime messages, mangled names, source
paths and producer strings, and returns each observed marker with its
file offset, section or segment, matched text and occurrence count.
Data sections are searched before bytes outside sections and before
instruction sections, so a bounded scan reaches strings first;
coverage reports the bytes examined.
The verdict is derived from the listed markers only: a language needs
two distinct markers, one strong. Conflicting, too few or no markers
give unknown, and a version is reported only when a marker states it.
* perf(native): order toolchain scan ranges in linear time
Intersect instruction sections with the bytes outside data sections in one pass, so an image with tens of thousands of sections does not take quadratic time before the scan starts.
* fix(native): bound stated toolchain versions and describe scan order
Track distinct versions per marker in a Set and list at most eight,
counting the rest in versions_omitted, so an image with many version
strings costs constant time per match and a bounded result. A candidate
reports a version only when exactly one was stated.
Describe max_scan_bytes and examined_bytes as a total in scan order
rather than a prefix from the image start, and place the chunk-boundary
test's marker across an actual read boundary.
* fix(native): keep every stated toolchain version in the report
* fix(native): bound stated toolchain version bytes before keeping them
* feat(native): make the stated version budget a per-call control
* fix(native): give no larger-limit retry once a toolchain control is at its maximum
* fix(native): do not match toolchain markers on truncated runs
* fix(native): keep exact markers on a final run at the image end
* style(native): format the toolchain changes
---------
Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
* feat(artifacts): inspect Game Boy and GBA ROM headers
Game Boy and Game Boy Color images (game-boy-rom) are claimed when at
least the first 24 bytes of the boot logo at 0x104 match, the half every
boot ROM compares. Root metadata reports the entry code and its JP
target, full or top-half logo match, title and manufacturer code, CGB
and SGB flags, mapper and features, declared ROM and RAM sizes,
destination, licensee codes, version, and declared and computed header
and global checksums. The global checksum is summed over the file in
bounded reads.
Game Boy Advance images (gba-rom) are claimed from an ARM branch at 0,
the fixed 0x96 at 0xB2, and the boot logo or a matching complement
check. Root metadata reports the entry branch target, logo match, title,
game and maker codes, fixed value, unit and device type, version, the
complement check, and the multiboot fields when that layout could apply.
Both serve header.bin and program.bin as stored ranges. Logos are
compared by SHA-256 digest, so no logo bytes are carried. Checksum,
logo and size disagreements leave coverage unknown; a header cut short
is refused as truncated with the offset where the file ends.
* fix(artifacts): keep missing GBA multiboot fields unknown and pin checksum vectors
A GBA file that ends inside the multiboot fields reported boot_mode and
slave_id as zero. They are now null, with a limitation naming where the
file ends. The Game Boy reader charges artifact_limits.expanded_bytes
from the file size before it sums the file for the global checksum.
Checksum tests now use hand-derived vectors instead of copying the
parser's own result.
* refactor(artifacts): read Game Boy and GBA header fields through BinaryReader
The GBA parser decoded words with a local reader that read missing bytes
as zero. Both parsers now read header fields through BinaryReader, as the
tool-design guide requires, after their length checks. The fixtures write
literal offsets instead of the parsers' field constants, and the guides
say inventory reads the stored members to hash them.
* fix(artifacts): read documented GB size codes and MBC4, refuse truncated GBA headers
* style(artifacts): format the handheld ROM test
---------
Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
* 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
* feat(build): add non-turbo source-build path for freebsd
* test(build): keep direct-build coverage runnable without turbo and reap build children
* test(build): use processTest fixture and long-running tag for build tests
---------
Co-authored-by: Ysopwnable <161784452+N0zoM1z0@users.noreply.github.com>
* feat(setup): register Mistral Vibe CLI client
* fix(setup): preserve inline Vibe entry order and reject non-boolean enable_mcp on read
* fix(setup): report duplicate Vibe registrations in doctor and preserve separated subtables
* docs(setup): record the Mistral Vibe 3.2.0 registration check
Mistral Vibe 3.2.0 on Linux loaded the setup registration through its
configuration schema and discovered REA's tools over stdio. After its own
`vibe mcp add` rewrote the file, setup made no change and uninstall removed
only the REA entry.
Co-Authored-By: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
---------
Co-authored-by: gensokyo-dev <gensokyo-dev@users.noreply.github.com>
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* fix(session): never overwrite the open target with a snapshot or bundle
* test(session): cover a hard-linked target and own the test directory cleanup
* fix(setup): derive client deadlines from one record per client
Each supported client definition now declares the MCP deadlines it applies
to REA's server: key, unit, built-in default, maximum, coverage and whether
progress resets it. Setup raises a shorter or missing deadline to REA's
recommendation within the client's maximum and keeps a longer one; doctor
reports the same shortfall from the same record. Cline, Zed, Antigravity,
Hermes, Goose and Gemini CLI gain deadlines; the codex/kimi/grok/dsh name
branches, the Goose timeout literal and the per-client startup constants
are removed.
Refs #15337
* fix(setup): keep a raised Goose timeout over a short inherited one and expect Antigravity's deadline
* docs(cline): explain heap exhaustion and how to raise each heap
A JavaScript heap out-of-memory error under Cline over Remote-SSH usually
comes from VS Code's extension host, which keeps every tool result for the
task, not from REA. Name which process it is, how to raise each heap, and the
regex worker side effect of raising REA's.
Refs #15330
* docs(cline): add NODE_OPTIONS to the existing launch env, inside nested transport
Discover the OpenCode system and managed layers and honor their effective
MCP policy when planning, publishing, diagnosing, or removing registrations.
Preserve the writable layer's dialect and verify effective registration
and policy after publication.
Fixes#15036.
Assisted-by: Kogasa (gensokyo-skills:kogasa-surprise-testing)
Co-authored-by: N0zoM1z0 <161784452+N0zoM1z0@users.noreply.github.com>
Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>
* docs: keep onboarding and recovery text plain for everyone
AGENTS.md now asks for jargon-free onboarding, setup, update and recovery text, and the installation guide describes the npx cache repair.
* docs(agents): ask for understandable onboarding text
installation.md said a registration pointing at a different installation
path is foreign, so setup blocks until the entry is renamed or removed.
Setup treats a launcher of another installed rea-agents package as owned
with a stale state and migrates it to the selected installation. Scope the
foreign sentence to launchers that do not prove REA ownership.
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
* feat(mcp): advertise each tool's family in tools/list _meta
Clients that index a large catalog lazily had to guess each REA tool's
group from its name. Every tools/list entry now carries the contract's
adapter family under the vendor-prefixed _meta key
"io.github.morluto/rea", attached once at the contract-to-registration
boundary. The recorded catalog replays it unchanged on the deferred path.
No tool is hidden or renamed and input schemas are unchanged.
Closes#6870
* refactor(mcp): advertise the selectable family id in tools/list _meta
Since #7228 the contract-owned family inventory gives every tool one
selectable id, the vocabulary REA_MCP_TOOL_FAMILIES accepts. Advertise
that id instead of the adapter kind so clients can map an advertised tool
back to the scope that enables it.
* fix(mcp): omit family metadata for contracts outside the inventory
Renamed test fixtures have no published family; advertise nothing for
them instead of throwing. Drop the docs claim that a family move changes
the catalog digest, since the digest hashes the adapter kind.
* docs(mcp): scope family _meta promise to domain tools; pin catalog env in test
---------
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
* fix(setup): do not persist versioned launcher paths
A command saved from nvm, Volta, Homebrew Cellar, mise, or a package cache stops launching after an upgrade or prune, and doctor then treats that registration as foreign.
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix(setup): recognize default nvm installation layouts
The usual POSIX install is ~/.nvm/versions/node, and nvm-windows stores each release in nvm\v<version>. Both were still saved, and the launcher guide still told setup to keep a cache path.
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix(setup): keep durable Windows and mise launcher paths
Default Windows Volta and pnpm dlx stores were still persisted, and mise's stable latest alias was dropped before the Aube launcher could use it.
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix(setup): keep a mise shim when Node itself is versioned
A versioned running runtime was rejected before a durable Node alias could be selected, and fnm's installed tree was still saved. Doctor now tells version-manager and package-cache paths apart from a session directory.
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix(setup): reject versioned aube store targets and align install routes
Reject version-tagged node_modules/.mise store targets beneath mise latest aliases (while keeping verified outer Aube shims), reject asdf/nodenv/nvs/nix/snap versioned paths, fix the nvm-sensitive Windows runtime assertion in setupLauncherAlias tests, and align installation docs, install.sh, and getting-started guidance with durable-path registration.
* fix(setup): recognize custom manager env roots and align onboarding docs
Pass environment through versionedLauncherPath and transientLauncherRemediation so custom version-manager env roots are classified accurately while preserving fnm_multishells as a session path; fix Windows PowerShell rea.cmd and Linux PATH persistence in get-started; align remaining setup quick starts and affected setup acceptance/boundary tests.
* fix(setup): reject session paths and configured package caches
Windows fnm session directories and custom npm or Bun cache roots were still eligible for client registration. Quick starts now require a durable Node install, and the website setup copy no longer uses a PowerShell-invalid command chain.
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix(setup): resolve configured launcher roots
* docs(setup): align persistent launcher prerequisites
* docs(setup): persist paths in Bash login profiles
* fix(setup): name the missing saved launcher path
* fix(setup): reject Bunx execution-cache launchers
* docs(setup): add writable npm prefix prerequisite
* style(website): format prefix prerequisites
* chore(website): format setup introduction
---------
Co-authored-by: Ambuj Agrawal <aseachambuj@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
* fix(devicetree): read later FDT versions backwards compatible with v17
The header reader admitted only versions 16 and 17 and consulted
last_comp_version only to reject a value above the version. DTSpec 5.1
requires a client to accept any version backwards compatible with
version 17, and libfdt reads such a blob with the version 17 header.
Admit a later version whose last_comp_version is 17 or lower and read it
with the version 17 layout, reporting the declared version. A later
version that needs a newer reader and any version below 16 stay
unsupported, and v16 and v17 outcomes are unchanged. FIT recognition
shares the reader, so it now claims a FIT in such a version as well.
* test(devicetree): cover a later FDT version backwards compatible with v17
Parse the shared fixture with version 18 and last_comp_version 16: the
header is read with the version 17 layout and the tree decodes as it
does for v17. Raising last_comp_version to 18 keeps the blob
unsupported. FIT recognition, which shares the header reader, covers
the same version.
On the previous reader the version 18 parse and the version 18 FIT
recognition fail, because version 18 was refused before
last_comp_version was read.
* docs(devicetree): describe later FDT versions backwards compatible with v17
* test(devicetree): keep the unsupported-version cases on an incompatible header
The CLI and MCP error cases used version 18 as an arbitrary unsupported
version, but their fixture declares last_comp_version 16, which is now
read as a version 17 blob. Declare last_comp_version 18 there so both
cases still reach unsupported_target through the public paths.
The shared fixture takes the declared compatibility version for this,
and the parser case uses it instead of patching the header word.
* test(devicetree): cover compatible versions through CLI and MCP
---------
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
* chore(main): release rea-agents 6.11.0
* chore(release): finalize REA 7.0.0 notes and metadata
* chore(release): format the 7.0.0 contribution inventory
* docs(release): highlight firmware and embedded CPU support
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* fix(setup): honor KIRO_HOME for the Kiro user configuration
* fix(setup): fall back when KIRO_HOME is any filesystem root
The ancestor check compared the selected root against home with
path.relative, which returns an absolute path across drives, so a
KIRO_HOME of D:\ or a UNC share root was accepted while Kiro itself
falls back to ~/.kiro. Check the selected path against its own root
separately, and document the override in the client configuration
guide.
* test(setup): clear KIRO_HOME from lifecycle test environments
The client-location scrubber omitted KIRO_HOME, so lifecycle tests
calling supportedClients/detectClients and systemUninstallHost with
the default process.env could resolve a runner-exported KIRO_HOME
outside their temporary home and touch the real Kiro registration.
* fix(setup): resolve Kiro home aliases before selecting a profile
* refactor(setup): use the captured host platform for Kiro path checks
---------
Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
* fix(ghidra): list compatible installed JDKs in doctor remediation
* refactor(ghidra): derive doctor JDK candidates from installation admission
Candidate discovery now consumes the installation's parsed Java
requirement, its Java-side admission (bounds, 64-bit JDK, and the
os.name/os.arch native directory), its bounded probe environment, and
its PATH and Homebrew enumeration instead of re-deriving them.
- Expose javaRequirement on the installation inspection; doctor read a
field that did not exist, so discovery never ran.
- Search only when configuration passed and the Java probe failed.
- Enumerate macOS JavaVirtualMachines roots instead of running
java_home, removing the unowned listing subprocess.
- Add PATH launchers on every platform, including Windows java.exe.
- Filter Homebrew formulae before selection and drop the fixed entry
and probe caps; realpath deduplication bounds probes by distinct JDKs.
- Propagate cancellation from aborted searches and failed probes.
- Report candidates as structured compatible_jdks details.
* refactor(ghidra): share installation discovery seams with JDK candidates
* refactor(ghidra): name discovered JDKs as the Java remediation
When doctor finds compatible JDKs, the remediation names them instead of
appending them to the generic selection advice. Document the search and
details.compatible_jdks.
* refactor(ghidra): split installation inspection into owned modules
GhidraInstallation.ts gathers installation facts; the judgments and
helpers move to their owners:
- GhidraInstallationChecks: configuration, version, headless, native
decompiler, and Java checks and their remediation.
- GhidraJavaSelection: JVM selection, probing, and Homebrew fallback,
extracted from installationCoordinates, plus the Java helpers that
JDK discovery shares.
- GhidraNativePlatform: native directory tables, decompiler header
assessment, and JVM os.name/os.arch mapping.
- GhidraInstallationPathDiscovery: Ghidra launcher discovery on PATH.
- GhidraExecutableHeaderProbe now lives with its producer.
Java selection resolves the PATH launcher on every platform, so the
installation records the absolute command it probed. JDK discovery
then recognises it and does not launch the same Linux JVM twice.
---------
Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
* fix(setup): read Devin project MCP configuration
Devin loads .devin/mcp_config.json and .devin/mcp_config.local.json from
the working directory up to the nearest .git or .jj, above the user file.
A local file outranks every shared file, and a nested directory outranks
its ancestors. REA only read the user file, so doctor judged it while
Devin ran a project entry, and project uninstall skipped Devin.
Return Devin's project candidates in that order, evaluate them with
whole-definition replacement, and include Devin in project uninstall.
Setup still writes only the user file.
Fixes#15041
* fix(setup): apply Devin precedence by directory
---------
Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
* fix(setup): read Amp workspace MCP settings
Amp reads the nearest .amp/settings.json or .amp/settings.jsonc from the
working directory up to the repository root (only the working directory
outside a Git repository), and a workspace amp.mcpServers entry takes
precedence over the user entry with the same name. REA only read
~/.config/amp/settings.json, so doctor and setup judged a registration
Amp does not run and project uninstall left the workspace row in place.
The effective registration reader now admits Amp's workspace layer and
selects one whole server definition per name. Both workspace files in
the same directory are refused, as for the user settings, because Amp
does not document which one wins. Project uninstall includes Amp.
Fixes#15037
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(setup): share Amp settings names and the existence check
Reuse one existence check for OpenCode's user path and Amp's workspace
walk, name the Amp settings files once, and name the formats whose
effective registration includes project layers.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* docs(setup): describe Amp workspace settings selection
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(setup): honor Amp workspace selection and approval scope
* fix(setup): retain Amp launcher repair alongside approval guidance
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
* fix(setup): support Antigravity workspace .agents/mcp_config.json
* fix(setup): verify Antigravity project writes and repository lookup
* fix(setup): confine project registration to the selected workspace
* fix(mcp): enforce write scope for every project registration
* test(setup): use existing project root in Kilo layer conflict test
---------
Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
* fix(setup): report Mastra Code's MASTRACODE_DISABLE_MCP switch
Mastra Code reads MASTRACODE_DISABLE_MCP at startup and stops loading every
MCP source. REA's client table has no such fact, so doctor kept reporting
~/.mastracode/mcp.json as aligned while Mastra started no server, and setup
rewrote a registration the running client ignores.
readClientPolicyBlock now answers for mastracode through a small module of
its own. The value is truthy only for 1/true/yes/on, case-insensitively
and after trimming, matching Mastra Code's isTruthyEnv. Doctor, setup's
inspect/configure and mcp add pass the launcher environment they already
resolve, so a supplied environment decides the outcome instead of the host
process.env.
The documented load order also lists the project .mcp.json, which this
change does not read yet; #15038 stays open for that half.
Tests: mastracodePolicySources (13, new) covers the value table;
mastracodeDisabledRegistration (2, new) covers status, setup refusal and
an unchanged file; geminiPolicySources (4) and setupPolicySnapshot (7)
still pass. check:fast is green across 3328 files. The CLI boundary suite
mcpAddClientPolicy needs a compiled dist/cli-runtime and was not run.
Refs #15038
(cherry picked from commit 4e5ea523f4a4c3040c7d172758558fb6a0241966)
* fix(setup): enforce the Mastra flag for project MCP registration
* style(test): format Mastra MCP regression
* test(doctor): prove the Mastra disable policy gates a valid launcher
---------
Co-authored-by: 2SinceJuly <202121119+2SinceJuly@users.noreply.github.com>
* fix(setup): honor Claude Code local managed MCP policy
* test(setup): cover Claude project registration under managed MCP
* fix(doctor): report Claude name denies before missing config