@neocompose/cli 0.2.0 → 0.2.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.
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.1",
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.0",
3
+ "version": "0.2.2",
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",
@@ -31,7 +31,7 @@ The compiler reports file:line:column diagnostics and never guesses. Unknown
31
31
  authorable server fields fail with “CLI contract upgrade required”; they never
32
32
  hide in an opaque JSON carrier.
33
33
 
34
- ## Setup and format migration
34
+ ## Setup and format requirement
35
35
 
36
36
  ```sh
37
37
  npm i -g @neocompose/cli
@@ -44,16 +44,15 @@ Repository development uses `node cli/bin/neo.mjs`. Agents should always pass
44
44
  explicit flags/IDs. Human terminals may show pickers and confirms; non-TTY/CI
45
45
  use fails with an actionable missing-flag diagnostic rather than blocking.
46
46
 
47
- `neo.json` must contain `formatVersion: 2`. A missing marker is legacy v1.
48
- Normal schema commands reject v1; run:
47
+ `neo.json` must contain `formatVersion: 2`. A missing or different marker is
48
+ unsupported. Preserve any source you need, then create a fresh v2 working copy:
49
49
 
50
50
  ```sh
51
- neo pull --reset
51
+ neo init --project <id> [--version <id>] [--dir neo]
52
52
  ```
53
53
 
54
- Reset reconstructs from the server using v2, refreshes the compiler SDK and
55
- analyzer, and deletes obsolete `Schema/NeoSchemaAttributes.cs`. There is no
56
- v1 parser or compatibility shim.
54
+ `neo pull --reset` is only for an existing schema workspace; it reconstructs
55
+ CLI-managed source from the server and refreshes the compiler SDK and analyzer.
57
56
 
58
57
  Neo never downloads or installs .NET. Compiler host discovery is:
59
58
 
@@ -108,6 +107,9 @@ Native C# carries native meaning:
108
107
  ordering attribute is present.
109
108
  - Method parameters and return type are the function signature.
110
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.
111
113
  - Concrete `[NeoScript]`/`[NeoFunction]` methods are C# 11 partial
112
114
  declarations. The bundled source generator adds inert compile-only bodies.
113
115
  Abstract functions are ordinary abstract methods.
@@ -124,7 +126,7 @@ public enum ItemType
124
126
  Food,
125
127
  }
126
128
 
127
- [NeoType("type-inventory-item", AllowedStorage = NeoAllowedStorage.Static)]
129
+ [NeoType("type-inventory-item", AllowedStorage = NeoAllowedStorage.Immutable)]
128
130
  [NeoSchemaOrder(nameof(Name), nameof(Type), nameof(Tags), nameof(UsePrimary))]
129
131
  public abstract partial class InventoryItem<
130
132
  [NeoId("generic-stack")] TStack>
@@ -178,7 +180,7 @@ Allowed values are statically analyzable literals, enum values, `nameof`,
178
180
  and `Neo.Ref<T>`, `Neo.Lookup<T>`, `Neo.Dialogue`, `Neo.Sprite`, `Neo.Audio`,
179
181
  or `Neo.Member` references. Authored code is never executed.
180
182
 
181
- Never introduce v1 carriers or identity escapes: `ExtraJson`, `DefaultJson`,
183
+ Never introduce opaque carriers or identity escapes: `ExtraJson`, `DefaultJson`,
182
184
  `RetJson`, `ArgsJson`, `EntryChainJson`, `SchemaKeyOrderJson`,
183
185
  `GenericParamIds`, `ChainJson`, `SignatureJson`, `ExtendsId`, `isVirtual`, or
184
186
  `isAbstract`.
@@ -235,9 +237,30 @@ Canonical C# places `// NeoScript: Scripts/<Type>/<Member>.neo` above the
235
237
  linked declaration. Go-to-definition, references, and rename use the Roslyn
236
238
  source identity plus stable member ID to navigate between C# and `.neo`.
237
239
 
238
- NeoScript is C#-flavored: use typed declarations (`string name = ...;`, not
239
- `var`); `this` is the containing instance; roots include `root.Assets`,
240
- `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.
241
264
 
242
265
  ```sh
243
266
  neo script check --all
@@ -252,7 +275,8 @@ neo script apply --mode action '...'
252
275
 
253
276
  `eval` uses authored values and the same evaluator as the web app. `apply` is
254
277
  preview-only unless its command explicitly supports a commit; it reports
255
- 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.
256
280
 
257
281
  ## Conflicts and version bumps
258
282
 
@@ -279,6 +303,9 @@ neo records get <kind> <id>
279
303
  neo values list [attributeId]
280
304
  neo values get <valueId>
281
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>
282
309
  neo loc locales
283
310
  neo loc list
284
311
  neo loc set <textId> <locale> "text"
@@ -286,9 +313,11 @@ neo loc set <textId> <locale> "text"
286
313
 
287
314
  Write verbs accept a JSON-array batch on stdin or `--file`; use one batch when
288
315
  edits must be atomic. A `values set` payload is the raw value, not
289
- `{"value": ...}`. For collection rows use `values add-entry` on the live
290
- container value; an attribute's default container ID may not be an instance's
291
- 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.
292
321
 
293
322
  ### Dialogue authoring
294
323