@codemation/core 0.11.0 → 0.11.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.
Files changed (67) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/CostCatalogContract-DZgcUBE4.d.cts +19 -0
  3. package/dist/{EngineRuntimeRegistration.types-BZ_1XWAJ.d.ts → EngineRuntimeRegistration.types-BQbS9_gs.d.ts} +2 -2
  4. package/dist/{EngineRuntimeRegistration.types-MPYWsEM0.d.cts → EngineRuntimeRegistration.types-Cggm5GVY.d.cts} +3 -2
  5. package/dist/{InMemoryRunDataFactory-hmkh0lzR.d.cts → InMemoryRunDataFactory-C7YItvHG.d.cts} +3 -18
  6. package/dist/{InMemoryRunEventBusRegistry-sM4z4n_i.js → InMemoryRunEventBusRegistry-Bwunvt1T.js} +1 -1
  7. package/dist/{InMemoryRunEventBusRegistry-sM4z4n_i.js.map → InMemoryRunEventBusRegistry-Bwunvt1T.js.map} +1 -1
  8. package/dist/{InMemoryRunEventBusRegistry-VM3OWnHo.cjs → InMemoryRunEventBusRegistry-Sa86VxuV.cjs} +1 -1
  9. package/dist/{InMemoryRunEventBusRegistry-VM3OWnHo.cjs.map → InMemoryRunEventBusRegistry-Sa86VxuV.cjs.map} +1 -1
  10. package/dist/ItemsInputNormalizer-C_dpn76M.d.cts +407 -0
  11. package/dist/ItemsInputNormalizer-CwdOhSAK.cjs +43 -0
  12. package/dist/ItemsInputNormalizer-CwdOhSAK.cjs.map +1 -0
  13. package/dist/ItemsInputNormalizer-D-MH8MBs.js +36 -0
  14. package/dist/ItemsInputNormalizer-D-MH8MBs.js.map +1 -0
  15. package/dist/ItemsInputNormalizer-_Mfcd3YU.d.ts +321 -0
  16. package/dist/RunIntentService-BVur7x9n.d.ts +285 -0
  17. package/dist/RunIntentService-CEF-sFfI.d.cts +206 -0
  18. package/dist/{RunIntentService-MUHJ1bhO.d.cts → agentMcpTypes-ZiNbNsEi.d.cts} +2 -204
  19. package/dist/bootstrap/index.cjs +4 -2
  20. package/dist/bootstrap/index.d.cts +5 -3
  21. package/dist/bootstrap/index.d.ts +5 -4
  22. package/dist/bootstrap/index.js +4 -2
  23. package/dist/{bootstrap-dVmpU1ju.cjs → bootstrap-BxuTFTLB.cjs} +38 -36
  24. package/dist/{bootstrap-dVmpU1ju.cjs.map → bootstrap-BxuTFTLB.cjs.map} +1 -1
  25. package/dist/{bootstrap-Dgzsjoj7.js → bootstrap-D_Yyi0wL.js} +4 -2
  26. package/dist/{bootstrap-Dgzsjoj7.js.map → bootstrap-D_Yyi0wL.js.map} +1 -1
  27. package/dist/browser.cjs +16 -0
  28. package/dist/browser.d.cts +4 -0
  29. package/dist/browser.d.ts +3 -0
  30. package/dist/browser.js +4 -0
  31. package/dist/contracts-CK0x6w_G.cjs +74 -0
  32. package/dist/contracts-CK0x6w_G.cjs.map +1 -0
  33. package/dist/contracts-DXdfTdpW.js +50 -0
  34. package/dist/contracts-DXdfTdpW.js.map +1 -0
  35. package/dist/contracts.cjs +6 -0
  36. package/dist/contracts.d.cts +5 -0
  37. package/dist/contracts.d.ts +2 -0
  38. package/dist/contracts.js +3 -0
  39. package/dist/di-0Wop7z1y.js +376 -0
  40. package/dist/di-0Wop7z1y.js.map +1 -0
  41. package/dist/di-BlEKdoZS.cjs +489 -0
  42. package/dist/di-BlEKdoZS.cjs.map +1 -0
  43. package/dist/executionPersistenceContracts-BgZMRsTa.d.cts +275 -0
  44. package/dist/{index-Bes88mxT.d.ts → index-62Ba9f7D.d.ts} +6 -319
  45. package/dist/{RunIntentService-BrEq6Jm6.d.ts → index-zWGtEhrf.d.ts} +2 -283
  46. package/dist/index.cjs +29 -92
  47. package/dist/index.cjs.map +1 -1
  48. package/dist/index.d.cts +9 -715
  49. package/dist/index.d.ts +4 -2
  50. package/dist/index.js +5 -68
  51. package/dist/index.js.map +1 -1
  52. package/dist/params-B5SENSzZ.d.cts +44 -0
  53. package/dist/{runtime-vH0EeZzH.cjs → runtime-DBzq5YBi.cjs} +13 -517
  54. package/dist/runtime-DBzq5YBi.cjs.map +1 -0
  55. package/dist/{runtime-Duf3ClPw.js → runtime-cxmUkk0l.js} +3 -389
  56. package/dist/runtime-cxmUkk0l.js.map +1 -0
  57. package/dist/testing.cjs +23 -21
  58. package/dist/testing.cjs.map +1 -1
  59. package/dist/testing.d.cts +3 -2
  60. package/dist/testing.d.ts +3 -2
  61. package/dist/testing.js +5 -3
  62. package/dist/testing.js.map +1 -1
  63. package/package.json +9 -5
  64. package/src/ai/AgentConnectionNodeCollector.ts +1 -1
  65. package/tsdown.config.ts +1 -1
  66. package/dist/runtime-Duf3ClPw.js.map +0 -1
  67. package/dist/runtime-vH0EeZzH.cjs.map +0 -1
