@sequenceholdings/orm 2.1.1 → 2.3.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 +5876 -4198
  15. package/dist/cli.cjs.map +1 -1
  16. package/dist/cli.js +5876 -4198
  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 +1275 -264
  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 +1268 -265
  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 +1103 -322
  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 +1090 -323
  45. package/dist/index.js.map +1 -1
  46. package/dist/ir.cjs +93 -11
  47. package/dist/ir.cjs.map +1 -1
  48. package/dist/ir.d.cts +226 -15
  49. package/dist/ir.d.ts +226 -15
  50. package/dist/ir.js +88 -12
  51. package/dist/ir.js.map +1 -1
  52. package/dist/predicate-v2.cjs +116 -10
  53. package/dist/predicate-v2.cjs.map +1 -1
  54. package/dist/predicate-v2.d.cts +11 -3
  55. package/dist/predicate-v2.d.ts +11 -3
  56. package/dist/predicate-v2.js +116 -10
  57. package/dist/predicate-v2.js.map +1 -1
  58. package/dist/sdl.cjs +158 -22
  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 +158 -22
  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.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,20 +23,39 @@ 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
- /** The exact claim keys the platform stamps — mirrors claims.ts. */
37
+ /**
38
+ * The exact claim keys the platform stamps — mirrors claims.ts.
39
+ *
40
+ * `ext_subject` and `ext_email` are verified-borrower claims: the subject and
41
+ * (verified, lowercased) email of an external principal that reached the ORM
42
+ * through an Artifact Next ingress. Only an embedding host's in-process
43
+ * delegated credential carries them — never a bearer, data token or header —
44
+ * and every other caller has them absent, which matches no row.
45
+ */
33
46
  declare const CLAIMS_CONTRACT: {
34
47
  readonly sub: "string";
35
48
  readonly org: "string?";
49
+ readonly ext_subject: "string?";
50
+ readonly ext_email: "string?";
36
51
  readonly roles: "string[]";
37
52
  readonly capabilities: "string[]";
38
53
  };
39
- type ClaimKey = 'sub' | 'org';
54
+ /** Verified-borrower claim keys; text-typed, compared to text columns with = only. */
55
+ declare const EXTERNAL_POLICY_CLAIM_KEYS: readonly ["ext_subject", "ext_email"];
56
+ type ExternalPolicyClaimKey = (typeof EXTERNAL_POLICY_CLAIM_KEYS)[number];
57
+ type ClaimKey = 'sub' | 'org' | ExternalPolicyClaimKey;
58
+ declare function isExternalPolicyClaimKey(key: string): key is ExternalPolicyClaimKey;
40
59
  declare const valueIrSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
41
60
  kind: z.ZodLiteral<"literal">;
42
61
  value: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>]>;
@@ -47,6 +66,8 @@ declare const valueIrSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
47
66
  kind: z.ZodLiteral<"claim">;
48
67
  key: z.ZodEnum<{
49
68
  sub: "sub";
69
+ ext_subject: "ext_subject";
70
+ ext_email: "ext_email";
50
71
  org: "org";
51
72
  }>;
52
73
  }, z.core.$strip>], "kind">;
@@ -87,9 +108,11 @@ type PredIr = {
87
108
  | {
88
109
  kind: 'capability';
89
110
  key: string;
111
+ namespace?: string;
90
112
  } | {
91
113
  kind: 'role';
92
114
  key: string;
115
+ namespace?: string;
93
116
  }
94
117
  /** §4f: a client-supplied BoolExp variable lands here, validated + lowered at runtime. */
95
118
  | {
@@ -206,6 +229,8 @@ declare const prefetchPlanIrSchema: z.ZodObject<{
206
229
  kind: z.ZodLiteral<"claim">;
207
230
  key: z.ZodEnum<{
208
231
  sub: "sub";
232
+ ext_subject: "ext_subject";
233
+ ext_email: "ext_email";
209
234
  org: "org";
210
235
  }>;
211
236
  }, z.core.$strip>], "kind">;
@@ -220,6 +245,8 @@ declare const prefetchPlanIrSchema: z.ZodObject<{
220
245
  kind: z.ZodLiteral<"claim">;
221
246
  key: z.ZodEnum<{
222
247
  sub: "sub";
248
+ ext_subject: "ext_subject";
249
+ ext_email: "ext_email";
223
250
  org: "org";
224
251
  }>;
225
252
  }, z.core.$strip>], "kind">;
