dex-python-sdk 1.40.0__tar.gz → 1.44.0__tar.gz

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 (77) hide show
  1. {dex_python_sdk-1.40.0 → dex_python_sdk-1.44.0}/PKG-INFO +8 -15
  2. {dex_python_sdk-1.40.0 → dex_python_sdk-1.44.0}/README.md +7 -14
  3. {dex_python_sdk-1.40.0 → dex_python_sdk-1.44.0}/dex/__init__.py +3 -0
  4. {dex_python_sdk-1.40.0 → dex_python_sdk-1.44.0}/dex/_invocation_context.py +16 -0
  5. {dex_python_sdk-1.40.0 → dex_python_sdk-1.44.0}/dex/_worker_dispatcher.py +0 -6
  6. {dex_python_sdk-1.40.0 → dex_python_sdk-1.44.0}/dex/async_client.py +18 -60
  7. {dex_python_sdk-1.40.0 → dex_python_sdk-1.44.0}/dex/channel.py +5 -2
  8. {dex_python_sdk-1.40.0 → dex_python_sdk-1.44.0}/dex/client.py +18 -61
  9. {dex_python_sdk-1.40.0 → dex_python_sdk-1.44.0}/dex/context.py +2 -0
  10. dex_python_sdk-1.44.0/dex/dexpb/dex_pb2.py +435 -0
  11. {dex_python_sdk-1.40.0 → dex_python_sdk-1.44.0}/dex/dexpb/dex_pb2.pyi +19 -68
  12. {dex_python_sdk-1.40.0 → dex_python_sdk-1.44.0}/dex/dexpb/dex_pb2_grpc.py +3 -50
  13. {dex_python_sdk-1.40.0 → dex_python_sdk-1.44.0}/dex/flow.py +15 -3
  14. {dex_python_sdk-1.40.0 → dex_python_sdk-1.44.0}/dex/flow_config.py +8 -6
  15. {dex_python_sdk-1.40.0 → dex_python_sdk-1.44.0}/dex/flow_info.py +0 -2
  16. {dex_python_sdk-1.40.0 → dex_python_sdk-1.44.0}/dex/flow_result.py +1 -2
  17. dex_python_sdk-1.44.0/dex/join.py +631 -0
  18. {dex_python_sdk-1.40.0 → dex_python_sdk-1.44.0}/dex/wait_options.py +12 -32
  19. {dex_python_sdk-1.40.0 → dex_python_sdk-1.44.0}/pyproject.toml +1 -1
  20. dex_python_sdk-1.40.0/dex/dexpb/dex_pb2.py +0 -443
  21. {dex_python_sdk-1.40.0 → dex_python_sdk-1.44.0}/LEGACY_NOTICES.md +0 -0
  22. {dex_python_sdk-1.40.0 → dex_python_sdk-1.44.0}/LICENSE +0 -0
  23. {dex_python_sdk-1.40.0 → dex_python_sdk-1.44.0}/dex/_async_value_hydrator.py +0 -0
  24. {dex_python_sdk-1.40.0 → dex_python_sdk-1.44.0}/dex/_async_worker_dispatcher.py +0 -0
  25. {dex_python_sdk-1.40.0 → dex_python_sdk-1.44.0}/dex/_attribute_reads.py +0 -0
  26. {dex_python_sdk-1.40.0 → dex_python_sdk-1.44.0}/dex/_credential_transport.py +0 -0
  27. {dex_python_sdk-1.40.0 → dex_python_sdk-1.44.0}/dex/_flow_service_tls.py +0 -0
  28. {dex_python_sdk-1.40.0 → dex_python_sdk-1.44.0}/dex/_grpc_errors.py +0 -0
  29. {dex_python_sdk-1.40.0 → dex_python_sdk-1.44.0}/dex/_message_size.py +0 -0
  30. {dex_python_sdk-1.40.0 → dex_python_sdk-1.44.0}/dex/_native.pyi +0 -0
  31. {dex_python_sdk-1.40.0 → dex_python_sdk-1.44.0}/dex/_pull_worker.py +0 -0
  32. {dex_python_sdk-1.40.0 → dex_python_sdk-1.44.0}/dex/_server_protocol.py +0 -0
  33. {dex_python_sdk-1.40.0 → dex_python_sdk-1.44.0}/dex/_utils.py +0 -0
  34. {dex_python_sdk-1.40.0 → dex_python_sdk-1.44.0}/dex/_value_hydrator.py +0 -0
  35. {dex_python_sdk-1.40.0 → dex_python_sdk-1.44.0}/dex/_value_mapper.py +0 -0
  36. {dex_python_sdk-1.40.0 → dex_python_sdk-1.44.0}/dex/action.py +0 -0
  37. {dex_python_sdk-1.40.0 → dex_python_sdk-1.44.0}/dex/async_worker.py +0 -0
  38. {dex_python_sdk-1.40.0 → dex_python_sdk-1.44.0}/dex/attribute.py +0 -0
  39. {dex_python_sdk-1.40.0 → dex_python_sdk-1.44.0}/dex/attribute_match.py +0 -0
  40. {dex_python_sdk-1.40.0 → dex_python_sdk-1.44.0}/dex/attribute_values.py +0 -0
  41. {dex_python_sdk-1.40.0 → dex_python_sdk-1.44.0}/dex/blob_cache.py +0 -0
  42. {dex_python_sdk-1.40.0 → dex_python_sdk-1.44.0}/dex/client_options.py +0 -0
  43. {dex_python_sdk-1.40.0 → dex_python_sdk-1.44.0}/dex/codec.py +0 -0
  44. {dex_python_sdk-1.40.0 → dex_python_sdk-1.44.0}/dex/condition.py +0 -0
  45. {dex_python_sdk-1.40.0 → dex_python_sdk-1.44.0}/dex/credential.py +0 -0
  46. {dex_python_sdk-1.40.0 → dex_python_sdk-1.44.0}/dex/dexpb/__init__.py +0 -0
  47. {dex_python_sdk-1.40.0 → dex_python_sdk-1.44.0}/dex/flow_options.py +0 -0
  48. {dex_python_sdk-1.40.0 → dex_python_sdk-1.44.0}/dex/flow_service_tls_options.py +0 -0
  49. {dex_python_sdk-1.40.0 → dex_python_sdk-1.44.0}/dex/pull_registration.py +0 -0
  50. {dex_python_sdk-1.40.0 → dex_python_sdk-1.44.0}/dex/py.typed +0 -0
  51. {dex_python_sdk-1.40.0 → dex_python_sdk-1.44.0}/dex/rpc_invoke_options.py +0 -0
  52. {dex_python_sdk-1.40.0 → dex_python_sdk-1.44.0}/dex/runtime_errors.py +0 -0
  53. {dex_python_sdk-1.40.0 → dex_python_sdk-1.44.0}/dex/step.py +0 -0
  54. {dex_python_sdk-1.40.0 → dex_python_sdk-1.44.0}/dex/step_execution.py +0 -0
  55. {dex_python_sdk-1.40.0 → dex_python_sdk-1.44.0}/dex/stream.py +0 -0
  56. {dex_python_sdk-1.40.0 → dex_python_sdk-1.44.0}/dex/subflow.py +0 -0
  57. {dex_python_sdk-1.40.0 → dex_python_sdk-1.44.0}/dex/timer.py +0 -0
  58. {dex_python_sdk-1.40.0 → dex_python_sdk-1.44.0}/dex/wait.py +0 -0
  59. {dex_python_sdk-1.40.0 → dex_python_sdk-1.44.0}/dex/worker.py +0 -0
  60. {dex_python_sdk-1.40.0 → dex_python_sdk-1.44.0}/dex/worker_options.py +0 -0
  61. {dex_python_sdk-1.40.0 → dex_python_sdk-1.44.0}/sdk-rust/Cargo.lock +0 -0
  62. {dex_python_sdk-1.40.0 → dex_python_sdk-1.44.0}/sdk-rust/Cargo.toml +0 -0
  63. {dex_python_sdk-1.40.0 → dex_python_sdk-1.44.0}/sdk-rust/crates/dex-blob-cache/Cargo.toml +0 -0
  64. {dex_python_sdk-1.40.0 → dex_python_sdk-1.44.0}/sdk-rust/crates/dex-blob-cache/LICENSE +0 -0
  65. {dex_python_sdk-1.40.0 → dex_python_sdk-1.44.0}/sdk-rust/crates/dex-blob-cache/README.md +0 -0
  66. {dex_python_sdk-1.40.0 → dex_python_sdk-1.44.0}/sdk-rust/crates/dex-blob-cache/src/config.rs +0 -0
  67. {dex_python_sdk-1.40.0 → dex_python_sdk-1.44.0}/sdk-rust/crates/dex-blob-cache/src/entry.rs +0 -0
  68. {dex_python_sdk-1.40.0 → dex_python_sdk-1.44.0}/sdk-rust/crates/dex-blob-cache/src/error.rs +0 -0
  69. {dex_python_sdk-1.40.0 → dex_python_sdk-1.44.0}/sdk-rust/crates/dex-blob-cache/src/format.rs +0 -0
  70. {dex_python_sdk-1.40.0 → dex_python_sdk-1.44.0}/sdk-rust/crates/dex-blob-cache/src/lib.rs +0 -0
  71. {dex_python_sdk-1.40.0 → dex_python_sdk-1.44.0}/sdk-rust/crates/dex-blob-cache/src/policy.rs +0 -0
  72. {dex_python_sdk-1.40.0 → dex_python_sdk-1.44.0}/sdk-rust/crates/dex-blob-cache/src/store.rs +0 -0
  73. {dex_python_sdk-1.40.0 → dex_python_sdk-1.44.0}/sdk-rust/crates/dex-blob-cache/tests/blob_cache_integration.rs +0 -0
  74. {dex_python_sdk-1.40.0 → dex_python_sdk-1.44.0}/sdk-rust/crates/dex-blob-cache-python/Cargo.toml +0 -0
  75. {dex_python_sdk-1.40.0 → dex_python_sdk-1.44.0}/sdk-rust/crates/dex-blob-cache-python/LICENSE +0 -0
  76. {dex_python_sdk-1.40.0 → dex_python_sdk-1.44.0}/sdk-rust/crates/dex-blob-cache-python/README.md +0 -0
  77. {dex_python_sdk-1.40.0 → dex_python_sdk-1.44.0}/sdk-rust/crates/dex-blob-cache-python/src/lib.rs +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dex-python-sdk
