UNPKG

@auth0/auth0-mcp-server

Version:

Auth0 Model Context Protocol (MCP) Server (Beta) — A secure and extendable implementation of an MCP server that provides AI assistants with controlled access to the Auth0 Management API through natural language. This project is in beta and not intended fo

122 lines (121 loc) • 3.96 kB
/** * Why credential resolution fell back to generic Auth0 vars instead of the framework spec. * 'unsupported': the framework has no quickstart spec. * 'cdn_unavailable': a supported framework's spec couldn't be fetched (e.g. CDN outage), * so a supported user silently got generic vars — worth surfacing in analytics. */ export type CredentialResolutionFallbackReason = 'unsupported' | 'cdn_unavailable'; /** * Steps in the onboarding flow, used as the discriminator on onboarding analytics events. */ export declare enum OnboardingStep { CreateApplication = "create_application", SaveCredentials = "save_credentials", QuickstartGuide = "quickstart_guide" } /** * Outcome of an onboarding step. */ export declare enum OnboardingStepStatus { Failure = "failure", Success = "success" } /** * TrackEvent class for managing analytics events */ export declare class TrackEvent { private appId; private endpoint; private identity; /** * Constructor for TrackEvent * * @param appId - Heap app ID * @param endpoint - Heap endpoint URL */ constructor(appId: string, endpoint: string); /** * Track a command run event * * @param command - The command path that was run */ trackCommandRun(command: string): void; /** * Track init event * * @param clientType - Type of client being configured */ trackInit(clientType?: string): void; /** * Track server run event * */ trackServerRun(): void; /** * Track tool usage event * * @param toolName - The name of the tool being used * @param success - Whether the tool execution was successful */ trackTool(toolName: string, success?: boolean): void; /** * Track an onboarding flow step * * Captures the framework dimension and per-step outcome that the generic * tool-usage event does not, so the multi-step onboarding flow can be * analyzed end to end. * * @param step - The onboarding step * @param framework - The framework being onboarded * @param outcome - Whether the step succeeded or failed * @param extraProperties - Additional step-specific properties */ trackOnboardingStep(step: OnboardingStep, framework: string, outcome: OnboardingStepStatus, extraProperties?: Record<string, string | number | boolean>): void; /** * Track credential resolution event * * @param framework - The framework used for credential resolution * @param resolution_path - Whether the spec or fallback path was used * @param secret_generated - Whether AUTH0_SECRET was auto-generated * @param keys_written - The env keys written to the file * @param fallback_reason - Why the fallback path was taken (only set when resolution_path is 'fallback') */ trackCredentialResolution(framework: string, resolution_path: 'spec' | 'fallback', secret_generated: boolean, keys_written: string[], fallback_reason?: CredentialResolutionFallbackReason): void; /** * Internal method to track an event * * @param eventName - Name of the event to track * @param customProperties - Additional properties for the event */ private track; /** * Creates an event object */ private createEvent; /** * Sends an event to Heap Analytics */ private sendEvent; /** * Generate a run event name from a command path */ private generateRunEventName; /** * Generate an event name from a command path and action */ private generateEventName; /** * Get common properties for all events */ private getCommonProperties; /** * Determine if tracking should be enabled */ private shouldTrack; /** * Get current timestamp in milliseconds */ private timestamp; } declare const trackEvent: TrackEvent; export default trackEvent;