@sequenceholdings/orm 2.1.1 → 2.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.
Files changed (68) hide show
  1. package/README.md +3 -1
  2. package/dist/authoring.cjs +284 -99
  3. package/dist/authoring.cjs.map +1 -1
  4. package/dist/authoring.d.cts +31 -8
  5. package/dist/authoring.d.ts +31 -8
  6. package/dist/authoring.js +282 -100
  7. package/dist/authoring.js.map +1 -1
  8. package/dist/canonical.cjs +51 -3
  9. package/dist/canonical.cjs.map +1 -1
  10. package/dist/canonical.d.cts +838 -12
  11. package/dist/canonical.d.ts +838 -12
  12. package/dist/canonical.js +47 -4
  13. package/dist/canonical.js.map +1 -1
  14. package/dist/cli.cjs +5838 -4197
  15. package/dist/cli.cjs.map +1 -1
  16. package/dist/cli.js +5838 -4197
  17. package/dist/cli.js.map +1 -1
  18. package/dist/client.cjs +49 -32
  19. package/dist/client.cjs.map +1 -1
  20. package/dist/client.d.cts +49 -6
  21. package/dist/client.d.ts +49 -6
  22. package/dist/client.js +49 -32
  23. package/dist/client.js.map +1 -1
  24. package/dist/compiler.cjs +1237 -263
  25. package/dist/compiler.cjs.map +1 -1
  26. package/dist/compiler.d.cts +57 -3
  27. package/dist/compiler.d.ts +57 -3
  28. package/dist/compiler.js +1230 -264
  29. package/dist/compiler.js.map +1 -1
  30. package/dist/{constants-YoFGjIBM.d.cts → constants-C6EG6Wq7.d.cts} +1 -1
  31. package/dist/{constants-YoFGjIBM.d.ts → constants-C6EG6Wq7.d.ts} +1 -1
  32. package/dist/definition-DjfC7Lll.d.cts +91 -0
  33. package/dist/definition-DjfC7Lll.d.ts +91 -0
  34. package/dist/dynamic-input.cjs +2 -1
  35. package/dist/dynamic-input.cjs.map +1 -1
  36. package/dist/dynamic-input.d.cts +9 -2
  37. package/dist/dynamic-input.d.ts +9 -2
  38. package/dist/dynamic-input.js +2 -1
  39. package/dist/dynamic-input.js.map +1 -1
  40. package/dist/index.cjs +1094 -321
  41. package/dist/index.cjs.map +1 -1
  42. package/dist/index.d.cts +479 -19
  43. package/dist/index.d.ts +479 -19
  44. package/dist/index.js +1083 -322
  45. package/dist/index.js.map +1 -1
  46. package/dist/ir.cjs +84 -10
  47. package/dist/ir.cjs.map +1 -1
  48. package/dist/ir.d.cts +138 -13
  49. package/dist/ir.d.ts +138 -13
  50. package/dist/ir.js +81 -11
  51. package/dist/ir.js.map +1 -1
  52. package/dist/predicate-v2.cjs +78 -9
  53. package/dist/predicate-v2.cjs.map +1 -1
  54. package/dist/predicate-v2.d.cts +1 -1
  55. package/dist/predicate-v2.d.ts +1 -1
  56. package/dist/predicate-v2.js +78 -9
  57. package/dist/predicate-v2.js.map +1 -1
  58. package/dist/sdl.cjs +156 -21
  59. package/dist/sdl.cjs.map +1 -1
  60. package/dist/sdl.d.cts +8 -1
  61. package/dist/sdl.d.ts +8 -1
  62. package/dist/sdl.js +156 -21
  63. package/dist/sdl.js.map +1 -1
  64. package/package.json +5 -4
  65. package/src/codegen-gql/server-fns.cjs +2 -2
  66. package/templates/orm-namespace/AGENTS.md +10 -0
  67. package/templates/orm-namespace/CLAUDE.md +1 -84
  68. package/templates/orm-namespace/package.json +1 -1
package/dist/ir.d.cts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- export { C as CELLS_FIELD, a as CELL_PARTS, b as CellPart, c as cellColumnName } from './constants-YoFGjIBM.cjs';
2
+ export { C as CELLS_FIELD, a as CELL_PARTS, b as CellPart, c as cellColumnName } from './constants-C6EG6Wq7.cjs';
3
3
 
