vellum-ai 1.2.5__py3-none-any.whl → 1.3.1__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.
Files changed (48) hide show
  1. vellum/__init__.py +8 -0
  2. vellum/client/README.md +1 -1
  3. vellum/client/core/client_wrapper.py +2 -2
  4. vellum/client/reference.md +0 -9
  5. vellum/client/resources/workflow_sandboxes/client.py +0 -12
  6. vellum/client/resources/workflow_sandboxes/raw_client.py +2 -10
  7. vellum/client/types/__init__.py +8 -0
  8. vellum/client/types/deployment_read.py +5 -5
  9. vellum/client/types/slim_deployment_read.py +5 -5
  10. vellum/client/types/slim_workflow_deployment.py +5 -5
  11. vellum/client/types/workflow_deployment_read.py +5 -5
  12. vellum/client/types/workflow_request_audio_input_request.py +30 -0
  13. vellum/client/types/workflow_request_document_input_request.py +30 -0
  14. vellum/client/types/workflow_request_image_input_request.py +30 -0
  15. vellum/client/types/workflow_request_input_request.py +8 -0
  16. vellum/client/types/workflow_request_video_input_request.py +30 -0
  17. vellum/types/workflow_request_audio_input_request.py +3 -0
  18. vellum/types/workflow_request_document_input_request.py +3 -0
  19. vellum/types/workflow_request_image_input_request.py +3 -0
  20. vellum/types/workflow_request_video_input_request.py +3 -0
  21. vellum/workflows/events/types.py +6 -1
  22. vellum/workflows/events/workflow.py +9 -2
  23. vellum/workflows/integrations/tests/test_mcp_service.py +106 -1
  24. vellum/workflows/nodes/__init__.py +2 -0
  25. vellum/workflows/nodes/displayable/__init__.py +2 -0
  26. vellum/workflows/nodes/displayable/tool_calling_node/utils.py +11 -0
  27. vellum/workflows/nodes/displayable/web_search_node/__init__.py +3 -0
  28. vellum/workflows/nodes/displayable/web_search_node/node.py +133 -0
  29. vellum/workflows/nodes/displayable/web_search_node/tests/__init__.py +0 -0
  30. vellum/workflows/nodes/displayable/web_search_node/tests/test_node.py +319 -0
  31. vellum/workflows/resolvers/base.py +3 -2
  32. vellum/workflows/resolvers/resolver.py +62 -7
  33. vellum/workflows/resolvers/tests/test_resolver.py +79 -7
  34. vellum/workflows/resolvers/types.py +11 -0
  35. vellum/workflows/runner/runner.py +49 -1
  36. vellum/workflows/state/context.py +41 -7
  37. vellum/workflows/utils/zip.py +46 -0
  38. vellum/workflows/workflows/base.py +10 -0
  39. {vellum_ai-1.2.5.dist-info → vellum_ai-1.3.1.dist-info}/METADATA +1 -1
  40. {vellum_ai-1.2.5.dist-info → vellum_ai-1.3.1.dist-info}/RECORD +48 -34
  41. vellum_cli/tests/test_init.py +7 -24
  42. vellum_cli/tests/test_pull.py +27 -52
  43. vellum_ee/workflows/display/tests/workflow_serialization/generic_nodes/test_attributes_serialization.py +7 -33
  44. vellum_ee/workflows/display/utils/events.py +3 -0
  45. vellum_ee/workflows/tests/test_server.py +115 -0
  46. {vellum_ai-1.2.5.dist-info → vellum_ai-1.3.1.dist-info}/LICENSE +0 -0
  47. {vellum_ai-1.2.5.dist-info → vellum_ai-1.3.1.dist-info}/WHEEL +0 -0
  48. {vellum_ai-1.2.5.dist-info → vellum_ai-1.3.1.dist-info}/entry_points.txt +0 -0
@@ -14,10 +14,10 @@ vellum_cli/tests/conftest.py,sha256=wx3PlJjVB0HRf5dr2b_idOIw27WPPl0J0FNbhIJJaVk,
14
14
  vellum_cli/tests/test_config.py,sha256=uvKGDc8BoVyT9_H0Z-g8469zVxomn6Oi3Zj-vK7O_wU,2631
15
15
  vellum_cli/tests/test_image_push.py,sha256=X0YOPdoaAnWtK9IQTxaN_wWpw08-5G3v76k1Wu53JpU,12801
16
16
  vellum_cli/tests/test_image_push_error_handling.py,sha256=QRH0eYNEEIkD2-EVFQWYexOKlhMB6puh1GouovrE-VU,7647
17
- vellum_cli/tests/test_init.py,sha256=8UOc_ThfouR4ja5cCl_URuLk7ohr9JXfCnG4yka1OUQ,18754
17
+ vellum_cli/tests/test_init.py,sha256=C_rV4lu-ab5iFoLRizs1XAUnSPdMf7oFuc1i4N4udOU,18285
18
18
  vellum_cli/tests/test_main.py,sha256=qDZG-aQauPwBwM6A2DIu1494n47v3pL28XakTbLGZ-k,272
19
19
  vellum_cli/tests/test_ping.py,sha256=b3aQLd-N59_8w2rRiWqwpB1rlHaKEYVbAj1Y3hi7A-g,2605
20
- vellum_cli/tests/test_pull.py,sha256=WcRtp5N27CbfBv7vx2wNhLTsSacYw7TiBVVXcI7ZMW4,50014
20
+ vellum_cli/tests/test_pull.py,sha256=f7dK61y82LlJm-FAv-IpfmscJijIfZZrR-rzN1TKkU0,49421
21
21
  vellum_cli/tests/test_push.py,sha256=10G-H88tdiYvg9CaC8OXOf25UEzWkWWB01vNhuxzjog,41944
22
22
  vellum_ee/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
23
23
  vellum_ee/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -75,7 +75,7 @@ vellum_ee/workflows/display/tests/workflow_serialization/__init__.py,sha256=47DE
75
75
  vellum_ee/workflows/display/tests/workflow_serialization/generic_nodes/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
76
76
  vellum_ee/workflows/display/tests/workflow_serialization/generic_nodes/conftest.py,sha256=Y-ajeT65b5varmrZCw6L3hir4hJCFq-eO0jZfRcrs7g,1886
77
77
  vellum_ee/workflows/display/tests/workflow_serialization/generic_nodes/test_adornments_serialization.py,sha256=bD9AtBo7Pz1Drbh420NR0VSiHBfExw_UtNRPCiAqki0,13967
78
- vellum_ee/workflows/display/tests/workflow_serialization/generic_nodes/test_attributes_serialization.py,sha256=iqTbPYVSrMgIls7vKdPgr7ZEbdpztDjlOWvexPU-zqc,26240
78
+ vellum_ee/workflows/display/tests/workflow_serialization/generic_nodes/test_attributes_serialization.py,sha256=xEGh4RXGMR06M5s6rD6GjsloNslsRaH4UhIg7Djyw7Q,25144
79
79
  vellum_ee/workflows/display/tests/workflow_serialization/generic_nodes/test_outputs_serialization.py,sha256=O1CIKMmRTaMaT3IhjwCAiMz1ZThPg9lAUbSiZkx_E8c,6321
80
80
  vellum_ee/workflows/display/tests/workflow_serialization/generic_nodes/test_ports_serialization.py,sha256=fPXcX-tWQ0UMuEyOFAylgi7pWiE7lZWk9vrShlTExik,40053
81
81
  vellum_ee/workflows/display/tests/workflow_serialization/generic_nodes/test_trigger_serialization.py,sha256=FLvcD8eoABHUPv08oSpIp_P-65sw2gl4whMXEJJj4f8,6785
@@ -106,7 +106,7 @@ vellum_ee/workflows/display/tests/workflow_serialization/test_workflow_input_par
106
106
  vellum_ee/workflows/display/types.py,sha256=cyZruu4sXAdHjwuFc7dydM4DcFNf-pp_CmulXItxac4,3679
107
107
  vellum_ee/workflows/display/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
108
108
  vellum_ee/workflows/display/utils/auto_layout.py,sha256=f4GiLn_LazweupfqTpubcdtdfE_vrOcmZudSsnYIY9E,3906
