import type { HTMLAttributes } from 'svelte/elements';
export type AgentStatus = 'generating' | 'deploying' | 'active' | 'inactive' | 'failed';
export type RequestStatus = 'pending' | 'generating' | 'completed' | 'failed';
export type RequestPriority = 'low' | 'normal' | 'high' | 'urgent';
export interface IntegrationRequest {
    id: string;
    serviceName: string;
    intent: string;
    apiSpecUrl?: string;
    credentials?: Record<string, string>;
    customConfig?: Record<string, any>;
    priority: RequestPriority;
    status: RequestStatus;
    createdAt: Date;
    completedAt?: Date;
    error?: string;
}
export interface GeneratedAgent {
    id: string;
    serviceName: string;
    status: AgentStatus;
    processId?: number;
    port: number;
    endpoint: string;
    healthEndpoint: string;
    mcpEndpoint: string;
    agentFilePath?: string;
    generatedAt: Date;
    lastActive: Date;
    apiSpec?: {
        openApiVersion: string;
        title: string;
        description?: string;
        baseUrl: string;
        endpoints: APIEndpoint[];
        schemas: Record<string, any>;
        authMethods: AuthMethod[];
    };
    metrics?: {
        requestCount: number;
        errorCount: number;
        avgResponseTime: number;
        uptime: number;
    };
    autoCleanup: boolean;
    maxIdleTime: number;
}
export interface APIEndpoint {
    path: string;
    method: string;
    operationId: string;
    description?: string;
    parameters: EndpointParameter[];
    requestBody?: {
        required: boolean;
        contentType: string;
        schema: any;
    };
    responses: Record<string, {
        description: string;
        schema?: any;
    }>;
}
export interface EndpointParameter {
    name: string;
    in: 'path' | 'query' | 'header' | 'body';
    type: string;
    required: boolean;
    description?: string;
    schema?: any;
}
export interface AuthMethod {
    type: 'apiKey' | 'oauth2' | 'basic' | 'bearer';
    name: string;
    location?: 'header' | 'query' | 'cookie';
    scheme?: string;
    flows?: {
        authorizationCode?: {
            authorizationUrl: string;
            tokenUrl: string;
            scopes: Record<string, string>;
        };
    };
}
export interface AgentGenerationProgress {
    agentId: string;
    stage: 'introspecting' | 'generating' | 'deploying' | 'testing' | 'complete';
    progress: number;
    message: string;
    startedAt: Date;
    estimatedCompletion?: Date;
    error?: string;
}
export interface FastMCPAnalysis {
    endpoints: APIEndpoint[];
    schemas: Record<string, any>;
    authMethods: AuthMethod[];
    complexity: 'simple' | 'moderate' | 'complex';
    generationStrategy: 'direct' | 'templated' | 'custom';
}
export interface MetapGenerationContext {
    serviceName: string;
    className: string;
    baseUrl: string;
    endpoints: APIEndpoint[];
    schemas: Record<string, any>;
    authMethods: AuthMethod[];
    customConfig?: Record<string, any>;
    templateOverrides?: {
        authHandler?: string;
        errorHandler?: string;
        customMethods?: string[];
    };
}
export interface UniversalIntegrationError extends Error {
    code: string;
    context?: Record<string, any>;
}
export interface MeeseeksBoxProps extends HTMLAttributes<HTMLDivElement> {
    /**
     * Pending integration requests
     */
    requests?: IntegrationRequest[];
    /**
     * Currently active and generated agents
     */
    activeAgents?: GeneratedAgent[];
    /**
     * Generation progress for agents currently being created
     */
    generationProgress?: AgentGenerationProgress[];
    /**
     * Show the agent pool section
     * @default true
     */
    showAgentPool?: boolean;
    /**
     * Show generation logs
     * @default true
     */
    showGenerationLogs?: boolean;
    /**
     * Enable automatic cleanup of inactive agents
     * @default true
     */
    enableAutoCleanup?: boolean;
    /**
     * Maximum number of concurrent agents
     * @default 10
     */
    maxConcurrentAgents?: number;
    /**
     * Callback when agent generation is requested
     */
    onAgentGenerate?: (request: IntegrationRequest, agentId: string) => void;
    /**
     * Callback when agent is deployed
     */
    onAgentDeploy?: (agent: GeneratedAgent) => void;
    /**
     * Callback when new integration request is created
     */
    onIntegrationRequest?: (request: IntegrationRequest) => void;
    /**
     * Callback when agent cleanup is requested
     */
    onAgentCleanup?: (agent: GeneratedAgent) => void;
    /**
     * Callback when agent restart is requested
     */
    onAgentRestart?: (agent: GeneratedAgent) => void;
    /**
     * Callback when agent stop is requested
     */
    onAgentStop?: (agent: GeneratedAgent) => void;
}
export interface AgentGeneratorConfig {
    /**
     * Templates for different service types
     */
    templates: {
        universal: string;
        rest: string;
        graphql: string;
        webhook: string;
    };
    /**
     * FastMCP configuration
     */
    fastmcp: {
        timeout: number;
        retries: number;
        cacheSpecs: boolean;
    };
    /**
     * Metap configuration
     */
    metap: {
        model: string;
        temperature: number;
        maxTokens: number;
    };
    /**
     * Deployment configuration
     */
    deployment: {
        basePort: number;
        healthCheckInterval: number;
        processTimeout: number;
    };
}
export interface BMSIntegration {
    /**
     * Oracle agent requests dynamic integrations
     */
    requestOracleIntegration: (service: string, intent: string, context?: any) => Promise<GeneratedAgent>;
    /**
     * Scribe agent uses integrations for external data
     */
    requestScribeDataAccess: (agent: GeneratedAgent, operation: string, params: any) => Promise<any>;
    /**
     * Architect agent designs integration workflows
     */
    requestArchitecturalIntegration: (services: string[], workflow: any) => Promise<GeneratedAgent[]>;
    /**
     * Get integration capabilities for planning
     */
    getIntegrationCapabilities: () => Promise<{
        availableServices: string[];
        supportedOperations: Record<string, string[]>;
        activeIntegrations: GeneratedAgent[];
    }>;
}
export interface FastMCPServer {
    introspectAPI: (url: string) => Promise<FastMCPAnalysis>;
    generateMCPServer: (analysis: FastMCPAnalysis, config: any) => Promise<string>;
    deployServer: (code: string, port: number) => Promise<{
        processId: number;
        healthEndpoint: string;
        mcpEndpoint: string;
    }>;
}
export interface MetapTemplate {
    generate: (context: MetapGenerationContext) => Promise<string>;
    validate: (code: string) => Promise<{
        valid: boolean;
        errors: string[];
        warnings: string[];
    }>;
    optimize: (code: string) => Promise<string>;
}
export interface IntegrationWorkerConfig {
    maxAgents: number;
    healthCheckInterval: number;
    autoCleanupInterval: number;
    resourceLimits: {
        memory: number;
        cpu: number;
    };
}
export interface AgentProcess {
    id: string;
    serviceName: string;
    processId: number;
    port: number;
    status: AgentStatus;
    startedAt: Date;
    lastHealthCheck: Date;
    resourceUsage: {
        memory: number;
        cpu: number;
    };
}
export interface UniversalTemplateContext extends MetapGenerationContext {
    serviceType: 'rest' | 'graphql' | 'webhook' | 'hybrid';
    complexityLevel: 'simple' | 'moderate' | 'complex';
    bmsIntegrations: {
        enableOracleAccess: boolean;
        enableScribeAccess: boolean;
        enableArchitectAccess: boolean;
        enableLoopDiagnostics: boolean;
    };
    testing: {
        generateTests: boolean;
        testFramework: 'pytest' | 'unittest';
        mockExternalCalls: boolean;
    };
    deployment: {
        containerized: boolean;
        healthChecks: boolean;
        monitoring: boolean;
        logging: boolean;
    };
}
//# sourceMappingURL=types.d.ts.map