@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,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module integrations/graph/errors/GraphInputError
|
|
3
|
+
* @summary Error thrown when workflow or node inputs are invalid.
|
|
4
|
+
* @description Raised by the value validator when required inputs are missing or fail schema validation.
|
|
5
|
+
*/
|
|
6
|
+
import { GraphExecutionError } from "./GraphExecutionError.d.mts";
|
|
7
|
+
/**
|
|
8
|
+
* Thrown when workflow or node inputs are invalid.
|
|
9
|
+
*/
|
|
10
|
+
export declare class GraphInputError extends GraphExecutionError {
|
|
11
|
+
constructor(message: string, details?: unknown);
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module integrations/graph/errors/GraphLoopLimitError
|
|
3
|
+
* @summary Error thrown when a loop exceeds its maximum iterations.
|
|
4
|
+
* @description Raised by loop executors when the iteration count reaches the configured safety limit.
|
|
5
|
+
*/
|
|
6
|
+
import { GraphExecutionError } from "./GraphExecutionError.d.cts";
|
|
7
|
+
/**
|
|
8
|
+
* Thrown when a loop exceeds its maximum iterations.
|
|
9
|
+
*/
|
|
10
|
+
export declare class GraphLoopLimitError extends GraphExecutionError {
|
|
11
|
+
constructor(message: string, details?: unknown);
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module integrations/graph/errors/GraphLoopLimitError
|
|
3
|
+
* @summary Error thrown when a loop exceeds its maximum iterations.
|
|
4
|
+
* @description Raised by loop executors when the iteration count reaches the configured safety limit.
|
|
5
|
+
*/
|
|
6
|
+
import { GraphExecutionError } from "./GraphExecutionError.d.mts";
|
|
7
|
+
/**
|
|
8
|
+
* Thrown when a loop exceeds its maximum iterations.
|
|
9
|
+
*/
|
|
10
|
+
export declare class GraphLoopLimitError extends GraphExecutionError {
|
|
11
|
+
constructor(message: string, details?: unknown);
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module integrations/graph/errors/GraphPinningError
|
|
3
|
+
* @summary Error thrown when a pinning operation fails.
|
|
4
|
+
* @description Raised when a node cannot be pinned, e.g. because an upstream dependency is not pinnable.
|
|
5
|
+
*/
|
|
6
|
+
import { GraphExecutionError } from "./GraphExecutionError.d.cts";
|
|
7
|
+
/**
|
|
8
|
+
* Thrown when a pinning operation fails.
|
|
9
|
+
*/
|
|
10
|
+
export declare class GraphPinningError extends GraphExecutionError {
|
|
11
|
+
constructor(message: string, details?: unknown);
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module integrations/graph/errors/GraphPinningError
|
|
3
|
+
* @summary Error thrown when a pinning operation fails.
|
|
4
|
+
* @description Raised when a node cannot be pinned, e.g. because an upstream dependency is not pinnable.
|
|
5
|
+
*/
|
|
6
|
+
import { GraphExecutionError } from "./GraphExecutionError.d.mts";
|
|
7
|
+
/**
|
|
8
|
+
* Thrown when a pinning operation fails.
|
|
9
|
+
*/
|
|
10
|
+
export declare class GraphPinningError extends GraphExecutionError {
|
|
11
|
+
constructor(message: string, details?: unknown);
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module integrations/graph/errors/GraphPortError
|
|
3
|
+
* @summary Error thrown when a port reference is invalid.
|
|
4
|
+
* @description Raised by the relation resolver or validator when a referenced port is missing or unknown.
|
|
5
|
+
*/
|
|
6
|
+
import { GraphExecutionError } from "./GraphExecutionError.d.cts";
|
|
7
|
+
/**
|
|
8
|
+
* Thrown when a port reference is invalid.
|
|
9
|
+
*/
|
|
10
|
+
export declare class GraphPortError extends GraphExecutionError {
|
|
11
|
+
constructor(message: string, details?: unknown);
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module integrations/graph/errors/GraphPortError
|
|
3
|
+
* @summary Error thrown when a port reference is invalid.
|
|
4
|
+
* @description Raised by the relation resolver or validator when a referenced port is missing or unknown.
|
|
5
|
+
*/
|
|
6
|
+
import { GraphExecutionError } from "./GraphExecutionError.d.mts";
|
|
7
|
+
/**
|
|
8
|
+
* Thrown when a port reference is invalid.
|
|
9
|
+
*/
|
|
10
|
+
export declare class GraphPortError extends GraphExecutionError {
|
|
11
|
+
constructor(message: string, details?: unknown);
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module integrations/graph/errors/GraphStoreError
|
|
3
|
+
* @summary Error thrown when a value store operation fails.
|
|
4
|
+
* @description Raised by the value store or adapter when reading, writing, or deleting cached values fails.
|
|
5
|
+
*/
|
|
6
|
+
import { GraphExecutionError } from "./GraphExecutionError.d.cts";
|
|
7
|
+
/**
|
|
8
|
+
* Thrown when a value store operation fails.
|
|
9
|
+
*/
|
|
10
|
+
export declare class GraphStoreError extends GraphExecutionError {
|
|
11
|
+
constructor(message: string, details?: unknown);
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module integrations/graph/errors/GraphStoreError
|
|
3
|
+
* @summary Error thrown when a value store operation fails.
|
|
4
|
+
* @description Raised by the value store or adapter when reading, writing, or deleting cached values fails.
|
|
5
|
+
*/
|
|
6
|
+
import { GraphExecutionError } from "./GraphExecutionError.d.mts";
|
|
7
|
+
/**
|
|
8
|
+
* Thrown when a value store operation fails.
|
|
9
|
+
*/
|
|
10
|
+
export declare class GraphStoreError extends GraphExecutionError {
|
|
11
|
+
constructor(message: string, details?: unknown);
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module integrations/graph/errors/GraphTopologyError
|
|
3
|
+
* @summary Error thrown when workflow topology is invalid.
|
|
4
|
+
* @description Raised by the relation resolver or planner when an endpoint is unknown or ambiguous.
|
|
5
|
+
*/
|
|
6
|
+
import { GraphExecutionError } from "./GraphExecutionError.d.cts";
|
|
7
|
+
/**
|
|
8
|
+
* Thrown when workflow topology is invalid.
|
|
9
|
+
*/
|
|
10
|
+
export declare class GraphTopologyError extends GraphExecutionError {
|
|
11
|
+
constructor(message: string, details?: unknown);
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module integrations/graph/errors/GraphTopologyError
|
|
3
|
+
* @summary Error thrown when workflow topology is invalid.
|
|
4
|
+
* @description Raised by the relation resolver or planner when an endpoint is unknown or ambiguous.
|
|
5
|
+
*/
|
|
6
|
+
import { GraphExecutionError } from "./GraphExecutionError.d.mts";
|
|
7
|
+
/**
|
|
8
|
+
* Thrown when workflow topology is invalid.
|
|
9
|
+
*/
|
|
10
|
+
export declare class GraphTopologyError extends GraphExecutionError {
|
|
11
|
+
constructor(message: string, details?: unknown);
|
|
12
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module integrations/graph/errors
|
|
3
|
+
* @summary Graph execution error classes.
|
|
4
|
+
* @description Re-exports all structured error types used by the graph execution engine.
|
|
5
|
+
*/
|
|
6
|
+
export * from "./GraphExecutionError.d.cts";
|
|
7
|
+
export * from "./GraphCycleError.d.cts";
|
|
8
|
+
export * from "./GraphInputError.d.cts";
|
|
9
|
+
export * from "./GraphLoopLimitError.d.cts";
|
|
10
|
+
export * from "./GraphPinningError.d.cts";
|
|
11
|
+
export * from "./GraphPortError.d.cts";
|
|
12
|
+
export * from "./GraphStoreError.d.cts";
|
|
13
|
+
export * from "./GraphTopologyError.d.cts";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module integrations/graph/errors
|
|
3
|
+
* @summary Graph execution error classes.
|
|
4
|
+
* @description Re-exports all structured error types used by the graph execution engine.
|
|
5
|
+
*/
|
|
6
|
+
export * from "./GraphExecutionError.d.mts";
|
|
7
|
+
export * from "./GraphCycleError.d.mts";
|
|
8
|
+
export * from "./GraphInputError.d.mts";
|
|
9
|
+
export * from "./GraphLoopLimitError.d.mts";
|
|
10
|
+
export * from "./GraphPinningError.d.mts";
|
|
11
|
+
export * from "./GraphPortError.d.mts";
|
|
12
|
+
export * from "./GraphStoreError.d.mts";
|
|
13
|
+
export * from "./GraphTopologyError.d.mts";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module integrations/graph/events/GraphExecutionEvent
|
|
3
|
+
* @summary Re-export of the GraphExecutionEvent type for the events subpath.
|
|
4
|
+
* @description The GraphExecutionEvent interface is defined in the shared types module and re-exported here for convenience.
|
|
5
|
+
*/
|
|
6
|
+
export type { GraphExecutionEvent } from "../types.d.cts";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module integrations/graph/events/GraphExecutionEvent
|
|
3
|
+
* @summary Re-export of the GraphExecutionEvent type for the events subpath.
|
|
4
|
+
* @description The GraphExecutionEvent interface is defined in the shared types module and re-exported here for convenience.
|
|
5
|
+
*/
|
|
6
|
+
export type { GraphExecutionEvent } from "../types.d.mts";
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module integrations/graph/events/GraphExecutionEventEmitter
|
|
3
|
+
* @summary Observable implementation for graph execution events.
|
|
4
|
+
* @description Implements Decaf's {@link Observable} interface so observers can subscribe to graph execution events. Observer failures are isolated and do not crash the workflow.
|
|
5
|
+
*/
|
|
6
|
+
import type { Observable } from "@decaf-ts/core";
|
|
7
|
+
import type { GraphExecutionObserver } from "./GraphExecutionObserver.d.cts";
|
|
8
|
+
import type { GraphExecutionEvent } from "../types.d.cts";
|
|
9
|
+
/**
|
|
10
|
+
* Manages observer registration and event dispatch for the graph execution
|
|
11
|
+
* engine.
|
|
12
|
+
*/
|
|
13
|
+
export declare class GraphExecutionEventEmitter implements Observable<[GraphExecutionObserver], [GraphExecutionEvent]> {
|
|
14
|
+
private readonly observers;
|
|
15
|
+
/** Registers an observer and returns an unsubscribe function. */
|
|
16
|
+
observe(observer: GraphExecutionObserver): () => void;
|
|
17
|
+
/** Removes a previously-registered observer. */
|
|
18
|
+
unObserve(observer: GraphExecutionObserver): void;
|
|
19
|
+
/**
|
|
20
|
+
* Notifies all registered observers of a new event.
|
|
21
|
+
*
|
|
22
|
+
* Observer failures are caught and swallowed so that a misbehaving observer
|
|
23
|
+
* cannot crash the workflow execution.
|
|
24
|
+
*/
|
|
25
|
+
updateObservers(event: GraphExecutionEvent): Promise<void>;
|
|
26
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module integrations/graph/events/GraphExecutionEventEmitter
|
|
3
|
+
* @summary Observable implementation for graph execution events.
|
|
4
|
+
* @description Implements Decaf's {@link Observable} interface so observers can subscribe to graph execution events. Observer failures are isolated and do not crash the workflow.
|
|
5
|
+
*/
|
|
6
|
+
import type { Observable } from "@decaf-ts/core";
|
|
7
|
+
import type { GraphExecutionObserver } from "./GraphExecutionObserver.d.mts";
|
|
8
|
+
import type { GraphExecutionEvent } from "../types.d.mts";
|
|
9
|
+
/**
|
|
10
|
+
* Manages observer registration and event dispatch for the graph execution
|
|
11
|
+
* engine.
|
|
12
|
+
*/
|
|
13
|
+
export declare class GraphExecutionEventEmitter implements Observable<[GraphExecutionObserver], [GraphExecutionEvent]> {
|
|
14
|
+
private readonly observers;
|
|
15
|
+
/** Registers an observer and returns an unsubscribe function. */
|
|
16
|
+
observe(observer: GraphExecutionObserver): () => void;
|
|
17
|
+
/** Removes a previously-registered observer. */
|
|
18
|
+
unObserve(observer: GraphExecutionObserver): void;
|
|
19
|
+
/**
|
|
20
|
+
* Notifies all registered observers of a new event.
|
|
21
|
+
*
|
|
22
|
+
* Observer failures are caught and swallowed so that a misbehaving observer
|
|
23
|
+
* cannot crash the workflow execution.
|
|
24
|
+
*/
|
|
25
|
+
updateObservers(event: GraphExecutionEvent): Promise<void>;
|
|
26
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module integrations/graph/events/GraphExecutionEventFactory
|
|
3
|
+
* @summary Factory for creating graph execution events with unique ids, sequence numbers, and timestamps.
|
|
4
|
+
* @description Provides a stateful factory that produces monotonically-sequenced events for a single execution run.
|
|
5
|
+
*/
|
|
6
|
+
import type { GraphExecutionEvent } from "../types.d.cts";
|
|
7
|
+
/**
|
|
8
|
+
* Factory that enriches partial events with a unique id, an incrementing
|
|
9
|
+
* sequence number, and a timestamp.
|
|
10
|
+
*/
|
|
11
|
+
export declare class GraphExecutionEventFactory {
|
|
12
|
+
private sequence;
|
|
13
|
+
/**
|
|
14
|
+
* Creates a fully-populated event from the given base fields.
|
|
15
|
+
*
|
|
16
|
+
* @param base - All event fields except `id`, `sequence`, and `timestamp`.
|
|
17
|
+
* @returns A complete {@link GraphExecutionEvent}.
|
|
18
|
+
*/
|
|
19
|
+
create(base: Omit<GraphExecutionEvent, "id" | "sequence" | "timestamp">): GraphExecutionEvent;
|
|
20
|
+
/**
|
|
21
|
+
* Generates a unique event id using `crypto.randomUUID` when available,
|
|
22
|
+
* falling back to a timestamp + random string.
|
|
23
|
+
*/
|
|
24
|
+
private createEventId;
|
|
25
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module integrations/graph/events/GraphExecutionEventFactory
|
|
3
|
+
* @summary Factory for creating graph execution events with unique ids, sequence numbers, and timestamps.
|
|
4
|
+
* @description Provides a stateful factory that produces monotonically-sequenced events for a single execution run.
|
|
5
|
+
*/
|
|
6
|
+
import type { GraphExecutionEvent } from "../types.d.mts";
|
|
7
|
+
/**
|
|
8
|
+
* Factory that enriches partial events with a unique id, an incrementing
|
|
9
|
+
* sequence number, and a timestamp.
|
|
10
|
+
*/
|
|
11
|
+
export declare class GraphExecutionEventFactory {
|
|
12
|
+
private sequence;
|
|
13
|
+
/**
|
|
14
|
+
* Creates a fully-populated event from the given base fields.
|
|
15
|
+
*
|
|
16
|
+
* @param base - All event fields except `id`, `sequence`, and `timestamp`.
|
|
17
|
+
* @returns A complete {@link GraphExecutionEvent}.
|
|
18
|
+
*/
|
|
19
|
+
create(base: Omit<GraphExecutionEvent, "id" | "sequence" | "timestamp">): GraphExecutionEvent;
|
|
20
|
+
/**
|
|
21
|
+
* Generates a unique event id using `crypto.randomUUID` when available,
|
|
22
|
+
* falling back to a timestamp + random string.
|
|
23
|
+
*/
|
|
24
|
+
private createEventId;
|
|
25
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module integrations/graph/events/GraphExecutionObserver
|
|
3
|
+
* @summary Observer interface for graph execution events.
|
|
4
|
+
* @description Extends Decaf's {@link Observer} so graph events flow through the standard Observable/Observer pipeline.
|
|
5
|
+
*/
|
|
6
|
+
import type { Observer } from "@decaf-ts/core";
|
|
7
|
+
import type { GraphExecutionEvent } from "../types.d.cts";
|
|
8
|
+
/**
|
|
9
|
+
* Observer that receives {@link GraphExecutionEvent} instances from the
|
|
10
|
+
* graph execution engine.
|
|
11
|
+
*/
|
|
12
|
+
export interface GraphExecutionObserver extends Observer<[GraphExecutionEvent]> {
|
|
13
|
+
/**
|
|
14
|
+
* Called by the engine when a new graph execution event is emitted.
|
|
15
|
+
*/
|
|
16
|
+
refresh(event: GraphExecutionEvent): Promise<void>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module integrations/graph/events/GraphExecutionObserver
|
|
3
|
+
* @summary Observer interface for graph execution events.
|
|
4
|
+
* @description Extends Decaf's {@link Observer} so graph events flow through the standard Observable/Observer pipeline.
|
|
5
|
+
*/
|
|
6
|
+
import type { Observer } from "@decaf-ts/core";
|
|
7
|
+
import type { GraphExecutionEvent } from "../types.d.mts";
|
|
8
|
+
/**
|
|
9
|
+
* Observer that receives {@link GraphExecutionEvent} instances from the
|
|
10
|
+
* graph execution engine.
|
|
11
|
+
*/
|
|
12
|
+
export interface GraphExecutionObserver extends Observer<[GraphExecutionEvent]> {
|
|
13
|
+
/**
|
|
14
|
+
* Called by the engine when a new graph execution event is emitted.
|
|
15
|
+
*/
|
|
16
|
+
refresh(event: GraphExecutionEvent): Promise<void>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module integrations/graph/events
|
|
3
|
+
* @summary Graph execution event pipeline.
|
|
4
|
+
* @description Re-exports the observer interface, event emitter, and event factory.
|
|
5
|
+
*/
|
|
6
|
+
export * from "./GraphExecutionEvent.d.cts";
|
|
7
|
+
export * from "./GraphExecutionObserver.d.cts";
|
|
8
|
+
export * from "./GraphExecutionEventEmitter.d.cts";
|
|
9
|
+
export * from "./GraphExecutionEventFactory.d.cts";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module integrations/graph/events
|
|
3
|
+
* @summary Graph execution event pipeline.
|
|
4
|
+
* @description Re-exports the observer interface, event emitter, and event factory.
|
|
5
|
+
*/
|
|
6
|
+
export * from "./GraphExecutionEvent.d.mts";
|
|
7
|
+
export * from "./GraphExecutionObserver.d.mts";
|
|
8
|
+
export * from "./GraphExecutionEventEmitter.d.mts";
|
|
9
|
+
export * from "./GraphExecutionEventFactory.d.mts";
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module integrations/graph/execution/GraphExecutionContext
|
|
3
|
+
* @summary Decaf Context for graph node execution.
|
|
4
|
+
* @description Extends Decaf's {@link Context} so node executors receive the same contextual plumbing as task handlers. Executors use the context to emit progress, log messages, and report state through the engine's observer pipeline.
|
|
5
|
+
*/
|
|
6
|
+
import { Context } from "@decaf-ts/core";
|
|
7
|
+
import type { GraphNodeDefinition, GraphWorkflowDefinition } from "@decaf-ts/ui-decorators/graph";
|
|
8
|
+
import type { GraphExecutionEvent, GraphRunId } from "../types.d.cts";
|
|
9
|
+
/**
|
|
10
|
+
* Context passed to every graph node executor.
|
|
11
|
+
*
|
|
12
|
+
* Mirrors the `TaskEngine` / `TaskContext` pattern: the engine creates a
|
|
13
|
+
* `GraphExecutionContext` per node execution and passes it to
|
|
14
|
+
* `executor.execute(inputs, context)`. The executor uses `context.progress(...)`
|
|
15
|
+
* and `context.log(...)` to report intermediate state.
|
|
16
|
+
*/
|
|
17
|
+
export declare class GraphExecutionContext extends Context {
|
|
18
|
+
readonly runId: GraphRunId;
|
|
19
|
+
readonly parentRunId: GraphRunId | undefined;
|
|
20
|
+
readonly workflow: GraphWorkflowDefinition;
|
|
21
|
+
readonly node: GraphNodeDefinition;
|
|
22
|
+
readonly path: string[];
|
|
23
|
+
private readonly emitFn;
|
|
24
|
+
readonly metadata: Record<string, unknown>;
|
|
25
|
+
/**
|
|
26
|
+
* @param runId - Unique identifier for the current execution run.
|
|
27
|
+
* @param parentRunId - Run id of the parent execution (for nested loop bodies).
|
|
28
|
+
* @param workflow - The workflow definition being executed.
|
|
29
|
+
* @param node - The node definition being executed.
|
|
30
|
+
* @param path - Dotted path from the workflow root to this node.
|
|
31
|
+
* @param emitFn - Callback invoked when an event is emitted from this context.
|
|
32
|
+
* @param metadata - Free-form metadata attached to this context.
|
|
33
|
+
*/
|
|
34
|
+
constructor(runId: GraphRunId, parentRunId: GraphRunId | undefined, workflow: GraphWorkflowDefinition, node: GraphNodeDefinition, path: string[], emitFn: (event: Partial<GraphExecutionEvent>) => Promise<void>, metadata?: Record<string, unknown>);
|
|
35
|
+
/**
|
|
36
|
+
* Emits a partial graph execution event. The engine fills in runId,
|
|
37
|
+
* parentRunId, workflowId, nodeId, and path automatically.
|
|
38
|
+
*/
|
|
39
|
+
emit(event: Partial<GraphExecutionEvent>): Promise<void>;
|
|
40
|
+
/**
|
|
41
|
+
* Emits a `NODE_OUTPUT` event with the given payload, useful for reporting
|
|
42
|
+
* intermediate progress from within a node executor.
|
|
43
|
+
*/
|
|
44
|
+
progress(payload: unknown): Promise<void>;
|
|
45
|
+
/**
|
|
46
|
+
* Emits a `NODE_OUTPUT` event with a structured `{ message, payload }` shape
|
|
47
|
+
* so executors can log human-readable messages.
|
|
48
|
+
*/
|
|
49
|
+
log(message: string, payload?: unknown): Promise<void>;
|
|
50
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module integrations/graph/execution/GraphExecutionContext
|
|
3
|
+
* @summary Decaf Context for graph node execution.
|
|
4
|
+
* @description Extends Decaf's {@link Context} so node executors receive the same contextual plumbing as task handlers. Executors use the context to emit progress, log messages, and report state through the engine's observer pipeline.
|
|
5
|
+
*/
|
|
6
|
+
import { Context } from "@decaf-ts/core";
|
|
7
|
+
import type { GraphNodeDefinition, GraphWorkflowDefinition } from "@decaf-ts/ui-decorators/graph";
|
|
8
|
+
import type { GraphExecutionEvent, GraphRunId } from "../types.d.mts";
|
|
9
|
+
/**
|
|
10
|
+
* Context passed to every graph node executor.
|
|
11
|
+
*
|
|
12
|
+
* Mirrors the `TaskEngine` / `TaskContext` pattern: the engine creates a
|
|
13
|
+
* `GraphExecutionContext` per node execution and passes it to
|
|
14
|
+
* `executor.execute(inputs, context)`. The executor uses `context.progress(...)`
|
|
15
|
+
* and `context.log(...)` to report intermediate state.
|
|
16
|
+
*/
|
|
17
|
+
export declare class GraphExecutionContext extends Context {
|
|
18
|
+
readonly runId: GraphRunId;
|
|
19
|
+
readonly parentRunId: GraphRunId | undefined;
|
|
20
|
+
readonly workflow: GraphWorkflowDefinition;
|
|
21
|
+
readonly node: GraphNodeDefinition;
|
|
22
|
+
readonly path: string[];
|
|
23
|
+
private readonly emitFn;
|
|
24
|
+
readonly metadata: Record<string, unknown>;
|
|
25
|
+
/**
|
|
26
|
+
* @param runId - Unique identifier for the current execution run.
|
|
27
|
+
* @param parentRunId - Run id of the parent execution (for nested loop bodies).
|
|
28
|
+
* @param workflow - The workflow definition being executed.
|
|
29
|
+
* @param node - The node definition being executed.
|
|
30
|
+
* @param path - Dotted path from the workflow root to this node.
|
|
31
|
+
* @param emitFn - Callback invoked when an event is emitted from this context.
|
|
32
|
+
* @param metadata - Free-form metadata attached to this context.
|
|
33
|
+
*/
|
|
34
|
+
constructor(runId: GraphRunId, parentRunId: GraphRunId | undefined, workflow: GraphWorkflowDefinition, node: GraphNodeDefinition, path: string[], emitFn: (event: Partial<GraphExecutionEvent>) => Promise<void>, metadata?: Record<string, unknown>);
|
|
35
|
+
/**
|
|
36
|
+
* Emits a partial graph execution event. The engine fills in runId,
|
|
37
|
+
* parentRunId, workflowId, nodeId, and path automatically.
|
|
38
|
+
*/
|
|
39
|
+
emit(event: Partial<GraphExecutionEvent>): Promise<void>;
|
|
40
|
+
/**
|
|
41
|
+
* Emits a `NODE_OUTPUT` event with the given payload, useful for reporting
|
|
42
|
+
* intermediate progress from within a node executor.
|
|
43
|
+
*/
|
|
44
|
+
progress(payload: unknown): Promise<void>;
|
|
45
|
+
/**
|
|
46
|
+
* Emits a `NODE_OUTPUT` event with a structured `{ message, payload }` shape
|
|
47
|
+
* so executors can log human-readable messages.
|
|
48
|
+
*/
|
|
49
|
+
log(message: string, payload?: unknown): Promise<void>;
|
|
50
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module integrations/graph/execution/GraphExecutionEngine
|
|
3
|
+
* @summary Reference graph execution engine.
|
|
4
|
+
* @description Executes graph workflows declared with `@decaf-ts/ui-decorators/graph`, emits events through Decaf's Observable pipeline, supports parallel node execution within topological layers, and returns a complete execution result.
|
|
5
|
+
*/
|
|
6
|
+
import type { Observable } from "@decaf-ts/core";
|
|
7
|
+
import type { GraphWorkflowDefinition } from "@decaf-ts/ui-decorators/graph";
|
|
8
|
+
import type { GraphExecutionEvent, GraphExecutionOptions, GraphExecutionResult, GraphExecutionValues, GraphPinNodeOptions, GraphUnpinNodeOptions } from "../types.d.cts";
|
|
9
|
+
import type { GraphExecutionObserver } from "../events/GraphExecutionObserver.d.cts";
|
|
10
|
+
import { GraphExecutionEventEmitter } from "../events/GraphExecutionEventEmitter.d.cts";
|
|
11
|
+
import type { GraphNodeExecutorRegistry } from "../registry/GraphNodeExecutorRegistry.d.cts";
|
|
12
|
+
import { GraphExecutionPlanner } from "../planning/GraphExecutionPlanner.d.cts";
|
|
13
|
+
import type { GraphValueStoreAdapter } from "../store/GraphValueStoreAdapter.d.cts";
|
|
14
|
+
/**
|
|
15
|
+
* Configuration for the {@link GraphExecutionEngine}.
|
|
16
|
+
*/
|
|
17
|
+
export interface GraphExecutionEngineConfig {
|
|
18
|
+
registry: GraphNodeExecutorRegistry;
|
|
19
|
+
planner?: GraphExecutionPlanner;
|
|
20
|
+
valueStoreAdapter?: GraphValueStoreAdapter;
|
|
21
|
+
eventEmitter?: GraphExecutionEventEmitter;
|
|
22
|
+
defaultOptions?: Partial<GraphExecutionOptions>;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Reference graph execution engine.
|
|
26
|
+
*
|
|
27
|
+
* Executes a {@link GraphWorkflowDefinition} by:
|
|
28
|
+
* 1. Planning the workflow into topological layers.
|
|
29
|
+
* 2. Seeding workflow inputs into the value store.
|
|
30
|
+
* 3. Executing nodes layer-by-layer with configurable concurrency.
|
|
31
|
+
* 4. Routing values along edges.
|
|
32
|
+
* 5. Emitting structured events through Decaf's Observable pipeline.
|
|
33
|
+
* 6. Returning a complete {@link GraphExecutionResult}.
|
|
34
|
+
*/
|
|
35
|
+
export declare class GraphExecutionEngine implements Observable<[GraphExecutionObserver], [GraphExecutionEvent]> {
|
|
36
|
+
private readonly emitter;
|
|
37
|
+
private readonly planner;
|
|
38
|
+
private readonly valueStoreAdapter;
|
|
39
|
+
private readonly defaultOptions;
|
|
40
|
+
constructor(config: GraphExecutionEngineConfig);
|
|
41
|
+
private readonly config;
|
|
42
|
+
observe(observer: GraphExecutionObserver): () => void;
|
|
43
|
+
unObserve(observer: GraphExecutionObserver): void;
|
|
44
|
+
updateObservers(event: GraphExecutionEvent): Promise<void>;
|
|
45
|
+
/**
|
|
46
|
+
* Executes a workflow with the given inputs and options.
|
|
47
|
+
*/
|
|
48
|
+
execute(workflow: GraphWorkflowDefinition, inputs?: GraphExecutionValues, options?: GraphExecutionOptions): Promise<GraphExecutionResult>;
|
|
49
|
+
/**
|
|
50
|
+
* Pins a node and its upstream dependencies after a completed run.
|
|
51
|
+
*
|
|
52
|
+
* Delegates to {@link GraphPinningService}. The plan and result must come
|
|
53
|
+
* from a prior successful execution of the same workflow.
|
|
54
|
+
*/
|
|
55
|
+
pinNode(options: GraphPinNodeOptions): Promise<void>;
|
|
56
|
+
/**
|
|
57
|
+
* Unpins a node by its fingerprint.
|
|
58
|
+
*/
|
|
59
|
+
unpinNode(options: GraphUnpinNodeOptions): Promise<void>;
|
|
60
|
+
/**
|
|
61
|
+
* Creates a {@link GraphPinningService} backed by this engine's value store
|
|
62
|
+
* adapter.
|
|
63
|
+
*/
|
|
64
|
+
private createPinningService;
|
|
65
|
+
/**
|
|
66
|
+
* Emits a pinning-related event to all observers.
|
|
67
|
+
*/
|
|
68
|
+
private emitPinningEvent;
|
|
69
|
+
/**
|
|
70
|
+
* Executes a layer of nodes with the configured concurrency.
|
|
71
|
+
*/
|
|
72
|
+
private executeLayer;
|
|
73
|
+
/**
|
|
74
|
+
* Executes a single node.
|
|
75
|
+
*/
|
|
76
|
+
private executeNode;
|
|
77
|
+
/**
|
|
78
|
+
* Resolves a node's input values from incoming edges.
|
|
79
|
+
*/
|
|
80
|
+
private resolveNodeInputs;
|
|
81
|
+
/**
|
|
82
|
+
* Attempts to read a pinned value for the node. Returns the cached outputs
|
|
83
|
+
* when a valid pinned value exists, or `undefined` to proceed with normal
|
|
84
|
+
* execution.
|
|
85
|
+
*/
|
|
86
|
+
private tryPinnedValue;
|
|
87
|
+
/**
|
|
88
|
+
* Recursively computes fingerprints for all upstream dependencies of a node
|
|
89
|
+
* using the results already accumulated in the frame.
|
|
90
|
+
*/
|
|
91
|
+
private computeDependencyFingerprints;
|
|
92
|
+
/**
|
|
93
|
+
* Routes a node's outputs to downstream inputs and workflow outputs.
|
|
94
|
+
*/
|
|
95
|
+
private routeOutgoingEdges;
|
|
96
|
+
/**
|
|
97
|
+
* Emits an event, records it in the frame, and dispatches to observers.
|
|
98
|
+
*/
|
|
99
|
+
private emitEvent;
|
|
100
|
+
/**
|
|
101
|
+
* Merges default options with the given options.
|
|
102
|
+
*/
|
|
103
|
+
private mergeOptions;
|
|
104
|
+
/**
|
|
105
|
+
* Generates a unique run id.
|
|
106
|
+
*/
|
|
107
|
+
private generateRunId;
|
|
108
|
+
/**
|
|
109
|
+
* Converts an error into a serialized payload.
|
|
110
|
+
*/
|
|
111
|
+
private toErrorPayload;
|
|
112
|
+
}
|