109
- vellum_ee/workflows/display/utils/events.py,sha256=HHKXnVy1Zs0YJxTojp2iKQJFTLBqVXiY-YW0J-rRZlI,1673
109
+ vellum_ee/workflows/display/utils/events.py,sha256=KC684ZWODHRGgJtik_KjGXIjM5x4_58_1dGuco_9O8c,1748
110
110
  vellum_ee/workflows/display/utils/exceptions.py,sha256=LSwwxCYNxFkf5XMUcFkaZKpQ13OSrI7y_bpEUwbKVk0,169
111
111
  vellum_ee/workflows/display/utils/expressions.py,sha256=yPrUIEQKL5fDwUC9NpVO9yjL6emTOdFJw8VjoZgZ0E0,16942
112
112
  vellum_ee/workflows/display/utils/registry.py,sha256=1qXiBTdsnro6FeCX0FGBEK7CIf6wa--Jt50iZ_nEp_M,3460
@@ -143,14 +143,14 @@ vellum_ee/workflows/tests/local_workflow/workflow.py,sha256=A4qOzOPNwePYxWbcAgIP
143
143
  vellum_ee/workflows/tests/test_display_meta.py,sha256=PkXJVnMZs9GNooDkd59n4YTBAX3XGPQWeSSVbhehVFM,5112
144
144
  vellum_ee/workflows/tests/test_registry.py,sha256=B8xRIuEyLWfSqrYoPldNQXhKPfe50PllvtAZoI8-uPs,6066
145
145
  vellum_ee/workflows/tests/test_serialize_module.py,sha256=lk-4dVnG2HcxxywBXxDR1ieH8D9RJt4lvchoZhtQPdU,2892
146
- vellum_ee/workflows/tests/test_server.py,sha256=sqF1qcgBVy9-blGetaea6MZ73KHnm0KaPz5B7s4NT9Q,19687
146
+ vellum_ee/workflows/tests/test_server.py,sha256=dXFBraU99Y6cKp2aBhLFXQTScSRcE9WaWjo1z9piqdU,23344
147
147
  vellum_ee/workflows/tests/test_virtual_files.py,sha256=TJEcMR0v2S8CkloXNmCHA0QW0K6pYNGaIjraJz7sFvY,2762
148
- vellum/__init__.py,sha256=VZhH0RFOGRpsERt-mVzsKJlfopp3j9J4m72dNZU27j4,46934
149
- vellum/client/README.md,sha256=gxc7JlJRBrBZpN5LHa2ORxYTRHFLPnWmnIugN8pmQh4,5600
148
+ vellum/__init__.py,sha256=8-mW70qyqMe2d4jNe2hgthuXs5n3c0qTlkdV8Nz8qcs,47252
149
+ vellum/client/README.md,sha256=Uwq9qIFZAHOVCgEfatfWe4YoW-QYYy6xVA1bMjPvx3k,5601
150
150
  vellum/client/__init__.py,sha256=LOu_TklkJG01SgXIpPWDhOX2QvKDyd2ZbQyr5H0m31I,72349
151
151
  vellum/client/core/__init__.py,sha256=lTcqUPXcx4112yLDd70RAPeqq6tu3eFMe1pKOqkW9JQ,1562
152
152
  vellum/client/core/api_error.py,sha256=44vPoTyWN59gonCIZMdzw7M1uspygiLnr3GNFOoVL2Q,614
153
- vellum/client/core/client_wrapper.py,sha256=Hs7PXt1UQaeHfbQYgreOs11HOuvUOU0Oi4YROuf2M08,2840
153
+ vellum/client/core/client_wrapper.py,sha256=yjqDTK-pFWVYr-n4F1kmy-TuBlGzXJBmaztIfr5uBF0,2840
154
154
  vellum/client/core/datetime_utils.py,sha256=nBys2IsYrhPdszxGKCNRPSOCwa-5DWOHG95FB8G9PKo,1047
155
155
  vellum/client/core/file.py,sha256=d4NNbX8XvXP32z8KpK2Xovv33nFfruIrpz0QWxlgpZk,2663
156
156
  vellum/client/core/force_multipart.py,sha256=awxh5MtcRYe74ehY8U76jzv6fYM_w_D3Rur7KQQzSDk,429
@@ -171,7 +171,7 @@ vellum/client/errors/not_found_error.py,sha256=YrqVM0oc3qkQbFbmmm6xr300VGfUNxMSy
171
171
  vellum/client/errors/too_many_requests_error.py,sha256=SJJemdgUlQHV_VpxK8UfFNexgZebNT5_MTOeQs6oVgc,397
172
172
  vellum/client/errors/unauthorized_error.py,sha256=waPl5Swiqsk3FQK-Lljzx4KDh4RPZ0wL6BLHjM8onQ8,394
173
173
  vellum/client/raw_client.py,sha256=IJNaTvVzigyiqHZ9g-nLZzXsV8P7aRUZHdXV0U3ddn8,112401
174
- vellum/client/reference.md,sha256=oGKMw2vruJgy2hmDYu0adKkhmb_55J3UU8jB5iWjoNk,95172
174
+ vellum/client/reference.md,sha256=Y5xeW_q9baKaA9Dcd9RL8MQLcGEGAQZXbiCmcrA7yr0,95032
175
175
  vellum/client/resources/__init__.py,sha256=R10JFtO6U6QRvNubrmDIjncT7e5q4AiOKjXSK4wFuXc,1609
176
176
  vellum/client/resources/ad_hoc/__init__.py,sha256=_VhToAyIt_5axN6CLJwtxg3-CO7THa_23pbUzqhXJa4,85
177
177
  vellum/client/resources/ad_hoc/client.py,sha256=AbK_g9HPL2xEBHymwQ9rGO7js7X1YpNYcqPa-PxlsyM,14400
@@ -232,8 +232,8 @@ vellum/client/resources/workflow_executions/__init__.py,sha256=_VhToAyIt_5axN6CL
232
232
  vellum/client/resources/workflow_executions/client.py,sha256=842zA9XaKSgY0scgGZG0ICerJrJyDfVerSGf_zHXPcY,4177
233
233
  vellum/client/resources/workflow_executions/raw_client.py,sha256=y5iJ61fTqe4h6-YcqeIxXXMwChxJF80LFmym5t3oWNY,4728
234
234
  vellum/client/resources/workflow_sandboxes/__init__.py,sha256=fWzZgZDNIbJgdYSnL3f0lGa3lbb2bnmaofmodrlVG6o,195
235
- vellum/client/resources/workflow_sandboxes/client.py,sha256=w8fWQCIFbDLXl4OX1OT_cKoVPA_q65qgOhb-I_zXO1k,10457
236
- vellum/client/resources/workflow_sandboxes/raw_client.py,sha256=_C2MzCk36NP8Do4pat0Q0aPSSbP6KhOqBOaGtqNxwk0,12643
235
+ vellum/client/resources/workflow_sandboxes/client.py,sha256=tsf2ujDOxZLcjZQp8FKXnNewQlxzv8s-3nIRgVv26uc,10089
236
+ vellum/client/resources/workflow_sandboxes/raw_client.py,sha256=iQpaFR-D96ygLLh4xYbYGK88UH-wttapsPxMc1xkvas,12323
237
237
  vellum/client/resources/workflow_sandboxes/types/__init__.py,sha256=mZxwNpOmBfllmNZrhp8e_M62hUFI73B2fNlvgG8vi3Y,232
238
238
  vellum/client/resources/workflow_sandboxes/types/list_workflow_sandbox_examples_request_tag.py,sha256=TEwWit20W3X-zWPPLAhmUG05UudG9gaBSJ4Q4-rNJws,188
239
239
  vellum/client/resources/workflows/__init__.py,sha256=_VhToAyIt_5axN6CLJwtxg3-CO7THa_23pbUzqhXJa4,85
@@ -245,7 +245,7 @@ vellum/client/resources/workspace_secrets/raw_client.py,sha256=ZfiNd1NisolmK07QP
245
245
  vellum/client/resources/workspaces/__init__.py,sha256=_VhToAyIt_5axN6CLJwtxg3-CO7THa_23pbUzqhXJa4,85
