feat: implement better network requests capturing and preserving#332
Conversation
…ng and descriptions for AI Agents
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
|
Thanks for the PR but we are right now in the process of changing things here and might take a different approach to network request capturing. We will review the PR later after we are done with planned refactoring. |
|
Okay sure thank you for your attention. |
|
The latest version ships with improvements to network tools as well preserves network data across navigations. Please give it a try and please file an issue if you see further improvements! |
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).