3
- Version: 1.40.0
3
+ Version: 1.44.0
4
4
  Requires-Dist: grpcio>=1.83.0
5
5
  Requires-Dist: grpcio-status>=1.83.0
6
6
  Requires-Dist: protobuf>=7.35.1
@@ -914,13 +914,10 @@ buffered sets and deletes. The matching `ChannelMap` methods are RPC-only,
914
914
  include buffered publishes, and omit empty instances. Keys are decoded and
915
915
  sorted. Use `force_complete_if_channels_empty(...)` for conditional completion.
916
916
 
917
- Request IDs are optional for both durable waits. When omitted, the server
918
- derives a stable ID from the Step execution or Attribute condition. Reuse an
919
- override only for the same wait. `request_timeout` is the total SDK call budget
920
- across transparent transport reattachments. Zero waits indefinitely.
921
- A caller timeout or cancellation does not finish an accepted durable wait. Set `internal_handler_timeout` only when abandoned waits can accumulate. An active call transparently registers its wait again. Prefer a value comfortably longer than
922
- normal request timeouts and reconnect gaps. Zero disables timed rollover.
923
- Request expiry raises `RequestTimeoutError`.
917
+ Request IDs are optional for both waits. The Server does not read them for these
918
+ waits. `request_timeout` bounds the total SDK call across transport reattachments;
919
+ zero waits indefinitely. A caller disconnect releases its wait slot.
920
+
924
921
 