@@ -305,6 +332,8 @@ declare const rootIrSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
305
332
  kind: z.ZodLiteral<"claim">;
306
333
  key: z.ZodEnum<{
307
334
  sub: "sub";
335
+ ext_subject: "ext_subject";
336
+ ext_email: "ext_email";
308
337
  org: "org";
309
338
  }>;
310
339
  }, z.core.$strip>], "kind">;
@@ -319,6 +348,8 @@ declare const rootIrSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
319
348
  kind: z.ZodLiteral<"claim">;
320
349
  key: z.ZodEnum<{
321
350
  sub: "sub";
351
+ ext_subject: "ext_subject";
352
+ ext_email: "ext_email";
322
353
  org: "org";
323
354
  }>;
324
355
  }, z.core.$strip>], "kind">;
@@ -341,6 +372,8 @@ declare const rootIrSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
341
372
  kind: z.ZodLiteral<"claim">;
342
373
  key: z.ZodEnum<{
343
374
  sub: "sub";
375
+ ext_subject: "ext_subject";
376
+ ext_email: "ext_email";
344
377
  org: "org";
345
378
  }>;
346
379
  }, z.core.$strip>], "kind">;
@@ -364,6 +397,8 @@ declare const rootIrSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
364
397
  kind: z.ZodLiteral<"claim">;
365
398
  key: z.ZodEnum<{
366
399
  sub: "sub";
400
+ ext_subject: "ext_subject";
401
+ ext_email: "ext_email";
367
402
  org: "org";
368
403
  }>;
369
404
  }, z.core.$strip>], "kind">;
@@ -378,6 +413,8 @@ declare const rootIrSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
378
413
  kind: z.ZodLiteral<"claim">;
379
414
  key: z.ZodEnum<{
380
415
  sub: "sub";
416
+ ext_subject: "ext_subject";
417
+ ext_email: "ext_email";
381
418
  org: "org";
382
419
  }>;
383
420
  }, z.core.$strip>], "kind">;
@@ -487,6 +524,8 @@ declare const rootIrSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
487
524
  kind: z.ZodLiteral<"claim">;
488
525
  key: z.ZodEnum<{
489
526
  sub: "sub";
527
+ ext_subject: "ext_subject";
528
+ ext_email: "ext_email";
490
529
  org: "org";
491
530
  }>;
492
531
  }, z.core.$strip>], "kind">;
@@ -504,6 +543,8 @@ declare const rootIrSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
504
543
  kind: z.ZodLiteral<"claim">;
505
544
  key: z.ZodEnum<{
506
545
  sub: "sub";
546
+ ext_subject: "ext_subject";
547
+ ext_email: "ext_email";
507
548
  org: "org";
508
549
  }>;
509
550
  }, z.core.$strip>], "kind">;
@@ -529,6 +570,8 @@ declare const rootIrSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
529
570
  kind: z.ZodLiteral<"claim">;
530
571
  key: z.ZodEnum<{
531
572
  sub: "sub";
573
+ ext_subject: "ext_subject";
574
+ ext_email: "ext_email";
532
575
  org: "org";
533
576
  }>;
534
577
  }, z.core.$strip>], "kind">;
@@ -549,6 +592,8 @@ declare const rootIrSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
549
592
  kind: z.ZodLiteral<"claim">;
550
593
  key: z.ZodEnum<{
551
594
  sub: "sub";
595
+ ext_subject: "ext_subject";
596
+ ext_email: "ext_email";
552
597
  org: "org";
553
598
  }>;
554
599
  }, z.core.$strip>], "kind">;
@@ -569,6 +614,8 @@ declare const rootIrSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
569
614
  kind: z.ZodLiteral<"claim">;
570
615
  key: z.ZodEnum<{
571
616
  sub: "sub";
617
+ ext_subject: "ext_subject";
618
+ ext_email: "ext_email";
572
619
  org: "org";
573
620
  }>;
574
621
  }, z.core.$strip>], "kind">;
@@ -587,6 +634,8 @@ declare const rootIrSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
587
634
  kind: z.ZodLiteral<"claim">;
588
635
  key: z.ZodEnum<{
589
636
  sub: "sub";
637
+ ext_subject: "ext_subject";
638
+ ext_email: "ext_email";
590
639
  org: "org";
591
640
  }>;
