vellum-ai 1.8.4__py3-none-any.whl → 1.8.6__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/__init__.py +6 -0
- vellum/client/core/client_wrapper.py +2 -2
- vellum/client/types/__init__.py +6 -0
- vellum/client/types/api_actor_type_enum.py +7 -0
- vellum/client/types/api_request_parent_context.py +6 -0
- vellum/client/types/external_parent_context.py +2 -0
- vellum/client/types/integration_trigger_context.py +38 -0
- vellum/client/types/node_execution_fulfilled_event.py +2 -0
- vellum/client/types/node_execution_initiated_event.py +2 -0
- vellum/client/types/node_execution_paused_event.py +2 -0
- vellum/client/types/node_execution_rejected_event.py +2 -0
- vellum/client/types/node_execution_resumed_event.py +2 -0
- vellum/client/types/node_execution_span.py +2 -0
- vellum/client/types/node_execution_streaming_event.py +2 -0
- vellum/client/types/node_parent_context.py +2 -0
- vellum/client/types/parent_context.py +4 -0
- vellum/client/types/prompt_deployment_parent_context.py +2 -0
- vellum/client/types/scheduled_trigger_context.py +38 -0
- vellum/client/types/slim_workflow_execution_read.py +2 -0
- vellum/client/types/span_link.py +2 -0
- vellum/client/types/workflow_deployment_event_executions_response.py +2 -0
- vellum/client/types/workflow_deployment_parent_context.py +2 -0
- vellum/client/types/workflow_event_execution_read.py +2 -0
- vellum/client/types/workflow_execution_detail.py +2 -0
- vellum/client/types/workflow_execution_fulfilled_event.py +2 -0
- vellum/client/types/workflow_execution_initiated_event.py +2 -0
- vellum/client/types/workflow_execution_paused_event.py +2 -0
- vellum/client/types/workflow_execution_rejected_event.py +2 -0
- vellum/client/types/workflow_execution_resumed_event.py +2 -0
- vellum/client/types/workflow_execution_snapshotted_event.py +2 -0
- vellum/client/types/workflow_execution_span.py +2 -0
- vellum/client/types/workflow_execution_streaming_event.py +2 -0
- vellum/client/types/workflow_parent_context.py +2 -0
- vellum/client/types/workflow_sandbox_parent_context.py +2 -0
- vellum/types/api_actor_type_enum.py +3 -0
- vellum/types/integration_trigger_context.py +3 -0
- vellum/types/scheduled_trigger_context.py +3 -0
- vellum/workflows/descriptors/base.py +11 -0
- vellum/workflows/descriptors/tests/test_utils.py +7 -0
- vellum/workflows/events/types.py +2 -0
- vellum/workflows/nodes/displayable/tool_calling_node/node.py +15 -1
- vellum/workflows/triggers/__init__.py +2 -1
- vellum/workflows/triggers/base.py +12 -4
- vellum/workflows/triggers/schedule.py +18 -0
- vellum/workflows/utils/uuids.py +4 -17
- {vellum_ai-1.8.4.dist-info → vellum_ai-1.8.6.dist-info}/METADATA +1 -1
- {vellum_ai-1.8.4.dist-info → vellum_ai-1.8.6.dist-info}/RECORD +56 -49
- vellum_ee/workflows/display/tests/workflow_serialization/test_manual_trigger_serialization.py +3 -3
- vellum_ee/workflows/display/utils/expressions.py +1 -2
- vellum_ee/workflows/display/workflows/base_workflow_display.py +4 -4
- vellum_ee/workflows/server/virtual_file_loader.py +45 -1
- vellum_ee/workflows/tests/test_server.py +0 -64
- vellum_ee/workflows/tests/test_virtual_files.py +51 -0
- {vellum_ai-1.8.4.dist-info → vellum_ai-1.8.6.dist-info}/LICENSE +0 -0
- {vellum_ai-1.8.4.dist-info → vellum_ai-1.8.6.dist-info}/WHEEL +0 -0
- {vellum_ai-1.8.4.dist-info → vellum_ai-1.8.6.dist-info}/entry_points.txt +0 -0
|
@@ -34,13 +34,6 @@ from .nodes.start_node import StartNode
|
|
|
34
34
|
|
|
35
35
|
class Workflow(BaseWorkflow):
|
|
36
36
|
graph = StartNode
|
|
37
|
-
""",
|
|
38
|
-
"nodes/__init__.py": """\
|
|
39
|
-
from .start_node import StartNode
|
|
40
|
-
|
|
41
|
-
__all__ = [
|
|
42
|
-
"StartNode",
|
|
43
|
-
]
|
|
44
37
|
""",
|
|
45
38
|
"nodes/start_node.py": """\
|
|
46
39
|
from vellum.workflows.nodes import BaseNode
|
|
@@ -98,11 +91,6 @@ class Workflow(BaseWorkflow):
|
|
|
98
91
|
|
|
99
92
|
class Outputs(BaseWorkflow.Outputs):
|
|
100
93
|
final_output = CodeExecutionNode.Outputs.result
|
|
101
|
-
""",
|
|
102
|
-
"nodes/__init__.py": """
|
|
103
|
-
from .code_execution_node import CodeExecutionNode
|
|
104
|
-
|
|
105
|
-
__all__ = ["CodeExecutionNode"]
|
|
106
94
|
""",
|
|
107
95
|
"nodes/code_execution_node/__init__.py": """
|
|
108
96
|
from typing import Any
|
|
@@ -174,11 +162,6 @@ class Workflow(BaseWorkflow):
|
|
|
174
162
|
|
|
175
163
|
class Outputs(BaseWorkflow.Outputs):
|
|
176
164
|
final_output = CodeExecutionNode.Outputs.result
|
|
177
|
-
""",
|
|
178
|
-
"nodes/__init__.py": """
|
|
179
|
-
from .code_execution_node import CodeExecutionNode
|
|
180
|
-
|
|
181
|
-
__all__ = ["CodeExecutionNode"]
|
|
182
165
|
""",
|
|
183
166
|
"nodes/code_execution_node/__init__.py": """
|
|
184
167
|
from typing import Union
|
|
@@ -250,11 +233,6 @@ class Workflow(BaseWorkflow):
|
|
|
250
233
|
|
|
251
234
|
class Outputs(BaseWorkflow.Outputs):
|
|
252
235
|
final_output = CodeExecutionNode.Outputs.result
|
|
253
|
-
""",
|
|
254
|
-
"nodes/__init__.py": """
|
|
255
|
-
from .code_execution_node import CodeExecutionNode
|
|
256
|
-
|
|
257
|
-
__all__ = ["CodeExecutionNode"]
|
|
258
236
|
""",
|
|
259
237
|
"nodes/code_execution_node/__init__.py": """
|
|
260
238
|
from typing import Union
|
|
@@ -326,11 +304,6 @@ class Workflow(BaseWorkflow):
|
|
|
326
304
|
|
|
327
305
|
class Outputs(BaseWorkflow.Outputs):
|
|
328
306
|
final_output = Subworkflow.Outputs.result
|
|
329
|
-
""",
|
|
330
|
-
"nodes/__init__.py": """
|
|
331
|
-
from .subworkflow import Subworkflow
|
|
332
|
-
|
|
333
|
-
__all__ = ["Subworkflow"]
|
|
334
307
|
""",
|
|
335
308
|
"nodes/subworkflow/__init__.py": """
|
|
336
309
|
from vellum.workflows.nodes.displayable import InlineSubworkflowNode
|
|
@@ -339,11 +312,6 @@ from .workflow import SubworkflowWorkflow
|
|
|
339
312
|
|
|
340
313
|
class Subworkflow(InlineSubworkflowNode):
|
|
341
314
|
subworkflow = SubworkflowWorkflow
|
|
342
|
-
""",
|
|
343
|
-
"nodes/subworkflow/nodes/__init__.py": """
|
|
344
|
-
from .code_execution_node import CodeExecutionNode
|
|
345
|
-
|
|
346
|
-
__all__ = ["CodeExecutionNode"]
|
|
347
315
|
""",
|
|
348
316
|
"nodes/subworkflow/nodes/code_execution_node/__init__.py": """
|
|
349
317
|
from typing import Union
|
|
@@ -424,11 +392,6 @@ class Workflow(BaseWorkflow):
|
|
|
424
392
|
|
|
425
393
|
class Outputs(BaseWorkflow.Outputs): # noqa: W293
|
|
426
394
|
results = MapNode.Outputs.final_output
|
|
427
|
-
""",
|
|
428
|
-
"nodes/__init__.py": """
|
|
429
|
-
from .map_node import MapNode
|
|
430
|
-
|
|
431
|
-
__all__ = ["MapNode"]
|
|
432
395
|
""",
|
|
433
396
|
"nodes/map_node/__init__.py": """
|
|
434
397
|
from vellum.workflows.nodes.core.map_node import MapNode as BaseMapNode
|
|
@@ -439,11 +402,6 @@ class MapNode(BaseMapNode):
|
|
|
439
402
|
items = ["foo", "bar", "baz"]
|
|
440
403
|
subworkflow = MapNodeWorkflow
|
|
441
404
|
max_concurrency = 4
|
|
442
|
-
""",
|
|
443
|
-
"nodes/map_node/nodes/__init__.py": """
|
|
444
|
-
from .code_execution_node import CodeExecutionNode
|
|
445
|
-
|
|
446
|
-
__all__ = ["CodeExecutionNode"]
|
|
447
405
|
""",
|
|
448
406
|
"nodes/map_node/nodes/code_execution_node/__init__.py": """
|
|
449
407
|
from typing import Union
|
|
@@ -520,7 +478,6 @@ from .nodes.broken_node import BrokenNode
|
|
|
520
478
|
class Workflow(BaseWorkflow):
|
|
521
479
|
graph = BrokenNode
|
|
522
480
|
""",
|
|
523
|
-
"nodes/__init__.py": "",
|
|
524
481
|
"nodes/broken_node.py": """\
|
|
525
482
|
from vellum.workflows.nodes import BaseNode
|
|
526
483
|
|
|
@@ -559,7 +516,6 @@ from .nodes.broken_node import BrokenNode
|
|
|
559
516
|
class Workflow(BaseWorkflow):
|
|
560
517
|
graph = BrokenNode
|
|
561
518
|
""",
|
|
562
|
-
"nodes/__init__.py": "",
|
|
563
519
|
"nodes/broken_node.py": """\
|
|
564
520
|
from vellum.workflows.nodes import BaseNode
|
|
565
521
|
|
|
@@ -819,19 +775,9 @@ class TestSubworkflowDeploymentNode(SubworkflowDeploymentNode):
|
|
|
819
775
|
files = {
|
|
820
776
|
"__init__.py": "",
|
|
821
777
|
"workflow.py": parent_workflow_code,
|
|
822
|
-
"nodes/__init__.py": """
|
|
823
|
-
from .subworkflow_deployment_node import TestSubworkflowDeploymentNode
|
|
824
|
-
|
|
825
|
-
__all__ = ["TestSubworkflowDeploymentNode"]
|
|
826
|
-
""",
|
|
827
778
|
"nodes/subworkflow_deployment_node.py": parent_node_code,
|
|
828
779
|
f"{expected_prefix}/__init__.py": "",
|
|
829
780
|
f"{expected_prefix}/workflow.py": mock_workflow_code,
|
|
830
|
-
f"{expected_prefix}/nodes/__init__.py": """
|
|
831
|
-
from .test_node import TestNode
|
|
832
|
-
|
|
833
|
-
__all__ = ["TestNode"]
|
|
834
|
-
""",
|
|
835
781
|
f"{expected_prefix}/nodes/test_node.py": test_node_code,
|
|
836
782
|
}
|
|
837
783
|
|
|
@@ -919,11 +865,6 @@ class TestSubworkflowDeploymentNode(SubworkflowDeploymentNode):
|
|
|
919
865
|
subworkflow_files = {
|
|
920
866
|
"__init__.py": "",
|
|
921
867
|
"workflow.py": mock_workflow_code,
|
|
922
|
-
"nodes/__init__.py": """
|
|
923
|
-
from .test_node import TestNode
|
|
924
|
-
|
|
925
|
-
__all__ = ["TestNode"]
|
|
926
|
-
""",
|
|
927
868
|
"nodes/test_node.py": test_node_code,
|
|
928
869
|
}
|
|
929
870
|
|
|
@@ -931,11 +872,6 @@ __all__ = ["TestNode"]
|
|
|
931
872
|
"__init__.py": "",
|
|
932
873
|
"inputs.py": inputs_code,
|
|
933
874
|
"workflow.py": parent_workflow_code,
|
|
934
|
-
"nodes/__init__.py": """
|
|
935
|
-
from .subworkflow_deployment_node import TestSubworkflowDeploymentNode
|
|
936
|
-
|
|
937
|
-
__all__ = ["TestSubworkflowDeploymentNode"]
|
|
938
|
-
""",
|
|
939
875
|
"nodes/subworkflow_deployment_node.py": parent_node_code,
|
|
940
876
|
}
|
|
941
877
|
|
|
@@ -80,3 +80,54 @@ def test_base_class_dynamic_import(files):
|
|
|
80
80
|
assert instance.id
|
|
81
81
|
except Exception as e:
|
|
82
82
|
pytest.fail(f"Failed to create an instance of BaseClass: {e}")
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
def test_display_directory_not_auto_generated():
|
|
86
|
+
"""
|
|
87
|
+
Test that the top-level display directory is NOT auto-generated with empty __init__.py.
|
|
88
|
+
Display directories typically have specific __init__.py content (e.g., "from .workflow import *")
|
|
89
|
+
that should not be replaced with empty auto-generated files.
|
|
90
|
+
"""
|
|
91
|
+
# GIVEN a workflow with display/workflow.py but NO display/__init__.py
|
|
92
|
+
files = {
|
|
93
|
+
"__init__.py": "",
|
|
94
|
+
"workflow.py": """\
|
|
95
|
+
from vellum.workflows import BaseWorkflow
|
|
96
|
+
from vellum.workflows.nodes.bases import BaseNode
|
|
97
|
+
|
|
98
|
+
class StartNode(BaseNode):
|
|
99
|
+
pass
|
|
100
|
+
|
|
101
|
+
class Workflow(BaseWorkflow):
|
|
102
|
+
graph = StartNode
|
|
103
|
+
""",
|
|
104
|
+
"display/workflow.py": """\
|
|
105
|
+
from vellum_ee.workflows.display.workflows import BaseWorkflowDisplay
|
|
106
|
+
|
|
107
|
+
class WorkflowDisplay(BaseWorkflowDisplay):
|
|
108
|
+
pass
|
|
109
|
+
""",
|
|
110
|
+
# Note: NO "display/__init__.py" in files dict
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
namespace = str(uuid4())
|
|
114
|
+
|
|
115
|
+
# AND the virtual file loader is registered
|
|
116
|
+
sys.meta_path.append(VirtualFileFinder(files, namespace))
|
|
117
|
+
|
|
118
|
+
try:
|
|
119
|
+
# WHEN we try to resolve display/__init__.py
|
|
120
|
+
import importlib.util
|
|
121
|
+
|
|
122
|
+
spec = importlib.util.find_spec(f"{namespace}.display")
|
|
123
|
+
|
|
124
|
+
# THEN the spec should be None because we don't want to auto-generate display/__init__.py
|
|
125
|
+
# If the spec exists, it means an empty __init__.py was auto-generated (BAD)
|
|
126
|
+
assert spec is None, (
|
|
127
|
+
"display directory should NOT have auto-generated __init__.py. "
|
|
128
|
+
"Display directories require specific __init__.py content that shouldn't be empty."
|
|
129
|
+
)
|
|
130
|
+
|
|
131
|
+
finally:
|
|
132
|
+
# Clean up
|
|
133
|
+
sys.meta_path = [finder for finder in sys.meta_path if not isinstance(finder, VirtualFileFinder)]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|