/** * Site partnership tier levels */ export type PartnershipTier = 'bronze' | 'silver' | 'gold' | 'platinum'; /** * AI pipeline modes */ export type PipelineMode = 'basic' | 'enhanced' | 'premium' | 'enterprise'; /** * Site feature availability */ export type FeatureAvailability = 'enabled' | 'disabled' | 'premium-only' | 'enterprise-only'; /** * Video quality settings for site */ export type SiteVideoQuality = 'low' | 'medium' | 'high' | 'ultra'; /** * Site offering type - can be any combination or custom description */ export type SiteOfferingType = string; /** * Site navigation permissions */ export type NavigationPermission = 'none' | 'same-page' | 'same-site' | 'all'; /** * Site configuration for AI behavior */ export interface SiteAIBehavior { /** Whether AI should be proactive in suggestions */ proactiveSuggestions: FeatureAvailability; /** Whether AI should remember conversation context */ rememberContext: FeatureAvailability; /** Whether AI should provide navigation assistance */ enableNavigation: FeatureAvailability; /** Whether AI should adapt to site-specific content */ adaptToContent: FeatureAvailability; /** Whether AI should use site-specific terminology */ useSiteTerminology: FeatureAvailability; /** Maximum conversation history length */ maxHistoryLength: number; /** Whether AI should ask clarifying questions */ askClarifyingQuestions: boolean; /** Whether AI should provide proactive suggestions */ provideSuggestions: boolean; } /** * Site video configuration */ export interface SiteVideoConfig { /** Whether video interactions are enabled */ enabled: FeatureAvailability; /** Preferred video quality for this site */ quality: SiteVideoQuality; /** Maximum video duration in seconds */ maxDuration: number; /** Whether to auto-pause video when tab is not active */ autoPauseOnTabSwitch: boolean; /** Whether to show user video by default */ showUserVideo: boolean; /** Video avatar settings */ avatarSettings?: { /** Avatar ID or URL */ avatarId?: string; /** Avatar name */ avatarName?: string; /** Avatar personality */ avatarPersonality?: string; }; } /** * Site voice configuration */ export interface SiteVoiceConfig { /** Whether voice interactions are enabled */ enabled: FeatureAvailability; /** Preferred voice language (ISO 639-1 code) */ language: string; /** Whether to enable wake word detection */ wakeWordEnabled: boolean; /** Microphone sensitivity level (0-100) */ microphoneSensitivity: number; /** Voice synthesis settings */ synthesisSettings?: { /** Voice ID for text-to-speech */ voiceId?: string; /** Speech rate (0.5-2.0) */ speechRate?: number; /** Pitch adjustment (-20 to 20) */ pitch?: number; }; } /** * Site privacy configuration */ export interface SitePrivacyConfig { /** Whether to allow cross-domain data sharing */ allowCrossDomainSharing: boolean; /** Whether to allow analytics collection */ allowAnalytics: boolean; /** Whether to allow page content access */ allowPageAccess: boolean; /** Data retention period for this site */ dataRetention: '1-day' | '1-week' | '1-month' | '3-months' | '6-months' | '1-year' | 'forever'; /** Whether to anonymize user data */ anonymizeData: boolean; } /** * Site navigation configuration */ export interface SiteNavigationConfig { /** Whether to preserve conversation context during navigation */ preserveContextOnNavigation: boolean; /** Whether to show navigation suggestions */ showNavigationSuggestions: boolean; /** Whether to track navigation history */ trackNavigationHistory: boolean; } /** * Site cost and payment configuration */ export interface SitePaymentConfig { /** Partnership tier for this site */ partnershipTier: PartnershipTier; /** Payment token for this site */ paymentToken?: string; /** Whether costs are visible to users */ showCosts: boolean; /** Whether to provide cost estimates */ provideCostEstimates: boolean; /** Whether to warn on low balance */ warnOnLowBalance: boolean; /** Preferred currency for cost display */ currency: 'USD' | 'EUR' | 'GBP'; /** Site payment for different interaction types */ sitePayment: { /** Whether site pays for text interactions */ paysForText: boolean; /** Whether site pays for voice interactions */ paysForVoice: boolean; /** Whether site pays for video interactions */ paysForVideo: boolean; /** Payment limits (minutes, messages, etc.) */ limits?: { /** Text message limit */ textMessages?: number; /** Voice minutes limit */ voiceMinutes?: number; /** Video minutes limit */ videoMinutes?: number; }; }; } /** * Site UI defaults for first-time users (before extension installation) */ export interface SiteUIConfig { /** Whether to show the AI companion by default for new users */ showCompanion: boolean; /** Deprecated: floating container position (Side Panel is canonical) */ containerPosition?: never; /** Deprecated: minimize floating container on load */ minimizeOnLoad?: never; /** Default theme preference for new users */ theme: 'light' | 'dark' | 'auto' | 'site-match'; /** Default font size preference for new users */ fontSize: 'small' | 'medium' | 'large'; /** Primary color for UI elements */ primaryColor?: string; /** Secondary color for UI elements */ secondaryColor?: string; /** Whether to use site's branding */ useSiteBranding: boolean; } /** * Site-specific persona configuration */ export interface SitePersonaConfig { /** Default persona ID for this site */ defaultPersonaId?: string; /** Whether to allow persona switching */ allowPersonaSwitching: boolean; /** Available personas for this site */ availablePersonas: string[]; /** Whether to adapt persona to site content */ adaptPersonaToContent: boolean; /** Site-specific persona customizations */ personaCustomizations?: Record; } /** * Site offering and guidance configuration */ export interface SiteOfferingConfig { /** Type of offering this site provides */ offeringType: SiteOfferingType; /** Detailed instructions for guided tours or walkthroughs */ guidedTourInstructions?: string; /** Product walkthrough steps */ productWalkthroughSteps?: string[]; /** Feature demonstration scripts */ featureDemoScripts?: string[]; /** Help and support topics */ helpTopics?: string[]; /** Custom assistant personality and behavior */ customAssistantConfig?: Record; /** Whether site offers credits for interactions */ offersCredits: boolean; /** Credit amount offered per interaction */ creditAmount?: number; /** Whether site provides guidance during interactions */ providesGuidance: boolean; /** Guidance topics and content */ guidanceContent?: Record; /** API access configuration */ apiAccess?: { /** Search API endpoint */ searchApi?: string; /** Database API endpoint */ databaseApi?: string; /** Site map location (default: /sitemap.xml) */ siteMapLocation?: string; /** Custom API endpoints */ customApis?: Record; }; /** Additional custom offering fields */ customFields?: Record; } /** * Complete site configuration from buzztrail.txt * This provides guidance and suggestions for the AI, but user preferences always take precedence */ export interface SiteConfiguration { /** Site domain */ domain: string; /** Site name */ siteName: string; /** Site description */ description: string; /** Site overview section */ overview: string; /** AI goals for this site */ aiGoals: string[]; /** Site offering and guidance configuration */ offering: SiteOfferingConfig; /** Technical settings */ technicalSettings: { /** Pipeline mode for this site */ pipelineMode: PipelineMode; /** Whether to enable advanced features */ enableAdvancedFeatures: boolean; /** Performance optimization settings */ performanceOptimization: boolean; /** Error handling preferences */ errorHandling: 'graceful' | 'strict' | 'informative'; }; /** AI behavior configuration (suggestions only) */ aiBehavior: SiteAIBehavior; /** Video configuration (suggestions only) */ video: SiteVideoConfig; /** Voice configuration (suggestions only) */ voice: SiteVoiceConfig; /** Privacy configuration (suggestions only) */ privacy: SitePrivacyConfig; /** Navigation configuration (suggestions only) */ navigation: SiteNavigationConfig; /** Payment configuration */ payment: SitePaymentConfig; /** UI configuration (defaults for first-time users) */ ui: SiteUIConfig; /** Persona configuration (suggestions only) */ persona: SitePersonaConfig; /** Version of the configuration schema */ schemaVersion: string; /** Timestamp when configuration was last updated */ lastUpdated: string; /** Whether this configuration is active */ isActive: boolean; } /** * Current page context information */ export interface PageContext { /** Current page URL */ url: string; /** Page title */ title: string; /** Page domain */ domain: string; /** Page path */ path: string; /** Page query parameters */ queryParams: Record; /** Page referrer */ referrer?: string; /** Tab ID */ tabId?: number; /** Whether the page is active */ isActive: boolean; /** Page load timestamp */ loadTime: string; /** Page metadata */ metadata: { /** Page description */ description?: string; /** Page keywords */ keywords?: string[]; /** Page author */ author?: string; /** Page language */ language?: string; /** Page viewport */ viewport?: string; }; /** Page content analysis */ contentAnalysis: { /** Main content text */ mainContent?: string; /** Page headings */ headings: string[]; /** Page links */ links: string[]; /** Page images */ images: string[]; /** Page forms */ forms: string[]; /** Content type */ contentType: 'article' | 'product' | 'service' | 'blog' | 'landing' | 'other'; }; /** Page performance metrics */ performance: { /** Page load time in milliseconds */ loadTime: number; /** DOM content loaded time */ domContentLoaded: number; /** First contentful paint */ firstContentfulPaint?: number; /** Largest contentful paint */ largestContentfulPaint?: number; }; /** Page accessibility information */ accessibility: { /** Whether page has proper heading structure */ hasProperHeadings: boolean; /** Whether page has alt text for images */ hasAltText: boolean; /** Whether page has proper ARIA labels */ hasAriaLabels: boolean; /** Page accessibility score (0-100) */ accessibilityScore: number; }; /** Page security information */ security: { /** Whether page is served over HTTPS */ isSecure: boolean; /** Whether page has CSP headers */ hasCSP: boolean; /** Whether page has security headers */ hasSecurityHeaders: boolean; /** Security score (0-100) */ securityScore: number; }; }