925
922
  `Client.wait_for_flow` and `AsyncClient.wait_for_flow` return a
926
923
  `FlowResult` after hydrating every output-bearing completion. Use
@@ -1167,12 +1164,8 @@ It does not affect protocol compatibility.
1167
1164
  [Sustainable Use License 1.0](LICENSE), with legacy portions under their
1168
1165
  original terms as described in [LEGACY_NOTICES.md](LEGACY_NOTICES.md).
1169
1166
 
1170
- ## Search run inclusion
1171
-
1172
- Searches exclude runs with the ContinuedAsNew status by default. server-zd never reports that status. Application queries still
1173
- need `FlowType` when using shared index slots. An explicit inclusion option
1174
- removes only the default exclusion; it does not override query filters. Keep
1175
- the query, inclusion option, and page size consistent across pages.
1167
+ ## Search Flow runs
1176
1168
 
1177
- Pass keyword-only `include_continued_as_new=True` to synchronous or asynchronous `search_flows` for execution-chain inspection. The default is `False`.
1169
+ Searches return runs that match the query. Include `FlowType` when using shared
1170
+ index slots, and keep the query and page size consistent across pages.
1178
1171
 
@@ -898,13 +898,10 @@ buffered sets and deletes. The matching `ChannelMap` methods are RPC-only,
898
898
  include buffered publishes, and omit empty instances. Keys are decoded and
899
899
  sorted. Use `force_complete_if_channels_empty(...)` for conditional completion.
900
900
 
901
- Request IDs are optional for both durable waits. When omitted, the server
902
- derives a stable ID from the Step execution or Attribute condition. Reuse an
903
- override only for the same wait. `request_timeout` is the total SDK call budget
904
- across transparent transport reattachments. Zero waits indefinitely.
905
- A caller timeout or cancellation does not finish an accepted durable wait. Set `internal_handler_timeout` only when abandoned waits can accumulate. An active call transparently registers its wait again. Prefer a value comfortably longer than
906
- normal request timeouts and reconnect gaps. Zero disables timed rollover.
907
- Request expiry raises `RequestTimeoutError`.
901
+ Request IDs are optional for both waits. The Server does not read them for these
902
+ waits. `request_timeout` bounds the total SDK call across transport reattachments;
903
+ zero waits indefinitely. A caller disconnect releases its wait slot.
904
+
908
905
 
909
906
  `Client.wait_for_flow` and `AsyncClient.wait_for_flow` return a
910
907
  `FlowResult` after hydrating every output-bearing completion. Use
@@ -1151,11 +1148,7 @@ It does not affect protocol compatibility.
1151
1148
  [Sustainable Use License 1.0](LICENSE), with legacy portions under their
1152
1149
  original terms as described in [LEGACY_NOTICES.md](LEGACY_NOTICES.md).
1153
1150
 
