@sequenceholdings/orm 2.8.1 → 2.8.2

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.
@@ -102,8 +102,8 @@ type CanonicalFetchShape = z.infer<typeof canonicalFetchShapeSchema>;
102
102
  declare const canonicalResolvedSourceSchema: z.ZodObject<{
103
103
  name: z.ZodString;
104
104
  kind: z.ZodEnum<{
105
- prefetch: "prefetch";
106
105
  manual: "manual";
106
+ prefetch: "prefetch";
107
107
  etl: "etl";
108
108
  }>;
109
109
  table: z.ZodString;
@@ -160,8 +160,8 @@ declare const canonicalResolvedSchema: z.ZodObject<{
160
160
  sources: z.ZodArray<z.ZodObject<{
161
161
  name: z.ZodString;
162
162
  kind: z.ZodEnum<{
163
- prefetch: "prefetch";
164
163
  manual: "manual";
164
+ prefetch: "prefetch";
165
165
  etl: "etl";
166
166
  }>;
167
167
  table: z.ZodString;
@@ -325,13 +325,13 @@ declare const canonicalColumnSchema: z.ZodObject<{
325
325
  bigint: "bigint";
326
326
  boolean: "boolean";
327
327
  date: "date";
328
- uuid: "uuid";
329
328
  text: "text";
329
+ timestamptz: "timestamptz";
330
+ jsonb: "jsonb";
331
+ uuid: "uuid";
330
332
  integer: "integer";
331
333
  numeric: "numeric";
332
334
  double: "double";
333
- timestamptz: "timestamptz";
334
- jsonb: "jsonb";
335
335
  }>, z.ZodObject<{
336
336
  enum: z.ZodString;
337
337
  }, z.core.$strip>]>;
@@ -353,10 +353,10 @@ declare const canonicalColumnSchema: z.ZodObject<{
353
353
  of: z.ZodString;
354
354
  part: z.ZodEnum<{
355
355
  at: "at";
356
- source: "source";
357
356
  by: "by";
358
- conflicts: "conflicts";
359
357
  rev: "rev";
358
+ source: "source";
359
+ conflicts: "conflicts";
360
360
  }>;
361
361
  }, z.core.$strict>>;
362
362
  }, z.core.$strip>;
@@ -460,21 +460,21 @@ declare const canonicalActionSchema: z.ZodObject<{
460
460
  bigint: "bigint";
461
461
  boolean: "boolean";
462
462
  date: "date";
463
- uuid: "uuid";
464
463
  text: "text";
464
+ timestamptz: "timestamptz";
465
+ jsonb: "jsonb";
466
+ uuid: "uuid";
465
467
  integer: "integer";
466
468
  numeric: "numeric";
467
469
  double: "double";
468
- timestamptz: "timestamptz";
469
- jsonb: "jsonb";
470
470
  }>;
471
471
  nullable: z.ZodDefault<z.ZodBoolean>;
472
472
  }, z.core.$strip>>>;
473
473
  executes: z.ZodString;
474
474
  returns: z.ZodDefault<z.ZodEnum<{
475
475
  rows: "rows";
476
- scalar: "scalar";
477
476
  rowsAffected: "rowsAffected";
477
+ scalar: "scalar";
478
478
  }>>;
479
479
  audit: z.ZodOptional<z.ZodObject<{
480
480
  action: z.ZodString;
@@ -540,13 +540,13 @@ declare const canonicalTableSchema: z.ZodObject<{
540
540
  bigint: "bigint";
541
541
  boolean: "boolean";
542
542
  date: "date";
543
- uuid: "uuid";
544
543
  text: "text";
544
+ timestamptz: "timestamptz";
545
+ jsonb: "jsonb";
546
+ uuid: "uuid";
545
547
  integer: "integer";
546
548
  numeric: "numeric";
547
549
  double: "double";
548
- timestamptz: "timestamptz";
549
- jsonb: "jsonb";
550
550
  }>, z.ZodObject<{
551
551
  enum: z.ZodString;
552
552
  }, z.core.$strip>]>;
