MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / makeTelemetryTrack

Method makeTelemetryTrack

packages/acp-adapter/src/server.ts:878–887  ·  view source on GitHub ↗

* Build a TelemetryTrackFn wrapper bound to the underlying * harness so the AcpSession (and its reverse-RPC bridges in * Phase 13) can emit PII-free breadcrumbs through the same * `harness.track` channel. The wrapper * shape is required by the broader `Record<string, unkn

()

Source from the content-addressed store, hash-verified

876 * via {@link safeTrack}.
877 */
878 private makeTelemetryTrack(): TelemetryTrackFn | undefined {
879 const harness = this.harness;
880 if (typeof harness.track !== 'function') return undefined;
881 return (event, properties) => {
882 // Cast: the harness expects the narrower `TelemetryProperties`
883 // shape (Readonly<Record<string, primitive>>); Phase 13 callers
884 // only pass primitive values so the runtime contract holds.
885 harness.track(event, properties as Parameters<typeof harness.track>[1]);
886 };
887 }
888
889 private scheduleAvailableCommandsUpdate(sessionId: string): void {
890 setTimeout(() => {

Callers 2

newSessionMethod · 0.95

Calls 1

trackMethod · 0.65

Tested by

no test coverage detected