@neocompose/cli 0.58.3 → 0.59.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/neo.mjs CHANGED
@@ -6424,10 +6424,10 @@ var init_strict_resolver = __esm({
6424
6424
  this.project = projectIndex ?? createProjectIndex(context.project);
6425
6425
  this.source = syntax?.source.text;
6426
6426
  this.sourceTokens = syntax?.roots;
6427
- const unknown2 = { kind: "primitive", name: "unknown" };
6427
+ const unknown = { kind: "primitive", name: "unknown" };
6428
6428
  this.thisVariable = variable(
6429
6429
  "__this__",
6430
- context.thisClass ?? unknown2,
6430
+ context.thisClass ?? unknown,
6431
6431
  void 0,
6432
6432
  this.project
6433
6433
  );
@@ -6436,7 +6436,7 @@ var init_strict_resolver = __esm({
6436
6436
  );
6437
6437
  this.rootVariable = variable(
6438
6438
  "__root__",
6439
- rootSymbol?.type ?? unknown2,
6439
+ rootSymbol?.type ?? unknown,
6440
6440
  void 0,
6441
6441
  this.project
6442
6442
  );
@@ -34352,13 +34352,13 @@ function spellingQuickFixes(document, diagnostic) {
34352
34352
  }
34353
34353
  function diagnosticMisspelling(diagnostic) {
34354
34354
  if (/to initialize\b/.test(diagnostic.message)) return null;
34355
- const unknown2 = /Unknown (identifier|function) '([^']+)'/.exec(
34355
+ const unknown = /Unknown (identifier|function) '([^']+)'/.exec(
34356
34356
  diagnostic.message
34357
34357
  );
34358
- if (unknown2?.[2]) {
34358
+ if (unknown?.[2]) {
34359
34359
  return {
34360
- name: unknown2[2],
34361
- kind: unknown2[1] === "function" ? "callable" : "value"
34360
+ name: unknown[2],
34361
+ kind: unknown[1] === "function" ? "callable" : "value"
34362
34362
  };
34363
34363
  }
34364
34364
  const member = /has no (?:static )?(?:callable )?member '([^']+)'/.exec(
@@ -35759,10 +35759,10 @@ function optionalTestConfig(value) {
35759
35759
  "maxWorkers",
35760
35760
  "forbidOnly"
35761
35761
  ]);
