@neocompose/cli 0.57.1 → 0.57.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.57.2] - 2026-09-23
4
+
5
+ - Removing a variant's last `overrides:` argument deletes its stored override row. Dry run and push accept the edit, including variants whose initializer is an inline delegate.
6
+
3
7
  ## [0.57.1] - 2026-09-23
4
8
 
5
9
  - A dialogue authored in `.neoflow` for a `.Lookup` group is triggered by its `@primary` value, matching dialogues created in the web editor. Before, it was saved with no lookup value, so the group never triggered it. Moving a dialogue to another kind of group clears its lookup value. Push again to repair affected dialogues.
package/dist/neo.mjs CHANGED
@@ -46299,7 +46299,8 @@ function isValidProjectBindingIdentifier(value) {
46299
46299
  var init_project_source_identifiers2 = __esm({
46300
46300
  "../src/models/project-source-identifiers.ts"() {
46301
46301
  "use strict";
46302
- init_src();
46302
+ init_generated_csharp_identifiers();
46303
+ init_project_source_identifiers();
46303
46304
  }
46304
46305
  });
46305
46306
 
@@ -46323,46 +46324,6 @@ var init_schema_identifiers = __esm({
46323
46324
  }
46324
46325
  });
46325
46326
 
46326
- // ../src/models/neoscript/neoscript-types.ts
46327
- var NS_TYPE_UNKNOWN, NS_TYPE_VOID, NSAssignmentOperator, NSWritability, NSCollectionMutation;
46328
- var init_neoscript_types = __esm({
46329
- "../src/models/neoscript/neoscript-types.ts"() {
46330
- "use strict";
46331
- NS_TYPE_UNKNOWN = "Unknown";
46332
- NS_TYPE_VOID = "Void";
46333
- NSAssignmentOperator = /* @__PURE__ */ ((NSAssignmentOperator2) => {
46334
- NSAssignmentOperator2["Assign"] = "=";
46335
- NSAssignmentOperator2["AddAssign"] = "+=";
46336
- NSAssignmentOperator2["SubtractAssign"] = "-=";
46337
- NSAssignmentOperator2["MultiplyAssign"] = "*=";
46338
- NSAssignmentOperator2["DivideAssign"] = "/=";
46339
- NSAssignmentOperator2["ModuloAssign"] = "%=";
46340
- NSAssignmentOperator2["Increment"] = "++";
46341
- NSAssignmentOperator2["Decrement"] = "--";
46342
- return NSAssignmentOperator2;
46343
- })(NSAssignmentOperator || {});
46344
- NSWritability = /* @__PURE__ */ ((NSWritability2) => {
46345
- NSWritability2["Local"] = "local";
46346
- NSWritability2["Save"] = "save";
46347
- NSWritability2["Session"] = "session";
46348
- NSWritability2["Immutable"] = "immutable";
46349
- NSWritability2["ImmutableToSaveLookup"] = "immutableToSaveLookup";
46350
- NSWritability2["ImmutableToSessionLookup"] = "immutableToSessionLookup";
46351
- NSWritability2["Runtime"] = "runtime";
46352
- NSWritability2["ReadOnly"] = "readOnly";
46353
- NSWritability2["Setter"] = "setter";
46354
- return NSWritability2;
46355
- })(NSWritability || {});
46356
- NSCollectionMutation = /* @__PURE__ */ ((NSCollectionMutation2) => {
46357
- NSCollectionMutation2["Add"] = "Add";
46358
- NSCollectionMutation2["Remove"] = "Remove";
46359
- NSCollectionMutation2["RemoveAt"] = "RemoveAt";
46360
- NSCollectionMutation2["Clear"] = "Clear";
46361
- return NSCollectionMutation2;
46362
- })(NSCollectionMutation || {});
46363
- }
46364
- });
46365
-
46366
46327
  // ../src/models/neoscript/neoscript-compiler-revision.ts
