@spine-event-engine/server 2.0.0-snapshot.25 → 2.0.0-snapshot.26

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 (150) hide show
  1. package/README.md +49 -9
  2. package/REFERENCE.md +339 -22
  3. package/dist/agent/agent-history.d.ts +19 -3
  4. package/dist/agent/agent-history.d.ts.map +1 -1
  5. package/dist/agent/agent-history.js +41 -10
  6. package/dist/agent/agent-history.js.map +1 -1
  7. package/dist/agent/agent-live-read-runtime.d.ts +12 -1
  8. package/dist/agent/agent-live-read-runtime.d.ts.map +1 -1
  9. package/dist/agent/agent-live-read-runtime.js +5 -4
  10. package/dist/agent/agent-live-read-runtime.js.map +1 -1
  11. package/dist/browser/browser-server.d.ts +163 -0
  12. package/dist/browser/browser-server.d.ts.map +1 -1
  13. package/dist/browser/browser-server.js +579 -188
  14. package/dist/browser/browser-server.js.map +1 -1
  15. package/dist/browser/durable-subscription-bindings.d.ts +5 -0
  16. package/dist/browser/durable-subscription-bindings.d.ts.map +1 -1
  17. package/dist/browser/durable-subscription-bindings.js +226 -38
  18. package/dist/browser/durable-subscription-bindings.js.map +1 -1
  19. package/dist/browser/options.d.ts +5 -0
  20. package/dist/browser/options.d.ts.map +1 -1
  21. package/dist/bus/command-bus.d.ts +3 -0
  22. package/dist/bus/command-bus.d.ts.map +1 -1
  23. package/dist/bus/command-bus.js +69 -9
  24. package/dist/bus/command-bus.js.map +1 -1
  25. package/dist/bus/command-errors.d.ts +20 -4
  26. package/dist/bus/command-errors.d.ts.map +1 -1
  27. package/dist/bus/command-errors.js +47 -7
  28. package/dist/bus/command-errors.js.map +1 -1
  29. package/dist/bus/event-bus.d.ts +3 -0
  30. package/dist/bus/event-bus.d.ts.map +1 -1
  31. package/dist/bus/event-bus.js +130 -8
  32. package/dist/bus/event-bus.js.map +1 -1
  33. package/dist/context/bounded-context.d.ts +29 -11
  34. package/dist/context/bounded-context.d.ts.map +1 -1
  35. package/dist/context/bounded-context.js +147 -186
  36. package/dist/context/bounded-context.js.map +1 -1
  37. package/dist/entity/entity.d.ts +59 -0
  38. package/dist/entity/entity.d.ts.map +1 -1
  39. package/dist/entity/entity.js +60 -0
  40. package/dist/entity/entity.js.map +1 -1
  41. package/dist/handler/app-query-handler.d.ts +60 -0
  42. package/dist/handler/app-query-handler.d.ts.map +1 -0
  43. package/dist/handler/app-query-handler.js +23 -0
  44. package/dist/handler/app-query-handler.js.map +1 -0
  45. package/dist/handler/generated-registry-discovery.d.ts +6 -0
  46. package/dist/handler/generated-registry-discovery.d.ts.map +1 -1
  47. package/dist/handler/generated-registry-discovery.js +71 -2
  48. package/dist/handler/generated-registry-discovery.js.map +1 -1
  49. package/dist/handler/handler-decorators.d.ts +8 -29
  50. package/dist/handler/handler-decorators.d.ts.map +1 -1
  51. package/dist/handler/handler-decorators.js +33 -210
  52. package/dist/handler/handler-decorators.js.map +1 -1
  53. package/dist/handler/spine-metadata-inventory.d.ts +99 -0
  54. package/dist/handler/spine-metadata-inventory.d.ts.map +1 -0
  55. package/dist/handler/spine-metadata-inventory.js +162 -0
  56. package/dist/handler/spine-metadata-inventory.js.map +1 -0
  57. package/dist/index.d.ts +5 -3
  58. package/dist/index.d.ts.map +1 -1
  59. package/dist/index.js +4 -2
  60. package/dist/index.js.map +1 -1
  61. package/dist/repository/repository.d.ts +44 -1
  62. package/dist/repository/repository.d.ts.map +1 -1
  63. package/dist/repository/repository.js +368 -88
  64. package/dist/repository/repository.js.map +1 -1
  65. package/dist/server/managed-server-application.d.ts +12 -11
  66. package/dist/server/managed-server-application.d.ts.map +1 -1
  67. package/dist/server/managed-server-application.js +41 -25
  68. package/dist/server/managed-server-application.js.map +1 -1
  69. package/dist/server/node-coordinator.d.ts +18 -5
  70. package/dist/server/node-coordinator.d.ts.map +1 -1
  71. package/dist/server/node-coordinator.js +554 -84
  72. package/dist/server/node-coordinator.js.map +1 -1
  73. package/dist/server/reserved-spine-rpc-paths.json +1 -0
  74. package/dist/server/server-environment.d.ts +17 -0
  75. package/dist/server/server-environment.d.ts.map +1 -1
  76. package/dist/server/server-environment.js +77 -16
  77. package/dist/server/server-environment.js.map +1 -1
  78. package/dist/server/server.d.ts +45 -0
  79. package/dist/server/server.d.ts.map +1 -1
  80. package/dist/server/server.js +111 -3
  81. package/dist/server/server.js.map +1 -1
  82. package/dist/services/app-query-execution.d.ts +53 -0
  83. package/dist/services/app-query-execution.d.ts.map +1 -0
  84. package/dist/services/app-query-execution.js +408 -0
  85. package/dist/services/app-query-execution.js.map +1 -0
  86. package/dist/services/query-reader.d.ts +32 -7
  87. package/dist/services/query-reader.d.ts.map +1 -1
  88. package/dist/services/query-reader.js +22 -2
  89. package/dist/services/query-reader.js.map +1 -1
  90. package/dist/services/read-request-status.d.ts +65 -0
  91. package/dist/services/read-request-status.d.ts.map +1 -0
  92. package/dist/services/read-request-status.js +151 -0
  93. package/dist/services/read-request-status.js.map +1 -0
  94. package/dist/services/spine-services.d.ts +36 -7
  95. package/dist/services/spine-services.d.ts.map +1 -1
  96. package/dist/services/spine-services.js +900 -168
  97. package/dist/services/spine-services.js.map +1 -1
  98. package/dist/services/trusted-reader-ingress.d.ts +92 -0
  99. package/dist/services/trusted-reader-ingress.d.ts.map +1 -0
  100. package/dist/services/trusted-reader-ingress.js +89 -0
  101. package/dist/services/trusted-reader-ingress.js.map +1 -0
  102. package/dist/spi/handler-registry.d.ts +2 -0
  103. package/dist/spi/handler-registry.d.ts.map +1 -1
  104. package/dist/spi/handler-registry.js +1 -1
  105. package/dist/spi/handler-registry.js.map +1 -1
  106. package/dist/stand/read-side-filter-engine.d.ts +46 -0
  107. package/dist/stand/read-side-filter-engine.d.ts.map +1 -0
  108. package/dist/stand/read-side-filter-engine.js +356 -0
  109. package/dist/stand/read-side-filter-engine.js.map +1 -0
  110. package/dist/stand/read-side-filter.d.ts +247 -0
  111. package/dist/stand/read-side-filter.d.ts.map +1 -0
  112. package/dist/stand/read-side-filter.js +39 -0
  113. package/dist/stand/read-side-filter.js.map +1 -0
  114. package/dist/stand/read-side-message.d.ts +66 -0
  115. package/dist/stand/read-side-message.d.ts.map +1 -0
  116. package/dist/stand/read-side-message.js +167 -0
  117. package/dist/stand/read-side-message.js.map +1 -0
  118. package/dist/stand/stand-direct-delivery.d.ts +161 -0
  119. package/dist/stand/stand-direct-delivery.d.ts.map +1 -0
  120. package/dist/stand/stand-direct-delivery.js +210 -0
  121. package/dist/stand/stand-direct-delivery.js.map +1 -0
  122. package/dist/stand/stand.d.ts +80 -42
  123. package/dist/stand/stand.d.ts.map +1 -1
  124. package/dist/stand/stand.js +410 -54
  125. package/dist/stand/stand.js.map +1 -1
  126. package/dist/stand/subscription-observer.d.ts.map +1 -1
  127. package/dist/stand/subscription-observer.js +103 -0
  128. package/dist/stand/subscription-observer.js.map +1 -1
  129. package/dist/stand/subscription-read-filters.d.ts +40 -0
  130. package/dist/stand/subscription-read-filters.d.ts.map +1 -0
  131. package/dist/stand/subscription-read-filters.js +91 -0
  132. package/dist/stand/subscription-read-filters.js.map +1 -0
  133. package/dist/stand/subscription-reader-binding.d.ts +20 -0
  134. package/dist/stand/subscription-reader-binding.d.ts.map +1 -0
  135. package/dist/stand/subscription-reader-binding.js +56 -0
  136. package/dist/stand/subscription-reader-binding.js.map +1 -0
  137. package/dist/stand/subscription-records.d.ts +30 -3
  138. package/dist/stand/subscription-records.d.ts.map +1 -1
  139. package/dist/stand/subscription-records.js +61 -16
  140. package/dist/stand/subscription-records.js.map +1 -1
  141. package/dist/stand/subscription-registry.d.ts +49 -14
  142. package/dist/stand/subscription-registry.d.ts.map +1 -1
  143. package/dist/stand/subscription-registry.js +150 -31
  144. package/dist/stand/subscription-registry.js.map +1 -1
  145. package/dist/stand/subscription-runtime.d.ts +7 -2
  146. package/dist/stand/subscription-runtime.d.ts.map +1 -1
  147. package/dist/stand/subscription-runtime.js +131 -25
  148. package/dist/stand/subscription-runtime.js.map +1 -1
  149. package/dist/tsconfig.tsbuildinfo +1 -1
  150. package/package.json +14 -14
