import { AgencyNode, Expression, InterpolationSegment, Scope } from "../types.js";
import type { BlockArgument } from "../types/blockArgument.js";
/** `BlockArgument` is a child of `FunctionCall`, not a standalone statement,
 * so it isn't in the `AgencyNode` union. But blocks DO appear on the ancestors
 * list when `walkNodes` descends into a block body — widen the type so
 * consumers can match `a.type === "blockArgument"`. */
export type WalkAncestor = AgencyNode | BlockArgument;
export declare function isInsideBlock(ancestors: WalkAncestor[]): boolean;
/**
 * Extract the base variable name from an interpolation segment's expression.
 * Returns the variable name if the expression is a simple variable or the base
 * of a value access chain. For other expression types, returns an empty string.
 */
export declare function getBaseVarName(seg: InterpolationSegment): string;
/**
 * Render an expression as a string WITHOUT scope prefix.
 * Used for prompt function bodies (where variables are function parameters)
 * and for re-emitting agency source code.
 */
export declare function expressionToString(expr: Expression): string;
export declare function getAllVariablesInBody(body: AgencyNode[]): Generator<{
    name: string;
    node: AgencyNode;
}>;
export declare function getNodesOfType<T extends AgencyNode["type"]>(nodes: AgencyNode[], type: T): AgencyNode[];
export declare let walkNodeDebug: boolean;
export declare const setWalkNodeDebug: (value: boolean) => boolean;
export declare function walkNodes(nodes: AgencyNode[], ancestors?: WalkAncestor[], scopes?: Scope[]): Generator<{
    node: AgencyNode;
    ancestors: WalkAncestor[];
    scopes: Scope[];
}>;
export declare function walkNodesArray(nodes: AgencyNode[], ancestors?: WalkAncestor[], scopes?: Scope[]): {
    node: AgencyNode;
    ancestors: WalkAncestor[];
    scopes: Scope[];
}[];
export declare function getAllVariablesInBodyArray(body: AgencyNode[]): {
    name: string;
    node: AgencyNode;
}[];
