import ts from 'typescript';
import { type CompilerDiagnostic } from './compiler/compilerContext.js';
export type { StateMachineDefinition, State, TaskState, PassState, ChoiceState, WaitState, FailState, ParallelState, MapState, SucceedState, ChoiceRule, ComparisonRule, NotRule, AndRule, OrRule, RetryRule, CatchRule, } from './asl/index.js';
export { AslParser, AslSerializer, AslValidator, } from './asl/index.js';
export type { AslParseResult, AslValidationError } from './asl/index.js';
/**
 * Options for the compile() function.
 */
export interface CompileOptions {
    readonly tsconfigPath?: string;
    readonly sourceFiles?: readonly string[];
    readonly cwd?: string;
    /** Deploy-time value overrides for service binding variables.
     *  Keys are variable names; values are resource identifiers (strings or CF intrinsic objects). */
    readonly substitutions?: Readonly<Record<string, unknown>>;
    /** Query language for ASL path expressions. Defaults to 'JSONata'. */
    readonly queryLanguage?: 'JSONPath' | 'JSONata';
    /** Global timeout for state machine execution in seconds. Maps to ASL TimeoutSeconds. */
    readonly timeoutSeconds?: number;
    /** ASL Version field. Defaults to omitted (ASL default is "1.0"). */
    readonly version?: string;
    /** Populate ASL Comment fields with source file:line locations. */
    readonly sourceMap?: boolean;
}
/**
 * The result of a compilation run.
 */
export interface CompileResult {
    readonly stateMachines: readonly CompiledStateMachine[];
    readonly errors: readonly CompilerDiagnostic[];
}
/**
 * A single compiled state machine with its ASL definition and metadata.
 */
export interface CompiledStateMachine {
    readonly name: string;
    readonly source: string;
    readonly definition: import('./asl/types.js').StateMachineDefinition;
    readonly services: readonly string[];
}
export { CompilerDiagnostic };
export type { IntrinsicsMethods, StepFunctionCallSite, StepFunctionFactory, StepFunctionOrigin, CallGraphNodeEdge, ServiceRegistry, ServiceBinding, ServiceMethodInfo, } from './compiler/discovery/index.js';
export { CallGraphNode, CallNodeType, } from './compiler/discovery/index.js';
export type { Terminator, FallTerminator, BranchTerminator, LoopTerminator, LoopBackTerminator, TryCatchTerminator, MapStateTerminator, ParallelTerminator, ReturnTerminator, ThrowTerminator, BreakTerminator, ContinueTerminator, BasicBlock, ControlFlowGraph, } from './compiler/cfg/index.js';
export { buildCFG } from './compiler/cfg/index.js';
export type { BuildCFGResult } from './compiler/cfg/index.js';
export { generateStateMachine, deriveStateMachineName, buildStateMachine, buildParameters, buildChoiceRule, JSON_PATH_DIALECT, JSONATA_DIALECT, JsonPathDialect, JsonataDialect, } from './compiler/generation/index.js';
export type { PathDialect } from './compiler/generation/index.js';
export { StepVariableType, resolveVariables, resolveExpression, extractResourceArn, VariableResolutionBuilder, } from './compiler/analysis/index.js';
export type { VariableInfo, VariableScope, VariableEnvironment, VariableResolution, ResolvedExpression, } from './compiler/analysis/index.js';
export { WholeProgramAnalyzer, ExpressionEvaluator, ModuleEnvironment, isEligibleForInlining, analyzeHelperFunctions, top, constant, bottom, meet, isConstant, isBottom, isTop, } from './compiler/analysis/index.js';
export type { WholeProgramAnalyzerOptions, InlinableHelper, InlineBinding, LatticeValue, TopValue, ConstantValue, BottomValue, SymbolResolver, ImportResolver, NamespaceResolver, } from './compiler/analysis/index.js';
export { createSimpleStepsTransformer } from './transformer/index.js';
export { analyzeFreeVariables } from './transformer/dataFlow.js';
export type { FreeVariable, FreeVariableClassification, ServiceInfo } from './transformer/dataFlow.js';
export { compileVirtualWorkflow } from './transformer/virtualCompiler.js';
export type { VirtualCompileResult } from './transformer/virtualCompiler.js';
/**
 * Compile TypeScript source files to ASL state machine definitions.
 */
export declare function compile(options: CompileOptions): CompileResult;
/**
 * Options for compileFromProgram(). Used in browser environments
 * where a ts.Program is created with a virtual CompilerHost.
 */
export interface CompileFromProgramOptions {
    /** A pre-built TypeScript Program (e.g. from a virtual file system). */
    readonly program: ts.Program;
    /** Path to the runtime/index.ts file within the program. */
    readonly runtimePath: string;
    /** Path to the runtime/services/ directory within the program. */
    readonly servicesDir: string;
    /** Paths to skip when scanning for call sites (e.g. runtime, compiler files). */
    readonly skipPatterns?: readonly string[];
    /** Deploy-time value overrides for service binding variables. */
    readonly substitutions?: Readonly<Record<string, unknown>>;
    /** Query language for ASL path expressions. Defaults to 'JSONata'. */
    readonly queryLanguage?: 'JSONPath' | 'JSONata';
    /** Global timeout for state machine execution in seconds. Maps to ASL TimeoutSeconds. */
    readonly timeoutSeconds?: number;
    /** ASL Version field. Defaults to omitted (ASL default is "1.0"). */
    readonly version?: string;
    /** Populate ASL Comment fields with source file:line locations. */
    readonly sourceMap?: boolean;
}
/**
 * Compile a pre-built ts.Program to ASL state machine definitions.
 *
 * This is the browser-friendly entry point. Unlike compile(), it does not
 * use Node-specific APIs (fs, path, __dirname, process.cwd).
 */
export declare function compileFromProgram(options: CompileFromProgramOptions): CompileResult;
/**
 * Thrown by SimpleStepsBuilder methods when compilation produces errors.
 */
export declare class SimpleStepsCompileError extends Error {
    readonly diagnostics: readonly CompilerDiagnostic[];
    constructor(diagnostics: readonly CompilerDiagnostic[]);
}
/**
 * Builder for extracting compiled state machines.
 */
export declare class SimpleStepsBuilder {
    private readonly options;
    private result;
    constructor(options: CompileOptions);
    /**
     * Return a new builder with deploy-time substitutions merged in.
     * Keys are variable names from source; values are resource identifiers
     * (strings, CF intrinsic objects, CDK tokens, etc.).
     */
    withSubstitutions(substitutions: Readonly<Record<string, unknown>>): SimpleStepsBuilder;
    private getResult;
    toStateMachine(): import('./asl/types.js').StateMachineDefinition;
    toStateMachines(): readonly CompiledStateMachine[];
    toResult(): CompileResult;
}
/**
 * Fluent API for compiling SimpleSteps definitions.
 */
export declare class SimpleSteps {
    static fromFile(filePath: string): SimpleStepsBuilder;
    static fromProject(tsconfigPath: string): SimpleStepsBuilder;
}
//# sourceMappingURL=index.d.ts.map