@@ -1,35 +1,8 @@
1
- import "reflect-metadata";
2
- import { container as container$1, delay, inject, injectAll, injectable, instanceCachingFactory, instancePerContainerCachingFactory, predicateAwareClassFactory, registry, singleton } from "tsyringe";
1
+ import { S as resolveItemExprsForExecution, _ as AgentConnectionNodeCollector, a as injectable, g as NodeIterationIdFactory, h as CredentialUnboundError, w as ConnectionNodeIdFactory, y as AgentConfigInspector } from "./di-0Wop7z1y.js";
3
2
  import { ZodError, z } from "zod";
4
3
  import { ReadableStream } from "node:stream/web";
5
4
  import { createHash } from "node:crypto";
6
5
 
7
- //#region src/di/CoreTokens.ts
8
- const CoreTokens = {
9
- PersistedWorkflowTokenRegistry: Symbol.for("codemation.core.PersistedWorkflowTokenRegistry"),
10
- CredentialSessionService: Symbol.for("codemation.core.CredentialSessionService"),
11
- CredentialTypeRegistry: Symbol.for("codemation.core.CredentialTypeRegistry"),
12
- WorkflowRunnerService: Symbol.for("codemation.core.WorkflowRunnerService"),
13
- LiveWorkflowRepository: Symbol.for("codemation.core.LiveWorkflowRepository"),
14
- WorkflowRepository: Symbol.for("codemation.core.WorkflowRepository"),
15
- NodeResolver: Symbol.for("codemation.core.NodeResolver"),
16
- WorkflowNodeInstanceFactory: Symbol.for("codemation.core.WorkflowNodeInstanceFactory"),
17
- RunIdFactory: Symbol.for("codemation.core.RunIdFactory"),
18
- ActivationIdFactory: Symbol.for("codemation.core.ActivationIdFactory"),
19
- WorkflowExecutionRepository: Symbol.for("codemation.core.WorkflowExecutionRepository"),
20
- TriggerSetupStateRepository: Symbol.for("codemation.core.TriggerSetupStateRepository"),
21
- NodeActivationScheduler: Symbol.for("codemation.core.NodeActivationScheduler"),
22
- RunDataFactory: Symbol.for("codemation.core.RunDataFactory"),
23
- ExecutionContextFactory: Symbol.for("codemation.core.ExecutionContextFactory"),
24
- RunEventBus: Symbol.for("codemation.core.RunEventBus"),
25
- BinaryStorage: Symbol.for("codemation.core.BinaryStorage"),
26
- WebhookBasePath: Symbol.for("codemation.core.WebhookBasePath"),
27
- EngineExecutionLimitsPolicy: Symbol.for("codemation.core.EngineExecutionLimitsPolicy"),
28
- WorkflowActivationPolicy: Symbol.for("codemation.core.WorkflowActivationPolicy"),
29
- AgentMcpIntegration: Symbol.for("codemation.core.AgentMcpIntegration")
30
- };
31
-
32
- //#endregion
33
6
  //#region src/runtime-types/persistedRuntimeTypeModelRegistry.ts
34
7
  /** Shared metadata key used to attach persisted runtime-type information to decorated classes. */
35
8
  const persistedRuntimeTypeMetadataKey = Symbol.for("codemation.core.persistedRuntimeTypeMetadata");
