Function: validateIntent()
validateIntent(
input,catalog):IntentResult
Defined in: intent/validateIntent.ts:32
Validates a raw value against intentSchema and grounds every reference
against catalog — the PRD-005 plan D4 algorithm, corrected by the
grilling session's D9/D10 mechanism fixes: dataset resolution is a
metricIds/geographyIds intersection over catalog.datasets (not
Catalog.joins), and IntentFilter.field grounds against
Catalog.filters[] (not raw dataset columns), scoped to the resolved
dataset/geography.
Every check runs and its issues are collected — the pass never
short-circuits on the first failure, mirroring validateCatalog's
"report everything found in one pass" contract. Dataset resolution and
filter grounding (validateIntentChecks.ts) run only once the metric and
geography they depend on have themselves resolved, since there is
nothing meaningful to intersect or scope against otherwise.
Parameters
| Parameter | Type |
|---|---|
input | unknown |
catalog | { collections?: object[]; datasets: object[]; domain?: string; filters: object[]; geographies: object[]; joins: object[]; mapTypes: object[]; metrics: object[]; permissions?: Record<string, unknown>; series?: object[]; version: string; } |
catalog.collections? | object[] |
catalog.datasets | object[] |
catalog.domain? | string |
catalog.filters | object[] |
catalog.geographies | object[] |
catalog.joins | object[] |
catalog.mapTypes | object[] |
catalog.metrics | object[] |
catalog.permissions? | Record<string, unknown> |
catalog.series? | object[] |
catalog.version | string |