You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(local-mcp): share transport + IPv6 parsing across the feature
Address the review-swarm reuse findings.
- Extract `parseClaudeJsonTransport` in mcp-config.ts so the relay's SDK transport builder and the host-agnostic `LocalMcpTransport` descriptor read a raw ~/.claude.json entry through one normalizer (carrying the stdio `env` the relay needs but the descriptor drops), instead of duplicating the branching and drifting on legacy bare-url/type-less entries.
- Move the IPv6-literal private-address kernel into `@posthog/shared` (`isPrivateIpv6Literal`), shared by `isPrivateHostname` and web-fetch's `isBlockedHost`. This also fixes a latent gap: `isPrivateHostname` only decoded the dotted `::ffff:1.2.3.4` form, so an IPv4-mapped loopback in the hex-group form `URL#hostname` normalizes to (`::ffff:7f00:1`) was misclassified as importable.
- Add unit tests for the shared IPv6 kernel (incl. the hex-group mapped case), the `mcp_response` exactly-one-of-payload/error refine, and `relayMcpServerNamesSchema`.
Generated-By: PostHog Code
Task-Id: 7c87c3a4-0be6-475e-a8ec-269140ded301
0 commit comments