vellum-workflow-server 1.10.7__py3-none-any.whl → 1.11.15__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: vellum-workflow-server
3
- Version: 1.10.7
3
+ Version: 1.11.15
4
4
  Summary:
5
5
  License: AGPL
6
6
  Requires-Python: >=3.9.0,<4
@@ -24,12 +24,13 @@ Requires-Dist: cryptography (==43.0.3)
24
24
  Requires-Dist: flask (==2.3.3)
25
25
  Requires-Dist: gunicorn (==23.0.0)
26
26
  Requires-Dist: orderly-set (==5.2.2)
27
+ Requires-Dist: orjson (==3.11.4)
27
28
  Requires-Dist: pebble (==5.0.7)
28
29
  Requires-Dist: pyjwt (==2.10.0)
29
30
  Requires-Dist: python-dotenv (==1.2.1)
30
31
  Requires-Dist: retrying (==1.3.4)
31
32
  Requires-Dist: sentry-sdk[flask] (==2.20.0)
32
- Requires-Dist: vellum-ai (==1.10.7)
33
+ Requires-Dist: vellum-ai (==1.11.15)
33
34
  Description-Content-Type: text/markdown
34
35
 
35
36
  # Vellum Workflow Runner Server
@@ -5,16 +5,16 @@ workflow_server/api/healthz_view.py,sha256=itiRvBDBXncrw8Kbbc73UZLwqMAhgHOR3uSre
5
5
  workflow_server/api/status_view.py,sha256=Jah8dBAVL4uOcRfsjKAOyfVONFyk9HQjXeRfjcIqhmA,514
6
6
  workflow_server/api/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
7
  workflow_server/api/tests/test_input_display_mapping.py,sha256=drBZqMudFyB5wgiUOcMgRXz7E7ge-Qgxbstw4E4f0zE,2211
8
- workflow_server/api/tests/test_workflow_view.py,sha256=B6B8mCirt3FvpPKRP_AyzPJ199k_gwLzAcQuWRkzEfA,32343
8
+ workflow_server/api/tests/test_workflow_view.py,sha256=I2sd11ptKDqbylzB9rKqkMXeZoh8ttad3zIhNus86vk,32491
9
9
  workflow_server/api/tests/test_workflow_view_async_exec.py,sha256=eP_H2xI9SRfJdoJ6HPeynQecnxR50I_8aDCooF-YzIw,11952
10
- workflow_server/api/tests/test_workflow_view_stream_workflow_route.py,sha256=16ZxP_nuAIP1Cg4-4z6EQttn07SRY1GkVq2m53z6XaE,42389
11
- workflow_server/api/workflow_view.py,sha256=RiRO0Z_gCIbdcG9XX_PcB9j8Qx5K_2dXxxtkib6fezY,24601
12
- workflow_server/code_exec_runner.py,sha256=DLNNrinCRbnkSvlqVvSZ1wv_etI7r_kKAXNPGMj3jBk,2196
10
+ workflow_server/api/tests/test_workflow_view_stream_workflow_route.py,sha256=QilhiYv3_iaF-xvbmqUqqQqqVIZC4KgBe1u8Ku1q52s,42511
11
+ workflow_server/api/workflow_view.py,sha256=60RWK2VFmmeLpHCGwf3DdBBx2_GP5KIRxE6rAEwG8Jw,24774
12
+ workflow_server/code_exec_runner.py,sha256=vJlCQ8FkcG8RfCZ34Ea2Xt6J7dNkU5EqA-KxRkbVOeo,2219
13
13
  workflow_server/config.py,sha256=I4hfTsjIbHxoSKylPCjKnrysPV0jO5nfRKwpKvEcfAE,2193
14
14
  workflow_server/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
15
15
  workflow_server/core/cancel_workflow.py,sha256=QcEeYUIrxq4pub-z9BlGi5fLI3gVRml-56rMCW7j5Hc,2212
16
16
  workflow_server/core/events.py,sha256=24MA66DVQuaLJJcZrS8IL1Zq4Ohi9CoouKZ5VgoH3Cs,1402
17
- workflow_server/core/executor.py,sha256=xbySFdb9KHoqFDfiKMR77fViFVo3XEQ5ER54C1PlS8c,16948
17
+ workflow_server/core/executor.py,sha256=7mJDuP8uedCAygNorp2Vscy6w7xHHqNZ_jxJXkJZzeY,17112
18
18
  workflow_server/core/utils.py,sha256=mecVPqQkthrC4mpop3r8J3IWnBmKbDgqfCrSagyzVEg,2021
19
19
  workflow_server/core/workflow_executor_context.py,sha256=8faOdpU4cBeIbmOvg9VzD3eS5i_PKcH7tyNGzx_rehg,3899
