/** * **What a name means inside a CEL expression.** * * The TYPE half of CEL language support — completion's candidate list and * hover's tooltip are both this, read off the scope the analyzer resolved. It * is deliberately separate from the DECLARATION half (`definition/`), which * answers where a name was written: the two take different inputs and * legitimately disagree. `steps.encode.result` has a type and no manifest node * to jump to; a transport binding like `request` has a scope entry and no * declaration at all. Joining them is hover's job, not this module's. */ import type { CelScope } from "@telorun/analyzer"; /** One name in scope, with whatever the scope knows about it. Both `type` and * `schema` are optional and neither implies the other: a CEL environment * variable carries a type and no schema, a context property carries a schema * and gets its type from it. */ export interface CelSymbol { name: string; /** CEL type name (`int`, `string`, `map`), when the environment declares one. */ type?: string; /** JSON Schema node, when the context declares the shape. */ schema?: Record; description?: string; } /** * One callable, with every overload the environment registered for it. * * Grouped rather than one entry per overload: the registry declares a signature * per accepted argument list — `double` has four — and offering each as its own * candidate turns a completion list into four identical labels the author * cannot choose between. What varies between them is the signature, so that is * what the grouped entry carries. */ export interface CelFunctionSymbol { name: string; /** Every registered overload's signature, in registration order. */ signatures: string[]; /** The type a receiver-style call is made ON (`string.startsWith`), or null * for a global function. Part of the grouping key, since a global and a * method sharing a name are genuinely two callables. */ receiverType: string | null; /** The first description any overload carries — they describe the function, * not the individual argument list. */ description?: string; } /** The type a schema node declares, rendered for display. Unions are joined * rather than collapsed — a slot admitting several shapes says so. */ export declare function schemaTypeName(schema: Record | undefined): string | undefined; /** * The names an expression may start with. * * Both sources, because neither is complete: the context schema carries the * scope's own bindings (`steps`, `error`, a kind's named bindings, a transport's * `request`), while the environment carries what was registered onto it * directly — which is where the kernel globals live when no context applied. * A name in both takes its schema from the context, which is the narrower. */ export declare function celRootSymbols(scope: CelScope): CelSymbol[]; /** * The members available after `prefix`. * * Empty when the prefix resolves to nothing OR to something whose shape the * scope does not declare — an open node, a live value, a permissive contract. * That is the honest answer: offering a guess here would be offering names the * checker has no opinion about, which is exactly what the shared scope rule * exists to prevent. */ export declare function celMemberSymbols(scope: CelScope, prefix: string[]): CelSymbol[]; /** What the chain `parts` resolves to — used for hover, where the cursor sits on * one identifier of a complete chain and the symbol wanted is the one at that * identifier, not at the chain's tail. */ export declare function celSymbolAt(scope: CelScope, parts: string[]): CelSymbol | undefined; /** * The callables the environment declares, one entry per function. * * Read off `getDefinitions()` rather than a curated list, exactly as the call * classifier does — so a function the registry gained is offered without this * module being told, and one it never had is never offered. Overloads are * folded into their function; see {@link CelFunctionSymbol}. */ export declare function celFunctions(scope: CelScope): CelFunctionSymbol[]; //# sourceMappingURL=symbols.d.ts.map