@codemation/core 0.13.2 → 0.15.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 +167 -0
- package/dist/{CostCatalogContract-Dxq1BTyi.d.cts → CostCatalogContract-Dwo-ZamG.d.cts} +2 -2
- package/dist/EngineRuntimeRegistration.types-BiNasx3G.d.cts +54 -0
- package/dist/EngineRuntimeRegistration.types-Dq4ucrdo.d.ts +21 -0
- package/dist/{InMemoryRunDataFactory-Csy2evr_.d.cts → InMemoryRunDataFactory-D2U9azmZ.d.cts} +4 -20
- package/dist/{InMemoryRunEventBusRegistry-Sa86VxuV.cjs → InMemoryRunEventBusRegistry-DO0WM9Lw.cjs} +1 -1
- package/dist/{InMemoryRunEventBusRegistry-Sa86VxuV.cjs.map → InMemoryRunEventBusRegistry-DO0WM9Lw.cjs.map} +1 -1
- package/dist/{InMemoryRunEventBusRegistry-Bwunvt1T.js → InMemoryRunEventBusRegistry-Layt2xgm.js} +1 -1
- package/dist/{InMemoryRunEventBusRegistry-Bwunvt1T.js.map → InMemoryRunEventBusRegistry-Layt2xgm.js.map} +1 -1
- package/dist/{ItemsInputNormalizer-Bi8m-Ijs.d.cts → ItemsInputNormalizer-A5txcOWX.d.cts} +3 -98
- package/dist/{ItemsInputNormalizer-BbQTSEkZ.cjs → ItemsInputNormalizer-C1fv3sMW.cjs} +2 -2
- package/dist/ItemsInputNormalizer-C1fv3sMW.cjs.map +1 -0
- package/dist/{ItemsInputNormalizer-BYljnXU0.d.ts → ItemsInputNormalizer-D2vrMrX1.d.ts} +2 -62
- package/dist/{ItemsInputNormalizer-CSZGMgl3.js → ItemsInputNormalizer-fUYo4GLV.js} +2 -2
- package/dist/ItemsInputNormalizer-fUYo4GLV.js.map +1 -0
- package/dist/{RunIntentService-BitgkKaT.d.cts → RunIntentService-DKxuHTUz.d.cts} +2 -15
- package/dist/{RunIntentService-DYpqfu6D.d.ts → RunIntentService-DrpKli2k.d.ts} +2 -22
- package/dist/{agentMcpTypes-DGIwk6Ue.d.cts → agentMcpTypes-BHX4RQCC.d.cts} +25 -518
- package/dist/bootstrap/index.cjs +9 -5
- package/dist/bootstrap/index.d.cts +32 -106
- package/dist/bootstrap/index.d.ts +18 -17
- package/dist/bootstrap/index.js +6 -5
- package/dist/{bootstrap-DIv-vloi.cjs → bootstrap-CTB53rEF.cjs} +9 -60
- package/dist/bootstrap-CTB53rEF.cjs.map +1 -0
- package/dist/{bootstrap-Bkd-Nfbn.js → bootstrap-DmqKheCI.js} +6 -57
- package/dist/bootstrap-DmqKheCI.js.map +1 -0
- package/dist/browser.cjs +12 -11
- package/dist/browser.d.cts +4 -4
- package/dist/browser.d.ts +3 -3
- package/dist/browser.js +3 -2
- package/dist/contracts-7L1wJHdk.cjs +569 -0
- package/dist/contracts-7L1wJHdk.cjs.map +1 -0
- package/dist/contracts-CjJ5CZ7N.js +447 -0
- package/dist/contracts-CjJ5CZ7N.js.map +1 -0
- package/dist/contracts.cjs +9 -2
- package/dist/contracts.d.cts +5 -5
- package/dist/contracts.d.ts +2 -2
- package/dist/contracts.js +3 -2
- package/dist/{executionPersistenceContracts-CN9d7AnL.d.cts → deploymentManifestTypes-B8CDmZZK.d.cts} +65 -81
- package/dist/di-C6Ubf9o5.cjs +179 -0
- package/dist/di-C6Ubf9o5.cjs.map +1 -0
- package/dist/di-Cjiil7U-.js +114 -0
- package/dist/di-Cjiil7U-.js.map +1 -0
- package/dist/{index-rllWL4r-.d.ts → index-CRv3_pY3.d.ts} +112 -808
- package/dist/{index-BSQ2LoIh.d.ts → index-mnLS0iQl.d.ts} +39 -372
- package/dist/index.cjs +53 -111
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +50 -438
- package/dist/index.d.ts +5 -5
- package/dist/index.js +28 -94
- package/dist/index.js.map +1 -1
- package/dist/{params-DRUr0F5v.d.cts → params-CrK4iuG1.d.cts} +3 -13
- package/dist/{runtime-CWPdvJpC.js → runtime-CBFDpmiz.js} +112 -648
- package/dist/runtime-CBFDpmiz.js.map +1 -0
- package/dist/{runtime-_VdHwGkJ.cjs → runtime-Due-FOZ2.cjs} +137 -717
- package/dist/runtime-Due-FOZ2.cjs.map +1 -0
- package/dist/testing.cjs +8 -40
- package/dist/testing.cjs.map +1 -1
- package/dist/testing.d.cts +3 -32
- package/dist/testing.d.ts +3 -32
- package/dist/testing.js +6 -38
- package/dist/testing.js.map +1 -1
- package/dist/{di-LP2qSHkY.cjs → workflowTypes-BW6Hhee7.cjs} +4 -230
- package/dist/workflowTypes-BW6Hhee7.cjs.map +1 -0
- package/dist/{di-tom0pM2h.js → workflowTypes-DZtBTmKf.js} +3 -163
- package/dist/workflowTypes-DZtBTmKf.js.map +1 -0
- package/package.json +1 -1
- package/src/ai/AgentConnectionNodeCollector.ts +0 -4
- package/src/ai/AgentMessageConfigNormalizerFactory.ts +0 -4
- package/src/ai/AiHost.ts +0 -38
- package/src/ai/CallableToolConfig.ts +0 -9
- package/src/ai/CallableToolKindToken.ts +0 -4
- package/src/authoring/callableTool.types.ts +0 -3
- package/src/authoring/defineCollection.types.ts +0 -11
- package/src/authoring/defineHumanApprovalNode.types.ts +0 -116
- package/src/authoring/defineNode.types.ts +18 -32
- package/src/authoring/definePollingTrigger.types.ts +36 -155
- package/src/authoring/definePollingTriggerInternals.ts +0 -4
- package/src/authoring/index.ts +1 -0
- package/src/authoring/nodeBaseOptions.types.ts +4 -0
- package/src/binaries/boundedReadBinary.types.ts +0 -16
- package/src/bootstrap/index.ts +8 -2
- package/src/bootstrap/runtime/EngineRuntimeRegistrar.ts +0 -5
- package/src/bootstrap/runtime/EngineRuntimeRegistration.types.ts +0 -23
- package/src/browser.ts +0 -3
- package/src/contracts/AgentBindError.ts +0 -5
- package/src/contracts/Clock.ts +0 -1
- package/src/contracts/CodemationTelemetryAttributeNames.ts +0 -10
- package/src/contracts/NoOpAgentMcpIntegration.ts +0 -6
- package/src/contracts/NoOpTelemetrySpanScope.ts +0 -7
- package/src/contracts/RetryPolicy.ts +0 -2
- package/src/contracts/agentMcpTypes.ts +0 -34
- package/src/contracts/assertionTypes.ts +0 -33
- package/src/contracts/baseTypes.ts +0 -6
- package/src/contracts/collectionTypes.ts +0 -25
- package/src/contracts/credentialTypes.ts +13 -60
- package/src/contracts/deploymentManifestTypes.ts +158 -0
- package/src/contracts/dispatchTypes.ts +29 -0
- package/src/contracts/executionPersistenceContracts.ts +0 -33
- package/src/contracts/hitlSeamTypes.ts +0 -14
- package/src/contracts/humanTaskStoreTypes.ts +0 -2
- package/src/contracts/inboxChannelTypes.ts +0 -9
- package/src/contracts/index.ts +3 -0
- package/src/contracts/itemExpr.ts +7 -21
- package/src/contracts/itemMeta.ts +0 -3
- package/src/contracts/mcpTypes.ts +0 -16
- package/src/contracts/retryPolicySpec.types.ts +0 -10
- package/src/contracts/runFinishedAtFactory.ts +0 -1
- package/src/contracts/runTypes.ts +0 -74
- package/src/contracts/runtimeTypes.ts +4 -131
- package/src/contracts/telemetryTypes.ts +0 -7
- package/src/contracts/testTriggerTypes.ts +0 -43
- package/src/contracts/triggerInvokerTypes.ts +6 -0
- package/src/contracts/webhookTypes.ts +0 -8
- package/src/contracts/workflowActivationPolicy.ts +0 -5
- package/src/contracts/workflowTypes.ts +5 -80
- package/src/contracts/workspaceFileTypes.ts +10 -42
- package/src/contracts.ts +18 -10
- package/src/credentials/CredentialMaterialProvider.types.ts +0 -28
- package/src/credentials/ManagedCredentialMaterialWriteError.ts +0 -6
- package/src/credentials/ManagedMaterialFetchError.ts +0 -6
- package/src/credentials/OAuthFlowExecutor.types.ts +0 -15
- package/src/di/CoreTokens.ts +2 -6
- package/src/events/ConnectionInvocationEventPublisher.ts +0 -7
- package/src/events/NodeEventPublisher.ts +0 -1
- package/src/events/runEvents.ts +0 -8
- package/src/execution/ActivationEnqueueService.ts +0 -10
- package/src/execution/ChildExecutionScopeFactory.ts +0 -13
- package/src/execution/FanInMergeByOriginMerger.ts +0 -11
- package/src/execution/InProcessRetryRunner.ts +0 -1
- package/src/execution/ItemExprResolver.ts +0 -3
- package/src/execution/NodeActivationRequestComposer.ts +0 -3
- package/src/execution/NodeActivationRequestInputPreparer.ts +0 -5
- package/src/execution/NodeExecutionSnapshotFactory.ts +0 -1
- package/src/execution/NodeExecutor.ts +1 -17
- package/src/execution/NodeOutputNormalizer.ts +8 -1
- package/src/execution/NodeSuspensionHandler.ts +1 -39
- package/src/execution/PersistedRunStateTerminalBuilder.ts +0 -5
- package/src/execution/RunSuspendedError.ts +0 -10
- package/src/execution/RunnableOutputBehaviorResolver.ts +12 -0
- package/src/execution/WorkflowRunExecutionContextFactory.ts +0 -3
- package/src/index.ts +10 -2
- package/src/orchestration/AbortControllerFactory.ts +0 -4
- package/src/orchestration/Engine.ts +0 -9
- package/src/orchestration/NodeExecutionRequestHandlerService.ts +3 -4
- package/src/orchestration/RunContinuationService.ts +7 -39
- package/src/orchestration/RunStartService.ts +0 -7
- package/src/orchestration/TestSuiteOrchestrator.ts +0 -18
- package/src/orchestration/TestSuiteRunIdFactory.ts +0 -4
- package/src/orchestration/TriggerRuntimeService.ts +3 -2
- package/src/planning/CurrentStateFrontierPlanner.ts +0 -1
- package/src/planning/RunQueuePlanner.ts +0 -6
- package/src/policies/executionLimits/EngineExecutionLimitsPolicy.ts +0 -8
- package/src/policies/executionLimits/EngineExecutionLimitsPolicyFactory.ts +0 -3
- package/src/runStorage/RunSummaryMapper.ts +0 -1
- package/src/runtime/EngineFactory.ts +6 -11
- package/src/runtime/RunIntentService.ts +0 -4
- package/src/runtime/WorkflowRepositoryWebhookTriggerMatcher.ts +0 -4
- package/src/runtime-types/InjectableRuntimeDecoratorComposerRegistry.ts +0 -4
- package/src/runtime-types/PersistedRuntimeTypeMetadataStoreRegistry.ts +0 -4
- package/src/runtime-types/PersistedRuntimeTypeNameResolver.ts +0 -1
- package/src/runtime-types/persistedRuntimeTypeModelRegistry.ts +0 -4
- package/src/runtime-types/runtimeTypeDecorators.types.ts +0 -12
- package/src/scheduler/ConfigDrivenOffloadPolicy.ts +0 -1
- package/src/scheduler/DefaultDrivingScheduler.ts +0 -6
- package/src/scheduler/InlineDrivingScheduler.ts +0 -13
- package/src/serialization/ItemsInputNormalizer.ts +0 -5
- package/src/testing/CapturingScheduler.ts +0 -3
- package/src/testing/EngineTestKitRunIdFactory.ts +0 -3
- package/src/testing/ItemHarnessNode.ts +0 -3
- package/src/testing/ItemHarnessNodeConfig.ts +0 -4
- package/src/testing/PrefixedSequentialIdGenerator.ts +0 -3
- package/src/testing/RegistrarEngineTestKit.types.ts +0 -2
- package/src/testing/RejectingCredentialSessionService.ts +0 -4
- package/src/testing/SubWorkflowRunnerTestNode.ts +0 -3
- package/src/testing/WorkflowTestHarnessManualTrigger.ts +0 -3
- package/src/testing/WorkflowTestKitBuilder.ts +0 -4
- package/src/testing/WorkflowTestKitRunNodeWorkflowFactory.ts +0 -3
- package/src/testing.ts +0 -3
- package/src/triggers/polling/PollingTriggerDedupWindow.ts +0 -4
- package/src/triggers/polling/PollingTriggerLogger.ts +0 -5
- package/src/triggers/polling/PollingTriggerRuntime.ts +0 -5
- package/src/types/index.ts +0 -6
- package/src/validation/WorkflowEdgePortValidator.ts +0 -5
- package/src/workflow/definition/ConnectionInvocationIdFactory.ts +0 -7
- package/src/workflow/definition/ConnectionNodeIdFactory.ts +0 -6
- package/src/workflow/definition/NodeIterationIdFactory.ts +0 -13
- package/src/workflow/definition/WorkflowExecutableNodeClassifier.ts +0 -6
- package/src/workflow/dsl/ChainCursorResolver.ts +8 -15
- package/src/workflow/dsl/NodeIdSlugifier.ts +0 -9
- package/src/workflow/dsl/WhenBuilder.ts +49 -2
- package/src/workflow/dsl/WorkflowDefinitionError.ts +0 -9
- package/src/workflow/dsl/workflowBuilderTypes.ts +5 -0
- package/src/workflowSnapshots/MissingRuntimeParityGuard.ts +24 -0
- package/src/workflowSnapshots/PersistedWorkflowTokenRegistry.ts +0 -6
- package/src/workflowSnapshots/WorkflowParityMismatchError.ts +18 -0
- package/src/workflowSnapshots/WorkflowSnapshotCodec.ts +1 -5
- package/src/workflowSnapshots/index.ts +3 -0
- package/dist/EngineRuntimeRegistration.types-CqcTWexS.d.cts +0 -81
- package/dist/EngineRuntimeRegistration.types-Cr75cSfL.d.ts +0 -44
- package/dist/ItemsInputNormalizer-BbQTSEkZ.cjs.map +0 -1
- package/dist/ItemsInputNormalizer-CSZGMgl3.js.map +0 -1
- package/dist/bootstrap-Bkd-Nfbn.js.map +0 -1
- package/dist/bootstrap-DIv-vloi.cjs.map +0 -1
- package/dist/contracts-CK0x6w_G.cjs +0 -74
- package/dist/contracts-CK0x6w_G.cjs.map +0 -1
- package/dist/contracts-DXdfTdpW.js +0 -50
- package/dist/contracts-DXdfTdpW.js.map +0 -1
- package/dist/di-LP2qSHkY.cjs.map +0 -1
- package/dist/di-tom0pM2h.js.map +0 -1
- package/dist/runtime-CWPdvJpC.js.map +0 -1
- package/dist/runtime-_VdHwGkJ.cjs.map +0 -1
package/dist/contracts.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
export { ActivationIdFactory, AgentBindError, AgentMcpIntegration, AgentMcpToolMap, AnyCredentialType, AssertionResult, AssertionResultProvenance, BINARY_DEFAULT_MAX_BYTES, BatchId, BinaryAttachment, BinaryAttachmentCreateRequest, BinaryBody, BinaryPreviewKind, BinaryStorage, BinaryStorageReadResult, BinaryStorageStatResult, BinaryStorageWriteRequest, BinaryStorageWriteResult, CodemationTelemetryAttributeNames, CodemationTelemetryMetricNames, ConnectionInvocationAppendArgs, ConnectionInvocationId, ConnectionInvocationKind, ConnectionInvocationRecord, CostCatalog, CostCatalogEntry, CostTrackingComponent, CostTrackingPriceQuote, CostTrackingTelemetry, CostTrackingTelemetryFactory, CostTrackingUsageRecord, CredentialAdvancedSectionPresentation, CredentialAuthDefinition, CredentialBinding, CredentialBindingKey, CredentialFieldSchema, CredentialHealth, CredentialHealthStatus, CredentialHealthTester, CredentialInstanceId, CredentialInstanceRecord, CredentialJsonRecord, CredentialMaterialSourceKind, CredentialOAuth2AuthDefinition, CredentialOAuth2ScopesFromPublicConfig, CredentialRequirement, CredentialSessionFactory, CredentialSessionFactoryArgs, CredentialSessionService, CredentialSetupStatus, CredentialType, CredentialTypeDefinition, CredentialTypeId, CredentialTypeRegistry, CurrentStateExecutionRequest, DEFAULT_ASSERTION_PASS_THRESHOLD, Duration, Edge, EngineDeps, EngineHost, EngineRunCounters, ExecutableTriggerNode, ExecutionBinaryService, ExecutionContext, ExecutionContextFactory, ExecutionFrontierPlan, ExecutionInstanceDto, ExecutionInstanceId, ExecutionMode, ExecutionPayloadPolicyFields, ExecutionTelemetry, ExecutionTelemetryFactory, ExponentialRetryPolicySpec, Expr, FixedRetryPolicySpec, GenAiTelemetryAttributeNames, HttpMethod, HumanTaskActor, HumanTaskHandle, HumanTaskId, HumanTaskSubject, InputPortKey, Item, ItemBinary, ItemNode, Items, JsonArray, JsonNonArray, JsonObject, JsonPrimitive, JsonValue, LiveWorkflowRepository, MultiInputNode, MutableRunData, NeedsReconsentEvent, NoOpAgentMcpIntegration, NoOpExecutionTelemetry, NoOpExecutionTelemetryFactory, NoOpNodeExecutionTelemetry, NoOpTelemetryArtifactReference, NoOpTelemetrySpanScope, NodeActivationContinuation, NodeActivationId, NodeActivationReceipt, NodeActivationRequest, NodeActivationRequestBase, NodeActivationScheduler, NodeBinaryAttachmentService, NodeConfigBase, NodeConnectionName, NodeDefinition, NodeErrorHandler, NodeErrorHandlerArgs, NodeErrorHandlerSpec, NodeExecutionContext, NodeExecutionError, NodeExecutionRequest, NodeExecutionRequestHandler, NodeExecutionScheduler, NodeExecutionSnapshot, NodeExecutionStatePublisher, NodeExecutionStatus, NodeExecutionTelemetry, NodeExecutor, NodeId, NodeIdRef, NodeInputsByPort, NodeInspectorSummaryRow, NodeIterationId, NodeKind, NodeOffloadPolicy, NodeOutputs, NodeRef, NodeResolver, NodeSchedulerDecision, NoneRetryPolicySpec, OAuth2ProviderFromPublicConfig, OutputPortKey, PairedItemRef, Param, ParamDeep, ParentExecutionRef, PayloadStorageKind, PendingNodeExecution, PendingResumeEntry, PersistedExecutionInstanceKind, PersistedExecutionInstanceRecord, PersistedMutableNodeState, PersistedMutableRunState, PersistedRunControlState, PersistedRunPolicySnapshot, PersistedRunSchedulingState, PersistedRunSlotProjectionRecord, PersistedRunState, PersistedRunWorkItemKind, PersistedRunWorkItemRecord, PersistedSuspensionEntry, PersistedTokenId, PersistedTriggerSetupState, PersistedWorkflowSnapshot, PersistedWorkflowSnapshotNode, PersistedWorkflowTokenRegistryLike, PinnedNodeOutputsByPort, PollingTriggerHandle, PreparedNodeActivationDispatch, ResumeContext, RetryPolicySpec, RunCompletionNotifier, RunCurrentState, RunDataFactory, RunDataSnapshot, RunEventPublisherDeps, RunExecutionOptions, RunHaltReason, RunId, RunIdFactory, RunIterationDto, RunPruneCandidate, RunQueueEntry, RunResult, RunRevision, RunSlotProjectionState, RunStateResetRequest, RunStatus, RunStopCondition, RunSummary, RunTestContext, RunnableNode, RunnableNodeConfig, RunnableNodeExecuteArgs, RunnableNodeInputJson, RunnableNodeOutputJson, SlotExecutionStateDto, SuspensionRequest, TelemetryArtifactAttachment, TelemetryArtifactReference, TelemetryAttributePrimitive, TelemetryAttributes, TelemetryChildSpanStart, TelemetryMetricRecord, TelemetryScope, TelemetrySpanEnd, TelemetrySpanEventRecord, TelemetrySpanScope, TestSuiteRunId, TestTriggerNodeConfig, TestTriggerSetupContext, TestableTriggerNode, TriggerCleanupHandle, TriggerInstanceId, TriggerNode, TriggerNodeConfig, TriggerNodeOutputJson, TriggerNodeSetupState, TriggerRuntimeDiagnostics, TriggerSetupContext, TriggerSetupStateFor, TriggerSetupStateRepository, TriggerTestItemsContext, UpstreamRefPlaceholder, WebhookControlSignal, WebhookInvocationMatch, WebhookRunResult, WebhookTriggerMatcher, WebhookTriggerResolution, WebhookTriggerRoutingDiagnostics, WorkItemId, WorkItemStatus, WorkflowDefinition, WorkflowDetailSelectionState, WorkflowErrorContext, WorkflowErrorHandler, WorkflowErrorHandlerSpec, WorkflowExecutionListingRepository, WorkflowExecutionPruneRepository, WorkflowExecutionRepository, WorkflowGraph, WorkflowGraphFactory, WorkflowId, WorkflowNodeConnection, WorkflowNodeInstanceFactory, WorkflowPolicyRuntimeDefaults, WorkflowPrunePolicySpec, WorkflowRepository, WorkflowRunDetailDto, WorkflowRunnerResolver, WorkflowRunnerService, WorkflowSnapshotFactory, WorkflowSnapshotResolver, WorkflowStoragePolicyDecisionArgs, WorkflowStoragePolicyMode, WorkflowStoragePolicyResolver, WorkflowStoragePolicySpec, branchRef, deriveAssertionPassed, nodeRef, runnableNodeInputType, runnableNodeOutputType, triggerNodeOutputType, triggerNodeSetupStateType };
|
|
1
|
+
import { $ as ManifestNodeCredentialShape, $a as NoOpExecutionTelemetryFactory, $i as NodeExecutionContext, $r as TriggerNodeOutputJson, $t as ConnectionInvocationId, Aa as WebhookControlSignal, Ai as BinaryStorageStatResult, An as RunStopCondition, Ao as CredentialRequirement, Ar as NodeErrorHandler, Ba as TelemetryArtifactAttachment, Bi as HumanTaskActor, Bo as OAuth2ProviderFromPublicConfig, Br as NodeSchedulerDecision, Bt as DEFAULT_ASSERTION_PASS_THRESHOLD, Ca as WorkflowRepository, Ci as NoneRetryPolicySpec, Cn as RunExecutionOptions, Co as CredentialHealthTester, Cr as JsonObject, Ct as WorkflowRunDetailDto, Da as WorkflowSnapshotResolver, Di as BinaryBody, Dn as RunResult, Do as CredentialMaterialSourceKind, Dr as NodeActivationId, Dt as Param, Ea as WorkflowSnapshotFactory, Ei as BinaryAttachmentCreateRequest, En as RunQueueEntry, Eo as CredentialJsonRecord, Er as MutableRunData, Et as Expr, Fi as EngineHost, Fn as WorkflowExecutionPruneRepository, Fo as CredentialType, Fr as NodeIterationId, Ga as TelemetryMetricRecord, Gi as LiveWorkflowRepository, Go as NodeConnectionName, Gr as RunDataFactory, Gt as WorkflowDispatch, Ha as TelemetryAttributePrimitive, Hi as HumanTaskId, Hr as ParentExecutionRef, Ht as NoOpAgentMcpIntegration, Ii as ExecutableTriggerNode, In as WorkflowExecutionRepository, Io as CredentialTypeDefinition, Ir as NodeKind, Ja as TelemetrySpanEventRecord, Ji as NodeActivationReceipt, Jo as PersistedTokenId, Jr as RunIdFactory, Jt as serializeDispatch, Ka as TelemetryScope, Ki as MultiInputNode, Ko as NodeId, Kr as RunDataSnapshot, Kt as WorkspaceId, La as ExecutionTelemetry, Li as ExecutionBinaryService, Lo as CredentialTypeId, Lr as NodeOffloadPolicy, Ma as WebhookTriggerMatcher, Mi as BinaryStorageWriteResult, Mn as RunTestContext, Mo as CredentialSessionFactoryArgs, Mr as NodeErrorHandlerSpec, Na as WebhookTriggerResolution, Ni as Duration, Nn as WebhookRunResult, No as CredentialSessionService, Nr as NodeIdRef, Oa as HttpMethod, Oi as BinaryStorage, On as RunStateResetRequest, Oo as CredentialOAuth2AuthDefinition, Or as NodeConfigBase, Ot as ParamDeep, Pa as WebhookTriggerRoutingDiagnostics, Pi as EngineDeps, Pn as WorkflowExecutionListingRepository, Po as CredentialSetupStatus, Pr as NodeInspectorSummaryRow, Q as DeploymentManifestSchemaVersion, Qa as CodemationTelemetryAttributeNames, Qi as NodeBinaryAttachmentService, Qr as TriggerNodeConfig, Qt as ConnectionInvocationAppendArgs, Ra as ExecutionTelemetryFactory, Ri as ExecutionContext, Ro as CredentialTypeRegistry, Rr as NodeOutputs, Rt as AssertionResult, Sa as WorkflowNodeInstanceFactory, Si as FixedRetryPolicySpec, Sn as RunEventPublisherDeps, So as CredentialHealthStatus, Sr as JsonNonArray, St as WorkflowDetailSelectionState, Ta as WorkflowRunnerService, Ti as BINARY_DEFAULT_MAX_BYTES, Tn as RunPruneCandidate, To as CredentialInstanceRecord, Tr as JsonValue, Tt as CostCatalogEntry, Ua as TelemetryAttributes, Ui as HumanTaskSubject, Ur as PersistedRunPolicySnapshot, Ut as AgentBindError, Va as TelemetryArtifactReference, Vi as HumanTaskHandle, Vr as PairedItemRef, Vt as deriveAssertionPassed, Wa as TelemetryChildSpanStart, Wi as ItemNode, Wo as InputPortKey, Wr as PollingTriggerConfig, Wt as DispatchItemMeta, Xa as CodemationTelemetryMetricNames, Xi as NodeActivationRequestBase, Xr as RunnableNodeInputJson, Xt as AgentMcpToolMap, Ya as TelemetrySpanScope, Yi as NodeActivationRequest, Yo as WorkflowId, Yr as RunnableNodeConfig, Yt as AgentMcpIntegration, Z as DEPLOYMENT_MANIFEST_SCHEMA_VERSION, Za as GenAiTelemetryAttributeNames, Zi as NodeActivationScheduler, Zr as RunnableNodeOutputJson, Zt as NeedsReconsentEvent, _a as TriggerRuntimeDiagnostics, _i as runnableNodeInputType, _n as PersistedWorkflowSnapshotNode, _o as CredentialAuthDefinition, _r as ExecutionMode, _t as RunRevision, aa as NodeResolver, ai as WorkflowErrorHandlerSpec, an as NodeExecutionSnapshot, ao as CostTrackingPriceQuote, at as BatchId, ba as TriggerSetupStateRepository, bi as triggerNodeSetupStateType, bn as RunCompletionNotifier, bo as CredentialFieldSchema, br as Items, bt as WorkItemId, ca as PreparedNodeActivationDispatch, ci as WorkflowNodeConnection, cn as PendingNodeExecution, co as CostTrackingTelemetryFactory, ct as ExecutionInstanceId, da as RunnableNodeExecuteArgs, di as WorkflowStoragePolicyDecisionArgs, dn as PersistedMutableRunState, dr as TestTriggerNodeConfig, dt as PersistedExecutionInstanceKind, ea as NodeExecutionRequest, ei as TriggerNodeSetupState, en as ConnectionInvocationRecord, eo as NoOpExecutionTelemetry, et as ManifestTriggerConfig, fa as SuspensionRequest, fi as WorkflowStoragePolicyMode, fn as PersistedRunControlState, fr as TestTriggerSetupContext, ft as PersistedExecutionInstanceRecord, ga as TriggerPollingPort, gi as nodeRef, gn as PersistedWorkflowSnapshot, go as CredentialAdvancedSectionPresentation, gr as Edge, gt as RunIterationDto, ha as TriggerNode, hi as branchRef, hn as PersistedSuspensionEntry, ho as CredentialAccessTokenSessionFactory, hr as BinaryPreviewKind, ht as PersistedRunWorkItemRecord, ia as NodeExecutor, ii as WorkflowErrorHandler, in as NodeExecutionError, io as CostTrackingComponent, it as serializeManifest, ja as WebhookInvocationMatch, ji as BinaryStorageWriteRequest, jn as RunSummary, jo as CredentialSessionFactory, jr as NodeErrorHandlerArgs, ka as TriggerInstanceId, ki as BinaryStorageReadResult, kn as RunStatus, ko as CredentialOAuth2ScopesFromPublicConfig, kr as NodeDefinition, la as ResumeContext, li as WorkflowPolicyRuntimeDefaults, ln as PendingResumeEntry, lt as ExecutionPayloadPolicyFields, ma as TriggerCleanupHandle, mi as WorkflowStoragePolicySpec, mn as PersistedRunState, mo as CredentialAccessTokenSessionArgs, mr as BinaryAttachment, mt as PersistedRunWorkItemKind, na as NodeExecutionScheduler, ni as WorkflowDefinition, nn as EngineRunCounters, no as NoOpTelemetrySpanScope, nt as deserializeManifest, oa as PersistedTriggerSetupState, oi as WorkflowGraph, on as NodeExecutionStatus, oo as CostTrackingTelemetry, ot as ConnectionInvocationKind, pa as TestableTriggerNode, pi as WorkflowStoragePolicyResolver, pn as PersistedRunSchedulingState, po as AnyCredentialType, pr as ActivationIdFactory, pt as PersistedRunSlotProjectionRecord, qa as TelemetrySpanEnd, qi as NodeActivationContinuation, qo as OutputPortKey, qr as RunId, qt as deserializeDispatch, ra as NodeExecutionStatePublisher, ri as WorkflowErrorContext, rn as ExecutionFrontierPlan, ro as NoOpTelemetryArtifactReference, rt as emitWorkflowManifest, sa as PollingTriggerHandle, si as WorkflowGraphFactory, sn as NodeInputsByPort, st as ExecutionInstanceDto, ta as NodeExecutionRequestHandler, ti as UpstreamRefPlaceholder, tn as CurrentStateExecutionRequest, to as NoOpNodeExecutionTelemetry, tr as TriggerInvoker, tt as WorkflowDeploymentManifest, ua as RunnableNode, ui as WorkflowPrunePolicySpec, un as PersistedMutableNodeState, uo as CostTrackingUsageRecord, ur as TestSuiteRunId, ut as PayloadStorageKind, va as TriggerSetupContext, vi as runnableNodeOutputType, vn as PersistedWorkflowTokenRegistryLike, vo as CredentialBinding, vr as Item, vt as RunSlotProjectionState, wa as WorkflowRunnerResolver, wi as RetryPolicySpec, wn as RunHaltReason, wo as CredentialInstanceId, wr as JsonPrimitive, wt as CostCatalog, xa as TriggerTestItemsContext, xi as ExponentialRetryPolicySpec, xn as RunCurrentState, xo as CredentialHealth, xr as JsonArray, xt as WorkItemStatus, ya as TriggerSetupStateFor, yi as triggerNodeOutputType, yn as PinnedNodeOutputsByPort, yo as CredentialBindingKey, yr as ItemBinary, yt as SlotExecutionStateDto, za as NodeExecutionTelemetry, zi as ExecutionContextFactory, zr as NodeRef, zt as AssertionResultProvenance } from "./index-CRv3_pY3.js";
|
|
2
|
+
export { ActivationIdFactory, AgentBindError, AgentMcpIntegration, AgentMcpToolMap, AnyCredentialType, AssertionResult, AssertionResultProvenance, BINARY_DEFAULT_MAX_BYTES, BatchId, BinaryAttachment, BinaryAttachmentCreateRequest, BinaryBody, BinaryPreviewKind, BinaryStorage, BinaryStorageReadResult, BinaryStorageStatResult, BinaryStorageWriteRequest, BinaryStorageWriteResult, CodemationTelemetryAttributeNames, CodemationTelemetryMetricNames, ConnectionInvocationAppendArgs, ConnectionInvocationId, ConnectionInvocationKind, ConnectionInvocationRecord, CostCatalog, CostCatalogEntry, CostTrackingComponent, CostTrackingPriceQuote, CostTrackingTelemetry, CostTrackingTelemetryFactory, CostTrackingUsageRecord, CredentialAccessTokenSessionArgs, CredentialAccessTokenSessionFactory, CredentialAdvancedSectionPresentation, CredentialAuthDefinition, CredentialBinding, CredentialBindingKey, CredentialFieldSchema, CredentialHealth, CredentialHealthStatus, CredentialHealthTester, CredentialInstanceId, CredentialInstanceRecord, CredentialJsonRecord, CredentialMaterialSourceKind, CredentialOAuth2AuthDefinition, CredentialOAuth2ScopesFromPublicConfig, CredentialRequirement, CredentialSessionFactory, CredentialSessionFactoryArgs, CredentialSessionService, CredentialSetupStatus, CredentialType, CredentialTypeDefinition, CredentialTypeId, CredentialTypeRegistry, CurrentStateExecutionRequest, DEFAULT_ASSERTION_PASS_THRESHOLD, DEPLOYMENT_MANIFEST_SCHEMA_VERSION, DeploymentManifestSchemaVersion, DispatchItemMeta, Duration, Edge, EngineDeps, EngineHost, EngineRunCounters, ExecutableTriggerNode, ExecutionBinaryService, ExecutionContext, ExecutionContextFactory, ExecutionFrontierPlan, ExecutionInstanceDto, ExecutionInstanceId, ExecutionMode, ExecutionPayloadPolicyFields, ExecutionTelemetry, ExecutionTelemetryFactory, ExponentialRetryPolicySpec, Expr, FixedRetryPolicySpec, GenAiTelemetryAttributeNames, HttpMethod, HumanTaskActor, HumanTaskHandle, HumanTaskId, HumanTaskSubject, InputPortKey, Item, ItemBinary, ItemNode, Items, JsonArray, JsonNonArray, JsonObject, JsonPrimitive, JsonValue, LiveWorkflowRepository, ManifestNodeCredentialShape, ManifestTriggerConfig, MultiInputNode, MutableRunData, NeedsReconsentEvent, NoOpAgentMcpIntegration, NoOpExecutionTelemetry, NoOpExecutionTelemetryFactory, NoOpNodeExecutionTelemetry, NoOpTelemetryArtifactReference, NoOpTelemetrySpanScope, NodeActivationContinuation, NodeActivationId, NodeActivationReceipt, NodeActivationRequest, NodeActivationRequestBase, NodeActivationScheduler, NodeBinaryAttachmentService, NodeConfigBase, NodeConnectionName, NodeDefinition, NodeErrorHandler, NodeErrorHandlerArgs, NodeErrorHandlerSpec, NodeExecutionContext, NodeExecutionError, NodeExecutionRequest, NodeExecutionRequestHandler, NodeExecutionScheduler, NodeExecutionSnapshot, NodeExecutionStatePublisher, NodeExecutionStatus, NodeExecutionTelemetry, NodeExecutor, NodeId, NodeIdRef, NodeInputsByPort, NodeInspectorSummaryRow, NodeIterationId, NodeKind, NodeOffloadPolicy, NodeOutputs, NodeRef, NodeResolver, NodeSchedulerDecision, NoneRetryPolicySpec, OAuth2ProviderFromPublicConfig, OutputPortKey, PairedItemRef, Param, ParamDeep, ParentExecutionRef, PayloadStorageKind, PendingNodeExecution, PendingResumeEntry, PersistedExecutionInstanceKind, PersistedExecutionInstanceRecord, PersistedMutableNodeState, PersistedMutableRunState, PersistedRunControlState, PersistedRunPolicySnapshot, PersistedRunSchedulingState, PersistedRunSlotProjectionRecord, PersistedRunState, PersistedRunWorkItemKind, PersistedRunWorkItemRecord, PersistedSuspensionEntry, PersistedTokenId, PersistedTriggerSetupState, PersistedWorkflowSnapshot, PersistedWorkflowSnapshotNode, PersistedWorkflowTokenRegistryLike, PinnedNodeOutputsByPort, PollingTriggerConfig, PollingTriggerHandle, PreparedNodeActivationDispatch, ResumeContext, RetryPolicySpec, RunCompletionNotifier, RunCurrentState, RunDataFactory, RunDataSnapshot, RunEventPublisherDeps, RunExecutionOptions, RunHaltReason, RunId, RunIdFactory, RunIterationDto, RunPruneCandidate, RunQueueEntry, RunResult, RunRevision, RunSlotProjectionState, RunStateResetRequest, RunStatus, RunStopCondition, RunSummary, RunTestContext, RunnableNode, RunnableNodeConfig, RunnableNodeExecuteArgs, RunnableNodeInputJson, RunnableNodeOutputJson, SlotExecutionStateDto, SuspensionRequest, TelemetryArtifactAttachment, TelemetryArtifactReference, TelemetryAttributePrimitive, TelemetryAttributes, TelemetryChildSpanStart, TelemetryMetricRecord, TelemetryScope, TelemetrySpanEnd, TelemetrySpanEventRecord, TelemetrySpanScope, TestSuiteRunId, TestTriggerNodeConfig, TestTriggerSetupContext, TestableTriggerNode, TriggerCleanupHandle, TriggerInstanceId, TriggerInvoker, TriggerNode, TriggerNodeConfig, TriggerNodeOutputJson, TriggerNodeSetupState, TriggerPollingPort, TriggerRuntimeDiagnostics, TriggerSetupContext, TriggerSetupStateFor, TriggerSetupStateRepository, TriggerTestItemsContext, UpstreamRefPlaceholder, WebhookControlSignal, WebhookInvocationMatch, WebhookRunResult, WebhookTriggerMatcher, WebhookTriggerResolution, WebhookTriggerRoutingDiagnostics, WorkItemId, WorkItemStatus, WorkflowDefinition, WorkflowDeploymentManifest, WorkflowDetailSelectionState, WorkflowDispatch, WorkflowErrorContext, WorkflowErrorHandler, WorkflowErrorHandlerSpec, WorkflowExecutionListingRepository, WorkflowExecutionPruneRepository, WorkflowExecutionRepository, WorkflowGraph, WorkflowGraphFactory, WorkflowId, WorkflowNodeConnection, WorkflowNodeInstanceFactory, WorkflowPolicyRuntimeDefaults, WorkflowPrunePolicySpec, WorkflowRepository, WorkflowRunDetailDto, WorkflowRunnerResolver, WorkflowRunnerService, WorkflowSnapshotFactory, WorkflowSnapshotResolver, WorkflowStoragePolicyDecisionArgs, WorkflowStoragePolicyMode, WorkflowStoragePolicyResolver, WorkflowStoragePolicySpec, WorkspaceId, branchRef, deriveAssertionPassed, deserializeDispatch, deserializeManifest, emitWorkflowManifest, nodeRef, runnableNodeInputType, runnableNodeOutputType, serializeDispatch, serializeManifest, triggerNodeOutputType, triggerNodeSetupStateType };
|
package/dist/contracts.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "./di-Cjiil7U-.js";
|
|
2
|
+
import { _ as NoOpAgentMcpIntegration, b as serializeDispatch, g as deriveAssertionPassed, h as DEFAULT_ASSERTION_PASS_THRESHOLD, i as serializeManifest, n as deserializeManifest, r as emitWorkflowManifest, t as DEPLOYMENT_MANIFEST_SCHEMA_VERSION, v as AgentBindError, y as deserializeDispatch } from "./contracts-CjJ5CZ7N.js";
|
|
2
3
|
|
|
3
|
-
export { AgentBindError, DEFAULT_ASSERTION_PASS_THRESHOLD, NoOpAgentMcpIntegration, deriveAssertionPassed };
|
|
4
|
+
export { AgentBindError, DEFAULT_ASSERTION_PASS_THRESHOLD, DEPLOYMENT_MANIFEST_SCHEMA_VERSION, NoOpAgentMcpIntegration, deriveAssertionPassed, deserializeDispatch, deserializeManifest, emitWorkflowManifest, serializeDispatch, serializeManifest };
|
package/dist/{executionPersistenceContracts-CN9d7AnL.d.cts → deploymentManifestTypes-B8CDmZZK.d.cts}
RENAMED
|
@@ -1,101 +1,67 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { $t as RunId, F as RunStatus, Ii as CredentialRequirement, Nt as NodeActivationId, Qi as NodeId, S as PersistedWorkflowSnapshot, _ as PersistedMutableRunState, bt as BinaryAttachment, cn as WorkflowDefinition, f as NodeExecutionStatus, jt as JsonValue, kt as JsonObject, n as AgentMcpToolMap, t as AgentMcpIntegration, ta as WorkflowId, u as NodeExecutionError } from "./agentMcpTypes-BHX4RQCC.cjs";
|
|
2
2
|
|
|
3
|
+
//#region src/contracts/dispatchTypes.d.ts
|
|
4
|
+
type WorkspaceId = string;
|
|
5
|
+
type DispatchBinaryRef = BinaryAttachment;
|
|
6
|
+
interface DispatchItemMeta {
|
|
7
|
+
readonly id: string;
|
|
8
|
+
readonly json?: JsonValue;
|
|
9
|
+
readonly binary?: Readonly<Record<string, DispatchBinaryRef>>;
|
|
10
|
+
}
|
|
11
|
+
interface WorkflowDispatch {
|
|
12
|
+
readonly runId: RunId;
|
|
13
|
+
readonly workspaceId: WorkspaceId;
|
|
14
|
+
readonly workflowId: WorkflowId;
|
|
15
|
+
readonly triggerNodeId: NodeId;
|
|
16
|
+
readonly items: ReadonlyArray<DispatchItemMeta>;
|
|
17
|
+
readonly triggerContext: JsonValue;
|
|
18
|
+
}
|
|
19
|
+
declare function serializeDispatch(dispatch: WorkflowDispatch): string;
|
|
20
|
+
declare function deserializeDispatch(raw: string): WorkflowDispatch;
|
|
21
|
+
//#endregion
|
|
3
22
|
//#region src/contracts/AgentBindError.d.ts
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Thrown at agent bind time when mcpServers declarations cannot be resolved.
|
|
7
|
-
* Causes include: unknown server id, missing credential instance, insufficient scopes,
|
|
8
|
-
* and ambiguous shorthand binding (multiple credential instances match).
|
|
9
|
-
*/
|
|
10
23
|
declare class AgentBindError extends Error {
|
|
11
24
|
constructor(message: string);
|
|
12
25
|
}
|
|
13
26
|
//#endregion
|
|
14
27
|
//#region src/contracts/NoOpAgentMcpIntegration.d.ts
|
|
15
|
-
/**
|
|
16
|
-
* No-op implementation of AgentMcpIntegration.
|
|
17
|
-
* Registered by the core engine runtime as a fallback when the host does not
|
|
18
|
-
* supply a real implementation (e.g. in unit tests or headless engine setups).
|
|
19
|
-
* Always returns an empty tool map so the agent runs with node-backed tools only.
|
|
20
|
-
*/
|
|
21
28
|
declare class NoOpAgentMcpIntegration implements AgentMcpIntegration {
|
|
22
29
|
prepareMcpTools(): Promise<AgentMcpToolMap>;
|
|
23
30
|
}
|
|
24
31
|
//#endregion
|
|
25
32
|
//#region src/contracts/assertionTypes.d.ts
|
|
26
|
-
/**
|
|
27
|
-
* One assertion emitted by an assertion-emitting node (a node whose config sets
|
|
28
|
-
* `emitsAssertions: true`). Each emitted item on `main` carries one of these as `item.json`.
|
|
29
|
-
*
|
|
30
|
-
* Pass/fail is derived from `score >= (passThreshold ?? 0.5)` — see {@link deriveAssertionPassed}.
|
|
31
|
-
* The `errored` marker is for cases where the assertion code itself threw (distinct from
|
|
32
|
-
* "the assertion was evaluated and the score was low") and is treated as a hard fail in rollups
|
|
33
|
-
* regardless of `score`.
|
|
34
|
-
*/
|
|
35
33
|
interface AssertionResult {
|
|
36
34
|
readonly name: string;
|
|
37
|
-
/** 0..1 score. Source of truth for pass/fail (compared against `passThreshold`). */
|
|
38
35
|
readonly score: number;
|
|
39
|
-
/** 0..1 threshold for "passed". When omitted, consumers default to 0.5. */
|
|
40
36
|
readonly passThreshold?: number;
|
|
41
|
-
/** True when evaluating the assertion threw — treated as fail regardless of `score`. */
|
|
42
37
|
readonly errored?: true;
|
|
43
|
-
/** What the assertion expected. Free-form JSON; UIs render with a JSON viewer. */
|
|
44
38
|
readonly expected?: JsonValue;
|
|
45
|
-
/** What the workflow actually produced. */
|
|
46
39
|
readonly actual?: JsonValue;
|
|
47
|
-
/** Short human-readable explanation, especially for fails / errors. */
|
|
48
40
|
readonly message?: string;
|
|
49
|
-
/** Bag of supplemental fields (e.g. judge prompt, judge raw response, comparison method). */
|
|
50
41
|
readonly details?: Readonly<Record<string, JsonValue>>;
|
|
51
42
|
}
|
|
52
|
-
/**
|
|
53
|
-
* Default {@link AssertionResult.passThreshold} when authors omit it. Boolean-style assertions
|
|
54
|
-
* (assertEqual / contains / etc.) emit `score: 1` or `score: 0` so this default works for them;
|
|
55
|
-
* AI-judge assertions are expected to set their own threshold.
|
|
56
|
-
*/
|
|
57
43
|
declare const DEFAULT_ASSERTION_PASS_THRESHOLD = 0.5;
|
|
58
|
-
/**
|
|
59
|
-
* Derive whether an assertion result is considered "passing" using the score-based contract:
|
|
60
|
-
* `errored` always fails, otherwise `score >= (passThreshold ?? 0.5)`. This is the canonical
|
|
61
|
-
* derivation — UI and rollup code should call it rather than inlining the comparison so future
|
|
62
|
-
* tweaks (e.g. NaN handling) land in one place.
|
|
63
|
-
*/
|
|
64
44
|
declare function deriveAssertionPassed(result: {
|
|
65
45
|
readonly score: number;
|
|
66
46
|
readonly passThreshold?: number;
|
|
67
47
|
readonly errored?: true;
|
|
68
48
|
}): boolean;
|
|
69
|
-
/**
|
|
70
|
-
* Provenance for a persisted {@link AssertionResult}: which node produced it and where in the
|
|
71
|
-
* per-item iteration tree it landed. Filled in by the host-side persister, not the node itself.
|
|
72
|
-
*/
|
|
73
49
|
interface AssertionResultProvenance {
|
|
74
50
|
readonly nodeId: NodeId;
|
|
75
|
-
/** Per-item iteration id when the emitting node ran inside a per-item loop. */
|
|
76
51
|
readonly iterationId?: string;
|
|
77
|
-
/** Item index (0-based) within the activation that produced this assertion. */
|
|
78
52
|
readonly itemIndex?: number;
|
|
79
53
|
}
|
|
80
54
|
//#endregion
|
|
81
55
|
//#region src/contracts/executionPersistenceContracts.d.ts
|
|
82
|
-
/** Canonical id for persisted execution rows (activation or connection invocation). */
|
|
83
56
|
type ExecutionInstanceId = string;
|
|
84
|
-
/** Stable id for persisted work-queue rows. */
|
|
85
57
|
type WorkItemId = string;
|
|
86
|
-
/** Batch grouping for planner activations. */
|
|
87
58
|
type BatchId = string;
|
|
88
|
-
/** Optimistic concurrency on the run root. */
|
|
89
59
|
type RunRevision = number;
|
|
90
60
|
type PersistedRunWorkItemKind = "queue" | "pending";
|
|
91
61
|
type WorkItemStatus = "queued" | "claimed" | "completed" | "failed" | "cancelled";
|
|
92
62
|
type PersistedExecutionInstanceKind = "workflowNodeActivation" | "connectionInvocation";
|
|
93
63
|
type ConnectionInvocationKind = "languageModel" | "tool" | "nestedAgent";
|
|
94
64
|
type PayloadStorageKind = "inline" | "external" | "omitted";
|
|
95
|
-
/**
|
|
96
|
-
* Persisted run-work-queue row (queue entry or pending activation).
|
|
97
|
-
* Serialized to {@link RunWorkItem} in Prisma; engine still uses {@link PersistedRunState} queue + pending.
|
|
98
|
-
*/
|
|
99
65
|
interface PersistedRunWorkItemRecord {
|
|
100
66
|
readonly workItemId: WorkItemId;
|
|
101
67
|
readonly runId: RunId;
|
|
@@ -114,13 +80,9 @@ interface PersistedRunWorkItemRecord {
|
|
|
114
80
|
readonly sourceInstanceId?: ExecutionInstanceId;
|
|
115
81
|
readonly parentInstanceId?: ExecutionInstanceId;
|
|
116
82
|
readonly itemsIn: number;
|
|
117
|
-
/** Queue entry when kind is queue; pending activation when kind is pending. */
|
|
118
83
|
readonly payloadJson: string;
|
|
119
84
|
readonly error?: Readonly<NodeExecutionError>;
|
|
120
85
|
}
|
|
121
|
-
/**
|
|
122
|
-
* Payload policy fields for large-batch externalization (optional on first rollout).
|
|
123
|
-
*/
|
|
124
86
|
interface ExecutionPayloadPolicyFields {
|
|
125
87
|
readonly inputStorageKind: PayloadStorageKind;
|
|
126
88
|
readonly outputStorageKind: PayloadStorageKind;
|
|
@@ -133,9 +95,6 @@ interface ExecutionPayloadPolicyFields {
|
|
|
133
95
|
readonly inputTruncated?: boolean;
|
|
134
96
|
readonly outputTruncated?: boolean;
|
|
135
97
|
}
|
|
136
|
-
/**
|
|
137
|
-
* One persisted execution row (workflow node activation or connection invocation).
|
|
138
|
-
*/
|
|
139
98
|
interface PersistedExecutionInstanceRecord {
|
|
140
99
|
readonly instanceId: ExecutionInstanceId;
|
|
141
100
|
readonly runId: RunId;
|
|
@@ -170,9 +129,6 @@ interface PersistedExecutionInstanceRecord {
|
|
|
170
129
|
readonly usedPinnedOutput?: boolean;
|
|
171
130
|
readonly payloadPolicy?: ExecutionPayloadPolicyFields;
|
|
172
131
|
}
|
|
173
|
-
/**
|
|
174
|
-
* Cached slot projection for planner/debugger/UI (not canonical history).
|
|
175
|
-
*/
|
|
176
132
|
interface RunSlotProjectionState {
|
|
177
133
|
readonly runId: RunId;
|
|
178
134
|
readonly workflowId: WorkflowId;
|
|
@@ -205,12 +161,6 @@ interface WorkflowRunDetailDto {
|
|
|
205
161
|
readonly executionInstances: ReadonlyArray<ExecutionInstanceDto>;
|
|
206
162
|
readonly iterations?: ReadonlyArray<RunIterationDto>;
|
|
207
163
|
}
|
|
208
|
-
/**
|
|
209
|
-
* Per-item iteration projected from connection invocations and node activations.
|
|
210
|
-
*
|
|
211
|
-
* One iteration = one item processed by an agent within an activation. Multiple invocations
|
|
212
|
-
* (LLM rounds, tool calls) belonging to the same iteration share the iterationId.
|
|
213
|
-
*/
|
|
214
164
|
interface RunIterationDto {
|
|
215
165
|
readonly iterationId: string;
|
|
216
166
|
readonly agentNodeId: NodeId;
|
|
@@ -222,9 +172,7 @@ interface RunIterationDto {
|
|
|
222
172
|
readonly finishedAt?: string;
|
|
223
173
|
readonly invocationIds: ReadonlyArray<string>;
|
|
224
174
|
readonly parentInvocationId?: string;
|
|
225
|
-
/** Estimated cost rolled up from telemetry cost metric points, keyed by ISO currency code (e.g. "USD"). Values are minor units (cents-of-cents per the metric's `cost.currency_scale`). */
|
|
226
175
|
readonly estimatedCostMinorByCurrency?: Readonly<Record<string, number>>;
|
|
227
|
-
/** Currency scale (denominator) per currency, when present on the metric points. Joined with `estimatedCostMinorByCurrency` to format human-readable amounts. */
|
|
228
176
|
readonly estimatedCostCurrencyScaleByCurrency?: Readonly<Record<string, number>>;
|
|
229
177
|
}
|
|
230
178
|
interface SlotExecutionStateDto {
|
|
@@ -254,16 +202,9 @@ interface ExecutionInstanceDto {
|
|
|
254
202
|
readonly inputJson?: JsonValue;
|
|
255
203
|
readonly outputJson?: JsonValue;
|
|
256
204
|
readonly error?: Readonly<NodeExecutionError>;
|
|
257
|
-
/** Per-item iteration that produced this instance. Set on connectionInvocation rows produced inside per-item runnable loops. */
|
|
258
205
|
readonly iterationId?: string;
|
|
259
|
-
/** Item index (0-based) of the iteration. */
|
|
260
206
|
readonly itemIndex?: number;
|
|
261
|
-
/** Parent invocation id when this instance was emitted by a sub-agent triggered by an outer LLM/tool call. */
|
|
262
207
|
readonly parentInvocationId?: string;
|
|
263
|
-
/**
|
|
264
|
-
* When this instance is a SubWorkflow node activation, the run id of the child run it spawned.
|
|
265
|
-
* Used by the UI to deep-link directly to the child execution.
|
|
266
|
-
*/
|
|
267
208
|
readonly childRunId?: string;
|
|
268
209
|
}
|
|
269
210
|
interface WorkflowDetailSelectionState {
|
|
@@ -271,5 +212,48 @@ interface WorkflowDetailSelectionState {
|
|
|
271
212
|
readonly selectedInstanceId: ExecutionInstanceId | null;
|
|
272
213
|
}
|
|
273
214
|
//#endregion
|
|
274
|
-
|
|
275
|
-
|
|
215
|
+
//#region src/contracts/deploymentManifestTypes.d.ts
|
|
216
|
+
declare const DEPLOYMENT_MANIFEST_SCHEMA_VERSION: 2;
|
|
217
|
+
type DeploymentManifestSchemaVersion = typeof DEPLOYMENT_MANIFEST_SCHEMA_VERSION;
|
|
218
|
+
type ManifestTriggerConfig = Readonly<{
|
|
219
|
+
nodeId: NodeId;
|
|
220
|
+
triggerKind: "live" | "test";
|
|
221
|
+
config: JsonObject;
|
|
222
|
+
pollIntervalMs?: number;
|
|
223
|
+
nodeTypeId?: string;
|
|
224
|
+
}>;
|
|
225
|
+
type ManifestNodeCredentialShape = Readonly<{
|
|
226
|
+
nodeId: NodeId;
|
|
227
|
+
requirements: ReadonlyArray<CredentialRequirement>;
|
|
228
|
+
}>;
|
|
229
|
+
type WorkflowDeploymentManifest<TCanvas = JsonObject> = Readonly<{
|
|
230
|
+
manifestId: string;
|
|
231
|
+
schemaVersion: DeploymentManifestSchemaVersion;
|
|
232
|
+
workflowId: WorkflowId;
|
|
233
|
+
canvas: TCanvas;
|
|
234
|
+
snapshot: PersistedWorkflowSnapshot;
|
|
235
|
+
triggers: ReadonlyArray<ManifestTriggerConfig>;
|
|
236
|
+
credentialShapes: ReadonlyArray<ManifestNodeCredentialShape>;
|
|
237
|
+
}>;
|
|
238
|
+
declare function serializeManifest<TCanvas>(manifest: WorkflowDeploymentManifest<TCanvas>): string;
|
|
239
|
+
declare function deserializeManifest<TCanvas = JsonObject>(raw: string): WorkflowDeploymentManifest<TCanvas>;
|
|
240
|
+
type ManifestCanvasNode = Readonly<{
|
|
241
|
+
id: NodeId;
|
|
242
|
+
kind: string;
|
|
243
|
+
name: string | undefined;
|
|
244
|
+
type?: string;
|
|
245
|
+
role?: string;
|
|
246
|
+
triggerKind?: "live" | "test";
|
|
247
|
+
declaredOutputPorts?: ReadonlyArray<string>;
|
|
248
|
+
declaredInputPorts?: ReadonlyArray<string>;
|
|
249
|
+
}>;
|
|
250
|
+
type ManifestCanvas = Readonly<{
|
|
251
|
+
id: WorkflowId;
|
|
252
|
+
name: string;
|
|
253
|
+
nodes: ReadonlyArray<ManifestCanvasNode>;
|
|
254
|
+
edges: WorkflowDefinition["edges"];
|
|
255
|
+
}>;
|
|
256
|
+
declare function emitWorkflowManifest(workflow: WorkflowDefinition): WorkflowDeploymentManifest<ManifestCanvas>;
|
|
257
|
+
//#endregion
|
|
258
|
+
export { DEFAULT_ASSERTION_PASS_THRESHOLD as A, SlotExecutionStateDto as C, WorkflowRunDetailDto as D, WorkflowDetailSelectionState as E, WorkflowDispatch as F, WorkspaceId as I, deserializeDispatch as L, NoOpAgentMcpIntegration as M, AgentBindError as N, AssertionResult as O, DispatchItemMeta as P, serializeDispatch as R, RunSlotProjectionState as S, WorkItemStatus as T, PersistedRunSlotProjectionRecord as _, WorkflowDeploymentManifest as a, RunIterationDto as b, serializeManifest as c, ExecutionInstanceDto as d, ExecutionInstanceId as f, PersistedExecutionInstanceRecord as g, PersistedExecutionInstanceKind as h, ManifestTriggerConfig as i, deriveAssertionPassed as j, AssertionResultProvenance as k, BatchId as l, PayloadStorageKind as m, DeploymentManifestSchemaVersion as n, deserializeManifest as o, ExecutionPayloadPolicyFields as p, ManifestNodeCredentialShape as r, emitWorkflowManifest as s, DEPLOYMENT_MANIFEST_SCHEMA_VERSION as t, ConnectionInvocationKind as u, PersistedRunWorkItemKind as v, WorkItemId as w, RunRevision as x, PersistedRunWorkItemRecord as y };
|
|
259
|
+
//# sourceMappingURL=deploymentManifestTypes-B8CDmZZK.d.cts.map
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
//#region rolldown:runtime
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
10
|
+
key = keys[i];
|
|
11
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
12
|
+
get: ((k) => from[k]).bind(null, key),
|
|
13
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
19
|
+
value: mod,
|
|
20
|
+
enumerable: true
|
|
21
|
+
}) : target, mod));
|
|
22
|
+
|
|
23
|
+
//#endregion
|
|
24
|
+
require("reflect-metadata");
|
|
25
|
+
let tsyringe = require("tsyringe");
|
|
26
|
+
tsyringe = __toESM(tsyringe);
|
|
27
|
+
|
|
28
|
+
//#region src/contracts/itemExpr.ts
|
|
29
|
+
function itemExpr(fn) {
|
|
30
|
+
return {
|
|
31
|
+
__codemationItemExpr: "codemation.itemExpr",
|
|
32
|
+
fn
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
function isItemExpr(value) {
|
|
36
|
+
if (typeof value !== "object" || value === null) return false;
|
|
37
|
+
const v = value;
|
|
38
|
+
if (v["__codemationItemExpr"] === "codemation.itemExpr" && typeof v["fn"] === "function") return true;
|
|
39
|
+
for (const sym of Object.getOwnPropertySymbols(v)) if (sym.description === "codemation.itemExpr" && v[sym] === true) return true;
|
|
40
|
+
const keys = Object.keys(v);
|
|
41
|
+
if (keys.length === 1 && keys[0] === "fn" && typeof v.fn === "function") return true;
|
|
42
|
+
return false;
|
|
43
|
+
}
|
|
44
|
+
function containsItemExprInUnknown(value, seen = /* @__PURE__ */ new WeakSet()) {
|
|
45
|
+
if (isItemExpr(value)) return true;
|
|
46
|
+
if (value === null || typeof value !== "object") return false;
|
|
47
|
+
if (seen.has(value)) return false;
|
|
48
|
+
seen.add(value);
|
|
49
|
+
if (Array.isArray(value)) return value.some((entry) => containsItemExprInUnknown(entry, seen));
|
|
50
|
+
for (const entry of Object.values(value)) if (containsItemExprInUnknown(entry, seen)) return true;
|
|
51
|
+
return false;
|
|
52
|
+
}
|
|
53
|
+
async function resolveItemExprsInUnknown(value, args, seen = /* @__PURE__ */ new WeakSet()) {
|
|
54
|
+
if (isItemExpr(value)) return await Promise.resolve(value.fn(args));
|
|
55
|
+
if (value === null || typeof value !== "object") return value;
|
|
56
|
+
if (seen.has(value)) return value;
|
|
57
|
+
seen.add(value);
|
|
58
|
+
if (Array.isArray(value)) {
|
|
59
|
+
const out$1 = [];
|
|
60
|
+
for (let i = 0; i < value.length; i++) out$1.push(await resolveItemExprsInUnknown(value[i], args, seen));
|
|
61
|
+
return out$1;
|
|
62
|
+
}
|
|
63
|
+
const rec = value;
|
|
64
|
+
const entries = Object.entries(rec);
|
|
65
|
+
const proto = Object.getPrototypeOf(value);
|
|
66
|
+
if (proto !== Object.prototype && proto !== null && entries.length === 0) return value;
|
|
67
|
+
const out = Object.create(proto);
|
|
68
|
+
for (const [k, v] of entries) out[k] = await resolveItemExprsInUnknown(v, args, seen);
|
|
69
|
+
return out;
|
|
70
|
+
}
|
|
71
|
+
async function resolveItemExprsForExecution(config, nodeCtx, item, itemIndex, items) {
|
|
72
|
+
const exprArgs = {
|
|
73
|
+
item,
|
|
74
|
+
itemIndex,
|
|
75
|
+
items,
|
|
76
|
+
ctx: {
|
|
77
|
+
runId: nodeCtx.runId,
|
|
78
|
+
workflowId: nodeCtx.workflowId,
|
|
79
|
+
nodeId: nodeCtx.nodeId,
|
|
80
|
+
activationId: nodeCtx.activationId,
|
|
81
|
+
data: nodeCtx.data
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
if (!containsItemExprInUnknown(config)) return;
|
|
85
|
+
return await resolveItemExprsInUnknown(config, exprArgs);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
//#endregion
|
|
89
|
+
//#region src/ai/AgentConfigInspectorFactory.ts
|
|
90
|
+
var AgentConfigInspector = class {
|
|
91
|
+
static isAgentNodeConfig(config) {
|
|
92
|
+
if (!config) return false;
|
|
93
|
+
const candidate = config;
|
|
94
|
+
return !!candidate.chatModel && this.hasCompatibleMessageConfiguration(candidate);
|
|
95
|
+
}
|
|
96
|
+
static hasCompatibleMessageConfiguration(candidate) {
|
|
97
|
+
const messages = candidate.messages;
|
|
98
|
+
if (messages === void 0 || messages === null) return false;
|
|
99
|
+
if (Array.isArray(messages)) return messages.length > 0;
|
|
100
|
+
if (typeof messages === "object") {
|
|
101
|
+
if (isItemExpr(messages)) return true;
|
|
102
|
+
const o = messages;
|
|
103
|
+
return Array.isArray(o.prompt) && o.prompt.length > 0 || typeof o.buildMessages === "function";
|
|
104
|
+
}
|
|
105
|
+
return false;
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
//#endregion
|
|
110
|
+
//#region src/di/CoreTokens.ts
|
|
111
|
+
const CoreTokens = {
|
|
112
|
+
PersistedWorkflowTokenRegistry: Symbol.for("codemation.core.PersistedWorkflowTokenRegistry"),
|
|
113
|
+
CredentialSessionService: Symbol.for("codemation.core.CredentialSessionService"),
|
|
114
|
+
CredentialTypeRegistry: Symbol.for("codemation.core.CredentialTypeRegistry"),
|
|
115
|
+
WorkflowRunnerService: Symbol.for("codemation.core.WorkflowRunnerService"),
|
|
116
|
+
LiveWorkflowRepository: Symbol.for("codemation.core.LiveWorkflowRepository"),
|
|
117
|
+
WorkflowRepository: Symbol.for("codemation.core.WorkflowRepository"),
|
|
118
|
+
NodeResolver: Symbol.for("codemation.core.NodeResolver"),
|
|
119
|
+
WorkflowNodeInstanceFactory: Symbol.for("codemation.core.WorkflowNodeInstanceFactory"),
|
|
120
|
+
RunIdFactory: Symbol.for("codemation.core.RunIdFactory"),
|
|
121
|
+
ActivationIdFactory: Symbol.for("codemation.core.ActivationIdFactory"),
|
|
122
|
+
WorkflowExecutionRepository: Symbol.for("codemation.core.WorkflowExecutionRepository"),
|
|
123
|
+
TriggerSetupStateRepository: Symbol.for("codemation.core.TriggerSetupStateRepository"),
|
|
124
|
+
NodeActivationScheduler: Symbol.for("codemation.core.NodeActivationScheduler"),
|
|
125
|
+
RunDataFactory: Symbol.for("codemation.core.RunDataFactory"),
|
|
126
|
+
ExecutionContextFactory: Symbol.for("codemation.core.ExecutionContextFactory"),
|
|
127
|
+
RunEventBus: Symbol.for("codemation.core.RunEventBus"),
|
|
128
|
+
BinaryStorage: Symbol.for("codemation.core.BinaryStorage"),
|
|
129
|
+
WebhookBasePath: Symbol.for("codemation.core.WebhookBasePath"),
|
|
130
|
+
EngineExecutionLimitsPolicy: Symbol.for("codemation.core.EngineExecutionLimitsPolicy"),
|
|
131
|
+
WorkflowActivationPolicy: Symbol.for("codemation.core.WorkflowActivationPolicy"),
|
|
132
|
+
AgentMcpIntegration: Symbol.for("codemation.core.AgentMcpIntegration"),
|
|
133
|
+
TriggerInvoker: Symbol.for("codemation.core.TriggerInvoker")
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
//#endregion
|
|
137
|
+
Object.defineProperty(exports, 'AgentConfigInspector', {
|
|
138
|
+
enumerable: true,
|
|
139
|
+
get: function () {
|
|
140
|
+
return AgentConfigInspector;
|
|
141
|
+
}
|
|
142
|
+
});
|
|
143
|
+
Object.defineProperty(exports, 'CoreTokens', {
|
|
144
|
+
enumerable: true,
|
|
145
|
+
get: function () {
|
|
146
|
+
return CoreTokens;
|
|
147
|
+
}
|
|
148
|
+
});
|
|
149
|
+
Object.defineProperty(exports, '__toESM', {
|
|
150
|
+
enumerable: true,
|
|
151
|
+
get: function () {
|
|
152
|
+
return __toESM;
|
|
153
|
+
}
|
|
154
|
+
});
|
|
155
|
+
Object.defineProperty(exports, 'isItemExpr', {
|
|
156
|
+
enumerable: true,
|
|
157
|
+
get: function () {
|
|
158
|
+
return isItemExpr;
|
|
159
|
+
}
|
|
160
|
+
});
|
|
161
|
+
Object.defineProperty(exports, 'itemExpr', {
|
|
162
|
+
enumerable: true,
|
|
163
|
+
get: function () {
|
|
164
|
+
return itemExpr;
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
Object.defineProperty(exports, 'resolveItemExprsForExecution', {
|
|
168
|
+
enumerable: true,
|
|
169
|
+
get: function () {
|
|
170
|
+
return resolveItemExprsForExecution;
|
|
171
|
+
}
|
|
172
|
+
});
|
|
173
|
+
Object.defineProperty(exports, 'resolveItemExprsInUnknown', {
|
|
174
|
+
enumerable: true,
|
|
175
|
+
get: function () {
|
|
176
|
+
return resolveItemExprsInUnknown;
|
|
177
|
+
}
|
|
178
|
+
});
|
|
179
|
+
//# sourceMappingURL=di-C6Ubf9o5.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"di-C6Ubf9o5.cjs","names":["out: unknown[]","out","exprArgs: ItemExprArgs"],"sources":["../src/contracts/itemExpr.ts","../src/ai/AgentConfigInspectorFactory.ts","../src/di/CoreTokens.ts"],"sourcesContent":["import type { NodeExecutionContext } from \"./runtimeTypes\";\nimport type { Item, Items, NodeActivationId, NodeId, RunDataSnapshot, RunId, WorkflowId } from \"./workflowTypes\";\n\nexport type ItemExprResolvedContext = Readonly<{\n runId: RunId;\n workflowId: WorkflowId;\n nodeId: NodeId;\n activationId: NodeActivationId;\n data: RunDataSnapshot;\n}>;\n\nexport type ItemExprContext = ItemExprResolvedContext;\n\nexport type ItemExprArgs<TItemJson = unknown> = Readonly<{\n item: Item<TItemJson>;\n itemIndex: number;\n items: Items<TItemJson>;\n ctx: ItemExprContext;\n}>;\n\nexport type ItemExprCallback<T, TItemJson = unknown> = (args: ItemExprArgs<TItemJson>) => T | Promise<T>;\n\nexport type ItemExpr<T, TItemJson = unknown> = Readonly<{\n readonly __codemationItemExpr: \"codemation.itemExpr\";\n readonly fn: ItemExprCallback<T, TItemJson>;\n}>;\n\nexport function itemExpr<T, TItemJson = unknown>(fn: ItemExprCallback<T, TItemJson>): ItemExpr<T, TItemJson> {\n return { __codemationItemExpr: \"codemation.itemExpr\", fn };\n}\n\nexport function isItemExpr<T, TItemJson = unknown>(value: unknown): value is ItemExpr<T, TItemJson> {\n if (typeof value !== \"object\" || value === null) {\n return false;\n }\n const v = value as Record<PropertyKey, unknown>;\n if (v[\"__codemationItemExpr\"] === \"codemation.itemExpr\" && typeof v[\"fn\"] === \"function\") {\n return true;\n }\n for (const sym of Object.getOwnPropertySymbols(v)) {\n if (sym.description === \"codemation.itemExpr\" && v[sym] === true) {\n return true;\n }\n }\n const keys = Object.keys(v);\n if (keys.length === 1 && keys[0] === \"fn\" && typeof (v as { fn?: unknown }).fn === \"function\") {\n return true;\n }\n return false;\n}\n\nfunction containsItemExprInUnknown(value: unknown, seen: WeakSet<object> = new WeakSet()): boolean {\n if (isItemExpr(value)) {\n return true;\n }\n if (value === null || typeof value !== \"object\") {\n return false;\n }\n if (seen.has(value as object)) {\n return false;\n }\n seen.add(value as object);\n if (Array.isArray(value)) {\n return value.some((entry) => containsItemExprInUnknown(entry, seen));\n }\n for (const entry of Object.values(value as Record<string, unknown>)) {\n if (containsItemExprInUnknown(entry, seen)) {\n return true;\n }\n }\n return false;\n}\n\nexport async function resolveItemExprsInUnknown(\n value: unknown,\n args: ItemExprArgs,\n seen: WeakSet<object> = new WeakSet(),\n): Promise<unknown> {\n if (isItemExpr(value)) {\n return await Promise.resolve(value.fn(args));\n }\n if (value === null || typeof value !== \"object\") {\n return value;\n }\n if (seen.has(value as object)) {\n return value;\n }\n seen.add(value as object);\n if (Array.isArray(value)) {\n const out: unknown[] = [];\n for (let i = 0; i < value.length; i++) {\n out.push(await resolveItemExprsInUnknown(value[i], args, seen));\n }\n return out;\n }\n const rec = value as Record<string, unknown>;\n const entries = Object.entries(rec);\n const proto = Object.getPrototypeOf(value);\n if (proto !== Object.prototype && proto !== null && entries.length === 0) {\n return value;\n }\n const out = Object.create(proto) as Record<string, unknown>;\n for (const [k, v] of entries) {\n out[k] = await resolveItemExprsInUnknown(v, args, seen);\n }\n return out;\n}\n\nexport async function resolveItemExprsForExecution(\n config: unknown,\n nodeCtx: NodeExecutionContext,\n item: Item,\n itemIndex: number,\n items: Items,\n): Promise<unknown | undefined> {\n const exprArgs: ItemExprArgs = {\n item,\n itemIndex,\n items,\n ctx: {\n runId: nodeCtx.runId,\n workflowId: nodeCtx.workflowId,\n nodeId: nodeCtx.nodeId,\n activationId: nodeCtx.activationId,\n data: nodeCtx.data,\n },\n };\n if (!containsItemExprInUnknown(config)) {\n return undefined;\n }\n return await resolveItemExprsInUnknown(config, exprArgs);\n}\n","import type { NodeConfigBase } from \"../types\";\nimport { isItemExpr } from \"../contracts/itemExpr\";\nimport type { AgentNodeConfig } from \"./AiHost\";\n\nexport class AgentConfigInspector {\n static isAgentNodeConfig(config: NodeConfigBase | undefined): config is AgentNodeConfig<any, any> {\n if (!config) return false;\n const candidate = config as Partial<AgentNodeConfig<any, any>>;\n return !!candidate.chatModel && this.hasCompatibleMessageConfiguration(candidate);\n }\n\n private static hasCompatibleMessageConfiguration(candidate: Partial<AgentNodeConfig<any, any>>): boolean {\n const messages = candidate.messages;\n if (messages === undefined || messages === null) {\n return false;\n }\n if (Array.isArray(messages)) {\n return messages.length > 0;\n }\n if (typeof messages === \"object\") {\n if (isItemExpr(messages)) {\n return true;\n }\n const o = messages as { prompt?: unknown; buildMessages?: unknown };\n return (Array.isArray(o.prompt) && o.prompt.length > 0) || typeof o.buildMessages === \"function\";\n }\n return false;\n }\n}\n","import type { TypeToken } from \"./index\";\nimport type { RunEventBus } from \"../events/runEvents\";\nimport type { EngineExecutionLimitsPolicy } from \"../policies/executionLimits/EngineExecutionLimitsPolicy\";\nimport type { AgentMcpIntegration } from \"../contracts/agentMcpTypes\";\nimport type {\n ActivationIdFactory,\n BinaryStorage,\n CredentialSessionService,\n CredentialTypeRegistry,\n ExecutionContextFactory,\n LiveWorkflowRepository,\n NodeActivationScheduler,\n NodeResolver,\n PersistedWorkflowTokenRegistryLike,\n RunDataFactory,\n RunIdFactory,\n TriggerSetupStateRepository,\n WorkflowExecutionRepository,\n WorkflowNodeInstanceFactory,\n WorkflowActivationPolicy,\n WorkflowRepository,\n WorkflowRunnerService,\n} from \"../types\";\nimport type { TriggerInvoker } from \"../contracts/triggerInvokerTypes\";\n\nexport const CoreTokens = {\n PersistedWorkflowTokenRegistry: Symbol.for(\n \"codemation.core.PersistedWorkflowTokenRegistry\",\n ) as TypeToken<PersistedWorkflowTokenRegistryLike>,\n CredentialSessionService: Symbol.for(\n \"codemation.core.CredentialSessionService\",\n ) as TypeToken<CredentialSessionService>,\n CredentialTypeRegistry: Symbol.for(\"codemation.core.CredentialTypeRegistry\") as TypeToken<CredentialTypeRegistry>,\n WorkflowRunnerService: Symbol.for(\"codemation.core.WorkflowRunnerService\") as TypeToken<WorkflowRunnerService>,\n LiveWorkflowRepository: Symbol.for(\"codemation.core.LiveWorkflowRepository\") as TypeToken<LiveWorkflowRepository>,\n WorkflowRepository: Symbol.for(\"codemation.core.WorkflowRepository\") as TypeToken<WorkflowRepository>,\n NodeResolver: Symbol.for(\"codemation.core.NodeResolver\") as TypeToken<NodeResolver>,\n WorkflowNodeInstanceFactory: Symbol.for(\n \"codemation.core.WorkflowNodeInstanceFactory\",\n ) as TypeToken<WorkflowNodeInstanceFactory>,\n RunIdFactory: Symbol.for(\"codemation.core.RunIdFactory\") as TypeToken<RunIdFactory>,\n ActivationIdFactory: Symbol.for(\"codemation.core.ActivationIdFactory\") as TypeToken<ActivationIdFactory>,\n WorkflowExecutionRepository: Symbol.for(\n \"codemation.core.WorkflowExecutionRepository\",\n ) as TypeToken<WorkflowExecutionRepository>,\n TriggerSetupStateRepository: Symbol.for(\n \"codemation.core.TriggerSetupStateRepository\",\n ) as TypeToken<TriggerSetupStateRepository>,\n NodeActivationScheduler: Symbol.for(\"codemation.core.NodeActivationScheduler\") as TypeToken<NodeActivationScheduler>,\n RunDataFactory: Symbol.for(\"codemation.core.RunDataFactory\") as TypeToken<RunDataFactory>,\n ExecutionContextFactory: Symbol.for(\"codemation.core.ExecutionContextFactory\") as TypeToken<ExecutionContextFactory>,\n RunEventBus: Symbol.for(\"codemation.core.RunEventBus\") as TypeToken<RunEventBus>,\n BinaryStorage: Symbol.for(\"codemation.core.BinaryStorage\") as TypeToken<BinaryStorage>,\n WebhookBasePath: Symbol.for(\"codemation.core.WebhookBasePath\") as TypeToken<string>,\n EngineExecutionLimitsPolicy: Symbol.for(\n \"codemation.core.EngineExecutionLimitsPolicy\",\n ) as TypeToken<EngineExecutionLimitsPolicy>,\n WorkflowActivationPolicy: Symbol.for(\n \"codemation.core.WorkflowActivationPolicy\",\n ) as TypeToken<WorkflowActivationPolicy>,\n AgentMcpIntegration: Symbol.for(\"codemation.core.AgentMcpIntegration\") as TypeToken<AgentMcpIntegration>,\n TriggerInvoker: Symbol.for(\"codemation.core.TriggerInvoker\") as TypeToken<TriggerInvoker>,\n} as const;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA,SAAgB,SAAiC,IAA4D;AAC3G,QAAO;EAAE,sBAAsB;EAAuB;EAAI;;AAG5D,SAAgB,WAAmC,OAAiD;AAClG,KAAI,OAAO,UAAU,YAAY,UAAU,KACzC,QAAO;CAET,MAAM,IAAI;AACV,KAAI,EAAE,4BAA4B,yBAAyB,OAAO,EAAE,UAAU,WAC5E,QAAO;AAET,MAAK,MAAM,OAAO,OAAO,sBAAsB,EAAE,CAC/C,KAAI,IAAI,gBAAgB,yBAAyB,EAAE,SAAS,KAC1D,QAAO;CAGX,MAAM,OAAO,OAAO,KAAK,EAAE;AAC3B,KAAI,KAAK,WAAW,KAAK,KAAK,OAAO,QAAQ,OAAQ,EAAuB,OAAO,WACjF,QAAO;AAET,QAAO;;AAGT,SAAS,0BAA0B,OAAgB,uBAAwB,IAAI,SAAS,EAAW;AACjG,KAAI,WAAW,MAAM,CACnB,QAAO;AAET,KAAI,UAAU,QAAQ,OAAO,UAAU,SACrC,QAAO;AAET,KAAI,KAAK,IAAI,MAAgB,CAC3B,QAAO;AAET,MAAK,IAAI,MAAgB;AACzB,KAAI,MAAM,QAAQ,MAAM,CACtB,QAAO,MAAM,MAAM,UAAU,0BAA0B,OAAO,KAAK,CAAC;AAEtE,MAAK,MAAM,SAAS,OAAO,OAAO,MAAiC,CACjE,KAAI,0BAA0B,OAAO,KAAK,CACxC,QAAO;AAGX,QAAO;;AAGT,eAAsB,0BACpB,OACA,MACA,uBAAwB,IAAI,SAAS,EACnB;AAClB,KAAI,WAAW,MAAM,CACnB,QAAO,MAAM,QAAQ,QAAQ,MAAM,GAAG,KAAK,CAAC;AAE9C,KAAI,UAAU,QAAQ,OAAO,UAAU,SACrC,QAAO;AAET,KAAI,KAAK,IAAI,MAAgB,CAC3B,QAAO;AAET,MAAK,IAAI,MAAgB;AACzB,KAAI,MAAM,QAAQ,MAAM,EAAE;EACxB,MAAMA,QAAiB,EAAE;AACzB,OAAK,IAAI,IAAI,GAAG,IAAI,MAAM,QAAQ,IAChC,OAAI,KAAK,MAAM,0BAA0B,MAAM,IAAI,MAAM,KAAK,CAAC;AAEjE,SAAOC;;CAET,MAAM,MAAM;CACZ,MAAM,UAAU,OAAO,QAAQ,IAAI;CACnC,MAAM,QAAQ,OAAO,eAAe,MAAM;AAC1C,KAAI,UAAU,OAAO,aAAa,UAAU,QAAQ,QAAQ,WAAW,EACrE,QAAO;CAET,MAAM,MAAM,OAAO,OAAO,MAAM;AAChC,MAAK,MAAM,CAAC,GAAG,MAAM,QACnB,KAAI,KAAK,MAAM,0BAA0B,GAAG,MAAM,KAAK;AAEzD,QAAO;;AAGT,eAAsB,6BACpB,QACA,SACA,MACA,WACA,OAC8B;CAC9B,MAAMC,WAAyB;EAC7B;EACA;EACA;EACA,KAAK;GACH,OAAO,QAAQ;GACf,YAAY,QAAQ;GACpB,QAAQ,QAAQ;GAChB,cAAc,QAAQ;GACtB,MAAM,QAAQ;GACf;EACF;AACD,KAAI,CAAC,0BAA0B,OAAO,CACpC;AAEF,QAAO,MAAM,0BAA0B,QAAQ,SAAS;;;;;AC9H1D,IAAa,uBAAb,MAAkC;CAChC,OAAO,kBAAkB,QAAyE;AAChG,MAAI,CAAC,OAAQ,QAAO;EACpB,MAAM,YAAY;AAClB,SAAO,CAAC,CAAC,UAAU,aAAa,KAAK,kCAAkC,UAAU;;CAGnF,OAAe,kCAAkC,WAAwD;EACvG,MAAM,WAAW,UAAU;AAC3B,MAAI,aAAa,UAAa,aAAa,KACzC,QAAO;AAET,MAAI,MAAM,QAAQ,SAAS,CACzB,QAAO,SAAS,SAAS;AAE3B,MAAI,OAAO,aAAa,UAAU;AAChC,OAAI,WAAW,SAAS,CACtB,QAAO;GAET,MAAM,IAAI;AACV,UAAQ,MAAM,QAAQ,EAAE,OAAO,IAAI,EAAE,OAAO,SAAS,KAAM,OAAO,EAAE,kBAAkB;;AAExF,SAAO;;;;;;ACDX,MAAa,aAAa;CACxB,gCAAgC,OAAO,IACrC,iDACD;CACD,0BAA0B,OAAO,IAC/B,2CACD;CACD,wBAAwB,OAAO,IAAI,yCAAyC;CAC5E,uBAAuB,OAAO,IAAI,wCAAwC;CAC1E,wBAAwB,OAAO,IAAI,yCAAyC;CAC5E,oBAAoB,OAAO,IAAI,qCAAqC;CACpE,cAAc,OAAO,IAAI,+BAA+B;CACxD,6BAA6B,OAAO,IAClC,8CACD;CACD,cAAc,OAAO,IAAI,+BAA+B;CACxD,qBAAqB,OAAO,IAAI,sCAAsC;CACtE,6BAA6B,OAAO,IAClC,8CACD;CACD,6BAA6B,OAAO,IAClC,8CACD;CACD,yBAAyB,OAAO,IAAI,0CAA0C;CAC9E,gBAAgB,OAAO,IAAI,iCAAiC;CAC5D,yBAAyB,OAAO,IAAI,0CAA0C;CAC9E,aAAa,OAAO,IAAI,8BAA8B;CACtD,eAAe,OAAO,IAAI,gCAAgC;CAC1D,iBAAiB,OAAO,IAAI,kCAAkC;CAC9D,6BAA6B,OAAO,IAClC,8CACD;CACD,0BAA0B,OAAO,IAC/B,2CACD;CACD,qBAAqB,OAAO,IAAI,sCAAsC;CACtE,gBAAgB,OAAO,IAAI,iCAAiC;CAC7D"}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import "reflect-metadata";
|
|
2
|
+
import { container as container$1, delay, inject, injectAll, injectable, instanceCachingFactory, instancePerContainerCachingFactory, predicateAwareClassFactory, registry, singleton } from "tsyringe";
|
|
3
|
+
|
|
4
|
+
//#region src/contracts/itemExpr.ts
|
|
5
|
+
function itemExpr(fn) {
|
|
6
|
+
return {
|
|
7
|
+
__codemationItemExpr: "codemation.itemExpr",
|
|
8
|
+
fn
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
function isItemExpr(value) {
|
|
12
|
+
if (typeof value !== "object" || value === null) return false;
|
|
13
|
+
const v = value;
|
|
14
|
+
if (v["__codemationItemExpr"] === "codemation.itemExpr" && typeof v["fn"] === "function") return true;
|
|
15
|
+
for (const sym of Object.getOwnPropertySymbols(v)) if (sym.description === "codemation.itemExpr" && v[sym] === true) return true;
|
|
16
|
+
const keys = Object.keys(v);
|
|
17
|
+
if (keys.length === 1 && keys[0] === "fn" && typeof v.fn === "function") return true;
|
|
18
|
+
return false;
|
|
19
|
+
}
|
|
20
|
+
function containsItemExprInUnknown(value, seen = /* @__PURE__ */ new WeakSet()) {
|
|
21
|
+
if (isItemExpr(value)) return true;
|
|
22
|
+
if (value === null || typeof value !== "object") return false;
|
|
23
|
+
if (seen.has(value)) return false;
|
|
24
|
+
seen.add(value);
|
|
25
|
+
if (Array.isArray(value)) return value.some((entry) => containsItemExprInUnknown(entry, seen));
|
|
26
|
+
for (const entry of Object.values(value)) if (containsItemExprInUnknown(entry, seen)) return true;
|
|
27
|
+
return false;
|
|
28
|
+
}
|
|
29
|
+
async function resolveItemExprsInUnknown(value, args, seen = /* @__PURE__ */ new WeakSet()) {
|
|
30
|
+
if (isItemExpr(value)) return await Promise.resolve(value.fn(args));
|
|
31
|
+
if (value === null || typeof value !== "object") return value;
|
|
32
|
+
if (seen.has(value)) return value;
|
|
33
|
+
seen.add(value);
|
|
34
|
+
if (Array.isArray(value)) {
|
|
35
|
+
const out$1 = [];
|
|
36
|
+
for (let i = 0; i < value.length; i++) out$1.push(await resolveItemExprsInUnknown(value[i], args, seen));
|
|
37
|
+
return out$1;
|
|
38
|
+
}
|
|
39
|
+
const rec = value;
|
|
40
|
+
const entries = Object.entries(rec);
|
|
41
|
+
const proto = Object.getPrototypeOf(value);
|
|
42
|
+
if (proto !== Object.prototype && proto !== null && entries.length === 0) return value;
|
|
43
|
+
const out = Object.create(proto);
|
|
44
|
+
for (const [k, v] of entries) out[k] = await resolveItemExprsInUnknown(v, args, seen);
|
|
45
|
+
return out;
|
|
46
|
+
}
|
|
47
|
+
async function resolveItemExprsForExecution(config, nodeCtx, item, itemIndex, items) {
|
|
48
|
+
const exprArgs = {
|
|
49
|
+
item,
|
|
50
|
+
itemIndex,
|
|
51
|
+
items,
|
|
52
|
+
ctx: {
|
|
53
|
+
runId: nodeCtx.runId,
|
|
54
|
+
workflowId: nodeCtx.workflowId,
|
|
55
|
+
nodeId: nodeCtx.nodeId,
|
|
56
|
+
activationId: nodeCtx.activationId,
|
|
57
|
+
data: nodeCtx.data
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
if (!containsItemExprInUnknown(config)) return;
|
|
61
|
+
return await resolveItemExprsInUnknown(config, exprArgs);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
//#endregion
|
|
65
|
+
//#region src/ai/AgentConfigInspectorFactory.ts
|
|
66
|
+
var AgentConfigInspector = class {
|
|
67
|
+
static isAgentNodeConfig(config) {
|
|
68
|
+
if (!config) return false;
|
|
69
|
+
const candidate = config;
|
|
70
|
+
return !!candidate.chatModel && this.hasCompatibleMessageConfiguration(candidate);
|
|
71
|
+
}
|
|
72
|
+
static hasCompatibleMessageConfiguration(candidate) {
|
|
73
|
+
const messages = candidate.messages;
|
|
74
|
+
if (messages === void 0 || messages === null) return false;
|
|
75
|
+
if (Array.isArray(messages)) return messages.length > 0;
|
|
76
|
+
if (typeof messages === "object") {
|
|
77
|
+
if (isItemExpr(messages)) return true;
|
|
78
|
+
const o = messages;
|
|
79
|
+
return Array.isArray(o.prompt) && o.prompt.length > 0 || typeof o.buildMessages === "function";
|
|
80
|
+
}
|
|
81
|
+
return false;
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
//#endregion
|
|
86
|
+
//#region src/di/CoreTokens.ts
|
|
87
|
+
const CoreTokens = {
|
|
88
|
+
PersistedWorkflowTokenRegistry: Symbol.for("codemation.core.PersistedWorkflowTokenRegistry"),
|
|
89
|
+
CredentialSessionService: Symbol.for("codemation.core.CredentialSessionService"),
|
|
90
|
+
CredentialTypeRegistry: Symbol.for("codemation.core.CredentialTypeRegistry"),
|
|
91
|
+
WorkflowRunnerService: Symbol.for("codemation.core.WorkflowRunnerService"),
|
|
92
|
+
LiveWorkflowRepository: Symbol.for("codemation.core.LiveWorkflowRepository"),
|
|
93
|
+
WorkflowRepository: Symbol.for("codemation.core.WorkflowRepository"),
|
|
94
|
+
NodeResolver: Symbol.for("codemation.core.NodeResolver"),
|
|
95
|
+
WorkflowNodeInstanceFactory: Symbol.for("codemation.core.WorkflowNodeInstanceFactory"),
|
|
96
|
+
RunIdFactory: Symbol.for("codemation.core.RunIdFactory"),
|
|
97
|
+
ActivationIdFactory: Symbol.for("codemation.core.ActivationIdFactory"),
|
|
98
|
+
WorkflowExecutionRepository: Symbol.for("codemation.core.WorkflowExecutionRepository"),
|
|
99
|
+
TriggerSetupStateRepository: Symbol.for("codemation.core.TriggerSetupStateRepository"),
|
|
100
|
+
NodeActivationScheduler: Symbol.for("codemation.core.NodeActivationScheduler"),
|
|
101
|
+
RunDataFactory: Symbol.for("codemation.core.RunDataFactory"),
|
|
102
|
+
ExecutionContextFactory: Symbol.for("codemation.core.ExecutionContextFactory"),
|
|
103
|
+
RunEventBus: Symbol.for("codemation.core.RunEventBus"),
|
|
104
|
+
BinaryStorage: Symbol.for("codemation.core.BinaryStorage"),
|
|
105
|
+
WebhookBasePath: Symbol.for("codemation.core.WebhookBasePath"),
|
|
106
|
+
EngineExecutionLimitsPolicy: Symbol.for("codemation.core.EngineExecutionLimitsPolicy"),
|
|
107
|
+
WorkflowActivationPolicy: Symbol.for("codemation.core.WorkflowActivationPolicy"),
|
|
108
|
+
AgentMcpIntegration: Symbol.for("codemation.core.AgentMcpIntegration"),
|
|
109
|
+
TriggerInvoker: Symbol.for("codemation.core.TriggerInvoker")
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
//#endregion
|
|
113
|
+
export { injectable as a, predicateAwareClassFactory as c, CoreTokens as d, AgentConfigInspector as f, resolveItemExprsInUnknown as g, resolveItemExprsForExecution as h, injectAll as i, registry as l, itemExpr as m, delay as n, instanceCachingFactory as o, isItemExpr as p, inject as r, instancePerContainerCachingFactory as s, container$1 as t, singleton as u };
|
|
114
|
+
//# sourceMappingURL=di-Cjiil7U-.js.map
|