35762
- const unknown2 = Object.keys(config).find((key) => !allowed.has(key));
35763
- if (unknown2 !== void 0) {
35762
+ const unknown = Object.keys(config).find((key) => !allowed.has(key));
35763
+ if (unknown !== void 0) {
35764
35764
  throw new Error(
35765
- `"${NEO_CONFIG_FILE}" field "test.${unknown2}" is not recognized.`
35765
+ `"${NEO_CONFIG_FILE}" field "test.${unknown}" is not recognized.`
35766
35766
  );
35767
35767
  }
35768
35768
  const stringArray2 = (field) => {
@@ -41696,6 +41696,50 @@ var init_record_adapters = __esm({
41696
41696
  }
41697
41697
  });
41698
41698
 
41699
+ // ../packages/manifest/src/value-graph.ts
41700
+ function encodeStoredValueNode(node) {
41701
+ if (node.nodeType === "initializer") return { init: { code: node.code } };
41702
+ return {
41703
+ value: node.value,
41704
+ classId: node.classId,
41705
+ ...node.constructorArgs === void 0 ? {} : { constructorArgs: node.constructorArgs },
41706
+ ...node.instanceConstructorId === void 0 ? {} : { instanceConstructorId: node.instanceConstructorId },
41707
+ ...node.instanceVariantId === void 0 ? {} : { instanceVariantId: node.instanceVariantId },
41708
+ ...node.instanceVariantRowValueId === void 0 ? {} : { instanceVariantRowValueId: node.instanceVariantRowValueId }
41709
+ };
41710
+ }
41711
+ function encodeStoredValueRowFields(row) {
41712
+ return {
41713
+ ...encodeStoredValueNode(row),
41714
+ ...row.containerId === void 0 ? {} : { containerId: row.containerId },
41715
+ ...row.genericBindings === void 0 ? {} : { genericBindings: row.genericBindings },
41716
+ ...row.sourceValueId === void 0 ? {} : { sourceValueId: row.sourceValueId }
41717
+ };
41718
+ }
41719
+ function canonicalInstanceProvenanceViolation(value) {
41720
+ const constructorArgs = "constructorArgs" in value ? value.constructorArgs : void 0;
41721
+ const constructorId = "instanceConstructorId" in value ? value.instanceConstructorId : void 0;
41722
+ const variantId = "instanceVariantId" in value ? value.instanceVariantId : void 0;
41723
+ if (constructorArgs !== void 0 && constructorId === void 0 && typeof variantId !== "string") {
41724
+ return "constructor-args-without-stamp";
41725
+ }
41726
+ if (typeof constructorId === "string" && constructorArgs === void 0) {
41727
+ return "named-constructor-without-args";
41728
+ }
41729
+ if (constructorId === null && constructorArgs !== void 0 && typeof constructorArgs === "object" && constructorArgs !== null && !Array.isArray(constructorArgs) && Object.keys(constructorArgs).length > 0) {
41730
+ return "implicit-constructor-with-args";
41731
+ }
41732
+ if ("instanceVariantRowValueId" in value && typeof value.instanceVariantRowValueId === "string" && typeof variantId !== "string") {
41733
+ return "variant-row-without-variant";
41734
+ }
41735
+ return null;
41736
+ }
41737
+ var init_value_graph = __esm({
41738
+ "../packages/manifest/src/value-graph.ts"() {
41739
+ "use strict";
41740
+ }
41741
+ });
41742
+
41699
41743
  // node_modules/valibot/dist/index.mjs
41700
41744
  // @__NO_SIDE_EFFECTS__
41701
41745
  function getGlobalConfig(config$1) {
@@ -42408,23 +42452,6 @@ function union(options, message$1) {
42408
42452
  };
42409
42453
  }
42410
42454
  // @__NO_SIDE_EFFECTS__
42411
- function unknown() {
42412
- return {
42413
- kind: "schema",
42414
- type: "unknown",
42415
- reference: unknown,
42416
- expects: "unknown",
42417
- async: false,
42418
- get "~standard"() {
42419
- return /* @__PURE__ */ _getStandardProps(this);
42420
- },
42421
- "~run"(dataset) {
42422
- dataset.typed = true;
42423
- return dataset;
42424
- }
42425
- };
42426
- }
42427
- // @__NO_SIDE_EFFECTS__
42428
42455
  function variant(key, options, message$1) {
42429
42456
  return {
42430
42457
  kind: "schema",
@@ -42539,108 +42566,6 @@ var init_dist = __esm({
42539
42566
  }
42540
42567
  });
42541
42568
 
42542
- // ../packages/manifest/src/value-graph.ts
42543
- function encodeStoredValueNode(node) {
42544
- if (node.nodeType === "initializer") return { init: { code: node.code } };
42545
- return {
42546
- value: node.value,
42547
- classId: node.classId,
42548
- ...node.constructorArgs === void 0 ? {} : { constructorArgs: node.constructorArgs },
42549
- ...node.instanceConstructorId === void 0 ? {} : { instanceConstructorId: node.instanceConstructorId },
42550
- ...node.instanceVariantId === void 0 ? {} : { instanceVariantId: node.instanceVariantId },
42551
- ...node.instanceVariantRowValueId === void 0 ? {} : { instanceVariantRowValueId: node.instanceVariantRowValueId }
42552
- };
42553
- }
42554
- function encodeStoredValueRowFields(row) {
42555
- return {
42556
- ...encodeStoredValueNode(row),
42557
- ...row.containerId === void 0 ? {} : { containerId: row.containerId },
42558
- ...row.genericBindings === void 0 ? {} : { genericBindings: row.genericBindings },
42559
- ...row.sourceValueId === void 0 ? {} : { sourceValueId: row.sourceValueId }
42560
- };
42561
- }
42562
- function canonicalInstanceProvenanceViolation(value) {
42563
- const constructorArgs = "constructorArgs" in value ? value.constructorArgs : void 0;
42564
- const constructorId = "instanceConstructorId" in value ? value.instanceConstructorId : void 0;
42565
- const variantId = "instanceVariantId" in value ? value.instanceVariantId : void 0;
42566
- if (constructorArgs !== void 0 && constructorId === void 0 && typeof variantId !== "string") {
42567
- return "constructor-args-without-stamp";
42568
- }
42569
- if (typeof constructorId === "string" && constructorArgs === void 0) {
42570
- return "named-constructor-without-args";
42571
- }
42572
- if (constructorId === null && constructorArgs !== void 0 && typeof constructorArgs === "object" && constructorArgs !== null && !Array.isArray(constructorArgs) && Object.keys(constructorArgs).length > 0) {
42573
- return "implicit-constructor-with-args";
42574
- }
42575
- if ("instanceVariantRowValueId" in value && typeof value.instanceVariantRowValueId === "string" && typeof variantId !== "string") {
42576
- return "variant-row-without-variant";
42577
- }
42578
- return null;
42579
- }
42580
- var nonEmptyString, nullableId, optionalNullableId, stringMap, unknownMap, instanceProvenanceEntries, literalValueNodeEntries, initializerValueNodeEntries, literalValueNodeSchema, initializerValueNodeSchema, valueRowEntries, AuthoredValueRowSchema, valueSeedEntries, AuthoredValueSeedSchema, BindingMemberSchema, LocalizedTextSchema;
42581
- var init_value_graph = __esm({
42582
- "../packages/manifest/src/value-graph.ts"() {
42583
- "use strict";
42584
- init_dist();
42585
- nonEmptyString = pipe(string3(), nonEmpty());
42586
- nullableId = nullable(nonEmptyString);
42587
- optionalNullableId = optional(nullableId);
42588
- stringMap = record3(string3(), nonEmptyString);
42589
- unknownMap = record3(string3(), unknown());
42590
- instanceProvenanceEntries = {
42591
- constructorArgs: optional(unknownMap),
42592
- instanceConstructorId: optionalNullableId,
42593
- instanceVariantId: optionalNullableId,
42594
- instanceVariantRowValueId: optionalNullableId
42595
- };
42596
- literalValueNodeEntries = {
42597
- nodeType: literal2("literal"),
42598
- value: unknown(),
42599
- classId: nullable(string3()),
42600
- ...instanceProvenanceEntries
42601
- };
42602
- initializerValueNodeEntries = {
42603
- nodeType: literal2("initializer"),
42604
- code: nonEmptyString
42605
- };
42606
- literalValueNodeSchema = strictObject(literalValueNodeEntries);
42607
- initializerValueNodeSchema = strictObject(
42608
- initializerValueNodeEntries
42609
- );
42610
- valueRowEntries = {
42611
- id: nonEmptyString,
42612
- memberId: nonEmptyString,
42613
- containerId: optional(string3()),
42614
- genericBindings: optional(stringMap),
42615
- sourceValueId: optional(nonEmptyString)
42616
- };
42617
- AuthoredValueRowSchema = variant("nodeType", [
42618
- strictObject({ ...valueRowEntries, ...literalValueNodeEntries }),
42619
- strictObject({ ...valueRowEntries, ...initializerValueNodeEntries })
42620
- ]);
42621
- valueSeedEntries = {
42622
- memberId: nonEmptyString,
42623
- valueId: optional(nonEmptyString),
42624
- values: optional(unknown()),
42625
- bindingMembers: optional(unknown()),
42626
- localizedTexts: optional(unknown())
42627
- };
42628
- AuthoredValueSeedSchema = variant("nodeType", [
42629
- strictObject({ ...valueSeedEntries, ...literalValueNodeEntries }),
42630
- strictObject({ ...valueSeedEntries, ...initializerValueNodeEntries })
42631
- ]);
42632
- BindingMemberSchema = strictObject({
42633
- id: nonEmptyString,
42634
- classId: nonEmptyString
42635
- });
42636
- LocalizedTextSchema = strictObject({
42637
- id: nonEmptyString,
42638
- valueId: nonEmptyString,
42639
- value: string3()
42640
- });
42641
- }
42642
- });
42643
-
42644
42569
  // ../packages/manifest/src/schema-member.ts
42645
42570
  function jsonValueIssue(value, depth, path) {
42646
42571
  if (depth > 64) {
@@ -42728,34 +42653,34 @@ function schemaTypeOptionsAtDepth(depth) {
42728
42653
  nullable: boolean2()
42729
42654
  }),
42730
42655
  nullableTypeSchema("class", {
42731
- classId: nonEmptyString2,
42732
- classArguments: record3(nonEmptyString2, schemaTypeAtDepth(depth + 1))
42656
+ classId: nonEmptyString,
42657
+ classArguments: record3(nonEmptyString, schemaTypeAtDepth(depth + 1))
42733
42658
  }),
42734
42659
  nullableTypeSchema("interface", {
42735
- interfaceId: nonEmptyString2
42660
+ interfaceId: nonEmptyString
42736
42661
  }),
42737
42662
  nullableTypeSchema("generic", {
42738
- ownerClassId: nonEmptyString2,
42739
- genericParamId: nonEmptyString2
42663
+ ownerClassId: nonEmptyString,
42664
+ genericParamId: nonEmptyString
42740
42665
  }),
42741
42666
  nullableTypeSchema("enum", {
42742
- enumId: nonEmptyString2
42667
+ enumId: nonEmptyString
42743
42668
  }),
42744
42669
  nullableTypeSchema("list", {
42745
42670
  entryType: schemaTypeAtDepth(depth + 1),
42746
- listMemberId: nullableId2,
42671
+ listMemberId: nullableId,
42747
42672
  readOnly: boolean2()
42748
42673
  }),
42749
42674
  nullableTypeSchema("dictionary", {
42750
42675
  entryType: schemaTypeAtDepth(depth + 1),
42751
- keyEnumId: nullableId2,
42676
+ keyEnumId: nullableId,
42752
42677
  readOnly: boolean2()
42753
42678
  }),
42754
42679
  pipe(
42755
42680
  nullableTypeSchema("lookup", {
42756
42681
  entryType: schemaTypeAtDepth(depth + 1),
42757
- collectionMemberId: exactOptional(nonEmptyString2),
42758
- collectionValueId: exactOptional(nullableId2)
42682
+ collectionMemberId: exactOptional(nonEmptyString),
42683
+ collectionValueId: exactOptional(nullableId)
42759
42684
  }),
42760
42685
  check(
42761
42686
  (type) => type.collectionValueId == null || type.collectionMemberId !== void 0,
@@ -42968,14 +42893,14 @@ function assertMemberInvariants(member, path) {
42968
42893
  fail2("script", "is required for a concrete scripted member.");
42969
42894
  }
42970
42895
  }
42971
- var nonEmptyString2, nullableString2, nullableId2, finiteNumber, nullableNumber, nullableInteger, jsonValueSchema, schemaSourcePositionSchema, schemaSourceSpanSchema, schemaSourceSymbolKinds, schemaSourceIdentitySchema, memberSourceIdentitySchema, systemProtectionKindSchema, worldSystemClassKindSchema, schemaSystemMetadataSchema, schemaGenericBindingSchema, schemaGenericBindingRecordSchema, genericConstraintSchema, schemaGenericParameterSchema, primitiveTypeKinds, schemaTypeCache, returnTypeCache, schemaTypeSchema, schemaFunctionReturnTypeSchema, schemaParameterDefaultSchema, schemaFunctionArgumentSchema, memberOwnerSchema, schemaDefaultValueSchema, propertyScriptSchema, functionScriptSchema, commonMemberEntries, schemaMemberCommonSchema, simpleMemberSchemas, dictionaryKeySchema, schemaListIndexSchema, schemaListColumnSchema, callableEntries, schemaMemberSchema, SchemaMemberContractError;
42896
+ var nonEmptyString, nullableString2, nullableId, finiteNumber, nullableNumber, nullableInteger, jsonValueSchema, schemaSourcePositionSchema, schemaSourceSpanSchema, schemaSourceSymbolKinds, schemaSourceIdentitySchema, memberSourceIdentitySchema, systemProtectionKindSchema, worldSystemClassKindSchema, schemaSystemMetadataSchema, schemaGenericBindingSchema, schemaGenericBindingRecordSchema, genericConstraintSchema, schemaGenericParameterSchema, primitiveTypeKinds, schemaTypeCache, returnTypeCache, schemaTypeSchema, schemaFunctionReturnTypeSchema, schemaParameterDefaultSchema, schemaFunctionArgumentSchema, memberOwnerSchema, schemaDefaultValueSchema, propertyScriptSchema, functionScriptSchema, commonMemberEntries, schemaMemberCommonSchema, simpleMemberSchemas, dictionaryKeySchema, schemaListIndexSchema, schemaListColumnSchema, callableEntries, schemaMemberSchema, SchemaMemberContractError;
42972
42897
  var init_schema_member = __esm({
42973
42898
  "../packages/manifest/src/schema-member.ts"() {
42974
42899
  "use strict";
42975
42900
  init_dist();
42976
- nonEmptyString2 = pipe(string3(), nonEmpty());
42901
+ nonEmptyString = pipe(string3(), nonEmpty());
42977
42902
  nullableString2 = nullable(string3());
42978
- nullableId2 = nullable(nonEmptyString2);
42903
+ nullableId = nullable(nonEmptyString);
42979
42904
  finiteNumber = pipe(number(), finite());
42980
42905
  nullableNumber = nullable(finiteNumber);
42981
42906
  nullableInteger = nullable(
@@ -42994,7 +42919,7 @@ var init_schema_member = __esm({
42994
42919
  });
42995
42920
  schemaSourceSpanSchema = pipe(
42996
42921
  strictObject({
42997
- path: nonEmptyString2,
42922
+ path: nonEmptyString,
42998
42923
  start: schemaSourcePositionSchema,
42999
42924
  end: schemaSourcePositionSchema
43000
42925
  }),
@@ -43041,13 +42966,13 @@ var init_schema_member = __esm({
43041
42966
  "variantFolder"
43042
42967
  ];
43043
42968
  schemaSourceIdentitySchema = strictObject({
43044
- symbolId: nonEmptyString2,
42969
+ symbolId: nonEmptyString,
43045
42970
  kind: picklist(schemaSourceSymbolKinds),
43046
42971
  span: schemaSourceSpanSchema,
43047
42972
  selectionSpan: schemaSourceSpanSchema
43048
42973
  });
43049
42974
  memberSourceIdentitySchema = strictObject({
43050
- symbolId: nonEmptyString2,
42975
+ symbolId: nonEmptyString,
43051
42976
  kind: literal2("member"),
43052
42977
  span: schemaSourceSpanSchema,
43053
42978
  selectionSpan: schemaSourceSpanSchema
@@ -43102,25 +43027,25 @@ var init_schema_member = __esm({
43102
43027
  schemaGenericBindingSchema = variant("kind", [
43103
43028
  strictObject({
43104
43029
  kind: literal2("generic"),
43105
- genericParamId: nonEmptyString2
43030
+ genericParamId: nonEmptyString
43106
43031
  }),
43107
- strictObject({ kind: literal2("member"), memberId: nonEmptyString2 })
43032
+ strictObject({ kind: literal2("member"), memberId: nonEmptyString })
43108
43033
  ]);
43109
43034
  schemaGenericBindingRecordSchema = record3(
43110
- nonEmptyString2,
43035
+ nonEmptyString,
43111
43036
  schemaGenericBindingSchema
43112
43037
  );
43113
43038
  genericConstraintSchema = variant("kind", [
43114
43039
  strictObject({
43115
43040
  kind: literal2("class"),
43116
- classId: nonEmptyString2,
43041
+ classId: nonEmptyString,
43117
43042
  classArguments: optional(nullable(schemaGenericBindingRecordSchema))
43118
43043
  }),
43119
- strictObject({ kind: literal2("enum"), enumId: nonEmptyString2 })
43044
+ strictObject({ kind: literal2("enum"), enumId: nonEmptyString })
43120
43045
  ]);
43121
43046
  schemaGenericParameterSchema = strictObject({
43122
- id: nonEmptyString2,
43123
- name: nonEmptyString2,
43047
+ id: nonEmptyString,
43048
+ name: nonEmptyString,
43124
43049
  constraint: nullable(genericConstraintSchema),
43125
43050
  source: schemaSourceSpanSchema,
43126
43051
  selectionSpan: schemaSourceSpanSchema
@@ -43150,7 +43075,7 @@ var init_schema_member = __esm({
43150
43075
  source: schemaSourceSpanSchema
43151
43076
  });
43152
43077
  schemaFunctionArgumentSchema = strictObject({
43153
- name: nonEmptyString2,
43078
+ name: nonEmptyString,
43154
43079
  type: schemaTypeSchema,
43155
43080
  default: nullable(schemaParameterDefaultSchema),
43156
43081
  source: schemaSourceSpanSchema,
@@ -43159,41 +43084,41 @@ var init_schema_member = __esm({
43159
43084
  memberOwnerSchema = variant("kind", [
43160
43085
  strictObject({
43161
43086
  kind: literal2("classMember"),
43162
- classId: nonEmptyString2,
43163
- schemaKey: nonEmptyString2
43087
+ classId: nonEmptyString,
43088
+ schemaKey: nonEmptyString
43164
43089
  }),
43165
43090
  strictObject({
43166
43091
  kind: literal2("sharedClassMember"),
43167
43092
  members: pipe(
43168
43093
  array2(
43169
- strictObject({ classId: nonEmptyString2, schemaKey: nonEmptyString2 })
43094
+ strictObject({ classId: nonEmptyString, schemaKey: nonEmptyString })
43170
43095
  ),
43171
43096
  minLength(2, "Must contain at least two shared declarations.")
43172
43097
  )
43173
43098
  }),
43174
43099
  strictObject({
43175
43100
  kind: literal2("collectionEntry"),
43176
- parentMemberId: nonEmptyString2
43101
+ parentMemberId: nonEmptyString
43177
43102
  }),
43178
43103
  strictObject({
43179
43104
  kind: literal2("sharedCollectionEntry"),
43180
43105
  parentMemberIds: pipe(
43181
- array2(nonEmptyString2),
43106
+ array2(nonEmptyString),
43182
43107
  minLength(2, "Must contain at least two shared collections.")
43183
43108
  )
43184
43109
  }),
43185
43110
  strictObject({
43186
43111
  kind: literal2("genericArgument"),
43187
- parentRecordId: nonEmptyString2,
43188
- genericParamId: nonEmptyString2
43112
+ parentRecordId: nonEmptyString,
43113
+ genericParamId: nonEmptyString
43189
43114
  }),
43190
43115
  strictObject({
43191
43116
  kind: literal2("sharedGenericArgument"),
43192
43117
  bindings: pipe(
43193
43118
  array2(
43194
43119
  strictObject({
43195
- parentRecordId: nonEmptyString2,
43196
- genericParamId: nonEmptyString2
43120
+ parentRecordId: nonEmptyString,
43121
+ genericParamId: nonEmptyString
43197
43122
  })
43198
43123
  ),
43199
43124
  minLength(2, "Must contain at least two shared bindings.")
@@ -43202,17 +43127,17 @@ var init_schema_member = __esm({
43202
43127
  strictObject({ kind: literal2("loose") })
43203
43128
  ]);
43204
43129
  schemaDefaultValueSchema = union([
43205
- strictObject({ serverValueId: nonEmptyString2 }),
43206
- strictObject({ init: strictObject({ code: nonEmptyString2 }) }),
43207
- strictObject({ value: jsonValueSchema, classId: nullableId2 })
43130
+ strictObject({ serverValueId: nonEmptyString }),
43131
+ strictObject({ init: strictObject({ code: nonEmptyString }) }),
43132
+ strictObject({ value: jsonValueSchema, classId: nullableId })
43208
43133
  ]);
43209
43134
  propertyScriptSchema = pipe(
43210
43135
  strictObject({
43211
43136
  kind: literal2("property"),
43212
- path: nonEmptyString2,
43137
+ path: nonEmptyString,
43213
43138
  sourceText: string3(),
43214
43139
  source: schemaSourceSpanSchema,
43215
- getterSource: nonEmptyString2,
43140
+ getterSource: nonEmptyString,
43216
43141
  setterSource: nullableString2
43217
43142
  }),
43218
43143
  forward(
@@ -43226,7 +43151,7 @@ var init_schema_member = __esm({
43226
43151
  functionScriptSchema = pipe(
43227
43152
  strictObject({
43228
43153
  kind: literal2("function"),
43229
- path: nonEmptyString2,
43154
+ path: nonEmptyString,
43230
43155
  sourceText: string3(),
43231
43156
  source: schemaSourceSpanSchema
43232
43157
  }),
@@ -43239,10 +43164,10 @@ var init_schema_member = __esm({
43239
43164
  )
43240
43165
  );
43241
43166
  commonMemberEntries = {
43242
- id: nonEmptyString2,
43167
+ id: nonEmptyString,
43243
43168
  source: memberSourceIdentitySchema,
43244
43169
  owner: memberOwnerSchema,
43245
- name: nonEmptyString2,
43170
+ name: nonEmptyString,
43246
43171
  docsText: optional(string3()),
43247
43172
  isReadOnly: boolean2(),
43248
43173
  accessModifier: picklist(["public", "protected", "private"]),
@@ -43257,11 +43182,11 @@ var init_schema_member = __esm({
43257
43182
  ]),
43258
43183
  required: boolean2(),
43259
43184
  defaultValue: nullable(schemaDefaultValueSchema),
43260
- overrideOf: nullableId2,
43185
+ overrideOf: nullableId,
43261
43186
  system: nullable(schemaSystemMetadataSchema),
43262
43187
  storage: nullable(picklist(["immutable", "save", "session", "writable"])),
43263
43188
  distribution: nullable(picklist(["sparse", "packed"])),
43264
- storageKey: nullableId2
43189
+ storageKey: nullableId
43265
43190
  };
43266
43191
  schemaMemberCommonSchema = strictObject(commonMemberEntries);
43267
43192
  simpleMemberSchemas = [
@@ -43276,14 +43201,14 @@ var init_schema_member = __esm({
43276
43201
  ];
43277
43202
  dictionaryKeySchema = variant("kind", [
43278
43203
  strictObject({ kind: literal2("string") }),
43279
- strictObject({ kind: literal2("enum"), enumId: nonEmptyString2 })
43204
+ strictObject({ kind: literal2("enum"), enumId: nonEmptyString })
43280
43205
  ]);
43281
43206
  schemaListIndexSchema = strictObject({
43282
- schemaKey: nonEmptyString2,
43207
+ schemaKey: nonEmptyString,
43283
43208
  unique: boolean2()
43284
43209
  });
43285
43210
  schemaListColumnSchema = strictObject({
43286
- memberKey: nonEmptyString2,
43211
+ memberKey: nonEmptyString,
43287
43212
  width: nullableNumber,
43288
43213
  hidden: boolean2(),
43289
43214
  frozen: boolean2(),
@@ -43314,33 +43239,33 @@ var init_schema_member = __esm({
43314
43239
  decimalPoints: nullableInteger
43315
43240
  }),
43316
43241
  memberSchema("dictionary", {
43317
- entryMemberId: nonEmptyString2,
43242
+ entryMemberId: nonEmptyString,
43318
43243
  key: dictionaryKeySchema
43319
43244
  }),
43320
43245
  memberSchema("list", {
43321
- entryMemberId: nonEmptyString2,
43246
+ entryMemberId: nonEmptyString,
43322
43247
  listKind: picklist(["ordered", "unordered"]),
43323
43248
  indexes: array2(schemaListIndexSchema),
43324
43249
  columns: array2(schemaListColumnSchema)
43325
43250
  }),
43326
43251
  memberSchema("class", {
43327
- classId: nonEmptyString2,
43252
+ classId: nonEmptyString,
43328
43253
  partial: optional(boolean2()),
43329
- schemaKeyOrder: nullable(array2(nonEmptyString2)),
43254
+ schemaKeyOrder: nullable(array2(nonEmptyString)),
43330
43255
  classArguments: schemaGenericBindingRecordSchema
43331
43256
  }),
43332
43257
  memberSchema("enum", {
43333
- enumId: nonEmptyString2,
43258
+ enumId: nonEmptyString,
43334
43259
  multiselect: boolean2()
43335
43260
  }),
43336
43261
  memberSchema("lookup", {
43337
- collectionMemberId: nonEmptyString2,
43338
- collectionValueId: nullableId2,
43262
+ collectionMemberId: nonEmptyString,
43263
+ collectionValueId: nullableId,
43339
43264
  multiselect: boolean2(),
43340
43265
  declaredType: nullable(schemaTypeSchema)
43341
43266
  }),
43342
43267
  memberSchema("dialogueLookup", {
43343
- dialogueGroupId: nullableId2,
43268
+ dialogueGroupId: nullableId,
43344
43269
  multiselect: boolean2()
43345
43270
  }),
43346
43271
  memberSchema("computed", {
@@ -43348,10 +43273,10 @@ var init_schema_member = __esm({
43348
43273
  script: nullable(propertyScriptSchema)
43349
43274
  }),
43350
43275
  memberSchema("sprite", {
43351
- templateId: nullableId2
43276
+ templateId: nullableId
43352
43277
  }),
43353
43278
  memberSchema("audio", {
43354
- templateId: nullableId2
43279
+ templateId: nullableId
43355
43280
  }),
43356
43281
  memberSchema("function", {
43357
43282
  ...callableEntries,
@@ -43382,7 +43307,7 @@ var init_schema_member = __esm({
43382
43307
  valueType: nullable(schemaTypeSchema)
43383
43308
  }),
43384
43309
  memberSchema("generic", {
43385
- genericParamId: nonEmptyString2,
43310
+ genericParamId: nonEmptyString,
43386
43311
  partial: optional(boolean2())
43387
43312
  })
43388
43313
  ]);
@@ -43441,7 +43366,7 @@ function assertProjectSchemaManifest(value) {
43441
43366
  "localizationStatuses",
43442
43367
  "internalRecordRelations"
43443
43368
  ]);
43444
- nonEmptyString3(manifest.namespace, "$.namespace");
43369
+ nonEmptyString2(manifest.namespace, "$.namespace");
43445
43370
  arrayOf(manifest.classes, "$.classes", assertNeoSchemaClass);
43446
43371
  arrayOf(manifest.constructors, "$.constructors", assertConstructor2);
43447
43372
  arrayOf(manifest.variants, "$.variants", assertVariant);
@@ -43515,7 +43440,7 @@ function assertConstructorInvariants(manifest) {
43515
43440
  const requiredConstructorId2 = schemaClass2.requiredConstructorId;
43516
43441
  if (requiredConstructorId2 === void 0) return;
43517
43442
  const path = `$.classes[${index}].requiredConstructorId`;
43518
- nonEmptyString3(requiredConstructorId2, path);
43443
+ nonEmptyString2(requiredConstructorId2, path);
43519
43444
  const id2 = String(requiredConstructorId2);
43520
43445
  if (listedIds.has(id2)) {
43521
43446
  invalid(path, `constructor ${JSON.stringify(id2)} is already owned.`);
@@ -43551,7 +43476,7 @@ function assertConstructorInvariants(manifest) {
43551
43476
  schemaClass2.constructorIds,
43552
43477
  `$.classes[${index}].constructorIds`
43553
43478
  ).map((entry, entryIndex) => {
43554
- nonEmptyString3(
43479
+ nonEmptyString2(
43555
43480
  entry,
43556
43481
  `$.classes[${index}].constructorIds[${entryIndex}]`
43557
43482
  );
@@ -43593,7 +43518,7 @@ function assertConstructor2(value, path) {
43593
43518
  );
43594
43519
  assertIdentity2(declared, path, "constructor");
43595
43520
  assertOptionalDocsText2(declared.docsText, `${path}.docsText`);
43596
- nonEmptyString3(declared.classId, `${path}.classId`);
43521
+ nonEmptyString2(declared.classId, `${path}.classId`);
43597
43522
  arrayOf(declared.arguments, `${path}.arguments`, assertFunctionArgument);
43598
43523
  if (declared.code !== null && typeof declared.code !== "string") {
43599
43524
  invalid(
@@ -43639,11 +43564,11 @@ function assertVariant(value, path) {
43639
43564
  "valueId"
43640
43565
  ]);
43641
43566
  assertIdentity2(variant2, path, "variant");
43642
- nonEmptyString3(variant2.classId, `${path}.classId`);
43643
- nonEmptyString3(variant2.name, `${path}.name`);
43644
- nonEmptyString3(variant2.valueId, `${path}.valueId`);
43567
+ nonEmptyString2(variant2.classId, `${path}.classId`);
43568
+ nonEmptyString2(variant2.name, `${path}.name`);
43569
+ nonEmptyString2(variant2.valueId, `${path}.valueId`);
43645
43570
  if (variant2.folderId === null) return;
43646
- nonEmptyString3(variant2.folderId, `${path}.folderId`);
43571
+ nonEmptyString2(variant2.folderId, `${path}.folderId`);
43647
43572
  }
43648
43573
  function assertVariantFolder(value, path) {
43649
43574
  const folder = objectAt(value, path, [
@@ -43654,30 +43579,30 @@ function assertVariantFolder(value, path) {
43654
43579
  "binding"
43655
43580
  ]);
43656
43581
  assertIdentity2(folder, path, "variantFolder");
43657
- nonEmptyString3(folder.classId, `${path}.classId`);
43582
+ nonEmptyString2(folder.classId, `${path}.classId`);
43658
43583
  if (typeof folder.path !== "string")
43659
43584
  invalid(`${path}.path`, "must be a string.");
43660
43585
  if (folder.binding === null) {
43661
- nonEmptyString3(folder.path, `${path}.path`);
43586
+ nonEmptyString2(folder.path, `${path}.path`);
43662
43587
  return;
43663
43588
  }
43664
43589
  const binding = objectAt(folder.binding, `${path}.binding`, [
43665
43590
  "collectionMemberId",
43666
43591
  "collectionValueId"
43667
43592
  ]);
43668
- nonEmptyString3(
43593
+ nonEmptyString2(
43669
43594
  binding.collectionMemberId,
43670
43595
  `${path}.binding.collectionMemberId`
43671
43596
  );
43672
- nonEmptyString3(
43597
+ nonEmptyString2(
43673
43598
  binding.collectionValueId,
43674
43599
  `${path}.binding.collectionValueId`
43675
43600
  );
43676
43601
  }
43677
43602
  function assertConstructorBaseArgument(value, path) {
43678
43603
  const argument2 = objectAt(value, path, ["name", "code"]);
43679
- nonEmptyString3(argument2.name, `${path}.name`);
43680
- nonEmptyString3(argument2.code, `${path}.code`);
43604
+ nonEmptyString2(argument2.name, `${path}.name`);
43605
+ nonEmptyString2(argument2.code, `${path}.code`);
43681
43606
  }
43682
43607
  function assertInternalRecordRelation(value, path) {
43683
43608
  const relation = objectAt(value, path, [
@@ -43690,13 +43615,13 @@ function assertInternalRecordRelation(value, path) {
43690
43615
  "targetRecordId",
43691
43616
  "order"
43692
43617
  ]);
43693
- nonEmptyString3(relation.id, `${path}.id`);
43618
+ nonEmptyString2(relation.id, `${path}.id`);
43694
43619
  assertSourceIdentity(relation.source, `${path}.source`);
43695
- nonEmptyString3(relation.relationKind, `${path}.relationKind`);
43620
+ nonEmptyString2(relation.relationKind, `${path}.relationKind`);
43696
43621
  projectRecordKind2(relation.sourceRecordKind, `${path}.sourceRecordKind`);
43697
- nonEmptyString3(relation.sourceRecordId, `${path}.sourceRecordId`);
43622
+ nonEmptyString2(relation.sourceRecordId, `${path}.sourceRecordId`);
43698
43623
  projectRecordKind2(relation.targetRecordKind, `${path}.targetRecordKind`);
43699
- nonEmptyString3(relation.targetRecordId, `${path}.targetRecordId`);
43624
+ nonEmptyString2(relation.targetRecordId, `${path}.targetRecordId`);
43700
43625
  if (relation.order !== null && (typeof relation.order !== "number" || !Number.isInteger(relation.order) || relation.order < 0)) {
43701
43626
  invalid(`${path}.order`, "expected null or a non-negative integer.");
43702
43627
  }
@@ -44002,8 +43927,8 @@ function assertStaticMemberInvariants(manifest) {
44002
43927
  `static member ${JSON.stringify(memberName)} (${memberId}) has owner kind ${JSON.stringify(ownerKind)}; expected exactly one direct Class owner.`
44003
43928
  );
44004
43929
  }
44005
- const ownerClassId = nonEmptyString3(owner.classId, `${path}.owner.classId`);
44006
- const schemaKey = nonEmptyString3(
43930
+ const ownerClassId = nonEmptyString2(owner.classId, `${path}.owner.classId`);
43931
+ const schemaKey = nonEmptyString2(
44007
43932
  owner.schemaKey,
44008
43933
  `${path}.owner.schemaKey`
44009
43934
  );
@@ -44201,7 +44126,7 @@ function assertStaticMemberInvariants(manifest) {
44201
44126
  }
44202
44127
  }
44203
44128
  function assertIdentity2(value, path, expectedKind) {
44204
- nonEmptyString3(value.id, `${path}.id`);
44129
+ nonEmptyString2(value.id, `${path}.id`);
44205
44130
  assertSourceIdentity(value.source, `${path}.source`, expectedKind);
44206
44131
  }
44207
44132
  function assertSourceIdentity(value, path, expectedKind) {
@@ -44247,7 +44172,7 @@ function assertNeoSchemaClass(value, path) {
44247
44172
  ]
44248
44173
  );
44249
44174
  assertIdentity2(type, path, "class");
44250
- nonEmptyString3(type.name, `${path}.name`);
44175
+ nonEmptyString2(type.name, `${path}.name`);
44251
44176
  assertOptionalDocsText2(type.docsText, `${path}.docsText`);
44252
44177
  stringIn(
44253
44178
  type.declarationModifier,
@@ -44275,7 +44200,7 @@ function assertNeoSchemaClass(value, path) {
44275
44200
  );
44276
44201
  nullableNonEmptyString(type.targetMemberId, `${path}.targetMemberId`);
44277
44202
  if (type.requiredConstructorId !== void 0) {
44278
- nonEmptyString3(type.requiredConstructorId, `${path}.requiredConstructorId`);
44203
+ nonEmptyString2(type.requiredConstructorId, `${path}.requiredConstructorId`);
44279
44204
  }
44280
44205
  }
44281
44206
  function assertGenericParameter(value, path) {
@@ -44309,7 +44234,7 @@ function assertInterface(value, path) {
44309
44234
  ["docsText"]
44310
44235
  );
44311
44236
  assertIdentity2(neoInterface, path, "interface");
44312
- nonEmptyString3(neoInterface.name, `${path}.name`);
44237
+ nonEmptyString2(neoInterface.name, `${path}.name`);
44313
44238
  assertOptionalDocsText2(neoInterface.docsText, `${path}.docsText`);
44314
44239
  arrayOf(neoInterface.members, `${path}.members`, assertInterfaceMember);
44315
44240
  stringArray(neoInterface.extendsInterfaceIds, `${path}.extendsInterfaceIds`);
@@ -44324,8 +44249,8 @@ function assertInterfaceMember(value, path) {
44324
44249
  ["id", "kind", "name", "type", "settable", "accessModifier", "source"],
44325
44250
  ["docsText"]
44326
44251
  );
44327
- nonEmptyString3(member.id, `${path}.id`);
44328
- nonEmptyString3(member.name, `${path}.name`);
44252
+ nonEmptyString2(member.id, `${path}.id`);
44253
+ nonEmptyString2(member.name, `${path}.name`);
44329
44254
  assertOptionalDocsText2(member.docsText, `${path}.docsText`);
44330
44255
  assertType2(member.type, `${path}.type`);
44331
44256
  booleanAt(member.settable, `${path}.settable`);
@@ -44349,8 +44274,8 @@ function assertInterfaceMember(value, path) {
44349
44274
  ],
44350
44275
  ["docsText"]
44351
44276
  );
44352
- nonEmptyString3(member.id, `${path}.id`);
44353
- nonEmptyString3(member.name, `${path}.name`);
44277
+ nonEmptyString2(member.id, `${path}.id`);
44278
+ nonEmptyString2(member.name, `${path}.name`);
44354
44279
  assertOptionalDocsText2(member.docsText, `${path}.docsText`);
44355
44280
  assertFunctionSignature(member, path);
44356
44281
  assertInterfaceMemberAccessModifier(member.accessModifier, path);
@@ -44370,7 +44295,7 @@ function assertEnum2(value, path) {
44370
44295
  ["docsText"]
44371
44296
  );
44372
44297
  assertIdentity2(neoEnum, path, "enum");
44373
- nonEmptyString3(neoEnum.name, `${path}.name`);
44298
+ nonEmptyString2(neoEnum.name, `${path}.name`);
44374
44299
  assertOptionalDocsText2(neoEnum.docsText, `${path}.docsText`);
44375
44300
  arrayOf(neoEnum.options, `${path}.options`, assertEnumOption);
44376
44301
  assertSystem(neoEnum.system, `${path}.system`);
@@ -44378,7 +44303,7 @@ function assertEnum2(value, path) {
44378
44303
  const options = requireArray(neoEnum.options, `${path}.options`);
44379
44304
  options.forEach((entry, index) => {
44380
44305
  const option = requireRecord(entry, `${path}.options[${index}]`);
44381
- const key = nonEmptyString3(option.key, `${path}.options[${index}].key`);
44306
+ const key = nonEmptyString2(option.key, `${path}.options[${index}].key`);
44382
44307
  if (seen.has(key))
44383
44308
  invalid(`${path}.options[${index}].key`, "is duplicated.");
44384
44309
  seen.add(key);
@@ -44391,9 +44316,9 @@ function assertEnumOption(value, path) {
44391
44316
  ["id", "name", "key", "text", "source"],
44392
44317
  ["docsText"]
44393
44318
  );
44394
- nonEmptyString3(option.id, `${path}.id`);
44395
- nonEmptyString3(option.name, `${path}.name`);
44396
- nonEmptyString3(option.key, `${path}.key`);
44319
+ nonEmptyString2(option.id, `${path}.id`);
44320
+ nonEmptyString2(option.name, `${path}.name`);
44321
+ nonEmptyString2(option.key, `${path}.key`);
44397
44322
  stringAt(option.text, `${path}.text`);
44398
44323
  assertOptionalDocsText2(option.docsText, `${path}.docsText`);
44399
44324
  assertSourceIdentity(option.source, `${path}.source`, "enumOption");
@@ -44439,7 +44364,7 @@ function assertTextureTemplate(value, path) {
44439
44364
  "swizzle"
44440
44365
  ]);
44441
44366
  assertIdentity2(texture, path, "textureTemplate");
44442
- nonEmptyString3(texture.name, `${path}.name`);
44367
+ nonEmptyString2(texture.name, `${path}.name`);
44443
44368
  exactValue(texture.type, "texture-2d", `${path}.type`);
44444
44369
  stringIn(texture.textureType, TEXTURE_TYPES, `${path}.textureType`);
44445
44370
  exactValue(texture.textureShape, "2d", `${path}.textureShape`);
@@ -44684,7 +44609,7 @@ function assertAudioTemplate(value, path) {
44684
44609
  "preloadAudioData"
44685
44610
  ]);
44686
44611
  assertIdentity2(audio, path, "audioTemplate");
44687
- nonEmptyString3(audio.name, `${path}.name`);
44612
+ nonEmptyString2(audio.name, `${path}.name`);
44688
44613
  for (const field of [
44689
44614
  "forceToMono",
44690
44615
  "normalize",
@@ -44726,14 +44651,14 @@ function assertLocalization(value, path) {
44726
44651
  "mainLocaleDefaultStatusId"
44727
44652
  ]);
44728
44653
  assertIdentity2(localization, path, "localization");
44729
- nonEmptyString3(localization.mainLocale, `${path}.mainLocale`);
44654
+ nonEmptyString2(localization.mainLocale, `${path}.mainLocale`);
44730
44655
  arrayOf(
44731
44656
  localization.supportedLocales,
44732
44657
  `${path}.supportedLocales`,
44733
44658
  assertLocale
44734
44659
  );
44735
44660
  stringArray(localization.sortedStatusIds, `${path}.sortedStatusIds`);
44736
- nonEmptyString3(
44661
+ nonEmptyString2(
44737
44662
  localization.mainLocaleDefaultStatusId,
44738
44663
  `${path}.mainLocaleDefaultStatusId`
44739
44664
  );
@@ -44754,8 +44679,8 @@ function assertLocalizationStatus(value, path) {
44754
44679
  "system"
44755
44680
  ]);
44756
44681
  assertIdentity2(status, path, "localizationStatus");
44757
- nonEmptyString3(status.slug, `${path}.slug`);
44758
- nonEmptyString3(status.name, `${path}.name`);
44682
+ nonEmptyString2(status.slug, `${path}.slug`);
44683
+ nonEmptyString2(status.name, `${path}.name`);
44759
44684
  nullableString3(status.description, `${path}.description`);
44760
44685
  nullableString3(status.color, `${path}.color`);
44761
44686
  nullableString3(status.emoji, `${path}.emoji`);
@@ -44781,7 +44706,7 @@ function assertLocale(value, path) {
44781
44706
  "sortOrder",
44782
44707
  "archivedAt"
44783
44708
  ]);
44784
- nonEmptyString3(locale.locale, `${path}.locale`);
44709
+ nonEmptyString2(locale.locale, `${path}.locale`);
44785
44710
  nullableNonEmptyString(locale.sourceLocale, `${path}.sourceLocale`);
44786
44711
  nullableString3(locale.name, `${path}.name`);
44787
44712
  finiteNumber2(locale.sortOrder, `${path}.sortOrder`);
@@ -44846,7 +44771,7 @@ function requireArray(value, path) {
44846
44771
  }
44847
44772
  function stringArray(value, path) {
44848
44773
  arrayOf(value, path, (entry, entryPath) => {
44849
- nonEmptyString3(entry, entryPath);
44774
+ nonEmptyString2(entry, entryPath);
44850
44775
  });
44851
44776
  }
44852
44777
  function nullableStringArray(value, path) {
@@ -44856,8 +44781,8 @@ function nullableStringArray(value, path) {
44856
44781
  function stringRecord(value, path) {
44857
44782
  const record6 = requireRecord(value, path);
44858
44783
  for (const [key, entry] of Object.entries(record6)) {
44859
- nonEmptyString3(key, `${path} key`);
44860
- nonEmptyString3(entry, `${path}.${key}`);
44784
+ nonEmptyString2(key, `${path} key`);
44785
+ nonEmptyString2(entry, `${path}.${key}`);
44861
44786
  }
44862
44787
  }
44863
44788
  function uniqueIds(value, path) {
@@ -44865,7 +44790,7 @@ function uniqueIds(value, path) {
44865
44790
  const seen = /* @__PURE__ */ new Set();
44866
44791
  records2.forEach((entry, index) => {
44867
44792
  const record6 = requireRecord(entry, `${path}[${index}]`);
44868
- const id2 = nonEmptyString3(record6.id, `${path}[${index}].id`);
44793
+ const id2 = nonEmptyString2(record6.id, `${path}[${index}].id`);
44869
44794
  if (seen.has(id2))
44870
44795
  invalid(`${path}[${index}].id`, `duplicates id ${JSON.stringify(id2)}.`);
44871
44796
  seen.add(id2);
@@ -44875,7 +44800,7 @@ function nullableObject(value, path, assertion) {
44875
44800
  if (value === null) return;
44876
44801
  assertion(value, path);
44877
44802
  }
44878
- function nonEmptyString3(value, path) {
44803
+ function nonEmptyString2(value, path) {
44879
44804
  const result = stringAt(value, path);
44880
44805
  if (result.length === 0) invalid(path, "must not be empty.");
44881
44806
  return result;
@@ -44901,7 +44826,7 @@ function nullableString3(value, path) {
44901
44826
  }
44902
44827
  function nullableNonEmptyString(value, path) {
44903
44828
  if (value === null) return;
44904
- nonEmptyString3(value, path);
44829
+ nonEmptyString2(value, path);
44905
44830
  }
44906
44831
  function finiteNumber2(value, path) {
44907
44832
  if (typeof value !== "number" || !Number.isFinite(value)) {
@@ -57976,12 +57901,12 @@ function lowerStructuredLeafComponents(kind, label, expression, lowering) {
57976
57901
  function structuredLeafPartialAssignments(kind, label, value, emit) {
57977
57902
  const stored = value[STRUCTURED_LEAF_PARTIAL_KEY];
57978
57903
  const declared = structuredLeafFields(kind);
57979
- const unknown2 = Object.keys(stored).find(
57904
+ const unknown = Object.keys(stored).find(
57980
57905
  (key) => !declared.some((entry) => entry.key === key)
57981
57906
  );
57982
- if (unknown2 !== void 0) {
57907
+ if (unknown !== void 0) {
57983
57908
  throw new Error(
57984
- `${label} stores unknown field ${JSON.stringify(unknown2)}. ${structuredLeafTypeName(kind)} accepts ${structuredLeafFieldNames(kind).join(", ")}.`
57909
+ `${label} stores unknown field ${JSON.stringify(unknown)}. ${structuredLeafTypeName(kind)} accepts ${structuredLeafFieldNames(kind).join(", ")}.`
57985
57910
  );
57986
57911
  }
57987
57912
  const assignments = [];
@@ -88667,6 +88592,97 @@ function relationEndpointClassId(record6) {
88667
88592
  if (typeof record6.classId === "string") return record6.classId;
88668
88593
  return void 0;
88669
88594
  }
88595
+ function relationOrderMaintenanceNoopIds(currentRelations, changes) {
88596
+ const currentById = new Map(
88597
+ currentRelations.map((relation) => [relation.id, relation])
88598
+ );
88599
+ const currentByGroup = /* @__PURE__ */ new Map();
88600
+ for (const relation of currentRelations) {
88601
+ const group = relationOrderGroupKey(relation);
88602
+ const grouped = currentByGroup.get(group) ?? /* @__PURE__ */ new Map();
88603
+ grouped.set(relation.id, relation);
88604
+ currentByGroup.set(group, grouped);
88605
+ }
88606
+ const changesByGroup = /* @__PURE__ */ new Map();
88607
+ const candidatesByGroup = /* @__PURE__ */ new Map();
88608
+ for (const change of changes) {
88609
+ const before = currentById.get(change.recordId);
88610
+ const groups = /* @__PURE__ */ new Set();
88611
+ if (before !== void 0) groups.add(relationOrderGroupKey(before));
88612
+ if (change.deleted !== true && change.operation !== "delete" && isInternalRecordRelation(change.nextData)) {
88613
+ groups.add(relationOrderGroupKey(change.nextData));
88614
+ }
88615
+ for (const group of groups) {
88616
+ const grouped = changesByGroup.get(group) ?? [];
88617
+ grouped.push(change);
88618
+ changesByGroup.set(group, grouped);
88619
+ }
88620
+ if (relationOrderOnlyChangeIsCandidate(before, change)) {
88621
+ const group = relationOrderGroupKey(change.nextData);
88622
+ const candidates = candidatesByGroup.get(group) ?? [];
88623
+ candidates.push(change);
88624
+ candidatesByGroup.set(group, candidates);
88625
+ }
88626
+ }
88627
+ const noops = /* @__PURE__ */ new Set();
88628
+ for (const [group, candidates] of candidatesByGroup) {
88629
+ const groupChanges = changesByGroup.get(group) ?? [];
88630
+ const candidateSet = new Set(candidates);
88631
+ if (groupChanges.some((change) => !candidateSet.has(change))) continue;
88632
+ const current = currentByGroup.get(group) ?? /* @__PURE__ */ new Map();
88633
+ const projected = new Map(current);
88634
+ for (const change of groupChanges) {
88635
+ const before = currentById.get(change.recordId);
88636
+ if (before !== void 0 && relationOrderGroupKey(before) === group) {
88637
+ projected.delete(before.id);
88638
+ }
88639
+ if (change.deleted !== true && change.operation !== "delete" && isInternalRecordRelation(change.nextData) && relationOrderGroupKey(change.nextData) === group) {
88640
+ projected.set(change.nextData.id, change.nextData);
88641
+ }
88642
+ }
88643
+ if (!sameRelationIdSequence(current.values(), projected.values())) continue;
88644
+ for (const candidate of candidates) noops.add(candidate.recordId);
88645
+ }
88646
+ return noops;
88647
+ }
88648
+ function relationOrderOnlyChangeIsCandidate(before, change) {
88649
+ if (change.recordKind !== "internal-record-relation") return false;
88650
+ if (change.operation !== "update" || change.deleted === true) return false;
88651
+ if (before === void 0 || !isInternalRecordRelation(change.nextData)) {
88652
+ return false;
88653
+ }
88654
+ const nextRelation = change.nextData;
88655
+ const contract = INTERNAL_RECORD_RELATION_KIND_CONTRACTS.find(
88656
+ (candidate) => candidate.relationKind === nextRelation.relationKind
88657
+ );
88658
+ if (contract?.merge !== "ordered-union") return false;
88659
+ return projectRecordDataIsSemanticallyEqual(
88660
+ relationWithoutOrderKey(before),
88661
+ relationWithoutOrderKey(nextRelation)
88662
+ );
88663
+ }
88664
+ function relationWithoutOrderKey(value) {
88665
+ const semantic = projectRecordSemanticData(value);
88666
+ if (!isPlainRecord3(semantic)) return semantic;
88667
+ const result = { ...semantic };
88668
+ delete result.orderKey;
88669
+ return result;
88670
+ }
88671
+ function relationOrderGroupKey(relation) {
88672
+ return [
88673
+ relation.relationKind,
88674
+ relation.sourceRecordKind,
88675
+ relation.sourceRecordId
88676
+ ].join("\0");
88677
+ }
88678
+ function sameRelationIdSequence(left, right) {
88679
+ const sequence = (relations) => [...relations].sort(
88680
+ (a, b) => (a.orderKey ?? "").localeCompare(b.orderKey ?? "") || a.id.localeCompare(b.id)
88681
+ ).map((relation) => relation.id);
88682
+ const leftIds = sequence(left);
88683
+ const rightIds = sequence(right);
88684
+ return leftIds.length === rightIds.length && leftIds.every((relationId, index) => relationId === rightIds[index]);
88685
+ }
88670
88686
  function isPlainRecord3(value) {
88671
88687
  if (value === null || typeof value !== "object") return false;
88672
88688
  return !Array.isArray(value);
@@ -97620,6 +97636,47 @@ function orderLocalizedTextWritesBesideLinks(prepared) {
97620
97636
  });
97621
97637
  return ordered;
97622
97638
  }
97639
+ function projectVersionBasePayloadBytes(document, changes) {
97640
+ const targets = /* @__PURE__ */ new Map();
97641
+ for (const change of changes) {
97642
+ if (change.operation === "create") continue;
97643
+ const bucket = PROJECT_RECORD_BUCKETS[change.recordKind];
97644
+ let ids = targets.get(bucket);
97645
+ if (ids === void 0) {
97646
+ ids = /* @__PURE__ */ new Set();
97647
+ targets.set(bucket, ids);
97648
+ }
97649
+ ids.add(change.recordId);
97650
+ }
97651
+ const sizes = /* @__PURE__ */ new Map();
97652
+ const raw = {
97653
+ ...document,
97654
+ values: document.physicalValues ?? document.values
97655
+ };
97656
+ const encoder = new TextEncoder();
97657
+ for (const [bucket, ids] of targets) {
97658
+ const value = raw[bucket];
97659
+ if (value == null) continue;
97660
+ const rows = Array.isArray(value) ? value : [value];
97661
+ for (const row of rows) {
97662
+ if (typeof row !== "object" || row === null || !("id" in row) || typeof row.id !== "string")
97663
+ throw new Error("Transaction base record has no ID in " + bucket);
97664
+ if (ids.has(row.id))
97665
+ sizes.set(
97666
+ JSON.stringify([bucket, row.id]),
97667
+ encoder.encode(canonicalJsonStringify(row)).byteLength
97668
+ );
97669
+ }
97670
+ }
97671
+ return changes.map(
97672
+ (change) => sizes.get(
97673
+ JSON.stringify([
97674
+ PROJECT_RECORD_BUCKETS[change.recordKind],
97675
+ change.recordId
97676
+ ])
97677
+ ) ?? 0
97678
+ );
97679
+ }
97623
97680
  function addProjectVersionTransactionBudgets(left, right) {
97624
97681
  return {
97625
97682
  argumentBytes: left.argumentBytes + right.argumentBytes,
@@ -98491,13 +98548,6 @@ function* prepareServerOwnedSchemaCommitPasses(args) {
98491
98548
  prepared,
98492
98549
  contentHashHeads: args.contentHashHeads
98493
98550
  });
98494
- if (args.initializerMaterialization !== void 0) {
98495
- reconcileInitializerMaterializationTransport({
98496
- prepared,
98497
- transport: args.initializerMaterialization,
98498
- document: applyProjectVersionWriteChanges(args.document, prepared)
98499
- });
98500
- }
98501
98551
  drainConstructedGraphValidations({
98502
98552
  document: args.document,
98503
98553
  prepared,
@@ -98966,156 +99016,6 @@ function replayedCreationDataMatches(args) {
98966
99016
  }
98967
99017
  return true;
98968
99018
  }
98969
- function reconcileInitializerMaterializationTransport(args) {
98970
- const roots = new Map(
98971
- args.transport.roots.map((root) => [root.sourceValueId, root])
98972
- );
98973
- if (roots.size !== args.transport.roots.length) {
98974
- throw new Error(
98975
- "Initializer materialization transport contains duplicate source roots."
98976
- );
98977
- }
98978
- const serverCreatedByRoot = /* @__PURE__ */ new Map();
98979
- for (const change of args.prepared) {
98980
- if (change.recordKind !== "value" || change.operation === "delete" || change.nextData === void 0) {
98981
- continue;
98982
- }
98983
- const details = change.intent.details;
98984
- if (typeof details !== "object" || details === null || Reflect.get(details, "source") !== "server-initializer-materialization") {
98985
- continue;
98986
- }
98987
- const sourceValueId = Reflect.get(details, "sourceValueId");
98988
- if (typeof sourceValueId !== "string") continue;
98989
- const grouped = serverCreatedByRoot.get(sourceValueId) ?? [];
98990
- grouped.push(change);
98991
- serverCreatedByRoot.set(sourceValueId, grouped);
98992
- }
98993
- const serverRootIds = new Set(serverCreatedByRoot.keys());
98994
- for (const sourceValueId of roots.keys()) serverRootIds.add(sourceValueId);
98995
- const preparedValueChangeById = /* @__PURE__ */ new Map();
98996
- for (const change of args.prepared) {
98997
- if (change.recordKind !== "value") continue;
98998
- if (change.operation === "delete") continue;
98999
- if (change.nextData !== void 0)
99000
- preparedValueChangeById.set(change.recordId, change);
99001
- }
99002
- const allServerIds = /* @__PURE__ */ new Set();
99003
- for (const sourceValueId of serverRootIds) {
99004
- allServerIds.add(sourceValueId);
99005
- for (const change of serverCreatedByRoot.get(sourceValueId) ?? []) {
99006
- allServerIds.add(change.recordId);
99007
- }
99008
- }
99009
- const graph = createVariantMaterializedValueGraphContext(
99010
- args.document,
99011
- args.document.variants ?? []
99012
- );
99013
- const serverOwners = graph.ownersForValues(allServerIds);
99014
- const effectiveValues = new EffectiveValueReader(args.document);
99015
- for (const sourceValueId of serverRootIds) {
99016
- const local = roots.get(sourceValueId);
99017
- const rootChange = preparedValueChangeById.get(sourceValueId);
99018
- if (local === void 0)
99019
- throw new Error(
99020
- `Initializer materialization parity failed for value "${sourceValueId}": client root is missing.`
99021
- );
99022
- if (rootChange === void 0)
99023
- throw new Error(
99024
- `Initializer materialization parity failed for value "${sourceValueId}": server root is missing.`
99025
- );
99026
- if (local.rows.length === 0)
99027
- throw new Error(
99028
- `Initializer materialization transport for value "${sourceValueId}" has no rows.`
99029
- );
99030
- if (local.rows[0]?.id !== sourceValueId) {
99031
- throw new Error(
99032
- `Initializer materialization transport for value "${sourceValueId}" must be root-first.`
99033
- );
99034
- }
99035
- const serverChanges = [
99036
- rootChange,
99037
- ...serverCreatedByRoot.get(sourceValueId) ?? []
99038
- ];
99039
- if (serverChanges.length !== local.rows.length) {
99040
- throw new Error(
99041
- `Initializer materialization parity failed for value "${sourceValueId}": client produced ${local.rows.length} rows and server produced ${serverChanges.length}.`
99042
- );
99043
- }
99044
- const identities = /* @__PURE__ */ new Set();
99045
- const serverIdToAssigned = /* @__PURE__ */ new Map();
99046
- for (let index = 0; index < local.rows.length; index += 1) {
99047
- const id2 = local.rows[index].id;
99048
- if (typeof id2 !== "string")
99049
- throw new Error(
99050
- `Initializer materialization transport for value "${sourceValueId}" contains an invalid row id at index ${index}.`
99051
- );
99052
- if (identities.has(id2))
99053
- throw new Error(
99054
- `Initializer materialization transport for value "${sourceValueId}" contains duplicate row id "${id2}".`
99055
- );
99056
- identities.add(id2);
99057
- serverIdToAssigned.set(serverChanges[index].recordId, id2);
99058
- }
99059
- const rootRow = graph.valuesById.get(sourceValueId);
99060
- const owner = effectiveValues.memberForValue(sourceValueId);
99061
- if (rootRow === void 0)
99062
- throw new Error(
99063
- `Initializer parity root "${sourceValueId}" has no value row.`
99064
- );
99065
- if (owner === void 0)
99066
- throw new Error(
99067
- `Initializer parity root "${sourceValueId}" has no member placement.`
99068
- );
99069
- const env = graph.genericEnvironmentForRow(rootRow, owner);
99070
- const type = graph.typeInfoForMember(owner, env);
99071
- if (type === null)
99072
- throw new Error(
99073
- `Initializer parity root "${sourceValueId}" has no concrete type.`
99074
- );
99075
- const assignedServerRows = [];
99076
- const serverRowsById = /* @__PURE__ */ new Map();
99077
- for (const change of serverChanges) {
99078
- if (!isMemberValue(change.nextData))
99079
- throw new Error(
99080
- `Initializer materialization server row "${change.recordId}" is invalid.`
99081
- );
99082
- const row = graph.rewriteReferences({
99083
- row: change.nextData,
99084
- replacements: serverIdToAssigned,
99085
- ownerValueId: change.recordId,
99086
- owner: serverOwners.get(change.recordId)
99087
- });
99088
- assignedServerRows.push(row);
99089
- serverRowsById.set(row.id, row);
99090
- }
99091
- const normalizedServer = effectiveValues.withRowOverrides(serverRowsById).normalizeTypedRow(sourceValueId, type, owner, env, identities);
99092
- const localRows = /* @__PURE__ */ new Map();
99093
- for (const row of local.rows) {
99094
- if (!isMemberValue(row))
99095
- throw new Error(
99096
- `Initializer materialization transport for value "${sourceValueId}" contains an invalid value row.`
99097
- );
99098
- localRows.set(row.id, row);
99099
- }
99100
- const normalizedLocal = effectiveValues.withRowOverrides(localRows).normalizeTypedRow(sourceValueId, type, owner, env, identities);
99101
- if (!effectiveValuesEqual(normalizedServer, normalizedLocal)) {
99102
- throw new Error(
99103
- `Initializer materialization parity failed for value "${sourceValueId}": CLI and server graphs differ.`
99104
- );
99105
- }
99106
- for (const [index, change] of serverChanges.entries()) {
99107
- const assignedRow = assignedServerRows[index];
99108
- change.recordId = assignedRow.id;
99109
- change.nextData = assignedRow;
99110
- }
99111
- roots.delete(sourceValueId);
99112
- }
99113
- if (roots.size > 0) {
99114
- throw new Error(
99115
- `Initializer materialization transport names roots the server did not materialize: ${[...roots.keys()].join(", ")}.`
99116
- );
99117
- }
99118
- }
99119
99019
  function constructorArgumentsSemanticallyEqual(args) {
99120
99020
  const current = args.currentReader;
99121
99021
  const replayRows = /* @__PURE__ */ new Map([
@@ -99873,9 +99773,9 @@ function materializeAuthoredValueSeeds(args) {
99873
99773
  member: materializationMember,
99874
99774
  // P61 must leave a computed static root as an init-backed prepared
99875
99775
  // row until `materializePreparedInstanceInitializers` runs. The
99876
- // default builder evaluates it immediately, which bypasses both
99877
- // the server-initializer-materialization grouping and the CLI's
99878
- // parity/identity transport for evaluator-created interior rows.
99776
+ // default builder evaluates it immediately, which bypasses the
99777
+ // initializer-materialization grouping for evaluator-created
99778
+ // interior rows.
99879
99779
  seed: { ...seed, values: seed.values ?? [] }
99880
99780
  });
99881
99781
  const { createdValues, localizedTexts, storageKeyDeclarations, rootValue } = materialized;
@@ -113037,12 +112937,12 @@ function lowerGenericRelations(context, analysis) {
113037
112937
  );
113038
112938
  }
113039
112939
  const args = expressionArguments(expression);
113040
- const unknown2 = [...args.keys()].find(
112940
+ const unknown = [...args.keys()].find(
113041
112941
  (name) => !["kind", "source", "target", "order"].includes(name)
113042
112942
  );
113043
- if (unknown2 !== void 0) {
112943
+ if (unknown !== void 0) {
113044
112944
  throw new Error(
113045
- `ProjectRelations[${index}] has unknown argument ${JSON.stringify(unknown2)}.`
112945
+ `ProjectRelations[${index}] has unknown argument ${JSON.stringify(unknown)}.`
113046
112946
  );
113047
112947
  }
113048
112948
  const kind = args.get("kind");
@@ -117585,7 +117485,7 @@ function materializeInitializersLocallyV4(args) {
117585
117485
  },
117586
117486
  // §4: a call-site field is an explicit override even when it equals the
117587
117487
  // class default, so the evaluated construction's own field list is what
117588
- // pins rows against collapse. The server commit pins the same set.
117488
+ // pins rows against collapse. Push preparation pins the same set.
117589
117489
  pinnedRootSchemaKeys,
117590
117490
  virtualValueIdForSource: (instanceRootId, sourceIdentity3) => isPendingId(instanceRootId) || hasPendingVirtualSourceIdentity(sourceIdentity3) ? pendingVirtualValueId(instanceRootId, sourceIdentity3) : virtualValueId(instanceRootId, sourceIdentity3)
117591
117491
  });
@@ -117902,6 +117802,25 @@ function compareWorkspacePaths(left, right) {
117902
117802
  if (left > right) return 1;
117903
117803
  return 0;
117904
117804
  }
117805
+ function materializeWorkspaceStatusInitializers(workspace, status, forceRecompile) {
117806
+ return materializeInitializersLocallyV4({
117807
+ workspace,
117808
+ forceRecompile,
117809
+ changes: status.changes.map((change) => ({
117810
+ recordKind: change.recordKind,
117811
+ recordId: change.recordId,
117812
+ operation: change.kind,
117813
+ nextData: change.kind === "delete" ? void 0 : change.nextData,
117814
+ deleted: change.kind === "delete" ? true : void 0,
117815
+ intent: createNeoCliPushIntent(change),
117816
+ expectedBaseContentHash: change.kind === "create" ? null : change.casBaseHash ?? null
117817
+ })),
117818
+ authoredValueSeeds: Array.from(
117819
+ status.authoredValueSeeds,
117820
+ ([memberId, seed]) => ({ memberId, ...seed })
117821
+ )
117822
+ });
117823
+ }
117905
117824
  function computeWorkspaceStatus(workspace, options) {
117906
117825
  let phaseStarted = performance.now();
117907
117826
  options.onPhase?.("Reading project schema\u2026");
@@ -118649,39 +118568,25 @@ function computeWorkspaceStatus(workspace, options) {
118649
118568
  )
118650
118569
  );
118651
118570
  }
118652
- let localInitializerMaterialization;
118653
- try {
118654
- localInitializerMaterialization = materializeInitializersLocallyV4({
118655
- workspace,
118656
- forceRecompile: options.forceRecompile,
118657
- changes: changes.map((change) => ({
118658
- recordKind: change.recordKind,
118659
- recordId: change.recordId,
118660
- operation: change.kind,
118661
- nextData: change.kind === "delete" ? void 0 : change.nextData,
118662
- deleted: change.kind === "delete" ? true : void 0,
118663
- intent: createNeoCliPushIntent(change),
118664
- expectedBaseContentHash: change.kind === "create" ? null : change.casBaseHash ?? null
118665
- })),
118666
- authoredValueSeeds: Array.from(
118667
- authoredValueSeeds,
118668
- ([memberId, seed]) => ({
118669
- memberId,
118670
- ...seed
118671
- })
118672
- )
118673
- });
118674
- } catch (error) {
118675
- parseErrors.push(
118676
- new SchemaSourceError(
118677
- error instanceof Error ? error.message : String(error),
118678
- "<initializer-materialization>",
118679
- 1,
118680
- 1
118681
- )
118682
- );
118571
+ if (options.skipInitializerMaterialization !== true) {
118572
+ try {
118573
+ materializeWorkspaceStatusInitializers(
118574
+ workspace,
118575
+ { changes, authoredValueSeeds },
118576
+ options.forceRecompile
118577
+ );
118578
+ } catch (error) {
118579
+ parseErrors.push(
118580
+ new SchemaSourceError(
118581
+ error instanceof Error ? error.message : String(error),
118582
+ "<initializer-materialization>",
118583
+ 1,
118584
+ 1
118585
+ )
118586
+ );
118587
+ }
118588
+ reportPhase("initializer-materialization");
118683
118589
  }
118684
- reportPhase("initializer-materialization");
118685
118590
  return {
118686
118591
  ...projectAnalysisV4 === null ? {} : {
118687
118592
  sourceSnapshot: {
@@ -118697,7 +118602,6 @@ function computeWorkspaceStatus(workspace, options) {
118697
118602
  reconstructed: reconstructed3,
118698
118603
  authoredValueSeeds,
118699
118604
  pendingValueIdentitySites: valueLowerRegistry.pendingValueIdentitySites,
118700
- localInitializerMaterialization,
118701
118605
  binaryChanges,
118702
118606
  binaryFiles,
118703
118607
  initConversions: collectInitDefaultConversions(
@@ -119779,6 +119683,7 @@ function verifyProjectSourceCommitAgainstStateV4(args) {
119779
119683
  const status = computeWorkspaceStatus(workspace, {
119780
119684
  forceRecompile: args.forceRecompile,
119781
119685
  skipProjectBinaryInspection: true,
119686
+ skipInitializerMaterialization: true,
119782
119687
  useBuildCaches: false,
119783
119688
  writeProjectAnalysisCache: () => void 0,
119784
119689
  trustedPendingProjectFiles,
@@ -119824,9 +119729,6 @@ function verifyProjectSourceCommitAgainstStateV4(args) {
119824
119729
  ...rewrite(seed)
119825
119730
  })
119826
119731
  );
119827
- const expectedInitializerMaterialization = rewrite(
119828
- status.localInitializerMaterialization ?? { roots: [] }
119829
- );
119830
119732
  for (const pendingId2 of assignments.keys()) {
119831
119733
  if (!usedAssignments.has(pendingId2)) {
119832
119734
  throw new ProjectSourceCommitVerificationError(
@@ -119845,10 +119747,6 @@ function verifyProjectSourceCommitAgainstStateV4(args) {
119845
119747
  });
119846
119748
  compareChanges(expectedChanges, verifiableChanges);
119847
119749
  compareSeeds(expectedSeeds, args.authoredValueSeeds);
119848
- compareInitializerMaterialization(
119849
- expectedInitializerMaterialization,
119850
- args.initializerMaterialization ?? { roots: [] }
119851
- );
119852
119750
  }
119853
119751
  function isDerivedOnlyRefresh(change, stateRecords) {
119854
119752
  if (change.operation !== "update") return false;
@@ -120242,33 +120140,6 @@ function compareSeeds(expected, received) {
120242
120140
  );
120243
120141
  }
120244
120142
  }
120245
- function compareInitializerMaterialization(expected, received) {
120246
- const normalize = (transport) => ({
120247
- roots: transport.roots.map((root) => ({
120248
- sourceValueId: root.sourceValueId,
120249
- rows: [...root.rows].map((row) => {
120250
- const normalized = { ...row };
120251
- delete normalized.createdAt;
120252
- delete normalized.updatedAt;
120253
- return normalized;
120254
- }).sort(
120255
- (left, right) => String(left.id ?? "").localeCompare(String(right.id ?? ""))
120256
- )
120257
- })).sort(
120258
- (left, right) => left.sourceValueId.localeCompare(right.sourceValueId)
120259
- )
120260
- });
120261
- const normalizedExpected = normalize(expected);
120262
- const normalizedReceived = normalize(received);
120263
- if (canonicalStringify(normalizedExpected) !== canonicalStringify(normalizedReceived)) {
120264
- const difference = firstDifference(normalizedExpected, normalizedReceived);
120265
- const rootIndex = difference === null ? null : /^\$\.roots\[(\d+)\]/u.exec(difference.path)?.[1];
120266
- const sourceValueId = rootIndex === null || rootIndex === void 0 ? void 0 : normalizedExpected.roots[Number(rootIndex)]?.sourceValueId;
120267
- throw new ProjectSourceCommitVerificationError(
120268
- `Source commit initializer materialization does not match trusted evaluation${difference === null ? "." : `${sourceValueId === void 0 ? "" : ` for root ${JSON.stringify(sourceValueId)}`} at ${difference.path}: trusted ${formatDifferenceValue(difference.trusted)}, submitted ${formatDifferenceValue(difference.submitted)}.`}`
120269
- );
120270
- }
120271
- }
120272
120143
  function normalizeSeedForComparison(seed) {
120273
120144
  const normalized = { ...seed };
120274
120145
  if (seed.values !== void 0) {
@@ -120376,7 +120247,7 @@ var init_trusted_commit_verification = __esm({
120376
120247
  });
120377
120248
 
120378
120249
  // src/project-source/server-preparation-preflight.ts
120379
- function assertServerPreparationSucceeds(args) {
120250
+ function prepareClientPush(args) {
120380
120251
  for (const change of args.changes) {
120381
120252
  if (change.recordKind !== "value" || change.operation !== "update") {
120382
120253
  continue;
@@ -120388,14 +120259,40 @@ function assertServerPreparationSucceeds(args) {
120388
120259
  });
120389
120260
  if (refusal !== null) throw new ServerPreparationPreflightError(refusal);
120390
120261
  }
120262
+ const base = readPulledPreparationBase(args);
120263
+ let prepared;
120391
120264
  try {
120392
- return prepareServerPreparationChanges({
120393
- ...args,
120394
- initializerMaterialization: args.localInitializerMaterialization
120395
- });
120265
+ prepared = prepareAgainstPulledBase(args, base);
120396
120266
  } catch (error) {
120397
120267
  throw locateBodyCompileFailure(error, args.sourceByRecord);
120398
120268
  }
120269
+ const relationOrderNoopIds = relationOrderMaintenanceNoopIds(
120270
+ base.document.internalRecordRelations ?? [],
120271
+ prepared
120272
+ );
120273
+ const changes = [];
120274
+ for (const change of prepared) {
120275
+ if (change.recordKind === "internal-record-relation" && relationOrderNoopIds.has(change.recordId)) {
120276
+ continue;
120277
+ }
120278
+ changes.push({
120279
+ ...change,
120280
+ expectedBaseContentHash: change.expectedBaseContentHash === void 0 ? pulledCasBaseHash(
120281
+ change,
120282
+ args.workspace.state.records[`${change.recordKind}:${change.recordId}`]
120283
+ ) : change.expectedBaseContentHash
120284
+ });
120285
+ }
120286
+ return {
120287
+ changes,
120288
+ basePayloadBytes: projectVersionBasePayloadBytes(base.document, changes)
120289
+ };
120290
+ }
120291
+ function pulledCasBaseHash(change, record6) {
120292
+ if (change.operation === "create") return null;
120293
+ if (record6 === void 0) return null;
120294
+ if (record6.conflictServerHash !== void 0) return record6.conflictServerHash;
120295
+ return record6.contentHash;
120399
120296
  }
120400
120297
  function assertDerivedEdgeCompatibility(workspace) {
120401
120298
  const localVersion = PROJECT_SNAPSHOT_DERIVED_EDGE_EXTRACTOR_VERSION;
@@ -120460,15 +120357,22 @@ function prepareWithScopedSafetyValve(args) {
120460
120357
  args.validate(full);
120461
120358
  return full;
120462
120359
  }
120463
- function prepareServerPreparationChanges(args) {
120360
+ function readPulledPreparationBase(args) {
120464
120361
  const serverTimestamp = args.serverTimestamp ?? Date.now();
120465
120362
  const rawDocument = pulledProjectDocumentRaw(args.workspace);
120466
- const document = withReplayValueIdFactory(
120467
- withStoredValueBase(readProjectDocument(rawDocument)),
120468
- args.createValueId,
120363
+ return {
120364
+ rawDocument,
120365
+ document: withReplayValueIdFactory(
120366
+ withStoredValueBase(readProjectDocument(rawDocument)),
120367
+ args.createValueId,
120368
+ serverTimestamp
120369
+ ),
120370
+ contentHashHeads: readProjectDocumentContentHashHeads(rawDocument),
120469
120371
  serverTimestamp
120470
- );
120471
- const contentHashHeads = readProjectDocumentContentHashHeads(rawDocument);
120372
+ };
120373
+ }
120374
+ function prepareAgainstPulledBase(args, base) {
120375
+ const { rawDocument, document, contentHashHeads, serverTimestamp } = base;
120472
120376
  const changes = args.changes.map((change) => ({
120473
120377
  ...change,
120474
120378
  recordKind: narrowRecordKind(
@@ -120520,7 +120424,6 @@ function prepareServerPreparationChanges(args) {
120520
120424
  contentHashHeads,
120521
120425
  changes: trustedChanges,
120522
120426
  authoredValueSeeds: args.authoredValueSeeds,
120523
- initializerMaterialization: args.initializerMaterialization,
120524
120427
  // A CLI push is always a trusted-source commit, so the server always
120525
120428
  // expands read-only source conversions for it.
120526
120429
  expandReadOnlySourceConversions: true,
@@ -120886,6 +120789,8 @@ var init_server_preparation_preflight = __esm({
120886
120789
  init_project_document_read();
120887
120790
  init_project_snapshot_derived_edges();
120888
120791
  init_project_version_schema_commit();
120792
+ init_project_version_relation_sweep_trigger();
120793
+ init_project_version_transaction_planning();
120889
120794
  init_project_version_whole_graph_validation();
120890
120795
  init_project_world_placement_bindings();
120891
120796
  init_build_default_member_value();
@@ -130626,18 +130531,28 @@ async function createConvexPushConnection(workspace) {
130626
130531
  const bytes = Buffer2.from(json);
130627
130532
  if (bytes.byteLength > SCHEMA_COMMIT_HTTP_MAX_DECODED_BYTES)
130628
130533
  throw new NeoApiError(
130629
- "Schema commit requires the large-payload route.",
130534
+ `Schema commit is ${bytes.byteLength} bytes decoded; the limit is ${SCHEMA_COMMIT_HTTP_MAX_DECODED_BYTES}.`,
130630
130535
  413,
130631
- { error: "schema-commit-route-required" }
130536
+ {
130537
+ error: "schema-commit-too-large",
130538
+ measure: "decoded",
130539
+ bytes: bytes.byteLength,
130540
+ limitBytes: SCHEMA_COMMIT_HTTP_MAX_DECODED_BYTES
130541
+ }
130632
130542
  );
130633
130543
  const compressed = bytes.byteLength >= 1024 ? gzipSync(bytes) : bytes;
130634
130544
  const gzip = compressed.byteLength < bytes.byteLength;
130635
130545
  const payload = gzip ? compressed : bytes;
130636
130546
  if (payload.byteLength > SCHEMA_COMMIT_HTTP_MAX_BYTES)
130637
130547
  throw new NeoApiError(
130638
- "Schema commit exceeds the HTTP body limit.",
130548
+ `Schema commit is ${payload.byteLength} bytes encoded; the limit is ${SCHEMA_COMMIT_HTTP_MAX_BYTES}.`,
130639
130549
  413,
130640
- { error: "schema-commit-route-required" }
130550
+ {
130551
+ error: "schema-commit-too-large",
130552
+ measure: "encoded",
130553
+ bytes: payload.byteLength,
130554
+ limitBytes: SCHEMA_COMMIT_HTTP_MAX_BYTES
130555
+ }
130641
130556
  );
130642
130557
  const client = new NeoApiClient(siteUrl, await tokenCache.getToken());
130643
130558
  const path = `${SCHEMA_COMMIT_HTTP_PATH}?${new URLSearchParams({ projectId: workspace.config.projectId, versionId: workspace.config.versionId })}`;
@@ -132103,7 +132018,7 @@ import {
132103
132018
  statSync
132104
132019
  } from "node:fs";
132105
132020
  import { join as join11, relative as relative6, sep as sep6 } from "node:path";
132106
- function assignPendingIds(changes, authoredValueSeeds, reconstructed3, localInitializerMaterialization) {
132021
+ function assignPendingIds(changes, authoredValueSeeds, reconstructed3) {
132107
132022
  const assigned = /* @__PURE__ */ new Map();
132108
132023
  const assign = (pendingId2) => {
132109
132024
  const existing = assigned.get(pendingId2);
@@ -132178,9 +132093,6 @@ function assignPendingIds(changes, authoredValueSeeds, reconstructed3, localInit
132178
132093
  collect(record6.fullData);
132179
132094
  }
132180
132095
  }
132181
- if (localInitializerMaterialization !== void 0) {
132182
- collect(localInitializerMaterialization);
132183
- }
132184
132096
  const rewriteString = createIdentityRewriter(assigned);
132185
132097
  const rewrite = (value) => {
132186
132098
  if (assigned.size === 0) return value;
@@ -132290,16 +132202,7 @@ function assignPendingIds(changes, authoredValueSeeds, reconstructed3, localInit
132290
132202
  reconstructed3.set(key, record6);
132291
132203
  }
132292
132204
  }
132293
- const rewrittenLocalInitializerMaterialization = localInitializerMaterialization === void 0 ? void 0 : rewrite(
132294
- localInitializerMaterialization
132295
- );
132296
- return {
132297
- assigned,
132298
- authoredValueSeeds: rewrittenSeeds,
132299
- ...rewrittenLocalInitializerMaterialization === void 0 ? {} : {
132300
- localInitializerMaterialization: rewrittenLocalInitializerMaterialization
132301
- }
132302
- };
132205
+ return { assigned, authoredValueSeeds: rewrittenSeeds };
132303
132206
  }
132304
132207
  function pendingInterfaceMemberSymbolOwner(value) {
132305
132208
  const marker = ":member:";
@@ -132315,11 +132218,14 @@ function pendingInterfaceMemberSymbolOwner(value) {
132315
132218
  }
132316
132219
  async function commitProjectVersionChanges(args) {
132317
132220
  const { workspace } = args;
132318
- const body = {
132221
+ const body = clientPreparedCommitBody({
132222
+ workspace,
132319
132223
  operation: args.operation,
132320
- changes: args.changes,
132321
- authoredValueSeeds: [],
132322
- initializerMaterialization: { roots: [] },
132224
+ prepared: prepareClientPush({
132225
+ workspace,
132226
+ changes: args.changes,
132227
+ authoredValueSeeds: []
132228
+ }),
132323
132229
  stagedFiles: [],
132324
132230
  stagedUploadSessionId: null,
132325
132231
  // The asynchronous path keys reconnects on this identity; the rows name
@@ -132330,11 +132236,8 @@ async function commitProjectVersionChanges(args) {
132330
132236
  )
132331
132237
  ).digest("hex"),
132332
132238
  pendingIdAssignments: {},
132333
- summary: args.summary,
132334
- headTransactionHash: workspace.state.headTransactionHash ?? null,
132335
- derivedEdgeExtractorVersion: PROJECT_SNAPSHOT_DERIVED_EDGE_EXTRACTOR_VERSION,
132336
- forceRecompile: false
132337
- };
132239
+ summary: args.summary
132240
+ });
132338
132241
  const reporter = createPushProgressReporter(args.json, args.progressLabel);
132339
132242
  reporter.report({
132340
132243
  type: "project-transaction-progress",
@@ -132349,19 +132252,7 @@ async function commitProjectVersionChanges(args) {
132349
132252
  });
132350
132253
  try {
132351
132254
  const connection = await createConvexPushConnection(workspace);
132352
- let response;
132353
- try {
132354
- response = await connection.submit(body, false);
132355
- } catch (error) {
132356
- if (!(error instanceof NeoApiError) || error.status !== 413 || !isObjectRecord2(error.body) || error.body.error !== "schema-commit-route-required")
132357
- throw error;
132358
- response = await NeoApiClient.forBaseUrl(
132359
- workspace.config.apiBaseUrl
132360
- ).post(
132361
- `/api/projects/${workspace.config.projectId}/versions/${workspace.config.versionId}/schema/commit`,
132362
- body
132363
- );
132364
- }
132255
+ const response = await connection.submit(body, false);
132365
132256
  const accepted = readAcceptedProjectVersionCommitResponse(response);
132366
132257
  if (accepted === null) {
132367
132258
  if (!isObjectRecord2(response) || typeof response.kind !== "string") {
@@ -132388,6 +132279,23 @@ async function commitProjectVersionChanges(args) {
132388
132279
  reporter.stop();
132389
132280
  }
132390
132281
  }
132282
+ function clientPreparedCommitBody(args) {
132283
+ return {
132284
+ operation: args.operation,
132285
+ changes: args.prepared.changes,
132286
+ basePayloadBytes: args.prepared.basePayloadBytes,
132287
+ stagedFiles: args.stagedFiles,
132288
+ stagedUploadSessionId: args.stagedUploadSessionId,
132289
+ sourceHash: args.sourceHash,
132290
+ pendingIdAssignments: args.pendingIdAssignments,
132291
+ summary: args.summary,
132292
+ // P43 §4. Preparation ran against the pulled snapshot, so the server
132293
+ // refuses the push unless that snapshot is still the project head.
132294
+ headTransactionHash: args.workspace.state.headTransactionHash ?? null,
132295
+ derivedEdgeExtractorVersion: PROJECT_SNAPSHOT_DERIVED_EDGE_EXTRACTOR_VERSION,
132296
+ compilerRevision: NEOSCRIPT_COMPILER_REVISION
132297
+ };
132298
+ }
132391
132299
  function readAcceptedProjectVersionCommitResponse(value) {
132392
132300
  if (!isObjectRecord2(value) || value.kind !== "accepted") return null;
132393
132301
  if (typeof value.transactionId !== "string") {
@@ -132929,7 +132837,8 @@ async function preparePushStatus(workspace, options, onPhase = () => void 0) {
132929
132837
  onPhase("Analyzing working copy\u2026");
132930
132838
  const status = computeWorkspaceStatus2(workspace, {
132931
132839
  onPhase,
132932
- forceRecompile: options.forceRecompile
132840
+ forceRecompile: options.forceRecompile,
132841
+ skipInitializerMaterialization: true
132933
132842
  });
132934
132843
  if (status.conflictedFiles.length > 0) {
132935
132844
  throw new Error(
@@ -132967,11 +132876,6 @@ ${blockingErrors.map((error) => ` ${error.message}`).join("\n")}`
132967
132876
  }
132968
132877
  const blockedConversions = describeBlockingInitConversions(initConversions);
132969
132878
  if (blockedConversions !== null) throw new Error(blockedConversions);
132970
- if (!options.acceptBump && (workspace.state.headTransactionHash === void 0 || workspace.state.headTransactionHash === null)) {
132971
- throw new Error(
132972
- 'This workspace has no recorded project head, so a push cannot be proven to be a fast-forward. Run "neo pull" first, or re-run with "neo push --accept-bump" to force the write.'
132973
- );
132974
- }
132975
132879
  prepareNSPropertySetterChanges(workspace, status);
132976
132880
  prepareNSFunctionBodyChanges(workspace, status);
132977
132881
  const needsNeoScriptCompilation = status.changes.some(
@@ -133250,41 +133154,24 @@ async function runPush(workspace, options, preparationOverride) {
133250
133154
  pendingAssignment,
133251
133155
  transactionOperation,
133252
133156
  client,
133253
- transportChanges,
133254
- transportSeeds,
133157
+ clientPrepared,
133255
133158
  stagedUploadSessionId
133256
133159
  } = preparedPush;
133257
133160
  const { stagedFiles } = preparedPush;
133258
133161
  let pushConnection;
133259
133162
  const commit = async (force) => {
133260
- const body = {
133163
+ const body = clientPreparedCommitBody({
133164
+ workspace,
133261
133165
  operation: transactionOperation,
133262
- changes: transportChanges,
133263
- authoredValueSeeds: transportSeeds,
133264
- initializerMaterialization: pendingAssignment.localInitializerMaterialization ?? { roots: [] },
133166
+ prepared: clientPrepared,
133265
133167
  stagedFiles,
133266
133168
  stagedUploadSessionId,
133267
133169
  sourceHash: source.sourceHash,
133268
133170
  pendingIdAssignments: Object.fromEntries(pendingAssignment.assigned),
133269
- summary: options.summary ?? "neo push",
133270
- // P43 §4. The local evaluator computes against the pulled snapshot, so
133271
- // the server rejects a push whose base is not the project head.
133272
- headTransactionHash: workspace.state.headTransactionHash ?? null,
133273
- derivedEdgeExtractorVersion: PROJECT_SNAPSHOT_DERIVED_EDGE_EXTRACTOR_VERSION,
133274
- forceRecompile: options.forceRecompile === true
133275
- };
133171
+ summary: options.summary ?? "neo push"
133172
+ });
133276
133173
  pushConnection ??= await createConvexPushConnection(workspace);
133277
- try {
133278
- return await pushConnection.submit(body, force);
133279
- } catch (error) {
133280
- if (!(error instanceof NeoApiError) || error.status !== 413 || !isObjectRecord2(error.body) || error.body.error !== "schema-commit-route-required")
133281
- throw error;
133282
- }
133283
- return await client.post(
133284
- `/api/projects/${workspace.config.projectId}/versions/${workspace.config.versionId}/schema/commit`,
133285
- body,
133286
- force ? { "x-neo-force-project-version-write": "true" } : void 0
133287
- );
133174
+ return await pushConnection.submit(body, force);
133288
133175
  };
133289
133176
  const finishCommitResponse = async (response, reporter) => {
133290
133177
  let accepted;
@@ -133322,7 +133209,7 @@ async function runPush(workspace, options, preparationOverride) {
133322
133209
  errorMessage: null
133323
133210
  });
133324
133211
  reporter.stop();
133325
- reportAdditionalServerChanges(
133212
+ reportDerivedChanges(
133326
133213
  committedChangeCount,
133327
133214
  status.changes.length,
133328
133215
  options.json === true
@@ -133410,7 +133297,7 @@ async function runPush(workspace, options, preparationOverride) {
133410
133297
  errorMessage: null
133411
133298
  });
133412
133299
  reporter.stop();
133413
- reportAdditionalServerChanges(
133300
+ reportDerivedChanges(
133414
133301
  completed.totalChangeCount,
133415
133302
  status.changes.length,
133416
133303
  options.json === true
@@ -133512,7 +133399,7 @@ async function runPush(workspace, options, preparationOverride) {
133512
133399
  await finishCommitResponse(result, progress);
133513
133400
  }
133514
133401
  function isDefinitiveSchemaCommitRejection(error) {
133515
- return error.status === 400 || error.status === 401 || error.status === 403 || error.status === 404 || error.status === 409;
133402
+ return error.status === 400 || error.status === 401 || error.status === 403 || error.status === 404 || error.status === 409 || error.status === 413;
133516
133403
  }
133517
133404
  async function prepareLocalPushArtifactsV4(workspace, status, onPhase = () => void 0, options = {
133518
133405
  fullValidation: true,
@@ -133531,22 +133418,11 @@ async function prepareLocalPushArtifactsV4(workspace, status, onPhase = () => vo
133531
133418
  status,
133532
133419
  status.authoredValueSeeds
133533
133420
  ) : null;
133534
- const pendingTransportChanges = transportChangesForStatus(status);
133535
- const pendingTransportSeeds = [...status.authoredValueSeeds].map(
133536
- ([memberId, seed]) => ({ memberId, ...seed })
133537
- );
133538
- const localInitializerMaterialization = status.localInitializerMaterialization ?? materializeInitializersLocallyV4({
133539
- workspace,
133540
- changes: pendingTransportChanges,
133541
- authoredValueSeeds: pendingTransportSeeds,
133542
- forceRecompile: options.forceRecompile
133543
- });
133544
133421
  onPhase("Assigning pending value identities\u2026");
133545
133422
  const pendingAssignment = assignPendingIds(
133546
133423
  status.changes,
133547
133424
  status.authoredValueSeeds,
133548
- status.reconstructed,
133549
- localInitializerMaterialization
133425
+ status.reconstructed
133550
133426
  );
133551
133427
  const operations = new Set(status.changes.map((change) => change.kind));
133552
133428
  const transactionOperation = operations.size === 1 ? status.changes[0].kind : "update";
@@ -133560,11 +133436,11 @@ async function prepareLocalPushArtifactsV4(workspace, status, onPhase = () => vo
133560
133436
  binaryChanges: status.binaryChanges ?? [],
133561
133437
  assignedIds: pendingAssignment.assigned
133562
133438
  });
133439
+ const stagedRecordIds = new Set(preparedFiles.map((file) => file.recordId));
133563
133440
  assertPushedRecordsPassDomainGuards(
133564
133441
  status.changes,
133565
133442
  localizedTextCreateEnvelopeConfig2(workspace, status.changes)
133566
133443
  );
133567
- let preparedChanges = null;
133568
133444
  if (verificationSource !== null) {
133569
133445
  onPhase("Verifying the assigned-id source rewrite\u2026");
133570
133446
  materializeAssignedSchemaIdsInAuthoredSource(
@@ -133581,36 +133457,47 @@ async function prepareLocalPushArtifactsV4(workspace, status, onPhase = () => vo
133581
133457
  files: verificationSource.files,
133582
133458
  changes: transportChanges,
133583
133459
  authoredValueSeeds: transportSeeds,
133584
- initializerMaterialization: pendingAssignment.localInitializerMaterialization ?? { roots: [] },
133585
133460
  forceRecompile: options.forceRecompile,
133586
133461
  pendingIdAssignments: Object.fromEntries(pendingAssignment.assigned),
133587
133462
  stagedFiles: preparedFiles
133588
133463
  });
133589
- onPhase(
133590
- `Rehearsing server validation for ${transportChanges.length.toLocaleString("en-US")} change(s)\u2026`
133591
- );
133592
- preparedChanges = assertServerPreparationSucceeds({
133464
+ }
133465
+ onPhase(
133466
+ `Preparing ${transportChanges.length.toLocaleString("en-US")} change(s)\u2026`
133467
+ );
133468
+ const finishPreparation = startPerformanceSpan("client-preparation");
133469
+ let prepared;
133470
+ try {
133471
+ prepared = prepareClientPush({
133593
133472
  workspace,
133594
133473
  changes: completeLocallyStagedProjectFileChanges({
133595
133474
  projectId: workspace.config.projectId,
133596
133475
  changes: transportChanges,
133597
- stagedRecordIds: new Set(preparedFiles.map((file) => file.recordId))
133476
+ stagedRecordIds
133598
133477
  }),
133599
133478
  authoredValueSeeds: transportSeeds,
133600
133479
  sourceByRecord: status.reconstructed,
133601
- localInitializerMaterialization: pendingAssignment.localInitializerMaterialization,
133602
133480
  forceRecompile: options.forceRecompile
133603
133481
  });
133482
+ } finally {
133483
+ finishPreparation();
133604
133484
  }
133605
133485
  return {
133606
133486
  source,
133607
133487
  submittedStatus,
133608
133488
  pendingAssignment,
133609
133489
  transactionOperation,
133610
- transportChanges,
133611
- transportSeeds,
133612
133490
  preparedFiles,
133613
- preparedChanges
133491
+ /** The prepared graph with local stand-ins for staged file storage. */
133492
+ preparedChanges: prepared.changes,
133493
+ clientPrepared: {
133494
+ changes: restoreStagedProjectFileStorage(
133495
+ prepared.changes,
133496
+ transportChanges,
133497
+ stagedRecordIds
133498
+ ),
133499
+ basePayloadBytes: prepared.basePayloadBytes
133500
+ }
133614
133501
  };
133615
133502
  }
133616
133503
  async function prepareLocalCandidateV4(workspace, options = {}) {
@@ -133735,14 +133622,50 @@ function completeLocallyStagedProjectFileChanges(args) {
133735
133622
  ...change.nextData,
133736
133623
  id: change.recordId,
133737
133624
  projectId: args.projectId,
133738
- status: "uploaded",
133739
- storageKey: `local-candidate/${change.recordId}`,
133740
- storageETag: "local-candidate"
133625
+ ...localStagedProjectFileStorage(change.recordId)
133741
133626
  }
133742
133627
  };
133743
133628
  return completed;
133744
133629
  });
133745
133630
  }
133631
+ function localStagedProjectFileStorage(recordId) {
133632
+ return {
133633
+ status: "uploaded",
133634
+ storageKey: `local-candidate/${recordId}`,
133635
+ storageETag: "local-candidate"
133636
+ };
133637
+ }
133638
+ function restoreStagedProjectFileStorage(prepared, transportChanges, stagedRecordIds) {
133639
+ if (stagedRecordIds.size === 0) return prepared;
133640
+ const authoredById = /* @__PURE__ */ new Map();
133641
+ for (const change of transportChanges) {
133642
+ if (!stagedRecordIds.has(change.recordId)) continue;
133643
+ if (change.nextData === void 0) {
133644
+ throw new Error(
133645
+ `Staged project file ${change.recordId} has no local source record.`
133646
+ );
133647
+ }
133648
+ authoredById.set(change.recordId, change.nextData);
133649
+ }
133650
+ return prepared.map((change) => {
133651
+ if (change.recordKind !== "project-file") return change;
133652
+ const authored = authoredById.get(change.recordId);
133653
+ if (authored === void 0) return change;
133654
+ if (!isObjectRecord2(change.nextData)) {
133655
+ throw new Error(
133656
+ `Prepared staged project file ${change.recordId} has no record data.`
133657
+ );
133658
+ }
133659
+ const nextData = { ...change.nextData };
133660
+ for (const field of Object.keys(
133661
+ localStagedProjectFileStorage(change.recordId)
133662
+ )) {
133663
+ if (authored[field] === void 0) delete nextData[field];
133664
+ else nextData[field] = authored[field];
133665
+ }
133666
+ return { ...change, nextData };
133667
+ });
133668
+ }
133746
133669
  function transportChangesForStatus(status) {
133747
133670
  return status.changes.map((change) => ({
133748
133671
  recordKind: change.recordKind,
@@ -134107,6 +134030,12 @@ function reportPushRejection(status, body) {
134107
134030
  );
134108
134031
  return;
134109
134032
  }
134033
+ if (isObjectRecord2(body) && body.error === "schema-commit-too-large") {
134034
+ console.error(
134035
+ typeof body.bytes === "number" && typeof body.limitBytes === "number" ? `Push rejected: the prepared commit is ${body.bytes.toLocaleString("en-US")} bytes ${String(body.measure)}, over the ${body.limitBytes.toLocaleString("en-US")}-byte limit.` : "Push rejected: the prepared commit is over the server's body limit."
134036
+ );
134037
+ return;
134038
+ }
134110
134039
  console.error(`Push rejected (${status}): ${JSON.stringify(body)}`);
134111
134040
  }
134112
134041
  function applyCommittedHeadTransactionHash(workspace, result) {
@@ -134142,11 +134071,11 @@ function immediateCommittedChangeCount(result) {
134142
134071
  }
134143
134072
  return result.changedRecords.length;
134144
134073
  }
134145
- function reportAdditionalServerChanges(totalChangeCount, authoredChangeCount, json) {
134074
+ function reportDerivedChanges(totalChangeCount, authoredChangeCount, json) {
134146
134075
  if (json || totalChangeCount <= authoredChangeCount) return;
134147
134076
  console.log(
134148
134077
  color.dim(
134149
- `Server prepared ${totalChangeCount - authoredChangeCount} additional derived record change(s) (${totalChangeCount} total).`
134078
+ `Push preparation added ${totalChangeCount - authoredChangeCount} derived record change(s) (${totalChangeCount} total).`
134150
134079
  )
134151
134080
  );
134152
134081
  }
@@ -135514,7 +135443,6 @@ var init_push = __esm({
135514
135443
  init_project_file_push();
135515
135444
  init_trusted_commit_verification();
135516
135445
  init_server_preparation_preflight();
135517
- init_local_initializer_materialization();
135518
135446
  init_initializer_replay();
135519
135447
  init_project_version_validation();
135520
135448
  init_project2();
@@ -140824,7 +140752,7 @@ var init_registry2 = __esm({
140824
140752
  "schema-contract/registry.mjs"() {
140825
140753
  "use strict";
140826
140754
  PROJECT_SCHEMA_CONTRACT = Object.freeze({
140827
- cliVersion: "0.58.3",
140755
+ cliVersion: "0.59.0",
140828
140756
  projectFileUploadBatchSize: 32,
140829
140757
  documentRecords: {
140830
140758
  member: {
@@ -148539,7 +148467,7 @@ ${h("Usage")}
148539
148467
 
148540
148468
  ${h("Flags")}
148541
148469
  --dry-run ${d("Preview the change set; commit nothing.")}
148542
- --force-recompile ${d("Exhaustively recompile every stored NeoScript body through the durable server path (parity/recovery; slower, and may surface unrelated invalid bodies).")}
148470
+ --force-recompile ${d("Exhaustively recompile every stored NeoScript body during push preparation (parity/recovery; slower, and may surface unrelated invalid bodies).")}
148543
148471
  --summary <text> ${d("Attach a summary message to the transaction.")}
148544
148472
  --accept-bump ${d("Accept a server-required version bump instead of aborting.")}
148545
148473
  --json ${d("Emit machine-readable plan and transaction progress events.")}
@@ -148645,7 +148573,7 @@ There is no --keep-current: preserving current semantic state defines flatten.
148645
148573
  async function main() {
148646
148574
  const args = parseArgs(process.argv.slice(2));
148647
148575
  if (args.command === "--version") {
148648
- console.log("0.58.3");
148576
+ console.log("0.59.0");
148649
148577
  return;
148650
148578
  }
148651
148579
  if (args.command === null || args.command === "help" || args.command === "--help" || args.command === "-h") {