1154
- ## Search run inclusion
1155
-
1156
- Searches exclude runs with the ContinuedAsNew status by default. server-zd never reports that status. Application queries still
1157
- need `FlowType` when using shared index slots. An explicit inclusion option
1158
- removes only the default exclusion; it does not override query filters. Keep
1159
- the query, inclusion option, and page size consistent across pages.
1151
+ ## Search Flow runs
1160
1152
 
1161
- Pass keyword-only `include_continued_as_new=True` to synchronous or asynchronous `search_flows` for execution-chain inspection. The default is `False`.
1153
+ Searches return runs that match the query. Include `FlowType` when using shared
1154
+ index slots, and keep the query and page size consistent across pages.
@@ -75,6 +75,7 @@ from dex.flow_options import (
75
75
  TimeTravelStepMethod,
76
76
  TimeTravelType,
77
77
  )
78
+ from dex.join import Join, JoinRound
78
79
  from dex.flow_service_tls_options import FlowServiceTlsOptions
79
80
  from dex.flow_result import FlowResult, StepCompletion
80
81
  from dex.pull_registration import (
@@ -204,6 +205,8 @@ __all__ = [
204
205
  "IdReusePolicy",
205
206
  "InvalidStepResultError",
206
207
  "IndexType",
208
+ "Join",
209
+ "JoinRound",
207
210
  "JsonCodec",
208
211
  "LongPollTimeoutError",
209
212
  "RequestTimeoutError",
@@ -108,6 +108,7 @@ class InvocationContext:
108
108
  self._event_names: set[str] = set()
109
109
  self._step_output_finalizers: list[_StepOutputFinalizer] = []
110
110
  self._step_outputs_finalized = False
111
+ self._forked_join_names: set[str] = set()
111
112
 
112
113
  @property
113
114
  def flow_id(self) -> str:
@@ -468,6 +469,21 @@ class InvocationContext:
468
469
  )
469
470
  )
470
471
 
472
+ def _begin_join_fork(self, definition: ChannelMap[Any]) -> str:
473
+ self._require_registered(definition)
474
+ if self._method is not InvocationMethod.EXECUTE:
475
+ raise ValueError(
476
+ f"Join {definition.name} fork requires a Step execute Context; "
477
+ "use fork_with_round_key in an RPC handler"
478
+ )
479
+ if definition.name in self._forked_join_names:
480
+ raise ValueError(
481
+ f"Join {definition.name} was already forked in this Step execution; "
482
+ "use another Join or fork_with_round_key"
483
+ )
484
+ self._forked_join_names.add(definition.name)
485
+ return self.step_execution_id
486
+
471
487
  def _channel_size(
472
488
  self,
473
489
  definition: Channel[object] | ChannelMap[object],
@@ -781,12 +781,6 @@ class WorkerDispatcher:
781
781
  ),
782
782
  ActiveStepSearchMode.DISABLED: pb.ACTIVE_STEP_SEARCH_MODE_DISABLED,
783
783
  }[config.active_step_search_mode]
784
- if config.continue_as_new_threshold is not None:
785
- mapped.continue_as_new_threshold = config.continue_as_new_threshold
786
- if config.continue_as_new_page_size_bytes is not None:
787
- mapped.continue_as_new_page_size_in_bytes = (
788
- config.continue_as_new_page_size_bytes
789
- )
790
784
  if config.step_durability is not None:
791
785
  mapped.step_durability = {
792
786
  StepDurability.DEFAULT: pb.STEP_DURABILITY_UNSPECIFIED,
@@ -81,7 +81,6 @@ from dex.wait_options import (
81
81
  WaitForAttributeOptions,
82
82
  WaitForStepCompletionOptions,
83
83
  _ClientRequestBudget,
84
- _duration_seconds32,
85
84
  )
86
85
 
87
86
  InputT = TypeVar("InputT")
@@ -709,8 +708,8 @@ class AsyncClient:
709
708
  ),
710
709
  )
711
710
  return FlowInfo(
712
- response.flow_execution_id.flow_id,
713
- response.flow_execution_id.run_id,
711
+ response.flow_run_id.flow_id,
712
+ response.flow_run_id.run_id,
714
713
  response.flow_type,
715
714
  self._map_flow_status(response.flow_status),
716
715
  response.start_time.ToDatetime(tzinfo=timezone.utc),
@@ -820,8 +819,6 @@ class AsyncClient:
820
819
  query: str,
821
820
  page_size: int,
822
821
  next_page_token: str = "",
823
- *,
824
- include_continued_as_new: bool = False,
825
822
  ) -> SearchFlowsPage:
