@neocompose/cli 0.2.0 → 0.2.1

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 CHANGED
@@ -49,16 +49,16 @@ project only; the game never references or ships it. The public
49
49
  `NeoCompose.Schema` SDK and analyzer are materialized from the npm package
50
50
  under `.neo/tooling`. There is no generated `Schema/NeoSchemaAttributes.cs`.
51
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:
52
+ Format v2 is a clean break and `neo.json` must contain `formatVersion: 2`.
53
+ A workspace with a missing or different format version is unsupported. Preserve
54
+ any source you need, then create a fresh v2 working copy with:
54
55
 
55
56
  ```sh
56
- neo pull --reset
57
+ neo init --project <id> [--version <id>] [--dir neo]
57
58
  ```
58
59
 
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.
60
+ `neo pull --reset` remains available for an existing v2 workspace: it
61
+ reconstructs its managed schema files from the server and refreshes tooling.
62
62
 
63
63
  ## Real C# authoring
64
64
 
package/dist/neo.mjs CHANGED
@@ -278,7 +278,17 @@ function readWorkspaceConfig(root) {
278
278
  throw new Error(`"${NEO_CONFIG_FILE}" must contain a JSON object.`);
279
279
  }
280
280
  const config = parsed;
281
- const formatVersion = config.formatVersion === 2 ? 2 : 1;
281
+ if (config.formatVersion === void 0) {
282
+ throw new Error(
283
+ `"${NEO_CONFIG_FILE}" is missing required field "formatVersion"; expected ${CURRENT_FORMAT_VERSION}. Recreate this working copy with \`neo init\`.`
284
+ );
285
+ }
286
+ if (config.formatVersion !== CURRENT_FORMAT_VERSION) {
287
+ throw new Error(
288
+ `"${NEO_CONFIG_FILE}" field "formatVersion" must be ${CURRENT_FORMAT_VERSION}; received ${JSON.stringify(config.formatVersion)}. Recreate this working copy with \`neo init\`.`
289
+ );
290
+ }
291
+ const formatVersion = CURRENT_FORMAT_VERSION;
282
292
  if (typeof config.apiBaseUrl !== "string") {
283
293
  throw new Error(
284
294
  `"${NEO_CONFIG_FILE}" is missing string field "apiBaseUrl".`
@@ -327,12 +337,6 @@ function readWorkspaceConfig(root) {
327
337
  convexUrl
328
338
  };
329
339
  }
330
- function assertCurrentSchemaFormat(config) {
331
- if (config.formatVersion === CURRENT_FORMAT_VERSION) return;
332
- throw new Error(
333
- `This working copy uses Neo schema format v${config.formatVersion}. Run \`neo pull --reset\` to reconstruct it as format v${CURRENT_FORMAT_VERSION}.`
334
- );
335
- }
336
340
  function writeWorkspaceConfig(root, config) {
337
341
  let persisted = { ...config };
338
342
  if (config.unityConfigPath !== void 0) {
@@ -447,7 +451,7 @@ var init_workspace = __esm({
447
451
  }
448
452
  });
449
453
 
450
- // src/schema-v2/source-diagnostics.ts
454
+ // src/schema/source-diagnostics.ts
451
455
  function detectConflictMarkers(source) {
452
456
  const lines = source.split("\n");
453
457
  for (let index = 0; index < lines.length; index += 1) {
@@ -460,7 +464,7 @@ function detectConflictMarkers(source) {
460
464
  }
461
465
  var SchemaSourceError;
462
466
  var init_source_diagnostics = __esm({
463
- "src/schema-v2/source-diagnostics.ts"() {
467
+ "src/schema/source-diagnostics.ts"() {
464
468
  "use strict";
465
469
  SchemaSourceError = class extends Error {
466
470
  constructor(message, file, line, column) {
@@ -477,7 +481,7 @@ var init_source_diagnostics = __esm({
477
481
  }
478
482
  });
479
483
 
480
- // src/schema/names.ts
484
+ // src/schema/sync/names.ts
481
485
  function sanitizeCsIdentifier(value) {
482
486
  let identifier = "";
483
487
  let upperNext = false;
@@ -496,7 +500,7 @@ function sanitizeCsIdentifier(value) {
496
500
  }
497
501
  var CSHARP_KEYWORDS, IdentifierTable;
498
502
  var init_names = __esm({
499
- "src/schema/names.ts"() {
503
+ "src/schema/sync/names.ts"() {
500
504
  "use strict";
501
505
  CSHARP_KEYWORDS = /* @__PURE__ */ new Set([
502
506
  "abstract",
@@ -601,7 +605,7 @@ var init_names = __esm({
601
605
  }
602
606
  });
603
607
 
604
- // src/schema/projection.ts
608
+ // src/schema/sync/projection.ts
605
609
  function isObjectRecord2(value) {
606
610
  return typeof value === "object" && value !== null && !Array.isArray(value);
607
611
  }
@@ -642,13 +646,13 @@ function isPendingId(id) {
642
646
  }
643
647
  var PENDING_ID_PREFIX;
644
648
  var init_projection = __esm({
645
- "src/schema/projection.ts"() {
649
+ "src/schema/sync/projection.ts"() {
646
650
  "use strict";
647
651
  PENDING_ID_PREFIX = "__pending__:";
648
652
  }
649
653
  });
650
654
 
651
- // src/schema/migration-files.ts
655
+ // src/schema/sync/migration-files.ts
652
656
  import { randomUUID } from "node:crypto";
653
657
  function migrationFileName(order, name) {
654
658
  const slug = sanitizeCsIdentifier(name).replace(/_/g, "-").toLowerCase();
@@ -760,7 +764,7 @@ function parseMigrationFile(source, file, typeIdsByName) {
760
764
  }
761
765
  var MIGRATION_VOLATILE_FIELDS, MIGRATION_PROJECTED_FIELDS;
762
766
  var init_migration_files = __esm({
763
- "src/schema/migration-files.ts"() {
767
+ "src/schema/sync/migration-files.ts"() {
764
768
  "use strict";
765
769
  init_source_diagnostics();
766
770
  init_names();
@@ -782,7 +786,7 @@ var init_migration_files = __esm({
782
786
  }
783
787
  });
784
788
 
785
- // src/schema-v2/dotnet-host.ts
789
+ // src/schema/dotnet-host.ts
786
790
  import { spawnSync } from "node:child_process";
787
791
  import {
788
792
  accessSync,
@@ -1265,7 +1269,7 @@ ${detail}`,
1265
1269
  }
1266
1270
  var DOTNET_HOST_CACHE_FORMAT_VERSION, DOTNET_HOST_CACHE_FILE, DEFAULT_DOTNET_HOST_CACHE_MAX_AGE_MS, MINIMUM_DOTNET_RUNTIME_MAJOR, DotnetHostDiscoveryError;
1267
1271
  var init_dotnet_host = __esm({
1268
- "src/schema-v2/dotnet-host.ts"() {
1272
+ "src/schema/dotnet-host.ts"() {
1269
1273
  "use strict";
1270
1274
  DOTNET_HOST_CACHE_FORMAT_VERSION = 1;
1271
1275
  DOTNET_HOST_CACHE_FILE = ".neo/dotnet-host.json";
@@ -1282,7 +1286,7 @@ var init_dotnet_host = __esm({
1282
1286
  }
1283
1287
  });
1284
1288
 
1285
- // src/schema-v2/generated/source-protocol.ts
1289
+ // src/schema/generated/source-protocol.ts
1286
1290
  function assertGeneratedRoslynAnalysisResponseV2(value) {
1287
1291
  assertProtocolReference(value, "CompilerResponse", "$");
1288
1292
  }
@@ -1358,7 +1362,7 @@ function isRecord2(value) {
1358
1362
  }
1359
1363
  var SCHEMA_MANIFEST_FORMAT_VERSION, SCHEMA_MANIFEST_CONTRACT_VERSION, SCHEMA_SOURCE_MANIFEST_NAME, SCHEMA_COMPILER_PROTOCOL_VERSION, SCHEMA_SDK_VERSION, SCHEMA_CLI_VERSION, SCHEMA_API_TARGET, SCHEMA_REFERENCE_ASSEMBLY_SET, SCHEMA_REQUIRED_TOOLING_FILES, SOURCE_PROTOCOL_CONTRACT, GeneratedSchemaProtocolValidationError;
1360
1364
  var init_source_protocol = __esm({
1361
- "src/schema-v2/generated/source-protocol.ts"() {
1365
+ "src/schema/generated/source-protocol.ts"() {
1362
1366
  "use strict";
1363
1367
  SCHEMA_MANIFEST_FORMAT_VERSION = 2;
1364
1368
  SCHEMA_MANIFEST_CONTRACT_VERSION = "2.0";
@@ -1842,7 +1846,7 @@ var init_source_protocol = __esm({
1842
1846
  }
1843
1847
  });
1844
1848
 
1845
- // src/schema-v2/source-manifest.ts
1849
+ // src/schema/source-manifest.ts
1846
1850
  function assertRoslynAnalysisResponseV2(value) {
1847
1851
  if (!isRecord3(value))
1848
1852
  throw new RoslynSourceManifestError("Compiler response must be an object.");
@@ -1917,7 +1921,7 @@ function assemblyVersionMatches(actual, expected) {
1917
1921
  }
1918
1922
  var RoslynSourceManifestError;
1919
1923
  var init_source_manifest = __esm({
1920
- "src/schema-v2/source-manifest.ts"() {
1924
+ "src/schema/source-manifest.ts"() {
1921
1925
  "use strict";
1922
1926
  init_source_protocol();
1923
1927
  RoslynSourceManifestError = class extends Error {
@@ -1929,14 +1933,13 @@ var init_source_manifest = __esm({
1929
1933
  }
1930
1934
  });
1931
1935
 
1932
- // src/schema-v2/scaffold.ts
1936
+ // src/schema/scaffold.ts
1933
1937
  import {
1934
1938
  appendFileSync,
1935
1939
  cpSync,
1936
1940
  existsSync as existsSync4,
1937
1941
  mkdirSync as mkdirSync4,
1938
1942
  readFileSync as readFileSync4,
1939
- readdirSync as readdirSync2,
1940
1943
  renameSync as renameSync2,
1941
1944
  rmSync,
1942
1945
  writeFileSync as writeFileSync4
@@ -1951,15 +1954,6 @@ function scaffoldWorkspaceV2(root, options = {}) {
1951
1954
  writeFileSync4(csprojPath, CSPROJ_CONTENT, "utf8");
1952
1955
  changed.push(CSPROJ_NAME);
1953
1956
  }
1954
- const obsoletePath = join4(root, OBSOLETE_ATTRIBUTES_FILE);
1955
- if (existsSync4(obsoletePath)) {
1956
- rmSync(obsoletePath);
1957
- changed.push(OBSOLETE_ATTRIBUTES_FILE);
1958
- }
1959
- const obsoleteDirectory = dirname3(obsoletePath);
1960
- if (existsSync4(obsoleteDirectory) && readdirSync2(obsoleteDirectory).length === 0) {
1961
- rmSync(obsoleteDirectory, { recursive: true });
1962
- }
1963
1957
  for (const directory of [
1964
1958
  "Types",
1965
1959
  "Enums",
@@ -2115,13 +2109,12 @@ function resolveBundledToolingSource() {
2115
2109
  ];
2116
2110
  return candidates.find((candidate) => existsSync4(candidate)) ?? candidates[0];
2117
2111
  }
2118
- var CSPROJ_NAME, OBSOLETE_ATTRIBUTES_FILE, CSPROJ_CONTENT;
2112
+ var CSPROJ_NAME, CSPROJ_CONTENT;
2119
2113
  var init_scaffold = __esm({
2120
- "src/schema-v2/scaffold.ts"() {
2114
+ "src/schema/scaffold.ts"() {
2121
2115
  "use strict";
2122
2116
  init_workspace();
2123
2117
  CSPROJ_NAME = "NeoCompose.Schema.csproj";
2124
- OBSOLETE_ATTRIBUTES_FILE = "Schema/NeoSchemaAttributes.cs";
2125
2118
  CSPROJ_CONTENT = `<Project Sdk="Microsoft.NET.Sdk">
2126
2119
 
2127
2120
  <!-- IDE-only schema project. Neo statically analyzes this project; authored
@@ -2144,7 +2137,7 @@ var init_scaffold = __esm({
2144
2137
  }
2145
2138
  });
2146
2139
 
2147
- // src/schema-v2/compiler-client.ts
2140
+ // src/schema/compiler-client.ts
2148
2141
  import { existsSync as existsSync5 } from "node:fs";
2149
2142
  import { join as join5, resolve as resolve4 } from "node:path";
2150
2143
  import { spawnSync as spawnSync2 } from "node:child_process";
@@ -2228,7 +2221,7 @@ function runSchemaCompiler(executable, args) {
2228
2221
  }
2229
2222
  var SCHEMA_COMPILER_ASSEMBLY, SchemaCompilerInvocationError;
2230
2223
  var init_compiler_client = __esm({
2231
- "src/schema-v2/compiler-client.ts"() {
2224
+ "src/schema/compiler-client.ts"() {
2232
2225
  "use strict";
2233
2226
  init_dotnet_host();
2234
2227
  init_source_manifest();
@@ -10436,8 +10429,8 @@ var init_src = __esm({
10436
10429
  }
10437
10430
  });
10438
10431
 
10439
- // src/schema-v2/sidecars.ts
10440
- import { existsSync as existsSync6, readFileSync as readFileSync5, readdirSync as readdirSync3 } from "node:fs";
10432
+ // src/schema/sidecars.ts
10433
+ import { existsSync as existsSync6, readFileSync as readFileSync5, readdirSync as readdirSync2 } from "node:fs";
10441
10434
  import { join as join6, relative, sep } from "node:path";
10442
10435
  function schemaSidecarPath(declaringType, member) {
10443
10436
  return `Scripts/${sanitizeCsIdentifier(declaringType)}/${sanitizeCsIdentifier(member)}.neo`;
@@ -10632,7 +10625,7 @@ function hasFullNeoScriptContextWrapper(source) {
10632
10625
  function listNeoFiles(root) {
10633
10626
  if (!existsSync6(root)) return [];
10634
10627
  const result = [];
10635
- for (const entry of readdirSync3(root, { withFileTypes: true })) {
10628
+ for (const entry of readdirSync2(root, { withFileTypes: true })) {
10636
10629
  const path = join6(root, entry.name);
10637
10630
  if (entry.isDirectory()) result.push(...listNeoFiles(path));
10638
10631
  else if (entry.isFile() && entry.name.endsWith(".neo")) result.push(path);
@@ -10641,7 +10634,7 @@ function listNeoFiles(root) {
10641
10634
  }
10642
10635
  var SchemaSidecarError;
10643
10636
  var init_sidecars = __esm({
10644
- "src/schema-v2/sidecars.ts"() {
10637
+ "src/schema/sidecars.ts"() {
10645
10638
  "use strict";
10646
10639
  init_src();
10647
10640
  init_names();
@@ -10658,15 +10651,15 @@ var init_sidecars = __esm({
10658
10651
  }
10659
10652
  });
10660
10653
 
10661
- // src/schema-v2/manifest/types.ts
10654
+ // src/schema/manifest/types.ts
10662
10655
  var init_types = __esm({
10663
- "src/schema-v2/manifest/types.ts"() {
10656
+ "src/schema/manifest/types.ts"() {
10664
10657
  "use strict";
10665
10658
  init_source_protocol();
10666
10659
  }
10667
10660
  });
10668
10661
 
10669
- // src/schema-v2/manifest/validate.ts
10662
+ // src/schema/manifest/validate.ts
10670
10663
  function parseSchemaManifestV2(value) {
10671
10664
  assertSchemaManifestV2(value);
10672
10665
  return value;
@@ -11901,7 +11894,7 @@ function invalid(path, message) {
11901
11894
  }
11902
11895
  var SchemaManifestValidationError, SOURCE_KINDS, SYSTEM_OPERATIONS, WORLD_KINDS, ATTRIBUTE_COMMON_KEYS, ATTRIBUTE_KEYS_BY_KIND, PRIMITIVE_TYPE_KINDS, TEXTURE_TYPES, ALPHA_SOURCES, NPOT_SCALES, WRAP_MODES, RESIZE_ALGORITHMS, TEXTURE_COMPRESSIONS, PLATFORM_FORMATS, SPRITE_ALIGNMENTS;
11903
11896
  var init_validate = __esm({
11904
- "src/schema-v2/manifest/validate.ts"() {
11897
+ "src/schema/manifest/validate.ts"() {
11905
11898
  "use strict";
11906
11899
  init_types();
11907
11900
  SchemaManifestValidationError = class extends Error {
@@ -12060,7 +12053,7 @@ var init_validate = __esm({
12060
12053
  }
12061
12054
  });
12062
12055
 
12063
- // src/schema-v2/frontend.ts
12056
+ // src/schema/frontend.ts
12064
12057
  function formatFrontendDiagnostics(diagnostics) {
12065
12058
  return [
12066
12059
  `Schema authoring failed (${diagnostics.length}):`,
@@ -12432,7 +12425,7 @@ function lowerFirst(value) {
12432
12425
  }
12433
12426
  var SchemaFrontendError, SchemaFrontend, map, TEXTURE_TYPES2, ALPHA_SOURCES2, NPOT_SCALES2, MIP_FILTERS, WRAP_MODES2, FILTER_MODES, RESIZE_ALGORITHMS2, COMPRESSIONS, TEXTURE_FORMATS, SPRITE_MODES, MESH_TYPES, ALIGNMENTS, NORMAL_FILTERS, COOKIE_LIGHT_TYPES, SINGLE_CHANNELS, SWIZZLES, AUDIO_LOAD_TYPES, AUDIO_COMPRESSIONS, AUDIO_SAMPLE_RATES;
12434
12427
  var init_frontend = __esm({
12435
- "src/schema-v2/frontend.ts"() {
12428
+ "src/schema/frontend.ts"() {
12436
12429
  "use strict";
12437
12430
  init_sidecars();
12438
12431
  init_types();
@@ -16221,10 +16214,10 @@ var init_frontend = __esm({
16221
16214
  }
16222
16215
  });
16223
16216
 
16224
- // src/schema-v2/generated/document-contracts.ts
16217
+ // src/schema/generated/document-contracts.ts
16225
16218
  var SCHEMA_DOCUMENT_FIELD_CONTRACTS_V2;
16226
16219
  var init_document_contracts = __esm({
16227
- "src/schema-v2/generated/document-contracts.ts"() {
16220
+ "src/schema/generated/document-contracts.ts"() {
16228
16221
  "use strict";
16229
16222
  SCHEMA_DOCUMENT_FIELD_CONTRACTS_V2 = {
16230
16223
  "attribute": {
@@ -16508,7 +16501,7 @@ var init_document_contracts = __esm({
16508
16501
  }
16509
16502
  });
16510
16503
 
16511
- // src/schema-v2/manifest/contracts.ts
16504
+ // src/schema/manifest/contracts.ts
16512
16505
  function fieldDispositionV2(recordKind, field) {
16513
16506
  const contract = SCHEMA_DOCUMENT_FIELD_CONTRACTS_V2[recordKind];
16514
16507
  if (contract.authored.includes(field)) return "authored";
@@ -16683,7 +16676,7 @@ function isRecord4(value) {
16683
16676
  }
16684
16677
  var SchemaDocumentContractError;
16685
16678
  var init_contracts = __esm({
16686
- "src/schema-v2/manifest/contracts.ts"() {
16679
+ "src/schema/manifest/contracts.ts"() {
16687
16680
  "use strict";
16688
16681
  init_document_contracts();
16689
16682
  init_document_contracts();
@@ -16703,7 +16696,7 @@ var init_contracts = __esm({
16703
16696
  }
16704
16697
  });
16705
16698
 
16706
- // src/schema-v2/manifest/adapters.ts
16699
+ // src/schema/manifest/adapters.ts
16707
16700
  function createSyntheticDocumentSourceV2(recordKind, recordId, symbolKind) {
16708
16701
  const encodedKind = encodeURIComponent(recordKind);
16709
16702
  const encodedId = encodeURIComponent(recordId);
@@ -16761,7 +16754,7 @@ function assertOnlyAuthoredFields(recordKind, fields) {
16761
16754
  }
16762
16755
  var DEFAULT_DOCUMENT_TO_MANIFEST_CONTEXT_V2;
16763
16756
  var init_adapters = __esm({
16764
- "src/schema-v2/manifest/adapters.ts"() {
16757
+ "src/schema/manifest/adapters.ts"() {
16765
16758
  "use strict";
16766
16759
  init_contracts();
16767
16760
  DEFAULT_DOCUMENT_TO_MANIFEST_CONTEXT_V2 = {
@@ -16770,7 +16763,7 @@ var init_adapters = __esm({
16770
16763
  }
16771
16764
  });
16772
16765
 
16773
- // src/schema-v2/manifest/record-adapters/codecs.ts
16766
+ // src/schema/manifest/record-adapters/codecs.ts
16774
16767
  function inferAttributeOwners(types, attributes) {
16775
16768
  const owners = /* @__PURE__ */ new Map();
16776
16769
  const set = (attributeId, owner) => {
@@ -17826,7 +17819,7 @@ function invalidDocument(record2, path, message) {
17826
17819
  }
17827
17820
  var ATTRIBUTE_TYPE, TYPE_KIND_BY_ATTRIBUTE_TYPE, SIMPLE_ATTRIBUTE_KIND_BY_TYPE, ATTRIBUTE_TYPE_BY_KIND, TYPE_ATTRIBUTE_TYPE_BY_KIND, ATTRIBUTE_IDENTITY_FIELDS;
17828
17821
  var init_codecs = __esm({
17829
- "src/schema-v2/manifest/record-adapters/codecs.ts"() {
17822
+ "src/schema/manifest/record-adapters/codecs.ts"() {
17830
17823
  "use strict";
17831
17824
  init_contracts();
17832
17825
  init_sidecars();
@@ -17931,7 +17924,7 @@ var init_codecs = __esm({
17931
17924
  }
17932
17925
  });
17933
17926
 
17934
- // src/schema-v2/manifest/record-adapters/enum.ts
17927
+ // src/schema/manifest/record-adapters/enum.ts
17935
17928
  function enumFromDocument(record2, context) {
17936
17929
  const data = normalizeDocumentFieldsV2("enum", record2.data);
17937
17930
  const source = context.sourceForRecord("enum", record2.recordId, "enum");
@@ -17979,7 +17972,7 @@ function enumToDocument(neoEnum, baseData) {
17979
17972
  }
17980
17973
  var ENUM_SCHEMA_RECORD_ADAPTER_V2;
17981
17974
  var init_enum = __esm({
17982
- "src/schema-v2/manifest/record-adapters/enum.ts"() {
17975
+ "src/schema/manifest/record-adapters/enum.ts"() {
17983
17976
  "use strict";
17984
17977
  init_contracts();
17985
17978
  init_codecs();
@@ -18000,7 +17993,7 @@ var init_enum = __esm({
18000
17993
  }
18001
17994
  });
18002
17995
 
18003
- // src/schema-v2/manifest/record-adapters/interface.ts
17996
+ // src/schema/manifest/record-adapters/interface.ts
18004
17997
  function interfaceFromDocument(record2, context) {
18005
17998
  const data = normalizeDocumentFieldsV2("interface", record2.data);
18006
17999
  const source = context.sourceForRecord(
@@ -18101,7 +18094,7 @@ function interfaceToDocument(neoInterface) {
18101
18094
  }
18102
18095
  var INTERFACE_SCHEMA_RECORD_ADAPTER_V2;
18103
18096
  var init_interface = __esm({
18104
- "src/schema-v2/manifest/record-adapters/interface.ts"() {
18097
+ "src/schema/manifest/record-adapters/interface.ts"() {
18105
18098
  "use strict";
18106
18099
  init_contracts();
18107
18100
  init_codecs();
@@ -18119,7 +18112,7 @@ var init_interface = __esm({
18119
18112
  }
18120
18113
  });
18121
18114
 
18122
- // src/schema-v2/manifest/record-adapters/localization.ts
18115
+ // src/schema/manifest/record-adapters/localization.ts
18123
18116
  function localizationFromDocument(record2, context) {
18124
18117
  const data = normalizeDocumentFieldsV2("localization-config", record2.data);
18125
18118
  return {
@@ -18217,7 +18210,7 @@ function localizationStatusToDocument(status) {
18217
18210
  }
18218
18211
  var LOCALIZATION_SCHEMA_RECORD_ADAPTER_V2, LOCALIZATION_STATUS_SCHEMA_RECORD_ADAPTER_V2;
18219
18212
  var init_localization = __esm({
18220
- "src/schema-v2/manifest/record-adapters/localization.ts"() {
18213
+ "src/schema/manifest/record-adapters/localization.ts"() {
18221
18214
  "use strict";
18222
18215
  init_contracts();
18223
18216
  init_codecs();
@@ -18248,7 +18241,7 @@ var init_localization = __esm({
18248
18241
  }
18249
18242
  });
18250
18243
 
18251
- // src/schema-v2/manifest/record-adapters/loose.ts
18244
+ // src/schema/manifest/record-adapters/loose.ts
18252
18245
  function createSchemaRecordProjectionContextV2(records2, sourceContext) {
18253
18246
  const recordsByKind = groupSchemaDocumentRecordsV2(records2);
18254
18247
  const typeRecords = recordsByKind.get("type") ?? [];
@@ -18294,17 +18287,17 @@ function groupSchemaDocumentRecordsV2(records2) {
18294
18287
  return result;
18295
18288
  }
18296
18289
  var init_loose = __esm({
18297
- "src/schema-v2/manifest/record-adapters/loose.ts"() {
18290
+ "src/schema/manifest/record-adapters/loose.ts"() {
18298
18291
  "use strict";
18299
18292
  init_contracts();
18300
18293
  init_codecs();
18301
18294
  }
18302
18295
  });
18303
18296
 
18304
- // src/schema-v2/manifest/record-adapters/member.ts
18297
+ // src/schema/manifest/record-adapters/member.ts
18305
18298
  var MEMBER_SCHEMA_RECORD_ADAPTER_V2;
18306
18299
  var init_member = __esm({
18307
- "src/schema-v2/manifest/record-adapters/member.ts"() {
18300
+ "src/schema/manifest/record-adapters/member.ts"() {
18308
18301
  "use strict";
18309
18302
  init_codecs();
18310
18303
  MEMBER_SCHEMA_RECORD_ADAPTER_V2 = {
@@ -18331,7 +18324,7 @@ var init_member = __esm({
18331
18324
  }
18332
18325
  });
18333
18326
 
18334
- // src/schema-v2/manifest/record-adapters/template.ts
18327
+ // src/schema/manifest/record-adapters/template.ts
18335
18328
  function simpleRecordFromDocument(record2, context) {
18336
18329
  const data = normalizeDocumentFieldsV2(record2.recordKind, record2.data);
18337
18330
  const authored = partitionDocumentFieldsV2(record2.recordKind, data).authored;
@@ -18347,7 +18340,7 @@ function simpleRecordFromDocument(record2, context) {
18347
18340
  }
18348
18341
  var TEXTURE_TEMPLATE_SCHEMA_RECORD_ADAPTER_V2, AUDIO_TEMPLATE_SCHEMA_RECORD_ADAPTER_V2;
18349
18342
  var init_template = __esm({
18350
- "src/schema-v2/manifest/record-adapters/template.ts"() {
18343
+ "src/schema/manifest/record-adapters/template.ts"() {
18351
18344
  "use strict";
18352
18345
  init_contracts();
18353
18346
  TEXTURE_TEMPLATE_SCHEMA_RECORD_ADAPTER_V2 = {
@@ -18383,7 +18376,7 @@ var init_template = __esm({
18383
18376
  }
18384
18377
  });
18385
18378
 
18386
- // src/schema-v2/manifest/record-adapters/type.ts
18379
+ // src/schema/manifest/record-adapters/type.ts
18387
18380
  function customTypeFromDocument(record2, context) {
18388
18381
  const data = normalizeDocumentFieldsV2("type", record2.data);
18389
18382
  const source = context.sourceForRecord("type", record2.recordId, "customType");
@@ -18457,7 +18450,7 @@ function customTypeToDocument(type) {
18457
18450
  }
18458
18451
  var TYPE_SCHEMA_RECORD_ADAPTER_V2;
18459
18452
  var init_type = __esm({
18460
- "src/schema-v2/manifest/record-adapters/type.ts"() {
18453
+ "src/schema/manifest/record-adapters/type.ts"() {
18461
18454
  "use strict";
18462
18455
  init_contracts();
18463
18456
  init_codecs();
@@ -18475,10 +18468,10 @@ var init_type = __esm({
18475
18468
  }
18476
18469
  });
18477
18470
 
18478
- // src/schema-v2/manifest/record-adapters/registry.ts
18471
+ // src/schema/manifest/record-adapters/registry.ts
18479
18472
  var SCHEMA_RECORD_ADAPTER_REGISTRY_V2, SCHEMA_RECORD_ADAPTERS_V2;
18480
18473
  var init_registry = __esm({
18481
- "src/schema-v2/manifest/record-adapters/registry.ts"() {
18474
+ "src/schema/manifest/record-adapters/registry.ts"() {
18482
18475
  "use strict";
18483
18476
  init_enum();
18484
18477
  init_interface();
@@ -18509,9 +18502,9 @@ var init_registry = __esm({
18509
18502
  }
18510
18503
  });
18511
18504
 
18512
- // src/schema-v2/manifest/record-adapters/index.ts
18505
+ // src/schema/manifest/record-adapters/index.ts
18513
18506
  var init_record_adapters = __esm({
18514
- "src/schema-v2/manifest/record-adapters/index.ts"() {
18507
+ "src/schema/manifest/record-adapters/index.ts"() {
18515
18508
  "use strict";
18516
18509
  init_enum();
18517
18510
  init_interface();
@@ -18524,7 +18517,7 @@ var init_record_adapters = __esm({
18524
18517
  }
18525
18518
  });
18526
18519
 
18527
- // src/schema-v2/manifest/document-adapters.ts
18520
+ // src/schema/manifest/document-adapters.ts
18528
18521
  function documentsToSchemaManifestV2(records2, optionsOrContext = {}) {
18529
18522
  const options = isDocumentToManifestContextV2(optionsOrContext) ? { sourceContext: optionsOrContext } : optionsOrContext;
18530
18523
  const context = createSchemaRecordProjectionContextV2(
@@ -18602,7 +18595,7 @@ function manifestToDocumentContextV2(records2) {
18602
18595
  }
18603
18596
  var SCHEMA_MANIFEST_V2_CACHE_PATH;
18604
18597
  var init_document_adapters = __esm({
18605
- "src/schema-v2/manifest/document-adapters.ts"() {
18598
+ "src/schema/manifest/document-adapters.ts"() {
18606
18599
  "use strict";
18607
18600
  init_adapters();
18608
18601
  init_record_adapters();
@@ -18612,7 +18605,7 @@ var init_document_adapters = __esm({
18612
18605
  }
18613
18606
  });
18614
18607
 
18615
- // src/schema/merge.ts
18608
+ // src/schema/sync/merge.ts
18616
18609
  function threeWayMergeRecord(base, server, local, policy = {}) {
18617
18610
  const baseRecord = isObjectRecord2(base) ? base : {};
18618
18611
  const serverRecord = isObjectRecord2(server) ? server : {};
@@ -18654,13 +18647,13 @@ function threeWayMergeRecord(base, server, local, policy = {}) {
18654
18647
  return { merged, conflictFields };
18655
18648
  }
18656
18649
  var init_merge = __esm({
18657
- "src/schema/merge.ts"() {
18650
+ "src/schema/sync/merge.ts"() {
18658
18651
  "use strict";
18659
18652
  init_projection();
18660
18653
  }
18661
18654
  });
18662
18655
 
18663
- // src/schema-v2/manifest/merge.ts
18656
+ // src/schema/manifest/merge.ts
18664
18657
  function schemaDocumentSemanticallyEqualV2(recordKind, left, right) {
18665
18658
  return canonicallyEqual(
18666
18659
  normalizeDocumentForComparisonV2(recordKind, left, "left"),
@@ -18734,7 +18727,7 @@ function requireDocumentRecord(value, recordKind, side) {
18734
18727
  );
18735
18728
  }
18736
18729
  var init_merge2 = __esm({
18737
- "src/schema-v2/manifest/merge.ts"() {
18730
+ "src/schema/manifest/merge.ts"() {
18738
18731
  "use strict";
18739
18732
  init_merge();
18740
18733
  init_projection();
@@ -18742,9 +18735,9 @@ var init_merge2 = __esm({
18742
18735
  }
18743
18736
  });
18744
18737
 
18745
- // src/schema-v2/manifest/index.ts
18738
+ // src/schema/manifest/index.ts
18746
18739
  var init_manifest = __esm({
18747
- "src/schema-v2/manifest/index.ts"() {
18740
+ "src/schema/manifest/index.ts"() {
18748
18741
  "use strict";
18749
18742
  init_adapters();
18750
18743
  init_contracts();
@@ -18756,7 +18749,7 @@ var init_manifest = __esm({
18756
18749
  }
18757
18750
  });
18758
18751
 
18759
- // src/schema-v2/emitter.ts
18752
+ // src/schema/emitter.ts
18760
18753
  function emitSchemaManifestV2(manifest) {
18761
18754
  if (manifest.formatVersion !== 2) {
18762
18755
  throw new Error(
@@ -20564,7 +20557,7 @@ function emitLocalizationStatus(status, className) {
20564
20557
  }
20565
20558
  var HEADER;
20566
20559
  var init_emitter = __esm({
20567
- "src/schema-v2/emitter.ts"() {
20560
+ "src/schema/emitter.ts"() {
20568
20561
  "use strict";
20569
20562
  init_src();
20570
20563
  init_names();
@@ -20582,7 +20575,7 @@ namespace ProjectSchema;
20582
20575
  }
20583
20576
  });
20584
20577
 
20585
- // src/schema-v2/project-documents.ts
20578
+ // src/schema/project-documents.ts
20586
20579
  import { mkdirSync as mkdirSync5, writeFileSync as writeFileSync5 } from "node:fs";
20587
20580
  import { dirname as dirname4, join as join7 } from "node:path";
20588
20581
  function writeSchemaManifestCacheV2(workspaceRoot, manifest) {
@@ -20644,7 +20637,7 @@ function isSchemaDocumentKind(kind) {
20644
20637
  }
20645
20638
  var SCHEMA_DOCUMENT_KINDS;
20646
20639
  var init_project_documents = __esm({
20647
- "src/schema-v2/project-documents.ts"() {
20640
+ "src/schema/project-documents.ts"() {
20648
20641
  "use strict";
20649
20642
  init_migration_files();
20650
20643
  init_names();
@@ -25498,14 +25491,14 @@ var init_neoscript_language_adapter = __esm({
25498
25491
  }
25499
25492
  });
25500
25493
 
25501
- // src/schema/status.ts
25502
- import { existsSync as existsSync7, readFileSync as readFileSync6, readdirSync as readdirSync4 } from "node:fs";
25494
+ // src/schema/sync/status.ts
25495
+ import { existsSync as existsSync7, readFileSync as readFileSync6, readdirSync as readdirSync3 } from "node:fs";
25503
25496
  import { join as join8, relative as relative2, sep as sep2 } from "node:path";
25504
25497
  function listSchemaFiles(root) {
25505
25498
  const files = [];
25506
25499
  const visit = (directory, insideNeoScriptRoot) => {
25507
25500
  if (!existsSync7(directory)) return;
25508
- for (const entry of readdirSync4(directory, { withFileTypes: true })) {
25501
+ for (const entry of readdirSync3(directory, { withFileTypes: true })) {
25509
25502
  if (entry.isSymbolicLink()) continue;
25510
25503
  const path = join8(directory, entry.name);
25511
25504
  if (entry.isDirectory()) {
@@ -25527,7 +25520,6 @@ function listSchemaFiles(root) {
25527
25520
  return [...new Set(files)].sort();
25528
25521
  }
25529
25522
  function computeWorkspaceStatus(workspace, options = {}) {
25530
- assertCurrentSchemaFormat(workspace.config);
25531
25523
  const conflictedFiles = [];
25532
25524
  const parseErrors = [];
25533
25525
  const migrationSources = [];
@@ -25816,7 +25808,7 @@ function summarizeFieldDiff(baseData, nextData) {
25816
25808
  }
25817
25809
  var IGNORED_SCHEMA_DIRECTORIES;
25818
25810
  var init_status = __esm({
25819
- "src/schema/status.ts"() {
25811
+ "src/schema/sync/status.ts"() {
25820
25812
  "use strict";
25821
25813
  init_workspace();
25822
25814
  init_source_diagnostics();
@@ -28092,18 +28084,18 @@ var init_document = __esm({
28092
28084
  }
28093
28085
  });
28094
28086
 
28095
- // src/schema-v2/workspace-file.ts
28087
+ // src/schema/workspace-file.ts
28096
28088
  function workspaceSegmentsToContentV2(segments) {
28097
28089
  return `${segments.flatMap((segment) => segment.lines).join("\n")}
28098
28090
  `;
28099
28091
  }
28100
28092
  var init_workspace_file = __esm({
28101
- "src/schema-v2/workspace-file.ts"() {
28093
+ "src/schema/workspace-file.ts"() {
28102
28094
  "use strict";
28103
28095
  }
28104
28096
  });
28105
28097
 
28106
- // src/schema-v2/reset.ts
28098
+ // src/schema/reset.ts
28107
28099
  import {
28108
28100
  existsSync as existsSync8,
28109
28101
  mkdirSync as mkdirSync6,
@@ -28119,15 +28111,16 @@ function resetWorkspaceToSchemaV2(workspace, document, options = {}) {
28119
28111
  materializeWorkspaceToolingV2(workspace.root, options);
28120
28112
  const previousFiles = /* @__PURE__ */ new Set();
28121
28113
  for (const state of Object.values(workspace.state.records)) {
28122
- if (state.file !== void 0) previousFiles.add(state.file);
28123
- if (state.scriptFile !== void 0) previousFiles.add(state.scriptFile);
28114
+ if (state.file !== void 0 && isManagedResetFile(state.file)) {
28115
+ previousFiles.add(state.file);
28116
+ }
28117
+ if (state.scriptFile !== void 0 && isManagedResetFile(state.scriptFile)) {
28118
+ previousFiles.add(state.scriptFile);
28119
+ }
28124
28120
  }
28125
28121
  if (existsSync8(join9(workspace.root, "Localization.cs"))) {
28126
28122
  previousFiles.add("Localization.cs");
28127
28123
  }
28128
- if (existsSync8(join9(workspace.root, "Loose.cs"))) {
28129
- previousFiles.add("Loose.cs");
28130
- }
28131
28124
  if (existsSync8(join9(workspace.root, "Root.cs"))) {
28132
28125
  previousFiles.add("Root.cs");
28133
28126
  }
@@ -28135,7 +28128,6 @@ function resetWorkspaceToSchemaV2(workspace, document, options = {}) {
28135
28128
  rmSync2(join9(workspace.root, path), { recursive: true, force: true });
28136
28129
  }
28137
28130
  rmSync2(join9(workspace.root, "Localization.cs"), { force: true });
28138
- rmSync2(join9(workspace.root, "Loose.cs"), { force: true });
28139
28131
  rmSync2(join9(workspace.root, "Root.cs"), { force: true });
28140
28132
  scaffoldWorkspaceV2(workspace.root, options);
28141
28133
  let written = 0;
@@ -28172,17 +28164,20 @@ function resetWorkspaceToSchemaV2(workspace, document, options = {}) {
28172
28164
  ).length;
28173
28165
  return { written, removed, fileCount: allFiles.length };
28174
28166
  }
28167
+ function isManagedResetFile(path) {
28168
+ if (path === "Localization.cs" || path === "Root.cs") return true;
28169
+ return MANAGED_RESET_PATHS.some(
28170
+ (directory) => path.startsWith(`${directory}/`)
28171
+ );
28172
+ }
28175
28173
  var MANAGED_RESET_PATHS;
28176
28174
  var init_reset = __esm({
28177
- "src/schema-v2/reset.ts"() {
28175
+ "src/schema/reset.ts"() {
28178
28176
  "use strict";
28179
28177
  init_workspace();
28180
28178
  init_project_documents();
28181
28179
  init_scaffold();
28182
28180
  MANAGED_RESET_PATHS = [
28183
- // Attributes/ was the initial v2 name. Reset removes it after emitting the
28184
- // canonical Types/ tree so stale declarations cannot compile twice.
28185
- "Attributes",
28186
28181
  "Types",
28187
28182
  "Enums",
28188
28183
  "Interfaces",
@@ -28283,7 +28278,6 @@ import {
28283
28278
  } from "node:fs";
28284
28279
  import { dirname as dirname6, join as join11 } from "node:path";
28285
28280
  async function runPull(workspace, options) {
28286
- if (!options.reset) assertCurrentSchemaFormat(workspace.config);
28287
28281
  const destructive = options.force || options.reset;
28288
28282
  const hasBaseline = Object.keys(workspace.state.records).length > 0;
28289
28283
  let localByKey = /* @__PURE__ */ new Map();
@@ -32692,9 +32686,8 @@ var init_project_migration_runner = __esm({
32692
32686
  }
32693
32687
  });
32694
32688
 
32695
- // src/schema-v2/workspace-manifest.ts
32689
+ // src/schema/workspace-manifest.ts
32696
32690
  function analyzeWorkspaceSchemaManifestV2(workspace, options = {}) {
32697
- assertCurrentSchemaFormat(workspace.config);
32698
32691
  const baseDocuments = workspaceSchemaBaseDocumentsV2(workspace);
32699
32692
  const baseManifest = baseDocuments.length === 0 ? void 0 : documentsToSchemaManifestV2(baseDocuments);
32700
32693
  const analysis = (options.analyze ?? analyzeSchemaWorkspaceV2)(
@@ -32729,9 +32722,8 @@ function workspaceSchemaBaseDocumentsV2(workspace) {
32729
32722
  return records2;
32730
32723
  }
32731
32724
  var init_workspace_manifest = __esm({
32732
- "src/schema-v2/workspace-manifest.ts"() {
32725
+ "src/schema/workspace-manifest.ts"() {
32733
32726
  "use strict";
32734
- init_workspace();
32735
32727
  init_projection();
32736
32728
  init_compiler_client();
32737
32729
  init_frontend();
@@ -33272,7 +33264,6 @@ function readSource(options, fallback) {
33272
33264
  return stdin;
33273
33265
  }
33274
33266
  async function runScript(workspace, command, options, dependencies = {}) {
33275
- assertCurrentSchemaFormat(workspace.config);
33276
33267
  let localCheckManifest = null;
33277
33268
  if (command === "check" && (options.all || options.attributeRef !== null)) {
33278
33269
  localCheckManifest = (dependencies.analyzeWorkspaceManifest ?? analyzeWorkspaceSchemaManifestV2)(workspace);
@@ -34126,7 +34117,6 @@ var init_script = __esm({
34126
34117
  init_convex();
34127
34118
  init_project_version_intents();
34128
34119
  init_http();
34129
- init_workspace();
34130
34120
  init_projection();
34131
34121
  init_compiler_adapter();
34132
34122
  init_neoscript_evaluator();
@@ -34161,7 +34151,7 @@ __export(migrate_exports, {
34161
34151
  runMigrate: () => runMigrate
34162
34152
  });
34163
34153
  import { randomUUID as randomUUID2 } from "node:crypto";
34164
- import { existsSync as existsSync12, mkdirSync as mkdirSync9, readdirSync as readdirSync5, writeFileSync as writeFileSync9 } from "node:fs";
34154
+ import { existsSync as existsSync12, mkdirSync as mkdirSync9, readdirSync as readdirSync4, writeFileSync as writeFileSync9 } from "node:fs";
34165
34155
  import { join as join14 } from "node:path";
34166
34156
  async function runMigrate(workspace, subcommand, positional, targetRef, json, dependencies = {}) {
34167
34157
  if (subcommand === "new") {
@@ -34175,7 +34165,7 @@ async function runMigrate(workspace, subcommand, positional, targetRef, json, de
34175
34165
  mkdirSync9(migrationsDir, { recursive: true });
34176
34166
  let nextOrder = 1;
34177
34167
  if (existsSync12(migrationsDir)) {
34178
- for (const entry of readdirSync5(migrationsDir)) {
34168
+ for (const entry of readdirSync4(migrationsDir)) {
34179
34169
  const match = /^(\d+)-/.exec(entry);
34180
34170
  if (match !== null) {
34181
34171
  nextOrder = Math.max(nextOrder, Number(match[1]) + 1);
@@ -38737,7 +38727,6 @@ function assertKnownFlags(args) {
38737
38727
  // src/main.ts
38738
38728
  init_status();
38739
38729
  init_workspace();
38740
- init_workspace();
38741
38730
  init_ui();
38742
38731
  var DEFAULT_API_BASE_URL = "http://localhost:3000";
38743
38732
  function profileFlag(args) {
@@ -38746,7 +38735,7 @@ function profileFlag(args) {
38746
38735
  if (value === "editor" || value === "release") return value;
38747
38736
  throw new Error(`--profile must be "editor" or "release", not "${value}".`);
38748
38737
  }
38749
- function loadWorkspaceForCommand(args, options = {}) {
38738
+ function loadWorkspaceForCommand(args) {
38750
38739
  const workspace = loadWorkspace(process.cwd());
38751
38740
  const apiOverride = stringFlag(args, "api");
38752
38741
  if (apiOverride !== null) {
@@ -38755,9 +38744,6 @@ function loadWorkspaceForCommand(args, options = {}) {
38755
38744
  apiBaseUrl: apiOverride
38756
38745
  };
38757
38746
  }
38758
- if (options.allowLegacyFormat !== true) {
38759
- assertCurrentSchemaFormat(workspace.config);
38760
- }
38761
38747
  return workspace;
38762
38748
  }
38763
38749
  function usage() {
@@ -38805,9 +38791,8 @@ ${h("Flags")}
38805
38791
  --force ${d("Discard local edits and take the current server schema.")}
38806
38792
  --reset ${d("Destructively regenerate the entire working copy and schema marker scaffold, even when the sync head is unchanged.")}
38807
38793
 
38808
- Use ${h("--reset")} to migrate a legacy v1 working copy or refresh the v2
38809
- compiler/SDK contract. It reconstructs managed schema files from the server
38810
- without parsing the obsolete generated marker vocabulary.
38794
+ Use ${h("--reset")} to refresh an existing v2 working copy and compiler/SDK
38795
+ contract. It reconstructs all managed schema files from the server.
38811
38796
  `;
38812
38797
  }
38813
38798
  if (command === "push") {
@@ -38890,10 +38875,7 @@ async function main() {
38890
38875
  }
38891
38876
  return;
38892
38877
  case "pull": {
38893
- const workspace = loadWorkspaceForCommand(args, {
38894
- allowLegacyFormat: true
38895
- });
38896
- if (!boolFlag(args, "reset")) assertCurrentSchemaFormat(workspace.config);
38878
+ const workspace = loadWorkspaceForCommand(args);
38897
38879
  const { runPull: runPull2 } = await Promise.resolve().then(() => (init_pull(), pull_exports));
38898
38880
  await runPull2(workspace, {
38899
38881
  force: boolFlag(args, "force"),
@@ -38902,9 +38884,7 @@ async function main() {
38902
38884
  return;
38903
38885
  }
38904
38886
  case "doctor": {
38905
- const workspace = loadWorkspaceForCommand(args, {
38906
- allowLegacyFormat: true
38907
- });
38887
+ const workspace = loadWorkspaceForCommand(args);
38908
38888
  const { runDoctor: runDoctor2 } = await Promise.resolve().then(() => (init_doctor(), doctor_exports));
38909
38889
  runDoctor2(workspace, boolFlag(args, "json"));
38910
38890
  return;
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neocompose/cli",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
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 v2 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
 
@@ -178,7 +177,7 @@ Allowed values are statically analyzable literals, enum values, `nameof`,
178
177
  and `Neo.Ref<T>`, `Neo.Lookup<T>`, `Neo.Dialogue`, `Neo.Sprite`, `Neo.Audio`,
179
178
  or `Neo.Member` references. Authored code is never executed.
180
179
 
181
- Never introduce v1 carriers or identity escapes: `ExtraJson`, `DefaultJson`,
180
+ Never introduce opaque carriers or identity escapes: `ExtraJson`, `DefaultJson`,
182
181
  `RetJson`, `ArgsJson`, `EntryChainJson`, `SchemaKeyOrderJson`,
183
182
  `GenericParamIds`, `ChainJson`, `SignatureJson`, `ExtendsId`, `isVirtual`, or
184
183
  `isAbstract`.