feat: add cdp command agent-cdp passthrough#873
Conversation
|
Size Report
Startup median (7 runs, lower is better):
Top changed chunks:
|
|
I found one blocker before this is review-ready.
That means downstream |
Review —
|
|
Addressed the flag-shadowing review comment in 3896c44.\n\nBefore: recognized agent-device flags after |
|
Renamed the public CDP wrapper from |
|
Moved the public CDP workflow docs from |
|
Adjusted the docs split in 3013047: |
|
Follow-up review after the One validation gap remains before I would call this fully merge-ready: the focused tests mock
If live RN/Metro validation is blocked, please state the exact blocker/device/app needed. After that, the residual risk looks low for this isolated CLI passthrough/docs slice. |
|
One small housekeeping item while adding the final-path smoke evidence: the PR body still describes the public command as |
|
Addressed both follow-ups:
Current-branch blocker: Registry check still shows the package is not published to npm:
I also sanity-checked the live Metro target with the latest published |
Summary
Add an
agent-device cdppassthrough for React Native CDP diagnostics and JS heap leak workflows.Details:
agent-cdp@1.6.0throughnpm exec, matching the existingreact-devtoolswrapper pattern while keepingagent-cdpas an internal implementation detail.help cdpwith the intended leak workflow: target select, heap usage samples, snapshot diff, leak-triplet, retainers, and allocation hotspots.perf memory.Refs #823.
Validation
Verified with focused CLI/parser tests and the repo quick check:
./node_modules/.bin/vitest run src/__tests__/cli-agent-cdp.test.ts src/utils/__tests__/args.test.tspnpm check:quickManual prototype evidence came from Expo Go 56 on iOS simulator with a patched local
agent-cdp: target selection succeeded, JS heap samples captured, heap snapshots diffed, leak-triplet flagged the retained object, and retainers pointed to the global retaining path.Final-path smoke on the current branch is currently blocked because the pinned
agent-cdp@1.6.0package is not published to npm yet. The GitHub release exists at https://github.com/callstackincubator/agent-cdp/releases/tag/v1.6.0, butnpm view agent-cdp version dist-tags --jsonstill reports1.5.1as latest andnpm view agent-cdp versions --jsondoes not include1.6.0. As a result,node bin/agent-device.mjs cdp target list --url http://127.0.0.1:8081fails duringnpm exec --package agent-cdp@1.6.0resolution withNo matching version found for agent-cdp@1.6.0.