20
20
  workflow_server/logging_config.py,sha256=Hvx1t8uhqMMinl-5qcef7ufUvzs6x14VRnCb7YZxEAg,1206
@@ -31,7 +31,7 @@ workflow_server/utils/tests/test_sentry_integration.py,sha256=14PfuW8AaQNNtqLmBs
31
31
  workflow_server/utils/tests/test_system_utils.py,sha256=_4GwXvVvU5BrATxUEWwQIPg0bzQXMWBtiBmjP8MTxJM,4314
32
32
  workflow_server/utils/tests/test_utils.py,sha256=0Nq6du8o-iBtTrip9_wgHES53JSiJbVdSXaBnPobw3s,6930
33
33
  workflow_server/utils/utils.py,sha256=m7iMJtor5SQLWu7jlJw-X5Q3nmbq69BCxTMv6qnFYrA,4835
34
- vellum_workflow_server-1.10.7.dist-info/METADATA,sha256=fmGtKTAbZbiiO93Cw18heCPbkQUjjicY2bEXEg2TB5U,2269
35
- vellum_workflow_server-1.10.7.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
36
- vellum_workflow_server-1.10.7.dist-info/entry_points.txt,sha256=uB_0yPkr7YV6RhEXzvFReUM8P4OQBlVXD6TN6eb9-oc,277
37
- vellum_workflow_server-1.10.7.dist-info/RECORD,,
34
+ vellum_workflow_server-1.11.15.dist-info/METADATA,sha256=oIldsrXZvwKAboSlLYy1LRYuEir14fTww2xS7ii3I7I,2304
35
+ vellum_workflow_server-1.11.15.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
36
+ vellum_workflow_server-1.11.15.dist-info/entry_points.txt,sha256=uB_0yPkr7YV6RhEXzvFReUM8P4OQBlVXD6TN6eb9-oc,277
37
+ vellum_workflow_server-1.11.15.dist-info/RECORD,,
@@ -389,7 +389,15 @@ class MyAdditionNode(BaseNode):
389
389
  },
390
390
  "id": "2464b610-fb6d-495b-b17c-933ee147f19f",
391
391
  "label": "My Addition Node",
392
- "outputs": [{"id": "f39d85c9-e7bf-45e1-bb67-f16225db0118", "name": "result", "type": "NUMBER", "value": None}],
392
+ "outputs": [
393
+ {
394
+ "id": "f39d85c9-e7bf-45e1-bb67-f16225db0118",
395
+ "name": "result",
396
+ "type": "NUMBER",
397
+ "value": None,
398
+ "schema": {"type": "integer"},
399
+ }
400
+ ],
393
401
  "ports": [{"id": "bc489295-cd8a-4aa2-88bb-34446374100d", "name": "default", "type": "DEFAULT"}],
394
402
  "trigger": {"id": "ff580cad-73d6-44fe-8f2c-4b8dc990ee70", "merge_behavior": "AWAIT_ATTRIBUTES"},
395
403
  "type": "GENERIC",
@@ -549,7 +549,10 @@ class Inputs(BaseInputs):
549
549
  # AND the third event should be workflow execution rejected
550
550
  assert events[2]["name"] == "workflow.execution.rejected"
551
551
  assert events[1]["span_id"] == events[2]["span_id"]
552
- assert "Required input variables foo should have defined value" in events[2]["body"]["error"]["message"]
552
+ actual_error_message = events[2]["body"]["error"]["message"]
553
+ assert "Required input variables" in actual_error_message
554
+ assert "foo" in actual_error_message
555
+ assert "should have defined value" in actual_error_message
553
556
 
554
557
  # AND the fourth event should be vembda execution fulfilled
555
558
  assert events[3]["name"] == "vembda.execution.fulfilled"
@@ -15,6 +15,7 @@ from uuid import uuid4
15
15
  from typing import Any, Dict, Generator, Iterator, Optional, Union, cast
16
16
 
17
17
  from flask import Blueprint, Response, current_app as app, request, stream_with_context
18
+ import orjson
18
19
  from pydantic import ValidationError
19
20
  from vellum_ee.workflows.display.nodes.get_node_display_class import get_node_display_class
20
21
  from vellum_ee.workflows.display.types import WorkflowDisplayContext
@@ -115,7 +116,7 @@ def stream_workflow_route() -> Response:
115
116
  for row in workflow_events:
116
117
  yield "\n"
117
118
  if isinstance(row, dict):
118
- dump = json.dumps(row)
119
+ dump = orjson.dumps(row).decode("utf-8")
119
120
  yield dump
120
121
  else:
121
122
  yield row
@@ -500,11 +501,11 @@ def stream_node_route() -> Response:
500
501
  break
501
502
 
502
503
  def generator() -> Generator[str, None, None]:
503
- yield json.dumps(vembda_initiated_event.model_dump(mode="json"))
504
+ yield orjson.dumps(vembda_initiated_event.model_dump(mode="json")).decode("utf-8")
504
505
 
505
506
  for row in node_events():
506
507
  yield "\n"
507
- yield json.dumps(row)
508
+ yield orjson.dumps(row).decode("utf-8")
508
509
 
509
510
  headers = {
510
511
  "X-Vellum-SDK-Version": vembda_initiated_event.body.sdk_version,
@@ -530,11 +531,18 @@ def serialize_route() -> Response:
530
531
  is_new_server = data.get("is_new_server", False)
531
532
  module = data.get("module")
532
533
 
534
+ headers = {
535
+ "X-Vellum-Is-New-Server": str(is_new_server).lower(),
536
+ }
537
+
533
538
  if not files:
539
+ error_message = "No files received"
540
+ logger.warning(error_message)
534
541
  return Response(
535
- json.dumps({"detail": "No files received"}),
542
+ json.dumps({"detail": error_message}),
536
543
  status=400,
537
544
  content_type="application/json",
545
+ headers=headers,
538
546
  )
539
547
 
540
548
  client = create_vellum_client(api_key=workspace_api_key)
@@ -543,10 +551,6 @@ def serialize_route() -> Response:
543
551
  namespace = get_random_namespace()
544
552
  virtual_finder = VirtualFileFinder(files, namespace, source_module=module)
545
553
 
546
- headers = {
547
- "X-Vellum-Is-New-Server": str(is_new_server).lower(),
548
- }
549
-
550
554
  try:
551
555
  sys.meta_path.append(virtual_finder)
552
556
  result = BaseWorkflowDisplay.serialize_module(namespace, client=client, dry_run=True)
@@ -1,11 +1,12 @@
1
1
  from datetime import datetime
2
- import json
3
2
  import logging
4
3
  import os
5
4
  from threading import Event as ThreadingEvent
6
5
  from uuid import uuid4
7
6
  from typing import Optional
8
7
 
8
+ import orjson
9
+
9
10
  from workflow_server.core.events import VembdaExecutionInitiatedBody, VembdaExecutionInitiatedEvent
10
11
  from workflow_server.core.executor import stream_workflow
11
12
  from workflow_server.core.utils import serialize_vembda_rejected_event
@@ -29,7 +30,7 @@ def run_code_exec_stream() -> None:
29
30
  split_input = input_raw.split("\n--vellum-input-stop--\n")
30
31
  input_json = split_input[0]
31
32
 
32
- input_data = json.loads(input_json)
33
+ input_data = orjson.loads(input_json)
33
34
  context = WorkflowExecutorContext.model_validate(input_data)
34
35
 
35
36
  print("--vellum-output-start--") # noqa: T201
@@ -53,7 +54,7 @@ def run_code_exec_stream() -> None:
53
54
  cancel_signal=ThreadingEvent(),
54
55
  )
55
56
  for line in stream_iterator:
56
- print(f"{_EVENT_LINE}{json.dumps(line)}") # noqa: T201
57
+ print(f"{_EVENT_LINE}{orjson.dumps(line).decode('utf-8')}") # noqa: T201
57
58
  except Exception as e:
58
59
  logger.exception(e)
59
60
 
@@ -1,6 +1,5 @@
1
1
  from datetime import datetime, timezone
2
2
  from io import StringIO
3
- import json
4
3
  import logging
5
4
  from multiprocessing import Process, Queue
6
5
  import os
@@ -13,7 +12,9 @@ from traceback import format_exc
13
12
  from uuid import UUID, uuid4
14
13
  from typing import Any, Callable, Generator, Iterator, Optional, Tuple
15
14
 
15
+ import orjson
16
16
  from vellum_ee.workflows.display.utils.events import event_enricher
17
+ from vellum_ee.workflows.display.utils.expressions import base_descriptor_validator
17
18
  from vellum_ee.workflows.server.virtual_file_loader import VirtualFileFinder
18
19
 
19
20
  from vellum.workflows import BaseWorkflow
@@ -104,7 +105,7 @@ def _stream_workflow_wrapper(
104
105
  span_id_emitted = True
105
106
 
106
107
  for event in stream_iterator:
107
- queue.put(json.dumps(event))
108
+ queue.put(orjson.dumps(event).decode("utf-8"))
108
109
 
109
110
  except Exception as e:
110
111
  if not span_id_emitted:
@@ -177,6 +178,7 @@ def stream_workflow(
177
178
  node_output_mocks = MockNodeExecution.validate_all(
178
179
  executor_context.node_output_mocks,
179
180
  workflow.__class__,
181
+ descriptor_validator=base_descriptor_validator,
180
182
  )
181
183
 
182
184
  cancel_signal = cancel_signal or ThreadingEvent()