@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,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module integrations/graph/store/GraphValueStore
|
|
3
|
+
* @summary Runtime value store wrapping a persistent adapter.
|
|
4
|
+
* @description Holds runtime values for the current execution in memory and delegates cached/pinned values to a {@link GraphValueStoreAdapter}.
|
|
5
|
+
*/
|
|
6
|
+
import { GRAPH_WORKFLOW_BOUNDARY } from "./../constants.js";
|
|
7
|
+
/**
|
|
8
|
+
* Manages values during a single graph execution.
|
|
9
|
+
*
|
|
10
|
+
* Runtime values (workflow inputs, node outputs, workflow outputs) are kept in
|
|
11
|
+
* an in-memory map. Persistent cache and pinning operations are delegated to
|
|
12
|
+
* the configured {@link GraphValueStoreAdapter}.
|
|
13
|
+
*/
|
|
14
|
+
export class GraphValueStore {
|
|
15
|
+
/**
|
|
16
|
+
* @param adapter - The persistent adapter for cached/pinned values.
|
|
17
|
+
*/
|
|
18
|
+
constructor(adapter) {
|
|
19
|
+
this.adapter = adapter;
|
|
20
|
+
this.runtimeValues = new Map();
|
|
21
|
+
}
|
|
22
|
+
/** Seeds the workflow input values. */
|
|
23
|
+
seedWorkflowInputs(inputs) {
|
|
24
|
+
this.runtimeValues.set(GRAPH_WORKFLOW_BOUNDARY, { ...inputs });
|
|
25
|
+
}
|
|
26
|
+
/** Stores the outputs produced by a node. */
|
|
27
|
+
setNodeOutputs(nodeId, outputs) {
|
|
28
|
+
this.runtimeValues.set(nodeId, { ...outputs });
|
|
29
|
+
}
|
|
30
|
+
/** Reads a single port value from a node's stored outputs. */
|
|
31
|
+
getPort(nodeId, port) {
|
|
32
|
+
return this.runtimeValues.get(nodeId)?.[port];
|
|
33
|
+
}
|
|
34
|
+
/** Returns whether a node has a value for the given port. */
|
|
35
|
+
hasPort(nodeId, port) {
|
|
36
|
+
return Object.prototype.hasOwnProperty.call(this.runtimeValues.get(nodeId) ?? {}, port);
|
|
37
|
+
}
|
|
38
|
+
/** Sets a single workflow output port value. */
|
|
39
|
+
setWorkflowOutput(port, value) {
|
|
40
|
+
const current = this.runtimeValues.get(GRAPH_WORKFLOW_BOUNDARY) ?? {};
|
|
41
|
+
current[port] = value;
|
|
42
|
+
this.runtimeValues.set(GRAPH_WORKFLOW_BOUNDARY, current);
|
|
43
|
+
}
|
|
44
|
+
/** Returns all workflow-level values (inputs merged with outputs). */
|
|
45
|
+
getWorkflowValues() {
|
|
46
|
+
return {
|
|
47
|
+
...(this.runtimeValues.get(GRAPH_WORKFLOW_BOUNDARY) ?? {}),
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
/** Reads a cached value from the adapter. */
|
|
51
|
+
async readCached(key) {
|
|
52
|
+
return this.adapter.read(key);
|
|
53
|
+
}
|
|
54
|
+
/** Writes a cached value through the adapter. */
|
|
55
|
+
async writeCached(key, value) {
|
|
56
|
+
await this.adapter.write(key, value);
|
|
57
|
+
}
|
|
58
|
+
/** Deletes a cached value through the adapter. */
|
|
59
|
+
async deleteCached(key) {
|
|
60
|
+
await this.adapter.delete(key);
|
|
61
|
+
}
|
|
62
|
+
/** Returns a snapshot of all runtime values. */
|
|
63
|
+
snapshot() {
|
|
64
|
+
return Object.fromEntries(this.runtimeValues.entries());
|
|
65
|
+
}
|
|
66
|
+
/** Returns the underlying adapter (used by the pinning service). */
|
|
67
|
+
getAdapter() {
|
|
68
|
+
return this.adapter;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=GraphValueStore.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GraphValueStore.js","sourceRoot":"","sources":["../../../../src/graph/store/GraphValueStore.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,uBAAuB,EAAE,0BAAqB;AAMvD;;;;;;GAMG;AACH,MAAM,OAAO,eAAe;IAG1B;;OAEG;IACH,YAA6B,OAA+B;QAA/B,YAAO,GAAP,OAAO,CAAwB;QAL3C,kBAAa,GAAG,IAAI,GAAG,EAAgC,CAAC;IAKV,CAAC;IAEhE,uCAAuC;IACvC,kBAAkB,CAAC,MAA4B;QAC7C,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,uBAAuB,EAAE,EAAE,GAAG,MAAM,EAAE,CAAC,CAAC;IACjE,CAAC;IAED,6CAA6C;IAC7C,cAAc,CAAC,MAAc,EAAE,OAA6B;QAC1D,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,MAAM,EAAE,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjD,CAAC;IAED,8DAA8D;IAC9D,OAAO,CAAC,MAAc,EAAE,IAAY;QAClC,OAAO,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC;IAChD,CAAC;IAED,6DAA6D;IAC7D,OAAO,CAAC,MAAc,EAAE,IAAY;QAClC,OAAO,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CACzC,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,EACpC,IAAI,CACL,CAAC;IACJ,CAAC;IAED,gDAAgD;IAChD,iBAAiB,CAAC,IAAY,EAAE,KAAc;QAC5C,MAAM,OAAO,GAAG,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,uBAAuB,CAAC,IAAI,EAAE,CAAC;QACtE,OAAO,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC;QACtB,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,uBAAuB,EAAE,OAAO,CAAC,CAAC;IAC3D,CAAC;IAED,sEAAsE;IACtE,iBAAiB;QACf,OAAO;YACL,GAAG,CAAC,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,uBAAuB,CAAC,IAAI,EAAE,CAAC;SAC3D,CAAC;IACJ,CAAC;IAED,6CAA6C;IAC7C,KAAK,CAAC,UAAU,CAAC,GAAkB;QACjC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAChC,CAAC;IAED,iDAAiD;IACjD,KAAK,CAAC,WAAW,CAAC,GAAkB,EAAE,KAAuB;QAC3D,MAAM,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IACvC,CAAC;IAED,kDAAkD;IAClD,KAAK,CAAC,YAAY,CAAC,GAAkB;QACnC,MAAM,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IACjC,CAAC;IAED,gDAAgD;IAChD,QAAQ;QACN,OAAO,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE,CAAC,CAAC;IAC1D,CAAC;IAED,oEAAoE;IACpE,UAAU;QACR,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GraphValueStoreAdapter.js","sourceRoot":"","sources":["../../../../src/graph/store/GraphValueStoreAdapter.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* In-memory implementation of {@link GraphValueStoreAdapter}.
|
|
3
|
+
*
|
|
4
|
+
* Values are keyed by a serialized string combining namespace, workflowId,
|
|
5
|
+
* nodeId, version, and fingerprint.
|
|
6
|
+
*/
|
|
7
|
+
export class InMemoryGraphValueStoreAdapter {
|
|
8
|
+
constructor() {
|
|
9
|
+
this.values = new Map();
|
|
10
|
+
}
|
|
11
|
+
/** @inheritDoc */
|
|
12
|
+
async read(key) {
|
|
13
|
+
return this.values.get(this.serializeKey(key));
|
|
14
|
+
}
|
|
15
|
+
/** @inheritDoc */
|
|
16
|
+
async write(key, value) {
|
|
17
|
+
this.values.set(this.serializeKey(key), value);
|
|
18
|
+
}
|
|
19
|
+
/** @inheritDoc */
|
|
20
|
+
async delete(key) {
|
|
21
|
+
this.values.delete(this.serializeKey(key));
|
|
22
|
+
}
|
|
23
|
+
/** @inheritDoc */
|
|
24
|
+
async has(key) {
|
|
25
|
+
return this.values.has(this.serializeKey(key));
|
|
26
|
+
}
|
|
27
|
+
/** @inheritDoc */
|
|
28
|
+
async list(prefix) {
|
|
29
|
+
const results = [];
|
|
30
|
+
for (const value of this.values.values()) {
|
|
31
|
+
const k = value.key;
|
|
32
|
+
if (prefix.workflowId !== undefined &&
|
|
33
|
+
k.workflowId !== prefix.workflowId)
|
|
34
|
+
continue;
|
|
35
|
+
if (prefix.nodeId !== undefined && k.nodeId !== prefix.nodeId)
|
|
36
|
+
continue;
|
|
37
|
+
if (prefix.namespace !== undefined &&
|
|
38
|
+
k.namespace !== prefix.namespace)
|
|
39
|
+
continue;
|
|
40
|
+
if (prefix.version !== undefined && k.version !== prefix.version)
|
|
41
|
+
continue;
|
|
42
|
+
results.push(value);
|
|
43
|
+
}
|
|
44
|
+
return results;
|
|
45
|
+
}
|
|
46
|
+
/** @inheritDoc */
|
|
47
|
+
async clearRun(runId) {
|
|
48
|
+
void runId;
|
|
49
|
+
this.values.clear();
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Serializes a key into a stable string used as the Map key.
|
|
53
|
+
*/
|
|
54
|
+
serializeKey(key) {
|
|
55
|
+
return [
|
|
56
|
+
key.namespace ?? "default",
|
|
57
|
+
key.workflowId,
|
|
58
|
+
key.nodeId,
|
|
59
|
+
key.version ?? "default",
|
|
60
|
+
key.fingerprint,
|
|
61
|
+
].join(":");
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=InMemoryGraphValueStoreAdapter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InMemoryGraphValueStoreAdapter.js","sourceRoot":"","sources":["../../../../src/graph/store/InMemoryGraphValueStoreAdapter.ts"],"names":[],"mappings":"AASA;;;;;GAKG;AACH,MAAM,OAAO,8BAA8B;IAA3C;QACmB,WAAM,GAAG,IAAI,GAAG,EAA4B,CAAC;IA+DhE,CAAC;IA7DC,kBAAkB;IAClB,KAAK,CAAC,IAAI,CAAC,GAAkB;QAC3B,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC;IACjD,CAAC;IAED,kBAAkB;IAClB,KAAK,CAAC,KAAK,CAAC,GAAkB,EAAE,KAAuB;QACrD,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,EAAE,KAAK,CAAC,CAAC;IACjD,CAAC;IAED,kBAAkB;IAClB,KAAK,CAAC,MAAM,CAAC,GAAkB;QAC7B,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC;IAC7C,CAAC;IAED,kBAAkB;IAClB,KAAK,CAAC,GAAG,CAAC,GAAkB;QAC1B,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC;IACjD,CAAC;IAED,kBAAkB;IAClB,KAAK,CAAC,IAAI,CAAC,MAA8B;QACvC,MAAM,OAAO,GAAuB,EAAE,CAAC;QACvC,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC;YACzC,MAAM,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC;YACpB,IACE,MAAM,CAAC,UAAU,KAAK,SAAS;gBAC/B,CAAC,CAAC,UAAU,KAAK,MAAM,CAAC,UAAU;gBAElC,SAAS;YACX,IAAI,MAAM,CAAC,MAAM,KAAK,SAAS,IAAI,CAAC,CAAC,MAAM,KAAK,MAAM,CAAC,MAAM;gBAAE,SAAS;YACxE,IACE,MAAM,CAAC,SAAS,KAAK,SAAS;gBAC9B,CAAC,CAAC,SAAS,KAAK,MAAM,CAAC,SAAS;gBAEhC,SAAS;YACX,IAAI,MAAM,CAAC,OAAO,KAAK,SAAS,IAAI,CAAC,CAAC,OAAO,KAAK,MAAM,CAAC,OAAO;gBAC9D,SAAS;YACX,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACtB,CAAC;QACD,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,kBAAkB;IAClB,KAAK,CAAC,QAAQ,CAAC,KAAa;QAC1B,KAAK,KAAK,CAAC;QACX,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;IACtB,CAAC;IAED;;OAEG;IACK,YAAY,CAAC,GAAkB;QACrC,OAAO;YACL,GAAG,CAAC,SAAS,IAAI,SAAS;YAC1B,GAAG,CAAC,UAAU;YACd,GAAG,CAAC,MAAM;YACV,GAAG,CAAC,OAAO,IAAI,SAAS;YACxB,GAAG,CAAC,WAAW;SAChB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACd,CAAC;CACF"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module integrations/graph/store
|
|
3
|
+
* @summary Graph value store, adapter, and key types.
|
|
4
|
+
* @description Re-exports the value store adapter interface, in-memory default, key/cached-value types, and the runtime store wrapper.
|
|
5
|
+
*/
|
|
6
|
+
export * from "./GraphValueKey.js";
|
|
7
|
+
export * from "./GraphCachedValue.js";
|
|
8
|
+
export * from "./GraphValueStoreAdapter.js";
|
|
9
|
+
export * from "./InMemoryGraphValueStoreAdapter.js";
|
|
10
|
+
export * from "./GraphValueStore.js";
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/graph/store/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,mCAAgC;AAChC,sCAAmC;AACnC,4CAAyC;AACzC,oDAAiD;AACjD,qCAAkC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/graph/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { GraphInputError } from "./../errors/GraphInputError.js";
|
|
2
|
+
import { GraphExecutionPlanner } from "./../planning/GraphExecutionPlanner.js";
|
|
3
|
+
/**
|
|
4
|
+
* Validates a {@link GraphWorkflowDefinition} before execution.
|
|
5
|
+
*/
|
|
6
|
+
export class GraphDefinitionValidator {
|
|
7
|
+
constructor(planner) {
|
|
8
|
+
this.planner = planner ?? new GraphExecutionPlanner();
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Validates the workflow definition.
|
|
12
|
+
*
|
|
13
|
+
* @throws {GraphInputError} when the workflow has no name or invalid structure.
|
|
14
|
+
* @throws {GraphCycleError} when the workflow contains an unsupported cycle.
|
|
15
|
+
*/
|
|
16
|
+
validate(workflow) {
|
|
17
|
+
if (!workflow.name) {
|
|
18
|
+
throw new GraphInputError("Workflow must have a name");
|
|
19
|
+
}
|
|
20
|
+
const nodeIds = new Set((workflow.nodes ?? []).map((n) => n.id));
|
|
21
|
+
if (nodeIds.size !== (workflow.nodes ?? []).length) {
|
|
22
|
+
throw new GraphInputError("Workflow node IDs must be unique");
|
|
23
|
+
}
|
|
24
|
+
// The planner performs full topology validation (endpoints, ports, cycles)
|
|
25
|
+
this.planner.plan(workflow);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=GraphDefinitionValidator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GraphDefinitionValidator.js","sourceRoot":"","sources":["../../../../src/graph/validation/GraphDefinitionValidator.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,eAAe,EAAE,uCAAkC;AAC5D,OAAO,EAAE,qBAAqB,EAAE,+CAA0C;AAE1E;;GAEG;AACH,MAAM,OAAO,wBAAwB;IAGnC,YAAY,OAA+B;QACzC,IAAI,CAAC,OAAO,GAAG,OAAO,IAAI,IAAI,qBAAqB,EAAE,CAAC;IACxD,CAAC;IAED;;;;;OAKG;IACH,QAAQ,CAAC,QAAiC;QACxC,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;YACnB,MAAM,IAAI,eAAe,CAAC,2BAA2B,CAAC,CAAC;QACzD,CAAC;QAED,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,CAAC,QAAQ,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QACjE,IAAI,OAAO,CAAC,IAAI,KAAK,CAAC,QAAQ,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC;YACnD,MAAM,IAAI,eAAe,CAAC,kCAAkC,CAAC,CAAC;QAChE,CAAC;QAED,2EAA2E;QAC3E,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC9B,CAAC;CACF"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resolves a {@link GraphPortDefinition} to a Zod schema (or a lightweight
|
|
3
|
+
* validation function when Zod is not available).
|
|
4
|
+
*
|
|
5
|
+
* This implementation uses primitive type mapping. When the port's `model`
|
|
6
|
+
* field or underlying Decaf metadata references a `Model` class, consumers
|
|
7
|
+
* should use `modelToZod` from `@decaf-ts/as-zod` to build the schema.
|
|
8
|
+
*/
|
|
9
|
+
export class GraphPortSchemaResolver {
|
|
10
|
+
/**
|
|
11
|
+
* Resolves a single port to a schema descriptor.
|
|
12
|
+
*
|
|
13
|
+
* @returns A descriptor with the port name, a `validate` function, and
|
|
14
|
+
* optional Zod schema reference.
|
|
15
|
+
*/
|
|
16
|
+
resolve(port) {
|
|
17
|
+
const validate = this.createValidator(port);
|
|
18
|
+
return { name: port.name, required: port.required, validate };
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Resolves multiple ports into a map of name -> descriptor.
|
|
22
|
+
*/
|
|
23
|
+
resolveAll(ports) {
|
|
24
|
+
const result = {};
|
|
25
|
+
for (const port of ports) {
|
|
26
|
+
result[port.name] = this.resolve(port);
|
|
27
|
+
}
|
|
28
|
+
return result;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Creates a validation function based on the port's type.
|
|
32
|
+
*/
|
|
33
|
+
createValidator(port) {
|
|
34
|
+
const type = (port.type ?? port.designType ?? "").toLowerCase();
|
|
35
|
+
switch (type) {
|
|
36
|
+
case "string":
|
|
37
|
+
return (v) => typeof v === "string";
|
|
38
|
+
case "number":
|
|
39
|
+
return (v) => typeof v === "number";
|
|
40
|
+
case "boolean":
|
|
41
|
+
return (v) => typeof v === "boolean";
|
|
42
|
+
case "date":
|
|
43
|
+
return (v) => v instanceof Date || (typeof v === "string" && !isNaN(Date.parse(v)));
|
|
44
|
+
case "array":
|
|
45
|
+
return (v) => Array.isArray(v);
|
|
46
|
+
case "bigint":
|
|
47
|
+
return (v) => typeof v === "bigint";
|
|
48
|
+
default:
|
|
49
|
+
return () => true;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=GraphPortSchemaResolver.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GraphPortSchemaResolver.js","sourceRoot":"","sources":["../../../../src/graph/validation/GraphPortSchemaResolver.ts"],"names":[],"mappings":"AAOA;;;;;;;GAOG;AACH,MAAM,OAAO,uBAAuB;IAClC;;;;;OAKG;IACH,OAAO,CAAC,IAAyB;QAK/B,MAAM,QAAQ,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;QAC5C,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,QAAQ,EAAE,CAAC;IAChE,CAAC;IAED;;OAEG;IACH,UAAU,CAAC,KAA4B;QACrC,MAAM,MAAM,GAA+F,EAAE,CAAC;QAC9G,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;YACzB,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACzC,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;IAED;;OAEG;IACK,eAAe,CAAC,IAAyB;QAC/C,MAAM,IAAI,GAAG,CAAC,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,UAAU,IAAI,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;QAChE,QAAQ,IAAI,EAAE,CAAC;YACb,KAAK,QAAQ;gBACX,OAAO,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,QAAQ,CAAC;YACtC,KAAK,QAAQ;gBACX,OAAO,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,QAAQ,CAAC;YACtC,KAAK,SAAS;gBACZ,OAAO,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,SAAS,CAAC;YACvC,KAAK,MAAM;gBACT,OAAO,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,YAAY,IAAI,IAAI,CAAC,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YACtF,KAAK,OAAO;gBACV,OAAO,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;YACjC,KAAK,QAAQ;gBACX,OAAO,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,QAAQ,CAAC;YACtC;gBACE,OAAO,GAAG,EAAE,CAAC,IAAI,CAAC;QACtB,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { GraphInputError } from "./../errors/GraphInputError.js";
|
|
2
|
+
/**
|
|
3
|
+
* Validates runtime values against port definitions.
|
|
4
|
+
*/
|
|
5
|
+
export class GraphValueValidator {
|
|
6
|
+
constructor(resolver) {
|
|
7
|
+
this.resolver = resolver;
|
|
8
|
+
}
|
|
9
|
+
/** Validates workflow-level input values. */
|
|
10
|
+
validateWorkflowInputs(workflow, values) {
|
|
11
|
+
this.validatePorts(workflow.inputs, values, "workflow input");
|
|
12
|
+
}
|
|
13
|
+
/** Validates workflow-level output values. */
|
|
14
|
+
validateWorkflowOutputs(workflow, values) {
|
|
15
|
+
this.validatePorts(workflow.outputs, values, "workflow output");
|
|
16
|
+
}
|
|
17
|
+
/** Validates a node's input values. */
|
|
18
|
+
validateNodeInputs(node, values) {
|
|
19
|
+
const inputPorts = (node.ports ?? []).filter((p) => p.direction === "input");
|
|
20
|
+
this.validatePorts(inputPorts, values, `node '${node.name}' input`);
|
|
21
|
+
}
|
|
22
|
+
/** Validates a node's output values. */
|
|
23
|
+
validateNodeOutputs(node, values) {
|
|
24
|
+
const outputPorts = (node.ports ?? []).filter((p) => p.direction === "output");
|
|
25
|
+
this.validatePorts(outputPorts, values, `node '${node.name}' output`);
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Validates values against a set of port definitions.
|
|
29
|
+
*/
|
|
30
|
+
validatePorts(ports, values, context) {
|
|
31
|
+
if (!ports)
|
|
32
|
+
return;
|
|
33
|
+
for (const port of ports) {
|
|
34
|
+
const has = Object.prototype.hasOwnProperty.call(values, port.name);
|
|
35
|
+
if (port.required && !has) {
|
|
36
|
+
throw new GraphInputError(`Missing required ${context} port '${port.name}'`);
|
|
37
|
+
}
|
|
38
|
+
if (has) {
|
|
39
|
+
const descriptor = this.resolver.resolve(port);
|
|
40
|
+
if (!descriptor.validate(values[port.name])) {
|
|
41
|
+
throw new GraphInputError(`Invalid value for ${context} port '${port.name}'`);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=GraphValueValidator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GraphValueValidator.js","sourceRoot":"","sources":["../../../../src/graph/validation/GraphValueValidator.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,eAAe,EAAE,uCAAkC;AAI5D;;GAEG;AACH,MAAM,OAAO,mBAAmB;IAC9B,YAA6B,QAAiC;QAAjC,aAAQ,GAAR,QAAQ,CAAyB;IAAG,CAAC;IAElE,6CAA6C;IAC7C,sBAAsB,CACpB,QAAiC,EACjC,MAA4B;QAE5B,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,gBAAgB,CAAC,CAAC;IAChE,CAAC;IAED,8CAA8C;IAC9C,uBAAuB,CACrB,QAAiC,EACjC,MAA4B;QAE5B,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,iBAAiB,CAAC,CAAC;IAClE,CAAC;IAED,uCAAuC;IACvC,kBAAkB,CAChB,IAAyB,EACzB,MAA4B;QAE5B,MAAM,UAAU,GAAG,CAAC,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,MAAM,CAC1C,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,KAAK,OAAO,CAC/B,CAAC;QACF,IAAI,CAAC,aAAa,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,IAAI,CAAC,IAAI,SAAS,CAAC,CAAC;IACtE,CAAC;IAED,wCAAwC;IACxC,mBAAmB,CACjB,IAAyB,EACzB,MAA4B;QAE5B,MAAM,WAAW,GAAG,CAAC,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,MAAM,CAC3C,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,KAAK,QAAQ,CAChC,CAAC;QACF,IAAI,CAAC,aAAa,CAAC,WAAW,EAAE,MAAM,EAAE,SAAS,IAAI,CAAC,IAAI,UAAU,CAAC,CAAC;IACxE,CAAC;IAED;;OAEG;IACK,aAAa,CACnB,KAAwC,EACxC,MAA4B,EAC5B,OAAe;QAEf,IAAI,CAAC,KAAK;YAAE,OAAO;QACnB,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;YACzB,MAAM,GAAG,GAAG,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;YACpE,IAAI,IAAI,CAAC,QAAQ,IAAI,CAAC,GAAG,EAAE,CAAC;gBAC1B,MAAM,IAAI,eAAe,CACvB,oBAAoB,OAAO,UAAU,IAAI,CAAC,IAAI,GAAG,CAClD,CAAC;YACJ,CAAC;YACD,IAAI,GAAG,EAAE,CAAC;gBACR,MAAM,UAAU,GAAG,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;gBAC/C,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC;oBAC5C,MAAM,IAAI,eAAe,CACvB,qBAAqB,OAAO,UAAU,IAAI,CAAC,IAAI,GAAG,CACnD,CAAC;gBACJ,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module integrations/graph/validation
|
|
3
|
+
* @summary Graph validation utilities.
|
|
4
|
+
* @description Re-exports the definition validator, port schema resolver, and value validator.
|
|
5
|
+
*/
|
|
6
|
+
export * from "./GraphDefinitionValidator.js";
|
|
7
|
+
export * from "./GraphPortSchemaResolver.js";
|
|
8
|
+
export * from "./GraphValueValidator.js";
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/graph/validation/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,8CAA2C;AAC3C,6CAA0C;AAC1C,yCAAsC"}
|
package/lib/esm/index.js
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* @description Exposes the package utilities and build-time version metadata for `@decaf-ts/integrations`.
|
|
5
5
|
*/
|
|
6
6
|
export * from "./utils.js";
|
|
7
|
-
export const VERSION = "0.3.
|
|
8
|
-
export const COMMIT = "
|
|
9
|
-
export const FULL_VERSION = "0.3.
|
|
7
|
+
export const VERSION = "0.3.1";
|
|
8
|
+
export const COMMIT = "538f19e";
|
|
9
|
+
export const FULL_VERSION = "0.3.1-538f19e";
|
|
10
10
|
export const PACKAGE_NAME = "@decaf-ts/integrations";
|
|
11
11
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module integrations/graph/constants
|
|
3
|
+
* @summary Graph execution engine constants and enums.
|
|
4
|
+
* @description Shared constants, default limits, and enumerations used across the graph execution engine.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Boundary identifier used as the node id for workflow-level input/output ports.
|
|
8
|
+
*/
|
|
9
|
+
export declare const GRAPH_WORKFLOW_BOUNDARY = "$workflow";
|
|
10
|
+
/**
|
|
11
|
+
* Default concurrency for parallel node execution within a layer.
|
|
12
|
+
*/
|
|
13
|
+
export declare const GRAPH_DEFAULT_CONCURRENCY = 4;
|
|
14
|
+
/**
|
|
15
|
+
* Default maximum iterations for `while` and `until` loop nodes.
|
|
16
|
+
*/
|
|
17
|
+
export declare const GRAPH_DEFAULT_MAX_LOOP_ITERATIONS = 100;
|
|
18
|
+
/**
|
|
19
|
+
* Default maximum iterations for `foreach` loop nodes.
|
|
20
|
+
*/
|
|
21
|
+
export declare const GRAPH_DEFAULT_MAX_FOREACH_ITERATIONS = 1000;
|
|
22
|
+
/**
|
|
23
|
+
* Metadata key under which pinning information is stored on a graph node.
|
|
24
|
+
*/
|
|
25
|
+
export declare const GRAPH_PINNING_METADATA_KEY = "graph.pinnable";
|
|
26
|
+
/**
|
|
27
|
+
* Execution status for a workflow or individual node.
|
|
28
|
+
*/
|
|
29
|
+
export declare enum GraphExecutionStatus {
|
|
30
|
+
PENDING = "pending",
|
|
31
|
+
PLANNING = "planning",
|
|
32
|
+
RUNNING = "running",
|
|
33
|
+
SUCCEEDED = "succeeded",
|
|
34
|
+
FAILED = "failed",
|
|
35
|
+
SKIPPED = "skipped",
|
|
36
|
+
CANCELLED = "cancelled",
|
|
37
|
+
CACHED = "cached"
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Event types emitted through the graph execution observer pipeline.
|
|
41
|
+
*/
|
|
42
|
+
export declare enum GraphExecutionEventType {
|
|
43
|
+
WORKFLOW_STARTED = "workflow.started",
|
|
44
|
+
WORKFLOW_PLANNED = "workflow.planned",
|
|
45
|
+
WORKFLOW_COMPLETED = "workflow.completed",
|
|
46
|
+
WORKFLOW_FAILED = "workflow.failed",
|
|
47
|
+
WORKFLOW_CANCELLED = "workflow.cancelled",
|
|
48
|
+
NODE_QUEUED = "node.queued",
|
|
49
|
+
NODE_STARTED = "node.started",
|
|
50
|
+
NODE_OUTPUT = "node.output",
|
|
51
|
+
NODE_COMPLETED = "node.completed",
|
|
52
|
+
NODE_FAILED = "node.failed",
|
|
53
|
+
NODE_SKIPPED = "node.skipped",
|
|
54
|
+
NODE_CACHE_HIT = "node.cacheHit",
|
|
55
|
+
NODE_PINNED = "node.pinned",
|
|
56
|
+
NODE_UNPINNED = "node.unpinned",
|
|
57
|
+
EDGE_VALUE_ROUTED = "edge.valueRouted",
|
|
58
|
+
LOOP_STARTED = "loop.started",
|
|
59
|
+
LOOP_ITERATION_STARTED = "loop.iteration.started",
|
|
60
|
+
LOOP_ITERATION_COMPLETED = "loop.iteration.completed",
|
|
61
|
+
LOOP_CONDITION_EVALUATED = "loop.condition.evaluated",
|
|
62
|
+
LOOP_COMPLETED = "loop.completed",
|
|
63
|
+
LOOP_LIMIT_REACHED = "loop.limitReached",
|
|
64
|
+
VALIDATION_STARTED = "validation.started",
|
|
65
|
+
VALIDATION_FAILED = "validation.failed",
|
|
66
|
+
VALIDATION_COMPLETED = "validation.completed",
|
|
67
|
+
STORE_READ = "store.read",
|
|
68
|
+
STORE_WRITE = "store.write",
|
|
69
|
+
STORE_DELETE = "store.delete"
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Pinning strategy determining when values are pinned.
|
|
73
|
+
*/
|
|
74
|
+
export declare enum GraphPinningStrategy {
|
|
75
|
+
MANUAL = "manual",
|
|
76
|
+
AUTOMATIC = "automatic",
|
|
77
|
+
DISABLED = "disabled"
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Built-in condition types supported by the loop condition evaluator.
|
|
81
|
+
*/
|
|
82
|
+
export declare enum GraphConditionType {
|
|
83
|
+
TRUTHY = "truthy",
|
|
84
|
+
FALSY = "falsy",
|
|
85
|
+
EQUALS = "equals",
|
|
86
|
+
NOT_EQUALS = "notEquals",
|
|
87
|
+
GREATER_THAN = "greaterThan",
|
|
88
|
+
GREATER_THAN_OR_EQUAL = "greaterThanOrEqual",
|
|
89
|
+
LESS_THAN = "lessThan",
|
|
90
|
+
LESS_THAN_OR_EQUAL = "lessThanOrEqual",
|
|
91
|
+
EXISTS = "exists",
|
|
92
|
+
CUSTOM = "custom"
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Loop node kinds recognised by the engine.
|
|
96
|
+
*/
|
|
97
|
+
export declare const GRAPH_LOOP_KIND: {
|
|
98
|
+
readonly FOREACH: "core.loop.foreach";
|
|
99
|
+
readonly WHILE: "core.loop.while";
|
|
100
|
+
readonly UNTIL: "core.loop.until";
|
|
101
|
+
};
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module integrations/graph/constants
|
|
3
|
+
* @summary Graph execution engine constants and enums.
|
|
4
|
+
* @description Shared constants, default limits, and enumerations used across the graph execution engine.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Boundary identifier used as the node id for workflow-level input/output ports.
|
|
8
|
+
*/
|
|
9
|
+
export declare const GRAPH_WORKFLOW_BOUNDARY = "$workflow";
|
|
10
|
+
/**
|
|
11
|
+
* Default concurrency for parallel node execution within a layer.
|
|
12
|
+
*/
|
|
13
|
+
export declare const GRAPH_DEFAULT_CONCURRENCY = 4;
|
|
14
|
+
/**
|
|
15
|
+
* Default maximum iterations for `while` and `until` loop nodes.
|
|
16
|
+
*/
|
|
17
|
+
export declare const GRAPH_DEFAULT_MAX_LOOP_ITERATIONS = 100;
|
|
18
|
+
/**
|
|
19
|
+
* Default maximum iterations for `foreach` loop nodes.
|
|
20
|
+
*/
|
|
21
|
+
export declare const GRAPH_DEFAULT_MAX_FOREACH_ITERATIONS = 1000;
|
|
22
|
+
/**
|
|
23
|
+
* Metadata key under which pinning information is stored on a graph node.
|
|
24
|
+
*/
|
|
25
|
+
export declare const GRAPH_PINNING_METADATA_KEY = "graph.pinnable";
|
|
26
|
+
/**
|
|
27
|
+
* Execution status for a workflow or individual node.
|
|
28
|
+
*/
|
|
29
|
+
export declare enum GraphExecutionStatus {
|
|
30
|
+
PENDING = "pending",
|
|
31
|
+
PLANNING = "planning",
|
|
32
|
+
RUNNING = "running",
|
|
33
|
+
SUCCEEDED = "succeeded",
|
|
34
|
+
FAILED = "failed",
|
|
35
|
+
SKIPPED = "skipped",
|
|
36
|
+
CANCELLED = "cancelled",
|
|
37
|
+
CACHED = "cached"
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Event types emitted through the graph execution observer pipeline.
|
|
41
|
+
*/
|
|
42
|
+
export declare enum GraphExecutionEventType {
|
|
43
|
+
WORKFLOW_STARTED = "workflow.started",
|
|
44
|
+
WORKFLOW_PLANNED = "workflow.planned",
|
|
45
|
+
WORKFLOW_COMPLETED = "workflow.completed",
|
|
46
|
+
WORKFLOW_FAILED = "workflow.failed",
|
|
47
|
+
WORKFLOW_CANCELLED = "workflow.cancelled",
|
|
48
|
+
NODE_QUEUED = "node.queued",
|
|
49
|
+
NODE_STARTED = "node.started",
|
|
50
|
+
NODE_OUTPUT = "node.output",
|
|
51
|
+
NODE_COMPLETED = "node.completed",
|
|
52
|
+
NODE_FAILED = "node.failed",
|
|
53
|
+
NODE_SKIPPED = "node.skipped",
|
|
54
|
+
NODE_CACHE_HIT = "node.cacheHit",
|
|
55
|
+
NODE_PINNED = "node.pinned",
|
|
56
|
+
NODE_UNPINNED = "node.unpinned",
|
|
57
|
+
EDGE_VALUE_ROUTED = "edge.valueRouted",
|
|
58
|
+
LOOP_STARTED = "loop.started",
|
|
59
|
+
LOOP_ITERATION_STARTED = "loop.iteration.started",
|
|
60
|
+
LOOP_ITERATION_COMPLETED = "loop.iteration.completed",
|
|
61
|
+
LOOP_CONDITION_EVALUATED = "loop.condition.evaluated",
|
|
62
|
+
LOOP_COMPLETED = "loop.completed",
|
|
63
|
+
LOOP_LIMIT_REACHED = "loop.limitReached",
|
|
64
|
+
VALIDATION_STARTED = "validation.started",
|
|
65
|
+
VALIDATION_FAILED = "validation.failed",
|
|
66
|
+
VALIDATION_COMPLETED = "validation.completed",
|
|
67
|
+
STORE_READ = "store.read",
|
|
68
|
+
STORE_WRITE = "store.write",
|
|
69
|
+
STORE_DELETE = "store.delete"
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Pinning strategy determining when values are pinned.
|
|
73
|
+
*/
|
|
74
|
+
export declare enum GraphPinningStrategy {
|
|
75
|
+
MANUAL = "manual",
|
|
76
|
+
AUTOMATIC = "automatic",
|
|
77
|
+
DISABLED = "disabled"
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Built-in condition types supported by the loop condition evaluator.
|
|
81
|
+
*/
|
|
82
|
+
export declare enum GraphConditionType {
|
|
83
|
+
TRUTHY = "truthy",
|
|
84
|
+
FALSY = "falsy",
|
|
85
|
+
EQUALS = "equals",
|
|
86
|
+
NOT_EQUALS = "notEquals",
|
|
87
|
+
GREATER_THAN = "greaterThan",
|
|
88
|
+
GREATER_THAN_OR_EQUAL = "greaterThanOrEqual",
|
|
89
|
+
LESS_THAN = "lessThan",
|
|
90
|
+
LESS_THAN_OR_EQUAL = "lessThanOrEqual",
|
|
91
|
+
EXISTS = "exists",
|
|
92
|
+
CUSTOM = "custom"
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Loop node kinds recognised by the engine.
|
|
96
|
+
*/
|
|
97
|
+
export declare const GRAPH_LOOP_KIND: {
|
|
98
|
+
readonly FOREACH: "core.loop.foreach";
|
|
99
|
+
readonly WHILE: "core.loop.while";
|
|
100
|
+
readonly UNTIL: "core.loop.until";
|
|
101
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module integrations/graph/decorators
|
|
3
|
+
* @summary Reserved for future core-level graph decorators.
|
|
4
|
+
* @description This file is intentionally empty for now. Graph decorators such as `@pinnable()` live in `@decaf-ts/ui-decorators/graph`. Additional decorators may be added here if the core engine needs its own metadata keys.
|
|
5
|
+
*/
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module integrations/graph/decorators
|
|
3
|
+
* @summary Reserved for future core-level graph decorators.
|
|
4
|
+
* @description This file is intentionally empty for now. Graph decorators such as `@pinnable()` live in `@decaf-ts/ui-decorators/graph`. Additional decorators may be added here if the core engine needs its own metadata keys.
|
|
5
|
+
*/
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module integrations/graph/errors/GraphCycleError
|
|
3
|
+
* @summary Error thrown when a workflow contains an unsupported cycle.
|
|
4
|
+
* @description Ordinary (non-loop) workflow graphs must be acyclic. This error is raised when the planner detects a cycle.
|
|
5
|
+
*/
|
|
6
|
+
import { GraphExecutionError } from "./GraphExecutionError.d.cts";
|
|
7
|
+
/**
|
|
8
|
+
* Thrown when a graph workflow contains an unsupported cycle.
|
|
9
|
+
*/
|
|
10
|
+
export declare class GraphCycleError extends GraphExecutionError {
|
|
11
|
+
constructor(details?: unknown);
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module integrations/graph/errors/GraphCycleError
|
|
3
|
+
* @summary Error thrown when a workflow contains an unsupported cycle.
|
|
4
|
+
* @description Ordinary (non-loop) workflow graphs must be acyclic. This error is raised when the planner detects a cycle.
|
|
5
|
+
*/
|
|
6
|
+
import { GraphExecutionError } from "./GraphExecutionError.d.mts";
|
|
7
|
+
/**
|
|
8
|
+
* Thrown when a graph workflow contains an unsupported cycle.
|
|
9
|
+
*/
|
|
10
|
+
export declare class GraphCycleError extends GraphExecutionError {
|
|
11
|
+
constructor(details?: unknown);
|
|
12
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module integrations/graph/errors/GraphExecutionError
|
|
3
|
+
* @summary Base error for all graph execution failures.
|
|
4
|
+
* @description Extends Decaf's {@link InternalError} so graph errors follow the standard Decaf error hierarchy while carrying a graph-specific string code.
|
|
5
|
+
*/
|
|
6
|
+
import { InternalError } from "@decaf-ts/db-decorators";
|
|
7
|
+
/**
|
|
8
|
+
* Base error for the graph execution engine.
|
|
9
|
+
*
|
|
10
|
+
* Extends `InternalError` (HTTP 500) to comply with the Decaf constitution which
|
|
11
|
+
* requires runtime errors to be `BaseError` subclasses. The additional
|
|
12
|
+
* `graphCode` property carries a machine-readable string code such as
|
|
13
|
+
* `"GRAPH_CYCLE_ERROR"`.
|
|
14
|
+
*/
|
|
15
|
+
export declare class GraphExecutionError extends InternalError {
|
|
16
|
+
readonly graphCode: string;
|
|
17
|
+
readonly details?: unknown;
|
|
18
|
+
constructor(message: string, graphCode?: string, details?: unknown);
|
|
19
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module integrations/graph/errors/GraphExecutionError
|
|
3
|
+
* @summary Base error for all graph execution failures.
|
|
4
|
+
* @description Extends Decaf's {@link InternalError} so graph errors follow the standard Decaf error hierarchy while carrying a graph-specific string code.
|
|
5
|
+
*/
|
|
6
|
+
import { InternalError } from "@decaf-ts/db-decorators";
|
|
7
|
+
/**
|
|
8
|
+
* Base error for the graph execution engine.
|
|
9
|
+
*
|
|
10
|
+
* Extends `InternalError` (HTTP 500) to comply with the Decaf constitution which
|
|
11
|
+
* requires runtime errors to be `BaseError` subclasses. The additional
|
|
12
|
+
* `graphCode` property carries a machine-readable string code such as
|
|
13
|
+
* `"GRAPH_CYCLE_ERROR"`.
|
|
14
|
+
*/
|
|
15
|
+
export declare class GraphExecutionError extends InternalError {
|
|
16
|
+
readonly graphCode: string;
|
|
17
|
+
readonly details?: unknown;
|
|
18
|
+
constructor(message: string, graphCode?: string, details?: unknown);
|
|
19
|
+
}
|
|
@@ -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.cts";
|
|
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
|
+
}
|