@codemation/core 0.2.1 → 0.3.0

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 (63) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/README.md +2 -0
  3. package/dist/{EngineRuntimeRegistration.types-0sgV2XL2.d.ts → EngineRuntimeRegistration.types-Bjeo7Sfq.d.ts} +2 -2
  4. package/dist/{EngineWorkflowRunnerService-Dx7bJsJR.d.cts → EngineWorkflowRunnerService-Dd4yD31l.d.cts} +2 -2
  5. package/dist/{InMemoryRunDataFactory-qIYQEar7.d.cts → InMemoryRunDataFactory-OUzDmAHt.d.cts} +2 -2
  6. package/dist/{RunIntentService-BCvGdOSY.d.ts → RunIntentService-BAKikN8h.d.ts} +80 -12
  7. package/dist/{RunIntentService-CV8izV8t.d.cts → RunIntentService-Bkg4oYrM.d.cts} +74 -5
  8. package/dist/bootstrap/index.cjs +31 -31
  9. package/dist/bootstrap/index.d.cts +5 -3
  10. package/dist/bootstrap/index.d.ts +3 -3
  11. package/dist/bootstrap/index.js +2 -2
  12. package/dist/bootstrap-BD6CobHl.js +215 -0
  13. package/dist/bootstrap-BD6CobHl.js.map +1 -0
  14. package/dist/bootstrap-DwS5S7s9.cjs +240 -0
  15. package/dist/bootstrap-DwS5S7s9.cjs.map +1 -0
  16. package/dist/{index-CueSzHsf.d.ts → index-uCm9l0nw.d.ts} +64 -15
  17. package/dist/index.cjs +114 -32
  18. package/dist/index.cjs.map +1 -1
  19. package/dist/index.d.cts +68 -21
  20. package/dist/index.d.ts +3 -3
  21. package/dist/index.js +83 -2
  22. package/dist/index.js.map +1 -1
  23. package/dist/{RunIntentService-BFA48UpH.js → runtime-Cy-3FTI_.js} +1224 -94
  24. package/dist/runtime-Cy-3FTI_.js.map +1 -0
  25. package/dist/{RunIntentService-DcxXf_AM.cjs → runtime-ZJUpWmPH.cjs} +1251 -132
  26. package/dist/runtime-ZJUpWmPH.cjs.map +1 -0
  27. package/dist/testing.cjs +74 -29
  28. package/dist/testing.cjs.map +1 -1
  29. package/dist/testing.d.cts +55 -3
  30. package/dist/testing.d.ts +55 -3
  31. package/dist/testing.js +46 -3
  32. package/dist/testing.js.map +1 -1
  33. package/dist/workflowActivationPolicy-B8HzTk3o.js.map +1 -1
  34. package/dist/workflowActivationPolicy-BzyzXLa_.cjs.map +1 -1
  35. package/package.json +1 -1
  36. package/src/ai/AgentMessageConfigNormalizerFactory.ts +43 -0
  37. package/src/ai/AgentToolFactory.ts +2 -2
  38. package/src/ai/AiHost.ts +10 -9
  39. package/src/ai/NodeBackedToolConfig.ts +1 -1
  40. package/src/authoring/defineNode.types.ts +153 -10
  41. package/src/authoring/index.ts +3 -1
  42. package/src/contracts/runtimeTypes.ts +26 -0
  43. package/src/contracts/workflowTypes.ts +67 -5
  44. package/src/execution/ActivationEnqueueService.ts +8 -5
  45. package/src/execution/NodeActivationRequestInputPreparer.ts +89 -0
  46. package/src/execution/NodeExecutor.ts +38 -1
  47. package/src/execution/NodeInputContractError.ts +13 -0
  48. package/src/execution/index.ts +2 -0
  49. package/src/orchestration/RunContinuationService.ts +181 -50
  50. package/src/planning/RunQueuePlanner.ts +12 -1
  51. package/src/runtime/EngineFactory.ts +3 -0
  52. package/src/testing/ItemHarnessNode.ts +27 -0
  53. package/src/testing/ItemHarnessNodeConfig.ts +43 -0
  54. package/src/testing/RegistrarEngineTestKitFactory.ts +2 -0
  55. package/src/testing.ts +2 -0
  56. package/src/workflow/dsl/ChainCursorResolver.ts +1 -1
  57. package/src/workflow/dsl/workflowBuilderTypes.ts +8 -5
  58. package/dist/RunIntentService-BFA48UpH.js.map +0 -1
  59. package/dist/RunIntentService-DcxXf_AM.cjs.map +0 -1
  60. package/dist/bootstrap-D67Sf2BF.js +0 -1136
  61. package/dist/bootstrap-D67Sf2BF.js.map +0 -1
  62. package/dist/bootstrap-DoQHAEQJ.cjs +0 -1203
  63. package/dist/bootstrap-DoQHAEQJ.cjs.map +0 -1
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { $ as NodeRef, $n as PersistedWorkflowSnapshotNode, $t as NodeActivationReceipt, A as BinaryPreviewKind, An as WebhookInvocationMatch, Ar as instancePerContainerCachingFactory, At as WorkflowStoragePolicySpec, B as JsonValue, Bn as EngineRunCounters, Br as RunEventSubscription, Bt as BinaryStorageStatResult, C as CredentialTypeDefinition, Cn as WorkflowRunnerResolver, Cr as TypeToken, Ct as WorkflowId, D as OAuth2ProviderFromPublicConfig, Dn as HttpMethod, Dr as injectAll, Dt as WorkflowStoragePolicyDecisionArgs, E as CredentialUnboundError, En as WorkflowSnapshotResolver, Er as inject, Et as WorkflowPrunePolicySpec, F as ItemBinary, Fn as WorkflowActivationPolicy, Ft as triggerNodeSetupStateType, G as NodeDefinition, Gn as NodeInputsByPort, Gt as ExecutableTriggerNode, H as NodeActivationId, Hn as NodeExecutionError, Hr as FixedRetryPolicySpec, Ht as BinaryStorageWriteResult, I as Items, In as ConnectionInvocationAppendArgs, Ir as EngineExecutionLimitsPolicy, It as BinaryAttachmentCreateRequest, J as NodeErrorHandlerSpec, Jn as PersistedMutableRunState, Jt as ExecutionContextFactory, K as NodeErrorHandler, Kn as PendingNodeExecution, Kt as ExecutionBinaryService, L as JsonArray, Ln as ConnectionInvocationId, Lr as EngineExecutionLimitsPolicyConfig, Lt as BinaryBody, M as ExecutionMode, Mn as WebhookTriggerResolution, Mr as registry, Mt as runnableNodeInputType, N as InputPortKey, Nn as WebhookTriggerRoutingDiagnostics, Nr as singleton, Nt as runnableNodeOutputType, O as ActivationIdFactory, On as TriggerInstanceId, Or as injectable, Ot as WorkflowStoragePolicyMode, P as Item, Pn as AllWorkflowsActiveWorkflowActivationPolicy, Pr as CoreTokens, Pt as triggerNodeOutputType, Q as NodeOutputs, Qn as PersistedWorkflowSnapshot, Qt as NodeActivationContinuation, R as JsonObject, Rn as ConnectionInvocationRecord, Rr as RunEvent, Rt as BinaryStorage, S as CredentialType, Sn as WorkflowRepository, Sr as RegistrationOptions, St as WorkflowGraphFactory, T as CredentialTypeRegistry, Tn as WorkflowSnapshotFactory, Tr as delay, Tt as WorkflowPolicyRuntimeDefaults, U as NodeConfigBase, Un as NodeExecutionSnapshot, Ur as NoneRetryPolicySpec, Ut as EngineDeps, V as MutableRunData, Vn as ExecutionFrontierPlan, Vr as ExponentialRetryPolicySpec, Vt as BinaryStorageWriteRequest, W as NodeConnectionName, Wn as NodeExecutionStatus, Wr as RetryPolicySpec, Wt as EngineHost, X as NodeKind, Xn as PersistedRunSchedulingState, Xt as MultiInputNode, Y as NodeId, Yn as PersistedRunControlState, Yt as LiveWorkflowRepository, Z as NodeOffloadPolicy, Zn as PersistedRunState, Zt as Node, _ as CredentialRequirement, _n as TriggerSetupContext, _r as Container, _t as WorkflowDefinition, a as CredentialAuthDefinition, an as NodeExecutionRequest, ar as RunExecutionOptions, at as PersistedTokenId, b as CredentialSessionService, bn as TriggerTestItemsContext, br as InjectionToken, bt as WorkflowErrorHandlerSpec, c as CredentialFieldSchema, cn as NodeExecutionStatePublisher, cr as RunResult, ct as RunId, d as CredentialHealthTester, dn as PersistedTriggerSetupState, dr as RunStopCondition, dt as RunnableNodeInputJson, en as NodeActivationRequest, er as PersistedWorkflowTokenRegistryLike, et as NodeSchedulerDecision, f as CredentialInstanceId, fn as PreparedNodeActivationDispatch, fr as RunSummary, ft as RunnableNodeOutputJson, g as CredentialOAuth2AuthDefinition, gn as TriggerRuntimeDiagnostics, gr as WorkflowExecutionRepository, gt as UpstreamRefPlaceholder, h as CredentialMaterialSourceKind, hn as TriggerNode, hr as WorkflowExecutionPruneRepository, ht as TriggerNodeSetupState, i as AnyCredentialType, in as NodeExecutionContext, ir as RunEventPublisherDeps, it as PersistedRunPolicySnapshot, j as Edge, jn as WebhookTriggerMatcher, jr as predicateAwareClassFactory, jt as branchRef, k as BinaryAttachment, kn as WebhookControlSignal, kr as instanceCachingFactory, kt as WorkflowStoragePolicyResolver, l as CredentialHealth, ln as NodeExecutor, lr as RunStateResetRequest, lt as RunIdFactory, m as CredentialJsonRecord, mn as TriggerCleanupHandle, mr as WorkflowExecutionListingRepository, mt as TriggerNodeOutputJson, n as InMemoryLiveWorkflowRepository, nn as NodeActivationScheduler, nr as RunCompletionNotifier, nt as PairedItemRef, o as CredentialBinding, on as NodeExecutionRequestHandler, or as RunPruneCandidate, ot as RunDataFactory, p as CredentialInstanceRecord, pn as TestableTriggerNode, pr as WebhookRunResult, pt as TriggerNodeConfig, q as NodeErrorHandlerArgs, qn as PersistedMutableNodeState, qt as ExecutionContext, rn as NodeBinaryAttachmentService, rr as RunCurrentState, rt as ParentExecutionRef, s as CredentialBindingKey, sn as NodeExecutionScheduler, sr as RunQueueEntry, st as RunDataSnapshot, t as RunIntentService, tn as NodeActivationRequestBase, tr as PinnedNodeOutputsByPort, tt as OutputPortKey, u as CredentialHealthStatus, un as NodeResolver, ur as RunStatus, ut as RunnableNodeConfig, v as CredentialSessionFactory, vn as TriggerSetupStateFor, vr as DependencyContainer, vt as WorkflowErrorContext, w as CredentialTypeId, wn as WorkflowRunnerService, wr as container, wt as WorkflowNodeConnection, x as CredentialSetupStatus, xn as WorkflowNodeInstanceFactory, xr as Lifecycle, xt as WorkflowGraph, y as CredentialSessionFactoryArgs, yn as TriggerSetupStateRepository, yr as Disposable, yt as WorkflowErrorHandler, z as JsonPrimitive, zn as CurrentStateExecutionRequest, zr as RunEventBus, zt as BinaryStorageReadResult } from "./RunIntentService-CV8izV8t.cjs";
2
- import { a as InProcessRetryRunner, i as UnavailableBinaryStorage, l as CredentialResolverFactory, n as InMemoryBinaryStorage, o as DefaultExecutionContextFactory, r as DefaultExecutionBinaryService, s as DefaultAsyncSleeper, t as InMemoryRunDataFactory } from "./InMemoryRunDataFactory-qIYQEar7.cjs";
1
+ import { $ as NodeKind, $n as PersistedMutableNodeState, $t as ExecutionContextFactory, A as BinaryPreviewKind, An as WorkflowRunnerService, Ar as container, At as WorkflowPrunePolicySpec, B as JsonArray, Bn as AllWorkflowsActiveWorkflowActivationPolicy, Br as CoreTokens, Bt as triggerNodeSetupStateType, C as CredentialTypeDefinition, Cn as TriggerSetupContext, Cr as Container, Ct as WorkflowErrorHandler, D as OAuth2ProviderFromPublicConfig, Dn as WorkflowNodeInstanceFactory, Dr as Lifecycle, Dt as WorkflowId, E as CredentialUnboundError, En as TriggerTestItemsContext, Er as InjectionToken, Et as WorkflowGraphFactory, F as ItemBinary, Fn as WebhookControlSignal, Fr as instanceCachingFactory, Ft as branchRef, G as NodeActivationId, Gn as CurrentStateExecutionRequest, Gr as RunEventBus, Gt as BinaryStorageStatResult, H as JsonPrimitive, Hn as ConnectionInvocationAppendArgs, Hr as EngineExecutionLimitsPolicy, Ht as BinaryBody, I as ItemInputMapper, In as WebhookInvocationMatch, Ir as instancePerContainerCachingFactory, It as runnableNodeInputType, J as NodeDefinition, Jn as NodeExecutionError, Jr as FixedRetryPolicySpec, Jt as EngineDeps, K as NodeConfigBase, Kn as EngineRunCounters, Kr as RunEventSubscription, Kt as BinaryStorageWriteRequest, L as ItemInputMapperArgs, Ln as WebhookTriggerMatcher, Lr as predicateAwareClassFactory, Lt as runnableNodeOutputType, M as ExecutionMode, Mn as WorkflowSnapshotResolver, Mr as inject, Mt as WorkflowStoragePolicyMode, N as InputPortKey, Nn as HttpMethod, Nr as injectAll, Nt as WorkflowStoragePolicyResolver, O as ActivationIdFactory, On as WorkflowRepository, Or as RegistrationOptions, Ot as WorkflowNodeConnection, P as Item, Pn as TriggerInstanceId, Pr as injectable, Pt as WorkflowStoragePolicySpec, Q as NodeId, Qn as PendingNodeExecution, Qt as ExecutionContext, R as ItemInputMapperContext, Rn as WebhookTriggerResolution, Rr as registry, Rt as runnableNodeWireType, S as CredentialType, Sn as TriggerRuntimeDiagnostics, Sr as WorkflowExecutionRepository, St as WorkflowErrorContext, T as CredentialTypeRegistry, Tn as TriggerSetupStateRepository, Tr as Disposable, Tt as WorkflowGraph, U as JsonValue, Un as ConnectionInvocationId, Ur as EngineExecutionLimitsPolicyConfig, Ut as BinaryStorage, V as JsonObject, Vn as WorkflowActivationPolicy, Vt as BinaryAttachmentCreateRequest, W as MutableRunData, Wn as ConnectionInvocationRecord, Wr as RunEvent, Wt as BinaryStorageReadResult, X as NodeErrorHandlerArgs, Xn as NodeExecutionStatus, Xr as RetryPolicySpec, Xt as ExecutableTriggerNode, Y as NodeErrorHandler, Yn as NodeExecutionSnapshot, Yr as NoneRetryPolicySpec, Yt as EngineHost, Z as NodeErrorHandlerSpec, Zn as NodeInputsByPort, Zt as ExecutionBinaryService, _ as CredentialRequirement, _n as PersistedTriggerSetupState, _r as RunStopCondition, _t as TriggerNodeConfig, a as CredentialAuthDefinition, an as NodeActivationReceipt, ar as PersistedWorkflowSnapshotNode, at as PairedItemRef, b as CredentialSessionService, bn as TriggerCleanupHandle, br as WorkflowExecutionListingRepository, bt as UpstreamRefPlaceholder, c as CredentialFieldSchema, cn as NodeActivationScheduler, cr as RunCompletionNotifier, ct as PersistedTokenId, d as CredentialHealthTester, dn as NodeExecutionRequest, dr as RunExecutionOptions, dt as RunId, en as ItemNode, er as PersistedMutableRunState, et as NodeOffloadPolicy, f as CredentialInstanceId, fn as NodeExecutionRequestHandler, fr as RunPruneCandidate, ft as RunIdFactory, g as CredentialOAuth2AuthDefinition, gn as NodeResolver, gr as RunStatus, gt as RunnableNodeWireJson, h as CredentialMaterialSourceKind, hn as NodeExecutor, hr as RunStateResetRequest, ht as RunnableNodeOutputJson, i as AnyCredentialType, in as NodeActivationContinuation, ir as PersistedWorkflowSnapshot, it as OutputPortKey, j as Edge, jn as WorkflowSnapshotFactory, jr as delay, jt as WorkflowStoragePolicyDecisionArgs, k as BinaryAttachment, kn as WorkflowRunnerResolver, kr as TypeToken, kt as WorkflowPolicyRuntimeDefaults, l as CredentialHealth, ln as NodeBinaryAttachmentService, lr as RunCurrentState, lt as RunDataFactory, m as CredentialJsonRecord, mn as NodeExecutionStatePublisher, mr as RunResult, mt as RunnableNodeInputJson, n as InMemoryLiveWorkflowRepository, nn as MultiInputNode, nr as PersistedRunSchedulingState, nt as NodeRef, o as CredentialBinding, on as NodeActivationRequest, or as PersistedWorkflowTokenRegistryLike, ot as ParentExecutionRef, p as CredentialInstanceRecord, pn as NodeExecutionScheduler, pr as RunQueueEntry, pt as RunnableNodeConfig, q as NodeConnectionName, qn as ExecutionFrontierPlan, qr as ExponentialRetryPolicySpec, qt as BinaryStorageWriteResult, rn as Node, rr as PersistedRunState, rt as NodeSchedulerDecision, s as CredentialBindingKey, sn as NodeActivationRequestBase, sr as PinnedNodeOutputsByPort, st as PersistedRunPolicySnapshot, t as RunIntentService, tn as LiveWorkflowRepository, tr as PersistedRunControlState, tt as NodeOutputs, u as CredentialHealthStatus, un as NodeExecutionContext, ur as RunEventPublisherDeps, ut as RunDataSnapshot, v as CredentialSessionFactory, vn as PreparedNodeActivationDispatch, vr as RunSummary, vt as TriggerNodeOutputJson, w as CredentialTypeId, wn as TriggerSetupStateFor, wr as DependencyContainer, wt as WorkflowErrorHandlerSpec, x as CredentialSetupStatus, xn as TriggerNode, xr as WorkflowExecutionPruneRepository, xt as WorkflowDefinition, y as CredentialSessionFactoryArgs, yn as TestableTriggerNode, yr as WebhookRunResult, yt as TriggerNodeSetupState, z as Items, zn as WebhookTriggerRoutingDiagnostics, zr as singleton, zt as triggerNodeOutputType } from "./RunIntentService-Bkg4oYrM.cjs";
2
+ import { a as InProcessRetryRunner, i as UnavailableBinaryStorage, l as CredentialResolverFactory, n as InMemoryBinaryStorage, o as DefaultExecutionContextFactory, r as DefaultExecutionBinaryService, s as DefaultAsyncSleeper, t as InMemoryRunDataFactory } from "./InMemoryRunDataFactory-OUzDmAHt.cjs";
3
3
  import { ZodType, input, output, z } from "zod";