@@ -138,289 +111,6 @@ function chatModel(options = {}) {
138
111
  return InjectableRuntimeDecoratorComposer.compose("chatModel", options, import.meta.url);
139
112
  }
140
113
 
141
- //#endregion
142
- //#region src/ai/NodeBackedToolConfig.ts
143
- var NodeBackedToolConfig = class {
144
- type;
145
- toolKind = "nodeBacked";
146
- description;
147
- presentation;
148
- inputSchemaValue;
149
- outputSchemaValue;
150
- mapInputValue;
151
- mapOutputValue;
152
- constructor(name, node$1, options) {
153
- this.name = name;
154
- this.node = node$1;
155
- this.type = node$1.type;
156
- this.description = options.description;
157
- this.presentation = options.presentation;
158
- this.inputSchemaValue = options.inputSchema;
159
- this.outputSchemaValue = options.outputSchema;
160
- this.mapInputValue = options.mapInput;
161
- this.mapOutputValue = options.mapOutput;
162
- }
163
- getCredentialRequirements() {
164
- return this.node.getCredentialRequirements?.() ?? [];
165
- }
166
- getInputSchema() {
167
- return this.inputSchemaValue;
168
- }
169
- getOutputSchema() {
170
- return this.outputSchemaValue;
171
- }
172
- toNodeItem(args) {
173
- const mapped = this.mapInputValue?.(args) ?? args.input;
174
- if (this.isItem(mapped)) return mapped;
175
- return { json: mapped };
176
- }
177
- toToolOutput(args) {
178
- const raw = this.mapOutputValue?.(args) ?? this.readDefaultToolOutput(args.outputs);
179
- return this.outputSchemaValue.parse(raw);
180
- }
181
- readDefaultToolOutput(outputs) {
182
- const firstMainItem = outputs.main?.[0];
183
- if (!firstMainItem) throw new Error(`Node-backed tool "${this.name}" did not produce a main output item.`);
184
- return firstMainItem.json;
185
- }
186
- isItem(value) {
187
- return typeof value === "object" && value !== null && "json" in value;
188
- }
189
- };
190
-
191
- //#endregion
192
- //#region src/contracts/itemExpr.ts
193
- const ITEM_EXPR_BRAND = Symbol.for("codemation.itemExpr");
194
- function itemExpr(fn) {
195
- return {
196
- [ITEM_EXPR_BRAND]: true,
197
- fn
198
- };
199
- }
200
- function isItemExpr(value) {
201
- if (typeof value !== "object" || value === null) return false;
202
- const v = value;
203
- if (v[ITEM_EXPR_BRAND] === true) return true;
204
- const keys = Object.keys(v);
205
- if (keys.length === 1 && keys[0] === "fn" && typeof v.fn === "function") return true;
206
- for (const sym of Object.getOwnPropertySymbols(v)) if (sym.description === "codemation.itemExpr" && v[sym] === true) return true;
207
- return false;
208
- }
209
- function containsItemExprInUnknown(value, seen = /* @__PURE__ */ new WeakSet()) {
210
- if (isItemExpr(value)) return true;
211
- if (value === null || typeof value !== "object") return false;
212
- if (seen.has(value)) return false;
213
- seen.add(value);
214
- if (Array.isArray(value)) return value.some((entry) => containsItemExprInUnknown(entry, seen));
215
- for (const entry of Object.values(value)) if (containsItemExprInUnknown(entry, seen)) return true;
216
- return false;
217
- }
218
- /**
219
- * Deep-resolves {@link itemExpr} leaves. Returns a new graph (does not mutate the original config object).
220
- */
221
- async function resolveItemExprsInUnknown(value, args, seen = /* @__PURE__ */ new WeakSet()) {
222
- if (isItemExpr(value)) return await Promise.resolve(value.fn(args));
223
- if (value === null || typeof value !== "object") return value;
224
- if (seen.has(value)) return value;
225
- seen.add(value);
226
- if (Array.isArray(value)) {
227
- const out$1 = [];
228
- for (let i = 0; i < value.length; i++) out$1.push(await resolveItemExprsInUnknown(value[i], args, seen));
229
- return out$1;
230
- }
231
- const rec = value;
232
- const entries = Object.entries(rec);
233
- const proto = Object.getPrototypeOf(value);
234
- if (proto !== Object.prototype && proto !== null && entries.length === 0) return value;
235
- const out = Object.create(proto);
236
- for (const [k, v] of entries) out[k] = await resolveItemExprsInUnknown(v, args, seen);
237
- return out;
238
- }
239
- /**
240
- * Clones runnable config (best-effort) so per-item {@link itemExpr} resolution never mutates shared instances.
241
- */
242
- async function resolveItemExprsForExecution(config, nodeCtx, item, itemIndex, items) {
243
- const exprArgs = {
244
- item,
245
- itemIndex,
246
- items,
247
- ctx: {
248
- runId: nodeCtx.runId,
249
- workflowId: nodeCtx.workflowId,
250
- nodeId: nodeCtx.nodeId,
251
- activationId: nodeCtx.activationId,
252
- data: nodeCtx.data
253
- }
254
- };
255
- if (!containsItemExprInUnknown(config)) return;
256
- return await resolveItemExprsInUnknown(config, exprArgs);
257
- }
258
-
259
- //#endregion
260
- //#region src/ai/AgentConfigInspectorFactory.ts
261
- var AgentConfigInspector = class {
262
- static isAgentNodeConfig(config) {
263
- if (!config) return false;
264
- const candidate = config;
265
- return !!candidate.chatModel && this.hasCompatibleMessageConfiguration(candidate);
266
- }
267
- static hasCompatibleMessageConfiguration(candidate) {
268
- const messages = candidate.messages;
269
- if (messages === void 0 || messages === null) return false;
270
- if (Array.isArray(messages)) return messages.length > 0;
271
- if (typeof messages === "object") {
272
- if (isItemExpr(messages)) return true;
273
- const o = messages;
274
- return Array.isArray(o.prompt) && o.prompt.length > 0 || typeof o.buildMessages === "function";
275
- }
276
- return false;
277
- }
278
- };
279
-
280
- //#endregion
281
- //#region src/workflow/definition/ConnectionNodeIdFactory.ts
282
- /**
283
- * Deterministic ids for workflow connection-owned child nodes (LLM slot, tools, etc.).
284
- * These are stable across loads.
285
- */
286
- var ConnectionNodeIdFactory = class {
287
- static connectionSegment = "__conn__";
288
- static languageModelConnectionNodeId(parentNodeId) {
289
- return `${parentNodeId}${this.connectionSegment}llm`;
290
- }
291
- static toolConnectionNodeId(parentNodeId, toolName) {
292
- const normalized = this.normalizeToolName(toolName);
293
- return `${parentNodeId}${this.connectionSegment}tool${this.connectionSegment}${normalized}`;
294
- }
295
- static mcpConnectionNodeId(parentNodeId, serverId) {
296
- return `${parentNodeId}${this.connectionSegment}mcp${this.connectionSegment}${serverId}`;
297
- }
298
- static isMcpConnectionNodeId(nodeId) {
299
- return nodeId.includes(`${this.connectionSegment}mcp${this.connectionSegment}`);
300
- }
301
- static parseMcpConnectionNodeId(nodeId) {
302
- if (!this.isMcpConnectionNodeId(nodeId)) return;
303
- const marker = `${this.connectionSegment}mcp${this.connectionSegment}`;
304
- const idx = nodeId.lastIndexOf(marker);
305
- if (idx < 0) return;
306
- const parentNodeId = nodeId.slice(0, idx);
307
- const serverId = nodeId.slice(idx + marker.length);
308
- if (!parentNodeId || !serverId) return;
309
- return {
310
- parentNodeId,
311
- serverId
312
- };
313
- }
314
- static isLanguageModelConnectionNodeId(nodeId) {
315
- return nodeId.endsWith(`${this.connectionSegment}llm`);
316
- }
317
- static isToolConnectionNodeId(nodeId) {
318
- return nodeId.includes(`${this.connectionSegment}tool${this.connectionSegment}`);
319
- }
320
- static parseLanguageModelConnectionNodeId(nodeId) {
321
- if (!this.isLanguageModelConnectionNodeId(nodeId)) return;
322
- const suffix = `${this.connectionSegment}llm`;
323
- const parentNodeId = nodeId.slice(0, -suffix.length);
324
- return parentNodeId ? { parentNodeId } : void 0;
325
- }
326
- static parseToolConnectionNodeId(nodeId) {
327
- if (!this.isToolConnectionNodeId(nodeId)) return;
328
- const marker = `${this.connectionSegment}tool${this.connectionSegment}`;
329
- const idx = nodeId.lastIndexOf(marker);
330
- if (idx < 0) return;
331
- const parentNodeId = nodeId.slice(0, idx);
332
- const normalizedToolName = nodeId.slice(idx + marker.length);
333
- if (!parentNodeId || !normalizedToolName) return;
334
- return {
335
- parentNodeId,
336
- normalizedToolName
337
- };
338
- }
339
- /** True when `nodeId` is a connection-owned child of `parentNodeId` (LLM or tool slot). */
340
- static isConnectionOwnedDescendantOf(parentNodeId, nodeId) {
341
- return nodeId.startsWith(`${parentNodeId}${this.connectionSegment}`);
342
- }
343
- /** Normalizes a tool display name to a stable id segment. */
344
- static normalizeToolName(toolName) {
345
- return toolName.trim().toLowerCase().replace(/[^a-z0-9]+/g, "_").replace(/^_+|_+$/g, "") || "tool";
346
- }
347
- };
348
-
349
- //#endregion
350
- //#region src/ai/AgentConnectionNodeCollector.ts
351
- const AgentConnectionNodeCollector = new class {
352
- collect(parentNodeId, agentConfig, mcpServerResolver) {
353
- const collected = [];
354
- this.collectInto(parentNodeId, agentConfig, collected, mcpServerResolver);
355
- return collected;
356
- }
357
- collectInto(parentNodeId, agentConfig, collected, mcpServerResolver) {
358
- collected.push({
359
- nodeId: ConnectionNodeIdFactory.languageModelConnectionNodeId(parentNodeId),
360
- parentNodeId,
361
- connectionName: "llm",
362
- role: "languageModel",
363
- name: agentConfig.chatModel.presentation?.label ?? agentConfig.chatModel.name,
364
- typeName: agentConfig.chatModel.name,
365
- icon: agentConfig.chatModel.presentation?.icon,
366
- credentialSource: agentConfig.chatModel
367
- });
368
- for (const tool$1 of agentConfig.tools ?? []) {
369
- const toolNodeId = ConnectionNodeIdFactory.toolConnectionNodeId(parentNodeId, tool$1.name);
370
- const isNestedAgent = this.isNodeBackedAgentTool(tool$1);
371
- collected.push({
372
- nodeId: toolNodeId,
373
- parentNodeId,
374
- connectionName: "tools",
375
- role: isNestedAgent ? "nestedAgent" : "tool",
376
- name: tool$1.presentation?.label ?? tool$1.name,
377
- typeName: tool$1.name,
378
- icon: tool$1.presentation?.icon,
379
- credentialSource: tool$1
380
- });
381
- this.collectNestedAgentTools(toolNodeId, tool$1, collected, mcpServerResolver);
382
- }
383
- if (mcpServerResolver) {
384
- const mcpServers = agentConfig.mcpServers;
385
- for (const serverId of mcpServers ?? []) {
386
- const decl = mcpServerResolver(serverId);
387
- if (!decl) continue;
388
- const acceptedTypes = decl.acceptedCredentialTypes ?? [];
389
- collected.push({
390
- nodeId: ConnectionNodeIdFactory.mcpConnectionNodeId(parentNodeId, serverId),
391
- parentNodeId,
392
- connectionName: "tools",
393
- role: "tool",
394
- name: decl.displayName,
395
- typeName: serverId,
396
- icon: "lucide:plug",
397
- credentialSource: { getCredentialRequirements: () => [{
398
- slotKey: "credential",
399
- label: decl.displayName,
400
- acceptedTypes
401
- }] }
402
- });
403
- }
404
- }
405
- }
406
- collectNestedAgentTools(toolNodeId, tool$1, collected, mcpServerResolver) {
407
- if (!this.isNodeBackedAgentTool(tool$1)) return;
408
- const innerAgent = tool$1 instanceof NodeBackedToolConfig ? tool$1.node : tool$1.node;
409
- this.collectInto(toolNodeId, innerAgent, collected, mcpServerResolver);
410
- }
411
- /**
412
- * After JSON round-trip (persisted snapshots), tools are plain objects — `instanceof NodeBackedToolConfig` fails.
413
- * Detect node-backed tools structurally via {@link NodeBackedToolConfig#toolKind}.
414
- */
415
- isNodeBackedAgentTool(tool$1) {
416
- if (tool$1 instanceof NodeBackedToolConfig) return AgentConfigInspector.isAgentNodeConfig(tool$1.node);
417
- if (!tool$1 || typeof tool$1 !== "object") return false;
418
- const t = tool$1;
419
- if (t.toolKind !== "nodeBacked") return false;
420
- return AgentConfigInspector.isAgentNodeConfig(t.node);
421
- }
422
- }();
423
-
424
114
  //#endregion
