vellum-ai 1.7.6__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.
Files changed (34) hide show
  1. vellum/client/core/client_wrapper.py +2 -2
  2. vellum/client/reference.md +16 -0
  3. vellum/client/resources/ad_hoc/raw_client.py +2 -2
  4. vellum/client/resources/integration_providers/client.py +20 -0
  5. vellum/client/resources/integration_providers/raw_client.py +20 -0
  6. vellum/client/types/integration_name.py +1 -0
  7. vellum/client/types/workflow_execution_fulfilled_body.py +1 -0
  8. vellum/workflows/nodes/bases/base_adornment_node.py +53 -1
  9. vellum/workflows/nodes/core/map_node/node.py +10 -0
  10. vellum/workflows/nodes/core/templating_node/tests/test_templating_node.py +49 -1
  11. vellum/workflows/nodes/displayable/bases/inline_prompt_node/node.py +3 -1
  12. vellum/workflows/nodes/tests/test_utils.py +7 -1
  13. vellum/workflows/nodes/utils.py +1 -1
  14. vellum/workflows/references/__init__.py +2 -0
  15. vellum/workflows/references/trigger.py +83 -0
  16. vellum/workflows/runner/runner.py +17 -15
  17. vellum/workflows/state/base.py +49 -1
  18. vellum/workflows/triggers/__init__.py +2 -1
  19. vellum/workflows/triggers/base.py +140 -3
  20. vellum/workflows/triggers/integration.py +31 -26
  21. vellum/workflows/triggers/slack.py +101 -0
  22. vellum/workflows/triggers/tests/test_integration.py +55 -31
  23. vellum/workflows/triggers/tests/test_slack.py +180 -0
  24. {vellum_ai-1.7.6.dist-info → vellum_ai-1.7.8.dist-info}/METADATA +1 -1
  25. {vellum_ai-1.7.6.dist-info → vellum_ai-1.7.8.dist-info}/RECORD +34 -30
  26. vellum_ee/workflows/display/base.py +3 -0
  27. vellum_ee/workflows/display/nodes/base_node_display.py +1 -1
  28. vellum_ee/workflows/display/tests/workflow_serialization/generic_nodes/test_attributes_serialization.py +16 -0
  29. vellum_ee/workflows/display/tests/workflow_serialization/test_slack_trigger_serialization.py +167 -0
  30. vellum_ee/workflows/display/utils/expressions.py +11 -11
  31. vellum_ee/workflows/display/workflows/base_workflow_display.py +22 -6
  32. {vellum_ai-1.7.6.dist-info → vellum_ai-1.7.8.dist-info}/LICENSE +0 -0
  33. {vellum_ai-1.7.6.dist-info → vellum_ai-1.7.8.dist-info}/WHEEL +0 -0
  34. {vellum_ai-1.7.6.dist-info → vellum_ai-1.7.8.dist-info}/entry_points.txt +0 -0
@@ -27,12 +27,12 @@ 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=BrXRr3WMDJitXe9hcq6EDE3MZvuRnEZuCsIswiAyYYk,2606
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
34
34
  vellum_ee/workflows/display/nodes/__init__.py,sha256=jI1aPBQf8DkmrYoZ4O-wR1duqZByOf5mDFmo_wFJPE4,307
35
- vellum_ee/workflows/display/nodes/base_node_display.py,sha256=C0Dxwss5yoxSLotTRUP2h7oxGjb0dDIdsc-83HVFCP8,19493
35
+ vellum_ee/workflows/display/nodes/base_node_display.py,sha256=ceKQdHZmDSOY5-M2DtJnuLbdkuFujCChFtRABDoV1jo,19497
36
36
  vellum_ee/workflows/display/nodes/get_node_display_class.py,sha256=jI_kUi9LnNLDpY63QtlC4TfN8P571VN4LpzH0I1ZtLk,1149
37
37
  vellum_ee/workflows/display/nodes/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