246
246
  vellum/client/resources/workspaces/client.py,sha256=36KYa2FDu6h65q2GscUFOJs4qKeiOA6grOYoCc0Gi3E,2936
247
247
  vellum/client/resources/workspaces/raw_client.py,sha256=M3Ewk1ZfEZ44EeTvBtBNoNKi5whwfLY-1GR07SyfDTI,3517
248
- vellum/client/types/__init__.py,sha256=K33OdhOUq5W7oh8cdwsFfo-aRHxPa6Jel9rlBQS2at0,71137
248
+ vellum/client/types/__init__.py,sha256=-PQEF1IO-RdF7X4YeQf2ZO-OCPvy0pYxt11__WpVxso,71638
249
249
  vellum/client/types/ad_hoc_execute_prompt_event.py,sha256=B69EesIH6fpNsdoiJaSG9zF1Sl17FnjoTu4CBkUSoHk,608
250
250
  vellum/client/types/ad_hoc_expand_meta.py,sha256=Kajcj3dKKed5e7uZibRnE3ZonK_bB2JPM-3aLjLfUp4,1295
251
251
  vellum/client/types/ad_hoc_fulfilled_prompt_execution_meta.py,sha256=5kD6ZcbU8P8ynK0lMD8Mh7vHzvQt06ziMyphvWYg6FU,968
@@ -325,7 +325,7 @@ vellum/client/types/delimiter_chunking_request.py,sha256=zZ1Y-hKzM9ie2kzuTjKain2
325
325
  vellum/client/types/deployment_history_item.py,sha256=E48hjXMKGQfpf4Shw1_WLk2i9IjKKAh4ntDzKmbLJ6s,1225
326
326
  vellum/client/types/deployment_provider_payload_response.py,sha256=VIpzush2vTmhurLs9Jf16mo19je2WoKyLJxEHwVeKtk,782
327
327
  vellum/client/types/deployment_provider_payload_response_payload.py,sha256=xHLQnWFN0AZRZdrOiKawwpoKK7BTmnZfp0P7FCc2ZqE,188
328
- vellum/client/types/deployment_read.py,sha256=CzudxnNjP2uoL3bZrJ0XwrMJzqOTkNJLbYl7hucnfy0,2063
328
+ vellum/client/types/deployment_read.py,sha256=gfkVoVD84glJuUFDX61uMwmhDYg46h2UXcXIhTEA-ls,2040
329
329
  vellum/client/types/deployment_release_tag_deployment_history_item.py,sha256=wVzgUnsa4Up9ReH_rP_l5ssfA0J1Nsfd4AN6lRsxhv4,595
330
330
  vellum/client/types/deployment_release_tag_read.py,sha256=SV_kKYFIjhfD5CR9Ab35pdJpAJSx-7jhk2x_HUiz-Uk,1242
331
331
  vellum/client/types/docker_service_token.py,sha256=rv0F19r2Sgba_Hbz757HFfTV8UioAQTV2xXkWxfn4sg,578
@@ -658,11 +658,11 @@ vellum/client/types/sentence_chunker_config.py,sha256=WQGyc0jUiATYhQ7ezbBN06--ul
658
658
  vellum/client/types/sentence_chunker_config_request.py,sha256=Da2ANuD4icLxI74emC4z2EEZjeY2k1w9HnEQt2g1AvI,680
659
659
  vellum/client/types/sentence_chunking.py,sha256=MyEImiN0dhWEVFvD76Q6mCqIEjZcyY__Hhu0j9Gjs6Y,747
660
660
  vellum/client/types/sentence_chunking_request.py,sha256=itrdqiKJJ7UKWVGTfj9sJu3kMSThkBF_Qj-3KqFunP4,776
661
- vellum/client/types/slim_deployment_read.py,sha256=yg1T-Ly642S3_ozdZuhMPy0lLJjH7nvHlbg_-IH0Ypc,1744
661
+ vellum/client/types/slim_deployment_read.py,sha256=lEJ8Fx7QSmqjEK-LcR0y_hX2ywcaPbYjxINwPGy_ofw,1733
662
662
  vellum/client/types/slim_document.py,sha256=2eSbvk2u8NsFsT3SPmDRvdBJsytJ8zPAVhuTsC-hF8E,2359
663
663
  vellum/client/types/slim_document_document_to_document_index.py,sha256=Ogo8OFjtmcHjDmIynB9vckfjSZxFNhKM-cYpqSfREGI,1515
664
664
  vellum/client/types/slim_release_review.py,sha256=vWNkPXk5wZ_scHsWHz_77PfMZRDn-4qUkqVbCKqY1zQ,747
665
- vellum/client/types/slim_workflow_deployment.py,sha256=Gm3zwOXx-7Pwm8bh8lgmNsJ8zsZiGUKvDQkNJx9I5qI,2103
665
+ vellum/client/types/slim_workflow_deployment.py,sha256=jIciGPCW9QNtDRdq3w_zUdrrE4cg1LWkcoyGM-L6cs0,2085
666
666
  vellum/client/types/slim_workflow_execution_read.py,sha256=6Ep2iQ6tWTCGxzvAh4t3G_4BjHQ3_JZ9WFdc81XGqkA,2302
667
667
  vellum/client/types/span_link.py,sha256=roO93-xRnqZy2hx9WJFNZW46o8l2bGf3ugeaBepegr4,1433
668
668
  vellum/client/types/span_link_type_enum.py,sha256=SQsPKp1Jb8PWE2tkCHt9d5fZP8Oz77vG8_VYKF-h9J4,186
@@ -824,7 +824,7 @@ vellum/client/types/video_vellum_value_request.py,sha256=q6dptI5XdJNFwtTRlNyPqU0
824
824
  vellum/client/types/workflow_deployment_event_executions_response.py,sha256=KXzRC0iaXsBu9ezA4p7PIHL4-IWIQ-lX6NW6noTHtZ4,1570
825
825
  vellum/client/types/workflow_deployment_history_item.py,sha256=RF_ByBLXRo47MhAuyUV4FkxmN_j879-UylfRyZaYAm0,1327
826
826
  vellum/client/types/workflow_deployment_parent_context.py,sha256=1JdTw3LL6tgCgiMVrX35SZVu7mZcxz6SbxWPCUBZ09s,1796
827
- vellum/client/types/workflow_deployment_read.py,sha256=dLot3_qIrajmCdDVKSHm7fq5wCwjcQe7gSn8BgcM0kA,2277
827
+ vellum/client/types/workflow_deployment_read.py,sha256=rQQZmRy92tfXie8kg14dRI9t_lZ1StbXSEtSFPMTV9E,2247
828
828
  vellum/client/types/workflow_deployment_release.py,sha256=yd9Okgpdm8Oob9VmIKaksZjmRv2uLHGJtc-H5sO10F8,1520
829
829
  vellum/client/types/workflow_deployment_release_workflow_deployment.py,sha256=ZmQhemAQEqARhkSvc9DFdgfTKQfSHvRTS9reW1Wx9dI,550
830
830
  vellum/client/types/workflow_deployment_release_workflow_version.py,sha256=VbVrwsDHapwPSsGEt8OM9Gjs31esIqkp8ta5zrZvPTw,885
@@ -883,11 +883,15 @@ vellum/client/types/workflow_push_exec_config.py,sha256=6TaVMVqhSOz4DnY46l8axPDt
883
883
  vellum/client/types/workflow_push_response.py,sha256=Tkwpvh_Ar1yl-kyClh2fTIP2e0cqyk1ohbArIp8I9gs,688
884
884
  vellum/client/types/workflow_release_tag_read.py,sha256=NIZWhCVQ3UhxkpjuyoZ2nY9WHuUr4WSlFvqTQ4JStR4,1259
885
885
  vellum/client/types/workflow_release_tag_workflow_deployment_history_item.py,sha256=we8Qj3udlnbOtIz5hZRpGgtxIxjr_2OSleaNutuB3f0,601
886
+ vellum/client/types/workflow_request_audio_input_request.py,sha256=wKTsNDj4cvvr9mkGlACq1hdiDtffc5IdpvJmBjRyw3s,823
886
887
  vellum/client/types/workflow_request_chat_history_input_request.py,sha256=JiiqxniYKIrwOhQAVUHkffNx6YTqWBhMmwg5Pf-6e-Y,862
