feat: implement better network requests capturing and preserving #332
+308
−12
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.
Commit 1 (911f36c): Built out the core network log preservation infrastructure. This commit added the foundational logic to capture and preserve network requests across page navigations, including the ability to cache request/response bodies. Modified PageCollector to handle network interception and storage (135 lines added), extended McpContext with preservation state management, and created new network preservation tools in the network.ts module (98 lines). Total impact: ~261 lines added across 4 files.
Commit 2 (65c1635): Refined the network preservation feature with better UX for AI agents. Improved tool descriptions and messaging in the network.ts tools to make them more understandable for LLMs, and enhanced McpResponse to provide clearer feedback about preservation states and available requests. This was mostly polish work focused on the developer experience side (~59 lines added, 14 modified across 2 files).