@temporalio/core-bridge 1.14.2-canary-release-testing.0 → 1.16.0

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 (233) hide show
  1. package/Cargo.lock +794 -650
  2. package/bridge-macros/src/derive_tryintojs.rs +40 -0
  3. package/lib/native.d.ts +24 -3
  4. package/package.json +4 -4
  5. package/releases/aarch64-apple-darwin/index.node +0 -0
  6. package/releases/aarch64-unknown-linux-gnu/index.node +0 -0
  7. package/releases/x86_64-apple-darwin/index.node +0 -0
  8. package/releases/x86_64-pc-windows-msvc/index.node +0 -0
  9. package/releases/x86_64-unknown-linux-gnu/index.node +0 -0
  10. package/sdk-core/.github/workflows/per-pr.yml +6 -6
  11. package/sdk-core/AGENTS.md +42 -31
  12. package/sdk-core/Cargo.toml +4 -1
  13. package/sdk-core/README.md +19 -13
  14. package/sdk-core/crates/client/Cargo.toml +4 -0
  15. package/sdk-core/crates/client/README.md +139 -0
  16. package/sdk-core/crates/client/src/async_activity_handle.rs +297 -0
  17. package/sdk-core/crates/client/src/callback_based.rs +7 -0
  18. package/sdk-core/crates/client/src/errors.rs +294 -0
  19. package/sdk-core/crates/client/src/{raw.rs → grpc.rs} +370 -159
  20. package/sdk-core/crates/client/src/lib.rs +920 -1326
  21. package/sdk-core/crates/client/src/metrics.rs +24 -33
  22. package/sdk-core/crates/client/src/options_structs.rs +457 -0
  23. package/sdk-core/crates/client/src/replaceable.rs +5 -4
  24. package/sdk-core/crates/client/src/request_extensions.rs +8 -9
  25. package/sdk-core/crates/client/src/retry.rs +99 -54
  26. package/sdk-core/crates/client/src/{worker/mod.rs → worker.rs} +104 -29
  27. package/sdk-core/crates/client/src/workflow_handle.rs +826 -0
  28. package/sdk-core/crates/common/Cargo.toml +62 -3
  29. package/sdk-core/crates/common/build.rs +742 -12
  30. package/sdk-core/crates/common/protos/api_upstream/.github/workflows/ci.yml +2 -0
  31. package/sdk-core/crates/common/protos/api_upstream/.github/workflows/create-release.yml +0 -5
  32. package/sdk-core/crates/common/protos/api_upstream/Makefile +2 -1
  33. package/sdk-core/crates/common/protos/api_upstream/README.md +8 -0
  34. package/sdk-core/crates/common/protos/api_upstream/cmd/check-path-conflicts/main.go +137 -0
  35. package/sdk-core/crates/common/protos/api_upstream/openapi/openapiv2.json +3329 -2647
  36. package/sdk-core/crates/common/protos/api_upstream/openapi/openapiv3.yaml +2734 -708
  37. package/sdk-core/crates/common/protos/api_upstream/temporal/api/activity/v1/message.proto +155 -3
  38. package/sdk-core/crates/common/protos/api_upstream/temporal/api/command/v1/message.proto +26 -0
  39. package/sdk-core/crates/common/protos/api_upstream/temporal/api/common/v1/message.proto +8 -1
  40. package/sdk-core/crates/common/protos/api_upstream/temporal/api/deployment/v1/message.proto +27 -1
  41. package/sdk-core/crates/common/protos/api_upstream/temporal/api/enums/v1/activity.proto +81 -0
  42. package/sdk-core/crates/common/protos/api_upstream/temporal/api/enums/v1/event_type.proto +4 -0
  43. package/sdk-core/crates/common/protos/api_upstream/temporal/api/enums/v1/failed_cause.proto +4 -0
  44. package/sdk-core/crates/common/protos/api_upstream/temporal/api/enums/v1/task_queue.proto +15 -0
  45. package/sdk-core/crates/common/protos/api_upstream/temporal/api/enums/v1/workflow.proto +63 -15
  46. package/sdk-core/crates/common/protos/api_upstream/temporal/api/errordetails/v1/message.proto +8 -0
  47. package/sdk-core/crates/common/protos/api_upstream/temporal/api/failure/v1/message.proto +1 -0
  48. package/sdk-core/crates/common/protos/api_upstream/temporal/api/history/v1/message.proto +111 -17
  49. package/sdk-core/crates/common/protos/api_upstream/temporal/api/namespace/v1/message.proto +21 -0
  50. package/sdk-core/crates/common/protos/api_upstream/temporal/api/nexus/v1/message.proto +20 -1
  51. package/sdk-core/crates/common/protos/api_upstream/temporal/api/operatorservice/v1/request_response.proto +4 -0
  52. package/sdk-core/crates/common/protos/api_upstream/temporal/api/schedule/v1/message.proto +2 -2
  53. package/sdk-core/crates/common/protos/api_upstream/temporal/api/taskqueue/v1/message.proto +2 -0
  54. package/sdk-core/crates/common/protos/api_upstream/temporal/api/worker/v1/message.proto +4 -7
  55. package/sdk-core/crates/common/protos/api_upstream/temporal/api/workflow/v1/message.proto +80 -22
  56. package/sdk-core/crates/common/protos/api_upstream/temporal/api/workflowservice/v1/request_response.proto +347 -23
  57. package/sdk-core/crates/common/protos/api_upstream/temporal/api/workflowservice/v1/service.proto +242 -43
  58. package/sdk-core/crates/common/protos/local/temporal/sdk/core/core_interface.proto +15 -0
  59. package/sdk-core/crates/common/protos/local/temporal/sdk/core/nexus/nexus.proto +9 -2
  60. package/sdk-core/crates/common/protos/local/temporal/sdk/core/workflow_activation/workflow_activation.proto +8 -0
  61. package/sdk-core/crates/common/protos/local/temporal/sdk/core/workflow_commands/workflow_commands.proto +22 -5
  62. package/sdk-core/crates/common/src/activity_definition.rs +20 -0
  63. package/sdk-core/crates/common/src/data_converters.rs +770 -0
  64. package/sdk-core/crates/common/src/envconfig.rs +5 -0
  65. package/sdk-core/crates/common/src/lib.rs +15 -211
  66. package/sdk-core/crates/common/src/payload_visitor.rs +648 -0
  67. package/sdk-core/crates/common/src/priority.rs +110 -0
  68. package/sdk-core/crates/common/src/protos/canned_histories.rs +19 -0
  69. package/sdk-core/crates/common/src/protos/history_builder.rs +45 -0
  70. package/sdk-core/crates/common/src/protos/history_info.rs +2 -0
  71. package/sdk-core/crates/common/src/protos/mod.rs +134 -27
  72. package/sdk-core/crates/common/src/protos/task_token.rs +3 -3
  73. package/sdk-core/crates/common/src/protos/utilities.rs +11 -0
  74. package/sdk-core/crates/{sdk-core → common}/src/telemetry/log_export.rs +11 -16
  75. package/sdk-core/crates/common/src/telemetry/metrics/core.rs +125 -0
  76. package/sdk-core/crates/common/src/telemetry/metrics.rs +272 -225
  77. package/sdk-core/crates/{sdk-core → common}/src/telemetry/otel.rs +8 -13
  78. package/sdk-core/crates/{sdk-core → common}/src/telemetry/prometheus_meter.rs +49 -50
  79. package/sdk-core/crates/{sdk-core → common}/src/telemetry/prometheus_server.rs +2 -3
  80. package/sdk-core/crates/common/src/telemetry.rs +278 -19
  81. package/sdk-core/crates/common/src/worker.rs +68 -636
  82. package/sdk-core/crates/common/src/workflow_definition.rs +60 -0
  83. package/sdk-core/crates/macros/Cargo.toml +5 -1
  84. package/sdk-core/crates/macros/src/activities_definitions.rs +585 -0
  85. package/sdk-core/crates/macros/src/fsm_impl.rs +507 -0
  86. package/sdk-core/crates/macros/src/lib.rs +138 -512
  87. package/sdk-core/crates/macros/src/macro_utils.rs +106 -0
  88. package/sdk-core/crates/macros/src/workflow_definitions.rs +1224 -0
  89. package/sdk-core/crates/sdk/Cargo.toml +19 -6
  90. package/sdk-core/crates/sdk/README.md +415 -0
  91. package/sdk-core/crates/sdk/src/activities.rs +417 -0
  92. package/sdk-core/crates/sdk/src/interceptors.rs +1 -1
  93. package/sdk-core/crates/sdk/src/lib.rs +759 -442
  94. package/sdk-core/crates/sdk/src/workflow_context/options.rs +64 -35
  95. package/sdk-core/crates/sdk/src/workflow_context.rs +1033 -289
  96. package/sdk-core/crates/sdk/src/workflow_future.rs +277 -213
  97. package/sdk-core/crates/sdk/src/workflows.rs +711 -0
  98. package/sdk-core/crates/sdk-core/Cargo.toml +59 -65
  99. package/sdk-core/crates/sdk-core/benches/workflow_replay_bench.rs +45 -54
  100. package/sdk-core/crates/sdk-core/machine_coverage/ActivityMachine_Coverage.puml +1 -1
  101. package/sdk-core/crates/sdk-core/src/abstractions.rs +6 -10
  102. package/sdk-core/crates/sdk-core/src/core_tests/activity_tasks.rs +6 -5
  103. package/sdk-core/crates/sdk-core/src/core_tests/mod.rs +22 -21
  104. package/sdk-core/crates/sdk-core/src/core_tests/queries.rs +21 -25
  105. package/sdk-core/crates/sdk-core/src/core_tests/replay_flag.rs +7 -10
  106. package/sdk-core/crates/sdk-core/src/core_tests/updates.rs +14 -17
  107. package/sdk-core/crates/sdk-core/src/core_tests/workers.rs +647 -27
  108. package/sdk-core/crates/sdk-core/src/core_tests/workflow_tasks.rs +46 -41
  109. package/sdk-core/crates/sdk-core/src/ephemeral_server/mod.rs +13 -16
  110. package/sdk-core/crates/sdk-core/src/histfetch.rs +20 -10
  111. package/sdk-core/crates/sdk-core/src/lib.rs +60 -123
  112. package/sdk-core/crates/sdk-core/src/pollers/mod.rs +4 -9
  113. package/sdk-core/crates/sdk-core/src/pollers/poll_buffer.rs +411 -32
  114. package/sdk-core/crates/sdk-core/src/protosext/mod.rs +2 -2
  115. package/sdk-core/crates/sdk-core/src/replay/mod.rs +14 -5
  116. package/sdk-core/crates/sdk-core/src/telemetry/metrics.rs +183 -198
  117. package/sdk-core/crates/sdk-core/src/telemetry/mod.rs +3 -281
  118. package/sdk-core/crates/sdk-core/src/test_help/integ_helpers.rs +35 -16
  119. package/sdk-core/crates/sdk-core/src/test_help/unit_helpers.rs +3 -6
  120. package/sdk-core/crates/sdk-core/src/worker/activities/activity_heartbeat_manager.rs +1 -0
  121. package/sdk-core/crates/sdk-core/src/worker/activities/local_activities.rs +11 -14
  122. package/sdk-core/crates/sdk-core/src/worker/activities.rs +16 -19
  123. package/sdk-core/crates/sdk-core/src/worker/client/mocks.rs +11 -5
  124. package/sdk-core/crates/sdk-core/src/worker/client.rs +104 -86
  125. package/sdk-core/crates/sdk-core/src/worker/heartbeat.rs +10 -14
  126. package/sdk-core/crates/sdk-core/src/worker/mod.rs +1175 -241
  127. package/sdk-core/crates/sdk-core/src/worker/nexus.rs +150 -23
  128. package/sdk-core/crates/sdk-core/src/worker/slot_provider.rs +2 -2
  129. package/sdk-core/crates/sdk-core/src/worker/tuner/fixed_size.rs +2 -2
  130. package/sdk-core/crates/sdk-core/src/worker/tuner/resource_based.rs +25 -27
  131. package/sdk-core/crates/sdk-core/src/worker/tuner.rs +64 -44
  132. package/sdk-core/crates/sdk-core/src/worker/workflow/driven_workflow.rs +9 -3
  133. package/sdk-core/crates/sdk-core/src/worker/workflow/machines/patch_state_machine.rs +5 -8
  134. package/sdk-core/crates/sdk-core/src/worker/workflow/machines/upsert_search_attributes_state_machine.rs +21 -22
  135. package/sdk-core/crates/sdk-core/src/worker/workflow/machines/workflow_machines.rs +28 -4
  136. package/sdk-core/crates/sdk-core/src/worker/workflow/managed_run.rs +20 -41
  137. package/sdk-core/crates/sdk-core/src/worker/workflow/mod.rs +50 -9
  138. package/sdk-core/crates/sdk-core/src/worker/workflow/run_cache.rs +4 -7
  139. package/sdk-core/crates/sdk-core/src/worker/workflow/wft_extraction.rs +2 -4
  140. package/sdk-core/crates/sdk-core/src/worker/workflow/wft_poller.rs +8 -9
  141. package/sdk-core/crates/sdk-core/src/worker/workflow/workflow_stream.rs +1 -3
  142. package/sdk-core/crates/sdk-core/tests/activities_procmacro.rs +6 -0
  143. package/sdk-core/crates/sdk-core/tests/activities_trybuild/basic_pass.rs +54 -0
  144. package/sdk-core/crates/sdk-core/tests/activities_trybuild/invalid_self_type_fail.rs +18 -0
  145. package/sdk-core/crates/sdk-core/tests/activities_trybuild/invalid_self_type_fail.stderr +5 -0
  146. package/sdk-core/crates/sdk-core/tests/activities_trybuild/missing_context_fail.rs +14 -0
  147. package/sdk-core/crates/sdk-core/tests/activities_trybuild/missing_context_fail.stderr +5 -0
  148. package/sdk-core/crates/sdk-core/tests/activities_trybuild/multi_arg_pass.rs +48 -0
  149. package/sdk-core/crates/sdk-core/tests/activities_trybuild/no_input_pass.rs +14 -0
  150. package/sdk-core/crates/sdk-core/tests/activities_trybuild/no_return_type_pass.rs +19 -0
  151. package/sdk-core/crates/sdk-core/tests/cloud_tests.rs +14 -5
  152. package/sdk-core/crates/sdk-core/tests/common/activity_functions.rs +55 -0
  153. package/sdk-core/crates/sdk-core/tests/common/mod.rs +281 -236
  154. package/sdk-core/crates/sdk-core/tests/common/workflows.rs +41 -28
  155. package/sdk-core/crates/sdk-core/tests/global_metric_tests.rs +9 -14
  156. package/sdk-core/crates/sdk-core/tests/heavy_tests/fuzzy_workflow.rs +73 -66
  157. package/sdk-core/crates/sdk-core/tests/heavy_tests.rs +306 -268
  158. package/sdk-core/crates/sdk-core/tests/integ_tests/async_activity_client_tests.rs +230 -0
  159. package/sdk-core/crates/sdk-core/tests/integ_tests/client_tests.rs +94 -57
  160. package/sdk-core/crates/sdk-core/tests/integ_tests/data_converter_tests.rs +381 -0
  161. package/sdk-core/crates/sdk-core/tests/integ_tests/ephemeral_server_tests.rs +37 -38
  162. package/sdk-core/crates/sdk-core/tests/integ_tests/heartbeat_tests.rs +49 -40
  163. package/sdk-core/crates/sdk-core/tests/integ_tests/metrics_tests.rs +447 -300
  164. package/sdk-core/crates/sdk-core/tests/integ_tests/pagination_tests.rs +50 -45
  165. package/sdk-core/crates/sdk-core/tests/integ_tests/polling_tests.rs +157 -157
  166. package/sdk-core/crates/sdk-core/tests/integ_tests/queries_tests.rs +103 -89
  167. package/sdk-core/crates/sdk-core/tests/integ_tests/update_tests.rs +609 -463
  168. package/sdk-core/crates/sdk-core/tests/integ_tests/visibility_tests.rs +80 -62
  169. package/sdk-core/crates/sdk-core/tests/integ_tests/worker_heartbeat_tests.rs +389 -265
  170. package/sdk-core/crates/sdk-core/tests/integ_tests/worker_tests.rs +250 -185
  171. package/sdk-core/crates/sdk-core/tests/integ_tests/worker_versioning_tests.rs +52 -49
  172. package/sdk-core/crates/sdk-core/tests/integ_tests/workflow_client_tests.rs +180 -0
  173. package/sdk-core/crates/sdk-core/tests/integ_tests/workflow_tests/activities.rs +437 -327
  174. package/sdk-core/crates/sdk-core/tests/integ_tests/workflow_tests/cancel_external.rs +82 -58
  175. package/sdk-core/crates/sdk-core/tests/integ_tests/workflow_tests/cancel_wf.rs +56 -30
  176. package/sdk-core/crates/sdk-core/tests/integ_tests/workflow_tests/child_workflows.rs +364 -251
  177. package/sdk-core/crates/sdk-core/tests/integ_tests/workflow_tests/client_interactions.rs +552 -0
  178. package/sdk-core/crates/sdk-core/tests/integ_tests/workflow_tests/continue_as_new.rs +110 -46
  179. package/sdk-core/crates/sdk-core/tests/integ_tests/workflow_tests/determinism.rs +243 -149
  180. package/sdk-core/crates/sdk-core/tests/integ_tests/workflow_tests/eager.rs +98 -32
  181. package/sdk-core/crates/sdk-core/tests/integ_tests/workflow_tests/local_activities.rs +1475 -1040
  182. package/sdk-core/crates/sdk-core/tests/integ_tests/workflow_tests/modify_wf_properties.rs +73 -43
  183. package/sdk-core/crates/sdk-core/tests/integ_tests/workflow_tests/nexus.rs +402 -245
  184. package/sdk-core/crates/sdk-core/tests/integ_tests/workflow_tests/patches.rs +343 -207
  185. package/sdk-core/crates/sdk-core/tests/integ_tests/workflow_tests/queries.rs +415 -0
  186. package/sdk-core/crates/sdk-core/tests/integ_tests/workflow_tests/replay.rs +96 -36
  187. package/sdk-core/crates/sdk-core/tests/integ_tests/workflow_tests/resets.rs +155 -140
  188. package/sdk-core/crates/sdk-core/tests/integ_tests/workflow_tests/signals.rs +183 -113
  189. package/sdk-core/crates/sdk-core/tests/integ_tests/workflow_tests/stickyness.rs +85 -44
  190. package/sdk-core/crates/sdk-core/tests/integ_tests/workflow_tests/timers.rs +142 -48
  191. package/sdk-core/crates/sdk-core/tests/integ_tests/workflow_tests/upsert_search_attrs.rs +73 -56
  192. package/sdk-core/crates/sdk-core/tests/integ_tests/workflow_tests.rs +365 -242
  193. package/sdk-core/crates/sdk-core/tests/main.rs +22 -16
  194. package/sdk-core/crates/sdk-core/tests/manual_tests.rs +233 -187
  195. package/sdk-core/crates/sdk-core/tests/runner.rs +4 -6
  196. package/sdk-core/crates/sdk-core/tests/shared_tests/mod.rs +73 -27
  197. package/sdk-core/crates/sdk-core/tests/shared_tests/priority.rs +107 -84
  198. package/sdk-core/crates/sdk-core/tests/workflows_procmacro.rs +6 -0
  199. package/sdk-core/crates/sdk-core/tests/workflows_trybuild/async_query_fail.rs +26 -0
  200. package/sdk-core/crates/sdk-core/tests/workflows_trybuild/async_query_fail.stderr +5 -0
  201. package/sdk-core/crates/sdk-core/tests/workflows_trybuild/basic_pass.rs +49 -0
  202. package/sdk-core/crates/sdk-core/tests/workflows_trybuild/minimal_pass.rs +21 -0
  203. package/sdk-core/crates/sdk-core/tests/workflows_trybuild/mut_query_fail.rs +26 -0
  204. package/sdk-core/crates/sdk-core/tests/workflows_trybuild/mut_query_fail.stderr +5 -0
  205. package/sdk-core/crates/sdk-core/tests/workflows_trybuild/sync_run_fail.rs +21 -0
  206. package/sdk-core/crates/sdk-core/tests/workflows_trybuild/sync_run_fail.stderr +5 -0
  207. package/sdk-core/crates/sdk-core-c-bridge/Cargo.toml +8 -1
  208. package/sdk-core/crates/sdk-core-c-bridge/include/temporal-sdk-core-c-bridge.h +37 -26
  209. package/sdk-core/crates/sdk-core-c-bridge/src/client.rs +180 -87
  210. package/sdk-core/crates/sdk-core-c-bridge/src/lib.rs +89 -5
  211. package/sdk-core/crates/sdk-core-c-bridge/src/metric.rs +10 -16
  212. package/sdk-core/crates/sdk-core-c-bridge/src/runtime.rs +59 -67
  213. package/sdk-core/crates/sdk-core-c-bridge/src/testing.rs +10 -10
  214. package/sdk-core/crates/sdk-core-c-bridge/src/tests/context.rs +57 -22
  215. package/sdk-core/crates/sdk-core-c-bridge/src/tests/mod.rs +108 -12
  216. package/sdk-core/crates/sdk-core-c-bridge/src/tests/utils.rs +9 -52
  217. package/sdk-core/crates/sdk-core-c-bridge/src/worker.rs +74 -91
  218. package/sdk-core/rustfmt.toml +2 -1
  219. package/src/client.rs +206 -289
  220. package/src/helpers/try_into_js.rs +88 -2
  221. package/src/metrics.rs +277 -35
  222. package/src/runtime.rs +94 -45
  223. package/src/testing.rs +9 -16
  224. package/src/worker.rs +86 -68
  225. package/ts/native.ts +39 -3
  226. package/sdk-core/crates/client/src/workflow_handle/mod.rs +0 -212
  227. package/sdk-core/crates/common/src/errors.rs +0 -85
  228. package/sdk-core/crates/common/tests/worker_task_types_test.rs +0 -129
  229. package/sdk-core/crates/macros/LICENSE.txt +0 -21
  230. package/sdk-core/crates/sdk/src/activity_context.rs +0 -238
  231. package/sdk-core/crates/sdk/src/app_data.rs +0 -37
  232. package/sdk-core/crates/sdk-core/tests/integ_tests/activity_functions.rs +0 -5
  233. package/sdk-core/crates/sdk-core/tests/integ_tests/workflow_tests/appdata_propagation.rs +0 -61