887
- vellum/client/types/workflow_request_input_request.py,sha256=REr7j_FA1ugRt-9-2EWm5OQrj7hsReetPaNDMTS57HA,633
888
+ vellum/client/types/workflow_request_document_input_request.py,sha256=MWDi6Ttd62KK2uSkNQdMgf-l8QRlHepA6tTz5YH9BVU,843
889
+ vellum/client/types/workflow_request_image_input_request.py,sha256=NNlkMhYlz3ZzfMx223T9UleMDpeIFrgIJpT2jZAjlWM,823
890
+ vellum/client/types/workflow_request_input_request.py,sha256=CVLyzs3rfFpx_UR-guH2jr-Mp3_PYedTGBZ3F0L6_-Y,1126
888
891
  vellum/client/types/workflow_request_json_input_request.py,sha256=LZu_IblkMhk5JWAcfaUYEv4TV2FeAkd4zCjPnZbFUPM,781
889
892
  vellum/client/types/workflow_request_number_input_request.py,sha256=1eesPBjUA7wKWLR90x6in3U9H1ZuIt_2_OqIYjy-V9s,760
890
893
  vellum/client/types/workflow_request_string_input_request.py,sha256=oqdelrQTkpCH5d6tN6ytaTFVkBHJynl_bF8a_Grokh4,758
894
+ vellum/client/types/workflow_request_video_input_request.py,sha256=SAZ-tX5w7Cfx_u5HueZhN9BUv3K9BLlz0nnUbNc9QrE,822
891
895
  vellum/client/types/workflow_result_event.py,sha256=LRA5i2sE9cZYQwZSygp7MnKXvHP8dB9gWVVxWY2w1f0,1343
892
896
  vellum/client/types/workflow_result_event_output_data.py,sha256=S_S_h42LMnqJv9FLEEASFS3HsqX2RZHT_kQeeWOSj28,1222
893
897
  vellum/client/types/workflow_result_event_output_data_array.py,sha256=pjEc56lhN5uTtB2DLXDkzH6mwj4glGNNXKG_dCAG_Io,1318
@@ -1661,11 +1665,15 @@ vellum/types/workflow_push_exec_config.py,sha256=UCpZQx6no5gyaf-jNhqcKNqGyQ8xoKQ
1661
1665
  vellum/types/workflow_push_response.py,sha256=3R8pxlK0HXaqJFMQ3ImohWmpAfPpLn-jaHmkc1lLA6g,160
1662
1666
  vellum/types/workflow_release_tag_read.py,sha256=n4Rd4Ju2LYtE_ESjaVImf4ybpxzWWkzfuwl9ynW5xZ8,163
1663
1667
  vellum/types/workflow_release_tag_workflow_deployment_history_item.py,sha256=slQ8VEaWoC9JEJUNENmiDaLMLCKYqZa3Oggaw6x7TGI,191
1668
+ vellum/types/workflow_request_audio_input_request.py,sha256=PZ0kscIMggI1T4ihIHIZhU9SDlNpt3JLp1CB-NqJasc,174
1664
1669
  vellum/types/workflow_request_chat_history_input_request.py,sha256=eyyTyEIdhYpBzd4boLyonevA0x3QF8bkFQPTNgbYioo,181
1670
+ vellum/types/workflow_request_document_input_request.py,sha256=bGKzwRm2a6UgtUvHPtPFrmiscqt_NR2hP-VDFckLvfM,177
1671
+ vellum/types/workflow_request_image_input_request.py,sha256=5SPnlRRmRw3QHJsjY-UIkAN_Rd74XN6V1UsxyolbNPs,174
1665
1672
  vellum/types/workflow_request_input_request.py,sha256=SVJ5Zu-uuEpFEqoJwEnuHJz1ldpBm-W40b02HPE9dNg,168
1666
1673
  vellum/types/workflow_request_json_input_request.py,sha256=fkeZTjEns0R1UdA1oX8DWEmIMrwYgSy8ia0rJyOUb74,173
1667
1674
  vellum/types/workflow_request_number_input_request.py,sha256=C5GareD-9BxO_LkcWnLTaUx_O7Z3iGy760gvrT2_Iyo,175
1668
1675
  vellum/types/workflow_request_string_input_request.py,sha256=ivQxu4db3dB7tlDlD8GUiVpn6IbsPVsuxdXeA2Jtk-4,175
1676
+ vellum/types/workflow_request_video_input_request.py,sha256=x4f5IMo8EaLGz0gckHBl-1bXHP9I5QrL8A-wBa11FYc,174
1669
1677
  vellum/types/workflow_result_event.py,sha256=JifChSMV7_5gIVYwHlvOxe2JD-HfSWBfTsCQghpO0yU,159
1670
1678
  vellum/types/workflow_result_event_output_data.py,sha256=jfl2_Oo21LmC1HOsZpt2Xkm6NhsW_DY9gt1EUfxOdJU,171
1671
1679
  vellum/types/workflow_result_event_output_data_array.py,sha256=MnUSnSZgUdFSOblnHhV6juyLEDvanINvmXCo7ixwZVw,177
@@ -1718,8 +1726,8 @@ vellum/workflows/events/stream.py,sha256=xhXJTZirFi0xad5neAQNogrIQ4h47fpnKbVC3vC
1718
1726
  vellum/workflows/events/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
1719
1727
  vellum/workflows/events/tests/test_basic_workflow.py,sha256=Pj6orHsXz37jWC5FARi0Sx2Gjf99Owri2Cvr6Chb79k,1765
1720
1728
  vellum/workflows/events/tests/test_event.py,sha256=c2pM8ZOuES_8XjLYP4cU4cChrZUZ1ZZ3HUNIaaPAxXk,18411
1721
- vellum/workflows/events/types.py,sha256=5iU8KmS_fl0l42XBQshiNLPl2yLdPMEQKQ8nYP--0L0,4940
1722
- vellum/workflows/events/workflow.py,sha256=gjg4Dt5i40jaTMK_-AaGtW9lzX1JGn3FUAu1XqhduJ8,8753
1729
+ vellum/workflows/events/types.py,sha256=mVrqAH9Hs9SpXm08Hcxdyap_ImQPwGsxRr56rSNMP34,5043
1730
+ vellum/workflows/events/workflow.py,sha256=rAj2jH94t-bWqtQRtG8mkxXpQxIfqux06QtKdFK_L54,8960
1723
1731
  vellum/workflows/exceptions.py,sha256=NiBiR3ggfmPxBVqD-H1SqmjI-7mIn0EStSN1BqApvCM,1213
1724
1732
  vellum/workflows/expressions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
1725
1733
  vellum/workflows/expressions/accessor.py,sha256=3lu1-_-dBfZdJvtX-q66jbmRAZtqIfdsh_3_JNuzg1E,4462
@@ -1776,9 +1784,9 @@ vellum/workflows/inputs/tests/test_inputs.py,sha256=lioA8917mFLYq7Ml69UNkqUjcWbb
1776
1784
  vellum/workflows/integrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
1777
1785
  vellum/workflows/integrations/composio_service.py,sha256=rSliaZtNiBcDSvDxz9k5i1KkyUIrbxyegu0yU9cDByU,6023
1778
1786
  vellum/workflows/integrations/mcp_service.py,sha256=9DYb8dg2_kgc1UOu830kxhaFlt9yTbhKPhK3L6kb1t4,9831
1779
- vellum/workflows/integrations/tests/test_mcp_service.py,sha256=xQVtcqRbgq6Bx4pyxLdgUtZFNGISPfISvpXcyd0U6Hc,4595
1787
+ vellum/workflows/integrations/tests/test_mcp_service.py,sha256=q_DYrDkIqI4sQBNgID4YdbM4e9tneLVWY8YmI4R26d8,8859
1780
1788
  vellum/workflows/logging.py,sha256=_a217XogktV4Ncz6xKFz7WfYmZAzkfVRVuC0rWob8ls,437
1781
- vellum/workflows/nodes/__init__.py,sha256=aVdQVv7Y3Ro3JlqXGpxwaU2zrI06plDHD2aumH5WUIs,1157
1789
+ vellum/workflows/nodes/__init__.py,sha256=zymtc3_iW2rFmMR-sayTLuN6ZsAw8VnJweWPsjQk2-Q,1197
1782
1790
  vellum/workflows/nodes/bases/__init__.py,sha256=cniHuz_RXdJ4TQgD8CBzoiKDiPxg62ErdVpCbWICX64,58
