import { Primitives } from '@botpress/runtime/internal';
import { AssetsManager, AssetSyncOptions, AssetSyncPlan, AssetSyncResult } from '../assets/index.js';
import { ParsedIntegration } from '../integrations/types.js';
import { ParsedInterface } from '../interfaces/types.js';
import { AgentConfig, AgentInfo, AgentLink, AgentLocalInfo, Dependencies, Integration, ProjectInfo, ProjectState, ValidationResult, ToolReference } from './types.js';
export interface AgentProjectOptions {
    noCache?: boolean;
    adkCommand?: 'adk-dev' | 'adk-build' | 'adk-deploy';
    offline?: boolean;
}
export type AgentProjectLoader = (projectPath: string) => Promise<AgentProject>;
type ConversationDefinition = Primitives.Definitions.ConversationDefinition;
type KnowledgeDefinition = Primitives.Definitions.KnowledgeDefinition;
type TriggerDefinition = Primitives.Definitions.TriggerDefinition;
type WorkflowDefinition = Primitives.Definitions.WorkflowDefinition;
type ActionDefinition = Primitives.Definitions.ActionDefinition;
type TableDefinition = Primitives.Definitions.TableDefinition;
type CustomComponentDefinition = Primitives.Definitions.CustomComponentDefinition;
type PrimitiveDefinition = Primitives.Definitions.PrimitiveDefinition;
export type PrimitiveReference<T extends PrimitiveDefinition = PrimitiveDefinition> = {
    path: string;
    export: string;
    definition: T;
};
export type CustomComponentReference = PrimitiveReference<CustomComponentDefinition> & {
    source: string;
    instance: unknown;
};
export declare class AgentProject {
    private static _projectCache;
    private _options;
    private _path;
    private _config?;
    private _dependencies?;
    private _agentInfo?;
    private _state;
    private _errors;
    private _warnings;
    private _lastBuildTime?;
    private _integrations?;
    private _interfaces?;
    private _integrationManager;
    private _interfaceManager;
    private _assetsManager;
    private _conversations;
    private _knowledge;
    private _triggers;
    private _workflows;
    private _actions;
    private _tables;
    private _customComponents;
    private _tools;
    constructor(projectPath: string, options?: AgentProjectOptions);
    static load(projectPath: string, options?: AgentProjectOptions): Promise<AgentProject>;
    static clearCache(): void;
    static clearCacheForPath(projectPath: string): void;
    get path(): string;
    get conversations(): PrimitiveReference<ConversationDefinition>[];
    get knowledge(): PrimitiveReference<KnowledgeDefinition>[];
    get triggers(): PrimitiveReference<TriggerDefinition>[];
    get workflows(): PrimitiveReference<WorkflowDefinition>[];
    get actions(): PrimitiveReference<ActionDefinition>[];
    get tables(): PrimitiveReference<TableDefinition>[];
    get customComponents(): CustomComponentReference[];
    get tools(): ToolReference[];
    get config(): AgentConfig | undefined;
    get dependencies(): Dependencies | undefined;
    get agentInfo(): AgentInfo | undefined;
    get state(): ProjectState;
    get info(): ProjectInfo;
    reload(): Promise<void>;
    validate(): Promise<ValidationResult>;
    get integrations(): ParsedIntegration[];
    get interfaces(): ParsedInterface[];
    getIntegrations(): Promise<Integration[]>;
    createAssetSyncPlan(): Promise<AssetSyncPlan>;
    syncAssets(options?: AssetSyncOptions): Promise<AssetSyncResult>;
    hasAssetsDirectory(): Promise<boolean>;
    get assetsManager(): AssetsManager;
    createAgentInfo(info: AgentLink): Promise<void>;
    updateAgentInfo(updates: Partial<AgentLink>): Promise<void>;
    createAgentLocalInfo(info: AgentLocalInfo): Promise<void>;
    updateAgentLocalInfo(updates: Partial<AgentLocalInfo>): Promise<void>;
    requiresAgentInfo(operation: string): void;
    private loadConfig;
    private loadAgentInfo;
    private loadBuiltInWorkflows;
    private loadBuiltInActions;
    private registerDataSourceWorkflows;
    /**
     * Get list of channels from a channel specification (single, array, or glob)
     * For glob '*', we need to check against all integration channels - but for validation
     * we treat it as a special marker
     */
    /**
     * Checks if a duplicate primitive is just a re-export from a barrel file (index.ts/index.js).
     * If so, prefers the non-barrel file path for the reference and returns true to signal
     * that the duplicate should be silently skipped.
     */
    private isBarrelReexport;
    private isToolBarrelReexport;
    private shouldPreferToolDefinition;
    private getChannelsList;
    private loadAgentPrimitives;
}
export {};
//# sourceMappingURL=agent-project.d.ts.map