import type { Agent, DAGNode, FrameworkParser, LinearStep, Model, Span, Tool } from "../types";
/**
 * CrewAI Parser
 */
export declare class CrewAIParser implements FrameworkParser {
    name: string;
    private deduplicator;
    private toolAnalyzer;
    constructor();
    canParse(spans: Span[]): boolean;
    getTools(spans: Span[]): Tool[];
    /**
     * CrewAI "Tool Usage" spans often omit I/O; inputs appear on the previous `chat` span as
     * `Action:` / `Action Input:` in `gen_ai.completion`, and tool contracts in `gen_ai.prompt`
     * (`Tool Name` / `Tool Arguments` / `Tool Description`) — see samples/crewai-1.json.
     * `Observation:` (tool result) is taken from the next sibling chat transcript when present (ReAct-shaped).
     */
    private enrichToolsArgumentMetadata;
    getAgents(spans: Span[]): Agent[];
    getModels(spans: Span[]): Model[];
    generateDag(spans: Span[]): DAGNode[];
    /**
     * Linear flow: only prompt/response/model(llm)/agent/tool.
     * Prompt → steps (agent/tool/llm) → Response.
     */
    generateLinearFlow(spans: Span[]): LinearStep[];
    private isToolSpan;
    private isAgentSpan;
    private isModelSpan;
    private extractTool;
    private extractAgent;
    private extractModel;
    private getNodeType;
    /** Monotonic time for ordering sibling spans (matches collectAgentToolDefinitions). */
    private spanTimeMs;
    /**
     * From OpenLit chat spans under the same agent as `toolSpan`: Action Input JSON and
     * tool contract lines embedded in the system prompt.
     */
    private enrichCrewToolFromAgentSiblings;
    /**
     * Best-effort: ReAct transcripts often include `Observation:` after `Action` / `Action Input` for this tool.
     * Only reliable when that formatting is present (typical CrewAI + OpenLit); otherwise returns undefined.
     */
    private extractObservationForToolFromTranscript;
    private extractBalancedBracketArray;
    /** Parse JSON when possible; otherwise return the raw observation string (e.g. Python repr). */
    private parseObservationPayload;
    /**
     * Match `Action: <tool>` then `Action Input: { ... }` in a ReAct-style completion (CrewAI / OpenLit).
     */
    private extractActionInputJsonFromCompletion;
    private extractBalancedBraceObject;
    /**
     * Parse `Tool Name` / `Tool Arguments` / `Tool Description` blocks from the agent system prompt.
     */
    private parseCrewToolContractFromPrompt;
    /**
     * Filter infrastructure spans to clean up the visualization
     * Filters out:
     * - HTTP/POST spans (OpenAI API calls)
     * - Task/Crew creation spans (orchestration metadata)
     * - "invoke_agent crew" and "invoke_agent task" wrapper spans
     *
     * NOTE: Task Execution spans are kept as they contain actual agent work
     */
    private isInfrastructureSpan;
}
//# sourceMappingURL=crewai.d.ts.map