1783
1791
  vellum/workflows/nodes/bases/base.py,sha256=9vOPHP6K6oK36bEby1KFRXpMevMwq6slwuSRhC-bWFc,20752
1784
1792
  vellum/workflows/nodes/bases/base_adornment_node.py,sha256=hrgzuTetM4ynPd9YGHoK8Vwwn4XITi3aZZ_OCnQrq4Y,3433
@@ -1807,7 +1815,7 @@ vellum/workflows/nodes/core/try_node/__init__.py,sha256=JVD4DrldTIqFQQFrubs9KtWC
1807
1815
  vellum/workflows/nodes/core/try_node/node.py,sha256=XdyOvlwQ3m4h0-_WNtaBl2t_CdlzPXclulkLOtUcX3E,4388
1808
1816
  vellum/workflows/nodes/core/try_node/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
1809
1817
  vellum/workflows/nodes/core/try_node/tests/test_node.py,sha256=h6eUc3SggvhzBWlOD0PrPUlkoCSQHwjqYn81VkxSIxU,4948
1810
- vellum/workflows/nodes/displayable/__init__.py,sha256=zH7SFotr4i8sO-r5_k53yPipQwDouDmHxTfCE6dXAoU,1093
1818
+ vellum/workflows/nodes/displayable/__init__.py,sha256=7U82xW397jdeo0910ksf_Twx6etn5xtiKcZIsB9TOE8,1157
1811
1819
  vellum/workflows/nodes/displayable/api_node/__init__.py,sha256=MoxdQSnidIj1Nf_d-hTxlOxcZXaZnsWFDbE-PkTK24o,56
1812
1820
  vellum/workflows/nodes/displayable/api_node/node.py,sha256=F7ucsuEmrVYlTKMIoi60fFJ_ELYgGuc7jEmJCEyQczw,2956
1813
1821
  vellum/workflows/nodes/displayable/api_node/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -1880,7 +1888,11 @@ vellum/workflows/nodes/displayable/tool_calling_node/tests/__init__.py,sha256=47
1880
1888
  vellum/workflows/nodes/displayable/tool_calling_node/tests/test_composio_service.py,sha256=in1fbEz5x1tx3uKv9YXdvOncsHucNL8Ro6Go7lBuuOQ,8962
1881
1889
  vellum/workflows/nodes/displayable/tool_calling_node/tests/test_node.py,sha256=GZoeybB9uM7ai8sBLAtUMHrMVgh-WrJDWrKZci6feDs,11892
1882
1890
  vellum/workflows/nodes/displayable/tool_calling_node/tests/test_utils.py,sha256=SIu5GCj4tIE4fz-cAcdULtQfqZIhrcc3Doo6TWLXBws,8804
1883
- vellum/workflows/nodes/displayable/tool_calling_node/utils.py,sha256=7pM6MH3Z7r0k7Kpr3d-26QXUo_4GrxLflKwFTxRPREY,22844
1891
+ vellum/workflows/nodes/displayable/tool_calling_node/utils.py,sha256=ACEfl2pY65sO0DaMYxuecx2Kxg32HpSh7XXpp8U1J84,23459
1892
+ vellum/workflows/nodes/displayable/web_search_node/__init__.py,sha256=8FOnEP-n-U68cvxTlJW9wphIAGHq5aqjzLM-DoSSXnU,61
1893
+ vellum/workflows/nodes/displayable/web_search_node/node.py,sha256=NQYux2bOtuBF5E4tn-fXi5y3btURPRrNqMSM9MAZYI4,5091
1894
+ vellum/workflows/nodes/displayable/web_search_node/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
1895
+ vellum/workflows/nodes/displayable/web_search_node/tests/test_node.py,sha256=H3titxCYFsfIJ3EDeRL6Pe9I-tdKMRt1axOwb2qIw6U,10983
1884
1896
  vellum/workflows/nodes/experimental/README.md,sha256=eF6DfIL8t-HbF9-mcofOMymKrraiBHDLKTlnBa51ZiE,284
1885
1897
  vellum/workflows/nodes/experimental/__init__.py,sha256=jCQgvZEknXKfuNhGSOou4XPfrPqZ1_XBj5F0n0fgiWM,106
1886
1898
  vellum/workflows/nodes/experimental/openai_chat_completion_node/__init__.py,sha256=lsyD9laR9p7kx5-BXGH2gUTM242UhKy8SMV0SR6S2iE,90
@@ -1910,15 +1922,16 @@ vellum/workflows/references/tests/test_lazy.py,sha256=0s50-LizMTlSTBQahpK0fg_xqC
1910
1922
  vellum/workflows/references/vellum_secret.py,sha256=Od4d19a5yletWMqNfJR5d_mZQUkVcFzj29mE-T9J7yE,480
1911
1923
  vellum/workflows/references/workflow_input.py,sha256=W3rOK1EPd2gYHb04WJwmNm1CUSdvZ9LKrs8RMKxACBs,1751
1912
1924
  vellum/workflows/resolvers/__init__.py,sha256=eH6hTvZO4IciDaf_cf7aM2vs-DkBDyJPycOQevJxQnI,82
1913
- vellum/workflows/resolvers/base.py,sha256=1jwWJPE0CVJdYJTZBd2ktscl-TK1WNgr4V95Q0ATH0o,1078
1914
- vellum/workflows/resolvers/resolver.py,sha256=4A3e-Kr65VEPQedn-q_Mne-Ln7JvK95rM35K2kUsqB8,1463
1915
- vellum/workflows/resolvers/tests/test_resolver.py,sha256=U4LKQ6-UBU-7nJ39uSkxW9Y5n17tPh5ZTlSYb4jzFjY,2138
1925
+ vellum/workflows/resolvers/base.py,sha256=wrQiSC02Bw4-dBwgFjJIHsjpe-4xz4rUJs_1RdErKA0,1164
1926
+ vellum/workflows/resolvers/resolver.py,sha256=0Y9ArmN_2Gu62TpgYjFvSzhFMMFy7oGWOJh9zg3jaFk,4085
1927
+ vellum/workflows/resolvers/tests/test_resolver.py,sha256=JX6-zjIQShNvt4XYmub6zmY0iUf6z90KZynqvEd33qA,5202
1928
+ vellum/workflows/resolvers/types.py,sha256=Hndhlk69g6EKLh_LYg5ILepW5U_h_BYNllfzhS9k8p4,237
1916
1929
  vellum/workflows/runner/__init__.py,sha256=i1iG5sAhtpdsrlvwgH6B-m49JsINkiWyPWs8vyT-bqM,72
1917
- vellum/workflows/runner/runner.py,sha256=sADrp593ia4auJ8fIP6jc5na3b5WaTvvBdjpkTthboY,36929
1930
+ vellum/workflows/runner/runner.py,sha256=jdFFDr-MCVzTm5NKEzOgrw_9osuwdiVk97SRo73uLRQ,39366
1918
1931
  vellum/workflows/sandbox.py,sha256=jwlFFQjHDwmbVoBah_Q3i8K_BrzOt-F6TXFauiyVyIk,3021
1919
1932
  vellum/workflows/state/__init__.py,sha256=yUUdR-_Vl7UiixNDYQZ-GEM_kJI9dnOia75TtuNEsnE,60
1920
1933
  vellum/workflows/state/base.py,sha256=m9fCqbZn21GshCVCjJTD1dPZEQjFrsMXqlg7tM9fIwM,24283
1921
- vellum/workflows/state/context.py,sha256=xcDe7FB_omse3lLCZkWigcEQvk-hnhruENItaqXNUGo,6956
1934
+ vellum/workflows/state/context.py,sha256=khM30U1iDNts5Xp8LXa_WfpkITNITexrDUUFJ5wZ2W4,8445
1922
1935
  vellum/workflows/state/delta.py,sha256=7h8wR10lRCm15SykaPj-gSEvvsMjCwYLPsOx3nsvBQg,440
