import type { InstanceAiContext, ExecutionResult, ExecutionDebugInfo, NodeOutputResult, ServiceProxyConfig } from '@n8n/instance-ai';
import { GlobalConfig } from '@n8n/config';
import type { User } from '@n8n/db';
import { InstanceAiSettingsService } from './instance-ai-settings.service';
import { ExecutionRepository, ProjectRepository, SharedWorkflowRepository, WorkflowRepository } from '@n8n/db';
import { Logger } from '@n8n/backend-common';
import { InstanceSettings } from 'n8n-core';
import { ActiveExecutions } from '../../active-executions';
import { CredentialsFinderService } from '../../credentials/credentials-finder.service';
import { CredentialsService } from '../../credentials/credentials.service';
import { EventService } from '../../events/event.service';
import { ExecutionPersistence } from '../../executions/execution-persistence';
import { License } from '../../license';
import { LoadNodesAndCredentials } from '../../load-nodes-and-credentials';
import { DataTableRepository } from '../../modules/data-table/data-table.repository';
import { DataTableService } from '../../modules/data-table/data-table.service';
import { SourceControlPreferencesService } from '../../modules/source-control.ee/source-control-preferences.service.ee';
import { DynamicNodeParametersService } from '../../services/dynamic-node-parameters.service';
import { FolderService } from '../../services/folder.service';
import { ProjectService } from '../../services/project.service.ee';
import { RoleService } from '../../services/role.service';
import { TagService } from '../../services/tag.service';
import { WorkflowFinderService } from '../../workflows/workflow-finder.service';
import { WorkflowHistoryService } from '../../workflows/workflow-history/workflow-history.service';
import { WorkflowService } from '../../workflows/workflow.service';
import { EnterpriseWorkflowService } from '../../workflows/workflow.service.ee';
import { Telemetry } from '../../telemetry';
import { WorkflowRunner } from '../../workflow-runner';
export declare class InstanceAiAdapterService {
    private readonly workflowService;
    private readonly workflowFinderService;
    private readonly workflowRepository;
    private readonly sharedWorkflowRepository;
    private readonly projectRepository;
    private readonly executionRepository;
    private readonly credentialsService;
    private readonly credentialsFinderService;
    private readonly activeExecutions;
    private readonly workflowRunner;
    private readonly loadNodesAndCredentials;
    private readonly instanceSettings;
    private readonly dataTableService;
    private readonly dataTableRepository;
    private readonly dynamicNodeParametersService;
    private readonly folderService;
    private readonly projectService;
    private readonly tagService;
    private readonly sourceControlPreferencesService;
    private readonly settingsService;
    private readonly workflowHistoryService;
    private readonly enterpriseWorkflowService;
    private readonly license;
    private readonly executionPersistence;
    private readonly eventService;
    private readonly roleService;
    private readonly telemetry;
    private readonly logger;
    private readonly allowSendingParameterValues;
    private nodesCache;
    private readonly NODES_CACHE_TTL_MS;
    private getNodesFromCache;
    constructor(logger: Logger, globalConfig: GlobalConfig, workflowService: WorkflowService, workflowFinderService: WorkflowFinderService, workflowRepository: WorkflowRepository, sharedWorkflowRepository: SharedWorkflowRepository, projectRepository: ProjectRepository, executionRepository: ExecutionRepository, credentialsService: CredentialsService, credentialsFinderService: CredentialsFinderService, activeExecutions: ActiveExecutions, workflowRunner: WorkflowRunner, loadNodesAndCredentials: LoadNodesAndCredentials, instanceSettings: InstanceSettings, dataTableService: DataTableService, dataTableRepository: DataTableRepository, dynamicNodeParametersService: DynamicNodeParametersService, folderService: FolderService, projectService: ProjectService, tagService: TagService, sourceControlPreferencesService: SourceControlPreferencesService, settingsService: InstanceAiSettingsService, workflowHistoryService: WorkflowHistoryService, enterpriseWorkflowService: EnterpriseWorkflowService, license: License, executionPersistence: ExecutionPersistence, eventService: EventService, roleService: RoleService, telemetry: Telemetry);
    createContext(user: User, options?: {
        searchProxyConfig?: ServiceProxyConfig;
        pushRef?: string;
        threadId?: string;
    }): InstanceAiContext;
    private buildLicenseHints;
    private assertInstanceNotReadOnly;
    private createProjectScopeHelpers;
    private createWorkflowAdapter;
    private createExecutionAdapter;
    private createCredentialAdapter;
    private createDataTableAdapter;
    private readonly webResearchCache;
    private readonly searchCache;
    private createWebResearchAdapter;
    private buildSearchMethod;
    private _nodeDefinitionDirs?;
    getNodeDefinitionDirs(): string[];
    private createNodeAdapter;
    private createWorkspaceAdapter;
}
export declare function truncateResultData(resultData: Record<string, unknown>): Record<string, unknown>;
export declare function extractExecutionResult(executionRepository: ExecutionRepository, executionId: string, includeOutputData?: boolean): Promise<ExecutionResult>;
export declare function truncateNodeOutput(items: unknown[]): unknown[] | unknown;
export declare function extractNodeOutput(executionRepository: ExecutionRepository, executionId: string, nodeName: string, options?: {
    startIndex?: number;
    maxItems?: number;
}): Promise<NodeOutputResult>;
export declare function extractExecutionDebugInfo(executionRepository: ExecutionRepository, executionId: string, includeOutputData?: boolean): Promise<ExecutionDebugInfo>;
