@decaf-ts/as-graph 0.0.0-stage → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +21 -0
- package/README.md +523 -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 +84 -0
- package/lib/cjs/engine/index.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 +87 -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 +26 -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 +272 -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 +26 -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 +34 -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 +95 -0
- package/lib/cjs/engine/services/GraphRunModelService.cjs.map +1 -0
- package/lib/cjs/engine/services/GraphWorkflowService.cjs +290 -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 +307 -0
- package/lib/cjs/nest/graph/GraphRunController.cjs.map +1 -0
- package/lib/cjs/nest/graph/GraphWorkflowController.cjs +188 -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/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 +130 -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 +195 -0
- package/lib/cjs/node/flow/loop/until/node.cjs.map +1 -0
- package/lib/cjs/node/flow/loop/while/node.cjs +191 -0
- package/lib/cjs/node/flow/loop/while/node.cjs.map +1 -0
- package/lib/cjs/node/flow/switch/node.cjs +256 -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 +98 -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 +67 -0
- package/lib/esm/engine/index.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 +82 -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 +9 -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 +267 -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 +21 -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 +30 -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 +86 -0
- package/lib/esm/engine/services/GraphRunModelService.js.map +1 -0
- package/lib/esm/engine/services/GraphWorkflowService.js +280 -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 +298 -0
- package/lib/esm/nest/graph/GraphRunController.js.map +1 -0
- package/lib/esm/nest/graph/GraphWorkflowController.js +179 -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/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 +121 -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 +186 -0
- package/lib/esm/node/flow/loop/until/node.js.map +1 -0
- package/lib/esm/node/flow/loop/while/node.js +182 -0
- package/lib/esm/node/flow/loop/while/node.js.map +1 -0
- package/lib/esm/node/flow/switch/node.js +247 -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 +88 -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 +60 -0
- package/lib/types/engine/index.d.mts +60 -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 +42 -0
- package/lib/types/engine/loops/GraphConditionEvaluator.d.mts +42 -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 +8 -0
- package/lib/types/engine/loops/index.d.mts +8 -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 +101 -0
- package/lib/types/engine/runs/GraphRunService.d.mts +101 -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 +12 -0
- package/lib/types/engine/runs/InMemoryGraphRunStore.d.mts +12 -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 +25 -0
- package/lib/types/engine/runs/ownership.d.mts +25 -0
- package/lib/types/engine/runs/types.d.cts +83 -0
- package/lib/types/engine/runs/types.d.mts +83 -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 +37 -0
- package/lib/types/engine/services/GraphRunModelService.d.mts +37 -0
- package/lib/types/engine/services/GraphWorkflowService.d.cts +102 -0
- package/lib/types/engine/services/GraphWorkflowService.d.mts +102 -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 +231 -0
- package/lib/types/engine/types.d.mts +231 -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 +134 -0
- package/lib/types/nest/graph/GraphExecutionModule.d.mts +134 -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 +118 -0
- package/lib/types/nest/graph/GraphRunController.d.mts +118 -0
- package/lib/types/nest/graph/GraphWorkflowController.d.cts +88 -0
- package/lib/types/nest/graph/GraphWorkflowController.d.mts +88 -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/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 +34 -0
- package/lib/types/node/flow/if/node.d.mts +34 -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 +38 -0
- package/lib/types/node/flow/loop/until/node.d.mts +38 -0
- package/lib/types/node/flow/loop/while/node.d.cts +37 -0
- package/lib/types/node/flow/loop/while/node.d.mts +37 -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 +39 -0
- package/lib/types/ram/GraphRunStore.d.mts +39 -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 +297 -0
- package/lib/types/shared/graph/types.d.mts +297 -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,298 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
11
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* @module as-graph/nest/graph/GraphRunController
|
|
15
|
+
* @summary Asynchronous run lifecycle HTTP API (DECAF-50 §4.14–§4.15).
|
|
16
|
+
* @description Creates (`POST /graph/runs`), reads
|
|
17
|
+
* (`GET /graph/runs/:runId`), cancels (`DELETE /graph/runs/:runId`), and
|
|
18
|
+
* replays (`SSE /graph/runs/:runId/events`) graph runs on top of
|
|
19
|
+
* {@link GraphRunService}, enforcing authentication, run limits, and
|
|
20
|
+
* ownership; engine errors surface as `500` with their message while Nest
|
|
21
|
+
* {@link HttpException}s pass through unchanged.
|
|
22
|
+
*/
|
|
23
|
+
import { Body, Controller, Delete, Get, HttpException, HttpStatus, NotFoundException, Optional, Param, Post, Query, Sse, Inject, HttpCode, } from "@nestjs/common";
|
|
24
|
+
import { Observable } from "rxjs";
|
|
25
|
+
import { NotFoundError, ValidationError } from "@decaf-ts/db-decorators";
|
|
26
|
+
import { AuthorizationError, ForbiddenError } from "@decaf-ts/core";
|
|
27
|
+
import { DecafRequestContext } from "@decaf-ts/for-nest";
|
|
28
|
+
import { isGraphRunTerminalEventType } from "./../../shared/graph/index.js";
|
|
29
|
+
import { GraphRunService } from "./../../index.js";
|
|
30
|
+
import { graphWorkflowOwnerOf } from "./../../engine/services/GraphWorkflowService.js";
|
|
31
|
+
/** DI token for {@link GraphRunControllerOptions}. */
|
|
32
|
+
export const GRAPH_RUN_OPTIONS = "GRAPH_RUN_OPTIONS";
|
|
33
|
+
/**
|
|
34
|
+
* Maps a thrown Decaf error to the Nest HTTP equivalent for the run
|
|
35
|
+
* lifecycle API: ownership/authorization failures become `403` (naming the
|
|
36
|
+
* run), missing runs `404`, validation failures `400`, and anything else
|
|
37
|
+
* surfaces as `500` with its message. Nest {@link HttpException}s pass
|
|
38
|
+
* through unchanged.
|
|
39
|
+
*/
|
|
40
|
+
function graphRunHttpErrorOf(e, runId) {
|
|
41
|
+
if (e instanceof ForbiddenError || e instanceof AuthorizationError) {
|
|
42
|
+
return new HttpException(runId
|
|
43
|
+
? `Graph run '${runId}' is owned by another user`
|
|
44
|
+
: e.message, HttpStatus.FORBIDDEN);
|
|
45
|
+
}
|
|
46
|
+
if (e instanceof NotFoundError) {
|
|
47
|
+
return new NotFoundException(e.message);
|
|
48
|
+
}
|
|
49
|
+
if (e instanceof ValidationError) {
|
|
50
|
+
return new HttpException(e.message, HttpStatus.BAD_REQUEST);
|
|
51
|
+
}
|
|
52
|
+
if (e instanceof HttpException)
|
|
53
|
+
return e;
|
|
54
|
+
const message = e instanceof Error ? e.message : String(e);
|
|
55
|
+
return new HttpException(message, HttpStatus.INTERNAL_SERVER_ERROR);
|
|
56
|
+
}
|
|
57
|
+
function graphRunToHttp(run) {
|
|
58
|
+
return JSON.parse(JSON.stringify(run));
|
|
59
|
+
}
|
|
60
|
+
function graphRunEventMessage(event) {
|
|
61
|
+
return {
|
|
62
|
+
type: "message",
|
|
63
|
+
data: JSON.stringify(event),
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Asynchronous run lifecycle HTTP API (DECAF-50 §4.14–§4.15):
|
|
68
|
+
* `POST /graph/runs` creates and schedules a run (202 Accepted), run
|
|
69
|
+
* read/cancel endpoints expose lifecycle state, and
|
|
70
|
+
* `GET /graph/runs/:runId/events` streams the run's sequenced event
|
|
71
|
+
* envelopes over SSE until a terminal event closes the stream. Every
|
|
72
|
+
* operation is ownership-checked against the requesting user.
|
|
73
|
+
*/
|
|
74
|
+
let GraphRunController = class GraphRunController {
|
|
75
|
+
constructor(runService, requestContext, options = {}) {
|
|
76
|
+
this.runService = runService;
|
|
77
|
+
this.requestContext = requestContext;
|
|
78
|
+
this.options = options;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Enforces the configured authentication mode: `auth` defaults to
|
|
82
|
+
* `"required"` (SAA-595 secure-defaults alignment) and rejects
|
|
83
|
+
* unauthenticated calls with `401`; `"optional"` admits anonymous
|
|
84
|
+
* requests for standalone module runs (DECAF-48 §4.15).
|
|
85
|
+
*/
|
|
86
|
+
requireAuthenticatedContext() {
|
|
87
|
+
if ((this.options.auth ?? "required") !== "required") {
|
|
88
|
+
return this.requestContext;
|
|
89
|
+
}
|
|
90
|
+
if (!this.requestContext) {
|
|
91
|
+
throw new HttpException("Graph run access requires an authenticated request context", HttpStatus.UNAUTHORIZED);
|
|
92
|
+
}
|
|
93
|
+
return this.requestContext;
|
|
94
|
+
}
|
|
95
|
+
ownerUserOf() {
|
|
96
|
+
return graphWorkflowOwnerOf(this.requestContext) ?? null;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Concurrency-bucket key for the per-caller run cap: the authenticated
|
|
100
|
+
* owner, else a single shared anonymous bucket. The key deliberately does
|
|
101
|
+
* NOT use `request.ip` (SAA-1950 F7): a spoofable proxy IP would let a
|
|
102
|
+
* caller escape their bucket, and the shared bucket fails closed for the
|
|
103
|
+
* anonymous tolerance, which is disabled by default. Request-rate
|
|
104
|
+
* throttling is owned by the `@nestjs/throttler` guard instead.
|
|
105
|
+
*/
|
|
106
|
+
concurrencyKeyOf(owner) {
|
|
107
|
+
return owner ?? "anonymous";
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Creates and schedules a run (DECAF-50 §4.14): accepts an inline workflow
|
|
111
|
+
* document or a saved `workflowId` plus optional inputs, answers
|
|
112
|
+
* `202 Accepted` with the queued run's identity and its event/result URLs.
|
|
113
|
+
* The per-caller concurrency cap buckets by the authenticated owner user,
|
|
114
|
+
* else a single shared anonymous bucket (SAA-595 F4, SAA-1950 F7).
|
|
115
|
+
*/
|
|
116
|
+
async createRun(body) {
|
|
117
|
+
const context = this.requireAuthenticatedContext();
|
|
118
|
+
const request = {
|
|
119
|
+
...(body?.workflow !== undefined ? { workflow: body.workflow } : {}),
|
|
120
|
+
...(body?.workflowId !== undefined
|
|
121
|
+
? { workflowId: body.workflowId }
|
|
122
|
+
: {}),
|
|
123
|
+
...(body?.inputs !== undefined ? { inputs: body.inputs } : {}),
|
|
124
|
+
};
|
|
125
|
+
try {
|
|
126
|
+
const owner = this.ownerUserOf();
|
|
127
|
+
const run = await this.runService.createRun(request, owner, this.concurrencyKeyOf(owner), context);
|
|
128
|
+
return {
|
|
129
|
+
runId: run.runId,
|
|
130
|
+
workflowId: run.workflowId,
|
|
131
|
+
status: "queued",
|
|
132
|
+
eventsUrl: `/graph/runs/${run.runId}/events`,
|
|
133
|
+
resultUrl: `/graph/runs/${run.runId}`,
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
catch (e) {
|
|
137
|
+
throw graphRunHttpErrorOf(e);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Reads a run and maps it to its HTTP representation.
|
|
142
|
+
*
|
|
143
|
+
* @param {string} runId - Run id path parameter.
|
|
144
|
+
* @return {Promise<Record<string, unknown>>} The run's HTTP shape.
|
|
145
|
+
* @throws {HttpException} The mapped graph-run HTTP error (404 for unknown runs, 403 for foreign owners).
|
|
146
|
+
*/
|
|
147
|
+
async getRun(runId) {
|
|
148
|
+
const context = this.requireAuthenticatedContext();
|
|
149
|
+
try {
|
|
150
|
+
const run = await this.runService.getRun(runId, this.ownerUserOf(), context);
|
|
151
|
+
return graphRunToHttp(run);
|
|
152
|
+
}
|
|
153
|
+
catch (e) {
|
|
154
|
+
throw graphRunHttpErrorOf(e, runId);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* Cancels a run (cooperative cancellation) and returns its updated state.
|
|
159
|
+
*
|
|
160
|
+
* @param {string} runId - Run id path parameter.
|
|
161
|
+
* @return {Promise<Record<string, unknown>>} The cancelled run's HTTP shape.
|
|
162
|
+
* @throws {HttpException} The mapped graph-run HTTP error (404 for unknown runs, 403 for foreign owners).
|
|
163
|
+
*/
|
|
164
|
+
async cancelRun(runId) {
|
|
165
|
+
const context = this.requireAuthenticatedContext();
|
|
166
|
+
try {
|
|
167
|
+
const run = await this.runService.cancelRun(runId, this.ownerUserOf(), context);
|
|
168
|
+
return graphRunToHttp(run);
|
|
169
|
+
}
|
|
170
|
+
catch (e) {
|
|
171
|
+
throw graphRunHttpErrorOf(e, runId);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* SSE stream of a run's event envelopes: replays buffered events after
|
|
176
|
+
* `afterSequence`, then streams live events until the terminal event type
|
|
177
|
+
* completes the stream.
|
|
178
|
+
*
|
|
179
|
+
* @param {string} runId - Run id path parameter.
|
|
180
|
+
* @param {string} [afterSequence] - Sequence number to replay events after.
|
|
181
|
+
* @return {Promise<Observable<MessageEvent>>} The SSE event stream.
|
|
182
|
+
* @throws {HttpException} The mapped graph-run HTTP error (404 for unknown runs, 403 for foreign owners).
|
|
183
|
+
*/
|
|
184
|
+
async events(runId, afterSequence) {
|
|
185
|
+
const context = this.requireAuthenticatedContext();
|
|
186
|
+
const owner = this.ownerUserOf();
|
|
187
|
+
const after = this.parseAfterSequence(afterSequence);
|
|
188
|
+
let run;
|
|
189
|
+
try {
|
|
190
|
+
run = await this.runService.getRun(runId, owner, context);
|
|
191
|
+
}
|
|
192
|
+
catch (e) {
|
|
193
|
+
throw graphRunHttpErrorOf(e, runId);
|
|
194
|
+
}
|
|
195
|
+
const buffered = [];
|
|
196
|
+
let streaming = false;
|
|
197
|
+
let completed = false;
|
|
198
|
+
let sink;
|
|
199
|
+
const emit = (event) => {
|
|
200
|
+
if (completed || !sink)
|
|
201
|
+
return;
|
|
202
|
+
sink.next(graphRunEventMessage(event));
|
|
203
|
+
if (isGraphRunTerminalEventType(event.type)) {
|
|
204
|
+
completed = true;
|
|
205
|
+
unsubscribe();
|
|
206
|
+
sink.complete();
|
|
207
|
+
}
|
|
208
|
+
};
|
|
209
|
+
const unsubscribe = this.runService.subscribeRunEvents(run, (event) => {
|
|
210
|
+
if (completed)
|
|
211
|
+
return;
|
|
212
|
+
if (streaming)
|
|
213
|
+
emit(event);
|
|
214
|
+
else
|
|
215
|
+
buffered.push(event);
|
|
216
|
+
});
|
|
217
|
+
const replay = await this.runService.listEvents(runId, after, owner, context);
|
|
218
|
+
const replayTerminal = replay.length > 0 &&
|
|
219
|
+
isGraphRunTerminalEventType(replay[replay.length - 1].type);
|
|
220
|
+
return new Observable((subscriber) => {
|
|
221
|
+
sink = subscriber;
|
|
222
|
+
let last = after;
|
|
223
|
+
for (const event of replay) {
|
|
224
|
+
if (completed)
|
|
225
|
+
break;
|
|
226
|
+
emit(event);
|
|
227
|
+
last = Math.max(last, event.sequence);
|
|
228
|
+
}
|
|
229
|
+
if (!completed) {
|
|
230
|
+
while (buffered.length > 0 && buffered[0].sequence <= last) {
|
|
231
|
+
buffered.shift();
|
|
232
|
+
}
|
|
233
|
+
streaming = true;
|
|
234
|
+
while (buffered.length > 0 && !completed) {
|
|
235
|
+
emit(buffered.shift());
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
if (replayTerminal && !completed) {
|
|
239
|
+
completed = true;
|
|
240
|
+
unsubscribe();
|
|
241
|
+
subscriber.complete();
|
|
242
|
+
}
|
|
243
|
+
return () => {
|
|
244
|
+
completed = true;
|
|
245
|
+
unsubscribe();
|
|
246
|
+
};
|
|
247
|
+
});
|
|
248
|
+
}
|
|
249
|
+
parseAfterSequence(afterSequence) {
|
|
250
|
+
if (afterSequence === undefined || afterSequence === "")
|
|
251
|
+
return 0;
|
|
252
|
+
if (!/^\d+$/.test(afterSequence)) {
|
|
253
|
+
throw new HttpException(`Invalid afterSequence '${afterSequence}': must be a non-negative integer`, HttpStatus.BAD_REQUEST);
|
|
254
|
+
}
|
|
255
|
+
return Number.parseInt(afterSequence, 10);
|
|
256
|
+
}
|
|
257
|
+
};
|
|
258
|
+
__decorate([
|
|
259
|
+
Post("runs"),
|
|
260
|
+
HttpCode(HttpStatus.ACCEPTED),
|
|
261
|
+
__param(0, Body()),
|
|
262
|
+
__metadata("design:type", Function),
|
|
263
|
+
__metadata("design:paramtypes", [Object]),
|
|
264
|
+
__metadata("design:returntype", Promise)
|
|
265
|
+
], GraphRunController.prototype, "createRun", null);
|
|
266
|
+
__decorate([
|
|
267
|
+
Get("runs/:runId"),
|
|
268
|
+
__param(0, Param("runId")),
|
|
269
|
+
__metadata("design:type", Function),
|
|
270
|
+
__metadata("design:paramtypes", [String]),
|
|
271
|
+
__metadata("design:returntype", Promise)
|
|
272
|
+
], GraphRunController.prototype, "getRun", null);
|
|
273
|
+
__decorate([
|
|
274
|
+
Delete("runs/:runId"),
|
|
275
|
+
__param(0, Param("runId")),
|
|
276
|
+
__metadata("design:type", Function),
|
|
277
|
+
__metadata("design:paramtypes", [String]),
|
|
278
|
+
__metadata("design:returntype", Promise)
|
|
279
|
+
], GraphRunController.prototype, "cancelRun", null);
|
|
280
|
+
__decorate([
|
|
281
|
+
Sse("runs/:runId/events"),
|
|
282
|
+
__param(0, Param("runId")),
|
|
283
|
+
__param(1, Query("afterSequence")),
|
|
284
|
+
__metadata("design:type", Function),
|
|
285
|
+
__metadata("design:paramtypes", [String, String]),
|
|
286
|
+
__metadata("design:returntype", Promise)
|
|
287
|
+
], GraphRunController.prototype, "events", null);
|
|
288
|
+
GraphRunController = __decorate([
|
|
289
|
+
Controller("graph"),
|
|
290
|
+
__param(1, Optional()),
|
|
291
|
+
__param(1, Inject(DecafRequestContext)),
|
|
292
|
+
__param(2, Optional()),
|
|
293
|
+
__param(2, Inject(GRAPH_RUN_OPTIONS)),
|
|
294
|
+
__metadata("design:paramtypes", [GraphRunService,
|
|
295
|
+
DecafRequestContext, Object])
|
|
296
|
+
], GraphRunController);
|
|
297
|
+
export { GraphRunController };
|
|
298
|
+
//# sourceMappingURL=GraphRunController.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GraphRunController.js","sourceRoot":"","sources":["../../../../src/nest/graph/GraphRunController.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;GASG;AACH,OAAO,EACL,IAAI,EACJ,UAAU,EACV,MAAM,EACN,GAAG,EACH,aAAa,EACb,UAAU,EACV,iBAAiB,EACjB,QAAQ,EACR,KAAK,EACL,IAAI,EACJ,KAAK,EACL,GAAG,EAEH,MAAM,EACN,QAAQ,GACT,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AACzE,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAKzD,OAAO,EAAE,2BAA2B,EAAE,sCAA2B;AAMjE,OAAO,EAAE,eAAe,EAAE,yBAAe;AACzC,OAAO,EAAE,oBAAoB,EAAE,wDAAmD;AAElF,sDAAsD;AACtD,MAAM,CAAC,MAAM,iBAAiB,GAAG,mBAAmB,CAAC;AAqCrD;;;;;;GAMG;AACH,SAAS,mBAAmB,CAAC,CAAU,EAAE,KAAc;IACrD,IAAI,CAAC,YAAY,cAAc,IAAI,CAAC,YAAY,kBAAkB,EAAE,CAAC;QACnE,OAAO,IAAI,aAAa,CACtB,KAAK;YACH,CAAC,CAAC,cAAc,KAAK,4BAA4B;YACjD,CAAC,CAAC,CAAC,CAAC,OAAO,EACb,UAAU,CAAC,SAAS,CACrB,CAAC;IACJ,CAAC;IACD,IAAI,CAAC,YAAY,aAAa,EAAE,CAAC;QAC/B,OAAO,IAAI,iBAAi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,CAAC,EAAE,CAAC;YACjC,MAAM,IAAI,aAAa,CACrB,0BAA0B,aAAa,mCAAmC,EAC1E,UAAU,CAAC,WAAW,CACvB,CAAC;QACJ,CAAC;QACD,OAAO,MAAM,CAAC,QAAQ,CAAC,aAAa,EAAE,EAAE,CAAC,CAAC;IAC5C,CAAC;CACF,CAAA;AA/KO;IAFL,IAAI,CAAC,MAAM,CAAC;IACZ,QAAQ,CAAC,UAAU,CAAC,QAAQ,CAAC;IAE3B,WAAA,IAAI,EAAE,CAAA;;;;mDA4BR;AAUK;IADL,GAAG,CAAC,aAAa,CAAC;IACL,WAAA,KAAK,CAAC,OAAO,CAAC,CAAA;;;;gDAQ3B;AAUK;IADL,MAAM,CAAC,aAAa,CAAC;IAEnB,WAAA,KAAK,CAAC,OAAO,CAAC,CAAA;;;;mDAahB;AAaK;IADL,GAAG,CAAC,oBAAoB,CAAC;IAEvB,WAAA,KAAK,CAAC,OAAO,CAAC,CAAA;IACd,WAAA,KAAK,CAAC,eAAe,CAAC,CAAA;;;;gDA6ExB;AAxNU,kBAAkB;IAD9B,UAAU,CAAC,OAAO,CAAC;IAIf,WAAA,QAAQ,EAAE,CAAA;IAAE,WAAA,MAAM,CAAC,mBAAmB,CAAC,CAAA;IAEvC,WAAA,QAAQ,EAAE,CAAA;IAAE,WAAA,MAAM,CAAC,iBAAiB,CAAC,CAAA;qCAHT,eAAe;QAEV,mBAAmB;GAJ5C,kBAAkB,CAoO9B"}
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
11
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
12
|
+
};
|
|
13
|
+
import { Body, Controller, Get, HttpException, HttpStatus, NotFoundException, Optional, Param, Put, Post, Inject, } from "@nestjs/common";
|
|
14
|
+
import { NotFoundError, ValidationError } from "@decaf-ts/db-decorators";
|
|
15
|
+
import { AuthorizationError, ForbiddenError } from "@decaf-ts/core";
|
|
16
|
+
import { DecafRequestContext } from "@decaf-ts/for-nest";
|
|
17
|
+
import { GraphWorkflowService } from "./../../engine/services/GraphWorkflowService.js";
|
|
18
|
+
import { GraphWorkflowDocumentRejectedError } from "./../../engine/errors/GraphWorkflowErrors.js";
|
|
19
|
+
/** DI token for {@link GraphWorkflowControllerOptions}. */
|
|
20
|
+
export const GRAPH_WORKFLOW_OPTIONS = "GRAPH_WORKFLOW_OPTIONS";
|
|
21
|
+
function graphWorkflowHttpErrorOf(e, workflowId) {
|
|
22
|
+
if (e instanceof GraphWorkflowDocumentRejectedError) {
|
|
23
|
+
return new HttpException({
|
|
24
|
+
message: "Graph workflow document rejected at the boundary",
|
|
25
|
+
issues: e.issues,
|
|
26
|
+
}, HttpStatus.UNPROCESSABLE_ENTITY);
|
|
27
|
+
}
|
|
28
|
+
if (e instanceof ForbiddenError || e instanceof AuthorizationError) {
|
|
29
|
+
return new HttpException(workflowId
|
|
30
|
+
? `Graph workflow '${workflowId}' is owned by another user`
|
|
31
|
+
: e.message, HttpStatus.FORBIDDEN);
|
|
32
|
+
}
|
|
33
|
+
if (e instanceof NotFoundError) {
|
|
34
|
+
return new NotFoundException(e.message);
|
|
35
|
+
}
|
|
36
|
+
if (e instanceof ValidationError) {
|
|
37
|
+
return new HttpException(e.message, HttpStatus.BAD_REQUEST);
|
|
38
|
+
}
|
|
39
|
+
if (e instanceof HttpException)
|
|
40
|
+
return e;
|
|
41
|
+
const message = e instanceof Error ? e.message : String(e);
|
|
42
|
+
return new HttpException(message, HttpStatus.INTERNAL_SERVER_ERROR);
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Canonical workflow document persistence endpoints (DECAF-50 §4.10):
|
|
46
|
+
*
|
|
47
|
+
* - `PUT /graph/workflows/{workflowId}` — validate and persist a canonical
|
|
48
|
+
* document (or a `{ document, editor, metadata }` snapshot wrapper, whose
|
|
49
|
+
* editor state is preserved verbatim for lossless round trips).
|
|
50
|
+
* - `GET /graph/workflows/{workflowId}` — load the canonical document;
|
|
51
|
+
* legacy persisted snapshots are converted losslessly on the read path.
|
|
52
|
+
* - `POST /graph/workflows/validate` — run boundary validation and return
|
|
53
|
+
* structured issues (`code`, `path`, `nodeId`, `edgeId`, `message`,
|
|
54
|
+
* safe `details`).
|
|
55
|
+
*
|
|
56
|
+
* @class GraphWorkflowController
|
|
57
|
+
*/
|
|
58
|
+
let GraphWorkflowController = class GraphWorkflowController {
|
|
59
|
+
constructor(workflowService, requestContext, options = {}) {
|
|
60
|
+
this.workflowService = workflowService;
|
|
61
|
+
this.requestContext = requestContext;
|
|
62
|
+
this.options = options;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Enforces the configured authentication mode: `auth` defaults to
|
|
66
|
+
* `"required"` (SAA-595 secure-defaults alignment) and rejects
|
|
67
|
+
* unauthenticated calls with `401`; `"optional"` admits anonymous
|
|
68
|
+
* requests for standalone module runs (DECAF-48 §4.15).
|
|
69
|
+
*/
|
|
70
|
+
requireAuthenticatedContext() {
|
|
71
|
+
if ((this.options.auth ?? "required") !== "required") {
|
|
72
|
+
return this.requestContext;
|
|
73
|
+
}
|
|
74
|
+
if (!this.requestContext) {
|
|
75
|
+
throw new HttpException("Graph workflow access requires an authenticated request context", HttpStatus.UNAUTHORIZED);
|
|
76
|
+
}
|
|
77
|
+
return this.requestContext;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Saves a workflow: a canonical `{ document, ... }` wrapper body is stored
|
|
81
|
+
* as a legacy-transition snapshot, a bare document body as the canonical
|
|
82
|
+
* document.
|
|
83
|
+
*
|
|
84
|
+
* @param {string} workflowId - Workflow id path parameter.
|
|
85
|
+
* @param {unknown} body - Bare `GraphWorkflowDocument` or canonical snapshot wrapper.
|
|
86
|
+
* @return {Promise<GraphWorkflowSaveResponse>} The saved workflow's id, name, and timestamp.
|
|
87
|
+
* @throws {HttpException} The mapped graph-workflow HTTP error (400/403/409 per the service contract).
|
|
88
|
+
*/
|
|
89
|
+
async saveWorkflow(workflowId, body) {
|
|
90
|
+
const context = this.requireAuthenticatedContext();
|
|
91
|
+
try {
|
|
92
|
+
const model = this.isCanonicalWrapper(body)
|
|
93
|
+
? await this.workflowService.saveSnapshot(workflowId, body, context)
|
|
94
|
+
: await this.workflowService.saveDocument(workflowId, body, context);
|
|
95
|
+
return {
|
|
96
|
+
workflowId,
|
|
97
|
+
...(model.name ? { name: model.name } : {}),
|
|
98
|
+
savedAt: model.updatedAt.toISOString(),
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
catch (e) {
|
|
102
|
+
throw graphWorkflowHttpErrorOf(e, workflowId);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Returns a workflow's canonical document.
|
|
107
|
+
*
|
|
108
|
+
* @param {string} workflowId - Workflow id path parameter.
|
|
109
|
+
* @return {Promise<GraphWorkflowDocument>} The stored canonical document.
|
|
110
|
+
* @throws {HttpException} The mapped graph-workflow HTTP error (404 for unknown/undocumented workflows, 403 for foreign owners).
|
|
111
|
+
*/
|
|
112
|
+
async getWorkflow(workflowId) {
|
|
113
|
+
const context = this.requireAuthenticatedContext();
|
|
114
|
+
try {
|
|
115
|
+
return await this.workflowService.getDocument(workflowId, context);
|
|
116
|
+
}
|
|
117
|
+
catch (e) {
|
|
118
|
+
throw graphWorkflowHttpErrorOf(e, workflowId);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Validates a workflow document against the boundary gate without persisting.
|
|
123
|
+
*
|
|
124
|
+
* @param {unknown} body - Bare `GraphWorkflowDocument` or canonical snapshot wrapper.
|
|
125
|
+
* @return {Promise<GraphWorkflowValidationResult>} Structured validation result.
|
|
126
|
+
* @throws {HttpException} 401 without an authenticated context.
|
|
127
|
+
*/
|
|
128
|
+
async validateWorkflow(body) {
|
|
129
|
+
this.requireAuthenticatedContext();
|
|
130
|
+
const document = this.documentOf(body);
|
|
131
|
+
return this.workflowService.validateDocument(document, this.requestContext);
|
|
132
|
+
}
|
|
133
|
+
isCanonicalWrapper(body) {
|
|
134
|
+
return (!!body &&
|
|
135
|
+
typeof body === "object" &&
|
|
136
|
+
!Array.isArray(body) &&
|
|
137
|
+
body["document"] !== undefined &&
|
|
138
|
+
body["nodes"] === undefined);
|
|
139
|
+
}
|
|
140
|
+
documentOf(body) {
|
|
141
|
+
if (this.isCanonicalWrapper(body)) {
|
|
142
|
+
return body.document;
|
|
143
|
+
}
|
|
144
|
+
return body;
|
|
145
|
+
}
|
|
146
|
+
};
|
|
147
|
+
__decorate([
|
|
148
|
+
Put("workflows/:workflowId"),
|
|
149
|
+
__param(0, Param("workflowId")),
|
|
150
|
+
__param(1, Body()),
|
|
151
|
+
__metadata("design:type", Function),
|
|
152
|
+
__metadata("design:paramtypes", [String, Object]),
|
|
153
|
+
__metadata("design:returntype", Promise)
|
|
154
|
+
], GraphWorkflowController.prototype, "saveWorkflow", null);
|
|
155
|
+
__decorate([
|
|
156
|
+
Get("workflows/:workflowId"),
|
|
157
|
+
__param(0, Param("workflowId")),
|
|
158
|
+
__metadata("design:type", Function),
|
|
159
|
+
__metadata("design:paramtypes", [String]),
|
|
160
|
+
__metadata("design:returntype", Promise)
|
|
161
|
+
], GraphWorkflowController.prototype, "getWorkflow", null);
|
|
162
|
+
__decorate([
|
|
163
|
+
Post("workflows/validate"),
|
|
164
|
+
__param(0, Body()),
|
|
165
|
+
__metadata("design:type", Function),
|
|
166
|
+
__metadata("design:paramtypes", [Object]),
|
|
167
|
+
__metadata("design:returntype", Promise)
|
|
168
|
+
], GraphWorkflowController.prototype, "validateWorkflow", null);
|
|
169
|
+
GraphWorkflowController = __decorate([
|
|
170
|
+
Controller("graph"),
|
|
171
|
+
__param(1, Optional()),
|
|
172
|
+
__param(1, Inject(DecafRequestContext)),
|
|
173
|
+
__param(2, Optional()),
|
|
174
|
+
__param(2, Inject(GRAPH_WORKFLOW_OPTIONS)),
|
|
175
|
+
__metadata("design:paramtypes", [GraphWorkflowService,
|
|
176
|
+
DecafRequestContext, Object])
|
|
177
|
+
], GraphWorkflowController);
|
|
178
|
+
export { GraphWorkflowController };
|
|
179
|
+
//# sourceMappingURL=GraphWorkflowController.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GraphWorkflowController.js","sourceRoot":"","sources":["../../../../src/nest/graph/GraphWorkflowController.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EACL,IAAI,EACJ,UAAU,EACV,GAAG,EACH,aAAa,EACb,UAAU,EACV,iBAAiB,EACjB,QAAQ,EACR,KAAK,EACL,GAAG,EACH,IAAI,EACJ,MAAM,GACP,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AACzE,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAEzD,OAAO,EAAE,oBAAoB,EAAE,wDAAmD;AAClF,OAAO,EAAE,kCAAkC,EAAE,qDAAgD;AAG7F,2DAA2D;AAC3D,MAAM,CAAC,MAAM,sBAAsB,GAAG,wBAA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uB;IADnC,UAAU,CAAC,OAAO,CAAC;IAIf,WAAA,QAAQ,EAAE,CAAA;IAAE,WAAA,MAAM,CAAC,mBAAmB,CAAC,CAAA;IAEvC,WAAA,QAAQ,EAAE,CAAA;IAAE,WAAA,MAAM,CAAC,sBAAsB,CAAC,CAAA;qCAHT,oBAAoB;QAEpB,mBAAmB;GAJ5C,uBAAuB,CAqHnC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Barrel re-exporting the NestJS graph integration (controllers and module).
|
|
3
|
+
*
|
|
4
|
+
* Nest-agnostic backend services and models live outside this folder (in
|
|
5
|
+
* `../engine/services` and `../shared/graph`) and are re-exported from the
|
|
6
|
+
* standard `@decaf-ts/as-graph` entrypoint.
|
|
7
|
+
*/
|
|
8
|
+
export * from "./GraphWorkflowController.js";
|
|
9
|
+
export * from "./GraphRunController.js";
|
|
10
|
+
export * from "./GraphExecutorRegistryFactory.js";
|
|
11
|
+
export * from "./GraphNodeCatalogueController.js";
|
|
12
|
+
export * from "./GraphExecutionModule.js";
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/nest/graph/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,6CAA0C;AAC1C,wCAAqC;AACrC,kDAA+C;AAC/C,kDAA+C;AAC/C,0CAAuC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module as-graph/nest
|
|
3
|
+
* @summary NestJS graph backend wiring sub-entry.
|
|
4
|
+
* @description Exposes the NestJS controllers and dynamic module that host the
|
|
5
|
+
* graph execution engine over HTTP/SSE. Nest-agnostic services and models live
|
|
6
|
+
* in the standard `@decaf-ts/as-graph` export (engine/shared), not here. Backend
|
|
7
|
+
* consumers import from `@decaf-ts/as-graph/nest`; the engine itself is
|
|
8
|
+
* framework-free and lives in the standard `@decaf-ts/as-graph` export.
|
|
9
|
+
*/
|
|
10
|
+
export * from "./graph/index.js";
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/nest/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,iCAAwB"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* @module as-graph/nodes/agents/agent
|
|
12
|
+
* @summary Production Agent node declaration.
|
|
13
|
+
* @description The Agent node is the primary AI agent entrypoint. It is a
|
|
14
|
+
* rectangular node with `@connection()` ports for its structural
|
|
15
|
+
* dependencies: `model` (the LLM), `memory` (the memory store), and
|
|
16
|
+
* `workspace` (the workspace/context). Connections are rendered on the
|
|
17
|
+
* bottom side of the node (DECAF-32 §21.3). Each connection category has a
|
|
18
|
+
* distinct color defined in the category style registry.
|
|
19
|
+
*
|
|
20
|
+
* The single `prompt` input accepts placeholder expressions (§22.4) such as
|
|
21
|
+
* `{{ $input.brief }}` or `{{ $node["Research"].output.summary }}` that are
|
|
22
|
+
* resolved at execution time by the placeholder compiler.
|
|
23
|
+
*/
|
|
24
|
+
import { model, required } from "@decaf-ts/decorator-validation";
|
|
25
|
+
import { uielement } from "@decaf-ts/ui-decorators";
|
|
26
|
+
import { connection, input, node, output } from "./../../../shared/graph/index.js";
|
|
27
|
+
import { GraphNode } from "./../../base.js";
|
|
28
|
+
/**
|
|
29
|
+
* Agent node — an AI agent that orchestrates a model, memory, and workspace.
|
|
30
|
+
*
|
|
31
|
+
* The agent has:
|
|
32
|
+
* - `@input` port on the **left**: `prompt` (the task prompt; supports
|
|
33
|
+
* placeholder expressions like `{{ $input.something }}` per §22.4).
|
|
34
|
+
* - `@output` ports on the **right**: `response` (the agent's output), `actions`
|
|
35
|
+
* (any actions the agent decided to take).
|
|
36
|
+
* - `@connection` ports on the **bottom**: `model` (LLM), `memory` (memory
|
|
37
|
+
* store), `workspace` (workspace/context). Each connection has a distinct
|
|
38
|
+
* category color.
|
|
39
|
+
*
|
|
40
|
+
* The node is rectangular (not rounded) to visually distinguish it from
|
|
41
|
+
* regular processing nodes. The `color` and `icon` are omitted from `@node()`
|
|
42
|
+
* so they are resolved from the `"Agent"` category style.
|
|
43
|
+
*/
|
|
44
|
+
let AgentNode = class AgentNode extends GraphNode {
|
|
45
|
+
/**
|
|
46
|
+
* Placeholder production implementation: echoes the (placeholder-resolved)
|
|
47
|
+
* `prompt` input as the response and reports no actions.
|
|
48
|
+
*
|
|
49
|
+
* @param {GraphNodeExecutionRequest<AgentNodeInput>} request - Execution request carrying the resolved `prompt`.
|
|
50
|
+
* @return {GraphExecutionValues} The `response`/`actions` output values.
|
|
51
|
+
*/
|
|
52
|
+
execute(request) {
|
|
53
|
+
return {
|
|
54
|
+
response: `[Agent response] ${String(request.inputs["prompt"] ?? "")}`,
|
|
55
|
+
actions: [],
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
__decorate([
|
|
60
|
+
required(),
|
|
61
|
+
uielement("ngx-decaf-crud-field", {
|
|
62
|
+
label: "graph.node.agent.agent.fields.prompt.label",
|
|
63
|
+
placeholder: "graph.node.agent.agent.fields.prompt.placeholder",
|
|
64
|
+
type: "textarea",
|
|
65
|
+
}),
|
|
66
|
+
input({ handle: "prompt" }),
|
|
67
|
+
__metadata("design:type", String)
|
|
68
|
+
], AgentNode.prototype, "prompt", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
required(),
|
|
71
|
+
output({ handle: "response" }),
|
|
72
|
+
__metadata("design:type", String)
|
|
73
|
+
], AgentNode.prototype, "response", void 0);
|
|
74
|
+
__decorate([
|
|
75
|
+
required(),
|
|
76
|
+
output({ handle: "actions" }),
|
|
77
|
+
__metadata("design:type", Array)
|
|
78
|
+
], AgentNode.prototype, "actions", void 0);
|
|
79
|
+
__decorate([
|
|
80
|
+
connection({ category: "model", handle: "model" }),
|
|
81
|
+
__metadata("design:type", Object)
|
|
82
|
+
], AgentNode.prototype, "model", void 0);
|
|
83
|
+
__decorate([
|
|
84
|
+
connection({ category: "memory", handle: "memory" }),
|
|
85
|
+
__metadata("design:type", Object)
|
|
86
|
+
], AgentNode.prototype, "memory", void 0);
|
|
87
|
+
__decorate([
|
|
88
|
+
connection({ category: "workspace", handle: "workspace" }),
|
|
89
|
+
__metadata("design:type", Object)
|
|
90
|
+
], AgentNode.prototype, "workspace", void 0);
|
|
91
|
+
AgentNode = __decorate([
|
|
92
|
+
node("core.agent", {
|
|
93
|
+
kind: "core.agent",
|
|
94
|
+
category: "Agent",
|
|
95
|
+
// color and icon omitted — resolved from the "Agent" category style
|
|
96
|
+
width: 140,
|
|
97
|
+
height: 120,
|
|
98
|
+
labels: ["agent", "ai", "orchestrator"],
|
|
99
|
+
metadata: {
|
|
100
|
+
title: "graph.node.agent.agent.name",
|
|
101
|
+
description: "graph.node.agent.agent.description",
|
|
102
|
+
shape: "rectangle",
|
|
103
|
+
},
|
|
104
|
+
}),
|
|
105
|
+
model()
|
|
106
|
+
], AgentNode);
|
|
107
|
+
export { AgentNode };
|
|
108
|
+
/**
|
|
109
|
+
* All built-in agent node constructors.
|
|
110
|
+
*/
|
|
111
|
+
export const GRAPH_AGENT_NODES = [AgentNode];
|
|
112
|
+
//# sourceMappingURL=node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node.js","sourceRoot":"","sources":["../../../../../src/node/agents/agent/node.ts"],"names":[],"mappings":";;;;;;;;;AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,yCAA8B;AACxE,OAAO,EAAE,SAAS,EAAE,wBAAmB;AAevC;;;;;;;;;;;;;;;GAeG;AAgBI,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,SAA0C;IACvE;;;;;;OAMG;IACM,OAAO,CACd,OAAkD;QAElD,OAAO;YACL,QAAQ,EAAE,oBAAoB,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,EAAE;YACtE,OAAO,EAAE,EAAE;SACZ,CAAC;IACJ,CAAC;CAuCF,CAAA;AA3BC;IAPC,QAAQ,EAAE;IACV,SAAS,CAAC,sBAAsB,EAAE;QACjC,KAAK,EAAE,4CAA4C;QACnD,WAAW,EAAE,kDAAkD;QAC/D,IAAI,EAAE,UAAU;KACjB,CAAC;IACD,KAAK,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC;;yCACZ;AAOhB;IAFC,QAAQ,EAAE;IACV,MAAM,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,CAAC;;2CACb;AAKlB;IAFC,QAAQ,EAAE;IACV,MAAM,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC;;0CACV;AAMpB;IADC,UAAU,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC;;wCACnC;AAIhB;I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