@decaf-ts/integrations 0.3.1 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/integrations.cjs +1 -1
- package/lib/cjs/graph/constants.cjs +94 -0
- package/lib/cjs/graph/constants.cjs.map +1 -0
- package/lib/cjs/graph/decorators.cjs +4 -0
- package/lib/cjs/graph/decorators.cjs.map +1 -0
- package/lib/cjs/graph/errors/GraphCycleError.cjs +20 -0
- package/lib/cjs/graph/errors/GraphCycleError.cjs.map +1 -0
- package/lib/cjs/graph/errors/GraphExecutionError.cjs +27 -0
- package/lib/cjs/graph/errors/GraphExecutionError.cjs.map +1 -0
- package/lib/cjs/graph/errors/GraphInputError.cjs +20 -0
- package/lib/cjs/graph/errors/GraphInputError.cjs.map +1 -0
- package/lib/cjs/graph/errors/GraphLoopLimitError.cjs +20 -0
- package/lib/cjs/graph/errors/GraphLoopLimitError.cjs.map +1 -0
- package/lib/cjs/graph/errors/GraphPinningError.cjs +20 -0
- package/lib/cjs/graph/errors/GraphPinningError.cjs.map +1 -0
- package/lib/cjs/graph/errors/GraphPortError.cjs +20 -0
- package/lib/cjs/graph/errors/GraphPortError.cjs.map +1 -0
- package/lib/cjs/graph/errors/GraphStoreError.cjs +20 -0
- package/lib/cjs/graph/errors/GraphStoreError.cjs.map +1 -0
- package/lib/cjs/graph/errors/GraphTopologyError.cjs +20 -0
- package/lib/cjs/graph/errors/GraphTopologyError.cjs.map +1 -0
- package/lib/cjs/graph/errors/index.cjs +31 -0
- package/lib/cjs/graph/errors/index.cjs.map +1 -0
- package/lib/cjs/graph/events/GraphExecutionEvent.cjs +4 -0
- package/lib/cjs/graph/events/GraphExecutionEvent.cjs.map +1 -0
- package/lib/cjs/graph/events/GraphExecutionEventEmitter.cjs +40 -0
- package/lib/cjs/graph/events/GraphExecutionEventEmitter.cjs.map +1 -0
- package/lib/cjs/graph/events/GraphExecutionEventFactory.cjs +37 -0
- package/lib/cjs/graph/events/GraphExecutionEventFactory.cjs.map +1 -0
- package/lib/cjs/graph/events/GraphExecutionObserver.cjs +4 -0
- package/lib/cjs/graph/events/GraphExecutionObserver.cjs.map +1 -0
- package/lib/cjs/graph/events/index.cjs +27 -0
- package/lib/cjs/graph/events/index.cjs.map +1 -0
- package/lib/cjs/graph/execution/GraphExecutionContext.cjs +79 -0
- package/lib/cjs/graph/execution/GraphExecutionContext.cjs.map +1 -0
- package/lib/cjs/graph/execution/GraphExecutionEngine.cjs +405 -0
- package/lib/cjs/graph/execution/GraphExecutionEngine.cjs.map +1 -0
- package/lib/cjs/graph/execution/GraphExecutionFrame.cjs +32 -0
- package/lib/cjs/graph/execution/GraphExecutionFrame.cjs.map +1 -0
- package/lib/cjs/graph/execution/GraphExecutionResult.cjs +30 -0
- package/lib/cjs/graph/execution/GraphExecutionResult.cjs.map +1 -0
- package/lib/cjs/graph/execution/GraphNodeExecutor.cjs +4 -0
- package/lib/cjs/graph/execution/GraphNodeExecutor.cjs.map +1 -0
- package/lib/cjs/graph/execution/index.cjs +28 -0
- package/lib/cjs/graph/execution/index.cjs.map +1 -0
- package/lib/cjs/graph/index.cjs +74 -0
- package/lib/cjs/graph/index.cjs.map +1 -0
- package/lib/cjs/graph/loops/ForeachGraphNodeExecutor.cjs +84 -0
- package/lib/cjs/graph/loops/ForeachGraphNodeExecutor.cjs.map +1 -0
- package/lib/cjs/graph/loops/GraphConditionEvaluator.cjs +63 -0
- package/lib/cjs/graph/loops/GraphConditionEvaluator.cjs.map +1 -0
- package/lib/cjs/graph/loops/GraphLoopExecutionContext.cjs +16 -0
- package/lib/cjs/graph/loops/GraphLoopExecutionContext.cjs.map +1 -0
- package/lib/cjs/graph/loops/UntilGraphNodeExecutor.cjs +76 -0
- package/lib/cjs/graph/loops/UntilGraphNodeExecutor.cjs.map +1 -0
- package/lib/cjs/graph/loops/WhileGraphNodeExecutor.cjs +77 -0
- package/lib/cjs/graph/loops/WhileGraphNodeExecutor.cjs.map +1 -0
- package/lib/cjs/graph/loops/index.cjs +28 -0
- package/lib/cjs/graph/loops/index.cjs.map +1 -0
- package/lib/cjs/graph/pinning/GraphPinningDependencyResolver.cjs +28 -0
- package/lib/cjs/graph/pinning/GraphPinningDependencyResolver.cjs.map +1 -0
- package/lib/cjs/graph/pinning/GraphPinningMetadata.cjs +20 -0
- package/lib/cjs/graph/pinning/GraphPinningMetadata.cjs.map +1 -0
- package/lib/cjs/graph/pinning/GraphPinningPolicy.cjs +34 -0
- package/lib/cjs/graph/pinning/GraphPinningPolicy.cjs.map +1 -0
- package/lib/cjs/graph/pinning/GraphPinningService.cjs +191 -0
- package/lib/cjs/graph/pinning/GraphPinningService.cjs.map +1 -0
- package/lib/cjs/graph/pinning/index.cjs +27 -0
- package/lib/cjs/graph/pinning/index.cjs.map +1 -0
- package/lib/cjs/graph/planning/GraphExecutionPlan.cjs +4 -0
- package/lib/cjs/graph/planning/GraphExecutionPlan.cjs.map +1 -0
- package/lib/cjs/graph/planning/GraphExecutionPlanEdge.cjs +4 -0
- package/lib/cjs/graph/planning/GraphExecutionPlanEdge.cjs.map +1 -0
- package/lib/cjs/graph/planning/GraphExecutionPlanLayer.cjs +4 -0
- package/lib/cjs/graph/planning/GraphExecutionPlanLayer.cjs.map +1 -0
- package/lib/cjs/graph/planning/GraphExecutionPlanNode.cjs +4 -0
- package/lib/cjs/graph/planning/GraphExecutionPlanNode.cjs.map +1 -0
- package/lib/cjs/graph/planning/GraphExecutionPlanner.cjs +197 -0
- package/lib/cjs/graph/planning/GraphExecutionPlanner.cjs.map +1 -0
- package/lib/cjs/graph/planning/GraphRelationResolver.cjs +172 -0
- package/lib/cjs/graph/planning/GraphRelationResolver.cjs.map +1 -0
- package/lib/cjs/graph/planning/GraphTopology.cjs +57 -0
- package/lib/cjs/graph/planning/GraphTopology.cjs.map +1 -0
- package/lib/cjs/graph/planning/index.cjs +30 -0
- package/lib/cjs/graph/planning/index.cjs.map +1 -0
- package/lib/cjs/graph/registry/GraphNodeExecutorRegistry.cjs +44 -0
- package/lib/cjs/graph/registry/GraphNodeExecutorRegistry.cjs.map +1 -0
- package/lib/cjs/graph/registry/GraphNodeExecutorResolver.cjs +27 -0
- package/lib/cjs/graph/registry/GraphNodeExecutorResolver.cjs.map +1 -0
- package/lib/cjs/graph/registry/index.cjs +25 -0
- package/lib/cjs/graph/registry/index.cjs.map +1 -0
- package/lib/cjs/graph/snapshots/GraphExecutionSnapshotMapper.cjs +53 -0
- package/lib/cjs/graph/snapshots/GraphExecutionSnapshotMapper.cjs.map +1 -0
- package/lib/cjs/graph/snapshots/index.cjs +24 -0
- package/lib/cjs/graph/snapshots/index.cjs.map +1 -0
- package/lib/cjs/graph/store/GraphCachedValue.cjs +4 -0
- package/lib/cjs/graph/store/GraphCachedValue.cjs.map +1 -0
- package/lib/cjs/graph/store/GraphValueKey.cjs +4 -0
- package/lib/cjs/graph/store/GraphValueKey.cjs.map +1 -0
- package/lib/cjs/graph/store/GraphValueStore.cjs +76 -0
- package/lib/cjs/graph/store/GraphValueStore.cjs.map +1 -0
- package/lib/cjs/graph/store/GraphValueStoreAdapter.cjs +4 -0
- package/lib/cjs/graph/store/GraphValueStoreAdapter.cjs.map +1 -0
- package/lib/cjs/graph/store/InMemoryGraphValueStoreAdapter.cjs +69 -0
- package/lib/cjs/graph/store/InMemoryGraphValueStoreAdapter.cjs.map +1 -0
- package/lib/cjs/graph/store/index.cjs +28 -0
- package/lib/cjs/graph/store/index.cjs.map +1 -0
- package/lib/cjs/graph/types.cjs +4 -0
- package/lib/cjs/graph/types.cjs.map +1 -0
- package/lib/cjs/graph/validation/GraphDefinitionValidator.cjs +33 -0
- package/lib/cjs/graph/validation/GraphDefinitionValidator.cjs.map +1 -0
- package/lib/cjs/graph/validation/GraphPortSchemaResolver.cjs +58 -0
- package/lib/cjs/graph/validation/GraphPortSchemaResolver.cjs.map +1 -0
- package/lib/cjs/graph/validation/GraphValueValidator.cjs +52 -0
- package/lib/cjs/graph/validation/GraphValueValidator.cjs.map +1 -0
- package/lib/cjs/graph/validation/index.cjs +26 -0
- package/lib/cjs/graph/validation/index.cjs.map +1 -0
- package/lib/cjs/index.cjs +3 -3
- package/lib/esm/graph/constants.js +106 -0
- package/lib/esm/graph/constants.js.map +1 -0
- package/lib/esm/graph/decorators.js +2 -0
- package/lib/esm/graph/decorators.js.map +1 -0
- package/lib/esm/graph/errors/GraphCycleError.js +15 -0
- package/lib/esm/graph/errors/GraphCycleError.js.map +1 -0
- package/lib/esm/graph/errors/GraphExecutionError.js +22 -0
- package/lib/esm/graph/errors/GraphExecutionError.js.map +1 -0
- package/lib/esm/graph/errors/GraphInputError.js +15 -0
- package/lib/esm/graph/errors/GraphInputError.js.map +1 -0
- package/lib/esm/graph/errors/GraphLoopLimitError.js +15 -0
- package/lib/esm/graph/errors/GraphLoopLimitError.js.map +1 -0
- package/lib/esm/graph/errors/GraphPinningError.js +15 -0
- package/lib/esm/graph/errors/GraphPinningError.js.map +1 -0
- package/lib/esm/graph/errors/GraphPortError.js +15 -0
- package/lib/esm/graph/errors/GraphPortError.js.map +1 -0
- package/lib/esm/graph/errors/GraphStoreError.js +15 -0
- package/lib/esm/graph/errors/GraphStoreError.js.map +1 -0
- package/lib/esm/graph/errors/GraphTopologyError.js +15 -0
- package/lib/esm/graph/errors/GraphTopologyError.js.map +1 -0
- package/lib/esm/graph/errors/index.js +14 -0
- package/lib/esm/graph/errors/index.js.map +1 -0
- package/lib/esm/graph/events/GraphExecutionEvent.js +2 -0
- package/lib/esm/graph/events/GraphExecutionEvent.js.map +1 -0
- package/lib/esm/graph/events/GraphExecutionEventEmitter.js +35 -0
- package/lib/esm/graph/events/GraphExecutionEventEmitter.js.map +1 -0
- package/lib/esm/graph/events/GraphExecutionEventFactory.js +32 -0
- package/lib/esm/graph/events/GraphExecutionEventFactory.js.map +1 -0
- package/lib/esm/graph/events/GraphExecutionObserver.js +2 -0
- package/lib/esm/graph/events/GraphExecutionObserver.js.map +1 -0
- package/lib/esm/graph/events/index.js +10 -0
- package/lib/esm/graph/events/index.js.map +1 -0
- package/lib/esm/graph/execution/GraphExecutionContext.js +74 -0
- package/lib/esm/graph/execution/GraphExecutionContext.js.map +1 -0
- package/lib/esm/graph/execution/GraphExecutionEngine.js +400 -0
- package/lib/esm/graph/execution/GraphExecutionEngine.js.map +1 -0
- package/lib/esm/graph/execution/GraphExecutionFrame.js +27 -0
- package/lib/esm/graph/execution/GraphExecutionFrame.js.map +1 -0
- package/lib/esm/graph/execution/GraphExecutionResult.js +26 -0
- package/lib/esm/graph/execution/GraphExecutionResult.js.map +1 -0
- package/lib/esm/graph/execution/GraphNodeExecutor.js +2 -0
- package/lib/esm/graph/execution/GraphNodeExecutor.js.map +1 -0
- package/lib/esm/graph/execution/index.js +11 -0
- package/lib/esm/graph/execution/index.js.map +1 -0
- package/lib/esm/graph/index.js +57 -0
- package/lib/esm/graph/index.js.map +1 -0
- package/lib/esm/graph/loops/ForeachGraphNodeExecutor.js +79 -0
- package/lib/esm/graph/loops/ForeachGraphNodeExecutor.js.map +1 -0
- package/lib/esm/graph/loops/GraphConditionEvaluator.js +58 -0
- package/lib/esm/graph/loops/GraphConditionEvaluator.js.map +1 -0
- package/lib/esm/graph/loops/GraphLoopExecutionContext.js +11 -0
- package/lib/esm/graph/loops/GraphLoopExecutionContext.js.map +1 -0
- package/lib/esm/graph/loops/UntilGraphNodeExecutor.js +71 -0
- package/lib/esm/graph/loops/UntilGraphNodeExecutor.js.map +1 -0
- package/lib/esm/graph/loops/WhileGraphNodeExecutor.js +72 -0
- package/lib/esm/graph/loops/WhileGraphNodeExecutor.js.map +1 -0
- package/lib/esm/graph/loops/index.js +11 -0
- package/lib/esm/graph/loops/index.js.map +1 -0
- package/lib/esm/graph/pinning/GraphPinningDependencyResolver.js +23 -0
- package/lib/esm/graph/pinning/GraphPinningDependencyResolver.js.map +1 -0
- package/lib/esm/graph/pinning/GraphPinningMetadata.js +15 -0
- package/lib/esm/graph/pinning/GraphPinningMetadata.js.map +1 -0
- package/lib/esm/graph/pinning/GraphPinningPolicy.js +29 -0
- package/lib/esm/graph/pinning/GraphPinningPolicy.js.map +1 -0
- package/lib/esm/graph/pinning/GraphPinningService.js +186 -0
- package/lib/esm/graph/pinning/GraphPinningService.js.map +1 -0
- package/lib/esm/graph/pinning/index.js +10 -0
- package/lib/esm/graph/pinning/index.js.map +1 -0
- package/lib/esm/graph/planning/GraphExecutionPlan.js +2 -0
- package/lib/esm/graph/planning/GraphExecutionPlan.js.map +1 -0
- package/lib/esm/graph/planning/GraphExecutionPlanEdge.js +7 -0
- package/lib/esm/graph/planning/GraphExecutionPlanEdge.js.map +1 -0
- package/lib/esm/graph/planning/GraphExecutionPlanLayer.js +2 -0
- package/lib/esm/graph/planning/GraphExecutionPlanLayer.js.map +1 -0
- package/lib/esm/graph/planning/GraphExecutionPlanNode.js +2 -0
- package/lib/esm/graph/planning/GraphExecutionPlanNode.js.map +1 -0
- package/lib/esm/graph/planning/GraphExecutionPlanner.js +192 -0
- package/lib/esm/graph/planning/GraphExecutionPlanner.js.map +1 -0
- package/lib/esm/graph/planning/GraphRelationResolver.js +167 -0
- package/lib/esm/graph/planning/GraphRelationResolver.js.map +1 -0
- package/lib/esm/graph/planning/GraphTopology.js +52 -0
- package/lib/esm/graph/planning/GraphTopology.js.map +1 -0
- package/lib/esm/graph/planning/index.js +13 -0
- package/lib/esm/graph/planning/index.js.map +1 -0
- package/lib/esm/graph/registry/GraphNodeExecutorRegistry.js +39 -0
- package/lib/esm/graph/registry/GraphNodeExecutorRegistry.js.map +1 -0
- package/lib/esm/graph/registry/GraphNodeExecutorResolver.js +22 -0
- package/lib/esm/graph/registry/GraphNodeExecutorResolver.js.map +1 -0
- package/lib/esm/graph/registry/index.js +8 -0
- package/lib/esm/graph/registry/index.js.map +1 -0
- package/lib/esm/graph/snapshots/GraphExecutionSnapshotMapper.js +48 -0
- package/lib/esm/graph/snapshots/GraphExecutionSnapshotMapper.js.map +1 -0
- package/lib/esm/graph/snapshots/index.js +7 -0
- package/lib/esm/graph/snapshots/index.js.map +1 -0
- package/lib/esm/graph/store/GraphCachedValue.js +2 -0
- package/lib/esm/graph/store/GraphCachedValue.js.map +1 -0
- package/lib/esm/graph/store/GraphValueKey.js +7 -0
- package/lib/esm/graph/store/GraphValueKey.js.map +1 -0
- package/lib/esm/graph/store/GraphValueStore.js +71 -0
- package/lib/esm/graph/store/GraphValueStore.js.map +1 -0
- package/lib/esm/graph/store/GraphValueStoreAdapter.js +2 -0
- package/lib/esm/graph/store/GraphValueStoreAdapter.js.map +1 -0
- package/lib/esm/graph/store/InMemoryGraphValueStoreAdapter.js +64 -0
- package/lib/esm/graph/store/InMemoryGraphValueStoreAdapter.js.map +1 -0
- package/lib/esm/graph/store/index.js +11 -0
- package/lib/esm/graph/store/index.js.map +1 -0
- package/lib/esm/graph/types.js +2 -0
- package/lib/esm/graph/types.js.map +1 -0
- package/lib/esm/graph/validation/GraphDefinitionValidator.js +28 -0
- package/lib/esm/graph/validation/GraphDefinitionValidator.js.map +1 -0
- package/lib/esm/graph/validation/GraphPortSchemaResolver.js +53 -0
- package/lib/esm/graph/validation/GraphPortSchemaResolver.js.map +1 -0
- package/lib/esm/graph/validation/GraphValueValidator.js +47 -0
- package/lib/esm/graph/validation/GraphValueValidator.js.map +1 -0
- package/lib/esm/graph/validation/index.js +9 -0
- package/lib/esm/graph/validation/index.js.map +1 -0
- package/lib/esm/index.js +3 -3
- package/lib/types/graph/constants.d.cts +101 -0
- package/lib/types/graph/constants.d.mts +101 -0
- package/lib/types/graph/decorators.d.cts +6 -0
- package/lib/types/graph/decorators.d.mts +6 -0
- package/lib/types/graph/errors/GraphCycleError.d.cts +12 -0
- package/lib/types/graph/errors/GraphCycleError.d.mts +12 -0
- package/lib/types/graph/errors/GraphExecutionError.d.cts +19 -0
- package/lib/types/graph/errors/GraphExecutionError.d.mts +19 -0
- package/lib/types/graph/errors/GraphInputError.d.cts +12 -0
- package/lib/types/graph/errors/GraphInputError.d.mts +12 -0
- package/lib/types/graph/errors/GraphLoopLimitError.d.cts +12 -0
- package/lib/types/graph/errors/GraphLoopLimitError.d.mts +12 -0
- package/lib/types/graph/errors/GraphPinningError.d.cts +12 -0
- package/lib/types/graph/errors/GraphPinningError.d.mts +12 -0
- package/lib/types/graph/errors/GraphPortError.d.cts +12 -0
- package/lib/types/graph/errors/GraphPortError.d.mts +12 -0
- package/lib/types/graph/errors/GraphStoreError.d.cts +12 -0
- package/lib/types/graph/errors/GraphStoreError.d.mts +12 -0
- package/lib/types/graph/errors/GraphTopologyError.d.cts +12 -0
- package/lib/types/graph/errors/GraphTopologyError.d.mts +12 -0
- package/lib/types/graph/errors/index.d.cts +13 -0
- package/lib/types/graph/errors/index.d.mts +13 -0
- package/lib/types/graph/events/GraphExecutionEvent.d.cts +6 -0
- package/lib/types/graph/events/GraphExecutionEvent.d.mts +6 -0
- package/lib/types/graph/events/GraphExecutionEventEmitter.d.cts +26 -0
- package/lib/types/graph/events/GraphExecutionEventEmitter.d.mts +26 -0
- package/lib/types/graph/events/GraphExecutionEventFactory.d.cts +25 -0
- package/lib/types/graph/events/GraphExecutionEventFactory.d.mts +25 -0
- package/lib/types/graph/events/GraphExecutionObserver.d.cts +17 -0
- package/lib/types/graph/events/GraphExecutionObserver.d.mts +17 -0
- package/lib/types/graph/events/index.d.cts +9 -0
- package/lib/types/graph/events/index.d.mts +9 -0
- package/lib/types/graph/execution/GraphExecutionContext.d.cts +50 -0
- package/lib/types/graph/execution/GraphExecutionContext.d.mts +50 -0
- package/lib/types/graph/execution/GraphExecutionEngine.d.cts +112 -0
- package/lib/types/graph/execution/GraphExecutionEngine.d.mts +112 -0
- package/lib/types/graph/execution/GraphExecutionFrame.d.cts +29 -0
- package/lib/types/graph/execution/GraphExecutionFrame.d.mts +29 -0
- package/lib/types/graph/execution/GraphExecutionResult.d.cts +13 -0
- package/lib/types/graph/execution/GraphExecutionResult.d.mts +13 -0
- package/lib/types/graph/execution/GraphNodeExecutor.d.cts +23 -0
- package/lib/types/graph/execution/GraphNodeExecutor.d.mts +23 -0
- package/lib/types/graph/execution/index.d.cts +10 -0
- package/lib/types/graph/execution/index.d.mts +10 -0
- package/lib/types/graph/index.d.cts +52 -0
- package/lib/types/graph/index.d.mts +52 -0
- package/lib/types/graph/loops/ForeachGraphNodeExecutor.d.cts +27 -0
- package/lib/types/graph/loops/ForeachGraphNodeExecutor.d.mts +27 -0
- package/lib/types/graph/loops/GraphConditionEvaluator.d.cts +23 -0
- package/lib/types/graph/loops/GraphConditionEvaluator.d.mts +23 -0
- package/lib/types/graph/loops/GraphLoopExecutionContext.d.cts +15 -0
- package/lib/types/graph/loops/GraphLoopExecutionContext.d.mts +15 -0
- package/lib/types/graph/loops/UntilGraphNodeExecutor.d.cts +22 -0
- package/lib/types/graph/loops/UntilGraphNodeExecutor.d.mts +22 -0
- package/lib/types/graph/loops/WhileGraphNodeExecutor.d.cts +26 -0
- package/lib/types/graph/loops/WhileGraphNodeExecutor.d.mts +26 -0
- package/lib/types/graph/loops/index.d.cts +10 -0
- package/lib/types/graph/loops/index.d.mts +10 -0
- package/lib/types/graph/pinning/GraphPinningDependencyResolver.d.cts +21 -0
- package/lib/types/graph/pinning/GraphPinningDependencyResolver.d.mts +21 -0
- package/lib/types/graph/pinning/GraphPinningMetadata.d.cts +14 -0
- package/lib/types/graph/pinning/GraphPinningMetadata.d.mts +14 -0
- package/lib/types/graph/pinning/GraphPinningPolicy.d.cts +20 -0
- package/lib/types/graph/pinning/GraphPinningPolicy.d.mts +20 -0
- package/lib/types/graph/pinning/GraphPinningService.d.cts +59 -0
- package/lib/types/graph/pinning/GraphPinningService.d.mts +59 -0
- package/lib/types/graph/pinning/index.d.cts +9 -0
- package/lib/types/graph/pinning/index.d.mts +9 -0
- package/lib/types/graph/planning/GraphExecutionPlan.d.cts +21 -0
- package/lib/types/graph/planning/GraphExecutionPlan.d.mts +21 -0
- package/lib/types/graph/planning/GraphExecutionPlanEdge.d.cts +21 -0
- package/lib/types/graph/planning/GraphExecutionPlanEdge.d.mts +21 -0
- package/lib/types/graph/planning/GraphExecutionPlanLayer.d.cts +13 -0
- package/lib/types/graph/planning/GraphExecutionPlanLayer.d.mts +13 -0
- package/lib/types/graph/planning/GraphExecutionPlanNode.d.cts +20 -0
- package/lib/types/graph/planning/GraphExecutionPlanNode.d.mts +20 -0
- package/lib/types/graph/planning/GraphExecutionPlanner.d.cts +60 -0
- package/lib/types/graph/planning/GraphExecutionPlanner.d.mts +60 -0
- package/lib/types/graph/planning/GraphRelationResolver.d.cts +62 -0
- package/lib/types/graph/planning/GraphRelationResolver.d.mts +62 -0
- package/lib/types/graph/planning/GraphTopology.d.cts +23 -0
- package/lib/types/graph/planning/GraphTopology.d.mts +23 -0
- package/lib/types/graph/planning/index.d.cts +12 -0
- package/lib/types/graph/planning/index.d.mts +12 -0
- package/lib/types/graph/registry/GraphNodeExecutorRegistry.d.cts +25 -0
- package/lib/types/graph/registry/GraphNodeExecutorRegistry.d.mts +25 -0
- package/lib/types/graph/registry/GraphNodeExecutorResolver.d.cts +21 -0
- package/lib/types/graph/registry/GraphNodeExecutorResolver.d.mts +21 -0
- package/lib/types/graph/registry/index.d.cts +7 -0
- package/lib/types/graph/registry/index.d.mts +7 -0
- package/lib/types/graph/snapshots/GraphExecutionSnapshotMapper.d.cts +10 -0
- package/lib/types/graph/snapshots/GraphExecutionSnapshotMapper.d.mts +10 -0
- package/lib/types/graph/snapshots/index.d.cts +6 -0
- package/lib/types/graph/snapshots/index.d.mts +6 -0
- package/lib/types/graph/store/GraphCachedValue.d.cts +20 -0
- package/lib/types/graph/store/GraphCachedValue.d.mts +20 -0
- package/lib/types/graph/store/GraphValueKey.d.cts +18 -0
- package/lib/types/graph/store/GraphValueKey.d.mts +18 -0
- package/lib/types/graph/store/GraphValueStore.d.cts +41 -0
- package/lib/types/graph/store/GraphValueStore.d.mts +41 -0
- package/lib/types/graph/store/GraphValueStoreAdapter.d.cts +32 -0
- package/lib/types/graph/store/GraphValueStoreAdapter.d.mts +32 -0
- package/lib/types/graph/store/InMemoryGraphValueStoreAdapter.d.cts +33 -0
- package/lib/types/graph/store/InMemoryGraphValueStoreAdapter.d.mts +33 -0
- package/lib/types/graph/store/index.d.cts +10 -0
- package/lib/types/graph/store/index.d.mts +10 -0
- package/lib/types/graph/types.d.cts +197 -0
- package/lib/types/graph/types.d.mts +197 -0
- package/lib/types/graph/validation/GraphDefinitionValidator.d.cts +21 -0
- package/lib/types/graph/validation/GraphDefinitionValidator.d.mts +21 -0
- package/lib/types/graph/validation/GraphPortSchemaResolver.d.cts +39 -0
- package/lib/types/graph/validation/GraphPortSchemaResolver.d.mts +39 -0
- package/lib/types/graph/validation/GraphValueValidator.d.cts +27 -0
- package/lib/types/graph/validation/GraphValueValidator.d.mts +27 -0
- package/lib/types/graph/validation/index.d.cts +8 -0
- package/lib/types/graph/validation/index.d.mts +8 -0
- package/lib/types/index.d.cts +2 -2
- package/lib/types/index.d.mts +2 -2
- package/package.json +17 -3
|
@@ -0,0 +1,400 @@
|
|
|
1
|
+
import { GRAPH_DEFAULT_CONCURRENCY, GRAPH_WORKFLOW_BOUNDARY, GraphExecutionEventType, GraphExecutionStatus, } from "./../constants.js";
|
|
2
|
+
import { GraphExecutionEventEmitter } from "./../events/GraphExecutionEventEmitter.js";
|
|
3
|
+
import { GraphExecutionEventFactory } from "./../events/GraphExecutionEventFactory.js";
|
|
4
|
+
import { GraphExecutionPlanner } from "./../planning/GraphExecutionPlanner.js";
|
|
5
|
+
import { InMemoryGraphValueStoreAdapter } from "./../store/InMemoryGraphValueStoreAdapter.js";
|
|
6
|
+
import { GraphValueStore } from "./../store/GraphValueStore.js";
|
|
7
|
+
import { GraphPinningService } from "./../pinning/GraphPinningService.js";
|
|
8
|
+
import { GraphPinningPolicy } from "./../pinning/GraphPinningPolicy.js";
|
|
9
|
+
import { GraphPinningDependencyResolver } from "./../pinning/GraphPinningDependencyResolver.js";
|
|
10
|
+
import { GraphExecutionContext } from "./GraphExecutionContext.js";
|
|
11
|
+
import { GraphExecutionFrame } from "./GraphExecutionFrame.js";
|
|
12
|
+
import { buildGraphExecutionResult } from "./GraphExecutionResult.js";
|
|
13
|
+
/**
|
|
14
|
+
* Reference graph execution engine.
|
|
15
|
+
*
|
|
16
|
+
* Executes a {@link GraphWorkflowDefinition} by:
|
|
17
|
+
* 1. Planning the workflow into topological layers.
|
|
18
|
+
* 2. Seeding workflow inputs into the value store.
|
|
19
|
+
* 3. Executing nodes layer-by-layer with configurable concurrency.
|
|
20
|
+
* 4. Routing values along edges.
|
|
21
|
+
* 5. Emitting structured events through Decaf's Observable pipeline.
|
|
22
|
+
* 6. Returning a complete {@link GraphExecutionResult}.
|
|
23
|
+
*/
|
|
24
|
+
export class GraphExecutionEngine {
|
|
25
|
+
constructor(config) {
|
|
26
|
+
this.emitter = config.eventEmitter ?? new GraphExecutionEventEmitter();
|
|
27
|
+
this.planner = config.planner ?? new GraphExecutionPlanner();
|
|
28
|
+
this.valueStoreAdapter =
|
|
29
|
+
config.valueStoreAdapter ?? new InMemoryGraphValueStoreAdapter();
|
|
30
|
+
this.defaultOptions = config.defaultOptions ?? {};
|
|
31
|
+
this.config = config;
|
|
32
|
+
}
|
|
33
|
+
observe(observer) {
|
|
34
|
+
return this.emitter.observe(observer);
|
|
35
|
+
}
|
|
36
|
+
unObserve(observer) {
|
|
37
|
+
this.emitter.unObserve(observer);
|
|
38
|
+
}
|
|
39
|
+
async updateObservers(event) {
|
|
40
|
+
await this.emitter.updateObservers(event);
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Executes a workflow with the given inputs and options.
|
|
44
|
+
*/
|
|
45
|
+
async execute(workflow, inputs = {}, options = {}) {
|
|
46
|
+
const opts = this.mergeOptions(options);
|
|
47
|
+
const runId = opts.runId ?? this.generateRunId();
|
|
48
|
+
const path = opts.path ?? [];
|
|
49
|
+
const eventFactory = new GraphExecutionEventFactory();
|
|
50
|
+
const valueStore = new GraphValueStore(this.valueStoreAdapter);
|
|
51
|
+
valueStore.seedWorkflowInputs(inputs);
|
|
52
|
+
const plan = this.planner.plan(workflow);
|
|
53
|
+
const frame = new GraphExecutionFrame(runId, plan, valueStore, eventFactory);
|
|
54
|
+
const emitFn = async (partial) => {
|
|
55
|
+
await this.emitEvent(frame, {
|
|
56
|
+
type: partial.type ?? GraphExecutionEventType.NODE_OUTPUT,
|
|
57
|
+
runId,
|
|
58
|
+
parentRunId: opts.parentRunId,
|
|
59
|
+
workflowId: workflow.name,
|
|
60
|
+
nodeId: partial.nodeId,
|
|
61
|
+
path: partial.path ?? path,
|
|
62
|
+
...partial,
|
|
63
|
+
});
|
|
64
|
+
};
|
|
65
|
+
await this.emitEvent(frame, {
|
|
66
|
+
type: GraphExecutionEventType.WORKFLOW_STARTED,
|
|
67
|
+
runId,
|
|
68
|
+
parentRunId: opts.parentRunId,
|
|
69
|
+
workflowId: workflow.name,
|
|
70
|
+
path,
|
|
71
|
+
status: GraphExecutionStatus.RUNNING,
|
|
72
|
+
payload: { inputs },
|
|
73
|
+
});
|
|
74
|
+
await this.emitEvent(frame, {
|
|
75
|
+
type: GraphExecutionEventType.WORKFLOW_PLANNED,
|
|
76
|
+
runId,
|
|
77
|
+
parentRunId: opts.parentRunId,
|
|
78
|
+
workflowId: workflow.name,
|
|
79
|
+
path,
|
|
80
|
+
status: GraphExecutionStatus.PLANNING,
|
|
81
|
+
payload: { layers: plan.layers.length, nodes: plan.nodes.length },
|
|
82
|
+
});
|
|
83
|
+
try {
|
|
84
|
+
for (const layer of plan.layers) {
|
|
85
|
+
await this.executeLayer(frame, plan, layer.nodes, opts, emitFn);
|
|
86
|
+
}
|
|
87
|
+
frame.finish();
|
|
88
|
+
await this.emitEvent(frame, {
|
|
89
|
+
type: GraphExecutionEventType.WORKFLOW_COMPLETED,
|
|
90
|
+
runId,
|
|
91
|
+
parentRunId: opts.parentRunId,
|
|
92
|
+
workflowId: workflow.name,
|
|
93
|
+
path,
|
|
94
|
+
status: GraphExecutionStatus.SUCCEEDED,
|
|
95
|
+
payload: { outputs: valueStore.getWorkflowValues() },
|
|
96
|
+
});
|
|
97
|
+
return buildGraphExecutionResult(frame, workflow, inputs, GraphExecutionStatus.SUCCEEDED, opts.metadata);
|
|
98
|
+
}
|
|
99
|
+
catch (error) {
|
|
100
|
+
frame.finish();
|
|
101
|
+
const errorPayload = this.toErrorPayload(error);
|
|
102
|
+
await this.emitEvent(frame, {
|
|
103
|
+
type: GraphExecutionEventType.WORKFLOW_FAILED,
|
|
104
|
+
runId,
|
|
105
|
+
parentRunId: opts.parentRunId,
|
|
106
|
+
workflowId: workflow.name,
|
|
107
|
+
path,
|
|
108
|
+
status: GraphExecutionStatus.FAILED,
|
|
109
|
+
error: errorPayload,
|
|
110
|
+
});
|
|
111
|
+
return buildGraphExecutionResult(frame, workflow, inputs, GraphExecutionStatus.FAILED, opts.metadata);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Pins a node and its upstream dependencies after a completed run.
|
|
116
|
+
*
|
|
117
|
+
* Delegates to {@link GraphPinningService}. The plan and result must come
|
|
118
|
+
* from a prior successful execution of the same workflow.
|
|
119
|
+
*/
|
|
120
|
+
async pinNode(options) {
|
|
121
|
+
const service = this.createPinningService();
|
|
122
|
+
await service.pinNode(options);
|
|
123
|
+
await this.emitPinningEvent(options.nodeId, GraphExecutionEventType.NODE_PINNED);
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Unpins a node by its fingerprint.
|
|
127
|
+
*/
|
|
128
|
+
async unpinNode(options) {
|
|
129
|
+
const service = this.createPinningService();
|
|
130
|
+
await service.unpinNode(options);
|
|
131
|
+
await this.emitPinningEvent(options.nodeId, GraphExecutionEventType.NODE_UNPINNED);
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Creates a {@link GraphPinningService} backed by this engine's value store
|
|
135
|
+
* adapter.
|
|
136
|
+
*/
|
|
137
|
+
createPinningService() {
|
|
138
|
+
const store = new GraphValueStore(this.valueStoreAdapter);
|
|
139
|
+
return new GraphPinningService(store, new GraphPinningPolicy(), new GraphPinningDependencyResolver());
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Emits a pinning-related event to all observers.
|
|
143
|
+
*/
|
|
144
|
+
async emitPinningEvent(nodeId, type) {
|
|
145
|
+
const factory = new GraphExecutionEventFactory();
|
|
146
|
+
const event = factory.create({
|
|
147
|
+
id: "",
|
|
148
|
+
sequence: 0,
|
|
149
|
+
timestamp: new Date(),
|
|
150
|
+
runId: "pinning",
|
|
151
|
+
workflowId: "",
|
|
152
|
+
type,
|
|
153
|
+
nodeId,
|
|
154
|
+
path: [],
|
|
155
|
+
});
|
|
156
|
+
await this.emitter.updateObservers(event);
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Executes a layer of nodes with the configured concurrency.
|
|
160
|
+
*/
|
|
161
|
+
async executeLayer(frame, plan, nodes, opts, emitFn) {
|
|
162
|
+
const concurrency = Math.max(1, opts.concurrency ?? GRAPH_DEFAULT_CONCURRENCY);
|
|
163
|
+
const queue = [...nodes];
|
|
164
|
+
while (queue.length > 0) {
|
|
165
|
+
const batch = queue.splice(0, concurrency);
|
|
166
|
+
await Promise.all(batch.map((node) => this.executeNode(frame, plan, node, opts, emitFn)));
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Executes a single node.
|
|
171
|
+
*/
|
|
172
|
+
async executeNode(frame, plan, planNode, opts, emitFn) {
|
|
173
|
+
const startedAt = new Date();
|
|
174
|
+
const nodePath = [...(opts.path ?? []), planNode.id];
|
|
175
|
+
await this.emitEvent(frame, {
|
|
176
|
+
type: GraphExecutionEventType.NODE_STARTED,
|
|
177
|
+
runId: frame.runId,
|
|
178
|
+
workflowId: plan.workflowId,
|
|
179
|
+
nodeId: planNode.id,
|
|
180
|
+
path: nodePath,
|
|
181
|
+
status: GraphExecutionStatus.RUNNING,
|
|
182
|
+
});
|
|
183
|
+
const inputs = this.resolveNodeInputs(frame, plan, planNode);
|
|
184
|
+
// Cache-hit: check for a pinned value before executing the node
|
|
185
|
+
if (opts.usePinnedValues) {
|
|
186
|
+
const cached = await this.tryPinnedValue(frame, plan, planNode, inputs);
|
|
187
|
+
if (cached) {
|
|
188
|
+
frame.valueStore.setNodeOutputs(planNode.id, cached.outputs);
|
|
189
|
+
this.routeOutgoingEdges(frame, plan, planNode, cached.outputs);
|
|
190
|
+
const finishedAt = new Date();
|
|
191
|
+
const result = {
|
|
192
|
+
nodeId: planNode.id,
|
|
193
|
+
status: GraphExecutionStatus.CACHED,
|
|
194
|
+
inputs,
|
|
195
|
+
outputs: cached.outputs,
|
|
196
|
+
startedAt,
|
|
197
|
+
finishedAt,
|
|
198
|
+
fromCache: true,
|
|
199
|
+
pinned: true,
|
|
200
|
+
events: [],
|
|
201
|
+
};
|
|
202
|
+
frame.recordNodeResult(result);
|
|
203
|
+
await this.emitEvent(frame, {
|
|
204
|
+
type: GraphExecutionEventType.NODE_CACHE_HIT,
|
|
205
|
+
runId: frame.runId,
|
|
206
|
+
workflowId: plan.workflowId,
|
|
207
|
+
nodeId: planNode.id,
|
|
208
|
+
path: nodePath,
|
|
209
|
+
status: GraphExecutionStatus.CACHED,
|
|
210
|
+
payload: { outputs: cached.outputs },
|
|
211
|
+
});
|
|
212
|
+
await this.emitEvent(frame, {
|
|
213
|
+
type: GraphExecutionEventType.NODE_COMPLETED,
|
|
214
|
+
runId: frame.runId,
|
|
215
|
+
workflowId: plan.workflowId,
|
|
216
|
+
nodeId: planNode.id,
|
|
217
|
+
path: nodePath,
|
|
218
|
+
status: GraphExecutionStatus.SUCCEEDED,
|
|
219
|
+
payload: { outputs: cached.outputs, fromCache: true },
|
|
220
|
+
});
|
|
221
|
+
return;
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
try {
|
|
225
|
+
const executor = this.config.registry.resolve(planNode.kind);
|
|
226
|
+
const context = new GraphExecutionContext(frame.runId, opts.parentRunId, plan.workflow, planNode.definition, nodePath, emitFn, opts.metadata);
|
|
227
|
+
const outputs = await executor.execute(inputs, context);
|
|
228
|
+
const resolvedOutputs = outputs ?? {};
|
|
229
|
+
frame.valueStore.setNodeOutputs(planNode.id, resolvedOutputs);
|
|
230
|
+
this.routeOutgoingEdges(frame, plan, planNode, resolvedOutputs);
|
|
231
|
+
const finishedAt = new Date();
|
|
232
|
+
const result = {
|
|
233
|
+
nodeId: planNode.id,
|
|
234
|
+
status: GraphExecutionStatus.SUCCEEDED,
|
|
235
|
+
inputs,
|
|
236
|
+
outputs: resolvedOutputs,
|
|
237
|
+
startedAt,
|
|
238
|
+
finishedAt,
|
|
239
|
+
events: [],
|
|
240
|
+
};
|
|
241
|
+
frame.recordNodeResult(result);
|
|
242
|
+
await this.emitEvent(frame, {
|
|
243
|
+
type: GraphExecutionEventType.NODE_COMPLETED,
|
|
244
|
+
runId: frame.runId,
|
|
245
|
+
workflowId: plan.workflowId,
|
|
246
|
+
nodeId: planNode.id,
|
|
247
|
+
path: nodePath,
|
|
248
|
+
status: GraphExecutionStatus.SUCCEEDED,
|
|
249
|
+
payload: { outputs: resolvedOutputs },
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
catch (error) {
|
|
253
|
+
const finishedAt = new Date();
|
|
254
|
+
const errorPayload = this.toErrorPayload(error);
|
|
255
|
+
const result = {
|
|
256
|
+
nodeId: planNode.id,
|
|
257
|
+
status: GraphExecutionStatus.FAILED,
|
|
258
|
+
inputs,
|
|
259
|
+
error: errorPayload,
|
|
260
|
+
startedAt,
|
|
261
|
+
finishedAt,
|
|
262
|
+
events: [],
|
|
263
|
+
};
|
|
264
|
+
frame.recordNodeResult(result);
|
|
265
|
+
await this.emitEvent(frame, {
|
|
266
|
+
type: GraphExecutionEventType.NODE_FAILED,
|
|
267
|
+
runId: frame.runId,
|
|
268
|
+
workflowId: plan.workflowId,
|
|
269
|
+
nodeId: planNode.id,
|
|
270
|
+
path: nodePath,
|
|
271
|
+
status: GraphExecutionStatus.FAILED,
|
|
272
|
+
error: errorPayload,
|
|
273
|
+
});
|
|
274
|
+
if (opts.failFast ?? true)
|
|
275
|
+
throw error;
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
/**
|
|
279
|
+
* Resolves a node's input values from incoming edges.
|
|
280
|
+
*/
|
|
281
|
+
resolveNodeInputs(frame, plan, planNode) {
|
|
282
|
+
const inputs = {};
|
|
283
|
+
const incoming = plan.incomingByNode.get(planNode.id) ?? [];
|
|
284
|
+
for (const edge of incoming) {
|
|
285
|
+
inputs[edge.targetPort] = frame.valueStore.getPort(edge.sourceNodeId, edge.sourcePort);
|
|
286
|
+
}
|
|
287
|
+
return inputs;
|
|
288
|
+
}
|
|
289
|
+
/**
|
|
290
|
+
* Attempts to read a pinned value for the node. Returns the cached outputs
|
|
291
|
+
* when a valid pinned value exists, or `undefined` to proceed with normal
|
|
292
|
+
* execution.
|
|
293
|
+
*/
|
|
294
|
+
async tryPinnedValue(frame, plan, planNode, inputs) {
|
|
295
|
+
const policy = new GraphPinningPolicy();
|
|
296
|
+
if (!policy.shouldUsePinnedValue(planNode))
|
|
297
|
+
return undefined;
|
|
298
|
+
const service = this.createPinningService();
|
|
299
|
+
const depFingerprints = this.computeDependencyFingerprints(frame, plan, planNode.id);
|
|
300
|
+
return service.readPinnedValue(plan.workflow, planNode, inputs, depFingerprints);
|
|
301
|
+
}
|
|
302
|
+
/**
|
|
303
|
+
* Recursively computes fingerprints for all upstream dependencies of a node
|
|
304
|
+
* using the results already accumulated in the frame.
|
|
305
|
+
*/
|
|
306
|
+
computeDependencyFingerprints(frame, plan, nodeId) {
|
|
307
|
+
const service = this.createPinningService();
|
|
308
|
+
const depResolver = new GraphPinningDependencyResolver();
|
|
309
|
+
const deps = depResolver.getDependencies(plan, nodeId);
|
|
310
|
+
const fingerprints = {};
|
|
311
|
+
for (const dep of deps) {
|
|
312
|
+
const node = plan.nodes.find((n) => n.id === dep);
|
|
313
|
+
if (node) {
|
|
314
|
+
const depResult = frame.nodeResults.get(dep);
|
|
315
|
+
const inputs = depResult?.inputs ?? {};
|
|
316
|
+
const nestedDeps = this.computeDependencyFingerprints(frame, plan, dep);
|
|
317
|
+
fingerprints[dep] = service.computeFingerprint(plan.workflow, node, inputs, nestedDeps);
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
return fingerprints;
|
|
321
|
+
}
|
|
322
|
+
/**
|
|
323
|
+
* Routes a node's outputs to downstream inputs and workflow outputs.
|
|
324
|
+
*/
|
|
325
|
+
routeOutgoingEdges(frame, plan, planNode, outputs) {
|
|
326
|
+
const outgoing = plan.outgoingByNode.get(planNode.id) ?? [];
|
|
327
|
+
for (const edge of outgoing) {
|
|
328
|
+
const value = outputs[edge.sourcePort];
|
|
329
|
+
if (edge.targetNodeId === GRAPH_WORKFLOW_BOUNDARY) {
|
|
330
|
+
frame.valueStore.setWorkflowOutput(edge.targetPort, value);
|
|
331
|
+
}
|
|
332
|
+
this.emitEvent(frame, {
|
|
333
|
+
type: GraphExecutionEventType.EDGE_VALUE_ROUTED,
|
|
334
|
+
runId: frame.runId,
|
|
335
|
+
workflowId: plan.workflowId,
|
|
336
|
+
edgeId: edge.id,
|
|
337
|
+
nodeId: planNode.id,
|
|
338
|
+
path: [],
|
|
339
|
+
payload: { edge, value },
|
|
340
|
+
}).catch(() => {
|
|
341
|
+
// observer failures must not crash
|
|
342
|
+
});
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
/**
|
|
346
|
+
* Emits an event, records it in the frame, and dispatches to observers.
|
|
347
|
+
*/
|
|
348
|
+
async emitEvent(frame, partial) {
|
|
349
|
+
const event = frame.eventFactory.create({
|
|
350
|
+
id: "",
|
|
351
|
+
sequence: 0,
|
|
352
|
+
timestamp: new Date(),
|
|
353
|
+
...partial,
|
|
354
|
+
});
|
|
355
|
+
frame.appendEvent(event);
|
|
356
|
+
await this.emitter.updateObservers(event);
|
|
357
|
+
}
|
|
358
|
+
/**
|
|
359
|
+
* Merges default options with the given options.
|
|
360
|
+
*/
|
|
361
|
+
mergeOptions(options) {
|
|
362
|
+
return {
|
|
363
|
+
concurrency: GRAPH_DEFAULT_CONCURRENCY,
|
|
364
|
+
failFast: true,
|
|
365
|
+
validateInputs: true,
|
|
366
|
+
validateOutputs: true,
|
|
367
|
+
usePinnedValues: true,
|
|
368
|
+
writeThroughCache: false,
|
|
369
|
+
path: [],
|
|
370
|
+
metadata: {},
|
|
371
|
+
...this.defaultOptions,
|
|
372
|
+
...options,
|
|
373
|
+
};
|
|
374
|
+
}
|
|
375
|
+
/**
|
|
376
|
+
* Generates a unique run id.
|
|
377
|
+
*/
|
|
378
|
+
generateRunId() {
|
|
379
|
+
return (globalThis.crypto?.randomUUID?.() ??
|
|
380
|
+
`graph-run-${Date.now()}-${Math.random().toString(36).slice(2)}`);
|
|
381
|
+
}
|
|
382
|
+
/**
|
|
383
|
+
* Converts an error into a serialized payload.
|
|
384
|
+
*/
|
|
385
|
+
toErrorPayload(error) {
|
|
386
|
+
if (error instanceof Error) {
|
|
387
|
+
return {
|
|
388
|
+
name: error.name,
|
|
389
|
+
message: error.message,
|
|
390
|
+
stack: error.stack,
|
|
391
|
+
code: error.graphCode ??
|
|
392
|
+
(typeof error.code === "number"
|
|
393
|
+
? String(error.code)
|
|
394
|
+
: error.code),
|
|
395
|
+
};
|
|
396
|
+
}
|
|
397
|
+
return { name: "UnknownError", message: String(error) };
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
//# sourceMappingURL=GraphExecutionEngine.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GraphExecutionEngine.js","sourceRoot":"","sources":["../../../../src/graph/execution/GraphExecutionEngine.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,yBAAyB,EACzB,uBAAuB,EACvB,uBAAuB,EACvB,oBAAoB,GACrB,0BAAqB;AAatB,OAAO,EAAE,0BAA0B,EAAE,kDAA6C;AAClF,OAAO,EAAE,0BAA0B,EAAE,kDAA6C;AAElF,OAAO,EAAE,qB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OAAO,CACL,UAAU,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE;YACjC,aAAa,IAAI,CAAC,GAAG,EAAE,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CACjE,CAAC;IACJ,CAAC;IAED;;OAEG;IACK,cAAc,CAAC,KAAc;QACnC,IAAI,KAAK,YAAY,KAAK,EAAE,CAAC;YAC3B,OAAO;gBACL,IAAI,EAAE,KAAK,CAAC,IAAI;gBAChB,OAAO,EAAE,KAAK,CAAC,OAAO;gBACtB,KAAK,EAAE,KAAK,CAAC,KAAK;gBAClB,IAAI,EACD,KAAa,CAAC,SAAS;oBACxB,CAAC,OAAQ,KAAa,CAAC,IAAI,KAAK,QAAQ;wBACtC,CAAC,CAAC,MAAM,CAAE,KAAa,CAAC,IAAI,CAAC;wBAC7B,CAAC,CAAE,KAAa,CAAC,IAAI,CAAC;aAC3B,CAAC;QACJ,CAAC;QACD,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;IAC1D,CAAC;CACF"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Mutable state for a single graph execution run.
|
|
3
|
+
*/
|
|
4
|
+
export class GraphExecutionFrame {
|
|
5
|
+
constructor(runId, plan, valueStore, eventFactory) {
|
|
6
|
+
this.nodeResults = new Map();
|
|
7
|
+
this.events = [];
|
|
8
|
+
this.runId = runId;
|
|
9
|
+
this.plan = plan;
|
|
10
|
+
this.valueStore = valueStore;
|
|
11
|
+
this.eventFactory = eventFactory;
|
|
12
|
+
this.startedAt = new Date();
|
|
13
|
+
}
|
|
14
|
+
/** Records a node execution result. */
|
|
15
|
+
recordNodeResult(result) {
|
|
16
|
+
this.nodeResults.set(result.nodeId, result);
|
|
17
|
+
}
|
|
18
|
+
/** Appends an event to the run's event log. */
|
|
19
|
+
appendEvent(event) {
|
|
20
|
+
this.events.push(event);
|
|
21
|
+
}
|
|
22
|
+
/** Marks the run as finished. */
|
|
23
|
+
finish() {
|
|
24
|
+
this.finishedAt = new Date();
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=GraphExecutionFrame.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GraphExecutionFrame.js","sourceRoot":"","sources":["../../../../src/graph/execution/GraphExecutionFrame.ts"],"names":[],"mappings":"AAcA;;GAEG;AACH,MAAM,OAAO,mBAAmB;IAW9B,YACE,KAAiB,EACjB,IAAwB,EACxB,UAA2B,EAC3B,YAAwC;QATjC,gBAAW,GAA0C,IAAI,GAAG,EAAE,CAAC;QAC/D,WAAM,GAA0B,EAAE,CAAC;QAU1C,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,IAAI,CAAC,SAAS,GAAG,IAAI,IAAI,EAAE,CAAC;IAC9B,CAAC;IAED,uCAAuC;IACvC,gBAAgB,CAAC,MAAgC;QAC/C,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9C,CAAC;IAED,+CAA+C;IAC/C,WAAW,CAAC,KAA0B;QACpC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC1B,CAAC;IAED,iCAAiC;IACjC,MAAM;QACJ,IAAI,CAAC,UAAU,GAAG,IAAI,IAAI,EAAE,CAAC;IAC/B,CAAC;CACF"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Builds a {@link GraphExecutionResult} from a completed frame.
|
|
3
|
+
*/
|
|
4
|
+
export function buildGraphExecutionResult(frame, workflow, inputs, status, metadata) {
|
|
5
|
+
const outputs = frame.valueStore.getWorkflowValues();
|
|
6
|
+
const nodeResults = {};
|
|
7
|
+
for (const [id, result] of frame.nodeResults) {
|
|
8
|
+
nodeResults[id] = result;
|
|
9
|
+
}
|
|
10
|
+
const events = [...frame.events];
|
|
11
|
+
const runId = frame.runId;
|
|
12
|
+
return {
|
|
13
|
+
runId,
|
|
14
|
+
workflowId: workflow.name,
|
|
15
|
+
status,
|
|
16
|
+
workflow,
|
|
17
|
+
inputs: { ...inputs },
|
|
18
|
+
outputs,
|
|
19
|
+
nodeResults,
|
|
20
|
+
events,
|
|
21
|
+
startedAt: frame.startedAt,
|
|
22
|
+
finishedAt: frame.finishedAt,
|
|
23
|
+
metadata,
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=GraphExecutionResult.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GraphExecutionResult.js","sourceRoot":"","sources":["../../../../src/graph/execution/GraphExecutionResult.ts"],"names":[],"mappings":"AAUA;;GAEG;AACH,MAAM,UAAU,yBAAyB,CACvC,KAA0B,EAC1B,QAAiC,EACjC,MAA4B,EAC5B,MAA4B,EAC5B,QAAkC;IAElC,MAAM,OAAO,GAAG,KAAK,CAAC,UAAU,CAAC,iBAAiB,EAAE,CAAC;IACrD,MAAM,WAAW,GAA6C,EAAE,CAAC;IACjE,KAAK,MAAM,CAAC,EAAE,EAAE,MAAM,CAAC,IAAI,KAAK,CAAC,WAAW,EAAE,CAAC;QAC7C,WAAW,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC;IAC3B,CAAC;IACD,MAAM,MAAM,GAA0B,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;IACxD,MAAM,KAAK,GAAe,KAAK,CAAC,KAAK,CAAC;IAEtC,OAAO;QACL,KAAK;QACL,UAAU,EAAE,QAAQ,CAAC,IAAI;QACzB,MAAM;QACN,QAAQ;QACR,MAAM,EAAE,EAAE,GAAG,MAAM,EAAE;QACrB,OAAO;QACP,WAAW;QACX,MAAM;QACN,SAAS,EAAE,KAAK,CAAC,SAAS;QAC1B,UAAU,EAAE,KAAK,CAAC,UAAU;QAC5B,QAAQ;KACT,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GraphNodeExecutor.js","sourceRoot":"","sources":["../../../../src/graph/execution/GraphNodeExecutor.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module integrations/graph/execution
|
|
3
|
+
* @summary Graph execution context and executor interface.
|
|
4
|
+
* @description Re-exports the graph execution context and node executor interface.
|
|
5
|
+
*/
|
|
6
|
+
export * from "./GraphExecutionContext.js";
|
|
7
|
+
export * from "./GraphNodeExecutor.js";
|
|
8
|
+
export * from "./GraphExecutionResult.js";
|
|
9
|
+
export * from "./GraphExecutionFrame.js";
|
|
10
|
+
export * from "./GraphExecutionEngine.js";
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/graph/execution/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,2CAAwC;AACxC,uCAAoC;AACpC,0CAAuC;AACvC,yCAAsC;AACtC,0CAAuC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module integrations/graph
|
|
3
|
+
* @summary Decaf Graph Execution Engine.
|
|
4
|
+
* @description Reference interpreter for Decaf graph workflows. Executes workflows declared with `@decaf-ts/ui-decorators/graph`, emits events through Decaf's Observable pipeline, supports structured loops, configurable value stores, and pinnable/cacheable nodes.
|
|
5
|
+
*/
|
|
6
|
+
export * from "./constants.js";
|
|
7
|
+
export * from "./types.js";
|
|
8
|
+
export * from "./decorators.js";
|
|
9
|
+
export * from "./errors/GraphExecutionError.js";
|
|
10
|
+
export * from "./errors/GraphCycleError.js";
|
|
11
|
+
export * from "./errors/GraphInputError.js";
|
|
12
|
+
export * from "./errors/GraphLoopLimitError.js";
|
|
13
|
+
export * from "./errors/GraphPinningError.js";
|
|
14
|
+
export * from "./errors/GraphPortError.js";
|
|
15
|
+
export * from "./errors/GraphStoreError.js";
|
|
16
|
+
export * from "./errors/GraphTopologyError.js";
|
|
17
|
+
export * from "./events/GraphExecutionEvent.js";
|
|
18
|
+
export * from "./events/GraphExecutionObserver.js";
|
|
19
|
+
export * from "./events/GraphExecutionEventEmitter.js";
|
|
20
|
+
export * from "./events/GraphExecutionEventFactory.js";
|
|
21
|
+
export * from "./execution/GraphExecutionContext.js";
|
|
22
|
+
export * from "./execution/GraphNodeExecutor.js";
|
|
23
|
+
export * from "./execution/GraphExecutionFrame.js";
|
|
24
|
+
export * from "./execution/GraphExecutionResult.js";
|
|
25
|
+
export * from "./execution/GraphExecutionEngine.js";
|
|
26
|
+
export * from "./registry/GraphNodeExecutorRegistry.js";
|
|
27
|
+
export * from "./registry/GraphNodeExecutorResolver.js";
|
|
28
|
+
export * from "./store/GraphValueKey.js";
|
|
29
|
+
export * from "./store/GraphCachedValue.js";
|
|
30
|
+
export * from "./store/GraphValueStoreAdapter.js";
|
|
31
|
+
export * from "./store/InMemoryGraphValueStoreAdapter.js";
|
|
32
|
+
export * from "./store/GraphValueStore.js";
|
|
33
|
+
export * from "./planning/GraphExecutionPlanNode.js";
|
|
34
|
+
export * from "./planning/GraphExecutionPlanEdge.js";
|
|
35
|
+
export * from "./planning/GraphExecutionPlanLayer.js";
|
|
36
|
+
export * from "./planning/GraphExecutionPlan.js";
|
|
37
|
+
export * from "./planning/GraphRelationResolver.js";
|
|
38
|
+
export * from "./planning/GraphExecutionPlanner.js";
|
|
39
|
+
export * from "./planning/GraphTopology.js";
|
|
40
|
+
// Validation (TASK-215)
|
|
41
|
+
export * from "./validation/GraphDefinitionValidator.js";
|
|
42
|
+
export * from "./validation/GraphPortSchemaResolver.js";
|
|
43
|
+
export * from "./validation/GraphValueValidator.js";
|
|
44
|
+
// Loops (TASK-216)
|
|
45
|
+
export * from "./loops/GraphConditionEvaluator.js";
|
|
46
|
+
export * from "./loops/GraphLoopExecutionContext.js";
|
|
47
|
+
export * from "./loops/ForeachGraphNodeExecutor.js";
|
|
48
|
+
export * from "./loops/WhileGraphNodeExecutor.js";
|
|
49
|
+
export * from "./loops/UntilGraphNodeExecutor.js";
|
|
50
|
+
// Pinning (TASK-217/218)
|
|
51
|
+
export * from "./pinning/GraphPinningMetadata.js";
|
|
52
|
+
export * from "./pinning/GraphPinningPolicy.js";
|
|
53
|
+
export * from "./pinning/GraphPinningDependencyResolver.js";
|
|
54
|
+
export * from "./pinning/GraphPinningService.js";
|
|
55
|
+
// Snapshots (TASK-219)
|
|
56
|
+
export * from "./snapshots/GraphExecutionSnapshotMapper.js";
|
|
57
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/graph/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,+BAA4B;AAC5B,2BAAwB;AACxB,gCAA6B;AAE7B,gDAA6C;AAC7C,4CAAyC;AACzC,4CAAyC;AACzC,gDAA6C;AAC7C,8CAA2C;AAC3C,2CAAwC;AACxC,4CAAyC;AACzC,+CAA4C;AAE5C,gDAA6C;AAC7C,mDAAgD;AAChD,uDAAoD;AACpD,uDAAoD;AAEpD,qDAAkD;AAClD,iDAA8C;AAC9C,mDAAgD;AAChD,oDAAiD;AACjD,oDAAiD;AAEjD,wDAAqD;AACrD,wDAAqD;AAErD,yCAAsC;AACtC,4CAAyC;AACzC,kDAA+C;AAC/C,0DAAuD;AACvD,2CAAwC;AAExC,qDAAkD;AAClD,qDAAkD;AAClD,sDAAmD;AACnD,iDAA8C;AAC9C,oDAAiD;AACjD,oDAAiD;AACjD,4CAAyC;AAEzC,wBAAwB;AACxB,yDAAsD;AACtD,wDAAqD;AACrD,oDAAiD;AAEjD,mBAAmB;AACnB,mDAAgD;AAChD,qDAAkD;AAClD,oDAAiD;AACjD,kDAA+C;AAC/C,kDAA+C;AAE/C,yBAAyB;AACzB,kDAA+C;AAC/C,gDAA6C;AAC7C,4DAAyD;AACzD,iDAA8C;AAE9C,uBAAuB;AACvB,4DAAyD"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { GRAPH_DEFAULT_MAX_FOREACH_ITERATIONS, GraphExecutionEventType } from "./../constants.js";
|
|
2
|
+
import { GraphInputError } from "./../errors/GraphInputError.js";
|
|
3
|
+
import { GraphLoopLimitError } from "./../errors/GraphLoopLimitError.js";
|
|
4
|
+
/**
|
|
5
|
+
* Executor for `core.loop.foreach` nodes.
|
|
6
|
+
*
|
|
7
|
+
* Expects input:
|
|
8
|
+
* - `items`: array of values to iterate over
|
|
9
|
+
* - `state?`: optional initial state
|
|
10
|
+
*
|
|
11
|
+
* Produces output:
|
|
12
|
+
* - `results`: array of body outputs (in item order)
|
|
13
|
+
* - `state?`: final state
|
|
14
|
+
* - `iterations`: number of iterations executed
|
|
15
|
+
*/
|
|
16
|
+
export class ForeachGraphNodeExecutor {
|
|
17
|
+
constructor(engine) {
|
|
18
|
+
this.engine = engine;
|
|
19
|
+
}
|
|
20
|
+
async execute(input, context) {
|
|
21
|
+
const metadata = this.extractMetadata(context);
|
|
22
|
+
const items = input.items;
|
|
23
|
+
const maxIterations = metadata.maxIterations ?? GRAPH_DEFAULT_MAX_FOREACH_ITERATIONS;
|
|
24
|
+
if (!Array.isArray(items)) {
|
|
25
|
+
throw new GraphInputError("foreach input 'items' must be an array");
|
|
26
|
+
}
|
|
27
|
+
if (items.length > maxIterations) {
|
|
28
|
+
throw new GraphLoopLimitError(`foreach exceeded max iterations (${items.length} > ${maxIterations})`);
|
|
29
|
+
}
|
|
30
|
+
const itemPort = metadata.itemPort ?? "item";
|
|
31
|
+
const resultPort = metadata.resultPort ?? "result";
|
|
32
|
+
const statePort = metadata.statePort ?? "state";
|
|
33
|
+
const bodyWorkflow = metadata.body;
|
|
34
|
+
const results = [];
|
|
35
|
+
let state = input.state;
|
|
36
|
+
await context.emit({ type: GraphExecutionEventType.LOOP_STARTED });
|
|
37
|
+
for (let i = 0; i < items.length; i++) {
|
|
38
|
+
await context.emit({
|
|
39
|
+
type: GraphExecutionEventType.LOOP_ITERATION_STARTED,
|
|
40
|
+
iteration: i,
|
|
41
|
+
});
|
|
42
|
+
const childInputs = {
|
|
43
|
+
[itemPort]: items[i],
|
|
44
|
+
index: i,
|
|
45
|
+
};
|
|
46
|
+
if (state !== undefined)
|
|
47
|
+
childInputs[statePort] = state;
|
|
48
|
+
const childResult = await this.engine.execute(bodyWorkflow, childInputs, {
|
|
49
|
+
parentRunId: context.runId,
|
|
50
|
+
path: [...context.path, `iteration:${i}`],
|
|
51
|
+
});
|
|
52
|
+
results.push(childResult.outputs[resultPort]);
|
|
53
|
+
if (childResult.outputs[statePort] !== undefined) {
|
|
54
|
+
state = childResult.outputs[statePort];
|
|
55
|
+
}
|
|
56
|
+
await context.emit({
|
|
57
|
+
type: GraphExecutionEventType.LOOP_ITERATION_COMPLETED,
|
|
58
|
+
iteration: i,
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
await context.emit({ type: GraphExecutionEventType.LOOP_COMPLETED });
|
|
62
|
+
const output = {
|
|
63
|
+
results,
|
|
64
|
+
iterations: items.length,
|
|
65
|
+
};
|
|
66
|
+
if (state !== undefined)
|
|
67
|
+
output[statePort] = state;
|
|
68
|
+
return output;
|
|
69
|
+
}
|
|
70
|
+
extractMetadata(context) {
|
|
71
|
+
const raw = context.node.graph?.metadata?.loop ??
|
|
72
|
+
context.metadata?.loop;
|
|
73
|
+
if (!raw) {
|
|
74
|
+
throw new GraphInputError("foreach node is missing loop metadata");
|
|
75
|
+
}
|
|
76
|
+
return raw;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=ForeachGraphNodeExecutor.js.map
|
|
@@ -0,0 +1 @@
|
|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