@@ -568,10 +568,10 @@ declare const canonicalTableSchema: z.ZodObject<{
568
568
  of: z.ZodString;
569
569
  part: z.ZodEnum<{
570
570
  at: "at";
571
- source: "source";
572
571
  by: "by";
573
- conflicts: "conflicts";
574
572
  rev: "rev";
573
+ source: "source";
574
+ conflicts: "conflicts";
575
575
  }>;
576
576
  }, z.core.$strict>>;
577
577
  }, z.core.$strip>>>;
@@ -655,21 +655,21 @@ declare const canonicalTableSchema: z.ZodObject<{
655
655
  bigint: "bigint";
656
656
  boolean: "boolean";
657
657
  date: "date";
658
- uuid: "uuid";
659
658
  text: "text";
659
+ timestamptz: "timestamptz";
660
+ jsonb: "jsonb";
661
+ uuid: "uuid";
660
662
  integer: "integer";
661
663
  numeric: "numeric";
662
664
  double: "double";
663
- timestamptz: "timestamptz";
664
- jsonb: "jsonb";
665
665
  }>;
666
666
  nullable: z.ZodDefault<z.ZodBoolean>;
667
667
  }, z.core.$strip>>>;
668
668
  executes: z.ZodString;
669
669
  returns: z.ZodDefault<z.ZodEnum<{
670
670
  rows: "rows";
671
- scalar: "scalar";
672
671
  rowsAffected: "rowsAffected";
672
+ scalar: "scalar";
673
673
  }>>;
674
674
  audit: z.ZodOptional<z.ZodObject<{
675
675
  action: z.ZodString;
@@ -726,13 +726,13 @@ declare const canonicalViewSchema: z.ZodObject<{
726
726
  bigint: "bigint";
727
727
  boolean: "boolean";
728
728
  date: "date";
729
- uuid: "uuid";
730
729
  text: "text";
730
+ timestamptz: "timestamptz";
731
+ jsonb: "jsonb";
732
+ uuid: "uuid";
731
733
  integer: "integer";
732
734
  numeric: "numeric";
733
735
  double: "double";
734
- timestamptz: "timestamptz";
735
- jsonb: "jsonb";
736
736
  }>, z.ZodObject<{
737
737
  enum: z.ZodString;
738
738
  }, z.core.$strip>]>;
@@ -754,10 +754,10 @@ declare const canonicalViewSchema: z.ZodObject<{
754
754
  of: z.ZodString;
755
755
  part: z.ZodEnum<{
756
756
  at: "at";
757
- source: "source";
758
757
  by: "by";
759
- conflicts: "conflicts";
760
758
  rev: "rev";
759
+ source: "source";
760
+ conflicts: "conflicts";
761
761
  }>;
762
762
  }, z.core.$strict>>;
763
763
  }, z.core.$strip>>;
@@ -806,8 +806,8 @@ declare const canonicalViewSchema: z.ZodObject<{
806
806
  sources: z.ZodArray<z.ZodObject<{
807
807
  name: z.ZodString;
808
808
  kind: z.ZodEnum<{
809
- prefetch: "prefetch";
810
809
  manual: "manual";
810
+ prefetch: "prefetch";
811
811
  etl: "etl";
812
812
  }>;
813
813
  table: z.ZodString;
@@ -947,13 +947,13 @@ declare const localDefinitionSchema: z.ZodObject<{
947
947
  bigint: "bigint";
948
948
  boolean: "boolean";
949
949
  date: "date";
950
- uuid: "uuid";
951
950
  text: "text";
951
+ timestamptz: "timestamptz";
952
+ jsonb: "jsonb";
953
+ uuid: "uuid";
952
954
  integer: "integer";
953
955
  numeric: "numeric";
954
956
  double: "double";
955
- timestamptz: "timestamptz";
956
- jsonb: "jsonb";
957
957
  }>, z.ZodObject<{
958
958
  enum: z.ZodString;
959
959
  }, z.core.$strip>]>;
@@ -975,10 +975,10 @@ declare const localDefinitionSchema: z.ZodObject<{
975
975
  of: z.ZodString;
976
976
  part: z.ZodEnum<{
977
977
  at: "at";
978
- source: "source";
979
978
  by: "by";
980
- conflicts: "conflicts";
981
979
  rev: "rev";
980
+ source: "source";
981
+ conflicts: "conflicts";
982
982
  }>;
983
983
  }, z.core.$strict>>;
984
984
  }, z.core.$strip>>>;