425
115
  //#region src/workflow/dsl/WhenBuilder.ts
426
116
  var WhenBuilder = class WhenBuilder {
@@ -711,33 +401,6 @@ var ConnectionInvocationIdFactory = class {
711
401
  }
712
402
  };
713
403
 
714
- //#endregion
715
- //#region src/workflow/definition/NodeIterationIdFactory.ts
716
- /**
717
- * Unique ids for one per-item iteration of a runnable node's execute loop.
718
- *
719
- * Activations are per-batch (one scheduled execution of a node, possibly with N items).
720
- * Iterations refine that to one identifier per item-index inside the batch loop, so per-item
721
- * connection invocations and telemetry can be grouped without time-window heuristics.
722
- *
723
- * Uses Web Crypto's `randomUUID` (Node 19+ and all modern browsers) so this module is safe
724
- * to include in the browser entry. Importing `node:crypto` here previously leaked into the
725
- * canvas client bundle through `browser.ts` and OOM'd consumers' Turbopack builds.
726
- */
727
- var NodeIterationIdFactory = class {
728
- static create() {
729
- return `iter_${globalThis.crypto.randomUUID()}`;
730
- }
731
- /** Deterministic id for tests when a stable sequence is needed. */
732
- static createForTest(seed, sequence) {
733
- return `iter_${seed}_${sequence}`;
734
- }
735
- /** Deterministic id derived from a connection node id (for sub-agent / tool-call scopes). */
736
- static createForConnection(connectionNodeId, sequence) {
737
- return `iter_${connectionNodeId}_${sequence}`;
738
- }
739
- };
740
-
741
404
  //#endregion
