@neocompose/cli 0.22.3 → 0.22.4

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,14 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.22.4] - 2026-08-04
4
+
5
+ ### Fixed
6
+
7
+ - Normal and reset pulls now replay stored immutable system constructions and
8
+ resolve constructor parameter scopes through deeply nested initializer rows.
9
+ - Pull projection accepts migrated constructor arguments on implicitly typed
10
+ list entries, including animation segment frames.
11
+
3
12
  ## [0.22.3] - 2026-08-04
4
13
 
5
14
  ### Fixed
package/dist/neo.mjs CHANGED
@@ -10396,11 +10396,18 @@ var init_strict_resolver = __esm({
10396
10396
  pos
10397
10397
  );
10398
10398
  }
10399
- const signature = schemaClass2.constructorSignature;
10399
+ const replayingStoredConstruction = this.context.storedConstructionReplay === true;
10400
+ if (schemaClass2.constructorUnavailableReason === "immutableOnly" && !replayingStoredConstruction) {
10401
+ throw new CompileError(
10402
+ `Cannot construct Immutable-only Class '${className}'; constructors create writable Session values.`,
10403
+ pos
10404
+ );
10405
+ }
10406
+ const signature = schemaClass2.constructorSignature ?? (replayingStoredConstruction ? schemaClass2.storedConstructionReplaySignature : void 0);
10400
10407
  if (!signature) {
10401
10408
  const open = (schemaClass2.typeParameters?.length ?? 0) > 0;
10402
10409
  throw new CompileError(
10403
- schemaClass2.constructorUnavailableReason === "immutableOnly" ? `Cannot construct Immutable-only Class '${className}'; constructors create writable Session values.` : open ? `Cannot construct open generic Class '${className}'; construct a closed named descendant.` : `Class '${className}' does not expose a generated public constructor.`,
10410
+ open ? `Cannot construct open generic Class '${className}'; construct a closed named descendant.` : `Class '${className}' does not expose a generated public constructor.`,
10404
10411
  pos
10405
10412
  );
10406
10413
  }
@@ -10595,7 +10602,7 @@ var init_strict_resolver = __esm({
10595
10602
  pos
10596
10603
  );
10597
10604
  }
10598
- if (schemaClass2.constructorUnavailableReason === "immutableOnly") {
10605
+ if (schemaClass2.constructorUnavailableReason === "immutableOnly" && this.context.storedConstructionReplay !== true) {
10599
10606
  throw new CompileError(
10600
10607
  `Cannot construct Immutable-only Class '${className}'; constructors create writable Session values.`,
10601
10608
  pos
@@ -26032,9 +26039,6 @@ function attachConstructorSignature(type, environment) {
26032
26039
  )) {
26033
26040
  return type;
26034
26041
  }
26035
- if (resolvedAllowedStorage(type.id, environment) === "immutable") {
26036
- return { ...type, constructorUnavailableReason: "immutableOnly" };
26037
- }
26038
26042
  const constructorSignature2 = buildNeoScriptConstructorSignature(
26039
26043
  type.id,
26040
26044
  type.members,
@@ -26052,6 +26056,13 @@ function attachConstructorSignature(type, environment) {
26052
26056
  } : null;
26053
26057
  }
26054
26058
  );
26059
+ if (resolvedAllowedStorage(type.id, environment) === "immutable") {
26060
+ return {
26061
+ ...type,
26062
+ storedConstructionReplaySignature: constructorSignature2,
26063
+ constructorUnavailableReason: "immutableOnly"
26064
+ };
26065
+ }
26055
26066
  return { ...type, constructorSignature: constructorSignature2 };
26056
26067
  }