@@ -11,8 +11,7 @@
11
11
  * or implied. See the License for the specific language governing permissions and limitations under
12
12
  * the License.
13
13
  */
14
- import { EntityHandlers, } from "./handler-metadata.js";
15
- const handlerDecoratorMetadataKey = Symbol("@spine-event-engine/server.handlerDecorators");
14
+ import {} from "./handler-metadata.js";
16
15
  /**
17
16
  * Validates declared domain rejections for build-time handler discovery.
18
17
  *
@@ -45,53 +44,44 @@ export function Throws(...declarations) {
45
44
  throw new TypeError("@Throws cannot declare the same rejection more than once.");
46
45
  }
47
46
  return (_value, context) => {
48
- DecoratorMetadata.methodName(context);
47
+ DecoratorValidation.methodName(context);
49
48
  };
50
49
  }
51
50
  /**
52
- * Creates command-assignment decorator metadata or a schema-bearing decorator.
51
+ * Validates a bare command-assignment declaration.
53
52
  *
54
- * @param schemaOrValue Command schema or decorated method implementation.
55
- * @param context Standard decorator context for bare usage.
56
- * @returns A decorator for schema-bearing usage, or `undefined` after bare usage.
53
+ * @param value Decorated method implementation.
54
+ * @param context Standard decorator context.
57
55
  */
