UNPKG

@hhoangphuoc/escape-room-cli

Version:

A CLI for playing AI-generated escape room games. Install globally with: npm install -g @hhoangphuoc/escape-room-cli

36 lines (35 loc) 1.08 kB
import React, { ReactNode } from 'react'; export interface CostTrackingState { currentSessionCost: number; currentSessionTokens: number; lastRequestCost: number; lastRequestTokens: number; totalCost: number; totalTokens: number; budgetAlert?: { type: 'warning' | 'limit'; message: string; threshold: number; }; } export interface AuthState { userId?: string; sessionToken?: string; userName?: string; apiKey?: string; apiKeyProvider?: 'openai' | 'anthropic'; costTracking?: CostTrackingState; } export interface AuthContextType { auth: AuthState; login: (userData: AuthState) => void; logout: () => void; apiCall: (endpoint: string, options?: RequestInit) => Promise<any>; updateCostTracking: (costData: Partial<CostTrackingState>) => void; resetSessionCosts: () => void; } export declare const AuthContext: React.Context<AuthContextType | undefined>; export declare const AuthProvider: React.FC<{ children: ReactNode; }>; export declare const useAuth: () => AuthContextType;