@@ -1062,21 +1062,21 @@ declare const localDefinitionSchema: z.ZodObject<{
1062
1062
  bigint: "bigint";
1063
1063
  boolean: "boolean";
1064
1064
  date: "date";
1065
- uuid: "uuid";
1066
1065
  text: "text";
1066
+ timestamptz: "timestamptz";
1067
+ jsonb: "jsonb";
1068
+ uuid: "uuid";
1067
1069
  integer: "integer";
1068
1070
  numeric: "numeric";
1069
1071
  double: "double";
1070
- timestamptz: "timestamptz";
1071
- jsonb: "jsonb";
1072
1072
  }>;
1073
1073
  nullable: z.ZodDefault<z.ZodBoolean>;
1074
1074
  }, z.core.$strip>>>;
1075
1075
  executes: z.ZodString;
1076
1076
  returns: z.ZodDefault<z.ZodEnum<{
1077
1077
  rows: "rows";
1078
- scalar: "scalar";
1079
1078
  rowsAffected: "rowsAffected";
1079
+ scalar: "scalar";
1080
1080
  }>>;
1081
1081
  audit: z.ZodOptional<z.ZodObject<{
1082
1082
  action: z.ZodString;
@@ -1132,13 +1132,13 @@ declare const localDefinitionSchema: z.ZodObject<{
1132
1132
  bigint: "bigint";
1133
1133
  boolean: "boolean";
1134
1134
  date: "date";
1135
- uuid: "uuid";
1136
1135
  text: "text";
1136
+ timestamptz: "timestamptz";
1137
+ jsonb: "jsonb";
1138
+ uuid: "uuid";
1137
1139
  integer: "integer";
1138
1140
  numeric: "numeric";
1139
1141
  double: "double";
1140
- timestamptz: "timestamptz";
1141
- jsonb: "jsonb";
1142
1142
  }>, z.ZodObject<{
1143
1143
  enum: z.ZodString;
1144
1144
  }, z.core.$strip>]>;
@@ -1160,10 +1160,10 @@ declare const localDefinitionSchema: z.ZodObject<{
1160
1160
  of: z.ZodString;
1161
1161
  part: z.ZodEnum<{
1162
1162
  at: "at";
1163
- source: "source";
1164
1163
  by: "by";
1165
- conflicts: "conflicts";
1166
1164
  rev: "rev";
1165
+ source: "source";
1166
+ conflicts: "conflicts";
1167
1167
  }>;
1168
1168
  }, z.core.$strict>>;
1169
1169
  }, z.core.$strip>>;
@@ -1212,8 +1212,8 @@ declare const localDefinitionSchema: z.ZodObject<{
1212
1212
  sources: z.ZodArray<z.ZodObject<{
1213
1213
  name: z.ZodString;
1214
1214
  kind: z.ZodEnum<{
1215
- prefetch: "prefetch";
1216
1215
  manual: "manual";
1216
+ prefetch: "prefetch";
1217
1217
  etl: "etl";
1218
1218
  }>;
1219
1219
  table: z.ZodString;
@@ -1336,13 +1336,13 @@ declare const canonicalDefinitionSchema: z.ZodObject<{
1336
1336
  bigint: "bigint";
1337
1337
  boolean: "boolean";
1338
1338
  date: "date";
1339
- uuid: "uuid";
1340
1339
  text: "text";
1340
+ timestamptz: "timestamptz";
1341
+ jsonb: "jsonb";
1342
+ uuid: "uuid";
1341
1343
  integer: "integer";
1342
1344
  numeric: "numeric";
1343
1345
  double: "double";
1344
- timestamptz: "timestamptz";
1345
- jsonb: "jsonb";
1346
1346
  }>, z.ZodObject<{
1347
1347
  enum: z.ZodString;
1348
1348
  }, z.core.$strip>]>;
@@ -1364,10 +1364,10 @@ declare const canonicalDefinitionSchema: z.ZodObject<{
1364
1364
  of: z.ZodString;
1365
1365
  part: z.ZodEnum<{
1366
1366
  at: "at";
1367
- source: "source";
1368
1367
  by: "by";
1369
- conflicts: "conflicts";
1370
1368
  rev: "rev";
1369
+ source: "source";
1370
+ conflicts: "conflicts";
1371
1371
  }>;
1372
1372
  }, z.core.$strict>>;
1373
1373
  }, z.core.$strip>>>;
