@runcontext/core 0.1.1 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,110 +1,228 @@
1
1
  import { z } from 'zod';
2
2
 
3
- type NodeKind = 'concept' | 'entity' | 'policy' | 'term' | 'owner' | 'product';
4
- type Status = 'draft' | 'certified' | 'deprecated';
5
- type Severity = 'error' | 'warning';
6
- interface SourceLocation {
7
- file: string;
8
- line: number;
9
- col: number;
3
+ type Dialect = 'ANSI_SQL' | 'SNOWFLAKE' | 'MDX' | 'TABLEAU' | 'DATABRICKS';
4
+ type Vendor = 'COMMON' | 'SNOWFLAKE' | 'SALESFORCE' | 'DBT' | 'DATABRICKS';
5
+ interface AIContext {
6
+ instructions?: string;
7
+ synonyms?: string[];
8
+ examples?: string[];
10
9
  }
11
- interface Evidence {
12
- type: string;
13
- ref: string;
10
+ interface CustomExtension {
11
+ vendor_name: Vendor;
12
+ data: string;
14
13
  }
15
- interface Example {
16
- label: string;
17
- content: string;
18
- kind: 'do' | 'dont';
14
+ interface DialectExpression {
15
+ dialect: Dialect;
16
+ expression: string;
19
17
  }
20
- interface BaseNode {
21
- id: string;
22
- kind: NodeKind;
23
- source: SourceLocation;
24
- owner?: string;
25
- tags?: string[];
26
- status?: Status;
18
+ interface Expression {
19
+ dialects: DialectExpression[];
20
+ }
21
+ interface Dimension {
22
+ is_time?: boolean;
23
+ }
24
+ interface OsiField {
25
+ name: string;
26
+ expression: Expression;
27
+ dimension?: Dimension;
28
+ label?: string;
27
29
  description?: string;
30
+ ai_context?: string | AIContext;
31
+ custom_extensions?: CustomExtension[];
28
32
  }
29
- interface Concept extends BaseNode {
30
- kind: 'concept';
31
- productId?: string;
32
- definition: string;
33
- certified?: boolean;
34
- evidence?: Evidence[];
35
- dependsOn?: string[];
36
- examples?: Example[];
33
+ interface OsiDataset {
34
+ name: string;
35
+ source: string;
36
+ primary_key?: string[];
37
+ unique_keys?: string[][];
38
+ description?: string;
39
+ ai_context?: string | AIContext;
40
+ fields?: OsiField[];
41
+ custom_extensions?: CustomExtension[];
37
42
  }
38
- interface Product extends BaseNode {
39
- kind: 'product';
40
- description: string;
43
+ interface OsiRelationship {
44
+ name: string;
45
+ from: string;
46
+ to: string;
47
+ from_columns: string[];
48
+ to_columns: string[];
49
+ ai_context?: string | AIContext;
50
+ custom_extensions?: CustomExtension[];
41
51
  }
42
- interface Entity extends BaseNode {
43
- kind: 'entity';
44
- definition?: string;
45
- fields?: EntityField[];
52
+ interface OsiMetric {
53
+ name: string;
54
+ expression: Expression;
55
+ description?: string;
56
+ ai_context?: string | AIContext;
57
+ custom_extensions?: CustomExtension[];
46
58
  }
47
- interface EntityField {
59
+ interface OsiSemanticModel {
48
60
  name: string;
49
61
  description?: string;
50
- type?: string;
51
- }
52
- interface PolicyRule {
53
- priority: number;
54
- when: {
55
- tagsAny?: string[];
56
- conceptIds?: string[];
57
- status?: Status;
58
- };
59
- then: {
60
- requireRole?: string;
61
- deny?: boolean;
62
- warn?: string;
63
- };
62
+ ai_context?: string | AIContext;
63
+ datasets: OsiDataset[];
64
+ relationships?: OsiRelationship[];
65
+ metrics?: OsiMetric[];
66
+ custom_extensions?: CustomExtension[];
64
67
  }
65
- interface Policy extends BaseNode {
66
- kind: 'policy';
67
- description: string;
68
- rules: PolicyRule[];
68
+ interface OsiDocument {
69
+ version: '1.0';
70
+ semantic_model: OsiSemanticModel[];
71
+ }
72
+
73
+ type TrustStatus = 'endorsed' | 'warning' | 'deprecated';
74
+ type SecurityClassification = 'public' | 'internal' | 'confidential' | 'secret';
75
+ type TableType = 'fact' | 'dimension' | 'bridge' | 'snapshot' | 'event' | 'aggregate' | 'view';
76
+ type SemanticRole = 'metric' | 'dimension' | 'identifier' | 'date';
77
+ type DefaultAggregation = 'SUM' | 'AVG' | 'COUNT' | 'COUNT_DISTINCT' | 'MIN' | 'MAX';
78
+ interface DatasetGovernance {
79
+ grain: string;
80
+ refresh?: string;
81
+ table_type: TableType;
82
+ security?: SecurityClassification;
83
+ }
84
+ interface FieldGovernance {
85
+ semantic_role: SemanticRole;
86
+ default_aggregation?: DefaultAggregation;
87
+ additive?: boolean;
88
+ default_filter?: string;
89
+ sample_values?: string[];
90
+ }
91
+ interface GovernanceFile {
92
+ model: string;
93
+ owner: string;
94
+ trust?: TrustStatus;
95
+ security?: SecurityClassification;
96
+ tags?: string[];
97
+ datasets?: Record<string, DatasetGovernance>;
98
+ fields?: Record<string, FieldGovernance>;
99
+ }
100
+
101
+ interface GoldenQuery {
102
+ question: string;
103
+ sql: string;
104
+ dialect?: string;
105
+ tags?: string[];
106
+ }
107
+ interface BusinessRule {
108
+ name: string;
109
+ definition: string;
110
+ enforcement?: string[];
111
+ avoid?: string[];
112
+ tables?: string[];
113
+ applied_always?: boolean;
114
+ }
115
+ interface GuardrailFilter {
116
+ name: string;
117
+ filter: string;
118
+ tables?: string[];
119
+ reason: string;
120
+ }
121
+ interface Hierarchy {
122
+ name: string;
123
+ levels: string[];
124
+ dataset: string;
125
+ field?: string;
126
+ }
127
+ interface RulesFile {
128
+ model: string;
129
+ golden_queries?: GoldenQuery[];
130
+ business_rules?: BusinessRule[];
131
+ guardrail_filters?: GuardrailFilter[];
132
+ hierarchies?: Hierarchy[];
69
133
  }
70
- interface Term extends BaseNode {
71
- kind: 'term';
134
+
135
+ type LineageType = 'pipeline' | 'dashboard' | 'ml_model' | 'api' | 'manual';
136
+ interface UpstreamEntry {
137
+ source: string;
138
+ type: LineageType;
139
+ pipeline?: string;
140
+ tool?: string;
141
+ refresh?: string;
142
+ notes?: string;
143
+ }
144
+ interface DownstreamEntry {
145
+ target: string;
146
+ type: LineageType;
147
+ tool?: string;
148
+ notes?: string;
149
+ }
150
+ interface LineageFile {
151
+ model: string;
152
+ upstream?: UpstreamEntry[];
153
+ downstream?: DownstreamEntry[];
154
+ }
155
+
156
+ interface TermFile {
157
+ id: string;
72
158
  definition: string;
73
159
  synonyms?: string[];
74
- mapsTo?: string[];
160
+ maps_to?: string[];
161
+ owner?: string;
162
+ tags?: string[];
75
163
  }
76
- interface Owner extends BaseNode {
77
- kind: 'owner';
78
- displayName: string;
164
+
165
+ interface OwnerFile {
166
+ id: string;
167
+ display_name: string;
79
168
  email?: string;
80
169
  team?: string;
170
+ description?: string;
81
171
  }
82
- type ContextNode = Concept | Product | Entity | Policy | Term | Owner;
83
- interface Edge {
84
- from: string;
85
- to: string;
86
- type: 'depends_on' | 'relates_to' | 'applies_to' | 'maps_to' | 'owned_by' | 'belongs_to';
172
+
173
+ type MetadataTier = 'none' | 'bronze' | 'silver' | 'gold';
174
+ interface TierCheckResult {
175
+ id: string;
176
+ label: string;
177
+ passed: boolean;
178
+ detail?: string;
179
+ }
180
+ interface TierScore {
181
+ model: string;
182
+ tier: MetadataTier;
183
+ bronze: {
184
+ passed: boolean;
185
+ checks: TierCheckResult[];
186
+ };
187
+ silver: {
188
+ passed: boolean;
189
+ checks: TierCheckResult[];
190
+ };
191
+ gold: {
192
+ passed: boolean;
193
+ checks: TierCheckResult[];
194
+ };
87
195
  }
196
+
88
197
  interface ContextGraph {
89
- nodes: Map<string, ContextNode>;
90
- edges: Edge[];
198
+ models: Map<string, OsiSemanticModel>;
199
+ governance: Map<string, GovernanceFile>;
200
+ rules: Map<string, RulesFile>;
201
+ lineage: Map<string, LineageFile>;
202
+ terms: Map<string, TermFile>;
203
+ owners: Map<string, OwnerFile>;
204
+ tiers: Map<string, TierScore>;
91
205
  indexes: {
92
- byKind: Map<NodeKind, string[]>;
93
206
  byOwner: Map<string, string[]>;
94
207
  byTag: Map<string, string[]>;
95
- byStatus: Map<string, string[]>;
96
- dependents: Map<string, string[]>;
208
+ byTrust: Map<string, string[]>;
209
+ modelToGovernance: Map<string, string>;
210
+ modelToRules: Map<string, string>;
211
+ modelToLineage: Map<string, string>;
97
212
  };
98
213
  }
99
214
 
100
- interface TextEdit {
215
+ type Severity = 'error' | 'warning';
216
+ interface SourceLocation {
101
217
  file: string;
102
- range: {
103
- startLine: number;
104
- startCol: number;
105
- endLine: number;
106
- endCol: number;
107
- };
218
+ line: number;
219
+ column: number;
220
+ }
221
+ interface TextEdit {
222
+ startLine: number;
223
+ startCol: number;
224
+ endLine: number;
225
+ endCol: number;
108
226
  newText: string;
109
227
  }
110
228
  interface Fix {
@@ -115,536 +233,2312 @@ interface Diagnostic {
115
233
  ruleId: string;
116
234
  severity: Severity;
117
235
  message: string;
118
- source: SourceLocation;
236
+ location: SourceLocation;
119
237
  fixable: boolean;
120
238
  fix?: Fix;
121
- suggestions?: string[];
122
239
  }
123
240
 
124
- interface ProjectConfig {
125
- id: string;
126
- displayName: string;
127
- version: string;
128
- }
129
- interface PathsConfig {
130
- rootDir?: string;
131
- contextDir?: string;
132
- distDir?: string;
133
- cacheDir?: string;
241
+ interface LintConfig {
242
+ severity_overrides?: Record<string, Severity | 'off'>;
134
243
  }
135
244
  interface SiteConfig {
136
- enabled?: boolean;
137
245
  title?: string;
138
- basePath?: string;
246
+ base_path?: string;
139
247
  }
140
248
  interface McpConfig {
141
- enabled?: boolean;
142
- transport?: ('stdio' | 'http')[];
143
- http?: {
144
- port?: number;
145
- host?: string;
146
- };
147
- }
148
- interface LintConfig {
149
- defaultSeverity?: Severity;
150
- rules?: Record<string, Severity | 'off'>;
249
+ transport?: 'stdio' | 'http';
250
+ port?: number;
151
251
  }
152
252
  interface ContextKitConfig {
153
- project: ProjectConfig;
154
- paths?: PathsConfig;
253
+ context_dir: string;
254
+ output_dir: string;
255
+ minimum_tier?: MetadataTier;
256
+ lint?: LintConfig;
155
257
  site?: SiteConfig;
156
258
  mcp?: McpConfig;
157
- lint?: LintConfig;
158
- plugins?: unknown[];
159
259
  }
160
260
 
161
- interface ManifestBuild {
162
- timestamp: string;
163
- version: string;
164
- nodeCount: number;
165
- }
166
- interface ManifestProject {
167
- id: string;
168
- displayName: string;
169
- version: string;
170
- }
171
- interface ManifestConcept {
172
- id: string;
173
- definition: string;
174
- productId?: string;
175
- certified?: boolean;
176
- owner?: string;
177
- tags?: string[];
178
- dependsOn?: string[];
179
- }
180
- interface ManifestProduct {
181
- id: string;
182
- description: string;
183
- owner?: string;
184
- tags?: string[];
185
- }
186
- interface ManifestPolicy {
187
- id: string;
188
- description: string;
189
- rules: Policy['rules'];
190
- owner?: string;
191
- tags?: string[];
192
- }
193
- interface ManifestEntity {
194
- id: string;
195
- definition?: string;
196
- fields?: Entity['fields'];
197
- owner?: string;
198
- tags?: string[];
199
- }
200
- interface ManifestTerm {
201
- id: string;
202
- definition: string;
203
- synonyms?: string[];
204
- mapsTo?: string[];
205
- owner?: string;
206
- tags?: string[];
207
- }
208
- interface ManifestOwner {
209
- id: string;
210
- displayName: string;
211
- email?: string;
212
- team?: string;
213
- }
214
- interface Manifest {
215
- schemaVersion: string;
216
- project: ManifestProject;
217
- build: ManifestBuild;
218
- concepts: ManifestConcept[];
219
- products: ManifestProduct[];
220
- policies: ManifestPolicy[];
221
- entities: ManifestEntity[];
222
- terms: ManifestTerm[];
223
- owners: ManifestOwner[];
224
- indexes: {
225
- byId: Record<string, {
226
- kind: string;
227
- index: number;
261
+ declare const dialectEnum: z.ZodEnum<["ANSI_SQL", "SNOWFLAKE", "MDX", "TABLEAU", "DATABRICKS"]>;
262
+ declare const vendorEnum: z.ZodEnum<["COMMON", "SNOWFLAKE", "SALESFORCE", "DBT", "DATABRICKS"]>;
263
+ declare const aiContextObjectSchema: z.ZodObject<{
264
+ instructions: z.ZodOptional<z.ZodString>;
265
+ synonyms: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
266
+ examples: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
267
+ }, "strip", z.ZodTypeAny, {
268
+ instructions?: string | undefined;
269
+ synonyms?: string[] | undefined;
270
+ examples?: string[] | undefined;
271
+ }, {
272
+ instructions?: string | undefined;
273
+ synonyms?: string[] | undefined;
274
+ examples?: string[] | undefined;
275
+ }>;
276
+ declare const aiContextSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
277
+ instructions: z.ZodOptional<z.ZodString>;
278
+ synonyms: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
279
+ examples: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
280
+ }, "strip", z.ZodTypeAny, {
281
+ instructions?: string | undefined;
282
+ synonyms?: string[] | undefined;
283
+ examples?: string[] | undefined;
284
+ }, {
285
+ instructions?: string | undefined;
286
+ synonyms?: string[] | undefined;
287
+ examples?: string[] | undefined;
288
+ }>]>;
289
+ declare const customExtensionSchema: z.ZodObject<{
290
+ vendor_name: z.ZodEnum<["COMMON", "SNOWFLAKE", "SALESFORCE", "DBT", "DATABRICKS"]>;
291
+ data: z.ZodString;
292
+ }, "strip", z.ZodTypeAny, {
293
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
294
+ data: string;
295
+ }, {
296
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
297
+ data: string;
298
+ }>;
299
+ declare const dialectExpressionSchema: z.ZodObject<{
300
+ dialect: z.ZodEnum<["ANSI_SQL", "SNOWFLAKE", "MDX", "TABLEAU", "DATABRICKS"]>;
301
+ expression: z.ZodString;
302
+ }, "strip", z.ZodTypeAny, {
303
+ dialect: "ANSI_SQL" | "SNOWFLAKE" | "MDX" | "TABLEAU" | "DATABRICKS";
304
+ expression: string;
305
+ }, {
306
+ dialect: "ANSI_SQL" | "SNOWFLAKE" | "MDX" | "TABLEAU" | "DATABRICKS";
307
+ expression: string;
308
+ }>;
309
+ declare const expressionSchema: z.ZodObject<{
310
+ dialects: z.ZodArray<z.ZodObject<{
311
+ dialect: z.ZodEnum<["ANSI_SQL", "SNOWFLAKE", "MDX", "TABLEAU", "DATABRICKS"]>;
312
+ expression: z.ZodString;
313
+ }, "strip", z.ZodTypeAny, {
314
+ dialect: "ANSI_SQL" | "SNOWFLAKE" | "MDX" | "TABLEAU" | "DATABRICKS";
315
+ expression: string;
316
+ }, {
317
+ dialect: "ANSI_SQL" | "SNOWFLAKE" | "MDX" | "TABLEAU" | "DATABRICKS";
318
+ expression: string;
319
+ }>, "many">;
320
+ }, "strip", z.ZodTypeAny, {
321
+ dialects: {
322
+ dialect: "ANSI_SQL" | "SNOWFLAKE" | "MDX" | "TABLEAU" | "DATABRICKS";
323
+ expression: string;
324
+ }[];
325
+ }, {
326
+ dialects: {
327
+ dialect: "ANSI_SQL" | "SNOWFLAKE" | "MDX" | "TABLEAU" | "DATABRICKS";
328
+ expression: string;
329
+ }[];
330
+ }>;
331
+ declare const dimensionSchema: z.ZodObject<{
332
+ is_time: z.ZodOptional<z.ZodBoolean>;
333
+ }, "strip", z.ZodTypeAny, {
334
+ is_time?: boolean | undefined;
335
+ }, {
336
+ is_time?: boolean | undefined;
337
+ }>;
338
+ declare const osiFieldSchema: z.ZodObject<{
339
+ name: z.ZodString;
340
+ expression: z.ZodObject<{
341
+ dialects: z.ZodArray<z.ZodObject<{
342
+ dialect: z.ZodEnum<["ANSI_SQL", "SNOWFLAKE", "MDX", "TABLEAU", "DATABRICKS"]>;
343
+ expression: z.ZodString;
344
+ }, "strip", z.ZodTypeAny, {
345
+ dialect: "ANSI_SQL" | "SNOWFLAKE" | "MDX" | "TABLEAU" | "DATABRICKS";
346
+ expression: string;
347
+ }, {
348
+ dialect: "ANSI_SQL" | "SNOWFLAKE" | "MDX" | "TABLEAU" | "DATABRICKS";
349
+ expression: string;
350
+ }>, "many">;
351
+ }, "strip", z.ZodTypeAny, {
352
+ dialects: {
353
+ dialect: "ANSI_SQL" | "SNOWFLAKE" | "MDX" | "TABLEAU" | "DATABRICKS";
354
+ expression: string;
355
+ }[];
356
+ }, {
357
+ dialects: {
358
+ dialect: "ANSI_SQL" | "SNOWFLAKE" | "MDX" | "TABLEAU" | "DATABRICKS";
359
+ expression: string;
360
+ }[];
361
+ }>;
362
+ dimension: z.ZodOptional<z.ZodObject<{
363
+ is_time: z.ZodOptional<z.ZodBoolean>;
364
+ }, "strip", z.ZodTypeAny, {
365
+ is_time?: boolean | undefined;
366
+ }, {
367
+ is_time?: boolean | undefined;
368
+ }>>;
369
+ label: z.ZodOptional<z.ZodString>;
370
+ description: z.ZodOptional<z.ZodString>;
371
+ ai_context: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
372
+ instructions: z.ZodOptional<z.ZodString>;
373
+ synonyms: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
374
+ examples: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
375
+ }, "strip", z.ZodTypeAny, {
376
+ instructions?: string | undefined;
377
+ synonyms?: string[] | undefined;
378
+ examples?: string[] | undefined;
379
+ }, {
380
+ instructions?: string | undefined;
381
+ synonyms?: string[] | undefined;
382
+ examples?: string[] | undefined;
383
+ }>]>>;
384
+ custom_extensions: z.ZodOptional<z.ZodArray<z.ZodObject<{
385
+ vendor_name: z.ZodEnum<["COMMON", "SNOWFLAKE", "SALESFORCE", "DBT", "DATABRICKS"]>;
386
+ data: z.ZodString;
387
+ }, "strip", z.ZodTypeAny, {
388
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
389
+ data: string;
390
+ }, {
391
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
392
+ data: string;
393
+ }>, "many">>;
394
+ }, "strip", z.ZodTypeAny, {
395
+ expression: {
396
+ dialects: {
397
+ dialect: "ANSI_SQL" | "SNOWFLAKE" | "MDX" | "TABLEAU" | "DATABRICKS";
398
+ expression: string;
399
+ }[];
400
+ };
401
+ name: string;
402
+ dimension?: {
403
+ is_time?: boolean | undefined;
404
+ } | undefined;
405
+ label?: string | undefined;
406
+ description?: string | undefined;
407
+ ai_context?: string | {
408
+ instructions?: string | undefined;
409
+ synonyms?: string[] | undefined;
410
+ examples?: string[] | undefined;
411
+ } | undefined;
412
+ custom_extensions?: {
413
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
414
+ data: string;
415
+ }[] | undefined;
416
+ }, {
417
+ expression: {
418
+ dialects: {
419
+ dialect: "ANSI_SQL" | "SNOWFLAKE" | "MDX" | "TABLEAU" | "DATABRICKS";
420
+ expression: string;
421
+ }[];
422
+ };
423
+ name: string;
424
+ dimension?: {
425
+ is_time?: boolean | undefined;
426
+ } | undefined;
427
+ label?: string | undefined;
428
+ description?: string | undefined;
429
+ ai_context?: string | {
430
+ instructions?: string | undefined;
431
+ synonyms?: string[] | undefined;
432
+ examples?: string[] | undefined;
433
+ } | undefined;
434
+ custom_extensions?: {
435
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
436
+ data: string;
437
+ }[] | undefined;
438
+ }>;
439
+ declare const osiDatasetSchema: z.ZodObject<{
440
+ name: z.ZodString;
441
+ source: z.ZodString;
442
+ primary_key: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
443
+ unique_keys: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodString, "many">, "many">>;
444
+ description: z.ZodOptional<z.ZodString>;
445
+ ai_context: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
446
+ instructions: z.ZodOptional<z.ZodString>;
447
+ synonyms: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
448
+ examples: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
449
+ }, "strip", z.ZodTypeAny, {
450
+ instructions?: string | undefined;
451
+ synonyms?: string[] | undefined;
452
+ examples?: string[] | undefined;
453
+ }, {
454
+ instructions?: string | undefined;
455
+ synonyms?: string[] | undefined;
456
+ examples?: string[] | undefined;
457
+ }>]>>;
458
+ fields: z.ZodOptional<z.ZodArray<z.ZodObject<{
459
+ name: z.ZodString;
460
+ expression: z.ZodObject<{
461
+ dialects: z.ZodArray<z.ZodObject<{
462
+ dialect: z.ZodEnum<["ANSI_SQL", "SNOWFLAKE", "MDX", "TABLEAU", "DATABRICKS"]>;
463
+ expression: z.ZodString;
464
+ }, "strip", z.ZodTypeAny, {
465
+ dialect: "ANSI_SQL" | "SNOWFLAKE" | "MDX" | "TABLEAU" | "DATABRICKS";
466
+ expression: string;
467
+ }, {
468
+ dialect: "ANSI_SQL" | "SNOWFLAKE" | "MDX" | "TABLEAU" | "DATABRICKS";
469
+ expression: string;
470
+ }>, "many">;
471
+ }, "strip", z.ZodTypeAny, {
472
+ dialects: {
473
+ dialect: "ANSI_SQL" | "SNOWFLAKE" | "MDX" | "TABLEAU" | "DATABRICKS";
474
+ expression: string;
475
+ }[];
476
+ }, {
477
+ dialects: {
478
+ dialect: "ANSI_SQL" | "SNOWFLAKE" | "MDX" | "TABLEAU" | "DATABRICKS";
479
+ expression: string;
480
+ }[];
228
481
  }>;
482
+ dimension: z.ZodOptional<z.ZodObject<{
483
+ is_time: z.ZodOptional<z.ZodBoolean>;
484
+ }, "strip", z.ZodTypeAny, {
485
+ is_time?: boolean | undefined;
486
+ }, {
487
+ is_time?: boolean | undefined;
488
+ }>>;
489
+ label: z.ZodOptional<z.ZodString>;
490
+ description: z.ZodOptional<z.ZodString>;
491
+ ai_context: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
492
+ instructions: z.ZodOptional<z.ZodString>;
493
+ synonyms: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
494
+ examples: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
495
+ }, "strip", z.ZodTypeAny, {
496
+ instructions?: string | undefined;
497
+ synonyms?: string[] | undefined;
498
+ examples?: string[] | undefined;
499
+ }, {
500
+ instructions?: string | undefined;
501
+ synonyms?: string[] | undefined;
502
+ examples?: string[] | undefined;
503
+ }>]>>;
504
+ custom_extensions: z.ZodOptional<z.ZodArray<z.ZodObject<{
505
+ vendor_name: z.ZodEnum<["COMMON", "SNOWFLAKE", "SALESFORCE", "DBT", "DATABRICKS"]>;
506
+ data: z.ZodString;
507
+ }, "strip", z.ZodTypeAny, {
508
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
509
+ data: string;
510
+ }, {
511
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
512
+ data: string;
513
+ }>, "many">>;
514
+ }, "strip", z.ZodTypeAny, {
515
+ expression: {
516
+ dialects: {
517
+ dialect: "ANSI_SQL" | "SNOWFLAKE" | "MDX" | "TABLEAU" | "DATABRICKS";
518
+ expression: string;
519
+ }[];
520
+ };
521
+ name: string;
522
+ dimension?: {
523
+ is_time?: boolean | undefined;
524
+ } | undefined;
525
+ label?: string | undefined;
526
+ description?: string | undefined;
527
+ ai_context?: string | {
528
+ instructions?: string | undefined;
529
+ synonyms?: string[] | undefined;
530
+ examples?: string[] | undefined;
531
+ } | undefined;
532
+ custom_extensions?: {
533
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
534
+ data: string;
535
+ }[] | undefined;
536
+ }, {
537
+ expression: {
538
+ dialects: {
539
+ dialect: "ANSI_SQL" | "SNOWFLAKE" | "MDX" | "TABLEAU" | "DATABRICKS";
540
+ expression: string;
541
+ }[];
542
+ };
543
+ name: string;
544
+ dimension?: {
545
+ is_time?: boolean | undefined;
546
+ } | undefined;
547
+ label?: string | undefined;
548
+ description?: string | undefined;
549
+ ai_context?: string | {
550
+ instructions?: string | undefined;
551
+ synonyms?: string[] | undefined;
552
+ examples?: string[] | undefined;
553
+ } | undefined;
554
+ custom_extensions?: {
555
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
556
+ data: string;
557
+ }[] | undefined;
558
+ }>, "many">>;
559
+ custom_extensions: z.ZodOptional<z.ZodArray<z.ZodObject<{
560
+ vendor_name: z.ZodEnum<["COMMON", "SNOWFLAKE", "SALESFORCE", "DBT", "DATABRICKS"]>;
561
+ data: z.ZodString;
562
+ }, "strip", z.ZodTypeAny, {
563
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
564
+ data: string;
565
+ }, {
566
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
567
+ data: string;
568
+ }>, "many">>;
569
+ }, "strip", z.ZodTypeAny, {
570
+ name: string;
571
+ source: string;
572
+ description?: string | undefined;
573
+ ai_context?: string | {
574
+ instructions?: string | undefined;
575
+ synonyms?: string[] | undefined;
576
+ examples?: string[] | undefined;
577
+ } | undefined;
578
+ custom_extensions?: {
579
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
580
+ data: string;
581
+ }[] | undefined;
582
+ primary_key?: string[] | undefined;
583
+ unique_keys?: string[][] | undefined;
584
+ fields?: {
585
+ expression: {
586
+ dialects: {
587
+ dialect: "ANSI_SQL" | "SNOWFLAKE" | "MDX" | "TABLEAU" | "DATABRICKS";
588
+ expression: string;
589
+ }[];
590
+ };
591
+ name: string;
592
+ dimension?: {
593
+ is_time?: boolean | undefined;
594
+ } | undefined;
595
+ label?: string | undefined;
596
+ description?: string | undefined;
597
+ ai_context?: string | {
598
+ instructions?: string | undefined;
599
+ synonyms?: string[] | undefined;
600
+ examples?: string[] | undefined;
601
+ } | undefined;
602
+ custom_extensions?: {
603
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
604
+ data: string;
605
+ }[] | undefined;
606
+ }[] | undefined;
607
+ }, {
608
+ name: string;
609
+ source: string;
610
+ description?: string | undefined;
611
+ ai_context?: string | {
612
+ instructions?: string | undefined;
613
+ synonyms?: string[] | undefined;
614
+ examples?: string[] | undefined;
615
+ } | undefined;
616
+ custom_extensions?: {
617
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
618
+ data: string;
619
+ }[] | undefined;
620
+ primary_key?: string[] | undefined;
621
+ unique_keys?: string[][] | undefined;
622
+ fields?: {
623
+ expression: {
624
+ dialects: {
625
+ dialect: "ANSI_SQL" | "SNOWFLAKE" | "MDX" | "TABLEAU" | "DATABRICKS";
626
+ expression: string;
627
+ }[];
628
+ };
629
+ name: string;
630
+ dimension?: {
631
+ is_time?: boolean | undefined;
632
+ } | undefined;
633
+ label?: string | undefined;
634
+ description?: string | undefined;
635
+ ai_context?: string | {
636
+ instructions?: string | undefined;
637
+ synonyms?: string[] | undefined;
638
+ examples?: string[] | undefined;
639
+ } | undefined;
640
+ custom_extensions?: {
641
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
642
+ data: string;
643
+ }[] | undefined;
644
+ }[] | undefined;
645
+ }>;
646
+ declare const osiRelationshipSchema: z.ZodObject<{
647
+ name: z.ZodString;
648
+ from: z.ZodString;
649
+ to: z.ZodString;
650
+ from_columns: z.ZodArray<z.ZodString, "many">;
651
+ to_columns: z.ZodArray<z.ZodString, "many">;
652
+ ai_context: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
653
+ instructions: z.ZodOptional<z.ZodString>;
654
+ synonyms: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
655
+ examples: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
656
+ }, "strip", z.ZodTypeAny, {
657
+ instructions?: string | undefined;
658
+ synonyms?: string[] | undefined;
659
+ examples?: string[] | undefined;
660
+ }, {
661
+ instructions?: string | undefined;
662
+ synonyms?: string[] | undefined;
663
+ examples?: string[] | undefined;
664
+ }>]>>;
665
+ custom_extensions: z.ZodOptional<z.ZodArray<z.ZodObject<{
666
+ vendor_name: z.ZodEnum<["COMMON", "SNOWFLAKE", "SALESFORCE", "DBT", "DATABRICKS"]>;
667
+ data: z.ZodString;
668
+ }, "strip", z.ZodTypeAny, {
669
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
670
+ data: string;
671
+ }, {
672
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
673
+ data: string;
674
+ }>, "many">>;
675
+ }, "strip", z.ZodTypeAny, {
676
+ name: string;
677
+ from: string;
678
+ to: string;
679
+ from_columns: string[];
680
+ to_columns: string[];
681
+ ai_context?: string | {
682
+ instructions?: string | undefined;
683
+ synonyms?: string[] | undefined;
684
+ examples?: string[] | undefined;
685
+ } | undefined;
686
+ custom_extensions?: {
687
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
688
+ data: string;
689
+ }[] | undefined;
690
+ }, {
691
+ name: string;
692
+ from: string;
693
+ to: string;
694
+ from_columns: string[];
695
+ to_columns: string[];
696
+ ai_context?: string | {
697
+ instructions?: string | undefined;
698
+ synonyms?: string[] | undefined;
699
+ examples?: string[] | undefined;
700
+ } | undefined;
701
+ custom_extensions?: {
702
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
703
+ data: string;
704
+ }[] | undefined;
705
+ }>;
706
+ declare const osiMetricSchema: z.ZodObject<{
707
+ name: z.ZodString;
708
+ expression: z.ZodObject<{
709
+ dialects: z.ZodArray<z.ZodObject<{
710
+ dialect: z.ZodEnum<["ANSI_SQL", "SNOWFLAKE", "MDX", "TABLEAU", "DATABRICKS"]>;
711
+ expression: z.ZodString;
712
+ }, "strip", z.ZodTypeAny, {
713
+ dialect: "ANSI_SQL" | "SNOWFLAKE" | "MDX" | "TABLEAU" | "DATABRICKS";
714
+ expression: string;
715
+ }, {
716
+ dialect: "ANSI_SQL" | "SNOWFLAKE" | "MDX" | "TABLEAU" | "DATABRICKS";
717
+ expression: string;
718
+ }>, "many">;
719
+ }, "strip", z.ZodTypeAny, {
720
+ dialects: {
721
+ dialect: "ANSI_SQL" | "SNOWFLAKE" | "MDX" | "TABLEAU" | "DATABRICKS";
722
+ expression: string;
723
+ }[];
724
+ }, {
725
+ dialects: {
726
+ dialect: "ANSI_SQL" | "SNOWFLAKE" | "MDX" | "TABLEAU" | "DATABRICKS";
727
+ expression: string;
728
+ }[];
729
+ }>;
730
+ description: z.ZodOptional<z.ZodString>;
731
+ ai_context: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
732
+ instructions: z.ZodOptional<z.ZodString>;
733
+ synonyms: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
734
+ examples: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
735
+ }, "strip", z.ZodTypeAny, {
736
+ instructions?: string | undefined;
737
+ synonyms?: string[] | undefined;
738
+ examples?: string[] | undefined;
739
+ }, {
740
+ instructions?: string | undefined;
741
+ synonyms?: string[] | undefined;
742
+ examples?: string[] | undefined;
743
+ }>]>>;
744
+ custom_extensions: z.ZodOptional<z.ZodArray<z.ZodObject<{
745
+ vendor_name: z.ZodEnum<["COMMON", "SNOWFLAKE", "SALESFORCE", "DBT", "DATABRICKS"]>;
746
+ data: z.ZodString;
747
+ }, "strip", z.ZodTypeAny, {
748
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
749
+ data: string;
750
+ }, {
751
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
752
+ data: string;
753
+ }>, "many">>;
754
+ }, "strip", z.ZodTypeAny, {
755
+ expression: {
756
+ dialects: {
757
+ dialect: "ANSI_SQL" | "SNOWFLAKE" | "MDX" | "TABLEAU" | "DATABRICKS";
758
+ expression: string;
759
+ }[];
229
760
  };
230
- }
761
+ name: string;
762
+ description?: string | undefined;
763
+ ai_context?: string | {
764
+ instructions?: string | undefined;
765
+ synonyms?: string[] | undefined;
766
+ examples?: string[] | undefined;
767
+ } | undefined;
768
+ custom_extensions?: {
769
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
770
+ data: string;
771
+ }[] | undefined;
772
+ }, {
773
+ expression: {
774
+ dialects: {
775
+ dialect: "ANSI_SQL" | "SNOWFLAKE" | "MDX" | "TABLEAU" | "DATABRICKS";
776
+ expression: string;
777
+ }[];
778
+ };
779
+ name: string;
780
+ description?: string | undefined;
781
+ ai_context?: string | {
782
+ instructions?: string | undefined;
783
+ synonyms?: string[] | undefined;
784
+ examples?: string[] | undefined;
785
+ } | undefined;
786
+ custom_extensions?: {
787
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
788
+ data: string;
789
+ }[] | undefined;
790
+ }>;
791
+ declare const osiSemanticModelSchema: z.ZodObject<{
792
+ name: z.ZodString;
793
+ description: z.ZodOptional<z.ZodString>;
794
+ ai_context: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
795
+ instructions: z.ZodOptional<z.ZodString>;
796
+ synonyms: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
797
+ examples: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
798
+ }, "strip", z.ZodTypeAny, {
799
+ instructions?: string | undefined;
800
+ synonyms?: string[] | undefined;
801
+ examples?: string[] | undefined;
802
+ }, {
803
+ instructions?: string | undefined;
804
+ synonyms?: string[] | undefined;
805
+ examples?: string[] | undefined;
806
+ }>]>>;
807
+ datasets: z.ZodArray<z.ZodObject<{
808
+ name: z.ZodString;
809
+ source: z.ZodString;
810
+ primary_key: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
811
+ unique_keys: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodString, "many">, "many">>;
812
+ description: z.ZodOptional<z.ZodString>;
813
+ ai_context: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
814
+ instructions: z.ZodOptional<z.ZodString>;
815
+ synonyms: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
816
+ examples: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
817
+ }, "strip", z.ZodTypeAny, {
818
+ instructions?: string | undefined;
819
+ synonyms?: string[] | undefined;
820
+ examples?: string[] | undefined;
821
+ }, {
822
+ instructions?: string | undefined;
823
+ synonyms?: string[] | undefined;
824
+ examples?: string[] | undefined;
825
+ }>]>>;
826
+ fields: z.ZodOptional<z.ZodArray<z.ZodObject<{
827
+ name: z.ZodString;
828
+ expression: z.ZodObject<{
829
+ dialects: z.ZodArray<z.ZodObject<{
830
+ dialect: z.ZodEnum<["ANSI_SQL", "SNOWFLAKE", "MDX", "TABLEAU", "DATABRICKS"]>;
831
+ expression: z.ZodString;
832
+ }, "strip", z.ZodTypeAny, {
833
+ dialect: "ANSI_SQL" | "SNOWFLAKE" | "MDX" | "TABLEAU" | "DATABRICKS";
834
+ expression: string;
835
+ }, {
836
+ dialect: "ANSI_SQL" | "SNOWFLAKE" | "MDX" | "TABLEAU" | "DATABRICKS";
837
+ expression: string;
838
+ }>, "many">;
839
+ }, "strip", z.ZodTypeAny, {
840
+ dialects: {
841
+ dialect: "ANSI_SQL" | "SNOWFLAKE" | "MDX" | "TABLEAU" | "DATABRICKS";
842
+ expression: string;
843
+ }[];
844
+ }, {
845
+ dialects: {
846
+ dialect: "ANSI_SQL" | "SNOWFLAKE" | "MDX" | "TABLEAU" | "DATABRICKS";
847
+ expression: string;
848
+ }[];
849
+ }>;
850
+ dimension: z.ZodOptional<z.ZodObject<{
851
+ is_time: z.ZodOptional<z.ZodBoolean>;
852
+ }, "strip", z.ZodTypeAny, {
853
+ is_time?: boolean | undefined;
854
+ }, {
855
+ is_time?: boolean | undefined;
856
+ }>>;
857
+ label: z.ZodOptional<z.ZodString>;
858
+ description: z.ZodOptional<z.ZodString>;
859
+ ai_context: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
860
+ instructions: z.ZodOptional<z.ZodString>;
861
+ synonyms: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
862
+ examples: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
863
+ }, "strip", z.ZodTypeAny, {
864
+ instructions?: string | undefined;
865
+ synonyms?: string[] | undefined;
866
+ examples?: string[] | undefined;
867
+ }, {
868
+ instructions?: string | undefined;
869
+ synonyms?: string[] | undefined;
870
+ examples?: string[] | undefined;
871
+ }>]>>;
872
+ custom_extensions: z.ZodOptional<z.ZodArray<z.ZodObject<{
873
+ vendor_name: z.ZodEnum<["COMMON", "SNOWFLAKE", "SALESFORCE", "DBT", "DATABRICKS"]>;
874
+ data: z.ZodString;
875
+ }, "strip", z.ZodTypeAny, {
876
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
877
+ data: string;
878
+ }, {
879
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
880
+ data: string;
881
+ }>, "many">>;
882
+ }, "strip", z.ZodTypeAny, {
883
+ expression: {
884
+ dialects: {
885
+ dialect: "ANSI_SQL" | "SNOWFLAKE" | "MDX" | "TABLEAU" | "DATABRICKS";
886
+ expression: string;
887
+ }[];
888
+ };
889
+ name: string;
890
+ dimension?: {
891
+ is_time?: boolean | undefined;
892
+ } | undefined;
893
+ label?: string | undefined;
894
+ description?: string | undefined;
895
+ ai_context?: string | {
896
+ instructions?: string | undefined;
897
+ synonyms?: string[] | undefined;
898
+ examples?: string[] | undefined;
899
+ } | undefined;
900
+ custom_extensions?: {
901
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
902
+ data: string;
903
+ }[] | undefined;
904
+ }, {
905
+ expression: {
906
+ dialects: {
907
+ dialect: "ANSI_SQL" | "SNOWFLAKE" | "MDX" | "TABLEAU" | "DATABRICKS";
908
+ expression: string;
909
+ }[];
910
+ };
911
+ name: string;
912
+ dimension?: {
913
+ is_time?: boolean | undefined;
914
+ } | undefined;
915
+ label?: string | undefined;
916
+ description?: string | undefined;
917
+ ai_context?: string | {
918
+ instructions?: string | undefined;
919
+ synonyms?: string[] | undefined;
920
+ examples?: string[] | undefined;
921
+ } | undefined;
922
+ custom_extensions?: {
923
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
924
+ data: string;
925
+ }[] | undefined;
926
+ }>, "many">>;
927
+ custom_extensions: z.ZodOptional<z.ZodArray<z.ZodObject<{
928
+ vendor_name: z.ZodEnum<["COMMON", "SNOWFLAKE", "SALESFORCE", "DBT", "DATABRICKS"]>;
929
+ data: z.ZodString;
930
+ }, "strip", z.ZodTypeAny, {
931
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
932
+ data: string;
933
+ }, {
934
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
935
+ data: string;
936
+ }>, "many">>;
937
+ }, "strip", z.ZodTypeAny, {
938
+ name: string;
939
+ source: string;
940
+ description?: string | undefined;
941
+ ai_context?: string | {
942
+ instructions?: string | undefined;
943
+ synonyms?: string[] | undefined;
944
+ examples?: string[] | undefined;
945
+ } | undefined;
946
+ custom_extensions?: {
947
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
948
+ data: string;
949
+ }[] | undefined;
950
+ primary_key?: string[] | undefined;
951
+ unique_keys?: string[][] | undefined;
952
+ fields?: {
953
+ expression: {
954
+ dialects: {
955
+ dialect: "ANSI_SQL" | "SNOWFLAKE" | "MDX" | "TABLEAU" | "DATABRICKS";
956
+ expression: string;
957
+ }[];
958
+ };
959
+ name: string;
960
+ dimension?: {
961
+ is_time?: boolean | undefined;
962
+ } | undefined;
963
+ label?: string | undefined;
964
+ description?: string | undefined;
965
+ ai_context?: string | {
966
+ instructions?: string | undefined;
967
+ synonyms?: string[] | undefined;
968
+ examples?: string[] | undefined;
969
+ } | undefined;
970
+ custom_extensions?: {
971
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
972
+ data: string;
973
+ }[] | undefined;
974
+ }[] | undefined;
975
+ }, {
976
+ name: string;
977
+ source: string;
978
+ description?: string | undefined;
979
+ ai_context?: string | {
980
+ instructions?: string | undefined;
981
+ synonyms?: string[] | undefined;
982
+ examples?: string[] | undefined;
983
+ } | undefined;
984
+ custom_extensions?: {
985
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
986
+ data: string;
987
+ }[] | undefined;
988
+ primary_key?: string[] | undefined;
989
+ unique_keys?: string[][] | undefined;
990
+ fields?: {
991
+ expression: {
992
+ dialects: {
993
+ dialect: "ANSI_SQL" | "SNOWFLAKE" | "MDX" | "TABLEAU" | "DATABRICKS";
994
+ expression: string;
995
+ }[];
996
+ };
997
+ name: string;
998
+ dimension?: {
999
+ is_time?: boolean | undefined;
1000
+ } | undefined;
1001
+ label?: string | undefined;
1002
+ description?: string | undefined;
1003
+ ai_context?: string | {
1004
+ instructions?: string | undefined;
1005
+ synonyms?: string[] | undefined;
1006
+ examples?: string[] | undefined;
1007
+ } | undefined;
1008
+ custom_extensions?: {
1009
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
1010
+ data: string;
1011
+ }[] | undefined;
1012
+ }[] | undefined;
1013
+ }>, "many">;
1014
+ relationships: z.ZodOptional<z.ZodArray<z.ZodObject<{
1015
+ name: z.ZodString;
1016
+ from: z.ZodString;
1017
+ to: z.ZodString;
1018
+ from_columns: z.ZodArray<z.ZodString, "many">;
1019
+ to_columns: z.ZodArray<z.ZodString, "many">;
1020
+ ai_context: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
1021
+ instructions: z.ZodOptional<z.ZodString>;
1022
+ synonyms: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1023
+ examples: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1024
+ }, "strip", z.ZodTypeAny, {
1025
+ instructions?: string | undefined;
1026
+ synonyms?: string[] | undefined;
1027
+ examples?: string[] | undefined;
1028
+ }, {
1029
+ instructions?: string | undefined;
1030
+ synonyms?: string[] | undefined;
1031
+ examples?: string[] | undefined;
1032
+ }>]>>;
1033
+ custom_extensions: z.ZodOptional<z.ZodArray<z.ZodObject<{
1034
+ vendor_name: z.ZodEnum<["COMMON", "SNOWFLAKE", "SALESFORCE", "DBT", "DATABRICKS"]>;
1035
+ data: z.ZodString;
1036
+ }, "strip", z.ZodTypeAny, {
1037
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
1038
+ data: string;
1039
+ }, {
1040
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
1041
+ data: string;
1042
+ }>, "many">>;
1043
+ }, "strip", z.ZodTypeAny, {
1044
+ name: string;
1045
+ from: string;
1046
+ to: string;
1047
+ from_columns: string[];
1048
+ to_columns: string[];
1049
+ ai_context?: string | {
1050
+ instructions?: string | undefined;
1051
+ synonyms?: string[] | undefined;
1052
+ examples?: string[] | undefined;
1053
+ } | undefined;
1054
+ custom_extensions?: {
1055
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
1056
+ data: string;
1057
+ }[] | undefined;
1058
+ }, {
1059
+ name: string;
1060
+ from: string;
1061
+ to: string;
1062
+ from_columns: string[];
1063
+ to_columns: string[];
1064
+ ai_context?: string | {
1065
+ instructions?: string | undefined;
1066
+ synonyms?: string[] | undefined;
1067
+ examples?: string[] | undefined;
1068
+ } | undefined;
1069
+ custom_extensions?: {
1070
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
1071
+ data: string;
1072
+ }[] | undefined;
1073
+ }>, "many">>;
1074
+ metrics: z.ZodOptional<z.ZodArray<z.ZodObject<{
1075
+ name: z.ZodString;
1076
+ expression: z.ZodObject<{
1077
+ dialects: z.ZodArray<z.ZodObject<{
1078
+ dialect: z.ZodEnum<["ANSI_SQL", "SNOWFLAKE", "MDX", "TABLEAU", "DATABRICKS"]>;
1079
+ expression: z.ZodString;
1080
+ }, "strip", z.ZodTypeAny, {
1081
+ dialect: "ANSI_SQL" | "SNOWFLAKE" | "MDX" | "TABLEAU" | "DATABRICKS";
1082
+ expression: string;
1083
+ }, {
1084
+ dialect: "ANSI_SQL" | "SNOWFLAKE" | "MDX" | "TABLEAU" | "DATABRICKS";
1085
+ expression: string;
1086
+ }>, "many">;
1087
+ }, "strip", z.ZodTypeAny, {
1088
+ dialects: {
1089
+ dialect: "ANSI_SQL" | "SNOWFLAKE" | "MDX" | "TABLEAU" | "DATABRICKS";
1090
+ expression: string;
1091
+ }[];
1092
+ }, {
1093
+ dialects: {
1094
+ dialect: "ANSI_SQL" | "SNOWFLAKE" | "MDX" | "TABLEAU" | "DATABRICKS";
1095
+ expression: string;
1096
+ }[];
1097
+ }>;
1098
+ description: z.ZodOptional<z.ZodString>;
1099
+ ai_context: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
1100
+ instructions: z.ZodOptional<z.ZodString>;
1101
+ synonyms: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1102
+ examples: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1103
+ }, "strip", z.ZodTypeAny, {
1104
+ instructions?: string | undefined;
1105
+ synonyms?: string[] | undefined;
1106
+ examples?: string[] | undefined;
1107
+ }, {
1108
+ instructions?: string | undefined;
1109
+ synonyms?: string[] | undefined;
1110
+ examples?: string[] | undefined;
1111
+ }>]>>;
1112
+ custom_extensions: z.ZodOptional<z.ZodArray<z.ZodObject<{
1113
+ vendor_name: z.ZodEnum<["COMMON", "SNOWFLAKE", "SALESFORCE", "DBT", "DATABRICKS"]>;
1114
+ data: z.ZodString;
1115
+ }, "strip", z.ZodTypeAny, {
1116
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
1117
+ data: string;
1118
+ }, {
1119
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
1120
+ data: string;
1121
+ }>, "many">>;
1122
+ }, "strip", z.ZodTypeAny, {
1123
+ expression: {
1124
+ dialects: {
1125
+ dialect: "ANSI_SQL" | "SNOWFLAKE" | "MDX" | "TABLEAU" | "DATABRICKS";
1126
+ expression: string;
1127
+ }[];
1128
+ };
1129
+ name: string;
1130
+ description?: string | undefined;
1131
+ ai_context?: string | {
1132
+ instructions?: string | undefined;
1133
+ synonyms?: string[] | undefined;
1134
+ examples?: string[] | undefined;
1135
+ } | undefined;
1136
+ custom_extensions?: {
1137
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
1138
+ data: string;
1139
+ }[] | undefined;
1140
+ }, {
1141
+ expression: {
1142
+ dialects: {
1143
+ dialect: "ANSI_SQL" | "SNOWFLAKE" | "MDX" | "TABLEAU" | "DATABRICKS";
1144
+ expression: string;
1145
+ }[];
1146
+ };
1147
+ name: string;
1148
+ description?: string | undefined;
1149
+ ai_context?: string | {
1150
+ instructions?: string | undefined;
1151
+ synonyms?: string[] | undefined;
1152
+ examples?: string[] | undefined;
1153
+ } | undefined;
1154
+ custom_extensions?: {
1155
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
1156
+ data: string;
1157
+ }[] | undefined;
1158
+ }>, "many">>;
1159
+ custom_extensions: z.ZodOptional<z.ZodArray<z.ZodObject<{
1160
+ vendor_name: z.ZodEnum<["COMMON", "SNOWFLAKE", "SALESFORCE", "DBT", "DATABRICKS"]>;
1161
+ data: z.ZodString;
1162
+ }, "strip", z.ZodTypeAny, {
1163
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
1164
+ data: string;
1165
+ }, {
1166
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
1167
+ data: string;
1168
+ }>, "many">>;
1169
+ }, "strip", z.ZodTypeAny, {
1170
+ name: string;
1171
+ datasets: {
1172
+ name: string;
1173
+ source: string;
1174
+ description?: string | undefined;
1175
+ ai_context?: string | {
1176
+ instructions?: string | undefined;
1177
+ synonyms?: string[] | undefined;
1178
+ examples?: string[] | undefined;
1179
+ } | undefined;
1180
+ custom_extensions?: {
1181
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
1182
+ data: string;
1183
+ }[] | undefined;
1184
+ primary_key?: string[] | undefined;
1185
+ unique_keys?: string[][] | undefined;
1186
+ fields?: {
1187
+ expression: {
1188
+ dialects: {
1189
+ dialect: "ANSI_SQL" | "SNOWFLAKE" | "MDX" | "TABLEAU" | "DATABRICKS";
1190
+ expression: string;
1191
+ }[];
1192
+ };
1193
+ name: string;
1194
+ dimension?: {
1195
+ is_time?: boolean | undefined;
1196
+ } | undefined;
1197
+ label?: string | undefined;
1198
+ description?: string | undefined;
1199
+ ai_context?: string | {
1200
+ instructions?: string | undefined;
1201
+ synonyms?: string[] | undefined;
1202
+ examples?: string[] | undefined;
1203
+ } | undefined;
1204
+ custom_extensions?: {
1205
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
1206
+ data: string;
1207
+ }[] | undefined;
1208
+ }[] | undefined;
1209
+ }[];
1210
+ description?: string | undefined;
1211
+ ai_context?: string | {
1212
+ instructions?: string | undefined;
1213
+ synonyms?: string[] | undefined;
1214
+ examples?: string[] | undefined;
1215
+ } | undefined;
1216
+ custom_extensions?: {
1217
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
1218
+ data: string;
1219
+ }[] | undefined;
1220
+ relationships?: {
1221
+ name: string;
1222
+ from: string;
1223
+ to: string;
1224
+ from_columns: string[];
1225
+ to_columns: string[];
1226
+ ai_context?: string | {
1227
+ instructions?: string | undefined;
1228
+ synonyms?: string[] | undefined;
1229
+ examples?: string[] | undefined;
1230
+ } | undefined;
1231
+ custom_extensions?: {
1232
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
1233
+ data: string;
1234
+ }[] | undefined;
1235
+ }[] | undefined;
1236
+ metrics?: {
1237
+ expression: {
1238
+ dialects: {
1239
+ dialect: "ANSI_SQL" | "SNOWFLAKE" | "MDX" | "TABLEAU" | "DATABRICKS";
1240
+ expression: string;
1241
+ }[];
1242
+ };
1243
+ name: string;
1244
+ description?: string | undefined;
1245
+ ai_context?: string | {
1246
+ instructions?: string | undefined;
1247
+ synonyms?: string[] | undefined;
1248
+ examples?: string[] | undefined;
1249
+ } | undefined;
1250
+ custom_extensions?: {
1251
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
1252
+ data: string;
1253
+ }[] | undefined;
1254
+ }[] | undefined;
1255
+ }, {
1256
+ name: string;
1257
+ datasets: {
1258
+ name: string;
1259
+ source: string;
1260
+ description?: string | undefined;
1261
+ ai_context?: string | {
1262
+ instructions?: string | undefined;
1263
+ synonyms?: string[] | undefined;
1264
+ examples?: string[] | undefined;
1265
+ } | undefined;
1266
+ custom_extensions?: {
1267
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
1268
+ data: string;
1269
+ }[] | undefined;
1270
+ primary_key?: string[] | undefined;
1271
+ unique_keys?: string[][] | undefined;
1272
+ fields?: {
1273
+ expression: {
1274
+ dialects: {
1275
+ dialect: "ANSI_SQL" | "SNOWFLAKE" | "MDX" | "TABLEAU" | "DATABRICKS";
1276
+ expression: string;
1277
+ }[];
1278
+ };
1279
+ name: string;
1280
+ dimension?: {
1281
+ is_time?: boolean | undefined;
1282
+ } | undefined;
1283
+ label?: string | undefined;
1284
+ description?: string | undefined;
1285
+ ai_context?: string | {
1286
+ instructions?: string | undefined;
1287
+ synonyms?: string[] | undefined;
1288
+ examples?: string[] | undefined;
1289
+ } | undefined;
1290
+ custom_extensions?: {
1291
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
1292
+ data: string;
1293
+ }[] | undefined;
1294
+ }[] | undefined;
1295
+ }[];
1296
+ description?: string | undefined;
1297
+ ai_context?: string | {
1298
+ instructions?: string | undefined;
1299
+ synonyms?: string[] | undefined;
1300
+ examples?: string[] | undefined;
1301
+ } | undefined;
1302
+ custom_extensions?: {
1303
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
1304
+ data: string;
1305
+ }[] | undefined;
1306
+ relationships?: {
1307
+ name: string;
1308
+ from: string;
1309
+ to: string;
1310
+ from_columns: string[];
1311
+ to_columns: string[];
1312
+ ai_context?: string | {
1313
+ instructions?: string | undefined;
1314
+ synonyms?: string[] | undefined;
1315
+ examples?: string[] | undefined;
1316
+ } | undefined;
1317
+ custom_extensions?: {
1318
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
1319
+ data: string;
1320
+ }[] | undefined;
1321
+ }[] | undefined;
1322
+ metrics?: {
1323
+ expression: {
1324
+ dialects: {
1325
+ dialect: "ANSI_SQL" | "SNOWFLAKE" | "MDX" | "TABLEAU" | "DATABRICKS";
1326
+ expression: string;
1327
+ }[];
1328
+ };
1329
+ name: string;
1330
+ description?: string | undefined;
1331
+ ai_context?: string | {
1332
+ instructions?: string | undefined;
1333
+ synonyms?: string[] | undefined;
1334
+ examples?: string[] | undefined;
1335
+ } | undefined;
1336
+ custom_extensions?: {
1337
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
1338
+ data: string;
1339
+ }[] | undefined;
1340
+ }[] | undefined;
1341
+ }>;
1342
+ declare const osiDocumentSchema: z.ZodObject<{
1343
+ version: z.ZodLiteral<"1.0">;
1344
+ semantic_model: z.ZodArray<z.ZodObject<{
1345
+ name: z.ZodString;
1346
+ description: z.ZodOptional<z.ZodString>;
1347
+ ai_context: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
1348
+ instructions: z.ZodOptional<z.ZodString>;
1349
+ synonyms: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1350
+ examples: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1351
+ }, "strip", z.ZodTypeAny, {
1352
+ instructions?: string | undefined;
1353
+ synonyms?: string[] | undefined;
1354
+ examples?: string[] | undefined;
1355
+ }, {
1356
+ instructions?: string | undefined;
1357
+ synonyms?: string[] | undefined;
1358
+ examples?: string[] | undefined;
1359
+ }>]>>;
1360
+ datasets: z.ZodArray<z.ZodObject<{
1361
+ name: z.ZodString;
1362
+ source: z.ZodString;
1363
+ primary_key: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1364
+ unique_keys: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodString, "many">, "many">>;
1365
+ description: z.ZodOptional<z.ZodString>;
1366
+ ai_context: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
1367
+ instructions: z.ZodOptional<z.ZodString>;
1368
+ synonyms: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1369
+ examples: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1370
+ }, "strip", z.ZodTypeAny, {
1371
+ instructions?: string | undefined;
1372
+ synonyms?: string[] | undefined;
1373
+ examples?: string[] | undefined;
1374
+ }, {
1375
+ instructions?: string | undefined;
1376
+ synonyms?: string[] | undefined;
1377
+ examples?: string[] | undefined;
1378
+ }>]>>;
1379
+ fields: z.ZodOptional<z.ZodArray<z.ZodObject<{
1380
+ name: z.ZodString;
1381
+ expression: z.ZodObject<{
1382
+ dialects: z.ZodArray<z.ZodObject<{
1383
+ dialect: z.ZodEnum<["ANSI_SQL", "SNOWFLAKE", "MDX", "TABLEAU", "DATABRICKS"]>;
1384
+ expression: z.ZodString;
1385
+ }, "strip", z.ZodTypeAny, {
1386
+ dialect: "ANSI_SQL" | "SNOWFLAKE" | "MDX" | "TABLEAU" | "DATABRICKS";
1387
+ expression: string;
1388
+ }, {
1389
+ dialect: "ANSI_SQL" | "SNOWFLAKE" | "MDX" | "TABLEAU" | "DATABRICKS";
1390
+ expression: string;
1391
+ }>, "many">;
1392
+ }, "strip", z.ZodTypeAny, {
1393
+ dialects: {
1394
+ dialect: "ANSI_SQL" | "SNOWFLAKE" | "MDX" | "TABLEAU" | "DATABRICKS";
1395
+ expression: string;
1396
+ }[];
1397
+ }, {
1398
+ dialects: {
1399
+ dialect: "ANSI_SQL" | "SNOWFLAKE" | "MDX" | "TABLEAU" | "DATABRICKS";
1400
+ expression: string;
1401
+ }[];
1402
+ }>;
1403
+ dimension: z.ZodOptional<z.ZodObject<{
1404
+ is_time: z.ZodOptional<z.ZodBoolean>;
1405
+ }, "strip", z.ZodTypeAny, {
1406
+ is_time?: boolean | undefined;
1407
+ }, {
1408
+ is_time?: boolean | undefined;
1409
+ }>>;
1410
+ label: z.ZodOptional<z.ZodString>;
1411
+ description: z.ZodOptional<z.ZodString>;
1412
+ ai_context: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
1413
+ instructions: z.ZodOptional<z.ZodString>;
1414
+ synonyms: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1415
+ examples: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1416
+ }, "strip", z.ZodTypeAny, {
1417
+ instructions?: string | undefined;
1418
+ synonyms?: string[] | undefined;
1419
+ examples?: string[] | undefined;
1420
+ }, {
1421
+ instructions?: string | undefined;
1422
+ synonyms?: string[] | undefined;
1423
+ examples?: string[] | undefined;
1424
+ }>]>>;
1425
+ custom_extensions: z.ZodOptional<z.ZodArray<z.ZodObject<{
1426
+ vendor_name: z.ZodEnum<["COMMON", "SNOWFLAKE", "SALESFORCE", "DBT", "DATABRICKS"]>;
1427
+ data: z.ZodString;
1428
+ }, "strip", z.ZodTypeAny, {
1429
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
1430
+ data: string;
1431
+ }, {
1432
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
1433
+ data: string;
1434
+ }>, "many">>;
1435
+ }, "strip", z.ZodTypeAny, {
1436
+ expression: {
1437
+ dialects: {
1438
+ dialect: "ANSI_SQL" | "SNOWFLAKE" | "MDX" | "TABLEAU" | "DATABRICKS";
1439
+ expression: string;
1440
+ }[];
1441
+ };
1442
+ name: string;
1443
+ dimension?: {
1444
+ is_time?: boolean | undefined;
1445
+ } | undefined;
1446
+ label?: string | undefined;
1447
+ description?: string | undefined;
1448
+ ai_context?: string | {
1449
+ instructions?: string | undefined;
1450
+ synonyms?: string[] | undefined;
1451
+ examples?: string[] | undefined;
1452
+ } | undefined;
1453
+ custom_extensions?: {
1454
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
1455
+ data: string;
1456
+ }[] | undefined;
1457
+ }, {
1458
+ expression: {
1459
+ dialects: {
1460
+ dialect: "ANSI_SQL" | "SNOWFLAKE" | "MDX" | "TABLEAU" | "DATABRICKS";
1461
+ expression: string;
1462
+ }[];
1463
+ };
1464
+ name: string;
1465
+ dimension?: {
1466
+ is_time?: boolean | undefined;
1467
+ } | undefined;
1468
+ label?: string | undefined;
1469
+ description?: string | undefined;
1470
+ ai_context?: string | {
1471
+ instructions?: string | undefined;
1472
+ synonyms?: string[] | undefined;
1473
+ examples?: string[] | undefined;
1474
+ } | undefined;
1475
+ custom_extensions?: {
1476
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
1477
+ data: string;
1478
+ }[] | undefined;
1479
+ }>, "many">>;
1480
+ custom_extensions: z.ZodOptional<z.ZodArray<z.ZodObject<{
1481
+ vendor_name: z.ZodEnum<["COMMON", "SNOWFLAKE", "SALESFORCE", "DBT", "DATABRICKS"]>;
1482
+ data: z.ZodString;
1483
+ }, "strip", z.ZodTypeAny, {
1484
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
1485
+ data: string;
1486
+ }, {
1487
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
1488
+ data: string;
1489
+ }>, "many">>;
1490
+ }, "strip", z.ZodTypeAny, {
1491
+ name: string;
1492
+ source: string;
1493
+ description?: string | undefined;
1494
+ ai_context?: string | {
1495
+ instructions?: string | undefined;
1496
+ synonyms?: string[] | undefined;
1497
+ examples?: string[] | undefined;
1498
+ } | undefined;
1499
+ custom_extensions?: {
1500
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
1501
+ data: string;
1502
+ }[] | undefined;
1503
+ primary_key?: string[] | undefined;
1504
+ unique_keys?: string[][] | undefined;
1505
+ fields?: {
1506
+ expression: {
1507
+ dialects: {
1508
+ dialect: "ANSI_SQL" | "SNOWFLAKE" | "MDX" | "TABLEAU" | "DATABRICKS";
1509
+ expression: string;
1510
+ }[];
1511
+ };
1512
+ name: string;
1513
+ dimension?: {
1514
+ is_time?: boolean | undefined;
1515
+ } | undefined;
1516
+ label?: string | undefined;
1517
+ description?: string | undefined;
1518
+ ai_context?: string | {
1519
+ instructions?: string | undefined;
1520
+ synonyms?: string[] | undefined;
1521
+ examples?: string[] | undefined;
1522
+ } | undefined;
1523
+ custom_extensions?: {
1524
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
1525
+ data: string;
1526
+ }[] | undefined;
1527
+ }[] | undefined;
1528
+ }, {
1529
+ name: string;
1530
+ source: string;
1531
+ description?: string | undefined;
1532
+ ai_context?: string | {
1533
+ instructions?: string | undefined;
1534
+ synonyms?: string[] | undefined;
1535
+ examples?: string[] | undefined;
1536
+ } | undefined;
1537
+ custom_extensions?: {
1538
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
1539
+ data: string;
1540
+ }[] | undefined;
1541
+ primary_key?: string[] | undefined;
1542
+ unique_keys?: string[][] | undefined;
1543
+ fields?: {
1544
+ expression: {
1545
+ dialects: {
1546
+ dialect: "ANSI_SQL" | "SNOWFLAKE" | "MDX" | "TABLEAU" | "DATABRICKS";
1547
+ expression: string;
1548
+ }[];
1549
+ };
1550
+ name: string;
1551
+ dimension?: {
1552
+ is_time?: boolean | undefined;
1553
+ } | undefined;
1554
+ label?: string | undefined;
1555
+ description?: string | undefined;
1556
+ ai_context?: string | {
1557
+ instructions?: string | undefined;
1558
+ synonyms?: string[] | undefined;
1559
+ examples?: string[] | undefined;
1560
+ } | undefined;
1561
+ custom_extensions?: {
1562
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
1563
+ data: string;
1564
+ }[] | undefined;
1565
+ }[] | undefined;
1566
+ }>, "many">;
1567
+ relationships: z.ZodOptional<z.ZodArray<z.ZodObject<{
1568
+ name: z.ZodString;
1569
+ from: z.ZodString;
1570
+ to: z.ZodString;
1571
+ from_columns: z.ZodArray<z.ZodString, "many">;
1572
+ to_columns: z.ZodArray<z.ZodString, "many">;
1573
+ ai_context: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
1574
+ instructions: z.ZodOptional<z.ZodString>;
1575
+ synonyms: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1576
+ examples: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1577
+ }, "strip", z.ZodTypeAny, {
1578
+ instructions?: string | undefined;
1579
+ synonyms?: string[] | undefined;
1580
+ examples?: string[] | undefined;
1581
+ }, {
1582
+ instructions?: string | undefined;
1583
+ synonyms?: string[] | undefined;
1584
+ examples?: string[] | undefined;
1585
+ }>]>>;
1586
+ custom_extensions: z.ZodOptional<z.ZodArray<z.ZodObject<{
1587
+ vendor_name: z.ZodEnum<["COMMON", "SNOWFLAKE", "SALESFORCE", "DBT", "DATABRICKS"]>;
1588
+ data: z.ZodString;
1589
+ }, "strip", z.ZodTypeAny, {
1590
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
1591
+ data: string;
1592
+ }, {
1593
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
1594
+ data: string;
1595
+ }>, "many">>;
1596
+ }, "strip", z.ZodTypeAny, {
1597
+ name: string;
1598
+ from: string;
1599
+ to: string;
1600
+ from_columns: string[];
1601
+ to_columns: string[];
1602
+ ai_context?: string | {
1603
+ instructions?: string | undefined;
1604
+ synonyms?: string[] | undefined;
1605
+ examples?: string[] | undefined;
1606
+ } | undefined;
1607
+ custom_extensions?: {
1608
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
1609
+ data: string;
1610
+ }[] | undefined;
1611
+ }, {
1612
+ name: string;
1613
+ from: string;
1614
+ to: string;
1615
+ from_columns: string[];
1616
+ to_columns: string[];
1617
+ ai_context?: string | {
1618
+ instructions?: string | undefined;
1619
+ synonyms?: string[] | undefined;
1620
+ examples?: string[] | undefined;
1621
+ } | undefined;
1622
+ custom_extensions?: {
1623
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
1624
+ data: string;
1625
+ }[] | undefined;
1626
+ }>, "many">>;
1627
+ metrics: z.ZodOptional<z.ZodArray<z.ZodObject<{
1628
+ name: z.ZodString;
1629
+ expression: z.ZodObject<{
1630
+ dialects: z.ZodArray<z.ZodObject<{
1631
+ dialect: z.ZodEnum<["ANSI_SQL", "SNOWFLAKE", "MDX", "TABLEAU", "DATABRICKS"]>;
1632
+ expression: z.ZodString;
1633
+ }, "strip", z.ZodTypeAny, {
1634
+ dialect: "ANSI_SQL" | "SNOWFLAKE" | "MDX" | "TABLEAU" | "DATABRICKS";
1635
+ expression: string;
1636
+ }, {
1637
+ dialect: "ANSI_SQL" | "SNOWFLAKE" | "MDX" | "TABLEAU" | "DATABRICKS";
1638
+ expression: string;
1639
+ }>, "many">;
1640
+ }, "strip", z.ZodTypeAny, {
1641
+ dialects: {
1642
+ dialect: "ANSI_SQL" | "SNOWFLAKE" | "MDX" | "TABLEAU" | "DATABRICKS";
1643
+ expression: string;
1644
+ }[];
1645
+ }, {
1646
+ dialects: {
1647
+ dialect: "ANSI_SQL" | "SNOWFLAKE" | "MDX" | "TABLEAU" | "DATABRICKS";
1648
+ expression: string;
1649
+ }[];
1650
+ }>;
1651
+ description: z.ZodOptional<z.ZodString>;
1652
+ ai_context: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
1653
+ instructions: z.ZodOptional<z.ZodString>;
1654
+ synonyms: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1655
+ examples: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1656
+ }, "strip", z.ZodTypeAny, {
1657
+ instructions?: string | undefined;
1658
+ synonyms?: string[] | undefined;
1659
+ examples?: string[] | undefined;
1660
+ }, {
1661
+ instructions?: string | undefined;
1662
+ synonyms?: string[] | undefined;
1663
+ examples?: string[] | undefined;
1664
+ }>]>>;
1665
+ custom_extensions: z.ZodOptional<z.ZodArray<z.ZodObject<{
1666
+ vendor_name: z.ZodEnum<["COMMON", "SNOWFLAKE", "SALESFORCE", "DBT", "DATABRICKS"]>;
1667
+ data: z.ZodString;
1668
+ }, "strip", z.ZodTypeAny, {
1669
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
1670
+ data: string;
1671
+ }, {
1672
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
1673
+ data: string;
1674
+ }>, "many">>;
1675
+ }, "strip", z.ZodTypeAny, {
1676
+ expression: {
1677
+ dialects: {
1678
+ dialect: "ANSI_SQL" | "SNOWFLAKE" | "MDX" | "TABLEAU" | "DATABRICKS";
1679
+ expression: string;
1680
+ }[];
1681
+ };
1682
+ name: string;
1683
+ description?: string | undefined;
1684
+ ai_context?: string | {
1685
+ instructions?: string | undefined;
1686
+ synonyms?: string[] | undefined;
1687
+ examples?: string[] | undefined;
1688
+ } | undefined;
1689
+ custom_extensions?: {
1690
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
1691
+ data: string;
1692
+ }[] | undefined;
1693
+ }, {
1694
+ expression: {
1695
+ dialects: {
1696
+ dialect: "ANSI_SQL" | "SNOWFLAKE" | "MDX" | "TABLEAU" | "DATABRICKS";
1697
+ expression: string;
1698
+ }[];
1699
+ };
1700
+ name: string;
1701
+ description?: string | undefined;
1702
+ ai_context?: string | {
1703
+ instructions?: string | undefined;
1704
+ synonyms?: string[] | undefined;
1705
+ examples?: string[] | undefined;
1706
+ } | undefined;
1707
+ custom_extensions?: {
1708
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
1709
+ data: string;
1710
+ }[] | undefined;
1711
+ }>, "many">>;
1712
+ custom_extensions: z.ZodOptional<z.ZodArray<z.ZodObject<{
1713
+ vendor_name: z.ZodEnum<["COMMON", "SNOWFLAKE", "SALESFORCE", "DBT", "DATABRICKS"]>;
1714
+ data: z.ZodString;
1715
+ }, "strip", z.ZodTypeAny, {
1716
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
1717
+ data: string;
1718
+ }, {
1719
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
1720
+ data: string;
1721
+ }>, "many">>;
1722
+ }, "strip", z.ZodTypeAny, {
1723
+ name: string;
1724
+ datasets: {
1725
+ name: string;
1726
+ source: string;
1727
+ description?: string | undefined;
1728
+ ai_context?: string | {
1729
+ instructions?: string | undefined;
1730
+ synonyms?: string[] | undefined;
1731
+ examples?: string[] | undefined;
1732
+ } | undefined;
1733
+ custom_extensions?: {
1734
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
1735
+ data: string;
1736
+ }[] | undefined;
1737
+ primary_key?: string[] | undefined;
1738
+ unique_keys?: string[][] | undefined;
1739
+ fields?: {
1740
+ expression: {
1741
+ dialects: {
1742
+ dialect: "ANSI_SQL" | "SNOWFLAKE" | "MDX" | "TABLEAU" | "DATABRICKS";
1743
+ expression: string;
1744
+ }[];
1745
+ };
1746
+ name: string;
1747
+ dimension?: {
1748
+ is_time?: boolean | undefined;
1749
+ } | undefined;
1750
+ label?: string | undefined;
1751
+ description?: string | undefined;
1752
+ ai_context?: string | {
1753
+ instructions?: string | undefined;
1754
+ synonyms?: string[] | undefined;
1755
+ examples?: string[] | undefined;
1756
+ } | undefined;
1757
+ custom_extensions?: {
1758
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
1759
+ data: string;
1760
+ }[] | undefined;
1761
+ }[] | undefined;
1762
+ }[];
1763
+ description?: string | undefined;
1764
+ ai_context?: string | {
1765
+ instructions?: string | undefined;
1766
+ synonyms?: string[] | undefined;
1767
+ examples?: string[] | undefined;
1768
+ } | undefined;
1769
+ custom_extensions?: {
1770
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
1771
+ data: string;
1772
+ }[] | undefined;
1773
+ relationships?: {
1774
+ name: string;
1775
+ from: string;
1776
+ to: string;
1777
+ from_columns: string[];
1778
+ to_columns: string[];
1779
+ ai_context?: string | {
1780
+ instructions?: string | undefined;
1781
+ synonyms?: string[] | undefined;
1782
+ examples?: string[] | undefined;
1783
+ } | undefined;
1784
+ custom_extensions?: {
1785
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
1786
+ data: string;
1787
+ }[] | undefined;
1788
+ }[] | undefined;
1789
+ metrics?: {
1790
+ expression: {
1791
+ dialects: {
1792
+ dialect: "ANSI_SQL" | "SNOWFLAKE" | "MDX" | "TABLEAU" | "DATABRICKS";
1793
+ expression: string;
1794
+ }[];
1795
+ };
1796
+ name: string;
1797
+ description?: string | undefined;
1798
+ ai_context?: string | {
1799
+ instructions?: string | undefined;
1800
+ synonyms?: string[] | undefined;
1801
+ examples?: string[] | undefined;
1802
+ } | undefined;
1803
+ custom_extensions?: {
1804
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
1805
+ data: string;
1806
+ }[] | undefined;
1807
+ }[] | undefined;
1808
+ }, {
1809
+ name: string;
1810
+ datasets: {
1811
+ name: string;
1812
+ source: string;
1813
+ description?: string | undefined;
1814
+ ai_context?: string | {
1815
+ instructions?: string | undefined;
1816
+ synonyms?: string[] | undefined;
1817
+ examples?: string[] | undefined;
1818
+ } | undefined;
1819
+ custom_extensions?: {
1820
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
1821
+ data: string;
1822
+ }[] | undefined;
1823
+ primary_key?: string[] | undefined;
1824
+ unique_keys?: string[][] | undefined;
1825
+ fields?: {
1826
+ expression: {
1827
+ dialects: {
1828
+ dialect: "ANSI_SQL" | "SNOWFLAKE" | "MDX" | "TABLEAU" | "DATABRICKS";
1829
+ expression: string;
1830
+ }[];
1831
+ };
1832
+ name: string;
1833
+ dimension?: {
1834
+ is_time?: boolean | undefined;
1835
+ } | undefined;
1836
+ label?: string | undefined;
1837
+ description?: string | undefined;
1838
+ ai_context?: string | {
1839
+ instructions?: string | undefined;
1840
+ synonyms?: string[] | undefined;
1841
+ examples?: string[] | undefined;
1842
+ } | undefined;
1843
+ custom_extensions?: {
1844
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
1845
+ data: string;
1846
+ }[] | undefined;
1847
+ }[] | undefined;
1848
+ }[];
1849
+ description?: string | undefined;
1850
+ ai_context?: string | {
1851
+ instructions?: string | undefined;
1852
+ synonyms?: string[] | undefined;
1853
+ examples?: string[] | undefined;
1854
+ } | undefined;
1855
+ custom_extensions?: {
1856
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
1857
+ data: string;
1858
+ }[] | undefined;
1859
+ relationships?: {
1860
+ name: string;
1861
+ from: string;
1862
+ to: string;
1863
+ from_columns: string[];
1864
+ to_columns: string[];
1865
+ ai_context?: string | {
1866
+ instructions?: string | undefined;
1867
+ synonyms?: string[] | undefined;
1868
+ examples?: string[] | undefined;
1869
+ } | undefined;
1870
+ custom_extensions?: {
1871
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
1872
+ data: string;
1873
+ }[] | undefined;
1874
+ }[] | undefined;
1875
+ metrics?: {
1876
+ expression: {
1877
+ dialects: {
1878
+ dialect: "ANSI_SQL" | "SNOWFLAKE" | "MDX" | "TABLEAU" | "DATABRICKS";
1879
+ expression: string;
1880
+ }[];
1881
+ };
1882
+ name: string;
1883
+ description?: string | undefined;
1884
+ ai_context?: string | {
1885
+ instructions?: string | undefined;
1886
+ synonyms?: string[] | undefined;
1887
+ examples?: string[] | undefined;
1888
+ } | undefined;
1889
+ custom_extensions?: {
1890
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
1891
+ data: string;
1892
+ }[] | undefined;
1893
+ }[] | undefined;
1894
+ }>, "many">;
1895
+ }, "strip", z.ZodTypeAny, {
1896
+ version: "1.0";
1897
+ semantic_model: {
1898
+ name: string;
1899
+ datasets: {
1900
+ name: string;
1901
+ source: string;
1902
+ description?: string | undefined;
1903
+ ai_context?: string | {
1904
+ instructions?: string | undefined;
1905
+ synonyms?: string[] | undefined;
1906
+ examples?: string[] | undefined;
1907
+ } | undefined;
1908
+ custom_extensions?: {
1909
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
1910
+ data: string;
1911
+ }[] | undefined;
1912
+ primary_key?: string[] | undefined;
1913
+ unique_keys?: string[][] | undefined;
1914
+ fields?: {
1915
+ expression: {
1916
+ dialects: {
1917
+ dialect: "ANSI_SQL" | "SNOWFLAKE" | "MDX" | "TABLEAU" | "DATABRICKS";
1918
+ expression: string;
1919
+ }[];
1920
+ };
1921
+ name: string;
1922
+ dimension?: {
1923
+ is_time?: boolean | undefined;
1924
+ } | undefined;
1925
+ label?: string | undefined;
1926
+ description?: string | undefined;
1927
+ ai_context?: string | {
1928
+ instructions?: string | undefined;
1929
+ synonyms?: string[] | undefined;
1930
+ examples?: string[] | undefined;
1931
+ } | undefined;
1932
+ custom_extensions?: {
1933
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
1934
+ data: string;
1935
+ }[] | undefined;
1936
+ }[] | undefined;
1937
+ }[];
1938
+ description?: string | undefined;
1939
+ ai_context?: string | {
1940
+ instructions?: string | undefined;
1941
+ synonyms?: string[] | undefined;
1942
+ examples?: string[] | undefined;
1943
+ } | undefined;
1944
+ custom_extensions?: {
1945
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
1946
+ data: string;
1947
+ }[] | undefined;
1948
+ relationships?: {
1949
+ name: string;
1950
+ from: string;
1951
+ to: string;
1952
+ from_columns: string[];
1953
+ to_columns: string[];
1954
+ ai_context?: string | {
1955
+ instructions?: string | undefined;
1956
+ synonyms?: string[] | undefined;
1957
+ examples?: string[] | undefined;
1958
+ } | undefined;
1959
+ custom_extensions?: {
1960
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
1961
+ data: string;
1962
+ }[] | undefined;
1963
+ }[] | undefined;
1964
+ metrics?: {
1965
+ expression: {
1966
+ dialects: {
1967
+ dialect: "ANSI_SQL" | "SNOWFLAKE" | "MDX" | "TABLEAU" | "DATABRICKS";
1968
+ expression: string;
1969
+ }[];
1970
+ };
1971
+ name: string;
1972
+ description?: string | undefined;
1973
+ ai_context?: string | {
1974
+ instructions?: string | undefined;
1975
+ synonyms?: string[] | undefined;
1976
+ examples?: string[] | undefined;
1977
+ } | undefined;
1978
+ custom_extensions?: {
1979
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
1980
+ data: string;
1981
+ }[] | undefined;
1982
+ }[] | undefined;
1983
+ }[];
1984
+ }, {
1985
+ version: "1.0";
1986
+ semantic_model: {
1987
+ name: string;
1988
+ datasets: {
1989
+ name: string;
1990
+ source: string;
1991
+ description?: string | undefined;
1992
+ ai_context?: string | {
1993
+ instructions?: string | undefined;
1994
+ synonyms?: string[] | undefined;
1995
+ examples?: string[] | undefined;
1996
+ } | undefined;
1997
+ custom_extensions?: {
1998
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
1999
+ data: string;
2000
+ }[] | undefined;
2001
+ primary_key?: string[] | undefined;
2002
+ unique_keys?: string[][] | undefined;
2003
+ fields?: {
2004
+ expression: {
2005
+ dialects: {
2006
+ dialect: "ANSI_SQL" | "SNOWFLAKE" | "MDX" | "TABLEAU" | "DATABRICKS";
2007
+ expression: string;
2008
+ }[];
2009
+ };
2010
+ name: string;
2011
+ dimension?: {
2012
+ is_time?: boolean | undefined;
2013
+ } | undefined;
2014
+ label?: string | undefined;
2015
+ description?: string | undefined;
2016
+ ai_context?: string | {
2017
+ instructions?: string | undefined;
2018
+ synonyms?: string[] | undefined;
2019
+ examples?: string[] | undefined;
2020
+ } | undefined;
2021
+ custom_extensions?: {
2022
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
2023
+ data: string;
2024
+ }[] | undefined;
2025
+ }[] | undefined;
2026
+ }[];
2027
+ description?: string | undefined;
2028
+ ai_context?: string | {
2029
+ instructions?: string | undefined;
2030
+ synonyms?: string[] | undefined;
2031
+ examples?: string[] | undefined;
2032
+ } | undefined;
2033
+ custom_extensions?: {
2034
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
2035
+ data: string;
2036
+ }[] | undefined;
2037
+ relationships?: {
2038
+ name: string;
2039
+ from: string;
2040
+ to: string;
2041
+ from_columns: string[];
2042
+ to_columns: string[];
2043
+ ai_context?: string | {
2044
+ instructions?: string | undefined;
2045
+ synonyms?: string[] | undefined;
2046
+ examples?: string[] | undefined;
2047
+ } | undefined;
2048
+ custom_extensions?: {
2049
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
2050
+ data: string;
2051
+ }[] | undefined;
2052
+ }[] | undefined;
2053
+ metrics?: {
2054
+ expression: {
2055
+ dialects: {
2056
+ dialect: "ANSI_SQL" | "SNOWFLAKE" | "MDX" | "TABLEAU" | "DATABRICKS";
2057
+ expression: string;
2058
+ }[];
2059
+ };
2060
+ name: string;
2061
+ description?: string | undefined;
2062
+ ai_context?: string | {
2063
+ instructions?: string | undefined;
2064
+ synonyms?: string[] | undefined;
2065
+ examples?: string[] | undefined;
2066
+ } | undefined;
2067
+ custom_extensions?: {
2068
+ vendor_name: "SNOWFLAKE" | "DATABRICKS" | "COMMON" | "SALESFORCE" | "DBT";
2069
+ data: string;
2070
+ }[] | undefined;
2071
+ }[] | undefined;
2072
+ }[];
2073
+ }>;
231
2074
 
