@neocompose/cli 0.84.3 → 0.84.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neocompose/cli",
3
- "version": "0.84.3",
3
+ "version": "0.84.5",
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.84.3 -->
12
+ <!-- reviewed-through-cli: 0.84.5 -->
13
13
 
14
14
  # Neo Compose CLI
15
15
 
@@ -129,7 +129,7 @@ wrappers.
129
129
  The marker near the top of `SKILL.md` must exactly match the package version:
130
130
 
131
131
  ```html
132
- <!-- reviewed-through-cli: 0.84.3 -->
132
+ <!-- reviewed-through-cli: 0.84.5 -->
133
133
  ```
134
134
 
135
135
  The quoted version above is checked too, so this instruction cannot go stale
@@ -335,6 +335,9 @@ Generated animation clip targets and reference lookup factories retain construct
335
335
  generic arguments, including supported forwarded bindings. Clip getters use the
336
336
  declared target type when the owner is a derived class. Export reports an error
337
337
  when a clip target does not match the owner or one of its constructed base types.
338
+ Inherited collection interface getters preserve supported detached temporaries.
339
+ Constructed entries such as `Frame<T>` use the interface's generic argument
340
+ family for both their collection type and value converters.
338
341
  New instances that reuse existing member-localized text retain its shared ID
339
342
  and translations in the export.
340
343
 
@@ -425,6 +425,10 @@ value-level target metadata.
425
425
 
426
426
  ## Computed initializers and declared constructors
427
427
 
428
+ Inherited member initializers read parameters from the constructor that declared
429
+ them, including when export materialization clones their bodies. A storage-only
430
+ override keeps that original constructor scope.
431
+
428
432
  Use an expression initializer when a member default must be evaluated during
429
433
  construction rather than stored as a closed literal. It is replayed for omitted
430
434
  members in push, web, and SDK contexts. A stored override remains pinned until
@@ -124,6 +124,26 @@ class members and `IReceiver` members. The same applies to guards that return,
124
124
  throw, or break. Reassignment clears the proof, and paths that did not pass the
125
125
  guard cannot use it.
126
126
 
127
+ A class can construct each interface only once. A class value known to implement
128
+ `IBox<int>` cannot pass an `is IBox<string>` check, including through inherited
129
+ interfaces. Open classes can still acquire an unrelated interface. Checks between
130
+ interface-only receivers retain their runtime behavior.
131
+
132
+ Guards preserve a generic receiver's `T` identity and its declared bound. A
133
+ declaration pattern also keeps the original receiver's members: after
134
+ `if (item is not IReceiver receiver) return;`, `item` still has its class or
135
+ generic type, while `receiver` exposes `IReceiver`.
136
+
137
+ A later class guard retains these capabilities. For example, after checking
138
+ `item is IReceiver` and then `item is Furnace`, the original `item` exposes both
139
+ `Furnace` and `IReceiver` members. A sealed class that cannot implement the
140
+ proven interface remains an impossible test.
141
+
142
+ Guards also narrow named global values and static member paths. Qualified and
143
+ unqualified static access share the same proof, including inherited statics.
144
+ Assignments clear affected proofs. A closure must establish its own guard
145
+ because the stored value can change before the closure runs.
146
+
127
147
  Functions, natives and interface functions can declare their own type
128
148
  parameters after the name, each with an optional constraint and default:
129
149
 
@@ -172,18 +192,19 @@ Each instance binds defaults that read `this` to itself; invalid lambda bodies
172
192
  are reported at the declaration by status, editor validation, and preparation.
173
193
  Static delegate fields use static class scope: they can read static members
174
194
  without an instance owner, and cannot access `this` or instance members.
175
- Other static fields can call them in their initializers, as in
176
- `public static int First = Helper.Run();`. Outside a lambda body, a field
177
- initializer qualifies the members it reads; a bare `Run()` or `Number` there is
178
- an unknown name.
179
- A delegate field default is the exception: it may name a method group bare.
195
+ Field initializers can read their declaring class's static members without a
196
+ qualifier, including inherited statics and reads inside nested object defaults:
197
+ `public int First = Run();` and `public static int Copy = Number;`.
198
+ Eager initializers cannot read instance members or `this`; static defaults also
199
+ cannot capture class-header parameters. Defer instance reads inside a delegate
200
+ lambda. A delegate field default may also name a method group bare.
180
201
  `Value = Read` or `this.Read` binds each new instance to its own `Read`, and a