@@ -1451,21 +1451,21 @@ declare const canonicalDefinitionSchema: z.ZodObject<{
1451
1451
  bigint: "bigint";
1452
1452
  boolean: "boolean";
1453
1453
  date: "date";
1454
- uuid: "uuid";
1455
1454
  text: "text";
1455
+ timestamptz: "timestamptz";
1456
+ jsonb: "jsonb";
1457
+ uuid: "uuid";
1456
1458
  integer: "integer";
1457
1459
  numeric: "numeric";
1458
1460
  double: "double";
1459
- timestamptz: "timestamptz";
1460
- jsonb: "jsonb";
1461
1461
  }>;
1462
1462
  nullable: z.ZodDefault<z.ZodBoolean>;
1463
1463
  }, z.core.$strip>>>;
1464
1464
  executes: z.ZodString;
1465
1465
  returns: z.ZodDefault<z.ZodEnum<{
1466
1466
  rows: "rows";
1467
- scalar: "scalar";
1468
1467
  rowsAffected: "rowsAffected";
1468
+ scalar: "scalar";
1469
1469
  }>>;
1470
1470
  audit: z.ZodOptional<z.ZodObject<{
1471
1471
  action: z.ZodString;
@@ -1521,13 +1521,13 @@ declare const canonicalDefinitionSchema: z.ZodObject<{
1521
1521
  bigint: "bigint";
1522
1522
  boolean: "boolean";
1523
1523
  date: "date";
1524
- uuid: "uuid";
1525
1524
  text: "text";
1525
+ timestamptz: "timestamptz";
1526
+ jsonb: "jsonb";
1527
+ uuid: "uuid";
1526
1528
  integer: "integer";
1527
1529
  numeric: "numeric";
1528
1530
  double: "double";
1529
- timestamptz: "timestamptz";
1530
- jsonb: "jsonb";
1531
1531
  }>, z.ZodObject<{
1532
1532
  enum: z.ZodString;
1533
1533
  }, z.core.$strip>]>;
@@ -1549,10 +1549,10 @@ declare const canonicalDefinitionSchema: z.ZodObject<{
1549
1549
  of: z.ZodString;
1550
1550
  part: z.ZodEnum<{
1551
1551
  at: "at";
1552
- source: "source";
1553
1552
  by: "by";
1554
- conflicts: "conflicts";
1555
1553
  rev: "rev";
1554
+ source: "source";
1555
+ conflicts: "conflicts";
1556
1556
  }>;
1557
1557
  }, z.core.$strict>>;
1558
1558
  }, z.core.$strip>>;
@@ -1601,8 +1601,8 @@ declare const canonicalDefinitionSchema: z.ZodObject<{
1601
1601
  sources: z.ZodArray<z.ZodObject<{
1602
1602
  name: z.ZodString;
1603
1603
  kind: z.ZodEnum<{
1604
- prefetch: "prefetch";
1605
1604
  manual: "manual";
1605
+ prefetch: "prefetch";
1606
1606
  etl: "etl";
1607
1607
  }>;
1608
1608
  table: z.ZodString;
@@ -1724,13 +1724,13 @@ declare const canonicalDefinitionSchema: z.ZodObject<{
1724
1724
  bigint: "bigint";
1725
1725
  boolean: "boolean";
1726
1726
  date: "date";
1727
- uuid: "uuid";
1728
1727
  text: "text";
1728
+ timestamptz: "timestamptz";
1729
+ jsonb: "jsonb";
1730
+ uuid: "uuid";
1729
1731
  integer: "integer";
1730
1732
  numeric: "numeric";
1731
1733
  double: "double";
1732
- timestamptz: "timestamptz";
1733
- jsonb: "jsonb";
1734
1734
  }>, z.ZodObject<{
1735
1735
  enum: z.ZodString;
1736
1736
  }, z.core.$strip>]>;
@@ -1752,10 +1752,10 @@ declare const canonicalDefinitionSchema: z.ZodObject<{
1752
1752
  of: z.ZodString;
1753
1753
  part: z.ZodEnum<{
1754
1754
  at: "at";
1755
- source: "source";
1756
1755
  by: "by";
1757
- conflicts: "conflicts";
1758
1756
  rev: "rev";
1757
+ source: "source";
1758
+ conflicts: "conflicts";
1759
1759
  }>;
1760
1760
  }, z.core.$strict>>;
1761
1761
  }, z.core.$strip>>>;