592
641
  }, z.core.$strip>], "kind">;
@@ -621,8 +670,8 @@ declare const variableIrSchema: z.ZodObject<{
621
670
  scalar: z.ZodEnum<{
622
671
  bigint: "bigint";
623
672
  boolean: "boolean";
624
- text: "text";
625
673
  date: "date";
674
+ text: "text";
626
675
  timestamptz: "timestamptz";
627
676
  jsonb: "jsonb";
628
677
  uuid: "uuid";
@@ -655,7 +704,47 @@ declare const variableIrSchema: z.ZodObject<{
655
704
  }, z.core.$strip>;
656
705
  type VariableIr = z.infer<typeof variableIrSchema>;
657
706
  declare const compiledOperationSchema: z.ZodObject<{
658
- irVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>;
707
+ language: z.ZodOptional<z.ZodLiteral<"sql">>;
708
+ sqlQuery: z.ZodOptional<z.ZodObject<{
709
+ catalog: z.ZodObject<{
710
+ identity: z.ZodString;
711
+ objects: z.ZodArray<z.ZodObject<{
712
+ ref: z.ZodString;
713
+ table: z.ZodString;
714
+ columns: z.ZodArray<z.ZodObject<{
715
+ name: z.ZodString;
716
+ nullable: z.ZodBoolean;
717
+ type: z.ZodString;
718
+ }, z.core.$strip>>;
719
+ scan: z.ZodString;
720
+ read: z.ZodArray<z.ZodString>;
721
+ }, z.core.$strict>>;
722
+ }, z.core.$strict>;
723
+ read: z.ZodArray<z.ZodString>;
724
+ maxRows: z.ZodNumber;
725
+ }, z.core.$strict>>;
726
+ sql: z.ZodOptional<z.ZodObject<{
727
+ text: z.ZodString;
728
+ columns: z.ZodArray<z.ZodObject<{
729
+ name: z.ZodString;
730
+ type: z.ZodEnum<{
731
+ bigint: "bigint";
732
+ boolean: "boolean";
733
+ date: "date";
734
+ text: "text";
735
+ timestamptz: "timestamptz";
736
+ uuid: "uuid";
737
+ integer: "integer";
738
+ numeric: "numeric";
739
+ double: "double";
740
+ }>;
741
+ nullable: z.ZodBoolean;
742
+ }, z.core.$strip>>;
743
+ parameters: z.ZodArray<z.ZodString>;
744
+ read: z.ZodArray<z.ZodString>;
745
+ maxRows: z.ZodNumber;
746
+ }, z.core.$strict>>;
747
+ irVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>]>;
659
748
  name: z.ZodString;
660
749
  opHash: z.ZodString;
661
750
  kind: z.ZodEnum<{
@@ -673,8 +762,8 @@ declare const compiledOperationSchema: z.ZodObject<{
673
762
  scalar: z.ZodEnum<{
674
763
  bigint: "bigint";
675
764
  boolean: "boolean";
676
- text: "text";
677
765
  date: "date";
766
+ text: "text";
678
767
  timestamptz: "timestamptz";
679
768
  jsonb: "jsonb";
680
769
  uuid: "uuid";
@@ -759,6 +848,8 @@ declare const compiledOperationSchema: z.ZodObject<{
759
848
  kind: z.ZodLiteral<"claim">;
760
849
  key: z.ZodEnum<{
761
850
  sub: "sub";
851
+ ext_subject: "ext_subject";
852
+ ext_email: "ext_email";
762
853
  org: "org";
763
854
  }>;
764
855
  }, z.core.$strip>], "kind">;
@@ -773,6 +864,8 @@ declare const compiledOperationSchema: z.ZodObject<{
773
864
  kind: z.ZodLiteral<"claim">;
774
865
  key: z.ZodEnum<{
775
866
  sub: "sub";
867
+ ext_subject: "ext_subject";
868
+ ext_email: "ext_email";
776
869
  org: "org";
777
870
  }>;
778
871
  }, z.core.$strip>], "kind">;
@@ -795,6 +888,8 @@ declare const compiledOperationSchema: z.ZodObject<{
795
888
  kind: z.ZodLiteral<"claim">;
796
889
  key: z.ZodEnum<{
797
890
  sub: "sub";
891
+ ext_subject: "ext_subject";
892
+ ext_email: "ext_email";
798
893
  org: "org";
799
894
  }>;
800
895
  }, z.core.$strip>], "kind">;
@@ -818,6 +913,8 @@ declare const compiledOperationSchema: z.ZodObject<{
818
913
  kind: z.ZodLiteral<"claim">;
819
914
  key: z.ZodEnum<{
820
915
  sub: "sub";
916
+ ext_subject: "ext_subject";
917
+ ext_email: "ext_email";
821
918
  org: "org";
822
919
  }>;
823
920
  }, z.core.$strip>], "kind">;
@@ -832,6 +929,8 @@ declare const compiledOperationSchema: z.ZodObject<{
832
929
  kind: z.ZodLiteral<"claim">;
833
930
  key: z.ZodEnum<{
834
931
  sub: "sub";
932
+ ext_subject: "ext_subject";
933
+ ext_email: "ext_email";
835
934
  org: "org";
836
935
  }>;
837
936
  }, z.core.$strip>], "kind">;