826
823
  """Return one page of Flow runs matching a visibility query.
827
824
 
@@ -829,7 +826,6 @@ class AsyncClient:
829
826
  query: A Dex visibility query; an empty string uses server defaults.
830
827
  page_size: The non-negative maximum result count requested.
831
828
  next_page_token: Opaque token from the preceding page, or ``""`` first.
832
- include_continued_as_new: Include earlier runs without overriding query filters.
833
829
 
834
830
  Returns:
835
831
  Server-ordered entries with hydrated indexed Attributes and a next token.
@@ -850,7 +846,6 @@ class AsyncClient:
850
846
  query=query,
851
847
  page_size=page_size,
852
848
  next_page_token=next_page_token,
853
- include_continued_as_new=include_continued_as_new,
854
849
  ),
855
850
  "search_flows",
856
851
  None,
@@ -979,16 +974,17 @@ class AsyncClient:
979
974
  ) -> None:
980
975
  """Await one Step execution completion or its request timeout expiry.
981
976
 
982
- The server derives a stable Request ID from the Step execution when none
983
- is supplied. Request timeout covers transparent transport reattachments.
984
- Internal handler timeout controls Update generation rollover without ending
985
- this request.
977
+ The Server does not read the request ID for this wait. Request timeout
978
+ covers transparent transport reattachments.
979
+ All long-poll waits on one Flow share a cap that defaults to 1,000
980
+ (``limits.maxLongPollWaitersPerFlow``). A wait over the cap raises
981
+ ``DexServiceError`` with RESOURCE_EXHAUSTED. A wait frees its slot when
982
+ it returns or the caller disconnects.
986
983
 
987
984
  Args:
988
985
  flow_id: The non-empty active Flow ID.
989
986
  step_execution_id: The Step type and positive execution number.
990
- options: The optional Request ID, request timeout, and internal handler
991
- timeout controls.
987
+ options: The optional request ID and request timeout.
992
988
 
993
989
  Raises:
994
990
  ValueError: If the Request ID or request timeout is invalid.
@@ -998,9 +994,6 @@ class AsyncClient:
998
994
  RuntimeError: If the Server reports a protocol range without protocol 4.
999
995
  """
1000
996
  request_budget = _ClientRequestBudget(options.request_timeout)
1001
- internal_handler_timeout_seconds = _duration_seconds32(
1002
- options.internal_handler_timeout
1003
- )
1004
997
  while True:
1005
998
  await self._negotiate_within_request_budget(
1006
999
  request_budget, "wait_for_step_completion", flow_id
@@ -1016,9 +1009,6 @@ class AsyncClient:
1016
1009
  step_type=step_execution_id.step_type,
1017
1010
  step_execution_number=str(step_execution_id.number),
1018
1011
  request_timeout_seconds=request_attempt.request_timeout_seconds,
1019
- internal_handler_timeout_seconds=(
1020
- internal_handler_timeout_seconds
1021
- ),
1022
1012
  request_id=options.request_id,
1023
1013
  ),
1024
1014
  "wait_for_step_completion",
@@ -1047,17 +1037,19 @@ class AsyncClient:
1047
1037
  """Await a singleton Attribute in the current run satisfying ``match``.
1048
1038
 
1049
1039
  The Client returns the value observed by the successful wait. The server
1050
- derives a stable Request ID from the condition when none is supplied.
1051
- Request timeout covers transparent transport reattachments. Internal handler
1052
- timeout controls Update generation rollover without ending this request.
1040
+ does not read the request ID for this wait. Request timeout covers
1041
+ transparent transport reattachments.
1053
1042
  JSON, bytes, and null operands raise ``ValueError`` before transport.
1043
+ All long-poll waits on one Flow share a cap that defaults to 1,000
1044
+ (``limits.maxLongPollWaitersPerFlow``). A wait over the cap raises
1045
+ ``DexServiceError`` with RESOURCE_EXHAUSTED. A wait frees its slot when
1046
+ it returns or the caller disconnects.
1054
1047
 
1055
1048
  Args:
1056
1049
  flow_id: The non-empty active Flow ID.
1057
1050
  attribute: The registered singleton Attribute to observe.
1058
1051
  match: The scalar predicate to await.
1059
- options: The optional Request ID, request timeout, and internal handler
1060
- timeout controls.
1052
+ options: The optional request ID and request timeout.
1061
1053
 
1062
1054
  Returns:
1063
1055
  The current Attribute value that satisfied ``match``.
@@ -1084,7 +1076,7 @@ class AsyncClient:
1084
1076
  ) -> ValueT:
