@decaf-ts/as-graph 0.0.0-stage → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +21 -0
- package/README.md +525 -2
- package/assets/i18n/en.json +683 -0
- package/dist/as-graph.cjs +2 -0
- package/dist/as-graph.cjs.map +1 -0
- package/dist/as-graph.js +2 -0
- package/dist/as-graph.js.map +1 -0
- package/lib/cjs/engine/auth/GraphAuth.cjs +130 -0
- package/lib/cjs/engine/auth/GraphAuth.cjs.map +1 -0
- package/lib/cjs/engine/auth/GraphAuthValidator.cjs +79 -0
- package/lib/cjs/engine/auth/GraphAuthValidator.cjs.map +1 -0
- package/lib/cjs/engine/auth/GraphNamespace.cjs +104 -0
- package/lib/cjs/engine/auth/GraphNamespace.cjs.map +1 -0
- package/lib/cjs/engine/auth/index.cjs +25 -0
- package/lib/cjs/engine/auth/index.cjs.map +1 -0
- package/lib/cjs/engine/catalog/GraphBuiltInRegistrations.cjs +57 -0
- package/lib/cjs/engine/catalog/GraphBuiltInRegistrations.cjs.map +1 -0
- package/lib/cjs/engine/catalog/GraphCatalogueErrors.cjs +29 -0
- package/lib/cjs/engine/catalog/GraphCatalogueErrors.cjs.map +1 -0
- package/lib/cjs/engine/catalog/GraphNodeCatalogue.cjs +331 -0
- package/lib/cjs/engine/catalog/GraphNodeCatalogue.cjs.map +1 -0
- package/lib/cjs/engine/catalog/GraphNodeManifestResolver.cjs +192 -0
- package/lib/cjs/engine/catalog/GraphNodeManifestResolver.cjs.map +1 -0
- package/lib/cjs/engine/catalog/GraphNodeMethodRegistry.cjs +64 -0
- package/lib/cjs/engine/catalog/GraphNodeMethodRegistry.cjs.map +1 -0
- package/lib/cjs/engine/catalog/GraphNodeRegistration.cjs +17 -0
- package/lib/cjs/engine/catalog/GraphNodeRegistration.cjs.map +1 -0
- package/lib/cjs/engine/catalog/index.cjs +27 -0
- package/lib/cjs/engine/catalog/index.cjs.map +1 -0
- package/lib/cjs/engine/constants.cjs +78 -0
- package/lib/cjs/engine/constants.cjs.map +1 -0
- package/lib/cjs/engine/decorators.cjs +4 -0
- package/lib/cjs/engine/decorators.cjs.map +1 -0
- package/lib/cjs/engine/errors/GraphBreakSignal.cjs +37 -0
- package/lib/cjs/engine/errors/GraphBreakSignal.cjs.map +1 -0
- package/lib/cjs/engine/errors/GraphCycleError.cjs +20 -0
- package/lib/cjs/engine/errors/GraphCycleError.cjs.map +1 -0
- package/lib/cjs/engine/errors/GraphExecutionError.cjs +28 -0
- package/lib/cjs/engine/errors/GraphExecutionError.cjs.map +1 -0
- package/lib/cjs/engine/errors/GraphInputError.cjs +20 -0
- package/lib/cjs/engine/errors/GraphInputError.cjs.map +1 -0
- package/lib/cjs/engine/errors/GraphLoopLimitError.cjs +20 -0
- package/lib/cjs/engine/errors/GraphLoopLimitError.cjs.map +1 -0
- package/lib/cjs/engine/errors/GraphPinningError.cjs +20 -0
- package/lib/cjs/engine/errors/GraphPinningError.cjs.map +1 -0
- package/lib/cjs/engine/errors/GraphPortError.cjs +20 -0
- package/lib/cjs/engine/errors/GraphPortError.cjs.map +1 -0
- package/lib/cjs/engine/errors/GraphRunCancelledError.cjs +18 -0
- package/lib/cjs/engine/errors/GraphRunCancelledError.cjs.map +1 -0
- package/lib/cjs/engine/errors/GraphStoreError.cjs +20 -0
- package/lib/cjs/engine/errors/GraphStoreError.cjs.map +1 -0
- package/lib/cjs/engine/errors/GraphTopologyError.cjs +20 -0
- package/lib/cjs/engine/errors/GraphTopologyError.cjs.map +1 -0
- package/lib/cjs/engine/errors/GraphWorkflowErrors.cjs +23 -0
- package/lib/cjs/engine/errors/GraphWorkflowErrors.cjs.map +1 -0
- package/lib/cjs/engine/errors/index.cjs +33 -0
- package/lib/cjs/engine/errors/index.cjs.map +1 -0
- package/lib/cjs/engine/events/GraphExecutionEventEmitter.cjs +40 -0
- package/lib/cjs/engine/events/GraphExecutionEventEmitter.cjs.map +1 -0
- package/lib/cjs/engine/events/GraphExecutionEventFactory.cjs +45 -0
- package/lib/cjs/engine/events/GraphExecutionEventFactory.cjs.map +1 -0
- package/lib/cjs/engine/events/GraphExecutionObserver.cjs +4 -0
- package/lib/cjs/engine/events/GraphExecutionObserver.cjs.map +1 -0
- package/lib/cjs/engine/events/index.cjs +26 -0
- package/lib/cjs/engine/events/index.cjs.map +1 -0
- package/lib/cjs/engine/execution/CodeSandboxEvaluator.cjs +4 -0
- package/lib/cjs/engine/execution/CodeSandboxEvaluator.cjs.map +1 -0
- package/lib/cjs/engine/execution/GraphExecutionContext.cjs +159 -0
- package/lib/cjs/engine/execution/GraphExecutionContext.cjs.map +1 -0
- package/lib/cjs/engine/execution/GraphExecutionEngine.cjs +1042 -0
- package/lib/cjs/engine/execution/GraphExecutionEngine.cjs.map +1 -0
- package/lib/cjs/engine/execution/GraphExecutionFrame.cjs +50 -0
- package/lib/cjs/engine/execution/GraphExecutionFrame.cjs.map +1 -0
- package/lib/cjs/engine/execution/GraphExecutionResult.cjs +30 -0
- package/lib/cjs/engine/execution/GraphExecutionResult.cjs.map +1 -0
- package/lib/cjs/engine/execution/GraphNodeExecutor.cjs +4 -0
- package/lib/cjs/engine/execution/GraphNodeExecutor.cjs.map +1 -0
- package/lib/cjs/engine/execution/IsolatedVmCodeSandboxEvaluator.cjs +574 -0
- package/lib/cjs/engine/execution/IsolatedVmCodeSandboxEvaluator.cjs.map +1 -0
- package/lib/cjs/engine/execution/index.cjs +30 -0
- package/lib/cjs/engine/execution/index.cjs.map +1 -0
- package/lib/cjs/engine/index.cjs +85 -0
- package/lib/cjs/engine/index.cjs.map +1 -0
- package/lib/cjs/engine/loops/ConditionEvaluator.cjs +116 -0
- package/lib/cjs/engine/loops/ConditionEvaluator.cjs.map +1 -0
- package/lib/cjs/engine/loops/ConditionExpressionEvaluator.cjs +87 -0
- package/lib/cjs/engine/loops/ConditionExpressionEvaluator.cjs.map +1 -0
- package/lib/cjs/engine/loops/GraphConditionEvaluator.cjs +110 -0
- package/lib/cjs/engine/loops/GraphConditionEvaluator.cjs.map +1 -0
- package/lib/cjs/engine/loops/GraphLoopExecutionContext.cjs +16 -0
- package/lib/cjs/engine/loops/GraphLoopExecutionContext.cjs.map +1 -0
- package/lib/cjs/engine/loops/index.cjs +27 -0
- package/lib/cjs/engine/loops/index.cjs.map +1 -0
- package/lib/cjs/engine/pinning/GraphPinningDependencyResolver.cjs +28 -0
- package/lib/cjs/engine/pinning/GraphPinningDependencyResolver.cjs.map +1 -0
- package/lib/cjs/engine/pinning/GraphPinningMetadata.cjs +20 -0
- package/lib/cjs/engine/pinning/GraphPinningMetadata.cjs.map +1 -0
- package/lib/cjs/engine/pinning/GraphPinningPolicy.cjs +34 -0
- package/lib/cjs/engine/pinning/GraphPinningPolicy.cjs.map +1 -0
- package/lib/cjs/engine/pinning/GraphPinningService.cjs +220 -0
- package/lib/cjs/engine/pinning/GraphPinningService.cjs.map +1 -0
- package/lib/cjs/engine/pinning/index.cjs +27 -0
- package/lib/cjs/engine/pinning/index.cjs.map +1 -0
- package/lib/cjs/engine/planning/GraphExecutionPlan.cjs +4 -0
- package/lib/cjs/engine/planning/GraphExecutionPlan.cjs.map +1 -0
- package/lib/cjs/engine/planning/GraphExecutionPlanEdge.cjs +4 -0
- package/lib/cjs/engine/planning/GraphExecutionPlanEdge.cjs.map +1 -0
- package/lib/cjs/engine/planning/GraphExecutionPlanLayer.cjs +4 -0
- package/lib/cjs/engine/planning/GraphExecutionPlanLayer.cjs.map +1 -0
- package/lib/cjs/engine/planning/GraphExecutionPlanNode.cjs +4 -0
- package/lib/cjs/engine/planning/GraphExecutionPlanNode.cjs.map +1 -0
- package/lib/cjs/engine/planning/GraphExecutionPlanner.cjs +212 -0
- package/lib/cjs/engine/planning/GraphExecutionPlanner.cjs.map +1 -0
- package/lib/cjs/engine/planning/GraphTopology.cjs +57 -0
- package/lib/cjs/engine/planning/GraphTopology.cjs.map +1 -0
- package/lib/cjs/engine/planning/index.cjs +29 -0
- package/lib/cjs/engine/planning/index.cjs.map +1 -0
- package/lib/cjs/engine/registry/GraphNodeExecutorRegistry.cjs +100 -0
- package/lib/cjs/engine/registry/GraphNodeExecutorRegistry.cjs.map +1 -0
- package/lib/cjs/engine/registry/GraphNodeExecutorResolver.cjs +59 -0
- package/lib/cjs/engine/registry/GraphNodeExecutorResolver.cjs.map +1 -0
- package/lib/cjs/engine/registry/index.cjs +25 -0
- package/lib/cjs/engine/registry/index.cjs.map +1 -0
- package/lib/cjs/engine/runs/GraphRunConverters.cjs +58 -0
- package/lib/cjs/engine/runs/GraphRunConverters.cjs.map +1 -0
- package/lib/cjs/engine/runs/GraphRunEventPublisher.cjs +69 -0
- package/lib/cjs/engine/runs/GraphRunEventPublisher.cjs.map +1 -0
- package/lib/cjs/engine/runs/GraphRunExecutor.cjs +291 -0
- package/lib/cjs/engine/runs/GraphRunExecutor.cjs.map +1 -0
- package/lib/cjs/engine/runs/GraphRunFingerprint.cjs +29 -0
- package/lib/cjs/engine/runs/GraphRunFingerprint.cjs.map +1 -0
- package/lib/cjs/engine/runs/GraphRunService.cjs +329 -0
- package/lib/cjs/engine/runs/GraphRunService.cjs.map +1 -0
- package/lib/cjs/engine/runs/InMemoryGraphRunEventStore.cjs +69 -0
- package/lib/cjs/engine/runs/InMemoryGraphRunEventStore.cjs.map +1 -0
- package/lib/cjs/engine/runs/InMemoryGraphRunStore.cjs +59 -0
- package/lib/cjs/engine/runs/InMemoryGraphRunStore.cjs.map +1 -0
- package/lib/cjs/engine/runs/index.cjs +29 -0
- package/lib/cjs/engine/runs/index.cjs.map +1 -0
- package/lib/cjs/engine/runs/ownership.cjs +123 -0
- package/lib/cjs/engine/runs/ownership.cjs.map +1 -0
- package/lib/cjs/engine/runs/types.cjs +4 -0
- package/lib/cjs/engine/runs/types.cjs.map +1 -0
- package/lib/cjs/engine/services/GraphEnvironment.cjs +32 -0
- package/lib/cjs/engine/services/GraphEnvironment.cjs.map +1 -0
- package/lib/cjs/engine/services/GraphRunModelService.cjs +111 -0
- package/lib/cjs/engine/services/GraphRunModelService.cjs.map +1 -0
- package/lib/cjs/engine/services/GraphWorkflowService.cjs +408 -0
- package/lib/cjs/engine/services/GraphWorkflowService.cjs.map +1 -0
- package/lib/cjs/engine/snapshots/GraphExecutionSnapshotMapper.cjs +53 -0
- package/lib/cjs/engine/snapshots/GraphExecutionSnapshotMapper.cjs.map +1 -0
- package/lib/cjs/engine/snapshots/index.cjs +24 -0
- package/lib/cjs/engine/snapshots/index.cjs.map +1 -0
- package/lib/cjs/engine/store/GraphCachedValue.cjs +4 -0
- package/lib/cjs/engine/store/GraphCachedValue.cjs.map +1 -0
- package/lib/cjs/engine/store/GraphValueKey.cjs +4 -0
- package/lib/cjs/engine/store/GraphValueKey.cjs.map +1 -0
- package/lib/cjs/engine/store/GraphValueModel.cjs +96 -0
- package/lib/cjs/engine/store/GraphValueModel.cjs.map +1 -0
- package/lib/cjs/engine/store/GraphValueRepository.cjs +244 -0
- package/lib/cjs/engine/store/GraphValueRepository.cjs.map +1 -0
- package/lib/cjs/engine/store/index.cjs +28 -0
- package/lib/cjs/engine/store/index.cjs.map +1 -0
- package/lib/cjs/engine/types.cjs +4 -0
- package/lib/cjs/engine/types.cjs.map +1 -0
- package/lib/cjs/engine/validation/GraphConnectionPolicyValidator.cjs +142 -0
- package/lib/cjs/engine/validation/GraphConnectionPolicyValidator.cjs.map +1 -0
- package/lib/cjs/engine/validation/GraphCredentialReferenceValidator.cjs +160 -0
- package/lib/cjs/engine/validation/GraphCredentialReferenceValidator.cjs.map +1 -0
- package/lib/cjs/engine/validation/GraphEdgeInstanceValidator.cjs +166 -0
- package/lib/cjs/engine/validation/GraphEdgeInstanceValidator.cjs.map +1 -0
- package/lib/cjs/engine/validation/GraphLooseNodeValidation.cjs +36 -0
- package/lib/cjs/engine/validation/GraphLooseNodeValidation.cjs.map +1 -0
- package/lib/cjs/engine/validation/GraphNodeInstanceValidator.cjs +86 -0
- package/lib/cjs/engine/validation/GraphNodeInstanceValidator.cjs.map +1 -0
- package/lib/cjs/engine/validation/GraphParameterValidator.cjs +465 -0
- package/lib/cjs/engine/validation/GraphParameterValidator.cjs.map +1 -0
- package/lib/cjs/engine/validation/GraphPortSchemaResolver.cjs +58 -0
- package/lib/cjs/engine/validation/GraphPortSchemaResolver.cjs.map +1 -0
- package/lib/cjs/engine/validation/GraphResolvedWorkflow.cjs +4 -0
- package/lib/cjs/engine/validation/GraphResolvedWorkflow.cjs.map +1 -0
- package/lib/cjs/engine/validation/GraphValidationErrors.cjs +50 -0
- package/lib/cjs/engine/validation/GraphValidationErrors.cjs.map +1 -0
- package/lib/cjs/engine/validation/GraphValidationIssue.cjs +4 -0
- package/lib/cjs/engine/validation/GraphValidationIssue.cjs.map +1 -0
- package/lib/cjs/engine/validation/GraphValueValidator.cjs +52 -0
- package/lib/cjs/engine/validation/GraphValueValidator.cjs.map +1 -0
- package/lib/cjs/engine/validation/GraphWorkflowBoundaryValidation.cjs +171 -0
- package/lib/cjs/engine/validation/GraphWorkflowBoundaryValidation.cjs.map +1 -0
- package/lib/cjs/engine/validation/GraphWorkflowDocumentLimits.cjs +12 -0
- package/lib/cjs/engine/validation/GraphWorkflowDocumentLimits.cjs.map +1 -0
- package/lib/cjs/engine/validation/GraphWorkflowDocumentValidator.cjs +518 -0
- package/lib/cjs/engine/validation/GraphWorkflowDocumentValidator.cjs.map +1 -0
- package/lib/cjs/engine/validation/index.cjs +39 -0
- package/lib/cjs/engine/validation/index.cjs.map +1 -0
- package/lib/cjs/index.cjs +31 -0
- package/lib/cjs/index.cjs.map +1 -0
- package/lib/cjs/log/GraphRunLogger.cjs +184 -0
- package/lib/cjs/log/GraphRunLogger.cjs.map +1 -0
- package/lib/cjs/log/LogParameters.cjs +115 -0
- package/lib/cjs/log/LogParameters.cjs.map +1 -0
- package/lib/cjs/nest/graph/GraphExecutionModule.cjs +295 -0
- package/lib/cjs/nest/graph/GraphExecutionModule.cjs.map +1 -0
- package/lib/cjs/nest/graph/GraphExecutorRegistryFactory.cjs +113 -0
- package/lib/cjs/nest/graph/GraphExecutorRegistryFactory.cjs.map +1 -0
- package/lib/cjs/nest/graph/GraphNodeCatalogueController.cjs +288 -0
- package/lib/cjs/nest/graph/GraphNodeCatalogueController.cjs.map +1 -0
- package/lib/cjs/nest/graph/GraphRunController.cjs +487 -0
- package/lib/cjs/nest/graph/GraphRunController.cjs.map +1 -0
- package/lib/cjs/nest/graph/GraphWorkflowController.cjs +271 -0
- package/lib/cjs/nest/graph/GraphWorkflowController.cjs.map +1 -0
- package/lib/cjs/nest/graph/index.cjs +30 -0
- package/lib/cjs/nest/graph/index.cjs.map +1 -0
- package/lib/cjs/nest/graph/servingDates.cjs +53 -0
- package/lib/cjs/nest/graph/servingDates.cjs.map +1 -0
- package/lib/cjs/nest/graph/servingErrors.cjs +65 -0
- package/lib/cjs/nest/graph/servingErrors.cjs.map +1 -0
- package/lib/cjs/nest/index.cjs +28 -0
- package/lib/cjs/nest/index.cjs.map +1 -0
- package/lib/cjs/node/agents/agent/node.cjs +121 -0
- package/lib/cjs/node/agents/agent/node.cjs.map +1 -0
- package/lib/cjs/node/base.cjs +138 -0
- package/lib/cjs/node/base.cjs.map +1 -0
- package/lib/cjs/node/boundary/input/node.cjs +70 -0
- package/lib/cjs/node/boundary/input/node.cjs.map +1 -0
- package/lib/cjs/node/boundary/output/node.cjs +73 -0
- package/lib/cjs/node/boundary/output/node.cjs.map +1 -0
- package/lib/cjs/node/flow/break/node.cjs +80 -0
- package/lib/cjs/node/flow/break/node.cjs.map +1 -0
- package/lib/cjs/node/flow/error-boundary/node.cjs +143 -0
- package/lib/cjs/node/flow/error-boundary/node.cjs.map +1 -0
- package/lib/cjs/node/flow/human-approval/node.cjs +94 -0
- package/lib/cjs/node/flow/human-approval/node.cjs.map +1 -0
- package/lib/cjs/node/flow/if/node.cjs +148 -0
- package/lib/cjs/node/flow/if/node.cjs.map +1 -0
- package/lib/cjs/node/flow/loop/foreach/node.cjs +247 -0
- package/lib/cjs/node/flow/loop/foreach/node.cjs.map +1 -0
- package/lib/cjs/node/flow/loop/loop-metadata.cjs +83 -0
- package/lib/cjs/node/flow/loop/loop-metadata.cjs.map +1 -0
- package/lib/cjs/node/flow/loop/until/node.cjs +198 -0
- package/lib/cjs/node/flow/loop/until/node.cjs.map +1 -0
- package/lib/cjs/node/flow/loop/while/node.cjs +197 -0
- package/lib/cjs/node/flow/loop/while/node.cjs.map +1 -0
- package/lib/cjs/node/flow/switch/node.cjs +221 -0
- package/lib/cjs/node/flow/switch/node.cjs.map +1 -0
- package/lib/cjs/node/index.cjs +158 -0
- package/lib/cjs/node/index.cjs.map +1 -0
- package/lib/cjs/node/manifests.cjs +260 -0
- package/lib/cjs/node/manifests.cjs.map +1 -0
- package/lib/cjs/node/triggers/chat/node.cjs +82 -0
- package/lib/cjs/node/triggers/chat/node.cjs.map +1 -0
- package/lib/cjs/node/triggers/event/node.cjs +67 -0
- package/lib/cjs/node/triggers/event/node.cjs.map +1 -0
- package/lib/cjs/node/triggers/form/node.cjs +80 -0
- package/lib/cjs/node/triggers/form/node.cjs.map +1 -0
- package/lib/cjs/node/triggers/manual/node.cjs +71 -0
- package/lib/cjs/node/triggers/manual/node.cjs.map +1 -0
- package/lib/cjs/node/triggers/schedule/node.cjs +80 -0
- package/lib/cjs/node/triggers/schedule/node.cjs.map +1 -0
- package/lib/cjs/node/triggers/webhook/node.cjs +84 -0
- package/lib/cjs/node/triggers/webhook/node.cjs.map +1 -0
- package/lib/cjs/node/utility/code/node.cjs +223 -0
- package/lib/cjs/node/utility/code/node.cjs.map +1 -0
- package/lib/cjs/node/utility/delay/node.cjs +81 -0
- package/lib/cjs/node/utility/delay/node.cjs.map +1 -0
- package/lib/cjs/node/utility/log/node.cjs +98 -0
- package/lib/cjs/node/utility/log/node.cjs.map +1 -0
- package/lib/cjs/node/utility/map/node.cjs +75 -0
- package/lib/cjs/node/utility/map/node.cjs.map +1 -0
- package/lib/cjs/node/utility/utility-log/node.cjs +96 -0
- package/lib/cjs/node/utility/utility-log/node.cjs.map +1 -0
- package/lib/cjs/ram/GraphRunEventModel.cjs +134 -0
- package/lib/cjs/ram/GraphRunEventModel.cjs.map +1 -0
- package/lib/cjs/ram/GraphRunEventStore.cjs +141 -0
- package/lib/cjs/ram/GraphRunEventStore.cjs.map +1 -0
- package/lib/cjs/ram/GraphRunStore.cjs +112 -0
- package/lib/cjs/ram/GraphRunStore.cjs.map +1 -0
- package/lib/cjs/ram/index.cjs +57 -0
- package/lib/cjs/ram/index.cjs.map +1 -0
- package/lib/cjs/shared/graph/GraphExecutionStateMapper.cjs +97 -0
- package/lib/cjs/shared/graph/GraphExecutionStateMapper.cjs.map +1 -0
- package/lib/cjs/shared/graph/GraphResolution.cjs +21 -0
- package/lib/cjs/shared/graph/GraphResolution.cjs.map +1 -0
- package/lib/cjs/shared/graph/GraphRunModel.cjs +140 -0
- package/lib/cjs/shared/graph/GraphRunModel.cjs.map +1 -0
- package/lib/cjs/shared/graph/GraphWorkflowModel.cjs +66 -0
- package/lib/cjs/shared/graph/GraphWorkflowModel.cjs.map +1 -0
- package/lib/cjs/shared/graph/auth.cjs +106 -0
- package/lib/cjs/shared/graph/auth.cjs.map +1 -0
- package/lib/cjs/shared/graph/catalog/GraphConnectionPolicy.cjs +24 -0
- package/lib/cjs/shared/graph/catalog/GraphConnectionPolicy.cjs.map +1 -0
- package/lib/cjs/shared/graph/catalog/GraphCredentialReference.cjs +19 -0
- package/lib/cjs/shared/graph/catalog/GraphCredentialReference.cjs.map +1 -0
- package/lib/cjs/shared/graph/catalog/GraphCredentialRequirement.cjs +20 -0
- package/lib/cjs/shared/graph/catalog/GraphCredentialRequirement.cjs.map +1 -0
- package/lib/cjs/shared/graph/catalog/GraphDynamicPortRule.cjs +42 -0
- package/lib/cjs/shared/graph/catalog/GraphDynamicPortRule.cjs.map +1 -0
- package/lib/cjs/shared/graph/catalog/GraphIconReference.cjs +26 -0
- package/lib/cjs/shared/graph/catalog/GraphIconReference.cjs.map +1 -0
- package/lib/cjs/shared/graph/catalog/GraphManifestCompiler.cjs +390 -0
- package/lib/cjs/shared/graph/catalog/GraphManifestCompiler.cjs.map +1 -0
- package/lib/cjs/shared/graph/catalog/GraphNodeCapability.cjs +34 -0
- package/lib/cjs/shared/graph/catalog/GraphNodeCapability.cjs.map +1 -0
- package/lib/cjs/shared/graph/catalog/GraphNodeDisplayManifest.cjs +15 -0
- package/lib/cjs/shared/graph/catalog/GraphNodeDisplayManifest.cjs.map +1 -0
- package/lib/cjs/shared/graph/catalog/GraphNodeManifest.cjs +33 -0
- package/lib/cjs/shared/graph/catalog/GraphNodeManifest.cjs.map +1 -0
- package/lib/cjs/shared/graph/catalog/GraphNodeManifestSerialization.cjs +65 -0
- package/lib/cjs/shared/graph/catalog/GraphNodeManifestSerialization.cjs.map +1 -0
- package/lib/cjs/shared/graph/catalog/GraphNodeMethodManifest.cjs +40 -0
- package/lib/cjs/shared/graph/catalog/GraphNodeMethodManifest.cjs.map +1 -0
- package/lib/cjs/shared/graph/catalog/GraphNodePolicyManifest.cjs +18 -0
- package/lib/cjs/shared/graph/catalog/GraphNodePolicyManifest.cjs.map +1 -0
- package/lib/cjs/shared/graph/catalog/GraphParameterBase.cjs +4 -0
- package/lib/cjs/shared/graph/catalog/GraphParameterBase.cjs.map +1 -0
- package/lib/cjs/shared/graph/catalog/GraphParameterDefinition.cjs +40 -0
- package/lib/cjs/shared/graph/catalog/GraphParameterDefinition.cjs.map +1 -0
- package/lib/cjs/shared/graph/catalog/GraphParameterOption.cjs +26 -0
- package/lib/cjs/shared/graph/catalog/GraphParameterOption.cjs.map +1 -0
- package/lib/cjs/shared/graph/catalog/GraphParameterValidation.cjs +72 -0
- package/lib/cjs/shared/graph/catalog/GraphParameterValidation.cjs.map +1 -0
- package/lib/cjs/shared/graph/catalog/GraphPortManifest.cjs +32 -0
- package/lib/cjs/shared/graph/catalog/GraphPortManifest.cjs.map +1 -0
- package/lib/cjs/shared/graph/catalog/GraphPortManifestElement.cjs +19 -0
- package/lib/cjs/shared/graph/catalog/GraphPortManifestElement.cjs.map +1 -0
- package/lib/cjs/shared/graph/catalog/GraphResourceLocatorMode.cjs +30 -0
- package/lib/cjs/shared/graph/catalog/GraphResourceLocatorMode.cjs.map +1 -0
- package/lib/cjs/shared/graph/catalog/GraphValueSchema.cjs +36 -0
- package/lib/cjs/shared/graph/catalog/GraphValueSchema.cjs.map +1 -0
- package/lib/cjs/shared/graph/catalog/GraphValueSchemaDerivation.cjs +186 -0
- package/lib/cjs/shared/graph/catalog/GraphValueSchemaDerivation.cjs.map +1 -0
- package/lib/cjs/shared/graph/catalog/GraphVisibilityExpression.cjs +70 -0
- package/lib/cjs/shared/graph/catalog/GraphVisibilityExpression.cjs.map +1 -0
- package/lib/cjs/shared/graph/catalog/index.cjs +43 -0
- package/lib/cjs/shared/graph/catalog/index.cjs.map +1 -0
- package/lib/cjs/shared/graph/category-styles.cjs +38 -0
- package/lib/cjs/shared/graph/category-styles.cjs.map +1 -0
- package/lib/cjs/shared/graph/constants.cjs +333 -0
- package/lib/cjs/shared/graph/constants.cjs.map +1 -0
- package/lib/cjs/shared/graph/decorators.cjs +205 -0
- package/lib/cjs/shared/graph/decorators.cjs.map +1 -0
- package/lib/cjs/shared/graph/document/GraphDecoratedWorkflowCompiler.cjs +407 -0
- package/lib/cjs/shared/graph/document/GraphDecoratedWorkflowCompiler.cjs.map +1 -0
- package/lib/cjs/shared/graph/document/GraphEdgeInstance.cjs +4 -0
- package/lib/cjs/shared/graph/document/GraphEdgeInstance.cjs.map +1 -0
- package/lib/cjs/shared/graph/document/GraphEndpoint.cjs +39 -0
- package/lib/cjs/shared/graph/document/GraphEndpoint.cjs.map +1 -0
- package/lib/cjs/shared/graph/document/GraphErrorBoundaryConfiguration.cjs +4 -0
- package/lib/cjs/shared/graph/document/GraphErrorBoundaryConfiguration.cjs.map +1 -0
- package/lib/cjs/shared/graph/document/GraphFlowBuilder.cjs +771 -0
- package/lib/cjs/shared/graph/document/GraphFlowBuilder.cjs.map +1 -0
- package/lib/cjs/shared/graph/document/GraphJsonValue.cjs +103 -0
- package/lib/cjs/shared/graph/document/GraphJsonValue.cjs.map +1 -0
- package/lib/cjs/shared/graph/document/GraphLoopConfiguration.cjs +4 -0
- package/lib/cjs/shared/graph/document/GraphLoopConfiguration.cjs.map +1 -0
- package/lib/cjs/shared/graph/document/GraphNodeBinding.cjs +35 -0
- package/lib/cjs/shared/graph/document/GraphNodeBinding.cjs.map +1 -0
- package/lib/cjs/shared/graph/document/GraphNodeDerivation.cjs +153 -0
- package/lib/cjs/shared/graph/document/GraphNodeDerivation.cjs.map +1 -0
- package/lib/cjs/shared/graph/document/GraphNodeInstance.cjs +4 -0
- package/lib/cjs/shared/graph/document/GraphNodeInstance.cjs.map +1 -0
- package/lib/cjs/shared/graph/document/GraphValueTemplate.cjs +97 -0
- package/lib/cjs/shared/graph/document/GraphValueTemplate.cjs.map +1 -0
- package/lib/cjs/shared/graph/document/GraphWorkflowDocument.cjs +27 -0
- package/lib/cjs/shared/graph/document/GraphWorkflowDocument.cjs.map +1 -0
- package/lib/cjs/shared/graph/document/GraphWorkflowDocumentBuilder.cjs +439 -0
- package/lib/cjs/shared/graph/document/GraphWorkflowDocumentBuilder.cjs.map +1 -0
- package/lib/cjs/shared/graph/document/GraphWorkflowDocumentReader.cjs +119 -0
- package/lib/cjs/shared/graph/document/GraphWorkflowDocumentReader.cjs.map +1 -0
- package/lib/cjs/shared/graph/document/GraphWorkflowDocumentSerializer.cjs +82 -0
- package/lib/cjs/shared/graph/document/GraphWorkflowDocumentSerializer.cjs.map +1 -0
- package/lib/cjs/shared/graph/document/GraphWorkflowUiState.cjs +4 -0
- package/lib/cjs/shared/graph/document/GraphWorkflowUiState.cjs.map +1 -0
- package/lib/cjs/shared/graph/document/index.cjs +37 -0
- package/lib/cjs/shared/graph/document/index.cjs.map +1 -0
- package/lib/cjs/shared/graph/index.cjs +39 -0
- package/lib/cjs/shared/graph/index.cjs.map +1 -0
- package/lib/cjs/shared/graph/overrides/Metadata.cjs +23 -0
- package/lib/cjs/shared/graph/overrides/Metadata.cjs.map +1 -0
- package/lib/cjs/shared/graph/overrides/Rendering.cjs +4 -0
- package/lib/cjs/shared/graph/overrides/Rendering.cjs.map +1 -0
- package/lib/cjs/shared/graph/overrides/index.cjs +24 -0
- package/lib/cjs/shared/graph/overrides/index.cjs.map +1 -0
- package/lib/cjs/shared/graph/overrides/overrides.cjs +20 -0
- package/lib/cjs/shared/graph/overrides/overrides.cjs.map +1 -0
- package/lib/cjs/shared/graph/reader.cjs +392 -0
- package/lib/cjs/shared/graph/reader.cjs.map +1 -0
- package/lib/cjs/shared/graph/registry.cjs +67 -0
- package/lib/cjs/shared/graph/registry.cjs.map +1 -0
- package/lib/cjs/shared/graph/snapshot.cjs +4 -0
- package/lib/cjs/shared/graph/snapshot.cjs.map +1 -0
- package/lib/cjs/shared/graph/types.cjs +7 -0
- package/lib/cjs/shared/graph/types.cjs.map +1 -0
- package/lib/cjs/shared/index.cjs +30 -0
- package/lib/cjs/shared/index.cjs.map +1 -0
- package/lib/cjs/shared/ui/GraphNodeView.cjs +114 -0
- package/lib/cjs/shared/ui/GraphNodeView.cjs.map +1 -0
- package/lib/cjs/shared/ui/GraphRunView.cjs +96 -0
- package/lib/cjs/shared/ui/GraphRunView.cjs.map +1 -0
- package/lib/cjs/shared/ui/GraphWorkflowView.cjs +78 -0
- package/lib/cjs/shared/ui/GraphWorkflowView.cjs.map +1 -0
- package/lib/cjs/shared/ui/constants.cjs +73 -0
- package/lib/cjs/shared/ui/constants.cjs.map +1 -0
- package/lib/cjs/shared/ui/index.cjs +32 -0
- package/lib/cjs/shared/ui/index.cjs.map +1 -0
- package/lib/cjs/shared/ui/types.cjs +4 -0
- package/lib/cjs/shared/ui/types.cjs.map +1 -0
- package/lib/esm/engine/auth/GraphAuth.js +123 -0
- package/lib/esm/engine/auth/GraphAuth.js.map +1 -0
- package/lib/esm/engine/auth/GraphAuthValidator.js +74 -0
- package/lib/esm/engine/auth/GraphAuthValidator.js.map +1 -0
- package/lib/esm/engine/auth/GraphNamespace.js +93 -0
- package/lib/esm/engine/auth/GraphNamespace.js.map +1 -0
- package/lib/esm/engine/auth/index.js +8 -0
- package/lib/esm/engine/auth/index.js.map +1 -0
- package/lib/esm/engine/catalog/GraphBuiltInRegistrations.js +52 -0
- package/lib/esm/engine/catalog/GraphBuiltInRegistrations.js.map +1 -0
- package/lib/esm/engine/catalog/GraphCatalogueErrors.js +22 -0
- package/lib/esm/engine/catalog/GraphCatalogueErrors.js.map +1 -0
- package/lib/esm/engine/catalog/GraphNodeCatalogue.js +322 -0
- package/lib/esm/engine/catalog/GraphNodeCatalogue.js.map +1 -0
- package/lib/esm/engine/catalog/GraphNodeManifestResolver.js +185 -0
- package/lib/esm/engine/catalog/GraphNodeManifestResolver.js.map +1 -0
- package/lib/esm/engine/catalog/GraphNodeMethodRegistry.js +59 -0
- package/lib/esm/engine/catalog/GraphNodeMethodRegistry.js.map +1 -0
- package/lib/esm/engine/catalog/GraphNodeRegistration.js +12 -0
- package/lib/esm/engine/catalog/GraphNodeRegistration.js.map +1 -0
- package/lib/esm/engine/catalog/index.js +10 -0
- package/lib/esm/engine/catalog/index.js.map +1 -0
- package/lib/esm/engine/constants.js +82 -0
- package/lib/esm/engine/constants.js.map +1 -0
- package/lib/esm/engine/decorators.js +2 -0
- package/lib/esm/engine/decorators.js.map +1 -0
- package/lib/esm/engine/errors/GraphBreakSignal.js +32 -0
- package/lib/esm/engine/errors/GraphBreakSignal.js.map +1 -0
- package/lib/esm/engine/errors/GraphCycleError.js +15 -0
- package/lib/esm/engine/errors/GraphCycleError.js.map +1 -0
- package/lib/esm/engine/errors/GraphExecutionError.js +23 -0
- package/lib/esm/engine/errors/GraphExecutionError.js.map +1 -0
- package/lib/esm/engine/errors/GraphInputError.js +15 -0
- package/lib/esm/engine/errors/GraphInputError.js.map +1 -0
- package/lib/esm/engine/errors/GraphLoopLimitError.js +15 -0
- package/lib/esm/engine/errors/GraphLoopLimitError.js.map +1 -0
- package/lib/esm/engine/errors/GraphPinningError.js +15 -0
- package/lib/esm/engine/errors/GraphPinningError.js.map +1 -0
- package/lib/esm/engine/errors/GraphPortError.js +15 -0
- package/lib/esm/engine/errors/GraphPortError.js.map +1 -0
- package/lib/esm/engine/errors/GraphRunCancelledError.js +13 -0
- package/lib/esm/engine/errors/GraphRunCancelledError.js.map +1 -0
- package/lib/esm/engine/errors/GraphStoreError.js +15 -0
- package/lib/esm/engine/errors/GraphStoreError.js.map +1 -0
- package/lib/esm/engine/errors/GraphTopologyError.js +15 -0
- package/lib/esm/engine/errors/GraphTopologyError.js.map +1 -0
- package/lib/esm/engine/errors/GraphWorkflowErrors.js +18 -0
- package/lib/esm/engine/errors/GraphWorkflowErrors.js.map +1 -0
- package/lib/esm/engine/errors/index.js +16 -0
- package/lib/esm/engine/errors/index.js.map +1 -0
- package/lib/esm/engine/events/GraphExecutionEventEmitter.js +35 -0
- package/lib/esm/engine/events/GraphExecutionEventEmitter.js.map +1 -0
- package/lib/esm/engine/events/GraphExecutionEventFactory.js +40 -0
- package/lib/esm/engine/events/GraphExecutionEventFactory.js.map +1 -0
- package/lib/esm/engine/events/GraphExecutionObserver.js +2 -0
- package/lib/esm/engine/events/GraphExecutionObserver.js.map +1 -0
- package/lib/esm/engine/events/index.js +9 -0
- package/lib/esm/engine/events/index.js.map +1 -0
- package/lib/esm/engine/execution/CodeSandboxEvaluator.js +18 -0
- package/lib/esm/engine/execution/CodeSandboxEvaluator.js.map +1 -0
- package/lib/esm/engine/execution/GraphExecutionContext.js +154 -0
- package/lib/esm/engine/execution/GraphExecutionContext.js.map +1 -0
- package/lib/esm/engine/execution/GraphExecutionEngine.js +1037 -0
- package/lib/esm/engine/execution/GraphExecutionEngine.js.map +1 -0
- package/lib/esm/engine/execution/GraphExecutionFrame.js +45 -0
- package/lib/esm/engine/execution/GraphExecutionFrame.js.map +1 -0
- package/lib/esm/engine/execution/GraphExecutionResult.js +26 -0
- package/lib/esm/engine/execution/GraphExecutionResult.js.map +1 -0
- package/lib/esm/engine/execution/GraphNodeExecutor.js +2 -0
- package/lib/esm/engine/execution/GraphNodeExecutor.js.map +1 -0
- package/lib/esm/engine/execution/IsolatedVmCodeSandboxEvaluator.js +533 -0
- package/lib/esm/engine/execution/IsolatedVmCodeSandboxEvaluator.js.map +1 -0
- package/lib/esm/engine/execution/index.js +13 -0
- package/lib/esm/engine/execution/index.js.map +1 -0
- package/lib/esm/engine/index.js +68 -0
- package/lib/esm/engine/index.js.map +1 -0
- package/lib/esm/engine/loops/ConditionEvaluator.js +108 -0
- package/lib/esm/engine/loops/ConditionEvaluator.js.map +1 -0
- package/lib/esm/engine/loops/ConditionExpressionEvaluator.js +82 -0
- package/lib/esm/engine/loops/ConditionExpressionEvaluator.js.map +1 -0
- package/lib/esm/engine/loops/GraphConditionEvaluator.js +105 -0
- package/lib/esm/engine/loops/GraphConditionEvaluator.js.map +1 -0
- package/lib/esm/engine/loops/GraphLoopExecutionContext.js +11 -0
- package/lib/esm/engine/loops/GraphLoopExecutionContext.js.map +1 -0
- package/lib/esm/engine/loops/index.js +10 -0
- package/lib/esm/engine/loops/index.js.map +1 -0
- package/lib/esm/engine/pinning/GraphPinningDependencyResolver.js +23 -0
- package/lib/esm/engine/pinning/GraphPinningDependencyResolver.js.map +1 -0
- package/lib/esm/engine/pinning/GraphPinningMetadata.js +15 -0
- package/lib/esm/engine/pinning/GraphPinningMetadata.js.map +1 -0
- package/lib/esm/engine/pinning/GraphPinningPolicy.js +29 -0
- package/lib/esm/engine/pinning/GraphPinningPolicy.js.map +1 -0
- package/lib/esm/engine/pinning/GraphPinningService.js +215 -0
- package/lib/esm/engine/pinning/GraphPinningService.js.map +1 -0
- package/lib/esm/engine/pinning/index.js +10 -0
- package/lib/esm/engine/pinning/index.js.map +1 -0
- package/lib/esm/engine/planning/GraphExecutionPlan.js +2 -0
- package/lib/esm/engine/planning/GraphExecutionPlan.js.map +1 -0
- package/lib/esm/engine/planning/GraphExecutionPlanEdge.js +9 -0
- package/lib/esm/engine/planning/GraphExecutionPlanEdge.js.map +1 -0
- package/lib/esm/engine/planning/GraphExecutionPlanLayer.js +2 -0
- package/lib/esm/engine/planning/GraphExecutionPlanLayer.js.map +1 -0
- package/lib/esm/engine/planning/GraphExecutionPlanNode.js +2 -0
- package/lib/esm/engine/planning/GraphExecutionPlanNode.js.map +1 -0
- package/lib/esm/engine/planning/GraphExecutionPlanner.js +203 -0
- package/lib/esm/engine/planning/GraphExecutionPlanner.js.map +1 -0
- package/lib/esm/engine/planning/GraphTopology.js +52 -0
- package/lib/esm/engine/planning/GraphTopology.js.map +1 -0
- package/lib/esm/engine/planning/index.js +12 -0
- package/lib/esm/engine/planning/index.js.map +1 -0
- package/lib/esm/engine/registry/GraphNodeExecutorRegistry.js +91 -0
- package/lib/esm/engine/registry/GraphNodeExecutorRegistry.js.map +1 -0
- package/lib/esm/engine/registry/GraphNodeExecutorResolver.js +50 -0
- package/lib/esm/engine/registry/GraphNodeExecutorResolver.js.map +1 -0
- package/lib/esm/engine/registry/index.js +8 -0
- package/lib/esm/engine/registry/index.js.map +1 -0
- package/lib/esm/engine/runs/GraphRunConverters.js +53 -0
- package/lib/esm/engine/runs/GraphRunConverters.js.map +1 -0
- package/lib/esm/engine/runs/GraphRunEventPublisher.js +64 -0
- package/lib/esm/engine/runs/GraphRunEventPublisher.js.map +1 -0
- package/lib/esm/engine/runs/GraphRunExecutor.js +286 -0
- package/lib/esm/engine/runs/GraphRunExecutor.js.map +1 -0
- package/lib/esm/engine/runs/GraphRunFingerprint.js +25 -0
- package/lib/esm/engine/runs/GraphRunFingerprint.js.map +1 -0
- package/lib/esm/engine/runs/GraphRunService.js +324 -0
- package/lib/esm/engine/runs/GraphRunService.js.map +1 -0
- package/lib/esm/engine/runs/InMemoryGraphRunEventStore.js +64 -0
- package/lib/esm/engine/runs/InMemoryGraphRunEventStore.js.map +1 -0
- package/lib/esm/engine/runs/InMemoryGraphRunStore.js +54 -0
- package/lib/esm/engine/runs/InMemoryGraphRunStore.js.map +1 -0
- package/lib/esm/engine/runs/index.js +12 -0
- package/lib/esm/engine/runs/index.js.map +1 -0
- package/lib/esm/engine/runs/ownership.js +116 -0
- package/lib/esm/engine/runs/ownership.js.map +1 -0
- package/lib/esm/engine/runs/types.js +2 -0
- package/lib/esm/engine/runs/types.js.map +1 -0
- package/lib/esm/engine/services/GraphEnvironment.js +28 -0
- package/lib/esm/engine/services/GraphEnvironment.js.map +1 -0
- package/lib/esm/engine/services/GraphRunModelService.js +102 -0
- package/lib/esm/engine/services/GraphRunModelService.js.map +1 -0
- package/lib/esm/engine/services/GraphWorkflowService.js +398 -0
- package/lib/esm/engine/services/GraphWorkflowService.js.map +1 -0
- package/lib/esm/engine/snapshots/GraphExecutionSnapshotMapper.js +48 -0
- package/lib/esm/engine/snapshots/GraphExecutionSnapshotMapper.js.map +1 -0
- package/lib/esm/engine/snapshots/index.js +7 -0
- package/lib/esm/engine/snapshots/index.js.map +1 -0
- package/lib/esm/engine/store/GraphCachedValue.js +2 -0
- package/lib/esm/engine/store/GraphCachedValue.js.map +1 -0
- package/lib/esm/engine/store/GraphValueKey.js +7 -0
- package/lib/esm/engine/store/GraphValueKey.js.map +1 -0
- package/lib/esm/engine/store/GraphValueModel.js +87 -0
- package/lib/esm/engine/store/GraphValueModel.js.map +1 -0
- package/lib/esm/engine/store/GraphValueRepository.js +233 -0
- package/lib/esm/engine/store/GraphValueRepository.js.map +1 -0
- package/lib/esm/engine/store/index.js +11 -0
- package/lib/esm/engine/store/index.js.map +1 -0
- package/lib/esm/engine/types.js +2 -0
- package/lib/esm/engine/types.js.map +1 -0
- package/lib/esm/engine/validation/GraphConnectionPolicyValidator.js +137 -0
- package/lib/esm/engine/validation/GraphConnectionPolicyValidator.js.map +1 -0
- package/lib/esm/engine/validation/GraphCredentialReferenceValidator.js +155 -0
- package/lib/esm/engine/validation/GraphCredentialReferenceValidator.js.map +1 -0
- package/lib/esm/engine/validation/GraphEdgeInstanceValidator.js +161 -0
- package/lib/esm/engine/validation/GraphEdgeInstanceValidator.js.map +1 -0
- package/lib/esm/engine/validation/GraphLooseNodeValidation.js +32 -0
- package/lib/esm/engine/validation/GraphLooseNodeValidation.js.map +1 -0
- package/lib/esm/engine/validation/GraphNodeInstanceValidator.js +81 -0
- package/lib/esm/engine/validation/GraphNodeInstanceValidator.js.map +1 -0
- package/lib/esm/engine/validation/GraphParameterValidator.js +458 -0
- package/lib/esm/engine/validation/GraphParameterValidator.js.map +1 -0
- package/lib/esm/engine/validation/GraphPortSchemaResolver.js +53 -0
- package/lib/esm/engine/validation/GraphPortSchemaResolver.js.map +1 -0
- package/lib/esm/engine/validation/GraphResolvedWorkflow.js +2 -0
- package/lib/esm/engine/validation/GraphResolvedWorkflow.js.map +1 -0
- package/lib/esm/engine/validation/GraphValidationErrors.js +43 -0
- package/lib/esm/engine/validation/GraphValidationErrors.js.map +1 -0
- package/lib/esm/engine/validation/GraphValidationIssue.js +2 -0
- package/lib/esm/engine/validation/GraphValidationIssue.js.map +1 -0
- package/lib/esm/engine/validation/GraphValueValidator.js +47 -0
- package/lib/esm/engine/validation/GraphValueValidator.js.map +1 -0
- package/lib/esm/engine/validation/GraphWorkflowBoundaryValidation.js +166 -0
- package/lib/esm/engine/validation/GraphWorkflowBoundaryValidation.js.map +1 -0
- package/lib/esm/engine/validation/GraphWorkflowDocumentLimits.js +8 -0
- package/lib/esm/engine/validation/GraphWorkflowDocumentLimits.js.map +1 -0
- package/lib/esm/engine/validation/GraphWorkflowDocumentValidator.js +512 -0
- package/lib/esm/engine/validation/GraphWorkflowDocumentValidator.js.map +1 -0
- package/lib/esm/engine/validation/index.js +22 -0
- package/lib/esm/engine/validation/index.js.map +1 -0
- package/lib/esm/index.js +14 -0
- package/lib/esm/index.js.map +1 -0
- package/lib/esm/log/GraphRunLogger.js +179 -0
- package/lib/esm/log/GraphRunLogger.js.map +1 -0
- package/lib/esm/log/LogParameters.js +111 -0
- package/lib/esm/log/LogParameters.js.map +1 -0
- package/lib/esm/nest/graph/GraphExecutionModule.js +287 -0
- package/lib/esm/nest/graph/GraphExecutionModule.js.map +1 -0
- package/lib/esm/nest/graph/GraphExecutorRegistryFactory.js +106 -0
- package/lib/esm/nest/graph/GraphExecutorRegistryFactory.js.map +1 -0
- package/lib/esm/nest/graph/GraphNodeCatalogueController.js +279 -0
- package/lib/esm/nest/graph/GraphNodeCatalogueController.js.map +1 -0
- package/lib/esm/nest/graph/GraphRunController.js +478 -0
- package/lib/esm/nest/graph/GraphRunController.js.map +1 -0
- package/lib/esm/nest/graph/GraphWorkflowController.js +262 -0
- package/lib/esm/nest/graph/GraphWorkflowController.js.map +1 -0
- package/lib/esm/nest/graph/index.js +13 -0
- package/lib/esm/nest/graph/index.js.map +1 -0
- package/lib/esm/nest/graph/servingDates.js +49 -0
- package/lib/esm/nest/graph/servingDates.js.map +1 -0
- package/lib/esm/nest/graph/servingErrors.js +60 -0
- package/lib/esm/nest/graph/servingErrors.js.map +1 -0
- package/lib/esm/nest/index.js +11 -0
- package/lib/esm/nest/index.js.map +1 -0
- package/lib/esm/node/agents/agent/node.js +112 -0
- package/lib/esm/node/agents/agent/node.js.map +1 -0
- package/lib/esm/node/base.js +132 -0
- package/lib/esm/node/base.js.map +1 -0
- package/lib/esm/node/boundary/input/node.js +61 -0
- package/lib/esm/node/boundary/input/node.js.map +1 -0
- package/lib/esm/node/boundary/output/node.js +64 -0
- package/lib/esm/node/boundary/output/node.js.map +1 -0
- package/lib/esm/node/flow/break/node.js +71 -0
- package/lib/esm/node/flow/break/node.js.map +1 -0
- package/lib/esm/node/flow/error-boundary/node.js +134 -0
- package/lib/esm/node/flow/error-boundary/node.js.map +1 -0
- package/lib/esm/node/flow/human-approval/node.js +85 -0
- package/lib/esm/node/flow/human-approval/node.js.map +1 -0
- package/lib/esm/node/flow/if/node.js +139 -0
- package/lib/esm/node/flow/if/node.js.map +1 -0
- package/lib/esm/node/flow/loop/foreach/node.js +238 -0
- package/lib/esm/node/flow/loop/foreach/node.js.map +1 -0
- package/lib/esm/node/flow/loop/loop-metadata.js +78 -0
- package/lib/esm/node/flow/loop/loop-metadata.js.map +1 -0
- package/lib/esm/node/flow/loop/until/node.js +189 -0
- package/lib/esm/node/flow/loop/until/node.js.map +1 -0
- package/lib/esm/node/flow/loop/while/node.js +188 -0
- package/lib/esm/node/flow/loop/while/node.js.map +1 -0
- package/lib/esm/node/flow/switch/node.js +212 -0
- package/lib/esm/node/flow/switch/node.js.map +1 -0
- package/lib/esm/node/index.js +140 -0
- package/lib/esm/node/index.js.map +1 -0
- package/lib/esm/node/manifests.js +256 -0
- package/lib/esm/node/manifests.js.map +1 -0
- package/lib/esm/node/triggers/chat/node.js +73 -0
- package/lib/esm/node/triggers/chat/node.js.map +1 -0
- package/lib/esm/node/triggers/event/node.js +58 -0
- package/lib/esm/node/triggers/event/node.js.map +1 -0
- package/lib/esm/node/triggers/form/node.js +71 -0
- package/lib/esm/node/triggers/form/node.js.map +1 -0
- package/lib/esm/node/triggers/manual/node.js +62 -0
- package/lib/esm/node/triggers/manual/node.js.map +1 -0
- package/lib/esm/node/triggers/schedule/node.js +71 -0
- package/lib/esm/node/triggers/schedule/node.js.map +1 -0
- package/lib/esm/node/triggers/webhook/node.js +75 -0
- package/lib/esm/node/triggers/webhook/node.js.map +1 -0
- package/lib/esm/node/utility/code/node.js +213 -0
- package/lib/esm/node/utility/code/node.js.map +1 -0
- package/lib/esm/node/utility/delay/node.js +72 -0
- package/lib/esm/node/utility/delay/node.js.map +1 -0
- package/lib/esm/node/utility/log/node.js +89 -0
- package/lib/esm/node/utility/log/node.js.map +1 -0
- package/lib/esm/node/utility/map/node.js +66 -0
- package/lib/esm/node/utility/map/node.js.map +1 -0
- package/lib/esm/node/utility/utility-log/node.js +87 -0
- package/lib/esm/node/utility/utility-log/node.js.map +1 -0
- package/lib/esm/ram/GraphRunEventModel.js +123 -0
- package/lib/esm/ram/GraphRunEventModel.js.map +1 -0
- package/lib/esm/ram/GraphRunEventStore.js +131 -0
- package/lib/esm/ram/GraphRunEventStore.js.map +1 -0
- package/lib/esm/ram/GraphRunStore.js +102 -0
- package/lib/esm/ram/GraphRunStore.js.map +1 -0
- package/lib/esm/ram/index.js +39 -0
- package/lib/esm/ram/index.js.map +1 -0
- package/lib/esm/shared/graph/GraphExecutionStateMapper.js +91 -0
- package/lib/esm/shared/graph/GraphExecutionStateMapper.js.map +1 -0
- package/lib/esm/shared/graph/GraphResolution.js +17 -0
- package/lib/esm/shared/graph/GraphResolution.js.map +1 -0
- package/lib/esm/shared/graph/GraphRunModel.js +131 -0
- package/lib/esm/shared/graph/GraphRunModel.js.map +1 -0
- package/lib/esm/shared/graph/GraphWorkflowModel.js +57 -0
- package/lib/esm/shared/graph/GraphWorkflowModel.js.map +1 -0
- package/lib/esm/shared/graph/auth.js +97 -0
- package/lib/esm/shared/graph/auth.js.map +1 -0
- package/lib/esm/shared/graph/catalog/GraphConnectionPolicy.js +20 -0
- package/lib/esm/shared/graph/catalog/GraphConnectionPolicy.js.map +1 -0
- package/lib/esm/shared/graph/catalog/GraphCredentialReference.js +13 -0
- package/lib/esm/shared/graph/catalog/GraphCredentialReference.js.map +1 -0
- package/lib/esm/shared/graph/catalog/GraphCredentialRequirement.js +16 -0
- package/lib/esm/shared/graph/catalog/GraphCredentialRequirement.js.map +1 -0
- package/lib/esm/shared/graph/catalog/GraphDynamicPortRule.js +36 -0
- package/lib/esm/shared/graph/catalog/GraphDynamicPortRule.js.map +1 -0
- package/lib/esm/shared/graph/catalog/GraphIconReference.js +22 -0
- package/lib/esm/shared/graph/catalog/GraphIconReference.js.map +1 -0
- package/lib/esm/shared/graph/catalog/GraphManifestCompiler.js +386 -0
- package/lib/esm/shared/graph/catalog/GraphManifestCompiler.js.map +1 -0
- package/lib/esm/shared/graph/catalog/GraphNodeCapability.js +28 -0
- package/lib/esm/shared/graph/catalog/GraphNodeCapability.js.map +1 -0
- package/lib/esm/shared/graph/catalog/GraphNodeDisplayManifest.js +11 -0
- package/lib/esm/shared/graph/catalog/GraphNodeDisplayManifest.js.map +1 -0
- package/lib/esm/shared/graph/catalog/GraphNodeManifest.js +27 -0
- package/lib/esm/shared/graph/catalog/GraphNodeManifest.js.map +1 -0
- package/lib/esm/shared/graph/catalog/GraphNodeManifestSerialization.js +57 -0
- package/lib/esm/shared/graph/catalog/GraphNodeManifestSerialization.js.map +1 -0
- package/lib/esm/shared/graph/catalog/GraphNodeMethodManifest.js +34 -0
- package/lib/esm/shared/graph/catalog/GraphNodeMethodManifest.js.map +1 -0
- package/lib/esm/shared/graph/catalog/GraphNodePolicyManifest.js +14 -0
- package/lib/esm/shared/graph/catalog/GraphNodePolicyManifest.js.map +1 -0
- package/lib/esm/shared/graph/catalog/GraphParameterBase.js +2 -0
- package/lib/esm/shared/graph/catalog/GraphParameterBase.js.map +1 -0
- package/lib/esm/shared/graph/catalog/GraphParameterDefinition.js +34 -0
- package/lib/esm/shared/graph/catalog/GraphParameterDefinition.js.map +1 -0
- package/lib/esm/shared/graph/catalog/GraphParameterOption.js +21 -0
- package/lib/esm/shared/graph/catalog/GraphParameterOption.js.map +1 -0
- package/lib/esm/shared/graph/catalog/GraphParameterValidation.js +65 -0
- package/lib/esm/shared/graph/catalog/GraphParameterValidation.js.map +1 -0
- package/lib/esm/shared/graph/catalog/GraphPortManifest.js +26 -0
- package/lib/esm/shared/graph/catalog/GraphPortManifest.js.map +1 -0
- package/lib/esm/shared/graph/catalog/GraphPortManifestElement.js +15 -0
- package/lib/esm/shared/graph/catalog/GraphPortManifestElement.js.map +1 -0
- package/lib/esm/shared/graph/catalog/GraphResourceLocatorMode.js +24 -0
- package/lib/esm/shared/graph/catalog/GraphResourceLocatorMode.js.map +1 -0
- package/lib/esm/shared/graph/catalog/GraphValueSchema.js +30 -0
- package/lib/esm/shared/graph/catalog/GraphValueSchema.js.map +1 -0
- package/lib/esm/shared/graph/catalog/GraphValueSchemaDerivation.js +178 -0
- package/lib/esm/shared/graph/catalog/GraphValueSchemaDerivation.js.map +1 -0
- package/lib/esm/shared/graph/catalog/GraphVisibilityExpression.js +65 -0
- package/lib/esm/shared/graph/catalog/GraphVisibilityExpression.js.map +1 -0
- package/lib/esm/shared/graph/catalog/index.js +26 -0
- package/lib/esm/shared/graph/catalog/index.js.map +1 -0
- package/lib/esm/shared/graph/category-styles.js +34 -0
- package/lib/esm/shared/graph/category-styles.js.map +1 -0
- package/lib/esm/shared/graph/constants.js +354 -0
- package/lib/esm/shared/graph/constants.js.map +1 -0
- package/lib/esm/shared/graph/decorators.js +194 -0
- package/lib/esm/shared/graph/decorators.js.map +1 -0
- package/lib/esm/shared/graph/document/GraphDecoratedWorkflowCompiler.js +401 -0
- package/lib/esm/shared/graph/document/GraphDecoratedWorkflowCompiler.js.map +1 -0
- package/lib/esm/shared/graph/document/GraphEdgeInstance.js +2 -0
- package/lib/esm/shared/graph/document/GraphEdgeInstance.js.map +1 -0
- package/lib/esm/shared/graph/document/GraphEndpoint.js +33 -0
- package/lib/esm/shared/graph/document/GraphEndpoint.js.map +1 -0
- package/lib/esm/shared/graph/document/GraphErrorBoundaryConfiguration.js +2 -0
- package/lib/esm/shared/graph/document/GraphErrorBoundaryConfiguration.js.map +1 -0
- package/lib/esm/shared/graph/document/GraphFlowBuilder.js +766 -0
- package/lib/esm/shared/graph/document/GraphFlowBuilder.js.map +1 -0
- package/lib/esm/shared/graph/document/GraphJsonValue.js +94 -0
- package/lib/esm/shared/graph/document/GraphJsonValue.js.map +1 -0
- package/lib/esm/shared/graph/document/GraphLoopConfiguration.js +2 -0
- package/lib/esm/shared/graph/document/GraphLoopConfiguration.js.map +1 -0
- package/lib/esm/shared/graph/document/GraphNodeBinding.js +30 -0
- package/lib/esm/shared/graph/document/GraphNodeBinding.js.map +1 -0
- package/lib/esm/shared/graph/document/GraphNodeDerivation.js +143 -0
- package/lib/esm/shared/graph/document/GraphNodeDerivation.js.map +1 -0
- package/lib/esm/shared/graph/document/GraphNodeInstance.js +2 -0
- package/lib/esm/shared/graph/document/GraphNodeInstance.js.map +1 -0
- package/lib/esm/shared/graph/document/GraphValueTemplate.js +88 -0
- package/lib/esm/shared/graph/document/GraphValueTemplate.js.map +1 -0
- package/lib/esm/shared/graph/document/GraphWorkflowDocument.js +23 -0
- package/lib/esm/shared/graph/document/GraphWorkflowDocument.js.map +1 -0
- package/lib/esm/shared/graph/document/GraphWorkflowDocumentBuilder.js +433 -0
- package/lib/esm/shared/graph/document/GraphWorkflowDocumentBuilder.js.map +1 -0
- package/lib/esm/shared/graph/document/GraphWorkflowDocumentReader.js +103 -0
- package/lib/esm/shared/graph/document/GraphWorkflowDocumentReader.js.map +1 -0
- package/lib/esm/shared/graph/document/GraphWorkflowDocumentSerializer.js +75 -0
- package/lib/esm/shared/graph/document/GraphWorkflowDocumentSerializer.js.map +1 -0
- package/lib/esm/shared/graph/document/GraphWorkflowUiState.js +2 -0
- package/lib/esm/shared/graph/document/GraphWorkflowUiState.js.map +1 -0
- package/lib/esm/shared/graph/document/index.js +20 -0
- package/lib/esm/shared/graph/document/index.js.map +1 -0
- package/lib/esm/shared/graph/index.js +22 -0
- package/lib/esm/shared/graph/index.js.map +1 -0
- package/lib/esm/shared/graph/overrides/Metadata.js +20 -0
- package/lib/esm/shared/graph/overrides/Metadata.js.map +1 -0
- package/lib/esm/shared/graph/overrides/Rendering.js +2 -0
- package/lib/esm/shared/graph/overrides/Rendering.js.map +1 -0
- package/lib/esm/shared/graph/overrides/index.js +7 -0
- package/lib/esm/shared/graph/overrides/index.js.map +1 -0
- package/lib/esm/shared/graph/overrides/overrides.js +17 -0
- package/lib/esm/shared/graph/overrides/overrides.js.map +1 -0
- package/lib/esm/shared/graph/reader.js +376 -0
- package/lib/esm/shared/graph/reader.js.map +1 -0
- package/lib/esm/shared/graph/registry.js +59 -0
- package/lib/esm/shared/graph/registry.js.map +1 -0
- package/lib/esm/shared/graph/snapshot.js +2 -0
- package/lib/esm/shared/graph/snapshot.js.map +1 -0
- package/lib/esm/shared/graph/types.js +2 -0
- package/lib/esm/shared/graph/types.js.map +1 -0
- package/lib/esm/shared/index.js +13 -0
- package/lib/esm/shared/index.js.map +1 -0
- package/lib/esm/shared/ui/GraphNodeView.js +107 -0
- package/lib/esm/shared/ui/GraphNodeView.js.map +1 -0
- package/lib/esm/shared/ui/GraphRunView.js +90 -0
- package/lib/esm/shared/ui/GraphRunView.js.map +1 -0
- package/lib/esm/shared/ui/GraphWorkflowView.js +72 -0
- package/lib/esm/shared/ui/GraphWorkflowView.js.map +1 -0
- package/lib/esm/shared/ui/constants.js +69 -0
- package/lib/esm/shared/ui/constants.js.map +1 -0
- package/lib/esm/shared/ui/index.js +15 -0
- package/lib/esm/shared/ui/index.js.map +1 -0
- package/lib/esm/shared/ui/types.js +2 -0
- package/lib/esm/shared/ui/types.js.map +1 -0
- package/lib/types/engine/auth/GraphAuth.d.cts +84 -0
- package/lib/types/engine/auth/GraphAuth.d.mts +84 -0
- package/lib/types/engine/auth/GraphAuthValidator.d.cts +57 -0
- package/lib/types/engine/auth/GraphAuthValidator.d.mts +57 -0
- package/lib/types/engine/auth/GraphNamespace.d.cts +38 -0
- package/lib/types/engine/auth/GraphNamespace.d.mts +38 -0
- package/lib/types/engine/auth/index.d.cts +7 -0
- package/lib/types/engine/auth/index.d.mts +7 -0
- package/lib/types/engine/catalog/GraphBuiltInRegistrations.d.cts +26 -0
- package/lib/types/engine/catalog/GraphBuiltInRegistrations.d.mts +26 -0
- package/lib/types/engine/catalog/GraphCatalogueErrors.d.cts +13 -0
- package/lib/types/engine/catalog/GraphCatalogueErrors.d.mts +13 -0
- package/lib/types/engine/catalog/GraphNodeCatalogue.d.cts +86 -0
- package/lib/types/engine/catalog/GraphNodeCatalogue.d.mts +86 -0
- package/lib/types/engine/catalog/GraphNodeManifestResolver.d.cts +57 -0
- package/lib/types/engine/catalog/GraphNodeManifestResolver.d.mts +57 -0
- package/lib/types/engine/catalog/GraphNodeMethodRegistry.d.cts +22 -0
- package/lib/types/engine/catalog/GraphNodeMethodRegistry.d.mts +22 -0
- package/lib/types/engine/catalog/GraphNodeRegistration.d.cts +68 -0
- package/lib/types/engine/catalog/GraphNodeRegistration.d.mts +68 -0
- package/lib/types/engine/catalog/index.d.cts +9 -0
- package/lib/types/engine/catalog/index.d.mts +9 -0
- package/lib/types/engine/constants.d.cts +79 -0
- package/lib/types/engine/constants.d.mts +79 -0
- package/lib/types/engine/decorators.d.cts +6 -0
- package/lib/types/engine/decorators.d.mts +6 -0
- package/lib/types/engine/errors/GraphBreakSignal.d.cts +28 -0
- package/lib/types/engine/errors/GraphBreakSignal.d.mts +28 -0
- package/lib/types/engine/errors/GraphCycleError.d.cts +12 -0
- package/lib/types/engine/errors/GraphCycleError.d.mts +12 -0
- package/lib/types/engine/errors/GraphExecutionError.d.cts +19 -0
- package/lib/types/engine/errors/GraphExecutionError.d.mts +19 -0
- package/lib/types/engine/errors/GraphInputError.d.cts +12 -0
- package/lib/types/engine/errors/GraphInputError.d.mts +12 -0
- package/lib/types/engine/errors/GraphLoopLimitError.d.cts +12 -0
- package/lib/types/engine/errors/GraphLoopLimitError.d.mts +12 -0
- package/lib/types/engine/errors/GraphPinningError.d.cts +12 -0
- package/lib/types/engine/errors/GraphPinningError.d.mts +12 -0
- package/lib/types/engine/errors/GraphPortError.d.cts +12 -0
- package/lib/types/engine/errors/GraphPortError.d.mts +12 -0
- package/lib/types/engine/errors/GraphRunCancelledError.d.cts +9 -0
- package/lib/types/engine/errors/GraphRunCancelledError.d.mts +9 -0
- package/lib/types/engine/errors/GraphStoreError.d.cts +12 -0
- package/lib/types/engine/errors/GraphStoreError.d.mts +12 -0
- package/lib/types/engine/errors/GraphTopologyError.d.cts +12 -0
- package/lib/types/engine/errors/GraphTopologyError.d.mts +12 -0
- package/lib/types/engine/errors/GraphWorkflowErrors.d.cts +14 -0
- package/lib/types/engine/errors/GraphWorkflowErrors.d.mts +14 -0
- package/lib/types/engine/errors/index.d.cts +15 -0
- package/lib/types/engine/errors/index.d.mts +15 -0
- package/lib/types/engine/events/GraphExecutionEventEmitter.d.cts +26 -0
- package/lib/types/engine/events/GraphExecutionEventEmitter.d.mts +26 -0
- package/lib/types/engine/events/GraphExecutionEventFactory.d.cts +29 -0
- package/lib/types/engine/events/GraphExecutionEventFactory.d.mts +29 -0
- package/lib/types/engine/events/GraphExecutionObserver.d.cts +17 -0
- package/lib/types/engine/events/GraphExecutionObserver.d.mts +17 -0
- package/lib/types/engine/events/index.d.cts +8 -0
- package/lib/types/engine/events/index.d.mts +8 -0
- package/lib/types/engine/execution/CodeSandboxEvaluator.d.cts +84 -0
- package/lib/types/engine/execution/CodeSandboxEvaluator.d.mts +84 -0
- package/lib/types/engine/execution/GraphExecutionContext.d.cts +94 -0
- package/lib/types/engine/execution/GraphExecutionContext.d.mts +94 -0
- package/lib/types/engine/execution/GraphExecutionEngine.d.cts +352 -0
- package/lib/types/engine/execution/GraphExecutionEngine.d.mts +352 -0
- package/lib/types/engine/execution/GraphExecutionFrame.d.cts +50 -0
- package/lib/types/engine/execution/GraphExecutionFrame.d.mts +50 -0
- package/lib/types/engine/execution/GraphExecutionResult.d.cts +13 -0
- package/lib/types/engine/execution/GraphExecutionResult.d.mts +13 -0
- package/lib/types/engine/execution/GraphNodeExecutor.d.cts +31 -0
- package/lib/types/engine/execution/GraphNodeExecutor.d.mts +31 -0
- package/lib/types/engine/execution/IsolatedVmCodeSandboxEvaluator.d.cts +160 -0
- package/lib/types/engine/execution/IsolatedVmCodeSandboxEvaluator.d.mts +160 -0
- package/lib/types/engine/execution/index.d.cts +12 -0
- package/lib/types/engine/execution/index.d.mts +12 -0
- package/lib/types/engine/index.d.cts +61 -0
- package/lib/types/engine/index.d.mts +61 -0
- package/lib/types/engine/loops/ConditionEvaluator.d.cts +87 -0
- package/lib/types/engine/loops/ConditionEvaluator.d.mts +87 -0
- package/lib/types/engine/loops/ConditionExpressionEvaluator.d.cts +36 -0
- package/lib/types/engine/loops/ConditionExpressionEvaluator.d.mts +36 -0
- package/lib/types/engine/loops/GraphConditionEvaluator.d.cts +62 -0
- package/lib/types/engine/loops/GraphConditionEvaluator.d.mts +62 -0
- package/lib/types/engine/loops/GraphLoopExecutionContext.d.cts +15 -0
- package/lib/types/engine/loops/GraphLoopExecutionContext.d.mts +15 -0
- package/lib/types/engine/loops/index.d.cts +9 -0
- package/lib/types/engine/loops/index.d.mts +9 -0
- package/lib/types/engine/pinning/GraphPinningDependencyResolver.d.cts +21 -0
- package/lib/types/engine/pinning/GraphPinningDependencyResolver.d.mts +21 -0
- package/lib/types/engine/pinning/GraphPinningMetadata.d.cts +14 -0
- package/lib/types/engine/pinning/GraphPinningMetadata.d.mts +14 -0
- package/lib/types/engine/pinning/GraphPinningPolicy.d.cts +20 -0
- package/lib/types/engine/pinning/GraphPinningPolicy.d.mts +20 -0
- package/lib/types/engine/pinning/GraphPinningService.d.cts +70 -0
- package/lib/types/engine/pinning/GraphPinningService.d.mts +70 -0
- package/lib/types/engine/pinning/index.d.cts +9 -0
- package/lib/types/engine/pinning/index.d.mts +9 -0
- package/lib/types/engine/planning/GraphExecutionPlan.d.cts +25 -0
- package/lib/types/engine/planning/GraphExecutionPlan.d.mts +25 -0
- package/lib/types/engine/planning/GraphExecutionPlanEdge.d.cts +26 -0
- package/lib/types/engine/planning/GraphExecutionPlanEdge.d.mts +26 -0
- package/lib/types/engine/planning/GraphExecutionPlanLayer.d.cts +13 -0
- package/lib/types/engine/planning/GraphExecutionPlanLayer.d.mts +13 -0
- package/lib/types/engine/planning/GraphExecutionPlanNode.d.cts +28 -0
- package/lib/types/engine/planning/GraphExecutionPlanNode.d.mts +28 -0
- package/lib/types/engine/planning/GraphExecutionPlanner.d.cts +61 -0
- package/lib/types/engine/planning/GraphExecutionPlanner.d.mts +61 -0
- package/lib/types/engine/planning/GraphTopology.d.cts +23 -0
- package/lib/types/engine/planning/GraphTopology.d.mts +23 -0
- package/lib/types/engine/planning/index.d.cts +11 -0
- package/lib/types/engine/planning/index.d.mts +11 -0
- package/lib/types/engine/registry/GraphNodeExecutorRegistry.d.cts +44 -0
- package/lib/types/engine/registry/GraphNodeExecutorRegistry.d.mts +44 -0
- package/lib/types/engine/registry/GraphNodeExecutorResolver.d.cts +26 -0
- package/lib/types/engine/registry/GraphNodeExecutorResolver.d.mts +26 -0
- package/lib/types/engine/registry/index.d.cts +7 -0
- package/lib/types/engine/registry/index.d.mts +7 -0
- package/lib/types/engine/runs/GraphRunConverters.d.cts +6 -0
- package/lib/types/engine/runs/GraphRunConverters.d.mts +6 -0
- package/lib/types/engine/runs/GraphRunEventPublisher.d.cts +26 -0
- package/lib/types/engine/runs/GraphRunEventPublisher.d.mts +26 -0
- package/lib/types/engine/runs/GraphRunExecutor.d.cts +75 -0
- package/lib/types/engine/runs/GraphRunExecutor.d.mts +75 -0
- package/lib/types/engine/runs/GraphRunFingerprint.d.cts +8 -0
- package/lib/types/engine/runs/GraphRunFingerprint.d.mts +8 -0
- package/lib/types/engine/runs/GraphRunService.d.cts +141 -0
- package/lib/types/engine/runs/GraphRunService.d.mts +141 -0
- package/lib/types/engine/runs/InMemoryGraphRunEventStore.d.cts +28 -0
- package/lib/types/engine/runs/InMemoryGraphRunEventStore.d.mts +28 -0
- package/lib/types/engine/runs/InMemoryGraphRunStore.d.cts +41 -0
- package/lib/types/engine/runs/InMemoryGraphRunStore.d.mts +41 -0
- package/lib/types/engine/runs/index.d.cts +11 -0
- package/lib/types/engine/runs/index.d.mts +11 -0
- package/lib/types/engine/runs/ownership.d.cts +110 -0
- package/lib/types/engine/runs/ownership.d.mts +110 -0
- package/lib/types/engine/runs/types.d.cts +94 -0
- package/lib/types/engine/runs/types.d.mts +94 -0
- package/lib/types/engine/services/GraphEnvironment.d.cts +40 -0
- package/lib/types/engine/services/GraphEnvironment.d.mts +40 -0
- package/lib/types/engine/services/GraphRunModelService.d.cts +50 -0
- package/lib/types/engine/services/GraphRunModelService.d.mts +50 -0
- package/lib/types/engine/services/GraphWorkflowService.d.cts +152 -0
- package/lib/types/engine/services/GraphWorkflowService.d.mts +152 -0
- package/lib/types/engine/snapshots/GraphExecutionSnapshotMapper.d.cts +10 -0
- package/lib/types/engine/snapshots/GraphExecutionSnapshotMapper.d.mts +10 -0
- package/lib/types/engine/snapshots/index.d.cts +6 -0
- package/lib/types/engine/snapshots/index.d.mts +6 -0
- package/lib/types/engine/store/GraphCachedValue.d.cts +20 -0
- package/lib/types/engine/store/GraphCachedValue.d.mts +20 -0
- package/lib/types/engine/store/GraphValueKey.d.cts +18 -0
- package/lib/types/engine/store/GraphValueKey.d.mts +18 -0
- package/lib/types/engine/store/GraphValueModel.d.cts +33 -0
- package/lib/types/engine/store/GraphValueModel.d.mts +33 -0
- package/lib/types/engine/store/GraphValueRepository.d.cts +89 -0
- package/lib/types/engine/store/GraphValueRepository.d.mts +89 -0
- package/lib/types/engine/store/index.d.cts +10 -0
- package/lib/types/engine/store/index.d.mts +10 -0
- package/lib/types/engine/types.d.cts +238 -0
- package/lib/types/engine/types.d.mts +238 -0
- package/lib/types/engine/validation/GraphConnectionPolicyValidator.d.cts +32 -0
- package/lib/types/engine/validation/GraphConnectionPolicyValidator.d.mts +32 -0
- package/lib/types/engine/validation/GraphCredentialReferenceValidator.d.cts +62 -0
- package/lib/types/engine/validation/GraphCredentialReferenceValidator.d.mts +62 -0
- package/lib/types/engine/validation/GraphEdgeInstanceValidator.d.cts +32 -0
- package/lib/types/engine/validation/GraphEdgeInstanceValidator.d.mts +32 -0
- package/lib/types/engine/validation/GraphLooseNodeValidation.d.cts +21 -0
- package/lib/types/engine/validation/GraphLooseNodeValidation.d.mts +21 -0
- package/lib/types/engine/validation/GraphNodeInstanceValidator.d.cts +38 -0
- package/lib/types/engine/validation/GraphNodeInstanceValidator.d.mts +38 -0
- package/lib/types/engine/validation/GraphParameterValidator.d.cts +120 -0
- package/lib/types/engine/validation/GraphParameterValidator.d.mts +120 -0
- package/lib/types/engine/validation/GraphPortSchemaResolver.d.cts +39 -0
- package/lib/types/engine/validation/GraphPortSchemaResolver.d.mts +39 -0
- package/lib/types/engine/validation/GraphResolvedWorkflow.d.cts +66 -0
- package/lib/types/engine/validation/GraphResolvedWorkflow.d.mts +66 -0
- package/lib/types/engine/validation/GraphValidationErrors.d.cts +34 -0
- package/lib/types/engine/validation/GraphValidationErrors.d.mts +34 -0
- package/lib/types/engine/validation/GraphValidationIssue.d.cts +39 -0
- package/lib/types/engine/validation/GraphValidationIssue.d.mts +39 -0
- package/lib/types/engine/validation/GraphValueValidator.d.cts +27 -0
- package/lib/types/engine/validation/GraphValueValidator.d.mts +27 -0
- package/lib/types/engine/validation/GraphWorkflowBoundaryValidation.d.cts +29 -0
- package/lib/types/engine/validation/GraphWorkflowBoundaryValidation.d.mts +29 -0
- package/lib/types/engine/validation/GraphWorkflowDocumentLimits.d.cts +33 -0
- package/lib/types/engine/validation/GraphWorkflowDocumentLimits.d.mts +33 -0
- package/lib/types/engine/validation/GraphWorkflowDocumentValidator.d.cts +165 -0
- package/lib/types/engine/validation/GraphWorkflowDocumentValidator.d.mts +165 -0
- package/lib/types/engine/validation/index.d.cts +21 -0
- package/lib/types/engine/validation/index.d.mts +21 -0
- package/lib/types/index.d.cts +13 -0
- package/lib/types/index.d.mts +13 -0
- package/lib/types/log/GraphRunLogger.d.cts +96 -0
- package/lib/types/log/GraphRunLogger.d.mts +96 -0
- package/lib/types/log/LogParameters.d.cts +7 -0
- package/lib/types/log/LogParameters.d.mts +7 -0
- package/lib/types/nest/graph/GraphExecutionModule.d.cts +139 -0
- package/lib/types/nest/graph/GraphExecutionModule.d.mts +139 -0
- package/lib/types/nest/graph/GraphExecutorRegistryFactory.d.cts +76 -0
- package/lib/types/nest/graph/GraphExecutorRegistryFactory.d.mts +76 -0
- package/lib/types/nest/graph/GraphNodeCatalogueController.d.cts +118 -0
- package/lib/types/nest/graph/GraphNodeCatalogueController.d.mts +118 -0
- package/lib/types/nest/graph/GraphRunController.d.cts +173 -0
- package/lib/types/nest/graph/GraphRunController.d.mts +173 -0
- package/lib/types/nest/graph/GraphWorkflowController.d.cts +121 -0
- package/lib/types/nest/graph/GraphWorkflowController.d.mts +121 -0
- package/lib/types/nest/graph/index.d.cts +12 -0
- package/lib/types/nest/graph/index.d.mts +12 -0
- package/lib/types/nest/graph/servingDates.d.cts +35 -0
- package/lib/types/nest/graph/servingDates.d.mts +35 -0
- package/lib/types/nest/graph/servingErrors.d.cts +42 -0
- package/lib/types/nest/graph/servingErrors.d.mts +42 -0
- package/lib/types/nest/index.d.cts +10 -0
- package/lib/types/nest/index.d.mts +10 -0
- package/lib/types/node/agents/agent/node.d.cts +51 -0
- package/lib/types/node/agents/agent/node.d.mts +51 -0
- package/lib/types/node/base.d.cts +131 -0
- package/lib/types/node/base.d.mts +131 -0
- package/lib/types/node/boundary/input/node.d.cts +20 -0
- package/lib/types/node/boundary/input/node.d.mts +20 -0
- package/lib/types/node/boundary/output/node.d.cts +20 -0
- package/lib/types/node/boundary/output/node.d.mts +20 -0
- package/lib/types/node/flow/break/node.d.cts +22 -0
- package/lib/types/node/flow/break/node.d.mts +22 -0
- package/lib/types/node/flow/error-boundary/node.d.cts +40 -0
- package/lib/types/node/flow/error-boundary/node.d.mts +40 -0
- package/lib/types/node/flow/human-approval/node.d.cts +32 -0
- package/lib/types/node/flow/human-approval/node.d.mts +32 -0
- package/lib/types/node/flow/if/node.d.cts +46 -0
- package/lib/types/node/flow/if/node.d.mts +46 -0
- package/lib/types/node/flow/loop/foreach/node.d.cts +43 -0
- package/lib/types/node/flow/loop/foreach/node.d.mts +43 -0
- package/lib/types/node/flow/loop/loop-metadata.d.cts +61 -0
- package/lib/types/node/flow/loop/loop-metadata.d.mts +61 -0
- package/lib/types/node/flow/loop/until/node.d.cts +41 -0
- package/lib/types/node/flow/loop/until/node.d.mts +41 -0
- package/lib/types/node/flow/loop/while/node.d.cts +40 -0
- package/lib/types/node/flow/loop/while/node.d.mts +40 -0
- package/lib/types/node/flow/switch/node.d.cts +47 -0
- package/lib/types/node/flow/switch/node.d.mts +47 -0
- package/lib/types/node/index.d.cts +90 -0
- package/lib/types/node/index.d.mts +90 -0
- package/lib/types/node/manifests.d.cts +23 -0
- package/lib/types/node/manifests.d.mts +23 -0
- package/lib/types/node/triggers/chat/node.d.cts +29 -0
- package/lib/types/node/triggers/chat/node.d.mts +29 -0
- package/lib/types/node/triggers/event/node.d.cts +22 -0
- package/lib/types/node/triggers/event/node.d.mts +22 -0
- package/lib/types/node/triggers/form/node.d.cts +24 -0
- package/lib/types/node/triggers/form/node.d.mts +24 -0
- package/lib/types/node/triggers/manual/node.d.cts +23 -0
- package/lib/types/node/triggers/manual/node.d.mts +23 -0
- package/lib/types/node/triggers/schedule/node.d.cts +24 -0
- package/lib/types/node/triggers/schedule/node.d.mts +24 -0
- package/lib/types/node/triggers/webhook/node.d.cts +24 -0
- package/lib/types/node/triggers/webhook/node.d.mts +24 -0
- package/lib/types/node/utility/code/node.d.cts +101 -0
- package/lib/types/node/utility/code/node.d.mts +101 -0
- package/lib/types/node/utility/delay/node.d.cts +28 -0
- package/lib/types/node/utility/delay/node.d.mts +28 -0
- package/lib/types/node/utility/log/node.d.cts +32 -0
- package/lib/types/node/utility/log/node.d.mts +32 -0
- package/lib/types/node/utility/map/node.d.cts +24 -0
- package/lib/types/node/utility/map/node.d.mts +24 -0
- package/lib/types/node/utility/utility-log/node.d.cts +32 -0
- package/lib/types/node/utility/utility-log/node.d.mts +32 -0
- package/lib/types/ram/GraphRunEventModel.d.cts +34 -0
- package/lib/types/ram/GraphRunEventModel.d.mts +34 -0
- package/lib/types/ram/GraphRunEventStore.d.cts +64 -0
- package/lib/types/ram/GraphRunEventStore.d.mts +64 -0
- package/lib/types/ram/GraphRunStore.d.cts +51 -0
- package/lib/types/ram/GraphRunStore.d.mts +51 -0
- package/lib/types/ram/index.d.cts +34 -0
- package/lib/types/ram/index.d.mts +34 -0
- package/lib/types/shared/graph/GraphExecutionStateMapper.d.cts +66 -0
- package/lib/types/shared/graph/GraphExecutionStateMapper.d.mts +66 -0
- package/lib/types/shared/graph/GraphResolution.d.cts +59 -0
- package/lib/types/shared/graph/GraphResolution.d.mts +59 -0
- package/lib/types/shared/graph/GraphRunModel.d.cts +32 -0
- package/lib/types/shared/graph/GraphRunModel.d.mts +32 -0
- package/lib/types/shared/graph/GraphWorkflowModel.d.cts +29 -0
- package/lib/types/shared/graph/GraphWorkflowModel.d.mts +29 -0
- package/lib/types/shared/graph/auth.d.cts +40 -0
- package/lib/types/shared/graph/auth.d.mts +40 -0
- package/lib/types/shared/graph/catalog/GraphConnectionPolicy.d.cts +16 -0
- package/lib/types/shared/graph/catalog/GraphConnectionPolicy.d.mts +16 -0
- package/lib/types/shared/graph/catalog/GraphCredentialReference.d.cts +13 -0
- package/lib/types/shared/graph/catalog/GraphCredentialReference.d.mts +13 -0
- package/lib/types/shared/graph/catalog/GraphCredentialRequirement.d.cts +14 -0
- package/lib/types/shared/graph/catalog/GraphCredentialRequirement.d.mts +14 -0
- package/lib/types/shared/graph/catalog/GraphDynamicPortRule.d.cts +45 -0
- package/lib/types/shared/graph/catalog/GraphDynamicPortRule.d.mts +45 -0
- package/lib/types/shared/graph/catalog/GraphIconReference.d.cts +19 -0
- package/lib/types/shared/graph/catalog/GraphIconReference.d.mts +19 -0
- package/lib/types/shared/graph/catalog/GraphManifestCompiler.d.cts +23 -0
- package/lib/types/shared/graph/catalog/GraphManifestCompiler.d.mts +23 -0
- package/lib/types/shared/graph/catalog/GraphNodeCapability.d.cts +18 -0
- package/lib/types/shared/graph/catalog/GraphNodeCapability.d.mts +18 -0
- package/lib/types/shared/graph/catalog/GraphNodeDisplayManifest.d.cts +40 -0
- package/lib/types/shared/graph/catalog/GraphNodeDisplayManifest.d.mts +40 -0
- package/lib/types/shared/graph/catalog/GraphNodeManifest.d.cts +45 -0
- package/lib/types/shared/graph/catalog/GraphNodeManifest.d.mts +45 -0
- package/lib/types/shared/graph/catalog/GraphNodeManifestSerialization.d.cts +22 -0
- package/lib/types/shared/graph/catalog/GraphNodeManifestSerialization.d.mts +22 -0
- package/lib/types/shared/graph/catalog/GraphNodeMethodManifest.d.cts +27 -0
- package/lib/types/shared/graph/catalog/GraphNodeMethodManifest.d.mts +27 -0
- package/lib/types/shared/graph/catalog/GraphNodePolicyManifest.d.cts +46 -0
- package/lib/types/shared/graph/catalog/GraphNodePolicyManifest.d.mts +46 -0
- package/lib/types/shared/graph/catalog/GraphParameterBase.d.cts +17 -0
- package/lib/types/shared/graph/catalog/GraphParameterBase.d.mts +17 -0
- package/lib/types/shared/graph/catalog/GraphParameterDefinition.d.cts +119 -0
- package/lib/types/shared/graph/catalog/GraphParameterDefinition.d.mts +119 -0
- package/lib/types/shared/graph/catalog/GraphParameterOption.d.cts +19 -0
- package/lib/types/shared/graph/catalog/GraphParameterOption.d.mts +19 -0
- package/lib/types/shared/graph/catalog/GraphParameterValidation.d.cts +46 -0
- package/lib/types/shared/graph/catalog/GraphParameterValidation.d.mts +46 -0
- package/lib/types/shared/graph/catalog/GraphPortManifest.d.cts +42 -0
- package/lib/types/shared/graph/catalog/GraphPortManifest.d.mts +42 -0
- package/lib/types/shared/graph/catalog/GraphPortManifestElement.d.cts +14 -0
- package/lib/types/shared/graph/catalog/GraphPortManifestElement.d.mts +14 -0
- package/lib/types/shared/graph/catalog/GraphResourceLocatorMode.d.cts +27 -0
- package/lib/types/shared/graph/catalog/GraphResourceLocatorMode.d.mts +27 -0
- package/lib/types/shared/graph/catalog/GraphValueSchema.d.cts +85 -0
- package/lib/types/shared/graph/catalog/GraphValueSchema.d.mts +85 -0
- package/lib/types/shared/graph/catalog/GraphValueSchemaDerivation.d.cts +24 -0
- package/lib/types/shared/graph/catalog/GraphValueSchemaDerivation.d.mts +24 -0
- package/lib/types/shared/graph/catalog/GraphVisibilityExpression.d.cts +35 -0
- package/lib/types/shared/graph/catalog/GraphVisibilityExpression.d.mts +35 -0
- package/lib/types/shared/graph/catalog/index.d.cts +25 -0
- package/lib/types/shared/graph/catalog/index.d.mts +25 -0
- package/lib/types/shared/graph/category-styles.d.cts +8 -0
- package/lib/types/shared/graph/category-styles.d.mts +8 -0
- package/lib/types/shared/graph/constants.d.cts +640 -0
- package/lib/types/shared/graph/constants.d.mts +640 -0
- package/lib/types/shared/graph/decorators.d.cts +118 -0
- package/lib/types/shared/graph/decorators.d.mts +118 -0
- package/lib/types/shared/graph/document/GraphDecoratedWorkflowCompiler.d.cts +56 -0
- package/lib/types/shared/graph/document/GraphDecoratedWorkflowCompiler.d.mts +56 -0
- package/lib/types/shared/graph/document/GraphEdgeInstance.d.cts +15 -0
- package/lib/types/shared/graph/document/GraphEdgeInstance.d.mts +15 -0
- package/lib/types/shared/graph/document/GraphEndpoint.d.cts +34 -0
- package/lib/types/shared/graph/document/GraphEndpoint.d.mts +34 -0
- package/lib/types/shared/graph/document/GraphErrorBoundaryConfiguration.d.cts +14 -0
- package/lib/types/shared/graph/document/GraphErrorBoundaryConfiguration.d.mts +14 -0
- package/lib/types/shared/graph/document/GraphFlowBuilder.d.cts +277 -0
- package/lib/types/shared/graph/document/GraphFlowBuilder.d.mts +277 -0
- package/lib/types/shared/graph/document/GraphJsonValue.d.cts +41 -0
- package/lib/types/shared/graph/document/GraphJsonValue.d.mts +41 -0
- package/lib/types/shared/graph/document/GraphLoopConfiguration.d.cts +30 -0
- package/lib/types/shared/graph/document/GraphLoopConfiguration.d.mts +30 -0
- package/lib/types/shared/graph/document/GraphNodeBinding.d.cts +47 -0
- package/lib/types/shared/graph/document/GraphNodeBinding.d.mts +47 -0
- package/lib/types/shared/graph/document/GraphNodeDerivation.d.cts +59 -0
- package/lib/types/shared/graph/document/GraphNodeDerivation.d.mts +59 -0
- package/lib/types/shared/graph/document/GraphNodeInstance.d.cts +52 -0
- package/lib/types/shared/graph/document/GraphNodeInstance.d.mts +52 -0
- package/lib/types/shared/graph/document/GraphValueTemplate.d.cts +75 -0
- package/lib/types/shared/graph/document/GraphValueTemplate.d.mts +75 -0
- package/lib/types/shared/graph/document/GraphWorkflowDocument.d.cts +53 -0
- package/lib/types/shared/graph/document/GraphWorkflowDocument.d.mts +53 -0
- package/lib/types/shared/graph/document/GraphWorkflowDocumentBuilder.d.cts +146 -0
- package/lib/types/shared/graph/document/GraphWorkflowDocumentBuilder.d.mts +146 -0
- package/lib/types/shared/graph/document/GraphWorkflowDocumentReader.d.cts +62 -0
- package/lib/types/shared/graph/document/GraphWorkflowDocumentReader.d.mts +62 -0
- package/lib/types/shared/graph/document/GraphWorkflowDocumentSerializer.d.cts +17 -0
- package/lib/types/shared/graph/document/GraphWorkflowDocumentSerializer.d.mts +17 -0
- package/lib/types/shared/graph/document/GraphWorkflowUiState.d.cts +49 -0
- package/lib/types/shared/graph/document/GraphWorkflowUiState.d.mts +49 -0
- package/lib/types/shared/graph/document/index.d.cts +19 -0
- package/lib/types/shared/graph/document/index.d.mts +19 -0
- package/lib/types/shared/graph/index.d.cts +21 -0
- package/lib/types/shared/graph/index.d.mts +21 -0
- package/lib/types/shared/graph/overrides/Metadata.d.cts +43 -0
- package/lib/types/shared/graph/overrides/Metadata.d.mts +43 -0
- package/lib/types/shared/graph/overrides/Rendering.d.cts +8 -0
- package/lib/types/shared/graph/overrides/Rendering.d.mts +8 -0
- package/lib/types/shared/graph/overrides/index.d.cts +6 -0
- package/lib/types/shared/graph/overrides/index.d.mts +6 -0
- package/lib/types/shared/graph/overrides/overrides.d.cts +1 -0
- package/lib/types/shared/graph/overrides/overrides.d.mts +1 -0
- package/lib/types/shared/graph/reader.d.cts +75 -0
- package/lib/types/shared/graph/reader.d.mts +75 -0
- package/lib/types/shared/graph/registry.d.cts +40 -0
- package/lib/types/shared/graph/registry.d.mts +40 -0
- package/lib/types/shared/graph/snapshot.d.cts +36 -0
- package/lib/types/shared/graph/snapshot.d.mts +36 -0
- package/lib/types/shared/graph/types.d.cts +304 -0
- package/lib/types/shared/graph/types.d.mts +304 -0
- package/lib/types/shared/index.d.cts +12 -0
- package/lib/types/shared/index.d.mts +12 -0
- package/lib/types/shared/ui/GraphNodeView.d.cts +48 -0
- package/lib/types/shared/ui/GraphNodeView.d.mts +48 -0
- package/lib/types/shared/ui/GraphRunView.d.cts +88 -0
- package/lib/types/shared/ui/GraphRunView.d.mts +88 -0
- package/lib/types/shared/ui/GraphWorkflowView.d.cts +18 -0
- package/lib/types/shared/ui/GraphWorkflowView.d.mts +18 -0
- package/lib/types/shared/ui/constants.d.cts +55 -0
- package/lib/types/shared/ui/constants.d.mts +55 -0
- package/lib/types/shared/ui/index.d.cts +14 -0
- package/lib/types/shared/ui/index.d.mts +14 -0
- package/lib/types/shared/ui/types.d.cts +200 -0
- package/lib/types/shared/ui/types.d.mts +200 -0
- package/package.json +158 -4
|
@@ -0,0 +1,1042 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GraphExecutionEngine = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* @module as-graph/execution/GraphExecutionEngine
|
|
6
|
+
* @summary Reference graph execution engine (DECAF-50 §4.9).
|
|
7
|
+
* @description Executes canonical {@link GraphWorkflowDocument}s. The public
|
|
8
|
+
* `execute(document, inputs, options)` entrypoint performs resolution
|
|
9
|
+
* internally: the document runs through the nine-stage §4.8 validation gate
|
|
10
|
+
* (structured issue accumulation), is resolved against the trusted backend
|
|
11
|
+
* catalogue into a {@link GraphResolvedWorkflow}, planned by the
|
|
12
|
+
* {@link GraphExecutionPlanner} (resolved workflows only — never raw
|
|
13
|
+
* definitions), and executed layer by layer. Node inputs are built from
|
|
14
|
+
* routed edges, literal bindings, allowed expressions, manifest defaults,
|
|
15
|
+
* and node parameters; configuration and input data are separated in the
|
|
16
|
+
* {@link GraphNodeExecutionRequest}. Executor outputs are validated against
|
|
17
|
+
* the effective output manifest. Disabled nodes follow the explicit
|
|
18
|
+
* {@link GraphDisabledNodeBehavior} semantics. Events are emitted through
|
|
19
|
+
* Decaf's Observable pipeline, including the DECAF-48 §4.4 visual-state
|
|
20
|
+
* events and the `graph.run.log` run-log channel.
|
|
21
|
+
*/
|
|
22
|
+
const core_1 = require("@decaf-ts/core");
|
|
23
|
+
const index_js_1 = require("./../../shared/graph/index.cjs");
|
|
24
|
+
const constants_js_1 = require("./../constants.cjs");
|
|
25
|
+
const index_js_2 = require("./../../shared/graph/index.cjs");
|
|
26
|
+
const index_js_3 = require("./../errors/index.cjs");
|
|
27
|
+
const GraphExecutionEventEmitter_js_1 = require("./../events/GraphExecutionEventEmitter.cjs");
|
|
28
|
+
const GraphExecutionEventFactory_js_1 = require("./../events/GraphExecutionEventFactory.cjs");
|
|
29
|
+
const GraphExecutionPlanner_js_1 = require("./../planning/GraphExecutionPlanner.cjs");
|
|
30
|
+
const GraphWorkflowDocumentValidator_js_1 = require("./../validation/GraphWorkflowDocumentValidator.cjs");
|
|
31
|
+
const GraphParameterValidator_js_1 = require("./../validation/GraphParameterValidator.cjs");
|
|
32
|
+
const GraphValidationErrors_js_1 = require("./../validation/GraphValidationErrors.cjs");
|
|
33
|
+
const GraphValueRepository_js_1 = require("./../store/GraphValueRepository.cjs");
|
|
34
|
+
const GraphPinningService_js_1 = require("./../pinning/GraphPinningService.cjs");
|
|
35
|
+
const GraphPinningPolicy_js_1 = require("./../pinning/GraphPinningPolicy.cjs");
|
|
36
|
+
const GraphPinningDependencyResolver_js_1 = require("./../pinning/GraphPinningDependencyResolver.cjs");
|
|
37
|
+
const GraphExecutionContext_js_1 = require("./GraphExecutionContext.cjs");
|
|
38
|
+
const GraphExecutionFrame_js_1 = require("./GraphExecutionFrame.cjs");
|
|
39
|
+
const GraphExecutionResult_js_1 = require("./GraphExecutionResult.cjs");
|
|
40
|
+
const index_js_4 = require("./../auth/index.cjs");
|
|
41
|
+
/**
|
|
42
|
+
* Compiles a `{{ ... }}` text template into a JavaScript template literal so
|
|
43
|
+
* the pluggable code sandbox evaluator can resolve its placeholders against
|
|
44
|
+
* the same `$input`/`$vars`/`$item` bindings used by expression bindings.
|
|
45
|
+
*
|
|
46
|
+
* @param template - The persisted template body.
|
|
47
|
+
* @returns A backtick-quoted template literal expression.
|
|
48
|
+
*/
|
|
49
|
+
function graphTemplateToExpression(template) {
|
|
50
|
+
const escaped = template.replace(/\\/g, "\\\\").replace(/`/g, "\\`");
|
|
51
|
+
const interpolated = escaped.replace(/\{\{\s*([\s\S]*?)\s*\}\}/g, (_match, expression) => `\${${expression}}`);
|
|
52
|
+
return `\`${interpolated}\``;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Reference graph execution engine.
|
|
56
|
+
*
|
|
57
|
+
* Executes a canonical {@link GraphWorkflowDocument} by:
|
|
58
|
+
* 1. Validating it through the nine-stage gate and resolving it against the
|
|
59
|
+
* backend catalogue (§4.8).
|
|
60
|
+
* 2. Planning the resolved workflow into topological layers (§4.9).
|
|
61
|
+
* 3. Seeding workflow inputs into the value store.
|
|
62
|
+
* 4. Executing nodes layer-by-layer with configurable concurrency, honouring
|
|
63
|
+
* disabled-node semantics.
|
|
64
|
+
* 5. Building node inputs from routed edges, literal bindings, allowed
|
|
65
|
+
* expressions, and manifest defaults; keeping configuration (parameters,
|
|
66
|
+
* credentials) separate from input data.
|
|
67
|
+
* 6. Validating executor outputs against the effective output manifest.
|
|
68
|
+
* 7. Routing values along data edges.
|
|
69
|
+
* 8. Emitting structured events through Decaf's Observable pipeline.
|
|
70
|
+
* 9. Returning a complete {@link GraphExecutionResult}.
|
|
71
|
+
*/
|
|
72
|
+
class GraphExecutionEngine extends core_1.ClientBasedService {
|
|
73
|
+
constructor() {
|
|
74
|
+
super();
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Resolves the engine's configuration and runtime collaborators.
|
|
78
|
+
*
|
|
79
|
+
* `Service.boot` may call this with only a decaf `Context`; an explicit
|
|
80
|
+
* `initialize(config)` is required before the engine can execute.
|
|
81
|
+
*
|
|
82
|
+
* @param args - The engine config, optionally followed by a decaf `Context`.
|
|
83
|
+
* @returns The resolved config and runtime client bundle.
|
|
84
|
+
*/
|
|
85
|
+
async initialize(...args) {
|
|
86
|
+
const config = args[0];
|
|
87
|
+
if (!config || typeof config !== "object" || !config.registry) {
|
|
88
|
+
this._config = undefined;
|
|
89
|
+
this._client = undefined;
|
|
90
|
+
return { config: undefined, client: undefined };
|
|
91
|
+
}
|
|
92
|
+
const catalogue = config.catalogue ?? config.registry.catalog;
|
|
93
|
+
const valueAdapter = config.valueAdapter ?? core_1.Adapter.current;
|
|
94
|
+
if (!valueAdapter) {
|
|
95
|
+
throw new index_js_3.GraphExecutionError("GraphExecutionEngine requires a Decaf adapter for cached/pinned values: pass `valueAdapter` or configure one via `Adapter.setCurrent(...)`", "GRAPH_VALUE_ADAPTER_MISSING");
|
|
96
|
+
}
|
|
97
|
+
const client = {
|
|
98
|
+
registry: config.registry,
|
|
99
|
+
catalogue,
|
|
100
|
+
planner: config.planner ?? new GraphExecutionPlanner_js_1.GraphExecutionPlanner(),
|
|
101
|
+
valueAdapter,
|
|
102
|
+
eventEmitter: config.eventEmitter ?? new GraphExecutionEventEmitter_js_1.GraphExecutionEventEmitter(),
|
|
103
|
+
documentValidator: config.documentValidator ??
|
|
104
|
+
new GraphWorkflowDocumentValidator_js_1.GraphWorkflowDocumentValidator({
|
|
105
|
+
catalogue,
|
|
106
|
+
limits: config.documentLimits,
|
|
107
|
+
credentialAuthorizer: config.credentialAuthorizer,
|
|
108
|
+
}),
|
|
109
|
+
authValidator: new index_js_4.GraphAuthValidator({
|
|
110
|
+
enabled: config.authEnabled === true,
|
|
111
|
+
...(config.authMatch ? { match: config.authMatch } : {}),
|
|
112
|
+
}),
|
|
113
|
+
...(config.codeSandboxEvaluator
|
|
114
|
+
? { codeSandboxEvaluator: config.codeSandboxEvaluator }
|
|
115
|
+
: {}),
|
|
116
|
+
};
|
|
117
|
+
this._config = config;
|
|
118
|
+
this._client = client;
|
|
119
|
+
await config.onEngineCreated?.(this);
|
|
120
|
+
return { config, client };
|
|
121
|
+
}
|
|
122
|
+
/** Pluggable code sandbox evaluator (§22.4); may be undefined. */
|
|
123
|
+
get codeSandboxEvaluator() {
|
|
124
|
+
return this.client.codeSandboxEvaluator;
|
|
125
|
+
}
|
|
126
|
+
get emitter() {
|
|
127
|
+
return this.client.eventEmitter;
|
|
128
|
+
}
|
|
129
|
+
get planner() {
|
|
130
|
+
return this.client.planner;
|
|
131
|
+
}
|
|
132
|
+
get valueAdapter() {
|
|
133
|
+
return this.client.valueAdapter;
|
|
134
|
+
}
|
|
135
|
+
get defaultOptions() {
|
|
136
|
+
return this.config.defaultOptions ?? {};
|
|
137
|
+
}
|
|
138
|
+
get documentValidator() {
|
|
139
|
+
return this.client.documentValidator;
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Registers an observer on the engine's event pipeline.
|
|
143
|
+
*
|
|
144
|
+
* @param observer - The observer to register.
|
|
145
|
+
* @returns An unsubscribe function that removes the observer.
|
|
146
|
+
*/
|
|
147
|
+
observe(observer) {
|
|
148
|
+
return this.emitter.observe(observer);
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Unregisters an observer from the engine's event pipeline.
|
|
152
|
+
*
|
|
153
|
+
* @param observer - The observer to remove.
|
|
154
|
+
*/
|
|
155
|
+
unObserve(observer) {
|
|
156
|
+
this.emitter.unObserve(observer);
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Dispatches an event to all registered observers.
|
|
160
|
+
*
|
|
161
|
+
* @param event - The event to distribute.
|
|
162
|
+
*/
|
|
163
|
+
async dispatchEvent(event) {
|
|
164
|
+
await this.emitter.updateObservers(event);
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Executes a canonical workflow document with the given inputs and options.
|
|
168
|
+
*
|
|
169
|
+
* Resolution happens internally (DECAF-50 §4.9): the document is validated
|
|
170
|
+
* through the nine-stage gate and resolved against the backend catalogue
|
|
171
|
+
* before planning. Decorated `GraphWorkflowDefinition` objects are NOT
|
|
172
|
+
* accepted — compile them with the §4.18 transition compiler first.
|
|
173
|
+
*
|
|
174
|
+
* @param document - The canonical workflow document to execute.
|
|
175
|
+
* @param inputs - Workflow input values keyed by input port id.
|
|
176
|
+
* @param options - Optional execution overrides (merged over the defaults).
|
|
177
|
+
* @returns The complete execution result, including a `runId`, per-node
|
|
178
|
+
* results, and workflow outputs (or the failure payload).
|
|
179
|
+
* @throws {GraphDocumentValidationError} when the document fails the
|
|
180
|
+
* nine-stage validation gate (carries every structured issue).
|
|
181
|
+
*/
|
|
182
|
+
async execute(document, inputs = {}, options = {}, ...args) {
|
|
183
|
+
const { log, ctx } = (await this.logCtx(args, "execute", true)).for(this.execute);
|
|
184
|
+
log.debug(`Executing workflow '${document.id || document.name}'`);
|
|
185
|
+
const opts = this.mergeOptions(options);
|
|
186
|
+
this.assertNotAborted(opts);
|
|
187
|
+
// Resolve the authenticated principal from the run context (bound by the host
|
|
188
|
+
// AuthHandler) and/or the explicit option, and bind its app parameters onto
|
|
189
|
+
// the run metadata so `ctx.logger` carries them for the whole run.
|
|
190
|
+
const auth = (0, index_js_4.mergeGraphAuthData)((0, index_js_4.graphAuthDataOf)(ctx), opts.auth);
|
|
191
|
+
opts.auth = auth;
|
|
192
|
+
opts.metadata = { ...(opts.metadata ?? {}), ...auth };
|
|
193
|
+
const runId = opts.runId ?? this.generateRunId();
|
|
194
|
+
const path = opts.path ?? [];
|
|
195
|
+
const eventFactory = new GraphExecutionEventFactory_js_1.GraphExecutionEventFactory();
|
|
196
|
+
const valueStore = (0, GraphValueRepository_js_1.createGraphValueRepository)(this.valueAdapter);
|
|
197
|
+
valueStore.seedWorkflowInputs(this.withWorkflowInputDefaults(document, inputs));
|
|
198
|
+
const emitFn = async (partial) => {
|
|
199
|
+
await this.emitEvent(frame, {
|
|
200
|
+
type: partial.type ?? index_js_2.GraphExecutionEventType.NODE_OUTPUT,
|
|
201
|
+
runId,
|
|
202
|
+
parentRunId: opts.parentRunId,
|
|
203
|
+
workflowId: document.id || document.name,
|
|
204
|
+
nodeId: partial.nodeId,
|
|
205
|
+
path: partial.path ?? path,
|
|
206
|
+
...partial,
|
|
207
|
+
});
|
|
208
|
+
};
|
|
209
|
+
const emitValidationEvent = async (partial) => {
|
|
210
|
+
const event = eventFactory.create({
|
|
211
|
+
id: "",
|
|
212
|
+
sequence: 0,
|
|
213
|
+
timestamp: new Date(),
|
|
214
|
+
runId,
|
|
215
|
+
parentRunId: opts.parentRunId,
|
|
216
|
+
workflowId: document.id || document.name,
|
|
217
|
+
path,
|
|
218
|
+
...partial,
|
|
219
|
+
});
|
|
220
|
+
await this.emitter.updateObservers(event);
|
|
221
|
+
};
|
|
222
|
+
// ------------------------------------------------------------------
|
|
223
|
+
// Validation + resolution (nine-stage gate, §4.8) — internal.
|
|
224
|
+
// ------------------------------------------------------------------
|
|
225
|
+
await emitValidationEvent({
|
|
226
|
+
type: index_js_2.GraphExecutionEventType.VALIDATION_STARTED,
|
|
227
|
+
status: index_js_2.GraphExecutionStatus.PLANNING,
|
|
228
|
+
});
|
|
229
|
+
const validation = await this.documentValidator.validate(document, 0, ctx);
|
|
230
|
+
if (!validation.valid || !validation.resolved) {
|
|
231
|
+
await emitValidationEvent({
|
|
232
|
+
type: index_js_2.GraphExecutionEventType.VALIDATION_FAILED,
|
|
233
|
+
status: index_js_2.GraphExecutionStatus.FAILED,
|
|
234
|
+
payload: { issues: validation.issues },
|
|
235
|
+
});
|
|
236
|
+
throw new GraphValidationErrors_js_1.GraphDocumentValidationError(`Graph workflow document '${document.id}' failed validation with ${validation.issues.length} issue(s)`, validation.issues);
|
|
237
|
+
}
|
|
238
|
+
await emitValidationEvent({
|
|
239
|
+
type: index_js_2.GraphExecutionEventType.VALIDATION_COMPLETED,
|
|
240
|
+
status: index_js_2.GraphExecutionStatus.PLANNING,
|
|
241
|
+
payload: { issues: validation.issues.length },
|
|
242
|
+
});
|
|
243
|
+
this.assertNotAborted(opts);
|
|
244
|
+
const plan = await this.planner.plan(validation.resolved);
|
|
245
|
+
// Authorize the full workflow AND every planned node against the
|
|
246
|
+
// authenticated principal before any node executes. A workflow/node that
|
|
247
|
+
// declares namespaces fails closed when the principal holds none of them.
|
|
248
|
+
this.client.authValidator.validate(document, plan, auth, log);
|
|
249
|
+
log.debug(`Authorized workflow '${document.id || document.name}' for user ${auth.user ?? "anonymous"}`);
|
|
250
|
+
const frame = new GraphExecutionFrame_js_1.GraphExecutionFrame(runId, plan, valueStore, eventFactory);
|
|
251
|
+
await this.emitEvent(frame, {
|
|
252
|
+
type: index_js_2.GraphExecutionEventType.WORKFLOW_STARTED,
|
|
253
|
+
runId,
|
|
254
|
+
parentRunId: opts.parentRunId,
|
|
255
|
+
workflowId: plan.workflowId,
|
|
256
|
+
path,
|
|
257
|
+
status: index_js_2.GraphExecutionStatus.RUNNING,
|
|
258
|
+
payload: { inputs },
|
|
259
|
+
});
|
|
260
|
+
await this.emitEvent(frame, {
|
|
261
|
+
type: index_js_2.GraphExecutionEventType.WORKFLOW_PLANNED,
|
|
262
|
+
runId,
|
|
263
|
+
parentRunId: opts.parentRunId,
|
|
264
|
+
workflowId: plan.workflowId,
|
|
265
|
+
path,
|
|
266
|
+
status: index_js_2.GraphExecutionStatus.PLANNING,
|
|
267
|
+
payload: { layers: plan.layers.length, nodes: plan.nodes.length },
|
|
268
|
+
});
|
|
269
|
+
try {
|
|
270
|
+
for (const layer of plan.layers) {
|
|
271
|
+
this.assertNotAborted(opts);
|
|
272
|
+
await this.executeLayer(frame, plan, layer.nodes, opts, emitFn);
|
|
273
|
+
}
|
|
274
|
+
this.assertNotAborted(opts);
|
|
275
|
+
const firstFailure = [...frame.nodeResults.values()].find((result) => result.status === index_js_2.GraphExecutionStatus.FAILED);
|
|
276
|
+
if (firstFailure?.error) {
|
|
277
|
+
throw new index_js_3.GraphExecutionError(firstFailure.error.message, firstFailure.error.code ?? "GRAPH_EXECUTION_ERROR", firstFailure.error.details);
|
|
278
|
+
}
|
|
279
|
+
frame.finish();
|
|
280
|
+
await this.emitEvent(frame, {
|
|
281
|
+
type: index_js_2.GraphExecutionEventType.WORKFLOW_COMPLETED,
|
|
282
|
+
runId,
|
|
283
|
+
parentRunId: opts.parentRunId,
|
|
284
|
+
workflowId: plan.workflowId,
|
|
285
|
+
path,
|
|
286
|
+
status: index_js_2.GraphExecutionStatus.SUCCEEDED,
|
|
287
|
+
payload: { outputs: valueStore.getWorkflowValues() },
|
|
288
|
+
});
|
|
289
|
+
return (0, GraphExecutionResult_js_1.buildGraphExecutionResult)(frame, document, inputs, index_js_2.GraphExecutionStatus.SUCCEEDED, opts.metadata);
|
|
290
|
+
}
|
|
291
|
+
catch (error) {
|
|
292
|
+
// A cooperative `GraphBreakSignal` is loop-control flow, not a workflow
|
|
293
|
+
// failure: propagate it unchanged so the enclosing loop executor can stop
|
|
294
|
+
// iterating instead of seeing a failed child run.
|
|
295
|
+
if (error instanceof index_js_3.GraphBreakSignal) {
|
|
296
|
+
frame.finish();
|
|
297
|
+
throw error;
|
|
298
|
+
}
|
|
299
|
+
frame.finish();
|
|
300
|
+
const errorPayload = this.toErrorPayload(error);
|
|
301
|
+
if (error instanceof index_js_3.GraphRunCancelledError ||
|
|
302
|
+
opts.abortSignal?.aborted === true) {
|
|
303
|
+
await this.emitEvent(frame, {
|
|
304
|
+
type: index_js_2.GraphExecutionEventType.WORKFLOW_CANCELLED,
|
|
305
|
+
runId,
|
|
306
|
+
parentRunId: opts.parentRunId,
|
|
307
|
+
workflowId: plan.workflowId,
|
|
308
|
+
path,
|
|
309
|
+
status: index_js_2.GraphExecutionStatus.CANCELLED,
|
|
310
|
+
error: errorPayload,
|
|
311
|
+
});
|
|
312
|
+
return (0, GraphExecutionResult_js_1.buildGraphExecutionResult)(frame, document, inputs, index_js_2.GraphExecutionStatus.CANCELLED, opts.metadata);
|
|
313
|
+
}
|
|
314
|
+
await this.emitEvent(frame, {
|
|
315
|
+
type: index_js_2.GraphExecutionEventType.WORKFLOW_FAILED,
|
|
316
|
+
runId,
|
|
317
|
+
parentRunId: opts.parentRunId,
|
|
318
|
+
workflowId: plan.workflowId,
|
|
319
|
+
path,
|
|
320
|
+
status: index_js_2.GraphExecutionStatus.FAILED,
|
|
321
|
+
error: errorPayload,
|
|
322
|
+
});
|
|
323
|
+
return (0, GraphExecutionResult_js_1.buildGraphExecutionResult)(frame, document, inputs, index_js_2.GraphExecutionStatus.FAILED, opts.metadata);
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
/**
|
|
327
|
+
* Pins a node and its upstream dependencies after a completed run.
|
|
328
|
+
*
|
|
329
|
+
* Delegates to {@link GraphPinningService}. The plan and result must come
|
|
330
|
+
* from a prior successful execution of the same workflow.
|
|
331
|
+
*/
|
|
332
|
+
async pinNode(options) {
|
|
333
|
+
const service = this.createPinningService();
|
|
334
|
+
await service.pinNode(options);
|
|
335
|
+
await this.emitPinningEvent(options.nodeId, index_js_2.GraphExecutionEventType.NODE_PINNED);
|
|
336
|
+
}
|
|
337
|
+
/**
|
|
338
|
+
* Unpins a node by its fingerprint.
|
|
339
|
+
*/
|
|
340
|
+
async unpinNode(options) {
|
|
341
|
+
const service = this.createPinningService();
|
|
342
|
+
await service.unpinNode(options);
|
|
343
|
+
await this.emitPinningEvent(options.nodeId, index_js_2.GraphExecutionEventType.NODE_UNPINNED);
|
|
344
|
+
}
|
|
345
|
+
/**
|
|
346
|
+
* Creates a {@link GraphPinningService} backed by this engine's value store
|
|
347
|
+
* adapter.
|
|
348
|
+
*/
|
|
349
|
+
createPinningService() {
|
|
350
|
+
const store = (0, GraphValueRepository_js_1.createGraphValueRepository)(this.valueAdapter);
|
|
351
|
+
return new GraphPinningService_js_1.GraphPinningService(store, new GraphPinningPolicy_js_1.GraphPinningPolicy(), new GraphPinningDependencyResolver_js_1.GraphPinningDependencyResolver());
|
|
352
|
+
}
|
|
353
|
+
/**
|
|
354
|
+
* Emits a pinning-related event to all observers.
|
|
355
|
+
*/
|
|
356
|
+
async emitPinningEvent(nodeId, type) {
|
|
357
|
+
const factory = new GraphExecutionEventFactory_js_1.GraphExecutionEventFactory();
|
|
358
|
+
const event = factory.create({
|
|
359
|
+
id: "",
|
|
360
|
+
sequence: 0,
|
|
361
|
+
timestamp: new Date(),
|
|
362
|
+
runId: "pinning",
|
|
363
|
+
workflowId: "",
|
|
364
|
+
type,
|
|
365
|
+
nodeId,
|
|
366
|
+
path: [],
|
|
367
|
+
});
|
|
368
|
+
await this.emitter.updateObservers(event);
|
|
369
|
+
}
|
|
370
|
+
/**
|
|
371
|
+
* Fills unprovided workflow inputs with their declared port defaults.
|
|
372
|
+
*/
|
|
373
|
+
withWorkflowInputDefaults(document, inputs) {
|
|
374
|
+
const seeded = { ...inputs };
|
|
375
|
+
for (const port of document.inputs) {
|
|
376
|
+
if (seeded[port.id] === undefined &&
|
|
377
|
+
port.defaultValue !== undefined) {
|
|
378
|
+
seeded[port.id] = port.defaultValue;
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
return seeded;
|
|
382
|
+
}
|
|
383
|
+
/**
|
|
384
|
+
* Executes a layer of nodes with the configured concurrency.
|
|
385
|
+
*/
|
|
386
|
+
async executeLayer(frame, plan, nodes, opts, emitFn) {
|
|
387
|
+
const concurrency = Math.max(1, opts.concurrency ?? constants_js_1.GRAPH_DEFAULT_CONCURRENCY);
|
|
388
|
+
const queue = [...nodes];
|
|
389
|
+
while (queue.length > 0) {
|
|
390
|
+
const batch = queue.splice(0, concurrency);
|
|
391
|
+
await Promise.all(batch.map((node) => this.executeNode(frame, plan, node, opts, emitFn)));
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
/**
|
|
395
|
+
* Executes a single node, honouring disabled-node semantics (§4.9).
|
|
396
|
+
*/
|
|
397
|
+
async executeNode(frame, plan, planNode, opts, emitFn) {
|
|
398
|
+
this.assertNotAborted(opts);
|
|
399
|
+
if (!this.isNodeActivated(frame, plan, planNode)) {
|
|
400
|
+
await this.skipInactiveNode(frame, plan, planNode, opts);
|
|
401
|
+
return;
|
|
402
|
+
}
|
|
403
|
+
if (planNode.instance.disabled === true) {
|
|
404
|
+
await this.executeDisabledNode(frame, plan, planNode, opts);
|
|
405
|
+
return;
|
|
406
|
+
}
|
|
407
|
+
const startedAt = new Date();
|
|
408
|
+
const nodePath = [...(opts.path ?? []), planNode.id];
|
|
409
|
+
await this.emitEvent(frame, {
|
|
410
|
+
type: index_js_2.GraphExecutionEventType.NODE_STARTED,
|
|
411
|
+
runId: frame.runId,
|
|
412
|
+
workflowId: plan.workflowId,
|
|
413
|
+
nodeId: planNode.id,
|
|
414
|
+
path: nodePath,
|
|
415
|
+
status: index_js_2.GraphExecutionStatus.RUNNING,
|
|
416
|
+
});
|
|
417
|
+
this.emitNodeStateChanged(frame, plan, planNode, nodePath, index_js_2.GraphVisualState.RUNNING, index_js_2.GraphExecutionStatus.RUNNING);
|
|
418
|
+
const inputs = await this.resolveNodeInputs(frame, plan, planNode, opts);
|
|
419
|
+
// Cache-hit: check for a pinned value before executing the node
|
|
420
|
+
if (opts.usePinnedValues) {
|
|
421
|
+
const cached = await this.tryPinnedValue(frame, plan, planNode, inputs);
|
|
422
|
+
if (cached) {
|
|
423
|
+
frame.valueStore.setNodeOutputs(planNode.id, cached.outputs);
|
|
424
|
+
this.routeOutgoingEdges(frame, plan, planNode, cached.outputs);
|
|
425
|
+
const finishedAt = new Date();
|
|
426
|
+
const result = {
|
|
427
|
+
nodeId: planNode.id,
|
|
428
|
+
status: index_js_2.GraphExecutionStatus.CACHED,
|
|
429
|
+
inputs,
|
|
430
|
+
outputs: cached.outputs,
|
|
431
|
+
startedAt,
|
|
432
|
+
finishedAt,
|
|
433
|
+
fromCache: true,
|
|
434
|
+
pinned: true,
|
|
435
|
+
events: [],
|
|
436
|
+
};
|
|
437
|
+
frame.recordNodeResult(result);
|
|
438
|
+
await this.emitEvent(frame, {
|
|
439
|
+
type: index_js_2.GraphExecutionEventType.NODE_CACHE_HIT,
|
|
440
|
+
runId: frame.runId,
|
|
441
|
+
workflowId: plan.workflowId,
|
|
442
|
+
nodeId: planNode.id,
|
|
443
|
+
path: nodePath,
|
|
444
|
+
status: index_js_2.GraphExecutionStatus.CACHED,
|
|
445
|
+
payload: { outputs: cached.outputs },
|
|
446
|
+
});
|
|
447
|
+
await this.emitEvent(frame, {
|
|
448
|
+
type: index_js_2.GraphExecutionEventType.NODE_COMPLETED,
|
|
449
|
+
runId: frame.runId,
|
|
450
|
+
workflowId: plan.workflowId,
|
|
451
|
+
nodeId: planNode.id,
|
|
452
|
+
path: nodePath,
|
|
453
|
+
status: index_js_2.GraphExecutionStatus.SUCCEEDED,
|
|
454
|
+
payload: { outputs: cached.outputs, fromCache: true },
|
|
455
|
+
});
|
|
456
|
+
this.emitNodeStateChanged(frame, plan, planNode, nodePath, index_js_2.GraphVisualState.SUCCEEDED, index_js_2.GraphExecutionStatus.SUCCEEDED);
|
|
457
|
+
return;
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
try {
|
|
461
|
+
const context = new GraphExecutionContext_js_1.GraphExecutionContext(frame.runId, opts.parentRunId, plan.workflowId, plan.resolved.document, planNode.instance, planNode.manifest, nodePath, emitFn, opts.metadata, this, opts.abortSignal, this.executionLimits(opts));
|
|
462
|
+
const parameters = await this.resolveNodeParameters(planNode, inputs, opts);
|
|
463
|
+
const request = {
|
|
464
|
+
nodeId: planNode.id,
|
|
465
|
+
kind: planNode.kind,
|
|
466
|
+
inputs,
|
|
467
|
+
parameters,
|
|
468
|
+
credentials: this.collectCredentials(planNode),
|
|
469
|
+
metadata: planNode.instance.metadata,
|
|
470
|
+
};
|
|
471
|
+
const rawOutputs = await this.invokeExecutor(planNode, request, context);
|
|
472
|
+
const outputs = this.validateNodeOutputs(planNode, rawOutputs ?? {});
|
|
473
|
+
frame.valueStore.setNodeOutputs(planNode.id, outputs);
|
|
474
|
+
this.routeOutgoingEdges(frame, plan, planNode, outputs);
|
|
475
|
+
const finishedAt = new Date();
|
|
476
|
+
const result = {
|
|
477
|
+
nodeId: planNode.id,
|
|
478
|
+
status: index_js_2.GraphExecutionStatus.SUCCEEDED,
|
|
479
|
+
inputs,
|
|
480
|
+
outputs,
|
|
481
|
+
startedAt,
|
|
482
|
+
finishedAt,
|
|
483
|
+
events: [],
|
|
484
|
+
};
|
|
485
|
+
frame.recordNodeResult(result);
|
|
486
|
+
await this.emitEvent(frame, {
|
|
487
|
+
type: index_js_2.GraphExecutionEventType.NODE_COMPLETED,
|
|
488
|
+
runId: frame.runId,
|
|
489
|
+
workflowId: plan.workflowId,
|
|
490
|
+
nodeId: planNode.id,
|
|
491
|
+
path: nodePath,
|
|
492
|
+
status: index_js_2.GraphExecutionStatus.SUCCEEDED,
|
|
493
|
+
payload: { outputs },
|
|
494
|
+
});
|
|
495
|
+
this.emitNodeStateChanged(frame, plan, planNode, nodePath, index_js_2.GraphVisualState.SUCCEEDED, index_js_2.GraphExecutionStatus.SUCCEEDED);
|
|
496
|
+
}
|
|
497
|
+
catch (error) {
|
|
498
|
+
// Loop-control flow is not a node failure: rethrow the break token so
|
|
499
|
+
// the enclosing loop executor observes it rather than a FAILED node.
|
|
500
|
+
if (error instanceof index_js_3.GraphBreakSignal)
|
|
501
|
+
throw error;
|
|
502
|
+
const finishedAt = new Date();
|
|
503
|
+
const errorPayload = this.toErrorPayload(error);
|
|
504
|
+
const result = {
|
|
505
|
+
nodeId: planNode.id,
|
|
506
|
+
status: index_js_2.GraphExecutionStatus.FAILED,
|
|
507
|
+
inputs,
|
|
508
|
+
error: errorPayload,
|
|
509
|
+
startedAt,
|
|
510
|
+
finishedAt,
|
|
511
|
+
events: [],
|
|
512
|
+
};
|
|
513
|
+
frame.recordNodeResult(result);
|
|
514
|
+
await this.emitEvent(frame, {
|
|
515
|
+
type: index_js_2.GraphExecutionEventType.NODE_FAILED,
|
|
516
|
+
runId: frame.runId,
|
|
517
|
+
workflowId: plan.workflowId,
|
|
518
|
+
nodeId: planNode.id,
|
|
519
|
+
path: nodePath,
|
|
520
|
+
status: index_js_2.GraphExecutionStatus.FAILED,
|
|
521
|
+
error: errorPayload,
|
|
522
|
+
});
|
|
523
|
+
this.emitNodeStateChanged(frame, plan, planNode, nodePath, index_js_2.GraphVisualState.FAILED, index_js_2.GraphExecutionStatus.FAILED);
|
|
524
|
+
if (opts.failFast ?? true)
|
|
525
|
+
throw error;
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
/**
|
|
529
|
+
* Resolves whether a plan node is activated for execution under the
|
|
530
|
+
* DECAF-50 §4.9 branch semantics. A node with no incoming data edges is
|
|
531
|
+
* a root/source node and always runs. A node fed by one or more data
|
|
532
|
+
* edges runs only when at least one of those edges was activated by a
|
|
533
|
+
* routed upstream output port — a branch the upstream switch (or any
|
|
534
|
+
* partial-output node) did not select leaves its downstream edges
|
|
535
|
+
* unactivated, so the branch is never executed. Workflow-boundary edges
|
|
536
|
+
* are active from the start because workflow inputs are seeded before
|
|
537
|
+
* execution begins.
|
|
538
|
+
*/
|
|
539
|
+
isNodeActivated(frame, plan, planNode) {
|
|
540
|
+
const incoming = (plan.incomingByNode.get(planNode.id) ?? []).filter((edge) => edge.type === "data");
|
|
541
|
+
if (incoming.length === 0)
|
|
542
|
+
return true;
|
|
543
|
+
return incoming.some((edge) => edge.sourceNodeId === constants_js_1.GRAPH_WORKFLOW_BOUNDARY ||
|
|
544
|
+
frame.isDataEdgeActive(edge.id));
|
|
545
|
+
}
|
|
546
|
+
/**
|
|
547
|
+
* Skips a node whose incoming data edges were all left unactivated by an
|
|
548
|
+
* upstream branch selection. The node is not executed and its outputs are
|
|
549
|
+
* never routed or collected into workflow outputs (DECAF-50 §4.9).
|
|
550
|
+
*/
|
|
551
|
+
async skipInactiveNode(frame, plan, planNode, opts) {
|
|
552
|
+
const startedAt = new Date();
|
|
553
|
+
const nodePath = [...(opts.path ?? []), planNode.id];
|
|
554
|
+
await this.emitEvent(frame, {
|
|
555
|
+
type: index_js_2.GraphExecutionEventType.NODE_SKIPPED,
|
|
556
|
+
runId: frame.runId,
|
|
557
|
+
workflowId: plan.workflowId,
|
|
558
|
+
nodeId: planNode.id,
|
|
559
|
+
path: nodePath,
|
|
560
|
+
status: index_js_2.GraphExecutionStatus.SKIPPED,
|
|
561
|
+
payload: { reason: "branchNotSelected" },
|
|
562
|
+
});
|
|
563
|
+
const result = {
|
|
564
|
+
nodeId: planNode.id,
|
|
565
|
+
status: index_js_2.GraphExecutionStatus.SKIPPED,
|
|
566
|
+
inputs: {},
|
|
567
|
+
startedAt,
|
|
568
|
+
finishedAt: new Date(),
|
|
569
|
+
events: [],
|
|
570
|
+
};
|
|
571
|
+
frame.recordNodeResult(result);
|
|
572
|
+
this.emitNodeStateChanged(frame, plan, planNode, nodePath, index_js_2.GraphVisualState.SKIPPED, index_js_2.GraphExecutionStatus.SKIPPED);
|
|
573
|
+
}
|
|
574
|
+
/**
|
|
575
|
+
* Applies the explicit disabled-node semantics (§4.9):
|
|
576
|
+
* `skip`, `passThroughFirstInput`, or `emitDefaults`, resolved from the
|
|
577
|
+
* instance metadata, document settings, and the default.
|
|
578
|
+
*/
|
|
579
|
+
async executeDisabledNode(frame, plan, planNode, opts) {
|
|
580
|
+
const startedAt = new Date();
|
|
581
|
+
const nodePath = [...(opts.path ?? []), planNode.id];
|
|
582
|
+
const behavior = GraphParameterValidator_js_1.GraphParameterValidator.disabledBehaviorOf(planNode.instance, plan.resolved.document.settings);
|
|
583
|
+
await this.emitEvent(frame, {
|
|
584
|
+
type: index_js_2.GraphExecutionEventType.NODE_SKIPPED,
|
|
585
|
+
runId: frame.runId,
|
|
586
|
+
workflowId: plan.workflowId,
|
|
587
|
+
nodeId: planNode.id,
|
|
588
|
+
path: nodePath,
|
|
589
|
+
status: index_js_2.GraphExecutionStatus.SKIPPED,
|
|
590
|
+
payload: { disabled: true, behavior },
|
|
591
|
+
});
|
|
592
|
+
if (behavior === "skip") {
|
|
593
|
+
const result = {
|
|
594
|
+
nodeId: planNode.id,
|
|
595
|
+
status: index_js_2.GraphExecutionStatus.SKIPPED,
|
|
596
|
+
inputs: {},
|
|
597
|
+
startedAt,
|
|
598
|
+
finishedAt: new Date(),
|
|
599
|
+
events: [],
|
|
600
|
+
};
|
|
601
|
+
frame.recordNodeResult(result);
|
|
602
|
+
this.emitNodeStateChanged(frame, plan, planNode, nodePath, index_js_2.GraphVisualState.SKIPPED, index_js_2.GraphExecutionStatus.SKIPPED);
|
|
603
|
+
return;
|
|
604
|
+
}
|
|
605
|
+
const inputs = await this.resolveNodeInputs(frame, plan, planNode, opts);
|
|
606
|
+
let outputs;
|
|
607
|
+
if (behavior === "passThroughFirstInput") {
|
|
608
|
+
const firstIncoming = (plan.incomingByNode.get(planNode.id) ?? []).find((edge) => edge.type === "data");
|
|
609
|
+
const firstOutput = planNode.manifest.outputs[0]?.id ?? "value";
|
|
610
|
+
const value = firstIncoming
|
|
611
|
+
? frame.valueStore.getPort(firstIncoming.sourceNodeId, firstIncoming.sourcePort)
|
|
612
|
+
: Object.values(inputs)[0];
|
|
613
|
+
outputs = { [firstOutput]: value };
|
|
614
|
+
}
|
|
615
|
+
else {
|
|
616
|
+
// emitDefaults — every declared output port is emitted with its
|
|
617
|
+
// declared default (absent a declared default, undefined).
|
|
618
|
+
outputs = {};
|
|
619
|
+
for (const port of planNode.manifest.outputs) {
|
|
620
|
+
outputs[port.id] = port.metadata?.["defaultValue"];
|
|
621
|
+
}
|
|
622
|
+
}
|
|
623
|
+
frame.valueStore.setNodeOutputs(planNode.id, outputs);
|
|
624
|
+
this.routeOutgoingEdges(frame, plan, planNode, outputs);
|
|
625
|
+
const result = {
|
|
626
|
+
nodeId: planNode.id,
|
|
627
|
+
status: index_js_2.GraphExecutionStatus.SUCCEEDED,
|
|
628
|
+
inputs,
|
|
629
|
+
outputs,
|
|
630
|
+
startedAt,
|
|
631
|
+
finishedAt: new Date(),
|
|
632
|
+
events: [],
|
|
633
|
+
};
|
|
634
|
+
frame.recordNodeResult(result);
|
|
635
|
+
this.emitNodeStateChanged(frame, plan, planNode, nodePath, index_js_2.GraphVisualState.SUCCEEDED, index_js_2.GraphExecutionStatus.SUCCEEDED);
|
|
636
|
+
}
|
|
637
|
+
/**
|
|
638
|
+
* Invokes the node's catalogue-resolved executor (§4.9 request contract,
|
|
639
|
+
* post-cutover: every executor receives the full request with
|
|
640
|
+
* configuration and input data separated).
|
|
641
|
+
*/
|
|
642
|
+
async invokeExecutor(planNode, request, context) {
|
|
643
|
+
return await planNode.executor.execute(request, context);
|
|
644
|
+
}
|
|
645
|
+
/**
|
|
646
|
+
* Validates executor outputs against the effective output manifest
|
|
647
|
+
* (§4.9): unknown outputs are rejected by default; missing required
|
|
648
|
+
* outputs fail the node. Lenient transition manifests (legacy
|
|
649
|
+
* executor-only registrations) are exempt until cutover.
|
|
650
|
+
*/
|
|
651
|
+
validateNodeOutputs(planNode, outputs) {
|
|
652
|
+
const manifest = planNode.manifest;
|
|
653
|
+
if (manifest.policies?.allowUnknownOutputs === true) {
|
|
654
|
+
return outputs;
|
|
655
|
+
}
|
|
656
|
+
const declaredOutputs = new Set(manifest.outputs.map((port) => port.id));
|
|
657
|
+
const unknownOutputs = Object.keys(outputs).filter((key) => !declaredOutputs.has(key));
|
|
658
|
+
if (unknownOutputs.length > 0) {
|
|
659
|
+
throw new index_js_3.GraphExecutionError(`Node '${planNode.id}' of kind '${planNode.kind}' produced unknown output(s): ${unknownOutputs.join(", ")}`, "GRAPH_OUTPUT_VALIDATION_FAILED", { nodeId: planNode.id, unknownOutputs });
|
|
660
|
+
}
|
|
661
|
+
const missingRequired = manifest.outputs
|
|
662
|
+
.filter((port) => port.required === true && !(port.id in outputs))
|
|
663
|
+
.map((port) => port.id);
|
|
664
|
+
if (missingRequired.length > 0) {
|
|
665
|
+
throw new index_js_3.GraphExecutionError(`Node '${planNode.id}' of kind '${planNode.kind}' did not produce required output(s): ${missingRequired.join(", ")}`, "GRAPH_OUTPUT_VALIDATION_FAILED", { nodeId: planNode.id, missingRequired });
|
|
666
|
+
}
|
|
667
|
+
return outputs;
|
|
668
|
+
}
|
|
669
|
+
/**
|
|
670
|
+
* Collects the resolved credential references for a node: credential-type
|
|
671
|
+
* parameter values plus the `credentials` record in instance metadata.
|
|
672
|
+
* Documents carry references only — secret material never enters requests.
|
|
673
|
+
*/
|
|
674
|
+
collectCredentials(planNode) {
|
|
675
|
+
const credentials = {};
|
|
676
|
+
for (const parameter of planNode.manifest.parameters) {
|
|
677
|
+
if (parameter.type !== "credential")
|
|
678
|
+
continue;
|
|
679
|
+
const value = (planNode.instance.parameters ?? {})[parameter.id];
|
|
680
|
+
if (typeof value === "string" && value.length > 0) {
|
|
681
|
+
credentials[parameter.id] = {
|
|
682
|
+
credentialId: value,
|
|
683
|
+
credentialType: parameter.credentialType ?? "",
|
|
684
|
+
};
|
|
685
|
+
}
|
|
686
|
+
else if ((0, GraphParameterValidator_js_1.isGraphCredentialReferenceLike)(value)) {
|
|
687
|
+
credentials[parameter.id] = {
|
|
688
|
+
credentialId: value.credentialId,
|
|
689
|
+
credentialType: value.credentialType,
|
|
690
|
+
};
|
|
691
|
+
}
|
|
692
|
+
}
|
|
693
|
+
const extra = (planNode.instance.metadata ?? {})["credentials"];
|
|
694
|
+
if (extra && typeof extra === "object" && !Array.isArray(extra)) {
|
|
695
|
+
for (const [key, raw] of Object.entries(extra)) {
|
|
696
|
+
const value = raw;
|
|
697
|
+
if (typeof value === "string" && value.length > 0) {
|
|
698
|
+
credentials[key] = { credentialId: value, credentialType: "" };
|
|
699
|
+
}
|
|
700
|
+
else if ((0, GraphParameterValidator_js_1.isGraphCredentialReferenceLike)(value)) {
|
|
701
|
+
credentials[key] = {
|
|
702
|
+
credentialId: value.credentialId,
|
|
703
|
+
credentialType: value.credentialType,
|
|
704
|
+
};
|
|
705
|
+
}
|
|
706
|
+
}
|
|
707
|
+
}
|
|
708
|
+
return credentials;
|
|
709
|
+
}
|
|
710
|
+
/**
|
|
711
|
+
* Resolves a node's input values from routed data edges, literal bindings,
|
|
712
|
+
* allowed expression bindings, and manifest port defaults (§4.9).
|
|
713
|
+
*
|
|
714
|
+
* When multiple edges target the same port, their values are spread into the
|
|
715
|
+
* top-level inputs keyed by each edge's `sourcePort`. This allows multiple
|
|
716
|
+
* workflow input badges to connect to a single port (e.g. the Code node's
|
|
717
|
+
* `data` port) and have all values accessible directly as
|
|
718
|
+
* `$input.{sourcePort}` (e.g. `$input.count`, `$input.text`).
|
|
719
|
+
*/
|
|
720
|
+
async resolveNodeInputs(frame, plan, planNode, opts) {
|
|
721
|
+
const inputs = {};
|
|
722
|
+
const incoming = (plan.incomingByNode.get(planNode.id) ?? []).filter((edge) => edge.type === "data");
|
|
723
|
+
const edgesByTarget = new Map();
|
|
724
|
+
for (const edge of incoming) {
|
|
725
|
+
const list = edgesByTarget.get(edge.targetPort) ?? [];
|
|
726
|
+
list.push(edge);
|
|
727
|
+
edgesByTarget.set(edge.targetPort, list);
|
|
728
|
+
}
|
|
729
|
+
for (const [targetPort, edges] of edgesByTarget) {
|
|
730
|
+
if (edges.length === 1) {
|
|
731
|
+
inputs[targetPort] = frame.valueStore.getPort(edges[0].sourceNodeId, edges[0].sourcePort);
|
|
732
|
+
}
|
|
733
|
+
else {
|
|
734
|
+
let definedValue;
|
|
735
|
+
let hasDefined = false;
|
|
736
|
+
for (const edge of edges) {
|
|
737
|
+
const value = frame.valueStore.getPort(edge.sourceNodeId, edge.sourcePort);
|
|
738
|
+
inputs[edge.sourcePort] = value;
|
|
739
|
+
if (value !== undefined) {
|
|
740
|
+
definedValue = value;
|
|
741
|
+
hasDefined = true;
|
|
742
|
+
}
|
|
743
|
+
}
|
|
744
|
+
// Branch merges route several mutually-exclusive outputs onto the same
|
|
745
|
+
// target port (e.g. an if/switch branch). The port-keyed map above
|
|
746
|
+
// preserves distinct source ports, but the target port must also receive
|
|
747
|
+
// the single defined branch value so the node reads its own port.
|
|
748
|
+
if (hasDefined && inputs[targetPort] === undefined) {
|
|
749
|
+
inputs[targetPort] = definedValue;
|
|
750
|
+
}
|
|
751
|
+
}
|
|
752
|
+
}
|
|
753
|
+
// Literal bindings, expression bindings, and manifest defaults.
|
|
754
|
+
const bindings = planNode.instance.inputBindings ?? {};
|
|
755
|
+
for (const port of planNode.manifest.inputs) {
|
|
756
|
+
const binding = bindings[port.id];
|
|
757
|
+
if (binding?.mode === "literal") {
|
|
758
|
+
inputs[port.id] = binding.value;
|
|
759
|
+
}
|
|
760
|
+
else if (binding?.mode === "expression") {
|
|
761
|
+
inputs[port.id] = await this.evaluateExpressionBinding(planNode, binding.expression, inputs, opts);
|
|
762
|
+
}
|
|
763
|
+
else if (inputs[port.id] === undefined) {
|
|
764
|
+
const defaultValue = port.metadata?.["defaultValue"];
|
|
765
|
+
if (defaultValue !== undefined) {
|
|
766
|
+
inputs[port.id] = defaultValue;
|
|
767
|
+
}
|
|
768
|
+
}
|
|
769
|
+
}
|
|
770
|
+
return inputs;
|
|
771
|
+
}
|
|
772
|
+
/**
|
|
773
|
+
* Resolves a node's persisted parameters at execution time, evaluating any
|
|
774
|
+
* `GraphValueTemplate` user property through the code-evaluator VM and
|
|
775
|
+
* leaving straight literal values unchanged.
|
|
776
|
+
*/
|
|
777
|
+
async resolveNodeParameters(planNode, inputs, opts) {
|
|
778
|
+
const parameters = planNode.instance.parameters ?? {};
|
|
779
|
+
const resolved = {};
|
|
780
|
+
for (const [key, value] of Object.entries(parameters)) {
|
|
781
|
+
resolved[key] = (0, index_js_1.isGraphValueTemplate)(value)
|
|
782
|
+
? await this.evaluateValueTemplate(value, planNode, inputs, opts)
|
|
783
|
+
: value;
|
|
784
|
+
}
|
|
785
|
+
return resolved;
|
|
786
|
+
}
|
|
787
|
+
/**
|
|
788
|
+
* Evaluates a persisted `GraphValueTemplate` with the pluggable
|
|
789
|
+
* {@link CodeSandboxEvaluator} (DECAF-32 §22.4) — no new evaluator.
|
|
790
|
+
* `expression` mode evaluates the body directly; `template` mode compiles its
|
|
791
|
+
* `{{ ... }}` placeholders into a JavaScript template literal evaluated in
|
|
792
|
+
* the same sandbox, so both modes share the code-evaluator VM.
|
|
793
|
+
*/
|
|
794
|
+
async evaluateValueTemplate(template, planNode, inputs, opts) {
|
|
795
|
+
const evaluator = this.codeSandboxEvaluator;
|
|
796
|
+
if (!evaluator) {
|
|
797
|
+
throw new index_js_3.GraphExecutionError(`Value template on node '${planNode.id}' requires a CodeSandboxEvaluator to be registered in GraphExecutionEngineConfig.codeSandboxEvaluator`, "GRAPH_CODE_SANDBOX_NOT_CONFIGURED", { nodeId: planNode.id });
|
|
798
|
+
}
|
|
799
|
+
const language = template.language ?? (0, index_js_1.graphValueTemplateDefaultLanguage)(template.mode);
|
|
800
|
+
const code = template.mode === "template"
|
|
801
|
+
? graphTemplateToExpression(template.expression)
|
|
802
|
+
: template.expression;
|
|
803
|
+
const md = opts.metadata;
|
|
804
|
+
const result = await evaluator.evaluate({
|
|
805
|
+
code,
|
|
806
|
+
language: language === "typescript" ? "typescript" : "javascript",
|
|
807
|
+
input: inputs,
|
|
808
|
+
vars: md?.vars ?? undefined,
|
|
809
|
+
item: md?.item,
|
|
810
|
+
index: md?.index,
|
|
811
|
+
abortSignal: opts.abortSignal,
|
|
812
|
+
});
|
|
813
|
+
return result;
|
|
814
|
+
}
|
|
815
|
+
/**
|
|
816
|
+
* Evaluates an expression binding with the EXISTING allowed-expression
|
|
817
|
+
* machinery only (the pluggable {@link CodeSandboxEvaluator}, DECAF-32
|
|
818
|
+
* §22.4) — no new evaluator. The expression sees the already-routed input
|
|
819
|
+
* values as `$input` and the run metadata as context.
|
|
820
|
+
*/
|
|
821
|
+
async evaluateExpressionBinding(planNode, expression, inputs, opts) {
|
|
822
|
+
const evaluator = this.codeSandboxEvaluator;
|
|
823
|
+
if (!evaluator) {
|
|
824
|
+
throw new index_js_3.GraphExecutionError(`Expression binding on node '${planNode.id}' requires a CodeSandboxEvaluator to be registered in GraphExecutionEngineConfig.codeSandboxEvaluator`, "GRAPH_CODE_SANDBOX_NOT_CONFIGURED", { nodeId: planNode.id, expression });
|
|
825
|
+
}
|
|
826
|
+
const md = opts.metadata;
|
|
827
|
+
return await evaluator.evaluate({
|
|
828
|
+
code: expression,
|
|
829
|
+
language: "javascript",
|
|
830
|
+
input: inputs,
|
|
831
|
+
vars: md?.vars ?? undefined,
|
|
832
|
+
item: md?.item,
|
|
833
|
+
index: md?.index,
|
|
834
|
+
abortSignal: opts.abortSignal,
|
|
835
|
+
});
|
|
836
|
+
}
|
|
837
|
+
/**
|
|
838
|
+
* Attempts to read a pinned value for the node. Returns the cached outputs
|
|
839
|
+
* when a valid pinned value exists, or `undefined` to proceed with normal
|
|
840
|
+
* execution.
|
|
841
|
+
*/
|
|
842
|
+
async tryPinnedValue(frame, plan, planNode, inputs) {
|
|
843
|
+
const policy = new GraphPinningPolicy_js_1.GraphPinningPolicy();
|
|
844
|
+
if (!policy.shouldUsePinnedValue(planNode))
|
|
845
|
+
return undefined;
|
|
846
|
+
const service = this.createPinningService();
|
|
847
|
+
const depFingerprints = this.computeDependencyFingerprints(frame, plan, planNode.id);
|
|
848
|
+
return service.readPinnedValue(plan.workflowId, planNode, inputs, depFingerprints);
|
|
849
|
+
}
|
|
850
|
+
/**
|
|
851
|
+
* Recursively computes fingerprints for all upstream dependencies of a node
|
|
852
|
+
* using the results already accumulated in the frame.
|
|
853
|
+
*/
|
|
854
|
+
computeDependencyFingerprints(frame, plan, nodeId) {
|
|
855
|
+
const service = this.createPinningService();
|
|
856
|
+
const depResolver = new GraphPinningDependencyResolver_js_1.GraphPinningDependencyResolver();
|
|
857
|
+
const deps = depResolver.getDependencies(plan, nodeId);
|
|
858
|
+
const fingerprints = {};
|
|
859
|
+
for (const dep of deps) {
|
|
860
|
+
const node = plan.nodes.find((n) => n.id === dep);
|
|
861
|
+
if (node) {
|
|
862
|
+
const depResult = frame.nodeResults.get(dep);
|
|
863
|
+
const inputs = depResult?.inputs ?? {};
|
|
864
|
+
const nestedDeps = this.computeDependencyFingerprints(frame, plan, dep);
|
|
865
|
+
fingerprints[dep] = service.computeFingerprint(plan.workflowId, node, inputs, nestedDeps);
|
|
866
|
+
}
|
|
867
|
+
}
|
|
868
|
+
return fingerprints;
|
|
869
|
+
}
|
|
870
|
+
/**
|
|
871
|
+
* Routes a node's outputs to downstream inputs and workflow outputs along
|
|
872
|
+
* data edges (connection edges are structural and never route values).
|
|
873
|
+
*
|
|
874
|
+
* An edge is traversed only when the source node actually emitted the
|
|
875
|
+
* edge's `sourcePort` (DECAF-50 §4.9 branch semantics). A node that
|
|
876
|
+
* emitted a subset of its declared outputs — e.g. a switch that selected
|
|
877
|
+
* one case — therefore activates only the downstream branch edges of the
|
|
878
|
+
* emitted ports; unselected branch edges are left unactivated, so their
|
|
879
|
+
* downstream nodes are skipped and never contribute to workflow outputs.
|
|
880
|
+
* Emitting an output port explicitly with `undefined` still counts as
|
|
881
|
+
* activated (the port was produced by the executor).
|
|
882
|
+
*/
|
|
883
|
+
routeOutgoingEdges(frame, plan, planNode, outputs) {
|
|
884
|
+
const outgoing = (plan.outgoingByNode.get(planNode.id) ?? []).filter((edge) => edge.type === "data");
|
|
885
|
+
for (const edge of outgoing) {
|
|
886
|
+
if (!Object.prototype.hasOwnProperty.call(outputs, edge.sourcePort)) {
|
|
887
|
+
// The source node did not emit this output port: the edge's branch
|
|
888
|
+
// was not selected, so no value is routed.
|
|
889
|
+
continue;
|
|
890
|
+
}
|
|
891
|
+
const value = outputs[edge.sourcePort];
|
|
892
|
+
frame.activateDataEdge(edge.id);
|
|
893
|
+
if (edge.targetNodeId === constants_js_1.GRAPH_WORKFLOW_BOUNDARY) {
|
|
894
|
+
frame.valueStore.setWorkflowOutput(edge.targetPort, value);
|
|
895
|
+
}
|
|
896
|
+
this.emitEdgeStateChanged(frame, plan, planNode, edge, index_js_2.GraphVisualState.SUCCEEDED, index_js_2.GraphExecutionStatus.SUCCEEDED);
|
|
897
|
+
this.emitEvent(frame, {
|
|
898
|
+
type: index_js_2.GraphExecutionEventType.EDGE_VALUE_ROUTED,
|
|
899
|
+
runId: frame.runId,
|
|
900
|
+
workflowId: plan.workflowId,
|
|
901
|
+
edgeId: edge.id,
|
|
902
|
+
nodeId: planNode.id,
|
|
903
|
+
path: [],
|
|
904
|
+
payload: { edge, value },
|
|
905
|
+
}).catch(() => {
|
|
906
|
+
// observer failures must not crash
|
|
907
|
+
});
|
|
908
|
+
}
|
|
909
|
+
}
|
|
910
|
+
/**
|
|
911
|
+
* Emits an event, records it in the frame, and dispatches to observers.
|
|
912
|
+
*/
|
|
913
|
+
async emitEvent(frame, partial) {
|
|
914
|
+
const event = frame.eventFactory.create({
|
|
915
|
+
id: "",
|
|
916
|
+
sequence: 0,
|
|
917
|
+
timestamp: new Date(),
|
|
918
|
+
...partial,
|
|
919
|
+
});
|
|
920
|
+
frame.appendEvent(event);
|
|
921
|
+
await this.emitter.updateObservers(event);
|
|
922
|
+
}
|
|
923
|
+
/**
|
|
924
|
+
* Emits a `NODE_STATE_CHANGED` event (DECAF-48 §4.4) carrying the given
|
|
925
|
+
* visual state for the node. Rides the existing Observable pipeline; no
|
|
926
|
+
* second out-of-band channel.
|
|
927
|
+
*/
|
|
928
|
+
emitNodeStateChanged(frame, plan, planNode, nodePath, state, status) {
|
|
929
|
+
this.emitEvent(frame, {
|
|
930
|
+
type: index_js_2.GraphExecutionEventType.NODE_STATE_CHANGED,
|
|
931
|
+
runId: frame.runId,
|
|
932
|
+
workflowId: plan.workflowId,
|
|
933
|
+
nodeId: planNode.id,
|
|
934
|
+
path: nodePath,
|
|
935
|
+
status,
|
|
936
|
+
payload: {
|
|
937
|
+
nodeId: planNode.id,
|
|
938
|
+
state,
|
|
939
|
+
runId: frame.runId,
|
|
940
|
+
workflowId: plan.workflowId,
|
|
941
|
+
status,
|
|
942
|
+
},
|
|
943
|
+
}).catch(() => {
|
|
944
|
+
// observer failures must not crash execution
|
|
945
|
+
});
|
|
946
|
+
}
|
|
947
|
+
/**
|
|
948
|
+
* Emits an `EDGE_STATE_CHANGED` event (DECAF-48 §4.4) carrying the given
|
|
949
|
+
* visual state for a routed edge.
|
|
950
|
+
*/
|
|
951
|
+
emitEdgeStateChanged(frame, plan, planNode, edge, state, status) {
|
|
952
|
+
this.emitEvent(frame, {
|
|
953
|
+
type: index_js_2.GraphExecutionEventType.EDGE_STATE_CHANGED,
|
|
954
|
+
runId: frame.runId,
|
|
955
|
+
workflowId: plan.workflowId,
|
|
956
|
+
edgeId: edge.id,
|
|
957
|
+
nodeId: planNode.id,
|
|
958
|
+
path: [],
|
|
959
|
+
status,
|
|
960
|
+
payload: {
|
|
961
|
+
edgeId: edge.id,
|
|
962
|
+
state,
|
|
963
|
+
runId: frame.runId,
|
|
964
|
+
workflowId: plan.workflowId,
|
|
965
|
+
nodeId: planNode.id,
|
|
966
|
+
status,
|
|
967
|
+
},
|
|
968
|
+
}).catch(() => {
|
|
969
|
+
// observer failures must not crash execution
|
|
970
|
+
});
|
|
971
|
+
}
|
|
972
|
+
/**
|
|
973
|
+
* Merges default options with the given options.
|
|
974
|
+
*/
|
|
975
|
+
mergeOptions(options) {
|
|
976
|
+
return {
|
|
977
|
+
concurrency: constants_js_1.GRAPH_DEFAULT_CONCURRENCY,
|
|
978
|
+
failFast: true,
|
|
979
|
+
validateInputs: true,
|
|
980
|
+
validateOutputs: true,
|
|
981
|
+
maxLoopIterations: constants_js_1.GRAPH_MAX_LOOP_ITERATIONS,
|
|
982
|
+
maxForeachIterations: constants_js_1.GRAPH_MAX_FOREACH_ITERATIONS,
|
|
983
|
+
usePinnedValues: true,
|
|
984
|
+
writeThroughCache: false,
|
|
985
|
+
path: [],
|
|
986
|
+
metadata: {},
|
|
987
|
+
...this.defaultOptions,
|
|
988
|
+
...options,
|
|
989
|
+
};
|
|
990
|
+
}
|
|
991
|
+
/**
|
|
992
|
+
* Resolves the effective loop-iteration ceilings for a run. A node-level
|
|
993
|
+
* `maxIterations` can never exceed these; loop executors read them from the
|
|
994
|
+
* node context.
|
|
995
|
+
*/
|
|
996
|
+
executionLimits(opts) {
|
|
997
|
+
return {
|
|
998
|
+
maxLoopIterations: opts.maxLoopIterations ?? constants_js_1.GRAPH_MAX_LOOP_ITERATIONS,
|
|
999
|
+
maxForeachIterations: opts.maxForeachIterations ?? constants_js_1.GRAPH_MAX_FOREACH_ITERATIONS,
|
|
1000
|
+
};
|
|
1001
|
+
}
|
|
1002
|
+
assertNotAborted(opts) {
|
|
1003
|
+
if (opts.abortSignal?.aborted === true) {
|
|
1004
|
+
throw new index_js_3.GraphRunCancelledError(opts.runId ?? "unknown");
|
|
1005
|
+
}
|
|
1006
|
+
}
|
|
1007
|
+
/**
|
|
1008
|
+
* Generates a cryptographically random run id. `crypto.randomUUID` is always
|
|
1009
|
+
* available in the backend runtimes as-graph targets; the frontend never
|
|
1010
|
+
* creates run ids. If it is somehow unavailable the engine fails loudly
|
|
1011
|
+
* rather than falling back to a predictable, guessable id.
|
|
1012
|
+
*
|
|
1013
|
+
* @throws {GraphExecutionError} when `crypto.randomUUID` is unavailable.
|
|
1014
|
+
*/
|
|
1015
|
+
generateRunId() {
|
|
1016
|
+
const cryptoApi = globalThis.crypto;
|
|
1017
|
+
if (!cryptoApi || typeof cryptoApi.randomUUID !== "function") {
|
|
1018
|
+
throw new index_js_3.GraphExecutionError("Cannot generate a graph run id: crypto.randomUUID is unavailable in this runtime", "GRAPH_RUN_ID_ERROR", { runtime: typeof globalThis.crypto });
|
|
1019
|
+
}
|
|
1020
|
+
return cryptoApi.randomUUID();
|
|
1021
|
+
}
|
|
1022
|
+
/**
|
|
1023
|
+
* Converts an error into a serialized payload.
|
|
1024
|
+
*/
|
|
1025
|
+
toErrorPayload(error) {
|
|
1026
|
+
if (error instanceof Error) {
|
|
1027
|
+
return {
|
|
1028
|
+
name: error.name,
|
|
1029
|
+
message: error.message,
|
|
1030
|
+
stack: error.stack,
|
|
1031
|
+
code: error.graphCode ??
|
|
1032
|
+
(typeof error.code === "number"
|
|
1033
|
+
? String(error.code)
|
|
1034
|
+
: error.code),
|
|
1035
|
+
};
|
|
1036
|
+
}
|
|
1037
|
+
return { name: "UnknownError", message: String(error) };
|
|
1038
|
+
}
|
|
1039
|
+
}
|
|
1040
|
+
exports.GraphExecutionEngine = GraphExecutionEngine;
|
|
1041
|
+
//# sourceMappingURL=GraphExecutionEngine.js.map
|
|
1042
|
+
//# sourceMappingURL=GraphExecutionEngine.cjs.map
|