@neocompose/cli 0.1.6 → 0.2.0
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/README.md +203 -69
- package/dist/neo.mjs +28478 -15233
- package/dist/tooling/Microsoft.CodeAnalysis.CSharp.dll +0 -0
- package/dist/tooling/Microsoft.CodeAnalysis.dll +0 -0
- package/dist/tooling/NeoCompose.Schema.Tooling.dll +0 -0
- package/dist/tooling/NeoCompose.Schema.Tooling.pdb +0 -0
- package/dist/tooling/NeoCompose.Schema.dll +0 -0
- package/dist/tooling/NeoCompose.Schema.pdb +0 -0
- package/dist/tooling/NeoCompose.Schema.xml +1055 -0
- package/dist/tooling/NeoCompose.SchemaCompiler.deps.json +299 -0
- package/dist/tooling/NeoCompose.SchemaCompiler.dll +0 -0
- package/dist/tooling/NeoCompose.SchemaCompiler.pdb +0 -0
- package/dist/tooling/NeoCompose.SchemaCompiler.runtimeconfig.json +13 -0
- package/dist/tooling/System.Collections.Immutable.dll +0 -0
- package/dist/tooling/System.Reflection.Metadata.dll +0 -0
- package/dist/tooling/System.Text.Encoding.CodePages.dll +0 -0
- package/dist/tooling/cs/Microsoft.CodeAnalysis.CSharp.resources.dll +0 -0
- package/dist/tooling/cs/Microsoft.CodeAnalysis.resources.dll +0 -0
- package/dist/tooling/de/Microsoft.CodeAnalysis.CSharp.resources.dll +0 -0
- package/dist/tooling/de/Microsoft.CodeAnalysis.resources.dll +0 -0
- package/dist/tooling/es/Microsoft.CodeAnalysis.CSharp.resources.dll +0 -0
- package/dist/tooling/es/Microsoft.CodeAnalysis.resources.dll +0 -0
- package/dist/tooling/fr/Microsoft.CodeAnalysis.CSharp.resources.dll +0 -0
- package/dist/tooling/fr/Microsoft.CodeAnalysis.resources.dll +0 -0
- package/dist/tooling/it/Microsoft.CodeAnalysis.CSharp.resources.dll +0 -0
- package/dist/tooling/it/Microsoft.CodeAnalysis.resources.dll +0 -0
- package/dist/tooling/ja/Microsoft.CodeAnalysis.CSharp.resources.dll +0 -0
- package/dist/tooling/ja/Microsoft.CodeAnalysis.resources.dll +0 -0
- package/dist/tooling/ko/Microsoft.CodeAnalysis.CSharp.resources.dll +0 -0
- package/dist/tooling/ko/Microsoft.CodeAnalysis.resources.dll +0 -0
- package/dist/tooling/pl/Microsoft.CodeAnalysis.CSharp.resources.dll +0 -0
- package/dist/tooling/pl/Microsoft.CodeAnalysis.resources.dll +0 -0
- package/dist/tooling/pt-BR/Microsoft.CodeAnalysis.CSharp.resources.dll +0 -0
- package/dist/tooling/pt-BR/Microsoft.CodeAnalysis.resources.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/Microsoft.Win32.Primitives.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.AppContext.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Buffers.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Collections.Concurrent.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Collections.NonGeneric.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Collections.Specialized.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Collections.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.ComponentModel.Composition.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.ComponentModel.EventBasedAsync.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.ComponentModel.Primitives.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.ComponentModel.TypeConverter.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.ComponentModel.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Console.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Core.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Data.Common.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Data.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Diagnostics.Contracts.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Diagnostics.Debug.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Diagnostics.FileVersionInfo.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Diagnostics.Process.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Diagnostics.StackTrace.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Diagnostics.TextWriterTraceListener.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Diagnostics.Tools.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Diagnostics.TraceSource.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Diagnostics.Tracing.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Drawing.Primitives.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Drawing.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Dynamic.Runtime.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Globalization.Calendars.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Globalization.Extensions.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Globalization.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.IO.Compression.FileSystem.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.IO.Compression.ZipFile.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.IO.Compression.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.IO.FileSystem.DriveInfo.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.IO.FileSystem.Primitives.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.IO.FileSystem.Watcher.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.IO.FileSystem.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.IO.IsolatedStorage.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.IO.MemoryMappedFiles.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.IO.Pipes.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.IO.UnmanagedMemoryStream.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.IO.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Linq.Expressions.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Linq.Parallel.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Linq.Queryable.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Linq.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Memory.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Net.Http.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Net.NameResolution.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Net.NetworkInformation.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Net.Ping.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Net.Primitives.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Net.Requests.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Net.Security.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Net.Sockets.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Net.WebHeaderCollection.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Net.WebSockets.Client.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Net.WebSockets.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Net.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Numerics.Vectors.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Numerics.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.ObjectModel.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Reflection.DispatchProxy.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Reflection.Emit.ILGeneration.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Reflection.Emit.Lightweight.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Reflection.Emit.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Reflection.Extensions.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Reflection.Primitives.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Reflection.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Resources.Reader.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Resources.ResourceManager.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Resources.Writer.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Runtime.CompilerServices.VisualC.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Runtime.Extensions.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Runtime.Handles.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Runtime.InteropServices.RuntimeInformation.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Runtime.InteropServices.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Runtime.Numerics.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Runtime.Serialization.Formatters.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Runtime.Serialization.Json.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Runtime.Serialization.Primitives.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Runtime.Serialization.Xml.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Runtime.Serialization.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Runtime.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Security.Claims.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Security.Cryptography.Algorithms.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Security.Cryptography.Csp.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Security.Cryptography.Encoding.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Security.Cryptography.Primitives.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Security.Cryptography.X509Certificates.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Security.Principal.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Security.SecureString.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.ServiceModel.Web.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Text.Encoding.Extensions.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Text.Encoding.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Text.RegularExpressions.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Threading.Overlapped.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Threading.Tasks.Extensions.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Threading.Tasks.Parallel.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Threading.Tasks.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Threading.Thread.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Threading.ThreadPool.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Threading.Timer.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Threading.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Transactions.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.ValueTuple.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Web.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Windows.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Xml.Linq.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Xml.ReaderWriter.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Xml.Serialization.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Xml.XDocument.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Xml.XPath.XDocument.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Xml.XPath.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Xml.XmlDocument.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Xml.XmlSerializer.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.Xml.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/System.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/mscorlib.dll +0 -0
- package/dist/tooling/reference-assemblies/netstandard2.1/netstandard.dll +0 -0
- package/dist/tooling/ru/Microsoft.CodeAnalysis.CSharp.resources.dll +0 -0
- package/dist/tooling/ru/Microsoft.CodeAnalysis.resources.dll +0 -0
- package/dist/tooling/runtimes/win/lib/net6.0/System.Text.Encoding.CodePages.dll +0 -0
- package/dist/tooling/schema-contract.json +23 -0
- package/dist/tooling/tr/Microsoft.CodeAnalysis.CSharp.resources.dll +0 -0
- package/dist/tooling/tr/Microsoft.CodeAnalysis.resources.dll +0 -0
- package/dist/tooling/zh-Hans/Microsoft.CodeAnalysis.CSharp.resources.dll +0 -0
- package/dist/tooling/zh-Hans/Microsoft.CodeAnalysis.resources.dll +0 -0
- package/dist/tooling/zh-Hant/Microsoft.CodeAnalysis.CSharp.resources.dll +0 -0
- package/dist/tooling/zh-Hant/Microsoft.CodeAnalysis.resources.dll +0 -0
- package/package.json +8 -3
- package/skills/neocompose-cli/SKILL.md +339 -184
package/README.md
CHANGED
|
@@ -1,84 +1,218 @@
|
|
|
1
1
|
# `neo` — Neo Compose schema-as-code CLI
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
`neo` keeps a Git-friendly C# working copy of a Neo Compose project schema,
|
|
4
|
+
syncs it bidirectionally with Convex, and exposes NeoScript and content
|
|
5
|
+
commands. Schema format v2 is compiler-backed: authored files are real C# 11,
|
|
6
|
+
not a handwritten C# subset.
|
|
7
|
+
|
|
8
|
+
The complete contract is in
|
|
9
|
+
[`specs/schema-as-code-cli.md`](../specs/schema-as-code-cli.md). The concise
|
|
10
|
+
agent workflow is in
|
|
11
|
+
[`cli/skills/neocompose-cli/SKILL.md`](skills/neocompose-cli/SKILL.md).
|
|
6
12
|
|
|
7
13
|
## Run
|
|
8
14
|
|
|
9
15
|
```sh
|
|
10
|
-
npm i -g @neocompose/cli
|
|
11
|
-
node cli/
|
|
16
|
+
npm i -g @neocompose/cli # published package; installs `neo` on PATH
|
|
17
|
+
node cli/bin/neo.mjs <command> # repository development
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Neo does not install or download .NET. It first looks for a compatible Unity
|
|
21
|
+
6000 runtime, then for a compatible system `dotnet`. Set `NEO_DOTNET_HOST` to
|
|
22
|
+
an executable when discovery needs an explicit override. Run `neo doctor` to
|
|
23
|
+
see the selected host, its compatibility result, the discovery cache, and the
|
|
24
|
+
bundled schema-contract versions.
|
|
25
|
+
|
|
26
|
+
## Format v2 working copy
|
|
27
|
+
|
|
28
|
+
```text
|
|
29
|
+
neo/
|
|
30
|
+
neo.json # includes formatVersion: 2
|
|
31
|
+
NeoCompose.Schema.csproj # netstandard2.1, C# 11, IDE-only
|
|
32
|
+
Types/ # custom classes
|
|
33
|
+
Interfaces/ # Neo interfaces
|
|
34
|
+
Enums/ # Neo enums
|
|
35
|
+
Root.cs # [NeoRegistry] roots and loose members
|
|
36
|
+
Templates/ # typed texture/audio settings
|
|
37
|
+
Localization.cs # typed localization settings
|
|
38
|
+
LocalizationStatuses/*.cs # typed workflow-status settings
|
|
39
|
+
Scripts/<Type>/<Member>.neo # tracked NeoScript sidecars
|
|
40
|
+
Migrations/*.neo
|
|
41
|
+
.neo/
|
|
42
|
+
state.json # sync bases and CAS hashes
|
|
43
|
+
dotnet-host.json # cached host discovery
|
|
44
|
+
tooling/ # bundled SDK, analyzer, generator, compiler
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
`.neo/`, `bin/`, and `obj/` are gitignored. The C# project is an authoring
|
|
48
|
+
project only; the game never references or ships it. The public
|
|
49
|
+
`NeoCompose.Schema` SDK and analyzer are materialized from the npm package
|
|
50
|
+
under `.neo/tooling`. There is no generated `Schema/NeoSchemaAttributes.cs`.
|
|
51
|
+
|
|
52
|
+
Format v2 is a clean break. A workspace with no `formatVersion`, or with
|
|
53
|
+
`formatVersion: 1`, rejects normal schema commands with an instruction to run:
|
|
54
|
+
|
|
55
|
+
```sh
|
|
56
|
+
neo pull --reset
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Reset reconstructs the schema from the server as v2, refreshes tooling, and
|
|
60
|
+
removes obsolete generated authoring files. There is no v1 parser or
|
|
61
|
+
compatibility shim.
|
|
62
|
+
|
|
63
|
+
## Real C# authoring
|
|
64
|
+
|
|
65
|
+
Stable IDs remain visible so a Git rename stays a server rename. Everything
|
|
66
|
+
C# already expresses is written as C#: modifiers, base classes, interfaces,
|
|
67
|
+
generic parameters and constraints, nullability, defaults, declaration order,
|
|
68
|
+
method arguments, return types, and deferred `Task` results.
|
|
69
|
+
|
|
70
|
+
```csharp
|
|
71
|
+
using System.Threading.Tasks;
|
|
72
|
+
using NeoCompose.Schema;
|
|
73
|
+
|
|
74
|
+
[NeoType("type-inventory-item")]
|
|
75
|
+
public abstract partial class InventoryItem<
|
|
76
|
+
[NeoId("generic-stack-data")] TStackData>
|
|
77
|
+
where TStackData : InventoryStackData
|
|
78
|
+
{
|
|
79
|
+
[NeoMember("attribute-name"), NeoText(SearchKey = true)]
|
|
80
|
+
public virtual string Name { get; init; } = "";
|
|
81
|
+
|
|
82
|
+
[NeoMember("attribute-type")]
|
|
83
|
+
public abstract ItemType Type { get; init; }
|
|
84
|
+
|
|
85
|
+
[NeoMember("attribute-description"), NeoComputed]
|
|
86
|
+
public virtual string Description { get; }
|
|
87
|
+
|
|
88
|
+
[NeoMember("function-use-primary"), NeoScript]
|
|
89
|
+
public virtual partial Task<bool> UsePrimary(InventoryItem<TStackData> target);
|
|
90
|
+
}
|
|
12
91
|
```
|
|
13
92
|
|
|
14
|
-
|
|
93
|
+
- `virtual`, `abstract`, and `override` have their native meanings. An
|
|
94
|
+
override's base member ID is resolved from the Roslyn symbol graph.
|
|
95
|
+
- Property type and nullability determine Neo kind and requiredness.
|
|
96
|
+
- A property initializer is its default; declaration order is schema order.
|
|
97
|
+
- Method signatures define function arguments and returns. `Task`/`Task<T>`
|
|
98
|
+
means deferred execution. The bundled source generator gives concrete
|
|
99
|
+
partial declarations inert compile-time implementations; authored schema
|
|
100
|
+
code is never executed.
|
|
101
|
+
- `[NeoMember]` owns stable identity and common options. Narrow typed
|
|
102
|
+
attributes such as `[NeoText]`, `[NeoNumber]`, `[NeoList]`, `[NeoIndex]`,
|
|
103
|
+
`[NeoColumn]`, `[NeoLookup]`, `[NeoDialogue]`, and `[NeoFile]` express
|
|
104
|
+
Neo-specific behavior.
|
|
105
|
+
- Nested entry graphs, texture/audio imports, localization, and uncommon
|
|
106
|
+
settings use strongly typed object initializers. Their complete option sets
|
|
107
|
+
participate in normal C# IntelliSense.
|
|
108
|
+
|
|
109
|
+
Only statically analyzable expressions are accepted: literals, enum values,
|
|
110
|
+
`nameof`, `typeof`, arrays/collections, object initializers, and approved
|
|
111
|
+
`Neo.*` reference constructors. The compiler never loads or executes the
|
|
112
|
+
authored assembly. JSON carriers and identity escape hatches such as
|
|
113
|
+
`ExtraJson`, `DefaultJson`, `RetJson`, `ArgsJson`, `EntryChainJson`,
|
|
114
|
+
`SchemaKeyOrderJson`, `GenericParamIds`, `ChainJson`, `SignatureJson`,
|
|
115
|
+
`ExtendsId`, `isVirtual`, and `isAbstract` do not exist in v2.
|
|
15
116
|
|
|
16
|
-
|
|
117
|
+
Localization workflow statuses are ordinary stable records rather than IDs
|
|
118
|
+
hidden in localization JSON:
|
|
119
|
+
|
|
120
|
+
```csharp
|
|
121
|
+
[NeoLocalizationStatus("localization-status-approved")]
|
|
122
|
+
public sealed partial class Approved
|
|
123
|
+
{
|
|
124
|
+
public static NeoLocalizationStatusSettings Settings { get; } = new()
|
|
125
|
+
{
|
|
126
|
+
Slug = "approved",
|
|
127
|
+
Name = "Approved",
|
|
128
|
+
Color = "#16a34a",
|
|
129
|
+
TransitionRules = new[] { "localization-status-needs-review" },
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
```
|
|
17
133
|
|
|
18
|
-
|
|
19
|
-
`@inquirer/prompts`.
|
|
20
|
-
- `node cli/build.mjs` (also `prepublishOnly`) bundles `src/main.ts` into
|
|
21
|
-
`dist/neo.mjs` with esbuild: all shared monorepo code (`src/models`,
|
|
22
|
-
`src/database/neoscript`, the evaluator, `convex/_generated` references)
|
|
23
|
-
is compiled INTO the bundle, so the published artifact has no source
|
|
24
|
-
dependency on this repo. The build fails if the bundle imports any
|
|
25
|
-
package not declared as a dependency.
|
|
26
|
-
- `cli/dist/` is gitignored; publish with `cd cli && npm publish`.
|
|
134
|
+
## NeoScript sidecars
|
|
27
135
|
|
|
28
|
-
|
|
136
|
+
NeoScript is tracked separately from C# metadata:
|
|
137
|
+
|
|
138
|
+
- `Scripts/<DeclaringType>/<Member>.neo` is the only canonical path.
|
|
139
|
+
- Every file contains its complete contextual wrapper. The outer signature
|
|
140
|
+
mirrors the C# member and its NeoScript result type (`Task<T>` is represented
|
|
141
|
+
as `T`), then adds `<DeclaringType> this, Root root`; this chrome is protected
|
|
142
|
+
in Monaco while the executable regions remain editable.
|
|
143
|
+
- A computed property wrapper contains `get { ... }` and, when writable,
|
|
144
|
+
`set(<Type> value) { ... }` units.
|
|
145
|
+
- A concrete `[NeoScript]` method wrapper contains a nested
|
|
146
|
+
`(<parameters>) { ... }` executable unit.
|
|
147
|
+
- Abstract scripted members have no file.
|
|
148
|
+
- Missing, duplicate, case-colliding, and orphaned sidecars are hard
|
|
149
|
+
diagnostics. Stable member IDs let canonical renames move sidecars safely.
|
|
150
|
+
- Canonical C# includes a `// NeoScript: Scripts/...` link above each scripted
|
|
151
|
+
declaration. Definitions and navigation resolve in both directions between
|
|
152
|
+
that declaration and the sidecar wrapper.
|
|
153
|
+
|
|
154
|
+
```neoscript
|
|
155
|
+
string Description(InventoryItem this, Root root) {
|
|
156
|
+
get {
|
|
157
|
+
return $"{this.Name} ({this.Type})";
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
bool UsePrimary(InventoryItem this, Root root) {
|
|
162
|
+
(InventoryItem target) {
|
|
163
|
+
return target.IsStackable;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
```
|
|
29
167
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
168
|
+
The browser-safe `neoscript-language` package is authoritative for the CLI,
|
|
169
|
+
server compiler, web Monaco editor, and VS Code LSP. Monaco's existing syntax
|
|
170
|
+
highlighting, comments/interpolation, scaffolds and protected regions,
|
|
171
|
+
project-aware completion, hover, and accurate diagnostics are a
|
|
172
|
+
release-blocking compatibility floor. The shared service also adds
|
|
173
|
+
parser-recovery completion, signature help, definitions into C#, references,
|
|
174
|
+
rename, symbols, semantic tokens, quick fixes, formatting, richer related
|
|
175
|
+
diagnostics, contextual ranking, and incremental analysis. The in-repo VSIX
|
|
176
|
+
uses the same results; marketplace publication is a separate release step.
|
|
39
177
|
|
|
40
178
|
## Commands
|
|
41
179
|
|
|
42
|
-
| Command
|
|
43
|
-
|
|
|
44
|
-
| `login`
|
|
45
|
-
| `init --project <id> [--version <id>]`
|
|
46
|
-
| `
|
|
47
|
-
| `
|
|
48
|
-
| `status` / `diff`
|
|
49
|
-
| `
|
|
50
|
-
| `
|
|
51
|
-
| `
|
|
52
|
-
| `
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
file:line:column diagnostics.
|
|
82
|
-
- Server surfaces: `schema/document` (read), `schema/transactions`
|
|
83
|
-
(atomic CAS write), `projectExportData.schemaSignal` (websocket signal).
|
|
84
|
-
- Tests: `npx vitest run cli` (round-trip corpus, parser, merge matrix).
|
|
180
|
+
| Command | Purpose |
|
|
181
|
+
| ----------------------------------------- | -------------------------------------------------------------------------------------------------- |
|
|
182
|
+
| `login` | Device-code OAuth; use `--profile release`, `--token-stdin`, or `NEO_COMPOSE_TOKEN` as appropriate |
|
|
183
|
+
| `init --project <id> [--version <id>]` | Scaffold a format-v2 working copy and perform the first pull |
|
|
184
|
+
| `doctor` | Report runtime discovery, compatibility, cache, tooling, and contract versions |
|
|
185
|
+
| `pull [--reset]` | Sync or reconstruct; normal pulls use record-level three-way merge |
|
|
186
|
+
| `status` / `diff` | Compile the working copy and compare its manifest with the base |
|
|
187
|
+
| `push [--dry-run] [--accept-bump]` | Preview or commit one atomic compare-and-swap transaction |
|
|
188
|
+
| `dev [--push]` | Watch the Convex sync signal and local files; pushing remains opt-in |
|
|
189
|
+
| `resolve --mine\|--theirs` | Conflict-marker convenience; editing the final source is authoritative |
|
|
190
|
+
| `script check\|compile\|eval\|apply` | Use the shared NeoScript compiler/evaluator |
|
|
191
|
+
| `records` / `values` / `loc` / `dialogue` | Read and batch-edit content without materializing it as schema files |
|
|
192
|
+
|
|
193
|
+
The central invariant is unchanged: a pull followed immediately by status or
|
|
194
|
+
push must produce no changes. The manifest contract classifies every field as
|
|
195
|
+
authored, derived, or volatile and preserves derived server data from the base
|
|
196
|
+
record. A newly introduced authored server field fails with “CLI contract
|
|
197
|
+
upgrade required” instead of being hidden in opaque JSON.
|
|
198
|
+
|
|
199
|
+
## Packaging
|
|
200
|
+
|
|
201
|
+
`node cli/build.mjs` bundles the Node orchestrator and shared TypeScript code,
|
|
202
|
+
builds the Roslyn sidecar, and places the prebuilt compiler, dependencies,
|
|
203
|
+
runtime metadata, C# SDK, analyzer, and source generator in `dist/tooling`.
|
|
204
|
+
The npm package contains the entire toolchain except a .NET host. Published
|
|
205
|
+
contents and CLI/SDK/manifest contract versions are release-tested.
|
|
206
|
+
|
|
207
|
+
Useful checks while developing:
|
|
208
|
+
|
|
209
|
+
```sh
|
|
210
|
+
npm run typecheck
|
|
211
|
+
npx vitest run cli
|
|
212
|
+
npm run build
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
Run the repository's full verification suite before release, package the
|
|
216
|
+
VSIX, exercise the Unity and Hello World samples through their documented
|
|
217
|
+
Unity workflow, verify a live `neowyn` pull/status/push dry run, and run
|
|
218
|
+
`npm run doctor` last.
|