feat: session-level passive network capture for explore#813
Closed
feat: session-level passive network capture for explore#813
Conversation
Implement startNetworkCapture() and readNetworkCapture() on CDPPage using CDP Network domain events (requestWillBeSent, responseReceived, loadingFinished). This provides rich network data (method, status, headers, response body) without JS injection or timing gaps. Update explore to start capture before navigation and prefer it over the performance API fallback, giving endpoint discovery access to complete request/response data. Part of #810
6 tasks
readNetworkCapture() now clears _captureEntries and _captureRequestMap after returning, matching the drain semantics of the daemon and extension implementations. Prevents stale data on repeated reads.
Owner
Author
|
Closing in favor of opus0's #815 (has complete _pendingBodyFetches implementation) |
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.
Summary
startNetworkCapture()/readNetworkCapture()on CDPPage using CDP Network domain eventsnetworkRequests()) when capture is unavailable (daemon mode)parseNetworkRequests()updated to handleNetworkCaptureEntryformat (responseContentType, string body → JSON)Architecture
This is the first transport implementation of the session-level passive capture contract (
IPage.startNetworkCapture?()/readNetworkCapture?()). It establishes the pattern for PR B (diagnostic + operate consumption) and future daemon mode support.Key design decisions:
readNetworkCapture()includes a 200ms settle delay for pending response body fetchesTest plan
OPENCLI_CDP_ENDPOINT=... opencli explore <url>shows richer endpoint dataRef #810