import type { BindingOrigin } from "@skaile/workspaces/types"; export type { BindingOrigin }; /** Hard resource budgets applied to every Flow expression evaluation. */ export declare const FLOW_EXPRESSION_LIMITS: Readonly<{ maxLength: 4096; maxTokens: 256; maxNesting: 32; maxPathSegments: 32; maxCollectionItems: 1024; }>; /** Read-only values available to the bounded Flow expression language. */ export interface FlowExpressionContext { /** Validated input supplied to the current flow run. */ flow: { input: unknown; }; /** Authored defaults exposed through bounded own-property reads. */ defaults?: Record; /** Node status and declared output fields keyed by node identifier. */ nodes: Record; } /** A resolved JSON value together with every source that contributed to it. */ export interface ResolvedBinding { /** Runtime value passed to the node executor. */ value: unknown; /** Stable, de-duplicated provenance in authored traversal order. */ origins: BindingOrigin[]; } /** All named node inputs, keeping executor values separate from provenance. */ export interface ResolvedNodeBindings { /** Resolved values keyed by authored binding name. */ values: Record; /** Provenance keyed by authored binding name. */ origins: Record; } /** How each producer node obtained its output fields. */ export type NodeOutputOrigin = Record; /** @internal Binding names excluded from both authored and direct typed inputs. */ export declare const FLOW_BINDING_NAME_PATTERN: RegExp; /** @internal Collect bounded expressions embedded in a JSON binding value. */ export declare function collectFlowBindingExpressions(value: unknown): string[]; /** Deterministic syntax, budget, or path failure raised by the Flow evaluator. */ export declare class FlowExpressionError extends Error { /** Stable error name for callers that classify evaluator failures. */ readonly name = "FlowExpressionError"; /** Runtime path that was grammar-valid but absent from the supplied context. */ readonly missingPath?: string; /** Producer node whose `skipped` status is why {@link missingPath} is absent. */ readonly skippedProducer?: string; constructor(message: string, missingPath?: string, skippedProducer?: string); } /** Static path evidence used to reconcile safe grammar with declared producer output types. */ export interface FlowExpressionReference { /** Grammar-approved context path. */ path: string; /** True when logical evaluation requires the resolved value itself to be boolean. */ booleanOperand: boolean; } /** Validates authored syntax without reading runtime values; binding mode relaxes only the result type. */ export declare function inspectFlowExpression(expression: string, requireBoolean?: boolean): FlowExpressionReference[]; /** * Evaluates the bounded Flow expression subset without calls, arithmetic, or dynamic property access. * The `default` sentinel is valid only as the complete expression and matches unconditionally. */ export declare function evaluateFlowExpression(expression: string, context: FlowExpressionContext): boolean; /** Proposal-compatible short name for {@link evaluateFlowExpression}. */ export declare function evaluate(expression: string, context: FlowExpressionContext): boolean; /** @internal Serialize a JSON-compatible value with deterministic object-key ordering. */ export declare function stableFlowJson(value: unknown): string; /** * Resolves authored node inputs through the bounded Flow expression grammar. * * Exact `${...}` placeholders retain their JSON type. Placeholders embedded in * text use deterministic interpolation, while arrays and objects are traversed * recursively. Runtime values and provenance remain separate so executors do not * need to understand trust metadata. */ export declare function resolveFlowBindings(bindings: Record | undefined, context: FlowExpressionContext, nodeOutputOrigin?: NodeOutputOrigin, flowInputOrigins?: Record): ResolvedNodeBindings; //# sourceMappingURL=expression.d.ts.map