import type { AgStudioQuery } from '../../api/engine/agStudioQuery'; import type { ResolverContext } from '../../shared/dataEngine'; import type { Query } from '../../shared/query/query'; import type { SchemaModel } from '../../shared/schema/schemaModel'; import type { ErrorReporter } from '../../shared/validation'; /** * Resolve a {@link Query} (DataQuery) into an {@link AgStudioQuery} at the * execute boundary. Pre-validates field references via the hydrator, then * delegates to the resolver. Errors are trapped and forwarded to the optional * reporter; the function returns `undefined` to signal a no-op execution. * * This is a bridge concern — the engine planner only consumes AgStudioQuery. */ export declare function resolveForExecute(query: Query, ctx: ResolverContext, dataModel: SchemaModel, reporter?: ErrorReporter): AgStudioQuery | undefined; /** * Hydrate an already-shaped {@link AgStudioQuery} so every field ref carries * field augmentation (dataType, key, sourceId). Invoked by the engine execute * path to handle hand-built queries that bypass resolution. Idempotent — queries * already produced by the resolver pay only object-construction cost. */ export declare function hydrateAgStudioQuery(query: AgStudioQuery, dataModel: SchemaModel): AgStudioQuery; /** * Ensure the query's join list covers every source required by transitive * expression dependencies. AI-generated queries provide explicit joins but * cannot know about expression internals — this step auto-resolves any * missing source joins using the schema's relationship graph, mirroring * what `QueryResolver.resolve()` does for the DataQuery path. * * No-op when every required source is already present. */ export declare function completeJoinsForQuery(query: AgStudioQuery, dataModel: SchemaModel): AgStudioQuery;