Repository navigation
feat(javascript): return a retained summary view on request - #1568
Merged
Merged
Conversation
analyze_javascript_application returns the complete application graph inline, which repeats tens of kilobytes even for a few source lines and exceeds the default 10 MiB MCP frame for a 300-function source file. The new optional detail input keeps complete delivery by default. With detail "summary" the server records the complete analysis Evidence in the session and returns its inspect_analysis_view summary, whose parent_evidence_id lets callers page modules, select items, or pass the retained reference to application workflows. A server without Evidence retention refuses summary detail with capability_unavailable rather than returning a summary whose analysis cannot be reached. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
5 of 9 tasks
786anisariwusjs-rgb
suggested changes
Oct 12, 2026
786anisariwusjs-rgb
left a comment
There was a problem hiding this comment.
feat/analysis-summary-detail
|
0336793929 |
|
Jejjzm. Udzx. Wz wz. Yv zz we wzn. Did wis. Qozkq. Qozkq oos. Zbw zj the diwz ll. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Follow-up to #1560, which reduced the per-turn tool-definition context. This PR covers the other half of the feedback, output size.
analyze_javascript_applicationalways returns the complete application graph inline. Measured over SDK 2.3.1 stdio:detail: "summary"reply textresource_constraint(over the 10 MiB stdio budget)The repo already has the right primitive:
inspect_analysis_viewreads summaries, module pages and items from retained Evidence. But agents only reach it after paying for (or failing on) the complete first reply.Change
analyze_javascript_applicationgets an optionaldetailinput:complete(default): unchanged. The complete analysis Evidence is returned inline.summary: the server records the complete analysis Evidence in the session, then returns the derivedinspect_analysis_viewsummary Evidence (operation: "inspect_analysis_view"). Itsnormalized_result.parent_evidence_idandevidence_linksname the retained analysis. Callers page modules, select items, or pass{"kind":"retained-evidence", ...}to the application workflows, without repeating the analysis.summarywithcapability_unavailableand advice to selectdetail complete. It never returns a summary whose analysis can't be reached.Notes for review:
normalized_resultis nowunion(application analysis, analysis view). The root staystype: object, so there are no root combinators. Default responses are byte-identical to before. A consumer that statically typesnormalized_resultas the analysis result should useoperation/normalized_result.kindto tell them apart.summarizeRetainedAnalysis(src/application/analysisView/AnalysisViewService.ts). The MCP adapter only removesdetailbefore analysis, sodetailnever enters the analysis Evidence.inspect-analysis-viewalready reads inline Evidence files.docs/mcp-contracts.md,docs/javascript-artifact-reconstruction.mdand the packaged skill (.agents/skills/...) describe when to use summary detail. The generated catalog and skill were regenerated.Not in scope (possible follow-ups): the same option for
analyze_functionandinspect_binary_layout, whichinspect_analysis_viewalso supports, and the text/structured duplication on the wire (#723).Relates to #723, #1065.
Verification
npm run check:cipasses: typecheck, lint, format, knip, metadata, jscpd and architecture guards.npm run docs:checkpasses.npm run check:changed: 27 files, 280 tests.npm run test:focusedover alltests/boundary/mcp,tests/boundary/cliandtests/conformancefiles: 135 passed, 2 skipped (573 tests). Skill and setup tests pass.tests/boundary/mcp/analysisSummaryDetailMcp.test.ts(real fixture over the MCP client):summaryreturns the view, smaller than the complete reply, linked to the complete Evidence ID;inspect_analysis_viewmodule page on the retained parent works;capability_unavailable.summarizeRetainedAnalysis: it records before projecting, refuses without retention, and propagates a recording conflict.No real Hopper/Ghidra/IDA verification was performed (they are not affected). No real host-client lanes were run.
🤖 Generated with Claude Code