@neocompose/cli 0.57.0 → 0.57.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/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.57.1] - 2026-09-23
4
+
5
+ - A dialogue authored in `.neoflow` for a `.Lookup` group is triggered by its `@primary` value, matching dialogues created in the web editor. Before, it was saved with no lookup value, so the group never triggered it. Moving a dialogue to another kind of group clears its lookup value. Push again to repair affected dialogues.
6
+
3
7
  ## [0.57.0] - 2026-09-23
4
8
 
5
9
  - Enum-keyed dictionary lambdas receive enum values, so `Where((key, value) => key == ToolType.Pickaxe)` matches the expected entries.
package/dist/neo.mjs CHANGED
@@ -59822,6 +59822,263 @@ var init_emitter = __esm({
59822
59822
  }
59823
59823
  });
59824
59824
 
59825
+ // ../src/models/dialogue/dialogue-source-identifiers.ts
59826
+ function isDialogueSourceIdentifier(value) {
59827
+ return isValidProjectSourceIdentifier(value);
59828
+ }
59829
+ var init_dialogue_source_identifiers = __esm({
59830
+ "../src/models/dialogue/dialogue-source-identifiers.ts"() {
59831
+ "use strict";
59832
+ init_project_source_identifiers2();
59833
+ }
59834
+ });
59835
+
59836
+ // ../src/models/dialogue/logic-types.ts
59837
+ function isNSBoolGetter2(value) {
59838
+ if (!isNSGetter(value)) return false;
59839
+ if (value.typeInfo.type !== 1 /* Bool */) return false;
59840
+ return value.typeInfo.required === true;
59841
+ }
59842
+ function isNSVoidBody2(value) {
59843
+ if (!isNSGetter(value)) return false;
59844
+ if (value.typeInfo.type !== 0 /* Null */) return false;
59845
+ return value.typeInfo.required === true;
59846
+ }
59847
+ function isUILogicCondition(value) {
59848
+ const v = value;
59849
+ if (typeof v !== "object") return false;
59850
+ if (v === null) return false;
59851
+ if (!isNonEmptyString(v.id)) return false;
59852
+ if (v.type !== 0 /* UI */) return false;
59853
+ if (!isNSBoolGetter2(v.getter)) return false;
59854
+ return isUIRenderableCondition(v.getter);
59855
+ }
59856
+ function isCodeLogicCondition(value) {
59857
+ const v = value;
59858
+ if (typeof v !== "object") return false;
59859
+ if (v === null) return false;
59860
+ if (!isNonEmptyString(v.id)) return false;
59861
+ if (v.type !== 1 /* Code */) return false;
59862
+ if (!isNonEmptyString(v.sourceFunctionId)) return false;
59863
+ if (!isDialogueSourceIdentifier(v.sourceFunctionName)) return false;
59864
+ if (typeof v.code !== "string") return false;
59865
+ return isNSBoolGetter2(v.getter);
59866
+ }
59867
+ function isLogicCondition(value) {
59868
+ return isUILogicCondition(value) || isCodeLogicCondition(value);
59869
+ }
59870
+ function isUILogicAction(value) {
59871
+ const v = value;
59872
+ if (typeof v !== "object") return false;
59873
+ if (v === null) return false;
59874
+ if (v.type !== 0 /* UI */) return false;
59875
+ if (!isNSVoidBody2(v.action)) return false;
59876
+ return isUIRenderableAction(v.action);
59877
+ }
59878
+ function isCodeLogicAction(value) {
59879
+ const v = value;
59880
+ if (typeof v !== "object") return false;
59881
+ if (v === null) return false;
59882
+ if (v.type !== 1 /* Code */) return false;
59883
+ if (!isNonEmptyString(v.sourceFunctionId)) return false;
59884
+ if (!isDialogueSourceIdentifier(v.sourceFunctionName)) return false;
59885
+ if (typeof v.code !== "string") return false;
59886
+ return isNSVoidBody2(v.action);
59887
+ }
59888
+ function isNonEmptyString(value) {
59889
+ return typeof value === "string" && value.length > 0;
59890
+ }
59891
+ function isLogicAction(value) {
59892
+ return isUILogicAction(value) || isCodeLogicAction(value);
59893
+ }
59894
+ function isUIRenderableCondition(getter) {
59895
+ if (getter.instructions.length !== 1) return false;
59896
+ return getter.instructions[0]?.type === "return" /* return */;
59897
+ }
59898
+ function isUIRenderableAction(action) {
59899
+ if (action.instructions.length === 0) return true;
59900
+ if (action.instructions.length !== 1) return false;
59901
+ const instruction = action.instructions[0];
59902
+ if (!instruction) return false;
59903
+ return instruction.type === "return" /* return */ || instruction.type === "assign" /* assign */ || instruction.type === "collectionCall" /* collectionCall */ || instruction.type === "functionCall" /* functionCall */;
59904
+ }
59905
+ function isDialogueLogicCompileTarget(value) {
59906
+ return value === 0 /* Condition */ || value === 1 /* Action */ || value === 2 /* TextVariable */;
59907
+ }
59908
+ function isDialogueLogicCompileDialogueContext(value) {
59909
+ const v = value;
59910
+ if (typeof v !== "object") return false;
59911
+ if (v === null) return false;
59912
+ if (!isOptionalCompileLinkedValues(v.linkedValues)) return false;
59913
+ if (!isOptionalNullableString2(v.primaryLinkedValueId)) return false;
59914
+ if (v.triggerNode === void 0) return true;
59915
+ if (v.triggerNode === null) return true;
59916
+ return isDialogueLogicCompileTriggerContext(v.triggerNode);
59917
+ }
59918
+ function isDialogueLogicCompileNodeContext(value) {
59919
+ const v = value;
59920
+ if (typeof v !== "object") return false;
59921
+ if (v === null) return false;
59922
+ if (!isOptionalCompileLinkedValues(v.linkedValues)) return false;
59923
+ return isOptionalNullableString2(v.primaryLinkedValueId);
59924
+ }
59925
+ function isDialogueLogicCompileDialogueGroupContext(value) {
59926
+ const v = value;
59927
+ if (typeof v !== "object") return false;
59928
+ if (v === null) return false;
59929
+ if (!isOptionalNullableString2(v.name)) return false;
59930
+ if (typeof v.name === "string" && v.name.length > 0 && !isDialogueSourceIdentifier(v.name)) {
59931
+ return false;
59932
+ }
59933
+ if (!isDialogueGroupType(v.type)) return false;
59934
+ if (!isOptionalNullableString2(v.collectionMemberId)) return false;
59935
+ return isOptionalNullableString2(v.collectionValueId);
59936
+ }
59937
+ function isDialogueLogicCompileTextOptionConditionContext(value) {
59938
+ const v = value;
59939
+ if (typeof v !== "object") return false;
59940
+ if (v === null) return false;
59941
+ if (typeof v.nodeId !== "string") return false;
59942
+ if (typeof v.optionId !== "string") return false;
59943
+ return isDialogueTextOptionConditionBucket(v.bucket);
59944
+ }
59945
+ function isDialogueLogicCompileTextVariableContext(value) {
59946
+ const v = value;
59947
+ if (typeof v !== "object") return false;
59948
+ if (v === null) return false;
59949
+ if (typeof v.nodeId !== "string") return false;
59950
+ if (!isNSPointer(v.pointer)) return false;
59951
+ if (typeof v.sourcePath !== "string") return false;
59952
+ if (!isNSTypeInfo(v.typeInfo)) return false;
59953
+ if (typeof v.variableId !== "string") return false;
59954
+ return isOptionalNullableString2(v.optionId);
59955
+ }
59956
+ function isCompileDialogueLogicRequest(value) {
59957
+ const v = value;
59958
+ if (typeof v !== "object") return false;
59959
+ if (v === null) return false;
59960
+ if (typeof v.code !== "string") return false;
59961
+ if (!isDialogueLogicCompileTarget(v.target)) return false;
59962
+ if (v.dialogue === void 0) {
59963
+ if (!isDialogueLogicCompileDialogueGroupContext(v.dialogueGroup)) {
59964
+ return false;
59965
+ }
59966
+ } else if (!isDialogueLogicCompileDialogueContext(v.dialogue)) return false;
59967
+ if (v.dialogueGroup !== void 0) {
59968
+ if (!isDialogueLogicCompileDialogueGroupContext(v.dialogueGroup)) {
59969
+ return false;
59970
+ }
59971
+ }
59972
+ if (v.node !== void 0 && v.node !== null && !isDialogueLogicCompileNodeContext(v.node)) {
59973
+ return false;
59974
+ }
59975
+ if (v.textOptionCondition !== void 0 && v.textOptionCondition !== null && !isDialogueLogicCompileTextOptionConditionContext(v.textOptionCondition)) {
59976
+ return false;
59977
+ }
59978
+ if (v.textVariable === void 0) return true;
59979
+ if (v.textVariable === null) return true;
59980
+ return isDialogueLogicCompileTextVariableContext(v.textVariable);
59981
+ }
59982
+ function isDialogueLogicCompileTriggerContext(value) {
59983
+ const v = value;
59984
+ if (typeof v !== "object") return false;
59985
+ if (v === null) return false;
59986
+ if (!isOptionalCompileLinkedValues(v.linkedValues)) return false;
59987
+ if (!isOptionalNullableString2(v.primaryLinkedValueId)) return false;
59988
+ if (v.dialogueGroupSettings === void 0) return true;
59989
+ if (v.dialogueGroupSettings === null) return true;
59990
+ return isDialogueLogicCompileGroupSettingsContext(v.dialogueGroupSettings);
59991
+ }
59992
+ function isOptionalCompileLinkedValues(value) {
59993
+ if (value === void 0) return true;
59994
+ if (!Array.isArray(value)) return false;
59995
+ return value.every((candidate) => {
59996
+ const linked = candidate;
59997
+ return typeof linked === "object" && linked !== null && typeof linked.valueId === "string" && (linked.sourceName === void 0 || isDialogueSourceIdentifier(linked.sourceName)) && (linked.declaredTypeName === void 0 || linked.declaredTypeName === null || isDialogueSourceIdentifier(linked.declaredTypeName));
59998
+ });
59999
+ }
60000
+ function isDialogueLogicCompileGroupSettingsContext(value) {
60001
+ const v = value;
60002
+ if (typeof v !== "object") return false;
60003
+ if (v === null) return false;
60004
+ return isOptionalNullableString2(v.lookupValueId);
60005
+ }
60006
+ function isOptionalNullableString2(value) {
60007
+ if (value === void 0) return true;
60008
+ if (value === null) return true;
60009
+ return typeof value === "string";
60010
+ }
60011
+ function isDialogueTextOptionConditionBucket(value) {
60012
+ return value === "conditions" || value === "selectableConditions";
60013
+ }
60014
+ function isDialogueGroupType(value) {
60015
+ return value === 0 /* Standard */ || value === 1 /* Lookup */ || value === 2 /* Folder */;
60016
+ }
60017
+ var init_logic_types = __esm({
60018
+ "../src/models/dialogue/logic-types.ts"() {
60019
+ "use strict";
60020
+ init_members();
60021
+ init_neoscript();
60022
+ init_dialogue_group_types();
60023
+ init_dialogue_source_identifiers();
60024
+ }
60025
+ });
60026
+
60027
+ // ../src/models/dialogue/dialogue-group-types.ts
60028
+ function isOptionalNullableString3(value) {
60029
+ if (value === void 0) return true;
60030
+ if (value === null) return true;
60031
+ return typeof value === "string";
60032
+ }
60033
+ function isDialogueGroupType2(value) {
60034
+ return value === 0 /* Standard */ || value === 1 /* Lookup */ || value === 2 /* Folder */;
60035
+ }
60036
+ function isDialogueGroupBase(value, expectedType) {
60037
+ const v = value;
60038
+ if (typeof v !== "object") return false;
60039
+ if (v === null) return false;
60040
+ if (typeof v.name !== "string") return false;
60041
+ if (!isDialogueGroupType2(v.type)) return false;
60042
+ if (expectedType !== void 0 && v.type !== expectedType) return false;
60043
+ if (!isOptionalNullableString3(v.parentDialogueGroupId)) return false;
60044
+ if (!Array.isArray(v.conditions)) return false;
60045
+ if (!v.conditions.every(isLogicCondition)) return false;
60046
+ return isOptionalNullableString3(v.priorityGroupIdOverride);
60047
+ }
60048
+ function isStandardDialogueGroupBase(value) {
60049
+ return isDialogueGroupBase(value, 0 /* Standard */);
60050
+ }
60051
+ function isLookupDialogueGroupBase(value) {
60052
+ const v = value;
60053
+ if (!isDialogueGroupBase(value, 1 /* Lookup */)) return false;
60054
+ if (typeof v?.collectionMemberId !== "string") return false;
60055
+ return isOptionalNullableString3(v.collectionValueId);
60056
+ }
60057
+ function isFolderDialogueGroupBase(value) {
60058
+ return isDialogueGroupBase(value, 2 /* Folder */);
60059
+ }
60060
+ function isDialogueGroupProps(value, expectedType) {
60061
+ const v = value;
60062
+ if (!isDialogueGroupBase(value, expectedType)) return false;
60063
+ if (!isWithId(value)) return false;
60064
+ if (!isIWithTimestamps(value)) return false;
60065
+ return typeof v?.projectId === "string";
60066
+ }
60067
+ function isDialogueGroup(value, expectedType) {
60068
+ return isDialogueGroupProps(value, expectedType);
60069
+ }
60070
+ function isAnyDialogueGroup(value) {
60071
+ if (!isDialogueGroup(value)) return false;
60072
+ return isStandardDialogueGroupBase(value) || isLookupDialogueGroupBase(value) || isFolderDialogueGroupBase(value);
60073
+ }
60074
+ var init_dialogue_group_types = __esm({
60075
+ "../src/models/dialogue/dialogue-group-types.ts"() {
60076
+ "use strict";
60077
+ init_core();
60078
+ init_logic_types();
60079
+ }
60080
+ });
60081
+
59825
60082
  // ../src/database/neoscript/project-file-registry.ts
