Files
reverse-engineering-anything/licenses
Ysopwnableandgensokyo-dev e5945805a4 feat(managed): inspect WPF BAML documents (#17167)
* 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>
2026-12-06 03:17:31 +08:00
..

Preserved licenses and attribution

Start with THIRD_PARTY_NOTICES.md for the distinction between distributed material and separately obtained tools. These files retain upstream texts; they do not change REA's MIT license.

Files Provenance and scope
npm-dependencies.txt Every package path in the root lockfile, with its exact version, declared license, scope, download URL, and integrity. Includes development and optional platform entries.
npm-runtime-notices.txt Original license, copyright, and NOTICE texts collected from integrity-verified locked runtime npm archives across all platforms; also the license of Rolldown's generated runtime helpers. The archive manifest's name and version are checked.
protobuf-es-v2.17.0-LICENSE.txt Original Apache license omitted from the protobuf-es npm archive, preserved from its v2.17.0 source commit. Its embedded Google BSD notice is retained in npm-runtime-notices.txt.
microsoft-uf2-MIT.txt Unchanged LICENSE.txt from microsoft/uf2 revision cf3bd7f9c274b949528f8cd6a19eef2502a687d2, for the UF2 family names copied from its utils/uf2families.json.
nativeaot-parser-MIT.txt Original Washi notice for derived NativeAOT parser code; source revision is recorded in the parser and the root notices.
dotnet-runtime-MIT.txt Original .NET Foundation MIT text from the NativeAOT reference revision a3b2d40328be0be3f8dd43f0e5cc925b8827b044.
ghidra-12.2-{LICENSE,NOTICE,DISCLAIMER}.txt Unchanged top-level documents from Ghidra_12.2_build. The public zip omits NOTICE and DISCLAIMER; those two copies come from the tag. Ghidra is not bundled; these reference copies do not replace its component and GPL support-program notices. The US-government-specific disclaimer applies to Ghidra, not to REA.
cfworker-MIT.txt, xterm-MIT.txt, napi-rs-MIT.txt Original notices missing from their published runtime npm archives, recovered from upstream Git revisions. They are included in the corresponding runtime entries.
Apache-2.0.txt, MIT-template.txt Standard license texts for explicitly documented upstream notice gaps. The MIT placeholders are not an attribution to an inferred author or year.
frida-17.23.2-COPYING.txt, LGPL-2.0.txt Unchanged licensing supplements for the optional Frida dependency: tagged Frida wxWindows notice and GNU Library GPL v2 text. The npm archive and tagged Node binding omit a standalone license/copyright document; these texts do not recover binding or prebuild-component attribution.
MinGW-w64-runtime.txt Upstream's combined runtime copyright and license notices, snapshot from v12.0.0, for the statically linked Windows addon. This is a notice snapshot, not a pin of the compiler used in release CI.
GPL-3.0.txt, GCC-Runtime-Library-Exception-3.1.txt Unchanged GPLv3 and GCC runtime exception texts from GCC 14.2.0. The exception permits eligible compiled combinations under its conditions; the runtime keeps its own license. This snapshot does not assert that every release uses GCC 14.2.0.
Node-22.19.0-LICENSE.txt The original Node 22.19.0 license and third-party notices. The Windows addon uses Node-API headers from that release; the complete Node runtime and all components listed in this reference document are not bundled.
upstream-sources.json Source URLs and SHA-256 digests for the new unchanged reference and supplemental texts. These digests identify the preserved local texts.

Additional preserved originals live at evmole/LICENSE, pwndbg/LICENSE.md, and the website dinosaur notice.

Collection scope and maintenance

The inventory and runtime texts were prepared from the root lockfile. The collection downloaded the locked npm archives, checked their lockfile integrity and package identity, and read license/NOTICE/copyright documents without installing packages or executing lifecycle scripts. It includes optional platform packages that may not be present in one local installation. Temporary archives were removed after collection.

The incur@0.6.1 notice remains for the CLI code derived from that release, even though Incur is no longer an npm dependency. Its preserved MIT text and the copyright headers in the derived source remain unchanged. Other remaining runtime archive identities and notices are unchanged by this removal.

For releases that omit original documents, the collection uses pinned upstream texts, embedded source/README license sections, or the same release's parent notice for the @lydell/node-pty prebuilt family. clean-git-ref@2.0.1, minimisted@2.0.1, and @napi-rs/lzma@1.5.3 (including its same-release prebuilt family) omit original copyright documents. These gaps remain explicitly identified in the runtime texts. Do not describe those entries as complete recovered attribution.

frida@17.23.2 also lacks an original standalone notice in its npm archive and tagged Node source. Its declared license and the preserved licensing supplements are recorded explicitly without inferring a copyright holder or year.

These records do not establish the legal accuracy of upstream metadata or prove that every upstream source-file attribution has been supplied in an archive. Review and refresh them when dependencies change; compare reference texts with the sources and SHA-256 digests in upstream-sources.json.

When updating engines, copied code, website assets, or the Windows release toolchain, review their actual upstream notices as well. The Linux MinGW-w64 compiler in release CI is not version-pinned by REA: compare its installed runtime/component notices with the retained snapshots and update them if they differ. Do not assume that a compiler change leaves redistribution requirements unchanged. Preserve applicable originals with any additionally bundled engine; top-level reference copies alone may not cover its entire distribution.

Generate the exact locked inventory with npm run licenses:generate. After refreshing verified runtime notices, update their header fingerprint to the generator's reported runtime_dependency_fingerprint, then run npm run licenses:check; docs:check also runs this check. It compares the inventory, runtime package identities, license declarations, archive URLs/integrity, runtime dependency fingerprint, and preserved reference digests. It does not verify legal completeness or replace inspection of original upstream notices.