refactor(react-native): ship React DevTools outside core

Draft
TH
7d ago
+329-43

Summary

Load React DevTools on demand from @agent-device/react-devtools installed alongside agent-device. Plugin API v3 has no local command claim. Core resolves the session's Metro endpoint. When the package is absent, the CLI returns plugin-not-installed with the npm install command from help. The command uses the shared plugin release selector.

Part of #4980.

Value

Measured at base 555c62bc15 and extraction head 28d62393be.

  • Core tarball, npm pack --dry-run --json --ignore-scripts: 1,276,480 to 1,259,042 bytes compressed and 4,087,939 to 4,034,618 bytes unpacked.
  • React DevTools implementation: 12 modules (53,860 bytes of dedicated JavaScript chunks) to zero. A Rolldown generateBundle hook inspected chunk.modules in the minified root tsdown build. Instrumented head output matched the normal build byte for byte.

Validation

At 79e555ba18 on base 1dc09f3f73, build, lint, typecheck, 1,135 focused tests including eager closure, and packed CLI smoke passed. The regression test catches the unpublished pin on 0.23.0-dev. Coverage passed on the prior pushed head after the publishing guard fix.

The affected check passed format, lint, and typecheck, then stopped on the base layering ratchet. Base and head both count 195 raw session-store reads against 189 at the merge base with main. Hosted validation and review of the new head are pending.

The package is "private": true pending the maintainer's npm placeholder and trusted-publisher setup. The release install-hints guard blocks packing while it is private.


Prove it works
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.