vellum-ai 1.8.6__py3-none-any.whl → 1.9.0__py3-none-any.whl
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.
- vellum/client/core/client_wrapper.py +2 -2
- vellum/client/types/integration_name.py +1 -0
- vellum/workflows/inputs/dataset_row.py +9 -7
- vellum/workflows/nodes/displayable/final_output_node/node.py +4 -0
- vellum/workflows/nodes/displayable/final_output_node/tests/test_node.py +28 -0
- vellum/workflows/nodes/displayable/set_state_node/__init__.py +5 -0
- vellum/workflows/nodes/displayable/set_state_node/node.py +71 -0
- vellum/workflows/nodes/displayable/set_state_node/tests/__init__.py +0 -0
- vellum/workflows/nodes/displayable/set_state_node/tests/test_node.py +212 -0
- vellum/workflows/sandbox.py +13 -3
- vellum/workflows/tests/test_dataset_row.py +20 -0
- vellum/workflows/tests/test_sandbox.py +40 -0
- vellum/workflows/tests/triggers/{test_vellum_integration_trigger.py → test_integration_trigger.py} +22 -22
- vellum/workflows/triggers/__init__.py +1 -2
- vellum/workflows/triggers/base.py +10 -0
- vellum/workflows/triggers/integration.py +168 -49
- vellum/workflows/triggers/tests/test_integration.py +49 -20
- vellum/workflows/workflows/base.py +44 -0
- {vellum_ai-1.8.6.dist-info → vellum_ai-1.9.0.dist-info}/METADATA +1 -1
- {vellum_ai-1.8.6.dist-info → vellum_ai-1.9.0.dist-info}/RECORD +28 -25
- vellum_ee/workflows/display/tests/workflow_serialization/{test_vellum_integration_trigger_serialization.py → test_integration_trigger_serialization.py} +8 -8
- vellum_ee/workflows/display/workflows/base_workflow_display.py +5 -5
- vellum_ee/workflows/server/virtual_file_loader.py +36 -8
- vellum_ee/workflows/tests/test_server.py +81 -2
- vellum_ee/workflows/tests/test_virtual_files.py +3 -6
- vellum/workflows/triggers/vellum_integration.py +0 -189
- {vellum_ai-1.8.6.dist-info → vellum_ai-1.9.0.dist-info}/LICENSE +0 -0
- {vellum_ai-1.8.6.dist-info → vellum_ai-1.9.0.dist-info}/WHEEL +0 -0
- {vellum_ai-1.8.6.dist-info → vellum_ai-1.9.0.dist-info}/entry_points.txt +0 -0
|
@@ -200,6 +200,16 @@ class BaseTrigger(ABC, metaclass=BaseTriggerMeta):
|
|
|
200
200
|
|
|
201
201
|
__id__: UUID
|
|
202
202
|
|
|
203
|
+
def __init__(self, **kwargs: Any):
|
|
204
|
+
"""
|
|
205
|
+
Initialize trigger with event data.
|
|
206
|
+
|
|
207
|
+
Args:
|
|
208
|
+
**kwargs: Arbitrary keyword arguments passed during trigger instantiation.
|
|
209
|
+
Subclasses may use these to populate trigger attributes.
|
|
210
|
+
"""
|
|
211
|
+
self._event_data = kwargs
|
|
212
|
+
|
|
203
213
|
@classmethod
|
|
204
214
|
def attribute_references(cls) -> Dict[str, "TriggerAttributeReference[Any]"]:
|
|
205
215
|
"""Return class-level trigger attribute descriptors keyed by attribute name."""
|
|
@@ -1,67 +1,186 @@
|
|
|
1
1
|
from abc import ABC
|
|
2
|
-
from typing import ClassVar,
|
|
2
|
+
from typing import Any, ClassVar, Dict
|
|
3
3
|
|
|
4
|
-
from vellum.workflows.
|
|
4
|
+
from vellum.workflows.constants import VellumIntegrationProviderType
|
|
5
|
+
from vellum.workflows.references.trigger import TriggerAttributeReference
|
|
6
|
+
from vellum.workflows.triggers.base import BaseTrigger, BaseTriggerMeta
|
|
5
7
|
|
|
6
8
|
|
|
7
|
-
class
|
|
9
|
+
class IntegrationTriggerMeta(BaseTriggerMeta):
|
|
8
10
|
"""
|
|
9
|
-
|
|
11
|
+
Custom metaclass for IntegrationTrigger.
|
|
10
12
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
This metaclass extends BaseTriggerMeta to automatically convert type annotations
|
|
14
|
+
into TriggerAttributeReference objects during class creation. This enables trigger
|
|
15
|
+
attributes to be referenced in workflow graphs while maintaining type safety.
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
def __new__(mcs, name: str, bases: tuple, namespace: dict, **kwargs: Any) -> "IntegrationTriggerMeta":
|
|
19
|
+
"""Create a new trigger class and set up attribute references."""
|
|
20
|
+
cls = super().__new__(mcs, name, bases, namespace, **kwargs)
|
|
21
|
+
|
|
22
|
+
# Process __annotations__ to create TriggerAttributeReference for each attribute
|
|
23
|
+
# Only process if class has Config and annotations
|
|
24
|
+
has_config = hasattr(cls, "Config") and "Config" in namespace
|
|
25
|
+
if has_config and hasattr(cls, "__annotations__"):
|
|
26
|
+
# Create TriggerAttributeReference for each annotated attribute
|
|
27
|
+
for attr_name, attr_type in cls.__annotations__.items():
|
|
28
|
+
# Skip special attributes and Config
|
|
29
|
+
if attr_name.startswith("_") or attr_name == "Config":
|
|
30
|
+
continue
|
|
31
|
+
|
|
32
|
+
# Create reference with proper type
|
|
33
|
+
reference = TriggerAttributeReference(
|
|
34
|
+
name=attr_name, types=(attr_type,), instance=None, trigger_class=cls
|
|
35
|
+
)
|
|
36
|
+
# Set as class attribute so it's directly accessible
|
|
37
|
+
setattr(cls, attr_name, reference)
|
|
38
|
+
|
|
39
|
+
return cls
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
class IntegrationTrigger(BaseTrigger, ABC, metaclass=IntegrationTriggerMeta):
|
|
43
|
+
"""
|
|
44
|
+
Base class for Vellum-managed integration triggers.
|
|
45
|
+
|
|
46
|
+
Subclasses define two types of attributes:
|
|
47
|
+
1. **Config class**: Specifies how the trigger is configured (provider, integration_name, slug)
|
|
48
|
+
- These are configuration details users shouldn't need to interact with directly
|
|
49
|
+
2. **Top-level type annotations**: Define the webhook event payload structure (message, user, channel, etc.)
|
|
50
|
+
- These become TriggerAttributeReference that can be referenced in workflow nodes
|
|
15
51
|
|
|
16
52
|
Examples:
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
53
|
+
Create a Slack trigger:
|
|
54
|
+
>>> class SlackNewMessageTrigger(IntegrationTrigger):
|
|
55
|
+
... # Event attributes (webhook payload structure)
|
|
56
|
+
... message: str
|
|
57
|
+
... user: str
|
|
58
|
+
... channel: str
|
|
59
|
+
... timestamp: float
|
|
60
|
+
...
|
|
61
|
+
... # Configuration (how trigger is set up)
|
|
62
|
+
... class Config(IntegrationTrigger.Config):
|
|
63
|
+
... provider = VellumIntegrationProviderType.COMPOSIO
|
|
64
|
+
... integration_name = "SLACK"
|
|
65
|
+
... slug = "slack_new_message"
|
|
66
|
+
|
|
67
|
+
Use in workflow graph:
|
|
68
|
+
>>> class MyWorkflow(BaseWorkflow):
|
|
69
|
+
... graph = SlackNewMessageTrigger >> ProcessMessageNode
|
|
70
|
+
|
|
71
|
+
Reference trigger attributes in nodes:
|
|
72
|
+
>>> class ProcessNode(BaseNode):
|
|
73
|
+
... class Outputs(BaseNode.Outputs):
|
|
74
|
+
... text = SlackNewMessageTrigger.message
|
|
75
|
+
... channel = SlackNewMessageTrigger.channel
|
|
76
|
+
|
|
77
|
+
Instantiate for testing:
|
|
78
|
+
>>> trigger = SlackNewMessageTrigger(
|
|
79
|
+
... message="Hello world",
|
|
80
|
+
... channel="C123456",
|
|
81
|
+
... user="U123",
|
|
82
|
+
... timestamp=1234567890.0,
|
|
83
|
+
... )
|
|
84
|
+
>>> trigger.message
|
|
85
|
+
'Hello world'
|
|
37
86
|
"""
|
|
38
87
|
|
|
39
|
-
|
|
40
|
-
|
|
88
|
+
class Config:
|
|
89
|
+
"""
|
|
90
|
+
Configuration for IntegrationTrigger subclasses.
|
|
41
91
|
|
|
42
|
-
|
|
92
|
+
Defines how the trigger connects to the integration provider. These settings
|
|
93
|
+
specify which integration and which specific trigger type to use.
|
|
43
94
|
"""
|
|
44
|
-
Initialize trigger with event data from external system.
|
|
45
95
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
96
|
+
provider: ClassVar[VellumIntegrationProviderType]
|
|
97
|
+
integration_name: ClassVar[str]
|
|
98
|
+
slug: ClassVar[str]
|
|
49
99
|
|
|
50
|
-
|
|
51
|
-
|
|
100
|
+
def __init_subclass__(cls, **kwargs: Any) -> None:
|
|
101
|
+
"""Validate that subclasses define required Config class with all required fields."""
|
|
102
|
+
super().__init_subclass__(**kwargs)
|
|
103
|
+
|
|
104
|
+
# Skip validation for the base class itself
|
|
105
|
+
if cls.__name__ == "IntegrationTrigger":
|
|
106
|
+
return
|
|
107
|
+
|
|
108
|
+
# Require Config class with required fields
|
|
109
|
+
if not hasattr(cls, "Config") or cls.Config is IntegrationTrigger.Config:
|
|
110
|
+
raise TypeError(
|
|
111
|
+
f"{cls.__name__} must define a nested Config class. "
|
|
112
|
+
f"Example:\n"
|
|
113
|
+
f" class {cls.__name__}(IntegrationTrigger):\n"
|
|
114
|
+
f" message: str\n"
|
|
115
|
+
f" class Config(IntegrationTrigger.Config):\n"
|
|
116
|
+
f" provider = VellumIntegrationProviderType.COMPOSIO\n"
|
|
117
|
+
f" integration_name = 'SLACK'\n"
|
|
118
|
+
f" slug = 'slack_new_message'"
|
|
119
|
+
)
|
|
120
|
+
|
|
121
|
+
# Validate Config class has required fields
|
|
122
|
+
config_cls = cls.Config
|
|
123
|
+
required_fields = ["provider", "integration_name", "slug"]
|
|
124
|
+
for field in required_fields:
|
|
125
|
+
if not hasattr(config_cls, field):
|
|
126
|
+
raise TypeError(
|
|
127
|
+
f"{cls.__name__}.Config must define '{field}'. " f"Required fields: {', '.join(required_fields)}"
|
|
128
|
+
)
|
|
129
|
+
|
|
130
|
+
def __init__(self, **kwargs: Any):
|
|
131
|
+
"""
|
|
132
|
+
Initialize trigger with event data from the integration.
|
|
133
|
+
|
|
134
|
+
The trigger dynamically populates its attributes based on the kwargs
|
|
135
|
+
dictionary keys. Any key in kwargs becomes an accessible attribute.
|
|
52
136
|
|
|
53
137
|
Examples:
|
|
54
|
-
>>> class
|
|
55
|
-
...
|
|
138
|
+
>>> class SlackTrigger(IntegrationTrigger):
|
|
139
|
+
... message: str
|
|
140
|
+
... channel: str
|
|
141
|
+
... user: str
|
|
56
142
|
...
|
|
57
|
-
...
|
|
58
|
-
...
|
|
59
|
-
...
|
|
60
|
-
|
|
61
|
-
>>> trigger =
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
143
|
+
... class Config(IntegrationTrigger.Config):
|
|
144
|
+
... provider = VellumIntegrationProviderType.COMPOSIO
|
|
145
|
+
... integration_name = "SLACK"
|
|
146
|
+
... slug = "slack_new_message"
|
|
147
|
+
>>> trigger = SlackTrigger(
|
|
148
|
+
... message="Hello",
|
|
149
|
+
... channel="C123",
|
|
150
|
+
... user="U456"
|
|
151
|
+
... )
|
|
152
|
+
>>> trigger.message
|
|
153
|
+
'Hello'
|
|
154
|
+
>>> trigger.channel
|
|
155
|
+
'C123'
|
|
66
156
|
"""
|
|
67
|
-
|
|
157
|
+
super().__init__(**kwargs)
|
|
158
|
+
|
|
159
|
+
# Dynamically populate instance attributes from kwargs.
|
|
160
|
+
# This allows any key in kwargs to become an accessible attribute:
|
|
161
|
+
# kwargs={"message": "Hi"} → trigger.message == "Hi"
|
|
162
|
+
for key, value in kwargs.items():
|
|
163
|
+
setattr(self, key, value)
|
|
164
|
+
|
|
165
|
+
def to_trigger_attribute_values(self) -> Dict["TriggerAttributeReference[Any]", Any]:
|
|
166
|
+
"""
|
|
167
|
+
Materialize attribute descriptor/value pairs for this trigger instance.
|
|
168
|
+
|
|
169
|
+
For IntegrationTrigger, this includes all dynamic attributes from event_data.
|
|
170
|
+
"""
|
|
171
|
+
attribute_values: Dict["TriggerAttributeReference[Any]", Any] = {}
|
|
172
|
+
|
|
173
|
+
# Unlike the base class which iterates over type(self) (predefined annotations),
|
|
174
|
+
# we iterate over event_data keys since our attributes are discovered dynamically
|
|
175
|
+
# from the actual event data received during workflow execution.
|
|
176
|
+
# The base class approach: for reference in type(self)
|
|
177
|
+
# Our approach: for attr_name in self._event_data.keys()
|
|
178
|
+
for attr_name in self._event_data.keys():
|
|
179
|
+
# Get the class-level reference for this attribute (created by __new__ from annotations)
|
|
180
|
+
# Unknown keys can appear in webhook payloads, so gracefully skip them if the
|
|
181
|
+
# trigger class doesn't expose a corresponding reference.
|
|
182
|
+
reference = getattr(type(self), attr_name, None)
|
|
183
|
+
if isinstance(reference, TriggerAttributeReference):
|
|
184
|
+
attribute_values[reference] = getattr(self, attr_name)
|
|
185
|
+
|
|
186
|
+
return attribute_values
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
"""Tests for IntegrationTrigger base class."""
|
|
2
2
|
|
|
3
|
+
from typing import Any
|
|
4
|
+
|
|
5
|
+
from vellum.workflows.constants import VellumIntegrationProviderType
|
|
3
6
|
from vellum.workflows.nodes.bases.base import BaseNode
|
|
4
7
|
from vellum.workflows.references.trigger import TriggerAttributeReference
|
|
5
8
|
from vellum.workflows.state.base import BaseState
|
|
@@ -9,7 +12,7 @@ from vellum.workflows.triggers.integration import IntegrationTrigger
|
|
|
9
12
|
def test_integration_trigger__can_be_instantiated_as_base():
|
|
10
13
|
"""IntegrationTrigger can be instantiated as a base class."""
|
|
11
14
|
# WHEN we instantiate IntegrationTrigger directly
|
|
12
|
-
trigger = IntegrationTrigger(
|
|
15
|
+
trigger = IntegrationTrigger(test="data")
|
|
13
16
|
|
|
14
17
|
# THEN it creates an instance with event data stored
|
|
15
18
|
assert trigger._event_data == {"test": "data"}
|
|
@@ -20,7 +23,10 @@ def test_integration_trigger__can_be_instantiated():
|
|
|
20
23
|
|
|
21
24
|
# GIVEN IntegrationTrigger with concrete implementation
|
|
22
25
|
class TestTrigger(IntegrationTrigger):
|
|
23
|
-
|
|
26
|
+
class Config(IntegrationTrigger.Config):
|
|
27
|
+
provider = VellumIntegrationProviderType.COMPOSIO
|
|
28
|
+
integration_name = "test"
|
|
29
|
+
slug = "test"
|
|
24
30
|
|
|
25
31
|
# THEN it can be instantiated (even though base is ABC, concrete subclasses work)
|
|
26
32
|
assert TestTrigger is not None
|
|
@@ -33,12 +39,17 @@ def test_integration_trigger__can_be_subclassed():
|
|
|
33
39
|
class TestTrigger(IntegrationTrigger):
|
|
34
40
|
data: str
|
|
35
41
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
42
|
+
class Config(IntegrationTrigger.Config):
|
|
43
|
+
provider = VellumIntegrationProviderType.COMPOSIO
|
|
44
|
+
integration_name = "test"
|
|
45
|
+
slug = "test"
|
|
46
|
+
|
|
47
|
+
def __init__(self, **kwargs: Any):
|
|
48
|
+
super().__init__(**kwargs)
|
|
49
|
+
self.data = kwargs.get("data", "")
|
|
39
50
|
|
|
40
51
|
# WHEN we create a trigger instance
|
|
41
|
-
result = TestTrigger(
|
|
52
|
+
result = TestTrigger(data="test")
|
|
42
53
|
|
|
43
54
|
# THEN it returns the expected trigger instance with populated attributes
|
|
44
55
|
assert result.data == "test"
|
|
@@ -50,9 +61,14 @@ def test_integration_trigger__attribute_reference():
|
|
|
50
61
|
class TestTrigger(IntegrationTrigger):
|
|
51
62
|
value: str
|
|
52
63
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
64
|
+
class Config(IntegrationTrigger.Config):
|
|
65
|
+
provider = VellumIntegrationProviderType.COMPOSIO
|
|
66
|
+
integration_name = "test"
|
|
67
|
+
slug = "test"
|
|
68
|
+
|
|
69
|
+
def __init__(self, **kwargs: Any):
|
|
70
|
+
super().__init__(**kwargs)
|
|
71
|
+
self.value = kwargs.get("value", "")
|
|
56
72
|
|
|
57
73
|
reference = TestTrigger.value
|
|
58
74
|
assert isinstance(reference, TriggerAttributeReference)
|
|
@@ -61,7 +77,7 @@ def test_integration_trigger__attribute_reference():
|
|
|
61
77
|
assert reference == TestTrigger.attribute_references()["value"]
|
|
62
78
|
|
|
63
79
|
state = BaseState()
|
|
64
|
-
trigger = TestTrigger(
|
|
80
|
+
trigger = TestTrigger(value="data")
|
|
65
81
|
trigger.bind_to_state(state)
|
|
66
82
|
assert reference.resolve(state) == "data"
|
|
67
83
|
|
|
@@ -73,9 +89,14 @@ def test_integration_trigger__graph_syntax():
|
|
|
73
89
|
class TestTrigger(IntegrationTrigger):
|
|
74
90
|
value: str
|
|
75
91
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
92
|
+
class Config(IntegrationTrigger.Config):
|
|
93
|
+
provider = VellumIntegrationProviderType.COMPOSIO
|
|
94
|
+
integration_name = "test"
|
|
95
|
+
slug = "test"
|
|
96
|
+
|
|
97
|
+
def __init__(self, **kwargs: Any):
|
|
98
|
+
super().__init__(**kwargs)
|
|
99
|
+
self.value = kwargs.get("value", "")
|
|
79
100
|
|
|
80
101
|
class TestNode(BaseNode):
|
|
81
102
|
pass
|
|
@@ -97,9 +118,14 @@ def test_integration_trigger__multiple_entrypoints():
|
|
|
97
118
|
class TestTrigger(IntegrationTrigger):
|
|
98
119
|
msg: str
|
|
99
120
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
121
|
+
class Config(IntegrationTrigger.Config):
|
|
122
|
+
provider = VellumIntegrationProviderType.COMPOSIO
|
|
123
|
+
integration_name = "test"
|
|
124
|
+
slug = "test"
|
|
125
|
+
|
|
126
|
+
def __init__(self, **kwargs: Any):
|
|
127
|
+
super().__init__(**kwargs)
|
|
128
|
+
self.msg = kwargs.get("msg", "")
|
|
103
129
|
|
|
104
130
|
class NodeA(BaseNode):
|
|
105
131
|
pass
|
|
@@ -118,9 +144,12 @@ def test_integration_trigger__multiple_entrypoints():
|
|
|
118
144
|
|
|
119
145
|
|
|
120
146
|
def test_integration_trigger__config_attribute():
|
|
121
|
-
"""IntegrationTrigger
|
|
147
|
+
"""IntegrationTrigger requires Config class with provider, integration_name, and slug."""
|
|
122
148
|
|
|
123
149
|
# GIVEN IntegrationTrigger
|
|
124
|
-
# THEN it has a
|
|
125
|
-
assert hasattr(IntegrationTrigger, "
|
|
126
|
-
assert IntegrationTrigger.
|
|
150
|
+
# THEN it has a Config class with type annotations for required fields
|
|
151
|
+
assert hasattr(IntegrationTrigger, "Config")
|
|
152
|
+
assert hasattr(IntegrationTrigger.Config, "__annotations__")
|
|
153
|
+
assert "provider" in IntegrationTrigger.Config.__annotations__
|
|
154
|
+
assert "integration_name" in IntegrationTrigger.Config.__annotations__
|
|
155
|
+
assert "slug" in IntegrationTrigger.Config.__annotations__
|
|
@@ -714,6 +714,50 @@ class BaseWorkflow(Generic[InputsType, StateType], BaseExecutable, metaclass=_Ba
|
|
|
714
714
|
|
|
715
715
|
return state_class(**state)
|
|
716
716
|
|
|
717
|
+
@classmethod
|
|
718
|
+
def deserialize_trigger(cls, trigger_id: Optional[UUID], inputs: dict) -> Union[InputsType, BaseTrigger]:
|
|
719
|
+
"""
|
|
720
|
+
Deserialize a trigger from a trigger_id and inputs dict.
|
|
721
|
+
|
|
722
|
+
If trigger_id is None, returns an instance of the workflow's Inputs class.
|
|
723
|
+
Otherwise, finds a trigger class that matches the trigger_id and creates an instance of that.
|
|
724
|
+
|
|
725
|
+
Parameters
|
|
726
|
+
----------
|
|
727
|
+
trigger_id: Optional[UUID]
|
|
728
|
+
The UUID of the trigger class to instantiate. If None, returns workflow Inputs.
|
|
729
|
+
|
|
730
|
+
inputs: dict
|
|
731
|
+
The inputs to pass to the trigger or Inputs constructor.
|
|
732
|
+
|
|
733
|
+
Returns
|
|
734
|
+
-------
|
|
735
|
+
Union[InputsType, BaseTrigger]
|
|
736
|
+
Either an instance of the workflow's Inputs class (if trigger_id is None)
|
|
737
|
+
or an instance of the matching trigger class.
|
|
738
|
+
|
|
739
|
+
Raises
|
|
740
|
+
------
|
|
741
|
+
WorkflowInitializationException
|
|
742
|
+
If trigger_id is provided but no matching trigger class is found in the workflow.
|
|
743
|
+
"""
|
|
744
|
+
if trigger_id is None:
|
|
745
|
+
inputs_class = cls.get_inputs_class()
|
|
746
|
+
return inputs_class(**inputs)
|
|
747
|
+
|
|
748
|
+
trigger_classes = []
|
|
749
|
+
for subgraph in cls.get_subgraphs():
|
|
750
|
+
for trigger_class in subgraph.triggers:
|
|
751
|
+
if trigger_class.__id__ == trigger_id:
|
|
752
|
+
return trigger_class(**inputs)
|
|
753
|
+
|
|
754
|
+
trigger_classes.append(trigger_class)
|
|
755
|
+
|
|
756
|
+
raise WorkflowInitializationException(
|
|
757
|
+
message=f"No trigger class found with id {trigger_id} in workflow {cls.__name__}. "
|
|
758
|
+
f"Available trigger classes: {[trigger_class.__name__ for trigger_class in trigger_classes]}"
|
|
759
|
+
)
|
|
760
|
+
|
|
717
761
|
@staticmethod
|
|
718
762
|
def load_from_module(module_path: str) -> Type["BaseWorkflow"]:
|
|
719
763
|
workflow_path = f"{module_path}.workflow"
|
|
@@ -110,10 +110,10 @@ vellum_ee/workflows/display/tests/workflow_serialization/test_basic_tool_calling
|
|
|
110
110
|
vellum_ee/workflows/display/tests/workflow_serialization/test_basic_try_node_serialization.py,sha256=pLCyMScV88DTBXRH7jXaXOEA1GBq8NIipCUFwIAWnwI,2771
|
|
111
111
|
vellum_ee/workflows/display/tests/workflow_serialization/test_complex_terminal_node_serialization.py,sha256=exT7U-axwtYgFylagScflSQLJEND51qIAx2UATju6JM,6023
|
|
112
112
|
vellum_ee/workflows/display/tests/workflow_serialization/test_final_output_node_map_reference_serialization.py,sha256=vl3pxUJlrYRA8zzFJ-gRm7fe-5fviLNSIsUC7imnMqk,3502
|
|
113
|
+
vellum_ee/workflows/display/tests/workflow_serialization/test_integration_trigger_serialization.py,sha256=BmJJi1FGf1t6illUhN3YVnGmS-rzDo8omadRKFA4aXQ,8983
|
|
113
114
|
vellum_ee/workflows/display/tests/workflow_serialization/test_list_vellum_document_serialization.py,sha256=ZRcDhOSVKFHvt_rBkNSL7j3VLeWKQbH-KRoJWrtWD2s,2193
|
|
114
115
|
vellum_ee/workflows/display/tests/workflow_serialization/test_manual_trigger_serialization.py,sha256=QjyxK94uPWaBmCmCWxQwuW0OopR06mVcsIjmsnr8UwE,3743
|
|
115
116
|
vellum_ee/workflows/display/tests/workflow_serialization/test_terminal_node_any_serialization.py,sha256=4WAmSEJZlDBLPhsD1f4GwY9ahB9F6qJKGnL6j7ZYlzQ,1740
|
|
116
|
-
vellum_ee/workflows/display/tests/workflow_serialization/test_vellum_integration_trigger_serialization.py,sha256=eG7_D76ErR7IrCpWRG4gLKoKGV7VfBL1buezNJ_wkZc,9038
|
|
117
117
|
vellum_ee/workflows/display/tests/workflow_serialization/test_web_search_node_serialization.py,sha256=vbDFBrWUPeeW7cxjNA6SXrsHlYcbOAhlQ4C45Vdnr1c,3428
|
|
118
118
|
vellum_ee/workflows/display/tests/workflow_serialization/test_workflow_input_parameterization_error.py,sha256=vAdmn3YTBDpo55znbydQxsgg9ASqHcvsUPwiBR_7wfo,1461
|
|
119
119
|
vellum_ee/workflows/display/types.py,sha256=LgRIZeEtV7bQe-nvrC4A0T6vMooSWT1rFtw-uTn45BQ,3752
|
|
@@ -130,11 +130,11 @@ vellum_ee/workflows/display/utils/tests/test_expressions.py,sha256=s8aHAwuuJS1_W
|
|
|
130
130
|
vellum_ee/workflows/display/utils/vellum.py,sha256=Bt7kdLdXoBsHn5dVEY2uKcF542VL09jwu8J_30rl2vk,6413
|
|
131
131
|
vellum_ee/workflows/display/vellum.py,sha256=J2mdJZ1sdLW535DDUkq_Vm8Z572vhuxHxVZF9deKSdk,391
|
|
132
132
|
vellum_ee/workflows/display/workflows/__init__.py,sha256=JTB9ObEV3l4gGGdtfBHwVJtTTKC22uj-a-XjTVwXCyA,148
|
|
133
|
-
vellum_ee/workflows/display/workflows/base_workflow_display.py,sha256=
|
|
133
|
+
vellum_ee/workflows/display/workflows/base_workflow_display.py,sha256=J3iOlEBMGkPxRtWpOjNiggwxptId8sAAKmO-up2c9Mw,52318
|
|
134
134
|
vellum_ee/workflows/display/workflows/get_vellum_workflow_display_class.py,sha256=gxz76AeCqgAZ9D2lZeTiZzxY9eMgn3qOSfVgiqYcOh8,2028
|
|
135
135
|
vellum_ee/workflows/display/workflows/tests/test_workflow_display.py,sha256=lg-c_3P3ldtqWq2VFsk_2Mkn3pVdXWuT59QpH7QwXVs,39764
|
|
136
136
|
vellum_ee/workflows/server/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
137
|
-
vellum_ee/workflows/server/virtual_file_loader.py,sha256=
|
|
137
|
+
vellum_ee/workflows/server/virtual_file_loader.py,sha256=oc5H5jlK2AqgrWAR716yWnVQRqJnbQHOPDQxAA4HMTc,6217
|
|
138
138
|
vellum_ee/workflows/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
139
139
|
vellum_ee/workflows/tests/local_files/__init__.py,sha256=UyP6kKkRqr9cTKHQF4MVLdLk5MM9GGcLuqxXsQGm22Y,51
|
|
140
140
|
vellum_ee/workflows/tests/local_files/base_class.py,sha256=UuiC7J68MVr6A4949QYiBpXOLdsvFG_Cw1muEPiHT6I,298
|
|
@@ -157,14 +157,14 @@ vellum_ee/workflows/tests/local_workflow/workflow.py,sha256=A4qOzOPNwePYxWbcAgIP
|
|
|
157
157
|
vellum_ee/workflows/tests/test_display_meta.py,sha256=PkXJVnMZs9GNooDkd59n4YTBAX3XGPQWeSSVbhehVFM,5112
|
|
158
158
|
vellum_ee/workflows/tests/test_registry.py,sha256=B8xRIuEyLWfSqrYoPldNQXhKPfe50PllvtAZoI8-uPs,6066
|
|
159
159
|
vellum_ee/workflows/tests/test_serialize_module.py,sha256=thzGsNzYCRXXdaC5yk1ZjtXrIO6uPdSnzdapKLCOsC8,6241
|
|
160
|
-
vellum_ee/workflows/tests/test_server.py,sha256=
|
|
161
|
-
vellum_ee/workflows/tests/test_virtual_files.py,sha256=
|
|
160
|
+
vellum_ee/workflows/tests/test_server.py,sha256=6lXKu2HoX_UqYctelyAjycc5ZhD47F9PtsGV-rwwBq0,31251
|
|
161
|
+
vellum_ee/workflows/tests/test_virtual_files.py,sha256=zErjlpAIv-gUd5C-NXsiu3DHrbxEWzvb3bNJW3LcGIA,4250
|
|
162
162
|
vellum/__init__.py,sha256=i3_LxyUG6tOzzBIGg9KVV9SEWyZSQecpFqXonkVya5g,50006
|
|
163
163
|
vellum/client/README.md,sha256=flqu57ubZNTfpq60CdLtJC9gp4WEkyjb_n_eZ4OYf9w,6497
|
|
164
164
|
vellum/client/__init__.py,sha256=-nugZzQKoUJsStXe6PnOD__8kbDLKKokceDgpGxQ_q0,74576
|
|
165
165
|
vellum/client/core/__init__.py,sha256=lTcqUPXcx4112yLDd70RAPeqq6tu3eFMe1pKOqkW9JQ,1562
|
|
166
166
|
vellum/client/core/api_error.py,sha256=44vPoTyWN59gonCIZMdzw7M1uspygiLnr3GNFOoVL2Q,614
|
|
167
|
-
vellum/client/core/client_wrapper.py,sha256=
|
|
167
|
+
vellum/client/core/client_wrapper.py,sha256=tCmMeMuphx-X1KzY8qTAmP7LOyqJR-JLSYZFBcsuOWU,2840
|
|
168
168
|
vellum/client/core/datetime_utils.py,sha256=nBys2IsYrhPdszxGKCNRPSOCwa-5DWOHG95FB8G9PKo,1047
|
|
169
169
|
vellum/client/core/file.py,sha256=d4NNbX8XvXP32z8KpK2Xovv33nFfruIrpz0QWxlgpZk,2663
|
|
170
170
|
vellum/client/core/force_multipart.py,sha256=awxh5MtcRYe74ehY8U76jzv6fYM_w_D3Rur7KQQzSDk,429
|
|
@@ -499,7 +499,7 @@ vellum/client/types/integration.py,sha256=WqfHEskiMzNxuy5mmcXTARPQ4F3r99Jf-g-wVl
|
|
|
499
499
|
vellum/client/types/integration_auth_config_integration.py,sha256=W3DrzVPwLrqm0wCYVF-sHyQPoKNxoliFgFJWEwW_Yqc,710
|
|
500
500
|
vellum/client/types/integration_auth_config_integration_credential.py,sha256=lUNuJ1GyFps3M85Mff1C-SAeEacCMkJdmayFfYrTFXA,547
|
|
501
501
|
vellum/client/types/integration_credential_access_type.py,sha256=sWkuDjW3aD7ApZ1xQ7Bu8g5kCIwqUqzm1TDliUQWeRI,178
|
|
502
|
-
vellum/client/types/integration_name.py,sha256=
|
|
502
|
+
vellum/client/types/integration_name.py,sha256=XLczMR8e4nOICkbVSHkh0THKrTIVCtnx_YcsqAHFZ7Q,1247
|
|
503
503
|
vellum/client/types/integration_provider.py,sha256=lIh3yPyPEzmSAu8L4Gsd-iDkmDSNobo0_TB75zMtIXk,129
|
|
504
504
|
vellum/client/types/integration_read.py,sha256=sUNCS01TIlHPJHEH3ZheIbPi-CplbFQ5XAV1QtOO1Gg,1035
|
|
505
505
|
vellum/client/types/integration_trigger_context.py,sha256=PqzeyLBq8EK8GrEf5k-b-xQNDG0nYbyDI506UyTwA2I,1669
|
|
@@ -1900,7 +1900,7 @@ vellum/workflows/graph/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NM
|
|
|
1900
1900
|
vellum/workflows/graph/tests/test_graph.py,sha256=OLGkEQh-B1CucwSf4nOP79RFXB4R2isHo3LFlr-24yA,20132
|
|
1901
1901
|
vellum/workflows/inputs/__init__.py,sha256=02pj0IbJkN1AxTreswK39cNi45tA8GWcAAdRJve4cuM,116
|
|
1902
1902
|
vellum/workflows/inputs/base.py,sha256=79Dw3jiSnCVFeySg6rMFPIqPfErmGKY0XPhpW0dSY-E,5454
|
|
1903
|
-
vellum/workflows/inputs/dataset_row.py,sha256=
|
|
1903
|
+
vellum/workflows/inputs/dataset_row.py,sha256=6T9RftdvNK0hnxbvmUftYg1OVmeU8eLuBIPZj2g0yQ8,1213
|
|
1904
1904
|
vellum/workflows/inputs/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
1905
1905
|
vellum/workflows/inputs/tests/test_inputs.py,sha256=E6I2pEfGjCeQg0GAsjvKFEjO32bQ3H9VeRnLv3ry9O0,2828
|
|
1906
1906
|
vellum/workflows/integrations/__init__.py,sha256=KoA7tGX_UiImu6erJKJ5tmLFpNFEqblsWFGPoWNsS1U,220
|
|
@@ -1976,9 +1976,9 @@ vellum/workflows/nodes/displayable/conditional_node/__init__.py,sha256=AS_EIqFdU
|
|
|
1976
1976
|
vellum/workflows/nodes/displayable/conditional_node/node.py,sha256=2g32hWosE3zwVaK2UPFnVEer1Nbn04s3friF2rGztmE,1195
|
|
1977
1977
|
vellum/workflows/nodes/displayable/conftest.py,sha256=K2kLM2JGAfcrmmd92u8DXInUO5klFdggPWblg5RVcx4,5729
|
|
1978
1978
|
vellum/workflows/nodes/displayable/final_output_node/__init__.py,sha256=G7VXM4OWpubvSJtVkGmMNeqgb9GkM7qZT838eL18XU4,72
|
|
1979
|
-
vellum/workflows/nodes/displayable/final_output_node/node.py,sha256=
|
|
1979
|
+
vellum/workflows/nodes/displayable/final_output_node/node.py,sha256=ITFmtuffQj4A01Bpbb8ntKQyknswKF5rfyT5MjnFinA,5236
|
|
1980
1980
|
vellum/workflows/nodes/displayable/final_output_node/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
1981
|
-
vellum/workflows/nodes/displayable/final_output_node/tests/test_node.py,sha256=
|
|
1981
|
+
vellum/workflows/nodes/displayable/final_output_node/tests/test_node.py,sha256=pMfmoUtARDW68IbxhhVqtcqL2LSunJSjYKAaucQoLXA,4478
|
|
1982
1982
|
vellum/workflows/nodes/displayable/guardrail_node/__init__.py,sha256=Ab5eXmOoBhyV4dMWdzh32HLUmnPIBEK_zFCT38C4Fng,68
|
|
1983
1983
|
vellum/workflows/nodes/displayable/guardrail_node/node.py,sha256=axYUojar_kdB3gi4LG3g9euJ8VkOxNtiFxJNI46v-SQ,5869
|
|
1984
1984
|
vellum/workflows/nodes/displayable/guardrail_node/test_node.py,sha256=SAGv6hSFcBwQkudn1VxtaKNsXSXWWELl3eK05zM6tS0,5410
|
|
@@ -2000,6 +2000,10 @@ vellum/workflows/nodes/displayable/search_node/__init__.py,sha256=hpBpvbrDYf43DE
|
|
|
2000
2000
|
vellum/workflows/nodes/displayable/search_node/node.py,sha256=hbPsZhyXfq9dx0mfBKOyivluDmV2iXmDTT7loEyu9nI,2057
|
|
2001
2001
|
vellum/workflows/nodes/displayable/search_node/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2002
2002
|
vellum/workflows/nodes/displayable/search_node/tests/test_node.py,sha256=YXgIIAJHVQxrfyJ0gxeJC0fAJaic10_zbqvsS8hyZSc,9368
|
|
2003
|
+
vellum/workflows/nodes/displayable/set_state_node/__init__.py,sha256=9Qi3gXOg4koi3sADuDXMhA3_JTYBDx4Bd2hRhaoQ4XM,66
|
|
2004
|
+
vellum/workflows/nodes/displayable/set_state_node/node.py,sha256=PvIiJQdBmCuEO3dZ5azSIv3db7pArIci0VY2ZpWS240,2721
|
|
2005
|
+
vellum/workflows/nodes/displayable/set_state_node/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2006
|
+
vellum/workflows/nodes/displayable/set_state_node/tests/test_node.py,sha256=dhhYASzfR2xeAxcFTzgaEcirZ0WIzL461TYeXuIqYag,6543
|
|
2003
2007
|
vellum/workflows/nodes/displayable/subworkflow_deployment_node/__init__.py,sha256=9yYM6001YZeqI1VOk1QuEM_yrffk_EdsO7qaPzINKds,92
|
|
2004
2008
|
vellum/workflows/nodes/displayable/subworkflow_deployment_node/node.py,sha256=_4aJxlnSEQKUlL9DAXYdrv1ic0tC7IyvYV389HHGyvE,16281
|
|
2005
2009
|
vellum/workflows/nodes/displayable/subworkflow_deployment_node/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -2056,7 +2060,7 @@ vellum/workflows/resolvers/tests/test_resolver.py,sha256=PnUGzsulo1It_LjjhHsRNiI
|
|
|
2056
2060
|
vellum/workflows/resolvers/types.py,sha256=Hndhlk69g6EKLh_LYg5ILepW5U_h_BYNllfzhS9k8p4,237
|
|
2057
2061
|
vellum/workflows/runner/__init__.py,sha256=i1iG5sAhtpdsrlvwgH6B-m49JsINkiWyPWs8vyT-bqM,72
|
|
2058
2062
|
vellum/workflows/runner/runner.py,sha256=mMJzRT1iMsJ8YLYcbTsrKH8l2VDxqlC-sD8xY7pIoGY,54834
|
|
2059
|
-
vellum/workflows/sandbox.py,sha256=
|
|
2063
|
+
vellum/workflows/sandbox.py,sha256=W_jHJX0-Na1S_eCnwNsceEmlk7MiC-KOh7Hc2yHLWoA,3592
|
|
2060
2064
|
vellum/workflows/state/__init__.py,sha256=yUUdR-_Vl7UiixNDYQZ-GEM_kJI9dnOia75TtuNEsnE,60
|
|
2061
2065
|
vellum/workflows/state/base.py,sha256=8Zr7UIM_eC0O2N6w_1gYqyrjgJ9D9z-VqLFnBETEF7Q,26753
|
|
2062
2066
|
vellum/workflows/state/context.py,sha256=L2Xqt8jL1RJCCuSVyKakuZQdgb_YBVKSW6n_3nSAcLE,10974
|
|
@@ -2066,18 +2070,17 @@ vellum/workflows/state/store.py,sha256=uVe-oN73KwGV6M6YLhwZMMUQhzTQomsVfVnb8V91g
|
|
|
2066
2070
|
vellum/workflows/state/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2067
2071
|
vellum/workflows/state/tests/test_state.py,sha256=zEVFIY2any41X2BA5Us_qqKpzH5HRqmyrUJ04GTO0pU,7484
|
|
2068
2072
|
vellum/workflows/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2069
|
-
vellum/workflows/tests/test_dataset_row.py,sha256=
|
|
2070
|
-
vellum/workflows/tests/test_sandbox.py,sha256=
|
|
2073
|
+
vellum/workflows/tests/test_dataset_row.py,sha256=eHJ52VEQ661QUBrBQxvrD75zHYv6KuaKVXpqggklPaw,4840
|
|
2074
|
+
vellum/workflows/tests/test_sandbox.py,sha256=flKIwW4BaOepm9WVLAsVil50SzJE6sJSxKS-XURRaqo,2998
|
|
2071
2075
|
vellum/workflows/tests/test_undefined.py,sha256=zMCVliCXVNLrlC6hEGyOWDnQADJ2g83yc5FIM33zuo8,353
|
|
2072
|
-
vellum/workflows/tests/triggers/
|
|
2073
|
-
vellum/workflows/triggers/__init__.py,sha256=
|
|
2074
|
-
vellum/workflows/triggers/base.py,sha256=
|
|
2075
|
-
vellum/workflows/triggers/integration.py,sha256=
|
|
2076
|
+
vellum/workflows/tests/triggers/test_integration_trigger.py,sha256=3PEJs4RY4gFjZsfCEEJo8NBK-9NDIvIV1Ig68WCF4Uc,5020
|
|
2077
|
+
vellum/workflows/triggers/__init__.py,sha256=dNcF16tEEKSrEkAVmKDdlbpMYUwmagB7LPAWbVo4LUs,331
|
|
2078
|
+
vellum/workflows/triggers/base.py,sha256=T_IZ8-yo-S7Z9Oa2UFHMfE123gwdztyQEj-J5c1Phdg,9005
|
|
2079
|
+
vellum/workflows/triggers/integration.py,sha256=_coibUaWnHVwjdTyh9hHW4FhBrZW9NlJlOek5b3auos,8107
|
|
2076
2080
|
vellum/workflows/triggers/manual.py,sha256=PgbZ92gcK25yz6REXm98zWic1QBfhxLKfGCeHpZEUx4,1266
|
|
2077
2081
|
vellum/workflows/triggers/schedule.py,sha256=3XY519njXWvbBGoxOyQju9iAMVx8fYmce2eSD13bfWM,437
|
|
2078
2082
|
vellum/workflows/triggers/tests/__init__.py,sha256=R8lag_iCRyulijHMK4e3Gf6YVB5NplfvwZeTkaRj8gQ,30
|
|
2079
|
-
vellum/workflows/triggers/tests/test_integration.py,sha256=
|
|
2080
|
-
vellum/workflows/triggers/vellum_integration.py,sha256=AvqdAXRy5XWbFJtiyVLG0E82PslQrCex_srTGctPhFc,8419
|
|
2083
|
+
vellum/workflows/triggers/tests/test_integration.py,sha256=ENQp3oJ9CzgPEOxLXaWvBKgS-gp0mcYv1v6y4PyIiQQ,5246
|
|
2081
2084
|
vellum/workflows/types/__init__.py,sha256=fZ3Xxly7YSsu4kCIYD5aYpYucNM97zTyInb9CA24mf0,102
|
|
2082
2085
|
vellum/workflows/types/code_execution_node_wrappers.py,sha256=fewX9bqF_4TZuK-gZYIn12s31-k03vHMGRpvFAPm11Y,3206
|
|
2083
2086
|
vellum/workflows/types/core.py,sha256=R7snCd7ci4tiRuHi5ALGh_5DIIF0T9eze3sf6EnJN-c,1126
|
|
@@ -2103,14 +2106,14 @@ vellum/workflows/utils/vellum_variables.py,sha256=X3lZn-EoWengRWBWRhTNW7hqbj7LkV
|
|
|
2103
2106
|
vellum/workflows/utils/zip.py,sha256=HVg_YZLmBOTXKaDV3Xhaf3V6sYnfqqZXQ8CpuafkbPY,1181
|
|
2104
2107
|
vellum/workflows/vellum_client.py,sha256=3iDR7VV_NgLSm1iZQCKDvrmfEaX1bOJiU15QrxyHpv0,1237
|
|
2105
2108
|
vellum/workflows/workflows/__init__.py,sha256=KY45TqvavCCvXIkyCFMEc0dc6jTMOUci93U2DUrlZYc,66
|
|
2106
|
-
vellum/workflows/workflows/base.py,sha256=
|
|
2109
|
+
vellum/workflows/workflows/base.py,sha256=aiOe-f33iK5-aaLrHANr2zkO9o7Oj550oM0hfWKD1Oo,35285
|
|
2107
2110
|
vellum/workflows/workflows/event_filters.py,sha256=OzaS1y_z1f7H4f4M914HttAfAuTiN0jXUmo1TUQagCY,2504
|
|
2108
2111
|
vellum/workflows/workflows/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2109
2112
|
vellum/workflows/workflows/tests/test_base_workflow.py,sha256=Boa-_m9ii2Qsa1RvVM-VYniF7zCpzGgEGy-OnPZkrHg,23941
|
|
2110
2113
|
vellum/workflows/workflows/tests/test_context.py,sha256=VJBUcyWVtMa_lE5KxdhgMu0WYNYnUQUDvTF7qm89hJ0,2333
|
|
2111
2114
|
vellum/workflows/workflows/tests/test_event_filters.py,sha256=CPsgtn2F8QMuNMxN5MB6IwTY0y_8JWBCZsio75vxp6c,3638
|
|
2112
|
-
vellum_ai-1.
|
|
2113
|
-
vellum_ai-1.
|
|
2114
|
-
vellum_ai-1.
|
|
2115
|
-
vellum_ai-1.
|
|
2116
|
-
vellum_ai-1.
|
|
2115
|
+
vellum_ai-1.9.0.dist-info/LICENSE,sha256=hOypcdt481qGNISA784bnAGWAE6tyIf9gc2E78mYC3E,1574
|
|
2116
|
+
vellum_ai-1.9.0.dist-info/METADATA,sha256=0gzlisJU0BzjSlBsIPV2XjhXbSV4zMdm_HuCR7NjDPY,5547
|
|
2117
|
+
vellum_ai-1.9.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
2118
|
+
vellum_ai-1.9.0.dist-info/entry_points.txt,sha256=xVavzAKN4iF_NbmhWOlOkHluka0YLkbN_pFQ9pW3gLI,117
|
|
2119
|
+
vellum_ai-1.9.0.dist-info/RECORD,,
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
"""Tests for
|
|
1
|
+
"""Tests for IntegrationTrigger serialization."""
|
|
2
2
|
|
|
3
3
|
from vellum.workflows import BaseWorkflow
|
|
4
4
|
from vellum.workflows.inputs.base import BaseInputs
|
|
5
5
|
from vellum.workflows.nodes.bases.base import BaseNode
|
|
6
6
|
from vellum.workflows.state.base import BaseState
|
|
7
|
-
from vellum.workflows.triggers.
|
|
7
|
+
from vellum.workflows.triggers.integration import IntegrationTrigger
|
|
8
8
|
from vellum_ee.workflows.display.workflows.get_vellum_workflow_display_class import get_workflow_display
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
def test_vellum_integration_trigger_serialization():
|
|
12
|
-
"""
|
|
12
|
+
"""IntegrationTrigger subclass serializes with class name and module path."""
|
|
13
13
|
|
|
14
|
-
# Create a custom
|
|
15
|
-
class SlackMessageTrigger(
|
|
14
|
+
# Create a custom IntegrationTrigger subclass
|
|
15
|
+
class SlackMessageTrigger(IntegrationTrigger):
|
|
16
16
|
"""Custom Slack message trigger."""
|
|
17
17
|
|
|
18
18
|
message: str
|
|
@@ -71,7 +71,7 @@ def test_vellum_integration_trigger_serialization():
|
|
|
71
71
|
def test_vellum_integration_trigger_id_consistency():
|
|
72
72
|
"""Validates trigger and attribute IDs match between definitions and references."""
|
|
73
73
|
|
|
74
|
-
class SlackMessageTrigger(
|
|
74
|
+
class SlackMessageTrigger(IntegrationTrigger):
|
|
75
75
|
message: str
|
|
76
76
|
channel: str
|
|
77
77
|
|
|
@@ -147,7 +147,7 @@ def test_vellum_integration_trigger_id_consistency():
|
|
|
147
147
|
def test_trigger_module_paths_are_canonical():
|
|
148
148
|
"""Validates trigger module_path and class_name for consistent codegen."""
|
|
149
149
|
|
|
150
|
-
class TestSlackTrigger(
|
|
150
|
+
class TestSlackTrigger(IntegrationTrigger):
|
|
151
151
|
message: str
|
|
152
152
|
|
|
153
153
|
class Config:
|
|
@@ -184,7 +184,7 @@ def test_trigger_module_paths_are_canonical():
|
|
|
184
184
|
def test_integration_trigger_no_entrypoint_node():
|
|
185
185
|
"""IntegrationTrigger-only workflows use trigger ID in edges."""
|
|
186
186
|
|
|
187
|
-
class SlackMessageTrigger(
|
|
187
|
+
class SlackMessageTrigger(IntegrationTrigger):
|
|
188
188
|
message: str
|
|
189
189
|
|
|
190
190
|
class Config:
|