import type { CoordinateExtent, Edge, Node, Viewport as ReactFlowViewport } from './xyflow/react.ts';
import type { NodeProps } from './xyflow/system.ts';
import type { IRawSpan } from '../types/TraceModels';
import type { BaseCanvasRef } from './components/BaseCanvas/BaseCanvas.types';
import type { StickyNoteColor, StickyNoteData } from './components/StickyNoteNode/StickyNoteNode.types';
import type { ToolbarActionItem } from './components/Toolbar';
export type { CanvasLevel } from './types/canvas.types';
export interface AgentFlowStickyNote {
    id: string;
    content: string;
    position: {
        x: number;
        y: number;
    };
    size: {
        width: number;
        height: number;
    };
    color: StickyNoteColor;
}
export type AgentFlowStickyNoteNode = Node<StickyNoteData, 'stickyNote'>;
export declare enum ProjectType {
    Agent = "Agent",
    Api = "Api",
    Rpa = "Rpa",
    Process = "Process",
    ProcessOrchestration = "ProcessOrchestration",
    Integration = "Integration",
    IXP = "IXP",
    Internal = "Internal"
}
export declare enum BuiltInToolType {
    AnalyzeAttachments = "AnalyzeAttachments",
    BatchTransform = "BatchTransform",
    DeepRAG = "DeepRAG",
    LoadAttachments = "LoadAttachments"
}
export type ErrorInfo = {
    value: string;
    label: string;
};
export type Viewport = ReactFlowViewport;
export type AgentFlowModel = {
    name: string;
    vendorName: string;
    iconUrl: string;
    hasGuardrails?: boolean;
};
export type AgentFlowToolResource = {
    id: string;
    type: 'tool';
    name: string;
    originalName?: string;
    description: string;
    iconUrl: string;
    errors?: ErrorInfo[];
    projectType?: ProjectType;
    toolType?: BuiltInToolType;
    isExpandable?: boolean;
    processName?: string;
    hasBreakpoint?: boolean;
    isCurrentBreakpoint?: boolean;
    hasGuardrails?: boolean;
    projectId?: string;
    isDisabled?: boolean;
    errorAction?: Omit<ToolbarActionItem, 'id' | 'onAction'>;
};
export type AgentFlowContextResource = {
    id: string;
    type: 'context';
    name: string;
    originalName?: string;
    description: string;
    errors?: ErrorInfo[];
    hasBreakpoint?: boolean;
    isCurrentBreakpoint?: boolean;
    hasGuardrails?: boolean;
    projectId?: string;
    isDisabled?: boolean;
    errorAction?: Omit<ToolbarActionItem, 'id' | 'onAction'>;
};
export type AgentFlowEscalationResource = {
    id: string;
    type: 'escalation';
    name: string;
    originalName?: string;
    description: string;
    errors?: ErrorInfo[];
    hasBreakpoint?: boolean;
    isCurrentBreakpoint?: boolean;
    hasGuardrails?: boolean;
    projectId?: string;
    isDisabled?: boolean;
    errorAction?: Omit<ToolbarActionItem, 'id' | 'onAction'>;
};
export type AgentFlowMcpResource = {
    id: string;
    type: 'mcp';
    name: string;
    originalName?: string;
    description: string;
    errors?: ErrorInfo[];
    slug: string;
    folderPath: string;
    availableTools: {
        name: string;
        description: string;
        inputSchema: Record<string, unknown>;
        outputSchema?: Record<string, unknown>;
    }[];
    hasBreakpoint?: boolean;
    isCurrentBreakpoint?: boolean;
    hasGuardrails?: boolean;
    projectId?: string;
    isDisabled?: boolean;
    errorAction?: Omit<ToolbarActionItem, 'id' | 'onAction'>;
};
export type AgentFlowMemorySpaceResource = {
    id: string;
    type: 'memorySpace';
    name: string;
    originalName?: string;
    description: string;
    errors?: ErrorInfo[];
    hasBreakpoint?: boolean;
    isCurrentBreakpoint?: boolean;
    hasGuardrails?: boolean;
    projectId?: string;
    isDisabled?: boolean;
    errorAction?: Omit<ToolbarActionItem, 'id' | 'onAction'>;
};
export type AgentFlowA2aResource = {
    id: string;
    type: 'a2a';
    name: string;
    originalName?: string;
    description: string;
    errors?: ErrorInfo[];
    hasBreakpoint?: boolean;
    isCurrentBreakpoint?: boolean;
    hasGuardrails?: boolean;
    projectId?: string;
    isDisabled?: boolean;
    errorAction?: Omit<ToolbarActionItem, 'id' | 'onAction'>;
};
export type AgentFlowResource = AgentFlowContextResource | AgentFlowEscalationResource | AgentFlowMcpResource | AgentFlowToolResource | AgentFlowMemorySpaceResource | AgentFlowA2aResource;
export type AgentFlowResourceType = AgentFlowResource['type'];
export type SuggestionType = 'add' | 'update' | 'delete';
export type AgentFlowSuggestion = {
    id: string;
    type: SuggestionType;
    resource?: AgentFlowResource;
    resourceId?: string;
    updatedFields?: Partial<AgentFlowResource>;
    resourceIdToDelete?: string;
    isStandalone?: boolean;
    isProcessing?: boolean;
};
export type AgentFlowSuggestionGroup = {
    id: string;
    suggestions: AgentFlowSuggestion[];
    metadata?: {
        version?: string;
        title?: string;
        description?: string;
    };
};
export type SpanAttributes = Record<string, unknown>;
export type AgentFlowProps = {
    mode: 'design' | 'view';
    definition: Record<string, unknown>;
    spans: IRawSpan[];
    name: string;
    description: string;
    resources: AgentFlowResource[];
    allowDragging?: boolean;
    initialSelectedResource?: {
        type: 'context' | 'escalation' | 'mcp' | 'pane' | 'run' | 'tool' | 'memorySpace' | 'a2a';
        name: string;
    } | null;
    onSelectResource?: (resourceId: string | null) => void;
    onExpandResource?: (resourceId: string, resource: AgentFlowResourceNodeData) => void;
    onCollapseResource?: (resourceId: string, resource: AgentFlowResourceNodeData) => void;
    setSpanForSelectedNode?: (node: AgentFlowCustomNode, nodes: AgentFlowCustomNode[]) => void;
    getNodeFromSelectedSpan?: (nodes: AgentFlowCustomNode[]) => AgentFlowCustomNode | null;
    onEnable?: (resourceId: string, resource: AgentFlowResourceNodeData) => void;
    onDisable?: (resourceId: string, resource: AgentFlowResourceNodeData) => void;
    onAddBreakpoint?: (resourceId: string, resource: AgentFlowResourceNodeData) => void;
    onRemoveBreakpoint?: (resourceId: string, resource: AgentFlowResourceNodeData) => void;
    onAddGuardrail?: (resourceId: string, resource: AgentFlowResourceNodeData) => void;
    onGoToSource?: (resourceId: string, resource: AgentFlowResourceNodeData) => void;
    onErrorAction?: (resourceId: string, resource: AgentFlowResourceNodeData) => void;
    onAddResource?: (type: AgentFlowResourceType) => void;
    onRemoveResource?: (resource: AgentFlowResource) => void;
    onAgentNodeClick?: () => void;
    activeResourceIds?: string[];
    enableTimelinePlayer?: boolean;
    agentNodeTranslations?: AgentNodeTranslations;
    resourceNodeTranslations?: ResourceNodeTranslations;
    stickyNoteNodeTranslations?: StickyNoteNodeTranslations;
    canvasTranslations?: CanvasTranslations;
    canvasRef?: React.Ref<BaseCanvasRef<AgentFlowCustomNode, AgentFlowCustomEdge>>;
    agentNodePosition?: {
        x: number;
        y: number;
    } | undefined;
    onAgentNodePositionChange?: (position: {
        x: number;
        y: number;
    }) => void;
    resourceNodePositions?: Record<string, {
        x: number;
        y: number;
    }>;
    onResourceNodePositionChange?: (resourceId: string, position: {
        x: number;
        y: number;
    }) => void;
    onOrganize?: () => void;
    zoomLevel?: number;
    onZoomLevelChange?: (zoomLevel: number) => void;
    stickyNotes?: AgentFlowStickyNote[];
    onAddStickyNote?: (data: AgentFlowStickyNote) => void;
    onUpdateStickyNote?: (id: string, updates: Partial<Omit<AgentFlowStickyNote, 'id'>>) => void;
    onRemoveStickyNote?: (id: string) => void;
    enableMcpTools?: boolean;
    enableMemory?: boolean;
    enableA2a?: boolean;
    enableStickyNotes?: boolean;
    enableInstructions?: boolean;
    instructions?: {
        system?: string;
        user?: string;
    };
    healthScore?: number;
    onHealthScoreClick?: () => void;
    suggestionGroup?: AgentFlowSuggestionGroup | null;
    onActOnSuggestion?: (suggestionId: string, action: 'accept' | 'reject') => void;
    onActOnSuggestionGroup?: (suggestionGroupId: string, action: 'accept' | 'reject') => void;
    suggestionTranslations?: SuggestionTranslations;
    onRequestResourcePlaceholder?: (type: AgentFlowResourceType, cleanedSuggestionGroup: AgentFlowSuggestionGroup | null) => Partial<AgentFlowResource> | null;
    onPlaceholderNodeClick?: (resourceType: AgentFlowResourceType, placeholderData: AgentFlowResourceNodeData) => void;
};
export type AgentFlowNodeData = {
    name: string;
    description: string;
    definition: Record<string, unknown>;
    parentNodeId?: string;
    isSuggestion?: boolean;
    suggestionId?: string;
    suggestionType?: SuggestionType;
    isProcessing?: boolean;
    instructions?: {
        system?: string;
        user?: string;
    };
};
export type AgentFlowNode = Node<AgentFlowNodeData, 'agent'> & {
    extent?: 'parent' | CoordinateExtent | undefined;
};
export type AgentFlowNodeProps = NodeProps<AgentFlowNode>;
export type ToolResourceData = {
    type: 'tool';
    toolType?: BuiltInToolType;
};
export type ContextResourceData = {
    type: 'context';
};
export type EscalationResourceData = {
    type: 'escalation';
};
type McpResourceData = {
    type: 'mcp';
};
export type MemorySpaceResourceData = {
    type: 'memorySpace';
};
export type A2aResourceData = {
    type: 'a2a';
};
export type SharedResourceData = {
    name: string;
    originalName?: string;
    description: string;
    errors?: ErrorInfo[];
    parentNodeId?: string;
    isActive?: boolean;
    hasError?: boolean;
    hasSuccess?: boolean;
    hasRunning?: boolean;
    countBadgeValue?: number;
    order?: number;
    originalPosition?: {
        x: number;
        y: number;
    };
    iconUrl?: string;
    projectType?: ProjectType;
    isExpandable?: boolean;
    processName?: string;
    slug?: string;
    folderPath?: string;
    availableTools?: {
        name: string;
        description: string;
        inputSchema: Record<string, unknown>;
        outputSchema?: Record<string, unknown>;
    }[];
    isCurrentBreakpoint?: boolean;
    hasBreakpoint?: boolean;
    hasGuardrails?: boolean;
    isDisabled?: boolean;
    projectId?: string;
    isVirtual?: boolean;
    isSuggestion?: boolean;
    suggestionId?: string;
    suggestionType?: SuggestionType;
    isPlaceholder?: boolean;
    errorAction?: Omit<ToolbarActionItem, 'id' | 'onAction'>;
};
export type AgentFlowResourceNodeData = (ContextResourceData | EscalationResourceData | McpResourceData | ToolResourceData | MemorySpaceResourceData | A2aResourceData) & SharedResourceData;
export type AgentFlowResourceNode = Node<AgentFlowResourceNodeData, 'resource'> & {
    extent?: 'parent' | CoordinateExtent | undefined;
    position?: {
        x: number;
        y: number;
    } | undefined;
    hasExplicitPosition?: boolean;
};
export type AgentFlowResourceNodeProps = NodeProps<AgentFlowResourceNode>;
export type AgentFlowCustomNode = AgentFlowNode | AgentFlowResourceNode | AgentFlowStickyNoteNode;
export type AgentFlowNodeDataUpdate<T extends AgentFlowCustomNode> = Partial<T['data']>;
export type AgentFlowDefaultEdgeData = {
    label: string | null;
    isDimmed?: boolean;
};
export type AgentFlowDefaultEdge = Edge<AgentFlowDefaultEdgeData, 'default'>;
export type AgentFlowCustomEdge = AgentFlowDefaultEdge;
export declare const isAgentFlowAgentNode: (node: AgentFlowCustomNode) => node is AgentFlowNode;
export declare const isAgentFlowResourceNode: (node: AgentFlowCustomNode) => node is AgentFlowResourceNode;
export declare const isStickyNoteNode: (node: AgentFlowCustomNode) => node is AgentFlowStickyNoteNode;
export interface AgentNodeTranslations {
    arguments: string;
    input: string;
    output: string;
    user: string;
    system: string;
    autonomousAgent: string;
    codedAgent: string;
    conversationalAgent: string;
    escalations: string;
    model: string;
    context: string;
    tools: string;
    memory: string;
    instructions: string;
    addInstructions: string;
    agentSettings: string;
    readOnlyPreview: string;
    systemPrompt: string;
    userPrompt: string;
    temperature: string;
    maxTokens: string;
    maxIterations: string;
    notConfigured: string;
}
export declare const DefaultAgentNodeTranslations: AgentNodeTranslations;
export interface ResourceNodeTranslations {
    moreOptions: string;
    enable: string;
    disable: string;
    expand: string;
    collapse: string;
    remove: string;
    addBreakpoint: string;
    removeBreakpoint: string;
    addGuardrail: string;
    guardrailsApplied: string;
    goToSource: string;
}
export declare const DefaultResourceNodeTranslations: ResourceNodeTranslations;
export interface CodedAgentNodeTranslations {
    codedAgentStep: string;
    noDataToDisplay: string;
}
export declare const DefaultCodedAgentNodeTranslations: CodedAgentNodeTranslations;
export interface CanvasTranslations {
    panShortcutTeaching: string;
    organize: string;
    zoomIn: string;
    zoomOut: string;
    zoomToFit: string;
    addNote: string;
}
export interface StickyNoteNodeTranslations {
    placeholder: string;
}
export declare const DefaultStickyNoteNodeTranslations: StickyNoteNodeTranslations;
export declare const DefaultCanvasTranslations: CanvasTranslations;
export interface SuggestionTranslations {
    accept: string;
    reject: string;
    acceptAll: string;
    rejectAll: string;
}
export declare const DefaultSuggestionTranslations: SuggestionTranslations;
export declare function createPlaceholderSuggestion(partialResource: Partial<AgentFlowResource>, existingGroup?: AgentFlowSuggestionGroup | null, options?: {
    isStandalone?: boolean;
}): AgentFlowSuggestionGroup;
//# sourceMappingURL=types.d.ts.map