181
202
  static function may be named as `Read` or qualified as `Holder.Read`/`Other.Read`.
182
203
  A qualified method group must name a static function. Method groups use the same
183
204
  signature rule as in a body, and a mismatch is reported at the declaration.
184
205
  A static field that names another static copies a value, as in
185
206
  `public static int B = Holder.A;`. A class, List, Set, or Dictionary static
186
- already owns its value, so call `Clone()` or use `Reference`. A static delegate cannot copy another Class's delegate field,
207
+ already owns its value, so call `Clone()` or use `Reference`. A static delegate cannot copy another Class's delegate field, including an inherited one,
187
208
  because its closure compiles in its own Class; wrap it as `() => Other.Call()`.
188
209
  Omitted constructor fields use their authored defaults, including optional fields.
189
210
  Writable collection defaults belong to each instance; mutations persist on later
@@ -195,7 +216,13 @@ needed type descriptors; spec-only types remain in the test candidate.
195
216
  Generic primary constructors also accept stored collection arguments, such as
196
217
  `public static Box<List<int>> Value = new([1, 2]);`. Stored replay uses the closed
197
218
  parameter type to preserve collection references.
219
+ Stored constructors validate every authored type argument, including names nested
220
+ inside collections and generic types. An expected field type cannot hide an unknown
221
+ type in `new Box<List<MissingType>>()`.
198
222
  Typed locals also accept generic class types such as `Box<int> box = new(1);`.
223
+ Generic class arguments remain invariant through inheritance: `IntBox : Box<int>`
224
+ can be assigned to `Box<int>`, but not `Box<string>`. Arguments are substituted
225
+ through every intermediate base class, including nested generic arguments.
199
226
  Explicit lambda parameter annotations accept the same type grammar as
200
227
  declarations, including `decimal`, generic parameters, collections, arrays, and
201
228
  nullable types.
@@ -224,7 +251,8 @@ unconstrained generic `T` compares by value.
224
251
  Calling `Equals(other)` on a non-null generic value dynamically uses the
225
252
  runtime Class's one-argument `Equals` Function or NSFunction when it returns
226
253
  `bool`, including the effective override. Values without that member fall back
227
- to value equality.
254
+ to value equality. For local sets, that fallback compares their current entries
255
+ in insertion order, regardless of prior reads or mutations.
228
256
 
229
257
  Object initializers are available in method bodies and `.spec.neo` tests:
230
258
 
@@ -265,6 +293,9 @@ conditions being false also narrow receivers in later `else if` conditions.
265
293
  A nullable value coalesced with a non-null fallback produces a non-null result,
266
294
  including in constructor arguments: `new Sprite(item.Sprite ?? SpriteInfo.Empty)`.
267
295
  A nullable fallback keeps the result nullable when the left operand can be null.
296
+ When a reference result is expected, `first ?? fallback` selects the reference
297
+ itself. A present reference to a null target does not select the fallback.
298
+ In a scalar context, references still read their targets before coalescing.
268
299
 
269
300
  Treat lookup-return values with the same nullable narrowing rules.
270
301
 
@@ -331,6 +362,12 @@ this.A = Reference(this.Count); // A now names Count
331
362
  this.A += 1; // reads A's target, writes it back
332
363
  ```
333
364
 
365
+ Conditional assignments such as `this.A = choose ? first : second` rebind `A`
366
+ when both branches supply references. Scalar branches write through `A`; a mixed
367
+ reference and scalar choice reads the selected reference's target. Constructors
368
+ may initialize their own reference fields this way, but cannot write through
369
+ external targets.
370
+
334
371
  A plain value never becomes a reference: passing `3` to a `Reference<int>`
335
372
  parameter is an error. A handle reference never owns, so it can't hold a new
336
373
  list or a query result.
@@ -387,6 +424,11 @@ may be null. The receiver stays unchanged.
387
424
  return "banana".Replace("a", "o"); // "bonono"
388
425
  ```
389
426
 
427
+ Integer inputs assigned to `float` round to float32. This also applies to
428
+ function arguments and returns, collection entries, and `List.Repeat` with a
429
+ float entry type. `Contains` and `IndexOf` on float collections also convert
430
+ integer search arguments. Nullable assignments preserve `null`.
431
+
390
432
  ## Collection builtins
391
433
 
392
434
  Lists expose their size as either `items.Count` or `items.Count()`. Use