58
- export function Assign(schemaOrValue, context) {
59
- return DecoratorMetadata.decorateOrCreate("command-assignment", schemaOrValue, context);
56
+ export function Assign(value, context) {
57
+ DecoratorValidation.method(value, context);
60
58
  }
61
59
  /**
62
- * Creates command-handler decorator metadata or a schema-bearing decorator.
63
- * Command input declares a Process Manager command substitution; Event or rejection
64
- * input declares an Event Bus command reaction. Schema-bearing metadata cannot
65
- * provide declared returned schemas and is rejected during materialization.
60
+ * Validates a bare command handler declaration.
66
61
  *
67
- * @param schemaOrValue Generated Command, Event, or rejection schema, or
68
- * decorated method implementation.
69
- * @param context Standard decorator context for bare usage.
70
- * @returns A decorator for schema-bearing usage, or `undefined` after bare usage.
62
+ * @param value Decorated method implementation.
63
+ * @param context Standard decorator context.
71
64
  */
72
- export function Command(schemaOrValue, context) {
73
- return DecoratorMetadata.decorateOrCreate("command-reaction", schemaOrValue, context);
65
+ export function Command(value, context) {
66
+ DecoratorValidation.method(value, context);
74
67
  }
75
68
  /**
76
- * Creates subscriber decorator metadata or a schema-bearing decorator.
69
+ * Validates a bare event subscription declaration.
77
70
  *
78
- * @param schemaOrValue Event, rejection, or descriptor-marked Entity state
79
- * schema, or the decorated method implementation.
80
- * @param context Standard decorator context for bare usage.
81
- * @returns A decorator for schema-bearing usage, or `undefined` after bare usage.
71
+ * @param value Decorated method implementation.
72
+ * @param context Standard decorator context.
82
73
  */
83
- export function Subscribe(schemaOrValue, context) {
84
- return DecoratorMetadata.decorateOrCreate("event-subscription", schemaOrValue, context);
74
+ export function Subscribe(value, context) {
75
+ DecoratorValidation.method(value, context);
85
76
  }
86
77
  /**
87
- * Creates event-reaction decorator metadata or a schema-bearing decorator.
78
+ * Validates a bare event reaction declaration.
88
79
  *
89
- * @param schemaOrValue Event schema or decorated method implementation.
90
- * @param context Standard decorator context for bare usage.
91
- * @returns A decorator for schema-bearing usage, or `undefined` after bare usage.
80
+ * @param value Decorated method implementation.
81
+ * @param context Standard decorator context.
92
82
  */
93
- export function React(schemaOrValue, context) {
94
- return DecoratorMetadata.decorateOrCreate("event-reaction", schemaOrValue, context);
83
+ export function React(value, context) {
84
+ DecoratorValidation.method(value, context);
95
85
  }
96
86
  /**
97
87
  * Creates one Event field equality filter for an Event-consuming handler.
@@ -107,62 +97,14 @@ export function Where(options) {
107
97
  const snapshot = WhereValues.snapshot(options);
108
98
  return (_value, context) => {
109
99
  void snapshot;
110
- DecoratorMetadata.methodName(context);
100
+ DecoratorValidation.methodName(context);
111
101
  };
112
102
  }
113
- /**
114
- * Builds schema-bearing decorator declarations for framework compatibility.
115
- *
116
- * The returned object is the same frozen `EntityHandlersMetadata` contract
117
- * produced by `EntityHandlers.define()` and accepted by
118
- * `HandlerMetadataRegistry`. Only own prototype methods of `entityType` are
119
- * inspected; inherited decorated methods are intentionally not materialized by
120
- * this per-class adapter.
121
- *
122
- * Application code must not call this function and must not provide its own
123
- * handler discovery/materialization. Generated framework registries own schema
124
- * inference for bare decorators; this adapter only supports legacy
125
- * schema-bearing decorator metadata.
126
- *
127
- * @typeParam Instance Entity instance on which the handlers run.
128
- * @typeParam StateSchema - Schema that describes the entity state.
129
- * @param entityType Entity class whose own decorated methods are read.
130
- * @param stateSchema Schema that describes the entity state.
131
- * @returns Frozen handler metadata for the decorated methods.
132
- */
133
- export function materializeDecoratedEntityHandlers(entityType, stateSchema) {
134
- const decoratedHandlers = DecoratorMetadata.collect(entityType);
135
- return EntityHandlers.define(entityType, stateSchema, (builder) => decoratedHandlers.map((handler) => DecoratorMetadata.materializeLegacyHandler(builder, handler)));
136
- }
137
- const DecoratorMetadata = Object.freeze({
103
+ const DecoratorValidation = Object.freeze({
138
104
  /**
139
- * Builds legacy schema-bearing metadata for one decorated Entity method.
140
- *
141
- * @typeParam Instance Entity receiver type.
142
- * @param builder Entity handler registration builder.
143
- * @param handler Decorated method record.
144
- * @returns Canonical handler metadata.
145
- */
146
- materializeLegacyHandler(builder, handler) {
147
- const methodName = handler.methodName;
148
- switch (handler.kind) {
149
- case "command-assignment":
150
- return builder.assign(DecoratorMetadata.schema(handler), methodName);
151
- case "command-substitution":
152
- throw new TypeError("Command substitutions require generated registry metadata with emitted schemas.");
153
- case "command-reaction":
154
- throw new TypeError("@Command handlers require generated registry metadata with emitted schemas.");
155
- case "event-subscription":
156
- return builder.subscribe(DecoratorMetadata.schema(handler), methodName);
157
- case "event-reaction":
158
- return builder.react(DecoratorMetadata.schema(handler), methodName);
159
- }
160
- },
161
- /**
162
- * Validates a public instance method and reads its string name.
105
+ * Validates a public instance method with a string name.
163
106
  *
164
107
  * @param context TypeScript decorator context identifying the method.
165
- * @returns The method name used in handler metadata.
166
108
  */
167
109
  methodName(context) {
168
110
  if (context.static || context.private) {
@@ -171,137 +113,19 @@ const DecoratorMetadata = Object.freeze({
171
113
  if (typeof context.name !== "string") {
172
114
  throw new TypeError("Spine handler decorators require string-named methods.");
173
115
  }
174
- return context.name;
175
- },
176
- /**
177
- * Applies a bare decorator or creates the internal schema-bearing form.
178
- *
179
- * @param kind Handler role recorded for the method.
180
- * @param schemaOrValue Decorated method, or schema for the internal form.
181
- * @param context Present when TypeScript invokes a bare decorator.
182
- * @returns The internal decorator, or undefined after bare decoration.
183
- */
184
- decorateOrCreate(kind, schemaOrValue, context) {
185
- if (context !== undefined) {
186
- DecoratorMetadata.create(kind)(schemaOrValue, context);
187
- return undefined;
188
- }
189
- return DecoratorMetadata.create(kind, schemaOrValue);
190
- },
191
- /**
192
- * Creates a decorator that appends immutable metadata for one method.
193
- *
194
- * @param kind Handler role recorded for the method.
195
- * @param schema Optional schema supplied by internal compatibility tooling.
196
- * @returns A standard TypeScript method decorator.
197
- */
198
- create(kind, schema) {
199
- return (_value, context) => {
200
- const methodName = DecoratorMetadata.methodName(context);
201
- const record = Object.freeze({
202
- kind,
203
- ...(schema === undefined ? {} : { schema }),
204
- methodName,
205
- });
206
- const metadata = DecoratorMetadata.require(context);
207
- const previous = DecoratorMetadata.read(metadata);
208
- Object.defineProperty(metadata, handlerDecoratorMetadataKey, {
209
- configurable: true,
210
- enumerable: false,
211
- value: Object.freeze([...previous, record]),
212
- writable: true,
213
- });
214
- };
215
- },
216
- /**
217
- * Reads a legacy declaration's schema, rejecting bare declarations.
218
- *
219
- * @param handler Decorator record being materialized.
220
- * @returns Its explicitly supplied message schema.
221
- */
222
- schema(handler) {
223
- if (handler.schema === undefined) {
224
- throw new TypeError(`Decorated handler "${handler.methodName}" was declared without a schema; ` +
225
- "use generated registry metadata or explicit EntityHandlers.define() registration.");
226
- }
227
- return handler.schema;
228
- },
229
- /**
230
- * Reads handler declarations for methods defined on this class prototype.
231
- *
232
- * @typeParam Instance Entity instance represented by the constructor.
233
- * @param entityType Constructor whose declared handlers are collected.
234
- * @returns A frozen list of matching decorator records.
235
- */
236
- collect(entityType) {
237
- const metadata = DecoratorMetadata.classMetadata(entityType);
238
- if (metadata === undefined) {
239
- return Object.freeze([]);
240
- }
241
- const records = DecoratorMetadata.read(metadata).filter((record) => {
242
- const descriptor = Object.getOwnPropertyDescriptor(entityType.prototype, record.methodName);
243
- return typeof descriptor?.value === "function";
244
- });
245
- return Object.freeze(records);
246
- },
247
- /**
248
- * Initializes Symbol.metadata when the runtime does not yet supply it.
249
- *
250
- * @returns The existing or newly installed decorator metadata symbol.
251
- */
252
- installSymbol() {
253
- const existingMetadata = Reflect.get(Symbol, "metadata");
254
- if (typeof existingMetadata === "symbol") {
255
- return existingMetadata;
256
- }
257
- const metadata = Symbol("Symbol.metadata");
258
- Object.defineProperty(Symbol, "metadata", {
259
- configurable: true,
260
- enumerable: false,
261
- value: metadata,
262
- writable: false,
263
- });
264
- return metadata;
265
- },
266
- /**
267
- * Reads TypeScript's class metadata object, rejecting missing support.
268
- *
269
- * @param context Decorator context with optional runtime metadata support.
270
- * @returns The writable class metadata object.
271
- */
272
- require(context) {
273
- if (context.metadata === undefined) {
274
- throw new TypeError("Spine handler decorators require standard decorator metadata support.");
275
- }
276
- return context.metadata;
277
- },
278
- /**
279
- * Reads metadata defined directly on the Entity constructor.
280
- *
281
- * @typeParam Instance Entity instance represented by the constructor.
282
- * @param entityType Constructor whose metadata is inspected.
283
- * @returns Its metadata object, or undefined when none is present.
284
- */
285
- classMetadata(entityType) {
286
- const descriptor = Object.getOwnPropertyDescriptor(entityType, decoratorMetadataSymbol);
287
- const metadata = descriptor?.value;
288
- if (metadata === null || typeof metadata !== "object") {
289
- return undefined;
290
- }
291
- return metadata;
292
116
  },
293
117
  /**
294
- * Reads Spine handler records without inheriting a parent metadata array.
118
+ * Validates one bare method decorator invocation.
295
119
  *
296
- * @param metadata Class metadata object to inspect.
297
- * @returns Stored handler records, or an empty list when absent.
120
+ * @param value Decorated method implementation.
121
+ * @param context Standard method decorator context.
298
122
  */
299
- read(metadata) {
300
- if (!Object.hasOwn(metadata, handlerDecoratorMetadataKey)) {
301
- return [];
123
+ method(value, context) {
124
+ const suppliedContext = context;
125
+ if (suppliedContext?.kind !== "method" || typeof value !== "function") {
126
+ throw new TypeError("Spine handler decorators require a standard method decorator context.");
302
127
  }
303
- const value = metadata[handlerDecoratorMetadataKey];
304
- return Array.isArray(value) ? value : [];
128
+ DecoratorValidation.methodName(context);
305
129
  },
306
130
  });
307
131
  const WhereValues = Object.freeze({
@@ -328,5 +152,4 @@ const WhereValues = Object.freeze({
328
152
  return Object.freeze({ eventField: options.eventField, equals: options.equals });
329
153
  },
330
154
  });
331
- const decoratorMetadataSymbol = DecoratorMetadata.installSymbol();
332
155
  //# sourceMappingURL=handler-decorators.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"handler-decorators.js","sourceRoot":"","sources":["../../src/handler/handler-decorators.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,OAAO,EACL,cAAc,GAQf,MAAM,uBAAuB,CAAC;AAgE/B,MAAM,2BAA2B,GAAG,MAAM,CAAC,8CAA8C,CAAC,CAAC;AAE3F;;;;;;;;;;GAUG;AACH,MAAM,UAAU,MAAM,CAAC,GAAG,YAA6C;IACrE,IAAI,YAAY,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC9B,MAAM,IAAI,SAAS,CAAC,gEAAgE,CAAC,CAAC;IACxF,CAAC;IACD,MAAM,OAAO,GAAG,YAAY,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,EAAE;QAC/C,MAAM,KAAK,GAAY,WAAW,CAAC;QACnC,MAAM,MAAM,GACV,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ;YACzC,CAAC,CAAE,KAAuC,CAAC,MAAM;YACjD,CAAC,CAAC,SAAS,CAAC;QAChB,IACE,MAAM,KAAK,IAAI;YACf,OAAO,MAAM,KAAK,QAAQ;YAC1B,OAAQ,MAA0C,CAAC,QAAQ,KAAK,QAAQ,EACxE,CAAC;YACD,MAAM,IAAI,SAAS,CAAC,wDAAwD,CAAC,CAAC;QAChF,CAAC;QACD,OAAO,MAAiC,CAAC;IAC3C,CAAC,CAAC,CAAC;IACH,MAAM,SAAS,GAAG,OAAO,CAAC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B,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;YACxE,MAAM,IAAI,SAAS,CAAC,kCAAkC,CAAC,CAAC;QAC1D,CAAC;QACD,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAChC,IACE,IAAI,CAAC,MAAM,KAAK,CAAC;YACjB,CAAC,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC;YAC5B,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC;YACxB,OAAO,OAAO,CAAC,UAAU,KAAK,QAAQ;YACtC,OAAO,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC;YACtC,OAAO,OAAO,CAAC,MAAM,KAAK,QAAQ,EAClC,CAAC;YACD,MAAM,IAAI,SAAS,CAAC,uEAAuE,CAAC,CAAC;QAC/F,CAAC;QACD,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,UAAU,EAAE,OAAO,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IACnF,CAAC;CACF,CAAC,CAAC"}
@@ -0,0 +1,99 @@
1
+ import type { Message } from "@bufbuild/protobuf";
2
+ import type { GenMessage } from "@bufbuild/protobuf/codegenv2";
3
+ import type { ProtoModule } from "@spine-event-engine/proto";
4
+ import { type GeneratedHandlerRegistry } from "./generated-handler-registry.js";
5
+ /**
6
+ * Passive model and handler descriptions emitted by one package.
7
+ */
8
+ export interface SpineMetadata extends GeneratedHandlerRegistry {
9
+ /**
10
+ * Local model module registered through the ordinary Proto inventory.
11
+ */
12
+ readonly protoModule?: ProtoModule;
13
+ /**
14
+ * Passive application query implementations declared in this package.
15
+ */
16
+ readonly appQueries?: readonly AppQueryDescription[];
17
+ /**
18
+ * Returns metadata from direct participating runtime dependencies.
19
+ *
20
+ * The accessor runs only when bootstrap registration traverses and validates the graph.
21
+ *
22
+ * @returns Direct passive metadata values for validation.
23
+ */
24
+ readonly dependencies?: () => readonly unknown[];
25
+ }
26
+ /**
27
+ * Exact implementation constructor and generated request/result schemas.
28
+ */
29
+ export interface AppQueryDescription {
30
+ /**
31
+ * Concrete handler class; registration does not construct it.
32
+ */
33
+ readonly handlerType: {
34
+ readonly name: string;
35
+ readonly prototype: object;
36
+ };
37
+ /**
38
+ * Generated request message name.
39
+ */
40
+ readonly queryTypeName: string;
41
+ /**
42
+ * Generated request schema.
43
+ */
44
+ readonly querySchema: GenMessage<Message>;
45
+ /**
46
+ * Generated result schema.
47
+ */
48
+ readonly responseSchema: GenMessage<Message>;
49
+ }
50
+ /**
51
+ * Runtime constructor identity used to index passive descriptions.
52
+ */
53
+ interface ReceiverConstructor {
54
+ readonly name: string;
55
+ readonly prototype: unknown;
56
+ }
57
+ /**
58
+ * Registers validated passive descriptions without selecting application handlers.
59
+ *
60
+ * @param metadata Generated package descriptions.
61
+ * @param moduleId Generated metadata module identifier for diagnostics.
62
+ */
63
+ export declare const SpineMetadataInventory: Readonly<{
64
+ /**
65
+ * Registers passive handler and query descriptions from one module.
66
+ */
67
+ register(metadata: SpineMetadata, moduleId: string): void;
68
+ /**
69
+ * Checks that one App Query description matches its generated pair.
70
+ */
71
+ validateQuery(query: AppQueryDescription): void;
72
+ /**
73
+ * Selects handlers registered for explicitly supplied constructors.
74
+ */
75
+ select(constructors: readonly ReceiverConstructor[]): GeneratedHandlerRegistry;
76
+ /**
77
+ * Selects App Query descriptions for explicitly supplied handler types.
78
+ */
79
+ selectQueries(constructors: readonly AppQueryDescription["handlerType"][]): readonly AppQueryDescription[];
80
+ }>;
81
+ /**
82
+ * Preserves compatibility with bootstraps emitted before grouped inventory registration.
83
+ */
84
+ export declare const registerSpineMetadata: typeof SpineMetadataInventory.register;
85
+ /**
86
+ * Preserves compatibility with direct inventory selection callers.
87
+ */
88
+ export declare const spineMetadataFor: typeof SpineMetadataInventory.select;
89
+ /**
90
+ * Test-facing reset for independent metadata assembly cases.
91
+ */
92
+ export declare const spineMetadataTestAccess: Readonly<{
93
+ /**
94
+ * Clears registrations between independent metadata tests.
95
+ */
96
+ clear(): void;
97
+ }>;
98
+ export {};
99
+ //# sourceMappingURL=spine-metadata-inventory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spine-metadata-inventory.d.ts","sourceRoot":"","sources":["../../src/handler/spine-metadata-inventory.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAG7D,OAAO,EAEL,KAAK,wBAAwB,EAE9B,MAAM,iCAAiC,CAAC;AAEzC;;GAEG;AACH,MAAM,WAAW,aAAc,SAAQ,wBAAwB;IAC7D;;OAEG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,WAAW,CAAC;IAEnC;;OAEG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,SAAS,mBAAmB,EAAE,CAAC;IAErD;;;;;;OAMG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,SAAS,OAAO,EAAE,CAAC;CAClD;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,QAAQ,CAAC,WAAW,EAAE;QAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC;IAE5E;;OAEG;IACH,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAE/B;;OAEG;IACH,QAAQ,CAAC,WAAW,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;IAE1C;;OAEG;IACH,QAAQ,CAAC,cAAc,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;CAC9C;AAUD;;GAEG;AACH,UAAU,mBAAmB;IAC3B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;CAC7B;AAyCD;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC;IAC5C;;OAEG;IACH,QAAQ,CAAC,QAAQ,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAE1D;;OAEG;IACH,aAAa,CAAC,KAAK,EAAE,mBAAmB,GAAG,IAAI,CAAC;IAEhD;;OAEG;IACH,MAAM,CAAC,YAAY,EAAE,SAAS,mBAAmB,EAAE,GAAG,wBAAwB,CAAC;IAE/E;;OAEG;IACH,aAAa,CACX,YAAY,EAAE,SAAS,mBAAmB,CAAC,aAAa,CAAC,EAAE,GAC1D,SAAS,mBAAmB,EAAE,CAAC;CACnC,CAsGC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,qBAAqB,EAAE,OAAO,sBAAsB,CAAC,QACjC,CAAC;AAElC;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,OAAO,sBAAsB,CAAC,MAAsC,CAAC;AAEpG;;GAEG;AACH,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC;IAC7C;;OAEG;IACH,KAAK,IAAI,IAAI,CAAC;CACf,CAQC,CAAC"}
@@ -0,0 +1,162 @@
1
+ /*
2
+ * Copyright 2026, CodeMatters. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5
+ * in compliance with the License. You may obtain a copy of the License at
6
+ *
7
+ * https://www.apache.org/licenses/LICENSE-2.0
8
+ *
9
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
10
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11
+ * or implied. See the License for the specific language governing permissions and limitations under
12
+ * the License.
13
+ */
14
+ import { AppQueryHandler } from "./app-query-handler.js";
15
+ import { HandlerRegistryIngestor, } from "./generated-handler-registry.js";
16
+ const receivers = new Map();
17
+ const queries = new Map();
18
+ const MetadataGraph = Object.freeze({
19
+ /**
20
+ * Collects and validates every passive metadata dependency before registration.
21
+ *
22
+ * @param root Root passive metadata value.
23
+ * @returns Validated metadata graph.
24
+ */
25
+ collect(root) {
26
+ const seen = new Set();
27
+ const pending = [root];
28
+ const collected = [];
29
+ while (pending.length > 0) {
30
+ const next = pending.pop();
31
+ if (typeof next !== "object" || next === null || Array.isArray(next))
32
+ throw new TypeError("Spine metadata dependency must be an object.");
33
+ const item = next;
34
+ if (seen.has(item))
35
+ continue;
36
+ seen.add(item);
37
+ collected.push(item);
38
+ const accessor = item.dependencies;
39
+ if (accessor !== undefined) {
40
+ if (typeof accessor !== "function")
41
+ throw new TypeError("Spine metadata dependencies must be an accessor.");
42
+ const dependencies = accessor();
43
+ if (!Array.isArray(dependencies))
44
+ throw new TypeError("Spine metadata dependencies must be an array.");
45
+ for (const dependency of dependencies)
46
+ pending.push(dependency);
47
+ }
48
+ }
49
+ return collected;
50
+ },
51
+ });
52
+ /**
53
+ * Registers validated passive descriptions without selecting application handlers.
54
+ *
55
+ * @param metadata Generated package descriptions.
56
+ * @param moduleId Generated metadata module identifier for diagnostics.
57
+ */
58
+ export const SpineMetadataInventory = Object.freeze({
59
+ /**
60
+ * Registers validated passive descriptions without selecting application handlers.
61
+ *
62
+ * @param metadata Generated package descriptions.
63
+ * @param moduleId Generated metadata module identifier for diagnostics.
64
+ */
65
+ register(metadata, moduleId) {
66
+ if (moduleId.trim().length === 0)
67
+ throw new TypeError("Spine metadata module ID is required.");
68
+ const collected = MetadataGraph.collect(metadata);
69
+ const stagedQueries = new Map();
70
+ const staged = new Map();
71
+ for (const item of collected) {
72
+ new HandlerRegistryIngestor().ingest(item);
73
+ for (const query of item.appQueries ?? []) {
74
+ SpineMetadataInventory.validateQuery(query);
75
+ const prior = stagedQueries.get(query.handlerType) ?? queries.get(query.handlerType)?.description;
76
+ if (prior !== undefined && prior !== query)
77
+ throw new Error(`Spine App Query metadata for ${query.handlerType.name} conflicts.`);
78
+ stagedQueries.set(query.handlerType, query);
79
+ }
80
+ for (const receiver of item.receivers) {
81
+ const constructor = receiver.receiverType;
82
+ const prior = staged.get(constructor) ?? receivers.get(constructor);
83
+ if (prior !== undefined && prior.receiver !== receiver)
84
+ throw new Error(`Spine metadata for ${constructor.name} conflicts between ${prior.moduleId} and ${moduleId}.`);
85
+ staged.set(constructor, { receiver, moduleId });
86
+ }
87
+ }
88
+ for (const [constructor, entry] of staged)
89
+ receivers.set(constructor, entry);
90
+ for (const [constructor, description] of stagedQueries)
91
+ queries.set(constructor, { description, moduleId });
92
+ },
93
+ /**
94
+ * Checks a passive query description before it enters process metadata.
95
+ *
96
+ * @param query Generated constructor and paired schema description.
97
+ */
98
+ validateQuery(query) {
99
+ const value = query;
100
+ if (value?.handlerType?.prototype === undefined ||
101
+ !(value.handlerType.prototype instanceof AppQueryHandler))
102
+ throw new TypeError("App Query metadata requires a concrete AppQueryHandler class.");
103
+ if (value.querySchema?.kind !== "message" ||
104
+ value.querySchema.typeName !== value.queryTypeName ||
105
+ !value.queryTypeName?.endsWith(".Query"))
106
+ throw new TypeError("App Query metadata requires its generated Query schema.");
107
+ const expected = `${value.queryTypeName.slice(0, -".Query".length)}.Response`;
108
+ if (value.responseSchema?.kind !== "message" || value.responseSchema.typeName !== expected)
109
+ throw new TypeError("App Query metadata requires its paired Response schema.");
110
+ },
111
+ /**
112
+ * Selects passive descriptions by exact constructor identity.
113
+ *
114
+ * @param constructors Entity and standalone constructors selected by an application.
115
+ * @returns Only descriptions for selected classes.
116
+ */
117
+ select(constructors) {
118
+ const selected = constructors.map((constructor) => {
119
+ const entry = receivers.get(constructor);
120
+ if (entry === undefined)
121
+ throw new Error(`Generated metadata for ${constructor.name} is missing. Generate and import the ` +
122
+ `package's spine-bootstrap.js before BoundedContext assembly.`);
123
+ return entry.receiver;
124
+ });
125
+ return Object.freeze({ receivers: Object.freeze(selected) });
126
+ },
127
+ /**
128
+ * Selects passive query descriptions by exact implementation constructor.
129
+ *
130
+ * @param constructors Application-supplied handler classes.
131
+ * @returns Only matching descriptions in caller order.
132
+ */
133
+ selectQueries(constructors) {
134
+ return Object.freeze(constructors.map((constructor) => {
135
+ const query = queries.get(constructor);
136
+ if (query === undefined)
137
+ throw new Error(`Generated App Query metadata for ${constructor.name} is missing.`);
138
+ return query.description;
139
+ }));
140
+ },
141
+ });
142
+ /**
143
+ * Preserves compatibility with bootstraps emitted before grouped inventory registration.
144
+ */
145
+ export const registerSpineMetadata = SpineMetadataInventory.register;
146
+ /**
147
+ * Preserves compatibility with direct inventory selection callers.
148
+ */
149
+ export const spineMetadataFor = SpineMetadataInventory.select;
150
+ /**
151
+ * Test-facing reset for independent metadata assembly cases.
152
+ */
153
+ export const spineMetadataTestAccess = Object.freeze({
154
+ /**
155
+ * Clears process-local descriptions between isolated tests.
156
+ */
157
+ clear() {
158
+ receivers.clear();
159
+ queries.clear();
160
+ },
161
+ });
162
+ //# sourceMappingURL=spine-metadata-inventory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spine-metadata-inventory.js","sourceRoot":"","sources":["../../src/handler/spine-metadata-inventory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAKH,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAEzD,OAAO,EACL,uBAAuB,GAGxB,MAAM,iCAAiC,CAAC;AAmEzC,MAAM,SAAS,GAAG,IAAI,GAAG,EAA2C,CAAC;AACrE,MAAM,OAAO,GAAG,IAAI,GAAG,EAGpB,CAAC;AAEJ,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,CAAC;IAClC;;;;;OAKG;IACH,OAAO,CAAC,IAAa;QACnB,MAAM,IAAI,GAAG,IAAI,GAAG,EAAiB,CAAC;QACtC,MAAM,OAAO,GAAc,CAAC,IAAI,CAAC,CAAC;QAClC,MAAM,SAAS,GAAoB,EAAE,CAAC;QACtC,OAAO,OAAO,CAAC,M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AC,CAAC;YACzC,IAAI,KAAK,KAAK,SAAS;gBACrB,MAAM,IAAI,KAAK,CACb,0BAA0B,WAAW,CAAC,IAAI,uCAAuC;oBAC/E,8DAA8D,CACjE,CAAC;YACJ,OAAO,KAAK,CAAC,QAAQ,CAAC;QACxB,CAAC,CAAC,CAAC;QACH,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IAC/D,CAAC;IAED;;;;;OAKG;IACH,aAAa,CACX,YAA2D;QAE3D,OAAO,MAAM,CAAC,MAAM,CAClB,YAAY,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,EAAE;YAC/B,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;YACvC,IAAI,KAAK,KAAK,SAAS;gBACrB,MAAM,IAAI,KAAK,CAAC,oCAAoC,WAAW,CAAC,IAAI,cAAc,CAAC,CAAC;YACtF,OAAO,KAAK,CAAC,WAAW,CAAC;QAC3B,CAAC,CAAC,CACH,CAAC;IACJ,CAAC;CACF,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAChC,sBAAsB,CAAC,QAAQ,CAAC;AAElC;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAyC,sBAAsB,CAAC,MAAM,CAAC;AAEpG;;GAEG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAK/B,MAAM,CAAC,MAAM,CAAC;IACjB;;OAEG;IACH,KAAK;QACH,SAAS,CAAC,KAAK,EAAE,CAAC;QAClB,OAAO,CAAC,KAAK,EAAE,CAAC;IAClB,CAAC;CACF,CAAC,CAAC"}
package/dist/index.d.ts CHANGED
@@ -2,14 +2,16 @@ export { BoundedContext, BoundedContextBuilder, type BoundedContextBuildOptions,
2
2
  export { ThirdPartyContext } from "./integration/third-party-context.js";
3
3
  export type { TenantIndex, TenantIndexCursor, TenantIndexPage, TenantIndexRead, TenantIndexSignal, } from "./context/tenant-index.js";
4
4
  export { TenantUnknownError } from "./context/tenant-unknown-error.js";
5
- export { Stand, type StandOptions, type StandReadOptions, type StandReadResult, type StandRegisterOptions, type StandSubscribeOptions, type StandSubscription, StandStateTypeError, type StandUpdate, type StandUpdateOptions, } from "./stand/stand.js";
5
+ export { Stand, type StandOptions, type StandReadOptions, type StandReadResult, type StandRegisterOptions, type StandSubscribeOptions, type StandSubscription, type StandObserver, StandSubscriptionCapacityError, StandStateTypeError, type StandUpdate, type StandUpdateOptions, } from "./stand/stand.js";
6
6
  export { InMemorySubscriptionRegistry, StorageSubscriptionRegistry, StandConflictError, type StandActivateResult, type StandCleanupResult, type StandCreateResult, type StandDeleteResult, type StandSubscriptionEntry, type StandSubscriptionRegistry, } from "./stand/subscription-registry.js";
7
7
  export { SpineServices, type SpineServicesOptions } from "./services/spine-services.js";
8
- export { Server, type ListenerLifecycle, type RunningServer, type ServerOptions, } from "./server/server.js";
8
+ export { Server, type ListenerLifecycle, type RunningServer, type ServerOptions, type ServerQueryExecutionContext, } from "./server/server.js";
9
9
  export { ManagedServerApplication, type ManagedServerApplicationHandle, type ManagedServerApplicationOptions, type ManagedServerRestartOptions, } from "./server/managed-server-application.js";
10
10
  export { Environment, EnvironmentType } from "./server/environment.js";
11
11
  export { ServerEnvironment, type ServerEnvironmentCloseable, type ServerEnvironmentDelivery, type ServerEnvironmentSettings, } from "./server/server-environment.js";
12
12
  export { CommandBus } from "./bus/command-bus.js";
13
+ export { AppQueryHandler, type AppQueryContext } from "./handler/app-query-handler.js";
14
+ export { ReadSideFilter, type ReadSideContext, type ReadSideField, type ReadSideOperation, } from "./stand/read-side-filter.js";
13
15
  export type { CommandDispatcher } from "./bus/command-dispatcher.js";
14
16
  export { EventBus } from "./bus/event-bus.js";
15
17
  export type { EventDispatcher } from "./bus/event-dispatcher.js";
@@ -39,7 +41,7 @@ export type { InterfaceRouteMessage } from "./repository/routing-declarations.js
39
41
  export { EventRouting, type EventRoute } from "./repository/event-routing.js";
40
42
  export { StateUpdateRouting, type StateUpdateRoute } from "./repository/state-update-routing.js";
41
43
  export { type AgentHistoryReader, type AgentReadScope, type ConcreteRepositoryEntityType, Repository, type RepositoryCommandRoute, type RepositoryEntityType, type RepositoryEntityId, type RepositoryEventRoute, RepositoryIdentityError, type RepositoryIdentityErrorCode, type RepositoryIdentitySnapshot, type RepositoryOptions, type RepositoryReadQueries, type RepositoryRouteInvocation, type RepositoryStateSchema, type RepositoryView, } from "./repository/repository.js";
42
- export { Assign, Command, type HandlerMethodDecorator, type HandlerMethodValue, React, Subscribe, Throws, Where, type RejectionDeclaration, type WhereOptions, materializeDecoratedEntityHandlers, } from "./handler/handler-decorators.js";
44
+ export { Assign, Command, type HandlerMethodDecorator, type HandlerMethodValue, React, Subscribe, Throws, Where, type RejectionDeclaration, type WhereOptions, } from "./handler/handler-decorators.js";
43
45
  export type { External } from "./handler/external.js";
44
46
  export { AbstractAssignee, AbstractCommander, AbstractEventReactor, AbstractEventSubscriber, } from "./handler/standalone.js";
45
47
  export { GeneratedRegistryDiscovery, GeneratedRegistryDiscoveryError, type GeneratedRegistryDiscoveryOptions, type RegistryDiscoveryErrorCode, } from "./handler/generated-registry-discovery.js";