742
405
  //#region src/workflow/definition/WorkflowExecutableNodeClassifier.ts
743
406
  /**
@@ -1419,20 +1082,6 @@ var DefaultAsyncSleeper = class {
1419
1082
  }
1420
1083
  };
1421
1084
 
1422
- //#endregion
1423
- //#region src/contracts/NoOpAgentMcpIntegration.ts
1424
- /**
1425
- * No-op implementation of AgentMcpIntegration.
1426
- * Registered by the core engine runtime as a fallback when the host does not
1427
- * supply a real implementation (e.g. in unit tests or headless engine setups).
1428
- * Always returns an empty tool map so the agent runs with node-backed tools only.
1429
- */
1430
- var NoOpAgentMcpIntegration = class {
1431
- async prepareMcpTools() {
1432
- return /* @__PURE__ */ new Map();
1433
- }
1434
- };
1435
-
1436
1085
  //#endregion
1437
1086
  //#region src/contracts/emitPorts.ts
1438
1087
  const EMIT_PORTS_BRAND = Symbol.for("codemation.emitPorts");
@@ -1495,21 +1144,6 @@ var ExpRetryPolicy = class {
1495
1144
  }
1496
1145
  };
1497
1146
 
1498
- //#endregion
1499
- //#region src/contracts/credentialTypes.ts
1500
- var CredentialUnboundError = class CredentialUnboundError extends Error {
1501
- constructor(bindingKey, acceptedTypes = []) {
1502
- super(CredentialUnboundError.createMessage(bindingKey, acceptedTypes));
1503
- this.bindingKey = bindingKey;
1504
- this.acceptedTypes = acceptedTypes;
1505
- this.name = "CredentialUnboundError";
1506
- }
1507
- static createMessage(bindingKey, acceptedTypes) {
1508
- const acceptedTypesSuffix = acceptedTypes.length > 0 ? ` Accepted credential types: ${acceptedTypes.join(", ")}.` : "";
1509
- return `Credential slot "${bindingKey.slotKey}" is not bound for workflow ${bindingKey.workflowId} node ${bindingKey.nodeId}.${acceptedTypesSuffix}`;
1510
- }
1511
- };
1512
-
1513
1147
  //#endregion
