feat(limrun): capture live HTTP(S) traffic through Limrun tunnel inspection

TH
13h ago
+1873-45

Summary

Limrun iOS/Android sessions get a live HTTP(S) capture source through Limrun's own tunnel inspection. network start opens the instance's destination tunnel with inspection enabled for the requested domains; network dump then answers from that source (exact URL, status, duration, opt-in redacted bodies from a bounded 200-entry buffer) and reports source; network stop hands the dump back to the app-log parse. A dump never installs or switches a source (ADR 0037, #3930). The capture stays behind the provider's network runtime seam (networkCaptureStart/networkCaptureStop); other owners report it unavailable with a typed reason. --hosts is repeatable and replaces the default public-TLD wildcards. Pinned/failed hosts surface as typed notes. Also fixes the false guide claim that Limrun iOS cannot reach a local Metro. 57 files.

The network start|stop CLI entry is temporary grammar on the existing network command; expect rebase against the shared-command PR (#3930).

agent-device network start --hosts api.example.com
agent-device network dump 15 --include body
agent-device network stop

Validation

Tested SHA: d17fc2feba (pnpm check:affected --run --head, all runnable checks passed, exactCommit=true).

  • Unit: 3817 tests green (capture, seam, daemon start/stop/refusals, CLI reader/writer/output, output-economy with a reviewed waiver for the source field).
  • New provider-scenario integration test drives lease → open → network start --hosts → dump → stop → app-log fallback through the daemon route.
  • Live evidence at e2439afa7f (same capture route; the delta since is the lease-release drain, a window-tagged error callback, a typed refusal reason, and tests):
    • iOS (Bluesky): 4 captured requests with URL/status/duration, redacted bodies with --include body, source=provider backend=limrun-tunnel after relaunch, fallback to source=app-log after stop.
    • Android (Chrome): captured httpbin.org/example.com traffic incl. a 404 and bodies; stop returned the dump to app-log.
    • Both instances torn down; no active Limrun instances remained.

Unresolved risk: the temporary CLI grammar conflicts with #3930's shared command; rebase on merge.

🤖 Generated with Claude Code