38
38
  vellum_ee/workflows/display/nodes/tests/test_base_node_display.py,sha256=JLa9nlG38dLfCo1Y8ISsJ21hrfDyy4-ae3pZ9H01yFs,5578
@@ -80,7 +80,7 @@ vellum_ee/workflows/display/tests/workflow_serialization/__init__.py,sha256=47DE
80
80
  vellum_ee/workflows/display/tests/workflow_serialization/generic_nodes/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
81
81
  vellum_ee/workflows/display/tests/workflow_serialization/generic_nodes/conftest.py,sha256=Y-ajeT65b5varmrZCw6L3hir4hJCFq-eO0jZfRcrs7g,1886
82
82
  vellum_ee/workflows/display/tests/workflow_serialization/generic_nodes/test_adornments_serialization.py,sha256=wdVaFvxicj48Kj-6VUlu61KR0oSArLTjownRi2p0NWQ,14941
83
- vellum_ee/workflows/display/tests/workflow_serialization/generic_nodes/test_attributes_serialization.py,sha256=bPTwkLpB7trFLpAaDvXMfMP0c9H1u_c1cdnj7K-gtnw,24962
83
+ vellum_ee/workflows/display/tests/workflow_serialization/generic_nodes/test_attributes_serialization.py,sha256=rDh6PxhdoVDNuKdUrtZpoMtX8T92ZUMonkVxDjeEE4g,25507
84
84
  vellum_ee/workflows/display/tests/workflow_serialization/generic_nodes/test_outputs_serialization.py,sha256=SwXRzjdoEZLvkzaRMvRV8_UqbBm0EB_UtAHD_zXKZBY,6303
85
85
  vellum_ee/workflows/display/tests/workflow_serialization/generic_nodes/test_ports_serialization.py,sha256=jubGYgLJImOqILd5LjnYJ4B1UMIrToDrQbPZOvaQCX4,40035
86
86
  vellum_ee/workflows/display/tests/workflow_serialization/generic_nodes/test_trigger_serialization.py,sha256=FLvcD8eoABHUPv08oSpIp_P-65sw2gl4whMXEJJj4f8,6785
@@ -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
@@ -119,7 +120,7 @@ vellum_ee/workflows/display/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeR
119
120
  vellum_ee/workflows/display/utils/auto_layout.py,sha256=f4GiLn_LazweupfqTpubcdtdfE_vrOcmZudSsnYIY9E,3906
120
121
  vellum_ee/workflows/display/utils/events.py,sha256=DE33uoKW78BZtITJ6L22dMZN3KR1BuZBVC98C_gIyzU,1943
121
122
  vellum_ee/workflows/display/utils/exceptions.py,sha256=E8Lvo7LY1BoZ54M_NR_opDjJsAAiCUfow1HgoHcTHmg,989
122
- vellum_ee/workflows/display/utils/expressions.py,sha256=mg-AHKGvnRjB1y4nXFJp7uRuAkUGITnuZ6aRDnEzPXk,20512
123
+ vellum_ee/workflows/display/utils/expressions.py,sha256=IIieWILv2zGLYTRgeDwgjhtga1ttV-ss2remJ1HBVXA,20688
123
124
  vellum_ee/workflows/display/utils/registry.py,sha256=1qXiBTdsnro6FeCX0FGBEK7CIf6wa--Jt50iZ_nEp_M,3460
124
125
  vellum_ee/workflows/display/utils/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
125
126
  vellum_ee/workflows/display/utils/tests/test_auto_layout.py,sha256=vfXI769418s9vda5Gb5NFBH747WMOwSgHRXeLCTLVm8,2356