232
- declare const evidenceSchema: z.ZodObject<{
233
- type: z.ZodString;
234
- ref: z.ZodString;
2075
+ declare const trustStatusEnum: z.ZodEnum<["endorsed", "warning", "deprecated"]>;
2076
+ declare const securityClassificationEnum: z.ZodEnum<["public", "internal", "confidential", "secret"]>;
2077
+ declare const tableTypeEnum: z.ZodEnum<["fact", "dimension", "bridge", "snapshot", "event", "aggregate", "view"]>;
2078
+ declare const semanticRoleEnum: z.ZodEnum<["metric", "dimension", "identifier", "date"]>;
2079
+ declare const defaultAggregationEnum: z.ZodEnum<["SUM", "AVG", "COUNT", "COUNT_DISTINCT", "MIN", "MAX"]>;
2080
+ declare const datasetGovernanceSchema: z.ZodObject<{
2081
+ grain: z.ZodString;
2082
+ refresh: z.ZodOptional<z.ZodString>;
2083
+ table_type: z.ZodEnum<["fact", "dimension", "bridge", "snapshot", "event", "aggregate", "view"]>;
2084
+ security: z.ZodOptional<z.ZodEnum<["public", "internal", "confidential", "secret"]>>;
235
2085
  }, "strip", z.ZodTypeAny, {
236
- type: string;
237
- ref: string;
2086
+ grain: string;
2087
+ table_type: "fact" | "dimension" | "bridge" | "snapshot" | "event" | "aggregate" | "view";
2088
+ refresh?: string | undefined;
2089
+ security?: "public" | "internal" | "confidential" | "secret" | undefined;
238
2090
  }, {
239
- type: string;
240
- ref: string;
2091
+ grain: string;
2092
+ table_type: "fact" | "dimension" | "bridge" | "snapshot" | "event" | "aggregate" | "view";
2093
+ refresh?: string | undefined;
2094
+ security?: "public" | "internal" | "confidential" | "secret" | undefined;
241
2095
  }>;
242
- declare const exampleSchema: z.ZodObject<{
243
- label: z.ZodString;
244
- content: z.ZodString;
245
- kind: z.ZodEnum<["do", "dont"]>;
2096
+ declare const fieldGovernanceSchema: z.ZodObject<{
2097
+ semantic_role: z.ZodEnum<["metric", "dimension", "identifier", "date"]>;
2098
+ default_aggregation: z.ZodOptional<z.ZodEnum<["SUM", "AVG", "COUNT", "COUNT_DISTINCT", "MIN", "MAX"]>>;
2099
+ additive: z.ZodOptional<z.ZodBoolean>;
2100
+ default_filter: z.ZodOptional<z.ZodString>;
2101
+ sample_values: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
246
2102
  }, "strip", z.ZodTypeAny, {
247
- label: string;
248
- content: string;
249
- kind: "do" | "dont";
2103
+ semantic_role: "dimension" | "metric" | "identifier" | "date";
2104
+ default_aggregation?: "SUM" | "AVG" | "COUNT" | "COUNT_DISTINCT" | "MIN" | "MAX" | undefined;
2105
+ additive?: boolean | undefined;
2106
+ default_filter?: string | undefined;
2107
+ sample_values?: string[] | undefined;
250
2108
  }, {
251
- label: string;
252
- content: string;
253
- kind: "do" | "dont";
2109
+ semantic_role: "dimension" | "metric" | "identifier" | "date";
2110
+ default_aggregation?: "SUM" | "AVG" | "COUNT" | "COUNT_DISTINCT" | "MIN" | "MAX" | undefined;
2111
+ additive?: boolean | undefined;
2112
+ default_filter?: string | undefined;
2113
+ sample_values?: string[] | undefined;
254
2114
  }>;
255
- declare const conceptFileSchema: z.ZodObject<{
256
- id: z.ZodString;
257
- name: z.ZodOptional<z.ZodString>;
258
- domain: z.ZodOptional<z.ZodString>;
259
- product_id: z.ZodOptional<z.ZodString>;
260
- definition: z.ZodString;
261
- owner: z.ZodOptional<z.ZodString>;
262
- status: z.ZodOptional<z.ZodEnum<["draft", "certified", "deprecated"]>>;
263
- certified: z.ZodOptional<z.ZodBoolean>;
2115
+ declare const governanceFileSchema: z.ZodObject<{
2116
+ model: z.ZodString;
2117
+ owner: z.ZodString;
2118
+ trust: z.ZodOptional<z.ZodEnum<["endorsed", "warning", "deprecated"]>>;
2119
+ security: z.ZodOptional<z.ZodEnum<["public", "internal", "confidential", "secret"]>>;
264
2120
  tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
265
- evidence: z.ZodOptional<z.ZodArray<z.ZodObject<{
266
- type: z.ZodString;
267
- ref: z.ZodString;
2121
+ datasets: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
2122
+ grain: z.ZodString;
2123
+ refresh: z.ZodOptional<z.ZodString>;
2124
+ table_type: z.ZodEnum<["fact", "dimension", "bridge", "snapshot", "event", "aggregate", "view"]>;
2125
+ security: z.ZodOptional<z.ZodEnum<["public", "internal", "confidential", "secret"]>>;
268
2126
  }, "strip", z.ZodTypeAny, {
269
- type: string;
270
- ref: string;
2127
+ grain: string;
2128
+ table_type: "fact" | "dimension" | "bridge" | "snapshot" | "event" | "aggregate" | "view";
2129
+ refresh?: string | undefined;
2130
+ security?: "public" | "internal" | "confidential" | "secret" | undefined;
271
2131
  }, {
272
- type: string;
273
- ref: string;
274
- }>, "many">>;
275
- depends_on: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
276
- examples: z.ZodOptional<z.ZodArray<z.ZodObject<{
277
- label: z.ZodString;
278
- content: z.ZodString;
279
- kind: z.ZodEnum<["do", "dont"]>;
2132
+ grain: string;
2133
+ table_type: "fact" | "dimension" | "bridge" | "snapshot" | "event" | "aggregate" | "view";
2134
+ refresh?: string | undefined;
2135
+ security?: "public" | "internal" | "confidential" | "secret" | undefined;
2136
+ }>>>;
2137
+ fields: z.ZodOptional<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodObject<{
2138
+ semantic_role: z.ZodEnum<["metric", "dimension", "identifier", "date"]>;
2139
+ default_aggregation: z.ZodOptional<z.ZodEnum<["SUM", "AVG", "COUNT", "COUNT_DISTINCT", "MIN", "MAX"]>>;
2140
+ additive: z.ZodOptional<z.ZodBoolean>;
2141
+ default_filter: z.ZodOptional<z.ZodString>;
2142
+ sample_values: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
280
2143
  }, "strip", z.ZodTypeAny, {
281
- label: string;
282
- content: string;
283
- kind: "do" | "dont";
2144
+ semantic_role: "dimension" | "metric" | "identifier" | "date";
2145
+ default_aggregation?: "SUM" | "AVG" | "COUNT" | "COUNT_DISTINCT" | "MIN" | "MAX" | undefined;
2146
+ additive?: boolean | undefined;
2147
+ default_filter?: string | undefined;
2148
+ sample_values?: string[] | undefined;
284
2149
  }, {
285
- label: string;
286
- content: string;
287
- kind: "do" | "dont";
288
- }>, "many">>;
289
- description: z.ZodOptional<z.ZodString>;
2150
+ semantic_role: "dimension" | "metric" | "identifier" | "date";
2151
+ default_aggregation?: "SUM" | "AVG" | "COUNT" | "COUNT_DISTINCT" | "MIN" | "MAX" | undefined;
2152
+ additive?: boolean | undefined;
2153
+ default_filter?: string | undefined;
2154
+ sample_values?: string[] | undefined;
2155
+ }>>, Record<string, {
2156
+ semantic_role: "dimension" | "metric" | "identifier" | "date";
2157
+ default_aggregation?: "SUM" | "AVG" | "COUNT" | "COUNT_DISTINCT" | "MIN" | "MAX" | undefined;
2158
+ additive?: boolean | undefined;
2159
+ default_filter?: string | undefined;
2160
+ sample_values?: string[] | undefined;
2161
+ }>, Record<string, {
2162
+ semantic_role: "dimension" | "metric" | "identifier" | "date";
2163
+ default_aggregation?: "SUM" | "AVG" | "COUNT" | "COUNT_DISTINCT" | "MIN" | "MAX" | undefined;
2164
+ additive?: boolean | undefined;
2165
+ default_filter?: string | undefined;
2166
+ sample_values?: string[] | undefined;
2167
+ }>>>;
290
2168
  }, "strip", z.ZodTypeAny, {
291
- id: string;
292
- definition: string;
293
- owner?: string | undefined;
294
- certified?: boolean | undefined;
295
- depends_on?: string[] | undefined;
296
- status?: "draft" | "certified" | "deprecated" | undefined;
297
- name?: string | undefined;
298
- domain?: string | undefined;
299
- product_id?: string | undefined;
2169
+ model: string;
2170
+ owner: string;
2171
+ fields?: Record<string, {
2172
+ semantic_role: "dimension" | "metric" | "identifier" | "date";
2173
+ default_aggregation?: "SUM" | "AVG" | "COUNT" | "COUNT_DISTINCT" | "MIN" | "MAX" | undefined;
2174
+ additive?: boolean | undefined;
2175
+ default_filter?: string | undefined;
2176
+ sample_values?: string[] | undefined;
2177
+ }> | undefined;
2178
+ datasets?: Record<string, {
2179
+ grain: string;
2180
+ table_type: "fact" | "dimension" | "bridge" | "snapshot" | "event" | "aggregate" | "view";
2181
+ refresh?: string | undefined;
2182
+ security?: "public" | "internal" | "confidential" | "secret" | undefined;
2183
+ }> | undefined;
2184
+ security?: "public" | "internal" | "confidential" | "secret" | undefined;
2185
+ trust?: "endorsed" | "warning" | "deprecated" | undefined;
300
2186
  tags?: string[] | undefined;
301
- evidence?: {
302
- type: string;
303
- ref: string;
304
- }[] | undefined;
305
- examples?: {
306
- label: string;
307
- content: string;
308
- kind: "do" | "dont";
309
- }[] | undefined;
310
- description?: string | undefined;
311
2187
  }, {
312
- id: string;
313
- definition: string;
314
- owner?: string | undefined;
315
- certified?: boolean | undefined;
316
- depends_on?: string[] | undefined;
317
- status?: "draft" | "certified" | "deprecated" | undefined;
318
- name?: string | undefined;
319
- domain?: string | undefined;
320
- product_id?: string | undefined;
2188
+ model: string;
2189
+ owner: string;
2190
+ fields?: Record<string, {
2191
+ semantic_role: "dimension" | "metric" | "identifier" | "date";
2192
+ default_aggregation?: "SUM" | "AVG" | "COUNT" | "COUNT_DISTINCT" | "MIN" | "MAX" | undefined;
2193
+ additive?: boolean | undefined;
2194
+ default_filter?: string | undefined;
2195
+ sample_values?: string[] | undefined;
2196
+ }> | undefined;
2197
+ datasets?: Record<string, {
2198
+ grain: string;
2199
+ table_type: "fact" | "dimension" | "bridge" | "snapshot" | "event" | "aggregate" | "view";
2200
+ refresh?: string | undefined;
2201
+ security?: "public" | "internal" | "confidential" | "secret" | undefined;
2202
+ }> | undefined;
2203
+ security?: "public" | "internal" | "confidential" | "secret" | undefined;
2204
+ trust?: "endorsed" | "warning" | "deprecated" | undefined;
321
2205
  tags?: string[] | undefined;
322
- evidence?: {
323
- type: string;
324
- ref: string;
325
- }[] | undefined;
326
- examples?: {
327
- label: string;
328
- content: string;
329
- kind: "do" | "dont";
330
- }[] | undefined;
331
- description?: string | undefined;
332
2206
  }>;
333
2207
 
334
- declare const productFileSchema: z.ZodObject<{
335
- id: z.ZodString;
336
- name: z.ZodOptional<z.ZodString>;
337
- description: z.ZodString;
338
- owner: z.ZodOptional<z.ZodString>;
2208
+ declare const goldenQuerySchema: z.ZodObject<{
2209
+ question: z.ZodString;
2210
+ sql: z.ZodString;
2211
+ dialect: z.ZodOptional<z.ZodString>;
339
2212
  tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
340
- status: z.ZodOptional<z.ZodEnum<["draft", "certified", "deprecated"]>>;
341
2213
  }, "strip", z.ZodTypeAny, {
342
- id: string;
343
- description: string;
344
- owner?: string | undefined;
345
- status?: "draft" | "certified" | "deprecated" | undefined;
346
- name?: string | undefined;
2214
+ question: string;
2215
+ sql: string;
2216
+ dialect?: string | undefined;
347
2217
  tags?: string[] | undefined;
348
2218
  }, {
349
- id: string;
350
- description: string;
351
- owner?: string | undefined;
352
- status?: "draft" | "certified" | "deprecated" | undefined;
353
- name?: string | undefined;
2219
+ question: string;
2220
+ sql: string;
2221
+ dialect?: string | undefined;
354
2222
  tags?: string[] | undefined;
355
2223
  }>;
356
-
357
- declare const policyWhenSchema: z.ZodObject<{
358
- tags_any: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
359
- concept_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
360
- status: z.ZodOptional<z.ZodEnum<["draft", "certified", "deprecated"]>>;
361
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
362
- tags_any: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
363
- concept_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
364
- status: z.ZodOptional<z.ZodEnum<["draft", "certified", "deprecated"]>>;
365
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
366
- tags_any: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
367
- concept_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
368
- status: z.ZodOptional<z.ZodEnum<["draft", "certified", "deprecated"]>>;
369
- }, z.ZodTypeAny, "passthrough">>;
370
- declare const policyThenSchema: z.ZodObject<{
371
- require_role: z.ZodOptional<z.ZodString>;
372
- deny: z.ZodOptional<z.ZodBoolean>;
373
- warn: z.ZodOptional<z.ZodString>;
374
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
375
- require_role: z.ZodOptional<z.ZodString>;
376
- deny: z.ZodOptional<z.ZodBoolean>;
377
- warn: z.ZodOptional<z.ZodString>;
378
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
379
- require_role: z.ZodOptional<z.ZodString>;
380
- deny: z.ZodOptional<z.ZodBoolean>;
381
- warn: z.ZodOptional<z.ZodString>;
382
- }, z.ZodTypeAny, "passthrough">>;
383
- declare const policyRuleSchema: z.ZodObject<{
384
- priority: z.ZodNumber;
385
- when: z.ZodObject<{
386
- tags_any: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
387
- concept_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
388
- status: z.ZodOptional<z.ZodEnum<["draft", "certified", "deprecated"]>>;
389
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
390
- tags_any: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
391
- concept_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
392
- status: z.ZodOptional<z.ZodEnum<["draft", "certified", "deprecated"]>>;
393
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
394
- tags_any: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
395
- concept_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
396
- status: z.ZodOptional<z.ZodEnum<["draft", "certified", "deprecated"]>>;
397
- }, z.ZodTypeAny, "passthrough">>;
398
- then: z.ZodObject<{
399
- require_role: z.ZodOptional<z.ZodString>;
400
- deny: z.ZodOptional<z.ZodBoolean>;
401
- warn: z.ZodOptional<z.ZodString>;
402
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
403
- require_role: z.ZodOptional<z.ZodString>;
404
- deny: z.ZodOptional<z.ZodBoolean>;
405
- warn: z.ZodOptional<z.ZodString>;
406
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
407
- require_role: z.ZodOptional<z.ZodString>;
408
- deny: z.ZodOptional<z.ZodBoolean>;
409
- warn: z.ZodOptional<z.ZodString>;
410
- }, z.ZodTypeAny, "passthrough">>;
2224
+ declare const businessRuleSchema: z.ZodObject<{
2225
+ name: z.ZodString;
2226
+ definition: z.ZodString;
2227
+ enforcement: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2228
+ avoid: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2229
+ tables: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2230
+ applied_always: z.ZodOptional<z.ZodBoolean>;
411
2231
  }, "strip", z.ZodTypeAny, {
412
- priority: number;
413
- when: {
414
- status?: "draft" | "certified" | "deprecated" | undefined;
415
- tags_any?: string[] | undefined;
416
- concept_ids?: string[] | undefined;
417
- } & {
418
- [k: string]: unknown;
419
- };
420
- then: {
421
- require_role?: string | undefined;
422
- deny?: boolean | undefined;
423
- warn?: string | undefined;
424
- } & {
425
- [k: string]: unknown;
426
- };
2232
+ name: string;
2233
+ definition: string;
2234
+ enforcement?: string[] | undefined;
2235
+ avoid?: string[] | undefined;
2236
+ tables?: string[] | undefined;
2237
+ applied_always?: boolean | undefined;
427
2238
  }, {
428
- priority: number;
429
- when: {
430
- status?: "draft" | "certified" | "deprecated" | undefined;
431
- tags_any?: string[] | undefined;
432
- concept_ids?: string[] | undefined;
433
- } & {
434
- [k: string]: unknown;
435
- };
436
- then: {
437
- require_role?: string | undefined;
438
- deny?: boolean | undefined;
439
- warn?: string | undefined;
440
- } & {
441
- [k: string]: unknown;
442
- };
2239
+ name: string;
2240
+ definition: string;
2241
+ enforcement?: string[] | undefined;
2242
+ avoid?: string[] | undefined;
2243
+ tables?: string[] | undefined;
2244
+ applied_always?: boolean | undefined;
443
2245
  }>;
444
- declare const policyFileSchema: z.ZodObject<{
445
- id: z.ZodString;
446
- name: z.ZodOptional<z.ZodString>;
447
- description: z.ZodString;
448
- owner: z.ZodOptional<z.ZodString>;
449
- tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
450
- status: z.ZodOptional<z.ZodEnum<["draft", "certified", "deprecated"]>>;
451
- rules: z.ZodArray<z.ZodObject<{
452
- priority: z.ZodNumber;
453
- when: z.ZodObject<{
454
- tags_any: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
455
- concept_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
456
- status: z.ZodOptional<z.ZodEnum<["draft", "certified", "deprecated"]>>;
457
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
458
- tags_any: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
459
- concept_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
460
- status: z.ZodOptional<z.ZodEnum<["draft", "certified", "deprecated"]>>;
461
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
462
- tags_any: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
463
- concept_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
464
- status: z.ZodOptional<z.ZodEnum<["draft", "certified", "deprecated"]>>;
465
- }, z.ZodTypeAny, "passthrough">>;
466
- then: z.ZodObject<{
467
- require_role: z.ZodOptional<z.ZodString>;
468
- deny: z.ZodOptional<z.ZodBoolean>;
469
- warn: z.ZodOptional<z.ZodString>;
470
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
471
- require_role: z.ZodOptional<z.ZodString>;
472
- deny: z.ZodOptional<z.ZodBoolean>;
473
- warn: z.ZodOptional<z.ZodString>;
474
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
475
- require_role: z.ZodOptional<z.ZodString>;
476
- deny: z.ZodOptional<z.ZodBoolean>;
477
- warn: z.ZodOptional<z.ZodString>;
478
- }, z.ZodTypeAny, "passthrough">>;
479
- }, "strip", z.ZodTypeAny, {
480
- priority: number;
481
- when: {
482
- status?: "draft" | "certified" | "deprecated" | undefined;
483
- tags_any?: string[] | undefined;
484
- concept_ids?: string[] | undefined;
485
- } & {
486
- [k: string]: unknown;
487
- };
488
- then: {
489
- require_role?: string | undefined;
490
- deny?: boolean | undefined;
491
- warn?: string | undefined;
492
- } & {
493
- [k: string]: unknown;
494
- };
495
- }, {
496
- priority: number;
497
- when: {
498
- status?: "draft" | "certified" | "deprecated" | undefined;
499
- tags_any?: string[] | undefined;
500
- concept_ids?: string[] | undefined;
501
- } & {
502
- [k: string]: unknown;
503
- };
504
- then: {
505
- require_role?: string | undefined;
506
- deny?: boolean | undefined;
507
- warn?: string | undefined;
508
- } & {
509
- [k: string]: unknown;
510
- };
511
- }>, "many">;
2246
+ declare const guardrailFilterSchema: z.ZodObject<{
2247
+ name: z.ZodString;
2248
+ filter: z.ZodString;
2249
+ tables: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2250
+ reason: z.ZodString;
512
2251
  }, "strip", z.ZodTypeAny, {
513
- rules: {
514
- priority: number;
515
- when: {
516
- status?: "draft" | "certified" | "deprecated" | undefined;
517
- tags_any?: string[] | undefined;
518
- concept_ids?: string[] | undefined;
519
- } & {
520
- [k: string]: unknown;
521
- };
522
- then: {
523
- require_role?: string | undefined;
524
- deny?: boolean | undefined;
525
- warn?: string | undefined;
526
- } & {
527
- [k: string]: unknown;
528
- };
529
- }[];
530
- id: string;
531
- description: string;
532
- owner?: string | undefined;
533
- status?: "draft" | "certified" | "deprecated" | undefined;
534
- name?: string | undefined;
535
- tags?: string[] | undefined;
2252
+ filter: string;
2253
+ name: string;
2254
+ reason: string;
2255
+ tables?: string[] | undefined;
536
2256
  }, {
537
- rules: {
538
- priority: number;
539
- when: {
540
- status?: "draft" | "certified" | "deprecated" | undefined;
541
- tags_any?: string[] | undefined;
542
- concept_ids?: string[] | undefined;
543
- } & {
544
- [k: string]: unknown;
545
- };
546
- then: {
547
- require_role?: string | undefined;
548
- deny?: boolean | undefined;
549
- warn?: string | undefined;
550
- } & {
551
- [k: string]: unknown;
552
- };
553
- }[];
554
- id: string;
555
- description: string;
556
- owner?: string | undefined;
557
- status?: "draft" | "certified" | "deprecated" | undefined;
558
- name?: string | undefined;
559
- tags?: string[] | undefined;
2257
+ filter: string;
2258
+ name: string;
2259
+ reason: string;
2260
+ tables?: string[] | undefined;
560
2261
  }>;
561
-
562
- declare const entityFieldSchema: z.ZodObject<{
2262
+ declare const hierarchySchema: z.ZodObject<{
563
2263
  name: z.ZodString;
564
- description: z.ZodOptional<z.ZodString>;
565
- type: z.ZodOptional<z.ZodString>;
2264
+ levels: z.ZodArray<z.ZodString, "many">;
2265
+ dataset: z.ZodString;
2266
+ field: z.ZodOptional<z.ZodString>;
566
2267
  }, "strip", z.ZodTypeAny, {
567
2268
  name: string;
568
- type?: string | undefined;
569
- description?: string | undefined;
2269
+ levels: string[];
2270
+ dataset: string;
2271
+ field?: string | undefined;
570
2272
  }, {
571
2273
  name: string;
572
- type?: string | undefined;
573
- description?: string | undefined;
2274
+ levels: string[];
2275
+ dataset: string;
2276
+ field?: string | undefined;
574
2277
  }>;
575
- declare const entityFileSchema: z.ZodObject<{
576
- id: z.ZodString;
577
- name: z.ZodOptional<z.ZodString>;
578
- definition: z.ZodOptional<z.ZodString>;
579
- description: z.ZodOptional<z.ZodString>;
580
- owner: z.ZodOptional<z.ZodString>;
581
- tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
582
- status: z.ZodOptional<z.ZodEnum<["draft", "certified", "deprecated"]>>;
583
- fields: z.ZodOptional<z.ZodArray<z.ZodObject<{
2278
+ declare const rulesFileSchema: z.ZodObject<{
2279
+ model: z.ZodString;
2280
+ golden_queries: z.ZodOptional<z.ZodArray<z.ZodObject<{
2281
+ question: z.ZodString;
2282
+ sql: z.ZodString;
2283
+ dialect: z.ZodOptional<z.ZodString>;
2284
+ tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2285
+ }, "strip", z.ZodTypeAny, {
2286
+ question: string;
2287
+ sql: string;
2288
+ dialect?: string | undefined;
2289
+ tags?: string[] | undefined;
2290
+ }, {
2291
+ question: string;
2292
+ sql: string;
2293
+ dialect?: string | undefined;
2294
+ tags?: string[] | undefined;
2295
+ }>, "many">>;
2296
+ business_rules: z.ZodOptional<z.ZodArray<z.ZodObject<{
584
2297
  name: z.ZodString;
585
- description: z.ZodOptional<z.ZodString>;
586
- type: z.ZodOptional<z.ZodString>;
2298
+ definition: z.ZodString;
2299
+ enforcement: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2300
+ avoid: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2301
+ tables: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2302
+ applied_always: z.ZodOptional<z.ZodBoolean>;
587
2303
  }, "strip", z.ZodTypeAny, {
588
2304
  name: string;
589
- type?: string | undefined;
590
- description?: string | undefined;
2305
+ definition: string;
2306
+ enforcement?: string[] | undefined;
2307
+ avoid?: string[] | undefined;
2308
+ tables?: string[] | undefined;
2309
+ applied_always?: boolean | undefined;
591
2310
  }, {
592
2311
  name: string;
593
- type?: string | undefined;
594
- description?: string | undefined;
2312
+ definition: string;
2313
+ enforcement?: string[] | undefined;
2314
+ avoid?: string[] | undefined;
2315
+ tables?: string[] | undefined;
2316
+ applied_always?: boolean | undefined;
2317
+ }>, "many">>;
2318
+ guardrail_filters: z.ZodOptional<z.ZodArray<z.ZodObject<{
2319
+ name: z.ZodString;
2320
+ filter: z.ZodString;
2321
+ tables: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2322
+ reason: z.ZodString;
2323
+ }, "strip", z.ZodTypeAny, {
2324
+ filter: string;
2325
+ name: string;
2326
+ reason: string;
2327
+ tables?: string[] | undefined;
2328
+ }, {
2329
+ filter: string;
2330
+ name: string;
2331
+ reason: string;
2332
+ tables?: string[] | undefined;
2333
+ }>, "many">>;
2334
+ hierarchies: z.ZodOptional<z.ZodArray<z.ZodObject<{
2335
+ name: z.ZodString;
2336
+ levels: z.ZodArray<z.ZodString, "many">;
2337
+ dataset: z.ZodString;
2338
+ field: z.ZodOptional<z.ZodString>;
2339
+ }, "strip", z.ZodTypeAny, {
2340
+ name: string;
2341
+ levels: string[];
2342
+ dataset: string;
2343
+ field?: string | undefined;
2344
+ }, {
2345
+ name: string;
2346
+ levels: string[];
2347
+ dataset: string;
2348
+ field?: string | undefined;
595
2349
  }>, "many">>;
596
2350
  }, "strip", z.ZodTypeAny, {
597
- id: string;
598
- owner?: string | undefined;
599
- fields?: {
2351
+ model: string;
2352
+ golden_queries?: {
2353
+ question: string;
2354
+ sql: string;
2355
+ dialect?: string | undefined;
2356
+ tags?: string[] | undefined;
2357
+ }[] | undefined;
2358
+ business_rules?: {
600
2359
  name: string;
601
- type?: string | undefined;
602
- description?: string | undefined;
2360
+ definition: string;
2361
+ enforcement?: string[] | undefined;
2362
+ avoid?: string[] | undefined;
2363
+ tables?: string[] | undefined;
2364
+ applied_always?: boolean | undefined;
2365
+ }[] | undefined;
2366
+ guardrail_filters?: {
2367
+ filter: string;
2368
+ name: string;
2369
+ reason: string;
2370
+ tables?: string[] | undefined;
2371
+ }[] | undefined;
2372
+ hierarchies?: {
2373
+ name: string;
2374
+ levels: string[];
2375
+ dataset: string;
2376
+ field?: string | undefined;
603
2377
  }[] | undefined;
604
- status?: "draft" | "certified" | "deprecated" | undefined;
605
- name?: string | undefined;
606
- definition?: string | undefined;
607
- tags?: string[] | undefined;
608
- description?: string | undefined;
609
2378
  }, {
610
- id: string;
611
- owner?: string | undefined;
612
- fields?: {
2379
+ model: string;
2380
+ golden_queries?: {
2381
+ question: string;
2382
+ sql: string;
2383
+ dialect?: string | undefined;
2384
+ tags?: string[] | undefined;
2385
+ }[] | undefined;
2386
+ business_rules?: {
613
2387
  name: string;
614
- type?: string | undefined;
615
- description?: string | undefined;
2388
+ definition: string;
2389
+ enforcement?: string[] | undefined;
2390
+ avoid?: string[] | undefined;
2391
+ tables?: string[] | undefined;
2392
+ applied_always?: boolean | undefined;
2393
+ }[] | undefined;
2394
+ guardrail_filters?: {
2395
+ filter: string;
2396
+ name: string;
2397
+ reason: string;
2398
+ tables?: string[] | undefined;
2399
+ }[] | undefined;
2400
+ hierarchies?: {
2401
+ name: string;
2402
+ levels: string[];
2403
+ dataset: string;
2404
+ field?: string | undefined;
2405
+ }[] | undefined;
2406
+ }>;
2407
+
2408
+ declare const lineageTypeEnum: z.ZodEnum<["pipeline", "dashboard", "ml_model", "api", "manual"]>;
2409
+ declare const upstreamEntrySchema: z.ZodObject<{
2410
+ source: z.ZodString;
2411
+ type: z.ZodEnum<["pipeline", "dashboard", "ml_model", "api", "manual"]>;
2412
+ pipeline: z.ZodOptional<z.ZodString>;
2413
+ tool: z.ZodOptional<z.ZodString>;
2414
+ refresh: z.ZodOptional<z.ZodString>;
2415
+ notes: z.ZodOptional<z.ZodString>;
2416
+ }, "strip", z.ZodTypeAny, {
2417
+ type: "pipeline" | "dashboard" | "ml_model" | "api" | "manual";
2418
+ source: string;
2419
+ pipeline?: string | undefined;
2420
+ refresh?: string | undefined;
2421
+ tool?: string | undefined;
2422
+ notes?: string | undefined;
2423
+ }, {
2424
+ type: "pipeline" | "dashboard" | "ml_model" | "api" | "manual";
2425
+ source: string;
2426
+ pipeline?: string | undefined;
2427
+ refresh?: string | undefined;
2428
+ tool?: string | undefined;
2429
+ notes?: string | undefined;
2430
+ }>;
2431
+ declare const downstreamEntrySchema: z.ZodObject<{
2432
+ target: z.ZodString;
2433
+ type: z.ZodEnum<["pipeline", "dashboard", "ml_model", "api", "manual"]>;
2434
+ tool: z.ZodOptional<z.ZodString>;
2435
+ notes: z.ZodOptional<z.ZodString>;
2436
+ }, "strip", z.ZodTypeAny, {
2437
+ type: "pipeline" | "dashboard" | "ml_model" | "api" | "manual";
2438
+ target: string;
2439
+ tool?: string | undefined;
2440
+ notes?: string | undefined;
2441
+ }, {
2442
+ type: "pipeline" | "dashboard" | "ml_model" | "api" | "manual";
2443
+ target: string;
2444
+ tool?: string | undefined;
2445
+ notes?: string | undefined;
2446
+ }>;
2447
+ declare const lineageFileSchema: z.ZodObject<{
2448
+ model: z.ZodString;
2449
+ upstream: z.ZodOptional<z.ZodArray<z.ZodObject<{
2450
+ source: z.ZodString;
2451
+ type: z.ZodEnum<["pipeline", "dashboard", "ml_model", "api", "manual"]>;
2452
+ pipeline: z.ZodOptional<z.ZodString>;
2453
+ tool: z.ZodOptional<z.ZodString>;
2454
+ refresh: z.ZodOptional<z.ZodString>;
2455
+ notes: z.ZodOptional<z.ZodString>;
2456
+ }, "strip", z.ZodTypeAny, {
2457
+ type: "pipeline" | "dashboard" | "ml_model" | "api" | "manual";
2458
+ source: string;
2459
+ pipeline?: string | undefined;
2460
+ refresh?: string | undefined;
2461
+ tool?: string | undefined;
2462
+ notes?: string | undefined;
2463
+ }, {
2464
+ type: "pipeline" | "dashboard" | "ml_model" | "api" | "manual";
2465
+ source: string;
2466
+ pipeline?: string | undefined;
2467
+ refresh?: string | undefined;
2468
+ tool?: string | undefined;
2469
+ notes?: string | undefined;
2470
+ }>, "many">>;
2471
+ downstream: z.ZodOptional<z.ZodArray<z.ZodObject<{
2472
+ target: z.ZodString;
2473
+ type: z.ZodEnum<["pipeline", "dashboard", "ml_model", "api", "manual"]>;
2474
+ tool: z.ZodOptional<z.ZodString>;
2475
+ notes: z.ZodOptional<z.ZodString>;
2476
+ }, "strip", z.ZodTypeAny, {
2477
+ type: "pipeline" | "dashboard" | "ml_model" | "api" | "manual";
2478
+ target: string;
2479
+ tool?: string | undefined;
2480
+ notes?: string | undefined;
2481
+ }, {
2482
+ type: "pipeline" | "dashboard" | "ml_model" | "api" | "manual";
2483
+ target: string;
2484
+ tool?: string | undefined;
2485
+ notes?: string | undefined;
2486
+ }>, "many">>;
2487
+ }, "strip", z.ZodTypeAny, {
2488
+ model: string;
2489
+ upstream?: {
2490
+ type: "pipeline" | "dashboard" | "ml_model" | "api" | "manual";
2491
+ source: string;
2492
+ pipeline?: string | undefined;
2493
+ refresh?: string | undefined;
2494
+ tool?: string | undefined;
2495
+ notes?: string | undefined;
2496
+ }[] | undefined;
2497
+ downstream?: {
2498
+ type: "pipeline" | "dashboard" | "ml_model" | "api" | "manual";
2499
+ target: string;
2500
+ tool?: string | undefined;
2501
+ notes?: string | undefined;
2502
+ }[] | undefined;
2503
+ }, {
2504
+ model: string;
2505
+ upstream?: {
2506
+ type: "pipeline" | "dashboard" | "ml_model" | "api" | "manual";
2507
+ source: string;
2508
+ pipeline?: string | undefined;
2509
+ refresh?: string | undefined;
2510
+ tool?: string | undefined;
2511
+ notes?: string | undefined;
2512
+ }[] | undefined;
2513
+ downstream?: {
2514
+ type: "pipeline" | "dashboard" | "ml_model" | "api" | "manual";
2515
+ target: string;
2516
+ tool?: string | undefined;
2517
+ notes?: string | undefined;
616
2518
  }[] | undefined;
617
- status?: "draft" | "certified" | "deprecated" | undefined;
618
- name?: string | undefined;
619
- definition?: string | undefined;
620
- tags?: string[] | undefined;
621
- description?: string | undefined;
622
2519
  }>;
623
2520
 
624
2521
  declare const termFileSchema: z.ZodObject<{
625
2522
  id: z.ZodString;
626
- term: z.ZodOptional<z.ZodString>;
627
2523
  definition: z.ZodString;
628
2524
  synonyms: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
629
2525
  maps_to: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
630
2526
  owner: z.ZodOptional<z.ZodString>;
631
2527
  tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
632
2528
  }, "strip", z.ZodTypeAny, {
633
- id: string;
634
2529
  definition: string;
635
- term?: string | undefined;
2530
+ id: string;
2531
+ synonyms?: string[] | undefined;
636
2532
  owner?: string | undefined;
637
- maps_to?: string[] | undefined;
638
2533
  tags?: string[] | undefined;
639
- synonyms?: string[] | undefined;
2534
+ maps_to?: string[] | undefined;
640
2535
  }, {
641
- id: string;
642
2536
  definition: string;
643
- term?: string | undefined;
2537
+ id: string;
2538
+ synonyms?: string[] | undefined;
644
2539
  owner?: string | undefined;
645
- maps_to?: string[] | undefined;
646
2540
  tags?: string[] | undefined;
647
- synonyms?: string[] | undefined;
2541
+ maps_to?: string[] | undefined;
648
2542
  }>;
649
2543
 
650
2544
  declare const ownerFileSchema: z.ZodObject<{
@@ -652,268 +2546,225 @@ declare const ownerFileSchema: z.ZodObject<{
652
2546
  display_name: z.ZodString;
653
2547
  email: z.ZodOptional<z.ZodString>;
654
2548
  team: z.ZodOptional<z.ZodString>;
655
- tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2549
+ description: z.ZodOptional<z.ZodString>;
656
2550
  }, "strip", z.ZodTypeAny, {
657
2551
  id: string;
658
2552
  display_name: string;
659
- tags?: string[] | undefined;
2553
+ description?: string | undefined;
660
2554
  email?: string | undefined;
661
2555
  team?: string | undefined;
662
2556
  }, {
663
2557
  id: string;
664
2558
  display_name: string;
665
- tags?: string[] | undefined;
2559
+ description?: string | undefined;
666
2560
  email?: string | undefined;
667
2561
  team?: string | undefined;
668
2562
  }>;
669
2563
 
670
- declare const DEFAULT_CONFIG: ContextKitConfig;
671
-
672
- /**
673
- * Merge a partial user config with the defaults, returning a complete config.
674
- * Nested objects are deep-merged; arrays and primitives are overwritten.
675
- */
676
- declare function resolveConfig(partial: Partial<ContextKitConfig>): ContextKitConfig;
677
- /**
678
- * Load a ContextKit config from the given root directory.
679
- *
680
- * Searches for config files in this order:
681
- * 1. contextkit.config.ts
682
- * 2. contextkit.config.js
683
- * 3. contextkit.config.yaml
684
- * 4. contextkit.config.yml
685
- *
686
- * Falls back to DEFAULT_CONFIG if no config file is found.
687
- */
688
- declare function loadConfig(rootDir?: string): Promise<ContextKitConfig>;
2564
+ declare const metadataTierEnum: z.ZodEnum<["none", "bronze", "silver", "gold"]>;
2565
+ declare const severityEnum: z.ZodEnum<["error", "warning"]>;
2566
+ declare const severityOrOffEnum: z.ZodUnion<[z.ZodEnum<["error", "warning"]>, z.ZodLiteral<"off">]>;
2567
+ declare const lintConfigSchema: z.ZodObject<{
2568
+ severity_overrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodEnum<["error", "warning"]>, z.ZodLiteral<"off">]>>>;
2569
+ }, "strip", z.ZodTypeAny, {
2570
+ severity_overrides?: Record<string, "warning" | "error" | "off"> | undefined;
2571
+ }, {
2572
+ severity_overrides?: Record<string, "warning" | "error" | "off"> | undefined;
2573
+ }>;
2574
+ declare const siteConfigSchema: z.ZodObject<{
2575
+ title: z.ZodOptional<z.ZodString>;
2576
+ base_path: z.ZodOptional<z.ZodString>;
2577
+ }, "strip", z.ZodTypeAny, {
2578
+ title?: string | undefined;
2579
+ base_path?: string | undefined;
2580
+ }, {
2581
+ title?: string | undefined;
2582
+ base_path?: string | undefined;
2583
+ }>;
2584
+ declare const mcpConfigSchema: z.ZodObject<{
2585
+ transport: z.ZodOptional<z.ZodEnum<["stdio", "http"]>>;
2586
+ port: z.ZodOptional<z.ZodNumber>;
2587
+ }, "strip", z.ZodTypeAny, {
2588
+ transport?: "stdio" | "http" | undefined;
2589
+ port?: number | undefined;
2590
+ }, {
2591
+ transport?: "stdio" | "http" | undefined;
2592
+ port?: number | undefined;
2593
+ }>;
2594
+ declare const contextKitConfigSchema: z.ZodObject<{
2595
+ context_dir: z.ZodDefault<z.ZodString>;
2596
+ output_dir: z.ZodDefault<z.ZodString>;
2597
+ minimum_tier: z.ZodOptional<z.ZodEnum<["none", "bronze", "silver", "gold"]>>;
2598
+ lint: z.ZodOptional<z.ZodObject<{
2599
+ severity_overrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodEnum<["error", "warning"]>, z.ZodLiteral<"off">]>>>;
2600
+ }, "strip", z.ZodTypeAny, {
2601
+ severity_overrides?: Record<string, "warning" | "error" | "off"> | undefined;
2602
+ }, {
2603
+ severity_overrides?: Record<string, "warning" | "error" | "off"> | undefined;
2604
+ }>>;
2605
+ site: z.ZodOptional<z.ZodObject<{
2606
+ title: z.ZodOptional<z.ZodString>;
2607
+ base_path: z.ZodOptional<z.ZodString>;
2608
+ }, "strip", z.ZodTypeAny, {
2609
+ title?: string | undefined;
2610
+ base_path?: string | undefined;
2611
+ }, {
2612
+ title?: string | undefined;
2613
+ base_path?: string | undefined;
2614
+ }>>;
2615
+ mcp: z.ZodOptional<z.ZodObject<{
2616
+ transport: z.ZodOptional<z.ZodEnum<["stdio", "http"]>>;
2617
+ port: z.ZodOptional<z.ZodNumber>;
2618
+ }, "strip", z.ZodTypeAny, {
2619
+ transport?: "stdio" | "http" | undefined;
2620
+ port?: number | undefined;
2621
+ }, {
2622
+ transport?: "stdio" | "http" | undefined;
2623
+ port?: number | undefined;
2624
+ }>>;
2625
+ }, "strip", z.ZodTypeAny, {
2626
+ context_dir: string;
2627
+ output_dir: string;
2628
+ minimum_tier?: "none" | "bronze" | "silver" | "gold" | undefined;
2629
+ lint?: {
2630
+ severity_overrides?: Record<string, "warning" | "error" | "off"> | undefined;
2631
+ } | undefined;
2632
+ site?: {
2633
+ title?: string | undefined;
2634
+ base_path?: string | undefined;
2635
+ } | undefined;
2636
+ mcp?: {
2637
+ transport?: "stdio" | "http" | undefined;
2638
+ port?: number | undefined;
2639
+ } | undefined;
2640
+ }, {
2641
+ context_dir?: string | undefined;
2642
+ output_dir?: string | undefined;
2643
+ minimum_tier?: "none" | "bronze" | "silver" | "gold" | undefined;
2644
+ lint?: {
2645
+ severity_overrides?: Record<string, "warning" | "error" | "off"> | undefined;
2646
+ } | undefined;
2647
+ site?: {
2648
+ title?: string | undefined;
2649
+ base_path?: string | undefined;
2650
+ } | undefined;
2651
+ mcp?: {
2652
+ transport?: "stdio" | "http" | undefined;
2653
+ port?: number | undefined;
2654
+ } | undefined;
2655
+ }>;
689
2656
 
690
- declare function discoverFiles(contextDir: string): Promise<string[]>;
2657
+ type FileKind = 'model' | 'governance' | 'rules' | 'lineage' | 'term' | 'owner';
2658
+ interface DiscoveredFile {
2659
+ path: string;
2660
+ kind: FileKind;
2661
+ }
2662
+ declare function discoverFiles(contextDir: string): Promise<DiscoveredFile[]>;
691
2663
 
692
- type FileType = 'concept' | 'product' | 'entity' | 'policy' | 'term' | 'owner';
693
2664
  interface ParsedFile {
694
- filePath: string;
695
- fileType: FileType;
696
- data: Record<string, unknown>;
2665
+ kind: FileKind;
2666
+ data: unknown;
2667
+ source: {
2668
+ file: string;
2669
+ line: number;
2670
+ column: number;
2671
+ };
697
2672
  }
698
- declare function parseFile(filePath: string): Promise<ParsedFile>;
2673
+ declare function parseFile(filePath: string, kind: FileKind): Promise<ParsedFile>;
2674
+
2675
+ interface ValidateResult {
2676
+ kind: FileKind;
2677
+ data?: any;
2678
+ diagnostics: Diagnostic[];
2679
+ }
2680
+ declare function validate(parsed: ParsedFile): ValidateResult;
2681
+
2682
+ declare function resolveReferences(graph: ContextGraph): Diagnostic[];
699
2683
 
700
- /**
701
- * Create an empty ContextGraph with initialized (but empty) collections.
702
- */
703
2684
  declare function createEmptyGraph(): ContextGraph;
704
- /**
705
- * Build a full ContextGraph from an array of ContextNodes.
706
- *
707
- * Populates:
708
- * - nodes Map (keyed by id)
709
- * - indexes: byKind, byOwner, byTag, byStatus, dependents
710
- * - edges: depends_on, belongs_to, owned_by, maps_to
711
- */
712
- declare function buildGraph(nodes: ContextNode[]): ContextGraph;
2685
+ declare function buildGraph(results: ValidateResult[]): ContextGraph;
713
2686
 
714
- interface CompileOptions {
715
- contextDir: string;
716
- config: Partial<ContextKitConfig>;
717
- }
718
2687
  interface CompileResult {
719
2688
  graph: ContextGraph;
720
2689
  diagnostics: Diagnostic[];
721
2690
  }
722
- /**
723
- * Run the full compiler pipeline:
724
- * 1. Discover context files
725
- * 2. Parse each YAML file
726
- * 3. Validate (Zod schema) -> typed ContextNode
727
- * 4. Normalize (kebab-case IDs, lowercase tags)
728
- * 5. Build graph
729
- */
730
- declare function compile(options: CompileOptions): Promise<CompileResult>;
2691
+ declare function compile(options: {
2692
+ contextDir: string;
2693
+ config?: Partial<ContextKitConfig>;
2694
+ }): Promise<CompileResult>;
731
2695
 
732
- interface ValidateResult {
733
- node?: ContextNode;
734
- diagnostics: Diagnostic[];
2696
+ interface Manifest {
2697
+ version: string;
2698
+ generatedAt: string;
2699
+ models: Record<string, OsiSemanticModel>;
2700
+ governance: Record<string, GovernanceFile>;
2701
+ rules: Record<string, RulesFile>;
2702
+ lineage: Record<string, LineageFile>;
2703
+ terms: Record<string, TermFile>;
2704
+ owners: Record<string, OwnerFile>;
2705
+ tiers: Record<string, TierScore>;
735
2706
  }
736
2707
  /**
737
- * Validate a ParsedFile using the appropriate Zod schema and convert
738
- * the raw snake_case YAML data into a typed camelCase ContextNode.
739
- */
740
- declare function validateFile(parsed: ParsedFile): ValidateResult;
741
-
742
- /**
743
- * Normalize a ContextNode:
744
- * - Convert ID to kebab-case
745
- * - Lowercase all tags
746
- */
747
- declare function normalizeNode(node: ContextNode): ContextNode;
748
-
749
- /**
750
- * Serialize a ContextGraph into the Manifest JSON format.
751
- */
752
- declare function emitManifest(graph: ContextGraph, config: ContextKitConfig): Manifest;
753
-
754
- /**
755
- * A lint rule that inspects the ContextGraph and returns diagnostics.
2708
+ * Emit a compiled ContextGraph as a JSON-serializable Manifest object.
756
2709
  *
757
- * Rules are ESLint-inspired: each has an id, a default severity,
758
- * and a `run` method that receives the full graph IR.
2710
+ * Converts all internal Maps to plain Records suitable for `JSON.stringify`.
759
2711
  */
2712
+ declare function emitManifest(graph: ContextGraph, _config: ContextKitConfig): Manifest;
2713
+
760
2714
  interface LintRule {
761
- /** Unique rule identifier, e.g. `"naming/id-kebab-case"`. */
762
2715
  id: string;
763
- /** Severity when no config override is provided. */
764
2716
  defaultSeverity: Severity;
765
- /** Human-readable description of what this rule checks. */
766
2717
  description: string;
767
- /** Whether the rule can supply an auto-fix. */
768
2718
  fixable: boolean;
769
- /** Inspect the graph and return zero or more diagnostics. */
770
2719
  run(graph: ContextGraph): Diagnostic[];
771
2720
  }
772
2721
 
773
- /**
774
- * ESLint-inspired lint engine that runs registered rules against a ContextGraph.
775
- *
776
- * Supports severity overrides from config:
777
- * - `'off'` disables a rule entirely
778
- * - `'error'` / `'warning'` overrides the rule's default severity
779
- */
780
2722
  declare class LintEngine {
781
2723
  private rules;
782
2724
  private overrides;
783
2725
  constructor(overrides?: Record<string, Severity | 'off'>);
784
- /** Register a lint rule with the engine. */
785
2726
  register(rule: LintRule): void;
786
- /**
787
- * Run all enabled rules against the graph and return sorted diagnostics.
788
- *
789
- * Diagnostics are sorted by source file (ascending) then line (ascending).
790
- */
791
2727
  run(graph: ContextGraph): Diagnostic[];
792
2728
  }
793
2729
 
794
- /**
795
- * Placeholder rule for YAML schema validation.
796
- *
797
- * Schema validation diagnostics are produced during the compile phase
798
- * (Zod parsing). This rule exists so that users can see and configure
799
- * it in their lint config, but it never produces diagnostics itself.
800
- */
801
- declare const schemaValidYaml: LintRule;
802
-
803
- /**
804
- * IDs must be kebab-case.
805
- *
806
- * Checks every node's `id` against the pattern `/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/`.
807
- * Provides an auto-fix that converts the ID to kebab-case.
808
- */
809
- declare const namingIdKebabCase: LintRule;
810
-
811
- /**
812
- * Concepts, products, and entities require an owner.
813
- *
814
- * Checks that nodes of the above kinds have a non-empty `owner` field.
815
- * Provides a stub fix that adds `owner: TODO`.
816
- */
817
- declare const ownershipRequired: LintRule;
818
-
819
- /**
820
- * All nodes should have a description or definition.
821
- *
822
- * Provides a stub fix that adds a description placeholder.
823
- */
824
- declare const descriptionsRequired: LintRule;
825
-
826
- /**
827
- * Verify that all cross-node references resolve to existing nodes.
828
- *
829
- * Checks:
830
- * - Concept: `dependsOn`, `productId`, `owner`
831
- * - Term: `mapsTo`
832
- * - Product / Entity: `owner`
833
- * - Policy / Owner: no reference checks
834
- */
835
- declare const referencesResolvable: LintRule;
836
-
837
- /**
838
- * Detect terms with identical definitions.
839
- *
840
- * Since the graph uses a Map keyed by ID, true duplicate IDs cannot exist.
841
- * Instead, this rule flags term nodes whose `definition` text matches
842
- * another term's definition (case-insensitive, trimmed). The second
843
- * occurrence is flagged.
844
- */
845
- declare const glossaryNoDuplicateTerms: LintRule;
846
-
847
- /**
848
- * Certified concepts must have at least one evidence entry.
849
- *
850
- * Checks every concept where `certified: true` and verifies the
851
- * `evidence` array is present and non-empty.
852
- */
853
- declare const conceptsCertifiedRequiresEvidence: LintRule;
2730
+ declare const ALL_RULES: LintRule[];
854
2731
 
855
- /**
856
- * Policy selectors must reference known concepts and tags.
857
- *
858
- * For each policy rule's `when` block:
859
- * - `conceptIds` entries must exist as concept nodes in the graph
860
- * - `tagsAny` entries must be used by at least one node (present in byTag index)
861
- */
862
- declare const policiesUnknownSubject: LintRule;
2732
+ declare function checkBronze(modelName: string, graph: ContextGraph): TierCheckResult[];
2733
+ declare function checkSilver(modelName: string, graph: ContextGraph): TierCheckResult[];
2734
+ declare function checkGold(modelName: string, graph: ContextGraph): TierCheckResult[];
863
2735
 
864
2736
  /**
865
- * Deny rules should have higher priority than allow rules.
2737
+ * Compute the tier score for a single model.
866
2738
  *
867
- * Within each policy, if any rule has `then.deny: true`, its priority
868
- * should be numerically greater than every non-deny rule in the same
869
- * policy. Emits a diagnostic if a deny rule has lower priority than
870
- * a non-deny rule.
2739
+ * The tier is determined hierarchically:
2740
+ * - Gold: all Bronze + Silver + Gold checks pass
2741
+ * - Silver: all Bronze + Silver checks pass
2742
+ * - Bronze: all Bronze checks pass
2743
+ * - None: some Bronze checks fail
871
2744
  */
872
- declare const policiesDenyOverridesAllow: LintRule;
873
-
2745
+ declare function computeTier(modelName: string, graph: ContextGraph): TierScore;
874
2746
  /**
875
- * Certified concepts should include at least one example.
876
- *
877
- * Checks every concept with `certified: true` and verifies the
878
- * `examples` array is present and non-empty.
2747
+ * Compute tiers for every model in the graph and populate `graph.tiers`.
879
2748
  */
880
- declare const docsExamplesRequired: LintRule;
2749
+ declare function computeAllTiers(graph: ContextGraph): void;
881
2750
 
882
- /**
883
- * Deprecated nodes must include a sunset date tag.
884
- *
885
- * Checks every node with `status: 'deprecated'` for a tag matching
886
- * the `sunset:*` pattern (e.g., `sunset:2026-06-01`).
887
- */
888
- declare const deprecationRequireSunset: LintRule;
2751
+ declare const DEFAULT_CONFIG: ContextKitConfig;
889
2752
 
890
2753
  /**
891
- * Scan all string fields in every node for secret patterns.
2754
+ * Load the ContextKit configuration from a root directory.
892
2755
  *
893
- * Checks `description`, `definition`, and example `content` fields.
894
- */
895
- declare const packagingNoSecrets: LintRule;
896
-
897
- /**
898
- * All built-in lint rules, in a convenient array for bulk registration.
2756
+ * Reads `contextkit.config.yaml` from `rootDir`, parses YAML, validates via
2757
+ * the Zod config schema, and merges with defaults. Returns `DEFAULT_CONFIG`
2758
+ * when no config file is found.
899
2759
  */
900
- declare const ALL_RULES: LintRule[];
2760
+ declare function loadConfig(rootDir: string): ContextKitConfig;
901
2761
 
902
- interface ApplyResult {
903
- file: string;
904
- editsApplied: number;
905
- newContent: string;
906
- }
907
2762
  /**
908
- * Apply fixable diagnostics to produce new file contents.
909
- *
910
- * Filters diagnostics to those with `fixable: true` and a `fix` property,
911
- * groups their edits by file, then applies edits in reverse line order
912
- * (bottom-to-top) to avoid offset corruption.
2763
+ * Apply auto-fixes from diagnostics, returning a map of file path to new content.
913
2764
  *
914
- * Currently handles insertion edits where startLine === endLine and
915
- * startCol === endCol.
2765
+ * Edits are grouped by file, sorted in reverse order (bottom-to-top, right-to-left),
2766
+ * and applied sequentially so that earlier positions remain stable.
916
2767
  */
917
- declare function applyFixes(diagnostics: Diagnostic[]): ApplyResult[];
2768
+ declare function applyFixes(diagnostics: Diagnostic[], readFile: (path: string) => string): Map<string, string>;
918
2769
 
919
- export { ALL_RULES, type ApplyResult, type BaseNode, type CompileOptions, type CompileResult, type Concept, type ContextGraph, type ContextKitConfig, type ContextNode, DEFAULT_CONFIG, type Diagnostic, type Edge, type Entity, type EntityField, type Evidence, type Example, type FileType, type Fix, type LintConfig, LintEngine, type LintRule, type Manifest, type ManifestBuild, type ManifestConcept, type ManifestEntity, type ManifestOwner, type ManifestPolicy, type ManifestProduct, type ManifestProject, type ManifestTerm, type McpConfig, type NodeKind, type Owner, type ParsedFile, type PathsConfig, type Policy, type PolicyRule, type Product, type ProjectConfig, type Severity, type SiteConfig, type SourceLocation, type Status, type Term, type TextEdit, type ValidateResult, applyFixes, buildGraph, compile, conceptFileSchema, conceptsCertifiedRequiresEvidence, createEmptyGraph, deprecationRequireSunset, descriptionsRequired, discoverFiles, docsExamplesRequired, emitManifest, entityFieldSchema, entityFileSchema, evidenceSchema, exampleSchema, glossaryNoDuplicateTerms, loadConfig, namingIdKebabCase, normalizeNode, ownerFileSchema, ownershipRequired, packagingNoSecrets, parseFile, policiesDenyOverridesAllow, policiesUnknownSubject, policyFileSchema, policyRuleSchema, policyThenSchema, policyWhenSchema, productFileSchema, referencesResolvable, resolveConfig, schemaValidYaml, termFileSchema, validateFile };
2770
+ export { type AIContext, ALL_RULES, type BusinessRule, type CompileResult, type ContextGraph, type ContextKitConfig, type CustomExtension, DEFAULT_CONFIG, type DatasetGovernance, type DefaultAggregation, type Diagnostic, type Dialect, type DialectExpression, type Dimension, type DiscoveredFile, type DownstreamEntry, type Expression, type FieldGovernance, type FileKind, type Fix, type GoldenQuery, type GovernanceFile, type GuardrailFilter, type Hierarchy, type LineageFile, type LineageType, type LintConfig, LintEngine, type LintRule, type Manifest, type McpConfig, type MetadataTier, type OsiDataset, type OsiDocument, type OsiField, type OsiMetric, type OsiRelationship, type OsiSemanticModel, type OwnerFile, type ParsedFile, type RulesFile, type SecurityClassification, type SemanticRole, type Severity, type SiteConfig, type SourceLocation, type TableType, type TermFile, type TextEdit, type TierCheckResult, type TierScore, type TrustStatus, type UpstreamEntry, type ValidateResult, type Vendor, aiContextObjectSchema, aiContextSchema, applyFixes, buildGraph, businessRuleSchema, checkBronze, checkGold, checkSilver, compile, computeAllTiers, computeTier, contextKitConfigSchema, createEmptyGraph, customExtensionSchema, datasetGovernanceSchema, defaultAggregationEnum, dialectEnum, dialectExpressionSchema, dimensionSchema, discoverFiles, downstreamEntrySchema, emitManifest, expressionSchema, fieldGovernanceSchema, goldenQuerySchema, governanceFileSchema, guardrailFilterSchema, hierarchySchema, lineageFileSchema, lineageTypeEnum, lintConfigSchema, loadConfig, mcpConfigSchema, metadataTierEnum, osiDatasetSchema, osiDocumentSchema, osiFieldSchema, osiMetricSchema, osiRelationshipSchema, osiSemanticModelSchema, ownerFileSchema, parseFile, resolveReferences, rulesFileSchema, securityClassificationEnum, semanticRoleEnum, severityEnum, severityOrOffEnum, siteConfigSchema, tableTypeEnum, termFileSchema, trustStatusEnum, upstreamEntrySchema, validate, vendorEnum };