// Plugin type declarations

export interface PluginMetadata {
  name: string;
  version?: string;
  description?: string;
}

export interface CCRPluginOptions {
  enabled?: boolean;
}

export class CCRPlugin {
  name: string;
  metadata: PluginMetadata;
  options: CCRPluginOptions;
}

export const pluginManager: {
  register(plugin: CCRPlugin): void;
  getPlugin(name: string): CCRPlugin | undefined;
  getAllPlugins(): CCRPlugin[];
};

export const tokenSpeedPlugin: CCRPlugin;

export function getTokenSpeedStats(sessionId: string): {
  ttft: number | null;
  tokensPerSecond: number | null;
};

export function getGlobalTokenSpeedStats(): {
  avgTtft: number | null;
  avgTokensPerSecond: number | null;
};