@@ -1839,21 +1839,21 @@ declare const canonicalDefinitionSchema: z.ZodObject<{
1839
1839
  bigint: "bigint";
1840
1840
  boolean: "boolean";
1841
1841
  date: "date";
1842
- uuid: "uuid";
1843
1842
  text: "text";
1843
+ timestamptz: "timestamptz";
1844
+ jsonb: "jsonb";
1845
+ uuid: "uuid";
1844
1846
  integer: "integer";
1845
1847
  numeric: "numeric";
1846
1848
  double: "double";
1847
- timestamptz: "timestamptz";
1848
- jsonb: "jsonb";
1849
1849
  }>;
1850
1850
  nullable: z.ZodDefault<z.ZodBoolean>;
1851
1851
  }, z.core.$strip>>>;
1852
1852
  executes: z.ZodString;
1853
1853
  returns: z.ZodDefault<z.ZodEnum<{
1854
1854
  rows: "rows";
1855
- scalar: "scalar";
1856
1855
  rowsAffected: "rowsAffected";
1856
+ scalar: "scalar";
1857
1857
  }>>;
1858
1858
  audit: z.ZodOptional<z.ZodObject<{
1859
1859
  action: z.ZodString;
@@ -1909,13 +1909,13 @@ declare const canonicalDefinitionSchema: z.ZodObject<{
1909
1909
  bigint: "bigint";
1910
1910
  boolean: "boolean";
1911
1911
  date: "date";
1912
- uuid: "uuid";
1913
1912
  text: "text";
1913
+ timestamptz: "timestamptz";
1914
+ jsonb: "jsonb";
1915
+ uuid: "uuid";
1914
1916
  integer: "integer";
1915
1917
  numeric: "numeric";
1916
1918
  double: "double";
1917
- timestamptz: "timestamptz";
1918
- jsonb: "jsonb";
1919
1919
  }>, z.ZodObject<{
1920
1920
  enum: z.ZodString;
1921
1921
  }, z.core.$strip>]>;
@@ -1937,10 +1937,10 @@ declare const canonicalDefinitionSchema: z.ZodObject<{
1937
1937
  of: z.ZodString;
1938
1938
  part: z.ZodEnum<{
1939
1939
  at: "at";
1940
- source: "source";
1941
1940
  by: "by";
1942
- conflicts: "conflicts";
1943
1941
  rev: "rev";
1942
+ source: "source";
1943
+ conflicts: "conflicts";
1944
1944
  }>;
1945
1945
  }, z.core.$strict>>;
1946
1946
  }, z.core.$strip>>;
