build: Add telemetry compiled output

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Christian Gick
2026-01-08 14:30:38 +02:00
parent 20e6ea0a47
commit cb8dd13cac
3 changed files with 77 additions and 0 deletions

17
dist/telemetry.d.ts vendored Normal file
View File

@@ -0,0 +1,17 @@
/**
* Telemetry for compressed tools usage tracking
* Logs to ~/.local/share/mcp/compressed-tools.jsonl
*/
export interface TelemetryEvent {
timestamp: string;
tool: "compressed_read" | "compressed_grep" | "compressed_glob";
inputSize: number;
outputSize: number;
compressionRatio: number;
path?: string;
pattern?: string;
success: boolean;
error?: string;
}
export declare function logTelemetry(event: Omit<TelemetryEvent, "timestamp">): void;
export declare function calculateCompressionRatio(original: number, compressed: number): number;