import type { AgencyNode } from "../../types.js";
import type { CompilationUnit } from "../../compilationUnit.js";
/**
 * Answers "what kind of name is this?" questions for the TypeScriptBuilder.
 *
 * The builder repeatedly needs to ask whether a given identifier names a
 * graph node, an imported function, an impure call, a top-level
 * declaration, etc. Previously each question was implemented as an ad-hoc
 * method on the builder, with its own lazily-built caches sprinkled
 * through the file. This class collects them in one place, builds the
 * caches eagerly in its constructor, and exposes a small predicate API.
 *
 * Pure — depends only on the `CompilationUnit` it is constructed with.
 */
export declare class NameClassifier {
    private readonly compilationUnit;
    private readonly plainTsImportNames;
    private readonly agencyImportNames;
    private readonly graphNodeNames;
    constructor(compilationUnit: CompilationUnit);
    /** True if `functionName` names a graph node defined in or imported into this module. */
    isGraphNode(functionName: string): boolean;
    /**
     * True if `name` was brought in by an `import { … } from "<some>.agency"`
     * statement (as opposed to a `.js`/`.ts` import). Used by the codegen to
     * decide whether a read of `name` in user code should be wrapped with
     * `__readStatic` — agency imports could be `static const` values which
     * hold the `__UNINIT_STATIC` sentinel before their initializer runs.
     * Non-static agency imports (functions, nodes) will never equal the
     * sentinel, so the wrap is a no-op for them.
     */
    isAgencyImport(name: string): boolean;
    /**
     * True if `functionName` is one of the plain-JS helpers that bypass the
     * `__call` dispatcher (`approve`, `reject`, `success`, `failure`, …).
     */
    isDirectCallFunction(functionName: string): boolean;
    /**
     * AST nodes that should be emitted at module top level (function
     * declarations, type aliases, classes, imports, comments, blank lines,
     * and static-scoped assignments). Anything else belongs inside the
     * per-execution `__initializeGlobals` body.
     */
    isTopLevelDeclaration(node: AgencyNode): boolean;
    /**
     * True if `functionName` was imported from a non-Agency source (or an
     * Agency source that wasn't annotated `safe`). The builder uses this to
     * decide whether a call site needs the impure-call guards that wrap
     * non-deterministic code.
     */
    isImpureImportedFunction(functionName: string): boolean;
    /** Recursively walks `node` and returns true if any function call within it is impure. */
    containsImpureCall(node: AgencyNode): boolean;
    /**
     * True if a call to `functionName` should be wrapped in the
     * interrupt-checking boilerplate. Everything gets it EXCEPT known
     * non-Agency direct-call helpers, compiler-internal `__` names, and
     * graph nodes (which handle their own interrupts).
     */
    shouldHandleInterrupts(functionName: string): boolean;
}
