import type { InstallerOptions } from '../utils/types.js'; /** * Supported programming languages for framework integrations. */ export type Language = 'javascript' | 'python' | 'ruby' | 'php' | 'go' | 'kotlin' | 'dotnet' | 'elixir'; /** * Configuration interface for framework-specific agent integrations. * Each framework exports a FrameworkConfig that the universal runner uses. */ export interface FrameworkConfig { metadata: FrameworkMetadata; detection: FrameworkDetection; environment: EnvironmentConfig; analytics: AnalyticsConfig; prompts: PromptConfig; ui: UIConfig; } /** * Basic framework information and documentation */ export interface FrameworkMetadata { /** Display name (e.g., "Next.js", "React") */ name: string; /** Integration identifier (e.g., 'nextjs', 'python'). String, not enum — auto-discovered from registry. */ integration: string; /** URL to framework-specific WorkOS AuthKit docs */ docsUrl: string; /** * Optional URL to docs for users with unsupported framework versions. * If not provided, defaults to docsUrl. */ unsupportedVersionDocsUrl?: string; /** * Optional function to gather framework-specific context before agent runs. * For Next.js: detects router type * For React Native: detects Expo vs bare */ gatherContext?: (options: InstallerOptions) => Promise>; /** * Name of the framework-specific skill for agent integration. * Skills are located in .claude/skills/{skillName}/SKILL.md */ skillName?: string; /** Language ecosystem this integration belongs to */ language: Language; /** Stability tier: 'stable' for tested integrations, 'experimental' for new ones */ stability: 'stable' | 'experimental'; /** Detection priority — higher numbers are checked first */ priority: number; /** Default package manager command (e.g., 'pip', 'gem', 'go'). Optional for JS integrations. */ packageManager?: string; /** Primary manifest file (e.g., 'pyproject.toml', 'Gemfile'). Optional for JS integrations. */ manifestFile?: string; /** * Optional custom detection override for non-JS integrations. When present, * the registry calls this instead of falling back to `manifestFile` existence. * Use when a single manifest file isn't enough (e.g., Django projects may * use `manage.py` + `requirements.txt` without a `pyproject.toml`). */ detect?: (options: Pick) => boolean | Promise; } /** * Framework detection and version handling */ export interface FrameworkDetection { /** Package name to check in package.json (e.g., "next", "react") */ packageName: string; /** Human-readable name for error messages (e.g., "Next.js") */ packageDisplayName: string; /** Extract version from package.json */ getVersion: (packageJson: any) => string | undefined; /** Optional: Convert version to analytics bucket (e.g., "15.x") */ getVersionBucket?: (version: string) => string; } /** * Environment variable configuration */ export interface EnvironmentConfig { /** Whether to upload env vars to hosting providers post-agent */ uploadToHosting: boolean; /** Whether this framework requires API key (false for client-only SDKs) */ requiresApiKey: boolean; /** * Build the environment variables object for this framework. * Returns the exact variable names and values to upload to hosting providers. */ getEnvVars: (apiKey: string, clientId: string) => Record; } /** * Analytics configuration */ export interface AnalyticsConfig { /** Generate tags from context (e.g., { 'nextjs-version': '15.x', 'router': 'app' }) */ getTags: (context: any) => Record; /** Optional: Additional event properties */ getEventProperties?: (context: any) => Record; } /** * Prompt configuration */ export interface PromptConfig { /** * Optional: Additional context lines to append to base prompt * For Next.js: "- Router: app" * For React Native: "- Platform: Expo" */ getAdditionalContextLines?: (context: any) => string[]; } /** * UI messaging configuration */ export interface UIConfig { /** Success message when agent completes */ successMessage: string; /** Generate "What the agent did" bullets from context */ getOutroChanges: (context: any) => string[]; /** Generate "Next steps" bullets from context */ getOutroNextSteps: (context: any) => string[]; } /** * Generate welcome message from framework name */ export declare function getWelcomeMessage(frameworkName: string): string; /** * Shared spinner message for all frameworks */ export declare const SPINNER_MESSAGE = "Setting up WorkOS AuthKit with login, authentication, and session management...";