59826
60083
  function projectFileRegistryProjection(files) {
59827
60084
  const symbols = assignDeterministicProjectFileSymbols(
@@ -60784,22 +61041,33 @@ function lowerPriorityGroup(baseValue, global) {
60784
61041
  }
60785
61042
  return result;
60786
61043
  }
60787
- function lowerDialogueGroup(baseValue, global, priorityIds, dialogueIds, uiLogicResolver) {
60788
- const base = optionalBase(baseValue);
60789
- const baseWithoutLookup = { ...base };
60790
- Reflect.deleteProperty(baseWithoutLookup, "collectionMemberId");
60791
- Reflect.deleteProperty(baseWithoutLookup, "collectionValueId");
61044
+ function sourceDialogueGroupType(global) {
60792
61045
  const authored = parseDialogueGroupInitializer(global.initializer);
60793
- const args = constructorArguments(authored.constructor, "DialogueGroup");
61046
+ return dialogueGroupType(
61047
+ global.name,
61048
+ constructorArguments(authored.constructor, "DialogueGroup")
61049
+ );
61050
+ }
61051
+ function dialogueGroupType(name, args) {
60794
61052
  const kind = args.get("kind");
60795
61053
  if (kind?.kind !== "contextualEnum") {
60796
61054
  throw new Error(
60797
- `DialogueGroup ${global.name} requires kind: .Standard, .Lookup, or .Folder.`
61055
+ `DialogueGroup ${name} requires kind: .Standard, .Lookup, or .Folder.`
60798
61056
  );
60799
61057
  }
60800
- const type = kind.name === "Lookup" ? 1 : kind.name === "Folder" ? 2 : kind.name === "Standard" ? 0 : null;
61058
+ const type = kind.name === "Lookup" ? 1 /* Lookup */ : kind.name === "Folder" ? 2 /* Folder */ : kind.name === "Standard" ? 0 /* Standard */ : null;
60801
61059
  if (type === null)
60802
61060
  throw new Error(`Unknown dialogue group kind .${kind.name}.`);
61061
+ return type;
61062
+ }
61063
+ function lowerDialogueGroup(baseValue, global, priorityIds, dialogueIds, uiLogicResolver) {
61064
+ const base = optionalBase(baseValue);
61065
+ const baseWithoutLookup = { ...base };
61066
+ Reflect.deleteProperty(baseWithoutLookup, "collectionMemberId");
61067
+ Reflect.deleteProperty(baseWithoutLookup, "collectionValueId");
61068
+ const authored = parseDialogueGroupInitializer(global.initializer);
61069
+ const args = constructorArguments(authored.constructor, "DialogueGroup");
61070
+ const type = dialogueGroupType(global.name, args);
60803
61071
  const collectionMemberId = resolveOptionalReference(
60804
61072
  args.get("collection"),
60805
61073
  /* @__PURE__ */ new Map()
@@ -61387,6 +61655,7 @@ var init_supplemental_records = __esm({
61387
61655
  "use strict";
61388
61656
  init_src();
61389
61657
  init_declaration_path();
61658
+ init_dialogue_group_types();
61390
61659
  init_projection();
61391
61660
  init_project_file_source();
61392
61661
  init_source_format();
@@ -61395,263 +61664,6 @@ var init_supplemental_records = __esm({
61395
61664
  }
61396
61665
  });
61397
61666
 
61398
- // ../src/models/dialogue/dialogue-group-types.ts
61399
- function isOptionalNullableString2(value) {
61400
- if (value === void 0) return true;
61401
- if (value === null) return true;
61402
- return typeof value === "string";
61403
- }
61404
- function isDialogueGroupType(value) {
61405
- return value === 0 /* Standard */ || value === 1 /* Lookup */ || value === 2 /* Folder */;
61406
- }
61407
- function isDialogueGroupBase(value, expectedType) {
61408
- const v = value;
61409
- if (typeof v !== "object") return false;
61410
- if (v === null) return false;
61411
- if (typeof v.name !== "string") return false;
61412
- if (!isDialogueGroupType(v.type)) return false;
61413
- if (expectedType !== void 0 && v.type !== expectedType) return false;
61414
- if (!isOptionalNullableString2(v.parentDialogueGroupId)) return false;
61415
- if (!Array.isArray(v.conditions)) return false;
61416
- if (!v.conditions.every(isLogicCondition)) return false;
61417
- return isOptionalNullableString2(v.priorityGroupIdOverride);
61418
- }
61419
- function isStandardDialogueGroupBase(value) {
61420
- return isDialogueGroupBase(value, 0 /* Standard */);
61421
- }
61422
- function isLookupDialogueGroupBase(value) {
61423
- const v = value;
61424
- if (!isDialogueGroupBase(value, 1 /* Lookup */)) return false;
61425
- if (typeof v?.collectionMemberId !== "string") return false;
61426
- return isOptionalNullableString2(v.collectionValueId);
61427
- }
61428
- function isFolderDialogueGroupBase(value) {
61429
- return isDialogueGroupBase(value, 2 /* Folder */);
61430
- }
61431
- function isDialogueGroupProps(value, expectedType) {
61432
- const v = value;
61433
- if (!isDialogueGroupBase(value, expectedType)) return false;
61434
- if (!isWithId(value)) return false;
61435
- if (!isIWithTimestamps(value)) return false;
61436
- return typeof v?.projectId === "string";
61437
- }
61438
- function isDialogueGroup(value, expectedType) {
61439
- return isDialogueGroupProps(value, expectedType);
61440
- }
61441
- function isAnyDialogueGroup(value) {
61442
- if (!isDialogueGroup(value)) return false;
61443
- return isStandardDialogueGroupBase(value) || isLookupDialogueGroupBase(value) || isFolderDialogueGroupBase(value);
61444
- }
61445
- var init_dialogue_group_types = __esm({
61446
- "../src/models/dialogue/dialogue-group-types.ts"() {
61447
- "use strict";
61448
- init_core();
61449
- init_logic_types();
61450
- }
61451
- });
61452
-
61453
- // ../src/models/dialogue/dialogue-source-identifiers.ts
61454
- function isDialogueSourceIdentifier(value) {
61455
- return isValidProjectSourceIdentifier(value);
61456
- }
61457
- var init_dialogue_source_identifiers = __esm({
61458
- "../src/models/dialogue/dialogue-source-identifiers.ts"() {
61459
- "use strict";
61460
- init_project_source_identifiers2();
61461
- }
61462
- });
61463
-
61464
- // ../src/models/dialogue/logic-types.ts
61465
- function isNSBoolGetter2(value) {
61466
- if (!isNSGetter(value)) return false;
61467
- if (value.typeInfo.type !== 1 /* Bool */) return false;
61468
- return value.typeInfo.required === true;
61469
- }
61470
- function isNSVoidBody2(value) {
61471
- if (!isNSGetter(value)) return false;
61472
- if (value.typeInfo.type !== 0 /* Null */) return false;
61473
- return value.typeInfo.required === true;
61474
- }
61475
- function isUILogicCondition(value) {
61476
- const v = value;
61477
- if (typeof v !== "object") return false;
61478
- if (v === null) return false;
61479
- if (!isNonEmptyString(v.id)) return false;
61480
- if (v.type !== 0 /* UI */) return false;
61481
- if (!isNSBoolGetter2(v.getter)) return false;
61482
- return isUIRenderableCondition(v.getter);
61483
- }
61484
- function isCodeLogicCondition(value) {
61485
- const v = value;
61486
- if (typeof v !== "object") return false;
61487
- if (v === null) return false;
61488
- if (!isNonEmptyString(v.id)) return false;
61489
- if (v.type !== 1 /* Code */) return false;
61490
- if (!isNonEmptyString(v.sourceFunctionId)) return false;
61491
- if (!isDialogueSourceIdentifier(v.sourceFunctionName)) return false;
61492
- if (typeof v.code !== "string") return false;
61493
- return isNSBoolGetter2(v.getter);
61494
- }
61495
- function isLogicCondition(value) {
61496
- return isUILogicCondition(value) || isCodeLogicCondition(value);
61497
- }
61498
- function isUILogicAction(value) {
61499
- const v = value;
61500
- if (typeof v !== "object") return false;
61501
- if (v === null) return false;
61502
- if (v.type !== 0 /* UI */) return false;
61503
- if (!isNSVoidBody2(v.action)) return false;
61504
- return isUIRenderableAction(v.action);
61505
- }
61506
- function isCodeLogicAction(value) {
61507
- const v = value;
61508
- if (typeof v !== "object") return false;
61509
- if (v === null) return false;
61510
- if (v.type !== 1 /* Code */) return false;
61511
- if (!isNonEmptyString(v.sourceFunctionId)) return false;
61512
- if (!isDialogueSourceIdentifier(v.sourceFunctionName)) return false;
61513
- if (typeof v.code !== "string") return false;
61514
- return isNSVoidBody2(v.action);
61515
- }
61516
- function isNonEmptyString(value) {
61517
- return typeof value === "string" && value.length > 0;
61518
- }
61519
- function isLogicAction(value) {
61520
- return isUILogicAction(value) || isCodeLogicAction(value);
61521
- }
61522
- function isUIRenderableCondition(getter) {
61523
- if (getter.instructions.length !== 1) return false;
61524
- return getter.instructions[0]?.type === "return" /* return */;
61525
- }
61526
- function isUIRenderableAction(action) {
61527
- if (action.instructions.length === 0) return true;
61528
- if (action.instructions.length !== 1) return false;
61529
- const instruction = action.instructions[0];
61530
- if (!instruction) return false;
61531
- return instruction.type === "return" /* return */ || instruction.type === "assign" /* assign */ || instruction.type === "collectionCall" /* collectionCall */ || instruction.type === "functionCall" /* functionCall */;
61532
- }
61533
- function isDialogueLogicCompileTarget(value) {
61534
- return value === 0 /* Condition */ || value === 1 /* Action */ || value === 2 /* TextVariable */;
61535
- }
61536
- function isDialogueLogicCompileDialogueContext(value) {
61537
- const v = value;
61538
- if (typeof v !== "object") return false;
61539
- if (v === null) return false;
61540
- if (!isOptionalCompileLinkedValues(v.linkedValues)) return false;
61541
- if (!isOptionalNullableString3(v.primaryLinkedValueId)) return false;
61542
- if (v.triggerNode === void 0) return true;
61543
- if (v.triggerNode === null) return true;
61544
- return isDialogueLogicCompileTriggerContext(v.triggerNode);
61545
- }
61546
- function isDialogueLogicCompileNodeContext(value) {
61547
- const v = value;
61548
- if (typeof v !== "object") return false;
61549
- if (v === null) return false;
61550
- if (!isOptionalCompileLinkedValues(v.linkedValues)) return false;
61551
- return isOptionalNullableString3(v.primaryLinkedValueId);
61552
- }
61553
- function isDialogueLogicCompileDialogueGroupContext(value) {
61554
- const v = value;
61555
- if (typeof v !== "object") return false;
61556
- if (v === null) return false;
61557
- if (!isOptionalNullableString3(v.name)) return false;
61558
- if (typeof v.name === "string" && v.name.length > 0 && !isDialogueSourceIdentifier(v.name)) {
61559
- return false;
61560
- }
61561
- if (!isDialogueGroupType2(v.type)) return false;
61562
- if (!isOptionalNullableString3(v.collectionMemberId)) return false;
61563
- return isOptionalNullableString3(v.collectionValueId);
61564
- }
61565
- function isDialogueLogicCompileTextOptionConditionContext(value) {
61566
- const v = value;
61567
- if (typeof v !== "object") return false;
61568
- if (v === null) return false;
61569
- if (typeof v.nodeId !== "string") return false;
61570
- if (typeof v.optionId !== "string") return false;
61571
- return isDialogueTextOptionConditionBucket(v.bucket);
61572
- }
61573
- function isDialogueLogicCompileTextVariableContext(value) {
61574
- const v = value;
61575
- if (typeof v !== "object") return false;
61576
- if (v === null) return false;
61577
- if (typeof v.nodeId !== "string") return false;
61578
- if (!isNSPointer(v.pointer)) return false;
61579
- if (typeof v.sourcePath !== "string") return false;
61580
- if (!isNSTypeInfo(v.typeInfo)) return false;
61581
- if (typeof v.variableId !== "string") return false;
61582
- return isOptionalNullableString3(v.optionId);
61583
- }
61584
- function isCompileDialogueLogicRequest(value) {
61585
- const v = value;
61586
- if (typeof v !== "object") return false;
61587
- if (v === null) return false;
61588
- if (typeof v.code !== "string") return false;
61589
- if (!isDialogueLogicCompileTarget(v.target)) return false;
61590
- if (v.dialogue === void 0) {
61591
- if (!isDialogueLogicCompileDialogueGroupContext(v.dialogueGroup)) {
61592
- return false;
61593
- }
61594
- } else if (!isDialogueLogicCompileDialogueContext(v.dialogue)) return false;
61595
- if (v.dialogueGroup !== void 0) {
61596
- if (!isDialogueLogicCompileDialogueGroupContext(v.dialogueGroup)) {
61597
- return false;
61598
- }
61599
- }
61600
- if (v.node !== void 0 && v.node !== null && !isDialogueLogicCompileNodeContext(v.node)) {
61601
- return false;
61602
- }
61603
- if (v.textOptionCondition !== void 0 && v.textOptionCondition !== null && !isDialogueLogicCompileTextOptionConditionContext(v.textOptionCondition)) {
61604
- return false;
61605
- }
61606
- if (v.textVariable === void 0) return true;
61607
- if (v.textVariable === null) return true;
61608
- return isDialogueLogicCompileTextVariableContext(v.textVariable);
61609
- }
61610
- function isDialogueLogicCompileTriggerContext(value) {
61611
- const v = value;
61612
- if (typeof v !== "object") return false;
61613
- if (v === null) return false;
61614
- if (!isOptionalCompileLinkedValues(v.linkedValues)) return false;
61615
- if (!isOptionalNullableString3(v.primaryLinkedValueId)) return false;
61616
- if (v.dialogueGroupSettings === void 0) return true;
61617
- if (v.dialogueGroupSettings === null) return true;
61618
- return isDialogueLogicCompileGroupSettingsContext(v.dialogueGroupSettings);
61619
- }
61620
- function isOptionalCompileLinkedValues(value) {
61621
- if (value === void 0) return true;
61622
- if (!Array.isArray(value)) return false;
61623
- return value.every((candidate) => {
61624
- const linked = candidate;
61625
- return typeof linked === "object" && linked !== null && typeof linked.valueId === "string" && (linked.sourceName === void 0 || isDialogueSourceIdentifier(linked.sourceName)) && (linked.declaredTypeName === void 0 || linked.declaredTypeName === null || isDialogueSourceIdentifier(linked.declaredTypeName));
61626
- });
61627
- }
61628
- function isDialogueLogicCompileGroupSettingsContext(value) {
61629
- const v = value;
61630
- if (typeof v !== "object") return false;
61631
- if (v === null) return false;
61632
- return isOptionalNullableString3(v.lookupValueId);
61633
- }
61634
- function isOptionalNullableString3(value) {
61635
- if (value === void 0) return true;
61636
- if (value === null) return true;
61637
- return typeof value === "string";
61638
- }
61639
- function isDialogueTextOptionConditionBucket(value) {
61640
- return value === "conditions" || value === "selectableConditions";
61641
- }
61642
- function isDialogueGroupType2(value) {
61643
- return value === 0 /* Standard */ || value === 1 /* Lookup */ || value === 2 /* Folder */;
61644
- }
61645
- var init_logic_types = __esm({
61646
- "../src/models/dialogue/logic-types.ts"() {
61647
- "use strict";
61648
- init_members();
61649
- init_neoscript();
61650
- init_dialogue_group_types();
61651
- init_dialogue_source_identifiers();
61652
- }
61653
- });
61654
-
61655
61667
  // ../src/models/dialogue/dialogue-types.ts
61656
61668
  function isNonArrayObject(value) {
61657
61669
  if (!isRequiredType(value, isObject)) return false;
@@ -113712,11 +113724,14 @@ function builtinTextVariableMember(receiver, name) {
113712
113724
  function lowerDialogueProjectSourcesV4(state, analysis) {
113713
113725
  const result = [];
113714
113726
  const mainLocale = readMainLocale(state);
113715
- const dialogueGroupIds = globalIds2(
113716
- analysis.dialogueGroups.globals.filter(
113717
- (global) => global.type.name === "DialogueGroup"
113718
- ),
113719
- "dialogue-group"
113727
+ const dialogueGroups = analysis.dialogueGroups.globals.filter(
113728
+ (global) => global.type.name === "DialogueGroup"
113729
+ );
113730
+ const dialogueGroupIds = globalIds2(dialogueGroups, "dialogue-group");
113731
+ const lookupDialogueGroupIds = new Set(
113732
+ dialogueGroups.filter(
113733
+ (global) => sourceDialogueGroupType(global) === 1 /* Lookup */
113734
+ ).map((global) => dialogueGroupIds.get(global.name))
113720
113735
  );
113721
113736
  const priorityGroupsById = recordsById(state, "priority-group");
113722
113737
  const sourceSchema = new SourceSchemaIndex(analysis);
@@ -113746,6 +113761,7 @@ function lowerDialogueProjectSourcesV4(state, analysis) {
113746
113761
  existingLogic: indexExistingLogic(nodesById.values()),
113747
113762
  mainLocale,
113748
113763
  dialogueGroupIds,
113764
+ lookupDialogueGroupIds,
113749
113765
  priorityGroupsById,
113750
113766
  valueSymbols,
113751
113767
  sourceSchema,
@@ -114936,6 +114952,7 @@ function lowerDialogueGroupSettings(context, member, base) {
114936
114952
  }
114937
114953
  return {
114938
114954
  ...old,
114955
+ ...lookupValueSettings(context, referencedGroupId, old),
114939
114956
  dialogueGroupId: referencedGroupId,
114940
114957
  priority: {
114941
114958
  ...isObjectRecord2(old.priority) ? old.priority : {},
@@ -114964,6 +114981,7 @@ function lowerDialogueGroupSettings(context, member, base) {
114964
114981
  }
114965
114982
  return {
114966
114983
  ...old,
114984
+ ...lookupValueSettings(context, groupId, old),
114967
114985
  dialogueGroupId: groupId,
114968
114986
  priority: {
114969
114987
  ...isObjectRecord2(old.priority) ? old.priority : {},
@@ -114972,6 +114990,11 @@ function lowerDialogueGroupSettings(context, member, base) {
114972
114990
  }
114973
114991
  };
114974
114992
  }
114993
+ function lookupValueSettings(context, groupId, old) {
114994
+ if (context.lookupDialogueGroupIds.has(groupId))
114995
+ return { lookupValueId: context.dialoguePrimaryValueId };
114996
+ return old.lookupValueId == null ? {} : { lookupValueId: null };
114997
+ }
114975
114998
  function referenceId2(expression, typeName) {
114976
114999
  const pattern = new RegExp(
114977
115000
  `^Reference<${typeName}>\\(id:\\s*("(?:[^"\\\\]|\\\\.)*")\\)$`,
@@ -115482,6 +115505,8 @@ var init_dialogue_lower = __esm({
115482
115505
  init_neoscript_source_rewrite();
115483
115506
  init_ui_action_source();
115484
115507
  init_source_format();
115508
+ init_supplemental_records();
115509
+ init_dialogue_group_types();
115485
115510
  SourceSchemaIndex = class {
115486
115511
  classesByName;
115487
115512
  classesById;
@@ -140265,7 +140290,7 @@ var init_registry2 = __esm({
140265
140290
  "schema-contract/registry.mjs"() {
140266
140291
  "use strict";
140267
140292
  PROJECT_SCHEMA_CONTRACT = Object.freeze({
140268
- cliVersion: "0.57.0",
140293
+ cliVersion: "0.57.1",
140269
140294
  projectFileUploadBatchSize: 32,
140270
140295
  documentRecords: {
140271
140296
  member: {
@@ -148086,7 +148111,7 @@ There is no --keep-current: preserving current semantic state defines flatten.
148086
148111
  async function main() {
148087
148112
  const args = parseArgs(process.argv.slice(2));
148088
148113
  if (args.command === "--version") {
148089
- console.log("0.57.0");
148114
+ console.log("0.57.1");
148090
148115
  return;
148091
148116
  }
148092
148117
  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.57.0",
3
+ "version": "0.57.1",
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.57.0 -->
12
+ <!-- reviewed-through-cli: 0.57.1 -->
13
13
 
14
14
  # Neo Compose CLI
15
15
 
@@ -430,7 +430,9 @@ sealed class CapitolColdBoot : Dialogue {
430
430
  }
431
431
  ```
432
432
 
433
- Use `@primary` explicitly; never infer it. Keep dialogue bindings flow-wide and
433
+ Use `@primary` explicitly; never infer it. In a `.Lookup` group, the
434
+ dialogue's `@primary` is the lookup value that triggers it; a lookup dialogue
435
+ without one never triggers. Keep dialogue bindings flow-wide and
434
436
  node bindings scoped to their node/children. Give each persisted condition use,
435
437
  action invocation, mutation, pause, option, and node its own owner-scoped ID.
436
438
 
@@ -97,7 +97,7 @@ wrappers.
97
97
  The marker near the top of `SKILL.md` must exactly match the package version:
98
98
 
99
99
  ```html
100
- <!-- reviewed-through-cli: 0.57.0 -->
100
+ <!-- reviewed-through-cli: 0.57.1 -->
101
101
  ```
102
102
 
103
103
  The quoted version above is checked too, so this instruction cannot go stale