Commit Graph
9744 Commits
Author SHA1 Message Date
Vincent Koc 865ab5819a refactor(json): reuse the shape inference UTF-8 decoder (#17360) 2026-12-06 10:35:29 +08:00
Vincent Koc a80b6b79a9 refactor(deno): reuse section UTF-8 decoders (#17363) 2026-12-06 10:34:36 +08:00
Vincent Koc a545387d46 refactor(doctor): share the runtime check result (#17361) 2026-12-06 10:33:43 +08:00
Vincent Koc 72d0ebdeba refactor(workflow): share profile revision selection (#17359) 2026-12-06 10:31:19 +08:00
Vincent Koc f092e98c2b refactor(guidance): resolve parents from the section index (#17357) 2026-12-06 10:31:11 +08:00
Vincent Koc 9088c8d426 refactor(reference): reuse the import UTF-8 decoder (#17356) 2026-12-06 10:31:03 +08:00
Ysopwnableandgensokyo-dev 2827a327d6 feat(desktop): suggest the resource, protobuf and UniFFI readers (#17338)
* feat(desktop): record embedded managed resources and UniFFI export names

The desktop scan now records a managed assembly's CLI Resources directory,
read on its own so an image that backs only the CLI header prefix records
nothing more than before, and searches a PE library's export directory (up
to 256 KiB) for UniFFI scaffolding names, keeping the namespace its
contract-version function names.

Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>

* feat(desktop): point resources, protobuf schemas and UniFFI engines at their readers

inspect_desktop_application now proposes inspect_artifact for assemblies
that embed manifest resources, counting localized satellite assemblies as
one deferred group; recover_protobuf_descriptors for the release's own
assemblies when Google.Protobuf ships with it; and inspect_uniffi_library
for libraries with UniFFI exports.

Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>

* test(desktop): cover the reader probes and the extra resource facts

Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>

* docs(desktop): describe the resource, protobuf and UniFFI probes

Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>

* fix(desktop): find UniFFI exports through the shared export reader

The scan read the export directory's declared range as text and searched it
with a regular expression. Size does not bound the exported names, the range
also holds padding and the DLL name, and the expression backtracked on
repeated prefixes. The scan now reads the names with the export parser
inspect_native_exports uses, through the desktop's budgeted reader, and
matches each name with fixed prefix and suffix checks. Libraries above 8,192
names or 256 KiB of export data, and malformed export directories, are
skipped.

Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>

* fix(desktop): classify resource and UniFFI facts once and keep ownership first

The fact classifier now records manifest resources and UniFFI exports, so
its switch covers every fact kind. Managed probes come from one loop:
assemblies the release names as its own keep all their probes, satellite
assemblies are deferred for both operations, and an assembly's probes stay
together.

Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>

* test(desktop): cover unmarked libraries and satellite deferral

Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>

* docs(desktop): state the UniFFI export scan bounds and ownership precedence

Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>

* fix(desktop): yield and honour cancellation during the UniFFI export scan

The scan passed the export parser a pause that never yielded, and reads
served from cached blocks skipped the cancellation check. It now takes the
caller's pause, which yields to the event loop and checks the scan's abort
signal, at the parser's checkpoints and after every 64 reads. Bytes served
from cache are capped at 4 MiB, so repeated name pointers into the same
blocks end the scan instead of running unbounded.

Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>

* test(desktop): cover the UniFFI export scan's namespace and propagation

Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>

* test(desktop): list resource probes in the .NET ranking expectation

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 10:30:49 +08:00
Vincent Koc 5da1d3540a refactor(zip): share the entry name UTF-8 decoder (#17358) 2026-12-06 10:30:09 +08:00
Vincent Koc 94af21484f refactor(media): share the Opus vendor UTF-8 decoder (#17340) 2026-12-06 10:30:01 +08:00
Vincent Koc 79a0566aa1 refactor(web): reuse frame sibling accumulation (#17337) 2026-12-06 10:29:53 +08:00
Vincent Koc 5d98fdf66e refactor(web): reuse resource key derivation (#17334) 2026-12-06 10:29:44 +08:00
Vincent Koc 7d4dcedfe2 refactor(js): share the type-only import predicate (#17331) 2026-12-06 10:29:36 +08:00
Vincent Koc e545408b84 refactor(capture): reuse JSON slice detachment (#17335) 2026-12-06 10:28:39 +08:00
Vincent Koc e8549a3579 refactor(gradle): share version decoding defaults (#17333) 2026-12-06 10:28:32 +08:00
Vincent Koc ce23249888 refactor(web): share indexed module match rows (#17330) 2026-12-06 10:28:24 +08:00
Vincent Koc fa83020b60 test(svd): assert the inheritance measurement bound (#17353)
* test(svd): assert the inheritance measurement bound

* test(svd): isolate the numeric lower bound assertion
2026-12-06 09:59:09 +08:00
Vincent Koc 9db36ae19d test(pyc): share bytecode artifact fixtures (#17352) 2026-12-06 09:49:34 +08:00
Vincent Koc a016d88d50 test(vsix): share member-kind assertions (#17351) 2026-12-06 09:44:28 +08:00
Vincent Koc 613b66ba1c test(contracts): share input issue matchers (#17347) 2026-12-06 09:27:17 +08:00
Vincent Koc 7b8f6a6623 test(skills): share manifest metadata fixtures (#17344) 2026-12-06 09:17:50 +08:00
Vincent Koc fedff77917 test(dotnet): share heap ambiguity issue expectations (#17343) 2026-12-06 09:16:59 +08:00
morluto fbd895281c fix(setup): name the analysis tool to add and explain missing tools (#17297)
* fix(setup): name the analysis tool to add when none is ready

When no native analysis tool is ready, setup names the one to add for this
operating system and links its guide, and automatic provider selection says so
plainly. Its recovery lists only providers this host can run, explains each,
asks the agent to get the person's agreement before setting one up, and says
what REA can still do without one.

Fixes #17292

* fix(providers): explain missing tools and ask before setting them up

Each external tool's repair for a missing installation now starts with what
the tool is and what setting it up installs, from one domain table, and tells
the agent to ask the person before installing it. The no-ready-provider
recovery skips providers this host refuses or that refused the target, Kuna
reports an unsupported host before its unset command, and IDA's repair carries
its description in remediationAction. AGENTS.md notes that agents are the
primary users, with a person behind them who may not know what is missing.

* fix(android): keep JADX release metadata loadable from source

Pre-install fixture scripts import JadxRelease.ts directly, so it stays
dependency-free. JadxConfiguration adds the tool description where it reports
a missing JAR.

* fix(pcap): keep the tool refusal reason in the repair action

pcapToolUnavailable had set remediationAction to the shared tshark setup
text alone, so the projected action dropped the refusal reason while the
message kept only the bare steps. adb and apktool still project both as
`${reason}. ${toolSetupRemediation(...)}` through providerConfigurationRefusal.

The helper now puts that same combined text in userMessage and leaves
remediationAction unset, so the projection copies it into the action. The
pcap CLI tests assert the reason, the Wireshark steps, and the tshark setup
prefix in both fields.

* fix(pcap): carry the tool-setup repair on the refusal itself

The recovery guide requires each refusal to carry its remediation; shared
projection formats those facts and must not fill them in. pcapToolUnavailable
had left remediationAction unset so the action was copied from the message.

The helper now sets remediationAction to PCAP_TOOL_REMEDIATION and keeps the
reason in userMessage. providerConfigurationRefusal, which adb and apktool
use, does the same with the configuration's own repair. CLI tests check the
reason and the repair separately.

* test(android): expect the tool repair in remediation, not the message
2026-12-05 20:03:04 -05:00
Vincent Koc 2b5019ba03 refactor(desktop): share draft end value lookups (#17328) 2026-12-06 08:53:33 +08:00
Vincent Koc 89604e1310 test(evidence): share bundle comparison pair fixtures (#17336) 2026-12-06 08:51:12 +08:00
Vincent Koc b564b5e601 refactor(trace): share first-record header diagnostics (#17323) 2026-12-06 08:49:19 +08:00
Vincent Koc 693e8956d7 test(dwarf): share abbreviation table fixtures (#17332) 2026-12-06 08:46:46 +08:00
Vincent Koc 0550f5f0b4 refactor(desktop): reuse XML text ancestor order (#17317) 2026-12-06 08:43:43 +08:00
Ysopwnableandgensokyo-dev e5004c11ea feat(managed): recover protobuf descriptors from .NET assemblies (#17287)
* feat(managed): describe the protobuf descriptor recovery report and its budget

Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>

* feat(managed): recover protobuf descriptors from generated Reflection classes

Google.Protobuf's generated <File>Reflection classes build each
FileDescriptorProto in a static constructor that concatenates string
literals and passes them to System.Convert.FromBase64String. Read those
literals from the CIL in order, decode each site and keep the results that
parse as FileDescriptorProtos, byte for byte. A FileDescriptorSet lists
them dependencies first, with the well-known protobuf files they import;
other imports are named as missing. Literal characters count against
max_descriptor_bytes before they are joined. Nothing is loaded or run.

Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>

* fix(managed): report descriptor recovery refusals as parse failures

A metadata representation budget stops the whole call as a named limit,
including inside one static constructor; other managed reader refusals
become malformed or unsupported input.

Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>

* feat(managed): recover protobuf descriptors through an identity-checked provider

The provider reads one bounded managed assembly. A refusal at
max_descriptor_bytes, max_metadata_representation_bytes or
max_snapshot_bytes names the control to raise.

Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>

* feat(analysis): summarize retained protobuf descriptor recovery

Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>

* feat(managed): add the recover_protobuf_descriptors tool

CLI recover-protobuf-descriptors and MCP recover_protobuf_descriptors
return each embedded .proto file's package, imports, messages, enums and
services, and a FileDescriptorSet for decoding captured payloads. Large
reports return the retained per-file summary within the agent budget.

Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>

* test(managed): cover protobuf descriptor recovery through the service, MCP and CLI

The protoc-style assembly fixture moves to tests/fixtures so the unit,
MCP and CLI tests share it.

Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>

* docs(managed): describe protobuf descriptor recovery

Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>

* docs(skill): route Google.Protobuf assemblies to recover_protobuf_descriptors

Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>

* ci: scope protobuf descriptor recovery with the managed formats

Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>

* chore(schemas): record the advertised recover_protobuf_descriptors catalog summary

Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>

* fix(managed): attribute, bound and account for every descriptor search

- Static constructors are found among physical MethodDef rows and named by
  the shared ownership lookup, so a MethodPtr table cannot attribute a
  descriptor to the wrong type.
- A FileDescriptorProto's wire form is walked along its schema first, and
  every nested message it would create is charged to the representation
  budget before protobuf-es decodes it.
- A body whose CIL was not fully decoded, and malformed member lists, make
  coverage partial instead of looking searched.

Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>

* test(managed): build descriptor fixtures in protoc's String.Concat shapes

The fixture's static constructor now joins its literals through
String.Concat, as arguments or a string[], before calling
FromBase64String with its real static byte[](string) signature; the
managed PE fixture can name each MemberRef row. Tests cover both forms
and the descriptor tree bound.

Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>

* fix(analysis): sample missing imports in the protobuf descriptor summary

Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>

* docs(managed): save the descriptor set from complete delivery and fail on null

Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>

* fix(managed): name the descriptor nesting limit instead of rejecting deep files

The nesting cutoff is now the max_descriptor_depth control (100 by
default, up to 1,000). A deeper descriptor stops the call with a named
limit rather than being listed as not a descriptor, and protobuf-es
decodes up to the same depth so it cannot refuse what the walk admitted.

Co-authored-by: gensokyo-dev <342580529+gensokyo-dev@users.noreply.github.com>

* docs(managed): list the descriptor depth budget and record its schema

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 08:42:26 +08:00
Vincent Koc 108443db1d refactor(v8): derive printable run length from scan offsets (#17327) 2026-12-06 08:40:35 +08:00
Vincent Koc eed11027e9 test(native): share function body entry fixtures (#17329) 2026-12-06 08:39:24 +08:00
Vincent Koc 73c1127c04 test(analysis): share pseudocode page requests (#17326) 2026-12-06 08:38:30 +08:00
Vincent Koc 9f712309da refactor(desktop): classify added line checks in one pass (#17324) 2026-12-06 08:38:02 +08:00
Vincent Koc a14c07f96c refactor(nvs): share blob series lookup (#17318) 2026-12-06 08:37:06 +08:00
Vincent Koc b20928542c refactor(pcap): share DNS wire diagnostic text (#17320) 2026-12-06 08:36:01 +08:00
Vincent Koc 0e3eff3498 refactor(desktop): reuse added-element selector parsing (#17321) 2026-12-06 08:34:27 +08:00
Vincent Koc 3a4c156881 refactor(desktop): index unique positional key values directly (#17316) 2026-12-06 08:32:53 +08:00
Vincent Koc 0d425cc445 test(elf): share single-export fixtures (#17322) 2026-12-06 08:30:01 +08:00
Vincent Koc 5cdd0422df refactor(pickle): reuse decoded decimal operand text (#17308) 2026-12-06 08:24:44 +08:00
Vincent Koc eabe6b80dc test(esp): share flash layout plan fixtures (#17319) 2026-12-06 08:21:14 +08:00
Vincent Koc 84f20aec9f refactor(ptx): share version scanner comment states (#17315) 2026-12-06 08:19:10 +08:00
Vincent Koc ef979c6528 refactor(iso9660): derive primary volume type from its parser (#17313) 2026-12-06 08:13:36 +08:00
Vincent Koc 3e89e187fa refactor(python): reuse marshal container classification (#17311) 2026-12-06 08:11:20 +08:00
Vincent Koc 4cb19d6ede test(cyclonedx): share Rust report fixture (#17312) 2026-12-06 08:10:28 +08:00
Vincent Koc a024f7af19 test(dfuse): share single-target fixture construction (#17314) 2026-12-06 08:09:44 +08:00
Vincent Koc 0f8d2db0fc refactor(journal): share 128-bit header ID reads (#17309) 2026-12-06 08:08:26 +08:00
Vincent Koc a732f67dac refactor(managed): share member signature type decoding (#17306) 2026-12-06 08:05:00 +08:00
morluto 48eaa07b82 fix(setup): show a plain review of setup changes (#17241)
* fix(setup): show a plain review of setup changes

The approval screen printed each action's full disclosure paragraph,
registration command, detected provider environment and integrity hash.
Someone who is not a developer could not tell what they were approving.

The review now lists each change in plain words, the file or folder it
touches, any backup kept, and the download sources and commands of
software it installs. Full detail stays in `setup --dry-run --json`.

Refs #17236

* fix(setup): keep quit prerequisites and accurate verbs in the review

- Claude Desktop's instruction to quit fully before approval lived only
  in the action detail the review no longer prints. Setup now records it
  as a plain `prerequisite` on the action, and the review shows it before
  the change.
- `install` actions can replace an existing copy, such as a changed REA
  guide, so the review says "Adds or updates".
- The build-computer runtime action creates an archive; title it so.
2026-12-06 00:04:06 +00:00
Vincent Koc 13ffe9b42f refactor(native): share single-observation Mach-O UUID reconciliation (#17300) 2026-12-06 08:02:40 +08:00
Vincent Koc d635408d63 test(java): share Maven dependency block fixtures (#17305) 2026-12-06 08:01:59 +08:00
Vincent Koc 334e65a8cb refactor(elf): reuse classified note types for descriptor decoding (#17304) 2026-12-06 08:00:34 +08:00