@codemation/core 0.8.1 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +74 -0
- package/dist/{EngineRuntimeRegistration.types-BP6tsaNP.d.ts → EngineRuntimeRegistration.types-kxQA5NLt.d.ts} +2 -2
- package/dist/{EngineWorkflowRunnerService-DzOCa1BW.d.cts → EngineWorkflowRunnerService-Ba2AvBnL.d.cts} +2 -2
- package/dist/{InMemoryRunDataFactory-1iz7_SnO.d.cts → InMemoryRunDataFactory-Ou4tQUOS.d.cts} +2 -2
- package/dist/{RunIntentService-S-1lW-gS.d.cts → RunIntentService-Dyh_dH0k.d.cts} +528 -467
- package/dist/{RunIntentService-BqhmdoA1.d.ts → RunIntentService-dteLjNiT.d.ts} +568 -462
- package/dist/bootstrap/index.cjs +2 -2
- package/dist/bootstrap/index.d.cts +3 -3
- package/dist/bootstrap/index.d.ts +3 -3
- package/dist/bootstrap/index.js +2 -2
- package/dist/{bootstrap-BoknFKnw.js → bootstrap-CL68rqWg.js} +3 -2
- package/dist/bootstrap-CL68rqWg.js.map +1 -0
- package/dist/{bootstrap-Bx1u4cbS.cjs → bootstrap-Cko6udwL.cjs} +3 -2
- package/dist/bootstrap-Cko6udwL.cjs.map +1 -0
- package/dist/{index-CVs9rVhl.d.ts → index-CyfGTfU1.d.ts} +84 -14
- package/dist/index.cjs +10 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +129 -14
- package/dist/index.d.ts +3 -3
- package/dist/index.js +2 -11
- package/dist/index.js.map +1 -1
- package/dist/{runtime-DUW6tIJ1.js → runtime-284ok0cm.js} +201 -31
- package/dist/runtime-284ok0cm.js.map +1 -0
- package/dist/{runtime-Dvo2ru5A.cjs → runtime-B3Og-_St.cjs} +223 -29
- package/dist/runtime-B3Og-_St.cjs.map +1 -0
- package/dist/testing.cjs +2 -2
- package/dist/testing.d.cts +2 -2
- package/dist/testing.d.ts +2 -2
- package/dist/testing.js +2 -2
- package/package.json +1 -1
- package/src/ai/AiHost.ts +42 -14
- package/src/bootstrap/runtime/EngineRuntimeRegistrar.ts +4 -0
- package/src/browser.ts +1 -0
- package/src/contracts/CodemationTelemetryAttributeNames.ts +6 -0
- package/src/contracts/NoOpNodeExecutionTelemetry.ts +2 -11
- package/src/contracts/NoOpTelemetrySpanScope.ts +46 -10
- package/src/contracts/executionPersistenceContracts.ts +30 -0
- package/src/contracts/runTypes.ts +10 -0
- package/src/contracts/runtimeTypes.ts +8 -0
- package/src/contracts/telemetryTypes.ts +8 -0
- package/src/contracts/workflowTypes.ts +6 -0
- package/src/events/ConnectionInvocationEventPublisher.ts +46 -0
- package/src/events/index.ts +1 -0
- package/src/events/runEvents.ts +25 -0
- package/src/execution/ChildExecutionScopeFactory.ts +58 -0
- package/src/execution/ExecutionTelemetryCostTrackingDecoratorFactory.ts +18 -0
- package/src/execution/NodeExecutor.ts +10 -2
- package/src/execution/NodeRunStateWriter.ts +7 -0
- package/src/execution/NodeRunStateWriterFactory.ts +7 -0
- package/src/execution/index.ts +1 -0
- package/src/index.ts +1 -0
- package/src/orchestration/RunStartService.ts +8 -1
- package/src/runtime/EngineFactory.ts +1 -0
- package/src/workflow/definition/NodeIterationIdFactory.ts +26 -0
- package/src/workflow/index.ts +1 -0
- package/dist/bootstrap-BoknFKnw.js.map +0 -1
- package/dist/bootstrap-Bx1u4cbS.cjs.map +0 -1
- package/dist/runtime-DUW6tIJ1.js.map +0 -1
- package/dist/runtime-Dvo2ru5A.cjs.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "reflect-metadata";
|
|
2
2
|
import { container as container$1, delay, inject, injectAll, injectable, instanceCachingFactory, instancePerContainerCachingFactory, predicateAwareClassFactory, registry, singleton } from "tsyringe";
|
|
3
3
|
import { ZodError, z } from "zod";
|
|
4
|
-
import { createHash } from "node:crypto";
|
|
4
|
+
import { createHash, randomUUID } from "node:crypto";
|
|
5
5
|
import { ReadableStream } from "node:stream/web";
|
|
6
6
|
|
|
7
7
|
//#region src/di/CoreTokens.ts
|
|
@@ -255,6 +255,29 @@ var ConnectionNodeIdFactory = class {
|
|
|
255
255
|
}
|
|
256
256
|
};
|
|
257
257
|
|
|
258
|
+
//#endregion
|
|
259
|
+
//#region src/workflow/definition/NodeIterationIdFactory.ts
|
|
260
|
+
/**
|
|
261
|
+
* Unique ids for one per-item iteration of a runnable node's execute loop.
|
|
262
|
+
*
|
|
263
|
+
* Activations are per-batch (one scheduled execution of a node, possibly with N items).
|
|
264
|
+
* Iterations refine that to one identifier per item-index inside the batch loop, so per-item
|
|
265
|
+
* connection invocations and telemetry can be grouped without time-window heuristics.
|
|
266
|
+
*/
|
|
267
|
+
var NodeIterationIdFactory = class {
|
|
268
|
+
static create() {
|
|
269
|
+
return `iter_${randomUUID()}`;
|
|
270
|
+
}
|
|
271
|
+
/** Deterministic id for tests when a stable sequence is needed. */
|
|
272
|
+
static createForTest(seed, sequence) {
|
|
273
|
+
return `iter_${seed}_${sequence}`;
|
|
274
|
+
}
|
|
275
|
+
/** Deterministic id derived from a connection node id (for sub-agent / tool-call scopes). */
|
|
276
|
+
static createForConnection(connectionNodeId, sequence) {
|
|
277
|
+
return `iter_${connectionNodeId}_${sequence}`;
|
|
278
|
+
}
|
|
279
|
+
};
|
|
280
|
+
|
|
258
281
|
//#endregion
|
|
259
282
|
//#region src/workflow/definition/WorkflowExecutableNodeClassifier.ts
|
|
260
283
|
/**
|
|
@@ -315,6 +338,40 @@ var WorkflowExecutableNodeClassifierFactory = class {
|
|
|
315
338
|
}
|
|
316
339
|
};
|
|
317
340
|
|
|
341
|
+
//#endregion
|
|
342
|
+
//#region src/events/ConnectionInvocationEventPublisher.ts
|
|
343
|
+
/**
|
|
344
|
+
* Publishes per-invocation lifecycle records onto the run {@link RunEventBus}.
|
|
345
|
+
*
|
|
346
|
+
* Surgical, per-invocation events let the UI update the right-side inspector
|
|
347
|
+
* timeline as each LLM round / tool call transitions through `running` → `completed`
|
|
348
|
+
* (or `failed`) without depending on a coarse `runSaved` poll.
|
|
349
|
+
*/
|
|
350
|
+
var ConnectionInvocationEventPublisher = class {
|
|
351
|
+
constructor(eventBus, parent) {
|
|
352
|
+
this.eventBus = eventBus;
|
|
353
|
+
this.parent = parent;
|
|
354
|
+
}
|
|
355
|
+
async publish(record) {
|
|
356
|
+
if (!this.eventBus) return;
|
|
357
|
+
const kind = this.kindFor(record);
|
|
358
|
+
if (!kind) return;
|
|
359
|
+
await this.eventBus.publish({
|
|
360
|
+
kind,
|
|
361
|
+
runId: record.runId,
|
|
362
|
+
workflowId: record.workflowId,
|
|
363
|
+
parent: this.parent,
|
|
364
|
+
at: record.updatedAt,
|
|
365
|
+
record
|
|
366
|
+
});
|
|
367
|
+
}
|
|
368
|
+
kindFor(record) {
|
|
369
|
+
if (record.status === "running" || record.status === "queued") return "connectionInvocationStarted";
|
|
370
|
+
if (record.status === "completed") return "connectionInvocationCompleted";
|
|
371
|
+
if (record.status === "failed") return "connectionInvocationFailed";
|
|
372
|
+
}
|
|
373
|
+
};
|
|
374
|
+
|
|
318
375
|
//#endregion
|
|
319
376
|
//#region src/events/NodeEventPublisher.ts
|
|
320
377
|
/** Publishes node lifecycle snapshots onto the run {@link RunEventBus}. */
|
|
@@ -335,6 +392,15 @@ var NodeEventPublisher = class {
|
|
|
335
392
|
}
|
|
336
393
|
};
|
|
337
394
|
|
|
395
|
+
//#endregion
|
|
396
|
+
//#region \0@oxc-project+runtime@0.95.0/helpers/decorate.js
|
|
397
|
+
function __decorate(decorators, target, key, desc) {
|
|
398
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
399
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
400
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
401
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
402
|
+
}
|
|
403
|
+
|
|
338
404
|
//#endregion
|
|
339
405
|
//#region src/binaries/DefaultNodeBinaryAttachmentServiceFactory.ts
|
|
340
406
|
var DefaultNodeBinaryAttachmentService = class DefaultNodeBinaryAttachmentService {
|
|
@@ -633,6 +699,54 @@ var ActivationEnqueueService = class {
|
|
|
633
699
|
}
|
|
634
700
|
};
|
|
635
701
|
|
|
702
|
+
//#endregion
|
|
703
|
+
//#region \0@oxc-project+runtime@0.95.0/helpers/decorateMetadata.js
|
|
704
|
+
function __decorateMetadata(k, v) {
|
|
705
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
706
|
+
}
|
|
707
|
+
|
|
708
|
+
//#endregion
|
|
709
|
+
//#region \0@oxc-project+runtime@0.95.0/helpers/decorateParam.js
|
|
710
|
+
function __decorateParam(paramIndex, decorator) {
|
|
711
|
+
return function(target, key) {
|
|
712
|
+
decorator(target, key, paramIndex);
|
|
713
|
+
};
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
//#endregion
|
|
717
|
+
//#region src/execution/ChildExecutionScopeFactory.ts
|
|
718
|
+
let ChildExecutionScopeFactory = class ChildExecutionScopeFactory$1 {
|
|
719
|
+
constructor(activationIdFactory) {
|
|
720
|
+
this.activationIdFactory = activationIdFactory;
|
|
721
|
+
}
|
|
722
|
+
forSubAgent(args) {
|
|
723
|
+
const childActivationId = this.activationIdFactory.makeActivationId();
|
|
724
|
+
const childTelemetry = args.parentSpan.asNodeTelemetry({
|
|
725
|
+
nodeId: args.childNodeId,
|
|
726
|
+
activationId: childActivationId
|
|
727
|
+
});
|
|
728
|
+
const childBinary = args.parentCtx.binary.forNode({
|
|
729
|
+
nodeId: args.childNodeId,
|
|
730
|
+
activationId: childActivationId
|
|
731
|
+
});
|
|
732
|
+
return {
|
|
733
|
+
...args.parentCtx,
|
|
734
|
+
nodeId: args.childNodeId,
|
|
735
|
+
activationId: childActivationId,
|
|
736
|
+
config: args.childConfig,
|
|
737
|
+
telemetry: childTelemetry,
|
|
738
|
+
binary: childBinary,
|
|
739
|
+
parentInvocationId: args.parentInvocationId,
|
|
740
|
+
iterationId: void 0
|
|
741
|
+
};
|
|
742
|
+
}
|
|
743
|
+
};
|
|
744
|
+
ChildExecutionScopeFactory = __decorate([
|
|
745
|
+
injectable(),
|
|
746
|
+
__decorateParam(0, inject(CoreTokens.ActivationIdFactory)),
|
|
747
|
+
__decorateMetadata("design:paramtypes", [Object])
|
|
748
|
+
], ChildExecutionScopeFactory);
|
|
749
|
+
|
|
636
750
|
//#endregion
|
|
637
751
|
//#region src/contracts/itemMeta.ts
|
|
638
752
|
/**
|
|
@@ -933,31 +1047,54 @@ var NoOpTelemetryArtifactReference = class {
|
|
|
933
1047
|
|
|
934
1048
|
//#endregion
|
|
935
1049
|
//#region src/contracts/NoOpTelemetrySpanScope.ts
|
|
1050
|
+
/**
|
|
1051
|
+
* Standalone no-op {@link NodeExecutionTelemetry} value used as the return for `asNodeTelemetry`.
|
|
1052
|
+
*
|
|
1053
|
+
* Defined here (instead of in `NoOpNodeExecutionTelemetry.ts`) so that {@link NoOpTelemetrySpanScope}
|
|
1054
|
+
* can return it without importing the other module — both no-ops share this leaf.
|
|
1055
|
+
*/
|
|
1056
|
+
const noOpNodeExecutionTelemetry = {
|
|
1057
|
+
traceId: "00000000000000000000000000000000",
|
|
1058
|
+
spanId: "0000000000000000",
|
|
1059
|
+
addSpanEvent(_) {},
|
|
1060
|
+
recordMetric(_) {},
|
|
1061
|
+
attachArtifact(_) {
|
|
1062
|
+
return NoOpTelemetryArtifactReference.value;
|
|
1063
|
+
},
|
|
1064
|
+
end(_ = {}) {},
|
|
1065
|
+
asNodeTelemetry(_) {
|
|
1066
|
+
return noOpNodeExecutionTelemetry;
|
|
1067
|
+
},
|
|
1068
|
+
forNode(_) {
|
|
1069
|
+
return noOpNodeExecutionTelemetry;
|
|
1070
|
+
},
|
|
1071
|
+
startChildSpan(_) {
|
|
1072
|
+
return noOpTelemetrySpanScope;
|
|
1073
|
+
}
|
|
1074
|
+
};
|
|
1075
|
+
const noOpTelemetrySpanScope = {
|
|
1076
|
+
traceId: "00000000000000000000000000000000",
|
|
1077
|
+
spanId: "0000000000000000",
|
|
1078
|
+
addSpanEvent(_) {},
|
|
1079
|
+
recordMetric(_) {},
|
|
1080
|
+
attachArtifact(_) {
|
|
1081
|
+
return NoOpTelemetryArtifactReference.value;
|
|
1082
|
+
},
|
|
1083
|
+
end(_ = {}) {},
|
|
1084
|
+
asNodeTelemetry(_) {
|
|
1085
|
+
return noOpNodeExecutionTelemetry;
|
|
1086
|
+
}
|
|
1087
|
+
};
|
|
936
1088
|
var NoOpTelemetrySpanScope = class {
|
|
937
|
-
static value =
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
addSpanEvent(_) {},
|
|
941
|
-
recordMetric(_) {},
|
|
942
|
-
attachArtifact(_) {
|
|
943
|
-
return NoOpTelemetryArtifactReference.value;
|
|
944
|
-
},
|
|
945
|
-
end(_ = {}) {}
|
|
946
|
-
};
|
|
1089
|
+
static value = noOpTelemetrySpanScope;
|
|
1090
|
+
/** Internal: the shared no-op {@link NodeExecutionTelemetry} that {@link NoOpNodeExecutionTelemetry} re-exposes. */
|
|
1091
|
+
static nodeExecutionTelemetryValue = noOpNodeExecutionTelemetry;
|
|
947
1092
|
};
|
|
948
1093
|
|
|
949
1094
|
//#endregion
|
|
950
1095
|
//#region src/contracts/NoOpNodeExecutionTelemetry.ts
|
|
951
|
-
var NoOpNodeExecutionTelemetry = class
|
|
952
|
-
static value =
|
|
953
|
-
...NoOpTelemetrySpanScope.value,
|
|
954
|
-
forNode(_) {
|
|
955
|
-
return NoOpNodeExecutionTelemetry.value;
|
|
956
|
-
},
|
|
957
|
-
startChildSpan(_) {
|
|
958
|
-
return NoOpTelemetrySpanScope.value;
|
|
959
|
-
}
|
|
960
|
-
};
|
|
1096
|
+
var NoOpNodeExecutionTelemetry = class {
|
|
1097
|
+
static value = NoOpTelemetrySpanScope.nodeExecutionTelemetryValue;
|
|
961
1098
|
};
|
|
962
1099
|
|
|
963
1100
|
//#endregion
|
|
@@ -998,6 +1135,12 @@ var CodemationTelemetryAttributeNames = class {
|
|
|
998
1135
|
static connectionInvocationId = "codemation.connection.invocation_id";
|
|
999
1136
|
static toolName = "codemation.tool.name";
|
|
1000
1137
|
static traceParentRunId = "codemation.parent.run.id";
|
|
1138
|
+
/** Per-item iteration that emitted this span/metric. Set on spans recorded inside a runnable per-item loop. */
|
|
1139
|
+
static iterationId = "codemation.iteration.id";
|
|
1140
|
+
/** Item index (0-based) of the iteration. */
|
|
1141
|
+
static iterationIndex = "codemation.iteration.index";
|
|
1142
|
+
/** Set when this span/metric was recorded under a sub-agent triggered by an outer LLM/tool call. */
|
|
1143
|
+
static parentInvocationId = "codemation.parent.invocation_id";
|
|
1001
1144
|
};
|
|
1002
1145
|
|
|
1003
1146
|
//#endregion
|
|
@@ -1091,6 +1234,13 @@ var ExecutionTelemetryCostTrackingDecoratorFactory = class {
|
|
|
1091
1234
|
telemetry: nodeTelemetry,
|
|
1092
1235
|
costTracking: args.costTracking.forScope(nodeTelemetry)
|
|
1093
1236
|
});
|
|
1237
|
+
},
|
|
1238
|
+
asNodeTelemetry: (rescope) => {
|
|
1239
|
+
const nodeTelemetry = args.telemetry.asNodeTelemetry(rescope);
|
|
1240
|
+
return this.decorateNodeExecutionTelemetry({
|
|
1241
|
+
telemetry: nodeTelemetry,
|
|
1242
|
+
costTracking: args.costTracking.forScope(nodeTelemetry)
|
|
1243
|
+
});
|
|
1094
1244
|
}
|
|
1095
1245
|
};
|
|
1096
1246
|
}
|
|
@@ -1102,7 +1252,14 @@ var ExecutionTelemetryCostTrackingDecoratorFactory = class {
|
|
|
1102
1252
|
addSpanEvent: (event) => args.scope.addSpanEvent(event),
|
|
1103
1253
|
recordMetric: (metric) => args.scope.recordMetric(metric),
|
|
1104
1254
|
attachArtifact: (artifact) => args.scope.attachArtifact(artifact),
|
|
1105
|
-
end: (endArgs) => args.scope.end(endArgs)
|
|
1255
|
+
end: (endArgs) => args.scope.end(endArgs),
|
|
1256
|
+
asNodeTelemetry: (rescope) => {
|
|
1257
|
+
const nodeTelemetry = args.scope.asNodeTelemetry(rescope);
|
|
1258
|
+
return this.decorateNodeExecutionTelemetry({
|
|
1259
|
+
telemetry: nodeTelemetry,
|
|
1260
|
+
costTracking: args.costTracking.forScope(nodeTelemetry)
|
|
1261
|
+
});
|
|
1262
|
+
}
|
|
1106
1263
|
};
|
|
1107
1264
|
}
|
|
1108
1265
|
};
|
|
@@ -1573,13 +1730,17 @@ var NodeExecutor = class {
|
|
|
1573
1730
|
const parsed = inputSchema.parse(item.json);
|
|
1574
1731
|
const runnableCtx = request.ctx;
|
|
1575
1732
|
const resolvedCtx = await this.itemExprResolver.resolveConfigForItem(runnableCtx, item, i, inputBatch);
|
|
1576
|
-
const
|
|
1733
|
+
const iterationCtx = {
|
|
1734
|
+
...this.pickExecutionContext(runnableCtx, resolvedCtx),
|
|
1735
|
+
iterationId: NodeIterationIdFactory.create(),
|
|
1736
|
+
itemIndex: i
|
|
1737
|
+
};
|
|
1577
1738
|
const args = {
|
|
1578
1739
|
input: parsed,
|
|
1579
1740
|
item,
|
|
1580
1741
|
itemIndex: i,
|
|
1581
1742
|
items: inputBatch,
|
|
1582
|
-
ctx
|
|
1743
|
+
ctx: iterationCtx
|
|
1583
1744
|
};
|
|
1584
1745
|
const raw = await Promise.resolve(node$1.execute(args));
|
|
1585
1746
|
const normalized = this.outputNormalizer.normalizeExecuteResult({
|
|
@@ -1998,12 +2159,13 @@ var NodeInstanceFactoryFactory = class {
|
|
|
1998
2159
|
//#region src/execution/NodeRunStateWriter.ts
|
|
1999
2160
|
var NodeRunStateWriter = class {
|
|
2000
2161
|
chain = Promise.resolve();
|
|
2001
|
-
constructor(workflowExecutionRepository, runId, workflowId, parent, publishNodeEvent) {
|
|
2162
|
+
constructor(workflowExecutionRepository, runId, workflowId, parent, publishNodeEvent, publishConnectionInvocationEvent) {
|
|
2002
2163
|
this.workflowExecutionRepository = workflowExecutionRepository;
|
|
2003
2164
|
this.runId = runId;
|
|
2004
2165
|
this.workflowId = workflowId;
|
|
2005
2166
|
this.parent = parent;
|
|
2006
2167
|
this.publishNodeEvent = publishNodeEvent;
|
|
2168
|
+
this.publishConnectionInvocationEvent = publishConnectionInvocationEvent;
|
|
2007
2169
|
}
|
|
2008
2170
|
markQueued(args) {
|
|
2009
2171
|
return this.enqueue(async () => {
|
|
@@ -2100,12 +2262,16 @@ var NodeRunStateWriter = class {
|
|
|
2100
2262
|
queuedAt: args.queuedAt,
|
|
2101
2263
|
startedAt: args.startedAt,
|
|
2102
2264
|
finishedAt: args.finishedAt,
|
|
2103
|
-
updatedAt
|
|
2265
|
+
updatedAt,
|
|
2266
|
+
iterationId: args.iterationId,
|
|
2267
|
+
itemIndex: args.itemIndex,
|
|
2268
|
+
parentInvocationId: args.parentInvocationId
|
|
2104
2269
|
};
|
|
2105
2270
|
await this.workflowExecutionRepository.save({
|
|
2106
2271
|
...state,
|
|
2107
2272
|
connectionInvocations: [...state.connectionInvocations ?? [], record]
|
|
2108
2273
|
});
|
|
2274
|
+
if (this.publishConnectionInvocationEvent) await this.publishConnectionInvocationEvent(record);
|
|
2109
2275
|
});
|
|
2110
2276
|
}
|
|
2111
2277
|
enqueue(work) {
|
|
@@ -2132,13 +2298,17 @@ var NodeRunStateWriter = class {
|
|
|
2132
2298
|
//#endregion
|
|
2133
2299
|
//#region src/execution/NodeRunStateWriterFactory.ts
|
|
2134
2300
|
var NodeRunStateWriterFactory = class {
|
|
2135
|
-
constructor(workflowExecutionRepository, nodeEventPublisher) {
|
|
2301
|
+
constructor(workflowExecutionRepository, nodeEventPublisher, eventBus) {
|
|
2136
2302
|
this.workflowExecutionRepository = workflowExecutionRepository;
|
|
2137
2303
|
this.nodeEventPublisher = nodeEventPublisher;
|
|
2304
|
+
this.eventBus = eventBus;
|
|
2138
2305
|
}
|
|
2139
2306
|
create(runId, workflowId, parent) {
|
|
2307
|
+
const connectionInvocationEventPublisher = new ConnectionInvocationEventPublisher(this.eventBus, parent);
|
|
2140
2308
|
return new NodeRunStateWriter(this.workflowExecutionRepository, runId, workflowId, parent, async (kind, snapshot) => {
|
|
2141
2309
|
await this.nodeEventPublisher.publish(kind, snapshot);
|
|
2310
|
+
}, async (record) => {
|
|
2311
|
+
await connectionInvocationEventPublisher.publish(record);
|
|
2142
2312
|
});
|
|
2143
2313
|
}
|
|
2144
2314
|
};
|
|
@@ -3599,7 +3769,7 @@ var RunStartService = class {
|
|
|
3599
3769
|
return {
|
|
3600
3770
|
outputsByNode: { ...currentState?.outputsByNode ?? {} },
|
|
3601
3771
|
nodeSnapshotsByNodeId: { ...currentState?.nodeSnapshotsByNodeId ?? {} },
|
|
3602
|
-
connectionInvocations:
|
|
3772
|
+
connectionInvocations: [],
|
|
3603
3773
|
mutableState: mutableState ?? currentState?.mutableState
|
|
3604
3774
|
};
|
|
3605
3775
|
}
|
|
@@ -4959,7 +5129,7 @@ var EngineFactory = class {
|
|
|
4959
5129
|
const waiters = new EngineWaiters();
|
|
4960
5130
|
const credentialResolverFactory = new CredentialResolverFactory(deps.credentialSessions);
|
|
4961
5131
|
const nodeEventPublisher = new NodeEventPublisher(deps.eventBus);
|
|
4962
|
-
const nodeStatePublisherFactory = new NodeRunStateWriterFactory(deps.workflowExecutionRepository, nodeEventPublisher);
|
|
5132
|
+
const nodeStatePublisherFactory = new NodeRunStateWriterFactory(deps.workflowExecutionRepository, nodeEventPublisher, deps.eventBus);
|
|
4963
5133
|
const planningFactory = new EngineWorkflowPlanningFactory(deps.workflowNodeInstanceFactory);
|
|
4964
5134
|
const executionLimitsPolicy = deps.executionLimitsPolicy ?? new EngineExecutionLimitsPolicy();
|
|
4965
5135
|
const workflowSnapshotCodec = deps.workflowSnapshotCodec ?? new WorkflowSnapshotCodec(deps.tokenRegistry);
|
|
@@ -5270,5 +5440,5 @@ var WorkflowRepositoryWebhookTriggerMatcherFactory = class {
|
|
|
5270
5440
|
};
|
|
5271
5441
|
|
|
5272
5442
|
//#endregion
|
|
5273
|
-
export { CostTrackingTelemetryMetricNames as $, NodeExecutor as A,
|
|
5274
|
-
//# sourceMappingURL=runtime-
|
|
5443
|
+
export { CostTrackingTelemetryMetricNames as $, NodeExecutor as A, StackTraceCallSitePathResolver as At, nodeRef as B, registry as Bt, StaticCostCatalog as C, resolveItemExprsInUnknown as Ct, PersistedWorkflowTokenRegistry as D, tool as Dt, WorkflowSnapshotCodec as E, node as Et, InProcessRetryRunner as F, injectAll as Ft, NoOpExecutionTelemetryFactory as G, CodemationTelemetryMetricNames as H, CoreTokens as Ht, CatalogBackedCostTrackingTelemetryFactory as I, injectable as It, NoOpTelemetrySpanScope as J, NoOpExecutionTelemetry as K, DefaultExecutionContextFactory as L, instanceCachingFactory as Lt, RunnableOutputBehaviorResolver as M, container$1 as Mt, NodeOutputNormalizer as N, delay as Nt, MissingRuntimeTriggerToken as O, InjectableRuntimeDecoratorComposer as Ot, ItemExprResolver as P, inject as Pt, CostTrackingTelemetryAttributeNames as Q, AllWorkflowsActiveWorkflowActivationPolicy as R, instancePerContainerCachingFactory as Rt, RunPolicySnapshotFactory as S, resolveItemExprsForExecution as St, NodeInstanceFactory as T, getPersistedRuntimeTypeMetadata as Tt, GenAiTelemetryAttributeNames as U, RunFinishedAtFactory as V, singleton as Vt, CodemationTelemetryAttributeNames as W, NoOpCostTrackingTelemetryFactory as X, NoOpTelemetryArtifactReference as Y, NoOpCostTrackingTelemetry as Z, LocalOnlyScheduler as _, WorkflowExecutableNodeClassifier as _t, InMemoryLiveWorkflowRepository as a, isPortsEmission as at, DefaultDrivingScheduler as b, isItemExpr as bt, EngineFactory as c, CredentialResolverFactory as ct, InMemoryBinaryStorage as d, DefaultExecutionBinaryService as dt, CredentialUnboundError as et, WorkflowStoragePolicyEvaluator as f, UnavailableBinaryStorage as ft, EngineExecutionLimitsPolicy as g, WorkflowExecutableNodeClassifierFactory as gt, ENGINE_EXECUTION_LIMITS_DEFAULTS as h, ConnectionInvocationEventPublisher as ht, RunIntentService as i, emitPorts as it, InProcessRetryRunnerFactory as j, PersistedRuntimeTypeNameResolver as jt, NodeExecutorFactory as k, PersistedRuntimeTypeMetadataStore as kt, Engine as l, getOriginIndexFromItem as lt, RunTerminalPersistenceCoordinator as m, NodeEventPublisher as mt, WorkflowRepositoryWebhookTriggerMatcher as n, RetryPolicy as nt, EngineWorkflowRunnerServiceFactory as o, isUnbrandedPortsEmissionShape as ot, WorkflowPolicyErrorServices as p, __decorate as pt, NoOpNodeExecutionTelemetry as q, RunIntentServiceFactory as r, NoRetryPolicy as rt, EngineWorkflowRunnerService as s, DefaultAsyncSleeper as st, WorkflowRepositoryWebhookTriggerMatcherFactory as t, ExpRetryPolicy as tt, InMemoryRunDataFactory as u, ChildExecutionScopeFactory as ut, InlineDrivingScheduler as v, NodeIterationIdFactory as vt, NodeInstanceFactoryFactory as w, chatModel as wt, ConfigDrivenOffloadPolicy as x, itemExpr as xt, HintOnlyOffloadPolicy as y, ConnectionNodeIdFactory as yt, branchRef as z, predicateAwareClassFactory as zt };
|
|
5444
|
+
//# sourceMappingURL=runtime-284ok0cm.js.map
|