@@ -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=DAGqGCg2WTBTNeO1akDpeCAJ5sAtUu65dnXsagnO6Jk,46937
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=Xg-fX0-gnXrGKMqx9QTWnqutz2unMYFhgA34qo_877U,2840
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=lqfW5v1s-z4Amy07JcxQTF_YiLVlkbZH6bG4Hgn2Uyc,107432
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=JSbwEoowm41Wm9u4hQNoAIHG_-IX6IYfsBRn2tGZ-gM,24864
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=bKAsKGg8oHA7imqaRZf9iGZ4P8cH6iaiwQk2bqrm3nQ,8328
220
- vellum/client/resources/integration_providers/raw_client.py,sha256=Pur69Tvy6DDjruIT7zClPT_wn6nBJEKS1_vQaceWRjA,9788
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=SzwAJ2xbIZ94yog1D_Zpd8cH_XEFZG0ygzGdZojEPbo,378
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=Auu-rzrIdxEkXgPHXe-BynwEWxL_R68E_VrLFCHueFA,710
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
@@ -1886,7 +1887,7 @@ vellum/workflows/logging.py,sha256=_a217XogktV4Ncz6xKFz7WfYmZAzkfVRVuC0rWob8ls,4
1886
1887
  vellum/workflows/nodes/__init__.py,sha256=zymtc3_iW2rFmMR-sayTLuN6ZsAw8VnJweWPsjQk2-Q,1197
1887
1888
  vellum/workflows/nodes/bases/__init__.py,sha256=cniHuz_RXdJ4TQgD8CBzoiKDiPxg62ErdVpCbWICX64,58
1888
1889
  vellum/workflows/nodes/bases/base.py,sha256=u7NmYWhQZm91KZV53PGD-gpZvcWAItOme95TjZkHwDI,22094
1889
- vellum/workflows/nodes/bases/base_adornment_node.py,sha256=hrgzuTetM4ynPd9YGHoK8Vwwn4XITi3aZZ_OCnQrq4Y,3433
1890
+ vellum/workflows/nodes/bases/base_adornment_node.py,sha256=TgL-tfX84GyTb7ONQ2z7OJDkx57kW3qbQNDuiw-Zrqo,5814
1890
1891
  vellum/workflows/nodes/bases/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
1891
1892
  vellum/workflows/nodes/bases/tests/test_base_adornment_node.py,sha256=fXZI9KqpS4XMBrBnIEkK3foHaBVvyHwYcQWWDKay7ic,1148
1892
1893
  vellum/workflows/nodes/bases/tests/test_base_node.py,sha256=igJrcSxSZADk5tLpssAt0uAXe9oJoLbilzueJJvA5p4,10942
@@ -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=kSyQmIWk4v-KSt4WBf3d-0_QueKYkjtrEmQPGTbMryw,10054
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=gfLi8lJpTU5jGO1Kt6UuzVz1fQN8dcNhHBZG90enP-s,15013
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
@@ -1925,7 +1926,7 @@ vellum/workflows/nodes/displayable/bases/api_node/tests/test_node.py,sha256=5C59
1925
1926
  vellum/workflows/nodes/displayable/bases/base_prompt_node/__init__.py,sha256=Org3xTvgp1pA0uUXFfnJr29D3HzCey2lEdYF4zbIUgo,70
1926
1927
  vellum/workflows/nodes/displayable/bases/base_prompt_node/node.py,sha256=w02vgydiwNoKru324QLSkH3BiGUvHTgKbf05BEx945s,4657
1927
1928
  vellum/workflows/nodes/displayable/bases/inline_prompt_node/__init__.py,sha256=Hl35IAoepRpE-j4cALaXVJIYTYOF3qszyVbxTj4kS1s,82
1928
- vellum/workflows/nodes/displayable/bases/inline_prompt_node/node.py,sha256=Medz-nM5dqaaNRSPAJ0LUfnv4o57RGBwKFoYNAmCf48,18484
1929
+ vellum/workflows/nodes/displayable/bases/inline_prompt_node/node.py,sha256=ITxAa1HWF6OPdcKg0DdTK7YP94ezzzWVyZzCRMiybIg,18638
1929
1930
  vellum/workflows/nodes/displayable/bases/inline_prompt_node/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
1930
1931
  vellum/workflows/nodes/displayable/bases/inline_prompt_node/tests/test_inline_prompt_node.py,sha256=xc53wGwVqxBnN7eoyWkJ-RJ-FeUpHKekkKjViASHAFg,27495