1085
1077
  """Await one AttributeMap instance in the current run satisfying a match.
1086
1078
 
1087
- Match restrictions, Request ID, request-timeout and handler-generation behavior, and service
1079
+ Match restrictions, Request ID, request-timeout and wait-cap behavior, and service
1088
1080
  errors match :meth:`wait_for_attribute_match`.
1089
1081
 
1090
1082
  Args:
@@ -1092,7 +1084,7 @@ class AsyncClient:
1092
1084
  attribute: The registered AttributeMap to observe.
1093
1085
  instance: The map instance to observe. Slash is prohibited because it is a reserved character.
1094
1086
  match: The scalar predicate to await.
1095
- options: The optional Request ID override and total handler request timeout.
1087
+ options: The optional request ID and request timeout.
1096
1088
 
1097
1089
  Returns:
1098
1090
  The current AttributeMap value that satisfied ``match``.
@@ -1162,9 +1154,6 @@ class AsyncClient:
1162
1154
  )
1163
1155
  encoded_match.key = self._definition_name(attribute, instance)
1164
1156
  request_budget = _ClientRequestBudget(options.request_timeout)
1165
- internal_handler_timeout_seconds = _duration_seconds32(
1166
- options.internal_handler_timeout
1167
- )
1168
1157
  while True:
1169
1158
  await self._negotiate_within_request_budget(
1170
1159
  request_budget, "wait_for_attribute_match", flow_id
@@ -1183,9 +1172,6 @@ class AsyncClient:
1183
1172
  request_timeout_seconds=(
1184
1173
  request_attempt.request_timeout_seconds
1185
1174
  ),
1186
- internal_handler_timeout_seconds=(
1187
- internal_handler_timeout_seconds
1188
- ),
1189
1175
  request_id=options.request_id,
1190
1176
  ),
1191
1177
  "wait_for_attribute_match",
@@ -1237,27 +1223,6 @@ class AsyncClient:
1237
1223
  "active",
1238
1224
  )
1239
1225
 
1240
- async def trigger_continue_as_new(self, flow_id: str) -> None:
1241
- """Ask an active Flow to roll history into a new run.
1242
-
1243
- The Flow ID remains stable and the run ID changes when rollover occurs.
1244
-
1245
- Args:
1246
- flow_id: The non-empty active Flow ID.
1247
-
1248
- Raises:
1249
- FlowNotActiveOrNotFoundError: If the Flow is missing or closed.
1250
- DexServiceError: If FlowService cannot accept the request.
1251
- RuntimeError: If the Server reports a protocol range without protocol 4.
1252
- """
1253
- await self._call(
1254
- self._service.TriggerContinueAsNew,
1255
- pb.TriggerContinueAsNewRequest(flow_id=require_name(flow_id)),
1256
- "trigger_continue_as_new",
1257
- flow_id,
1258
- "active",
1259
- )
1260
-
1261
1226
  async def health_check(self) -> bool:
1262
1227
  """Await the FlowService health endpoint.
1263
1228
 
@@ -1466,12 +1431,6 @@ class AsyncClient:
1466
1431
  pb.ACTIVE_STEP_SEARCH_MODE_DISABLED
1467
1432
  ),
1468
1433
  }[config.active_step_search_mode]
1469
- if config.continue_as_new_threshold is not None:
1470
- mapped.continue_as_new_threshold = config.continue_as_new_threshold
1471
- if config.continue_as_new_page_size_bytes is not None:
1472
- mapped.continue_as_new_page_size_in_bytes = (
1473
- config.continue_as_new_page_size_bytes
1474
- )
1475
1434
  if config.step_durability is not None:
1476
1435
  mapped.step_durability = {
1477
1436
  StepDurability.DEFAULT: pb.STEP_DURABILITY_UNSPECIFIED,
@@ -1593,7 +1552,6 @@ class AsyncClient:
1593
1552
  ),
1594
1553
  int(pb.FLOW_STATUS_TERMINATED): FlowStatus.TERMINATED,
1595
1554
  int(pb.FLOW_STATUS_CANCELED): FlowStatus.CANCELED,
1596
- int(pb.FLOW_STATUS_CONTINUED_AS_NEW): FlowStatus.CONTINUED_AS_NEW,
1597
1555
  }
1598
1556
  try:
1599
1557
  return statuses[status]
@@ -75,7 +75,8 @@ class Channel(Generic[ValueT]):
75
75
  Channel size metadata loads automatically. Pending message envelopes require
76
76
  explicit load options; ChannelMessagesNotLoadedError means the snapshot did
77
77
  not load them, not that the queue is empty. A Channel cannot be observed
78
- through Client.get_attributes.
78
+ through Client.get_attributes. To wait for parallel branches of a Flow, use
79
+ :class:`~dex.Join` instead of counting signals on a Channel.
79
80
 
80
81
  Attributes:
81
82
  name: The non-empty Channel name without ``/``, unique within its Flow.
@@ -285,7 +286,9 @@ class ChannelMap(Generic[ValueT]):
285
286
  Instance keys must be non-empty and must not contain ``/``.
286
287
  Each instance follows Channel consumption and publication rules. Select exact
287
288
  instance messages with load_messages in RPC invocation options; declaring a
288
- map does not load all of its pending values.
289
+ map does not load all of its pending values. To wait for parallel branches of
290
+ a Flow, use :class:`~dex.Join`, which builds on a ChannelMap and chooses the
291
+ instance key and branch count for you.
289
292
 
290
293
  Attributes:
291
294
  name: The non-empty Channel name without ``/``, unique within its Flow.
@@ -81,7 +81,6 @@ from dex.wait_options import (
81
81
  WaitForAttributeOptions,
82
82
  WaitForStepCompletionOptions,
83
83
  _ClientRequestBudget,
84
- _duration_seconds32,
85
84
  )
86
85
 
