import * as t from '@babel/types';
import type { BatchParallelDetector } from './batch-detector.js';
import type { BatchCallInfo } from '../types.js';
export interface LLMCallInfo {
    callNode: t.CallExpression;
    callInfo: BatchCallInfo;
    payloadNode: t.Expression;
    key: string;
}
/**
 * Check if LLM call payloads depend on variables that are local to the callback.
 * This includes:
 * - Variables computed from other expressions (const x = item.name.toUpperCase())
 * - Results from previous LLM calls (const title = await atp.llm.call(...))
 * - Any other locally-defined variable
 *
 * When batch transforming, the payload mapper only has access to the array item parameter
 * and outer scope variables - NOT local variables defined inside the callback.
 *
 * @param body - The callback body
 * @param itemParamName - The name of the array item parameter (e.g., "item")
 * @param batchDetector - The batch detector for extracting LLM call info
 * @returns true if there are dependencies that prevent batch transformation
 */
export declare function hasLLMCallDependencies(body: t.Node, batchDetector: BatchParallelDetector, itemParamName?: string): boolean;
/**
 * Find ALL LLM call expressions in AST node with batch info
 */
export declare function findAllLLMCallExpressions(body: t.Node, batchDetector: BatchParallelDetector): LLMCallInfo[];
/**
 * Find first LLM call expression in AST node
 */
export declare function findLLMCallExpression(body: t.Node): t.CallExpression | null;
/**
 * Get array method name from call expression
 */
export declare function getArrayMethodName(node: t.CallExpression): string | null;
/**
 * Get runtime method name for array method
 */
export declare function getRuntimeMethodName(arrayMethod: string): string | null;
/**
 * Check if method can use batch parallel optimization
 */
export declare function canUseBatchParallel(methodName: string): boolean;
//# sourceMappingURL=array-transformer-utils.d.ts.map