1931
1932
  vellum/workflows/nodes/displayable/bases/prompt_deployment_node.py,sha256=H9mM75EQpP6PUvsXCTbwjw4CqMMLf36m1G2XqiPEvH4,12139
@@ -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=6yn0ieMug-ndcPVR2Z0HLIAMuCuS-4ucKSMnx06qcEc,5674
2001
- vellum/workflows/nodes/utils.py,sha256=4u7gJnJtI1CM0RmsS6c-edTeGrJvd340rDiEtP6jRlk,10745
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=glHFC1VfXmcbNvH5VzFbkT03d8_D7MMcvEcsUBrzLIs,591
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
@@ -2025,10 +2027,10 @@ vellum/workflows/resolvers/resolver.py,sha256=3uEYscB_2PHTazc0Y9SzOe_yiQZhVLfey1
2025
2027
  vellum/workflows/resolvers/tests/test_resolver.py,sha256=PnUGzsulo1It_LjjhHsRNiILvvl5G_IaK8ZX56zKC28,6204
2026
2028
  vellum/workflows/resolvers/types.py,sha256=Hndhlk69g6EKLh_LYg5ILepW5U_h_BYNllfzhS9k8p4,237
2027
2029
  vellum/workflows/runner/__init__.py,sha256=i1iG5sAhtpdsrlvwgH6B-m49JsINkiWyPWs8vyT-bqM,72
2028
- vellum/workflows/runner/runner.py,sha256=250GCJFyqTX9q5gYhfo6AkiIgMScVfEp4KYofRweqEk,45455
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=A8s0PC8UvFjPpkHDY6u-yIeb2KHjoAmu-GW-GYrDl0E,24654
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=kistj6wgRgYe3fO82_4giZ_xFkElfnsDGRKAbzxrGnc,249
2043
- vellum/workflows/triggers/base.py,sha256=HIZkKPdb9GOYjpGzk2DoSqkxsUyjBnzmsLyhVTWm1iE,4857
2044
- vellum/workflows/triggers/integration.py,sha256=_RyNrNnIBIa08FMHmLh2QEZPb-u5j75Bye_FbR82nkg,2043
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=5N7ejz4AFmgQAZlHGV466rzWyb79iLeXU-pAfx9o4TA,3213
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.6.dist-info/LICENSE,sha256=hOypcdt481qGNISA784bnAGWAE6tyIf9gc2E78mYC3E,1574
2079
- vellum_ai-1.7.6.dist-info/METADATA,sha256=Bk9FFFzHL7vS59oSmxxgX_8fOxREGwYmlaqSFXP6zr4,5547
2080
- vellum_ai-1.7.6.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
2081
- vellum_ai-1.7.6.dist-info/entry_points.txt,sha256=xVavzAKN4iF_NbmhWOlOkHluka0YLkbN_pFQ9pW3gLI,117
2082
- vellum_ai-1.7.6.dist-info/RECORD,,
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
 
@@ -188,7 +188,7 @@ class BaseNodeDisplay(Generic[NodeType], metaclass=BaseNodeDisplayMeta):
188
188
  type = primitive_type_to_vellum_variable_type(output)
189
189
  value = (
190
190
  serialize_value(node_id, display_context, output.instance)
191
- if output.instance is not None and output.instance != undefined
191
+ if output.instance is not None and output.instance is not undefined
192
192
  else None
193
193
  )
194
194
 