87
86
  InputT = TypeVar("InputT")
@@ -724,8 +723,8 @@ class Client:
724
723
  ),
725
724
  )
726
725
  return FlowInfo(
727
- response.flow_execution_id.flow_id,
728
- response.flow_execution_id.run_id,
726
+ response.flow_run_id.flow_id,
727
+ response.flow_run_id.run_id,
729
728
  response.flow_type,
730
729
  self._map_flow_status(response.flow_status),
731
730
  response.start_time.ToDatetime(tzinfo=timezone.utc),
@@ -835,8 +834,6 @@ class Client:
835
834
  query: str,
836
835
  page_size: int,
837
836
  next_page_token: str = "",
838
- *,
839
- include_continued_as_new: bool = False,
840
837
  ) -> SearchFlowsPage:
841
838
  """Return one page of Flow runs matching a visibility query.
842
839
 
@@ -844,7 +841,6 @@ class Client:
844
841
  query: A Dex visibility query; an empty string matches server defaults.
845
842
  page_size: The non-negative maximum result count requested.
846
843
  next_page_token: Opaque token from the preceding page, or ``""`` first.
847
- include_continued_as_new: Include earlier runs without overriding query filters.
848
844
 
849
845
  Returns:
850
846
  Server-ordered entries with hydrated indexed Attributes and a next token.
@@ -865,7 +861,6 @@ class Client:
865
861
  query=query,
866
862
  page_size=page_size,
867
863
  next_page_token=next_page_token,
868
- include_continued_as_new=include_continued_as_new,
869
864
  ),
870
865
  "search_flows",
871
866
  None,
@@ -990,16 +985,17 @@ class Client:
990
985
  ) -> None:
991
986
  """Block until one Step execution completes or its request timeout expires.
992
987
 
993
- The server derives a stable Request ID from the Step execution when none
994
- is supplied. Request timeout covers transparent transport reattachments.
995
- Internal handler timeout controls Update generation rollover without ending
996
- this request.
988
+ The Server does not read the request ID for this wait. Request timeout
989
+ covers transparent transport reattachments.
990
+ All long-poll waits on one Flow share a cap that defaults to 1,000
991
+ (``limits.maxLongPollWaitersPerFlow``). A wait over the cap raises
992
+ ``DexServiceError`` with RESOURCE_EXHAUSTED. A wait frees its slot when
993
+ it returns or the caller disconnects.
997
994
 
998
995
  Args:
999
996
  flow_id: The non-empty active Flow ID.
1000
997
  step_execution_id: The Step type and positive execution number.
1001
- options: The optional Request ID, request timeout, and internal handler
1002
- timeout controls.
998
+ options: The optional request ID and request timeout.
1003
999
 
1004
1000
  Raises:
1005
1001
  ValueError: If the Request ID or request timeout is invalid.
@@ -1009,9 +1005,6 @@ class Client:
1009
1005
  RuntimeError: If the Server reports a protocol range without protocol 4.
1010
1006
  """
1011
1007
  request_budget = _ClientRequestBudget(options.request_timeout)
1012
- internal_handler_timeout_seconds = _duration_seconds32(
1013
- options.internal_handler_timeout
1014
- )
1015
1008
  while True:
1016
1009
  self._negotiate_within_request_budget(
1017
1010
  request_budget, "wait_for_step_completion", flow_id
@@ -1027,9 +1020,6 @@ class Client:
1027
1020
  step_type=step_execution_id.step_type,
1028
1021
  step_execution_number=str(step_execution_id.number),
1029
1022
  request_timeout_seconds=request_attempt.request_timeout_seconds,
1030
- internal_handler_timeout_seconds=(
1031
- internal_handler_timeout_seconds
1032
- ),
1033
1023
  request_id=options.request_id,
1034
1024
  ),
1035
1025
  "wait_for_step_completion",
@@ -1058,17 +1048,19 @@ class Client:
1058
1048
  """Wait for a singleton Attribute in the current run to satisfy ``match``.
1059
1049
 
1060
1050
  The Client returns the value observed by the successful wait. The server
1061
- derives a stable Request ID from the condition when none is supplied.
1062
- Request timeout covers transparent transport reattachments. Internal handler
1063
- timeout controls Update generation rollover without ending this request.
1051
+ does not read the request ID for this wait. Request timeout covers
1052
+ transparent transport reattachments.
1064
1053
  JSON, bytes, and null operands raise ``ValueError`` before transport.
1054
+ All long-poll waits on one Flow share a cap that defaults to 1,000
1055
+ (``limits.maxLongPollWaitersPerFlow``). A wait over the cap raises
1056
+ ``DexServiceError`` with RESOURCE_EXHAUSTED. A wait frees its slot when
1057
+ it returns or the caller disconnects.
1065
1058
 
1066
1059
  Args:
1067
1060
  flow_id: The non-empty active Flow ID.
1068
1061
  attribute: The registered singleton Attribute to observe.
1069
1062
  match: The scalar predicate to await.