@@ -941,6 +1040,8 @@ declare const compiledOperationSchema: z.ZodObject<{
941
1040
  kind: z.ZodLiteral<"claim">;
942
1041
  key: z.ZodEnum<{
943
1042
  sub: "sub";
1043
+ ext_subject: "ext_subject";
1044
+ ext_email: "ext_email";
944
1045
  org: "org";
945
1046
  }>;
946
1047
  }, z.core.$strip>], "kind">;
@@ -958,6 +1059,8 @@ declare const compiledOperationSchema: z.ZodObject<{
958
1059
  kind: z.ZodLiteral<"claim">;
959
1060
  key: z.ZodEnum<{
960
1061
  sub: "sub";
1062
+ ext_subject: "ext_subject";
1063
+ ext_email: "ext_email";
961
1064
  org: "org";
962
1065
  }>;
963
1066
  }, z.core.$strip>], "kind">;
@@ -983,6 +1086,8 @@ declare const compiledOperationSchema: z.ZodObject<{
983
1086
  kind: z.ZodLiteral<"claim">;
984
1087
  key: z.ZodEnum<{
985
1088
  sub: "sub";
1089
+ ext_subject: "ext_subject";
1090
+ ext_email: "ext_email";
986
1091
  org: "org";
987
1092
  }>;
988
1093
  }, z.core.$strip>], "kind">;
@@ -1003,6 +1108,8 @@ declare const compiledOperationSchema: z.ZodObject<{
1003
1108
  kind: z.ZodLiteral<"claim">;
1004
1109
  key: z.ZodEnum<{
1005
1110
  sub: "sub";
1111
+ ext_subject: "ext_subject";
1112
+ ext_email: "ext_email";
1006
1113
  org: "org";
1007
1114
  }>;
1008
1115
  }, z.core.$strip>], "kind">;
@@ -1023,6 +1130,8 @@ declare const compiledOperationSchema: z.ZodObject<{
1023
1130
  kind: z.ZodLiteral<"claim">;
1024
1131
  key: z.ZodEnum<{
1025
1132
  sub: "sub";
1133
+ ext_subject: "ext_subject";
1134
+ ext_email: "ext_email";
1026
1135
  org: "org";
1027
1136
  }>;
1028
1137
  }, z.core.$strip>], "kind">;
@@ -1041,6 +1150,8 @@ declare const compiledOperationSchema: z.ZodObject<{
1041
1150
  kind: z.ZodLiteral<"claim">;
1042
1151
  key: z.ZodEnum<{
1043
1152
  sub: "sub";
1153
+ ext_subject: "ext_subject";
1154
+ ext_email: "ext_email";
1044
1155
  org: "org";
1045
1156
  }>;
1046
1157
  }, z.core.$strip>], "kind">;
@@ -1156,6 +1267,23 @@ type ResolvedMetaIr = z.infer<typeof resolvedMetaIrSchema>;
1156
1267
  */
