arvo-core 1.1.14 → 1.1.16

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -64,3 +64,7 @@
64
64
 
65
65
  - Added Arvo Orchestrator Contract primitive
66
66
 
67
+ ## [1.1.16] - 2024-10-21
68
+
69
+ - Added mandatory parent chaining in orchestration events so the process chaining and orchestration chaining can be traced
70
+
@@ -34,8 +34,12 @@ var utils_1 = require("../utils");
34
34
  * });
35
35
  */
36
36
  var createArvoContract = function (contract) {
37
- var createErrorMessage = function (source, type) { return (0, utils_1.cleanString)("\n In contract (uri=".concat(contract.uri, "), the '").concat(source, "' event (type=").concat(type, ") must not start \n with '").concat(typegen_1.ArvoOrchestratorEventTypeGen.__prefix, "' becuase this a reserved pattern \n for Arvo orchestrators.\n ")); };
38
- var validator = function (value) { return value.startsWith(typegen_1.ArvoOrchestratorEventTypeGen.__prefix); };
37
+ var createErrorMessage = function (source, type) {
38
+ return (0, utils_1.cleanString)("\n In contract (uri=".concat(contract.uri, "), the '").concat(source, "' event (type=").concat(type, ") must not start \n with '").concat(typegen_1.ArvoOrchestratorEventTypeGen.__prefix, "' becuase this a reserved pattern \n for Arvo orchestrators.\n "));
39
+ };
40
+ var validator = function (value) {
41
+ return value.startsWith(typegen_1.ArvoOrchestratorEventTypeGen.__prefix);
42
+ };
39
43
  if (validator(contract.accepts.type)) {
40
44
  throw new Error(createErrorMessage('accepts', contract.accepts.type));
41
45
  }
@@ -48,8 +48,9 @@ var uuid_1 = require("uuid");
48
48
  var createArvoEvent = function (event, extensions) {
49
49
  var span = OpenTelemetry_1.ArvoCoreTracer.startSpan("createArvoEvent<".concat(event.type, ">"), {});
50
50
  return api_1.context.with(api_1.trace.setSpan(api_1.context.active(), span), function () {
51
- var _a, _b, _c, _d, _e, _f, _g, _h;
51
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
52
52
  span.setStatus({ code: api_1.SpanStatusCode.OK });
53
+ var otelHeaders = (0, OpenTelemetry_1.currentOpenTelemetryHeaders)();
53
54
  try {
54
55
  if (event.datacontenttype &&
55
56
  event.datacontenttype !== schema_1.ArvoDataContentType) {
@@ -64,11 +65,11 @@ var createArvoEvent = function (event, extensions) {
64
65
  type: event.type,
65
66
  accesscontrol: (_b = event.accesscontrol) !== null && _b !== void 0 ? _b : null,
66
67
  executionunits: (_c = event.executionunits) !== null && _c !== void 0 ? _c : null,
67
- traceparent: (_d = event.traceparent) !== null && _d !== void 0 ? _d : null,
68
- tracestate: (_e = event.tracestate) !== null && _e !== void 0 ? _e : null,
69
- datacontenttype: (_f = event.datacontenttype) !== null && _f !== void 0 ? _f : schema_1.ArvoDataContentType,
70
- specversion: (_g = event.specversion) !== null && _g !== void 0 ? _g : '1.0',
71
- time: (_h = event.time) !== null && _h !== void 0 ? _h : (0, utils_1.createTimestamp)(),
68
+ traceparent: (_e = (_d = event.traceparent) !== null && _d !== void 0 ? _d : otelHeaders.traceparent) !== null && _e !== void 0 ? _e : null,
69
+ tracestate: (_g = (_f = event.tracestate) !== null && _f !== void 0 ? _f : otelHeaders.tracestate) !== null && _g !== void 0 ? _g : null,
70
+ datacontenttype: (_h = event.datacontenttype) !== null && _h !== void 0 ? _h : schema_1.ArvoDataContentType,
71
+ specversion: (_j = event.specversion) !== null && _j !== void 0 ? _j : '1.0',
72
+ time: (_k = event.time) !== null && _k !== void 0 ? _k : (0, utils_1.createTimestamp)(),
72
73
  source: encodeURI(event.source),
73
74
  subject: encodeURI(event.subject),
74
75
  to: event.to ? encodeURI(event.to) : encodeURI(event.type),
@@ -56,13 +56,15 @@ var ArvoEventFactory = /** @class */ (function () {
56
56
  var _this = this;
57
57
  var span = OpenTelemetry_1.ArvoCoreTracer.startSpan("ArvoEventFactory<".concat(this.contract.uri, ">.accepts<").concat(this.contract.accepts.type, ">.create"));
58
58
  return api_1.context.with(api_1.trace.setSpan(api_1.context.active(), span), function () {
59
+ var _a, _b, _c, _d;
59
60
  span.setStatus({ code: api_1.SpanStatusCode.OK });
61
+ var otelHeaders = (0, OpenTelemetry_1.currentOpenTelemetryHeaders)();
60
62
  try {
61
63
  var validationResult = _this.contract.validateAccepts(_this.contract.accepts.type, event.data);
62
64
  if (!validationResult.success) {
63
65
  throw new Error("Accept Event data validation failed: ".concat(validationResult.error.message));
64
66
  }
65
- return (0, helpers_1.createArvoEvent)(__assign(__assign({}, event), { type: _this.contract.accepts.type, datacontenttype: schema_1.ArvoDataContentType, dataschema: _this.contract.uri, data: validationResult.data }), extensions);
67
+ return (0, helpers_1.createArvoEvent)(__assign(__assign({}, event), { traceparent: (_b = (_a = event.traceparent) !== null && _a !== void 0 ? _a : otelHeaders.traceparent) !== null && _b !== void 0 ? _b : undefined, tracestate: (_d = (_c = event.tracestate) !== null && _c !== void 0 ? _c : otelHeaders.tracestate) !== null && _d !== void 0 ? _d : undefined, type: _this.contract.accepts.type, datacontenttype: schema_1.ArvoDataContentType, dataschema: _this.contract.uri, data: validationResult.data }), extensions);
66
68
  }
67
69
  catch (error) {
68
70
  (0, OpenTelemetry_1.exceptionToSpan)(error);
@@ -91,13 +93,15 @@ var ArvoEventFactory = /** @class */ (function () {
91
93
  var _this = this;
92
94
  var span = OpenTelemetry_1.ArvoCoreTracer.startSpan("ArvoEventFactory<".concat(this.contract.uri, ">.emits<").concat(event.type, ">.create"));
93
95
  return api_1.context.with(api_1.trace.setSpan(api_1.context.active(), span), function () {
96
+ var _a, _b, _c, _d;
94
97
  span.setStatus({ code: api_1.SpanStatusCode.OK });
98
+ var otelHeaders = (0, OpenTelemetry_1.currentOpenTelemetryHeaders)();
95
99
  try {
96
100
  var validationResult = _this.contract.validateEmits(event.type, event.data);
97
101
  if (!validationResult.success) {
98
102
  throw new Error("Emit Event data validation failed: ".concat(validationResult.error.message));
99
103
  }
100
- return (0, helpers_1.createArvoEvent)(__assign(__assign({}, event), { datacontenttype: schema_1.ArvoDataContentType, dataschema: _this.contract.uri, data: validationResult.data }), extensions);
104
+ return (0, helpers_1.createArvoEvent)(__assign(__assign({}, event), { traceparent: (_b = (_a = event.traceparent) !== null && _a !== void 0 ? _a : otelHeaders.traceparent) !== null && _b !== void 0 ? _b : undefined, tracestate: (_d = (_c = event.tracestate) !== null && _c !== void 0 ? _c : otelHeaders.tracestate) !== null && _d !== void 0 ? _d : undefined, datacontenttype: schema_1.ArvoDataContentType, dataschema: _this.contract.uri, data: validationResult.data }), extensions);
101
105
  }
102
106
  catch (error) {
103
107
  (0, OpenTelemetry_1.exceptionToSpan)(error);
@@ -124,14 +128,15 @@ var ArvoEventFactory = /** @class */ (function () {
124
128
  var _this = this;
125
129
  var span = OpenTelemetry_1.ArvoCoreTracer.startSpan("ArvoEventFactory<".concat(this.contract.uri, ">.systemError<sys.").concat(this.contract.accepts.type, ".error>.create"));
126
130
  return api_1.context.with(api_1.trace.setSpan(api_1.context.active(), span), function () {
127
- var _a;
131
+ var _a, _b, _c, _d, _e;
128
132
  span.setStatus({ code: api_1.SpanStatusCode.OK });
133
+ var otelHeaders = (0, OpenTelemetry_1.currentOpenTelemetryHeaders)();
129
134
  try {
130
135
  var error = event.error, _event = __rest(event, ["error"]);
131
- return (0, helpers_1.createArvoEvent)(__assign(__assign({}, _event), { type: "sys.".concat(_this.contract.accepts.type, ".error"), data: {
136
+ return (0, helpers_1.createArvoEvent)(__assign(__assign({}, _event), { traceparent: (_b = (_a = event.traceparent) !== null && _a !== void 0 ? _a : otelHeaders.traceparent) !== null && _b !== void 0 ? _b : undefined, tracestate: (_d = (_c = event.tracestate) !== null && _c !== void 0 ? _c : otelHeaders.tracestate) !== null && _d !== void 0 ? _d : undefined, type: "sys.".concat(_this.contract.accepts.type, ".error"), data: {
132
137
  errorName: error.name,
133
138
  errorMessage: error.message,
134
- errorStack: (_a = error.stack) !== null && _a !== void 0 ? _a : null,
139
+ errorStack: (_e = error.stack) !== null && _e !== void 0 ? _e : null,
135
140
  }, datacontenttype: schema_1.ArvoDataContentType, dataschema: _this.contract.uri }), extensions);
136
141
  }
137
142
  catch (error) {
@@ -1,6 +1,6 @@
1
- import { z } from "zod";
2
- import { ICreateArvoOrchestratorContract } from "./types";
3
- import ArvoOrchestratorContract from ".";
1
+ import { z } from 'zod';
2
+ import { ICreateArvoOrchestratorContract } from './types';
3
+ import ArvoOrchestratorContract from '.';
4
4
  /**
5
5
  * Creates an ArvoOrchestratorContract with specified parameters.
6
6
  *
@@ -10,22 +10,58 @@ import ArvoOrchestratorContract from ".";
10
10
  *
11
11
  * Key features:
12
12
  * 1. Initialization: Defines the structure and validation for the initial event that starts the orchestration.
13
+ * The init schema is automatically intersected with OrchestrationInitEventBaseSchema.
13
14
  * 2. Completion: Specifies the event type and data emitted when the orchestration process concludes.
14
15
  * 3. Type Safety: Utilizes TypeScript generics to ensure type consistency across the contract definition.
15
16
  * 4. Runtime Validation: Employs Zod schemas for robust runtime type checking and data validation.
16
17
  *
18
+ * Base Schema:
19
+ * The OrchestrationInitEventBaseSchema is automatically intersected with the user-provided init schema.
20
+ * This base schema includes essential fields for orchestration, such as:
21
+ * - parentSubject$$: Identifies the subject of the parent process or event in the ArvoEvent system.
22
+ *
17
23
  * This contract serves as a crucial component in maintaining consistency and type safety
18
24
  * throughout the orchestration process, from initiation to completion.
19
25
  *
20
26
  * @param param - The configuration object for creating the contract.
21
27
  * @param param.uri - The URI for the contract.
22
- * @param param.name - The name of the contract (must be alphanumeric).
28
+ * @param param.name - The name of the contract (must be lowercase alphanumeric with dots).
23
29
  * @param param.schema - The schema object containing init and complete Zod schemas.
24
- * @param param.schema.init - The Zod schema for initialization.
30
+ * @param param.schema.init - The Zod schema for initialization (will be intersected with OrchestrationInitEventBaseSchema).
25
31
  * @param param.schema.complete - The Zod schema for completion.
26
32
  *
27
- * @throws {Error} Throws an error if the name is not alphanumeric.
33
+ * @throws {Error} Throws an error if the name is not lowercase alphanumeric with dots.
28
34
  *
29
35
  * @returns Returns a new ArvoOrchestratorContract instance with the specified parameters.
36
+ *
37
+ * @example
38
+ * ```typescript
39
+ * import { createArvoOrchestratorContract } from 'arvo-core'
40
+ * import { z } from 'zod'
41
+ *
42
+ * const contract = createArvoOrchestratorContract({
43
+ * uri: '#/example/contract',
44
+ * name: 'rag.orchestrator',
45
+ * schema: {
46
+ * init: z.object({
47
+ * request: z.string(),
48
+ * vectorStore: z.string(),
49
+ * llm: z.string()
50
+ * }),
51
+ * complete: z.object({
52
+ * response: z.string()
53
+ * })
54
+ * }
55
+ * })
56
+ * ```
57
+ *
58
+ * In this example, the actual init schema will be an intersection of the provided schema
59
+ * and the OrchestrationInitEventBaseSchema, ensuring all necessary fields are included.
30
60
  */
31
- export declare const createArvoOrchestratorContract: <TUri extends string, TName extends string, TInit extends z.ZodTypeAny, TComplete extends z.ZodTypeAny>(param: ICreateArvoOrchestratorContract<TUri, TName, TInit, TComplete>) => ArvoOrchestratorContract<TUri, `arvo.orc.${TName}`, TInit, `arvo.orc.${TName}.done`, TComplete>;
61
+ export declare const createArvoOrchestratorContract: <TUri extends string, TName extends string, TInit extends z.ZodTypeAny, TComplete extends z.ZodTypeAny>(param: ICreateArvoOrchestratorContract<TUri, TName, TInit, TComplete>) => ArvoOrchestratorContract<TUri, `arvo.orc.${TName}`, z.ZodIntersection<z.ZodObject<{
62
+ parentSubject$$: z.ZodNullable<z.ZodString>;
63
+ }, "strip", z.ZodTypeAny, {
64
+ parentSubject$$: string | null;
65
+ }, {
66
+ parentSubject$$: string | null;
67
+ }>, TInit>, `arvo.orc.${TName}.done`, TComplete>;
@@ -4,8 +4,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.createArvoOrchestratorContract = void 0;
7
+ var zod_1 = require("zod");
7
8
  var _1 = __importDefault(require("."));
8
9
  var typegen_1 = require("./typegen");
10
+ var schema_1 = require("./schema");
9
11
  /**
10
12
  * Validates if a string contains only uppercase or lowercase alphanumeric characters.
11
13
  *
@@ -32,23 +34,53 @@ function isLowerAlphanumeric(input) {
32
34
  *
33
35
  * Key features:
34
36
  * 1. Initialization: Defines the structure and validation for the initial event that starts the orchestration.
37
+ * The init schema is automatically intersected with OrchestrationInitEventBaseSchema.
35
38
  * 2. Completion: Specifies the event type and data emitted when the orchestration process concludes.
36
39
  * 3. Type Safety: Utilizes TypeScript generics to ensure type consistency across the contract definition.
37
40
  * 4. Runtime Validation: Employs Zod schemas for robust runtime type checking and data validation.
38
41
  *
42
+ * Base Schema:
43
+ * The OrchestrationInitEventBaseSchema is automatically intersected with the user-provided init schema.
44
+ * This base schema includes essential fields for orchestration, such as:
45
+ * - parentSubject$$: Identifies the subject of the parent process or event in the ArvoEvent system.
46
+ *
39
47
  * This contract serves as a crucial component in maintaining consistency and type safety
40
48
  * throughout the orchestration process, from initiation to completion.
41
49
  *
42
50
  * @param param - The configuration object for creating the contract.
43
51
  * @param param.uri - The URI for the contract.
44
- * @param param.name - The name of the contract (must be alphanumeric).
52
+ * @param param.name - The name of the contract (must be lowercase alphanumeric with dots).
45
53
  * @param param.schema - The schema object containing init and complete Zod schemas.
46
- * @param param.schema.init - The Zod schema for initialization.
54
+ * @param param.schema.init - The Zod schema for initialization (will be intersected with OrchestrationInitEventBaseSchema).
47
55
  * @param param.schema.complete - The Zod schema for completion.
48
56
  *
49
- * @throws {Error} Throws an error if the name is not alphanumeric.
57
+ * @throws {Error} Throws an error if the name is not lowercase alphanumeric with dots.
50
58
  *
51
59
  * @returns Returns a new ArvoOrchestratorContract instance with the specified parameters.
60
+ *
61
+ * @example
62
+ * ```typescript
63
+ * import { createArvoOrchestratorContract } from 'arvo-core'
64
+ * import { z } from 'zod'
65
+ *
66
+ * const contract = createArvoOrchestratorContract({
67
+ * uri: '#/example/contract',
68
+ * name: 'rag.orchestrator',
69
+ * schema: {
70
+ * init: z.object({
71
+ * request: z.string(),
72
+ * vectorStore: z.string(),
73
+ * llm: z.string()
74
+ * }),
75
+ * complete: z.object({
76
+ * response: z.string()
77
+ * })
78
+ * }
79
+ * })
80
+ * ```
81
+ *
82
+ * In this example, the actual init schema will be an intersection of the provided schema
83
+ * and the OrchestrationInitEventBaseSchema, ensuring all necessary fields are included.
52
84
  */
53
85
  var createArvoOrchestratorContract = function (param) {
54
86
  if (!isLowerAlphanumeric(param.name)) {
@@ -58,12 +90,12 @@ var createArvoOrchestratorContract = function (param) {
58
90
  uri: param.uri,
59
91
  init: {
60
92
  type: typegen_1.ArvoOrchestratorEventTypeGen.init(param.name),
61
- schema: param.schema.init,
93
+ schema: zod_1.z.intersection(schema_1.OrchestrationInitEventBaseSchema, param.schema.init),
62
94
  },
63
95
  complete: {
64
96
  type: typegen_1.ArvoOrchestratorEventTypeGen.complete(param.name),
65
97
  schema: param.schema.complete,
66
- }
98
+ },
67
99
  });
68
100
  };
69
101
  exports.createArvoOrchestratorContract = createArvoOrchestratorContract;
@@ -0,0 +1,13 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Defines the base schema for orchestrator acceptance in the context of ArvoEvents.
4
+ * This schema is used to validate and type-check the minimal required fields
5
+ * for an orchestrator to accept a task or event.
6
+ */
7
+ export declare const OrchestrationInitEventBaseSchema: z.ZodObject<{
8
+ parentSubject$$: z.ZodNullable<z.ZodString>;
9
+ }, "strip", z.ZodTypeAny, {
10
+ parentSubject$$: string | null;
11
+ }, {
12
+ parentSubject$$: string | null;
13
+ }>;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.OrchestrationInitEventBaseSchema = void 0;
4
+ var zod_1 = require("zod");
5
+ var utils_1 = require("../utils");
6
+ /**
7
+ * Defines the base schema for orchestrator acceptance in the context of ArvoEvents.
8
+ * This schema is used to validate and type-check the minimal required fields
9
+ * for an orchestrator to accept a task or event.
10
+ */
11
+ exports.OrchestrationInitEventBaseSchema = zod_1.z
12
+ .object({
13
+ parentSubject$$: zod_1.z
14
+ .string()
15
+ .min(1, 'The parent subject must not be an empty string')
16
+ .nullable()
17
+ .describe((0, utils_1.cleanString)("\n Identifies the subject of the parent process or event in the ArvoEvent system.\n \n Purpose:\n 1. Enables the orchestrator to return its final output to the initiating process or orchestrator.\n 2. Maintains the event chain and process hierarchy in a distributed system.\n 3. Facilitates proper event routing and traceability.\n \n Usage:\n - For non-root processes: Set to the subject of the parent process/orchestrator.\n - For root processes/orchestrations: Must be set to null.\n \n This field aligns with the ArvoEvent 'subject' field, which is a URI identifying the event's subject.\n It plays a crucial role in distributed tracing, debugging, and maintaining system coherence.\n \n Example:\n - Parent process subject: \"process/parent-id-123\"\n - Child process parentSubject$$: \"process/parent-id-123\"\n \n Note: Ensure this value is a valid URI as per ArvoEvent specifications.\n ")),
18
+ });
@@ -3,7 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ArvoOrchestratorEventTypeGen = void 0;
4
4
  exports.ArvoOrchestratorEventTypeGen = {
5
5
  __prefix: "arvo.orc",
6
- init: function (name) { return "".concat(exports.ArvoOrchestratorEventTypeGen.__prefix, ".").concat(name); },
7
- complete: function (name) { return "".concat(exports.ArvoOrchestratorEventTypeGen.init(name), ".done"); },
8
- systemError: function (name) { return "sys.".concat(exports.ArvoOrchestratorEventTypeGen.init(name), ".error"); }
6
+ init: function (name) {
7
+ return "".concat(exports.ArvoOrchestratorEventTypeGen.__prefix, ".").concat(name);
8
+ },
9
+ complete: function (name) {
10
+ return "".concat(exports.ArvoOrchestratorEventTypeGen.init(name), ".done");
11
+ },
12
+ systemError: function (name) {
13
+ return "sys.".concat(exports.ArvoOrchestratorEventTypeGen.init(name), ".error");
14
+ },
9
15
  };
package/dist/index.d.ts CHANGED
@@ -35,6 +35,7 @@ import { ArvoOrchestratorEventTypeGen } from './ArvoOrchestratorContract/typegen
35
35
  * @property {z.ZodRecord} ArvoDataSchema - Schema for Arvo event data payload.
36
36
  * @property {z.ZodObject} ArvoExtensionSchema - Schema for Arvo-specific CloudEvent extensions.
37
37
  * @property {z.ZodObject} OpenTelemetryExtensionSchema - Schema for OpenTelemetry extensions.
38
+ * @property {z.ZodObject} OrchestrationInitEventBaseSchema - The base schema for the orchestrator init events.
38
39
  */
39
40
  declare const ArvoEventSchemas: {
40
41
  CloudEventContextSchema: import("zod").ZodObject<{
@@ -93,5 +94,12 @@ declare const ArvoEventSchemas: {
93
94
  traceparent: string | null;
94
95
  tracestate: string | null;
95
96
  }>;
97
+ OrchestrationInitEventBaseSchema: import("zod").ZodObject<{
98
+ parentSubject$$: import("zod").ZodNullable<import("zod").ZodString>;
99
+ }, "strip", import("zod").ZodTypeAny, {
100
+ parentSubject$$: string | null;
101
+ }, {
102
+ parentSubject$$: string | null;
103
+ }>;
96
104
  };
97
- export { ArvoEventHttpConfig, ArvoEventHttp, ArvoEvent, createArvoEvent, ArvoDataContentType, ArvoEventData, CloudEventExtension, ArvoEventSchemas, CloudEventContext, ArvoExtension, OpenTelemetryExtension, CreateArvoEvent, exceptionToSpan, logToSpan, OpenTelemetryHeaders, TelemetryLogLevel, OTelNull, validateURI, cleanString, ArvoContract, createArvoContract, ArvoContractValidators, ArvoContractRecord, IArvoContract, ResolveArvoContractRecord, ArvoContractLibrary, createArvoContractLibrary, ArvoEventFactory, createArvoEventFactory, ArvoErrorSchema, currentOpenTelemetryHeaders, OpenInference, OpenInferenceSpanKind, ArvoExecution, ArvoExecutionSpanKind, ArvoContractJSONSchema, ArvoOrchestrationSubject, ArvoOrchestrationSubjectContentSchema, ArvoOrchestratorVersionSchema, ArvoOrchestrationSubjectContent, ArvoOrchestratorVersion, InferArvoEvent, InferArvoContract, InferArvoContractType, createArvoOrchestratorContract, ArvoOrchestratorContract, ICreateArvoOrchestratorContract, IArvoOrchestratorContract, InferArvoOrchestratorContract, ArvoOrchestratorEventTypeGen };
105
+ export { ArvoEventHttpConfig, ArvoEventHttp, ArvoEvent, createArvoEvent, ArvoDataContentType, ArvoEventData, CloudEventExtension, ArvoEventSchemas, CloudEventContext, ArvoExtension, OpenTelemetryExtension, CreateArvoEvent, exceptionToSpan, logToSpan, OpenTelemetryHeaders, TelemetryLogLevel, OTelNull, validateURI, cleanString, ArvoContract, createArvoContract, ArvoContractValidators, ArvoContractRecord, IArvoContract, ResolveArvoContractRecord, ArvoContractLibrary, createArvoContractLibrary, ArvoEventFactory, createArvoEventFactory, ArvoErrorSchema, currentOpenTelemetryHeaders, OpenInference, OpenInferenceSpanKind, ArvoExecution, ArvoExecutionSpanKind, ArvoContractJSONSchema, ArvoOrchestrationSubject, ArvoOrchestrationSubjectContentSchema, ArvoOrchestratorVersionSchema, ArvoOrchestrationSubjectContent, ArvoOrchestratorVersion, InferArvoEvent, InferArvoContract, InferArvoContractType, createArvoOrchestratorContract, ArvoOrchestratorContract, ICreateArvoOrchestratorContract, IArvoOrchestratorContract, InferArvoOrchestratorContract, ArvoOrchestratorEventTypeGen, };
package/dist/index.js CHANGED
@@ -55,6 +55,7 @@ var ArvoOrchestratorContract_1 = __importDefault(require("./ArvoOrchestratorCont
55
55
  exports.ArvoOrchestratorContract = ArvoOrchestratorContract_1.default;
56
56
  var typegen_1 = require("./ArvoOrchestratorContract/typegen");
57
57
  Object.defineProperty(exports, "ArvoOrchestratorEventTypeGen", { enumerable: true, get: function () { return typegen_1.ArvoOrchestratorEventTypeGen; } });
58
+ var schema_4 = require("./ArvoOrchestratorContract/schema");
58
59
  /**
59
60
  * Collection of Zod schemas for validating various aspects of Arvo events.
60
61
  * @property {z.ZodObject} CloudEventContextSchema - Schema for core CloudEvent properties.
@@ -62,6 +63,7 @@ Object.defineProperty(exports, "ArvoOrchestratorEventTypeGen", { enumerable: tru
62
63
  * @property {z.ZodRecord} ArvoDataSchema - Schema for Arvo event data payload.
63
64
  * @property {z.ZodObject} ArvoExtensionSchema - Schema for Arvo-specific CloudEvent extensions.
64
65
  * @property {z.ZodObject} OpenTelemetryExtensionSchema - Schema for OpenTelemetry extensions.
66
+ * @property {z.ZodObject} OrchestrationInitEventBaseSchema - The base schema for the orchestrator init events.
65
67
  */
66
68
  var ArvoEventSchemas = {
67
69
  CloudEventContextSchema: schema_1.CloudEventContextSchema,
@@ -69,5 +71,6 @@ var ArvoEventSchemas = {
69
71
  ArvoDataSchema: schema_1.ArvoDataSchema,
70
72
  ArvoExtensionSchema: schema_1.ArvoExtensionSchema,
71
73
  OpenTelemetryExtensionSchema: schema_1.OpenTelemetryExtensionSchema,
74
+ OrchestrationInitEventBaseSchema: schema_4.OrchestrationInitEventBaseSchema,
72
75
  };
73
76
  exports.ArvoEventSchemas = ArvoEventSchemas;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arvo-core",
3
- "version": "1.1.14",
3
+ "version": "1.1.16",
4
4
  "description": "This core package contains all the core classes and components of the Arvo Event Driven System",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {