/**
 * Shared utilities for agentic assertion handlers.
 * Resolves task, plan, trace, agentOutput, and definitions from test.vars and output.trusys.
 * Prefers agent_calls over tool_calls and agent_definitions over tool_definitions.
 */
export declare function toStr(value: unknown): string;
export declare function planToString(plan: string | unknown): string;
export interface ResolvedTrusys {
    task: string;
    plan: string;
    trace: unknown;
    agentOutput: string;
    definitions: unknown;
}
/**
 * Flattens nested tool_calls from agent_calls. Each agent call may have a tool_calls array;
 * returns a single array of all those tool calls. If agent_calls is not an array or entries
 * have no tool_calls, returns an empty array or the original array if it looks like direct
 * tool calls.
 */
export declare function flattenAgentCallsToToolCalls(agentCalls: unknown): unknown[];
/**
 * Resolves task, plan, trace, agentOutput, and definitions from vars (test.vars) and
 * output.trusys. Prefers agent_calls over tool_calls and agent_definitions over tool_definitions.
 * Use the returned fields that your assertion needs; unused ones may be empty or undefined.
 */
export declare function getResolvedTrace(output: string | object, vars: Record<string, unknown> | undefined, prompt?: string): ResolvedTrusys;
/**
 * Parses outputString as JSON; if it has a trusys object, merges trusys fields into a copy of
 * testVars (preferring agent_calls over tool_calls, agent_definitions over tool_definitions)
 * and returns the merged vars and the output string to use (trusys stripped or output extracted).
 * Used by Python-based agentic handlers (argumentCorrectness, toolCorrectness, taskCompleteness).
 */
export declare function applyTraceFromOutputString(outputString: string, testVars: Record<string, unknown>): {
    vars: Record<string, unknown>;
    outputString: string;
};
//# sourceMappingURL=util.d.ts.map