Some checks failed
CI / go (push) Waiting to run
CI / docker (push) Waiting to run
CI / lint-go (push) Waiting to run
CI / lint-docs (push) Waiting to run
CI / check-paperclip (push) Waiting to run
Deploy static site / Deploy to GitHub Pages (push) Has been cancelled
Deploy static site / Deploy via Docker to hatch.surf (push) Has been cancelled
Resolved conflicts by taking GitHub versions for: - .dockerignore, .gitignore, Dockerfile, README.md, docker-compose.yml Kept deploy.sh updated to: - Pull from GitHub (primary source) - Push to Gitea (push-mirror) - Build from site/ directory (GitHub structure) Co-Authored-By: Paperclip <noreply@paperclip.ing>
45 lines
1.1 KiB
TypeScript
45 lines
1.1 KiB
TypeScript
/**
|
|
* Telemetry tracker for MCP tool call usage.
|
|
* Tracks invocation counts for each MCP tool to be reported via telemetry.
|
|
*/
|
|
import type { McpToolName } from '../../telemetry/events/build';
|
|
export interface McpToolUsage {
|
|
featureName: McpToolName;
|
|
invocationCount: number;
|
|
}
|
|
declare class McpTelemetryTracker {
|
|
private usageMap;
|
|
/**
|
|
* Record a tool call invocation
|
|
*/
|
|
recordToolCall(toolName: McpToolName): void;
|
|
/**
|
|
* Get all tool usages as an array
|
|
*/
|
|
getUsages(): McpToolUsage[];
|
|
/**
|
|
* Reset all usage tracking
|
|
*/
|
|
reset(): void;
|
|
/**
|
|
* Check if any tools have been called
|
|
*/
|
|
hasUsage(): boolean;
|
|
}
|
|
export declare const mcpTelemetryTracker: McpTelemetryTracker;
|
|
/**
|
|
* Get MCP tool usage telemetry
|
|
*/
|
|
export declare function getMcpTelemetryUsage(): McpToolUsage[];
|
|
/**
|
|
* Reset MCP telemetry tracker
|
|
*/
|
|
export declare function resetMcpTelemetry(): void;
|
|
/**
|
|
* Record MCP telemetry usage to the telemetry instance
|
|
*/
|
|
export declare function recordMcpTelemetry(telemetry: {
|
|
record: (event: any) => void;
|
|
}): void;
|
|
export {};
|