Skip to content

Add agent-friendly network inspection tools#5

Merged
V3RON merged 3 commits intomasterfrom
issue-2-network-inspection
May 5, 2026
Merged

Add agent-friendly network inspection tools#5
V3RON merged 3 commits intomasterfrom
issue-2-network-inspection

Conversation

@V3RON
Copy link
Copy Markdown
Contributor

@V3RON V3RON commented May 5, 2026

Summary

  • add a first-class network command family with normalized CDP capture, a bounded live buffer, persisted network start/network stop sessions, compact summaries, filtered request lists, and explicit drill-down commands for request details, headers, and bodies
  • keep the default CLI output agent-friendly by returning bounded summaries first while preserving --verbose metadata and file export for full request or response bodies when needed
  • document the new network workflow and current v1 limitations in the README and bundled core skill, and cover the capture, store, query, and body-export paths with tests

Backward compatibility

  • existing daemon, target, console, trace, memory, heap snapshot, JS memory, allocation, and CPU profiling commands are unchanged
  • CLI defaults remain compact and non-JSON; the new behavior is additive under the network command family only
  • daemon IPC remains newline-delimited JSON, and the network collector follows the existing attach/detach lifecycle without changing other command families
  • the live network buffer is intentionally bounded to the most recent 200 requests, and persisted network sessions intentionally start empty without backfilling earlier live-buffer entries

Risks

  • some targets expose incomplete or inconsistent Network.* metadata, so timing, size, protocol, cache, headers, or body availability may be partial depending on runtime support
  • response body retrieval for persisted sessions depends on the body being fetchable while the target is still connected when the session stops
  • reconnects reattach the network collector on demand, so long disconnect windows may leave gaps in capture until the next network command forces a reconnect
  • WebSocket visibility is handshake-only in v1 and may not meet expectations for full frame-level inspection

Manual testing

  • start a debuggable Chrome, Node, or React Native target and select it with agent-cdp start, agent-cdp target list, and agent-cdp target select <id>
  • run agent-cdp network status and confirm it reports an attached collector plus the live-buffer capacity
  • run agent-cdp network start --name login-flow, reproduce a request-heavy interaction, then run agent-cdp network stop and confirm it returns a net_* session id
  • run agent-cdp network summary --session <net_id> and agent-cdp network list --session <net_id> --status failed to verify compact summaries and filtering
  • run agent-cdp network request --session <net_id> --id <req_id>, agent-cdp network response-headers --session <net_id> --id <req_id>, and agent-cdp network response-body --session <net_id> --id <req_id> --file ./response.txt to verify drill-down metadata, explicit header lookup, and body export

Closes #2

@V3RON V3RON merged commit b49b186 into master May 5, 2026
4 checks passed
@V3RON V3RON deleted the issue-2-network-inspection branch May 5, 2026 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add agent-friendly network inspection tools

1 participant