@codemation/core 0.0.14 → 0.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bootstrap/index.d.ts +1 -1
- package/dist/{index-CTjfVHJh.d.ts → index-k0hwnJyT.d.ts} +117 -9
- package/dist/index.cjs +108 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +115 -7
- package/dist/index.d.ts +2 -2
- package/dist/index.js +105 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/ai/AgentConfigInspectorFactory.ts +25 -0
- package/src/ai/AgentMessageConfigNormalizerFactory.ts +51 -0
- package/src/ai/AgentToolFactory.ts +18 -0
- package/src/ai/AiHost.ts +121 -21
- package/src/ai/NodeBackedToolConfig.ts +86 -0
package/dist/index.d.cts
CHANGED
|
@@ -172,6 +172,49 @@ declare class SystemClock implements Clock {
|
|
|
172
172
|
now(): Date;
|
|
173
173
|
}
|
|
174
174
|
//#endregion
|
|
175
|
+
//#region src/ai/NodeBackedToolConfig.d.ts
|
|
176
|
+
declare class NodeBackedToolConfig<TNodeConfig extends RunnableNodeConfig<any, any>, TInputSchema extends ZodSchemaAny, TOutputSchema extends ZodSchemaAny> implements ToolConfig {
|
|
177
|
+
readonly name: string;
|
|
178
|
+
readonly node: TNodeConfig;
|
|
179
|
+
readonly type: TypeToken<unknown>;
|
|
180
|
+
readonly toolKind: "nodeBacked";
|
|
181
|
+
readonly description?: string;
|
|
182
|
+
readonly presentation?: AgentCanvasPresentation;
|
|
183
|
+
private readonly inputSchemaValue;
|
|
184
|
+
private readonly outputSchemaValue;
|
|
185
|
+
private readonly mapInputValue?;
|
|
186
|
+
private readonly mapOutputValue?;
|
|
187
|
+
constructor(name: string, node: TNodeConfig, options: NodeBackedToolConfigOptions<TNodeConfig, TInputSchema, TOutputSchema>);
|
|
188
|
+
getCredentialRequirements(): ReadonlyArray<CredentialRequirement>;
|
|
189
|
+
getInputSchema(): TInputSchema;
|
|
190
|
+
getOutputSchema(): TOutputSchema;
|
|
191
|
+
toNodeItem(args: NodeBackedToolInputMapperArgs<TNodeConfig, input<TInputSchema>>): Item<RunnableNodeInputJson<TNodeConfig>>;
|
|
192
|
+
toToolOutput(args: NodeBackedToolOutputMapperArgs<TNodeConfig, input<TInputSchema>>): output<TOutputSchema>;
|
|
193
|
+
private readDefaultToolOutput;
|
|
194
|
+
private isItem;
|
|
195
|
+
}
|
|
196
|
+
//#endregion
|
|
197
|
+
//#region src/ai/AgentToolFactory.d.ts
|
|
198
|
+
declare class AgentToolFactoryImpl {
|
|
199
|
+
asTool<TNodeConfig extends RunnableNodeConfig<any, any>, TInputSchema extends ZodSchemaAny, TOutputSchema extends ZodSchemaAny>(node: TNodeConfig, options: Readonly<{
|
|
200
|
+
name?: string;
|
|
201
|
+
} & NodeBackedToolConfigOptions<TNodeConfig, TInputSchema, TOutputSchema>>): NodeBackedToolConfig<TNodeConfig, TInputSchema, TOutputSchema>;
|
|
202
|
+
}
|
|
203
|
+
declare const AgentToolFactory: AgentToolFactoryImpl;
|
|
204
|
+
//#endregion
|
|
205
|
+
//#region src/ai/AgentMessageConfigNormalizerFactory.d.ts
|
|
206
|
+
declare class AgentMessageConfigNormalizer {
|
|
207
|
+
static normalize<TInputJson, TOutputJson>(config: AgentNodeConfig<TInputJson, TOutputJson>, args: AgentMessageBuildArgs<TInputJson>): ReadonlyArray<AgentMessageDto>;
|
|
208
|
+
private static normalizeRichMessages;
|
|
209
|
+
private static lineToDto;
|
|
210
|
+
}
|
|
211
|
+
//#endregion
|
|
212
|
+
//#region src/ai/AgentConfigInspectorFactory.d.ts
|
|
213
|
+
declare class AgentConfigInspector {
|
|
214
|
+
static isAgentNodeConfig(config: NodeConfigBase | undefined): config is AgentNodeConfig<any, any>;
|
|
215
|
+
private static hasCompatibleMessageConfiguration;
|
|
216
|
+
}
|
|
217
|
+
//#endregion
|
|
175
218
|
//#region src/ai/AiHost.d.ts
|
|
176
219
|
interface AgentCanvasPresentation<TIcon extends string = string> {
|
|
177
220
|
readonly label?: string;
|
|
@@ -179,7 +222,7 @@ interface AgentCanvasPresentation<TIcon extends string = string> {
|
|
|
179
222
|
}
|
|
180
223
|
type ZodSchemaAny = ZodType<any, any, any>;
|
|
181
224
|
interface ToolConfig {
|
|
182
|
-
readonly type: TypeToken<
|
|
225
|
+
readonly type: TypeToken<unknown>;
|
|
183
226
|
readonly name: string;
|
|
184
227
|
readonly description?: string;
|
|
185
228
|
readonly presentation?: AgentCanvasPresentation;
|
|
@@ -202,6 +245,47 @@ interface Tool<TConfig extends ToolConfig = ToolConfig, TInputSchema extends Zod
|
|
|
202
245
|
type AgentTool<TInputSchema extends ZodSchemaAny = ZodSchemaAny, TOutputSchema extends ZodSchemaAny = ZodSchemaAny> = Tool<ToolConfig, TInputSchema, TOutputSchema>;
|
|
203
246
|
type AgentToolExecuteArgs<TInput = unknown> = ToolExecuteArgs<ToolConfig, TInput>;
|
|
204
247
|
type AgentToolToken = TypeToken<Tool<ToolConfig, ZodSchemaAny, ZodSchemaAny>>;
|
|
248
|
+
type AgentMessageRole = "system" | "user" | "assistant";
|
|
249
|
+
type AgentMessageBuildArgs<TInputJson = unknown> = Readonly<{
|
|
250
|
+
item: Item<TInputJson>;
|
|
251
|
+
itemIndex: number;
|
|
252
|
+
items: Items<TInputJson>;
|
|
253
|
+
ctx: NodeExecutionContext<any>;
|
|
254
|
+
}>;
|
|
255
|
+
interface AgentMessageDto {
|
|
256
|
+
readonly role: AgentMessageRole;
|
|
257
|
+
readonly content: string;
|
|
258
|
+
}
|
|
259
|
+
type AgentMessageTemplateContent<TInputJson = unknown> = string | ((args: AgentMessageBuildArgs<TInputJson>) => string);
|
|
260
|
+
interface AgentMessageTemplate<TInputJson = unknown> {
|
|
261
|
+
readonly role: AgentMessageRole;
|
|
262
|
+
readonly content: AgentMessageTemplateContent<TInputJson>;
|
|
263
|
+
}
|
|
264
|
+
/** A single prompt line: fixed DTO or template with optional function `content`. */
|
|
265
|
+
type AgentMessageLine<TInputJson = unknown> = AgentMessageDto | AgentMessageTemplate<TInputJson>;
|
|
266
|
+
/**
|
|
267
|
+
* Message list for an agent. Prefer a **plain array** of `{ role, content }` (optionally with function `content` for templates).
|
|
268
|
+
* Use the object form only when you need `buildMessages` to append messages after optional `prompt` lines.
|
|
269
|
+
*/
|
|
270
|
+
type AgentMessageConfig<TInputJson = unknown> = ReadonlyArray<AgentMessageLine<TInputJson>> | {
|
|
271
|
+
readonly prompt?: ReadonlyArray<AgentMessageLine<TInputJson>>;
|
|
272
|
+
readonly buildMessages?: (args: AgentMessageBuildArgs<TInputJson>) => ReadonlyArray<AgentMessageDto>;
|
|
273
|
+
};
|
|
274
|
+
type AgentTurnLimitBehavior = "error" | "respondWithLastMessage";
|
|
275
|
+
interface AgentModelInvocationOptions {
|
|
276
|
+
readonly maxTokens?: number;
|
|
277
|
+
readonly providerOptions?: Readonly<Record<string, JsonValue>>;
|
|
278
|
+
}
|
|
279
|
+
interface AgentGuardrailConfig {
|
|
280
|
+
readonly maxTurns?: number;
|
|
281
|
+
readonly onTurnLimitReached?: AgentTurnLimitBehavior;
|
|
282
|
+
readonly modelInvocationOptions?: AgentModelInvocationOptions;
|
|
283
|
+
}
|
|
284
|
+
/** Defaults aligned with common tool-agent iteration limits (many products use ~10 max rounds). */
|
|
285
|
+
declare const AgentGuardrailDefaults: {
|
|
286
|
+
readonly maxTurns: 10;
|
|
287
|
+
readonly onTurnLimitReached: AgentTurnLimitBehavior;
|
|
288
|
+
};
|
|
205
289
|
interface AgentToolDefinition {
|
|
206
290
|
readonly name: string;
|
|
207
291
|
readonly description: string;
|
|
@@ -229,14 +313,38 @@ interface ChatModelFactory<TConfig extends ChatModelConfig = ChatModelConfig> {
|
|
|
229
313
|
ctx: NodeExecutionContext<any>;
|
|
230
314
|
}>): Promise<LangChainChatModelLike> | LangChainChatModelLike;
|
|
231
315
|
}
|
|
316
|
+
type NodeBackedToolInputMapperArgs<TNodeConfig extends RunnableNodeConfig<any, any>, TToolInput = unknown> = Readonly<{
|
|
317
|
+
input: TToolInput;
|
|
318
|
+
item: Item;
|
|
319
|
+
itemIndex: number;
|
|
320
|
+
items: Items;
|
|
321
|
+
ctx: NodeExecutionContext<any>;
|
|
322
|
+
node: TNodeConfig;
|
|
323
|
+
}>;
|
|
324
|
+
type NodeBackedToolOutputMapperArgs<TNodeConfig extends RunnableNodeConfig<any, any>, TToolInput = unknown> = Readonly<{
|
|
325
|
+
input: TToolInput;
|
|
326
|
+
item: Item;
|
|
327
|
+
itemIndex: number;
|
|
328
|
+
items: Items;
|
|
329
|
+
ctx: NodeExecutionContext<any>;
|
|
330
|
+
node: TNodeConfig;
|
|
331
|
+
outputs: NodeOutputs;
|
|
332
|
+
}>;
|
|
333
|
+
type NodeBackedToolInputMapper<TNodeConfig extends RunnableNodeConfig<any, any>, TToolInput = unknown> = (args: NodeBackedToolInputMapperArgs<TNodeConfig, TToolInput>) => Item<RunnableNodeInputJson<TNodeConfig>> | RunnableNodeInputJson<TNodeConfig>;
|
|
334
|
+
type NodeBackedToolOutputMapper<TNodeConfig extends RunnableNodeConfig<any, any>, TToolInput = unknown, TToolOutput = unknown> = (args: NodeBackedToolOutputMapperArgs<TNodeConfig, TToolInput>) => TToolOutput;
|
|
335
|
+
type NodeBackedToolConfigOptions<TNodeConfig extends RunnableNodeConfig<any, any>, TInputSchema extends ZodSchemaAny, TOutputSchema extends ZodSchemaAny> = Readonly<{
|
|
336
|
+
description?: string;
|
|
337
|
+
presentation?: AgentCanvasPresentation;
|
|
338
|
+
inputSchema: TInputSchema;
|
|
339
|
+
outputSchema: TOutputSchema;
|
|
340
|
+
mapInput?: NodeBackedToolInputMapper<TNodeConfig, input<TInputSchema>>;
|
|
341
|
+
mapOutput?: NodeBackedToolOutputMapper<TNodeConfig, input<TInputSchema>, output<TOutputSchema>>;
|
|
342
|
+
}>;
|
|
232
343
|
interface AgentNodeConfig<TInputJson = unknown, TOutputJson = unknown> extends RunnableNodeConfig<TInputJson, TOutputJson> {
|
|
233
|
-
readonly
|
|
234
|
-
readonly userMessageFormatter: (item: Item<TInputJson>, index: number, items: Items<TInputJson>, ctx: NodeExecutionContext<any>) => string;
|
|
344
|
+
readonly messages: AgentMessageConfig<TInputJson>;
|
|
235
345
|
readonly chatModel: ChatModelConfig;
|
|
236
346
|
readonly tools?: ReadonlyArray<ToolConfig>;
|
|
237
|
-
|
|
238
|
-
declare class AgentConfigInspector {
|
|
239
|
-
static isAgentNodeConfig(config: NodeConfigBase | undefined): config is AgentNodeConfig<any, any>;
|
|
347
|
+
readonly guardrails?: AgentGuardrailConfig;
|
|
240
348
|
}
|
|
241
349
|
type AgentAttachmentRole = "languageModel" | "tool";
|
|
242
350
|
//#endregion
|
|
@@ -341,5 +449,5 @@ declare class ItemsInputNormalizer {
|
|
|
341
449
|
private isItem;
|
|
342
450
|
}
|
|
343
451
|
//#endregion
|
|
344
|
-
export { ActivationIdFactory, AgentAttachmentRole, AgentCanvasPresentation, AgentConfigInspector, AgentNodeConfig, AgentTool, AgentToolCall, AgentToolCallPlanner, AgentToolDefinition, AgentToolExecuteArgs, AgentToolToken, AllWorkflowsActiveWorkflowActivationPolicy, AnyCredentialType, AnyRunnableNodeConfig, AnyTriggerNodeConfig, BinaryAttachment, BinaryAttachmentCreateRequest, BinaryBody, BinaryPreviewKind, BinaryStorage, BinaryStorageReadResult, BinaryStorageStatResult, BinaryStorageWriteRequest, BinaryStorageWriteResult, BooleanWhenOverloads, BranchMoreArgs, BranchOutputGuard, BranchStepsArg, ChainCursor, ChatModelConfig, ChatModelFactory, type Clock, ConnectionInvocationAppendArgs, ConnectionInvocationId, ConnectionInvocationIdFactory, 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, DependencyContainer, Disposable, Edge, EngineDeps, EngineExecutionLimitsPolicy, type EngineExecutionLimitsPolicyConfig, EngineHost, EngineRunCounters, EventPublishingWorkflowExecutionRepository, ExecutableTriggerNode, ExecutionBinaryService, ExecutionContext, ExecutionContextFactory, ExecutionFrontierPlan, ExecutionMode, 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, 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, PendingNodeExecution, PersistedMutableNodeState, PersistedMutableRunState, PersistedRunControlState, PersistedRunPolicySnapshot, PersistedRunState, type PersistedRuntimeTypeDecoratorOptions, type PersistedRuntimeTypeKind, type PersistedRuntimeTypeMetadata, PersistedRuntimeTypeMetadataStore, PersistedRuntimeTypeNameResolver, PersistedTokenId, PersistedTriggerSetupState, PersistedWorkflowSnapshot, PersistedWorkflowSnapshotNode, PersistedWorkflowTokenRegistryLike, PinnedNodeOutputsByPort, RegistrationOptions, RetryPolicy, RetryPolicySpec, RunCompletionNotifier, RunCurrentState, RunDataFactory, RunDataSnapshot, RunEvent, RunEventBus, RunEventPublisherDeps, RunEventSubscription, RunExecutionOptions, RunFinishedAtFactory, RunId, RunIdFactory, RunIntentService, RunPruneCandidate, RunQueueEntry, RunResult, RunStateResetRequest, RunStatus, RunStopCondition, RunSummary, RunnableNodeConfig, RunnableNodeInputJson, RunnableNodeOutputJson, 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, WorkflowActivationPolicy, WorkflowBuilder, WorkflowDefinition, WorkflowErrorContext, WorkflowErrorHandler, WorkflowErrorHandlerSpec, WorkflowExecutableNodeClassifier, WorkflowExecutableNodeClassifierFactory, WorkflowExecutionListingRepository, WorkflowExecutionPruneRepository, WorkflowExecutionRepository, WorkflowGraph, WorkflowGraphFactory, WorkflowId, WorkflowNodeConnection, WorkflowNodeInstanceFactory, WorkflowPolicyRuntimeDefaults, WorkflowPrunePolicySpec, WorkflowRepository, WorkflowRunnerResolver, WorkflowRunnerService, WorkflowSnapshotFactory, WorkflowSnapshotResolver, WorkflowStoragePolicyDecisionArgs, WorkflowStoragePolicyMode, WorkflowStoragePolicyResolver, WorkflowStoragePolicySpec, ZodSchemaAny, branchRef, chatModel, container, delay, getPersistedRuntimeTypeMetadata, inject, injectAll, injectable, instanceCachingFactory, instancePerContainerCachingFactory, node, predicateAwareClassFactory, registry, runnableNodeInputType, runnableNodeOutputType, singleton, tool, triggerNodeOutputType, triggerNodeSetupStateType };
|
|
452
|
+
export { ActivationIdFactory, AgentAttachmentRole, AgentCanvasPresentation, AgentConfigInspector, AgentGuardrailConfig, AgentGuardrailDefaults, AgentMessageBuildArgs, AgentMessageConfig, AgentMessageConfigNormalizer, AgentMessageDto, AgentMessageLine, AgentMessageRole, AgentMessageTemplate, AgentMessageTemplateContent, AgentModelInvocationOptions, AgentNodeConfig, AgentTool, AgentToolCall, AgentToolCallPlanner, AgentToolDefinition, AgentToolExecuteArgs, AgentToolFactory, AgentToolToken, AgentTurnLimitBehavior, AllWorkflowsActiveWorkflowActivationPolicy, AnyCredentialType, AnyRunnableNodeConfig, AnyTriggerNodeConfig, BinaryAttachment, BinaryAttachmentCreateRequest, BinaryBody, BinaryPreviewKind, BinaryStorage, BinaryStorageReadResult, BinaryStorageStatResult, BinaryStorageWriteRequest, BinaryStorageWriteResult, BooleanWhenOverloads, BranchMoreArgs, BranchOutputGuard, BranchStepsArg, ChainCursor, ChatModelConfig, ChatModelFactory, type Clock, ConnectionInvocationAppendArgs, ConnectionInvocationId, ConnectionInvocationIdFactory, 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, DependencyContainer, Disposable, Edge, EngineDeps, EngineExecutionLimitsPolicy, type EngineExecutionLimitsPolicyConfig, EngineHost, EngineRunCounters, EventPublishingWorkflowExecutionRepository, ExecutableTriggerNode, ExecutionBinaryService, ExecutionContext, ExecutionContextFactory, ExecutionFrontierPlan, ExecutionMode, 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, PendingNodeExecution, PersistedMutableNodeState, PersistedMutableRunState, PersistedRunControlState, PersistedRunPolicySnapshot, PersistedRunState, type PersistedRuntimeTypeDecoratorOptions, type PersistedRuntimeTypeKind, type PersistedRuntimeTypeMetadata, PersistedRuntimeTypeMetadataStore, PersistedRuntimeTypeNameResolver, PersistedTokenId, PersistedTriggerSetupState, PersistedWorkflowSnapshot, PersistedWorkflowSnapshotNode, PersistedWorkflowTokenRegistryLike, PinnedNodeOutputsByPort, RegistrationOptions, RetryPolicy, RetryPolicySpec, RunCompletionNotifier, RunCurrentState, RunDataFactory, RunDataSnapshot, RunEvent, RunEventBus, RunEventPublisherDeps, RunEventSubscription, RunExecutionOptions, RunFinishedAtFactory, RunId, RunIdFactory, RunIntentService, RunPruneCandidate, RunQueueEntry, RunResult, RunStateResetRequest, RunStatus, RunStopCondition, RunSummary, RunnableNodeConfig, RunnableNodeInputJson, RunnableNodeOutputJson, 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, WorkflowActivationPolicy, WorkflowBuilder, WorkflowDefinition, WorkflowErrorContext, WorkflowErrorHandler, WorkflowErrorHandlerSpec, WorkflowExecutableNodeClassifier, WorkflowExecutableNodeClassifierFactory, WorkflowExecutionListingRepository, WorkflowExecutionPruneRepository, WorkflowExecutionRepository, WorkflowGraph, WorkflowGraphFactory, WorkflowId, WorkflowNodeConnection, WorkflowNodeInstanceFactory, WorkflowPolicyRuntimeDefaults, WorkflowPrunePolicySpec, WorkflowRepository, WorkflowRunnerResolver, WorkflowRunnerService, WorkflowSnapshotFactory, WorkflowSnapshotResolver, WorkflowStoragePolicyDecisionArgs, WorkflowStoragePolicyMode, WorkflowStoragePolicyResolver, WorkflowStoragePolicySpec, ZodSchemaAny, branchRef, chatModel, container, delay, getPersistedRuntimeTypeMetadata, inject, injectAll, injectable, instanceCachingFactory, instancePerContainerCachingFactory, node, predicateAwareClassFactory, registry, runnableNodeInputType, runnableNodeOutputType, singleton, tool, triggerNodeOutputType, triggerNodeSetupStateType };
|
|
345
453
|
//# sourceMappingURL=index.d.cts.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { $ as JsonArray, $n as ConnectionInvocationRecord, $r as RunEventBus, $t as BinaryBody, A as CredentialJsonRecord, An as TriggerNode, Ar as WorkflowExecutionRepository, At as TriggerNodeOutputJson, B as CredentialTypeId, Bn as WorkflowSnapshotFactory, Br as inject, Bt as WorkflowNodeConnection, C as CredentialBindingKey, Cn as NodeExecutionScheduler, Cr as RunStateResetRequest, Ct as RunDataSnapshot, D as CredentialHealthTester, Dn as PersistedTriggerSetupState, Dr as WebhookRunResult, Dt as RunnableNodeInputJson, E as CredentialHealthStatus, En as NodeResolver, Er as RunSummary, Et as RunnableNodeConfig, F as CredentialSessionFactoryArgs, Fn as TriggerTestItemsContext, Fr as Lifecycle, Ft as WorkflowErrorHandler, G as BinaryAttachment, Gn as WebhookInvocationMatch, Gr as predicateAwareClassFactory, Gt as WorkflowStoragePolicyResolver, H as CredentialUnboundError, Hn as HttpMethod, Hr as injectable, Ht as WorkflowPrunePolicySpec, I as CredentialSessionService, In as WorkflowNodeInstanceFactory, Ir as RegistrationOptions, It as WorkflowErrorHandlerSpec, J as ExecutionMode, Jn as WebhookTriggerRoutingDiagnostics, Jr as CoreTokens, Jt as runnableNodeInputType, K as BinaryPreviewKind, Kn as WebhookTriggerMatcher, Kr as registry, Kt as WorkflowStoragePolicySpec, L as CredentialSetupStatus, Ln as WorkflowRepository, Lr as TypeToken, Lt as WorkflowGraph, M as CredentialOAuth2AuthDefinition, Mn as TriggerSetupContext, Mr as DependencyContainer, Mt as UpstreamRefPlaceholder, N as CredentialRequirement, Nn as TriggerSetupStateFor, Nr as Disposable, Nt as WorkflowDefinition, O as CredentialInstanceId, On as TestableTriggerNode, Or as WorkflowExecutionListingRepository, Ot as RunnableNodeOutputJson, P as CredentialSessionFactory, Pn as TriggerSetupStateRepository, Pr as InjectionToken, Pt as WorkflowErrorContext, Q as Items, Qn as ConnectionInvocationId, Qr as RunEvent, Qt as BinaryAttachmentCreateRequest, R as CredentialType, Rn as WorkflowRunnerResolver, Rr as container, Rt as WorkflowGraphFactory, S as CredentialBinding, Sn as NodeExecutionRequestHandler, Sr as RunResult, St as RunDataFactory, T as CredentialHealth, Tn as NodeExecutor, Tr as RunStopCondition, Tt as RunIdFactory, U as OAuth2ProviderFromPublicConfig, Un as TriggerInstanceId, Ur as instanceCachingFactory, Ut as WorkflowStoragePolicyDecisionArgs, V as CredentialTypeRegistry, Vn as WorkflowSnapshotResolver, Vr as injectAll, Vt as WorkflowPolicyRuntimeDefaults, W as ActivationIdFactory, Wn as WebhookControlSignal, Wr as instancePerContainerCachingFactory, Wt as WorkflowStoragePolicyMode, X as Item, Xn as WorkflowActivationPolicy, Xr as EngineExecutionLimitsPolicy, Xt as triggerNodeOutputType, Y as InputPortKey, Yn as AllWorkflowsActiveWorkflowActivationPolicy, Yt as runnableNodeOutputType, Z as ItemBinary, Zn as ConnectionInvocationAppendArgs, Zr as EngineExecutionLimitsPolicyConfig, Zt as triggerNodeSetupStateType, _ as StepSequenceOutput, _n as NodeActivationRequestBase, _r as RunCurrentState, _t as OutputPortKey, a as WorkflowExecutableNodeClassifier, ai as FixedRetryPolicySpec, an as EngineDeps, ar as NodeExecutionStatus, at as NodeConfigBase, b as AnyCredentialType, bn as NodeExecutionContext, br as RunPruneCandidate, bt as PersistedRunPolicySnapshot, c as WorkflowBuilder, cn as ExecutionBinaryService, cr as PersistedMutableNodeState, ct as NodeErrorHandler, d as AnyRunnableNodeConfig, dn as LiveWorkflowRepository, dr as PersistedRunState, dt as NodeId, ei as RunEventSubscription, en as BinaryStorage, er as CurrentStateExecutionRequest, et as JsonObject, f as AnyTriggerNodeConfig, fn as MultiInputNode, fr as PersistedWorkflowSnapshot, ft as NodeKind, g as BranchStepsArg, gn as NodeActivationRequest, gr as RunCompletionNotifier, gt as NodeSchedulerDecision, h as BranchOutputGuard, hn as NodeActivationReceipt, hr as PinnedNodeOutputsByPort, ht as NodeRef, i as WorkflowExecutableNodeClassifierFactory, ii as ExponentialRetryPolicySpec, in as BinaryStorageWriteResult, ir as NodeExecutionSnapshot, it as NodeActivationId, j as CredentialMaterialSourceKind, jn as TriggerRuntimeDiagnostics, jr as Container, jt as TriggerNodeSetupState, k as CredentialInstanceRecord, kn as TriggerCleanupHandle, kr as WorkflowExecutionPruneRepository, kt as TriggerNodeConfig, l as ChainCursor, ln as ExecutionContext, lr as PersistedMutableRunState, lt as NodeErrorHandlerArgs, m as BranchMoreArgs, mn as NodeActivationContinuation, mr as PersistedWorkflowTokenRegistryLike, mt as NodeOutputs, ni as RetryPolicy, nn as BinaryStorageStatResult, nr as ExecutionFrontierPlan, nt as JsonValue, o as ConnectionNodeIdFactory, oi as NoneRetryPolicySpec, on as EngineHost, or as NodeInputsByPort, ot as NodeConnectionName, p as BooleanWhenOverloads, pn as Node, pr as PersistedWorkflowSnapshotNode, pt as NodeOffloadPolicy, q as Edge, qn as WebhookTriggerResolution, qr as singleton, qt as branchRef, r as DefaultWorkflowGraphFactory, ri as NoRetryPolicy, rn as BinaryStorageWriteRequest, rr as NodeExecutionError, rt as MutableRunData, s as ConnectionInvocationIdFactory, si as RetryPolicySpec, sn as ExecutableTriggerNode, sr as PendingNodeExecution, st as NodeDefinition, t as InMemoryLiveWorkflowRepository, ti as ExpRetryPolicy, tn as BinaryStorageReadResult, tr as EngineRunCounters, tt as JsonPrimitive, u as WhenBuilder, un as ExecutionContextFactory, ur as PersistedRunControlState, ut as NodeErrorHandlerSpec, v as ValidStepSequence, vn as NodeActivationScheduler, vr as RunEventPublisherDeps, vt as PairedItemRef, w as CredentialFieldSchema, wn as NodeExecutionStatePublisher, wr as RunStatus, wt as RunId, x as CredentialAuthDefinition, xn as NodeExecutionRequest, xr as RunQueueEntry, xt as PersistedTokenId, y as RunFinishedAtFactory, yn as NodeBinaryAttachmentService, yr as RunExecutionOptions, yt as ParentExecutionRef, z as CredentialTypeDefinition, zn as WorkflowRunnerService, zr as delay, zt as WorkflowId } from "./InMemoryLiveWorkflowRepository-DxoualoC.js";
|
|
2
|
-
import { A as PersistedRuntimeTypeKind, B as
|
|
3
|
-
export { ActivationIdFactory, AgentAttachmentRole, AgentCanvasPresentation, AgentConfigInspector, AgentNodeConfig, AgentTool, AgentToolCall, AgentToolCallPlanner, AgentToolDefinition, AgentToolExecuteArgs, AgentToolToken, AllWorkflowsActiveWorkflowActivationPolicy, AnyCredentialType, AnyRunnableNodeConfig, AnyTriggerNodeConfig, BinaryAttachment, BinaryAttachmentCreateRequest, BinaryBody, BinaryPreviewKind, BinaryStorage, BinaryStorageReadResult, BinaryStorageStatResult, BinaryStorageWriteRequest, BinaryStorageWriteResult, BooleanWhenOverloads, BranchMoreArgs, BranchOutputGuard, BranchStepsArg, ChainCursor, ChatModelConfig, ChatModelFactory, Clock, ConnectionInvocationAppendArgs, ConnectionInvocationId, ConnectionInvocationIdFactory, 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, DependencyContainer, Disposable, Edge, EngineDeps, EngineExecutionLimitsPolicy, EngineExecutionLimitsPolicyConfig, EngineHost, EngineRunCounters, EventPublishingWorkflowExecutionRepository, ExecutableTriggerNode, ExecutionBinaryService, ExecutionContext, ExecutionContextFactory, ExecutionFrontierPlan, ExecutionMode, 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, 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, PendingNodeExecution, PersistedMutableNodeState, PersistedMutableRunState, PersistedRunControlState, PersistedRunPolicySnapshot, PersistedRunState, PersistedRuntimeTypeDecoratorOptions, PersistedRuntimeTypeKind, PersistedRuntimeTypeMetadata, PersistedRuntimeTypeMetadataStore, PersistedRuntimeTypeNameResolver, PersistedTokenId, PersistedTriggerSetupState, PersistedWorkflowSnapshot, PersistedWorkflowSnapshotNode, PersistedWorkflowTokenRegistryLike, PinnedNodeOutputsByPort, RegistrationOptions, RetryPolicy, RetryPolicySpec, RunCompletionNotifier, RunCurrentState, RunDataFactory, RunDataSnapshot, RunEvent, RunEventBus, RunEventPublisherDeps, RunEventSubscription, RunExecutionOptions, RunFinishedAtFactory, RunId, RunIdFactory, RunIntentService, RunPruneCandidate, RunQueueEntry, RunResult, RunStateResetRequest, RunStatus, RunStopCondition, RunSummary, RunnableNodeConfig, RunnableNodeInputJson, RunnableNodeOutputJson, 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, WorkflowActivationPolicy, WorkflowBuilder, WorkflowDefinition, WorkflowErrorContext, WorkflowErrorHandler, WorkflowErrorHandlerSpec, WorkflowExecutableNodeClassifier, WorkflowExecutableNodeClassifierFactory, WorkflowExecutionListingRepository, WorkflowExecutionPruneRepository, WorkflowExecutionRepository, WorkflowGraph, WorkflowGraphFactory, WorkflowId, WorkflowNodeConnection, WorkflowNodeInstanceFactory, WorkflowPolicyRuntimeDefaults, WorkflowPrunePolicySpec, WorkflowRepository, WorkflowRunnerResolver, WorkflowRunnerService, WorkflowSnapshotFactory, WorkflowSnapshotResolver, WorkflowStoragePolicyDecisionArgs, WorkflowStoragePolicyMode, WorkflowStoragePolicyResolver, WorkflowStoragePolicySpec, ZodSchemaAny, branchRef, chatModel, container, delay, getPersistedRuntimeTypeMetadata, inject, injectAll, injectable, instanceCachingFactory, instancePerContainerCachingFactory, node, predicateAwareClassFactory, registry, runnableNodeInputType, runnableNodeOutputType, singleton, tool, triggerNodeOutputType, triggerNodeSetupStateType };
|
|
2
|
+
import { $ as AgentTurnLimitBehavior, A as PersistedRuntimeTypeKind, B as AgentMessageDto, C as node, D as PersistedRuntimeTypeMetadataStore, E as PersistedRuntimeTypeNameResolver, F as AgentCanvasPresentation, G as AgentModelInvocationOptions, H as AgentMessageRole, I as AgentGuardrailConfig, J as AgentToolCall, K as AgentNodeConfig, L as AgentGuardrailDefaults, M as EventPublishingWorkflowExecutionRepository, N as InMemoryRunEventBus, O as InjectableRuntimeDecoratorComposer, P as AgentAttachmentRole, Q as AgentToolToken, R as AgentMessageBuildArgs, S as getPersistedRuntimeTypeMetadata, St as DefaultAsyncSleeper, T as StackTraceCallSitePathResolver, Tt as NodeEventPublisher, U as AgentMessageTemplate, V as AgentMessageLine, W as AgentMessageTemplateContent, X as AgentToolDefinition, Y as AgentToolCallPlanner, Z as AgentToolExecuteArgs, _t as SystemClock, at as NodeBackedToolInputMapperArgs, b as ItemsInputNormalizer, bt as InProcessRetryRunner, ct as Tool, d as InMemoryRunDataFactory, dt as ZodSchemaAny, et as ChatModelConfig, f as InMemoryBinaryStorage, ft as AgentConfigInspector, gt as Clock, ht as NodeBackedToolConfig, it as NodeBackedToolInputMapper, j as PersistedRuntimeTypeMetadata, k as PersistedRuntimeTypeDecoratorOptions, lt as ToolConfig, mt as AgentToolFactory, nt as LangChainChatModelLike, ot as NodeBackedToolOutputMapper, pt as AgentMessageConfigNormalizer, q as AgentTool, rt as NodeBackedToolConfigOptions, s as RunIntentService, st as NodeBackedToolOutputMapperArgs, tt as ChatModelFactory, ut as ToolExecuteArgs, v as DefaultExecutionBinaryService, w as tool, wt as CredentialResolverFactory, x as chatModel, xt as DefaultExecutionContextFactory, y as UnavailableBinaryStorage, z as AgentMessageConfig } from "./index-k0hwnJyT.js";
|
|
3
|
+
export { ActivationIdFactory, AgentAttachmentRole, AgentCanvasPresentation, AgentConfigInspector, AgentGuardrailConfig, AgentGuardrailDefaults, AgentMessageBuildArgs, AgentMessageConfig, AgentMessageConfigNormalizer, AgentMessageDto, AgentMessageLine, AgentMessageRole, AgentMessageTemplate, AgentMessageTemplateContent, AgentModelInvocationOptions, AgentNodeConfig, AgentTool, AgentToolCall, AgentToolCallPlanner, AgentToolDefinition, AgentToolExecuteArgs, AgentToolFactory, AgentToolToken, AgentTurnLimitBehavior, AllWorkflowsActiveWorkflowActivationPolicy, AnyCredentialType, AnyRunnableNodeConfig, AnyTriggerNodeConfig, BinaryAttachment, BinaryAttachmentCreateRequest, BinaryBody, BinaryPreviewKind, BinaryStorage, BinaryStorageReadResult, BinaryStorageStatResult, BinaryStorageWriteRequest, BinaryStorageWriteResult, BooleanWhenOverloads, BranchMoreArgs, BranchOutputGuard, BranchStepsArg, ChainCursor, ChatModelConfig, ChatModelFactory, Clock, ConnectionInvocationAppendArgs, ConnectionInvocationId, ConnectionInvocationIdFactory, 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, DependencyContainer, Disposable, Edge, EngineDeps, EngineExecutionLimitsPolicy, EngineExecutionLimitsPolicyConfig, EngineHost, EngineRunCounters, EventPublishingWorkflowExecutionRepository, ExecutableTriggerNode, ExecutionBinaryService, ExecutionContext, ExecutionContextFactory, ExecutionFrontierPlan, ExecutionMode, 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, PendingNodeExecution, PersistedMutableNodeState, PersistedMutableRunState, PersistedRunControlState, PersistedRunPolicySnapshot, PersistedRunState, PersistedRuntimeTypeDecoratorOptions, PersistedRuntimeTypeKind, PersistedRuntimeTypeMetadata, PersistedRuntimeTypeMetadataStore, PersistedRuntimeTypeNameResolver, PersistedTokenId, PersistedTriggerSetupState, PersistedWorkflowSnapshot, PersistedWorkflowSnapshotNode, PersistedWorkflowTokenRegistryLike, PinnedNodeOutputsByPort, RegistrationOptions, RetryPolicy, RetryPolicySpec, RunCompletionNotifier, RunCurrentState, RunDataFactory, RunDataSnapshot, RunEvent, RunEventBus, RunEventPublisherDeps, RunEventSubscription, RunExecutionOptions, RunFinishedAtFactory, RunId, RunIdFactory, RunIntentService, RunPruneCandidate, RunQueueEntry, RunResult, RunStateResetRequest, RunStatus, RunStopCondition, RunSummary, RunnableNodeConfig, RunnableNodeInputJson, RunnableNodeOutputJson, 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, WorkflowActivationPolicy, WorkflowBuilder, WorkflowDefinition, WorkflowErrorContext, WorkflowErrorHandler, WorkflowErrorHandlerSpec, WorkflowExecutableNodeClassifier, WorkflowExecutableNodeClassifierFactory, WorkflowExecutionListingRepository, WorkflowExecutionPruneRepository, WorkflowExecutionRepository, WorkflowGraph, WorkflowGraphFactory, WorkflowId, WorkflowNodeConnection, WorkflowNodeInstanceFactory, WorkflowPolicyRuntimeDefaults, WorkflowPrunePolicySpec, WorkflowRepository, WorkflowRunnerResolver, WorkflowRunnerService, WorkflowSnapshotFactory, WorkflowSnapshotResolver, WorkflowStoragePolicyDecisionArgs, WorkflowStoragePolicyMode, WorkflowStoragePolicyResolver, WorkflowStoragePolicySpec, ZodSchemaAny, branchRef, chatModel, container, delay, getPersistedRuntimeTypeMetadata, inject, injectAll, injectable, instanceCachingFactory, instancePerContainerCachingFactory, node, predicateAwareClassFactory, registry, runnableNodeInputType, runnableNodeOutputType, singleton, tool, triggerNodeOutputType, triggerNodeSetupStateType };
|
package/dist/index.js
CHANGED
|
@@ -10,15 +10,117 @@ var SystemClock = class {
|
|
|
10
10
|
};
|
|
11
11
|
|
|
12
12
|
//#endregion
|
|
13
|
-
//#region src/ai/
|
|
13
|
+
//#region src/ai/NodeBackedToolConfig.ts
|
|
14
|
+
var NodeBackedToolConfig = class {
|
|
15
|
+
type;
|
|
16
|
+
toolKind = "nodeBacked";
|
|
17
|
+
description;
|
|
18
|
+
presentation;
|
|
19
|
+
inputSchemaValue;
|
|
20
|
+
outputSchemaValue;
|
|
21
|
+
mapInputValue;
|
|
22
|
+
mapOutputValue;
|
|
23
|
+
constructor(name, node$1, options) {
|
|
24
|
+
this.name = name;
|
|
25
|
+
this.node = node$1;
|
|
26
|
+
this.type = node$1.type;
|
|
27
|
+
this.description = options.description;
|
|
28
|
+
this.presentation = options.presentation;
|
|
29
|
+
this.inputSchemaValue = options.inputSchema;
|
|
30
|
+
this.outputSchemaValue = options.outputSchema;
|
|
31
|
+
this.mapInputValue = options.mapInput;
|
|
32
|
+
this.mapOutputValue = options.mapOutput;
|
|
33
|
+
}
|
|
34
|
+
getCredentialRequirements() {
|
|
35
|
+
return this.node.getCredentialRequirements?.() ?? [];
|
|
36
|
+
}
|
|
37
|
+
getInputSchema() {
|
|
38
|
+
return this.inputSchemaValue;
|
|
39
|
+
}
|
|
40
|
+
getOutputSchema() {
|
|
41
|
+
return this.outputSchemaValue;
|
|
42
|
+
}
|
|
43
|
+
toNodeItem(args) {
|
|
44
|
+
const mapped = this.mapInputValue?.(args) ?? args.input;
|
|
45
|
+
if (this.isItem(mapped)) return mapped;
|
|
46
|
+
return { json: mapped };
|
|
47
|
+
}
|
|
48
|
+
toToolOutput(args) {
|
|
49
|
+
const raw = this.mapOutputValue?.(args) ?? this.readDefaultToolOutput(args.outputs);
|
|
50
|
+
return this.outputSchemaValue.parse(raw);
|
|
51
|
+
}
|
|
52
|
+
readDefaultToolOutput(outputs) {
|
|
53
|
+
const firstMainItem = outputs.main?.[0];
|
|
54
|
+
if (!firstMainItem) throw new Error(`Node-backed tool "${this.name}" did not produce a main output item.`);
|
|
55
|
+
return firstMainItem.json;
|
|
56
|
+
}
|
|
57
|
+
isItem(value) {
|
|
58
|
+
return typeof value === "object" && value !== null && "json" in value;
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
//#endregion
|
|
63
|
+
//#region src/ai/AgentToolFactory.ts
|
|
64
|
+
var AgentToolFactoryImpl = class {
|
|
65
|
+
asTool(node$1, options) {
|
|
66
|
+
return new NodeBackedToolConfig(options.name ?? node$1.name ?? "tool", node$1, options);
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
const AgentToolFactory = new AgentToolFactoryImpl();
|
|
70
|
+
|
|
71
|
+
//#endregion
|
|
72
|
+
//#region src/ai/AgentMessageConfigNormalizerFactory.ts
|
|
73
|
+
var AgentMessageConfigNormalizer = class {
|
|
74
|
+
static normalize(config, args) {
|
|
75
|
+
const fromMessages = this.normalizeRichMessages(config.messages, args);
|
|
76
|
+
if (fromMessages.length > 0) return fromMessages;
|
|
77
|
+
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.");
|
|
78
|
+
}
|
|
79
|
+
static normalizeRichMessages(config, args) {
|
|
80
|
+
if (Array.isArray(config)) return config.map((line) => this.lineToDto(line, args));
|
|
81
|
+
const structured = config;
|
|
82
|
+
const messages = [];
|
|
83
|
+
for (const line of structured.prompt ?? []) messages.push(this.lineToDto(line, args));
|
|
84
|
+
for (const message of structured.buildMessages?.(args) ?? []) messages.push(message);
|
|
85
|
+
return messages;
|
|
86
|
+
}
|
|
87
|
+
static lineToDto(line, args) {
|
|
88
|
+
const content = typeof line.content === "function" ? line.content(args) : line.content;
|
|
89
|
+
return {
|
|
90
|
+
role: line.role,
|
|
91
|
+
content
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
//#endregion
|
|
97
|
+
//#region src/ai/AgentConfigInspectorFactory.ts
|
|
14
98
|
var AgentConfigInspector = class {
|
|
15
99
|
static isAgentNodeConfig(config) {
|
|
16
100
|
if (!config) return false;
|
|
17
101
|
const candidate = config;
|
|
18
|
-
return
|
|
102
|
+
return !!candidate.chatModel && this.hasCompatibleMessageConfiguration(candidate);
|
|
103
|
+
}
|
|
104
|
+
static hasCompatibleMessageConfiguration(candidate) {
|
|
105
|
+
const messages = candidate.messages;
|
|
106
|
+
if (messages === void 0 || messages === null) return false;
|
|
107
|
+
if (Array.isArray(messages)) return messages.length > 0;
|
|
108
|
+
if (typeof messages === "object") {
|
|
109
|
+
const o = messages;
|
|
110
|
+
return Array.isArray(o.prompt) && o.prompt.length > 0 || typeof o.buildMessages === "function";
|
|
111
|
+
}
|
|
112
|
+
return false;
|
|
19
113
|
}
|
|
20
114
|
};
|
|
21
115
|
|
|
116
|
+
//#endregion
|
|
117
|
+
//#region src/ai/AiHost.ts
|
|
118
|
+
/** Defaults aligned with common tool-agent iteration limits (many products use ~10 max rounds). */
|
|
119
|
+
const AgentGuardrailDefaults = {
|
|
120
|
+
maxTurns: 10,
|
|
121
|
+
onTurnLimitReached: "error"
|
|
122
|
+
};
|
|
123
|
+
|
|
22
124
|
//#endregion
|
|
23
125
|
//#region src/workflow/dsl/WhenBuilder.ts
|
|
24
126
|
var WhenBuilder = class WhenBuilder {
|
|
@@ -408,5 +510,5 @@ var AllWorkflowsActiveWorkflowActivationPolicy = class {
|
|
|
408
510
|
};
|
|
409
511
|
|
|
410
512
|
//#endregion
|
|
411
|
-
export { AgentConfigInspector, AllWorkflowsActiveWorkflowActivationPolicy, ChainCursor, ConnectionInvocationIdFactory, ConnectionNodeIdFactory, CoreTokens, CredentialResolverFactory, CredentialUnboundError, DefaultAsyncSleeper, DefaultExecutionBinaryService, DefaultExecutionContextFactory, DefaultWorkflowGraphFactory, EngineExecutionLimitsPolicy, EventPublishingWorkflowExecutionRepository, ExpRetryPolicy, InMemoryBinaryStorage, InMemoryLiveWorkflowRepository, InMemoryRunDataFactory, InMemoryRunEventBus, InProcessRetryRunner, InjectableRuntimeDecoratorComposer, ItemsInputNormalizer, NoRetryPolicy, NodeEventPublisher, PersistedRuntimeTypeMetadataStore, PersistedRuntimeTypeNameResolver, RetryPolicy, RunFinishedAtFactory, RunIntentService, StackTraceCallSitePathResolver, SystemClock, UnavailableBinaryStorage, WhenBuilder, WorkflowBuilder, WorkflowExecutableNodeClassifier, WorkflowExecutableNodeClassifierFactory, branchRef, chatModel, container, delay, getPersistedRuntimeTypeMetadata, inject, injectAll, injectable, instanceCachingFactory, instancePerContainerCachingFactory, node, predicateAwareClassFactory, registry, singleton, tool };
|
|
513
|
+
export { AgentConfigInspector, AgentGuardrailDefaults, AgentMessageConfigNormalizer, AgentToolFactory, AllWorkflowsActiveWorkflowActivationPolicy, ChainCursor, ConnectionInvocationIdFactory, ConnectionNodeIdFactory, CoreTokens, CredentialResolverFactory, CredentialUnboundError, DefaultAsyncSleeper, DefaultExecutionBinaryService, DefaultExecutionContextFactory, DefaultWorkflowGraphFactory, 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, delay, getPersistedRuntimeTypeMetadata, inject, injectAll, injectable, instanceCachingFactory, instancePerContainerCachingFactory, node, predicateAwareClassFactory, registry, singleton, tool };
|
|
412
514
|
//# sourceMappingURL=index.js.map
|