/**
 * traversalHelpers — module-level boundary validators and normalizers
 * used by LogicalTraversal.
 *
 * @module domain/services/query/traversalHelpers
 */
import ORSet from '../../crdt/ORSet.ts';
import type { Direction, NeighborEdge } from '../../../ports/NeighborProviderPort.ts';
/** Validated adjacency snapshot used by LogicalTraversal. */
export interface AdjacencyMaps {
    outgoing: Map<string, Array<{
        neighborId: string;
        label: string;
    }>>;
    incoming: Map<string, Array<{
        neighborId: string;
        label: string;
    }>>;
}
/** Validated traversal state used by LogicalTraversal. */
export interface TraversalState {
    nodeAlive: ORSet;
}
/**
 * Returns true when a value is a materialized adjacency record.
 */
export declare function isAdjacencyMaps(adjacency: unknown): adjacency is AdjacencyMaps;
/**
 * Validates the materialized adjacency boundary before traversal.
 *
 * @throws {TraversalError} code 'E_TRAVERSAL_ADJACENCY' if invalid
 */
export declare function requireAdjacencyMaps(adjacency: unknown): AdjacencyMaps;
/**
 * Validates the materialized traversal state boundary before building the provider.
 *
 * @throws {TraversalError} code 'E_TRAVERSAL_STATE' if invalid
 */
export declare function requireTraversalState(state: unknown): TraversalState;
/** Strips `undefined` from every property value type in T. */
export type WithoutUndefined<T> = {
    [K in keyof T]: Exclude<T[K], undefined>;
};
/**
 * Strips keys whose value is `undefined` from an object so that
 * `exactOptionalPropertyTypes` doesn't complain about explicit `undefined`
 * being assigned to optional-but-not-undefined-typed properties.
 *
 * The return type is `WithoutUndefined<T>` so that properties whose values
 * were `T | undefined` become `T`, making the object assignable to params
 * typed with strict optional properties.
 */
export declare function stripUndefined<T extends Record<string, unknown>>(// nosemgrep: ts-no-record-string-unknown-outside-adapters -- 0025B; nosemgrep: ts-no-unknown-outside-adapters -- 0025B
obj: T): WithoutUndefined<T>;
/**
 * Validates and normalizes an edge direction parameter.
 *
 * @throws {TraversalError} code 'INVALID_DIRECTION' if not a valid direction
 */
export declare function assertDirection(direction: string | undefined): Direction;
/**
 * Normalizes a label filter into a Set for efficient lookup.
 *
 * Accepts a single label string, an array of labels, or undefined. Returns
 * a Set containing the label(s) or undefined if no filter is specified.
 *
 * @throws {TraversalError} code 'INVALID_LABEL_FILTER' if type is not string, array, or undefined
 */
export declare function normalizeLabelFilter(labelFilter: string | string[] | undefined): Set<string> | undefined;
export type { NeighborEdge };
