@neocompose/cli 0.2.1 → 0.2.3

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.
Binary file
Binary file
@@ -6,11 +6,11 @@
6
6
  "compilationOptions": {},
7
7
  "targets": {
8
8
  ".NETCoreApp,Version=v6.0": {
9
- "NeoCompose.SchemaCompiler/2.0.1": {
9
+ "NeoCompose.SchemaCompiler/2.1.0": {
10
10
  "dependencies": {
11
11
  "Microsoft.CodeAnalysis.CSharp": "4.11.0",
12
- "NeoCompose.Schema": "2.0.1",
13
- "NeoCompose.Schema.Tooling": "2.0.1"
12
+ "NeoCompose.Schema": "2.1.0",
13
+ "NeoCompose.Schema.Tooling": "2.1.0"
14
14
  },
15
15
  "runtime": {
16
16
  "NeoCompose.SchemaCompiler.dll": {}
@@ -184,26 +184,26 @@
184
184
  }
185
185
  },
186
186
  "System.Threading.Tasks.Extensions/4.5.4": {},
187
- "NeoCompose.Schema/2.0.1": {
187
+ "NeoCompose.Schema/2.1.0": {
188
188
  "runtime": {
189
189
  "NeoCompose.Schema.dll": {
190
- "assemblyVersion": "2.0.1.0",
191
- "fileVersion": "2.0.1.0"
190
+ "assemblyVersion": "2.1.0.0",
191
+ "fileVersion": "2.1.0.0"
192
192
  }
193
193
  }
194
194
  },
195
- "NeoCompose.Schema.Tooling/2.0.1": {
195
+ "NeoCompose.Schema.Tooling/2.1.0": {
196
196
  "runtime": {
197
197
  "NeoCompose.Schema.Tooling.dll": {
198
- "assemblyVersion": "2.0.1.0",
199
- "fileVersion": "2.0.1.0"
198
+ "assemblyVersion": "2.1.0.0",
199
+ "fileVersion": "2.1.0.0"
200
200
  }
201
201
  }
202
202
  }
203
203
  }
204
204
  },
205
205
  "libraries": {
206
- "NeoCompose.SchemaCompiler/2.0.1": {
206
+ "NeoCompose.SchemaCompiler/2.1.0": {
207
207
  "type": "project",
208
208
  "serviceable": false,
209
209
  "sha512": ""
@@ -285,12 +285,12 @@
285
285
  "path": "system.threading.tasks.extensions/4.5.4",
286
286
  "hashPath": "system.threading.tasks.extensions.4.5.4.nupkg.sha512"
287
287
  },
288
- "NeoCompose.Schema/2.0.1": {
288
+ "NeoCompose.Schema/2.1.0": {
289
289
  "type": "project",
290
290
  "serviceable": false,
291
291
  "sha512": ""
292
292
  },
293
- "NeoCompose.Schema.Tooling/2.0.1": {
293
+ "NeoCompose.Schema.Tooling/2.1.0": {
294
294
  "type": "project",
295
295
  "serviceable": false,
296
296
  "sha512": ""
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "formatVersion": 2,
3
- "contractVersion": "2.0",
3
+ "contractVersion": "2.1",
4
4
  "manifestName": "neo-schema-manifest-v2",
5
5
  "protocolVersion": 3,
6
- "sdkVersion": "2.0.1",
7
- "cliVersion": "0.2.0",
6
+ "sdkVersion": "2.1.0",
7
+ "cliVersion": "0.2.3",
8
8
  "apiTarget": "netstandard2.1",
9
9
  "referenceAssemblySet": "NETStandard.Library.Ref/2.1.0",
10
10
  "requiredToolingFiles": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neocompose/cli",
3
- "version": "0.2.1",
3
+ "version": "0.2.3",
4
4
  "description": "Neo Compose schema-as-code CLI with compiler-backed C# authoring and bidirectional sync.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -51,7 +51,7 @@ unsupported. Preserve any source you need, then create a fresh v2 working copy:
51
51
  neo init --project <id> [--version <id>] [--dir neo]
52
52
  ```
53
53
 
54
- `neo pull --reset` is only for an existing v2 workspace; it reconstructs
54
+ `neo pull --reset` is only for an existing schema workspace; it reconstructs
55
55
  CLI-managed source from the server and refreshes the compiler SDK and analyzer.
56
56
 
57
57
  Neo never downloads or installs .NET. Compiler host discovery is:
@@ -107,6 +107,9 @@ Native C# carries native meaning:
107
107
  ordering attribute is present.
108
108
  - Method parameters and return type are the function signature.
109
109
  `Task`/`Task<T>` means deferred execution.
110
+ - A C# `static` property or method is type-owned. Stored static properties use
111
+ one replaceable binding and are excluded from instance construction;
112
+ receiver kind cannot be changed in place.
110
113
  - Concrete `[NeoScript]`/`[NeoFunction]` methods are C# 11 partial
111
114
  declarations. The bundled source generator adds inert compile-only bodies.
112
115
  Abstract functions are ordinary abstract methods.
@@ -123,7 +126,7 @@ public enum ItemType
123
126
  Food,
124
127
  }
125
128
 
126
- [NeoType("type-inventory-item", AllowedStorage = NeoAllowedStorage.Static)]
129
+ [NeoType("type-inventory-item", AllowedStorage = NeoAllowedStorage.Immutable)]
127
130
  [NeoSchemaOrder(nameof(Name), nameof(Type), nameof(Tags), nameof(UsePrimary))]
128
131
  public abstract partial class InventoryItem<
129
132
  [NeoId("generic-stack")] TStack>
@@ -234,9 +237,30 @@ Canonical C# places `// NeoScript: Scripts/<Type>/<Member>.neo` above the
234
237
  linked declaration. Go-to-definition, references, and rename use the Roslyn
235
238
  source identity plus stable member ID to navigate between C# and `.neo`.
236
239
 
237
- NeoScript is C#-flavored: use typed declarations (`string name = ...;`, not
238
- `var`); `this` is the containing instance; roots include `root.Assets`,
239
- `root.Save`, and `root.Session`.
240
+ NeoScript is C#-flavored. Locals may use an explicit type
241
+ (`string name = ...;`) or inference (`var name = ...;`); inferred locals retain
242
+ the same static type and editor intelligence. `this` is the containing
243
+ instance; roots include `root.Assets`, `root.Save`, and `root.Session`.
244
+
245
+ Every executable NeoScript unit uses the same mutation-capable resolver and
246
+ executor. Getter and dialogue-condition bodies may write just like actions,
247
+ setters, Functions, and migrations; the resolved target's Immutable, Save,
248
+ Session, or runtime ownership—not the body kind—decides whether the write is
249
+ legal. The non-code Condition builder remains a restricted read form.
250
+
251
+ Concrete, closed, writable Custom types expose the same public constructor
252
+ shape as generated C#. Use `new Type(required, optional, ...)`; required
253
+ parameters come first, optional parameters follow in generated-code order,
254
+ and `null` skips an optional positional slot. Arguments remain positional;
255
+ editor parameter-name hints are previews, not named-argument syntax.
256
+ Constructor graphs begin as parentless Session values. They survive only when
257
+ attached, returned, or otherwise escaped from the invocation; abandoned
258
+ graphs are reclaimed.
259
+
260
+ Static members use a type receiver (`GameRules.EncounterCount`), while
261
+ instance members use a value receiver. Stored static members resolve through
262
+ their authored/Save/Session binding layer and are never copied into Custom
263
+ instances.
240
264
 
241
265
  ```sh
242
266
  neo script check --all
@@ -251,7 +275,8 @@ neo script apply --mode action '...'
251
275
 
252
276
  `eval` uses authored values and the same evaluator as the web app. `apply` is
253
277
  preview-only unless its command explicitly supports a commit; it reports
254
- return values and write intents. Prefer `--json` for automation.
278
+ return values, ordered write intents, and surviving constructor rows in
279
+ `createdSessionValues`. Prefer `--json` for automation.
255
280
 
256
281
  ## Conflicts and version bumps
257
282
 
@@ -278,6 +303,9 @@ neo records get <kind> <id>
278
303
  neo values list [attributeId]
279
304
  neo values get <valueId>
280
305
  neo values set <valueId> '<raw-json-value>'
306
+ neo values bind <staticAttributeId> <valueId>
307
+ neo values unbind <staticAttributeId>
308
+ neo values create '<raw-json-value>' [--type <customTypeId>] --bind <staticAttributeId>
281
309
  neo loc locales
282
310
  neo loc list
283
311
  neo loc set <textId> <locale> "text"
@@ -285,9 +313,11 @@ neo loc set <textId> <locale> "text"
285
313
 
286
314
  Write verbs accept a JSON-array batch on stdin or `--file`; use one batch when
287
315
  edits must be atomic. A `values set` payload is the raw value, not
288
- `{"value": ...}`. For collection rows use `values add-entry` on the live
289
- container value; an attribute's default container ID may not be an instance's
290
- container.
316
+ `{"value": ...}`. `values bind` and `unbind` edit only a stored static
317
+ member's authored binding; `create --bind` can atomically create and bind a
318
+ complete Custom/collection graph supplied as one batch. For collection rows
319
+ use `values add-entry` on the live container value; an attribute's default
320
+ container ID may not be an instance's container.
291
321
 
292
322
  ### Dialogue authoring
293
323