/** * Copyright (c) 2026, Salesforce, Inc., * All rights reserved. * For full license text, see the LICENSE.txt file */ import type { QuerySession } from "./session.js"; /** * Renders a QuerySession's selection tree into a properly formatted GraphQL query string. * * @throws if any emitted GraphQL Name (operation name, variable name, field * name, alias, inline-fragment type condition, or directive name) is not a * valid GraphQL Name, if a variable's type reference has a non-Name innermost * NamedType, or if a `{`/`[`-prefixed argument/default value is not valid JSON * — the W-23204027 render-layer fail-safe. This fires only on a programmer * error (a builder/CLI path that stored a raw identifier without its own guard) * or a hostile input that slipped past the per-builder guards; every legitimate * value passes. Name violations throw an `Error` whose message matches * USER_INPUT_RE; the JSON-literal violation throws a typed `UserInputError` — * both classify as UserInput at the MCP boundary (`runTool`). */ export declare function renderQuery(session: QuerySession): string;