Context
Part of #6228 (telemetry spec). The local --stdio server needs its own wrapper, separate from the remote server's (per #6228: the local CLI's telemetry must default to opt-in, not opt-out, since it runs on a user's own machine — a materially different trust posture than the hosted remote server).
Requirements
- Add the PostHog Node SDK as a dependency of
packages/loopover-mcp.
- Create a small wrapper module exposing the same shape of function as the remote-side wrapper (
recordMcpToolCall({ tool, callerType: "local", ok, durationMs })), for consistency between the two.
- The wrapper must check a persisted opt-in flag (see the companion
telemetry enable/disable CLI-command issue) before sending anything — default OFF until a user explicitly opts in.
- Must be a safe no-op if telemetry isn't enabled or the network call fails — never affect the CLI's actual command behavior.
Test Coverage Requirements
99%+ Codecov patch coverage; test both the opted-in and default-off (safe no-op) paths.
Deliverables
Expected Outcome
The local CLI has a ready-to-use, opt-in-gated telemetry function for the tool-dispatch instrumentation issue to call.
Links & Resources
Context
Part of #6228 (telemetry spec). The local
--stdioserver needs its own wrapper, separate from the remote server's (per #6228: the local CLI's telemetry must default to opt-in, not opt-out, since it runs on a user's own machine — a materially different trust posture than the hosted remote server).Requirements
packages/loopover-mcp.recordMcpToolCall({ tool, callerType: "local", ok, durationMs })), for consistency between the two.telemetry enable/disableCLI-command issue) before sending anything — default OFF until a user explicitly opts in.Test Coverage Requirements
99%+ Codecov patch coverage; test both the opted-in and default-off (safe no-op) paths.
Deliverables
packages/loopover-mcp, mirroring the remote side's shape.Expected Outcome
The local CLI has a ready-to-use, opt-in-gated telemetry function for the tool-dispatch instrumentation issue to call.
Links & Resources
telemetry enable/disableCLI-command issue (provides the opt-in flag this reads)