@decaf-ts/integrations 0.3.0 → 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/cjs/keycloak/services/KeycloakAuthService.cjs +2 -5
- package/lib/cjs/keycloak/services/KeycloakAuthService.cjs.map +1 -1
- package/lib/cjs/keycloak/services/KeycloakClientService.cjs +2 -5
- package/lib/cjs/keycloak/services/KeycloakClientService.cjs.map +1 -1
- package/lib/cjs/keycloak/services/KeycloakIdentityProviderService.cjs +2 -5
- package/lib/cjs/keycloak/services/KeycloakIdentityProviderService.cjs.map +1 -1
- package/lib/cjs/keycloak/services/KeycloakRealmService.cjs +5 -18
- package/lib/cjs/keycloak/services/KeycloakRealmService.cjs.map +1 -1
- package/lib/cjs/keycloak/services/KeycloakRoleService.cjs +2 -5
- package/lib/cjs/keycloak/services/KeycloakRoleService.cjs.map +1 -1
- package/lib/cjs/keycloak/services/KeycloakService.cjs +1 -1
- package/lib/cjs/keycloak/services/KeycloakService.cjs.map +1 -1
- package/lib/cjs/keycloak/services/KeycloakUserService.cjs +2 -5
- package/lib/cjs/keycloak/services/KeycloakUserService.cjs.map +1 -1
- package/lib/cjs/kibana/services/KibanaAuthService.cjs +3 -6
- package/lib/cjs/kibana/services/KibanaAuthService.cjs.map +1 -1
- package/lib/cjs/kibana/services/KibanaDashboardService.cjs +6 -18
- package/lib/cjs/kibana/services/KibanaDashboardService.cjs.map +1 -1
- package/lib/cjs/kibana/services/KibanaDataViewService.cjs +4 -16
- package/lib/cjs/kibana/services/KibanaDataViewService.cjs.map +1 -1
- package/lib/cjs/kibana/services/KibanaRoleService.cjs +2 -5
- package/lib/cjs/kibana/services/KibanaRoleService.cjs.map +1 -1
- package/lib/cjs/kibana/services/KibanaSpaceService.cjs +2 -5
- package/lib/cjs/kibana/services/KibanaSpaceService.cjs.map +1 -1
- package/lib/cjs/kibana/services/KibanaUserService.cjs +2 -5
- package/lib/cjs/kibana/services/KibanaUserService.cjs.map +1 -1
- package/lib/cjs/shared/runtime.cjs +26 -0
- package/lib/cjs/shared/runtime.cjs.map +1 -0
- 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/esm/keycloak/services/KeycloakAuthService.js +2 -5
- package/lib/esm/keycloak/services/KeycloakAuthService.js.map +1 -1
- package/lib/esm/keycloak/services/KeycloakClientService.js +2 -5
- package/lib/esm/keycloak/services/KeycloakClientService.js.map +1 -1
- package/lib/esm/keycloak/services/KeycloakIdentityProviderService.js +2 -5
- package/lib/esm/keycloak/services/KeycloakIdentityProviderService.js.map +1 -1
- package/lib/esm/keycloak/services/KeycloakRealmService.js +5 -18
- package/lib/esm/keycloak/services/KeycloakRealmService.js.map +1 -1
- package/lib/esm/keycloak/services/KeycloakRoleService.js +2 -5
- package/lib/esm/keycloak/services/KeycloakRoleService.js.map +1 -1
- package/lib/esm/keycloak/services/KeycloakService.js +1 -1
- package/lib/esm/keycloak/services/KeycloakService.js.map +1 -1
- package/lib/esm/keycloak/services/KeycloakUserService.js +2 -5
- package/lib/esm/keycloak/services/KeycloakUserService.js.map +1 -1
- package/lib/esm/kibana/services/KibanaAuthService.js +3 -6
- package/lib/esm/kibana/services/KibanaAuthService.js.map +1 -1
- package/lib/esm/kibana/services/KibanaDashboardService.js +6 -18
- package/lib/esm/kibana/services/KibanaDashboardService.js.map +1 -1
- package/lib/esm/kibana/services/KibanaDataViewService.js +4 -16
- package/lib/esm/kibana/services/KibanaDataViewService.js.map +1 -1
- package/lib/esm/kibana/services/KibanaRoleService.js +2 -5
- package/lib/esm/kibana/services/KibanaRoleService.js.map +1 -1
- package/lib/esm/kibana/services/KibanaSpaceService.js +2 -5
- package/lib/esm/kibana/services/KibanaSpaceService.js.map +1 -1
- package/lib/esm/kibana/services/KibanaUserService.js +2 -5
- package/lib/esm/kibana/services/KibanaUserService.js.map +1 -1
- package/lib/esm/shared/runtime.js +21 -0
- package/lib/esm/shared/runtime.js.map +1 -0
- 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/lib/types/keycloak/services/KeycloakAuthService.d.cts +0 -1
- package/lib/types/keycloak/services/KeycloakAuthService.d.mts +0 -1
- package/lib/types/keycloak/services/KeycloakClientService.d.cts +0 -1
- package/lib/types/keycloak/services/KeycloakClientService.d.mts +0 -1
- package/lib/types/keycloak/services/KeycloakIdentityProviderService.d.cts +0 -1
- package/lib/types/keycloak/services/KeycloakIdentityProviderService.d.mts +0 -1
- package/lib/types/keycloak/services/KeycloakRealmService.d.cts +0 -2
- package/lib/types/keycloak/services/KeycloakRealmService.d.mts +0 -2
- package/lib/types/keycloak/services/KeycloakRoleService.d.cts +0 -1
- package/lib/types/keycloak/services/KeycloakRoleService.d.mts +0 -1
- package/lib/types/keycloak/services/KeycloakUserService.d.cts +0 -1
- package/lib/types/keycloak/services/KeycloakUserService.d.mts +0 -1
- package/lib/types/keycloak/types.d.cts +4 -1
- package/lib/types/keycloak/types.d.mts +4 -1
- package/lib/types/kibana/services/KibanaAuthService.d.cts +0 -1
- package/lib/types/kibana/services/KibanaAuthService.d.mts +0 -1
- package/lib/types/kibana/services/KibanaDashboardService.d.cts +0 -2
- package/lib/types/kibana/services/KibanaDashboardService.d.mts +0 -2
- package/lib/types/kibana/services/KibanaDataViewService.d.cts +0 -2
- package/lib/types/kibana/services/KibanaDataViewService.d.mts +0 -2
- package/lib/types/kibana/services/KibanaRoleService.d.cts +0 -1
- package/lib/types/kibana/services/KibanaRoleService.d.mts +0 -1
- package/lib/types/kibana/services/KibanaSpaceService.d.cts +0 -1
- package/lib/types/kibana/services/KibanaSpaceService.d.mts +0 -1
- package/lib/types/kibana/services/KibanaUserService.d.cts +0 -1
- package/lib/types/kibana/services/KibanaUserService.d.mts +0 -1
- package/lib/types/kibana/types.d.cts +4 -1
- package/lib/types/kibana/types.d.mts +4 -1
- package/lib/types/shared/runtime.d.cts +2 -0
- package/lib/types/shared/runtime.d.mts +2 -0
- package/package.json +21 -7
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ForeachGraphNodeExecutor = void 0;
|
|
4
|
+
const constants_js_1 = require("./../constants.cjs");
|
|
5
|
+
const GraphInputError_js_1 = require("./../errors/GraphInputError.cjs");
|
|
6
|
+
const GraphLoopLimitError_js_1 = require("./../errors/GraphLoopLimitError.cjs");
|
|
7
|
+
/**
|
|
8
|
+
* Executor for `core.loop.foreach` nodes.
|
|
9
|
+
*
|
|
10
|
+
* Expects input:
|
|
11
|
+
* - `items`: array of values to iterate over
|
|
12
|
+
* - `state?`: optional initial state
|
|
13
|
+
*
|
|
14
|
+
* Produces output:
|
|
15
|
+
* - `results`: array of body outputs (in item order)
|
|
16
|
+
* - `state?`: final state
|
|
17
|
+
* - `iterations`: number of iterations executed
|
|
18
|
+
*/
|
|
19
|
+
class ForeachGraphNodeExecutor {
|
|
20
|
+
constructor(engine) {
|
|
21
|
+
this.engine = engine;
|
|
22
|
+
}
|
|
23
|
+
async execute(input, context) {
|
|
24
|
+
const metadata = this.extractMetadata(context);
|
|
25
|
+
const items = input.items;
|
|
26
|
+
const maxIterations = metadata.maxIterations ?? constants_js_1.GRAPH_DEFAULT_MAX_FOREACH_ITERATIONS;
|
|
27
|
+
if (!Array.isArray(items)) {
|
|
28
|
+
throw new GraphInputError_js_1.GraphInputError("foreach input 'items' must be an array");
|
|
29
|
+
}
|
|
30
|
+
if (items.length > maxIterations) {
|
|
31
|
+
throw new GraphLoopLimitError_js_1.GraphLoopLimitError(`foreach exceeded max iterations (${items.length} > ${maxIterations})`);
|
|
32
|
+
}
|
|
33
|
+
const itemPort = metadata.itemPort ?? "item";
|
|
34
|
+
const resultPort = metadata.resultPort ?? "result";
|
|
35
|
+
const statePort = metadata.statePort ?? "state";
|
|
36
|
+
const bodyWorkflow = metadata.body;
|
|
37
|
+
const results = [];
|
|
38
|
+
let state = input.state;
|
|
39
|
+
await context.emit({ type: constants_js_1.GraphExecutionEventType.LOOP_STARTED });
|
|
40
|
+
for (let i = 0; i < items.length; i++) {
|
|
41
|
+
await context.emit({
|
|
42
|
+
type: constants_js_1.GraphExecutionEventType.LOOP_ITERATION_STARTED,
|
|
43
|
+
iteration: i,
|
|
44
|
+
});
|
|
45
|
+
const childInputs = {
|
|
46
|
+
[itemPort]: items[i],
|
|
47
|
+
index: i,
|
|
48
|
+
};
|
|
49
|
+
if (state !== undefined)
|
|
50
|
+
childInputs[statePort] = state;
|
|
51
|
+
const childResult = await this.engine.execute(bodyWorkflow, childInputs, {
|
|
52
|
+
parentRunId: context.runId,
|
|
53
|
+
path: [...context.path, `iteration:${i}`],
|
|
54
|
+
});
|
|
55
|
+
results.push(childResult.outputs[resultPort]);
|
|
56
|
+
if (childResult.outputs[statePort] !== undefined) {
|
|
57
|
+
state = childResult.outputs[statePort];
|
|
58
|
+
}
|
|
59
|
+
await context.emit({
|
|
60
|
+
type: constants_js_1.GraphExecutionEventType.LOOP_ITERATION_COMPLETED,
|
|
61
|
+
iteration: i,
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
await context.emit({ type: constants_js_1.GraphExecutionEventType.LOOP_COMPLETED });
|
|
65
|
+
const output = {
|
|
66
|
+
results,
|
|
67
|
+
iterations: items.length,
|
|
68
|
+
};
|
|
69
|
+
if (state !== undefined)
|
|
70
|
+
output[statePort] = state;
|
|
71
|
+
return output;
|
|
72
|
+
}
|
|
73
|
+
extractMetadata(context) {
|
|
74
|
+
const raw = context.node.graph?.metadata?.loop ??
|
|
75
|
+
context.metadata?.loop;
|
|
76
|
+
if (!raw) {
|
|
77
|
+
throw new GraphInputError_js_1.GraphInputError("foreach node is missing loop metadata");
|
|
78
|
+
}
|
|
79
|
+
return raw;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
exports.ForeachGraphNodeExecutor = ForeachGraphNodeExecutor;
|
|
83
|
+
//# sourceMappingURL=ForeachGraphNodeExecutor.js.map
|
|
84
|
+
//# sourceMappingURL=ForeachGraphNodeExecutor.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graph/loops/ForeachGraphNodeExecutor.cjs","sourceRoot":"","sources":["graph/loops/ForeachGraphNodeExecutor.js"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GraphConditionEvaluator = void 0;
|
|
4
|
+
const constants_js_1 = require("./../constants.cjs");
|
|
5
|
+
const GraphExecutionError_js_1 = require("./../errors/GraphExecutionError.cjs");
|
|
6
|
+
/**
|
|
7
|
+
* Evaluates loop conditions using built-in comparison types.
|
|
8
|
+
*/
|
|
9
|
+
class GraphConditionEvaluator {
|
|
10
|
+
/**
|
|
11
|
+
* Evaluates a condition against the given state.
|
|
12
|
+
*
|
|
13
|
+
* @param condition - The condition definition.
|
|
14
|
+
* @param state - The current loop state.
|
|
15
|
+
* @returns `true` when the condition passes.
|
|
16
|
+
*/
|
|
17
|
+
evaluate(condition, state) {
|
|
18
|
+
const left = this.resolveValue(condition.left, state);
|
|
19
|
+
const right = condition.right;
|
|
20
|
+
switch (condition.type) {
|
|
21
|
+
case constants_js_1.GraphConditionType.TRUTHY:
|
|
22
|
+
return !!left;
|
|
23
|
+
case constants_js_1.GraphConditionType.FALSY:
|
|
24
|
+
return !left;
|
|
25
|
+
case constants_js_1.GraphConditionType.EQUALS:
|
|
26
|
+
return left === right;
|
|
27
|
+
case constants_js_1.GraphConditionType.NOT_EQUALS:
|
|
28
|
+
return left !== right;
|
|
29
|
+
case constants_js_1.GraphConditionType.GREATER_THAN:
|
|
30
|
+
return Number(left) > Number(right);
|
|
31
|
+
case constants_js_1.GraphConditionType.GREATER_THAN_OR_EQUAL:
|
|
32
|
+
return Number(left) >= Number(right);
|
|
33
|
+
case constants_js_1.GraphConditionType.LESS_THAN:
|
|
34
|
+
return Number(left) < Number(right);
|
|
35
|
+
case constants_js_1.GraphConditionType.LESS_THAN_OR_EQUAL:
|
|
36
|
+
return Number(left) <= Number(right);
|
|
37
|
+
case constants_js_1.GraphConditionType.EXISTS:
|
|
38
|
+
return left !== undefined && left !== null;
|
|
39
|
+
case constants_js_1.GraphConditionType.CUSTOM:
|
|
40
|
+
throw new GraphExecutionError_js_1.GraphExecutionError("Custom condition evaluators are not supported in v1", "GRAPH_CUSTOM_CONDITION_UNSUPPORTED");
|
|
41
|
+
default:
|
|
42
|
+
throw new GraphExecutionError_js_1.GraphExecutionError(`Unknown condition type '${condition.type}'`, "GRAPH_UNKNOWN_CONDITION_TYPE", { condition });
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Resolves a value that may be a dotted path into the state object.
|
|
47
|
+
*/
|
|
48
|
+
resolveValue(path, state) {
|
|
49
|
+
if (!path)
|
|
50
|
+
return state;
|
|
51
|
+
const parts = path.split(".");
|
|
52
|
+
let current = state;
|
|
53
|
+
for (const part of parts) {
|
|
54
|
+
if (current == null)
|
|
55
|
+
return undefined;
|
|
56
|
+
current = current[part];
|
|
57
|
+
}
|
|
58
|
+
return current;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
exports.GraphConditionEvaluator = GraphConditionEvaluator;
|
|
62
|
+
//# sourceMappingURL=GraphConditionEvaluator.js.map
|
|
63
|
+
//# sourceMappingURL=GraphConditionEvaluator.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graph/loops/GraphConditionEvaluator.cjs","sourceRoot":"","sources":["graph/loops/GraphConditionEvaluator.js"],"names":[],"mappings":";;;AAAA,oDAAuD;AACvD,+EAAyE;AACzE;;GAEG;AACH,MAAa,uBAAuB;IAChC;;;;;;OAMG;IACH,QAAQ,CAAC,SAAS,EAAE,KAAK;QACrB,MAAM,IAAI,GAAG,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QACtD,MAAM,KAAK,GAAG,SAAS,CAAC,KAAK,CAAC;QAC9B,QAAQ,SAAS,CAAC,IAAI,EAAE,CAAC;YACrB,KAAK,iCAAkB,CAAC,MAAM;gBAC1B,OAAO,CAAC,CAAC,IAAI,CAAC;YAClB,KAAK,iCAAkB,CAAC,KAAK;gBACzB,OAAO,CAAC,IAAI,CAAC;YACjB,KAAK,iCAAkB,CAAC,MAAM;gBAC1B,OAAO,IAAI,KAAK,KAAK,CAAC;YAC1B,KAAK,iCAAkB,CAAC,UAAU;gBAC9B,OAAO,IAAI,KAAK,KAAK,CAAC;YAC1B,KAAK,iCAAkB,CAAC,YAAY;gBAChC,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;YACxC,KAAK,iCAAkB,CAAC,qBAAqB;gBACzC,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC;YACzC,KAAK,iCAAkB,CAAC,SAAS;gBAC7B,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;YACxC,KAAK,iCAAkB,CAAC,kBAAkB;gBACtC,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC;YACzC,KAAK,iCAAkB,CAAC,MAAM;gBAC1B,OAAO,IAAI,KAAK,SAAS,IAAI,IAAI,KAAK,IAAI,CAAC;YAC/C,KAAK,iCAAkB,CAAC,MAAM;gBAC1B,MAAM,IAAI,4CAAmB,CAAC,qDAAqD,EAAE,oCAAoC,CAAC,CAAC;YAC/H;gBACI,MAAM,IAAI,4CAAmB,CAAC,2BAA2B,SAAS,CAAC,IAAI,GAAG,EAAE,8BAA8B,EAAE,EAAE,SAAS,EAAE,CAAC,CAAC;QACnI,CAAC;IACL,CAAC;IACD;;OAEG;IACH,YAAY,CAAC,IAAI,EAAE,KAAK;QACpB,IAAI,CAAC,IAAI;YACL,OAAO,KAAK,CAAC;QACjB,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAC9B,IAAI,OAAO,GAAG,KAAK,CAAC;QACpB,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;YACvB,IAAI,OAAO,IAAI,IAAI;gBACf,OAAO,SAAS,CAAC;YACrB,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;QAC5B,CAAC;QACD,OAAO,OAAO,CAAC;IACnB,CAAC;CACJ;AAnDD,0DAmDC;AACD,mDAAmD"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GraphLoopExecutionContext = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Context for a single loop execution, carrying the loop metadata and
|
|
6
|
+
* current iteration index.
|
|
7
|
+
*/
|
|
8
|
+
class GraphLoopExecutionContext {
|
|
9
|
+
constructor(iteration, metadata) {
|
|
10
|
+
this.iteration = iteration;
|
|
11
|
+
this.metadata = metadata;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
exports.GraphLoopExecutionContext = GraphLoopExecutionContext;
|
|
15
|
+
//# sourceMappingURL=GraphLoopExecutionContext.js.map
|
|
16
|
+
//# sourceMappingURL=GraphLoopExecutionContext.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graph/loops/GraphLoopExecutionContext.cjs","sourceRoot":"","sources":["graph/loops/GraphLoopExecutionContext.js"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,MAAa,yBAAyB;IAClC,YAAY,SAAS,EAAE,QAAQ;QAC3B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC7B,CAAC;CACJ;AALD,8DAKC;AACD,qDAAqD"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UntilGraphNodeExecutor = void 0;
|
|
4
|
+
const constants_js_1 = require("./../constants.cjs");
|
|
5
|
+
const GraphInputError_js_1 = require("./../errors/GraphInputError.cjs");
|
|
6
|
+
const GraphLoopLimitError_js_1 = require("./../errors/GraphLoopLimitError.cjs");
|
|
7
|
+
const GraphConditionEvaluator_js_1 = require("./GraphConditionEvaluator.cjs");
|
|
8
|
+
/**
|
|
9
|
+
* Executor for `core.loop.until` nodes.
|
|
10
|
+
*
|
|
11
|
+
* Executes the body at least once, then checks the condition. Repeats until
|
|
12
|
+
* the condition evaluates to true.
|
|
13
|
+
*/
|
|
14
|
+
class UntilGraphNodeExecutor {
|
|
15
|
+
constructor(engine) {
|
|
16
|
+
this.engine = engine;
|
|
17
|
+
this.evaluator = new GraphConditionEvaluator_js_1.GraphConditionEvaluator();
|
|
18
|
+
}
|
|
19
|
+
async execute(input, context) {
|
|
20
|
+
const metadata = this.extractMetadata(context);
|
|
21
|
+
const maxIterations = metadata.maxIterations ?? constants_js_1.GRAPH_DEFAULT_MAX_LOOP_ITERATIONS;
|
|
22
|
+
const condition = metadata.condition;
|
|
23
|
+
if (!condition) {
|
|
24
|
+
throw new GraphInputError_js_1.GraphInputError("until node is missing a condition");
|
|
25
|
+
}
|
|
26
|
+
const statePort = metadata.statePort ?? "state";
|
|
27
|
+
const bodyWorkflow = metadata.body;
|
|
28
|
+
let state = input.state;
|
|
29
|
+
let iteration = 0;
|
|
30
|
+
await context.emit({ type: constants_js_1.GraphExecutionEventType.LOOP_STARTED });
|
|
31
|
+
let shouldStop = false;
|
|
32
|
+
do {
|
|
33
|
+
if (iteration >= maxIterations) {
|
|
34
|
+
await context.emit({
|
|
35
|
+
type: constants_js_1.GraphExecutionEventType.LOOP_LIMIT_REACHED,
|
|
36
|
+
iteration,
|
|
37
|
+
});
|
|
38
|
+
throw new GraphLoopLimitError_js_1.GraphLoopLimitError(`until loop exceeded max iterations (${maxIterations})`);
|
|
39
|
+
}
|
|
40
|
+
await context.emit({
|
|
41
|
+
type: constants_js_1.GraphExecutionEventType.LOOP_ITERATION_STARTED,
|
|
42
|
+
iteration,
|
|
43
|
+
});
|
|
44
|
+
const childResult = await this.engine.execute(bodyWorkflow, { [statePort]: state, iteration }, {
|
|
45
|
+
parentRunId: context.runId,
|
|
46
|
+
path: [...context.path, `iteration:${iteration}`],
|
|
47
|
+
});
|
|
48
|
+
state = childResult.outputs[statePort];
|
|
49
|
+
await context.emit({
|
|
50
|
+
type: constants_js_1.GraphExecutionEventType.LOOP_ITERATION_COMPLETED,
|
|
51
|
+
iteration,
|
|
52
|
+
});
|
|
53
|
+
const conditionResult = this.evaluator.evaluate(condition, state);
|
|
54
|
+
await context.emit({
|
|
55
|
+
type: constants_js_1.GraphExecutionEventType.LOOP_CONDITION_EVALUATED,
|
|
56
|
+
iteration,
|
|
57
|
+
payload: { result: conditionResult },
|
|
58
|
+
});
|
|
59
|
+
iteration++;
|
|
60
|
+
shouldStop = conditionResult;
|
|
61
|
+
} while (!shouldStop);
|
|
62
|
+
await context.emit({ type: constants_js_1.GraphExecutionEventType.LOOP_COMPLETED });
|
|
63
|
+
return { [statePort]: state, iterations: iteration };
|
|
64
|
+
}
|
|
65
|
+
extractMetadata(context) {
|
|
66
|
+
const raw = context.node.graph?.metadata?.loop ??
|
|
67
|
+
context.metadata?.loop;
|
|
68
|
+
if (!raw) {
|
|
69
|
+
throw new GraphInputError_js_1.GraphInputError("until node is missing loop metadata");
|
|
70
|
+
}
|
|
71
|
+
return raw;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
exports.UntilGraphNodeExecutor = UntilGraphNodeExecutor;
|
|
75
|
+
//# sourceMappingURL=UntilGraphNodeExecutor.js.map
|
|
76
|
+
//# sourceMappingURL=UntilGraphNodeExecutor.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graph/loops/UntilGraphNodeExecutor.cjs","sourceRoot":"","sources":["graph/loops/UntilGraphNodeExecutor.js"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WhileGraphNodeExecutor = void 0;
|
|
4
|
+
const constants_js_1 = require("./../constants.cjs");
|
|
5
|
+
const GraphInputError_js_1 = require("./../errors/GraphInputError.cjs");
|
|
6
|
+
const GraphLoopLimitError_js_1 = require("./../errors/GraphLoopLimitError.cjs");
|
|
7
|
+
const GraphConditionEvaluator_js_1 = require("./GraphConditionEvaluator.cjs");
|
|
8
|
+
/**
|
|
9
|
+
* Executor for `core.loop.while` nodes.
|
|
10
|
+
*
|
|
11
|
+
* Expects input:
|
|
12
|
+
* - `state`: initial state
|
|
13
|
+
*
|
|
14
|
+
* Produces output:
|
|
15
|
+
* - `state`: final state
|
|
16
|
+
* - `iterations`: number of iterations executed
|
|
17
|
+
*/
|
|
18
|
+
class WhileGraphNodeExecutor {
|
|
19
|
+
constructor(engine) {
|
|
20
|
+
this.engine = engine;
|
|
21
|
+
this.evaluator = new GraphConditionEvaluator_js_1.GraphConditionEvaluator();
|
|
22
|
+
}
|
|
23
|
+
async execute(input, context) {
|
|
24
|
+
const metadata = this.extractMetadata(context);
|
|
25
|
+
const maxIterations = metadata.maxIterations ?? constants_js_1.GRAPH_DEFAULT_MAX_LOOP_ITERATIONS;
|
|
26
|
+
const condition = metadata.condition;
|
|
27
|
+
if (!condition) {
|
|
28
|
+
throw new GraphInputError_js_1.GraphInputError("while node is missing a condition");
|
|
29
|
+
}
|
|
30
|
+
const statePort = metadata.statePort ?? "state";
|
|
31
|
+
const bodyWorkflow = metadata.body;
|
|
32
|
+
let state = input.state;
|
|
33
|
+
let iteration = 0;
|
|
34
|
+
await context.emit({ type: constants_js_1.GraphExecutionEventType.LOOP_STARTED });
|
|
35
|
+
while (this.evaluator.evaluate(condition, state)) {
|
|
36
|
+
if (iteration >= maxIterations) {
|
|
37
|
+
await context.emit({
|
|
38
|
+
type: constants_js_1.GraphExecutionEventType.LOOP_LIMIT_REACHED,
|
|
39
|
+
iteration,
|
|
40
|
+
});
|
|
41
|
+
throw new GraphLoopLimitError_js_1.GraphLoopLimitError(`while loop exceeded max iterations (${maxIterations})`);
|
|
42
|
+
}
|
|
43
|
+
await context.emit({
|
|
44
|
+
type: constants_js_1.GraphExecutionEventType.LOOP_CONDITION_EVALUATED,
|
|
45
|
+
iteration,
|
|
46
|
+
payload: { result: true },
|
|
47
|
+
});
|
|
48
|
+
await context.emit({
|
|
49
|
+
type: constants_js_1.GraphExecutionEventType.LOOP_ITERATION_STARTED,
|
|
50
|
+
iteration,
|
|
51
|
+
});
|
|
52
|
+
const childResult = await this.engine.execute(bodyWorkflow, { [statePort]: state, iteration }, {
|
|
53
|
+
parentRunId: context.runId,
|
|
54
|
+
path: [...context.path, `iteration:${iteration}`],
|
|
55
|
+
});
|
|
56
|
+
state = childResult.outputs[statePort];
|
|
57
|
+
await context.emit({
|
|
58
|
+
type: constants_js_1.GraphExecutionEventType.LOOP_ITERATION_COMPLETED,
|
|
59
|
+
iteration,
|
|
60
|
+
});
|
|
61
|
+
iteration++;
|
|
62
|
+
}
|
|
63
|
+
await context.emit({ type: constants_js_1.GraphExecutionEventType.LOOP_COMPLETED });
|
|
64
|
+
return { [statePort]: state, iterations: iteration };
|
|
65
|
+
}
|
|
66
|
+
extractMetadata(context) {
|
|
67
|
+
const raw = context.node.graph?.metadata?.loop ??
|
|
68
|
+
context.metadata?.loop;
|
|
69
|
+
if (!raw) {
|
|
70
|
+
throw new GraphInputError_js_1.GraphInputError("while node is missing loop metadata");
|
|
71
|
+
}
|
|
72
|
+
return raw;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
exports.WhileGraphNodeExecutor = WhileGraphNodeExecutor;
|
|
76
|
+
//# sourceMappingURL=WhileGraphNodeExecutor.js.map
|
|
77
|
+
//# sourceMappingURL=WhileGraphNodeExecutor.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graph/loops/WhileGraphNodeExecutor.cjs","sourceRoot":"","sources":["graph/loops/WhileGraphNodeExecutor.js"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
/**
|
|
18
|
+
* @module integrations/graph/loops
|
|
19
|
+
* @summary Structured loop executors.
|
|
20
|
+
* @description Re-exports the condition evaluator, loop execution context, and foreach/while/until executors.
|
|
21
|
+
*/
|
|
22
|
+
__exportStar(require("./GraphConditionEvaluator.cjs"), exports);
|
|
23
|
+
__exportStar(require("./GraphLoopExecutionContext.cjs"), exports);
|
|
24
|
+
__exportStar(require("./ForeachGraphNodeExecutor.cjs"), exports);
|
|
25
|
+
__exportStar(require("./WhileGraphNodeExecutor.cjs"), exports);
|
|
26
|
+
__exportStar(require("./UntilGraphNodeExecutor.cjs"), exports);
|
|
27
|
+
//# sourceMappingURL=index.js.map
|
|
28
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graph/loops/index.cjs","sourceRoot":"","sources":["graph/loops/index.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;;;GAIG;AACH,+DAA6C;AAC7C,iEAA+C;AAC/C,gEAA8C;AAC9C,8DAA4C;AAC5C,8DAA4C;AAC5C,iCAAiC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GraphPinningDependencyResolver = void 0;
|
|
4
|
+
const GraphTopology_js_1 = require("./../planning/GraphTopology.cjs");
|
|
5
|
+
/**
|
|
6
|
+
* Resolves the upstream dependency subtree of a node for pinning operations.
|
|
7
|
+
*/
|
|
8
|
+
class GraphPinningDependencyResolver {
|
|
9
|
+
/**
|
|
10
|
+
* Returns the set of upstream node ids that the given node depends on,
|
|
11
|
+
* excluding the workflow boundary.
|
|
12
|
+
*/
|
|
13
|
+
getDependencies(plan, nodeId) {
|
|
14
|
+
return GraphTopology_js_1.GraphTopology.upstreamNodes(nodeId, plan.incomingByNode, false);
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Returns the full set of node ids to pin: the node itself plus all its
|
|
18
|
+
* upstream dependencies.
|
|
19
|
+
*/
|
|
20
|
+
getPinSet(plan, nodeId) {
|
|
21
|
+
const deps = this.getDependencies(plan, nodeId);
|
|
22
|
+
deps.add(nodeId);
|
|
23
|
+
return deps;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
exports.GraphPinningDependencyResolver = GraphPinningDependencyResolver;
|
|
27
|
+
//# sourceMappingURL=GraphPinningDependencyResolver.js.map
|
|
28
|
+
//# sourceMappingURL=GraphPinningDependencyResolver.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graph/pinning/GraphPinningDependencyResolver.cjs","sourceRoot":"","sources":["graph/pinning/GraphPinningDependencyResolver.js"],"names":[],"mappings":";;;AAAA,qEAA+D;AAC/D;;GAEG;AACH,MAAa,8BAA8B;IACvC;;;OAGG;IACH,eAAe,CAAC,IAAI,EAAE,MAAM;QACxB,OAAO,gCAAa,CAAC,aAAa,CAAC,MAAM,EAAE,IAAI,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;IAC3E,CAAC;IACD;;;OAGG;IACH,SAAS,CAAC,IAAI,EAAE,MAAM;QAClB,MAAM,IAAI,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QAChD,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QACjB,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ;AAjBD,wEAiBC;AACD,0DAA0D"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DEFAULT_PINNING_METADATA = void 0;
|
|
4
|
+
exports.isPinnable = isPinnable;
|
|
5
|
+
/**
|
|
6
|
+
* Default pinning metadata applied when `@pinnable()` is used without options.
|
|
7
|
+
*/
|
|
8
|
+
exports.DEFAULT_PINNING_METADATA = {
|
|
9
|
+
enabled: true,
|
|
10
|
+
strategy: "manual",
|
|
11
|
+
includeDependencies: true,
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Returns `true` when the given metadata allows pinning.
|
|
15
|
+
*/
|
|
16
|
+
function isPinnable(metadata) {
|
|
17
|
+
return metadata?.enabled === true && metadata.strategy !== "disabled";
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=GraphPinningMetadata.js.map
|
|
20
|
+
//# sourceMappingURL=GraphPinningMetadata.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graph/pinning/GraphPinningMetadata.cjs","sourceRoot":"","sources":["graph/pinning/GraphPinningMetadata.js"],"names":[],"mappings":";;;AAWA,gCAEC;AAbD;;GAEG;AACU,QAAA,wBAAwB,GAAG;IACpC,OAAO,EAAE,IAAI;IACb,QAAQ,EAAE,QAAQ;IAClB,mBAAmB,EAAE,IAAI;CAC5B,CAAC;AACF;;GAEG;AACH,SAAgB,UAAU,CAAC,QAAQ;IAC/B,OAAO,QAAQ,EAAE,OAAO,KAAK,IAAI,IAAI,QAAQ,CAAC,QAAQ,KAAK,UAAU,CAAC;AAC1E,CAAC;AACD,gDAAgD"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GraphPinningPolicy = void 0;
|
|
4
|
+
const GraphPinningMetadata_js_1 = require("./GraphPinningMetadata.cjs");
|
|
5
|
+
/**
|
|
6
|
+
* Policy that decides pinning behaviour for a plan node.
|
|
7
|
+
*/
|
|
8
|
+
class GraphPinningPolicy {
|
|
9
|
+
/** Returns whether the node is allowed to be pinned. */
|
|
10
|
+
canPin(node) {
|
|
11
|
+
return (0, GraphPinningMetadata_js_1.isPinnable)(this.getPinningMetadata(node));
|
|
12
|
+
}
|
|
13
|
+
/** Returns whether the engine should attempt to use a pinned value for the node. */
|
|
14
|
+
shouldUsePinnedValue(node) {
|
|
15
|
+
const metadata = this.getPinningMetadata(node);
|
|
16
|
+
return metadata.enabled === true && metadata.strategy !== "disabled";
|
|
17
|
+
}
|
|
18
|
+
/** Returns whether automatic pinning should occur after execution. */
|
|
19
|
+
shouldAutoPin(node) {
|
|
20
|
+
const metadata = this.getPinningMetadata(node);
|
|
21
|
+
return metadata.enabled === true && metadata.strategy === "automatic";
|
|
22
|
+
}
|
|
23
|
+
/** Extracts pinning metadata from a plan node. */
|
|
24
|
+
getPinningMetadata(node) {
|
|
25
|
+
const raw = node.definition?.graph?.metadata?.pinnable ??
|
|
26
|
+
node.metadata?.pinnable;
|
|
27
|
+
return raw
|
|
28
|
+
? { ...GraphPinningMetadata_js_1.DEFAULT_PINNING_METADATA, ...raw }
|
|
29
|
+
: { ...GraphPinningMetadata_js_1.DEFAULT_PINNING_METADATA, enabled: false };
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
exports.GraphPinningPolicy = GraphPinningPolicy;
|
|
33
|
+
//# sourceMappingURL=GraphPinningPolicy.js.map
|
|
34
|
+
//# sourceMappingURL=GraphPinningPolicy.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graph/pinning/GraphPinningPolicy.cjs","sourceRoot":"","sources":["graph/pinning/GraphPinningPolicy.js"],"names":[],"mappings":";;;AAAA,uEAAiF;AACjF;;GAEG;AACH,MAAa,kBAAkB;IAC3B,wDAAwD;IACxD,MAAM,CAAC,IAAI;QACP,OAAO,IAAA,oCAAU,EAAC,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC,CAAC;IACrD,CAAC;IACD,oFAAoF;IACpF,oBAAoB,CAAC,IAAI;QACrB,MAAM,QAAQ,GAAG,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;QAC/C,OAAO,QAAQ,CAAC,OAAO,KAAK,IAAI,IAAI,QAAQ,CAAC,QAAQ,KAAK,UAAU,CAAC;IACzE,CAAC;IACD,sEAAsE;IACtE,aAAa,CAAC,IAAI;QACd,MAAM,QAAQ,GAAG,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;QAC/C,OAAO,QAAQ,CAAC,OAAO,KAAK,IAAI,IAAI,QAAQ,CAAC,QAAQ,KAAK,WAAW,CAAC;IAC1E,CAAC;IACD,kDAAkD;IAClD,kBAAkB,CAAC,IAAI;QACnB,MAAM,GAAG,GAAG,IAAI,CAAC,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ;YAClD,IAAI,CAAC,QAAQ,EAAE,QAAQ,CAAC;QAC5B,OAAO,GAAG;YACN,CAAC,CAAC,EAAE,GAAG,kDAAwB,EAAE,GAAG,GAAG,EAAE;YACzC,CAAC,CAAC,EAAE,GAAG,kDAAwB,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IAC1D,CAAC;CACJ;AAvBD,gDAuBC;AACD,8CAA8C"}
|