UNPKG

@neuroequality/neuroadapt-ai

Version:

AI-powered accessibility personalization for neurodivergent users

211 lines (210 loc) 5.75 kB
import { z } from 'zod'; /** * User interaction types for behavior tracking */ export declare const UserInteractionSchema: z.ZodObject<{ timestamp: z.ZodNumber; type: z.ZodEnum<["click", "scroll", "focus", "blur", "keypress", "resize", "preference_change"]>; target: z.ZodOptional<z.ZodString>; value: z.ZodOptional<z.ZodUnknown>; context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>; }, "strip", z.ZodTypeAny, { type: "click" | "scroll" | "focus" | "blur" | "keypress" | "resize" | "preference_change"; timestamp: number; value?: unknown; target?: string | undefined; context?: Record<string, unknown> | undefined; }, { type: "click" | "scroll" | "focus" | "blur" | "keypress" | "resize" | "preference_change"; timestamp: number; value?: unknown; target?: string | undefined; context?: Record<string, unknown> | undefined; }>; export type UserInteraction = z.infer<typeof UserInteractionSchema>; /** * Prediction confidence levels */ export type ConfidenceLevel = 'low' | 'medium' | 'high' | 'very_high'; /** * AI model capabilities */ export interface ModelCapabilities { textGeneration: boolean; textAnalysis: boolean; codeGeneration: boolean; reasoning: boolean; streaming: boolean; functionCalling: boolean; vision: boolean; } /** * AI provider configuration */ export interface AIProviderConfig { apiKey?: string; baseURL?: string; model?: string; maxTokens?: number; temperature?: number; timeout?: number; retries?: number; } /** * Prediction result with confidence scoring */ export interface PredictionResult<T = unknown> { prediction: T; confidence: ConfidenceLevel; score: number; reasoning?: string; alternatives?: Array<{ value: T; score: number; reasoning?: string; }>; metadata?: Record<string, unknown>; } /** * Adaptation suggestion from AI */ export interface AdaptationSuggestion { type: 'sensory' | 'cognitive' | 'preference' | 'content'; target: string; action: 'enable' | 'disable' | 'adjust' | 'replace'; value?: unknown; reasoning: string; confidence: ConfidenceLevel; priority: 'low' | 'medium' | 'high' | 'urgent'; estimatedImpact: number; } /** * Learning model state */ export interface ModelState { version: string; trainingData: number; lastUpdated: number; accuracy?: number; features: string[]; hyperparameters?: Record<string, unknown>; } /** * Streaming response chunk */ export interface StreamChunk { id: string; type: 'token' | 'function_call' | 'done' | 'error'; content: string; metadata?: Record<string, unknown>; timestamp: number; } /** * Analytics event for user behavior */ export declare const AnalyticsEventSchema: z.ZodObject<{ eventId: z.ZodString; userId: z.ZodOptional<z.ZodString>; sessionId: z.ZodString; timestamp: z.ZodNumber; event: z.ZodString; properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>; preferences: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>; context: z.ZodOptional<z.ZodObject<{ userAgent: z.ZodOptional<z.ZodString>; viewport: z.ZodOptional<z.ZodObject<{ width: z.ZodNumber; height: z.ZodNumber; }, "strip", z.ZodTypeAny, { width: number; height: number; }, { width: number; height: number; }>>; url: z.ZodOptional<z.ZodString>; referrer: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { userAgent?: string | undefined; viewport?: { width: number; height: number; } | undefined; url?: string | undefined; referrer?: string | undefined; }, { userAgent?: string | undefined; viewport?: { width: number; height: number; } | undefined; url?: string | undefined; referrer?: string | undefined; }>>; }, "strip", z.ZodTypeAny, { timestamp: number; sessionId: string; eventId: string; event: string; userId?: string | undefined; preferences?: Record<string, unknown> | undefined; context?: { userAgent?: string | undefined; viewport?: { width: number; height: number; } | undefined; url?: string | undefined; referrer?: string | undefined; } | undefined; properties?: Record<string, unknown> | undefined; }, { timestamp: number; sessionId: string; eventId: string; event: string; userId?: string | undefined; preferences?: Record<string, unknown> | undefined; context?: { userAgent?: string | undefined; viewport?: { width: number; height: number; } | undefined; url?: string | undefined; referrer?: string | undefined; } | undefined; properties?: Record<string, unknown> | undefined; }>; export type AnalyticsEvent = z.infer<typeof AnalyticsEventSchema>; /** * Feature extraction result */ export interface FeatureVector { features: Record<string, number>; metadata?: Record<string, unknown>; timestamp: number; } /** * Training data point */ export interface TrainingData { input: FeatureVector; output: unknown; feedback?: number; weight?: number; } /** * Model performance metrics */ export interface ModelMetrics { accuracy: number; precision: number; recall: number; f1Score: number; auc?: number; confusionMatrix?: number[][]; sampleSize: number; lastEvaluated: number; } //# sourceMappingURL=common.d.ts.map