@reventlessdev/reventless-core 3.0.0-alpha.300 → 3.0.0-alpha.302

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.
Files changed (114) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/README.md +3 -3
  3. package/package.json +10 -10
  4. package/src/{Behavior.res → Decision.res} +1 -1
  5. package/src/Message.res +1 -1
  6. package/src/ResourceAttribution.res +8 -8
  7. package/src/adapter/Auth/Auth_ActiveRole.res +1 -1
  8. package/src/adapter/Auth/Auth_RefusalVocabulary.res +1 -1
  9. package/src/adapter/EventLogProvisioning/EventLogProvisioning.res +1 -1
  10. package/src/adapter/Runtime/AggregateRuntime_Builder.res +2 -2
  11. package/src/adapter/Runtime/AggregateRuntime_Builder_Common.res +10 -5
  12. package/src/adapter/Runtime/AggregateRuntime_Builder_Micro.res +2 -2
  13. package/src/adapter/Runtime/EventCollectorRuntime_Builder.res +1 -1
  14. package/src/adapter/Runtime/EventCollectorRuntime_Builder_Single.res +8 -3
  15. package/src/adapter/Runtime/ExtensionPointRuntime_Builder.res +1 -1
  16. package/src/adapter/Runtime/PluginRuntime_Builder.res +3 -3
  17. package/src/adapter/Runtime/Runtime.res +10 -9
  18. package/src/adapter/Runtime/TaskRuntime_Builder.res +1 -1
  19. package/src/adapter/RuntimeExtension/RuntimeExtension.res +3 -3
  20. package/src/admin/Platform_Admin_Structure.res +3 -3
  21. package/src/admin/Platform_Admin_Structure.res.mjs +1 -1
  22. package/src/admin/Platform_BakedManifest.res +8 -8
  23. package/src/admin/Platform_BakedManifest.res.mjs +2 -2
  24. package/src/admin/Platform_ComponentDefinitionsApi.res +12 -12
  25. package/src/admin/Platform_ComponentDefinitionsApi.res.mjs +11 -11
  26. package/src/admin/Platform_PluginStructuresApi.res +7 -7
  27. package/src/admin/Platform_PluginStructuresApi.res.mjs +4 -4
  28. package/src/admin/UiFragmentRegistry/StateChange/{UiFragmentRegistry_Behavior.res → UiFragmentRegistry_Decision.res} +1 -1
  29. package/src/admin/UiFragmentRegistry/StateChange/{UiFragmentRegistry_Behavior.res.mjs → UiFragmentRegistry_Decision.res.mjs} +1 -1
  30. package/src/admin/UiFragmentRegistry/StateView/UiFragments.res.mjs +1 -4
  31. package/src/components/Aggregate/Aggregate_Builder.res +2 -2
  32. package/src/components/Aggregate/Aggregate_Builder.res.mjs +2 -2
  33. package/src/components/Aggregate/Aggregate_Callback.res +17 -17
  34. package/src/components/Aggregate/Aggregate_Callback.res.mjs +11 -11
  35. package/src/components/Api/ApiNoApiHelpers.res +1 -1
  36. package/src/components/Api/GraphQL_FragmentGenerator.res +1 -1
  37. package/src/components/Api/SchemaType.res +1 -1
  38. package/src/components/Api/SuryToJsonSchema.res +1 -1
  39. package/src/components/CommandGenerator/CommandGenerator.res +1 -1
  40. package/src/components/CommandGenerator/CommandGenerator_Adapter.res +6 -1
  41. package/src/components/CommandTopic/CommandTopic.res +2 -2
  42. package/src/components/CommandTopic/CommandTopic_Adapter.res +1 -1
  43. package/src/components/CommandTopic/CommandTopic_Helpers.res +4 -4
  44. package/src/components/EventCollector/EventCollector.res +1 -1
  45. package/src/components/EventCollector/EventCollector_Adapter.res +1 -1
  46. package/src/components/EventLog/EventLog_Operations.res +2 -2
  47. package/src/components/Heartbeat/Heartbeat.res +1 -1
  48. package/src/components/ReadModel/ReadModel.res +1 -1
  49. package/src/components/StateChangeSlice/StateChangeSlice.res +1 -1
  50. package/src/components/StateChangeSlice/StateChangeSlice_Builder.res +3 -3
  51. package/src/components/StateChangeSlice/StateChangeSlice_Builder.res.mjs +3 -3
  52. package/src/components/StateChangeSlice/StateChangeSlice_Callback.res +9 -9
  53. package/src/components/StateChangeSlice/StateChangeSlice_Callback.res.mjs +4 -4
  54. package/src/components/StateViewSlice/StateViewSlice_Builder.res +2 -2
  55. package/src/components/StateViewSlice/StateViewSlice_Builder.res.mjs +1 -1
  56. package/src/components/StateViewSlice/StateViewSlice_Callback.res +2 -2
  57. package/src/components/StateViewSlice/StateViewSlice_Callback.res.mjs +1 -1
  58. package/src/components/Task/Task_Adapter.res +1 -1
  59. package/src/components/Task/Task_Builder.res +1 -1
  60. package/src/plugin/component/Plugin_Builder.res +7 -7
  61. package/src/plugin/component/Plugin_Builder.res.mjs +3 -3
  62. package/src/plugin/component/Plugin_BuiltHook.res +1 -1
  63. package/src/plugin/component/Plugin_Structure.res +19 -19
  64. package/src/plugin/component/Plugin_Structure.res.mjs +8 -8
  65. package/src/plugin/lifecycle/{PluginBehavior.res → PluginDecision.res} +4 -4
  66. package/src/plugin/lifecycle/{PluginBehavior.res.mjs → PluginDecision.res.mjs} +1 -1
  67. package/tests/admin/AdminApiSchemaDriftTest.res +8 -8
  68. package/tests/admin/AdminApiSchemaDriftTest.res.mjs +54 -54
  69. package/tests/admin/Platform_Admin_StructureTest.res +10 -10
  70. package/tests/admin/Platform_Admin_StructureTest.res.mjs +5 -5
  71. package/tests/admin/Platform_BakedManifestTest.res +7 -7
  72. package/tests/admin/Platform_BakedManifestTest.res.mjs +9 -9
  73. package/tests/admin/Platform_ComponentDefinitionsApiTest.res +11 -11
  74. package/tests/admin/Platform_ComponentDefinitionsApiTest.res.mjs +5 -5
  75. package/tests/admin/Platform_PluginStructuresApiTest.res +3 -3
  76. package/tests/aggregate/AggregateCacheTest.res +4 -4
  77. package/tests/aggregate/AggregateCacheTest.res.mjs +2 -2
  78. package/tests/aggregate/AggregateCallbackTest.res +2 -2
  79. package/tests/aggregate/AggregateCallbackTest.res.mjs +1 -1
  80. package/tests/aggregate/AggregateConflictTest.res +4 -4
  81. package/tests/aggregate/AggregateConflictTest.res.mjs +2 -2
  82. package/tests/aggregate/AggregateFixtures.res +5 -5
  83. package/tests/aggregate/AggregateFixtures.res.mjs +2 -2
  84. package/tests/aggregate/AggregateRejectionTest.res +1 -1
  85. package/tests/aggregate/AggregateSnapshotTest.res +7 -7
  86. package/tests/aggregate/AggregateSnapshotTest.res.mjs +4 -4
  87. package/tests/api/PsInternalFieldsReadModel.res +1 -1
  88. package/tests/api/TaggedUnionSchemaTest.res +1 -1
  89. package/tests/commandgenerator/CommandGeneratorCallbackTest.res +1 -1
  90. package/tests/commandgenerator/CommandGeneratorFixtures.res +2 -2
  91. package/tests/commandgenerator/CommandGeneratorFixtures.res.mjs +2 -2
  92. package/tests/commandgenerator/OwnerActingTest.res +4 -4
  93. package/tests/commandgenerator/OwnerActingTest.res.mjs +4 -4
  94. package/tests/commandgenerator/OwnerStampingTest.res +1 -1
  95. package/tests/commandtopic/CommandOutcomeHookTest.res +2 -2
  96. package/tests/commandtopic/CommandOutcomeHookTest.res.mjs +3 -3
  97. package/tests/dcb/DcbStateChangeSliceTest.res +5 -5
  98. package/tests/dcb/DcbStateChangeSliceTest.res.mjs +5 -5
  99. package/tests/message/MessageTest.res +1 -1
  100. package/tests/plugin/ManifestVisibilityTest.res +2 -2
  101. package/tests/plugin/PluginStructureAccessTest.res +1 -1
  102. package/tests/plugin/PluginStructureAccessTest.res.mjs +4 -4
  103. package/tests/plugin/PluginStructureTest.res +24 -24
  104. package/tests/plugin/PluginStructureTest.res.mjs +27 -27
  105. package/tests/plugin/StateView/PsAnnotatedView.res +1 -1
  106. package/tests/plugin/StateView/PsAnnotatedView.res.mjs +1 -4
  107. package/tests/plugin/StateView/PsAvailableProductsView.res.mjs +1 -4
  108. package/tests/plugin/StateView/PsCategoriesView.res.mjs +1 -4
  109. package/tests/plugin/StateView/PsCustomersView.res.mjs +1 -4
  110. package/tests/plugin/StateView/PsGatedView.res.mjs +1 -4
  111. package/tests/plugin/StateView/PsOrdersView.res.mjs +1 -4
  112. package/tests/plugin/StateView/PsShipmentsView.res.mjs +1 -4
  113. package/tests/projection/LifecycleTrailTest.res +1 -1
  114. /package/src/{Behavior.res.mjs → Decision.res.mjs} +0 -0
