import type { GridApi } from '../../core/grid-api'; import type { PhotonCommand } from '../photon-ai.types'; import type { PhotonAIAction } from './ai-provider.types'; /** * Bridges a model-generated {@link PhotonAIAction} to a fully-formed * {@link PhotonCommand} the existing `CommandExecutor` can run unchanged. * * A language model reliably produces the *shape* of a command (an intent key * plus the target column and value) but not the incidental details the * deterministic builders add for free — the display `header`, `Date` objects * for date filters, a default operator, numeric coercion. Rather than force * the model to reproduce all of that (fragile, token-heavy), this normalizer * backfills it deterministically from the live grid: * * - resolves `colId`/`colIds` against real columns (tolerating a header used * in place of an id, since models occasionally do that), * - backfills the `header` param used by every intent's result message, * - coerces `applyFilter` values to the column's type (ISO string → `Date`, * numeric string → `number`) and defaults a sensible operator. * * It is intentionally the *only* place provider output is reshaped, mirroring * the role `CommandBuilder` plays for the deterministic pipeline. */ export declare class CommandNormalizer { private readonly api; constructor(api: GridApi); /** Reshapes one action into an executable command. Never throws — worst case, the executor reports an unknown/invalid command. */ normalize(action: PhotonAIAction): PhotonCommand; /** Resolves and canonicalizes `colId`/`colIds`, then backfills the human `header` label. */ private normalizeColumnTargets; /** Coerces `applyFilter`'s value(s) to the target column's data type and supplies a default operator. */ private normalizeFilterParams; /** Matches by exact colId first, then case-insensitively by header — models sometimes echo the visible header. */ private resolveColumn; } //# sourceMappingURL=command-normalizer.d.ts.map