vellum-ai 1.7.7__py3-none-any.whl → 1.7.8__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/reference.md +16 -0
- vellum/client/resources/ad_hoc/raw_client.py +2 -2
- vellum/client/resources/integration_providers/client.py +20 -0
- vellum/client/resources/integration_providers/raw_client.py +20 -0
- vellum/client/types/integration_name.py +1 -0
- vellum/client/types/workflow_execution_fulfilled_body.py +1 -0
- vellum/workflows/nodes/core/map_node/node.py +10 -0
- vellum/workflows/nodes/core/templating_node/tests/test_templating_node.py +49 -1
- vellum/workflows/nodes/tests/test_utils.py +7 -1
- vellum/workflows/nodes/utils.py +1 -1
- vellum/workflows/references/__init__.py +2 -0
- vellum/workflows/references/trigger.py +83 -0
- vellum/workflows/state/base.py +49 -1
- vellum/workflows/triggers/__init__.py +2 -1
- vellum/workflows/triggers/base.py +140 -3
- vellum/workflows/triggers/integration.py +31 -26
- vellum/workflows/triggers/slack.py +101 -0
- vellum/workflows/triggers/tests/test_integration.py +55 -31
- vellum/workflows/triggers/tests/test_slack.py +180 -0
- {vellum_ai-1.7.7.dist-info → vellum_ai-1.7.8.dist-info}/METADATA +1 -1
- {vellum_ai-1.7.7.dist-info → vellum_ai-1.7.8.dist-info}/RECORD +28 -24
- vellum_ee/workflows/display/base.py +3 -0
- vellum_ee/workflows/display/tests/workflow_serialization/test_slack_trigger_serialization.py +167 -0
- vellum_ee/workflows/display/workflows/base_workflow_display.py +22 -6
- {vellum_ai-1.7.7.dist-info → vellum_ai-1.7.8.dist-info}/LICENSE +0 -0
- {vellum_ai-1.7.7.dist-info → vellum_ai-1.7.8.dist-info}/WHEEL +0 -0
- {vellum_ai-1.7.7.dist-info → vellum_ai-1.7.8.dist-info}/entry_points.txt +0 -0
@@ -27,7 +27,7 @@ vellum_ee/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
27
27
|
vellum_ee/scripts/generate_node_definitions.py,sha256=FOYQsXIqU45I0OAcsyZUGODF9JK44yunf58rR6YaAdA,3303
|
28
28
|
vellum_ee/workflows/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
29
29
|
vellum_ee/workflows/display/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
30
|
-
vellum_ee/workflows/display/base.py,sha256=
|
30
|
+
vellum_ee/workflows/display/base.py,sha256=kAvaZ9XeA6MEgY0sorlrEBjjH5BUN-Hk5ySdtG2yO0c,2760
|
31
31
|
vellum_ee/workflows/display/editor/__init__.py,sha256=MSAgY91xCEg2neH5d8jXx5wRdR962ftZVa6vO9BGq9k,167
|
32
32
|
vellum_ee/workflows/display/editor/types.py,sha256=rmaNXkNZUNRgK-mJJ_g1-Fm3OGxoQfqEB7zn-zzgJtc,664
|
33
33
|
vellum_ee/workflows/display/exceptions.py,sha256=_FDhK-lfuBPHY2GSywp70ewM0k55Ji5Bp-wZlEZenz4,112
|
@@ -111,6 +111,7 @@ vellum_ee/workflows/display/tests/workflow_serialization/test_basic_try_node_ser
|
|
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
113
|
vellum_ee/workflows/display/tests/workflow_serialization/test_manual_trigger_serialization.py,sha256=sd0lbity6yVIJ3HbMZEcL1wJEYoihqVW2Bjx8YMmrAM,3657
|
114
|
+
vellum_ee/workflows/display/tests/workflow_serialization/test_slack_trigger_serialization.py,sha256=lBCzNJHmP_Z7_QEnzBO2FYvjJzVm8-lHxb9buivrqZk,4971
|
114
115
|
vellum_ee/workflows/display/tests/workflow_serialization/test_terminal_node_any_serialization.py,sha256=4WAmSEJZlDBLPhsD1f4GwY9ahB9F6qJKGnL6j7ZYlzQ,1740
|
115
116
|
vellum_ee/workflows/display/tests/workflow_serialization/test_web_search_node_serialization.py,sha256=vbDFBrWUPeeW7cxjNA6SXrsHlYcbOAhlQ4C45Vdnr1c,3428
|
116
117
|
vellum_ee/workflows/display/tests/workflow_serialization/test_workflow_input_parameterization_error.py,sha256=vAdmn3YTBDpo55znbydQxsgg9ASqHcvsUPwiBR_7wfo,1461
|
@@ -127,7 +128,7 @@ vellum_ee/workflows/display/utils/tests/test_events.py,sha256=42IEBnMbaQrH8gigw5
|
|
127
128
|
vellum_ee/workflows/display/utils/vellum.py,sha256=Bt7kdLdXoBsHn5dVEY2uKcF542VL09jwu8J_30rl2vk,6413
|
128
129
|
vellum_ee/workflows/display/vellum.py,sha256=J2mdJZ1sdLW535DDUkq_Vm8Z572vhuxHxVZF9deKSdk,391
|
129
130
|
vellum_ee/workflows/display/workflows/__init__.py,sha256=JTB9ObEV3l4gGGdtfBHwVJtTTKC22uj-a-XjTVwXCyA,148
|
130
|
-
vellum_ee/workflows/display/workflows/base_workflow_display.py,sha256=
|
131
|
+
vellum_ee/workflows/display/workflows/base_workflow_display.py,sha256=h2r_w7cvbN3RGrUOf0kAdFDtwhvLlphzkuDjXEWc2Kk,47663
|
131
132
|
vellum_ee/workflows/display/workflows/get_vellum_workflow_display_class.py,sha256=gxz76AeCqgAZ9D2lZeTiZzxY9eMgn3qOSfVgiqYcOh8,2028
|
132
133
|
vellum_ee/workflows/display/workflows/tests/test_workflow_display.py,sha256=lg-c_3P3ldtqWq2VFsk_2Mkn3pVdXWuT59QpH7QwXVs,39764
|
133
134
|
vellum_ee/workflows/server/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -161,7 +162,7 @@ vellum/client/README.md,sha256=flqu57ubZNTfpq60CdLtJC9gp4WEkyjb_n_eZ4OYf9w,6497
|
|
161
162
|
vellum/client/__init__.py,sha256=rMnKRqL5-356SBc-rfm56MkO87PuAi2mtcfBszcJU1M,74316
|
162
163
|
vellum/client/core/__init__.py,sha256=lTcqUPXcx4112yLDd70RAPeqq6tu3eFMe1pKOqkW9JQ,1562
|
163
164
|
vellum/client/core/api_error.py,sha256=44vPoTyWN59gonCIZMdzw7M1uspygiLnr3GNFOoVL2Q,614
|
164
|
-
vellum/client/core/client_wrapper.py,sha256=
|
165
|
+
vellum/client/core/client_wrapper.py,sha256=9B_jlACsiDJUp2QZ0RL-la5fjjWa1aeDXcm_Kgs8Ex4,2840
|
165
166
|
vellum/client/core/datetime_utils.py,sha256=nBys2IsYrhPdszxGKCNRPSOCwa-5DWOHG95FB8G9PKo,1047
|
166
167
|
vellum/client/core/file.py,sha256=d4NNbX8XvXP32z8KpK2Xovv33nFfruIrpz0QWxlgpZk,2663
|
167
168
|
vellum/client/core/force_multipart.py,sha256=awxh5MtcRYe74ehY8U76jzv6fYM_w_D3Rur7KQQzSDk,429
|
@@ -182,11 +183,11 @@ vellum/client/errors/not_found_error.py,sha256=YrqVM0oc3qkQbFbmmm6xr300VGfUNxMSy
|
|
182
183
|
vellum/client/errors/too_many_requests_error.py,sha256=SJJemdgUlQHV_VpxK8UfFNexgZebNT5_MTOeQs6oVgc,397
|
183
184
|
vellum/client/errors/unauthorized_error.py,sha256=waPl5Swiqsk3FQK-Lljzx4KDh4RPZ0wL6BLHjM8onQ8,394
|
184
185
|
vellum/client/raw_client.py,sha256=cmMR0t87iUYvkIE9L4g0dcCmw3uUQNze9rD9CBv5rzs,113481
|
185
|
-
vellum/client/reference.md,sha256=
|
186
|
+
vellum/client/reference.md,sha256=6pxVfD2C0kKw24vSQ0GRUFgP7d3o8YDi1mZD03kCIAo,107662
|
186
187
|
vellum/client/resources/__init__.py,sha256=JlNoSZYFGxLTuzPvmMV1b8IWDYjlDL4BaBbq9TgfGUE,1765
|
187
188
|
vellum/client/resources/ad_hoc/__init__.py,sha256=_VhToAyIt_5axN6CLJwtxg3-CO7THa_23pbUzqhXJa4,85
|
188
189
|
vellum/client/resources/ad_hoc/client.py,sha256=v5I_YzJaaPezsE4KVuMSUXJISstKuJ_9-VUeXakIJhw,14353
|
189
|
-
vellum/client/resources/ad_hoc/raw_client.py,sha256=
|
190
|
+
vellum/client/resources/ad_hoc/raw_client.py,sha256=Fj3rH1bLIIuCzHX5o9e2nep_Ansb8t_QlKH5k52AdtI,24864
|
190
191
|
vellum/client/resources/container_images/__init__.py,sha256=_VhToAyIt_5axN6CLJwtxg3-CO7THa_23pbUzqhXJa4,85
|
191
192
|
vellum/client/resources/container_images/client.py,sha256=n-Mc-owByDaiZ0BfQoof4RF9jwxbW8FhCqCBe0sL65I,10068
|
192
193
|
vellum/client/resources/container_images/raw_client.py,sha256=97GhqajNJC_FvdseF1tk0VNumk9-wDgTiGCk6pEHGuU,14654
|
@@ -216,8 +217,8 @@ vellum/client/resources/integration_auth_configs/__init__.py,sha256=_VhToAyIt_5a
|
|
216
217
|
vellum/client/resources/integration_auth_configs/client.py,sha256=ArZ60GpBHppcbSMN8NBh_ljzLiLEjn4oK5GFQyyHWKI,6121
|
217
218
|
vellum/client/resources/integration_auth_configs/raw_client.py,sha256=yFp61mhW8yvvPl7ykmHKQglgWdlaKDSO1uPDwcjKO7M,6756
|
218
219
|
vellum/client/resources/integration_providers/__init__.py,sha256=_VhToAyIt_5axN6CLJwtxg3-CO7THa_23pbUzqhXJa4,85
|
219
|
-
vellum/client/resources/integration_providers/client.py,sha256=
|
220
|
-
vellum/client/resources/integration_providers/raw_client.py,sha256=
|
220
|
+
vellum/client/resources/integration_providers/client.py,sha256=04UZs7buVWhFzhv8nfSXVJAWZOmxkyqe4fyYGTJfti0,9102
|
221
|
+
vellum/client/resources/integration_providers/raw_client.py,sha256=BG5OOlqexKZS50CoL2lgMEepY2WGpwHf4meZk3AxHtE,10590
|
221
222
|
vellum/client/resources/integrations/__init__.py,sha256=_VhToAyIt_5axN6CLJwtxg3-CO7THa_23pbUzqhXJa4,85
|
222
223
|
vellum/client/resources/integrations/client.py,sha256=xvlLcauH-HwKkspe5ziCpxaUJPa2jPYNLbz5oQaWZ58,13125
|
223
224
|
vellum/client/resources/integrations/raw_client.py,sha256=HpRVvA8FDfKyDDTvqNS5MgjdOCrO3Uk6dI_U5FcieUk,19428
|
@@ -487,7 +488,7 @@ vellum/client/types/instructor_vectorizer_config_request.py,sha256=B5Wy5FI8utwi4
|
|
487
488
|
vellum/client/types/integration_auth_config_integration.py,sha256=W3DrzVPwLrqm0wCYVF-sHyQPoKNxoliFgFJWEwW_Yqc,710
|
488
489
|
vellum/client/types/integration_auth_config_integration_credential.py,sha256=lUNuJ1GyFps3M85Mff1C-SAeEacCMkJdmayFfYrTFXA,547
|
489
490
|
vellum/client/types/integration_credential_access_type.py,sha256=sWkuDjW3aD7ApZ1xQ7Bu8g5kCIwqUqzm1TDliUQWeRI,178
|
490
|
-
vellum/client/types/integration_name.py,sha256=
|
491
|
+
vellum/client/types/integration_name.py,sha256=0MUPWDmNlEX-qUXxrKvrGSAVYj2cjj-B6nYuz72hL1k,398
|
491
492
|
vellum/client/types/integration_provider.py,sha256=lIh3yPyPEzmSAu8L4Gsd-iDkmDSNobo0_TB75zMtIXk,129
|
492
493
|
vellum/client/types/integration_read.py,sha256=sUNCS01TIlHPJHEH3ZheIbPi-CplbFQ5XAV1QtOO1Gg,1035
|
493
494
|
vellum/client/types/invoked_port.py,sha256=nw2k-y7NrpcH6T1V96U3F8_pbrsceqBPIz3RQXN8gJY,518
|
@@ -888,7 +889,7 @@ vellum/client/types/workflow_execution_actual_string_request.py,sha256=syFCXeB4M
|
|
888
889
|
vellum/client/types/workflow_execution_detail.py,sha256=R1tONdNarehoqk7zsK0D2wCSJEe9WauZmKHp5yKVLB8,2186
|
889
890
|
vellum/client/types/workflow_execution_event_error_code.py,sha256=8VL4wHTEy-AdQhApnOsz2L2wXcuo5LBqgUAVnaQ-pXM,568
|
890
891
|
vellum/client/types/workflow_execution_event_type.py,sha256=ESKqV3ItoAlqBooruf-i0AnmEh_GvCySZ0Co3r9Bvt0,170
|
891
|
-
vellum/client/types/workflow_execution_fulfilled_body.py,sha256=
|
892
|
+
vellum/client/types/workflow_execution_fulfilled_body.py,sha256=dQYhKU5D7vZR36zyBHUbXUNv_TjnnMNNPvxpPmH0-OU,797
|
892
893
|
vellum/client/types/workflow_execution_fulfilled_event.py,sha256=eZ_DtDmRK-S2Q0LEJHlGS_FPd-UVvpgetRXqvWlSh4M,1925
|
893
894
|
vellum/client/types/workflow_execution_initiated_body.py,sha256=0y2mi-RtpxPzWgl1ZO2eDOJdUvNSM_iVz6B_OySGucg,709
|
894
895
|
vellum/client/types/workflow_execution_initiated_event.py,sha256=JpzYEKYJPe5blgMjuwJn6o5fHsKW_kJMx89Keq8pGCE,1925
|
@@ -1898,7 +1899,7 @@ vellum/workflows/nodes/core/inline_subworkflow_node/node.py,sha256=N6Yh1z_xlZif9
|
|
1898
1899
|
vellum/workflows/nodes/core/inline_subworkflow_node/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
1899
1900
|
vellum/workflows/nodes/core/inline_subworkflow_node/tests/test_node.py,sha256=RK2g1h2ib-ruQZ9A2_2L-B9WBdHV44WZj75rkDNL0cE,5766
|
1900
1901
|
vellum/workflows/nodes/core/map_node/__init__.py,sha256=MXpZYmGfhsMJHqqlpd64WiJRtbAtAMQz-_3fCU_cLV0,56
|
1901
|
-
vellum/workflows/nodes/core/map_node/node.py,sha256=
|
1902
|
+
vellum/workflows/nodes/core/map_node/node.py,sha256=FquZcn5ANz4c_PMzggQDeKr2nXaRBkpj4kTpClVZWw4,10473
|
1902
1903
|
vellum/workflows/nodes/core/map_node/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
1903
1904
|
vellum/workflows/nodes/core/map_node/tests/test_node.py,sha256=Xc2xZY5ShSy-bsIQe41JbvIjq3TE95duS-ygaELRVkk,9320
|
1904
1905
|
vellum/workflows/nodes/core/retry_node/__init__.py,sha256=lN2bIy5a3Uzhs_FYCrooADyYU6ZGShtvLKFWpelwPvo,60
|
@@ -1907,7 +1908,7 @@ vellum/workflows/nodes/core/retry_node/tests/__init__.py,sha256=47DEQpj8HBSa-_TI
|
|
1907
1908
|
vellum/workflows/nodes/core/retry_node/tests/test_node.py,sha256=XyMtL_ZI6zcqCe0mG4DYjeuZGqX9zm35lnpLUZxsNUk,4368
|
1908
1909
|
vellum/workflows/nodes/core/templating_node/__init__.py,sha256=GmyuYo81_A1_Bz6id69ozVFS6FKiuDsZTiA3I6MaL2U,70
|
1909
1910
|
vellum/workflows/nodes/core/templating_node/node.py,sha256=mn0JEbORWaM-mR7fgUZy-BItZCup8CaxZQaY_g3TSEE,3855
|
1910
|
-
vellum/workflows/nodes/core/templating_node/tests/test_templating_node.py,sha256=
|
1911
|
+
vellum/workflows/nodes/core/templating_node/tests/test_templating_node.py,sha256=9c06b84HxNL1WJdX5jdDPCtc6pxHtGxfI-2ldmJnxsE,16658
|
1911
1912
|
vellum/workflows/nodes/core/try_node/__init__.py,sha256=JVD4DrldTIqFQQFrubs9KtWCCc0YCAc7Fzol5ZWIWeM,56
|
1912
1913
|
vellum/workflows/nodes/core/try_node/node.py,sha256=XdyOvlwQ3m4h0-_WNtaBl2t_CdlzPXclulkLOtUcX3E,4388
|
1913
1914
|
vellum/workflows/nodes/core/try_node/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -1997,8 +1998,8 @@ vellum/workflows/nodes/experimental/openai_chat_completion_node/node.py,sha256=c
|
|
1997
1998
|
vellum/workflows/nodes/mocks.py,sha256=FXvP049s1KuilDqjUub12Y81rjR9vgPdX8pu6oBSjoE,10931
|
1998
1999
|
vellum/workflows/nodes/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
1999
2000
|
vellum/workflows/nodes/tests/test_mocks.py,sha256=mfPvrs75PKcsNsbJLQAN6PDFoVqs9TmQxpdyFKDdO60,7837
|
2000
|
-
vellum/workflows/nodes/tests/test_utils.py,sha256=
|
2001
|
-
vellum/workflows/nodes/utils.py,sha256=
|
2001
|
+
vellum/workflows/nodes/tests/test_utils.py,sha256=GeXdHJp8A7HU6hSYhZaTPX5Vz3EIBABKaNH_73eJl3g,5993
|
2002
|
+
vellum/workflows/nodes/utils.py,sha256=mPAkqK1FrA6MZVLxI_QGD_kjm2KfTDrpjV1zUKek4yw,10825
|
2002
2003
|
vellum/workflows/outputs/__init__.py,sha256=AyZ4pRh_ACQIGvkf0byJO46EDnSix1ZCAXfvh-ms1QE,94
|
2003
2004
|
vellum/workflows/outputs/base.py,sha256=zy02zr9DmG3j7Xp3Q8xiOiXFF_c7uNh76jf2LiMS-qE,10132
|
2004
2005
|
vellum/workflows/ports/__init__.py,sha256=bZuMt-R7z5bKwpu4uPW7LlJeePOQWmCcDSXe5frUY5g,101
|
@@ -2006,7 +2007,7 @@ vellum/workflows/ports/node_ports.py,sha256=SM9uLAaoaE1HwR-Uqwf2v5zZK5iFnphKs6mE
|
|
2006
2007
|
vellum/workflows/ports/port.py,sha256=L4VrUXT-77a1nN9dC4kuukur5kz2gleEpskaWT1MIRc,4627
|
2007
2008
|
vellum/workflows/ports/tests/test_port.py,sha256=WEE83wct8C01Lq_asSbS0MfL5BLA2avsS0UqJMye4OU,1215
|
2008
2009
|
vellum/workflows/ports/utils.py,sha256=gD8iijX8D3tjx1Tj2FW8-QIubCphTqW_gqROt6w6MOM,3790
|
2009
|
-
vellum/workflows/references/__init__.py,sha256=
|
2010
|
+
vellum/workflows/references/__init__.py,sha256=3SosQ3kdhm7J2Kp4vyl8Z09YfXL8Oyw4DKi0ZBAqvaM,671
|
2010
2011
|
vellum/workflows/references/constant.py,sha256=6yUT4q1sMj1hkI_tzzQ9AYcmeeDYFUNCqUq_W2DN0S8,540
|
2011
2012
|
vellum/workflows/references/environment_variable.py,sha256=8K_l8nwEzdS0UspDm5k7sAb07jd0ScbTSeJn4lK21ag,1037
|
2012
2013
|
vellum/workflows/references/execution_count.py,sha256=JILHqt8ELdc9ct-WsVCA5X-rKiP1rmJODw-XTf4kpHI,722
|
@@ -2017,6 +2018,7 @@ vellum/workflows/references/node.py,sha256=LP854wDVs-9I_aZ7-nkbwXqL2H7W2_3LED2e9
|
|
2017
2018
|
vellum/workflows/references/output.py,sha256=qVa3QmlOyJhyIMOHwOmi1RgHPAOryhdPr2DRj97aEvU,3321
|
2018
2019
|
vellum/workflows/references/state_value.py,sha256=bInUF0A3Pt4-zhA0f6LdSuyv8tz7n5QRkHAEn4gsmqI,711
|
2019
2020
|
vellum/workflows/references/tests/test_lazy.py,sha256=0s50-LizMTlSTBQahpK0fg_xqCucA8YTp6QmIMqPvMk,919
|
2021
|
+
vellum/workflows/references/trigger.py,sha256=_5pA54bh-PeOEIRcO3BjPlHG9C3OMKZIRXFFZfoyUME,2812
|
2020
2022
|
vellum/workflows/references/vellum_secret.py,sha256=Od4d19a5yletWMqNfJR5d_mZQUkVcFzj29mE-T9J7yE,480
|
2021
2023
|
vellum/workflows/references/workflow_input.py,sha256=W3rOK1EPd2gYHb04WJwmNm1CUSdvZ9LKrs8RMKxACBs,1751
|
2022
2024
|
vellum/workflows/resolvers/__init__.py,sha256=eH6hTvZO4IciDaf_cf7aM2vs-DkBDyJPycOQevJxQnI,82
|
@@ -2028,7 +2030,7 @@ vellum/workflows/runner/__init__.py,sha256=i1iG5sAhtpdsrlvwgH6B-m49JsINkiWyPWs8v
|
|
2028
2030
|
vellum/workflows/runner/runner.py,sha256=IYjeFx6_jescg8tEW-et5k96X9EsB6PDw4Kw4Qvy-Xo,45599
|
2029
2031
|
vellum/workflows/sandbox.py,sha256=mezSZmilR_fwR8164n8CEfzlMeQ55IqfapHp4ftImvQ,3212
|
2030
2032
|
vellum/workflows/state/__init__.py,sha256=yUUdR-_Vl7UiixNDYQZ-GEM_kJI9dnOia75TtuNEsnE,60
|
2031
|
-
vellum/workflows/state/base.py,sha256=
|
2033
|
+
vellum/workflows/state/base.py,sha256=8Zr7UIM_eC0O2N6w_1gYqyrjgJ9D9z-VqLFnBETEF7Q,26753
|
2032
2034
|
vellum/workflows/state/context.py,sha256=khM30U1iDNts5Xp8LXa_WfpkITNITexrDUUFJ5wZ2W4,8445
|
2033
2035
|
vellum/workflows/state/delta.py,sha256=7h8wR10lRCm15SykaPj-gSEvvsMjCwYLPsOx3nsvBQg,440
|
2034
2036
|
vellum/workflows/state/encoder.py,sha256=EynuS9aCt9Neb-H6HRCinEVZX5olCzME03W1TSXfpxs,1961
|
@@ -2039,12 +2041,14 @@ vellum/workflows/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3
|
|
2039
2041
|
vellum/workflows/tests/test_dataset_row.py,sha256=S8aIiYU9TRzJ8GTl5qCjnJ-fuHdxatHJFGLlKTVHPr4,4174
|
2040
2042
|
vellum/workflows/tests/test_sandbox.py,sha256=JKwaluI-lODQo7Ek9sjDstjL_WTdSqUlVik6ZVTfVOA,1826
|
2041
2043
|
vellum/workflows/tests/test_undefined.py,sha256=zMCVliCXVNLrlC6hEGyOWDnQADJ2g83yc5FIM33zuo8,353
|
2042
|
-
vellum/workflows/triggers/__init__.py,sha256=
|
2043
|
-
vellum/workflows/triggers/base.py,sha256=
|
2044
|
-
vellum/workflows/triggers/integration.py,sha256=
|
2044
|
+
vellum/workflows/triggers/__init__.py,sha256=rhsIq3fsKkLaPshO4QnYpopNyIMyieZrdiCGjmiyhbc,322
|
2045
|
+
vellum/workflows/triggers/base.py,sha256=sLH0qzfRYbJRQX6ukGzSy6PaXxlDUSobdFSz8G_4v98,10140
|
2046
|
+
vellum/workflows/triggers/integration.py,sha256=hAWQMoIubosKgM56rrsAJVhPnc4MjA5YBPRpDgl6J08,2221
|
2045
2047
|
vellum/workflows/triggers/manual.py,sha256=PgbZ92gcK25yz6REXm98zWic1QBfhxLKfGCeHpZEUx4,1266
|
2048
|
+
vellum/workflows/triggers/slack.py,sha256=NBc4Af3PdnhiqTzeS-zyPf7JkrPG0FHT7uP0qNYeBfg,3418
|
2046
2049
|
vellum/workflows/triggers/tests/__init__.py,sha256=R8lag_iCRyulijHMK4e3Gf6YVB5NplfvwZeTkaRj8gQ,30
|
2047
|
-
vellum/workflows/triggers/tests/test_integration.py,sha256=
|
2050
|
+
vellum/workflows/triggers/tests/test_integration.py,sha256=mODupO0eOG4G2ooDH1meWKRtA8NRtsm_fii6tijvSqQ,4046
|
2051
|
+
vellum/workflows/triggers/tests/test_slack.py,sha256=aFTVPj7e3bjblHgbZleKEoh0wayrcC_88nDpXmVowMY,5569
|
2048
2052
|
vellum/workflows/types/__init__.py,sha256=fZ3Xxly7YSsu4kCIYD5aYpYucNM97zTyInb9CA24mf0,102
|
2049
2053
|
vellum/workflows/types/code_execution_node_wrappers.py,sha256=fewX9bqF_4TZuK-gZYIn12s31-k03vHMGRpvFAPm11Y,3206
|
2050
2054
|
vellum/workflows/types/core.py,sha256=R7snCd7ci4tiRuHi5ALGh_5DIIF0T9eze3sf6EnJN-c,1126
|
@@ -2075,8 +2079,8 @@ vellum/workflows/workflows/event_filters.py,sha256=GSxIgwrX26a1Smfd-6yss2abGCnad
|
|
2075
2079
|
vellum/workflows/workflows/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2076
2080
|
vellum/workflows/workflows/tests/test_base_workflow.py,sha256=Boa-_m9ii2Qsa1RvVM-VYniF7zCpzGgEGy-OnPZkrHg,23941
|
2077
2081
|
vellum/workflows/workflows/tests/test_context.py,sha256=VJBUcyWVtMa_lE5KxdhgMu0WYNYnUQUDvTF7qm89hJ0,2333
|
2078
|
-
vellum_ai-1.7.
|
2079
|
-
vellum_ai-1.7.
|
2080
|
-
vellum_ai-1.7.
|
2081
|
-
vellum_ai-1.7.
|
2082
|
-
vellum_ai-1.7.
|
2082
|
+
vellum_ai-1.7.8.dist-info/LICENSE,sha256=hOypcdt481qGNISA784bnAGWAE6tyIf9gc2E78mYC3E,1574
|
2083
|
+
vellum_ai-1.7.8.dist-info/METADATA,sha256=nLEmbdMVVg8ZzhJ0MXKOLdXmUF96KvZym2nn-kS7RhE,5547
|
2084
|
+
vellum_ai-1.7.8.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
2085
|
+
vellum_ai-1.7.8.dist-info/entry_points.txt,sha256=xVavzAKN4iF_NbmhWOlOkHluka0YLkbN_pFQ9pW3gLI,117
|
2086
|
+
vellum_ai-1.7.8.dist-info/RECORD,,
|
@@ -16,6 +16,7 @@ if TYPE_CHECKING:
|
|
16
16
|
|
17
17
|
class WorkflowTriggerType(Enum):
|
18
18
|
MANUAL = "MANUAL"
|
19
|
+
SLACK_MESSAGE = "SLACK_MESSAGE"
|
19
20
|
|
20
21
|
|
21
22
|
def get_trigger_type_mapping() -> Dict[Type["BaseTrigger"], WorkflowTriggerType]:
|
@@ -29,9 +30,11 @@ def get_trigger_type_mapping() -> Dict[Type["BaseTrigger"], WorkflowTriggerType]
|
|
29
30
|
Dictionary mapping trigger classes to their enum types
|
30
31
|
"""
|
31
32
|
from vellum.workflows.triggers.manual import ManualTrigger
|
33
|
+
from vellum.workflows.triggers.slack import SlackTrigger
|
32
34
|
|
33
35
|
return {
|
34
36
|
ManualTrigger: WorkflowTriggerType.MANUAL,
|
37
|
+
SlackTrigger: WorkflowTriggerType.SLACK_MESSAGE,
|
35
38
|
}
|
36
39
|
|
37
40
|
|
@@ -0,0 +1,167 @@
|
|
1
|
+
"""Tests for serialization of workflows with SlackTrigger."""
|
2
|
+
|
3
|
+
from vellum.workflows import BaseWorkflow
|
4
|
+
from vellum.workflows.inputs.base import BaseInputs
|
5
|
+
from vellum.workflows.nodes.bases.base import BaseNode
|
6
|
+
from vellum.workflows.state.base import BaseState
|
7
|
+
from vellum.workflows.triggers.slack import SlackTrigger
|
8
|
+
from vellum_ee.workflows.display.workflows.get_vellum_workflow_display_class import get_workflow_display
|
9
|
+
|
10
|
+
|
11
|
+
class Inputs(BaseInputs):
|
12
|
+
input: str
|
13
|
+
|
14
|
+
|
15
|
+
class SimpleNode(BaseNode):
|
16
|
+
class Outputs(BaseNode.Outputs):
|
17
|
+
output = Inputs.input
|
18
|
+
|
19
|
+
|
20
|
+
def test_slack_trigger_serialization() -> None:
|
21
|
+
"""Workflow with SlackTrigger serializes with triggers field."""
|
22
|
+
|
23
|
+
class TestWorkflow(BaseWorkflow[Inputs, BaseState]):
|
24
|
+
graph = SlackTrigger >> SimpleNode
|
25
|
+
|
26
|
+
class Outputs(BaseWorkflow.Outputs):
|
27
|
+
output = SimpleNode.Outputs.output
|
28
|
+
|
29
|
+
result = get_workflow_display(workflow_class=TestWorkflow).serialize()
|
30
|
+
|
31
|
+
# Validate triggers structure
|
32
|
+
assert "triggers" in result
|
33
|
+
triggers = result["triggers"]
|
34
|
+
assert isinstance(triggers, list)
|
35
|
+
assert len(triggers) == 1
|
36
|
+
|
37
|
+
trigger = triggers[0]
|
38
|
+
assert isinstance(trigger, dict)
|
39
|
+
assert trigger["type"] == "SLACK_MESSAGE"
|
40
|
+
assert "id" in trigger
|
41
|
+
|
42
|
+
# Validate attributes
|
43
|
+
assert "attributes" in trigger
|
44
|
+
attributes = trigger["attributes"]
|
45
|
+
assert isinstance(attributes, list)
|
46
|
+
assert len(attributes) == 6
|
47
|
+
|
48
|
+
attribute_names = set()
|
49
|
+
for attribute in attributes:
|
50
|
+
assert isinstance(attribute, dict)
|
51
|
+
assert "name" in attribute
|
52
|
+
assert isinstance(attribute["name"], str)
|
53
|
+
attribute_names.add(attribute["name"])
|
54
|
+
assert attribute_names == {
|
55
|
+
"message",
|
56
|
+
"channel",
|
57
|
+
"user",
|
58
|
+
"timestamp",
|
59
|
+
"thread_ts",
|
60
|
+
"event_type",
|
61
|
+
}
|
62
|
+
|
63
|
+
for attribute in attributes:
|
64
|
+
assert isinstance(attribute, dict)
|
65
|
+
assert attribute["value"] is None
|
66
|
+
assert isinstance(attribute["id"], str)
|
67
|
+
assert attribute["id"]
|
68
|
+
|
69
|
+
|
70
|
+
def test_slack_trigger_multiple_entrypoints() -> None:
|
71
|
+
"""SlackTrigger with multiple entrypoints."""
|
72
|
+
|
73
|
+
class NodeA(BaseNode):
|
74
|
+
class Outputs(BaseNode.Outputs):
|
75
|
+
output = Inputs.input
|
76
|
+
|
77
|
+
class NodeB(BaseNode):
|
78
|
+
class Outputs(BaseNode.Outputs):
|
79
|
+
output = Inputs.input
|
80
|
+
|
81
|
+
class MultiWorkflow(BaseWorkflow[Inputs, BaseState]):
|
82
|
+
graph = SlackTrigger >> {NodeA, NodeB}
|
83
|
+
|
84
|
+
class Outputs(BaseWorkflow.Outputs):
|
85
|
+
output_a = NodeA.Outputs.output
|
86
|
+
output_b = NodeB.Outputs.output
|
87
|
+
|
88
|
+
result = get_workflow_display(workflow_class=MultiWorkflow).serialize()
|
89
|
+
|
90
|
+
# Validate triggers
|
91
|
+
assert "triggers" in result
|
92
|
+
triggers = result["triggers"]
|
93
|
+
assert isinstance(triggers, list)
|
94
|
+
assert len(triggers) == 1
|
95
|
+
|
96
|
+
trigger = triggers[0]
|
97
|
+
assert isinstance(trigger, dict)
|
98
|
+
assert trigger["type"] == "SLACK_MESSAGE"
|
99
|
+
|
100
|
+
# Validate attributes
|
101
|
+
assert "attributes" in trigger
|
102
|
+
attributes = trigger["attributes"]
|
103
|
+
assert isinstance(attributes, list)
|
104
|
+
attribute_names = set()
|
105
|
+
for attribute in attributes:
|
106
|
+
assert isinstance(attribute, dict)
|
107
|
+
assert "name" in attribute
|
108
|
+
assert isinstance(attribute["name"], str)
|
109
|
+
attribute_names.add(attribute["name"])
|
110
|
+
|
111
|
+
assert attribute_names == {
|
112
|
+
"message",
|
113
|
+
"channel",
|
114
|
+
"user",
|
115
|
+
"timestamp",
|
116
|
+
"thread_ts",
|
117
|
+
"event_type",
|
118
|
+
}
|
119
|
+
|
120
|
+
# Validate nodes
|
121
|
+
assert "workflow_raw_data" in result
|
122
|
+
workflow_data = result["workflow_raw_data"]
|
123
|
+
assert isinstance(workflow_data, dict)
|
124
|
+
assert "nodes" in workflow_data
|
125
|
+
nodes = workflow_data["nodes"]
|
126
|
+
assert isinstance(nodes, list)
|
127
|
+
|
128
|
+
generic_nodes = [node for node in nodes if isinstance(node, dict) and node.get("type") == "GENERIC"]
|
129
|
+
assert len(generic_nodes) >= 2
|
130
|
+
|
131
|
+
|
132
|
+
def test_serialized_slack_workflow_structure() -> None:
|
133
|
+
"""Verify complete structure of serialized workflow with SlackTrigger."""
|
134
|
+
|
135
|
+
class TestWorkflow(BaseWorkflow[Inputs, BaseState]):
|
136
|
+
graph = SlackTrigger >> SimpleNode
|
137
|
+
|
138
|
+
class Outputs(BaseWorkflow.Outputs):
|
139
|
+
output = SimpleNode.Outputs.output
|
140
|
+
|
141
|
+
result = get_workflow_display(workflow_class=TestWorkflow).serialize()
|
142
|
+
|
143
|
+
# Validate top-level structure
|
144
|
+
assert isinstance(result, dict)
|
145
|
+
assert set(result.keys()) == {
|
146
|
+
"workflow_raw_data",
|
147
|
+
"input_variables",
|
148
|
+
"state_variables",
|
149
|
+
"output_variables",
|
150
|
+
"triggers",
|
151
|
+
}
|
152
|
+
|
153
|
+
# Validate workflow_raw_data structure
|
154
|
+
workflow_raw_data = result["workflow_raw_data"]
|
155
|
+
assert isinstance(workflow_raw_data, dict)
|
156
|
+
assert set(workflow_raw_data.keys()) == {
|
157
|
+
"nodes",
|
158
|
+
"edges",
|
159
|
+
"display_data",
|
160
|
+
"definition",
|
161
|
+
"output_values",
|
162
|
+
}
|
163
|
+
|
164
|
+
# Validate definition
|
165
|
+
definition = workflow_raw_data["definition"]
|
166
|
+
assert isinstance(definition, dict)
|
167
|
+
assert definition["name"] == "TestWorkflow"
|
@@ -29,6 +29,7 @@ from vellum.workflows.types.core import Json, JsonArray, JsonObject
|
|
29
29
|
from vellum.workflows.types.generics import WorkflowType
|
30
30
|
from vellum.workflows.types.utils import get_original_base
|
31
31
|
from vellum.workflows.utils.uuids import uuid4_from_hash
|
32
|
+
from vellum.workflows.utils.vellum_variables import primitive_type_to_vellum_variable_type
|
32
33
|
from vellum.workflows.vellum_client import create_vellum_client
|
33
34
|
from vellum_ee.workflows.display.base import (
|
34
35
|
EdgeDisplay,
|
@@ -475,17 +476,32 @@ class BaseWorkflowDisplay(Generic[WorkflowType]):
|
|
475
476
|
# Return as a list with a single trigger object matching Django schema
|
476
477
|
trigger_id = uuid4_from_hash(f"{trigger_class.__module__} | {trigger_class.__qualname__}")
|
477
478
|
|
478
|
-
|
479
|
+
# Serialize trigger attributes like node outputs
|
480
|
+
attribute_references = trigger_class.attribute_references().values()
|
481
|
+
trigger_attributes: JsonArray = cast(
|
479
482
|
JsonArray,
|
480
483
|
[
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
484
|
+
cast(
|
485
|
+
JsonObject,
|
486
|
+
{
|
487
|
+
"id": str(reference.id),
|
488
|
+
"name": reference.name,
|
489
|
+
"type": primitive_type_to_vellum_variable_type(reference),
|
490
|
+
"value": None,
|
491
|
+
},
|
492
|
+
)
|
493
|
+
for reference in sorted(attribute_references, key=lambda ref: ref.name)
|
486
494
|
],
|
487
495
|
)
|
488
496
|
|
497
|
+
trigger_data: JsonObject = {
|
498
|
+
"id": str(trigger_id),
|
499
|
+
"type": trigger_type.value,
|
500
|
+
"attributes": trigger_attributes,
|
501
|
+
}
|
502
|
+
|
503
|
+
return cast(JsonArray, [trigger_data])
|
504
|
+
|
489
505
|
def _serialize_edge_display_data(self, edge_display: EdgeDisplay) -> Optional[JsonObject]:
|
490
506
|
"""Serialize edge display data, returning None if no display data is present."""
|
491
507
|
if edge_display.z_index is not None:
|
File without changes
|
File without changes
|
File without changes
|