@@ -688,3 +688,19 @@ def test_serialize_node__comment_expanded_preserved_when_explicitly_set(serializ
688
688
  assert "comment" in display_data
689
689
  assert display_data["comment"]["value"] == "This is a test comment."
690
690
  assert display_data["comment"]["expanded"] is False
691
+
692
+
693
+ def test_serialize_node__attribute_with_type_annotation_no_default(serialize_node):
694
+ """
695
+ Tests that attributes with type annotations but no default values serialize as None.
696
+ """
697
+
698
+ # GIVEN a node with typed attributes but no default values
699
+ class NodeWithTypedAttributesNoDefault(BaseNode):
700
+ attr: str
701
+
702
+ # WHEN the node is serialized
703
+ serialized_node = serialize_node(NodeWithTypedAttributesNoDefault)
704
+
705
+ # THEN the attribute should serialize as None
706
+ assert serialized_node["attributes"][0]["value"] is None
@@ -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"
@@ -3,7 +3,7 @@ import inspect
3
3
  from io import StringIO
4
4
  import sys
5
5
  from uuid import UUID
6
- from typing import TYPE_CHECKING, Any, Dict, List, cast
6
+ from typing import TYPE_CHECKING, Any, Dict, List, Optional, cast
7
7
 
8
8
  from pydantic import BaseModel
9
9
 
@@ -248,13 +248,11 @@ def serialize_key(key: Any) -> str:
248
248
  return str(key)
249
249
 
250
250
 
251
- # Sentinel value to indicate a value should be omitted from serialization
252
- _UNDEFINED_SENTINEL: JsonObject = {"__undefined__": True}
253
-
254
-
255
- def serialize_value(executable_id: UUID, display_context: "WorkflowDisplayContext", value: Any) -> JsonObject:
251
+ def serialize_value(executable_id: UUID, display_context: "WorkflowDisplayContext", value: Any) -> Optional[JsonObject]:
256
252
  """
257
- Serialize a value to a JSON object.
253
+ Serialize a value to a JSON object. Returns `None` if the value resolves to `undefined`.
254
+ This is safe because all valid values are a JSON object, including the `None` constant:
255
+ > `{"type": "CONSTANT_VALUE", "value": {"type": "JSON", "value": None}}`
258
256
 
259
257
  Args:
260
258
  executable_id: node id or workflow id
@@ -265,7 +263,7 @@ def serialize_value(executable_id: UUID, display_context: "WorkflowDisplayContex
265
263
  serialized value
266
264
  """
267
265
  if value is undefined:
268
- return _UNDEFINED_SENTINEL
266
+ return None
269
267
 
270
268
  if isinstance(value, ConstantValueReference):
271
269
  return serialize_value(executable_id, display_context, value._value)
@@ -353,7 +351,7 @@ def serialize_value(executable_id: UUID, display_context: "WorkflowDisplayContex
353
351
  serialized_items = []
354
352
  for item in value:
355
353
  serialized_item = serialize_value(executable_id, display_context, item)
356
- if serialized_item != _UNDEFINED_SENTINEL:
354
+ if serialized_item is not None:
357
355
  serialized_items.append(serialized_item)
358
356
 
359
357
  if all(isinstance(item, dict) and item["type"] == "CONSTANT_VALUE" for item in serialized_items):
@@ -389,7 +387,7 @@ def serialize_value(executable_id: UUID, display_context: "WorkflowDisplayContex
389
387
  serialized_entries: List[Dict[str, Any]] = []
390
388
  for key, val in value.items():
391
389
  serialized_val = serialize_value(executable_id, display_context, val)
392
- if serialized_val != _UNDEFINED_SENTINEL:
390
+ if serialized_val is not None:
393
391
  serialized_entries.append(
394
392
  {
395
393
  "id": str(uuid4_from_hash(f"{executable_id}|{key}")),
@@ -455,7 +453,9 @@ def serialize_value(executable_id: UUID, display_context: "WorkflowDisplayContex
455
453
  if inputs:
456
454
  serialized_inputs = {}
457
455
  for param_name, input_ref in inputs.items():
458
- serialized_inputs[param_name] = serialize_value(executable_id, display_context, input_ref)
456
+ serialized_input = serialize_value(executable_id, display_context, input_ref)
457
+ if serialized_input is not None:
458
+ serialized_inputs[param_name] = serialized_input
459
459
 
460
460
  model_data = function_definition.model_dump()
461
461
  model_data["inputs"] = serialized_inputs
@@ -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
- return cast(
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
- "id": str(trigger_id),
483
- "type": trigger_type.value,
484
- "attributes": [],
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: