[PR #1570] [MERGED] feat(native): return a retained summary view of binary layouts on request #2979

Closed
opened 2026-10-17 21:12:28 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/1570
Author: @kaoru0822-kitauji
Created: 10/10/2026
Status: ✅ Merged
Merged: 10/10/2026
Merged by: @kaoru0822-kitauji

Base: main ← Head: feat/summary-detail-native-layout


📝 Commits (1)

  • 2ef9d5d feat(native): return a retained summary view of binary layouts on request

📊 Changes

9 files changed (+119 additions, -31 deletions)

View changed files

📝 .agents/skills/reverse-engineer-anything/SKILL.md (+4 -3)
📝 docs/binary-diagnostics.md (+6 -0)
📝 docs/mcp-contracts.md (+8 -6)
➕ src/contracts/analysisDetail.ts (+17 -0)
📝 src/contracts/javascript/electronToolContracts.ts (+7 -14)
📝 src/contracts/native/binaryDiagnosticsToolContracts.ts (+15 -3)
📝 src/server/createServer.ts (+1 -0)
📝 src/server/registerBinaryDiagnosticsTools.ts (+15 -4)
📝 tests/boundary/mcp/analysisSummaryDetailMcp.test.ts (+46 -1)

📄 Description

Summary

Follow-up to #1568. inspect_binary_layout now accepts the same optional detail input as analyze_javascript_application:

  • complete (default): unchanged.
  • summary: the server records the complete layout Evidence in the session and returns its inspect_analysis_view summary. normalized_result.parent_evidence_id / evidence_links name the retained layout, so later calls can select sections, symbols, mitigations or linkage without re-running the decoder or sending the complete layout through the response.
  • A server without session retention refuses summary with capability_unavailable, the same behavior as #1568.

Both tools now share one definition: analysisDetailSchema and analysisDetailOutputSchemaOf in src/contracts/analysisDetail.ts. The application logic reuses summarizeRetainedAnalysis. The output schema's normalized_result becomes union(binary layout, analysis view). The root stays type: object, and default responses are unchanged.

analyze_function is not included: inspect_analysis_view has no native summary view, only per-facet views, so giving it a summary option means designing a new summary format first.

The CLI is unchanged. Docs updated: docs/binary-diagnostics.md, docs/mcp-contracts.md and the packaged skill.

Relates to #723, #1065.

Verification

  • npm run check:ci passes (8/8 tasks), as do npm run docs:check and npm run check:changed (26 files, 270 tests).
  • npm run test:focused over all tests/boundary/mcp, tests/boundary/cli and tests/conformance files plus the generated-skill and setup-skill tests: 137 passed, 2 skipped (585 tests).
  • New case in tests/boundary/mcp/analysisSummaryDetailMcp.test.ts: a layout summary returns a view linked to the retained layout, and an inspect_analysis_view section page on that parent succeeds.

No real pwntools layout lane was run. The fake layout provider covers the MCP delivery path; the decoder itself is unchanged.

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/1570 **Author:** [@kaoru0822-kitauji](https://github.com/kaoru0822-kitauji) **Created:** 10/10/2026 **Status:** ✅ Merged **Merged:** 10/10/2026 **Merged by:** [@kaoru0822-kitauji](https://github.com/kaoru0822-kitauji) **Base:** `main` ← **Head:** `feat/summary-detail-native-layout` --- ### 📝 Commits (1) - [`2ef9d5d`](https://github.com/morluto/rea/commit/2ef9d5d3580684f5fed1d04c27f895f1b24abf2d) feat(native): return a retained summary view of binary layouts on request ### 📊 Changes **9 files changed** (+119 additions, -31 deletions) <details> <summary>View changed files</summary> 📝 `.agents/skills/reverse-engineer-anything/SKILL.md` (+4 -3) 📝 `docs/binary-diagnostics.md` (+6 -0) 📝 `docs/mcp-contracts.md` (+8 -6) ➕ `src/contracts/analysisDetail.ts` (+17 -0) 📝 `src/contracts/javascript/electronToolContracts.ts` (+7 -14) 📝 `src/contracts/native/binaryDiagnosticsToolContracts.ts` (+15 -3) 📝 `src/server/createServer.ts` (+1 -0) 📝 `src/server/registerBinaryDiagnosticsTools.ts` (+15 -4) 📝 `tests/boundary/mcp/analysisSummaryDetailMcp.test.ts` (+46 -1) </details> ### 📄 Description ## Summary Follow-up to #1568. `inspect_binary_layout` now accepts the same optional `detail` input as `analyze_javascript_application`: - `complete` (default): unchanged. - `summary`: the server records the complete layout Evidence in the session and returns its `inspect_analysis_view` summary. `normalized_result.parent_evidence_id` / `evidence_links` name the retained layout, so later calls can select sections, symbols, mitigations or linkage without re-running the decoder or sending the complete layout through the response. - A server without session retention refuses `summary` with `capability_unavailable`, the same behavior as #1568. Both tools now share one definition: `analysisDetailSchema` and `analysisDetailOutputSchemaOf` in `src/contracts/analysisDetail.ts`. The application logic reuses `summarizeRetainedAnalysis`. The output schema's `normalized_result` becomes `union(binary layout, analysis view)`. The root stays `type: object`, and default responses are unchanged. `analyze_function` is not included: `inspect_analysis_view` has no native summary view, only per-facet views, so giving it a summary option means designing a new summary format first. The CLI is unchanged. Docs updated: `docs/binary-diagnostics.md`, `docs/mcp-contracts.md` and the packaged skill. Relates to #723, #1065. ## Verification - `npm run check:ci` passes (8/8 tasks), as do `npm run docs:check` and `npm run check:changed` (26 files, 270 tests). - `npm run test:focused` over all `tests/boundary/mcp`, `tests/boundary/cli` and `tests/conformance` files plus the generated-skill and setup-skill tests: 137 passed, 2 skipped (585 tests). - New case in `tests/boundary/mcp/analysisSummaryDetailMcp.test.ts`: a layout `summary` returns a view linked to the retained layout, and an `inspect_analysis_view` section page on that parent succeeds. No real pwntools layout lane was run. The fake layout provider covers the MCP delivery path; the decoder itself is unchanged. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-17 21:12:28 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#2979
No description provided.