4
4
  /**
5
5
  * Compiled-operation IR — THE frozen contract between the GraphQL compiler
@@ -23,10 +23,15 @@ export { C as CELLS_FIELD, a as CELL_PARTS, b as CellPart, c as cellColumnName }
23
23
  * pattern): executor upgrades decouple from artifact re-pushes.
24
24
  */
25
25
 
26
- /** Maximum supported version. Emit v1 until an operation needs v2 semantics. */
27
- declare const IR_VERSION: 2;
26
+ /** Maximum supported version; emit the oldest version that preserves semantics. */
27
+ declare const IR_VERSION: 5;
28
28
  declare const LEGACY_IR_VERSION: 1;
29
- declare const irVersionSchema: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>;
29
+ declare const GUARDED_IR_VERSION: 2;
30
+ /** Older v2 executors must not strip namespace-scoped authorization. */
31
+ declare const COMPOSED_IR_VERSION: 3;
32
+ declare const SQL_IR_VERSION: 4;
33
+ declare const RUNTIME_SQL_IR_VERSION: 5;
34
+ declare const irVersionSchema: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>]>;
30
35
  /** Keep v1 artifact identity when assembling only legacy operations from registry rows. */
31
36
  declare function requiredArtifactIrVersion(operations: readonly unknown[]): z.infer<typeof irVersionSchema>;
32
37
  /** The exact claim keys the platform stamps — mirrors claims.ts. */