1514
1148
  //#region src/contracts/CostTrackingTelemetryContract.ts
1515
1149
  const CostTrackingTelemetryMetricNames = {
@@ -1631,19 +1265,6 @@ var NoOpExecutionTelemetryFactory = class {
1631
1265
  }
1632
1266
  };
1633
1267
 
1634
- //#endregion
1635
- //#region src/contracts/runFinishedAtFactory.ts
1636
- /** Derives workflow end time from persisted run root or node snapshots for run listings. */
1637
- var RunFinishedAtFactory = class {
1638
- static resolveIso(state) {
1639
- if (state.finishedAt && state.status !== "running" && state.status !== "pending") return state.finishedAt;
1640
- if (state.status === "running" || state.status === "pending") return;
1641
- let max;
1642
- for (const snap of Object.values(state.nodeSnapshotsByNodeId)) if (snap?.finishedAt && (!max || snap.finishedAt > max)) max = snap.finishedAt;
1643
- return max;
1644
- }
1645
- };
1646
-
1647
1268
  //#endregion
1648
1269
  //#region src/contracts/workflowActivationPolicy.ts
1649
1270
  /** Default for tests and harnesses: every workflow is treated as active (legacy behavior). */
@@ -1701,13 +1322,6 @@ var CodemationTelemetryMetricNames = class {
1701
1322
  static gmailAttachmentBytes = "codemation.gmail.attachment_bytes";
1702
1323
  };