@@ -1989,8 +1989,8 @@ declare const canonicalDefinitionSchema: z.ZodObject<{
1989
1989
  sources: z.ZodArray<z.ZodObject<{
1990
1990
  name: z.ZodString;
1991
1991
  kind: z.ZodEnum<{
1992
- prefetch: "prefetch";
1993
1992
  manual: "manual";
1993
+ prefetch: "prefetch";
1994
1994
  etl: "etl";
1995
1995
  }>;
1996
1996
  table: z.ZodString;
package/dist/cli.cjs CHANGED
@@ -6007,7 +6007,7 @@ function generateSqlOperations({ artifact }) {
6007
6007
  lines.push(
6008
6008
  `export type ${prefix}Variables = SqlQueryVariables`,
6009
6009
  `export type ${prefix}Result = SqlQueryResult`,
6010
- `export const ${prefix}: OperationReference<${prefix}Variables, ${prefix}Result> = ${JSON.stringify({ namespace: artifact.namespace, hash: operation.opHash })}`,
6010
+ `export const ${prefix}: OperationReference<${prefix}Variables, ${prefix}Result> = ${JSON.stringify({ namespace: artifact.namespace, name: operation.name, kind: operation.kind })}`,
6011
6011
  ""
6012
6012
  );
6013
6013
  continue;
@@ -6022,7 +6022,7 @@ function generateSqlOperations({ artifact }) {
6022
6022
  ${variables}
6023
6023
  }`,
6024
6024
  `export type ${prefix}Result = { columns: Array<{ name: string; type: string; nullable: boolean }>; rows: Array<[${row}]>; truncated: boolean }`,
6025
- `export const ${prefix}: OperationReference<${prefix}Variables, ${prefix}Result> = ${JSON.stringify({ namespace: artifact.namespace, hash: operation.opHash })}`,
6025
+ `export const ${prefix}: OperationReference<${prefix}Variables, ${prefix}Result> = ${JSON.stringify({ namespace: artifact.namespace, name: operation.name, kind: operation.kind })}`,
6026
6026
  ""
6027
6027
  );
6028
6028
  }
@@ -6812,29 +6812,23 @@ var CodegenGqlError = class extends Error {
6812
6812
  this.name = "CodegenGqlError";
6813
6813
  }
6814
6814
  };
6815
- var MANIFEST_VERSION = 1;
6816
- var OP_HASH_RE = /^sha256:[0-9a-f]{64}$/;
6815
+ var MANIFEST_VERSION = 2;
6817
6816
  var GRAPHQL_NAME_RE = /^[_A-Za-z][_0-9A-Za-z]*$/;
6818
6817
  var manifestRequiresSchema = zod.z.object({
6819
6818
  capability: zod.z.string().min(1).optional(),
6820
6819
  role: zod.z.string().min(1).optional()
6821
6820
  }).nullable();
6822
6821
  var manifestOperationSchema = zod.z.object({
6823
- hash: zod.z.string().regex(OP_HASH_RE),
6824
6822
  kind: zod.z.enum(["query", "mutation"]),
6825
6823
  requires: manifestRequiresSchema
6826
6824
  });
6827
6825
  var operationsManifestSchema = zod.z.object({
6828
- manifestVersion: zod.z.literal(MANIFEST_VERSION),
6829
- schemaHash: zod.z.string().min(1),
6830
- opsHash: zod.z.string().regex(OP_HASH_RE),
6826
+ manifestVersion: zod.z.union([zod.z.literal(1), zod.z.literal(MANIFEST_VERSION)]),
6831
6827
  operations: zod.z.record(zod.z.string().regex(GRAPHQL_NAME_RE), manifestOperationSchema)
6832
6828
  });
6833
6829
  function buildOperationsManifest({
6834
- schemaHash,
6835
6830
  operations
6836
6831
  }) {
6837
- if (schemaHash.length === 0) throw new CodegenGqlError("schemaHash must be a non-empty string.");
6838
6832
  const sorted = [...operations].sort((a, b) => a.name.localeCompare(b.name));
6839
6833
  const seen = /* @__PURE__ */ new Set();
6840
6834
  const entries = sorted.map((op) => {
@@ -6845,20 +6839,14 @@ function buildOperationsManifest({
6845
6839
  throw new CodegenGqlError(`Duplicate operation name "${op.name}" \u2014 operation names must be unique per namespace.`);
6846
6840
  }
6847
6841
  seen.add(op.name);
6848
- if (!OP_HASH_RE.test(op.hash)) {
6849
- throw new CodegenGqlError(`Operation "${op.name}" has malformed hash "${op.hash}" (expected sha256:<64 hex>).`);
6850
- }
6851
- return { name: op.name, hash: op.hash, kind: op.kind, requires: normalizeRequires(op.requires) };
6842
+ return { name: op.name, kind: op.kind, requires: normalizeRequires(op.requires) };
6852
6843
  });
6853
- const opsHash = `sha256:${crypto.createHash("sha256").update(stableJson(entries)).digest("hex")}`;
6854
6844
  const operationsRecord = {};
6855
6845
  for (const entry of entries) {
6856
- operationsRecord[entry.name] = { hash: entry.hash, kind: entry.kind, requires: entry.requires };
6846
+ operationsRecord[entry.name] = { kind: entry.kind, requires: entry.requires };
6857
6847
  }
6858
6848
  return {
6859
6849
  manifestVersion: MANIFEST_VERSION,
6860
- schemaHash,
6861
- opsHash,
6862
6850
  operations: operationsRecord
6863
6851
  };
6864
6852
  }
@@ -11688,11 +11676,10 @@ async function writeGenerateOutputs(dir, project) {
11688
11676
  `);
11689
11677
  const operations = Object.entries(manifest.operations).map(([name2, op]) => ({
11690
11678
  name: name2,
11691
- hash: op.opHash,
11692
11679
  kind: op.kind,
11693
11680
  requires: op.requires
11694
11681
  }));
11695
- const manifestFile = buildOperationsManifest({ schemaHash: manifest.schemaHash, operations });
11682
+ const manifestFile = buildOperationsManifest({ operations });
11696
11683
  await promises.writeFile(path.join(dir, OPERATIONS_MANIFEST_FILE), `${JSON.stringify(manifestFile, null, 2)}
11697
11684
  `);
11698
11685
  await promises.writeFile(path.join(dir, TYPE_POLICIES_FILE), generateTypePolicies(loaded.canonical));
@@ -11805,13 +11792,12 @@ async function executeV2Command(rest) {
11805
11792
  const namespace = loaded.canonical.namespace;
11806
11793
  let response;
11807
11794
  try {
11808
- response = await apiRequestStrict("POST", `${DATA_ENDPOINT_PREFIX}/${namespace}`, { op: selected.hash, variables });
11795
+ response = await apiRequestStrict("POST", `${DATA_ENDPOINT_PREFIX}/${namespace}`, { op: `${selected.kind}:${operation}`, expectedKind: selected.kind, variables });
11809
11796
  } catch (error) {
11810
11797
  if (!(error instanceof AtlasRequestError) || error.status !== 404) throw error;
11811
11798
  const diagnosis = await diagnoseUnknownOperation({
11812
11799
  namespace,
11813
11800
  operation,
11814
- localHash: selected.hash,
11815
11801
  retry: `seq-studio orm execute ${namespace} ${operation}${env ? ` -e ${env}` : ""} --variables-file ${variablesFile}`
11816
11802
  }).catch(() => null);
11817
11803
  throw diagnosis ? new OrmDefinitionError(diagnosis) : error;
@@ -11819,7 +11805,7 @@ async function executeV2Command(rest) {
11819
11805
  console.log(JSON.stringify(response, null, 2));
11820
11806
  return 0;
11821
11807
  }
11822
- async function diagnoseUnknownOperation({ namespace, operation, localHash, retry }) {
11808
+ async function diagnoseUnknownOperation({ namespace, operation, retry }) {
11823
11809
  const encoded = encodeURIComponent(namespace);
11824
11810
  const listing = await apiRequest(
11825
11811
  "GET",
@@ -11842,15 +11828,10 @@ async function diagnoseUnknownOperation({ namespace, operation, localHash, retry
11842
11828
  if (!deployed) {
11843
11829
  return `operation ${operation} is not in ${namespace}'s deployed version ${listing.schema_version_id}. Apply this checkout to deploy it (seq-studio orm apply), or list the deployed operations: seq-studio orm describe ${namespace} --operations`;
11844
11830
  }
11845
- if (deployed.op_hash === localHash) return null;
11846
11831
  return [
11847
- `operation ${operation}: this checkout's ${OPERATIONS_MANIFEST_FILE} does not match ${namespace}'s deployed version.`,
11848
- ` local hash: ${localHash}`,
11849
- ` deployed hash: ${deployed.op_hash}`,
11850
- ` deployed version: ${listing.schema_version_id}`,
11851
- "Run the deployed operation by name (no checkout needed):",
11852
- ` ${retry}`,
11853
- "Or bring the checkout up to date (git pull, then seq-studio orm generate) and retry."
11832
+ `operation ${operation} exists in ${namespace}'s deployed version ${listing.schema_version_id}, but its guarded name was refused.`,
11833
+ "Update Atlas to a runtime that supports guarded operation names, or retry if the operation set changed during lookup.",
11834
+ ` ${retry}`
11854
11835
  ].join("\n");
11855
11836
  }
11856
11837
  async function validateV2Command(dir) {