46367
46328
  function isAcceptedNeoScriptCompilerRevision(stamp, rollout = ACTIVE_NEOSCRIPT_COMPILER_REVISION_ROLLOUT) {
46368
46329
  if (stamp === NEOSCRIPT_COMPILER_REVISION) return true;
@@ -46407,12 +46368,52 @@ var ACTIVE_NEOSCRIPT_COMPILER_REVISION_ROLLOUT;
46407
46368
  var init_neoscript_compiler_revision = __esm({
46408
46369
  "../src/models/neoscript/neoscript-compiler-revision.ts"() {
46409
46370
  "use strict";
46410
- init_src();
46371
+ init_strict_ir();
46411
46372
  ACTIVE_NEOSCRIPT_COMPILER_REVISION_ROLLOUT = // <neoscript-compiler-revision-rollout>
46412
46373
  null;
46413
46374
  }
46414
46375
  });
46415
46376
 
46377
+ // ../src/models/neoscript/neoscript-types.ts
46378
+ var NS_TYPE_UNKNOWN, NS_TYPE_VOID, NSAssignmentOperator, NSWritability, NSCollectionMutation;
46379
+ var init_neoscript_types = __esm({
46380
+ "../src/models/neoscript/neoscript-types.ts"() {
46381
+ "use strict";
46382
+ NS_TYPE_UNKNOWN = "Unknown";
46383
+ NS_TYPE_VOID = "Void";
46384
+ NSAssignmentOperator = /* @__PURE__ */ ((NSAssignmentOperator2) => {
46385
+ NSAssignmentOperator2["Assign"] = "=";
46386
+ NSAssignmentOperator2["AddAssign"] = "+=";
46387
+ NSAssignmentOperator2["SubtractAssign"] = "-=";
46388
+ NSAssignmentOperator2["MultiplyAssign"] = "*=";
46389
+ NSAssignmentOperator2["DivideAssign"] = "/=";
46390
+ NSAssignmentOperator2["ModuloAssign"] = "%=";
46391
+ NSAssignmentOperator2["Increment"] = "++";
46392
+ NSAssignmentOperator2["Decrement"] = "--";
46393
+ return NSAssignmentOperator2;
46394
+ })(NSAssignmentOperator || {});
46395
+ NSWritability = /* @__PURE__ */ ((NSWritability2) => {
46396
+ NSWritability2["Local"] = "local";
46397
+ NSWritability2["Save"] = "save";
46398
+ NSWritability2["Session"] = "session";
46399
+ NSWritability2["Immutable"] = "immutable";
46400
+ NSWritability2["ImmutableToSaveLookup"] = "immutableToSaveLookup";
46401
+ NSWritability2["ImmutableToSessionLookup"] = "immutableToSessionLookup";
46402
+ NSWritability2["Runtime"] = "runtime";
46403
+ NSWritability2["ReadOnly"] = "readOnly";
46404
+ NSWritability2["Setter"] = "setter";
46405
+ return NSWritability2;
46406
+ })(NSWritability || {});
46407
+ NSCollectionMutation = /* @__PURE__ */ ((NSCollectionMutation2) => {
46408
+ NSCollectionMutation2["Add"] = "Add";
46409
+ NSCollectionMutation2["Remove"] = "Remove";
46410
+ NSCollectionMutation2["RemoveAt"] = "RemoveAt";
46411
+ NSCollectionMutation2["Clear"] = "Clear";
46412
+ return NSCollectionMutation2;
46413
+ })(NSCollectionMutation || {});
46414
+ }
46415
+ });
46416
+
46416
46417
  // ../src/models/neoscript/neoscript-guards.ts
46417
46418
  function isNSTypeInfoBase(value) {
46418
46419
  const v = value;
@@ -47460,7 +47461,7 @@ var init_neoscript_guards = __esm({
47460
47461
  "../src/models/neoscript/neoscript-guards.ts"() {
47461
47462
  "use strict";
47462
47463
  init_neoscript_compiler_revision();
47463
- init_member_kinds();
47464
+ init_member_kind_enum();
47464
47465
  init_core();
47465
47466
  init_neoscript_types();
47466
47467
  NS_STRING_OPS = [
@@ -47536,78 +47537,7 @@ var init_parameter_defaults = __esm({
47536
47537
  }
47537
47538
  });
47538
47539
 
47539
- // ../src/models/interfaces/interface-graph.ts
47540
- function resolveInterfaceClosure(interfaceId, interfaces) {
47541
- const byId = new Map(
47542
- interfaces.map((neoInterface) => [neoInterface.id, neoInterface])
47543
- );
47544
- const result = [];
47545
- const emitted = /* @__PURE__ */ new Set();
47546
- const visiting = [];
47547
- const visitingSet = /* @__PURE__ */ new Set();
47548
- const visit = (id2) => {
47549
- if (visitingSet.has(id2)) {
47550
- throw new CircularInterfaceExtensionError(id2, [...visiting, id2]);
47551
- }
47552
- if (emitted.has(id2)) return;
47553
- const neoInterface = byId.get(id2);
47554
- if (!neoInterface) return;
47555
- visiting.push(id2);
47556
- visitingSet.add(id2);
47557
- result.push(neoInterface);
47558
- emitted.add(id2);
47559
- for (const parentId of neoInterface.extendsInterfaceIds ?? []) {
47560
- visit(parentId);
47561
- }
47562
- visiting.pop();
47563
- visitingSet.delete(id2);
47564
- };
47565
- visit(interfaceId);
47566
- return result;
47567
- }
47568
- function resolveImplementedInterfaces(classId, classes, interfaces) {
47569
- const result = [];
47570
- const seen = /* @__PURE__ */ new Set();
47571
- for (const schemaClass2 of resolveInheritanceChain(classId, classes)) {
47572
- for (const interfaceId of schemaClass2.implementsInterfaceIds ?? []) {
47573
- for (const neoInterface of resolveInterfaceClosure(
47574
- interfaceId,
47575
- interfaces
47576
- )) {
47577
- if (seen.has(neoInterface.id)) continue;
47578
- seen.add(neoInterface.id);
47579
- result.push(neoInterface);
47580
- }
47581
- }
47582
- }
47583
- return result;
47584
- }
47585
- function classImplementsInterface(classId, interfaceId, classes, interfaces) {
47586
- return resolveImplementedInterfaces(classId, classes, interfaces).some(
47587
- (neoInterface) => neoInterface.id === interfaceId
47588
- );
47589
- }
47590
- var CircularInterfaceExtensionError;
47591
- var init_interface_graph = __esm({
47592
- "../src/models/interfaces/interface-graph.ts"() {
47593
- "use strict";
47594
- init_inheritance();
47595
- CircularInterfaceExtensionError = class extends Error {
47596
- constructor(interfaceId, chain) {
47597
- super(
47598
- `Circular interface extension detected at "${interfaceId}"; chain: ${chain.join(" -> ")}`
47599
- );
47600
- this.interfaceId = interfaceId;
47601
- this.chain = chain;
47602
- this.name = "CircularInterfaceExtensionError";
47603
- }
47604
- interfaceId;
47605
- chain;
47606
- };
47607
- }
47608
- });
47609
-
47610
- // ../src/models/neoscript/type-info-compatibility.ts
47540
+ // ../src/models/neoscript/type-info-equality.ts
47611
47541
  function typeInfosInvariantlyEqual(left, right) {
47612
47542
  if (left.type !== right.type) return false;
47613
47543
  if (left.required !== right.required) return false;
@@ -47657,25 +47587,11 @@ function typeInfosInvariantlyEqual(left, right) {
47657
47587
  }
47658
47588
  return true;
47659
47589
  }
47660
- var init_type_info_compatibility = __esm({
47661
- "../src/models/neoscript/type-info-compatibility.ts"() {
47662
- "use strict";
47663
- init_member_kinds();
47664
- init_inheritance();
47665
- init_interface_graph();
47666
- init_neoscript_types();
47667
- }
47668
- });
47669
-
47670
- // ../src/models/neoscript/index.ts
47671
- var init_neoscript = __esm({
47672
- "../src/models/neoscript/index.ts"() {
47590
+ var init_type_info_equality = __esm({
47591
+ "../src/models/neoscript/type-info-equality.ts"() {
47673
47592
  "use strict";
47593
+ init_member_kind_enum();
47674
47594
  init_neoscript_types();
47675
- init_neoscript_guards();
47676
- init_parameter_defaults();
47677
- init_type_info_compatibility();
47678
- init_neoscript_compiler_revision();
47679
47595
  }
47680
47596
  });
47681
47597
 
@@ -49116,7 +49032,10 @@ var init_member_kinds = __esm({
49116
49032
  init_core();
49117
49033
  init_docs_text2();
49118
49034
  init_schema_identifiers();
49119
- init_neoscript();
49035
+ init_neoscript_guards();
49036
+ init_neoscript_types();
49037
+ init_parameter_defaults();
49038
+ init_type_info_equality();
49120
49039
  init_classes();
49121
49040
  init_member_kind_enum();
49122
49041
  init_member_kind_taxonomy();
@@ -49700,6 +49619,102 @@ var init_inheritance = __esm({
49700
49619
  }
49701
49620
  });
49702
49621
 
49622
+ // ../src/models/interfaces/interface-graph.ts
49623
+ function resolveInterfaceClosure(interfaceId, interfaces) {
49624
+ const byId = new Map(
49625
+ interfaces.map((neoInterface) => [neoInterface.id, neoInterface])
49626
+ );
49627
+ const result = [];
49628
+ const emitted = /* @__PURE__ */ new Set();
49629
+ const visiting = [];
49630
+ const visitingSet = /* @__PURE__ */ new Set();
49631
+ const visit = (id2) => {
49632
+ if (visitingSet.has(id2)) {
49633
+ throw new CircularInterfaceExtensionError(id2, [...visiting, id2]);
49634
+ }
49635
+ if (emitted.has(id2)) return;
49636
+ const neoInterface = byId.get(id2);
49637
+ if (!neoInterface) return;
49638
+ visiting.push(id2);
49639
+ visitingSet.add(id2);
49640
+ result.push(neoInterface);
49641
+ emitted.add(id2);
49642
+ for (const parentId of neoInterface.extendsInterfaceIds ?? []) {
49643
+ visit(parentId);
49644
+ }
49645
+ visiting.pop();
49646
+ visitingSet.delete(id2);
49647
+ };
49648
+ visit(interfaceId);
49649
+ return result;
49650
+ }
49651
+ function resolveImplementedInterfaces(classId, classes, interfaces) {
49652
+ const result = [];
49653
+ const seen = /* @__PURE__ */ new Set();
49654
+ for (const schemaClass2 of resolveInheritanceChain(classId, classes)) {
49655
+ for (const interfaceId of schemaClass2.implementsInterfaceIds ?? []) {
49656
+ for (const neoInterface of resolveInterfaceClosure(
49657
+ interfaceId,
49658
+ interfaces
49659
+ )) {
49660
+ if (seen.has(neoInterface.id)) continue;
49661
+ seen.add(neoInterface.id);
49662
+ result.push(neoInterface);
49663
+ }
49664
+ }
49665
+ }
49666
+ return result;
49667
+ }
49668
+ function classImplementsInterface(classId, interfaceId, classes, interfaces) {
49669
+ return resolveImplementedInterfaces(classId, classes, interfaces).some(
49670
+ (neoInterface) => neoInterface.id === interfaceId
49671
+ );
49672
+ }
49673
+ var CircularInterfaceExtensionError;
49674
+ var init_interface_graph = __esm({
49675
+ "../src/models/interfaces/interface-graph.ts"() {
49676
+ "use strict";
49677
+ init_inheritance();
49678
+ CircularInterfaceExtensionError = class extends Error {
49679
+ constructor(interfaceId, chain) {
49680
+ super(
49681
+ `Circular interface extension detected at "${interfaceId}"; chain: ${chain.join(" -> ")}`
49682
+ );
49683
+ this.interfaceId = interfaceId;
49684
+ this.chain = chain;
49685
+ this.name = "CircularInterfaceExtensionError";
49686
+ }
49687
+ interfaceId;
49688
+ chain;
49689
+ };
49690
+ }
49691
+ });
49692
+
49693
+ // ../src/models/neoscript/type-info-compatibility.ts
49694
+ var init_type_info_compatibility = __esm({
49695
+ "../src/models/neoscript/type-info-compatibility.ts"() {
49696
+ "use strict";
49697
+ init_member_kind_enum();
49698
+ init_type_info_equality();
49699
+ init_inheritance();
49700
+ init_interface_graph();
49701
+ init_neoscript_types();
49702
+ }
49703
+ });
49704
+
49705
+ // ../src/models/neoscript/index.ts
49706
+ var init_neoscript = __esm({
49707
+ "../src/models/neoscript/index.ts"() {
49708
+ "use strict";
49709
+ init_neoscript_types();
49710
+ init_neoscript_guards();
49711
+ init_parameter_defaults();
49712
+ init_type_info_compatibility();
49713
+ init_type_info_equality();
49714
+ init_neoscript_compiler_revision();
49715
+ }
49716
+ });
49717
+
49703
49718
  // node_modules/uuid/dist-node/regex.js
49704
49719
  var regex_default;
49705
49720
  var init_regex = __esm({
@@ -52713,7 +52728,6 @@ var init_generics = __esm({
52713
52728
  init_structural_narrow();
52714
52729
  init_classes();
52715
52730
  init_inheritance();
52716
- init_members();
52717
52731
  }
52718
52732
  });
52719
52733
 
@@ -53458,7 +53472,6 @@ var init_read_only_members = __esm({
53458
53472
  init_member_storage();
53459
53473
  init_unordered_list_membership();
53460
53474
  init_dist_node();
53461
- init_members();
53462
53475
  init_classes();
53463
53476
  READ_ONLY_SYNTHETIC_VALUE_ID_PREFIX = "__neo_readonly_default:";
53464
53477
  }
@@ -54557,13 +54570,13 @@ function resolveConstructionTypeArguments(typeArguments, document) {
54557
54570
  var init_construction_requirements = __esm({
54558
54571
  "../src/models/classes/construction-requirements.ts"() {
54559
54572
  "use strict";
54560
- init_type_info_compatibility();
54573
+ init_type_info_equality();
54561
54574
  init_classes();
54562
54575
  init_inheritance();
54563
54576
  init_generics();
54564
54577
  init_constructors2();
54565
54578
  init_parameter_defaults();
54566
- init_members();
54579
+ init_member_kinds();
54567
54580
  }
54568
54581
  });
54569
54582
 
@@ -55538,7 +55551,7 @@ var OPTION_ID_REGEX;
55538
55551
  var init_enum_types = __esm({
55539
55552
  "../src/models/enum/enum-types.ts"() {
55540
55553
  "use strict";
55541
- init_src();
55554
+ init_pending_id();
55542
55555
  init_core();
55543
55556
  init_schema_identifiers();
55544
55557
  init_system_record_id();
@@ -56893,7 +56906,6 @@ var init_build_default_member_value = __esm({
56893
56906
  init_member_storage_key();
56894
56907
  init_structured_leaf_fields();
56895
56908
  init_stored_value_shape();
56896
- init_members();
56897
56909
  init_classes();
56898
56910
  init_unordered_list_membership();
56899
56911
  init_stored_value_shape();
@@ -57241,7 +57253,6 @@ var init_list_indexes = __esm({
57241
57253
  init_core();
57242
57254
  init_generics();
57243
57255
  init_inheritance();
57244
- init_members();
57245
57256
  init_classes();
57246
57257
  }
57247
57258
  });
@@ -62187,7 +62198,7 @@ var init_lookup_declared_type = __esm({
62187
62198
  "../src/models/members/lookup-declared-type.ts"() {
62188
62199
  "use strict";
62189
62200
  init_member_kind_enum();
62190
- init_members();
62201
+ init_member_kinds();
62191
62202
  }
62192
62203
  });
62193
62204
 
@@ -62203,9 +62214,9 @@ var init_interface_conformance = __esm({
62203
62214
  init_neoscript_guards();
62204
62215
  init_core();
62205
62216
  init_type_info_compatibility();
62217
+ init_type_info_equality();
62206
62218
  init_interface_types();
62207
62219
  init_lookup_declared_type();
62208
- init_members();
62209
62220
  }
62210
62221
  });
62211
62222
 
@@ -69231,7 +69242,7 @@ function evaluateCellPatternNative(memberId, receiver, args, ctx) {
69231
69242
  var init_cell_pattern2 = __esm({
69232
69243
  "../src/runtime/neoscript/cell-pattern.ts"() {
69233
69244
  "use strict";
69234
- init_src();
69245
+ init_cell_pattern();
69235
69246
  init_member_kinds();
69236
69247
  }
69237
69248
  });
@@ -70866,7 +70877,7 @@ var DecimalOverflowError, DecimalDivisionByZeroError, DecimalDigitsRangeError, D
70866
70877
  var init_decimal_math = __esm({
70867
70878
  "../src/models/decimal/decimal-math.ts"() {
70868
70879
  "use strict";
70869
- init_members();
70880
+ init_member_kinds();
70870
70881
  DecimalOverflowError = class extends Error {
70871
70882
  };
70872
70883
  DecimalDivisionByZeroError = class extends Error {
@@ -81205,7 +81216,7 @@ var init_evaluateNSGetter = __esm({
81205
81216
  init_initializer_dependencies();
81206
81217
  init_unattributable_reads();
81207
81218
  init_value_row_owner_members();
81208
- init_src();
81219
+ init_cell_pattern();
81209
81220
  init_cell_pattern2();
81210
81221
  init_world_grid_query();
81211
81222
  init_classes();
@@ -81988,7 +81999,6 @@ var init_stored_value_placement_index = __esm({
81988
81999
  init_constructors2();
81989
82000
  init_project2();
81990
82001
  init_member_kinds();
81991
- init_members();
81992
82002
  }
81993
82003
  });
81994
82004
 
@@ -84658,7 +84668,7 @@ var init_virtual_instance_graph = __esm({
84658
84668
  init_neoscript();
84659
84669
  init_project_schema_index();
84660
84670
  init_initializer_context();
84661
- init_src();
84671
+ init_strict_ir();
84662
84672
  init_initializer_materialization();
84663
84673
  init_unattributable_reads();
84664
84674
  KEPT_ROW_SAMPLE_LIMIT = 12;
@@ -90065,7 +90075,7 @@ var init_neo_script_derived_bodies = __esm({
90065
90075
  "use strict";
90066
90076
  init_members();
90067
90077
  init_dialogue();
90068
- init_src();
90078
+ init_strict_ir();
90069
90079
  init_packed_value_encoding();
90070
90080
  }
90071
90081
  });
@@ -94975,7 +94985,7 @@ var init_general_function_call_ir_source_recompile = __esm({
94975
94985
  init_compiler_adapter();
94976
94986
  init_neoscript();
94977
94987
  init_dialogue_node_index();
94978
- init_src();
94988
+ init_strict_ir();
94979
94989
  init_neo_script_derived_bodies();
94980
94990
  VOID_ACTION_TYPE_INFO = {
94981
94991
  type: 0 /* Null */,
@@ -95957,7 +95967,7 @@ function neoScriptCompilationProjectContract(document) {
95957
95967
  var init_project_fingerprint = __esm({
95958
95968
  "../src/database/neoscript/project-fingerprint.ts"() {
95959
95969
  "use strict";
95960
- init_src();
95970
+ init_strict_ir();
95961
95971
  init_neo_script_recompile_scope();
95962
95972
  init_compiler_adapter();
95963
95973
  }
@@ -97672,8 +97682,62 @@ function appendAuthoredOwnedValueCascadeDeletes(args) {
97672
97682
  thisClass: replayMembers.ownerClassesByMemberId.get(member.id) ?? null
97673
97683
  });
97674
97684
  }
97685
+ const replayCandidates = /* @__PURE__ */ new Map();
97686
+ const authoredCandidateIds = /* @__PURE__ */ new Set();
97687
+ for (const change of args.authoredChanges) {
97688
+ if (change.recordKind !== "value" || change.operation === "delete") {
97689
+ continue;
97690
+ }
97691
+ const row = postValuesById.get(change.recordId);
97692
+ if (row === void 0) continue;
97693
+ if (inlineDelegateArgumentRow(row) === null && delegateValueRow(row) === null) {
97694
+ continue;
97695
+ }
97696
+ replayCandidates.set(change.recordId, row);
97697
+ authoredCandidateIds.add(change.recordId);
97698
+ }
97699
+ for (const rootId of survivingConstructionIds) {
97700
+ const root = postValuesById.get(rootId);
97701
+ const inline = inlineDelegateArgumentRow(root);
97702
+ if (inline !== null) replayCandidates.set(rootId, inline);
97703
+ }
97704
+ const compiledReplayRows = /* @__PURE__ */ new Map();
97705
+ if (replayCandidates.size > 0) {
97706
+ const compiler = createDelegateValueBodyCompiler(
97707
+ authoredPost,
97708
+ new Set(replayCandidates.keys())
97709
+ );
97710
+ if (authoredCandidateIds.size > 0) {
97711
+ args.earlyDelegateCompilation.contractHash = hashCanonicalJson(
97712
+ neoScriptCompilationProjectContract(authoredPost)
97713
+ );
97714
+ }
97715
+ for (const [id2, row] of replayCandidates) {
97716
+ let compiled = row;
97717
+ const closure = delegateValueRow(compiled);
97718
+ if (closure !== null) compiled = compiler.compileClosure(closure);
97719
+ const inline = inlineDelegateArgumentRow(compiled);
97720
+ if (inline !== null) {
97721
+ compiled = {
97722
+ ...inline,
97723
+ constructorArgs: compiler.compileInline(inline)
97724
+ };
97725
+ }
97726
+ compiledReplayRows.set(id2, compiled);
97727
+ if (authoredCandidateIds.has(id2)) {
97728
+ args.earlyDelegateCompilation.rows.set(id2, {
97729
+ source: row,
97730
+ compiled,
97731
+ ...compiler.ownershipIds(id2)
97732
+ });
97733
+ }
97734
+ }
97735
+ }
97675
97736
  const replayDocument = {
97676
97737
  ...postScope.document,
97738
+ values: postScope.document.values.map(
97739
+ (value) => compiledReplayRows.get(value.id) ?? value
97740
+ ),
97677
97741
  initializerCompiler: documentInitializerCompiler(
97678
97742
  postScope.document,
97679
97743
  compilationProject
@@ -97687,7 +97751,7 @@ function appendAuthoredOwnedValueCascadeDeletes(args) {
97687
97751
  document: resolverDocument
97688
97752
  });
97689
97753
  for (const rootId of survivingConstructionIds) {
97690
- const instanceRoot = postValuesById.get(rootId);
97754
+ const instanceRoot = compiledReplayRows.get(rootId) ?? postValuesById.get(rootId);
97691
97755
  const rootMember = postPlacements.get(rootId).member;
97692
97756
  const expanded = expandStoredInstance({
97693
97757
  document: resolverDocument,
@@ -97867,11 +97931,16 @@ function* prepareServerOwnedSchemaCommitPasses(args) {
97867
97931
  authoredChanges
97868
97932
  );
97869
97933
  }
97934
+ const earlyDelegateCompilation = {
97935
+ contractHash: null,
97936
+ rows: /* @__PURE__ */ new Map()
97937
+ };
97870
97938
  let authoredPost = appendAuthoredOwnedValueCascadeDeletes({
97871
97939
  document: args.document,
97872
97940
  authoredChanges,
97873
97941
  contentHashHeads: args.contentHashHeads,
97874
- expandReadOnlySourceConversions: args.expandReadOnlySourceConversions === true
97942
+ expandReadOnlySourceConversions: args.expandReadOnlySourceConversions === true,
97943
+ earlyDelegateCompilation
97875
97944
  }) ?? applyProjectVersionWriteChanges(args.document, authoredChanges);
97876
97945
  if (authoredPost.localizationConfig?.mainLocale !== args.document.localizationConfig?.mainLocale) {
97877
97946
  const normalized = planMemberLocalizationNormalization(
@@ -98271,7 +98340,8 @@ function* prepareServerOwnedSchemaCommitPasses(args) {
98271
98340
  prepared,
98272
98341
  targetIds: recompileTargets.valueIds,
98273
98342
  contentHashHeads: args.contentHashHeads,
98274
- physicalValues: args.document.physicalValues
98343
+ physicalValues: args.document.physicalValues,
98344
+ earlyDelegateCompilation
98275
98345
  });
98276
98346
  args.passLifecycle?.("complete", "delegate-value-bodies");
98277
98347
  yield { pass: "delegate-value-bodies", preparedChanges: prepared };
@@ -101287,43 +101357,19 @@ function compileInlineDelegateConstructorArguments(args) {
101287
101357
  }
101288
101358
  return compiled;
101289
101359
  }
101290
- function prepareServerOwnedDelegateValueBodies(args) {
101291
- const explicitRows = /* @__PURE__ */ new Map();
101292
- const inlineArgumentRows = /* @__PURE__ */ new Map();
101293
- for (let index = 0; index < args.prepared.length; index += 1) {
101294
- const change = args.prepared[index];
101295
- if (change?.recordKind !== "value" || change.operation === "delete") {
101296
- continue;
101297
- }
101298
- const row = delegateValueRow(change.nextData);
101299
- if (row !== null) explicitRows.set(index, row);
101300
- const withInlineArgs = inlineDelegateArgumentRow(change.nextData);
101301
- if (withInlineArgs !== null) inlineArgumentRows.set(index, withInlineArgs);
101302
- }
101303
- const { closureRows: sweepRows, inlineRows: inlineSweepRows } = collectDelegateSweepRows(args);
101304
- if (explicitRows.size === 0 && sweepRows.length === 0 && inlineArgumentRows.size === 0 && inlineSweepRows.length === 0) {
101305
- return;
101306
- }
101307
- const committedDocument = applyProjectVersionWriteChanges(
101308
- args.postDocument,
101309
- args.prepared
101310
- );
101311
- const targetIds = valueIdsFromRows(
101312
- [...explicitRows.values(), ...inlineArgumentRows.values()],
101313
- [...sweepRows, ...inlineSweepRows]
101360
+ function createDelegateValueBodyCompiler(postDocument, targetIds) {
101361
+ const scope = withVariantOwnershipRoots(
101362
+ postDocument,
101363
+ postDocument.variants ?? []
101314
101364
  );
101315
101365
  const rootOwnerByValueId = /* @__PURE__ */ new Map();
101316
- const delegateScope = withVariantOwnershipRoots(
101317
- committedDocument,
101318
- committedDocument.variants ?? []
101319
- );
101320
101366
  const ownerByValueId = resolveSemanticOwnerMembersForValues(
101321
- delegateScope.document,
101367
+ scope.document,
101322
101368
  targetIds,
101323
- delegateScope.roots,
101369
+ scope.roots,
101324
101370
  rootOwnerByValueId
101325
101371
  );
101326
- const compileOne = (document, row) => {
101372
+ const compileClosure = (row, document = scope.document) => {
101327
101373
  const member = ownerByValueId.get(row.id);
101328
101374
  if (!isMemberDelegateBase(member)) {
101329
101375
  const placement = typeof row.containerId === "string" ? `container "${row.containerId}"` : `map key "${row.mapKey ?? "none"}"`;
@@ -101333,8 +101379,9 @@ function prepareServerOwnedDelegateValueBodies(args) {
101333
101379
  }
101334
101380
  const rootOwner = rootOwnerByValueId.get(row.id);
101335
101381
  const thisClass = findSchemaPlacement(rootOwner?.id ?? "", document.classes)?.ownerClass ?? null;
101382
+ const compiled = { ...row, value: { ...row.value } };
101336
101383
  try {
101337
- row.value = compileDelegateClosureValue(row.value.code, {
101384
+ compiled.value = compileDelegateClosureValue(row.value.code, {
101338
101385
  project: document.project,
101339
101386
  projectFiles: document.projectFiles,
101340
101387
  members: document.members,
@@ -101342,9 +101389,8 @@ function prepareServerOwnedDelegateValueBodies(args) {
101342
101389
  enums: document.enums,
101343
101390
  interfaces: document.interfaces,
101344
101391
  constructors: document.constructors ?? [],
101345
- // P67 §3.5 — a variant's `initialize` may delegate to another
101346
- // variant's, so the closure being compiled has to see the variant
101347
- // records committed alongside it.
101392
+ // P67 §3.5: one variant's initialize may call another variant's, so
101393
+ // compilation must see variants committed alongside this closure.
101348
101394
  variants: document.variants ?? [],
101349
101395
  variantFolders: document.variantFolders ?? [],
101350
101396
  thisClass,
@@ -101359,24 +101405,71 @@ function prepareServerOwnedDelegateValueBodies(args) {
101359
101405
  { cause: error }
101360
101406
  );
101361
101407
  }
101408
+ return compiled;
101409
+ };
101410
+ const compileInline = (row, document = scope.document) => compileInlineDelegateConstructorArguments({
101411
+ document,
101412
+ row,
101413
+ ownerMember: ownerByValueId.get(row.id),
101414
+ rootOwner: rootOwnerByValueId.get(row.id) ?? null
101415
+ });
101416
+ const ownershipIds = (valueId) => ({
101417
+ ownerMemberId: getOptionalString(ownerByValueId.get(valueId), "id") ?? null,
101418
+ rootOwnerId: rootOwnerByValueId.get(valueId)?.id ?? null
101419
+ });
101420
+ return { compileClosure, compileInline, ownershipIds };
101421
+ }
101422
+ function prepareServerOwnedDelegateValueBodies(args) {
101423
+ const explicitRows = /* @__PURE__ */ new Map();
101424
+ const inlineArgumentRows = /* @__PURE__ */ new Map();
101425
+ for (let index = 0; index < args.prepared.length; index += 1) {
101426
+ const change = args.prepared[index];
101427
+ if (change?.recordKind !== "value" || change.operation === "delete") {
101428
+ continue;
101429
+ }
101430
+ const row = delegateValueRow(change.nextData);
101431
+ if (row !== null) explicitRows.set(index, row);
101432
+ const withInlineArgs = inlineDelegateArgumentRow(change.nextData);
101433
+ if (withInlineArgs !== null) inlineArgumentRows.set(index, withInlineArgs);
101434
+ }
101435
+ const { closureRows: sweepRows, inlineRows: inlineSweepRows } = collectDelegateSweepRows(args);
101436
+ if (explicitRows.size === 0 && sweepRows.length === 0 && inlineArgumentRows.size === 0 && inlineSweepRows.length === 0) {
101437
+ return;
101438
+ }
101439
+ const committedDocument = applyProjectVersionWriteChanges(
101440
+ args.postDocument,
101441
+ args.prepared
101442
+ );
101443
+ const targetIds = valueIdsFromRows(
101444
+ [...explicitRows.values(), ...inlineArgumentRows.values()],
101445
+ [...sweepRows, ...inlineSweepRows]
101446
+ );
101447
+ const compiler = createDelegateValueBodyCompiler(
101448
+ committedDocument,
101449
+ targetIds
101450
+ );
101451
+ const early = args.earlyDelegateCompilation;
101452
+ const sameCompilerContract = early.rows.size > 0 && early.contractHash === hashCanonicalJson(neoScriptCompilationProjectContract(committedDocument));
101453
+ const reusableEarlyRow = (row) => {
101454
+ if (!sameCompilerContract) return null;
101455
+ const candidate = early.rows.get(row.id);
101456
+ if (candidate?.source !== row) return null;
101457
+ const ownership = compiler.ownershipIds(row.id);
101458
+ return ownership.ownerMemberId === candidate.ownerMemberId && ownership.rootOwnerId === candidate.rootOwnerId ? candidate.compiled : null;
101362
101459
  };
101363
101460
  for (const [index, row] of explicitRows) {
101364
- const compiled = { ...row, value: { ...row.value } };
101365
- compileOne(delegateScope.document, compiled);
101461
+ const reused = reusableEarlyRow(row);
101462
+ const compiled = (reused === null ? null : delegateValueRow(reused)) ?? compiler.compileClosure(row);
101366
101463
  const change = args.prepared[index];
101367
101464
  if (change !== void 0) {
101368
101465
  args.prepared[index] = { ...change, nextData: compiled };
101369
101466
  }
101370
101467
  }
101371
101468
  for (const [index, row] of inlineArgumentRows) {
101372
- const ownerMember = ownerByValueId.get(row.id);
101373
- const rootOwner = rootOwnerByValueId.get(row.id);
101374
- const compiledArgs = compileInlineDelegateConstructorArguments({
101375
- document: delegateScope.document,
101376
- row,
101377
- ownerMember,
101378
- rootOwner: rootOwner ?? null
101379
- });
101469
+ const reused = reusableEarlyRow(row);
101470
+ const compiledArgs = asRecord4(
101471
+ reused?.constructorArgs
101472
+ ) ?? compiler.compileInline(row);
101380
101473
  const change = args.prepared[index];
101381
101474
  if (change !== void 0) {
101382
101475
  args.prepared[index] = {
@@ -101416,16 +101509,16 @@ function prepareServerOwnedDelegateValueBodies(args) {
101416
101509
  });
101417
101510
  };
101418
101511
  for (const row of sweepRows) {
101419
- const compiled = { ...row, value: { ...row.value } };
101512
+ let compiled;
101420
101513
  try {
101421
- compileOne(delegateScope.document, compiled);
101514
+ compiled = compiler.compileClosure(row);
101422
101515
  } catch (postWriteError) {
101423
101516
  const current = delegateValueRow(
101424
101517
  structuredClone(currentById.get(row.id))
101425
101518
  );
101426
101519
  if (current === null) throw postWriteError;
101427
101520
  try {
101428
- compileOne(args.document, current);
101521
+ compiler.compileClosure(current, args.document);
101429
101522
  } catch (preWriteError) {
101430
101523
  if (sameCompileFailure(preWriteError, postWriteError)) continue;
101431
101524
  }
@@ -101433,21 +101526,15 @@ function prepareServerOwnedDelegateValueBodies(args) {
101433
101526
  }
101434
101527
  refresh(row.id, compiled);
101435
101528
  }
101436
- const compileInlineOne = (document, row) => compileInlineDelegateConstructorArguments({
101437
- document,
101438
- row,
101439
- ownerMember: ownerByValueId.get(row.id),
101440
- rootOwner: rootOwnerByValueId.get(row.id) ?? null
101441
- });
101442
101529
  for (const row of inlineSweepRows) {
101443
101530
  let compiledArgs;
101444
101531
  try {
101445
- compiledArgs = compileInlineOne(delegateScope.document, row);
101532
+ compiledArgs = compiler.compileInline(row);
101446
101533
  } catch (postWriteError) {
101447
101534
  const current = inlineDelegateSweepRow(currentById.get(row.id));
101448
101535
  if (current === null) throw postWriteError;
101449
101536
  try {
101450
- compileInlineOne(args.document, current);
101537
+ compiler.compileInline(current, args.document);
101451
101538
  } catch (preWriteError) {
101452
101539
  if (sameCompileFailure(preWriteError, postWriteError)) continue;
101453
101540
  }
@@ -101968,7 +102055,7 @@ var nativePatternMembers;
101968
102055
  var init_unity_static_members = __esm({
101969
102056
  "../src/models/exports/unity-static-members.ts"() {
101970
102057
  "use strict";
101971
- init_src();
102058
+ init_cell_pattern();
101972
102059
  init_members();
101973
102060
  nativePatternMembers = new Set(
101974
102061
  Object.values(NEO_CELL_PATTERN_MEMBER_IDS)
@@ -121162,6 +121249,7 @@ function buildValueEmitContext(records2, manifest, options = {}) {
121162
121249
  localizedTextIds: /* @__PURE__ */ new Set(),
121163
121250
  constructionReplays: /* @__PURE__ */ new Map(),
121164
121251
  constructorBodySchemaKeys: /* @__PURE__ */ new WeakMap(),
121252
+ activeStoredConstructorArguments: /* @__PURE__ */ new Set(),
121165
121253
  materializedConstructors: /* @__PURE__ */ new Map(),
121166
121254
  materializedConstructorOverrideKeys: /* @__PURE__ */ new Map()
121167
121255
  };
@@ -126792,6 +126880,9 @@ function classValueBody(context, member, value, visited, targetTyped, outerEnvir
126792
126880
  storedEnvironment
126793
126881
  );
126794
126882
  const name = targetTyped ? stringField3(schemaClass2, "name") : classValueTypeName(context, classId, member, environment);
126883
+ const storedArgumentEntries = isObjectRecord2(value.constructorArgs) ? Object.entries(value.constructorArgs).filter(
126884
+ (entry) => typeof entry[1] === "string"
126885
+ ) : [];
126795
126886
  let storedConstruction;
126796
126887
  try {
126797
126888
  storedConstruction = partial ? null : storedConstructorCallSource(
@@ -126809,6 +126900,12 @@ function classValueBody(context, member, value, visited, targetTyped, outerEnvir
126809
126900
  { cause: error }
126810
126901
  );
126811
126902
  }
126903
+ const constructorArgumentValueIds = /* @__PURE__ */ new Set();
126904
+ for (const [, id2] of storedArgumentEntries) {
126905
+ if (context.values.has(id2) && visited.has(id2)) {
126906
+ constructorArgumentValueIds.add(id2);
126907
+ }
126908
+ }
126812
126909
  const replayConstruction = storedConstruction === null ? null : storedConstructorCallSource(
126813
126910
  context,
126814
126911
  schemaClass2,
@@ -126833,6 +126930,15 @@ function classValueBody(context, member, value, visited, targetTyped, outerEnvir
126833
126930
  )
126834
126931
  );
126835
126932
  const replayBody = isObjectRecord2(replayRoot?.value) ? replayRoot.value : {};
126933
+ const replayArgs = isObjectRecord2(replayRoot?.constructorArgs) ? replayRoot.constructorArgs : {};
126934
+ const replayArgumentIdsByStoredId = /* @__PURE__ */ new Map();
126935
+ for (const [slot, storedId] of storedArgumentEntries) {
126936
+ const replayId = replayArgs[slot];
126937
+ if (typeof replayId !== "string") continue;
126938
+ const ids = replayArgumentIdsByStoredId.get(storedId) ?? /* @__PURE__ */ new Set();
126939
+ ids.add(replayId);
126940
+ replayArgumentIdsByStoredId.set(storedId, ids);
126941
+ }
126836
126942
  const order = Array.isArray(schemaClass2.schemaKeyOrder) ? schemaClass2.schemaKeyOrder.filter(
126837
126943
  (entry) => typeof entry === "string" && typeof schema[entry] === "string"
126838
126944
  ) : Object.keys(schema);
@@ -126856,6 +126962,30 @@ function classValueBody(context, member, value, visited, targetTyped, outerEnvir
126856
126962
  const childMember = context.members.get(childMemberId);
126857
126963
  if (childMember === void 0)
126858
126964
  throw new Error(`Class ${name}.${key} has no member record.`);
126965
+ if (constructorArgumentValueIds.has(childId)) {
126966
+ const replayChildId2 = replayBody[key];
126967
+ const replaysBodyKey = replayGraph !== null && typeof replayChildId2 === "string" && replayArgumentIdsByStoredId.get(childId)?.has(replayChildId2) === true && materializedValueSubgraphsEqual(
126968
+ context,
126969
+ context.readEffectiveValues(),
126970
+ replayGraph,
126971
+ childId,
126972
+ replayChildId2,
126973
+ childMember,
126974
+ environment
126975
+ );
126976
+ if (!replaysBodyKey) {
126977
+ const type = schemaTypeForBindingMember(
126978
+ context,
126979
+ childMemberId,
126980
+ environment
126981
+ );
126982
+ fields.push(
126983
+ `${key} = Reference<${storedSchemaTypeName(context, type, environment, childId)}>(id: ${quote5(childId)})`
126984
+ );
126985
+ overrideKeys.add(key);
126986
+ }
126987
+ continue;
126988
+ }
126859
126989
  const preservesExternalBinding = context.collectionBindingValueIds.has(childId);
126860
126990
  const baseChildBody = context.storedValueBase?.get(childId)?.value;
126861
126991
  const clearedStoredClassOverrides = isObjectRecord2(baseChildBody) && Object.keys(baseChildBody).length > 0;
@@ -127631,11 +127761,12 @@ function storedTypedRowSource(context, type, valueId, environment, visited, writ
127631
127761
  if (!constructorOwnsGraph && context.readMaterializedGraph().independentlyOwnedValueIds.has(valueId)) {
127632
127762
  return `Reference<${storedSchemaTypeName(context, type, environment, valueId)}>(id: ${quote5(valueId)})`;
127633
127763
  }
127634
- if (visited.has(valueId)) {
127764
+ if (context.activeStoredConstructorArguments.has(valueId)) {
127635
127765
  throw new Error(
127636
127766
  `Stored constructor argument containment cycle reaches ${valueId}.`
127637
127767
  );
127638
127768
  }
127769
+ context.activeStoredConstructorArguments.add(valueId);
127639
127770
  visited.add(valueId);
127640
127771
  try {
127641
127772
  if (type.kind === "class" || type.kind === "interface" || type.kind === "generic") {
@@ -127767,7 +127898,7 @@ ${entries.flatMap(
127767
127898
  )
127768
127899
  );
127769
127900
  } finally {
127770
- visited.delete(valueId);
127901
+ context.activeStoredConstructorArguments.delete(valueId);
127771
127902
  }
127772
127903
  }
127773
127904
  function storedRowIdentitySource(valueId, writeIdentity, expression) {
@@ -140290,7 +140421,7 @@ var init_registry2 = __esm({
140290
140421
  "schema-contract/registry.mjs"() {
140291
140422
  "use strict";
140292
140423
  PROJECT_SCHEMA_CONTRACT = Object.freeze({
140293
- cliVersion: "0.57.1",
140424
+ cliVersion: "0.57.2",
140294
140425
  projectFileUploadBatchSize: 32,
140295
140426
  documentRecords: {
140296
140427
  member: {
@@ -148111,7 +148242,7 @@ There is no --keep-current: preserving current semantic state defines flatten.
148111
148242
  async function main() {
148112
148243
  const args = parseArgs(process.argv.slice(2));
148113
148244
  if (args.command === "--version") {
148114
- console.log("0.57.1");
148245
+ console.log("0.57.2");
148115
148246
  return;
148116
148247
  }
148117
148248
  if (args.command === null || args.command === "help" || args.command === "--help" || args.command === "-h") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neocompose/cli",
3
- "version": "0.57.1",
3
+ "version": "0.57.2",
4
4
  "description": "Neo Compose native project-source CLI with bidirectional sync.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -9,7 +9,7 @@ description: >-
9
9
  `@neocompose/cli` or `node cli/bin/neo.mjs` in the neo-compose repository.
10
10
  ---
11
11
 
12
- <!-- reviewed-through-cli: 0.57.1 -->
12
+ <!-- reviewed-through-cli: 0.57.2 -->
13
13
 
14
14
  # Neo Compose CLI
15
15
 
@@ -97,7 +97,7 @@ wrappers.
97
97
  The marker near the top of `SKILL.md` must exactly match the package version:
98
98
 
99
99
  ```html
100
- <!-- reviewed-through-cli: 0.57.1 -->
100
+ <!-- reviewed-through-cli: 0.57.2 -->
101
101
  ```
102
102
 
103
103
  The quoted version above is checked too, so this instruction cannot go stale