@@ -87,9 +92,11 @@ type PredIr = {
87
92
  | {
88
93
  kind: 'capability';
89
94
  key: string;
95
+ namespace?: string;
90
96
  } | {
91
97
  kind: 'role';
92
98
  key: string;
99
+ namespace?: string;
93
100
  }
94
101
  /** §4f: a client-supplied BoolExp variable lands here, validated + lowered at runtime. */
95
102
  | {
@@ -621,8 +628,8 @@ declare const variableIrSchema: z.ZodObject<{
621
628
  scalar: z.ZodEnum<{
622
629
  bigint: "bigint";
623
630
  boolean: "boolean";
624
- text: "text";
625
631
  date: "date";
632
+ text: "text";
626
633
  timestamptz: "timestamptz";
627
634
  jsonb: "jsonb";
628
635
  uuid: "uuid";
@@ -655,7 +662,47 @@ declare const variableIrSchema: z.ZodObject<{
655
662
  }, z.core.$strip>;
656
663
  type VariableIr = z.infer<typeof variableIrSchema>;
657
664
  declare const compiledOperationSchema: z.ZodObject<{
658
- irVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>;
665
+ language: z.ZodOptional<z.ZodLiteral<"sql">>;
666
+ sqlQuery: z.ZodOptional<z.ZodObject<{
667
+ catalog: z.ZodObject<{
668
+ identity: z.ZodString;
669
+ objects: z.ZodArray<z.ZodObject<{
670
+ ref: z.ZodString;
671
+ table: z.ZodString;
672
+ columns: z.ZodArray<z.ZodObject<{
673
+ name: z.ZodString;
674
+ nullable: z.ZodBoolean;
675
+ type: z.ZodString;
676
+ }, z.core.$strip>>;
677
+ scan: z.ZodString;
678
+ read: z.ZodArray<z.ZodString>;
679
+ }, z.core.$strict>>;
680
+ }, z.core.$strict>;
681
+ read: z.ZodArray<z.ZodString>;
682
+ maxRows: z.ZodNumber;
683
+ }, z.core.$strict>>;
684
+ sql: z.ZodOptional<z.ZodObject<{
685
+ text: z.ZodString;
686
+ columns: z.ZodArray<z.ZodObject<{
687
+ name: z.ZodString;
688
+ type: z.ZodEnum<{
689
+ bigint: "bigint";
690
+ boolean: "boolean";
691
+ date: "date";
692
+ text: "text";
693
+ timestamptz: "timestamptz";
694
+ uuid: "uuid";
695
+ integer: "integer";
696
+ numeric: "numeric";
697
+ double: "double";
698
+ }>;
699
+ nullable: z.ZodBoolean;
700
+ }, z.core.$strip>>;
701
+ parameters: z.ZodArray<z.ZodString>;
702
+ read: z.ZodArray<z.ZodString>;
703
+ maxRows: z.ZodNumber;
704
+ }, z.core.$strict>>;
705
+ irVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>]>;
659
706
  name: z.ZodString;
660
707
  opHash: z.ZodString;
661
708
  kind: z.ZodEnum<{
@@ -673,8 +720,8 @@ declare const compiledOperationSchema: z.ZodObject<{
673
720
  scalar: z.ZodEnum<{
674
721
  bigint: "bigint";
675
722
  boolean: "boolean";
676
- text: "text";
677
723
  date: "date";
724
+ text: "text";
678
725
  timestamptz: "timestamptz";
679
726
  jsonb: "jsonb";
680
727
  uuid: "uuid";
@@ -1156,6 +1203,23 @@ type ResolvedMetaIr = z.infer<typeof resolvedMetaIrSchema>;
1156
1203
  */
1157
1204
  declare const tableMetaIrSchema: z.ZodObject<{
1158
1205
  table: z.ZodString;
1206
+ namespace: z.ZodOptional<z.ZodString>;
1207
+ dependencies: z.ZodOptional<z.ZodArray<z.ZodString>>;
1208
+ foreignReferences: z.ZodOptional<z.ZodArray<z.ZodObject<{
1209
+ column: z.ZodString;
1210
+ target: z.ZodString;
1211
+ targetColumn: z.ZodString;
1212
+ }, z.core.$strip>>>;
1213
+ exportRead: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<true>, z.ZodObject<{
1214
+ capability: z.ZodString;
1215
+ }, z.core.$strip>, z.ZodObject<{
1216
+ role: z.ZodString;
1217
+ }, z.core.$strip>]>>;
1218
+ exportWrite: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<true>, z.ZodObject<{
1219
+ capability: z.ZodString;
1220
+ }, z.core.$strip>, z.ZodObject<{
1221
+ role: z.ZodString;
1222
+ }, z.core.$strip>]>>;
1159
1223
  schema: z.ZodString;
1160
1224
  typename: z.ZodString;
1161
1225
  claimsGated: z.ZodDefault<z.ZodBoolean>;
@@ -1165,8 +1229,8 @@ declare const tableMetaIrSchema: z.ZodObject<{
1165
1229
  type: z.ZodUnion<readonly [z.ZodEnum<{
1166
1230
  bigint: "bigint";
1167
1231
  boolean: "boolean";
1168
- text: "text";
1169
1232
  date: "date";
1233
+ text: "text";
1170
1234
  timestamptz: "timestamptz";
1171
1235
  jsonb: "jsonb";
1172
1236
  uuid: "uuid";
@@ -1263,12 +1327,33 @@ declare const tableMetaIrSchema: z.ZodObject<{
1263
1327
  }, z.core.$strip>;
1264
1328
  type TableMetaIr = z.infer<typeof tableMetaIrSchema>;
1265
1329
  declare const compiledArtifactSchema: z.ZodObject<{
1266
- irVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>;
1330
+ irVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>]>;
1267
1331
  namespace: z.ZodString;
1268
1332
  schemaHash: z.ZodString;
1333
+ ownSchemaHash: z.ZodOptional<z.ZodString>;
1334
+ dependencies: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1335
+ readPolicies: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<PredIr, unknown, z.core.$ZodTypeInternals<PredIr, unknown>>>>;
1269
1336
  opsHash: z.ZodString;
1337
+ unbackedTables: z.ZodOptional<z.ZodArray<z.ZodString>>;
1270
1338
  tables: z.ZodRecord<z.ZodString, z.ZodObject<{
1271
1339
  table: z.ZodString;
1340
+ namespace: z.ZodOptional<z.ZodString>;
1341
+ dependencies: z.ZodOptional<z.ZodArray<z.ZodString>>;
1342
+ foreignReferences: z.ZodOptional<z.ZodArray<z.ZodObject<{
1343
+ column: z.ZodString;
1344
+ target: z.ZodString;
1345
+ targetColumn: z.ZodString;
1346
+ }, z.core.$strip>>>;
1347
+ exportRead: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<true>, z.ZodObject<{
1348
+ capability: z.ZodString;
1349
+ }, z.core.$strip>, z.ZodObject<{
1350
+ role: z.ZodString;
1351
+ }, z.core.$strip>]>>;
1352
+ exportWrite: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<true>, z.ZodObject<{
1353
+ capability: z.ZodString;
1354
+ }, z.core.$strip>, z.ZodObject<{
1355
+ role: z.ZodString;
1356
+ }, z.core.$strip>]>>;
1272
1357
  schema: z.ZodString;
1273
1358
  typename: z.ZodString;
1274
1359
  claimsGated: z.ZodDefault<z.ZodBoolean>;
@@ -1278,8 +1363,8 @@ declare const compiledArtifactSchema: z.ZodObject<{
1278
1363
  type: z.ZodUnion<readonly [z.ZodEnum<{
1279
1364
  bigint: "bigint";
1280
1365
  boolean: "boolean";
1281
- text: "text";
1282
1366
  date: "date";
1367
+ text: "text";
1283
1368
  timestamptz: "timestamptz";
1284
1369
  jsonb: "jsonb";
1285
1370
  uuid: "uuid";
@@ -1375,7 +1460,47 @@ declare const compiledArtifactSchema: z.ZodObject<{
1375
1460
  dynamicFilterMaxNodes: z.ZodDefault<z.ZodNumber>;
1376
1461
  }, z.core.$strip>>;
1377
1462
  operations: z.ZodRecord<z.ZodString, z.ZodObject<{
1378
- irVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>;
1463
+ language: z.ZodOptional<z.ZodLiteral<"sql">>;
1464
+ sqlQuery: z.ZodOptional<z.ZodObject<{
1465
+ catalog: z.ZodObject<{
1466
+ identity: z.ZodString;
1467
+ objects: z.ZodArray<z.ZodObject<{
1468
+ ref: z.ZodString;
1469
+ table: z.ZodString;
1470
+ columns: z.ZodArray<z.ZodObject<{
1471
+ name: z.ZodString;
1472
+ nullable: z.ZodBoolean;
1473
+ type: z.ZodString;
1474
+ }, z.core.$strip>>;
1475
+ scan: z.ZodString;
1476
+ read: z.ZodArray<z.ZodString>;
1477
+ }, z.core.$strict>>;
1478
+ }, z.core.$strict>;
1479
+ read: z.ZodArray<z.ZodString>;
1480
+ maxRows: z.ZodNumber;
1481
+ }, z.core.$strict>>;
1482
+ sql: z.ZodOptional<z.ZodObject<{
1483
+ text: z.ZodString;
1484
+ columns: z.ZodArray<z.ZodObject<{
1485
+ name: z.ZodString;
1486
+ type: z.ZodEnum<{
1487
+ bigint: "bigint";
1488
+ boolean: "boolean";
1489
+ date: "date";
1490
+ text: "text";
1491
+ timestamptz: "timestamptz";
1492
+ uuid: "uuid";
1493
+ integer: "integer";
1494
+ numeric: "numeric";
1495
+ double: "double";
1496
+ }>;
1497
+ nullable: z.ZodBoolean;
1498
+ }, z.core.$strip>>;
1499
+ parameters: z.ZodArray<z.ZodString>;
1500
+ read: z.ZodArray<z.ZodString>;
1501
+ maxRows: z.ZodNumber;
1502
+ }, z.core.$strict>>;
1503
+ irVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>]>;
1379
1504
  name: z.ZodString;
1380
1505
  opHash: z.ZodString;
1381
1506
  kind: z.ZodEnum<{
@@ -1393,8 +1518,8 @@ declare const compiledArtifactSchema: z.ZodObject<{
1393
1518
  scalar: z.ZodEnum<{
1394
1519
  bigint: "bigint";
1395
1520
  boolean: "boolean";
1396
- text: "text";
1397
1521
  date: "date";
1522
+ text: "text";
1398
1523
  timestamptz: "timestamptz";
1399
1524
  jsonb: "jsonb";
1400
1525
  uuid: "uuid";
@@ -1790,4 +1915,4 @@ declare function normalizeIr(raw: unknown): CompiledArtifact;
1790
1915
  /** Index an artifact's operations by opHash (the wire selector). */
1791
1916
  declare function indexByHash(artifact: CompiledArtifact): Map<string, CompiledOperation>;
1792
1917
 
1793
- export { CLAIMS_CONTRACT, CMP_OPS, type CellSelectionIr, type ClaimKey, type CmpOp, type CompiledArtifact, type CompiledOperation, DATE_BUCKETS, type DateBucket, type GroupByKeyIr, INPUT_REF_KINDS, IR_VERSION, type InputRefKind, IrVersionError, LEGACY_IR_VERSION, type LimitIr, type OrderIr, type PredIr, type PrefetchPlanIr, type ResolvedMetaIr, type ResolvedSourceIr, type RootIr, type SelectionIr, type TableMetaIr, type ValueIr, type VariableDefaultIr, type VariableIr, compiledArtifactSchema, compiledOperationSchema, indexByHash, limitIrSchema, normalizeIr, orderIrSchema, predIrSchema, prefetchPlanIrSchema, requiredArtifactIrVersion, resolvedMetaIrSchema, resolvedSourceIrSchema, rootIrSchema, selectionIrSchema, tableMetaIrSchema, valueIrSchema, variableDefaultIrSchema, variableIrSchema };
1918
+ export { CLAIMS_CONTRACT, CMP_OPS, COMPOSED_IR_VERSION, type CellSelectionIr, type ClaimKey, type CmpOp, type CompiledArtifact, type CompiledOperation, DATE_BUCKETS, type DateBucket, GUARDED_IR_VERSION, type GroupByKeyIr, INPUT_REF_KINDS, IR_VERSION, type InputRefKind, IrVersionError, LEGACY_IR_VERSION, type LimitIr, type OrderIr, type PredIr, type PrefetchPlanIr, RUNTIME_SQL_IR_VERSION, type ResolvedMetaIr, type ResolvedSourceIr, type RootIr, SQL_IR_VERSION, type SelectionIr, type TableMetaIr, type ValueIr, type VariableDefaultIr, type VariableIr, compiledArtifactSchema, compiledOperationSchema, indexByHash, limitIrSchema, normalizeIr, orderIrSchema, predIrSchema, prefetchPlanIrSchema, requiredArtifactIrVersion, resolvedMetaIrSchema, resolvedSourceIrSchema, rootIrSchema, selectionIrSchema, tableMetaIrSchema, valueIrSchema, variableDefaultIrSchema, variableIrSchema };
package/dist/ir.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- export { C as CELLS_FIELD, a as CELL_PARTS, b as CellPart, c as cellColumnName } from './constants-YoFGjIBM.js';
2
+ export { C as CELLS_FIELD, a as CELL_PARTS, b as CellPart, c as cellColumnName } from './constants-C6EG6Wq7.js';
3
3
 
4
4
  /**
5
5
  * Compiled-operation IR — THE frozen contract between the GraphQL compiler
@@ -23,10 +23,15 @@ export { C as CELLS_FIELD, a as CELL_PARTS, b as CellPart, c as cellColumnName }
23
23
  * pattern): executor upgrades decouple from artifact re-pushes.
24
24
  */
25
25
 
26
- /** Maximum supported version. Emit v1 until an operation needs v2 semantics. */
27
- declare const IR_VERSION: 2;
26
+ /** Maximum supported version; emit the oldest version that preserves semantics. */
27
+ declare const IR_VERSION: 5;
28
28
  declare const LEGACY_IR_VERSION: 1;
29
- declare const irVersionSchema: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>;
29
+ declare const GUARDED_IR_VERSION: 2;
30
+ /** Older v2 executors must not strip namespace-scoped authorization. */
31
+ declare const COMPOSED_IR_VERSION: 3;
32
+ declare const SQL_IR_VERSION: 4;
33
+ declare const RUNTIME_SQL_IR_VERSION: 5;
34
+ declare const irVersionSchema: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>]>;
30
35
  /** Keep v1 artifact identity when assembling only legacy operations from registry rows. */
31
36
  declare function requiredArtifactIrVersion(operations: readonly unknown[]): z.infer<typeof irVersionSchema>;
32
37
  /** The exact claim keys the platform stamps — mirrors claims.ts. */
@@ -87,9 +92,11 @@ type PredIr = {
87
92
  | {
88
93
  kind: 'capability';
89
94
  key: string;
95
+ namespace?: string;
90
96
  } | {
91
97
  kind: 'role';
92
98
  key: string;
99
+ namespace?: string;
93
100
  }
94
101
  /** §4f: a client-supplied BoolExp variable lands here, validated + lowered at runtime. */
95
102
  | {
@@ -621,8 +628,8 @@ declare const variableIrSchema: z.ZodObject<{
621
628
  scalar: z.ZodEnum<{
622
629
  bigint: "bigint";
623
630
  boolean: "boolean";
624
- text: "text";
625
631
  date: "date";
632
+ text: "text";
626
633
  timestamptz: "timestamptz";
627
634
  jsonb: "jsonb";
628
635
  uuid: "uuid";
@@ -655,7 +662,47 @@ declare const variableIrSchema: z.ZodObject<{
655
662
  }, z.core.$strip>;
656
663
  type VariableIr = z.infer<typeof variableIrSchema>;
657
664
  declare const compiledOperationSchema: z.ZodObject<{
658
- irVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>;
665
+ language: z.ZodOptional<z.ZodLiteral<"sql">>;
666
+ sqlQuery: z.ZodOptional<z.ZodObject<{
667
+ catalog: z.ZodObject<{
668
+ identity: z.ZodString;
669
+ objects: z.ZodArray<z.ZodObject<{
670
+ ref: z.ZodString;
671
+ table: z.ZodString;
672
+ columns: z.ZodArray<z.ZodObject<{
673
+ name: z.ZodString;
674
+ nullable: z.ZodBoolean;
675
+ type: z.ZodString;
676
+ }, z.core.$strip>>;
677
+ scan: z.ZodString;
678
+ read: z.ZodArray<z.ZodString>;
679
+ }, z.core.$strict>>;
680
+ }, z.core.$strict>;
681
+ read: z.ZodArray<z.ZodString>;
682
+ maxRows: z.ZodNumber;
683
+ }, z.core.$strict>>;
684
+ sql: z.ZodOptional<z.ZodObject<{
685
+ text: z.ZodString;
686
+ columns: z.ZodArray<z.ZodObject<{
687
+ name: z.ZodString;
688
+ type: z.ZodEnum<{
689
+ bigint: "bigint";
690
+ boolean: "boolean";
691
+ date: "date";
692
+ text: "text";
693
+ timestamptz: "timestamptz";
694
+ uuid: "uuid";
695
+ integer: "integer";
696
+ numeric: "numeric";
697
+ double: "double";
698
+ }>;
699
+ nullable: z.ZodBoolean;
700
+ }, z.core.$strip>>;
701
+ parameters: z.ZodArray<z.ZodString>;
702
+ read: z.ZodArray<z.ZodString>;
703
+ maxRows: z.ZodNumber;
704
+ }, z.core.$strict>>;
705
+ irVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>]>;
659
706
  name: z.ZodString;
660
707
  opHash: z.ZodString;
661
708
  kind: z.ZodEnum<{
@@ -673,8 +720,8 @@ declare const compiledOperationSchema: z.ZodObject<{
673
720
  scalar: z.ZodEnum<{
674
721
  bigint: "bigint";
675
722
  boolean: "boolean";
676
- text: "text";
677
723
  date: "date";
724
+ text: "text";
678
725
  timestamptz: "timestamptz";
679
726
  jsonb: "jsonb";
680
727
  uuid: "uuid";
@@ -1156,6 +1203,23 @@ type ResolvedMetaIr = z.infer<typeof resolvedMetaIrSchema>;
1156
1203
  */
1157
1204
  declare const tableMetaIrSchema: z.ZodObject<{
1158
1205
  table: z.ZodString;
1206
+ namespace: z.ZodOptional<z.ZodString>;
1207
+ dependencies: z.ZodOptional<z.ZodArray<z.ZodString>>;
1208
+ foreignReferences: z.ZodOptional<z.ZodArray<z.ZodObject<{
1209
+ column: z.ZodString;
1210
+ target: z.ZodString;
1211
+ targetColumn: z.ZodString;
1212
+ }, z.core.$strip>>>;
1213
+ exportRead: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<true>, z.ZodObject<{
1214
+ capability: z.ZodString;
1215
+ }, z.core.$strip>, z.ZodObject<{
1216
+ role: z.ZodString;
1217
+ }, z.core.$strip>]>>;
1218
+ exportWrite: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<true>, z.ZodObject<{
1219
+ capability: z.ZodString;
1220
+ }, z.core.$strip>, z.ZodObject<{
1221
+ role: z.ZodString;
1222
+ }, z.core.$strip>]>>;
1159
1223
  schema: z.ZodString;
1160
1224
  typename: z.ZodString;
1161
1225
  claimsGated: z.ZodDefault<z.ZodBoolean>;
@@ -1165,8 +1229,8 @@ declare const tableMetaIrSchema: z.ZodObject<{
1165
1229
  type: z.ZodUnion<readonly [z.ZodEnum<{
1166
1230
  bigint: "bigint";
1167
1231
  boolean: "boolean";
1168
- text: "text";
1169
1232
  date: "date";
1233
+ text: "text";
1170
1234
  timestamptz: "timestamptz";
1171
1235
  jsonb: "jsonb";
1172
1236
  uuid: "uuid";
@@ -1263,12 +1327,33 @@ declare const tableMetaIrSchema: z.ZodObject<{
1263
1327
  }, z.core.$strip>;
1264
1328
  type TableMetaIr = z.infer<typeof tableMetaIrSchema>;
1265
1329
  declare const compiledArtifactSchema: z.ZodObject<{
1266
- irVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>;
1330
+ irVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>]>;
1267
1331
  namespace: z.ZodString;
1268
1332
  schemaHash: z.ZodString;
1333
+ ownSchemaHash: z.ZodOptional<z.ZodString>;
1334
+ dependencies: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1335
+ readPolicies: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<PredIr, unknown, z.core.$ZodTypeInternals<PredIr, unknown>>>>;
1269
1336
  opsHash: z.ZodString;
1337
+ unbackedTables: z.ZodOptional<z.ZodArray<z.ZodString>>;
1270
1338
  tables: z.ZodRecord<z.ZodString, z.ZodObject<{
1271
1339
  table: z.ZodString;
1340
+ namespace: z.ZodOptional<z.ZodString>;
1341
+ dependencies: z.ZodOptional<z.ZodArray<z.ZodString>>;
1342
+ foreignReferences: z.ZodOptional<z.ZodArray<z.ZodObject<{
1343
+ column: z.ZodString;
1344
+ target: z.ZodString;
1345
+ targetColumn: z.ZodString;
1346
+ }, z.core.$strip>>>;
1347
+ exportRead: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<true>, z.ZodObject<{
1348
+ capability: z.ZodString;
1349
+ }, z.core.$strip>, z.ZodObject<{
1350
+ role: z.ZodString;
1351
+ }, z.core.$strip>]>>;
1352
+ exportWrite: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<true>, z.ZodObject<{
1353
+ capability: z.ZodString;
1354
+ }, z.core.$strip>, z.ZodObject<{
1355
+ role: z.ZodString;
1356
+ }, z.core.$strip>]>>;
1272
1357
  schema: z.ZodString;
1273
1358
  typename: z.ZodString;
1274
1359
  claimsGated: z.ZodDefault<z.ZodBoolean>;
@@ -1278,8 +1363,8 @@ declare const compiledArtifactSchema: z.ZodObject<{
1278
1363
  type: z.ZodUnion<readonly [z.ZodEnum<{
1279
1364
  bigint: "bigint";
1280
1365
  boolean: "boolean";
1281
- text: "text";
1282
1366
  date: "date";
1367
+ text: "text";
1283
1368
  timestamptz: "timestamptz";
1284
1369
  jsonb: "jsonb";
1285
1370
  uuid: "uuid";
@@ -1375,7 +1460,47 @@ declare const compiledArtifactSchema: z.ZodObject<{
1375
1460
  dynamicFilterMaxNodes: z.ZodDefault<z.ZodNumber>;
1376
1461
  }, z.core.$strip>>;
1377
1462
  operations: z.ZodRecord<z.ZodString, z.ZodObject<{
1378
- irVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>;
1463
+ language: z.ZodOptional<z.ZodLiteral<"sql">>;
1464
+ sqlQuery: z.ZodOptional<z.ZodObject<{
1465
+ catalog: z.ZodObject<{
1466
+ identity: z.ZodString;
1467
+ objects: z.ZodArray<z.ZodObject<{
1468
+ ref: z.ZodString;
1469
+ table: z.ZodString;
1470
+ columns: z.ZodArray<z.ZodObject<{
1471
+ name: z.ZodString;
1472
+ nullable: z.ZodBoolean;
1473
+ type: z.ZodString;
1474
+ }, z.core.$strip>>;
1475
+ scan: z.ZodString;
1476
+ read: z.ZodArray<z.ZodString>;
1477
+ }, z.core.$strict>>;
1478
+ }, z.core.$strict>;
1479
+ read: z.ZodArray<z.ZodString>;
1480
+ maxRows: z.ZodNumber;
1481
+ }, z.core.$strict>>;
1482
+ sql: z.ZodOptional<z.ZodObject<{
1483
+ text: z.ZodString;
1484
+ columns: z.ZodArray<z.ZodObject<{
1485
+ name: z.ZodString;
1486
+ type: z.ZodEnum<{
1487
+ bigint: "bigint";
1488
+ boolean: "boolean";
1489
+ date: "date";
1490
+ text: "text";
1491
+ timestamptz: "timestamptz";
1492
+ uuid: "uuid";
1493
+ integer: "integer";
1494
+ numeric: "numeric";
1495
+ double: "double";
1496
+ }>;
1497
+ nullable: z.ZodBoolean;
1498
+ }, z.core.$strip>>;
1499
+ parameters: z.ZodArray<z.ZodString>;
1500
+ read: z.ZodArray<z.ZodString>;
1501
+ maxRows: z.ZodNumber;
1502
+ }, z.core.$strict>>;
1503
+ irVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>]>;
1379
1504
  name: z.ZodString;
1380
1505
  opHash: z.ZodString;
1381
1506
  kind: z.ZodEnum<{
@@ -1393,8 +1518,8 @@ declare const compiledArtifactSchema: z.ZodObject<{
1393
1518
  scalar: z.ZodEnum<{
1394
1519
  bigint: "bigint";
1395
1520
  boolean: "boolean";
1396
- text: "text";
1397
1521
  date: "date";
1522
+ text: "text";
1398
1523
  timestamptz: "timestamptz";
1399
1524
  jsonb: "jsonb";
1400
1525
  uuid: "uuid";
@@ -1790,4 +1915,4 @@ declare function normalizeIr(raw: unknown): CompiledArtifact;
1790
1915
  /** Index an artifact's operations by opHash (the wire selector). */
1791
1916
  declare function indexByHash(artifact: CompiledArtifact): Map<string, CompiledOperation>;
1792
1917
 
1793
- export { CLAIMS_CONTRACT, CMP_OPS, type CellSelectionIr, type ClaimKey, type CmpOp, type CompiledArtifact, type CompiledOperation, DATE_BUCKETS, type DateBucket, type GroupByKeyIr, INPUT_REF_KINDS, IR_VERSION, type InputRefKind, IrVersionError, LEGACY_IR_VERSION, type LimitIr, type OrderIr, type PredIr, type PrefetchPlanIr, type ResolvedMetaIr, type ResolvedSourceIr, type RootIr, type SelectionIr, type TableMetaIr, type ValueIr, type VariableDefaultIr, type VariableIr, compiledArtifactSchema, compiledOperationSchema, indexByHash, limitIrSchema, normalizeIr, orderIrSchema, predIrSchema, prefetchPlanIrSchema, requiredArtifactIrVersion, resolvedMetaIrSchema, resolvedSourceIrSchema, rootIrSchema, selectionIrSchema, tableMetaIrSchema, valueIrSchema, variableDefaultIrSchema, variableIrSchema };
1918
+ export { CLAIMS_CONTRACT, CMP_OPS, COMPOSED_IR_VERSION, type CellSelectionIr, type ClaimKey, type CmpOp, type CompiledArtifact, type CompiledOperation, DATE_BUCKETS, type DateBucket, GUARDED_IR_VERSION, type GroupByKeyIr, INPUT_REF_KINDS, IR_VERSION, type InputRefKind, IrVersionError, LEGACY_IR_VERSION, type LimitIr, type OrderIr, type PredIr, type PrefetchPlanIr, RUNTIME_SQL_IR_VERSION, type ResolvedMetaIr, type ResolvedSourceIr, type RootIr, SQL_IR_VERSION, type SelectionIr, type TableMetaIr, type ValueIr, type VariableDefaultIr, type VariableIr, compiledArtifactSchema, compiledOperationSchema, indexByHash, limitIrSchema, normalizeIr, orderIrSchema, predIrSchema, prefetchPlanIrSchema, requiredArtifactIrVersion, resolvedMetaIrSchema, resolvedSourceIrSchema, rootIrSchema, selectionIrSchema, tableMetaIrSchema, valueIrSchema, variableDefaultIrSchema, variableIrSchema };