@@ -18,7 +18,7 @@ type svsComponent = Component.t<
18
18
 
19
19
  module PsPlaceOrderSlice: ReventlessInfra.StateChangeSlice.T = {
20
20
  module Spec = PsPlaceOrder
21
- module Behavior = {
21
+ module Decision = {
22
22
  type state = PsPlaceOrder.state
23
23
  let initialState = PsPlaceOrder.initialState
24
24
  let evolve = PsPlaceOrder.evolve
@@ -39,7 +39,7 @@ module PsPlaceOrderSlice: ReventlessInfra.StateChangeSlice.T = {
39
39
  }
40
40
  module PsShipOrderSlice: ReventlessInfra.StateChangeSlice.T = {
41
41
  module Spec = PsShipOrder
42
- module Behavior = {
42
+ module Decision = {
43
43
  type state = PsShipOrder.state
44
44
  let initialState = PsShipOrder.initialState
45
45
  let evolve = PsShipOrder.evolve
@@ -106,7 +106,7 @@ module PsCategoriesViewSlice: ReventlessInfra.StateViewSlice.T = {
106
106
 
107
107
  module PsAttachInvoiceSlice: ReventlessInfra.StateChangeSlice.T = {
108
108
  module Spec = PsAttachInvoice
109
- module Behavior = {
109
+ module Decision = {
110
110
  type state = PsAttachInvoice.state
111
111
  let initialState = PsAttachInvoice.initialState
112
112
  let evolve = PsAttachInvoice.evolve
@@ -128,7 +128,7 @@ module PsAttachInvoiceSlice: ReventlessInfra.StateChangeSlice.T = {
128
128
 
129
129
  module PsUploadAvatarSlice: ReventlessInfra.StateChangeSlice.T = {
130
130
  module Spec = PsUploadAvatar
131
- module Behavior = {
131
+ module Decision = {
132
132
  type state = PsUploadAvatar.state
133
133
  let initialState = PsUploadAvatar.initialState
134
134
  let evolve = PsUploadAvatar.evolve
@@ -150,7 +150,7 @@ module PsUploadAvatarSlice: ReventlessInfra.StateChangeSlice.T = {
150
150
 
151
151
  module PsUploadImagesSlice: ReventlessInfra.StateChangeSlice.T = {
152
152
  module Spec = PsUploadImages
153
- module Behavior = {
153
+ module Decision = {
154
154
  type state = PsUploadImages.state
155
155
  let initialState = PsUploadImages.initialState
156
156
  let evolve = PsUploadImages.evolve
@@ -172,7 +172,7 @@ module PsUploadImagesSlice: ReventlessInfra.StateChangeSlice.T = {
172
172
 
173
173
  module PsTypoStoreSlice: ReventlessInfra.StateChangeSlice.T = {
174
174
  module Spec = PsTypoStore
175
- module Behavior = {
175
+ module Decision = {
176
176
  type state = PsTypoStore.state
177
177
  let initialState = PsTypoStore.initialState
178
178
  let evolve = PsTypoStore.evolve
@@ -194,7 +194,7 @@ module PsTypoStoreSlice: ReventlessInfra.StateChangeSlice.T = {
194
194
 
195
195
  module PsChangePhotoSlice: ReventlessInfra.StateChangeSlice.T = {
196
196
  module Spec = PsChangePhoto
197
- module Behavior = {
197
+ module Decision = {
198
198
  type state = PsChangePhoto.state
199
199
  let initialState = PsChangePhoto.initialState
200
200
  let evolve = PsChangePhoto.evolve
@@ -216,7 +216,7 @@ module PsChangePhotoSlice: ReventlessInfra.StateChangeSlice.T = {
216
216
 
217
217
  module PsReserveStockSlice: ReventlessInfra.StateChangeSlice.T = {
218
218
  module Spec = PsReserveStock
219
- module Behavior = {
219
+ module Decision = {
220
220
  type state = PsReserveStock.state
221
221
  let initialState = PsReserveStock.initialState
222
222
  let evolve = PsReserveStock.evolve
@@ -238,7 +238,7 @@ module PsReserveStockSlice: ReventlessInfra.StateChangeSlice.T = {
238
238
 
239
239
  module PsDispatchShipmentSlice: ReventlessInfra.StateChangeSlice.T = {
240
240
  module Spec = PsDispatchShipment
241
- module Behavior = {
241
+ module Decision = {
242
242
  type state = PsDispatchShipment.state
243
243
  let initialState = PsDispatchShipment.initialState
244
244
  let evolve = PsDispatchShipment.evolve
@@ -259,7 +259,7 @@ module PsDispatchShipmentSlice: ReventlessInfra.StateChangeSlice.T = {
259
259
  }
260
260
  module PsTransitionSwitchSlice: ReventlessInfra.StateChangeSlice.T = {
261
261
  module Spec = PsTransitionSwitch
262
- module Behavior = {
262
+ module Decision = {
263
263
  type state = PsTransitionSwitch.state
264
264
  let initialState = PsTransitionSwitch.initialState
265
265
  let evolve = PsTransitionSwitch.evolve
@@ -301,7 +301,7 @@ let structure = Plugin_Structure.make(
301
301
 
302
302
  describe("lifecycle topology", () => {
303
303
  let ordersStates = Dict.fromArray([("Orders", ["Placed", "Shipped", "Cancelled"])])
304
- let writableWith = (commands): Reventless.Plugin.writableDef => {
304
+ let writableWith = (commands): Reventless.Plugin.writeSideDef => {
305
305
  name: "Ordering",
306
306
  commands,
307
307
  producedEventTypes: [],
@@ -330,7 +330,7 @@ describe("lifecycle topology", () => {
330
330
  testSync("names a state no command can reach", () => {
331
331
  // `Cancelled` is in the enum and nothing declares an edge into it.
332
332
  let findings = Plugin_Structure.lifecycleTopologyFindings(
333
- ~writables=[
333
+ ~writeSides=[
334
334
  writableWith([
335
335
  command(~name="Ship", ~allowedStates=["Placed"], ~targetState="Shipped", ()),
336
336
  ]),
@@ -342,7 +342,7 @@ describe("lifecycle topology", () => {
342
342
 
343
343
  testSync("says nothing when every state is reachable", () => {
344
344
  let findings = Plugin_Structure.lifecycleTopologyFindings(
345
- ~writables=[
345
+ ~writeSides=[
346
346
  writableWith([
347
347
  command(~name="Ship", ~allowedStates=["Placed"], ~targetState="Shipped", ()),
348
348
  command(~name="Cancel", ~allowedStates=["Placed"], ~targetState="Cancelled", ()),
@@ -357,7 +357,7 @@ describe("lifecycle topology", () => {
357
357
  // expected rather than suspicious.
358
358
  testSync("does not call the initial state unreachable", () => {
359
359
  let findings = Plugin_Structure.lifecycleTopologyFindings(
360
- ~writables=[
360
+ ~writeSides=[
361
361
  writableWith([
362
362
  command(~name="Ship", ~allowedStates=["Placed"], ~targetState="Shipped", ()),
363
363
  command(~name="Cancel", ~allowedStates=["Placed"], ~targetState="Cancelled", ()),
@@ -374,7 +374,7 @@ describe("lifecycle topology", () => {
374
374
  // silenced. See the comment in Plugin_Structure.
375
375
  testSync("does not report a state with no way out", () => {
376
376
  let findings = Plugin_Structure.lifecycleTopologyFindings(
377
- ~writables=[
377
+ ~writeSides=[
378
378
  writableWith([
379
379
  command(~name="Ship", ~allowedStates=["Placed"], ~targetState="Shipped", ()),
380
380
  command(~name="Cancel", ~allowedStates=["Placed"], ~targetState="Cancelled", ()),
@@ -410,7 +410,7 @@ describe("commandTransition — the edge as a switch", () => {
410
410
  testSync("a guard declares its from-set and no target", () => {
411
411
  // A positive claim rather than an omission: legal in these states, and it
412
412
  // moves the row nowhere. Distinguishable on the wire from both fields being
413
- // None, and consumers are expected to honour it.
413
+ // None, and consumers are expected to honor it.
414
414
  expect((
415
415
  byName("Rebook")->Option.flatMap(c => c.allowedStates),
416
416
  byName("Rebook")->Option.flatMap(c => c.targetState),
@@ -1310,7 +1310,7 @@ describe("Plugin_Structure.make — Phase 2 graph fields", () => {
1310
1310
  // worked it out — the same declaration-vs-guess distinction `labelFieldSource`
1311
1311
  // publishes, for the field the generated filter and order-by are built from.
1312
1312
  describe("idField / idFieldSource — the key and its provenance", () => {
1313
- let keyOf = (q: Reventless.Plugin.queryableDef) => (q.idField, q.idFieldSource)
1313
+ let keyOf = (q: Reventless.Plugin.readSideDef) => (q.idField, q.idFieldSource)
1314
1314
  let withCategories = Plugin_Structure.make(
1315
1315
  ~name="TestPlugin",
1316
1316
  ~stateChangeSlices=[],
@@ -1431,7 +1431,7 @@ describe("Plugin_Structure.make — Phase 2 graph fields", () => {
1431
1431
  },
1432
1432
  )
1433
1433
 
1434
- // The one behaviour the rename deliberately changes, so it is asserted rather
1434
+ // The one behavior the rename deliberately changes, so it is asserted rather
1435
1435
  // than assumed. `status` is a promiscuous name — geocoding progress, todo-queue
1436
1436
  // progress, translation audit outcome — and a convention keyed on it guessed
1437
1437
  // often. A record whose lifecycle really does live in a field called `status`
@@ -1700,7 +1700,7 @@ describe("Plugin_Structure.make — Phase 2 graph fields", () => {
1700
1700
  )
1701
1701
 
1702
1702
  // The second rule stays a warning: retirement still works, and which field
1703
- // carries it is a modelling judgement rather than a name that is wrong.
1703
+ // carries it is a modeling judgement rather than a name that is wrong.
1704
1704
  testSync(
1705
1705
  "a state on a non-lifecycle field is not a failure",
1706
1706
  () => {
@@ -1738,11 +1738,11 @@ describe("Plugin_Structure.make — Phase 2 graph fields", () => {
1738
1738
  | None => None
1739
1739
  }
1740
1740
 
1741
- // Phase 4: queryableDef.schema must carry x-reventless-* extension keys for
1741
+ // Phase 4: readSideDef.schema must carry x-reventless-* extension keys for
1742
1742
  // annotated state types. Plugin_Structure now uses SuryToJsonSchema.deriveObjectSchema
1743
1743
  // (annotation-aware) instead of S.toInputJSONSchemaOrThrow (metadata-blind).
1744
- describe("queryableDef.schema propagates x-reventless-* annotations", () => {
1745
- let parseSchema = (svs: Reventless.Plugin.queryableDef): JSON.t => svs.schema->JSON.parseOrThrow
1744
+ describe("readSideDef.schema propagates x-reventless-* annotations", () => {
1745
+ let parseSchema = (svs: Reventless.Plugin.readSideDef): JSON.t => svs.schema->JSON.parseOrThrow
1746
1746
 
1747
1747
  let annotatedSchema = structure.stateViewSlices->Array.getUnsafe(3)->parseSchema
1748
1748
 
@@ -2174,7 +2174,7 @@ describe("Plugin_Structure.make — Phase 2 graph fields", () => {
2174
2174
  testSync("nothing else is collected", () => expect(stores->Array.length)->toBe(4))
2175
2175
 
2176
2176
  // The event field derives the same store as the command field of the same
2177
- // name, so the two collapse to one declaration site — the behaviour the
2177
+ // name, so the two collapse to one declaration site — the behavior the
2178
2178
  // annotation form already had, reached without an annotation.
2179
2179
  testSync(
2180
2180
  "each requirement keeps its declaring sites",
@@ -2480,7 +2480,7 @@ describe("Plugin_Structure.make — Phase 2 graph fields", () => {
2480
2480
  // the marker where `Reference.to_` returns it: on the element schema, one level
2481
2481
  // inside the array. Reading the field's own schema therefore answers "no
2482
2482
  // reference" for every `@ref` array — and the consuming side treats a missing
2483
- // declaration as licence to guess, so the field resolves to whatever its name
2483
+ // declaration as license to guess, so the field resolves to whatever its name
2484
2484
  // suggests instead of what the author wrote.
2485
2485
  describe("plural references reach the manifest", () => {
2486
2486
  let withPluralRefs = Plugin_Structure.make(
@@ -35,7 +35,7 @@ import * as PsTransitionSwitch$ReventlessCore from "./StateChange/PsTransitionSw
35
35
  import * as Capability_Inference$ReventlessCore from "../../src/plugin/component/Capability_Inference.res.mjs";
36
36
  import * as PsAvailableProductsView$ReventlessCore from "./StateView/PsAvailableProductsView.res.mjs";
37
37
 
38
- let Behavior = {
38
+ let Decision = {
39
39
  initialState: false,
40
40
  evolve: PsPlaceOrder$ReventlessCore.evolve,
41
41
  decide: PsPlaceOrder$ReventlessCore.decide,
@@ -61,12 +61,12 @@ let PsPlaceOrderSlice_Spec = {
61
61
 
62
62
  let PsPlaceOrderSlice = {
63
63
  Spec: PsPlaceOrderSlice_Spec,
64
- Behavior: Behavior,
64
+ Decision: Decision,
65
65
  isAsync: false,
66
66
  make: make
67
67
  };
68
68
 
69
- let Behavior$1 = {
69
+ let Decision$1 = {
70
70
  initialState: false,
71
71
  evolve: PsShipOrder$ReventlessCore.evolve,
72
72
  decide: PsShipOrder$ReventlessCore.decide,
@@ -92,7 +92,7 @@ let PsShipOrderSlice_Spec = {
92
92
 
93
93
  let PsShipOrderSlice = {
94
94
  Spec: PsShipOrderSlice_Spec,
95
- Behavior: Behavior$1,
95
+ Decision: Decision$1,
96
96
  isAsync: false,
97
97
  make: make$1
98
98
  };
@@ -110,7 +110,7 @@ let PsOrdersViewSlice_Spec = {
110
110
  name: PsOrdersView$ReventlessCore.name,
111
111
  moduleUrl: PsOrdersView$ReventlessCore.moduleUrl,
112
112
  stateSchema: PsOrdersView$ReventlessCore.stateSchema,
113
- Key: {
113
+ Id: {
114
114
  schema: Id$Reventless.StringPure.schema,
115
115
  make: prim => prim,
116
116
  makeFromString: prim => prim,
@@ -143,7 +143,7 @@ let PsAvailableProductsViewSlice_Spec = {
143
143
  name: PsAvailableProductsView$ReventlessCore.name,
144
144
  moduleUrl: PsAvailableProductsView$ReventlessCore.moduleUrl,
145
145
  stateSchema: PsAvailableProductsView$ReventlessCore.stateSchema,
146
- Key: {
146
+ Id: {
147
147
  schema: Id$Reventless.StringPure.schema,
148
148
  make: prim => prim,
149
149
  makeFromString: prim => prim,
@@ -176,7 +176,7 @@ let PsCustomersViewSlice_Spec = {
176
176
  name: PsCustomersView$ReventlessCore.name,
177
177
  moduleUrl: PsCustomersView$ReventlessCore.moduleUrl,
178
178
  stateSchema: PsCustomersView$ReventlessCore.stateSchema,
179
- Key: {
179
+ Id: {
180
180
  schema: Id$Reventless.StringPure.schema,
181
181
  make: prim => prim,
182
182
  makeFromString: prim => prim,
@@ -209,7 +209,7 @@ let PsAnnotatedViewSlice_Spec = {
209
209
  name: PsAnnotatedView$ReventlessCore.name,
210
210
  moduleUrl: PsAnnotatedView$ReventlessCore.moduleUrl,
211
211
  stateSchema: PsAnnotatedView$ReventlessCore.stateSchema,
212
- Key: {
212
+ Id: {
213
213
  schema: Id$Reventless.StringPure.schema,
214
214
  make: prim => prim,
215
215
  makeFromString: prim => prim,
@@ -242,7 +242,7 @@ let PsCategoriesViewSlice_Spec = {
242
242
  name: PsCategoriesView$ReventlessCore.name,
243
243
  moduleUrl: PsCategoriesView$ReventlessCore.moduleUrl,
244
244
  stateSchema: PsCategoriesView$ReventlessCore.stateSchema,
245
- Key: {
245
+ Id: {
246
246
  schema: Id$Reventless.StringPure.schema,
247
247
  make: prim => prim,
248
248
  makeFromString: prim => prim,
@@ -262,7 +262,7 @@ let PsCategoriesViewSlice = {
262
262
  make: make$6
263
263
  };
264
264
 
265
- let Behavior$2 = {
265
+ let Decision$2 = {
266
266
  initialState: false,
267
267
  evolve: PsAttachInvoice$ReventlessCore.evolve,
268
268
  decide: PsAttachInvoice$ReventlessCore.decide,
@@ -288,12 +288,12 @@ let PsAttachInvoiceSlice_Spec = {
288
288
 
289
289
  let PsAttachInvoiceSlice = {
290
290
  Spec: PsAttachInvoiceSlice_Spec,
291
- Behavior: Behavior$2,
291
+ Decision: Decision$2,
292
292
  isAsync: false,
293
293
  make: make$7
294
294
  };
295
295
 
296
- let Behavior$3 = {
296
+ let Decision$3 = {
297
297
  initialState: false,
298
298
  evolve: PsUploadAvatar$ReventlessCore.evolve,
299
299
  decide: PsUploadAvatar$ReventlessCore.decide,
@@ -319,12 +319,12 @@ let PsUploadAvatarSlice_Spec = {
319
319
 
320
320
  let PsUploadAvatarSlice = {
321
321
  Spec: PsUploadAvatarSlice_Spec,
322
- Behavior: Behavior$3,
322
+ Decision: Decision$3,
323
323
  isAsync: false,
324
324
  make: make$8
325
325
  };
326
326
 
327
- let Behavior$4 = {
327
+ let Decision$4 = {
328
328
  initialState: false,
329
329
  evolve: PsUploadImages$ReventlessCore.evolve,
330
330
  decide: PsUploadImages$ReventlessCore.decide,
@@ -350,12 +350,12 @@ let PsUploadImagesSlice_Spec = {
350
350
 
351
351
  let PsUploadImagesSlice = {
352
352
  Spec: PsUploadImagesSlice_Spec,
353
- Behavior: Behavior$4,
353
+ Decision: Decision$4,
354
354
  isAsync: false,
355
355
  make: make$9
356
356
  };
357
357
 
358
- let Behavior$5 = {
358
+ let Decision$5 = {
359
359
  initialState: false,
360
360
  evolve: PsTypoStore$ReventlessCore.evolve,
361
361
  decide: PsTypoStore$ReventlessCore.decide,
@@ -381,12 +381,12 @@ let PsTypoStoreSlice_Spec = {
381
381
 
382
382
  let PsTypoStoreSlice = {
383
383
  Spec: PsTypoStoreSlice_Spec,
384
- Behavior: Behavior$5,
384
+ Decision: Decision$5,
385
385
  isAsync: false,
386
386
  make: make$10
387
387
  };
388
388
 
389
- let Behavior$6 = {
389
+ let Decision$6 = {
390
390
  initialState: false,
391
391
  evolve: PsChangePhoto$ReventlessCore.evolve,
392
392
  decide: PsChangePhoto$ReventlessCore.decide,
@@ -412,12 +412,12 @@ let PsChangePhotoSlice_Spec = {
412
412
 
413
413
  let PsChangePhotoSlice = {
414
414
  Spec: PsChangePhotoSlice_Spec,
415
- Behavior: Behavior$6,
415
+ Decision: Decision$6,
416
416
  isAsync: false,
417
417
  make: make$11
418
418
  };
419
419
 
420
- let Behavior$7 = {
420
+ let Decision$7 = {
421
421
  initialState: false,
422
422
  evolve: PsReserveStock$ReventlessCore.evolve,
423
423
  decide: PsReserveStock$ReventlessCore.decide,
@@ -443,12 +443,12 @@ let PsReserveStockSlice_Spec = {
443
443
 
444
444
  let PsReserveStockSlice = {
445
445
  Spec: PsReserveStockSlice_Spec,
446
- Behavior: Behavior$7,
446
+ Decision: Decision$7,
447
447
  isAsync: false,
448
448
  make: make$12
449
449
  };
450
450
 
451
- let Behavior$8 = {
451
+ let Decision$8 = {
452
452
  initialState: false,
453
453
  evolve: PsDispatchShipment$ReventlessCore.evolve,
454
454
  decide: PsDispatchShipment$ReventlessCore.decide,
@@ -474,12 +474,12 @@ let PsDispatchShipmentSlice_Spec = {
474
474
 
475
475
  let PsDispatchShipmentSlice = {
476
476
  Spec: PsDispatchShipmentSlice_Spec,
477
- Behavior: Behavior$8,
477
+ Decision: Decision$8,
478
478
  isAsync: false,
479
479
  make: make$13
480
480
  };
481
481
 
482
- let Behavior$9 = {
482
+ let Decision$9 = {
483
483
  initialState: false,
484
484
  evolve: PsTransitionSwitch$ReventlessCore.evolve,
485
485
  decide: PsTransitionSwitch$ReventlessCore.decide,
@@ -505,7 +505,7 @@ let PsTransitionSwitchSlice_Spec = {
505
505
 
506
506
  let PsTransitionSwitchSlice = {
507
507
  Spec: PsTransitionSwitchSlice_Spec,
508
- Behavior: Behavior$9,
508
+ Decision: Decision$9,
509
509
  isAsync: false,
510
510
  make: make$14
511
511
  };
@@ -523,7 +523,7 @@ let PsShipmentsViewSlice_Spec = {
523
523
  name: PsShipmentsView$ReventlessCore.name,
524
524
  moduleUrl: PsShipmentsView$ReventlessCore.moduleUrl,
525
525
  stateSchema: PsShipmentsView$ReventlessCore.stateSchema,
526
- Key: {
526
+ Id: {
527
527
  schema: Id$Reventless.StringPure.schema,
528
528
  make: prim => prim,
529
529
  makeFromString: prim => prim,
@@ -1567,7 +1567,7 @@ globalThis.describe("Plugin_Structure.make — Phase 2 graph fields", () => {
1567
1567
  return obj[fieldName];
1568
1568
  }
1569
1569
  };
1570
- globalThis.describe("queryableDef.schema propagates x-reventless-* annotations", () => {
1570
+ globalThis.describe("readSideDef.schema propagates x-reventless-* annotations", () => {
1571
1571
  let annotatedSchema = JSON.parse(structure.stateViewSlices[3].schema);
1572
1572
  globalThis.test("itemId carries x-reventless-id", () => {
1573
1573
  globalThis.expect(Stdlib_Option.flatMap(Stdlib_Option.flatMap(getPropertyOf(annotatedSchema, "itemId"), s => getProperty(s, "x-reventless-id")), Stdlib_JSON.Decode.bool)).toBe(true);
@@ -1,6 +1,6 @@
1
1
  // Phase 4 fixture: state-view slice with structural annotations.
2
2
  // Used to verify Plugin_Structure.make ships x-reventless-* extension
3
- // properties through queryableDef.schema after swapping S.toInputJSONSchemaOrThrow
3
+ // properties through readSideDef.schema after swapping S.toInputJSONSchemaOrThrow
4
4
  // for SuryToJsonSchema.deriveObjectSchema.
5
5
 
6
6
  @@reventless.spec("AnnotatedView")
@@ -99,8 +99,6 @@ let name = "AnnotatedView";
99
99
 
100
100
  let Id;
101
101
 
102
- let Key;
103
-
104
102
  let moduleUrl = "@reventlessdev/reventless-core/tests/plugin/StateView/PsAnnotatedView.res.mjs";
105
103
 
106
104
  let authorization = "AllowAuthenticated";
@@ -109,11 +107,10 @@ let visibility = "Public";
109
107
 
110
108
  export {
111
109
  name,
112
- Id,
113
110
  consumedEventSchema,
114
111
  project,
115
112
  config,
116
- Key,
113
+ Id,
117
114
  subIdConfig,
118
115
  makeId,
119
116
  stateSchema$1 as stateSchema,
@@ -47,8 +47,6 @@ let name = "AvailableProducts";
47
47
 
48
48
  let Id;
49
49
 
50
- let Key;
51
-
52
50
  let subIdConfig;
53
51
 
54
52
  let moduleUrl = "@reventlessdev/reventless-core/tests/plugin/StateView/PsAvailableProductsView.res.mjs";
@@ -59,12 +57,11 @@ let visibility = "Public";
59
57
 
60
58
  export {
61
59
  name,
62
- Id,
63
60
  consumedEventSchema,
64
61
  stateSchema,
65
62
  project,
66
63
  config,
67
- Key,
64
+ Id,
68
65
  subIdConfig,
69
66
  moduleUrl,
70
67
  authorization,
@@ -34,8 +34,6 @@ let name = "Categories";
34
34
 
35
35
  let Id;
36
36
 
37
- let Key;
38
-
39
37
  let subIdConfig;
40
38
 
41
39
  let moduleUrl = "@reventlessdev/reventless-core/tests/plugin/StateView/PsCategoriesView.res.mjs";
@@ -46,12 +44,11 @@ let visibility = "Public";
46
44
 
47
45
  export {
48
46
  name,
49
- Id,
50
47
  consumedEventSchema,
51
48
  stateSchema,
52
49
  project,
53
50
  config,
54
- Key,
51
+ Id,
55
52
  subIdConfig,
56
53
  moduleUrl,
57
54
  authorization,
@@ -47,8 +47,6 @@ let name = "Customers";
47
47
 
48
48
  let Id;
49
49
 
50
- let Key;
51
-
52
50
  let subIdConfig;
53
51
 
54
52
  let moduleUrl = "@reventlessdev/reventless-core/tests/plugin/StateView/PsCustomersView.res.mjs";
@@ -59,12 +57,11 @@ let visibility = "Public";
59
57
 
60
58
  export {
61
59
  name,
62
- Id,
63
60
  consumedEventSchema,
64
61
  stateSchema$1 as stateSchema,
65
62
  project,
66
63
  config,
67
- Key,
64
+ Id,
68
65
  subIdConfig,
69
66
  moduleUrl,
70
67
  authorization,
@@ -39,8 +39,6 @@ let name = "GatedView";
39
39
 
40
40
  let Id;
41
41
 
42
- let Key;
43
-
44
42
  let subIdConfig;
45
43
 
46
44
  let moduleUrl = "@reventlessdev/reventless-core/tests/plugin/StateView/PsGatedView.res.mjs";
@@ -49,12 +47,11 @@ let visibility = "Public";
49
47
 
50
48
  export {
51
49
  name,
52
- Id,
53
50
  consumedEventSchema,
54
51
  stateSchema,
55
52
  project,
56
53
  config,
57
- Key,
54
+ Id,
58
55
  subIdConfig,
59
56
  moduleUrl,
60
57
  authorization,
@@ -59,8 +59,6 @@ let name = "Orders";
59
59
 
60
60
  let Id;
61
61
 
62
- let Key;
63
-
64
62
  let subIdConfig;
65
63
 
66
64
  let moduleUrl = "@reventlessdev/reventless-core/tests/plugin/StateView/PsOrdersView.res.mjs";
@@ -71,12 +69,11 @@ let visibility = "Public";
71
69
 
72
70
  export {
73
71
  name,
74
- Id,
75
72
  consumedEventSchema,
76
73
  stateSchema,
77
74
  project,
78
75
  config,
79
- Key,
76
+ Id,
80
77
  subIdConfig,
81
78
  moduleUrl,
82
79
  authorization,
@@ -78,8 +78,6 @@ let name = "Shipments";
78
78
 
79
79
  let Id;
80
80
 
81
- let Key;
82
-
83
81
  let subIdConfig;
84
82
 
85
83
  let moduleUrl = "@reventlessdev/reventless-core/tests/plugin/StateView/PsShipmentsView.res.mjs";
@@ -90,12 +88,11 @@ let visibility = "Public";
90
88
 
91
89
  export {
92
90
  name,
93
- Id,
94
91
  consumedEventSchema,
95
92
  shipmentStatusSchema,
96
93
  project,
97
94
  config,
98
- Key,
95
+ Id,
99
96
  subIdConfig,
100
97
  stateSchema$1 as stateSchema,
101
98
  moduleUrl,
@@ -91,7 +91,7 @@ describe("the lifecycle trail:", () => {
91
91
  expect(run(events)->statesOf)->toEqual(run(events)->statesOf)
92
92
  })
93
93
 
94
- // The marker is what makes a trail recognisable to a consumer holding only the
94
+ // The marker is what makes a trail recognizable to a consumer holding only the
95
95
  // schema. `SchemaType.trailShape` walks the entries by shape, which skips the
96
96
  // semantic dispatch `fromSury` does, so this is the assertion that catches it
97
97
  // being dropped there — the field would still emit as a plain array of objects.
File without changes