1157
1268
  declare const tableMetaIrSchema: z.ZodObject<{
1158
1269
  table: z.ZodString;
1270
+ namespace: z.ZodOptional<z.ZodString>;
1271
+ dependencies: z.ZodOptional<z.ZodArray<z.ZodString>>;
1272
+ foreignReferences: z.ZodOptional<z.ZodArray<z.ZodObject<{
1273
+ column: z.ZodString;
1274
+ target: z.ZodString;
1275
+ targetColumn: z.ZodString;
1276
+ }, z.core.$strip>>>;
1277
+ exportRead: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<true>, z.ZodObject<{
1278
+ capability: z.ZodString;
1279
+ }, z.core.$strip>, z.ZodObject<{
1280
+ role: z.ZodString;
1281
+ }, z.core.$strip>]>>;
1282
+ exportWrite: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<true>, z.ZodObject<{
1283
+ capability: z.ZodString;
1284
+ }, z.core.$strip>, z.ZodObject<{
1285
+ role: z.ZodString;
1286
+ }, z.core.$strip>]>>;
1159
1287
  schema: z.ZodString;
1160
1288
  typename: z.ZodString;
1161
1289
  claimsGated: z.ZodDefault<z.ZodBoolean>;
@@ -1165,8 +1293,8 @@ declare const tableMetaIrSchema: z.ZodObject<{
1165
1293
  type: z.ZodUnion<readonly [z.ZodEnum<{
1166
1294
  bigint: "bigint";
1167
1295
  boolean: "boolean";
1168
- text: "text";
1169
1296
  date: "date";
1297
+ text: "text";
1170
1298
  timestamptz: "timestamptz";
1171
1299
  jsonb: "jsonb";
1172
1300
  uuid: "uuid";
@@ -1263,12 +1391,33 @@ declare const tableMetaIrSchema: z.ZodObject<{
1263
1391
  }, z.core.$strip>;
1264
1392
  type TableMetaIr = z.infer<typeof tableMetaIrSchema>;
1265
1393
  declare const compiledArtifactSchema: z.ZodObject<{
1266
- irVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>;
1394
+ irVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>]>;
1267
1395
  namespace: z.ZodString;
1268
1396
  schemaHash: z.ZodString;
1397
+ ownSchemaHash: z.ZodOptional<z.ZodString>;
1398
+ dependencies: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1399
+ readPolicies: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<PredIr, unknown, z.core.$ZodTypeInternals<PredIr, unknown>>>>;
1269
1400
  opsHash: z.ZodString;
1401
+ unbackedTables: z.ZodOptional<z.ZodArray<z.ZodString>>;
1270
1402
  tables: z.ZodRecord<z.ZodString, z.ZodObject<{
1271
1403
  table: z.ZodString;
1404
+ namespace: z.ZodOptional<z.ZodString>;
1405
+ dependencies: z.ZodOptional<z.ZodArray<z.ZodString>>;
1406
+ foreignReferences: z.ZodOptional<z.ZodArray<z.ZodObject<{
1407
+ column: z.ZodString;
1408
+ target: z.ZodString;
1409
+ targetColumn: z.ZodString;
1410
+ }, z.core.$strip>>>;
1411
+ exportRead: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<true>, z.ZodObject<{
1412
+ capability: z.ZodString;
1413
+ }, z.core.$strip>, z.ZodObject<{
1414
+ role: z.ZodString;
1415
+ }, z.core.$strip>]>>;
1416
+ exportWrite: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<true>, z.ZodObject<{
1417
+ capability: z.ZodString;
1418
+ }, z.core.$strip>, z.ZodObject<{
1419
+ role: z.ZodString;
1420
+ }, z.core.$strip>]>>;
1272
1421
  schema: z.ZodString;
1273
1422
  typename: z.ZodString;
1274
1423
  claimsGated: z.ZodDefault<z.ZodBoolean>;
@@ -1278,8 +1427,8 @@ declare const compiledArtifactSchema: z.ZodObject<{
1278
1427
  type: z.ZodUnion<readonly [z.ZodEnum<{
1279
1428
  bigint: "bigint";
1280
1429
  boolean: "boolean";
1281
- text: "text";
1282
1430
  date: "date";
1431
+ text: "text";
1283
1432
  timestamptz: "timestamptz";
1284
1433
  jsonb: "jsonb";
1285
1434
  uuid: "uuid";
@@ -1375,7 +1524,47 @@ declare const compiledArtifactSchema: z.ZodObject<{
1375
1524
  dynamicFilterMaxNodes: z.ZodDefault<z.ZodNumber>;
1376
1525
  }, z.core.$strip>>;
1377
1526
  operations: z.ZodRecord<z.ZodString, z.ZodObject<{
1378
- irVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>;
1527
+ language: z.ZodOptional<z.ZodLiteral<"sql">>;
1528
+ sqlQuery: z.ZodOptional<z.ZodObject<{
1529
+ catalog: z.ZodObject<{
1530
+ identity: z.ZodString;
1531
+ objects: z.ZodArray<z.ZodObject<{
1532
+ ref: z.ZodString;
1533
+ table: z.ZodString;
1534
+ columns: z.ZodArray<z.ZodObject<{
1535
+ name: z.ZodString;
1536
+ nullable: z.ZodBoolean;
1537
+ type: z.ZodString;
1538
+ }, z.core.$strip>>;
1539
+ scan: z.ZodString;
1540
+ read: z.ZodArray<z.ZodString>;
1541
+ }, z.core.$strict>>;
1542
+ }, z.core.$strict>;
1543
+ read: z.ZodArray<z.ZodString>;
1544
+ maxRows: z.ZodNumber;
1545
+ }, z.core.$strict>>;
1546
+ sql: z.ZodOptional<z.ZodObject<{
1547
+ text: z.ZodString;
1548
+ columns: z.ZodArray<z.ZodObject<{
1549
+ name: z.ZodString;
1550
+ type: z.ZodEnum<{
1551
+ bigint: "bigint";
1552
+ boolean: "boolean";
1553
+ date: "date";
1554
+ text: "text";
1555
+ timestamptz: "timestamptz";
1556
+ uuid: "uuid";
1557
+ integer: "integer";
1558
+ numeric: "numeric";
1559
+ double: "double";
1560
+ }>;
1561
+ nullable: z.ZodBoolean;
1562
+ }, z.core.$strip>>;
1563
+ parameters: z.ZodArray<z.ZodString>;
1564
+ read: z.ZodArray<z.ZodString>;
1565
+ maxRows: z.ZodNumber;
1566
+ }, z.core.$strict>>;
1567
+ irVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>]>;
1379
1568
  name: z.ZodString;
1380
1569
  opHash: z.ZodString;
1381
1570
  kind: z.ZodEnum<{
@@ -1393,8 +1582,8 @@ declare const compiledArtifactSchema: z.ZodObject<{
1393
1582
  scalar: z.ZodEnum<{
1394
1583
  bigint: "bigint";
1395
1584
  boolean: "boolean";
1396
- text: "text";
1397
1585
  date: "date";
1586
+ text: "text";
1398
1587
  timestamptz: "timestamptz";
1399
1588
  jsonb: "jsonb";
1400
1589
  uuid: "uuid";
@@ -1479,6 +1668,8 @@ declare const compiledArtifactSchema: z.ZodObject<{
1479
1668
  kind: z.ZodLiteral<"claim">;
1480
1669
  key: z.ZodEnum<{
1481
1670
  sub: "sub";
1671
+ ext_subject: "ext_subject";
1672
+ ext_email: "ext_email";
1482
1673
  org: "org";
1483
1674
  }>;
1484
1675
  }, z.core.$strip>], "kind">;
@@ -1493,6 +1684,8 @@ declare const compiledArtifactSchema: z.ZodObject<{
1493
1684
  kind: z.ZodLiteral<"claim">;
1494
1685
  key: z.ZodEnum<{
1495
1686
  sub: "sub";
1687
+ ext_subject: "ext_subject";
1688
+ ext_email: "ext_email";
1496
1689
  org: "org";
1497
1690
  }>;
1498
1691
  }, z.core.$strip>], "kind">;
@@ -1515,6 +1708,8 @@ declare const compiledArtifactSchema: z.ZodObject<{
1515
1708
  kind: z.ZodLiteral<"claim">;
1516
1709
  key: z.ZodEnum<{
1517
1710
  sub: "sub";
1711
+ ext_subject: "ext_subject";
1712
+ ext_email: "ext_email";
1518
1713
  org: "org";
1519
1714
  }>;
1520
1715
  }, z.core.$strip>], "kind">;
@@ -1538,6 +1733,8 @@ declare const compiledArtifactSchema: z.ZodObject<{
1538
1733
  kind: z.ZodLiteral<"claim">;
1539
1734
  key: z.ZodEnum<{
1540
1735
  sub: "sub";
1736
+ ext_subject: "ext_subject";
1737
+ ext_email: "ext_email";
1541
1738
  org: "org";
1542
1739
  }>;
1543
1740
  }, z.core.$strip>], "kind">;
@@ -1552,6 +1749,8 @@ declare const compiledArtifactSchema: z.ZodObject<{
1552
1749
  kind: z.ZodLiteral<"claim">;
1553
1750
  key: z.ZodEnum<{
1554
1751
  sub: "sub";
1752
+ ext_subject: "ext_subject";
1753
+ ext_email: "ext_email";
1555
1754
  org: "org";
1556
1755
  }>;
1557
1756
  }, z.core.$strip>], "kind">;
@@ -1661,6 +1860,8 @@ declare const compiledArtifactSchema: z.ZodObject<{
1661
1860
  kind: z.ZodLiteral<"claim">;
1662
1861
  key: z.ZodEnum<{
1663
1862
  sub: "sub";
1863
+ ext_subject: "ext_subject";
1864
+ ext_email: "ext_email";
1664
1865
  org: "org";
1665
1866
  }>;
1666
1867
  }, z.core.$strip>], "kind">;
@@ -1678,6 +1879,8 @@ declare const compiledArtifactSchema: z.ZodObject<{
1678
1879
  kind: z.ZodLiteral<"claim">;
1679
1880
  key: z.ZodEnum<{
1680
1881
  sub: "sub";
1882
+ ext_subject: "ext_subject";
1883
+ ext_email: "ext_email";
1681
1884
  org: "org";
1682
1885
  }>;
1683
1886
  }, z.core.$strip>], "kind">;
@@ -1703,6 +1906,8 @@ declare const compiledArtifactSchema: z.ZodObject<{
1703
1906
  kind: z.ZodLiteral<"claim">;
1704
1907
  key: z.ZodEnum<{
1705
1908
  sub: "sub";
1909
+ ext_subject: "ext_subject";
1910
+ ext_email: "ext_email";
1706
1911
  org: "org";
1707
1912
  }>;
1708
1913
  }, z.core.$strip>], "kind">;