1923
1936
  vellum/workflows/state/encoder.py,sha256=HdNlabmBOcFSeY_dgn4LNtQEugyzsw3p4mvn2ChC1Io,3380
1924
1937
  vellum/workflows/state/store.py,sha256=uVe-oN73KwGV6M6YLhwZMMUQhzTQomsVfVnb8V91gVo,1147
@@ -1949,15 +1962,16 @@ vellum/workflows/utils/tests/test_uuids.py,sha256=i77ABQ0M3S-aFLzDXHJq_yr5FPkJEW
1949
1962
  vellum/workflows/utils/tests/test_vellum_variables.py,sha256=vbnKgm41aB5OXlO-ZIPbhQ6xDiZkT8KMxCLqz4zocWY,1791
1950
1963
  vellum/workflows/utils/uuids.py,sha256=IaZQANz7fhF7la0_J1O50Y6D2PIYv_taRDTRzBT9aWw,1284
1951
1964
  vellum/workflows/utils/vellum_variables.py,sha256=-CohqD3AeyCYzqwyrPZ7mt_lt7ibWLyx0MuS484feJk,5503
1965
+ vellum/workflows/utils/zip.py,sha256=HVg_YZLmBOTXKaDV3Xhaf3V6sYnfqqZXQ8CpuafkbPY,1181
1952
1966
  vellum/workflows/vellum_client.py,sha256=xkfoucodxNK5JR2-lbRqZx3xzDgExWkP6kySrpi_Ubc,1079
1953
1967
  vellum/workflows/workflows/__init__.py,sha256=KY45TqvavCCvXIkyCFMEc0dc6jTMOUci93U2DUrlZYc,66
1954
- vellum/workflows/workflows/base.py,sha256=-hu_s2LQcV7zeBumMHFwezD4ctV7VUvDI4mpMdNRkCI,27488
1968
+ vellum/workflows/workflows/base.py,sha256=PT7Hveate5A4Nt1UQoS6wwFehxgZQ5fuYjS1vLnlkl0,28008
1955
1969
  vellum/workflows/workflows/event_filters.py,sha256=GSxIgwrX26a1Smfd-6yss2abGCnadGsrSZGa7t7LpJA,2008
1956
1970
  vellum/workflows/workflows/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
1957
1971
  vellum/workflows/workflows/tests/test_base_workflow.py,sha256=ptMntHzVyy8ZuzNgeTuk7hREgKQ5UBdgq8VJFSGaW4Y,20832
1958
1972
  vellum/workflows/workflows/tests/test_context.py,sha256=VJBUcyWVtMa_lE5KxdhgMu0WYNYnUQUDvTF7qm89hJ0,2333
1959
- vellum_ai-1.2.5.dist-info/LICENSE,sha256=hOypcdt481qGNISA784bnAGWAE6tyIf9gc2E78mYC3E,1574
1960
- vellum_ai-1.2.5.dist-info/METADATA,sha256=pez3o4cs4bFWAYjNMO2FyJR942rNI_Ht_KzWysTXyKU,5547
1961
- vellum_ai-1.2.5.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
1962
- vellum_ai-1.2.5.dist-info/entry_points.txt,sha256=HCH4yc_V3J_nDv3qJzZ_nYS8llCHZViCDP1ejgCc5Ak,42
1963
- vellum_ai-1.2.5.dist-info/RECORD,,
1973
+ vellum_ai-1.3.1.dist-info/LICENSE,sha256=hOypcdt481qGNISA784bnAGWAE6tyIf9gc2E78mYC3E,1574
1974
+ vellum_ai-1.3.1.dist-info/METADATA,sha256=8eP8UQcNY66V3X1QK8GmDgvQnyi_hHztrZQNUMTCT1M,5547
1975
+ vellum_ai-1.3.1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
1976
+ vellum_ai-1.3.1.dist-info/entry_points.txt,sha256=HCH4yc_V3J_nDv3qJzZ_nYS8llCHZViCDP1ejgCc5Ak,42
1977
+ vellum_ai-1.3.1.dist-info/RECORD,,
@@ -1,31 +1,14 @@
1
- import io
2
1
  import json
3
2
  import os
4
3
  from unittest.mock import patch
5
- import zipfile
6
4
 
7
5
  from click.testing import CliRunner
8
6
  from pydash import snake_case
9
7
 
8
+ from vellum.workflows.utils.zip import zip_file_map
10
9
  from vellum_cli import main as cli_main
11
10
 
12
11
 
13
- def _zip_file_map(file_map: dict[str, str]) -> bytes:
14
- # Create an in-memory bytes buffer to store the zip
15
- zip_buffer = io.BytesIO()
16
-
17
- # Create zip file and add files from file_map
18
- with zipfile.ZipFile(zip_buffer, "w", zipfile.ZIP_DEFLATED) as zip_file:
19
- for filename, content in file_map.items():
20
- zip_file.writestr(filename, content)
21
-
22
- # Get the bytes from the buffer
23
- zip_bytes = zip_buffer.getvalue()
24
- zip_buffer.close()
25
-
26
- return zip_bytes
27
-
28
-
29
12
  class MockTemplate:
30
13
  def __init__(self, id, label):
31
14
  self.id = id
@@ -44,7 +27,7 @@ def test_init_command(vellum_client, mock_module):
44
27
  vellum_client.workflow_sandboxes.list_workflow_sandbox_examples.return_value.results = fake_templates
45
28
 
46
29
  # AND the workflow pull API call returns a zip file
47
- vellum_client.workflows.pull.return_value = iter([_zip_file_map({"workflow.py": "print('hello')"})])
30
+ vellum_client.workflows.pull.return_value = iter([zip_file_map({"workflow.py": "print('hello')"})])
48
31
 
49
32
  # WHEN the user runs the `init` command and selects the first template
50
33
  runner = CliRunner()
@@ -173,7 +156,7 @@ def test_init_command_target_directory_exists(vellum_client, mock_module):
173
156
  vellum_client.workflow_sandboxes.list_workflow_sandbox_examples.return_value.results = fake_templates
174
157
 
175
158
  # AND the workflow pull API call returns a zip file
176
- vellum_client.workflows.pull.return_value = iter([_zip_file_map({"workflow.py": "print('hello')"})])
159
+ vellum_client.workflows.pull.return_value = iter([zip_file_map({"workflow.py": "print('hello')"})])
177
160
 
178
161
  # WHEN the user runs the `init` command and selects the template
179
162
  runner = CliRunner()
@@ -214,7 +197,7 @@ def test_init_command_with_template_name(vellum_client, mock_module):
214
197
  vellum_client.workflow_sandboxes.list_workflow_sandbox_examples.return_value.results = fake_templates
215
198
 
216
199
  # AND the workflow pull API call returns a zip file
217
- vellum_client.workflows.pull.return_value = iter([_zip_file_map({"workflow.py": "print('hello')"})])
200
+ vellum_client.workflows.pull.return_value = iter([zip_file_map({"workflow.py": "print('hello')"})])
218
201
 
219
202
  # WHEN the user runs the `init` command with a specific template name
220
203
  template_name = snake_case("Another Workflow")
@@ -309,7 +292,7 @@ def test_init__with_target_dir(vellum_client, mock_module):
309
292
  vellum_client.workflow_sandboxes.list_workflow_sandbox_examples.return_value.results = fake_templates
310
293
 
311
294
  # AND the workflow pull API call returns a zip file
312
- vellum_client.workflows.pull.return_value = iter([_zip_file_map({"workflow.py": "print('hello')"})])
295
+ vellum_client.workflows.pull.return_value = iter([zip_file_map({"workflow.py": "print('hello')"})])
313
296
 
314
297
  # AND a target directory
315
298
  target_dir = os.path.join(temp_dir, "dir")
@@ -364,7 +347,7 @@ def test_init__with_nested_target_dir(vellum_client, mock_module):
364
347
  vellum_client.workflow_sandboxes.list_workflow_sandbox_examples.return_value.results = fake_templates
365
348
 
366
349
  # AND the workflow pull API call returns a zip file
367
- vellum_client.workflows.pull.return_value = iter([_zip_file_map({"workflow.py": "print('hello')"})])
350
+ vellum_client.workflows.pull.return_value = iter([zip_file_map({"workflow.py": "print('hello')"})])
368
351
 