1703
1324
 
1704
- //#endregion
1705
- //#region src/contracts/workflowTypes.ts
1706
- function nodeRef(nodeId) {
1707
- return nodeId;
1708
- }
1709
- const branchRef = (index) => `$${index}`;
1710
-
1711
1325
  //#endregion
1712
1326
  //#region src/execution/ExecutionTelemetryCostTrackingDecoratorFactory.ts
1713
1327
  var ExecutionTelemetryCostTrackingDecoratorFactory = class {
@@ -6278,5 +5892,5 @@ var WorkflowRepositoryWebhookTriggerMatcherFactory = class {
6278
5892
  };
6279
5893
 
6280
5894
  //#endregion
6281
- export { NoOpCostTrackingTelemetryFactory as $, registry as $t, PersistedWorkflowTokenRegistry as A, ConnectionNodeIdFactory as At, DefaultExecutionContextFactory as B, tool as Bt, DefaultDrivingScheduler as C, ConnectionInvocationIdFactory as Ct, NodeInstanceFactoryFactory as D, ChainCursor as Dt, StaticCostCatalog as E, NodeIdSlugifier as Et, RunnableOutputBehaviorResolver as F, resolveItemExprsInUnknown as Ft, CodemationTelemetryAttributeNames as G, container$1 as Gt, nodeRef as H, PersistedRuntimeTypeMetadataStore as Ht, NodeOutputNormalizer as I, NodeBackedToolConfig as It, NoOpExecutionTelemetryFactory as J, injectAll as Jt, AllWorkflowsActiveWorkflowActivationPolicy as K, delay as Kt, ItemExprResolver as L, chatModel as Lt, NodeExecutorFactory as M, isItemExpr as Mt, NodeExecutor as N, itemExpr as Nt, NodeInstanceFactory as O, WhenBuilder as Ot, InProcessRetryRunnerFactory as P, resolveItemExprsForExecution as Pt, NoOpTelemetryArtifactReference as Q, predicateAwareClassFactory as Qt, InProcessRetryRunner as R, getPersistedRuntimeTypeMetadata as Rt, HintOnlyOffloadPolicy as S, NodeIterationIdFactory as St, RunPolicySnapshotFactory as T, WorkflowDefinitionError as Tt, CodemationTelemetryMetricNames as U, StackTraceCallSitePathResolver as Ut, branchRef as V, InjectableRuntimeDecoratorComposer as Vt, GenAiTelemetryAttributeNames as W, PersistedRuntimeTypeNameResolver as Wt, NoOpNodeExecutionTelemetry as X, instanceCachingFactory as Xt, NoOpExecutionTelemetry as Y, injectable as Yt, NoOpTelemetrySpanScope as Z, instancePerContainerCachingFactory as Zt, RunTerminalPersistenceCoordinator as _, NodeEventPublisher as _t, InMemoryLiveWorkflowRepository as a, RetryPolicy as at, LocalOnlyScheduler as b, WorkflowExecutableNodeClassifierFactory as bt, EngineFactory as c, isPortsEmission as ct, PollingTriggerRuntime as d, DefaultAsyncSleeper as dt, singleton as en, NoOpCostTrackingTelemetry as et, PollingTriggerDedupWindow as f, CredentialResolverFactory as ft, WorkflowPolicyErrorServices as g, UnavailableBinaryStorage as gt, WorkflowStoragePolicyEvaluator as h, DefaultExecutionBinaryService as ht, RunIntentService as i, ExpRetryPolicy as it, MissingRuntimeTriggerToken as j, AgentConfigInspector as jt, WorkflowSnapshotCodec as k, AgentConnectionNodeCollector as kt, Engine as l, isUnbrandedPortsEmissionShape as lt, InMemoryBinaryStorage as m, ChildExecutionScopeFactory as mt, WorkflowRepositoryWebhookTriggerMatcher as n, CostTrackingTelemetryMetricNames as nt, EngineWorkflowRunnerServiceFactory as o, NoRetryPolicy as ot, InMemoryRunDataFactory as p, getOriginIndexFromItem as pt, RunFinishedAtFactory as q, inject as qt, RunIntentServiceFactory as r, CredentialUnboundError as rt, EngineWorkflowRunnerService as s, emitPorts as st, WorkflowRepositoryWebhookTriggerMatcherFactory as t, CoreTokens as tn, CostTrackingTelemetryAttributeNames as tt, NoOpPollingTriggerLogger as u, NoOpAgentMcpIntegration as ut, ENGINE_EXECUTION_LIMITS_DEFAULTS as v, ConnectionInvocationEventPublisher as vt, ConfigDrivenOffloadPolicy as w, WorkflowBuilder as wt, InlineDrivingScheduler as x, WorkflowExecutableNodeClassifier as xt, EngineExecutionLimitsPolicy as y, DefaultWorkflowGraphFactory as yt, CatalogBackedCostTrackingTelemetryFactory as z, node as zt };
6282
- //# sourceMappingURL=runtime-Duf3ClPw.js.map
5895
+ export { CostTrackingTelemetryMetricNames as $, PersistedWorkflowTokenRegistry as A, PersistedRuntimeTypeNameResolver as At, DefaultExecutionContextFactory as B, DefaultDrivingScheduler as C, chatModel as Ct, NodeInstanceFactoryFactory as D, InjectableRuntimeDecoratorComposer as Dt, StaticCostCatalog as E, tool as Et, RunnableOutputBehaviorResolver as F, NoOpExecutionTelemetryFactory as G, GenAiTelemetryAttributeNames as H, NodeOutputNormalizer as I, NoOpTelemetrySpanScope as J, NoOpExecutionTelemetry as K, ItemExprResolver as L, NodeExecutorFactory as M, NodeExecutor as N, NodeInstanceFactory as O, PersistedRuntimeTypeMetadataStore as Ot, InProcessRetryRunnerFactory as P, CostTrackingTelemetryAttributeNames as Q, InProcessRetryRunner as R, HintOnlyOffloadPolicy as S, WhenBuilder as St, RunPolicySnapshotFactory as T, node as Tt, CodemationTelemetryAttributeNames as U, CodemationTelemetryMetricNames as V, AllWorkflowsActiveWorkflowActivationPolicy as W, NoOpCostTrackingTelemetryFactory as X, NoOpTelemetryArtifactReference as Y, NoOpCostTrackingTelemetry as Z, RunTerminalPersistenceCoordinator as _, ConnectionInvocationIdFactory as _t, InMemoryLiveWorkflowRepository as a, isUnbrandedPortsEmissionShape as at, LocalOnlyScheduler as b, NodeIdSlugifier as bt, EngineFactory as c, getOriginIndexFromItem as ct, PollingTriggerRuntime as d, UnavailableBinaryStorage as dt, ExpRetryPolicy as et, PollingTriggerDedupWindow as f, NodeEventPublisher as ft, WorkflowPolicyErrorServices as g, WorkflowExecutableNodeClassifier as gt, WorkflowStoragePolicyEvaluator as h, WorkflowExecutableNodeClassifierFactory as ht, RunIntentService as i, isPortsEmission as it, MissingRuntimeTriggerToken as j, WorkflowSnapshotCodec as k, StackTraceCallSitePathResolver as kt, Engine as l, ChildExecutionScopeFactory as lt, InMemoryBinaryStorage as m, DefaultWorkflowGraphFactory as mt, WorkflowRepositoryWebhookTriggerMatcher as n, NoRetryPolicy as nt, EngineWorkflowRunnerServiceFactory as o, DefaultAsyncSleeper as ot, InMemoryRunDataFactory as p, ConnectionInvocationEventPublisher as pt, NoOpNodeExecutionTelemetry as q, RunIntentServiceFactory as r, emitPorts as rt, EngineWorkflowRunnerService as s, CredentialResolverFactory as st, WorkflowRepositoryWebhookTriggerMatcherFactory as t, RetryPolicy as tt, NoOpPollingTriggerLogger as u, DefaultExecutionBinaryService as ut, ENGINE_EXECUTION_LIMITS_DEFAULTS as v, WorkflowBuilder as vt, ConfigDrivenOffloadPolicy as w, getPersistedRuntimeTypeMetadata as wt, InlineDrivingScheduler as x, ChainCursor as xt, EngineExecutionLimitsPolicy as y, WorkflowDefinitionError as yt, CatalogBackedCostTrackingTelemetryFactory as z };
5896
+ //# sourceMappingURL=runtime-cxmUkk0l.js.map