arvo-event-handler 3.0.22 → 3.0.23

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.
@@ -31,6 +31,13 @@ export declare const ArvoDomain: {
31
31
  * and carry it forward through event emissions.
32
32
  */
33
33
  readonly FROM_TRIGGERING_EVENT: "domain.event.inherit";
34
+ /**
35
+ * Keep the event in the current execution context (null domain).
36
+ *
37
+ * Use this when the event should remain local to the current domain without
38
+ * crossing execution boundaries through the exchange layer.
39
+ */
40
+ readonly LOCAL: null;
34
41
  };
35
42
  /**
36
43
  * Resolves a symbolic or static domain value into a concrete domain string or `null`.
@@ -33,6 +33,13 @@ exports.ArvoDomain = {
33
33
  * and carry it forward through event emissions.
34
34
  */
35
35
  FROM_TRIGGERING_EVENT: 'domain.event.inherit',
36
+ /**
37
+ * Keep the event in the current execution context (null domain).
38
+ *
39
+ * Use this when the event should remain local to the current domain without
40
+ * crossing execution boundaries through the exchange layer.
41
+ */
42
+ LOCAL: null
36
43
  };
37
44
  /**
38
45
  * Resolves a symbolic or static domain value into a concrete domain string or `null`.
@@ -220,7 +220,7 @@ var ArvoEventHandler = /** @class */ (function () {
220
220
  eventContract: handlerContract_1,
221
221
  triggeringEvent: event,
222
222
  });
223
- })) !== null && _s !== void 0 ? _s : [null];
223
+ })) !== null && _s !== void 0 ? _s : [event.domain];
224
224
  for (_d = 0, _e = Array.from(new Set(domains)); _d < _e.length; _d++) {
225
225
  _dom = _e[_d];
226
226
  result.push((0, arvo_core_1.createArvoEventFactory)(handlerContract_1).emits(__assign(__assign({}, handlerResult), { traceparent: otelSpanHeaders.traceparent || undefined, tracestate: otelSpanHeaders.tracestate || undefined, source: this.source, subject: event.subject,
@@ -152,7 +152,7 @@ var processRawEventsIntoEmittables = function (params, span) {
152
152
  var emittables = [];
153
153
  for (var _i = 0, _b = params.rawEvents; _i < _b.length; _i++) {
154
154
  var item = _b[_i];
155
- for (var _c = 0, _d = Array.from(new Set((_a = item.domain) !== null && _a !== void 0 ? _a : [null])); _c < _d.length; _c++) {
155
+ for (var _c = 0, _d = Array.from(new Set((_a = item.domain) !== null && _a !== void 0 ? _a : [ArvoDomain_1.ArvoDomain.LOCAL])); _c < _d.length; _c++) {
156
156
  var _dom = _d[_c];
157
157
  var evt = (0, exports.createEmittableEvent)({
158
158
  event: item,
@@ -54,6 +54,7 @@ var createEmitableEvent_1 = require("../ArvoOrchestrationUtils/createEmitableEve
54
54
  var orchestrationExecutionWrapper_1 = require("../ArvoOrchestrationUtils/orchestrationExecutionWrapper");
55
55
  var SyncEventResource_1 = require("../SyncEventResource");
56
56
  var errors_1 = require("../errors");
57
+ var ArvoDomain_1 = require("../ArvoDomain");
57
58
  /**
58
59
  * Orchestrates state machine execution and lifecycle management.
59
60
  *
@@ -181,7 +182,7 @@ var ArvoOrchestrator = /** @class */ (function () {
181
182
  to: (_e = (_d = parsedEventSubject.meta) === null || _d === void 0 ? void 0 : _d.redirectto) !== null && _e !== void 0 ? _e : parsedEventSubject.execution.initiator,
182
183
  domain: orchestrationParentSubject
183
184
  ? [arvo_core_1.ArvoOrchestrationSubject.parse(orchestrationParentSubject).execution.domain]
184
- : [null],
185
+ : [ArvoDomain_1.ArvoDomain.LOCAL],
185
186
  executionunits: executionResult.finalOutput.__executionunits,
186
187
  });
187
188
  }
@@ -55,6 +55,7 @@ var inputValidation_1 = require("../ArvoOrchestrationUtils/inputValidation");
55
55
  var orchestrationExecutionWrapper_1 = require("../ArvoOrchestrationUtils/orchestrationExecutionWrapper");
56
56
  var index_1 = require("../SyncEventResource/index");
57
57
  var errors_1 = require("../errors");
58
+ var ArvoDomain_1 = require("../ArvoDomain");
58
59
  /**
59
60
  * ArvoResumable complements {@link ArvoOrchestrator} by providing imperative
60
61
  * handler functions for orchestration logic instead of declarative state machines.
@@ -240,7 +241,7 @@ var ArvoResumable = /** @class */ (function () {
240
241
  to: (_q = (_p = parsedEventSubject.meta) === null || _p === void 0 ? void 0 : _p.redirectto) !== null && _q !== void 0 ? _q : parsedEventSubject.execution.initiator,
241
242
  domain: orchestrationParentSubject
242
243
  ? [arvo_core_1.ArvoOrchestrationSubject.parse(orchestrationParentSubject).execution.domain]
243
- : [null],
244
+ : [ArvoDomain_1.ArvoDomain.LOCAL],
244
245
  executionunits: executionResult.output.__executionunits,
245
246
  });
246
247
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arvo-event-handler",
3
- "version": "3.0.22",
3
+ "version": "3.0.23",
4
4
  "description": "A complete set of orthogonal event handler and orchestration primitives for Arvo based applications, featuring declarative state machines (XState), imperative resumables for agentic workflows, contract-based routing, OpenTelemetry observability, and in-memory event broker for building composable event-driven architectures.",
5
5
  "main": "dist/index.js",
6
6
  "repository": {
@@ -65,7 +65,7 @@
65
65
  "dependencies": {
66
66
  "@opentelemetry/api": "1.9.0",
67
67
  "@opentelemetry/core": "1.30.1",
68
- "arvo-core": "3.0.22",
68
+ "arvo-core": "3.0.23",
69
69
  "uuid": "11.1.0",
70
70
  "xstate": "5.24.0",
71
71
  "zod": "3.25.74",