4
4
 
5
5
  //#region src/contracts/NoRetryPolicy.d.ts
@@ -197,17 +197,17 @@ declare class RunFinishedAtFactory {
197
197
  }
198
198
  //#endregion
199
199
  //#region src/workflow/dsl/workflowBuilderTypes.d.ts
200
- type AnyRunnableNodeConfig = RunnableNodeConfig<any, any>;
200
+ type AnyRunnableNodeConfig = RunnableNodeConfig<any, any, any>;
201
201
  type AnyTriggerNodeConfig = TriggerNodeConfig<any>;
202
- type ValidStepSequence<TCurrentJson, TSteps extends ReadonlyArray<AnyRunnableNodeConfig>> = TSteps extends readonly [] ? readonly [] : TSteps extends readonly [infer TFirst, ...infer TRest] ? TFirst extends RunnableNodeConfig<TCurrentJson, infer TNextJson> ? TRest extends ReadonlyArray<AnyRunnableNodeConfig> ? readonly [TFirst, ...ValidStepSequence<TNextJson, TRest>] : never : never : TSteps;
203
- type StepSequenceOutput<TCurrentJson, TSteps extends ReadonlyArray<AnyRunnableNodeConfig> | undefined> = TSteps extends ReadonlyArray<AnyRunnableNodeConfig> ? TSteps extends readonly [] ? TCurrentJson : TSteps extends readonly [infer TFirst, ...infer TRest] ? TFirst extends RunnableNodeConfig<TCurrentJson, infer TNextJson> ? TRest extends ReadonlyArray<AnyRunnableNodeConfig> ? StepSequenceOutput<TNextJson, TRest> : never : never : TCurrentJson : TCurrentJson;
202
+ type ValidStepSequence<TCurrentJson, TSteps extends ReadonlyArray<AnyRunnableNodeConfig>> = TSteps extends readonly [] ? readonly [] : TSteps extends readonly [infer TFirst, ...infer TRest] ? TFirst extends RunnableNodeConfig<infer _TIn, infer TNextJson, TCurrentJson> ? TRest extends ReadonlyArray<AnyRunnableNodeConfig> ? readonly [TFirst, ...ValidStepSequence<TNextJson, TRest>] : never : never : TSteps;
203
+ type StepSequenceOutput<TCurrentJson, TSteps extends ReadonlyArray<AnyRunnableNodeConfig> | undefined> = TSteps extends ReadonlyArray<AnyRunnableNodeConfig> ? TSteps extends readonly [] ? TCurrentJson : TSteps extends readonly [infer TFirst, ...infer TRest] ? TFirst extends RunnableNodeConfig<infer _TIn, infer TNextJson, TCurrentJson> ? TRest extends ReadonlyArray<AnyRunnableNodeConfig> ? StepSequenceOutput<TNextJson, TRest> : never : never : TCurrentJson : TCurrentJson;
204
204
  type TypesMatch<TLeft, TRight> = [TLeft] extends [TRight] ? ([TRight] extends [TLeft] ? true : false) : false;
205
205
  type BranchOutputGuard<TCurrentJson, TTrueSteps extends ReadonlyArray<AnyRunnableNodeConfig> | undefined, TFalseSteps extends ReadonlyArray<AnyRunnableNodeConfig> | undefined> = TypesMatch<StepSequenceOutput<TCurrentJson, TTrueSteps>, StepSequenceOutput<TCurrentJson, TFalseSteps>> extends true ? unknown : never;
206
206
  type BranchStepsArg<TCurrentJson, TSteps extends ReadonlyArray<AnyRunnableNodeConfig>> = TSteps & ValidStepSequence<TCurrentJson, TSteps>;
207
- type BranchMoreArgs<TCurrentJson, TFirstStep extends RunnableNodeConfig<TCurrentJson, any>, TRestSteps extends ReadonlyArray<AnyRunnableNodeConfig>> = TRestSteps & ValidStepSequence<RunnableNodeOutputJson<TFirstStep>, TRestSteps>;
207
+ type BranchMoreArgs<TCurrentJson, TFirstStep extends RunnableNodeConfig<any, any, TCurrentJson>, TRestSteps extends ReadonlyArray<AnyRunnableNodeConfig>> = TRestSteps & ValidStepSequence<RunnableNodeOutputJson<TFirstStep>, TRestSteps>;
208
208
  type BooleanWhenOverloads<TCurrentJson, TReturn> = {
209
209
  <TSteps extends ReadonlyArray<AnyRunnableNodeConfig>>(branch: boolean, steps: BranchStepsArg<TCurrentJson, TSteps>): TReturn;
210
- <TFirstStep extends RunnableNodeConfig<TCurrentJson, any>, TRestSteps extends ReadonlyArray<AnyRunnableNodeConfig>>(branch: boolean, step: TFirstStep, ...more: BranchMoreArgs<TCurrentJson, TFirstStep, TRestSteps>): TReturn;
210
+ <TFirstStep extends RunnableNodeConfig<any, any, TCurrentJson>, TRestSteps extends ReadonlyArray<AnyRunnableNodeConfig>>(branch: boolean, step: TFirstStep, ...more: BranchMoreArgs<TCurrentJson, TFirstStep, TRestSteps>): TReturn;
211
211
  };
212
212
  //#endregion
213
213
  //#region src/workflow/dsl/WhenBuilder.d.ts
@@ -233,7 +233,7 @@ declare class ChainCursor<TCurrentJson> {
233
233
  private readonly cursor;
234
234
  private readonly cursorOutput;
235
235
  constructor(wf: WorkflowBuilder, cursor: NodeRef, cursorOutput: OutputPortKey);
236
- then<TConfig$1 extends RunnableNodeConfig<TCurrentJson, any>>(config: TConfig$1): ChainCursor<RunnableNodeOutputJson<TConfig$1>>;
236
+ then<TInputJson, TOutputJson, TConfig$1 extends RunnableNodeConfig<TInputJson, TOutputJson, TCurrentJson>>(config: TConfig$1): ChainCursor<RunnableNodeOutputJson<TConfig$1>>;
237
237
  readonly when: ChainCursorWhenOverloads<TCurrentJson>;
238
238
  build(): WorkflowDefinition;
239
239
  }
@@ -359,17 +359,35 @@ interface DefinedNodeRunContext<TConfig$1 extends CredentialJsonRecord, TBinding
359
359
  readonly credentials: DefinedNodeCredentialAccessors<TBindings>;
360
360
  readonly execution: NodeExecutionContext<RunnableNodeConfig<TConfig$1, unknown>>;
361
361
  }