@@ -136,22 +136,50 @@ message WorkflowExecutionStartedEventAttributes {
136
136
  reserved 36;
137
137
  reserved "parent_pinned_deployment_version";
138
138
 
139
+
139
140
  // If present, the new workflow should start on this version with pinned base behavior.
140
141
  // Child of pinned parent will inherit the parent's version if the Child's Task Queue belongs to that version.
141
142
  //
142
- // New run initiated by workflow ContinueAsNew of pinned run, will inherit the previous run's version if the
143
+ // A new run initiated by workflow ContinueAsNew of pinned run, will inherit the previous run's version if the
143
144
  // new run's Task Queue belongs to that version.
144
145
  //
145
- // New run initiated by workflow Cron will never inherit.
146
+ // A new run initiated by workflow Cron will never inherit.
146
147
  //
147
- // New run initiated by workflow Retry will only inherit if the retried run is effectively pinned at the time
148
+ // A new run initiated by workflow Retry will only inherit if the retried run is effectively pinned at the time
148
149
  // of retry, and the retried run inherited a pinned version when it started (ie. it is a child of a pinned
149
150
  // parent, or a CaN of a pinned run, and is running on a Task Queue in the inherited version).
150
151
  //
151
152
  // Pinned override is inherited if Task Queue of new run is compatible with the override version.
152
153
  // Override is inherited separately and takes precedence over inherited base version.
154
+ //
155
+ // Note: This field is mutually exclusive with inherited_auto_upgrade_info.
156
+ // Additionaly, versioning_override, if present, overrides this field during routing decisions.
153
157
  temporal.api.deployment.v1.WorkerDeploymentVersion inherited_pinned_version = 37;
154
158
 
159
+ // If present, the new workflow begins with AutoUpgrade behavior. Before dispatching the
160
+ // first workflow task, this field is set to the deployment version on which the parent/
161
+ // previous run was operating. This inheritance only happens when the task queues belong to
162
+ // the same deployment version. The first workflow task will then be dispatched to either
163
+ // this inherited deployment version, or the current deployment version of the task queue's
164
+ // Deployment. After the first workflow task, the effective behavior depends on worker-sent
165
+ // values in subsequent workflow tasks.
166
+ //
167
+ // Inheritance rules:
168
+ // - ContinueAsNew and child workflows: inherit AutoUpgrade behavior and deployment version
169
+ // - Cron: never inherits
170
+ // - Retry: inherits only if the retried run is effectively AutoUpgrade at the time of
171
+ // retry, and inherited AutoUpgrade behavior when it started (i.e. it is a child of an
172
+ // AutoUpgrade parent or ContinueAsNew of an AutoUpgrade run, running on the same
173
+ // deployment as the parent/previous run)
174
+ //
175
+ // Additional notes:
176
+ // - This field is mutually exclusive with `inherited_pinned_version`.
177
+ // - `versioning_override`, if present, overrides this field during routing decisions.
178
+ // - SDK implementations do not interact with this field and is only used internally by
179
+ // the server to ensure task routing correctness.
180
+ temporal.api.deployment.v1.InheritedAutoUpgradeInfo inherited_auto_upgrade_info = 39;
181
+
182
+
155
183
  // A boolean indicating whether the SDK has asked to eagerly execute the first workflow task for this workflow and
156
184
  // eager execution was accepted by the server.
157
185
  // Only populated by server with version >= 1.29.0.
@@ -195,15 +223,17 @@ message WorkflowExecutionContinuedAsNewEventAttributes {
195
223
  google.protobuf.Duration workflow_task_timeout = 6;
196
224
  // The `WORKFLOW_TASK_COMPLETED` event which this command was reported with
197
225
  int64 workflow_task_completed_event_id = 7;
198
- // TODO: How and is this used?
226
+ // How long the server will wait before scheduling the first workflow task for the new run.
227
+ // Used for cron, retry, and other continue-as-new cases that server may enforce some minimal
228
+ // delay between new runs for system protection purpose.
199
229
  google.protobuf.Duration backoff_start_interval = 8;
200
230
  temporal.api.enums.v1.ContinueAsNewInitiator initiator = 9;
201
- // TODO: David are these right?
202
231
  // Deprecated. If a workflow's retry policy would cause a new run to start when the current one
203
232
  // has failed, this field would be populated with that failure. Now (when supported by server
204
233
  // and sdk) the final event will be `WORKFLOW_EXECUTION_FAILED` with `new_execution_run_id` set.
205
234
  temporal.api.failure.v1.Failure failure = 10 [deprecated = true];
206
- // TODO: Is this the result of *this* workflow as it continued-as-new?
235
+ // The result from the most recent completed run of this workflow. The SDK surfaces this to the
236
+ // new run via APIs such as `GetLastCompletionResult`.
207
237
  temporal.api.common.v1.Payloads last_completion_result = 11;
208
238
  temporal.api.common.v1.Header header = 12;
209
239
  temporal.api.common.v1.Memo memo = 13;
@@ -213,6 +243,11 @@ message WorkflowExecutionContinuedAsNewEventAttributes {
213
243
  // Deprecated. Only considered for versioning v0.2.
214
244
  bool inherit_build_id = 15 [deprecated = true];
215
245
 
246
+ // Experimental. Optionally decide the versioning behavior that the first task of the new run should use.
247
+ // For example, choose to AutoUpgrade on continue-as-new instead of inheriting the pinned version
248
+ // of the previous run.
249
+ temporal.api.enums.v1.ContinueAsNewVersioningBehavior initial_versioning_behavior = 16;
250
+
216
251
  // workflow_execution_timeout is omitted as it shouldn't be overridden from within a workflow.
217
252
  }
218
253
 
@@ -233,11 +268,22 @@ message WorkflowTaskStartedEventAttributes {
233
268
  int64 scheduled_event_id = 1;
234
269
  // Identity of the worker who picked up this task
235
270
  string identity = 2;
236
- // TODO: ? Appears unused?
271
+ // This field is populated from the RecordWorkflowTaskStartedRequest. Matching service would
272
+ // set the request_id on the RecordWorkflowTaskStartedRequest to a new UUID. This is useful
273
+ // in case a RecordWorkflowTaskStarted call succeed but matching doesn't get that response,
274
+ // so matching could retry and history service would return success if the request_id matches.
275
+ // In that case, matching will continue to deliver the task to worker. Without this field, history
276
+ // service would return AlreadyStarted error, and matching would drop the task.
237
277
  string request_id = 3;
238
- // True if this workflow should continue-as-new soon because its history size (in
239
- // either event count or bytes) is getting large.
278
+ // True if this workflow should continue-as-new soon. See `suggest_continue_as_new_reasons` for why.
240
279
  bool suggest_continue_as_new = 4;
280
+ // The reason(s) that suggest_continue_as_new is true, if it is.
281
+ // Unset if suggest_continue_as_new is false.
282
+ repeated temporal.api.enums.v1.SuggestContinueAsNewReason suggest_continue_as_new_reasons = 8;
283
+ // True if Workflow's Target Worker Deployment Version is different from its Pinned Version and
284
+ // the workflow is Pinned.
285
+ // Experimental.
286
+ bool target_worker_deployment_version_changed = 9;
241
287
  // Total history size in bytes, which the workflow might use to decide when to
242
288
  // continue-as-new regardless of the suggestion. Note that history event count is
243
289
  // just the event id of this event, so we don't include it explicitly here.
@@ -313,13 +359,15 @@ message WorkflowTaskFailedEventAttributes {
313
359
  temporal.api.enums.v1.WorkflowTaskFailedCause cause = 3;
314
360
  // The failure details
315
361
  temporal.api.failure.v1.Failure failure = 4;
316
- // If a worker explicitly failed this task, it's identity. TODO: What is this set to if server fails the task?
362
+ // If a worker explicitly failed this task, this field contains the worker's identity.
363
+ // When the server generates the failure internally this field is set as 'history-service'.
317
364
  string identity = 5;
318
365
  // The original run id of the workflow. For reset workflow.
319
366
  string base_run_id = 6;
320
367
  // If the workflow is being reset, the new run id.
321
368
  string new_run_id = 7;
322
- // TODO: ?
369
+ // Version of the event where the history branch was forked. Used by multi-cluster replication
370
+ // during resets to identify the correct history branch.
323
371
  int64 fork_event_version = 8;
324
372
  // Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv]
325
373
  // If a worker explicitly failed this task, its binary id
@@ -383,7 +431,12 @@ message ActivityTaskStartedEventAttributes {
383
431
  int64 scheduled_event_id = 1;
384
432
  // id of the worker that picked up this task
385
433
  string identity = 2;
386
- // TODO ??
434
+ // This field is populated from the RecordActivityTaskStartedRequest. Matching service would
435
+ // set the request_id on the RecordActivityTaskStartedRequest to a new UUID. This is useful
436
+ // in case a RecordActivityTaskStarted call succeed but matching doesn't get that response,
437
+ // so matching could retry and history service would return success if the request_id matches.
438
+ // In that case, matching will continue to deliver the task to worker. Without this field, history
439
+ // service would return AlreadyStarted error, and matching would drop the task.
387
440
  string request_id = 3;
388
441
  // Starting at 1, the number of times this task has been attempted
389
442
  int32 attempt = 4;
@@ -495,9 +548,9 @@ message TimerCanceledEventAttributes {
495
548
 
496
549
  message WorkflowExecutionCancelRequestedEventAttributes {
497
550
  // User provided reason for requesting cancellation
498
- // TODO: shall we create a new field with name "reason" and deprecate this one?
499
551
  string cause = 1;
500
- // TODO: Is this the ID of the event in the workflow which initiated this cancel, if there was one?
552
+ // The ID of the `REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED` event in the external
553
+ // workflow history when the cancellation was requested by another workflow.
501
554
  int64 external_initiated_event_id = 2;
502
555
  temporal.api.common.v1.WorkflowExecution external_workflow_execution = 3;
503
556
  // id of the worker or client who requested this cancel
@@ -792,11 +845,16 @@ message WorkflowExecutionOptionsUpdatedEventAttributes {
792
845
  temporal.api.workflow.v1.VersioningOverride versioning_override = 1;
793
846
  // Versioning override removed in this event.
794
847
  bool unset_versioning_override = 2;
795
- // Request ID attachedto the running workflow execution so that subsequent requests with same
848
+ // Request ID attached to the running workflow execution so that subsequent requests with same
796
849
  // request ID will be deduped.
797
850
  string attached_request_id = 3;
798
851
  // Completion callbacks attached to the running workflow execution.
799
852
  repeated temporal.api.common.v1.Callback attached_completion_callbacks = 4;
853
+ // Optional. The identity of the client who initiated the request that created this event.
854
+ string identity = 5;
855
+ // Priority override upserted in this event. Represents the full priority; not just partial fields.
856
+ // Ignored if nil.
857
+ temporal.api.common.v1.Priority priority = 6;
800
858
  }
801
859
 
802
860
  // Not used anywhere. Use case is replaced by WorkflowExecutionOptionsUpdatedEventAttributes
@@ -869,6 +927,26 @@ message WorkflowExecutionUpdateAdmittedEventAttributes {
869
927
  temporal.api.enums.v1.UpdateAdmittedEventOrigin origin = 2;
870
928
  }
871
929
 
930
+ // Attributes for an event marking that a workflow execution was paused.
931
+ message WorkflowExecutionPausedEventAttributes {
932
+ // The identity of the client who paused the workflow execution.
933
+ string identity = 1;
934
+ // The reason for pausing the workflow execution.
935
+ string reason = 2;
936
+ // The request ID of the request that paused the workflow execution.
937
+ string request_id = 3;
938
+ }
939
+
940
+ // Attributes for an event marking that a workflow execution was unpaused.
941
+ message WorkflowExecutionUnpausedEventAttributes {
942
+ // The identity of the client who unpaused the workflow execution.
943
+ string identity = 1;
944
+ // The reason for unpausing the workflow execution.
945
+ string reason = 2;
946
+ // The request ID of the request that unpaused the workflow execution.
947
+ string request_id = 3;
948
+ }
949
+
872
950
  // Event marking that an operation was scheduled by a workflow via the ScheduleNexusOperation command.
873
951
  message NexusOperationScheduledEventAttributes {
874
952
  // Endpoint name, must exist in the endpoint registry.
@@ -901,6 +979,18 @@ message NexusOperationScheduledEventAttributes {
901
979
  // This is stored on the event and used internally by the server in case the endpoint is renamed from the time the
902
980
  // event was originally scheduled.
903
981
  string endpoint_id = 9;
982
+
983
+ // Schedule-to-start timeout for this operation.
984
+ // See ScheduleNexusOperationCommandAttributes.schedule_to_start_timeout for details.
985
+ // (-- api-linter: core::0140::prepositions=disabled
986
+ // aip.dev/not-precedent: "to" is used to indicate interval. --)
987
+ google.protobuf.Duration schedule_to_start_timeout = 10;
988
+
989
+ // Start-to-close timeout for this operation.
990
+ // See ScheduleNexusOperationCommandAttributes.start_to_close_timeout for details.
991
+ // (-- api-linter: core::0140::prepositions=disabled
992
+ // aip.dev/not-precedent: "to" is used to indicate interval. --)
993
+ google.protobuf.Duration start_to_close_timeout = 11;
904
994
  }
905
995
 
906
996
  // Event marking an asynchronous operation was started by the responding Nexus handler.
@@ -1006,9 +1096,11 @@ message HistoryEvent {
1006
1096
  int64 event_id = 1;
1007
1097
  google.protobuf.Timestamp event_time = 2;
1008
1098
  temporal.api.enums.v1.EventType event_type = 3;
1009
- // TODO: What is this? Appears unused by SDKs
1099
+ // Failover version of the event, used by the server for multi-cluster replication and history
1100
+ // versioning. SDKs generally ignore this field.
1010
1101
  int64 version = 4;
1011
- // TODO: What is this? Appears unused by SDKs
1102
+ // Identifier used by the service to order replication and transfer tasks associated with this
1103
+ // event. SDKs generally ignore this field.
1012
1104
  int64 task_id = 5;
1013
1105
  // Set to true when the SDK may ignore the event as it does not impact workflow state or
1014
1106
  // information in any way that the SDK need be concerned with. If an SDK encounters an event
@@ -1085,6 +1177,8 @@ message HistoryEvent {
1085
1177
  WorkflowExecutionOptionsUpdatedEventAttributes workflow_execution_options_updated_event_attributes = 60;
1086
1178
  NexusOperationCancelRequestCompletedEventAttributes nexus_operation_cancel_request_completed_event_attributes = 61;
1087
1179
  NexusOperationCancelRequestFailedEventAttributes nexus_operation_cancel_request_failed_event_attributes = 62;
1180
+ WorkflowExecutionPausedEventAttributes workflow_execution_paused_event_attributes = 63;
1181
+ WorkflowExecutionUnpausedEventAttributes workflow_execution_unpaused_event_attributes = 64;
1088
1182
  }
1089
1183
  }
1090
1184
 
@@ -38,6 +38,27 @@ message NamespaceInfo {
38
38
  bool worker_heartbeats = 4;
39
39
  // True if the namespace supports reported problems search attribute
40
40
  bool reported_problems_search_attribute = 5;
41
+ // True if the namespace supports pausing workflows
42
+ bool workflow_pause = 6;
43
+ // True if the namespace supports standalone activities
44
+ bool standalone_activities = 7;
45
+ // True if the namespace supports server-side completion of outstanding worker polls on shutdown.
46
+ // When enabled, the server will complete polls for workers that send WorkerInstanceKey in their
47
+ // poll requests and call ShutdownWorker with the same WorkerInstanceKey. The poll will return
48
+ // an empty response. When this flag is true, workers should allow polls to return gracefully
49
+ // rather than terminating any open polls on shutdown.
50
+ bool worker_poll_complete_on_shutdown = 8;
51
+ }
52
+
53
+ // Namespace configured limits
54
+ Limits limits = 8;
55
+ message Limits {
56
+ // Maximum size in bytes for payload fields in workflow history events
57
+ // (e.g., workflow/activity inputs and results, failure details, signal payloads).
58
+ // When exceeded, the server will reject the operation with an error.
59
+ int64 blob_size_limit_error = 1;
60
+ // Maximum total memo size in bytes per workflow execution.
61
+ int64 memo_size_limit_error = 2;
41
62
  }
42
63
 
43
64
  // Whether scheduled workflows are supported on this namespace. This is only needed
@@ -12,14 +12,17 @@ option csharp_namespace = "Temporalio.Api.Nexus.V1";
12
12
  import "google/protobuf/timestamp.proto";
13
13
  import "temporal/api/common/v1/message.proto";
14
14
  import "temporal/api/enums/v1/nexus.proto";
15
+ import "temporal/api/failure/v1/message.proto";
15
16
 
16
17
  // A general purpose failure message.
17
18
  // See: https://github.com/nexus-rpc/api/blob/main/SPEC.md#failure
18
19
  message Failure {
19
20
  string message = 1;
21
+ string stack_trace = 4;
20
22
  map<string, string> metadata = 2;
21
23
  // UTF-8 encoded JSON serializable details.
22
24
  bytes details = 3;
25
+ Failure cause = 5;
23
26
  }
24
27
 
25
28
  message HandlerError {
@@ -77,6 +80,12 @@ message CancelOperationRequest {
77
80
 
78
81
  // A Nexus request.
79
82
  message Request {
83
+ message Capabilities {
84
+ // If set, handlers may use temporal.api.failure.v1.Failure instances to return failures to the server.
85
+ // This also allows handler and operation errors to have their own messages and stack traces.
86
+ bool temporal_failure_responses = 1;
87
+ }
88
+
80
89
  // Headers extracted from the original request in the Temporal frontend.
81
90
  // When using Nexus over HTTP, this includes the request's HTTP headers ignoring multiple values.
82
91
  map<string, string> header = 1;
@@ -86,10 +95,16 @@ message Request {
86
95
  // aip.dev/not-precedent: Not following linter rules. --)
87
96
  google.protobuf.Timestamp scheduled_time = 2;
88
97
 
98
+ Capabilities capabilities = 100;
99
+
89
100
  oneof variant {
90
101
  StartOperationRequest start_operation = 3;
91
102
  CancelOperationRequest cancel_operation = 4;
92
103
  }
104
+
105
+ // The endpoint this request was addressed to before forwarding to the worker.
106
+ // Supported from server version 1.30.0.
107
+ string endpoint = 10;
93
108
  }
94
109
 
95
110
  // Response variant for StartOperationRequest.
@@ -113,7 +128,11 @@ message StartOperationResponse {
113
128
  Sync sync_success = 1;
114
129
  Async async_success = 2;
115
130
  // The operation completed unsuccessfully (failed or canceled).
116
- UnsuccessfulOperationError operation_error = 3;
131
+ // Deprecated. Use the failure variant instead.
132
+ UnsuccessfulOperationError operation_error = 3 [deprecated = true];
133
+ // The operation completed unsuccessfully (failed or canceled).
134
+ // Failure object must contain an ApplicationFailureInfo or CanceledFailureInfo object.
135
+ temporal.api.failure.v1.Failure failure = 4;
117
136
  }
118
137
  }
119
138
 
@@ -68,6 +68,8 @@ message AddOrUpdateRemoteClusterRequest {
68
68
  // Frontend HTTP Address is a cross cluster accessible address for HTTP traffic. This field is optional. If not provided
69
69
  // on update, the existing HTTP address will be removed.
70
70
  string frontend_http_address = 3;
71
+ // Controls whether replication streams are active.
72
+ bool enable_replication = 4;
71
73
  }
72
74
 
73
75
  message AddOrUpdateRemoteClusterResponse {
@@ -107,6 +109,8 @@ message ClusterMetadata {
107
109
  int32 history_shard_count = 5;
108
110
  // A flag to indicate if a connection is active.
109
111
  bool is_connection_enabled = 6;
112
+ // A flag to indicate if replication is enabled.
113
+ bool is_replication_enabled = 8;
110
114
  }
111
115
 
112
116
  message GetNexusEndpointRequest {
@@ -81,8 +81,8 @@ message Range {
81
81
  // corresponding fields of the timestamp, except for year: if year is missing,
82
82
  // that means all years match. For all fields besides year, at least one Range
83
83
  // must be present to match anything.
84
- // TODO: add relative-to-end-of-month
85
- // TODO: add nth day-of-week in month
84
+ // Relative expressions such as "last day of the month" or "third Monday" are not currently
85
+ // representable; callers must enumerate the concrete days they require.
86
86
  message StructuredCalendarSpec {
87
87
  // Match seconds (0-59)
88
88
  repeated Range second = 1;
@@ -343,4 +343,6 @@ message TaskQueueConfig {
343
343
  RateLimitConfig queue_rate_limit = 1;
344
344
  // If set, each individual fairness key will be limited to this rate, scaled by the weight of the fairness key.
345
345
  RateLimitConfig fairness_keys_rate_limit_default = 2;
346
+ // If set, overrides the fairness weights for the corresponding fairness keys.
347
+ map<string, float> fairness_weight_overrides = 3;
346
348
  }
@@ -54,15 +54,12 @@ message WorkerHostInfo {
54
54
  // Worker host identifier.
55
55
  string host_name = 1;
56
56
 
57
-
58
- // Worker process identifier. This id should be unique for all _processes_
59
- // running workers in the namespace, and should be shared by all workers
60
- // in the same process.
57
+ // Worker grouping identifier. A key to group workers that share the same client+namespace+process.
61
58
  // This will be used to build the worker command nexus task queue name:
62
- // "temporal-sys/worker-commands/{process_key}"
63
- string process_key = 5;
59
+ // "temporal-sys/worker-commands/{worker_grouping_key}"
60
+ string worker_grouping_key = 5;
64
61
 
65
- // Worker process identifier. Unlike process_key, this id only needs to be unique
62
+ // Worker process identifier. This id only needs to be unique
66
63
  // within one host (so using e.g. a unix pid would be appropriate).
67
64
  string process_id = 2;
68
65
 
@@ -98,6 +98,12 @@ message WorkflowExecutionInfo {
98
98
 
99
99
  // Priority metadata
100
100
  temporal.api.common.v1.Priority priority = 24;
101
+
102
+ // Total size in bytes of all external payloads referenced in workflow history.
103
+ int64 external_payload_size_bytes = 25;
104
+
105
+ // Count of external payloads referenced in workflow history.
106
+ int64 external_payload_count = 26;
101
107
  }
102
108
 
103
109
  // Holds all the extra information about workflow execution that is not part of Visibility.
@@ -126,6 +132,9 @@ message WorkflowExecutionExtendedInfo {
126
132
  // calls (eg: if SignalWithStartWorkflowExecution starts a new workflow, then the request ID is
127
133
  // used in the StartWorkflowExecution request).
128
134
  map<string, RequestIdInfo> request_id_infos = 7;
135
+
136
+ // Information about the workflow execution pause operation.
137
+ WorkflowExecutionPauseInfo pause_info = 8;
129
138
  }
130
139
 
131
140
  // Holds all the information about worker versioning for a particular workflow execution.
@@ -135,12 +144,14 @@ message WorkflowExecutionVersioningInfo {
135
144
  // upgraded. When present it means this workflow execution is versioned; UNSPECIFIED means
136
145
  // unversioned. See the comments in `VersioningBehavior` enum for more info about different
137
146
  // behaviors.
138
- // This field is first set after an execution completes its first workflow task on a versioned
139
- // worker, and set again on completion of every subsequent workflow task.
140
- // For child workflows of Pinned parents, this will be set to Pinned (along with `deployment_version`) when
141
- // the the child starts so that child's first workflow task goes to the same Version as the
142
- // parent. After the first workflow task, it depends on the child workflow itself if it wants
143
- // to stay pinned or become unpinned (according to Versioning Behavior set in the worker).
147
+ //
148
+ // Child workflows or CaN executions **inherit** their parent/previous run's effective Versioning
149
+ // Behavior and Version (except when the new execution runs on a task queue not belonging to the
150
+ // same deployment version as the parent/previous run's task queue). The first workflow task will
151
+ // be dispatched according to the inherited behavior (or to the current version of the task-queue's
152
+ // deployment in the case of AutoUpgrade.) After completion of their first workflow task the
153
+ // Deployment Version and Behavior of the execution will update according to configuration on the worker.
154
+ //
144
155
  // Note that `behavior` is overridden by `versioning_override` if the latter is present.
145
156
  temporal.api.enums.v1.VersioningBehavior behavior = 1;
146
157
  // The worker deployment that completed the last workflow task of this workflow execution. Must
@@ -158,10 +169,15 @@ message WorkflowExecutionVersioningInfo {
158
169
  // If present, and `behavior` is UNSPECIFIED, the last task of this workflow execution was completed
159
170
  // by a worker that is not using versioning but _is_ passing Deployment Name and Build ID.
160
171
  //
161
- // For child workflows of Pinned parents, this will be set to the parent's Pinned Version when
162
- // the child starts, so that the child's first workflow task goes to the same Version as the parent.
172
+ // Child workflows or CaN executions **inherit** their parent/previous run's effective Versioning
173
+ // Behavior and Version (except when the new execution runs on a task queue not belonging to the
174
+ // same deployment version as the parent/previous run's task queue). The first workflow task will
175
+ // be dispatched according to the inherited behavior (or to the current version of the task-queue's
176
+ // deployment in the case of AutoUpgrade.) After completion of their first workflow task the
177
+ // Deployment Version and Behavior of the execution will update according to configuration on the worker.
178
+ //
163
179
  // Note that if `versioning_override.behavior` is PINNED then `versioning_override.pinned_version`
164
- // will override this value.
180
+ // will override this value.
165
181
  temporal.api.deployment.v1.WorkerDeploymentVersion deployment_version = 7;
166
182
  // Present if user has set an execution-specific versioning override. This override takes
167
183
  // precedence over SDK-sent `behavior` (and `version` when override is PINNED). An
@@ -208,6 +224,14 @@ message WorkflowExecutionVersioningInfo {
208
224
  // Pending activities will not start new attempts during a transition. Once the transition is
209
225
  // completed, pending activities will start their next attempt on the new version.
210
226
  DeploymentVersionTransition version_transition = 6;
227
+ // Monotonic counter reflecting the latest routing decision for this workflow execution.
228
+ // Used for staleness detection between history and matching when dispatching tasks to workers.
229
+ // Incremented when a workflow execution routes to a new deployment version, which happens
230
+ // when a worker of the new deployment version completes a workflow task.
231
+ // Note: Pinned tasks and sticky tasks send a value of 0 for this field since these tasks do not
232
+ // face the problem of inconsistent dispatching that arises from eventual consistency between
233
+ // task queues and their partitions.
234
+ int64 revision_number = 8;
211
235
  }
212
236
 
213
237
  // Holds information about ongoing transition of a workflow execution from one deployment to another.
@@ -300,8 +324,8 @@ message PendingActivityInfo {
300
324
  // If nil, the activity has not yet been dispatched or was last dispatched to an unversioned worker.
301
325
  temporal.api.deployment.v1.WorkerDeploymentVersion last_deployment_version = 25;
302
326
 
303
-
304
- // Priority metadata
327
+ // Priority metadata. If this message is not present, or any fields are not
328
+ // present, they inherit the values from the workflow.
305
329
  temporal.api.common.v1.Priority priority = 22;
306
330
 
307
331
  message PauseInfo {
@@ -502,6 +526,16 @@ message PendingNexusOperationInfo {
502
526
 
503
527
  // Operation token. Only set for asynchronous operations after a successful StartOperation call.
504
528
  string operation_token = 15;
529
+
530
+ // Schedule-to-start timeout for this operation.
531
+ // (-- api-linter: core::0140::prepositions=disabled
532
+ // aip.dev/not-precedent: "to" is used to indicate interval. --)
533
+ google.protobuf.Duration schedule_to_start_timeout = 16;
534
+
535
+ // Start-to-close timeout for this operation.
536
+ // (-- api-linter: core::0140::prepositions=disabled
537
+ // aip.dev/not-precedent: "to" is used to indicate interval. --)
538
+ google.protobuf.Duration start_to_close_timeout = 17;
505
539
  }
506
540
 
507
541
  // NexusOperationCancellationInfo contains the state of a nexus operation cancellation.
@@ -529,24 +563,30 @@ message NexusOperationCancellationInfo {
529
563
  message WorkflowExecutionOptions {
530
564
  // If set, takes precedence over the Versioning Behavior sent by the SDK on Workflow Task completion.
531
565
  VersioningOverride versioning_override = 1;
566
+
567
+ // If set, overrides the workflow's priority sent by the SDK.
568
+ temporal.api.common.v1.Priority priority = 2;
532
569
  }
533
570
 
534
571
  // Used to override the versioning behavior (and pinned deployment version, if applicable) of a
535
- // specific workflow execution. If set, takes precedence over the worker-sent values. See
536
- // `WorkflowExecutionInfo.VersioningInfo` for more information. To remove the override, call
537
- // `UpdateWorkflowExecutionOptions` with a null `VersioningOverride`, and use the `update_mask`
538
- // to indicate that it should be mutated.
539
- // Pinned overrides are automatically inherited by child workflows, continue-as-new workflows,
540
- // workflow retries, and cron workflows.
572
+ // specific workflow execution. If set, this override takes precedence over worker-sent values.
573
+ // See `WorkflowExecutionInfo.VersioningInfo` for more information.
574
+ //
575
+ // To remove the override, call `UpdateWorkflowExecutionOptions` with a null
576
+ // `VersioningOverride`, and use the `update_mask` to indicate that it should be mutated.
577
+ //
578
+ // Pinned behavior overrides are automatically inherited by child workflows, workflow retries, continue-as-new
579
+ // workflows, and cron workflows.
541
580
  message VersioningOverride {
542
581
  // Indicates whether to override the workflow to be AutoUpgrade or Pinned.
543
582
  oneof override {
544
- // Send the next workflow task to the Version specified in the override.
583
+ // Override the workflow to have Pinned behavior.
545
584
  PinnedOverride pinned = 3;
546
- // Send the next workflow task to the Current Deployment Version
547
- // of its Task Queue when the next workflow task is dispatched.
585
+
586
+ // Override the workflow to have AutoUpgrade behavior.
548
587
  bool auto_upgrade = 4;
549
588
  }
589
+
550
590
  // Required.
551
591
  // Deprecated. Use `override`.
552
592
  temporal.api.enums.v1.VersioningBehavior behavior = 1 [deprecated = true];
@@ -566,14 +606,22 @@ message VersioningOverride {
566
606
  // Defaults to PINNED_OVERRIDE_BEHAVIOR_UNSPECIFIED.
567
607
  // See `PinnedOverrideBehavior` for details.
568
608
  PinnedOverrideBehavior behavior = 1;
569
- // Required.
609
+
610
+ // Specifies the Worker Deployment Version to pin this workflow to.
611
+ // Required if the target workflow is not already pinned to a version.
612
+ //
613
+ // If omitted and the target workflow is already pinned, the effective
614
+ // pinned version will be the existing pinned version.
615
+ //
616
+ // If omitted and the target workflow is not pinned, the override request
617
+ // will be rejected with a PreconditionFailed error.
570
618
  temporal.api.deployment.v1.WorkerDeploymentVersion version = 2;
571
619
  }
572
620
 
573
- // Used to specify different sub-types of Pinned override that we plan to add in the future.
574
621
  enum PinnedOverrideBehavior {
575
622
  // Unspecified.
576
623
  PINNED_OVERRIDE_BEHAVIOR_UNSPECIFIED = 0;
624
+
577
625
  // Override workflow behavior to be Pinned.
578
626
  PINNED_OVERRIDE_BEHAVIOR_PINNED = 1;
579
627
  }
@@ -636,3 +684,13 @@ message PostResetOperation {
636
684
  }
637
685
  }
638
686
 
687
+ // WorkflowExecutionPauseInfo contains the information about a workflow execution pause.
688
+ message WorkflowExecutionPauseInfo {
689
+ // The identity of the client who paused the workflow execution.
690
+ string identity = 1;
691
+ // The time when the workflow execution was paused.
692
+ google.protobuf.Timestamp paused_time = 2;
693
+ // The reason for pausing the workflow execution.
694
+ string reason = 3;
695
+ }
696
+