@@ -399,8 +441,9 @@ Use `Any()` or `Any((item) => predicate)` to check for a match, and
399
441
  `All((item) => predicate)` to check every entry. Both short-circuit; an empty
400
442
  collection has `Any() == false` and `All(...) == true`.
401
443
 
402
- `Last`, `LastOrDefault`, `Single`, and `SingleOrDefault` accept zero arguments
403
- or one predicate. `Last` throws when no entry matches. `Single` throws unless
444
+ `First`, `FirstOrDefault`, `Last`, `LastOrDefault`, `Single`, and `SingleOrDefault` accept zero arguments
445
+ or one predicate. `First` and `Last` throw when no entry matches. Enum sets
446
+ return enum values, including when a predicate selects the entry. `Single` throws unless
404
447
  exactly one matches; `SingleOrDefault` still throws for multiple matches.
405
448
  The `OrDefault` forms return nullable entries and use `null` for no match.
406
449
 
@@ -711,3 +754,7 @@ and may appear in any order. Use the existing nested positional override for a
711
754
  virtual owner; changing its listeners alone must not add a value override.
712
755
  Omitting a field inherits its listeners. An empty array suppresses inherited
713
756
  listeners and disappears when there is no inherited wiring to suppress.
757
+
758
+ Decimal collection membership compares numeric values: `1.0` and `1.00` are
759
+ equal for `ToSet`, `Contains`, `IndexOf`, `Add`, and `Remove`. Decimal scale
760
+ is retained for display; string entries such as `"1.0"` and `"1.00"` stay distinct.
@@ -190,6 +190,13 @@ EligibleIngredients = root.Assets.Crafting.FurnaceRecipes
190
190
  .ToSet()
191
191
  ```
192
192
 
193
+ `Box<Reference<Item>>` keeps its reference storage type through push and pull,
194
+ including explicit `new Box<Reference<Item>>()` calls. Its `Item` targets stay
195
+ shared; reading a class reference still produces the class value. A derived
196
+ construction in a base-typed slot retains reference bindings forwarded through
197
+ the inheritance chain, such as `Base<Reference<Item>>` holding
198
+ `new Derived<Reference<Item>>()`.
199
+
193
200
  Writing `Reference(recipe.Ingredient)` inside the callback is also valid.
194
201
  `Reference(value)` preserves an evaluated class value and its identity; it does
195
202
  not clone it or turn it into a separate wrapper object. An optional generic
@@ -232,6 +239,10 @@ Reference<NeoDialogue>(id: "capitol-dialogue-id")
232
239
  - Both forms are legal in a member's declaration default, not only inside a
233
240
  value graph. A key written there resolves after every pass has run, so it may
234
241
  name a row the same push creates.
242
+ - List and dictionary declaration defaults can contain slot references, including
243
+ nested collections: `List<Reference<int>> Counts = [Reference(root.Save.Bits)]`.
244
+ Each instance owns its collection; entries continue to target the original
245
+ root or static slot, including slots supplied by declaration defaults.
235
246
  - Keep genuine structural references ID-based when their collection has no
236
247
  stable symbol, path, or key surface. Animation track and frame-override
237
248
  targets are selectors, not structural references: encode a stable
@@ -276,6 +287,10 @@ that instance. Leaving the emitted construction unchanged creates no redundant
276
287
  value rows. A nullable member with no default remains bare; an explicit null
277
288
  default emits `= null`.
278
289
 
290
+ Changing a construction to another overload or shared argument rebuilds the
291
+ instance even when the argument values compare equal. Owned inline arguments
292
+ still compare by contents; unchanged shared arguments keep their identities.
293
+
279
294
  Spelling an unchanged child default, such as `FPS = 8`, stays a no-op after
280
295
  push even when sibling fields own stored rows. Adding a different child default
281
296
  preserves those siblings' row identities; it does not transfer their ownership.
@@ -399,3 +414,8 @@ is an error; remove the declaration to request deletion.
399
414
  New schema getters referenced by NeoFlow interpolation need no `@id`. Export and
400
415
  `neo dev` assign the same identity to the declaration and its references, including
401
416
  inherited getters. Repeated exports and the next push reuse the export identity ledger.
417
+
418
+ Dictionary string keys are data. An entry named `"Id"` reads its value through
419
+ `dictionary["Id"]`; class `.Id` continues to return the class instance identity.
420
+
421
+ You can remove a constructor and replace every call to it in the same edit. Push prepares the new calls together with the schema change and removes argument rows owned by the old constructions.