import { z } from '@botpress/sdk';
import { defineConfig } from '@botpress/runtime';
import { ValidationErrors } from './validation-errors';
export type AgentConfig = ReturnType<typeof defineConfig>;
export declare const dependenciesSchema: z.ZodObject<{
    integrations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodObject<{
        version: z.ZodString;
        enabled: z.ZodBoolean;
        configurationType: z.ZodOptional<z.ZodString>;
        config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
    }, "strip", {
        version: string;
        enabled: boolean;
        configurationType?: string | undefined;
        config?: Record<string, any> | undefined;
    }, {
        version: string;
        enabled: boolean;
        configurationType?: string | undefined;
        config?: Record<string, any> | undefined;
    }>]>>>;
    plugins: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
        version: z.ZodString;
        config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
        dependencies: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
            integrationAlias: z.ZodString;
            integrationInterfaceAlias: z.ZodOptional<z.ZodString>;
        }, "strip", {
            integrationAlias: string;
            integrationInterfaceAlias?: string | undefined;
        }, {
            integrationAlias: string;
            integrationInterfaceAlias?: string | undefined;
        }>>>;
        missingFields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
    }, "strip", {
        version: string;
        config?: Record<string, any> | undefined;
        dependencies?: Record<string, {
            integrationAlias: string;
            integrationInterfaceAlias?: string | undefined;
        }> | undefined;
        missingFields?: string[] | undefined;
    }, {
        version: string;
        config?: Record<string, any> | undefined;
        dependencies?: Record<string, {
            integrationAlias: string;
            integrationInterfaceAlias?: string | undefined;
        }> | undefined;
        missingFields?: string[] | undefined;
    }>>>;
}, "strip", {
    integrations?: Record<string, string | {
        version: string;
        enabled: boolean;
        configurationType?: string | undefined;
        config?: Record<string, any> | undefined;
    }> | undefined;
    plugins?: Record<string, {
        version: string;
        config?: Record<string, any> | undefined;
        dependencies?: Record<string, {
            integrationAlias: string;
            integrationInterfaceAlias?: string | undefined;
        }> | undefined;
        missingFields?: string[] | undefined;
    }> | undefined;
}, {
    integrations?: Record<string, string | {
        version: string;
        enabled: boolean;
        configurationType?: string | undefined;
        config?: Record<string, any> | undefined;
    }> | undefined;
    plugins?: Record<string, {
        version: string;
        config?: Record<string, any> | undefined;
        dependencies?: Record<string, {
            integrationAlias: string;
            integrationInterfaceAlias?: string | undefined;
        }> | undefined;
        missingFields?: string[] | undefined;
    }> | undefined;
}>;
export type Dependencies = z.infer<typeof dependenciesSchema>;
export declare const agentInfoSchema: z.ZodObject<{
    botId: z.ZodString;
    workspaceId: z.ZodString;
    apiUrl: z.ZodOptional<z.ZodString>;
}, "strip", {
    botId: string;
    workspaceId: string;
    apiUrl?: string | undefined;
}, {
    botId: string;
    workspaceId: string;
    apiUrl?: string | undefined;
}>;
export type AgentLink = z.infer<typeof agentInfoSchema>;
export type AgentInfo = AgentLink & {
    devId?: string;
};
export declare const agentLocalInfoSchema: z.ZodObject<{
    botId: z.ZodOptional<z.ZodString>;
    workspaceId: z.ZodOptional<z.ZodString>;
    apiUrl: z.ZodOptional<z.ZodString>;
    devId: z.ZodOptional<z.ZodString>;
}, "strip", {
    botId?: string | undefined;
    workspaceId?: string | undefined;
    apiUrl?: string | undefined;
    devId?: string | undefined;
}, {
    botId?: string | undefined;
    workspaceId?: string | undefined;
    apiUrl?: string | undefined;
    devId?: string | undefined;
}>;
export type AgentLocalInfo = z.infer<typeof agentLocalInfoSchema>;
export declare enum FileChangeType {
    Added = "added",
    Modified = "modified",
    Deleted = "deleted"
}
export interface FileChangeEvent {
    type: FileChangeType;
    path: string;
    relativePath: string;
}
export declare enum BuildEventType {
    Started = "started",
    Progress = "progress",
    Success = "success",
    Error = "error",
    Warning = "warning"
}
export interface BuildEvent {
    type: BuildEventType;
    message?: string;
    error?: Error;
    warnings?: string[];
}
export declare enum ValidationErrorCode {
    DIRECTORY_NOT_FOUND = "DIRECTORY_NOT_FOUND",
    DIRECTORY_ACCESS_ERROR = "DIRECTORY_ACCESS_ERROR",
    REQUIRED_FILE_MISSING = "REQUIRED_FILE_MISSING",
    INVALID_STRUCTURE = "INVALID_STRUCTURE",
    INVALID_CONFIG_SYNTAX = "INVALID_CONFIG_SYNTAX",
    INVALID_CONFIG_SCHEMA = "INVALID_CONFIG_SCHEMA",
    MISSING_REQUIRED_FIELD = "MISSING_REQUIRED_FIELD",
    AGENT_NOT_LINKED = "AGENT_NOT_LINKED",
    INVALID_DEPENDENCIES_SYNTAX = "INVALID_DEPENDENCIES_SYNTAX",
    INVALID_DEPENDENCIES_SCHEMA = "INVALID_DEPENDENCIES_SCHEMA",
    INVALID_VERSION_FORMAT = "INVALID_VERSION_FORMAT",
    INVALID_INTEGRATION_ALIAS = "INVALID_INTEGRATION_ALIAS",
    INVALID_PLUGIN_ALIAS = "INVALID_PLUGIN_ALIAS",
    UNKNOWN_INTEGRATION = "UNKNOWN_INTEGRATION",
    UNKNOWN_PLUGIN = "UNKNOWN_PLUGIN",
    INVALID_PLUGIN_DEPENDENCY = "INVALID_PLUGIN_DEPENDENCY",
    INCOMPATIBLE_VERSION = "INCOMPATIBLE_VERSION",
    CIRCULAR_DEPENDENCY = "CIRCULAR_DEPENDENCY",
    FILE_TOO_LARGE = "FILE_TOO_LARGE",
    INVALID_FILE_TYPE = "INVALID_FILE_TYPE",
    INVALID_FILE_NAME = "INVALID_FILE_NAME",
    DUPLICATE_FILE_NAME = "DUPLICATE_FILE_NAME",
    DUPLICATE_PRIMITIVE = "DUPLICATE_PRIMITIVE",
    INVALID_PRIMITIVE_DEFINITION = "INVALID_PRIMITIVE_DEFINITION",
    TABLE_TOO_MANY_COLUMNS = "TABLE_TOO_MANY_COLUMNS",
    BUILD_FAILED = "BUILD_FAILED",
    SYNTAX_ERROR = "SYNTAX_ERROR",
    TYPE_ERROR = "TYPE_ERROR",
    IMPORT_ERROR = "IMPORT_ERROR"
}
export declare enum ValidationSeverity {
    ERROR = "error",
    WARNING = "warning",
    INFO = "info"
}
export interface ValidationError {
    $type: typeof ValidationErrors.$type;
    code: ValidationErrorCode;
    severity: ValidationSeverity;
    message: string;
    file?: string;
    line?: number;
    column?: number;
    hint?: string;
    documentation?: string;
    context?: Record<string, unknown>;
}
export interface ValidationResult {
    valid: boolean;
    errors: ValidationError[];
    warnings: ValidationError[];
    info: ValidationError[];
    errorCount: number;
    warningCount: number;
    infoCount: number;
}
export declare enum ProjectState {
    Unloaded = "unloaded",
    Loading = "loading",
    Ready = "ready",
    Building = "building",
    Error = "error"
}
export interface BuildOutput {
    files: Map<string, Buffer | string>;
    metadata: {
        buildTime: Date;
        version?: string;
        checksum?: string;
    };
}
export interface WatchOptions {
    ignore?: string[];
    debounce?: number;
    autoBuild?: boolean;
}
export interface Integration {
    name: string;
    version: string;
    workspace?: string;
    config?: Record<string, unknown>;
    installed?: boolean;
    installedVersion?: string;
    hasChannels?: boolean;
}
export interface IntegrationChange {
    type: 'install' | 'update' | 'uninstall';
    integration: Integration;
    from?: string;
    to?: string;
}
export interface IntegrationSyncResult {
    changes: IntegrationChange[];
    applied: boolean;
    errors?: Error[];
}
export interface AgentToolDefinition {
    name: string;
    description?: string;
}
export interface ToolReference {
    path: string;
    export: string;
    definition: AgentToolDefinition;
}
export interface ProjectInfo {
    path: string;
    config: AgentConfig;
    dependencies: Dependencies;
    agentInfo?: AgentInfo;
    state: ProjectState;
    lastBuildTime?: Date;
    errors: ValidationError[];
    warnings: ValidationError[];
    errorCount: number;
    warningCount: number;
    infoCount: number;
    integrations?: Integration[];
}
export type IntegrationDependency = {
    type: 'integration';
    integration: {
        name: string;
        version: string;
        enabled: boolean;
    };
};
export type InterfaceDependency = {
    type: 'interface';
    interface: {
        name: string;
        version: string;
    };
};
export type PluginDependency = {
    type: 'plugin';
    plugin: {
        name: string;
        version: string;
    };
};
export type Dependency = IntegrationDependency | InterfaceDependency | PluginDependency;
//# sourceMappingURL=types.d.ts.map