@@ -1723,6 +1928,8 @@ declare const compiledArtifactSchema: z.ZodObject<{
1723
1928
  kind: z.ZodLiteral<"claim">;
1724
1929
  key: z.ZodEnum<{
1725
1930
  sub: "sub";
1931
+ ext_subject: "ext_subject";
1932
+ ext_email: "ext_email";
1726
1933
  org: "org";
1727
1934
  }>;
1728
1935
  }, z.core.$strip>], "kind">;
@@ -1743,6 +1950,8 @@ declare const compiledArtifactSchema: z.ZodObject<{
1743
1950
  kind: z.ZodLiteral<"claim">;
1744
1951
  key: z.ZodEnum<{
1745
1952
  sub: "sub";
1953
+ ext_subject: "ext_subject";
1954
+ ext_email: "ext_email";
1746
1955
  org: "org";
1747
1956
  }>;
1748
1957
  }, z.core.$strip>], "kind">;
@@ -1761,6 +1970,8 @@ declare const compiledArtifactSchema: z.ZodObject<{
1761
1970
  kind: z.ZodLiteral<"claim">;
1762
1971
  key: z.ZodEnum<{
1763
1972
  sub: "sub";
1973
+ ext_subject: "ext_subject";
1974
+ ext_email: "ext_email";
1764
1975
  org: "org";
1765
1976
  }>;
1766
1977
  }, z.core.$strip>], "kind">;
@@ -1790,4 +2001,4 @@ declare function normalizeIr(raw: unknown): CompiledArtifact;
1790
2001
  /** Index an artifact's operations by opHash (the wire selector). */
1791
2002
  declare function indexByHash(artifact: CompiledArtifact): Map<string, CompiledOperation>;
1792
2003
 
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 };
2004
+ export { CLAIMS_CONTRACT, CMP_OPS, COMPOSED_IR_VERSION, type CellSelectionIr, type ClaimKey, type CmpOp, type CompiledArtifact, type CompiledOperation, DATE_BUCKETS, type DateBucket, EXTERNAL_POLICY_CLAIM_KEYS, type ExternalPolicyClaimKey, 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, isExternalPolicyClaimKey, limitIrSchema, normalizeIr, orderIrSchema, predIrSchema, prefetchPlanIrSchema, requiredArtifactIrVersion, resolvedMetaIrSchema, resolvedSourceIrSchema, rootIrSchema, selectionIrSchema, tableMetaIrSchema, valueIrSchema, variableDefaultIrSchema, variableIrSchema };