@neocompose/cli 0.31.13 → 0.31.15

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/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.31.15] - 2026-08-18
4
+
5
+ ### Fixed
6
+
7
+ - Accept authored internal record relation creates without server-owned project
8
+ and timestamp metadata, including durable pushes, and mirror the server's
9
+ metadata stamping during dry-run validation.
10
+
11
+ ## [0.31.14] - 2026-08-18
12
+
13
+ ### Fixed
14
+
15
+ - Accept code-only sparse NeoScript function overrides while reading local
16
+ pre-compilation candidates, without relaxing stored document validation.
17
+
3
18
  ## [0.31.13] - 2026-08-18
4
19
 
5
20
  ### Fixed
package/dist/neo.mjs CHANGED
@@ -43263,9 +43263,38 @@ function isMemberOverrideProps(value) {
43263
43263
  function isMemberOverride(value) {
43264
43264
  return isMemberOverrideProps(value);
43265
43265
  }
43266
+ function isUncompiledMemberNSFunctionOverride(value) {
43267
+ const v = value;
43268
+ if (!isMemberOverrideBase(value)) return false;
43269
+ if (v.kind !== 23 /* NSFunction */) return false;
43270
+ if (typeof v.id !== "string") return false;
43271
+ if (typeof v.projectId !== "string") return false;
43272
+ if (!isEpochMillis(v.createdAt)) return false;
43273
+ if (!isEpochMillis(v.updatedAt)) return false;
43274
+ if (v.valueId !== void 0) return false;
43275
+ if (v.returnTypeInfo !== void 0) return false;
43276
+ if (v.argumentTypes !== void 0) return false;
43277
+ if (v.deferred !== void 0) return false;
43278
+ if (v.getter !== void 0) return false;
43279
+ if (v.setterCode !== void 0) return false;
43280
+ if (v.setter !== void 0) return false;
43281
+ if (v.action !== void 0) return false;
43282
+ if (v.required !== void 0 && v.required !== false) return false;
43283
+ if (v.defaultValue !== void 0 && v.defaultValue !== null) return false;
43284
+ if (v.storageKey !== void 0 && v.storageKey !== null) return false;
43285
+ if (v.bodyMode === "ui") {
43286
+ if (!isNSFunctionUIBody(v.uiAction)) return false;
43287
+ return v.code === void 0;
43288
+ }
43289
+ if (v.uiAction !== void 0 && v.uiAction !== null) return false;
43290
+ return typeof v.code === "string" && v.code.length > 0;
43291
+ }
43266
43292
  function isAnyMember(value) {
43267
43293
  return isMember(value) || isMemberOverride(value);
43268
43294
  }
43295
+ function isAnyMemberAuthoredOrCompiled(value) {
43296
+ return isAnyMember(value) || isUncompiledMemberNSFunctionOverride(value);
43297
+ }
43269
43298
  var FunctionMemberNamePattern, FunctionArgumentReservedNames, NSFunctionArgumentReservedNames, DECIMAL_STRING_PATTERN, DECIMAL_MAX_SIGNIFICANT_DIGITS, DECIMAL_MAX_SCALE;
43270
43299
  var init_member_kinds = __esm({
43271
43300
  "../src/models/members/member-kinds.ts"() {
@@ -49185,9 +49214,16 @@ function isProjectRecordKind(value) {
49185
49214
  return false;
49186
49215
  }
49187
49216
  function isInternalRecordRelation(value) {
49188
- if (!isWithId(value)) return false;
49217
+ if (!isAuthoredInternalRecordRelation(value)) return false;
49189
49218
  const relation = value;
49190
49219
  if (!isString(relation.projectId)) return false;
49220
+ if (!isNumber(relation.createdAt)) return false;
49221
+ return isNumber(relation.updatedAt);
49222
+ }
49223
+ function isAuthoredInternalRecordRelation(value) {
49224
+ if (!isWithId(value)) return false;
49225
+ if (value.id.length === 0) return false;
49226
+ const relation = value;
49191
49227
  if (!isString(relation.relationKind)) return false;
49192
49228
  if (relation.relationKind.length === 0) return false;
49193
49229
  if (!isProjectRecordKind(relation.sourceRecordKind)) return false;
@@ -49199,8 +49235,7 @@ function isInternalRecordRelation(value) {
49199
49235
  if (relation.orderKey !== void 0 && (!isString(relation.orderKey) || relation.orderKey.length === 0)) {
49200
49236
  return false;
49201
49237
  }
49202
- if (!isNumber(relation.createdAt)) return false;
49203
- return isNumber(relation.updatedAt);
49238
+ return true;
49204
49239
  }
49205
49240
  function isProjectVersionSemver(value) {
49206
49241
  if (!isObject(value)) return false;
@@ -73591,7 +73626,7 @@ function readProjectDocument(value, options = {}) {
73591
73626
  members: readArrayField(
73592
73627
  value,
73593
73628
  "members",
73594
- isAnyMember
73629
+ options.members === "authored-or-compiled" ? isAnyMemberAuthoredOrCompiled : isAnyMember
73595
73630
  ),
73596
73631
  classes: readArrayField(value, "classes", isNeoSchemaClass),
73597
73632
  constructors: readOptionalArrayField(
@@ -81225,23 +81260,6 @@ function isPushIntentInternalRecordRelation(value, operation) {
81225
81260
  }
81226
81261
  return isInternalRecordRelation(value);
81227
81262
  }
81228
- function isAuthoredInternalRecordRelation(value) {
81229
- if (!isObjectRecord5(value)) return false;
81230
- if (!isNonEmptyString3(value.id)) return false;
81231
- if (!isNonEmptyString3(value.relationKind)) return false;
81232
- if (!isProjectRecordKind(value.sourceRecordKind)) return false;
81233
- if (!isNonEmptyString3(value.sourceRecordId)) return false;
81234
- if (!isProjectRecordKind(value.targetRecordKind)) return false;
81235
- if (!isNonEmptyString3(value.targetRecordId)) return false;
81236
- if (value.orderKey === void 0) return true;
81237
- return isNonEmptyString3(value.orderKey);
81238
- }
81239
- function isObjectRecord5(value) {
81240
- return typeof value === "object" && value !== null && !Array.isArray(value);
81241
- }
81242
- function isNonEmptyString3(value) {
81243
- return typeof value === "string" && value.length > 0;
81244
- }
81245
81263
  var init_push_change_intent = __esm({
81246
81264
  "src/commands/push-change-intent.ts"() {
81247
81265
  "use strict";
@@ -94491,13 +94509,24 @@ function sortSeedRows(values) {
94491
94509
  return 0;
94492
94510
  });
94493
94511
  }
94494
- function stampServerOwnedSourceCommitTimestamps(args) {
94512
+ function stampServerOwnedSourceCommitMetadata(args) {
94495
94513
  if (!isObjectRecord2(args.rawDocument)) {
94496
94514
  throw new ProjectSourceCommitVerificationError(
94497
94515
  "Authoritative project document must be an object."
94498
94516
  );
94499
94517
  }
94500
94518
  const raw = args.rawDocument;
94519
+ const project = raw.project;
94520
+ if (!isObjectRecord2(project) || typeof project.id !== "string") {
94521
+ throw new ProjectSourceCommitVerificationError(
94522
+ "Authoritative project document must contain a project id."
94523
+ );
94524
+ }
94525
+ if (project.id.length === 0) {
94526
+ throw new ProjectSourceCommitVerificationError(
94527
+ "Authoritative project document project id must not be empty."
94528
+ );
94529
+ }
94501
94530
  const now = args.timestamp ?? Date.now();
94502
94531
  if (!Number.isSafeInteger(now)) {
94503
94532
  throw new ProjectSourceCommitVerificationError(
@@ -94513,6 +94542,11 @@ function stampServerOwnedSourceCommitTimestamps(args) {
94513
94542
  if (change.operation === "delete") return change;
94514
94543
  if (!isObjectRecord2(change.nextData)) return change;
94515
94544
  const stamped = { ...change.nextData };
94545
+ if (change.recordKind === "project") {
94546
+ delete stamped.projectId;
94547
+ } else {
94548
+ stamped.projectId = project.id;
94549
+ }
94516
94550
  if (change.operation === "create") {
94517
94551
  stamped.createdAt = now;
94518
94552
  stamped.updatedAt = now;
@@ -94669,7 +94703,7 @@ function prepareServerPreparationChanges(args) {
94669
94703
  `${change.recordKind}:${change.recordId}`
94670
94704
  )
94671
94705
  }));
94672
- const trustedChanges = stampServerOwnedSourceCommitTimestamps({
94706
+ const trustedChanges = stampServerOwnedSourceCommitMetadata({
94673
94707
  rawDocument,
94674
94708
  changes
94675
94709
  });
@@ -95095,7 +95129,8 @@ function readPulledProjectDocumentV4(records2) {
95095
95129
  ),
95096
95130
  {
95097
95131
  constructors: "authored-or-compiled",
95098
- identities: "prospective"
95132
+ identities: "prospective",
95133
+ members: "authored-or-compiled"
95099
95134
  }
95100
95135
  );
95101
95136
  }
@@ -108641,11 +108676,11 @@ function assertProjectFileAuthoringRecordIdentifiers(recordKind, data) {
108641
108676
  if (recordKind !== "unity-texture-template" && recordKind !== "unity-audio-clip-template") {
108642
108677
  return;
108643
108678
  }
108644
- if (!isObjectRecord6(data) || typeof data.name !== "string") return;
108679
+ if (!isObjectRecord5(data) || typeof data.name !== "string") return;
108645
108680
  const label = recordKind === "unity-texture-template" ? "Unity texture template name" : "Unity audio clip template name";
108646
108681
  assertProjectFileAuthoringIdentifier(data.name, label);
108647
108682
  }
108648
- function isObjectRecord6(value) {
108683
+ function isObjectRecord5(value) {
108649
108684
  return typeof value === "object" && value !== null && !Array.isArray(value);
108650
108685
  }
108651
108686
  var init_project_file_authoring_identifiers = __esm({
@@ -108656,12 +108691,13 @@ var init_project_file_authoring_identifiers = __esm({
108656
108691
  });
108657
108692
 
108658
108693
  // ../src/database/project-version-validation.ts
108659
- function validateProjectRecordByKind(recordKind, data) {
108694
+ function validateProjectRecordByKind(recordKind, data, options = {}) {
108660
108695
  if (recordKind === ProjectRecordKind.Project) {
108661
108696
  if (isProject(data)) return;
108662
108697
  }
108663
108698
  if (recordKind === ProjectRecordKind.Member) {
108664
- if (isAnyMember(data)) return;
108699
+ const memberGuard = options.members === "authored-or-compiled" ? isAnyMemberAuthoredOrCompiled : isAnyMember;
108700
+ if (memberGuard(data)) return;
108665
108701
  }
108666
108702
  if (recordKind === ProjectRecordKind.Value) {
108667
108703
  if (isMemberValue(data)) return;
@@ -111594,7 +111630,7 @@ var init_registry2 = __esm({
111594
111630
  PROJECT_SCHEMA_CONTRACT = Object.freeze({
111595
111631
  formatVersion: 3,
111596
111632
  contractVersion: "3.13",
111597
- cliVersion: "0.31.13",
111633
+ cliVersion: "0.31.15",
111598
111634
  projectFileUploadBatchSize: 32,
111599
111635
  documentRecords: {
111600
111636
  member: {
@@ -118189,7 +118225,7 @@ There is no --keep-current: preserving current semantic state defines flatten.
118189
118225
  async function main() {
118190
118226
  const args = parseArgs(process.argv.slice(2));
118191
118227
  if (args.command === "--version") {
118192
- console.log("0.31.13");
118228
+ console.log("0.31.15");
118193
118229
  return;
118194
118230
  }
118195
118231
  if (args.command === null || args.command === "help" || args.command === "--help" || args.command === "-h") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neocompose/cli",
3
- "version": "0.31.13",
3
+ "version": "0.31.15",
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.31.13 -->
12
+ <!-- reviewed-through-cli: 0.31.15 -->
13
13
 
14
14
  # Neo Compose CLI
15
15
 
@@ -83,7 +83,7 @@ wrappers.
83
83
  The marker near the top of `SKILL.md` must exactly match the package version:
84
84
 
85
85
  ```html
86
- <!-- reviewed-through-cli: 0.31.13 -->
86
+ <!-- reviewed-through-cli: 0.31.15 -->
87
87
  ```
88
88
 
89
89
  The quoted version above is checked too, so this instruction cannot go stale