1070
- options: The optional Request ID, request timeout, and internal handler
1071
- timeout controls.
1063
+ options: The optional request ID and request timeout.
1072
1064
 
1073
1065
  Returns:
1074
1066
  The current Attribute value that satisfied ``match``.
@@ -1096,7 +1088,7 @@ class Client:
1096
1088
  """Wait for one AttributeMap instance in the current run to match.
1097
1089
 
1098
1090
  ``instance`` is encoded as a map key. Match restrictions, Request ID,
1099
- request-timeout and handler-generation behavior, and service errors match
1091
+ request-timeout and wait-cap behavior, and service errors match
1100
1092
  :meth:`wait_for_attribute_match`.
1101
1093
 
1102
1094
  Args:
@@ -1104,7 +1096,7 @@ class Client:
1104
1096
  attribute: The registered AttributeMap to observe.
1105
1097
  instance: The map instance to observe. Slash is prohibited because it is a reserved character.
1106
1098
  match: The scalar predicate to await.
1107
- options: The optional Request ID override and total handler request timeout.
1099
+ options: The optional request ID and request timeout.
1108
1100
 
1109
1101
  Returns:
1110
1102
  The current AttributeMap value that satisfied ``match``.
@@ -1174,9 +1166,6 @@ class Client:
1174
1166
  )
1175
1167
  encoded_match.key = self._definition_name(attribute, instance)
1176
1168
  request_budget = _ClientRequestBudget(options.request_timeout)
1177
- internal_handler_timeout_seconds = _duration_seconds32(
1178
- options.internal_handler_timeout
1179
- )
1180
1169
  while True:
1181
1170
  self._negotiate_within_request_budget(
1182
1171
  request_budget, "wait_for_attribute_match", flow_id
@@ -1195,9 +1184,6 @@ class Client:
1195
1184
  request_timeout_seconds=(
1196
1185
  request_attempt.request_timeout_seconds
1197
1186
  ),
1198
- internal_handler_timeout_seconds=(
1199
- internal_handler_timeout_seconds
1200
- ),
1201
1187
  request_id=options.request_id,
1202
1188
  ),
1203
1189
  "wait_for_attribute_match",
@@ -1249,28 +1235,6 @@ class Client:
1249
1235
  "active",
1250
1236
  )
1251
1237
 
1252
- def trigger_continue_as_new(self, flow_id: str) -> None:
1253
- """Ask an active Flow to roll history into a new run.
1254
-
1255
- The request returns after acceptance; the Flow ID remains stable and the run
1256
- ID changes when rollover occurs.
1257
-
1258
- Args:
1259
- flow_id: The non-empty active Flow ID.
1260
-
1261
- Raises:
1262
- FlowNotActiveOrNotFoundError: If the Flow is missing or closed.
1263
- DexServiceError: If FlowService cannot accept the request.
1264
- RuntimeError: If the Server reports a protocol range without protocol 4.
1265
- """
1266
- self._call(
1267
- self._service.TriggerContinueAsNew,
1268
- pb.TriggerContinueAsNewRequest(flow_id=require_name(flow_id)),
1269
- "trigger_continue_as_new",
1270
- flow_id,
1271
- "active",
1272
- )
1273
-
1274
1238
  def health_check(self) -> bool:
1275
1239
  """Call the FlowService health endpoint.
1276
1240
 
@@ -1474,12 +1438,6 @@ class Client:
1474
1438
  pb.ACTIVE_STEP_SEARCH_MODE_DISABLED
1475
1439
  ),
1476
1440
  }[config.active_step_search_mode]
1477
- if config.continue_as_new_threshold is not None:
1478
- mapped.continue_as_new_threshold = config.continue_as_new_threshold
1479
- if config.continue_as_new_page_size_bytes is not None:
1480
- mapped.continue_as_new_page_size_in_bytes = (
1481
- config.continue_as_new_page_size_bytes
1482
- )
1483
1441
  if config.step_durability is not None:
1484
1442
  mapped.step_durability = {
1485
1443
  StepDurability.DEFAULT: pb.STEP_DURABILITY_UNSPECIFIED,
@@ -1597,7 +1555,6 @@ class Client:
1597
1555
  ),
1598
1556
  int(pb.FLOW_STATUS_TERMINATED): FlowStatus.TERMINATED,
1599
1557
  int(pb.FLOW_STATUS_CANCELED): FlowStatus.CANCELED,
1600
- int(pb.FLOW_STATUS_CONTINUED_AS_NEW): FlowStatus.CONTINUED_AS_NEW,
1601
1558
  }
1602
1559
  try:
1603
1560
  return statuses[status]
@@ -390,6 +390,8 @@ class Context(Protocol):
390
390
  definition: ChannelMap[object],
391
391
  ) -> tuple[str, ...]: ...
392
392
 
393
+ def _begin_join_fork(self, definition: ChannelMap[Any]) -> str: ...
394
+
393
395
  def _write_stream(
394
396
  self,
395
397
  definition: Stream[ValueT],