26057
26068
  function resolvedAllowedStorage(classId, environment) {
@@ -51136,7 +51147,33 @@ function constructorSignature(schemaClass2, members, context, genericEnvironment
51136
51147
  return {};
51137
51148
  }
51138
51149
  if (resolveAllowedStorage(schemaClass2.id, context.vm.classes) === "immutable" /* Immutable */) {
51139
- return { constructorUnavailableReason: "immutableOnly" };
51150
+ const signature2 = buildNeoScriptConstructorSignature(
51151
+ schemaClass2.id,
51152
+ members,
51153
+ (memberId) => {
51154
+ const record3 = analyzerMemberById(context.vm, memberId);
51155
+ if (!record3) return null;
51156
+ try {
51157
+ const resolved = substituteMember(
51158
+ record3,
51159
+ genericEnvironment,
51160
+ context.vm.members
51161
+ );
51162
+ return {
51163
+ required: resolved.required,
51164
+ defaultValue: "defaultValue" in resolved ? resolved.defaultValue : void 0
51165
+ };
51166
+ } catch {
51167
+ return projections.some(
51168
+ (projection) => projection.memberId === memberId
51169
+ ) ? { required: true } : null;
51170
+ }
51171
+ }
51172
+ );
51173
+ return {
51174
+ storedConstructionReplaySignature: signature2,
51175
+ constructorUnavailableReason: "immutableOnly"
51176
+ };
51140
51177
  }
51141
51178
  const signature = buildNeoScriptConstructorSignature(
51142
51179
  schemaClass2.id,
@@ -52306,6 +52343,7 @@ function compileStrict(code, context) {
52306
52343
  deferred: context.deferred,
52307
52344
  functionName: context.functionName,
52308
52345
  migrationContext: context.migrationContext,
52346
+ storedConstructionReplay: context.storedConstructionReplay,
52309
52347
  valueAliases: context.valueAliases,
52310
52348
  implicitMemberAccess: context.implicitMemberAccess,
52311
52349
  declaringType: context.declaringType,
@@ -52370,9 +52408,10 @@ function createContext(ctx, options) {
52370
52408
  analyzer,
52371
52409
  ctx.compilationProject
52372
52410
  );
52373
- if (ctx.implicitMemberAccess !== true) return adapted;
52411
+ const replayContext = ctx.storedConstructionReplay === true ? { ...adapted, storedConstructionReplay: true } : adapted;
52412
+ if (ctx.implicitMemberAccess !== true) return replayContext;
52374
52413
  return {
52375
- ...adapted,
52414
+ ...replayContext,
52376
52415
  ...ctx.staticMember === true ? { thisClass: void 0 } : {},
52377
52416
  implicitMemberAccess: true,
52378
52417
  ...adapted.thisClass ? { declaringType: adapted.thisClass } : {},
@@ -52681,7 +52720,8 @@ function compileValueRowInitializerBody(args) {
52681
52720
  args.initializerOwnerClass,
52682
52721
  args.constructors ?? []
52683
52722
  ),
52684
- ...args.compilationProject === void 0 ? {} : { compilationProject: args.compilationProject }
52723
+ ...args.compilationProject === void 0 ? {} : { compilationProject: args.compilationProject },
52724
+ ...args.storedConstructionReplay === true ? { storedConstructionReplay: true } : {}
52685
52725
  })
52686
52726
  );
52687
52727
  } catch (error) {
@@ -54975,7 +55015,12 @@ function makeEvaluatorLookups(members, values, options = {}) {
54975
55015
  if (options.includeValueGraphIndexes === true) {
54976
55016
  return {
54977
55017
  ...lookups,
54978
- evaluatorIndexes: buildEvaluatorBaseIndexes(members, values, valMap)
55018
+ evaluatorIndexes: buildEvaluatorBaseIndexes(members, values, valMap),
55019
+ ...options.constructorInitializerDocument === void 0 ? {} : {
55020
+ constructorInitializerIndexes: buildConstructorInitializerIndexes(
55021
+ options.constructorInitializerDocument
55022
+ )
55023
+ }
54979
55024
  };
54980
55025
  }
54981
55026
  return lookups;
@@ -58896,7 +58941,7 @@ function validateClassConstructorDescriptor(info, ctx, requireEveryRequiredField
58896
58941
  `Cannot construct open generic Class '${schemaClass2.name}'.`
58897
58942
  );
58898
58943
  }
58899
- if (resolveAllowedStorage(classId, ctx.vm.classes) === "immutable" /* Immutable */) {
58944
+ if (resolveAllowedStorage(classId, ctx.vm.classes) === "immutable" /* Immutable */ && ctx.storedConstructionReplay !== true) {
58900
58945
  throw new NSGetterRuntimeError(
58901
58946
  `Cannot construct Immutable-only Class '${schemaClass2.name}'.`
58902
58947
  );
@@ -59778,55 +59823,70 @@ function constructorInitializerIndexes(ctx) {
59778
59823
  if (ctx.__constructorInitializerIndexes !== void 0) {
59779
59824
  return ctx.__constructorInitializerIndexes;
59780
59825
  }
59826
+ const shared = ctx.vm.databaseVM?.constructorInitializerIndexes;
59827
+ if (shared !== void 0) {
59828
+ ctx.__constructorInitializerIndexes = shared;
59829
+ return shared;
59830
+ }
59831
+ const built = buildConstructorInitializerIndexes(ctx.vm);
59832
+ ctx.__constructorInitializerIndexes = built;
59833
+ return built;
59834
+ }
59835
+ function buildConstructorInitializerIndexes(vm) {
59781
59836
  const initializerScopeMemberIds = /* @__PURE__ */ new WeakMap();
59782
59837
  const initializerByValueId = /* @__PURE__ */ new Map();
59783
- for (const row of ctx.vm.values) {
59838
+ for (const row of vm.values) {
59784
59839
  const initializer = Reflect.get(row, "init");
59785
59840
  if (initializer !== void 0)
59786
59841
  initializerByValueId.set(row.id, initializer);
59787
59842
  }
59788
- for (const member of ctx.vm.members) {
59843
+ for (const member of vm.members) {
59789
59844
  const defaultValue = member.defaultValue;
59790
59845
  if (isInitValueContent(defaultValue)) {
59791
59846
  initializerScopeMemberIds.set(defaultValue.init, member.id);
59792
- continue;
59793
59847
  }
59794
- if (!isLiteralValueContent(defaultValue)) continue;
59795
- const value = defaultValue.value;
59796
- const valueIds = Array.isArray(value) ? value : typeof value === "object" && value !== null ? Object.values(value) : [];
59797
- for (const valueId of valueIds) {
59798
- if (typeof valueId !== "string") continue;
59799
- const initializer = initializerByValueId.get(valueId);
59800
- if (initializer !== void 0) {
59801
- initializerScopeMemberIds.set(initializer, member.id);
59802
- }
59848
+ }
59849
+ const initializerRootOwners = /* @__PURE__ */ new Map();
59850
+ resolveOwnerMembersForValues(
59851
+ {
59852
+ classes: vm.classes,
59853
+ members: vm.members,
59854
+ values: vm.values
59855
+ },
59856
+ new Set(initializerByValueId.keys()),
59857
+ void 0,
59858
+ initializerRootOwners
59859
+ );
59860
+ for (const [valueId, initializer] of initializerByValueId) {
59861
+ const rootOwnerId = Reflect.get(
59862
+ initializerRootOwners.get(valueId) ?? {},
59863
+ "id"
59864
+ );
59865
+ if (typeof rootOwnerId === "string") {
59866
+ initializerScopeMemberIds.set(initializer, rootOwnerId);
59803
59867
  }
59804
59868
  }
59805
59869
  const declaringClassIdsByMemberId = /* @__PURE__ */ new Map();
59806
- for (const schemaClass2 of ctx.vm.classes) {
59870
+ for (const schemaClass2 of vm.classes) {
59807
59871
  for (const memberId of Object.values(schemaClass2.schema)) {
59808
59872
  const owners = declaringClassIdsByMemberId.get(memberId) ?? /* @__PURE__ */ new Set();
59809
59873
  owners.add(schemaClass2.id);
59810
59874
  declaringClassIdsByMemberId.set(memberId, owners);
59811
59875
  }
59812
59876
  }
59813
- const memberById = new Map(
59814
- ctx.vm.members.map((member) => [member.id, member])
59815
- );
59877
+ const memberById = new Map(vm.members.map((member) => [member.id, member]));
59816
59878
  const containerMemberIdByEntryId = /* @__PURE__ */ new Map();
59817
- for (const member of ctx.vm.members) {
59879
+ for (const member of vm.members) {
59818
59880
  if (isMemberList(member) || isMemberDictionary(member)) {
59819
59881
  containerMemberIdByEntryId.set(member.entryMemberId, member.id);
59820
59882
  }
59821
59883
  }
59822
- const built = {
59884
+ return {
59823
59885
  initializerScopeMemberIds,
59824
59886
  declaringClassIdsByMemberId,
59825
59887
  memberById,
59826
59888
  containerMemberIdByEntryId
59827
59889
  };
59828
- ctx.__constructorInitializerIndexes = built;
59829
- return built;
59830
59890
  }
59831
59891
  function prepareConstructorArgumentScopes(record3, argumentValues, ctx) {
59832
59892
  const values = /* @__PURE__ */ new Map();
@@ -61173,6 +61233,7 @@ var init_evaluateNSGetter = __esm({
61173
61233
  init_interfaces();
61174
61234
  init_neoscript();
61175
61235
  init_NSGetterRuntimeError();
61236
+ init_value_row_owner_members();
61176
61237
  init_decimal();
61177
61238
  init_members();
61178
61239
  init_core();
@@ -61279,17 +61340,20 @@ var init_evaluateNSGetter = __esm({
61279
61340
 
61280
61341
  // ../src/view-models/neoscript-evaluator/evaluateInitializer.ts
61281
61342
  function initializerEvaluatorLookups(document) {
61282
- const key = document;
61343
+ const key = document.evaluatorCache?.key ?? document;
61344
+ const revision = document.evaluatorCache?.revision;
61283
61345
  const cached = evaluatorLookupsByDocument.get(key);
61284
- if (cached !== void 0 && cached.members === document.members && cached.values === document.values) {
61346
+ if (cached !== void 0 && (revision === void 0 ? cached.members === document.members && cached.values === document.values : cached.revision === revision)) {
61285
61347
  return cached.lookups;
61286
61348
  }
61287
61349
  const lookups = makeEvaluatorLookups(document.members, document.values, {
61288
- includeValueGraphIndexes: true
61350
+ includeValueGraphIndexes: true,
61351
+ constructorInitializerDocument: document
61289
61352
  });
61290
61353
  evaluatorLookupsByDocument.set(key, {
61291
61354
  members: document.members,
61292
61355
  values: document.values,
61356
+ revision,
61293
61357
  lookups
61294
61358
  });
61295
61359
  return lookups;
@@ -61339,6 +61403,7 @@ function evaluateMemberInitializer(args) {
61339
61403
  rootValue: buildInitializerRootValue(args.document),
61340
61404
  saveStaticBindings: args.saveStaticBindings,
61341
61405
  sessionStaticBindings: args.sessionStaticBindings,
61406
+ ...args.storedConstructionReplay === true ? { storedConstructionReplay: true } : {},
61342
61407
  __constructedArgumentsByValue: /* @__PURE__ */ new WeakMap(),
61343
61408
  __createdStorageKeyDeclarations: args.storageKeyDeclarations ?? /* @__PURE__ */ new Map()
61344
61409
  };
@@ -61387,7 +61452,8 @@ function evaluateInitializerMaterialization(args) {
61387
61452
  member: args.member,
61388
61453
  document: args.document,
61389
61454
  createdValues,
61390
- storageKeyDeclarations
61455
+ storageKeyDeclarations,
61456
+ ...args.storedConstructionReplay === true ? { storedConstructionReplay: true } : {}
61391
61457
  });
61392
61458
  return { evaluated, createdValues, storageKeyDeclarations };
61393
61459
  }
@@ -61395,7 +61461,8 @@ function materializeInitializerValue(args) {
61395
61461
  const { evaluated, createdValues, storageKeyDeclarations } = evaluateInitializerMaterialization({
61396
61462
  init: args.row.init,
61397
61463
  member: args.member,
61398
- document: args.document
61464
+ document: args.document,
61465
+ ...args.storedConstructionReplay === true ? { storedConstructionReplay: true } : {}
61399
61466
  });
61400
61467
  const {
61401
61468
  init: _init,
@@ -81133,6 +81200,7 @@ function replayStoredConstructionV4(args) {
81133
81200
  // Instance calls are self-contained. Declaration calls inherit the class
81134
81201
  // header parameters that are in lexical scope at their source site.
81135
81202
  initializerOwnerClass: args.initializerOwnerClass ?? null,
81203
+ storedConstructionReplay: true,
81136
81204
  ...args.compilationProject === void 0 ? {} : { compilationProject: args.compilationProject }
81137
81205
  });
81138
81206
  if (!isMemberValue(candidate) || !isInitValueContent(candidate)) {
@@ -81151,7 +81219,8 @@ function replayStoredConstructionV4(args) {
81151
81219
  // Constructor-only rows have no structural member owner. Use the same
81152
81220
  // explicit typed descriptor for evaluation that compiled the replay.
81153
81221
  member: compileMember,
81154
- row: candidate
81222
+ row: candidate,
81223
+ storedConstructionReplay: true
81155
81224
  });
81156
81225
  break;
81157
81226
  } catch (error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neocompose/cli",
3
- "version": "0.22.3",
3
+ "version": "0.22.4",
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.22.3 -->
12
+ <!-- reviewed-through-cli: 0.22.4 -->
13
13
 
14
14
  # Neo Compose CLI
15
15
 
@@ -78,7 +78,7 @@ wrappers.
78
78
  The marker near the top of `SKILL.md` must exactly match the package version:
79
79
 
80
80
  ```html
81
- <!-- reviewed-through-cli: 0.22.3 -->
81
+ <!-- reviewed-through-cli: 0.22.4 -->
82
82
  ```
83
83
 
84
84
  The quoted version above is checked too, so this instruction cannot go stale