369
352
  # AND a nested target directory that doesn't exist yet
370
353
  nested_target_dir = os.path.join(temp_dir, "dir-1", "dir-2")
@@ -422,7 +405,7 @@ def test_init__with_template_name_and_target_dir(vellum_client, mock_module):
422
405
  vellum_client.workflow_sandboxes.list_workflow_sandbox_examples.return_value.results = fake_templates
423
406
 
424
407
  # AND the workflow pull API call returns a zip file
425
- vellum_client.workflows.pull.return_value = iter([_zip_file_map({"workflow.py": "print('hello')"})])
408
+ vellum_client.workflows.pull.return_value = iter([zip_file_map({"workflow.py": "print('hello')"})])
426
409
 
427
410
  # AND a target directory
428
411
  target_dir = os.path.join(temp_dir, "dir")
@@ -1,34 +1,17 @@
1
1
  import pytest
2
- import io
3
2
  import json
4
3
  import os
5
4
  import tempfile
6
5
  from unittest import mock
7
6
  from uuid import uuid4
8
- import zipfile
9
7
 
10
8
  from click.testing import CliRunner
11
9
 
12
10
  from vellum.client.core.api_error import ApiError
11
+ from vellum.workflows.utils.zip import zip_file_map
13
12
  from vellum_cli import main as cli_main
14
13
 
15
14
 
