@codemation/core 0.6.0 → 0.8.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.
- package/CHANGELOG.md +31 -0
- package/dist/{EngineRuntimeRegistration.types-Dm129RJ6.d.ts → EngineRuntimeRegistration.types-BP6tsaNP.d.ts} +4 -2
- package/dist/{EngineWorkflowRunnerService-Bf88QtwB.d.cts → EngineWorkflowRunnerService-DzOCa1BW.d.cts} +4 -2
- package/dist/{InMemoryRunDataFactory-Dyl4p2s8.d.cts → InMemoryRunDataFactory-1iz7_SnO.d.cts} +27 -7
- package/dist/{workflowActivationPolicy-6V3OJD3N.cjs → InMemoryRunEventBusRegistry-B0_C4OnP.cjs} +1 -16
- package/dist/InMemoryRunEventBusRegistry-B0_C4OnP.cjs.map +1 -0
- package/dist/{workflowActivationPolicy-Td9HTOuD.js → InMemoryRunEventBusRegistry-C2U83Hmv.js} +2 -11
- package/dist/InMemoryRunEventBusRegistry-C2U83Hmv.js.map +1 -0
- package/dist/{RunIntentService-BDiodxhf.d.ts → RunIntentService-BqhmdoA1.d.ts} +258 -21
- package/dist/{RunIntentService-B1Y3v1H6.d.cts → RunIntentService-S-1lW-gS.d.cts} +209 -5
- package/dist/bootstrap/index.cjs +4 -2
- package/dist/bootstrap/index.d.cts +26 -7
- package/dist/bootstrap/index.d.ts +4 -4
- package/dist/bootstrap/index.js +3 -3
- package/dist/{bootstrap-DVL2ue5v.cjs → bootstrap-BaN6hZ5I.cjs} +7 -4
- package/dist/bootstrap-BaN6hZ5I.cjs.map +1 -0
- package/dist/{bootstrap-DdeiJ8cd.js → bootstrap-d_BMaDT4.js} +7 -4
- package/dist/bootstrap-d_BMaDT4.js.map +1 -0
- package/dist/{index-C2af8ssM.d.ts → index-CVs9rVhl.d.ts} +44 -13
- package/dist/index.cjs +59 -88
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +47 -22
- package/dist/index.d.ts +3 -3
- package/dist/index.js +33 -75
- package/dist/index.js.map +1 -1
- package/dist/{runtime-7Xh9z3dw.js → runtime-DUW6tIJ1.js} +454 -64
- package/dist/runtime-DUW6tIJ1.js.map +1 -0
- package/dist/{runtime-DVBwxFvX.cjs → runtime-Dvo2ru5A.cjs} +589 -73
- package/dist/runtime-Dvo2ru5A.cjs.map +1 -0
- package/dist/testing.cjs +6 -6
- package/dist/testing.cjs.map +1 -1
- package/dist/testing.d.cts +2 -2
- package/dist/testing.d.ts +2 -2
- package/dist/testing.js +3 -3
- package/package.json +1 -1
- package/src/ai/AgentConfigInspectorFactory.ts +2 -2
- package/src/ai/AgentMessageConfigNormalizerFactory.ts +3 -3
- package/src/ai/AiHost.ts +4 -2
- package/src/ai/CallableToolConfig.ts +28 -3
- package/src/authoring/defineNode.types.ts +35 -9
- package/src/authoring/index.ts +1 -0
- package/src/bootstrap/index.ts +6 -1
- package/src/bootstrap/runtime/EngineRuntimeRegistrar.ts +4 -3
- package/src/bootstrap/runtime/EngineRuntimeRegistration.types.ts +3 -0
- package/src/contracts/CodemationTelemetryAttributeNames.ts +12 -0
- package/src/contracts/CodemationTelemetryMetricNames.ts +7 -0
- package/src/contracts/CostCatalogContract.ts +16 -0
- package/src/contracts/CostTrackingTelemetryContract.ts +47 -0
- package/src/contracts/GenAiTelemetryAttributeNames.ts +10 -0
- package/src/contracts/NoOpCostTrackingTelemetry.ts +16 -0
- package/src/contracts/NoOpCostTrackingTelemetryFactory.ts +9 -0
- package/src/contracts/NoOpExecutionTelemetry.ts +26 -0
- package/src/contracts/NoOpExecutionTelemetryFactory.ts +16 -0
- package/src/contracts/NoOpNodeExecutionTelemetry.ts +15 -0
- package/src/contracts/NoOpTelemetryArtifactReference.ts +9 -0
- package/src/contracts/NoOpTelemetrySpanScope.ts +22 -0
- package/src/contracts/index.ts +3 -1
- package/src/contracts/{itemValue.ts → itemExpr.ts} +31 -32
- package/src/contracts/params.ts +10 -0
- package/src/contracts/runTypes.ts +4 -1
- package/src/contracts/runtimeTypes.ts +7 -0
- package/src/contracts/telemetryTypes.ts +105 -0
- package/src/contracts/workflowTypes.ts +20 -2
- package/src/events/EventPublishingWorkflowExecutionRepository.ts +1 -1
- package/src/execution/CatalogBackedCostTrackingTelemetry.ts +81 -0
- package/src/execution/CatalogBackedCostTrackingTelemetryFactory.ts +12 -0
- package/src/execution/DefaultExecutionContextFactory.ts +23 -0
- package/src/execution/ExecutionTelemetryCostTrackingDecoratorFactory.ts +84 -0
- package/src/execution/{ItemValueResolver.ts → ItemExprResolver.ts} +5 -5
- package/src/execution/NodeActivationRequestComposer.ts +1 -0
- package/src/execution/NodeExecutionSnapshotFactory.ts +2 -0
- package/src/execution/NodeExecutor.ts +6 -6
- package/src/execution/StaticCostCatalog.ts +22 -0
- package/src/execution/WorkflowRunExecutionContextFactory.ts +2 -0
- package/src/execution/index.ts +5 -1
- package/src/index.ts +1 -1
- package/src/orchestration/NodeExecutionRequestHandlerService.ts +1 -0
- package/src/orchestration/RunContinuationService.ts +4 -0
- package/src/orchestration/RunStartService.ts +2 -0
- package/src/policies/storage/RunPolicySnapshotFactory.ts +9 -0
- package/src/runStorage/InMemoryRunData.ts +9 -5
- package/src/runStorage/InMemoryWorkflowExecutionRepository.ts +4 -2
- package/src/types/index.ts +7 -1
- package/src/workflowSnapshots/WorkflowSnapshotCodec.ts +1 -1
- package/dist/bootstrap-DVL2ue5v.cjs.map +0 -1
- package/dist/bootstrap-DdeiJ8cd.js.map +0 -1
- package/dist/runtime-7Xh9z3dw.js.map +0 -1
- package/dist/runtime-DVBwxFvX.cjs.map +0 -1
- package/dist/workflowActivationPolicy-6V3OJD3N.cjs.map +0 -1
- package/dist/workflowActivationPolicy-Td9HTOuD.js.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
import { a as RunnableOutputBehavior, c as InProcessRetryRunner, f as CredentialResolverFactory, i as UnavailableBinaryStorage, l as DefaultExecutionContextFactory, n as InMemoryBinaryStorage, o as RunnableOutputBehaviorResolver, r as DefaultExecutionBinaryService, s as
|
|
1
|
+
import { $ as WorkflowGraph, $n as WorkflowExecutionListingRepository, $r as CredentialTypeRegistry, $t as TriggerCleanupHandle, A as NodeOutputs, An as NodeInputsByPort, Ar as AnyCredentialType, At as ExecutionContext, B as RunId, Bn as PinnedNodeOutputsByPort, Br as CredentialInstanceRecord, Bt as NodeBinaryAttachmentService, C as NodeErrorHandler, Ci as RunEvent, Cn as ConnectionInvocationRecord, Cr as CostTrackingComponent, Ct as BinaryStorageStatResult, D as NodeIdRef, Dn as NodeExecutionError, Dr as CostTrackingTelemetryFactory, Dt as EngineHost, E as NodeId, En as ExecutionFrontierPlan, Er as CostTrackingTelemetryAttributeNames, Et as EngineDeps, F as ParentExecutionRef, Fn as PersistedRunSchedulingState, Fr as CredentialFieldSchema, Ft as NodeActivationContinuation, G as TriggerNodeConfig, Gn as RunPruneCandidate, Gr as CredentialRequirement, Gt as NodeExecutionStatePublisher, H as RunnableNodeConfig, Hn as RunCurrentState, Hr as CredentialMaterialSourceKind, Ht as NodeExecutionRequest, I as PersistedRunPolicySnapshot, In as PersistedRunState, Ir as CredentialHealth, It as NodeActivationReceipt, J as UpstreamRefPlaceholder, Jn as RunStateResetRequest, Jr as CredentialSessionService, Jt as PersistedTriggerSetupState, K as TriggerNodeOutputJson, Kn as RunQueueEntry, Kr as CredentialSessionFactory, Kt as NodeExecutor, L as PersistedTokenId, Ln as PersistedWorkflowSnapshot, Lr as CredentialHealthStatus, Lt as NodeActivationRequest, M as NodeSchedulerDecision, Mn as PersistedMutableNodeState, Mr as CredentialAuthDefinition, Mt as ItemNode, N as OutputPortKey, Nn as PersistedMutableRunState, Nr as CredentialBinding, Nt as LiveWorkflowRepository, O as NodeKind, On as NodeExecutionSnapshot, Or as CostTrackingTelemetryMetricNames, Ot as ExecutableTriggerNode, P as PairedItemRef, Pn as PersistedRunControlState, Pr as CredentialBindingKey, Pt as MultiInputNode, Q as WorkflowErrorHandlerSpec, Qn as WebhookRunResult, Qr as CredentialTypeId, Qt as TestableTriggerNode, R as RunDataFactory, Rn as PersistedWorkflowSnapshotNode, Rr as CredentialHealthTester, Rt as NodeActivationRequestBase, S as NodeDefinition, Si as EngineExecutionLimitsPolicyConfig, Sn as ConnectionInvocationId, Sr as NoOpTelemetryArtifactReference, St as BinaryStorageReadResult, T as NodeErrorHandlerSpec, Ti as RunEventSubscription, Tn as EngineRunCounters, Tr as CostTrackingTelemetry, Tt as BinaryStorageWriteResult, U as RunnableNodeInputJson, Un as RunEventPublisherDeps, Ur as CredentialOAuth2AuthDefinition, Ut as NodeExecutionRequestHandler, V as RunIdFactory, Vn as RunCompletionNotifier, Vr as CredentialJsonRecord, Vt as NodeExecutionContext, W as RunnableNodeOutputJson, Wn as RunExecutionOptions, Wr as CredentialOAuth2ScopesFromPublicConfig, Wt as NodeExecutionScheduler, X as WorkflowErrorContext, Xn as RunStopCondition, Xr as CredentialType, Xt as RunnableNode, Y as WorkflowDefinition, Yn as RunStatus, Yr as CredentialSetupStatus, Yt as PreparedNodeActivationDispatch, Z as WorkflowErrorHandler, Zn as RunSummary, Zr as CredentialTypeDefinition, Zt as RunnableNodeExecuteArgs, _ as JsonValue, _i as registry, _n as WebhookTriggerResolution, _r as CodemationTelemetryAttributeNames, _t as NoneRetryPolicySpec, a as BinaryAttachment, ai as InjectionToken, an as TriggerTestItemsContext, ar as TelemetryArtifactAttachment, at as WorkflowStoragePolicyDecisionArgs, b as NodeConfigBase, bn as WorkflowActivationPolicy, br as NoOpNodeExecutionTelemetry, bt as BinaryBody, c as ExecutionMode, ci as TypeToken, cn as WorkflowRunnerResolver, cr as TelemetryAttributes, ct as WorkflowStoragePolicySpec, d as ItemBinary, di as inject, dn as WorkflowSnapshotResolver, dr as TelemetryScope, dt as runnableNodeInputType, ei as CredentialUnboundError, en as TriggerNode, er as WorkflowExecutionPruneRepository, et as WorkflowGraphFactory, f as Items, fi as injectAll, fn as HttpMethod, fr as TelemetrySpanEnd, ft as runnableNodeOutputType, g as JsonPrimitive, gi as predicateAwareClassFactory, gn as WebhookTriggerMatcher, gr as GenAiTelemetryAttributeNames, gt as FixedRetryPolicySpec, h as JsonObject, hi as instancePerContainerCachingFactory, hn as WebhookInvocationMatch, hr as CodemationTelemetryMetricNames, ht as ExponentialRetryPolicySpec, i as ActivationIdFactory, ii as Disposable, in as TriggerSetupStateRepository, ir as NodeExecutionTelemetry, it as WorkflowPrunePolicySpec, j as NodeRef, jn as PendingNodeExecution, jr as CredentialAdvancedSectionPresentation, jt as ExecutionContextFactory, k as NodeOffloadPolicy, kn as NodeExecutionStatus, kr as CostTrackingUsageRecord, kt as ExecutionBinaryService, l as InputPortKey, li as container, ln as WorkflowRunnerService, lr as TelemetryChildSpanStart, lt as branchRef, m as JsonNonArray, mi as instanceCachingFactory, mn as WebhookControlSignal, mr as TelemetrySpanScope, mt as triggerNodeSetupStateType, n as InMemoryLiveWorkflowRepository, ni as Container, nn as TriggerSetupContext, nr as ExecutionTelemetry, nt as WorkflowNodeConnection, o as BinaryPreviewKind, oi as Lifecycle, on as WorkflowNodeInstanceFactory, or as TelemetryArtifactReference, ot as WorkflowStoragePolicyMode, p as JsonArray, pi as injectable, pn as TriggerInstanceId, pr as TelemetrySpanEventRecord, pt as triggerNodeOutputType, q as TriggerNodeSetupState, qn as RunResult, qr as CredentialSessionFactoryArgs, qt as NodeResolver, ri as DependencyContainer, rn as TriggerSetupStateFor, rr as ExecutionTelemetryFactory, rt as WorkflowPolicyRuntimeDefaults, s as Edge, si as RegistrationOptions, sn as WorkflowRepository, sr as TelemetryAttributePrimitive, st as WorkflowStoragePolicyResolver, t as RunIntentService, ti as OAuth2ProviderFromPublicConfig, tn as TriggerRuntimeDiagnostics, tr as WorkflowExecutionRepository, tt as WorkflowId, u as Item, ui as delay, un as WorkflowSnapshotFactory, ur as TelemetryMetricRecord, ut as nodeRef, v as MutableRunData, vi as singleton, vn as WebhookTriggerRoutingDiagnostics, vr as NoOpExecutionTelemetryFactory, vt as RetryPolicySpec, w as NodeErrorHandlerArgs, wi as RunEventBus, wn as CurrentStateExecutionRequest, wr as CostTrackingPriceQuote, wt as BinaryStorageWriteRequest, x as NodeConnectionName, xi as EngineExecutionLimitsPolicy, xn as ConnectionInvocationAppendArgs, xr as NoOpTelemetrySpanScope, xt as BinaryStorage, y as NodeActivationId, yi as CoreTokens, yn as AllWorkflowsActiveWorkflowActivationPolicy, yr as NoOpExecutionTelemetry, yt as BinaryAttachmentCreateRequest, z as RunDataSnapshot, zn as PersistedWorkflowTokenRegistryLike, zr as CredentialInstanceId, zt as NodeActivationScheduler } from "./RunIntentService-S-1lW-gS.cjs";
|
|
2
|
+
import { a as RunnableOutputBehavior, c as InProcessRetryRunner, f as CredentialResolverFactory, i as UnavailableBinaryStorage, l as DefaultExecutionContextFactory, m as CostCatalogEntry, n as InMemoryBinaryStorage, o as RunnableOutputBehaviorResolver, p as CostCatalog, r as DefaultExecutionBinaryService, s as ItemExprResolver, t as InMemoryRunDataFactory, u as DefaultAsyncSleeper } from "./InMemoryRunDataFactory-1iz7_SnO.cjs";
|
|
3
3
|
import { ZodType, input, output, z } from "zod";
|
|
4
4
|
|
|
5
5
|
//#region src/contracts/emitPorts.d.ts
|
|
@@ -20,9 +20,9 @@ declare function isUnbrandedPortsEmissionShape(value: unknown): value is Readonl
|
|
|
20
20
|
*/
|
|
21
21
|
declare function getOriginIndexFromItem(item: Item): number | undefined;
|
|
22
22
|
//#endregion
|
|
23
|
-
//#region src/contracts/
|
|
24
|
-
declare const
|
|
25
|
-
type
|
|
23
|
+
//#region src/contracts/itemExpr.d.ts
|
|
24
|
+
declare const ITEM_EXPR_BRAND: unique symbol;
|
|
25
|
+
type ItemExprResolvedContext = Readonly<{
|
|
26
26
|
runId: RunId;
|
|
27
27
|
workflowId: WorkflowId;
|
|
28
28
|
nodeId: NodeId;
|
|
@@ -32,28 +32,33 @@ type ItemValueResolvedContext = Readonly<{
|
|
|
32
32
|
/**
|
|
33
33
|
* Context aligned with former {@link ItemInputMapperContext} — use **`data`** to read any completed upstream node.
|
|
34
34
|
*/
|
|
35
|
-
type
|
|
36
|
-
type
|
|
35
|
+
type ItemExprContext = ItemExprResolvedContext;
|
|
36
|
+
type ItemExprArgs<TItemJson = unknown> = Readonly<{
|
|
37
37
|
item: Item<TItemJson>;
|
|
38
38
|
itemIndex: number;
|
|
39
39
|
items: Items<TItemJson>;
|
|
40
|
-
ctx:
|
|
40
|
+
ctx: ItemExprContext;
|
|
41
41
|
}>;
|
|
42
|
-
type
|
|
43
|
-
type
|
|
44
|
-
readonly [
|
|
45
|
-
readonly fn:
|
|
42
|
+
type ItemExprCallback<T, TItemJson = unknown> = (args: ItemExprArgs<TItemJson>) => T | Promise<T>;
|
|
43
|
+
type ItemExpr<T, TItemJson = unknown> = Readonly<{
|
|
44
|
+
readonly [ITEM_EXPR_BRAND]: true;
|
|
45
|
+
readonly fn: ItemExprCallback<T, TItemJson>;
|
|
46
46
|
}>;
|
|
47
|
-
declare function
|
|
48
|
-
declare function
|
|
47
|
+
declare function itemExpr<T, TItemJson = unknown>(fn: ItemExprCallback<T, TItemJson>): ItemExpr<T, TItemJson>;
|
|
48
|
+
declare function isItemExpr<T, TItemJson = unknown>(value: unknown): value is ItemExpr<T, TItemJson>;
|
|
49
49
|
/**
|
|
50
|
-
* Deep-resolves {@link
|
|
50
|
+
* Deep-resolves {@link itemExpr} leaves. Returns a new graph (does not mutate the original config object).
|
|
51
51
|
*/
|
|
52
|
-
declare function
|
|
52
|
+
declare function resolveItemExprsInUnknown(value: unknown, args: ItemExprArgs, seen?: WeakSet<object>): Promise<unknown>;
|
|
53
53
|
/**
|
|
54
|
-
* Clones runnable config (best-effort) so per-item {@link
|
|
54
|
+
* Clones runnable config (best-effort) so per-item {@link itemExpr} resolution never mutates shared instances.
|
|
55
55
|
*/
|
|
56
|
-
declare function
|
|
56
|
+
declare function resolveItemExprsForExecution(config: unknown, nodeCtx: NodeExecutionContext, item: Item, itemIndex: number, items: Items): Promise<unknown | undefined>;
|
|
57
|
+
//#endregion
|
|
58
|
+
//#region src/contracts/params.d.ts
|
|
59
|
+
type Expr<T, TItemJson = unknown> = ItemExpr<T, TItemJson>;
|
|
60
|
+
type Param<T, TItemJson = unknown> = T | Expr<T, TItemJson>;
|
|
61
|
+
type ParamDeep<T, TItemJson = unknown> = Expr<T, TItemJson> | (T extends readonly (infer U)[] ? ReadonlyArray<ParamDeep<U, TItemJson>> : never) | (T extends object ? { [K in keyof T]: ParamDeep<T[K], TItemJson> } : T);
|
|
57
62
|
//#endregion
|
|
58
63
|
//#region src/contracts/NoRetryPolicy.d.ts
|
|
59
64
|
declare class NoRetryPolicy implements NoneRetryPolicySpec {
|
|
@@ -83,6 +88,19 @@ declare class ExpRetryPolicy implements ExponentialRetryPolicySpec {
|
|
|
83
88
|
constructor(maxAttempts: number, initialDelayMs: number, multiplier: number, maxDelayMs?: number | undefined, jitter?: boolean | undefined);
|
|
84
89
|
}
|
|
85
90
|
//#endregion
|
|
91
|
+
//#region src/contracts/NoOpCostTrackingTelemetry.d.ts
|
|
92
|
+
declare class NoOpCostTrackingTelemetry implements CostTrackingTelemetry {
|
|
93
|
+
captureUsage(_: CostTrackingUsageRecord): Promise<CostTrackingPriceQuote | undefined>;
|
|
94
|
+
forScope(_: TelemetryScope): CostTrackingTelemetry;
|
|
95
|
+
}
|
|
96
|
+
//#endregion
|
|
97
|
+
//#region src/contracts/NoOpCostTrackingTelemetryFactory.d.ts
|
|
98
|
+
declare class NoOpCostTrackingTelemetryFactory implements CostTrackingTelemetryFactory {
|
|
99
|
+
create(_: Readonly<{
|
|
100
|
+
telemetry: ExecutionTelemetry;
|
|
101
|
+
}>): CostTrackingTelemetry;
|
|
102
|
+
}
|
|
103
|
+
//#endregion
|
|
86
104
|
//#region src/contracts/executionPersistenceContracts.d.ts
|
|
87
105
|
/** Canonical id for persisted execution rows (activation or connection invocation). */
|
|
88
106
|
type ExecutionInstanceId = string;
|
|
@@ -444,12 +462,13 @@ type DefineNodeExecuteArgs<TConfig$1 extends CredentialJsonRecord, TInputJson> =
|
|
|
444
462
|
config: TConfig$1;
|
|
445
463
|
}>>;
|
|
446
464
|
}>;
|
|
465
|
+
type DefinedNodeConfigInput<TConfigResolved extends CredentialJsonRecord, TItemJson> = ParamDeep<TConfigResolved, TItemJson>;
|
|
447
466
|
interface DefinedNode<TKey$1 extends string, TConfig$1 extends CredentialJsonRecord, TInputJson, TOutputJson, _TBindings extends DefinedNodeCredentialBindings | undefined = undefined> {
|
|
448
467
|
readonly kind: "defined-node";
|
|
449
468
|
readonly key: TKey$1;
|
|
450
469
|
readonly title: string;
|
|
451
470
|
readonly description?: string;
|
|
452
|
-
create(config: TConfig$1, name?: string, id?: string): RunnableNodeConfig<TInputJson, TOutputJson>;
|
|
471
|
+
create<TConfigItemJson = TInputJson>(config: DefinedNodeConfigInput<TConfig$1, TConfigItemJson>, name?: string, id?: string): RunnableNodeConfig<TInputJson, TOutputJson>;
|
|
453
472
|
register(context: {
|
|
454
473
|
registerNode<TValue>(token: TypeToken<TValue>, implementation?: TypeToken<TValue>): void;
|
|
455
474
|
}): void;
|
|
@@ -579,6 +598,9 @@ declare class CallableToolConfig<TInputSchema extends ZodSchemaAny, TOutputSchem
|
|
|
579
598
|
* Parses tool input and output with the configured Zod schemas.
|
|
580
599
|
*/
|
|
581
600
|
executeTool(args: ToolExecuteArgs<CallableToolConfig<TInputSchema, TOutputSchema>, input<TInputSchema>>): Promise<output<TOutputSchema>>;
|
|
601
|
+
private parseInput;
|
|
602
|
+
private parseOutput;
|
|
603
|
+
private decorateValidationError;
|
|
582
604
|
}
|
|
583
605
|
//#endregion
|
|
584
606
|
//#region src/ai/CallableToolFactory.d.ts
|
|
@@ -676,7 +698,7 @@ type AgentMessageLine<TInputJson = unknown> = AgentMessageDto | AgentMessageTemp
|
|
|
676
698
|
* Message list for an agent. Prefer a **plain array** of `{ role, content }` (optionally with function `content` for templates).
|
|
677
699
|
* Use the object form only when you need `buildMessages` to append messages after optional `prompt` lines.
|
|
678
700
|
*/
|
|
679
|
-
type AgentMessageConfig<TInputJson = unknown> =
|
|
701
|
+
type AgentMessageConfig<TInputJson = unknown> = Expr<ReadonlyArray<AgentMessageLine<TInputJson>>, TInputJson> | ReadonlyArray<AgentMessageLine<TInputJson>> | {
|
|
680
702
|
readonly prompt?: ReadonlyArray<AgentMessageLine<TInputJson>>;
|
|
681
703
|
readonly buildMessages?: (args: AgentMessageBuildArgs<TInputJson>) => ReadonlyArray<AgentMessageDto>;
|
|
682
704
|
};
|
|
@@ -709,6 +731,8 @@ type AgentToolCallPlanner<_TNodeConfig = unknown> = (item: Item, index: number,
|
|
|
709
731
|
interface ChatModelConfig {
|
|
710
732
|
readonly type: TypeToken<ChatModelFactory<ChatModelConfig>>;
|
|
711
733
|
readonly name: string;
|
|
734
|
+
readonly provider?: string;
|
|
735
|
+
readonly modelName?: string;
|
|
712
736
|
readonly presentation?: AgentCanvasPresentation;
|
|
713
737
|
getCredentialRequirements?(): ReadonlyArray<CredentialRequirement>;
|
|
714
738
|
}
|
|
@@ -819,7 +843,8 @@ declare class EventPublishingWorkflowExecutionRepository implements WorkflowExec
|
|
|
819
843
|
limit?: number;
|
|
820
844
|
}>): Promise<ReadonlyArray<RunSummary>>;
|
|
821
845
|
listRunsOlderThan(args: Readonly<{
|
|
822
|
-
|
|
846
|
+
nowIso: string;
|
|
847
|
+
defaultRetentionSeconds: number;
|
|
823
848
|
limit?: number;
|
|
824
849
|
}>): Promise<ReadonlyArray<RunPruneCandidate>>;
|
|
825
850
|
}
|
|
@@ -896,5 +921,5 @@ declare class ItemsInputNormalizer {
|
|
|
896
921
|
private isItem;
|
|
897
922
|
}
|
|
898
923
|
//#endregion
|
|
899
|
-
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, CallableToolConfig, type CallableToolConfigOptions, type CallableToolExecuteHandler, CallableToolFactory, CallableToolKindToken, ChainCursor, ChatModelConfig, ChatModelFactory, ChatModelStructuredOutputOptions, type Clock, ConnectionInvocationAppendArgs, ConnectionInvocationId, ConnectionInvocationIdFactory, ConnectionInvocationKind, ConnectionInvocationRecord, ConnectionNodeIdFactory, Container, CoreTokens, CredentialAdvancedSectionPresentation, CredentialAuthDefinition, CredentialBinding, CredentialBindingKey, CredentialFieldSchema, CredentialHealth, CredentialHealthStatus, CredentialHealthTester, CredentialInstanceId, CredentialInstanceRecord, CredentialJsonRecord, CredentialMaterialSourceKind, CredentialOAuth2AuthDefinition, CredentialOAuth2ScopesFromPublicConfig, CredentialRequirement, CredentialResolverFactory, CredentialSessionFactory, CredentialSessionFactoryArgs, CredentialSessionService, CredentialSetupStatus, CredentialType, CredentialTypeDefinition, CredentialTypeId, CredentialTypeRegistry, CredentialUnboundError, CurrentStateExecutionRequest, DefaultAsyncSleeper, DefaultExecutionBinaryService, DefaultExecutionContextFactory, DefaultWorkflowGraphFactory, DefineBatchNodeOptions, DefineCredentialOptions, DefineNodeExecuteArgs, 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,
|
|
924
|
+
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, CallableToolConfig, type CallableToolConfigOptions, type CallableToolExecuteHandler, CallableToolFactory, CallableToolKindToken, ChainCursor, ChatModelConfig, ChatModelFactory, ChatModelStructuredOutputOptions, type Clock, CodemationTelemetryAttributeNames, CodemationTelemetryMetricNames, ConnectionInvocationAppendArgs, ConnectionInvocationId, ConnectionInvocationIdFactory, ConnectionInvocationKind, ConnectionInvocationRecord, ConnectionNodeIdFactory, Container, CoreTokens, CostCatalog, CostCatalogEntry, CostTrackingComponent, CostTrackingPriceQuote, CostTrackingTelemetry, CostTrackingTelemetryAttributeNames, CostTrackingTelemetryFactory, CostTrackingTelemetryMetricNames, CostTrackingUsageRecord, CredentialAdvancedSectionPresentation, CredentialAuthDefinition, CredentialBinding, CredentialBindingKey, CredentialFieldSchema, CredentialHealth, CredentialHealthStatus, CredentialHealthTester, CredentialInstanceId, CredentialInstanceRecord, CredentialJsonRecord, CredentialMaterialSourceKind, CredentialOAuth2AuthDefinition, CredentialOAuth2ScopesFromPublicConfig, CredentialRequirement, CredentialResolverFactory, CredentialSessionFactory, CredentialSessionFactoryArgs, CredentialSessionService, CredentialSetupStatus, CredentialType, CredentialTypeDefinition, CredentialTypeId, CredentialTypeRegistry, CredentialUnboundError, CurrentStateExecutionRequest, DefaultAsyncSleeper, DefaultExecutionBinaryService, DefaultExecutionContextFactory, DefaultWorkflowGraphFactory, DefineBatchNodeOptions, DefineCredentialOptions, DefineNodeExecuteArgs, DefineNodeOptions, DefinedNode, DefinedNodeConfigInput, DefinedNodeCredentialAccessors, DefinedNodeCredentialBinding, DefinedNodeCredentialBindings, DefinedNodeRegistry, DefinedNodeRunContext, DependencyContainer, Disposable, Edge, EngineDeps, EngineExecutionLimitsPolicy, type EngineExecutionLimitsPolicyConfig, EngineHost, EngineRunCounters, EventPublishingWorkflowExecutionRepository, ExecutableTriggerNode, ExecutionBinaryService, ExecutionContext, ExecutionContextFactory, ExecutionFrontierPlan, ExecutionInstanceDto, ExecutionInstanceId, ExecutionMode, ExecutionPayloadPolicyFields, ExecutionTelemetry, ExecutionTelemetryFactory, ExpRetryPolicy, ExponentialRetryPolicySpec, Expr, FixedRetryPolicySpec, GenAiTelemetryAttributeNames, HttpMethod, InMemoryBinaryStorage, InMemoryLiveWorkflowRepository, InMemoryRunDataFactory, InMemoryRunEventBus, InProcessRetryRunner, InjectableRuntimeDecoratorComposer, InjectionToken, InputPortKey, Item, ItemBinary, ItemExpr, ItemExprArgs, ItemExprCallback, ItemExprContext, ItemExprResolvedContext, ItemExprResolver, ItemNode, Items, ItemsInputNormalizer, JsonArray, JsonNonArray, JsonObject, JsonPrimitive, JsonValue, LangChainChatModelLike, LangChainStructuredOutputModelLike, Lifecycle, LiveWorkflowRepository, MultiInputNode, MutableRunData, NoOpCostTrackingTelemetry, NoOpCostTrackingTelemetryFactory, NoOpExecutionTelemetry, NoOpExecutionTelemetryFactory, NoOpNodeExecutionTelemetry, NoOpTelemetryArtifactReference, NoOpTelemetrySpanScope, NoRetryPolicy, 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, NodeExecutionTelemetry, NodeExecutor, NodeId, NodeIdRef, NodeInputsByPort, NodeKind, NodeOffloadPolicy, NodeOutputNormalizer, NodeOutputs, NodeRef, NodeResolver, NodeSchedulerDecision, NoneRetryPolicySpec, OAuth2ProviderFromPublicConfig, OutputPortKey, PairedItemRef, Param, ParamDeep, 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, PortsEmission, 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, RunnableNode, RunnableNodeConfig, RunnableNodeExecuteArgs, RunnableNodeInputJson, RunnableNodeOutputJson, RunnableOutputBehaviorResolver, SlotExecutionStateDto, StackTraceCallSitePathResolver, StepSequenceOutput, SystemClock, TelemetryArtifactAttachment, TelemetryArtifactReference, TelemetryAttributePrimitive, TelemetryAttributes, TelemetryChildSpanStart, TelemetryMetricRecord, TelemetryScope, TelemetrySpanEnd, TelemetrySpanEventRecord, TelemetrySpanScope, 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, callableTool, chatModel, container, defineBatchNode, defineCredential, defineNode, delay, emitPorts, getOriginIndexFromItem, getPersistedRuntimeTypeMetadata, inject, injectAll, injectable, instanceCachingFactory, instancePerContainerCachingFactory, isItemExpr, isPortsEmission, isUnbrandedPortsEmissionShape, itemExpr, node, nodeRef, predicateAwareClassFactory, registry, resolveItemExprsForExecution, resolveItemExprsInUnknown, runnableNodeInputType, runnableNodeOutputType, singleton, tool, triggerNodeOutputType, triggerNodeSetupStateType };
|
|
900
925
|
//# sourceMappingURL=index.d.cts.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
import { $ as
|
|
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, CallableToolConfig, CallableToolConfigOptions, CallableToolExecuteHandler, CallableToolFactory, CallableToolKindToken, ChainCursor, ChatModelConfig, ChatModelFactory, ChatModelStructuredOutputOptions, Clock, ConnectionInvocationAppendArgs, ConnectionInvocationId, ConnectionInvocationIdFactory, ConnectionInvocationKind, ConnectionInvocationRecord, ConnectionNodeIdFactory, Container, CoreTokens, CredentialAdvancedSectionPresentation, CredentialAuthDefinition, CredentialBinding, CredentialBindingKey, CredentialFieldSchema, CredentialHealth, CredentialHealthStatus, CredentialHealthTester, CredentialInstanceId, CredentialInstanceRecord, CredentialJsonRecord, CredentialMaterialSourceKind, CredentialOAuth2AuthDefinition, CredentialOAuth2ScopesFromPublicConfig, CredentialRequirement, CredentialResolverFactory, CredentialSessionFactory, CredentialSessionFactoryArgs, CredentialSessionService, CredentialSetupStatus, CredentialType, CredentialTypeDefinition, CredentialTypeId, CredentialTypeRegistry, CredentialUnboundError, CurrentStateExecutionRequest, DefaultAsyncSleeper, DefaultExecutionBinaryService, DefaultExecutionContextFactory, DefaultWorkflowGraphFactory, DefineBatchNodeOptions, DefineCredentialOptions, DefineNodeExecuteArgs, 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,
|
|
1
|
+
import { $ as Expr, $i as CredentialJsonRecord, $n as NodeExecutionContext, $r as RunCompletionNotifier, $t as RunIdFactory, A as ExecutionInstanceDto, Aa as singleton, Ai as NoOpExecutionTelemetryFactory, An as RetryPolicySpec, Ar as WebhookTriggerRoutingDiagnostics, At as MutableRunData, B as RunSlotProjectionState, Bi as CostTrackingTelemetryMetricNames, Bn as ExecutableTriggerNode, Br as NodeExecutionSnapshot, Bt as NodeKind, C as BranchOutputGuard, Ca as inject, Ci as TelemetryScope, Cn as runnableNodeInputType, Cr as WorkflowSnapshotResolver, Ct as ItemBinary, D as RunFinishedAtFactory, Da as instancePerContainerCachingFactory, Di as CodemationTelemetryMetricNames, Dn as ExponentialRetryPolicySpec, Dr as WebhookInvocationMatch, Dt as JsonObject, E as ValidStepSequence, Ea as instanceCachingFactory, Ei as TelemetrySpanScope, En as triggerNodeSetupStateType, Er as WebhookControlSignal, Et as JsonNonArray, F as PersistedExecutionInstanceRecord, Fa as RunEvent, Fi as CostTrackingComponent, Fn as BinaryStorageStatResult, Fr as ConnectionInvocationRecord, Ft as NodeErrorHandler, G as WorkflowRunDetailDto, Gi as CredentialBinding, Gn as LiveWorkflowRepository, Gr as PersistedMutableRunState, Gt as OutputPortKey, H as WorkItemId, Hi as AnyCredentialType, Hn as ExecutionContext, Hr as NodeInputsByPort, Ht as NodeOutputs, I as PersistedRunSlotProjectionRecord, Ia as RunEventBus, Ii as CostTrackingPriceQuote, In as BinaryStorageWriteRequest, Ir as CurrentStateExecutionRequest, It as NodeErrorHandlerArgs, J as CostCatalog, Ji as CredentialHealth, Jn as NodeActivationReceipt, Jr as PersistedRunState, Jt as PersistedRunPolicySnapshot, K as NoOpCostTrackingTelemetryFactory, Ki as CredentialBindingKey, Kn as MultiInputNode, Kr as PersistedRunControlState, Kt as PairedItemRef, L as PersistedRunWorkItemKind, La as RunEventSubscription, Li as CostTrackingTelemetry, Ln as BinaryStorageWriteResult, Lr as EngineRunCounters, Lt as NodeErrorHandlerSpec, M as ExecutionPayloadPolicyFields, Mi as NoOpNodeExecutionTelemetry, Mn as BinaryBody, Mr as WorkflowActivationPolicy, Mt as NodeConfigBase, N as PayloadStorageKind, Na as EngineExecutionLimitsPolicy, Ni as NoOpTelemetrySpanScope, Nn as BinaryStorage, Nr as ConnectionInvocationAppendArgs, Nt as NodeConnectionName, O as BatchId, Oa as predicateAwareClassFactory, Oi as GenAiTelemetryAttributeNames, On as FixedRetryPolicySpec, Or as WebhookTriggerMatcher, Ot as JsonPrimitive, P as PersistedExecutionInstanceKind, Pa as EngineExecutionLimitsPolicyConfig, Pi as NoOpTelemetryArtifactReference, Pn as BinaryStorageReadResult, Pr as ConnectionInvocationId, Pt as NodeDefinition, Q as NoRetryPolicy, Qi as CredentialInstanceRecord, Qn as NodeBinaryAttachmentService, Qr as PinnedNodeOutputsByPort, Qt as RunId, R as PersistedRunWorkItemRecord, Ri as CostTrackingTelemetryAttributeNames, Rn as EngineDeps, Rr as ExecutionFrontierPlan, Rt as NodeId, S as BranchMoreArgs, Sa as delay, Si as TelemetryMetricRecord, Sn as nodeRef, Sr as WorkflowSnapshotFactory, St as Item, T as StepSequenceOutput, Ta as injectable, Ti as TelemetrySpanEventRecord, Tn as triggerNodeOutputType, Tr as TriggerInstanceId, Tt as JsonArray, U as WorkItemStatus, Ui as CredentialAdvancedSectionPresentation, Un as ExecutionContextFactory, Ur as PendingNodeExecution, Ut as NodeRef, V as SlotExecutionStateDto, Vi as CostTrackingUsageRecord, Vn as ExecutionBinaryService, Vr as NodeExecutionStatus, Vt as NodeOffloadPolicy, W as WorkflowDetailSelectionState, Wi as CredentialAuthDefinition, Wn as ItemNode, Wr as PersistedMutableNodeState, Wt as NodeSchedulerDecision, X as ExpRetryPolicy, Xi as CredentialHealthTester, Xn as NodeActivationRequestBase, Xr as PersistedWorkflowSnapshotNode, Xt as RunDataFactory, Y as CostCatalogEntry, Yi as CredentialHealthStatus, Yn as NodeActivationRequest, Yr as PersistedWorkflowSnapshot, Yt as PersistedTokenId, Z as RetryPolicy, Zi as CredentialInstanceId, Zn as NodeActivationScheduler, Zr as PersistedWorkflowTokenRegistryLike, Zt as RunDataSnapshot, _ as ChainCursor, _a as InjectionToken, _i as TelemetryArtifactAttachment, _n as WorkflowStoragePolicyDecisionArgs, _r as TriggerTestItemsContext, _t as BinaryAttachment, aa as CredentialSessionFactoryArgs, ai as RunResult, an as TriggerNodeSetupState, ar as NodeResolver, at as ItemExprContext, b as AnyTriggerNodeConfig, ba as TypeToken, bi as TelemetryAttributes, bn as WorkflowStoragePolicySpec, br as WorkflowRunnerResolver, bt as ExecutionMode, ca as CredentialType, ci as RunStopCondition, cn as WorkflowErrorContext, cr as RunnableNode, ct as itemExpr, d as DefaultWorkflowGraphFactory, da as CredentialTypeRegistry, di as WorkflowExecutionListingRepository, dn as WorkflowGraph, dr as TriggerCleanupHandle, dt as getOriginIndexFromItem, ea as CredentialMaterialSourceKind, ei as RunCurrentState, en as RunnableNodeConfig, er as NodeExecutionRequest, et as Param, f as WorkflowExecutableNodeClassifierFactory, fa as CredentialUnboundError, fi as WorkflowExecutionPruneRepository, fn as WorkflowGraphFactory, fr as TriggerNode, ft as PortsEmission, g as WorkflowBuilder, ga as Disposable, gi as NodeExecutionTelemetry, gn as WorkflowPrunePolicySpec, gr as TriggerSetupStateRepository, gt as ActivationIdFactory, h as ConnectionInvocationIdFactory, ha as DependencyContainer, hi as ExecutionTelemetryFactory, hn as WorkflowPolicyRuntimeDefaults, hr as TriggerSetupStateFor, ht as isUnbrandedPortsEmissionShape, ia as CredentialSessionFactory, ii as RunQueueEntry, in as TriggerNodeOutputJson, ir as NodeExecutor, it as ItemExprCallback, j as ExecutionInstanceId, ja as CoreTokens, ji as NoOpExecutionTelemetry, jn as BinaryAttachmentCreateRequest, jr as AllWorkflowsActiveWorkflowActivationPolicy, jt as NodeActivationId, k as ConnectionInvocationKind, ka as registry, ki as CodemationTelemetryAttributeNames, kn as NoneRetryPolicySpec, kr as WebhookTriggerResolution, kt as JsonValue, la as CredentialTypeDefinition, li as RunSummary, ln as WorkflowErrorHandler, lr as RunnableNodeExecuteArgs, lt as resolveItemExprsForExecution, m as ConnectionNodeIdFactory, ma as Container, mi as ExecutionTelemetry, mn as WorkflowNodeConnection, mr as TriggerSetupContext, mt as isPortsEmission, n as InMemoryLiveWorkflowRepository, na as CredentialOAuth2ScopesFromPublicConfig, ni as RunExecutionOptions, nn as RunnableNodeOutputJson, nr as NodeExecutionScheduler, nt as ItemExpr, oa as CredentialSessionService, oi as RunStateResetRequest, on as UpstreamRefPlaceholder, or as PersistedTriggerSetupState, ot as ItemExprResolvedContext, p as WorkflowExecutableNodeClassifier, pa as OAuth2ProviderFromPublicConfig, pi as WorkflowExecutionRepository, pn as WorkflowId, pr as TriggerRuntimeDiagnostics, pt as emitPorts, q as NoOpCostTrackingTelemetry, qi as CredentialFieldSchema, qn as NodeActivationContinuation, qr as PersistedRunSchedulingState, qt as ParentExecutionRef, ra as CredentialRequirement, ri as RunPruneCandidate, rn as TriggerNodeConfig, rr as NodeExecutionStatePublisher, rt as ItemExprArgs, sa as CredentialSetupStatus, si as RunStatus, sn as WorkflowDefinition, sr as PreparedNodeActivationDispatch, st as isItemExpr, t as RunIntentService, ta as CredentialOAuth2AuthDefinition, ti as RunEventPublisherDeps, tn as RunnableNodeInputJson, tr as NodeExecutionRequestHandler, tt as ParamDeep, ua as CredentialTypeId, ui as WebhookRunResult, un as WorkflowErrorHandlerSpec, ur as TestableTriggerNode, ut as resolveItemExprsInUnknown, v as WhenBuilder, va as Lifecycle, vi as TelemetryArtifactReference, vn as WorkflowStoragePolicyMode, vr as WorkflowNodeInstanceFactory, vt as BinaryPreviewKind, w as BranchStepsArg, wa as injectAll, wi as TelemetrySpanEnd, wn as runnableNodeOutputType, wr as HttpMethod, wt as Items, x as BooleanWhenOverloads, xa as container, xi as TelemetryChildSpanStart, xn as branchRef, xr as WorkflowRunnerService, xt as InputPortKey, y as AnyRunnableNodeConfig, ya as RegistrationOptions, yi as TelemetryAttributePrimitive, yn as WorkflowStoragePolicyResolver, yr as WorkflowRepository, yt as Edge, z as RunRevision, zi as CostTrackingTelemetryFactory, zn as EngineHost, zr as NodeExecutionError, zt as NodeIdRef } from "./RunIntentService-BqhmdoA1.js";
|
|
2
|
+
import { $ as ChatModelConfig, A as AgentConnectionNodeDescriptor, At as DefinedNodeCredentialAccessors, B as AgentMessageLine, Bt as NodeOutputNormalizer, C as PersistedRuntimeTypeDecoratorOptions, Ct as defineCredential, D as InMemoryRunEventBus, Dt as DefineNodeOptions, E as EventPublishingWorkflowExecutionRepository, Et as DefineNodeExecuteArgs, F as AgentGuardrailConfig, Ft as defineNode, G as AgentNodeConfig, Gt as DefaultExecutionContextFactory, H as AgentMessageTemplate, Ht as ItemExprResolver, I as AgentGuardrailDefaults, It as Clock, J as AgentToolCallPlanner, Jt as CredentialResolverFactory, K as AgentTool, Kt as DefaultAsyncSleeper, L as AgentMessageBuildArgs, Lt as SystemClock, M as callableTool, Mt as DefinedNodeCredentialBindings, N as AgentAttachmentRole, Nt as DefinedNodeRunContext, O as AgentConnectionCredentialSource, Ot as DefinedNode, P as AgentCanvasPresentation, Pt as defineBatchNode, Q as AgentTurnLimitBehavior, R as AgentMessageConfig, S as InjectableRuntimeDecoratorComposer, St as DefineCredentialOptions, T as PersistedRuntimeTypeMetadata, Tt as DefineBatchNodeOptions, U as AgentMessageTemplateContent, Ut as InProcessRetryRunner, V as AgentMessageRole, Vt as RunnableOutputBehaviorResolver, W as AgentModelInvocationOptions, X as AgentToolExecuteArgs, Y as AgentToolDefinition, Yt as NodeEventPublisher, Z as AgentToolToken, _ as node, _t as CallableToolFactory, at as NodeBackedToolInputMapper, b as PersistedRuntimeTypeNameResolver, bt as CallableToolExecuteHandler, ct as NodeBackedToolOutputMapperArgs, d as InMemoryBinaryStorage, dt as ToolExecuteArgs, et as ChatModelFactory, f as DefaultExecutionBinaryService, ft as ZodSchemaAny, g as getPersistedRuntimeTypeMetadata, gt as CallableToolKindToken, h as chatModel, ht as AgentToolFactory, it as NodeBackedToolConfigOptions, j as AgentConnectionNodeRole, jt as DefinedNodeCredentialBinding, k as AgentConnectionNodeCollector, kt as DefinedNodeConfigInput, lt as Tool, m as ItemsInputNormalizer, mt as AgentMessageConfigNormalizer, nt as LangChainChatModelLike, ot as NodeBackedToolInputMapperArgs, p as UnavailableBinaryStorage, pt as AgentConfigInspector, q as AgentToolCall, rt as LangChainStructuredOutputModelLike, st as NodeBackedToolOutputMapper, tt as ChatModelStructuredOutputOptions, u as InMemoryRunDataFactory, ut as ToolConfig, v as tool, vt as CallableToolConfig, w as PersistedRuntimeTypeKind, wt as DefinedNodeRegistry, x as PersistedRuntimeTypeMetadataStore, xt as NodeBackedToolConfig, y as StackTraceCallSitePathResolver, yt as CallableToolConfigOptions, z as AgentMessageDto } from "./index-CVs9rVhl.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, CallableToolConfig, CallableToolConfigOptions, CallableToolExecuteHandler, CallableToolFactory, CallableToolKindToken, ChainCursor, ChatModelConfig, ChatModelFactory, ChatModelStructuredOutputOptions, Clock, CodemationTelemetryAttributeNames, CodemationTelemetryMetricNames, ConnectionInvocationAppendArgs, ConnectionInvocationId, ConnectionInvocationIdFactory, ConnectionInvocationKind, ConnectionInvocationRecord, ConnectionNodeIdFactory, Container, CoreTokens, CostCatalog, CostCatalogEntry, CostTrackingComponent, CostTrackingPriceQuote, CostTrackingTelemetry, CostTrackingTelemetryAttributeNames, CostTrackingTelemetryFactory, CostTrackingTelemetryMetricNames, CostTrackingUsageRecord, CredentialAdvancedSectionPresentation, CredentialAuthDefinition, CredentialBinding, CredentialBindingKey, CredentialFieldSchema, CredentialHealth, CredentialHealthStatus, CredentialHealthTester, CredentialInstanceId, CredentialInstanceRecord, CredentialJsonRecord, CredentialMaterialSourceKind, CredentialOAuth2AuthDefinition, CredentialOAuth2ScopesFromPublicConfig, CredentialRequirement, CredentialResolverFactory, CredentialSessionFactory, CredentialSessionFactoryArgs, CredentialSessionService, CredentialSetupStatus, CredentialType, CredentialTypeDefinition, CredentialTypeId, CredentialTypeRegistry, CredentialUnboundError, CurrentStateExecutionRequest, DefaultAsyncSleeper, DefaultExecutionBinaryService, DefaultExecutionContextFactory, DefaultWorkflowGraphFactory, DefineBatchNodeOptions, DefineCredentialOptions, DefineNodeExecuteArgs, DefineNodeOptions, DefinedNode, DefinedNodeConfigInput, DefinedNodeCredentialAccessors, DefinedNodeCredentialBinding, DefinedNodeCredentialBindings, DefinedNodeRegistry, DefinedNodeRunContext, DependencyContainer, Disposable, Edge, EngineDeps, EngineExecutionLimitsPolicy, EngineExecutionLimitsPolicyConfig, EngineHost, EngineRunCounters, EventPublishingWorkflowExecutionRepository, ExecutableTriggerNode, ExecutionBinaryService, ExecutionContext, ExecutionContextFactory, ExecutionFrontierPlan, ExecutionInstanceDto, ExecutionInstanceId, ExecutionMode, ExecutionPayloadPolicyFields, ExecutionTelemetry, ExecutionTelemetryFactory, ExpRetryPolicy, ExponentialRetryPolicySpec, Expr, FixedRetryPolicySpec, GenAiTelemetryAttributeNames, HttpMethod, InMemoryBinaryStorage, InMemoryLiveWorkflowRepository, InMemoryRunDataFactory, InMemoryRunEventBus, InProcessRetryRunner, InjectableRuntimeDecoratorComposer, InjectionToken, InputPortKey, Item, ItemBinary, ItemExpr, ItemExprArgs, ItemExprCallback, ItemExprContext, ItemExprResolvedContext, ItemExprResolver, ItemNode, Items, ItemsInputNormalizer, JsonArray, JsonNonArray, JsonObject, JsonPrimitive, JsonValue, LangChainChatModelLike, LangChainStructuredOutputModelLike, Lifecycle, LiveWorkflowRepository, MultiInputNode, MutableRunData, NoOpCostTrackingTelemetry, NoOpCostTrackingTelemetryFactory, NoOpExecutionTelemetry, NoOpExecutionTelemetryFactory, NoOpNodeExecutionTelemetry, NoOpTelemetryArtifactReference, NoOpTelemetrySpanScope, NoRetryPolicy, 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, NodeExecutionTelemetry, NodeExecutor, NodeId, NodeIdRef, NodeInputsByPort, NodeKind, NodeOffloadPolicy, NodeOutputNormalizer, NodeOutputs, NodeRef, NodeResolver, NodeSchedulerDecision, NoneRetryPolicySpec, OAuth2ProviderFromPublicConfig, OutputPortKey, PairedItemRef, Param, ParamDeep, 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, PortsEmission, 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, RunnableNode, RunnableNodeConfig, RunnableNodeExecuteArgs, RunnableNodeInputJson, RunnableNodeOutputJson, RunnableOutputBehaviorResolver, SlotExecutionStateDto, StackTraceCallSitePathResolver, StepSequenceOutput, SystemClock, TelemetryArtifactAttachment, TelemetryArtifactReference, TelemetryAttributePrimitive, TelemetryAttributes, TelemetryChildSpanStart, TelemetryMetricRecord, TelemetryScope, TelemetrySpanEnd, TelemetrySpanEventRecord, TelemetrySpanScope, 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, callableTool, chatModel, container, defineBatchNode, defineCredential, defineNode, delay, emitPorts, getOriginIndexFromItem, getPersistedRuntimeTypeMetadata, inject, injectAll, injectable, instanceCachingFactory, instancePerContainerCachingFactory, isItemExpr, isPortsEmission, isUnbrandedPortsEmissionShape, itemExpr, node, nodeRef, predicateAwareClassFactory, registry, resolveItemExprsForExecution, resolveItemExprsInUnknown, runnableNodeInputType, runnableNodeOutputType, singleton, tool, triggerNodeOutputType, triggerNodeSetupStateType };
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
import {
|
|
3
|
-
import { z } from "zod";
|
|
1
|
+
import { $ as CostTrackingTelemetryMetricNames, At as inject, B as nodeRef, Ct as tool, Dt as PersistedRuntimeTypeNameResolver, Et as StackTraceCallSitePathResolver, F as InProcessRetryRunner, Ft as predicateAwareClassFactory, G as NoOpExecutionTelemetryFactory, H as CodemationTelemetryMetricNames, It as registry, J as NoOpTelemetrySpanScope, K as NoOpExecutionTelemetry, L as DefaultExecutionContextFactory, Lt as singleton, M as RunnableOutputBehaviorResolver, Mt as injectable, N as NodeOutputNormalizer, Nt as instanceCachingFactory, Ot as container, P as ItemExprResolver, Pt as instancePerContainerCachingFactory, Q as CostTrackingTelemetryAttributeNames, R as AllWorkflowsActiveWorkflowActivationPolicy, Rt as CoreTokens, St as node, Tt as PersistedRuntimeTypeMetadataStore, U as GenAiTelemetryAttributeNames, V as RunFinishedAtFactory, W as CodemationTelemetryAttributeNames, X as NoOpCostTrackingTelemetryFactory, Y as NoOpTelemetryArtifactReference, Z as NoOpCostTrackingTelemetry, _t as itemExpr, a as InMemoryLiveWorkflowRepository, at as isPortsEmission, bt as chatModel, ct as CredentialResolverFactory, d as InMemoryBinaryStorage, dt as UnavailableBinaryStorage, et as CredentialUnboundError, ft as NodeEventPublisher, g as EngineExecutionLimitsPolicy, gt as isItemExpr, ht as ConnectionNodeIdFactory, i as RunIntentService, it as emitPorts, jt as injectAll, kt as delay, lt as getOriginIndexFromItem, mt as WorkflowExecutableNodeClassifier, nt as RetryPolicy, ot as isUnbrandedPortsEmissionShape, pt as WorkflowExecutableNodeClassifierFactory, q as NoOpNodeExecutionTelemetry, rt as NoRetryPolicy, st as DefaultAsyncSleeper, tt as ExpRetryPolicy, u as InMemoryRunDataFactory, ut as DefaultExecutionBinaryService, vt as resolveItemExprsForExecution, wt as InjectableRuntimeDecoratorComposer, xt as getPersistedRuntimeTypeMetadata, yt as resolveItemExprsInUnknown, z as branchRef } from "./runtime-DUW6tIJ1.js";
|
|
2
|
+
import { i as WhenBuilder, n as WorkflowBuilder, r as ChainCursor, t as InMemoryRunEventBus } from "./InMemoryRunEventBusRegistry-C2U83Hmv.js";
|
|
3
|
+
import { ZodError, z } from "zod";
|
|
4
4
|
import { randomUUID } from "node:crypto";
|
|
5
5
|
|
|
6
6
|
//#region src/contracts/Clock.ts
|
|
@@ -91,9 +91,10 @@ function defineNode(options) {
|
|
|
91
91
|
keepBinaries = options.keepBinaries ?? false;
|
|
92
92
|
constructor(name, config, id) {
|
|
93
93
|
this.name = name;
|
|
94
|
-
this.config = config;
|
|
95
94
|
this.id = id;
|
|
95
|
+
this.config = config;
|
|
96
96
|
}
|
|
97
|
+
config;
|
|
97
98
|
getCredentialRequirements() {
|
|
98
99
|
return credentialRequirements;
|
|
99
100
|
}
|
|
@@ -136,9 +137,10 @@ function defineBatchNode(options) {
|
|
|
136
137
|
icon = options.icon;
|
|
137
138
|
constructor(name, config, id) {
|
|
138
139
|
this.name = name;
|
|
139
|
-
this.config = config;
|
|
140
140
|
this.id = id;
|
|
141
|
+
this.config = config;
|
|
141
142
|
}
|
|
143
|
+
config;
|
|
142
144
|
getCredentialRequirements() {
|
|
143
145
|
return credentialRequirements;
|
|
144
146
|
}
|
|
@@ -280,13 +282,34 @@ var CallableToolConfig = class {
|
|
|
280
282
|
* Parses tool input and output with the configured Zod schemas.
|
|
281
283
|
*/
|
|
282
284
|
async executeTool(args) {
|
|
283
|
-
const parsedInput = this.
|
|
285
|
+
const parsedInput = this.parseInput(args.input);
|
|
284
286
|
const raw = await Promise.resolve(this.executeHandler({
|
|
285
287
|
...args,
|
|
286
288
|
config: this,
|
|
287
289
|
input: parsedInput
|
|
288
290
|
}));
|
|
289
|
-
return this.
|
|
291
|
+
return this.parseOutput(raw);
|
|
292
|
+
}
|
|
293
|
+
parseInput(input$1) {
|
|
294
|
+
try {
|
|
295
|
+
return this.inputSchemaValue.parse(input$1);
|
|
296
|
+
} catch (error) {
|
|
297
|
+
throw this.decorateValidationError(error, "input");
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
parseOutput(output$1) {
|
|
301
|
+
try {
|
|
302
|
+
return this.outputSchemaValue.parse(output$1);
|
|
303
|
+
} catch (error) {
|
|
304
|
+
throw this.decorateValidationError(error, "output");
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
decorateValidationError(error, stage) {
|
|
308
|
+
if (error instanceof ZodError) {
|
|
309
|
+
error.codemationToolValidationStage = stage;
|
|
310
|
+
return error;
|
|
311
|
+
}
|
|
312
|
+
return error instanceof Error ? error : new Error(String(error));
|
|
290
313
|
}
|
|
291
314
|
};
|
|
292
315
|
|
|
@@ -371,7 +394,7 @@ var AgentConfigInspector = class {
|
|
|
371
394
|
if (messages === void 0 || messages === null) return false;
|
|
372
395
|
if (Array.isArray(messages)) return messages.length > 0;
|
|
373
396
|
if (typeof messages === "object") {
|
|
374
|
-
if (
|
|
397
|
+
if (isItemExpr(messages)) return true;
|
|
375
398
|
const o = messages;
|
|
376
399
|
return Array.isArray(o.prompt) && o.prompt.length > 0 || typeof o.buildMessages === "function";
|
|
377
400
|
}
|
|
@@ -441,7 +464,7 @@ var AgentMessageConfigNormalizer = class {
|
|
|
441
464
|
return out;
|
|
442
465
|
}
|
|
443
466
|
static normalizeRichMessages(config, args) {
|
|
444
|
-
if (
|
|
467
|
+
if (isItemExpr(config)) throw new Error("AIAgent messages wrapped in itemExpr(...) must be resolved by the engine before prompt normalization.");
|
|
445
468
|
if (Array.isArray(config)) return config.map((line) => this.lineToDto(line, args));
|
|
446
469
|
const structured = config;
|
|
447
470
|
const messages = [];
|
|
@@ -647,70 +670,5 @@ let ItemsInputNormalizer = class ItemsInputNormalizer$1 {
|
|
|
647
670
|
ItemsInputNormalizer = __decorate([injectable()], ItemsInputNormalizer);
|
|
648
671
|
|
|
649
672
|
//#endregion
|
|
650
|
-
|
|
651
|
-
var NoRetryPolicy = class {
|
|
652
|
-
kind = "none";
|
|
653
|
-
};
|
|
654
|
-
|
|
655
|
-
//#endregion
|
|
656
|
-
//#region src/contracts/RetryPolicy.ts
|
|
657
|
-
var RetryPolicy = class {
|
|
658
|
-
kind = "fixed";
|
|
659
|
-
constructor(maxAttempts, delayMs) {
|
|
660
|
-
this.maxAttempts = maxAttempts;
|
|
661
|
-
this.delayMs = delayMs;
|
|
662
|
-
if (!Number.isFinite(maxAttempts) || maxAttempts < 1 || !Number.isInteger(maxAttempts)) throw new Error(`RetryPolicy.maxAttempts must be a positive integer, got ${maxAttempts}`);
|
|
663
|
-
if (!Number.isFinite(delayMs) || delayMs < 0) throw new Error(`RetryPolicy.delayMs must be a non-negative finite number, got ${delayMs}`);
|
|
664
|
-
}
|
|
665
|
-
/** Default for HTTP-style transient failures: 3 tries, 1s between attempts. */
|
|
666
|
-
static defaultForHttp = {
|
|
667
|
-
kind: "fixed",
|
|
668
|
-
maxAttempts: 3,
|
|
669
|
-
delayMs: 1e3
|
|
670
|
-
};
|
|
671
|
-
/** Default for LLM / agent calls: 3 tries, 2s fixed backoff. */
|
|
672
|
-
static defaultForAiAgent = {
|
|
673
|
-
kind: "fixed",
|
|
674
|
-
maxAttempts: 3,
|
|
675
|
-
delayMs: 2e3
|
|
676
|
-
};
|
|
677
|
-
};
|
|
678
|
-
|
|
679
|
-
//#endregion
|
|
680
|
-
//#region src/contracts/ExpRetryPolicy.ts
|
|
681
|
-
var ExpRetryPolicy = class {
|
|
682
|
-
kind = "exponential";
|
|
683
|
-
constructor(maxAttempts, initialDelayMs, multiplier, maxDelayMs, jitter) {
|
|
684
|
-
this.maxAttempts = maxAttempts;
|
|
685
|
-
this.initialDelayMs = initialDelayMs;
|
|
686
|
-
this.multiplier = multiplier;
|
|
687
|
-
this.maxDelayMs = maxDelayMs;
|
|
688
|
-
this.jitter = jitter;
|
|
689
|
-
if (!Number.isFinite(maxAttempts) || maxAttempts < 1 || !Number.isInteger(maxAttempts)) throw new Error(`ExpRetryPolicy.maxAttempts must be a positive integer, got ${maxAttempts}`);
|
|
690
|
-
if (!Number.isFinite(initialDelayMs) || initialDelayMs < 0) throw new Error(`ExpRetryPolicy.initialDelayMs must be a non-negative finite number, got ${initialDelayMs}`);
|
|
691
|
-
if (!Number.isFinite(multiplier) || multiplier < 1) throw new Error(`ExpRetryPolicy.multiplier must be >= 1, got ${multiplier}`);
|
|
692
|
-
}
|
|
693
|
-
};
|
|
694
|
-
|
|
695
|
-
//#endregion
|
|
696
|
-
//#region src/contracts/credentialTypes.ts
|
|
697
|
-
var CredentialUnboundError = class CredentialUnboundError extends Error {
|
|
698
|
-
constructor(bindingKey, acceptedTypes = []) {
|
|
699
|
-
super(CredentialUnboundError.createMessage(bindingKey, acceptedTypes));
|
|
700
|
-
this.bindingKey = bindingKey;
|
|
701
|
-
this.acceptedTypes = acceptedTypes;
|
|
702
|
-
this.name = "CredentialUnboundError";
|
|
703
|
-
}
|
|
704
|
-
static createMessage(bindingKey, acceptedTypes) {
|
|
705
|
-
const acceptedTypesSuffix = acceptedTypes.length > 0 ? ` Accepted credential types: ${acceptedTypes.join(", ")}.` : "";
|
|
706
|
-
return `Credential slot "${bindingKey.slotKey}" is not bound for workflow ${bindingKey.workflowId} node ${bindingKey.nodeId}.${acceptedTypesSuffix}`;
|
|
707
|
-
}
|
|
708
|
-
};
|
|
709
|
-
|
|
710
|
-
//#endregion
|
|
711
|
-
//#region src/contracts/workflowTypes.ts
|
|
712
|
-
const branchRef = (index) => `$${index}`;
|
|
713
|
-
|
|
714
|
-
//#endregion
|
|
715
|
-
export { AgentConfigInspector, AgentConnectionNodeCollector, AgentGuardrailDefaults, AgentMessageConfigNormalizer, AgentToolFactory, AllWorkflowsActiveWorkflowActivationPolicy, CallableToolConfig, CallableToolFactory, CallableToolKindToken, ChainCursor, ConnectionInvocationIdFactory, ConnectionNodeIdFactory, CoreTokens, CredentialResolverFactory, CredentialUnboundError, DefaultAsyncSleeper, DefaultExecutionBinaryService, DefaultExecutionContextFactory, DefaultWorkflowGraphFactory, DefinedNodeRegistry, EngineExecutionLimitsPolicy, EventPublishingWorkflowExecutionRepository, ExpRetryPolicy, InMemoryBinaryStorage, InMemoryLiveWorkflowRepository, InMemoryRunDataFactory, InMemoryRunEventBus, InProcessRetryRunner, InjectableRuntimeDecoratorComposer, ItemValueResolver, ItemsInputNormalizer, NoRetryPolicy, NodeBackedToolConfig, NodeEventPublisher, NodeOutputNormalizer, PersistedRuntimeTypeMetadataStore, PersistedRuntimeTypeNameResolver, RetryPolicy, RunFinishedAtFactory, RunIntentService, RunnableOutputBehaviorResolver, StackTraceCallSitePathResolver, SystemClock, UnavailableBinaryStorage, WhenBuilder, WorkflowBuilder, WorkflowExecutableNodeClassifier, WorkflowExecutableNodeClassifierFactory, branchRef, callableTool, chatModel, container, defineBatchNode, defineCredential, defineNode, delay, emitPorts, getOriginIndexFromItem, getPersistedRuntimeTypeMetadata, inject, injectAll, injectable, instanceCachingFactory, instancePerContainerCachingFactory, isItemValue, isPortsEmission, isUnbrandedPortsEmissionShape, itemValue, node, predicateAwareClassFactory, registry, resolveItemValuesForExecution, resolveItemValuesInUnknown, singleton, tool };
|
|
673
|
+
export { AgentConfigInspector, AgentConnectionNodeCollector, AgentGuardrailDefaults, AgentMessageConfigNormalizer, AgentToolFactory, AllWorkflowsActiveWorkflowActivationPolicy, CallableToolConfig, CallableToolFactory, CallableToolKindToken, ChainCursor, CodemationTelemetryAttributeNames, CodemationTelemetryMetricNames, ConnectionInvocationIdFactory, ConnectionNodeIdFactory, CoreTokens, CostTrackingTelemetryAttributeNames, CostTrackingTelemetryMetricNames, CredentialResolverFactory, CredentialUnboundError, DefaultAsyncSleeper, DefaultExecutionBinaryService, DefaultExecutionContextFactory, DefaultWorkflowGraphFactory, DefinedNodeRegistry, EngineExecutionLimitsPolicy, EventPublishingWorkflowExecutionRepository, ExpRetryPolicy, GenAiTelemetryAttributeNames, InMemoryBinaryStorage, InMemoryLiveWorkflowRepository, InMemoryRunDataFactory, InMemoryRunEventBus, InProcessRetryRunner, InjectableRuntimeDecoratorComposer, ItemExprResolver, ItemsInputNormalizer, NoOpCostTrackingTelemetry, NoOpCostTrackingTelemetryFactory, NoOpExecutionTelemetry, NoOpExecutionTelemetryFactory, NoOpNodeExecutionTelemetry, NoOpTelemetryArtifactReference, NoOpTelemetrySpanScope, NoRetryPolicy, NodeBackedToolConfig, NodeEventPublisher, NodeOutputNormalizer, PersistedRuntimeTypeMetadataStore, PersistedRuntimeTypeNameResolver, RetryPolicy, RunFinishedAtFactory, RunIntentService, RunnableOutputBehaviorResolver, StackTraceCallSitePathResolver, SystemClock, UnavailableBinaryStorage, WhenBuilder, WorkflowBuilder, WorkflowExecutableNodeClassifier, WorkflowExecutableNodeClassifierFactory, branchRef, callableTool, chatModel, container, defineBatchNode, defineCredential, defineNode, delay, emitPorts, getOriginIndexFromItem, getPersistedRuntimeTypeMetadata, inject, injectAll, injectable, instanceCachingFactory, instancePerContainerCachingFactory, isItemExpr, isPortsEmission, isUnbrandedPortsEmissionShape, itemExpr, node, nodeRef, predicateAwareClassFactory, registry, resolveItemExprsForExecution, resolveItemExprsInUnknown, singleton, tool };
|
|
716
674
|
//# sourceMappingURL=index.js.map
|