362
- interface DefinedNode<TKey$1 extends string, TConfig$1 extends CredentialJsonRecord, TInputJson, TOutputJson, _TBindings extends DefinedNodeCredentialBindings | undefined = undefined> {
362
+ /**
363
+ * Arguments for {@link defineNode} `executeOne` (engine `ctx` matches {@link ItemNode.executeOne};
364
+ * the second callback parameter adds {@link DefinedNodeRunContext} for credential accessors).
365
+ */
366
+ type DefineNodeExecuteOneArgs<TConfig$1 extends CredentialJsonRecord, TInputJson, TWireJson> = Readonly<{
367
+ input: TInputJson;
368
+ item: Item;
369
+ itemIndex: number;
370
+ items: Items;
371
+ ctx: NodeExecutionContext<RunnableNodeConfig<TInputJson, unknown, TWireJson> & Readonly<{
372
+ config: TConfig$1;
373
+ }>>;
374
+ }>;
375
+ interface DefinedNode<TKey$1 extends string, TConfig$1 extends CredentialJsonRecord, TInputJson, TOutputJson, _TBindings extends DefinedNodeCredentialBindings | undefined = undefined, TWireJson = TInputJson> {
363
376
  readonly kind: "defined-node";
364
377
  readonly key: TKey$1;
365
378
  readonly title: string;
366
379
  readonly description?: string;
367
- create(config: TConfig$1, name?: string, id?: string): RunnableNodeConfig<TInputJson, TOutputJson>;
380
+ create(config: TConfig$1, name?: string, id?: string): RunnableNodeConfig<TInputJson, TOutputJson, TWireJson>;
368
381
  register(context: {
369
382
  registerNode<TValue>(token: TypeToken<TValue>, implementation?: TypeToken<TValue>): void;
370
383
  }): void;
371
384
  }
372
- interface DefineNodeOptions<TKey$1 extends string, TConfig$1 extends CredentialJsonRecord, TInputJson, TOutputJson, TBindings extends DefinedNodeCredentialBindings | undefined = undefined> {
385
+ /**
386
+ * Plugin / DSL-friendly node: **one item in, one item out** per engine activation step.
387
+ * The engine applies {@link RunnableNodeConfig.mapInput} (if any) + {@link RunnableNodeConfig.inputSchema}
388
+ * before `executeOne`. Use {@link defineBatchNode} for legacy batch `run(items, …)` semantics.
389
+ */
390
+ interface DefineNodeOptions<TKey$1 extends string, TConfig$1 extends CredentialJsonRecord, TInputJson, TOutputJson, TBindings extends DefinedNodeCredentialBindings | undefined = undefined, TWireJson = TInputJson> {
373
391
  readonly key: TKey$1;
374
392
  readonly title: string;
375
393
  readonly description?: string;
@@ -378,12 +396,35 @@ interface DefineNodeOptions<TKey$1 extends string, TConfig$1 extends CredentialJ
378
396
  * The Next host resolves Lucide (`lucide:…`), built-in SVGs (`builtin:…`), Simple Icons (`si:…`), and image URLs (`https:`, `data:`, `/…`).
379
397
  */
380
398
  readonly icon?: string;
399
+ /** Default values / form hints for **static** node configuration (credentials, retry, IDs), not per-item payload. */
400
+ readonly input?: Readonly<Record<keyof TConfig$1 & string, unknown>>;
401
+ readonly configSchema?: z.ZodType<TConfig$1>;
402
+ readonly credentials?: TBindings;
403
+ /**
404
+ * Validates **`input`** after optional {@link mapInput} (engine also accepts `inputSchema` on the node class).
405
+ */
406
+ readonly inputSchema?: ZodType<TInputJson>;
407
+ /**
408
+ * Maps wire JSON (`item.json` from upstream) to execute input before validation.
409
+ */
410
+ readonly mapInput?: ItemInputMapper<TWireJson, TInputJson>;
411
+ executeOne(args: DefineNodeExecuteOneArgs<TConfig$1, TInputJson, TWireJson>, context: DefinedNodeRunContext<TConfig$1, TBindings>): MaybePromise$1<TOutputJson>;
412
+ }
413
+ /**
414
+ * Batch-oriented defined node (legacy): receives all items at once via `run`.
415
+ */
416
+ interface DefineBatchNodeOptions<TKey$1 extends string, TConfig$1 extends CredentialJsonRecord, TInputJson, TOutputJson, TBindings extends DefinedNodeCredentialBindings | undefined = undefined> {
417
+ readonly key: TKey$1;
418
+ readonly title: string;
419
+ readonly description?: string;
420
+ readonly icon?: string;
381
421
  readonly input?: Readonly<Record<keyof TConfig$1 & string, unknown>>;
382
422
  readonly configSchema?: z.ZodType<TConfig$1>;
383
423
  readonly credentials?: TBindings;
384
424
  run(items: ReadonlyArray<TInputJson>, context: DefinedNodeRunContext<TConfig$1, TBindings>): MaybePromise$1<ReadonlyArray<TOutputJson>>;
385
425
  }
386
- declare function defineNode<TKey$1 extends string, TConfig$1 extends CredentialJsonRecord, TInputJson, TOutputJson, TBindings extends DefinedNodeCredentialBindings | undefined = undefined>(options: DefineNodeOptions<TKey$1, TConfig$1, TInputJson, TOutputJson, TBindings>): DefinedNode<TKey$1, TConfig$1, TInputJson, TOutputJson, TBindings>;
426
+ declare function defineNode<TKey$1 extends string, TConfig$1 extends CredentialJsonRecord, TInputJson, TOutputJson, TBindings extends DefinedNodeCredentialBindings | undefined = undefined, TWireJson = TInputJson>(options: DefineNodeOptions<TKey$1, TConfig$1, TInputJson, TOutputJson, TBindings, TWireJson>): DefinedNode<TKey$1, TConfig$1, TInputJson, TOutputJson, TBindings, TWireJson>;
427
+ declare function defineBatchNode<TKey$1 extends string, TConfig$1 extends CredentialJsonRecord, TInputJson, TOutputJson, TBindings extends DefinedNodeCredentialBindings | undefined = undefined>(options: DefineBatchNodeOptions<TKey$1, TConfig$1, TInputJson, TOutputJson, TBindings>): DefinedNode<TKey$1, TConfig$1, TInputJson, TOutputJson, TBindings, TInputJson>;
387
428
  //#endregion
388
429
  //#region src/authoring/DefinedNodeRegistry.d.ts
389
430
  declare class DefinedNodeRegistry {
@@ -414,7 +455,7 @@ declare function defineCredential<TPublicSource extends CredentialFieldMap<any>
414
455
  };
415
456
  //#endregion
416
457
  //#region src/ai/NodeBackedToolConfig.d.ts
417
- declare class NodeBackedToolConfig<TNodeConfig extends RunnableNodeConfig<any, any>, TInputSchema extends ZodSchemaAny, TOutputSchema extends ZodSchemaAny> implements ToolConfig {
458
+ declare class NodeBackedToolConfig<TNodeConfig extends RunnableNodeConfig<any, any, any>, TInputSchema extends ZodSchemaAny, TOutputSchema extends ZodSchemaAny> implements ToolConfig {
418
459
  readonly name: string;
419
460
  readonly node: TNodeConfig;
420
461
  readonly type: TypeToken<unknown>;
@@ -437,7 +478,7 @@ declare class NodeBackedToolConfig<TNodeConfig extends RunnableNodeConfig<any, a
437
478
  //#endregion
438
479
  //#region src/ai/AgentToolFactory.d.ts
439
480
  declare class AgentToolFactoryImpl {
440
- asTool<TNodeConfig extends RunnableNodeConfig<any, any>, TInputSchema extends ZodSchemaAny, TOutputSchema extends ZodSchemaAny>(node: TNodeConfig, options: Readonly<{
481
+ asTool<TNodeConfig extends RunnableNodeConfig<any, any, any>, TInputSchema extends ZodSchemaAny, TOutputSchema extends ZodSchemaAny>(node: TNodeConfig, options: Readonly<{
441
482
  name?: string;
442
483
  } & NodeBackedToolConfigOptions<TNodeConfig, TInputSchema, TOutputSchema>>): NodeBackedToolConfig<TNodeConfig, TInputSchema, TOutputSchema>;
443
484
  private withDefaultAgentInputMapper;
@@ -448,7 +489,13 @@ declare const AgentToolFactory: AgentToolFactoryImpl;
448
489
  //#endregion
449
490
  //#region src/ai/AgentMessageConfigNormalizerFactory.d.ts
450
491
  declare class AgentMessageConfigNormalizer {
492
+ /**
493
+ * Prefer {@code input.messages} when present (ItemNode / engine-mapped payloads); otherwise resolve from
494
+ * {@link AgentNodeConfig.messages} templates.
495
+ */
496
+ static resolveFromInputOrConfig<TInputJson, TOutputJson>(input: unknown, config: AgentNodeConfig<TInputJson, TOutputJson>, args: AgentMessageBuildArgs<TInputJson>): ReadonlyArray<AgentMessageDto>;
451
497
  static normalize<TInputJson, TOutputJson>(config: AgentNodeConfig<TInputJson, TOutputJson>, args: AgentMessageBuildArgs<TInputJson>): ReadonlyArray<AgentMessageDto>;
498
+ private static tryMessagesFromStructuredInput;
452
499
  private static normalizeRichMessages;
453
500
  private static lineToDto;
454
501
  }
@@ -557,7 +604,7 @@ interface ChatModelFactory<TConfig$1 extends ChatModelConfig = ChatModelConfig>
557
604
  ctx: NodeExecutionContext<any>;
558
605
  }>): Promise<LangChainChatModelLike> | LangChainChatModelLike;
559
606
  }
560
- type NodeBackedToolInputMapperArgs<TNodeConfig extends RunnableNodeConfig<any, any>, TToolInput = unknown> = Readonly<{
607
+ type NodeBackedToolInputMapperArgs<TNodeConfig extends RunnableNodeConfig<any, any, any>, TToolInput = unknown> = Readonly<{
561
608
  input: TToolInput;
562
609
  item: Item;
563
610
  itemIndex: number;
@@ -565,7 +612,7 @@ type NodeBackedToolInputMapperArgs<TNodeConfig extends RunnableNodeConfig<any, a
565
612
  ctx: NodeExecutionContext<any>;
566
613
  node: TNodeConfig;
567
614
  }>;
568
- type NodeBackedToolOutputMapperArgs<TNodeConfig extends RunnableNodeConfig<any, any>, TToolInput = unknown> = Readonly<{
615
+ type NodeBackedToolOutputMapperArgs<TNodeConfig extends RunnableNodeConfig<any, any, any>, TToolInput = unknown> = Readonly<{
569
616
  input: TToolInput;
570
617
  item: Item;
571
618
  itemIndex: number;
@@ -574,9 +621,9 @@ type NodeBackedToolOutputMapperArgs<TNodeConfig extends RunnableNodeConfig<any,
574
621
  node: TNodeConfig;
575
622
  outputs: NodeOutputs;
576
623
  }>;
577
- type NodeBackedToolInputMapper<TNodeConfig extends RunnableNodeConfig<any, any>, TToolInput = unknown> = (args: NodeBackedToolInputMapperArgs<TNodeConfig, TToolInput>) => Item<RunnableNodeInputJson<TNodeConfig>> | RunnableNodeInputJson<TNodeConfig>;
578
- type NodeBackedToolOutputMapper<TNodeConfig extends RunnableNodeConfig<any, any>, TToolInput = unknown, TToolOutput = unknown> = (args: NodeBackedToolOutputMapperArgs<TNodeConfig, TToolInput>) => TToolOutput;
579
- type NodeBackedToolConfigOptions<TNodeConfig extends RunnableNodeConfig<any, any>, TInputSchema extends ZodSchemaAny, TOutputSchema extends ZodSchemaAny> = Readonly<{
624
+ type NodeBackedToolInputMapper<TNodeConfig extends RunnableNodeConfig<any, any, any>, TToolInput = unknown> = (args: NodeBackedToolInputMapperArgs<TNodeConfig, TToolInput>) => Item<RunnableNodeInputJson<TNodeConfig>> | RunnableNodeInputJson<TNodeConfig>;
625
+ type NodeBackedToolOutputMapper<TNodeConfig extends RunnableNodeConfig<any, any, any>, TToolInput = unknown, TToolOutput = unknown> = (args: NodeBackedToolOutputMapperArgs<TNodeConfig, TToolInput>) => TToolOutput;
626
+ type NodeBackedToolConfigOptions<TNodeConfig extends RunnableNodeConfig<any, any, any>, TInputSchema extends ZodSchemaAny, TOutputSchema extends ZodSchemaAny> = Readonly<{
580
627
  description?: string;
581
628
  presentation?: AgentCanvasPresentation;
582
629
  inputSchema: TInputSchema;
@@ -584,7 +631,7 @@ type NodeBackedToolConfigOptions<TNodeConfig extends RunnableNodeConfig<any, any
584
631
  mapInput?: NodeBackedToolInputMapper<TNodeConfig, input<TInputSchema>>;
585
632
  mapOutput?: NodeBackedToolOutputMapper<TNodeConfig, input<TInputSchema>, output<TOutputSchema>>;
586
633
  }>;
587
- interface AgentNodeConfig<TInputJson = unknown, TOutputJson = unknown> extends RunnableNodeConfig<TInputJson, TOutputJson> {
634
+ interface AgentNodeConfig<TInputJson = unknown, TOutputJson = unknown, TWireJson = TInputJson> extends RunnableNodeConfig<TInputJson, TOutputJson, TWireJson> {
588
635
  readonly messages: AgentMessageConfig<TInputJson>;
589
636
  readonly chatModel: ChatModelConfig;
590
637
  readonly tools?: ReadonlyArray<ToolConfig>;
@@ -714,5 +761,5 @@ declare class ItemsInputNormalizer {
714
761
  private isItem;
715
762
  }
716
763
  //#endregion
717
- export { ActivationIdFactory, AgentAttachmentRole, AgentCanvasPresentation, AgentConfigInspector, type AgentConnectionCredentialSource, AgentConnectionNodeCollector, type AgentConnectionNodeDescriptor, type AgentConnectionNodeRole, AgentGuardrailConfig, AgentGuardrailDefaults, AgentMessageBuildArgs, AgentMessageConfig, AgentMessageConfigNormalizer, AgentMessageDto, AgentMessageLine, AgentMessageRole, AgentMessageTemplate, AgentMessageTemplateContent, AgentModelInvocationOptions, AgentNodeConfig, AgentTool, AgentToolCall, AgentToolCallPlanner, AgentToolDefinition, AgentToolExecuteArgs, AgentToolFactory, AgentToolToken, AgentTurnLimitBehavior, AllWorkflowsActiveWorkflowActivationPolicy, AnyCredentialType, AnyRunnableNodeConfig, AnyTriggerNodeConfig, BatchId, BinaryAttachment, BinaryAttachmentCreateRequest, BinaryBody, BinaryPreviewKind, BinaryStorage, BinaryStorageReadResult, BinaryStorageStatResult, BinaryStorageWriteRequest, BinaryStorageWriteResult, BooleanWhenOverloads, BranchMoreArgs, BranchOutputGuard, BranchStepsArg, ChainCursor, ChatModelConfig, ChatModelFactory, type Clock, ConnectionInvocationAppendArgs, ConnectionInvocationId, ConnectionInvocationIdFactory, ConnectionInvocationKind, ConnectionInvocationRecord, ConnectionNodeIdFactory, Container, CoreTokens, CredentialAuthDefinition, CredentialBinding, CredentialBindingKey, CredentialFieldSchema, CredentialHealth, CredentialHealthStatus, CredentialHealthTester, CredentialInstanceId, CredentialInstanceRecord, CredentialJsonRecord, CredentialMaterialSourceKind, CredentialOAuth2AuthDefinition, CredentialRequirement, CredentialResolverFactory, CredentialSessionFactory, CredentialSessionFactoryArgs, CredentialSessionService, CredentialSetupStatus, CredentialType, CredentialTypeDefinition, CredentialTypeId, CredentialTypeRegistry, CredentialUnboundError, CurrentStateExecutionRequest, DefaultAsyncSleeper, DefaultExecutionBinaryService, DefaultExecutionContextFactory, DefaultWorkflowGraphFactory, DefineCredentialOptions, DefineNodeOptions, DefinedNode, DefinedNodeCredentialAccessors, DefinedNodeCredentialBinding, DefinedNodeCredentialBindings, DefinedNodeRegistry, DefinedNodeRunContext, DependencyContainer, Disposable, Edge, EngineDeps, EngineExecutionLimitsPolicy, type EngineExecutionLimitsPolicyConfig, EngineHost, EngineRunCounters, EventPublishingWorkflowExecutionRepository, ExecutableTriggerNode, ExecutionBinaryService, ExecutionContext, ExecutionContextFactory, ExecutionFrontierPlan, ExecutionInstanceDto, ExecutionInstanceId, ExecutionMode, ExecutionPayloadPolicyFields, ExpRetryPolicy, ExponentialRetryPolicySpec, FixedRetryPolicySpec, HttpMethod, InMemoryBinaryStorage, InMemoryLiveWorkflowRepository, InMemoryRunDataFactory, InMemoryRunEventBus, InProcessRetryRunner, InjectableRuntimeDecoratorComposer, InjectionToken, InputPortKey, Item, ItemBinary, Items, ItemsInputNormalizer, JsonArray, JsonObject, JsonPrimitive, JsonValue, LangChainChatModelLike, Lifecycle, LiveWorkflowRepository, MultiInputNode, MutableRunData, NoRetryPolicy, Node, NodeActivationContinuation, NodeActivationId, NodeActivationReceipt, NodeActivationRequest, NodeActivationRequestBase, NodeActivationScheduler, NodeBackedToolConfig, NodeBackedToolConfigOptions, NodeBackedToolInputMapper, NodeBackedToolInputMapperArgs, NodeBackedToolOutputMapper, NodeBackedToolOutputMapperArgs, NodeBinaryAttachmentService, NodeConfigBase, NodeConnectionName, NodeDefinition, NodeErrorHandler, NodeErrorHandlerArgs, NodeErrorHandlerSpec, NodeEventPublisher, NodeExecutionContext, NodeExecutionError, NodeExecutionRequest, NodeExecutionRequestHandler, NodeExecutionScheduler, NodeExecutionSnapshot, NodeExecutionStatePublisher, NodeExecutionStatus, NodeExecutor, NodeId, NodeInputsByPort, NodeKind, NodeOffloadPolicy, NodeOutputs, NodeRef, NodeResolver, NodeSchedulerDecision, NoneRetryPolicySpec, OAuth2ProviderFromPublicConfig, OutputPortKey, PairedItemRef, ParentExecutionRef, PayloadStorageKind, PendingNodeExecution, PersistedExecutionInstanceKind, PersistedExecutionInstanceRecord, PersistedMutableNodeState, PersistedMutableRunState, PersistedRunControlState, PersistedRunPolicySnapshot, PersistedRunSchedulingState, PersistedRunSlotProjectionRecord, PersistedRunState, PersistedRunWorkItemKind, PersistedRunWorkItemRecord, type PersistedRuntimeTypeDecoratorOptions, type PersistedRuntimeTypeKind, type PersistedRuntimeTypeMetadata, PersistedRuntimeTypeMetadataStore, PersistedRuntimeTypeNameResolver, PersistedTokenId, PersistedTriggerSetupState, PersistedWorkflowSnapshot, PersistedWorkflowSnapshotNode, PersistedWorkflowTokenRegistryLike, PinnedNodeOutputsByPort, PreparedNodeActivationDispatch, RegistrationOptions, RetryPolicy, RetryPolicySpec, RunCompletionNotifier, RunCurrentState, RunDataFactory, RunDataSnapshot, RunEvent, RunEventBus, RunEventPublisherDeps, RunEventSubscription, RunExecutionOptions, RunFinishedAtFactory, RunId, RunIdFactory, RunIntentService, RunPruneCandidate, RunQueueEntry, RunResult, RunRevision, RunSlotProjectionState, RunStateResetRequest, RunStatus, RunStopCondition, RunSummary, RunnableNodeConfig, RunnableNodeInputJson, RunnableNodeOutputJson, SlotExecutionStateDto, StackTraceCallSitePathResolver, StepSequenceOutput, SystemClock, TestableTriggerNode, Tool, ToolConfig, ToolExecuteArgs, TriggerCleanupHandle, TriggerInstanceId, TriggerNode, TriggerNodeConfig, TriggerNodeOutputJson, TriggerNodeSetupState, TriggerRuntimeDiagnostics, TriggerSetupContext, TriggerSetupStateFor, TriggerSetupStateRepository, TriggerTestItemsContext, TypeToken, UnavailableBinaryStorage, UpstreamRefPlaceholder, ValidStepSequence, WebhookControlSignal, WebhookInvocationMatch, WebhookRunResult, WebhookTriggerMatcher, WebhookTriggerResolution, WebhookTriggerRoutingDiagnostics, WhenBuilder, WorkItemId, WorkItemStatus, WorkflowActivationPolicy, WorkflowBuilder, WorkflowDefinition, WorkflowDetailSelectionState, WorkflowErrorContext, WorkflowErrorHandler, WorkflowErrorHandlerSpec, WorkflowExecutableNodeClassifier, WorkflowExecutableNodeClassifierFactory, WorkflowExecutionListingRepository, WorkflowExecutionPruneRepository, WorkflowExecutionRepository, WorkflowGraph, WorkflowGraphFactory, WorkflowId, WorkflowNodeConnection, WorkflowNodeInstanceFactory, WorkflowPolicyRuntimeDefaults, WorkflowPrunePolicySpec, WorkflowRepository, WorkflowRunDetailDto, WorkflowRunnerResolver, WorkflowRunnerService, WorkflowSnapshotFactory, WorkflowSnapshotResolver, WorkflowStoragePolicyDecisionArgs, WorkflowStoragePolicyMode, WorkflowStoragePolicyResolver, WorkflowStoragePolicySpec, ZodSchemaAny, branchRef, chatModel, container, defineCredential, defineNode, delay, getPersistedRuntimeTypeMetadata, inject, injectAll, injectable, instanceCachingFactory, instancePerContainerCachingFactory, node, predicateAwareClassFactory, registry, runnableNodeInputType, runnableNodeOutputType, singleton, tool, triggerNodeOutputType, triggerNodeSetupStateType };
764
+ export { ActivationIdFactory, AgentAttachmentRole, AgentCanvasPresentation, AgentConfigInspector, type AgentConnectionCredentialSource, AgentConnectionNodeCollector, type AgentConnectionNodeDescriptor, type AgentConnectionNodeRole, AgentGuardrailConfig, AgentGuardrailDefaults, AgentMessageBuildArgs, AgentMessageConfig, AgentMessageConfigNormalizer, AgentMessageDto, AgentMessageLine, AgentMessageRole, AgentMessageTemplate, AgentMessageTemplateContent, AgentModelInvocationOptions, AgentNodeConfig, AgentTool, AgentToolCall, AgentToolCallPlanner, AgentToolDefinition, AgentToolExecuteArgs, AgentToolFactory, AgentToolToken, AgentTurnLimitBehavior, AllWorkflowsActiveWorkflowActivationPolicy, AnyCredentialType, AnyRunnableNodeConfig, AnyTriggerNodeConfig, BatchId, BinaryAttachment, BinaryAttachmentCreateRequest, BinaryBody, BinaryPreviewKind, BinaryStorage, BinaryStorageReadResult, BinaryStorageStatResult, BinaryStorageWriteRequest, BinaryStorageWriteResult, BooleanWhenOverloads, BranchMoreArgs, BranchOutputGuard, BranchStepsArg, ChainCursor, ChatModelConfig, ChatModelFactory, type Clock, ConnectionInvocationAppendArgs, ConnectionInvocationId, ConnectionInvocationIdFactory, ConnectionInvocationKind, ConnectionInvocationRecord, ConnectionNodeIdFactory, Container, CoreTokens, CredentialAuthDefinition, CredentialBinding, CredentialBindingKey, CredentialFieldSchema, CredentialHealth, CredentialHealthStatus, CredentialHealthTester, CredentialInstanceId, CredentialInstanceRecord, CredentialJsonRecord, CredentialMaterialSourceKind, CredentialOAuth2AuthDefinition, CredentialRequirement, CredentialResolverFactory, CredentialSessionFactory, CredentialSessionFactoryArgs, CredentialSessionService, CredentialSetupStatus, CredentialType, CredentialTypeDefinition, CredentialTypeId, CredentialTypeRegistry, CredentialUnboundError, CurrentStateExecutionRequest, DefaultAsyncSleeper, DefaultExecutionBinaryService, DefaultExecutionContextFactory, DefaultWorkflowGraphFactory, DefineBatchNodeOptions, DefineCredentialOptions, DefineNodeExecuteOneArgs, DefineNodeOptions, DefinedNode, DefinedNodeCredentialAccessors, DefinedNodeCredentialBinding, DefinedNodeCredentialBindings, DefinedNodeRegistry, DefinedNodeRunContext, DependencyContainer, Disposable, Edge, EngineDeps, EngineExecutionLimitsPolicy, type EngineExecutionLimitsPolicyConfig, EngineHost, EngineRunCounters, EventPublishingWorkflowExecutionRepository, ExecutableTriggerNode, ExecutionBinaryService, ExecutionContext, ExecutionContextFactory, ExecutionFrontierPlan, ExecutionInstanceDto, ExecutionInstanceId, ExecutionMode, ExecutionPayloadPolicyFields, ExpRetryPolicy, ExponentialRetryPolicySpec, FixedRetryPolicySpec, HttpMethod, InMemoryBinaryStorage, InMemoryLiveWorkflowRepository, InMemoryRunDataFactory, InMemoryRunEventBus, InProcessRetryRunner, InjectableRuntimeDecoratorComposer, InjectionToken, InputPortKey, Item, ItemBinary, ItemInputMapper, ItemInputMapperArgs, ItemInputMapperContext, ItemNode, Items, ItemsInputNormalizer, JsonArray, JsonObject, JsonPrimitive, JsonValue, LangChainChatModelLike, Lifecycle, LiveWorkflowRepository, MultiInputNode, MutableRunData, NoRetryPolicy, Node, NodeActivationContinuation, NodeActivationId, NodeActivationReceipt, NodeActivationRequest, NodeActivationRequestBase, NodeActivationScheduler, NodeBackedToolConfig, NodeBackedToolConfigOptions, NodeBackedToolInputMapper, NodeBackedToolInputMapperArgs, NodeBackedToolOutputMapper, NodeBackedToolOutputMapperArgs, NodeBinaryAttachmentService, NodeConfigBase, NodeConnectionName, NodeDefinition, NodeErrorHandler, NodeErrorHandlerArgs, NodeErrorHandlerSpec, NodeEventPublisher, NodeExecutionContext, NodeExecutionError, NodeExecutionRequest, NodeExecutionRequestHandler, NodeExecutionScheduler, NodeExecutionSnapshot, NodeExecutionStatePublisher, NodeExecutionStatus, NodeExecutor, NodeId, NodeInputsByPort, NodeKind, NodeOffloadPolicy, NodeOutputs, NodeRef, NodeResolver, NodeSchedulerDecision, NoneRetryPolicySpec, OAuth2ProviderFromPublicConfig, OutputPortKey, PairedItemRef, ParentExecutionRef, PayloadStorageKind, PendingNodeExecution, PersistedExecutionInstanceKind, PersistedExecutionInstanceRecord, PersistedMutableNodeState, PersistedMutableRunState, PersistedRunControlState, PersistedRunPolicySnapshot, PersistedRunSchedulingState, PersistedRunSlotProjectionRecord, PersistedRunState, PersistedRunWorkItemKind, PersistedRunWorkItemRecord, type PersistedRuntimeTypeDecoratorOptions, type PersistedRuntimeTypeKind, type PersistedRuntimeTypeMetadata, PersistedRuntimeTypeMetadataStore, PersistedRuntimeTypeNameResolver, PersistedTokenId, PersistedTriggerSetupState, PersistedWorkflowSnapshot, PersistedWorkflowSnapshotNode, PersistedWorkflowTokenRegistryLike, PinnedNodeOutputsByPort, PreparedNodeActivationDispatch, RegistrationOptions, RetryPolicy, RetryPolicySpec, RunCompletionNotifier, RunCurrentState, RunDataFactory, RunDataSnapshot, RunEvent, RunEventBus, RunEventPublisherDeps, RunEventSubscription, RunExecutionOptions, RunFinishedAtFactory, RunId, RunIdFactory, RunIntentService, RunPruneCandidate, RunQueueEntry, RunResult, RunRevision, RunSlotProjectionState, RunStateResetRequest, RunStatus, RunStopCondition, RunSummary, RunnableNodeConfig, RunnableNodeInputJson, RunnableNodeOutputJson, RunnableNodeWireJson, SlotExecutionStateDto, StackTraceCallSitePathResolver, StepSequenceOutput, SystemClock, TestableTriggerNode, Tool, ToolConfig, ToolExecuteArgs, TriggerCleanupHandle, TriggerInstanceId, TriggerNode, TriggerNodeConfig, TriggerNodeOutputJson, TriggerNodeSetupState, TriggerRuntimeDiagnostics, TriggerSetupContext, TriggerSetupStateFor, TriggerSetupStateRepository, TriggerTestItemsContext, TypeToken, UnavailableBinaryStorage, UpstreamRefPlaceholder, ValidStepSequence, WebhookControlSignal, WebhookInvocationMatch, WebhookRunResult, WebhookTriggerMatcher, WebhookTriggerResolution, WebhookTriggerRoutingDiagnostics, WhenBuilder, WorkItemId, WorkItemStatus, WorkflowActivationPolicy, WorkflowBuilder, WorkflowDefinition, WorkflowDetailSelectionState, WorkflowErrorContext, WorkflowErrorHandler, WorkflowErrorHandlerSpec, WorkflowExecutableNodeClassifier, WorkflowExecutableNodeClassifierFactory, WorkflowExecutionListingRepository, WorkflowExecutionPruneRepository, WorkflowExecutionRepository, WorkflowGraph, WorkflowGraphFactory, WorkflowId, WorkflowNodeConnection, WorkflowNodeInstanceFactory, WorkflowPolicyRuntimeDefaults, WorkflowPrunePolicySpec, WorkflowRepository, WorkflowRunDetailDto, WorkflowRunnerResolver, WorkflowRunnerService, WorkflowSnapshotFactory, WorkflowSnapshotResolver, WorkflowStoragePolicyDecisionArgs, WorkflowStoragePolicyMode, WorkflowStoragePolicyResolver, WorkflowStoragePolicySpec, ZodSchemaAny, branchRef, chatModel, container, defineBatchNode, defineCredential, defineNode, delay, getPersistedRuntimeTypeMetadata, inject, injectAll, injectable, instanceCachingFactory, instancePerContainerCachingFactory, node, predicateAwareClassFactory, registry, runnableNodeInputType, runnableNodeOutputType, runnableNodeWireType, singleton, tool, triggerNodeOutputType, triggerNodeSetupStateType };
718
765
  //# sourceMappingURL=index.d.cts.map
package/dist/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- import { $ as CredentialHealthTester, $n as PersistedTriggerSetupState, $r as RunStopCondition, $t as RunnableNodeInputJson, A as ExecutionInstanceDto, Ai as RetryPolicy, An as BinaryStorageWriteResult, Ar as NodeExecutionError, At as NodeActivationId, B as RunSlotProjectionState, Bn as NodeActivationContinuation, Br as PersistedWorkflowSnapshot, Bt as NodeOutputs, C as BranchOutputGuard, Cn as triggerNodeSetupStateType, Cr as WorkflowActivationPolicy, Ct as ItemBinary, D as RunFinishedAtFactory, Di as RunEventBus, Dn as BinaryStorageReadResult, Dr as CurrentStateExecutionRequest, Dt as JsonPrimitive, E as ValidStepSequence, Ei as RunEvent, En as BinaryStorage, Er as ConnectionInvocationRecord, Et as JsonObject, F as PersistedExecutionInstanceRecord, Fi as RetryPolicySpec, Fn as ExecutionContext, Fr as PersistedMutableNodeState, Ft as NodeErrorHandlerArgs, G as WorkflowRunDetailDto, Gn as NodeBinaryAttachmentService, Gr as RunCurrentState, Gt as ParentExecutionRef, H as WorkItemId, Hn as NodeActivationRequest, Hr as PersistedWorkflowTokenRegistryLike, Ht as NodeSchedulerDecision, I as PersistedRunSlotProjectionRecord, In as ExecutionContextFactory, Ir as PersistedMutableRunState, It as NodeErrorHandlerSpec, J as CredentialBinding, Jn as NodeExecutionRequestHandler, Jr as RunPruneCandidate, Jt as RunDataFactory, K as AnyCredentialType, Kn as NodeExecutionContext, Kr as RunEventPublisherDeps, Kt as PersistedRunPolicySnapshot, L as PersistedRunWorkItemKind, Ln as LiveWorkflowRepository, Lr as PersistedRunControlState, Lt as NodeId, M as ExecutionPayloadPolicyFields, Mi as ExponentialRetryPolicySpec, Mn as EngineHost, Mr as NodeExecutionStatus, Mt as NodeConnectionName, N as PayloadStorageKind, Ni as FixedRetryPolicySpec, Nn as ExecutableTriggerNode, Nr as NodeInputsByPort, Nt as NodeDefinition, O as BatchId, Oi as RunEventSubscription, On as BinaryStorageStatResult, Or as EngineRunCounters, Ot as JsonValue, P as PersistedExecutionInstanceKind, Pi as NoneRetryPolicySpec, Pn as ExecutionBinaryService, Pr as PendingNodeExecution, Pt as NodeErrorHandler, Q as CredentialHealthStatus, Qn as NodeResolver, Qr as RunStatus, Qt as RunnableNodeConfig, R as PersistedRunWorkItemRecord, Rn as MultiInputNode, Rr as PersistedRunSchedulingState, Rt as NodeKind, S as BranchMoreArgs, Si as CoreTokens, Sn as triggerNodeOutputType, Sr as AllWorkflowsActiveWorkflowActivationPolicy, St as Item, T as StepSequenceOutput, Ti as EngineExecutionLimitsPolicyConfig, Tn as BinaryBody, Tr as ConnectionInvocationId, Tt as JsonArray, U as WorkItemStatus, Un as NodeActivationRequestBase, Ur as PinnedNodeOutputsByPort, Ut as OutputPortKey, V as SlotExecutionStateDto, Vn as NodeActivationReceipt, Vr as PersistedWorkflowSnapshotNode, Vt as NodeRef, W as WorkflowDetailSelectionState, Wn as NodeActivationScheduler, Wr as RunCompletionNotifier, Wt as PairedItemRef, X as CredentialFieldSchema, Xn as NodeExecutionStatePublisher, Xr as RunResult, Xt as RunId, Y as CredentialBindingKey, Yn as NodeExecutionScheduler, Yr as RunQueueEntry, Yt as RunDataSnapshot, Z as CredentialHealth, Zn as NodeExecutor, Zr as RunStateResetRequest, Zt as RunIdFactory, _ as ChainCursor, _i as instanceCachingFactory, _n as WorkflowStoragePolicyResolver, _r as WebhookControlSignal, _t as BinaryAttachment, ai as Container, an as WorkflowDefinition, ar as TriggerSetupContext, at as CredentialRequirement, b as AnyTriggerNodeConfig, bi as registry, bn as runnableNodeInputType, br as WebhookTriggerResolution, bt as ExecutionMode, ci as InjectionToken, cn as WorkflowErrorHandlerSpec, cr as TriggerTestItemsContext, ct as CredentialSessionService, d as DefaultWorkflowGraphFactory, di as TypeToken, dn as WorkflowId, dr as WorkflowRunnerResolver, dt as CredentialTypeDefinition, ei as RunSummary, en as RunnableNodeOutputJson, er as PreparedNodeActivationDispatch, et as CredentialInstanceId, f as WorkflowExecutableNodeClassifierFactory, fi as container, fn as WorkflowNodeConnection, fr as WorkflowRunnerService, ft as CredentialTypeId, g as WorkflowBuilder, gi as injectable, gn as WorkflowStoragePolicyMode, gr as TriggerInstanceId, gt as ActivationIdFactory, h as ConnectionInvocationIdFactory, hi as injectAll, hn as WorkflowStoragePolicyDecisionArgs, hr as HttpMethod, ht as OAuth2ProviderFromPublicConfig, ii as WorkflowExecutionRepository, in as UpstreamRefPlaceholder, ir as TriggerRuntimeDiagnostics, it as CredentialOAuth2AuthDefinition, j as ExecutionInstanceId, ji as NoRetryPolicy, jn as EngineDeps, jr as NodeExecutionSnapshot, jt as NodeConfigBase, k as ConnectionInvocationKind, ki as ExpRetryPolicy, kn as BinaryStorageWriteRequest, kr as ExecutionFrontierPlan, kt as MutableRunData, li as Lifecycle, ln as WorkflowGraph, lr as WorkflowNodeInstanceFactory, lt as CredentialSetupStatus, m as ConnectionNodeIdFactory, mi as inject, mn as WorkflowPrunePolicySpec, mr as WorkflowSnapshotResolver, mt as CredentialUnboundError, n as InMemoryLiveWorkflowRepository, ni as WorkflowExecutionListingRepository, nn as TriggerNodeOutputJson, nr as TriggerCleanupHandle, nt as CredentialJsonRecord, oi as DependencyContainer, on as WorkflowErrorContext, or as TriggerSetupStateFor, ot as CredentialSessionFactory, p as WorkflowExecutableNodeClassifier, pi as delay, pn as WorkflowPolicyRuntimeDefaults, pr as WorkflowSnapshotFactory, pt as CredentialTypeRegistry, q as CredentialAuthDefinition, qn as NodeExecutionRequest, qr as RunExecutionOptions, qt as PersistedTokenId, ri as WorkflowExecutionPruneRepository, rn as TriggerNodeSetupState, rr as TriggerNode, rt as CredentialMaterialSourceKind, si as Disposable, sn as WorkflowErrorHandler, sr as TriggerSetupStateRepository, st as CredentialSessionFactoryArgs, t as RunIntentService, ti as WebhookRunResult, tn as TriggerNodeConfig, tr as TestableTriggerNode, tt as CredentialInstanceRecord, ui as RegistrationOptions, un as WorkflowGraphFactory, ur as WorkflowRepository, ut as CredentialType, v as WhenBuilder, vi as instancePerContainerCachingFactory, vn as WorkflowStoragePolicySpec, vr as WebhookInvocationMatch, vt as BinaryPreviewKind, w as BranchStepsArg, wi as EngineExecutionLimitsPolicy, wn as BinaryAttachmentCreateRequest, wr as ConnectionInvocationAppendArgs, wt as Items, x as BooleanWhenOverloads, xi as singleton, xn as runnableNodeOutputType, xr as WebhookTriggerRoutingDiagnostics, xt as InputPortKey, y as AnyRunnableNodeConfig, yi as predicateAwareClassFactory, yn as branchRef, yr as WebhookTriggerMatcher, yt as Edge, z as RunRevision, zn as Node, zr as PersistedRunState, zt as NodeOffloadPolicy } from "./RunIntentService-BCvGdOSY.js";
2
- import { $ as LangChainChatModelLike, A as AgentConnectionNodeRole, B as AgentMessageTemplate, C as PersistedRuntimeTypeKind, Ct as Clock, D as AgentConnectionCredentialSource, Dt as InProcessRetryRunner, E as InMemoryRunEventBus, F as AgentMessageBuildArgs, G as AgentToolCall, H as AgentModelInvocationOptions, I as AgentMessageConfig, J as AgentToolExecuteArgs, K as AgentToolCallPlanner, L as AgentMessageDto, M as AgentCanvasPresentation, Mt as NodeEventPublisher, N as AgentGuardrailConfig, O as AgentConnectionNodeCollector, Ot as DefaultExecutionContextFactory, P as AgentGuardrailDefaults, Q as ChatModelFactory, R as AgentMessageLine, S as PersistedRuntimeTypeDecoratorOptions, St as defineNode, T as EventPublishingWorkflowExecutionRepository, U as AgentNodeConfig, V as AgentMessageTemplateContent, W as AgentTool, X as AgentTurnLimitBehavior, Y as AgentToolToken, Z as ChatModelConfig, _ as tool, _t as DefinedNode, at as Tool, b as PersistedRuntimeTypeMetadataStore, bt as DefinedNodeCredentialBindings, ct as ZodSchemaAny, d as DefaultExecutionBinaryService, dt as AgentToolFactory, et as NodeBackedToolConfigOptions, f as UnavailableBinaryStorage, ft as NodeBackedToolConfig, g as node, gt as DefineNodeOptions, h as getPersistedRuntimeTypeMetadata, ht as DefinedNodeRegistry, it as NodeBackedToolOutputMapperArgs, j as AgentAttachmentRole, jt as CredentialResolverFactory, k as AgentConnectionNodeDescriptor, kt as DefaultAsyncSleeper, l as InMemoryRunDataFactory, lt as AgentConfigInspector, m as chatModel, mt as defineCredential, nt as NodeBackedToolInputMapperArgs, ot as ToolConfig, p as ItemsInputNormalizer, pt as DefineCredentialOptions, q as AgentToolDefinition, rt as NodeBackedToolOutputMapper, st as ToolExecuteArgs, tt as NodeBackedToolInputMapper, u as InMemoryBinaryStorage, ut as AgentMessageConfigNormalizer, v as StackTraceCallSitePathResolver, vt as DefinedNodeCredentialAccessors, w as PersistedRuntimeTypeMetadata, wt as SystemClock, x as InjectableRuntimeDecoratorComposer, xt as DefinedNodeRunContext, y as PersistedRuntimeTypeNameResolver, yt as DefinedNodeCredentialBinding, z as AgentMessageRole } from "./index-CueSzHsf.js";
3
- export { ActivationIdFactory, AgentAttachmentRole, AgentCanvasPresentation, AgentConfigInspector, AgentConnectionCredentialSource, AgentConnectionNodeCollector, AgentConnectionNodeDescriptor, AgentConnectionNodeRole, AgentGuardrailConfig, AgentGuardrailDefaults, AgentMessageBuildArgs, AgentMessageConfig, AgentMessageConfigNormalizer, AgentMessageDto, AgentMessageLine, AgentMessageRole, AgentMessageTemplate, AgentMessageTemplateContent, AgentModelInvocationOptions, AgentNodeConfig, AgentTool, AgentToolCall, AgentToolCallPlanner, AgentToolDefinition, AgentToolExecuteArgs, AgentToolFactory, AgentToolToken, AgentTurnLimitBehavior, AllWorkflowsActiveWorkflowActivationPolicy, AnyCredentialType, AnyRunnableNodeConfig, AnyTriggerNodeConfig, BatchId, BinaryAttachment, BinaryAttachmentCreateRequest, BinaryBody, BinaryPreviewKind, BinaryStorage, BinaryStorageReadResult, BinaryStorageStatResult, BinaryStorageWriteRequest, BinaryStorageWriteResult, BooleanWhenOverloads, BranchMoreArgs, BranchOutputGuard, BranchStepsArg, ChainCursor, ChatModelConfig, ChatModelFactory, Clock, ConnectionInvocationAppendArgs, ConnectionInvocationId, ConnectionInvocationIdFactory, ConnectionInvocationKind, ConnectionInvocationRecord, ConnectionNodeIdFactory, Container, CoreTokens, CredentialAuthDefinition, CredentialBinding, CredentialBindingKey, CredentialFieldSchema, CredentialHealth, CredentialHealthStatus, CredentialHealthTester, CredentialInstanceId, CredentialInstanceRecord, CredentialJsonRecord, CredentialMaterialSourceKind, CredentialOAuth2AuthDefinition, CredentialRequirement, CredentialResolverFactory, CredentialSessionFactory, CredentialSessionFactoryArgs, CredentialSessionService, CredentialSetupStatus, CredentialType, CredentialTypeDefinition, CredentialTypeId, CredentialTypeRegistry, CredentialUnboundError, CurrentStateExecutionRequest, DefaultAsyncSleeper, DefaultExecutionBinaryService, DefaultExecutionContextFactory, DefaultWorkflowGraphFactory, DefineCredentialOptions, DefineNodeOptions, DefinedNode, DefinedNodeCredentialAccessors, DefinedNodeCredentialBinding, DefinedNodeCredentialBindings, DefinedNodeRegistry, DefinedNodeRunContext, DependencyContainer, Disposable, Edge, EngineDeps, EngineExecutionLimitsPolicy, EngineExecutionLimitsPolicyConfig, EngineHost, EngineRunCounters, EventPublishingWorkflowExecutionRepository, ExecutableTriggerNode, ExecutionBinaryService, ExecutionContext, ExecutionContextFactory, ExecutionFrontierPlan, ExecutionInstanceDto, ExecutionInstanceId, ExecutionMode, ExecutionPayloadPolicyFields, ExpRetryPolicy, ExponentialRetryPolicySpec, FixedRetryPolicySpec, HttpMethod, InMemoryBinaryStorage, InMemoryLiveWorkflowRepository, InMemoryRunDataFactory, InMemoryRunEventBus, InProcessRetryRunner, InjectableRuntimeDecoratorComposer, InjectionToken, InputPortKey, Item, ItemBinary, Items, ItemsInputNormalizer, JsonArray, JsonObject, JsonPrimitive, JsonValue, LangChainChatModelLike, Lifecycle, LiveWorkflowRepository, MultiInputNode, MutableRunData, NoRetryPolicy, Node, NodeActivationContinuation, NodeActivationId, NodeActivationReceipt, NodeActivationRequest, NodeActivationRequestBase, NodeActivationScheduler, NodeBackedToolConfig, NodeBackedToolConfigOptions, NodeBackedToolInputMapper, NodeBackedToolInputMapperArgs, NodeBackedToolOutputMapper, NodeBackedToolOutputMapperArgs, NodeBinaryAttachmentService, NodeConfigBase, NodeConnectionName, NodeDefinition, NodeErrorHandler, NodeErrorHandlerArgs, NodeErrorHandlerSpec, NodeEventPublisher, NodeExecutionContext, NodeExecutionError, NodeExecutionRequest, NodeExecutionRequestHandler, NodeExecutionScheduler, NodeExecutionSnapshot, NodeExecutionStatePublisher, NodeExecutionStatus, NodeExecutor, NodeId, NodeInputsByPort, NodeKind, NodeOffloadPolicy, NodeOutputs, NodeRef, NodeResolver, NodeSchedulerDecision, NoneRetryPolicySpec, OAuth2ProviderFromPublicConfig, OutputPortKey, PairedItemRef, ParentExecutionRef, PayloadStorageKind, PendingNodeExecution, PersistedExecutionInstanceKind, PersistedExecutionInstanceRecord, PersistedMutableNodeState, PersistedMutableRunState, PersistedRunControlState, PersistedRunPolicySnapshot, PersistedRunSchedulingState, PersistedRunSlotProjectionRecord, PersistedRunState, PersistedRunWorkItemKind, PersistedRunWorkItemRecord, PersistedRuntimeTypeDecoratorOptions, PersistedRuntimeTypeKind, PersistedRuntimeTypeMetadata, PersistedRuntimeTypeMetadataStore, PersistedRuntimeTypeNameResolver, PersistedTokenId, PersistedTriggerSetupState, PersistedWorkflowSnapshot, PersistedWorkflowSnapshotNode, PersistedWorkflowTokenRegistryLike, PinnedNodeOutputsByPort, PreparedNodeActivationDispatch, RegistrationOptions, RetryPolicy, RetryPolicySpec, RunCompletionNotifier, RunCurrentState, RunDataFactory, RunDataSnapshot, RunEvent, RunEventBus, RunEventPublisherDeps, RunEventSubscription, RunExecutionOptions, RunFinishedAtFactory, RunId, RunIdFactory, RunIntentService, RunPruneCandidate, RunQueueEntry, RunResult, RunRevision, RunSlotProjectionState, RunStateResetRequest, RunStatus, RunStopCondition, RunSummary, RunnableNodeConfig, RunnableNodeInputJson, RunnableNodeOutputJson, SlotExecutionStateDto, StackTraceCallSitePathResolver, StepSequenceOutput, SystemClock, TestableTriggerNode, Tool, ToolConfig, ToolExecuteArgs, TriggerCleanupHandle, TriggerInstanceId, TriggerNode, TriggerNodeConfig, TriggerNodeOutputJson, TriggerNodeSetupState, TriggerRuntimeDiagnostics, TriggerSetupContext, TriggerSetupStateFor, TriggerSetupStateRepository, TriggerTestItemsContext, TypeToken, UnavailableBinaryStorage, UpstreamRefPlaceholder, ValidStepSequence, WebhookControlSignal, WebhookInvocationMatch, WebhookRunResult, WebhookTriggerMatcher, WebhookTriggerResolution, WebhookTriggerRoutingDiagnostics, WhenBuilder, WorkItemId, WorkItemStatus, WorkflowActivationPolicy, WorkflowBuilder, WorkflowDefinition, WorkflowDetailSelectionState, WorkflowErrorContext, WorkflowErrorHandler, WorkflowErrorHandlerSpec, WorkflowExecutableNodeClassifier, WorkflowExecutableNodeClassifierFactory, WorkflowExecutionListingRepository, WorkflowExecutionPruneRepository, WorkflowExecutionRepository, WorkflowGraph, WorkflowGraphFactory, WorkflowId, WorkflowNodeConnection, WorkflowNodeInstanceFactory, WorkflowPolicyRuntimeDefaults, WorkflowPrunePolicySpec, WorkflowRepository, WorkflowRunDetailDto, WorkflowRunnerResolver, WorkflowRunnerService, WorkflowSnapshotFactory, WorkflowSnapshotResolver, WorkflowStoragePolicyDecisionArgs, WorkflowStoragePolicyMode, WorkflowStoragePolicyResolver, WorkflowStoragePolicySpec, ZodSchemaAny, branchRef, chatModel, container, defineCredential, defineNode, delay, getPersistedRuntimeTypeMetadata, inject, injectAll, injectable, instanceCachingFactory, instancePerContainerCachingFactory, node, predicateAwareClassFactory, registry, runnableNodeInputType, runnableNodeOutputType, singleton, tool, triggerNodeOutputType, triggerNodeSetupStateType };
1
+ import { $ as CredentialHealthTester, $n as NodeExecutionRequest, $r as RunExecutionOptions, $t as RunId, A as ExecutionInstanceDto, Ai as EngineExecutionLimitsPolicy, An as BinaryBody, Ar as ConnectionInvocationAppendArgs, At as JsonPrimitive, B as RunSlotProjectionState, Bi as NoneRetryPolicySpec, Bn as ExecutionContext, Br as PendingNodeExecution, Bt as NodeId, C as BranchOutputGuard, Ci as instanceCachingFactory, Cn as branchRef, Cr as WebhookControlSignal, Ct as ItemBinary, D as RunFinishedAtFactory, Di as singleton, Dn as triggerNodeOutputType, Dr as WebhookTriggerRoutingDiagnostics, Dt as Items, E as ValidStepSequence, Ei as registry, En as runnableNodeWireType, Er as WebhookTriggerResolution, Et as ItemInputMapperContext, F as PersistedExecutionInstanceRecord, Fi as ExpRetryPolicy, Fn as BinaryStorageWriteResult, Fr as ExecutionFrontierPlan, Ft as NodeConnectionName, G as WorkflowRunDetailDto, Gn as Node, Gr as PersistedRunState, Gt as NodeSchedulerDecision, H as WorkItemId, Hn as ItemNode, Hr as PersistedMutableRunState, Ht as NodeOffloadPolicy, I as PersistedRunSlotProjectionRecord, Ii as RetryPolicy, In as EngineDeps, Ir as NodeExecutionError, It as NodeDefinition, J as CredentialBinding, Jn as NodeActivationRequest, Jr as PersistedWorkflowTokenRegistryLike, Jt as ParentExecutionRef, K as AnyCredentialType, Kn as NodeActivationContinuation, Kr as PersistedWorkflowSnapshot, Kt as OutputPortKey, L as PersistedRunWorkItemKind, Li as NoRetryPolicy, Ln as EngineHost, Lr as NodeExecutionSnapshot, Lt as NodeErrorHandler, M as ExecutionPayloadPolicyFields, Mi as RunEvent, Mn as BinaryStorageReadResult, Mr as ConnectionInvocationRecord, Mt as MutableRunData, N as PayloadStorageKind, Ni as RunEventBus, Nn as BinaryStorageStatResult, Nr as CurrentStateExecutionRequest, Nt as NodeActivationId, O as BatchId, Oi as CoreTokens, On as triggerNodeSetupStateType, Or as AllWorkflowsActiveWorkflowActivationPolicy, Ot as JsonArray, P as PersistedExecutionInstanceKind, Pi as RunEventSubscription, Pn as BinaryStorageWriteRequest, Pr as EngineRunCounters, Pt as NodeConfigBase, Q as CredentialHealthStatus, Qn as NodeExecutionContext, Qr as RunEventPublisherDeps, Qt as RunDataSnapshot, R as PersistedRunWorkItemRecord, Ri as ExponentialRetryPolicySpec, Rn as ExecutableTriggerNode, Rr as NodeExecutionStatus, Rt as NodeErrorHandlerArgs, S as BranchMoreArgs, Si as injectable, Sn as WorkflowStoragePolicySpec, Sr as TriggerInstanceId, St as Item, T as StepSequenceOutput, Ti as predicateAwareClassFactory, Tn as runnableNodeOutputType, Tr as WebhookTriggerMatcher, Tt as ItemInputMapperArgs, U as WorkItemStatus, Un as LiveWorkflowRepository, Ur as PersistedRunControlState, Ut as NodeOutputs, V as SlotExecutionStateDto, Vi as RetryPolicySpec, Vn as ExecutionContextFactory, Vr as PersistedMutableNodeState, Vt as NodeKind, W as WorkflowDetailSelectionState, Wn as MultiInputNode, Wr as PersistedRunSchedulingState, Wt as NodeRef, X as CredentialFieldSchema, Xn as NodeActivationScheduler, Xr as RunCompletionNotifier, Xt as PersistedTokenId, Y as CredentialBindingKey, Yn as NodeActivationRequestBase, Yr as PinnedNodeOutputsByPort, Yt as PersistedRunPolicySnapshot, Z as CredentialHealth, Zn as NodeBinaryAttachmentService, Zr as RunCurrentState, Zt as RunDataFactory, _ as ChainCursor, _i as TypeToken, _n as WorkflowPolicyRuntimeDefaults, _r as WorkflowRunnerResolver, _t as BinaryAttachment, ai as RunStopCondition, an as TriggerNodeConfig, ar as PersistedTriggerSetupState, at as CredentialRequirement, b as AnyTriggerNodeConfig, bi as inject, bn as WorkflowStoragePolicyMode, br as WorkflowSnapshotResolver, bt as ExecutionMode, ci as WorkflowExecutionListingRepository, cn as UpstreamRefPlaceholder, cr as TriggerCleanupHandle, ct as CredentialSessionService, d as DefaultWorkflowGraphFactory, di as Container, dn as WorkflowErrorHandler, dr as TriggerSetupContext, dt as CredentialTypeDefinition, ei as RunPruneCandidate, en as RunIdFactory, er as NodeExecutionRequestHandler, et as CredentialInstanceId, f as WorkflowExecutableNodeClassifierFactory, fi as DependencyContainer, fn as WorkflowErrorHandlerSpec, fr as TriggerSetupStateFor, ft as CredentialTypeId, g as WorkflowBuilder, gi as RegistrationOptions, gn as WorkflowNodeConnection, gr as WorkflowRepository, gt as ActivationIdFactory, h as ConnectionInvocationIdFactory, hi as Lifecycle, hn as WorkflowId, hr as WorkflowNodeInstanceFactory, ht as OAuth2ProviderFromPublicConfig, ii as RunStatus, in as RunnableNodeWireJson, ir as NodeResolver, it as CredentialOAuth2AuthDefinition, j as ExecutionInstanceId, ji as EngineExecutionLimitsPolicyConfig, jn as BinaryStorage, jr as ConnectionInvocationId, jt as JsonValue, k as ConnectionInvocationKind, kn as BinaryAttachmentCreateRequest, kr as WorkflowActivationPolicy, kt as JsonObject, li as WorkflowExecutionPruneRepository, ln as WorkflowDefinition, lr as TriggerNode, lt as CredentialSetupStatus, m as ConnectionNodeIdFactory, mi as InjectionToken, mn as WorkflowGraphFactory, mr as TriggerTestItemsContext, mt as CredentialUnboundError, n as InMemoryLiveWorkflowRepository, ni as RunResult, nn as RunnableNodeInputJson, nr as NodeExecutionStatePublisher, nt as CredentialJsonRecord, oi as RunSummary, on as TriggerNodeOutputJson, or as PreparedNodeActivationDispatch, ot as CredentialSessionFactory, p as WorkflowExecutableNodeClassifier, pi as Disposable, pn as WorkflowGraph, pr as TriggerSetupStateRepository, pt as CredentialTypeRegistry, q as CredentialAuthDefinition, qn as NodeActivationReceipt, qr as PersistedWorkflowSnapshotNode, qt as PairedItemRef, ri as RunStateResetRequest, rn as RunnableNodeOutputJson, rr as NodeExecutor, rt as CredentialMaterialSourceKind, si as WebhookRunResult, sn as TriggerNodeSetupState, sr as TestableTriggerNode, st as CredentialSessionFactoryArgs, t as RunIntentService, ti as RunQueueEntry, tn as RunnableNodeConfig, tr as NodeExecutionScheduler, tt as CredentialInstanceRecord, ui as WorkflowExecutionRepository, un as WorkflowErrorContext, ur as TriggerRuntimeDiagnostics, ut as CredentialType, v as WhenBuilder, vi as container, vn as WorkflowPrunePolicySpec, vr as WorkflowRunnerService, vt as BinaryPreviewKind, w as BranchStepsArg, wi as instancePerContainerCachingFactory, wn as runnableNodeInputType, wr as WebhookInvocationMatch, wt as ItemInputMapper, x as BooleanWhenOverloads, xi as injectAll, xn as WorkflowStoragePolicyResolver, xr as HttpMethod, xt as InputPortKey, y as AnyRunnableNodeConfig, yi as delay, yn as WorkflowStoragePolicyDecisionArgs, yr as WorkflowSnapshotFactory, yt as Edge, z as RunRevision, zi as FixedRetryPolicySpec, zn as ExecutionBinaryService, zr as NodeInputsByPort, zt as NodeErrorHandlerSpec } from "./RunIntentService-BAKikN8h.js";
2
+ import { $ as LangChainChatModelLike, A as AgentConnectionNodeRole, At as InProcessRetryRunner, B as AgentMessageTemplate, C as PersistedRuntimeTypeKind, Ct as DefinedNodeRunContext, D as AgentConnectionCredentialSource, Dt as SystemClock, E as InMemoryRunEventBus, Et as Clock, F as AgentMessageBuildArgs, Ft as NodeEventPublisher, G as AgentToolCall, H as AgentModelInvocationOptions, I as AgentMessageConfig, J as AgentToolExecuteArgs, K as AgentToolCallPlanner, L as AgentMessageDto, M as AgentCanvasPresentation, Mt as DefaultAsyncSleeper, N as AgentGuardrailConfig, O as AgentConnectionNodeCollector, P as AgentGuardrailDefaults, Pt as CredentialResolverFactory, Q as ChatModelFactory, R as AgentMessageLine, S as PersistedRuntimeTypeDecoratorOptions, St as DefinedNodeCredentialBindings, T as EventPublishingWorkflowExecutionRepository, Tt as defineNode, U as AgentNodeConfig, V as AgentMessageTemplateContent, W as AgentTool, X as AgentTurnLimitBehavior, Y as AgentToolToken, Z as ChatModelConfig, _ as tool, _t as DefineNodeExecuteOneArgs, at as Tool, b as PersistedRuntimeTypeMetadataStore, bt as DefinedNodeCredentialAccessors, ct as ZodSchemaAny, d as DefaultExecutionBinaryService, dt as AgentToolFactory, et as NodeBackedToolConfigOptions, f as UnavailableBinaryStorage, ft as NodeBackedToolConfig, g as node, gt as DefineBatchNodeOptions, h as getPersistedRuntimeTypeMetadata, ht as DefinedNodeRegistry, it as NodeBackedToolOutputMapperArgs, j as AgentAttachmentRole, jt as DefaultExecutionContextFactory, k as AgentConnectionNodeDescriptor, l as InMemoryRunDataFactory, lt as AgentConfigInspector, m as chatModel, mt as defineCredential, nt as NodeBackedToolInputMapperArgs, ot as ToolConfig, p as ItemsInputNormalizer, pt as DefineCredentialOptions, q as AgentToolDefinition, rt as NodeBackedToolOutputMapper, st as ToolExecuteArgs, tt as NodeBackedToolInputMapper, u as InMemoryBinaryStorage, ut as AgentMessageConfigNormalizer, v as StackTraceCallSitePathResolver, vt as DefineNodeOptions, w as PersistedRuntimeTypeMetadata, wt as defineBatchNode, x as InjectableRuntimeDecoratorComposer, xt as DefinedNodeCredentialBinding, y as PersistedRuntimeTypeNameResolver, yt as DefinedNode, z as AgentMessageRole } from "./index-uCm9l0nw.js";
3
+ export { ActivationIdFactory, AgentAttachmentRole, AgentCanvasPresentation, AgentConfigInspector, AgentConnectionCredentialSource, AgentConnectionNodeCollector, AgentConnectionNodeDescriptor, AgentConnectionNodeRole, AgentGuardrailConfig, AgentGuardrailDefaults, AgentMessageBuildArgs, AgentMessageConfig, AgentMessageConfigNormalizer, AgentMessageDto, AgentMessageLine, AgentMessageRole, AgentMessageTemplate, AgentMessageTemplateContent, AgentModelInvocationOptions, AgentNodeConfig, AgentTool, AgentToolCall, AgentToolCallPlanner, AgentToolDefinition, AgentToolExecuteArgs, AgentToolFactory, AgentToolToken, AgentTurnLimitBehavior, AllWorkflowsActiveWorkflowActivationPolicy, AnyCredentialType, AnyRunnableNodeConfig, AnyTriggerNodeConfig, BatchId, BinaryAttachment, BinaryAttachmentCreateRequest, BinaryBody, BinaryPreviewKind, BinaryStorage, BinaryStorageReadResult, BinaryStorageStatResult, BinaryStorageWriteRequest, BinaryStorageWriteResult, BooleanWhenOverloads, BranchMoreArgs, BranchOutputGuard, BranchStepsArg, ChainCursor, ChatModelConfig, ChatModelFactory, Clock, ConnectionInvocationAppendArgs, ConnectionInvocationId, ConnectionInvocationIdFactory, ConnectionInvocationKind, ConnectionInvocationRecord, ConnectionNodeIdFactory, Container, CoreTokens, CredentialAuthDefinition, CredentialBinding, CredentialBindingKey, CredentialFieldSchema, CredentialHealth, CredentialHealthStatus, CredentialHealthTester, CredentialInstanceId, CredentialInstanceRecord, CredentialJsonRecord, CredentialMaterialSourceKind, CredentialOAuth2AuthDefinition, CredentialRequirement, CredentialResolverFactory, CredentialSessionFactory, CredentialSessionFactoryArgs, CredentialSessionService, CredentialSetupStatus, CredentialType, CredentialTypeDefinition, CredentialTypeId, CredentialTypeRegistry, CredentialUnboundError, CurrentStateExecutionRequest, DefaultAsyncSleeper, DefaultExecutionBinaryService, DefaultExecutionContextFactory, DefaultWorkflowGraphFactory, DefineBatchNodeOptions, DefineCredentialOptions, DefineNodeExecuteOneArgs, DefineNodeOptions, DefinedNode, DefinedNodeCredentialAccessors, DefinedNodeCredentialBinding, DefinedNodeCredentialBindings, DefinedNodeRegistry, DefinedNodeRunContext, DependencyContainer, Disposable, Edge, EngineDeps, EngineExecutionLimitsPolicy, EngineExecutionLimitsPolicyConfig, EngineHost, EngineRunCounters, EventPublishingWorkflowExecutionRepository, ExecutableTriggerNode, ExecutionBinaryService, ExecutionContext, ExecutionContextFactory, ExecutionFrontierPlan, ExecutionInstanceDto, ExecutionInstanceId, ExecutionMode, ExecutionPayloadPolicyFields, ExpRetryPolicy, ExponentialRetryPolicySpec, FixedRetryPolicySpec, HttpMethod, InMemoryBinaryStorage, InMemoryLiveWorkflowRepository, InMemoryRunDataFactory, InMemoryRunEventBus, InProcessRetryRunner, InjectableRuntimeDecoratorComposer, InjectionToken, InputPortKey, Item, ItemBinary, ItemInputMapper, ItemInputMapperArgs, ItemInputMapperContext, ItemNode, Items, ItemsInputNormalizer, JsonArray, JsonObject, JsonPrimitive, JsonValue, LangChainChatModelLike, Lifecycle, LiveWorkflowRepository, MultiInputNode, MutableRunData, NoRetryPolicy, Node, NodeActivationContinuation, NodeActivationId, NodeActivationReceipt, NodeActivationRequest, NodeActivationRequestBase, NodeActivationScheduler, NodeBackedToolConfig, NodeBackedToolConfigOptions, NodeBackedToolInputMapper, NodeBackedToolInputMapperArgs, NodeBackedToolOutputMapper, NodeBackedToolOutputMapperArgs, NodeBinaryAttachmentService, NodeConfigBase, NodeConnectionName, NodeDefinition, NodeErrorHandler, NodeErrorHandlerArgs, NodeErrorHandlerSpec, NodeEventPublisher, NodeExecutionContext, NodeExecutionError, NodeExecutionRequest, NodeExecutionRequestHandler, NodeExecutionScheduler, NodeExecutionSnapshot, NodeExecutionStatePublisher, NodeExecutionStatus, NodeExecutor, NodeId, NodeInputsByPort, NodeKind, NodeOffloadPolicy, NodeOutputs, NodeRef, NodeResolver, NodeSchedulerDecision, NoneRetryPolicySpec, OAuth2ProviderFromPublicConfig, OutputPortKey, PairedItemRef, ParentExecutionRef, PayloadStorageKind, PendingNodeExecution, PersistedExecutionInstanceKind, PersistedExecutionInstanceRecord, PersistedMutableNodeState, PersistedMutableRunState, PersistedRunControlState, PersistedRunPolicySnapshot, PersistedRunSchedulingState, PersistedRunSlotProjectionRecord, PersistedRunState, PersistedRunWorkItemKind, PersistedRunWorkItemRecord, PersistedRuntimeTypeDecoratorOptions, PersistedRuntimeTypeKind, PersistedRuntimeTypeMetadata, PersistedRuntimeTypeMetadataStore, PersistedRuntimeTypeNameResolver, PersistedTokenId, PersistedTriggerSetupState, PersistedWorkflowSnapshot, PersistedWorkflowSnapshotNode, PersistedWorkflowTokenRegistryLike, PinnedNodeOutputsByPort, PreparedNodeActivationDispatch, RegistrationOptions, RetryPolicy, RetryPolicySpec, RunCompletionNotifier, RunCurrentState, RunDataFactory, RunDataSnapshot, RunEvent, RunEventBus, RunEventPublisherDeps, RunEventSubscription, RunExecutionOptions, RunFinishedAtFactory, RunId, RunIdFactory, RunIntentService, RunPruneCandidate, RunQueueEntry, RunResult, RunRevision, RunSlotProjectionState, RunStateResetRequest, RunStatus, RunStopCondition, RunSummary, RunnableNodeConfig, RunnableNodeInputJson, RunnableNodeOutputJson, RunnableNodeWireJson, SlotExecutionStateDto, StackTraceCallSitePathResolver, StepSequenceOutput, SystemClock, TestableTriggerNode, Tool, ToolConfig, ToolExecuteArgs, TriggerCleanupHandle, TriggerInstanceId, TriggerNode, TriggerNodeConfig, TriggerNodeOutputJson, TriggerNodeSetupState, TriggerRuntimeDiagnostics, TriggerSetupContext, TriggerSetupStateFor, TriggerSetupStateRepository, TriggerTestItemsContext, TypeToken, UnavailableBinaryStorage, UpstreamRefPlaceholder, ValidStepSequence, WebhookControlSignal, WebhookInvocationMatch, WebhookRunResult, WebhookTriggerMatcher, WebhookTriggerResolution, WebhookTriggerRoutingDiagnostics, WhenBuilder, WorkItemId, WorkItemStatus, WorkflowActivationPolicy, WorkflowBuilder, WorkflowDefinition, WorkflowDetailSelectionState, WorkflowErrorContext, WorkflowErrorHandler, WorkflowErrorHandlerSpec, WorkflowExecutableNodeClassifier, WorkflowExecutableNodeClassifierFactory, WorkflowExecutionListingRepository, WorkflowExecutionPruneRepository, WorkflowExecutionRepository, WorkflowGraph, WorkflowGraphFactory, WorkflowId, WorkflowNodeConnection, WorkflowNodeInstanceFactory, WorkflowPolicyRuntimeDefaults, WorkflowPrunePolicySpec, WorkflowRepository, WorkflowRunDetailDto, WorkflowRunnerResolver, WorkflowRunnerService, WorkflowSnapshotFactory, WorkflowSnapshotResolver, WorkflowStoragePolicyDecisionArgs, WorkflowStoragePolicyMode, WorkflowStoragePolicyResolver, WorkflowStoragePolicySpec, ZodSchemaAny, branchRef, chatModel, container, defineBatchNode, defineCredential, defineNode, delay, getPersistedRuntimeTypeMetadata, inject, injectAll, injectable, instanceCachingFactory, instancePerContainerCachingFactory, node, predicateAwareClassFactory, registry, runnableNodeInputType, runnableNodeOutputType, runnableNodeWireType, singleton, tool, triggerNodeOutputType, triggerNodeSetupStateType };
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as delay, B as NodeEventPublisher, F as DefaultAsyncSleeper, G as getPersistedRuntimeTypeMetadata, H as WorkflowExecutableNodeClassifier, I as CredentialResolverFactory, J as InjectableRuntimeDecoratorComposer, K as node, N as InProcessRetryRunner, P as DefaultExecutionContextFactory, Q as container, R as DefaultExecutionBinaryService, U as ConnectionNodeIdFactory, V as WorkflowExecutableNodeClassifierFactory, W as chatModel, X as StackTraceCallSitePathResolver, Y as PersistedRuntimeTypeMetadataStore, Z as PersistedRuntimeTypeNameResolver, a as InMemoryBinaryStorage, at as predicateAwareClassFactory, ct as CoreTokens, et as inject, i as InMemoryRunDataFactory, it as instancePerContainerCachingFactory, n as InMemoryLiveWorkflowRepository, nt as injectable, ot as registry, q as tool, r as RunFinishedAtFactory, rt as instanceCachingFactory, s as EngineExecutionLimitsPolicy, st as singleton, t as RunIntentService, tt as injectAll, z as UnavailableBinaryStorage } from "./RunIntentService-BFA48UpH.js";
1
+ import { $ as injectAll, B as WorkflowExecutableNodeClassifier, F as CredentialResolverFactory, G as tool, H as chatModel, I as DefaultExecutionBinaryService, J as StackTraceCallSitePathResolver, K as InjectableRuntimeDecoratorComposer, L as UnavailableBinaryStorage, M as InProcessRetryRunner, N as DefaultExecutionContextFactory, P as DefaultAsyncSleeper, Q as inject, R as NodeEventPublisher, U as getPersistedRuntimeTypeMetadata, V as ConnectionNodeIdFactory, W as node, X as container, Y as PersistedRuntimeTypeNameResolver, Z as delay, _ as EngineExecutionLimitsPolicy, a as InMemoryLiveWorkflowRepository, at as singleton, d as InMemoryRunDataFactory, et as injectable, f as InMemoryBinaryStorage, i as RunIntentService, it as registry, nt as instancePerContainerCachingFactory, ot as CoreTokens, q as PersistedRuntimeTypeMetadataStore, rt as predicateAwareClassFactory, tt as instanceCachingFactory, u as RunFinishedAtFactory, z as WorkflowExecutableNodeClassifierFactory } from "./runtime-Cy-3FTI_.js";
2
2
  import { a as WhenBuilder, i as ChainCursor, n as InMemoryRunEventBus, r as WorkflowBuilder, t as AllWorkflowsActiveWorkflowActivationPolicy } from "./workflowActivationPolicy-B8HzTk3o.js";
3
3
  import { z } from "zod";
4
4
  import { randomUUID } from "node:crypto";
@@ -60,6 +60,60 @@ const definedNodeCredentialAccessorFactory = { create(bindings, ctx) {
60
60
  return Object.fromEntries(entries);
61
61
  } };
62
62
  function defineNode(options) {
63
+ const credentialRequirements = definedNodeCredentialRequirementFactory.create(options.credentials);
64
+ const DefinedNodeRuntime = class {
65
+ kind = "node";
66
+ outputPorts = ["main"];
67
+ inputSchema = options.inputSchema;
68
+ async executeOne(args) {
69
+ const ctx = args.ctx;
70
+ const context = {
71
+ config: ctx.config.config,
72
+ credentials: definedNodeCredentialAccessorFactory.create(options.credentials, ctx),
73
+ execution: ctx
74
+ };
75
+ const payload = {
76
+ input: args.input,
77
+ item: args.item,
78
+ itemIndex: args.itemIndex,
79
+ items: args.items,
80
+ ctx
81
+ };
82
+ return await options.executeOne(payload, context);
83
+ }
84
+ };
85
+ node({ name: options.key })(DefinedNodeRuntime);
86
+ const DefinedRunnableNodeConfig = class {
87
+ kind = "node";
88
+ type = DefinedNodeRuntime;
89
+ icon = options.icon;
90
+ inputSchema = options.inputSchema;
91
+ mapInput = options.mapInput;
92
+ constructor(name, config, id) {
93
+ this.name = name;
94
+ this.config = config;
95
+ this.id = id;
96
+ }
97
+ getCredentialRequirements() {
98
+ return credentialRequirements;
99
+ }
100
+ };
101
+ const definition = {
102
+ kind: "defined-node",
103
+ key: options.key,
104
+ title: options.title,
105
+ description: options.description,
106
+ create(config, name = options.title, id) {
107
+ return new DefinedRunnableNodeConfig(name, config, id);
108
+ },
109
+ register(context) {
110
+ context.registerNode(DefinedNodeRuntime);
111
+ }
112
+ };
113
+ DefinedNodeRegistry.register(definition);
114
+ return definition;
115
+ }
116
+ function defineBatchNode(options) {
63
117
  const credentialRequirements = definedNodeCredentialRequirementFactory.create(options.credentials);
64
118
  const DefinedNodeRuntime = class {
65
119
  kind = "node";
@@ -285,11 +339,38 @@ const AgentToolFactory = new AgentToolFactoryImpl();
285
339
  //#endregion
286
340
  //#region src/ai/AgentMessageConfigNormalizerFactory.ts
287
341
  var AgentMessageConfigNormalizer = class {
342
+ /**
343
+ * Prefer {@code input.messages} when present (ItemNode / engine-mapped payloads); otherwise resolve from
344
+ * {@link AgentNodeConfig.messages} templates.
345
+ */
346
+ static resolveFromInputOrConfig(input$1, config, args) {
347
+ const fromInput = this.tryMessagesFromStructuredInput(input$1);
348
+ if (fromInput.length > 0) return fromInput;
349
+ return this.normalize(config, args);
350
+ }
288
351
  static normalize(config, args) {
289
352
  const fromMessages = this.normalizeRichMessages(config.messages, args);
290
353
  if (fromMessages.length > 0) return fromMessages;
291
354
  throw new Error("AIAgent messages must be a non-empty array, or an object with a non-empty prompt array and/or buildMessages that returns messages.");
292
355
  }
356
+ static tryMessagesFromStructuredInput(input$1) {
357
+ if (!input$1 || typeof input$1 !== "object") return [];
358
+ const raw = input$1.messages;
359
+ if (!Array.isArray(raw) || raw.length === 0) return [];
360
+ const out = [];
361
+ for (const m of raw) {
362
+ if (!m || typeof m !== "object") continue;
363
+ const role = m.role;
364
+ const content = m.content;
365
+ if (role !== "system" && role !== "user" && role !== "assistant") continue;
366
+ if (typeof content !== "string") continue;
367
+ out.push({
368
+ role,
369
+ content
370
+ });
371
+ }
372
+ return out;
373
+ }
293
374
  static normalizeRichMessages(config, args) {
294
375
  if (Array.isArray(config)) return config.map((line) => this.lineToDto(line, args));
295
376
  const structured = config;
@@ -561,5 +642,5 @@ var CredentialUnboundError = class CredentialUnboundError extends Error {
561
642
  const branchRef = (index) => `$${index}`;
562
643
 
563
644
  //#endregion
564
- export { AgentConfigInspector, AgentConnectionNodeCollector, AgentGuardrailDefaults, AgentMessageConfigNormalizer, AgentToolFactory, AllWorkflowsActiveWorkflowActivationPolicy, ChainCursor, ConnectionInvocationIdFactory, ConnectionNodeIdFactory, CoreTokens, CredentialResolverFactory, CredentialUnboundError, DefaultAsyncSleeper, DefaultExecutionBinaryService, DefaultExecutionContextFactory, DefaultWorkflowGraphFactory, DefinedNodeRegistry, EngineExecutionLimitsPolicy, EventPublishingWorkflowExecutionRepository, ExpRetryPolicy, InMemoryBinaryStorage, InMemoryLiveWorkflowRepository, InMemoryRunDataFactory, InMemoryRunEventBus, InProcessRetryRunner, InjectableRuntimeDecoratorComposer, ItemsInputNormalizer, NoRetryPolicy, NodeBackedToolConfig, NodeEventPublisher, PersistedRuntimeTypeMetadataStore, PersistedRuntimeTypeNameResolver, RetryPolicy, RunFinishedAtFactory, RunIntentService, StackTraceCallSitePathResolver, SystemClock, UnavailableBinaryStorage, WhenBuilder, WorkflowBuilder, WorkflowExecutableNodeClassifier, WorkflowExecutableNodeClassifierFactory, branchRef, chatModel, container, defineCredential, defineNode, delay, getPersistedRuntimeTypeMetadata, inject, injectAll, injectable, instanceCachingFactory, instancePerContainerCachingFactory, node, predicateAwareClassFactory, registry, singleton, tool };
645
+ export { AgentConfigInspector, AgentConnectionNodeCollector, AgentGuardrailDefaults, AgentMessageConfigNormalizer, AgentToolFactory, AllWorkflowsActiveWorkflowActivationPolicy, ChainCursor, ConnectionInvocationIdFactory, ConnectionNodeIdFactory, CoreTokens, CredentialResolverFactory, CredentialUnboundError, DefaultAsyncSleeper, DefaultExecutionBinaryService, DefaultExecutionContextFactory, DefaultWorkflowGraphFactory, DefinedNodeRegistry, EngineExecutionLimitsPolicy, EventPublishingWorkflowExecutionRepository, ExpRetryPolicy, InMemoryBinaryStorage, InMemoryLiveWorkflowRepository, InMemoryRunDataFactory, InMemoryRunEventBus, InProcessRetryRunner, InjectableRuntimeDecoratorComposer, ItemsInputNormalizer, NoRetryPolicy, NodeBackedToolConfig, NodeEventPublisher, PersistedRuntimeTypeMetadataStore, PersistedRuntimeTypeNameResolver, RetryPolicy, RunFinishedAtFactory, RunIntentService, StackTraceCallSitePathResolver, SystemClock, UnavailableBinaryStorage, WhenBuilder, WorkflowBuilder, WorkflowExecutableNodeClassifier, WorkflowExecutableNodeClassifierFactory, branchRef, chatModel, container, defineBatchNode, defineCredential, defineNode, delay, getPersistedRuntimeTypeMetadata, inject, injectAll, injectable, instanceCachingFactory, instancePerContainerCachingFactory, node, predicateAwareClassFactory, registry, singleton, tool };
565
646
  //# sourceMappingURL=index.js.map