16
- def _zip_file_map(file_map: dict[str, str]) -> bytes:
17
- # Create an in-memory bytes buffer to store the zip
18
- zip_buffer = io.BytesIO()
19
-
20
- # Create zip file and add files from file_map
21
- with zipfile.ZipFile(zip_buffer, "w", zipfile.ZIP_DEFLATED) as zip_file:
22
- for filename, content in file_map.items():
23
- zip_file.writestr(filename, content)
24
-
25
- # Get the bytes from the buffer
26
- zip_bytes = zip_buffer.getvalue()
27
- zip_buffer.close()
28
-
29
- return zip_bytes
30
-
31
-
32
15
  @pytest.mark.parametrize(
33
16
  "base_command",
34
17
  [
@@ -44,7 +27,7 @@ def test_pull(vellum_client, mock_module, base_command):
44
27
  workflow_sandbox_id = mock_module.workflow_sandbox_id
45
28
 
46
29
  # AND the workflow pull API call returns a zip file
47
- vellum_client.workflows.pull.return_value = iter([_zip_file_map({"workflow.py": "print('hello')"})])
30
+ vellum_client.workflows.pull.return_value = iter([zip_file_map({"workflow.py": "print('hello')"})])
48
31
 
49
32
  # WHEN the user runs the pull command
50
33
  runner = CliRunner()
@@ -89,7 +72,7 @@ def test_pull__second_module(vellum_client, mock_module):
89
72
  set_pyproject_toml = mock_module.set_pyproject_toml
90
73
 
91
74
  # AND the workflow pull API call returns a zip file
92
- vellum_client.workflows.pull.return_value = iter([_zip_file_map({"workflow.py": "print('hello')"})])
75
+ vellum_client.workflows.pull.return_value = iter([zip_file_map({"workflow.py": "print('hello')"})])
93
76
 
94
77
  # AND the module we're about to pull is configured second
95
78
  set_pyproject_toml(
@@ -134,7 +117,7 @@ def test_pull__with_target_dir(vellum_client, mock_module, base_command):
134
117
  os.makedirs(target_dir, exist_ok=True)
135
118
 
136
119
  # AND the workflow pull API call returns a zip file
137
- vellum_client.workflows.pull.return_value = iter([_zip_file_map({"workflow.py": "print('hello')"})])
120
+ vellum_client.workflows.pull.return_value = iter([zip_file_map({"workflow.py": "print('hello')"})])
138
121
 
139
122
  # WHEN the user runs the pull command with target-dir
140
123
  runner = CliRunner()
@@ -195,7 +178,7 @@ def test_pull__with_nested_target_dir(vellum_client, mock_module, base_command):
195
178
  nested_target_dir = os.path.join(temp_dir, "dir-1", "dir-2")
196
179
 
197
180
  # AND the workflow pull API call returns a zip file
198
- vellum_client.workflows.pull.return_value = iter([_zip_file_map({"workflow.py": "print('hello')"})])
181
+ vellum_client.workflows.pull.return_value = iter([zip_file_map({"workflow.py": "print('hello')"})])
199
182
 
200
183
  # WHEN the user runs the pull command with nested target-dir
201
184
  runner = CliRunner()
@@ -250,11 +233,7 @@ def test_pull__sandbox_id_with_no_config(vellum_client):
250
233
 
251
234
  # AND the workflow pull API call returns a zip file
252
235
  vellum_client.workflows.pull.return_value = iter(
253
- [
254
- _zip_file_map(
255
- {"workflow.py": "print('hello')", "metadata.json": json.dumps({"label": "Super Cool Workflow"})}
256
- )
257
- ]
236
+ [zip_file_map({"workflow.py": "print('hello')", "metadata.json": json.dumps({"label": "Super Cool Workflow"})})]
258
237
  )
259
238
 
260
239
  # AND we are currently in a new directory
@@ -309,11 +288,7 @@ def test_pull__sandbox_id_with_other_workflow_configured(vellum_client, mock_mod
309
288
 
310
289
  # AND the workflow pull API call returns a zip file
311
290
  vellum_client.workflows.pull.return_value = iter(
312
- [
313
- _zip_file_map(
314
- {"workflow.py": "print('hello')", "metadata.json": json.dumps({"label": "Super Cool Workflow"})}
315
- )
316
- ]
291
+ [zip_file_map({"workflow.py": "print('hello')", "metadata.json": json.dumps({"label": "Super Cool Workflow"})})]
317
292
  )
318
293
 
319
294
  # WHEN the user runs the pull command with the new workflow sandbox id
@@ -343,7 +318,7 @@ def test_pull__workflow_deployment_with_no_config(vellum_client):
343
318
  # AND the workflow pull API call returns a zip file
344
319
  vellum_client.workflows.pull.return_value = iter(
345
320
  [
346
- _zip_file_map(
321
+ zip_file_map(
347
322
  {
348
323
  "workflow.py": "print('hello')",
349
324
  "metadata.json": json.dumps(
@@ -414,7 +389,7 @@ def test_pull__both_workflow_sandbox_id_and_deployment(vellum_client):
414
389
  workflow_deployment = "my-deployment"
415
390
 
416
391
  # AND the workflow pull API call returns a zip file
417
- vellum_client.workflows.pull.return_value = iter([_zip_file_map({"workflow.py": "print('hello')"})])
392
+ vellum_client.workflows.pull.return_value = iter([zip_file_map({"workflow.py": "print('hello')"})])
418
393
 
419
394
  # AND we are currently in a new directory
420
395
  current_dir = os.getcwd()
@@ -447,7 +422,7 @@ def test_pull__remove_missing_files(vellum_client, mock_module):
447
422
  module = mock_module.module
448
423
 
449
424
  # AND the workflow pull API call returns a zip file
450
- vellum_client.workflows.pull.return_value = iter([_zip_file_map({"workflow.py": "print('hello')"})])
425
+ vellum_client.workflows.pull.return_value = iter([zip_file_map({"workflow.py": "print('hello')"})])
451
426
 
452
427
  # AND there is already a different file in the module directory
453
428
  other_file_path = os.path.join(temp_dir, *module.split("."), "other_file.py")
@@ -478,7 +453,7 @@ def test_pull__remove_missing_files__ignore_pattern(vellum_client, mock_module):
478
453
  set_pyproject_toml = mock_module.set_pyproject_toml
479
454
 
480
455
  # AND the workflow pull API call returns a zip file
481
- vellum_client.workflows.pull.return_value = iter([_zip_file_map({"workflow.py": "print('hello')"})])
456
+ vellum_client.workflows.pull.return_value = iter([zip_file_map({"workflow.py": "print('hello')"})])
482
457
 
483
458
  # AND there is already a different file in the module directory
484
459
  other_file_path = os.path.join(temp_dir, *module.split("."), "other_file.py")
@@ -530,7 +505,7 @@ def test_pull__include_json(vellum_client, mock_module):
530
505
 
531
506
  # AND the workflow pull API call returns a zip file
532
507
  vellum_client.workflows.pull.return_value = iter(
533
- [_zip_file_map({"workflow.py": "print('hello')", "workflow.json": "{}"})]
508
+ [zip_file_map({"workflow.py": "print('hello')", "workflow.json": "{}"})]
534
509
  )
535
510
 
536
511
  # WHEN the user runs the pull command
@@ -552,7 +527,7 @@ def test_pull__exclude_code(vellum_client, mock_module):
552
527
 
553
528
  # AND the workflow pull API call returns a zip file
554
529
  vellum_client.workflows.pull.return_value = iter(
555
- [_zip_file_map({"workflow.py": "print('hello')", "workflow.json": "{}"})]
530
+ [zip_file_map({"workflow.py": "print('hello')", "workflow.json": "{}"})]
556
531
  )
557
532
 
558
533
  # WHEN the user runs the pull command
@@ -606,7 +581,7 @@ def test_pull__sandbox_id_with_other_workflow_deployment_in_lock(vellum_client,
606
581
  # AND the workflow pull API call returns a zip file
607
582
  vellum_client.workflows.pull.return_value = iter(
608
583
  [
609
- _zip_file_map(
584
+ zip_file_map(
610
585
  {
611
586
  "workflow.py": "print('hello')",
612
587
  "metadata.json": json.dumps(
@@ -671,7 +646,7 @@ def test_pull__handle_error_log(vellum_client, mock_module):
671
646
 
672
647
  # AND the workflow pull API call returns a zip file with an error log
673
648
  vellum_client.workflows.pull.return_value = iter(
674
- [_zip_file_map({"workflow.py": "print('hello')", "error.log": "test error"})]
649
+ [zip_file_map({"workflow.py": "print('hello')", "error.log": "test error"})]
675
650
  )
676
651
 
677
652
  # WHEN the user runs the pull command with the new workflow sandbox id
@@ -693,7 +668,7 @@ def test_pull__strict__with_error(vellum_client, mock_module):
693
668
  workflow_sandbox_id = mock_module.workflow_sandbox_id
694
669
 
695
670
  # AND the workflow pull API call returns a zip file
696
- vellum_client.workflows.pull.return_value = iter([_zip_file_map({"workflow.py": "print('hello')"})])
671
+ vellum_client.workflows.pull.return_value = iter([zip_file_map({"workflow.py": "print('hello')"})])
697
672
 
698
673
  # WHEN the user runs the pull command with the new workflow sandbox id
699
674
  runner = CliRunner()
@@ -715,7 +690,7 @@ def test_pull__include_sandbox(vellum_client, mock_module):
715
690
 
716
691
  # AND the workflow pull API call returns a zip file
717
692
  vellum_client.workflows.pull.return_value = iter(
718
- [_zip_file_map({"workflow.py": "print('hello')", "sandbox.py": "print('hello')"})]
693
+ [zip_file_map({"workflow.py": "print('hello')", "sandbox.py": "print('hello')"})]
719
694
  )
720
695
 
721
696
  # WHEN the user runs the pull command
@@ -744,7 +719,7 @@ def test_pull__same_pull_twice__one_entry_in_lockfile(vellum_client, mock_module
744
719
  workflow_sandbox_id = mock_module.workflow_sandbox_id
745
720
 
746
721
  # AND the workflow pull API call returns a zip file both times
747
- zip_contents = _zip_file_map({"workflow.py": "print('hello')"})
722
+ zip_contents = zip_file_map({"workflow.py": "print('hello')"})
748
723
  responses = iter([zip_contents, zip_contents])
749
724
 
750
725
  def workflows_pull_side_effect(*_args, **_kwargs):
@@ -780,7 +755,7 @@ def test_pull__module_not_in_config(vellum_client, mock_module):
780
755
  set_pyproject_toml({"workflows": []})
781
756
 
782
757
  # AND the workflow pull API call returns a zip file
783
- vellum_client.workflows.pull.return_value = iter([_zip_file_map({"workflow.py": "print('hello')"})])
758
+ vellum_client.workflows.pull.return_value = iter([zip_file_map({"workflow.py": "print('hello')"})])
784
759
 
785
760
  # WHEN the user runs the pull command again with the workflow sandbox id and module
786
761
  runner = CliRunner()
@@ -833,7 +808,7 @@ def test_pull__multiple_instances_of_same_module__keep_when_pulling_another_modu
833
808
  json.dump(lock_data, f)
834
809
 
835
810
  # AND the workflow pull API call returns a zip file
836
- vellum_client.workflows.pull.return_value = iter([_zip_file_map({"workflow.py": "print('hello')"})])
811
+ vellum_client.workflows.pull.return_value = iter([zip_file_map({"workflow.py": "print('hello')"})])
837
812
 
838
813
  # WHEN the user runs the pull command on the new module
839
814
  runner = CliRunner()
@@ -856,7 +831,7 @@ def test_pull__module_name_from_deployment_name(vellum_client):
856
831
  deployment_name = "Test Deployment"
857
832
  vellum_client.workflows.pull.return_value = iter(
858
833
  [
859
- _zip_file_map(
834
+ zip_file_map(
860
835
  {
861
836
  "workflow.py": "print('hello')",
862
837
  "metadata.json": json.dumps({"deployment_name": deployment_name, "label": "Some Label"}),
@@ -995,7 +970,7 @@ def test_pull__workflow_deployment_adds_deployment_to_config(vellum_client, work
995
970
  # AND the workflow pull API call returns a zip file with metadata
996
971
  vellum_client.workflows.pull.return_value = iter(
997
972
  [
998
- _zip_file_map(
973
+ zip_file_map(
999
974
  {
1000
975
  "workflow.py": "print('hello')",
1001
976
  "metadata.json": json.dumps(
@@ -1082,7 +1057,7 @@ def test_pull__workflow_deployment_name_is_uuid(vellum_client):
1082
1057
  updated_label = "Updated Label"
1083
1058
  vellum_client.workflows.pull.return_value = iter(
1084
1059
  [
1085
- _zip_file_map(
1060
+ zip_file_map(
1086
1061
  {
1087
1062
  "workflow.py": "print('hello')",
1088
1063
  "metadata.json": json.dumps(
@@ -1170,7 +1145,7 @@ def test_pull__workflow_deployment_updates_existing_deployment(vellum_client, ge
1170
1145
  updated_label = "Updated Label"
1171
1146
  vellum_client.workflows.pull.return_value = iter(
1172
1147
  [
1173
- _zip_file_map(
1148
+ zip_file_map(
1174
1149
  {
1175
1150
  "workflow.py": "print('hello')",
1176
1151
  "metadata.json": json.dumps(
@@ -1218,7 +1193,7 @@ def test_pull__workflow_deployment_with_name_and_id(vellum_client):
1218
1193
  # AND the workflow pull API call returns a zip file with metadata
1219
1194
  vellum_client.workflows.pull.return_value = iter(
1220
1195
  [
1221
- _zip_file_map(
1196
+ zip_file_map(
1222
1197
  {
1223
1198
  "workflow.py": "print('hello')",
1224
1199
  "metadata.json": json.dumps(
@@ -1264,7 +1239,7 @@ def test_pull__workflow_deployment_with_name_and_id(vellum_client):
1264
1239
  # AND pull with name will not add a new deployment to the config
1265
1240
  vellum_client.workflows.pull.return_value = iter(
1266
1241
  [
1267
- _zip_file_map(
1242
+ zip_file_map(
1268
1243
  {
1269
1244
  "workflow.py": "print('hello')",
1270
1245
  "metadata.json": json.dumps(
@@ -1323,7 +1298,7 @@ MY_OTHER_VELLUM_API_KEY=aaabbbcccddd
1323
1298
 
1324
1299
  # AND the workflow pull API call returns a zip file
1325
1300
  vellum_client_class.return_value.workflows.pull.return_value = iter(
1326
- [_zip_file_map({"workflow.py": "print('hello')"})]
1301
+ [zip_file_map({"workflow.py": "print('hello')"})]
1327
1302
  )
1328
1303
 
1329
1304
  # WHEN calling `vellum pull` with --workspace