@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
@@ -19,6 +19,7 @@ import "temporal/api/enums/v1/reset.proto";
19
19
  import "temporal/api/enums/v1/task_queue.proto";
20
20
  import "temporal/api/enums/v1/deployment.proto";
21
21
  import "temporal/api/enums/v1/update.proto";
22
+ import "temporal/api/enums/v1/activity.proto";
22
23
  import "temporal/api/activity/v1/message.proto";
23
24
  import "temporal/api/common/v1/message.proto";
24
25
  import "temporal/api/history/v1/message.proto";
@@ -258,6 +259,9 @@ message PollWorkflowTaskQueueRequest {
258
259
  temporal.api.taskqueue.v1.TaskQueue task_queue = 2;
259
260
  // The identity of the worker/client who is polling this task queue
260
261
  string identity = 3;
262
+ // A unique key for this worker instance, used for tracking worker lifecycle.
263
+ // This is guaranteed to be unique, whereas identity is not guaranteed to be unique.
264
+ string worker_instance_key = 8;
261
265
  // Deprecated. Use deployment_options instead.
262
266
  // Each worker process should provide an ID unique to the specific set of code it is running
263
267
  // "checksum" in this field name isn't very accurate, it should be though of as an id.
@@ -270,8 +274,9 @@ message PollWorkflowTaskQueueRequest {
270
274
  // Experimental. Worker Deployments are experimental and might significantly change in the future.
271
275
  temporal.api.deployment.v1.WorkerDeploymentOptions deployment_options = 6;
272
276
 
273
- // Worker info to be sent to the server.
274
- temporal.api.worker.v1.WorkerHeartbeat worker_heartbeat = 7;
277
+ // Removed in 1.55.0; was temporal.api.worker.v1.WorkerHeartbeat worker_heartbeat
278
+ reserved 7;
279
+ reserved "worker_heartbeat";
275
280
  }
276
281
 
277
282
  message PollWorkflowTaskQueueResponse {
@@ -436,6 +441,9 @@ message PollActivityTaskQueueRequest {
436
441
  temporal.api.taskqueue.v1.TaskQueue task_queue = 2;
437
442
  // The identity of the worker/client
438
443
  string identity = 3;
444
+ // A unique key for this worker instance, used for tracking worker lifecycle.
445
+ // This is guaranteed to be unique, whereas identity is not guaranteed to be unique.
446
+ string worker_instance_key = 8;
439
447
  temporal.api.taskqueue.v1.TaskQueueMetadata task_queue_metadata = 4;
440
448
  // Information about this worker's build identifier and if it is choosing to use the versioning
441
449
  // feature. See the `WorkerVersionCapabilities` docstring for more.
@@ -444,24 +452,27 @@ message PollActivityTaskQueueRequest {
444
452
  // Worker deployment options that user has set in the worker.
445
453
  temporal.api.deployment.v1.WorkerDeploymentOptions deployment_options = 6;
446
454
 
447
- // Worker info to be sent to the server.
448
- temporal.api.worker.v1.WorkerHeartbeat worker_heartbeat = 7;
449
-
455
+ // Removed in 1.55.0; was temporal.api.worker.v1.WorkerHeartbeat worker_heartbeat
456
+ reserved 7;
457
+ reserved "worker_heartbeat";
450
458
  }
451
459
 
452
460
  message PollActivityTaskQueueResponse {
453
461
  // A unique identifier for this task
454
462
  bytes task_token = 1;
455
- // The namespace the workflow which requested this activity lives in
463
+ // The namespace of the activity. If this is a workflow activity then this is the namespace of
464
+ // the workflow also. If this is a standalone activity then the name of this field is
465
+ // misleading, but retained for compatibility with workflow activities.
456
466
  string workflow_namespace = 2;
457
- // Type of the requesting workflow
467
+ // Type of the requesting workflow (if this is a workflow activity).
458
468
  temporal.api.common.v1.WorkflowType workflow_type = 3;
459
- // Execution info of the requesting workflow
469
+ // Execution info of the requesting workflow (if this is a workflow activity)
460
470
  temporal.api.common.v1.WorkflowExecution workflow_execution = 4;
461
471
  temporal.api.common.v1.ActivityType activity_type = 5;
462
472
  // The autogenerated or user specified identifier of this activity. Can be used to complete the
463
473
  // activity via `RespondActivityTaskCompletedById`. May be re-used as long as the last usage
464
474
  // has resolved, but unique IDs for every activity invocation is a good idea.
475
+ // Note that only a workflow activity ID may be autogenerated.
465
476
  string activity_id = 6;
466
477
  // Headers specified by the scheduling workflow. Commonly used to propagate contextual info
467
478
  // from the workflow to its activities. For example, tracing contexts.
@@ -499,6 +510,8 @@ message PollActivityTaskQueueResponse {
499
510
  temporal.api.taskqueue.v1.PollerScalingDecision poller_scaling_decision = 18;
500
511
  // Priority metadata
501
512
  temporal.api.common.v1.Priority priority = 19;
513
+ // The run ID of the activity execution, only set for standalone activities.
514
+ string activity_run_id = 20;
502
515
  }
503
516
 
504
517
  message RecordActivityTaskHeartbeatRequest {
@@ -527,9 +540,10 @@ message RecordActivityTaskHeartbeatResponse {
527
540
  message RecordActivityTaskHeartbeatByIdRequest {
528
541
  // Namespace of the workflow which scheduled this activity
529
542
  string namespace = 1;
530
- // Id of the workflow which scheduled this activity
543
+ // Id of the workflow which scheduled this activity, leave empty to target a standalone activity
531
544
  string workflow_id = 2;
532
- // Run Id of the workflow which scheduled this activity
545
+ // For a workflow activity - the run ID of the workflow which scheduled this activity.
546
+ // For a standalone activity - the run ID of the activity.
533
547
  string run_id = 3;
534
548
  // Id of the activity we're heartbeating
535
549
  string activity_id = 4;
@@ -579,9 +593,10 @@ message RespondActivityTaskCompletedResponse {
579
593
  message RespondActivityTaskCompletedByIdRequest {
580
594
  // Namespace of the workflow which scheduled this activity
581
595
  string namespace = 1;
582
- // Id of the workflow which scheduled this activity
596
+ // Id of the workflow which scheduled this activity, leave empty to target a standalone activity
583
597
  string workflow_id = 2;
584
- // Run Id of the workflow which scheduled this activity
598
+ // For a workflow activity - the run ID of the workflow which scheduled this activity.
599
+ // For a standalone activity - the run ID of the activity.
585
600
  string run_id = 3;
586
601
  // Id of the activity to complete
587
602
  string activity_id = 4;
@@ -626,9 +641,10 @@ message RespondActivityTaskFailedResponse {
626
641
  message RespondActivityTaskFailedByIdRequest {
627
642
  // Namespace of the workflow which scheduled this activity
628
643
  string namespace = 1;
629
- // Id of the workflow which scheduled this activity
644
+ // Id of the workflow which scheduled this activity, leave empty to target a standalone activity
630
645
  string workflow_id = 2;
631
- // Run Id of the workflow which scheduled this activity
646
+ // For a workflow activity - the run ID of the workflow which scheduled this activity.
647
+ // For a standalone activity - the run ID of the activity.
632
648
  string run_id = 3;
633
649
  // Id of the activity to fail
634
650
  string activity_id = 4;
@@ -673,9 +689,10 @@ message RespondActivityTaskCanceledResponse {
673
689
  message RespondActivityTaskCanceledByIdRequest {
674
690
  // Namespace of the workflow which scheduled this activity
675
691
  string namespace = 1;
676
- // Id of the workflow which scheduled this activity
692
+ // Id of the workflow which scheduled this activity, leave empty to target a standalone activity
677
693
  string workflow_id = 2;
678
- // Run Id of the workflow which scheduled this activity
694
+ // For a workflow activity - the run ID of the workflow which scheduled this activity.
695
+ // For a standalone activity - the run ID of the activity.
679
696
  string run_id = 3;
680
697
  // Id of the activity to confirm is cancelled
681
698
  string activity_id = 4;
@@ -1006,11 +1023,24 @@ message ResetStickyTaskQueueResponse {
1006
1023
 
1007
1024
  message ShutdownWorkerRequest {
1008
1025
  string namespace = 1;
1026
+ // sticky_task_queue may not always be populated. We want to ensure all workers
1027
+ // send a shutdown request to update worker state for heartbeating, as well
1028
+ // as cancel pending poll calls early, instead of waiting for timeouts.
1009
1029
  string sticky_task_queue = 2;
1010
1030
  string identity = 3;
1011
1031
  string reason = 4;
1012
-
1013
1032
  temporal.api.worker.v1.WorkerHeartbeat worker_heartbeat = 5;
1033
+ // Technically this is also sent in the WorkerHeartbeat, but
1034
+ // since worker heartbeating can be turned off, this needs
1035
+ // to be a separate, top-level field.
1036
+ string worker_instance_key = 6;
1037
+ // Task queue name the worker is polling on. This allows server to cancel
1038
+ // all outstanding poll RPC calls from SDK. This avoids a race condition that
1039
+ // can lead to tasks being lost.
1040
+ string task_queue = 7;
1041
+ // Task queue types that help server cancel outstanding poll RPC
1042
+ // calls from SDK. This avoids a race condition that can lead to tasks being lost.
1043
+ repeated temporal.api.enums.v1.TaskQueueType task_queue_types = 8;
1014
1044
  }
1015
1045
 
1016
1046
  message ShutdownWorkerResponse {
@@ -1367,6 +1397,30 @@ message ListSchedulesResponse {
1367
1397
  bytes next_page_token = 2;
1368
1398
  }
1369
1399
 
1400
+ message CountSchedulesRequest {
1401
+ string namespace = 1;
1402
+ // Visibility query, see https://docs.temporal.io/list-filter for the syntax.
1403
+ string query = 2;
1404
+ }
1405
+
1406
+ message CountSchedulesResponse {
1407
+ // If `query` is not grouping by any field, the count is an approximate number
1408
+ // of schedules that match the query.
1409
+ // If `query` is grouping by a field, the count is simply the sum of the counts
1410
+ // of the groups returned in the response. This number can be smaller than the
1411
+ // total number of schedules matching the query.
1412
+ int64 count = 1;
1413
+
1414
+ // Contains the groups if the request is grouping by a field.
1415
+ // The list might not be complete, and the counts of each group is approximate.
1416
+ repeated AggregationGroup groups = 2;
1417
+
1418
+ message AggregationGroup {
1419
+ repeated temporal.api.common.v1.Payload group_values = 1;
1420
+ int64 count = 2;
1421
+ }
1422
+ }
1423
+
1370
1424
  // [cleanup-wv-pre-release]
1371
1425
  message UpdateWorkerBuildIdCompatibilityRequest {
1372
1426
  message AddNewCompatibleVersion {
@@ -1796,6 +1850,9 @@ message PollNexusTaskQueueRequest {
1796
1850
  string namespace = 1;
1797
1851
  // The identity of the client who initiated this request.
1798
1852
  string identity = 2;
1853
+ // A unique key for this worker instance, used for tracking worker lifecycle.
1854
+ // This is guaranteed to be unique, whereas identity is not guaranteed to be unique.
1855
+ string worker_instance_key = 8;
1799
1856
  temporal.api.taskqueue.v1.TaskQueue task_queue = 3;
1800
1857
  // Information about this worker's build identifier and if it is choosing to use the versioning
1801
1858
  // feature. See the `WorkerVersionCapabilities` docstring for more.
@@ -1836,8 +1893,10 @@ message RespondNexusTaskFailedRequest {
1836
1893
  string identity = 2;
1837
1894
  // A unique identifier for this task.
1838
1895
  bytes task_token = 3;
1839
- // The error the handler failed with.
1840
- temporal.api.nexus.v1.HandlerError error = 4;
1896
+ // Deprecated. Use the failure field instead.
1897
+ temporal.api.nexus.v1.HandlerError error = 4 [deprecated = true];
1898
+ // The error the handler failed with. Must contain a NexusHandlerFailureInfo object.
1899
+ temporal.api.failure.v1.Failure failure = 5;
1841
1900
  }
1842
1901
 
1843
1902
  message RespondNexusTaskFailedResponse {
@@ -2043,6 +2102,9 @@ message UpdateWorkflowExecutionOptionsRequest {
2043
2102
  // Controls which fields from `workflow_execution_options` will be applied.
2044
2103
  // To unset a field, set it to null and use the update mask to indicate that it should be mutated.
2045
2104
  google.protobuf.FieldMask update_mask = 4;
2105
+
2106
+ // Optional. The identity of the client who initiated this request.
2107
+ string identity = 5;
2046
2108
  }
2047
2109
 
2048
2110
  message UpdateWorkflowExecutionOptionsResponse {
@@ -2182,7 +2244,11 @@ message SetWorkerDeploymentCurrentVersionResponse {
2182
2244
  // Deprecated. Use `previous_deployment_version`.
2183
2245
  string previous_version = 2 [deprecated = true];
2184
2246
  // The version that was current before executing this operation.
2185
- temporal.api.deployment.v1.WorkerDeploymentVersion previous_deployment_version = 3;
2247
+ // Deprecated in favor of idempotency of the API. Use `DescribeWorkerDeployment` to get the
2248
+ // Current version info before calling this API. By passing the `conflict_token` got from the
2249
+ // `DescribeWorkerDeployment` call to this API you can ensure there is no interfering changes
2250
+ // between the two calls.
2251
+ temporal.api.deployment.v1.WorkerDeploymentVersion previous_deployment_version = 3 [deprecated = true];
2186
2252
  }
2187
2253
 
2188
2254
  // Set/unset the Ramping Version of a Worker Deployment and its ramp percentage.
@@ -2238,9 +2304,17 @@ message SetWorkerDeploymentRampingVersionResponse {
2238
2304
  // Deprecated. Use `previous_deployment_version`.
2239
2305
  string previous_version = 2 [deprecated = true];
2240
2306
  // The version that was ramping before executing this operation.
2241
- temporal.api.deployment.v1.WorkerDeploymentVersion previous_deployment_version = 4;
2307
+ // Deprecated in favor of idempotency of the API. Use `DescribeWorkerDeployment` to get the
2308
+ // Ramping version info before calling this API. By passing the `conflict_token` got from the
2309
+ // `DescribeWorkerDeployment` call to this API you can ensure there is no interfering changes
2310
+ // between the two calls.
2311
+ temporal.api.deployment.v1.WorkerDeploymentVersion previous_deployment_version = 4 [deprecated = true];
2242
2312
  // The ramping version percentage before executing this operation.
2243
- float previous_percentage = 3;
2313
+ // Deprecated in favor of idempotency of the API. Use `DescribeWorkerDeployment` to get the
2314
+ // Ramping version info before calling this API. By passing the `conflict_token` got from the
2315
+ // `DescribeWorkerDeployment` call to this API you can ensure there is no interfering changes
2316
+ // between the two calls.
2317
+ float previous_percentage = 3 [deprecated = true];
2244
2318
  }
2245
2319
 
2246
2320
  message ListWorkerDeploymentsRequest {
@@ -2353,7 +2427,11 @@ message SetWorkerDeploymentManagerResponse {
2353
2427
  bytes conflict_token = 1;
2354
2428
 
2355
2429
  // What the `manager_identity` field was before this change.
2356
- string previous_manager_identity = 2;
2430
+ // Deprecated in favor of idempotency of the API. Use `DescribeWorkerDeployment` to get the
2431
+ // manager identity before calling this API. By passing the `conflict_token` got from the
2432
+ // `DescribeWorkerDeployment` call to this API you can ensure there is no interfering changes
2433
+ // between the two calls.
2434
+ string previous_manager_identity = 2 [deprecated = true];
2357
2435
  }
2358
2436
 
2359
2437
  // Returns the Current Deployment of a deployment series.
@@ -2528,6 +2606,13 @@ message UpdateTaskQueueConfigRequest {
2528
2606
  // If not set, this configuration is unchanged.
2529
2607
  // If the `rate_limit` field in the `RateLimitUpdate` is missing, remove the existing rate limit.
2530
2608
  RateLimitUpdate update_fairness_key_rate_limit_default = 6;
2609
+ // If set, overrides the fairness weight for each specified fairness key.
2610
+ // Fairness keys not listed in this map will keep their existing overrides (if any).
2611
+ map<string, float> set_fairness_weight_overrides = 7;
2612
+ // If set, removes any existing fairness weight overrides for each specified fairness key.
2613
+ // Fairness weights for corresponding keys fall back to the values set during task creation (if any),
2614
+ // or to the default weight of 1.0.
2615
+ repeated string unset_fairness_weight_overrides = 8;
2531
2616
  }
2532
2617
 
2533
2618
  message UpdateTaskQueueConfigResponse {
@@ -2595,3 +2680,242 @@ message DescribeWorkerRequest {
2595
2680
  message DescribeWorkerResponse {
2596
2681
  temporal.api.worker.v1.WorkerInfo worker_info = 1;
2597
2682
  }
2683
+
2684
+ // Request to pause a workflow execution.
2685
+ message PauseWorkflowExecutionRequest {
2686
+ // Namespace of the workflow to pause.
2687
+ string namespace = 1;
2688
+ // ID of the workflow execution to be paused. Required.
2689
+ string workflow_id = 2;
2690
+ // Run ID of the workflow execution to be paused. Optional. If not provided, the current run of the workflow will be paused.
2691
+ string run_id = 3;
2692
+ // The identity of the client who initiated this request.
2693
+ string identity = 4;
2694
+ // Reason to pause the workflow execution.
2695
+ string reason = 5;
2696
+ // A unique identifier for this pause request for idempotence. Typically UUIDv4.
2697
+ string request_id = 6;
2698
+ }
2699
+
2700
+ // Response to a successful PauseWorkflowExecution request.
2701
+ message PauseWorkflowExecutionResponse { }
2702
+
2703
+ message UnpauseWorkflowExecutionRequest {
2704
+ // Namespace of the workflow to unpause.
2705
+ string namespace = 1;
2706
+ // ID of the workflow execution to be paused. Required.
2707
+ string workflow_id = 2;
2708
+ // Run ID of the workflow execution to be paused. Optional. If not provided, the current run of the workflow will be paused.
2709
+ string run_id = 3;
2710
+ // The identity of the client who initiated this request.
2711
+ string identity = 4;
2712
+ // Reason to unpause the workflow execution.
2713
+ string reason = 5;
2714
+ // A unique identifier for this unpause request for idempotence. Typically UUIDv4.
2715
+ string request_id = 6;
2716
+ }
2717
+
2718
+ // Response to a successful UnpauseWorkflowExecution request.
2719
+ message UnpauseWorkflowExecutionResponse { }
2720
+
2721
+ message StartActivityExecutionRequest {
2722
+ string namespace = 1;
2723
+ // The identity of the client who initiated this request
2724
+ string identity = 2;
2725
+ // A unique identifier for this start request. Typically UUIDv4.
2726
+ string request_id = 3;
2727
+
2728
+ // Identifier for this activity. Required. This identifier should be meaningful in the user's
2729
+ // own system. It must be unique among activities in the same namespace, subject to the rules
2730
+ // imposed by id_reuse_policy and id_conflict_policy.
2731
+ string activity_id = 4;
2732
+
2733
+ // The type of the activity, a string that corresponds to a registered activity on a worker.
2734
+ temporal.api.common.v1.ActivityType activity_type = 5;
2735
+
2736
+ // Task queue to schedule this activity on.
2737
+ temporal.api.taskqueue.v1.TaskQueue task_queue = 6;
2738
+ // Indicates how long the caller is willing to wait for an activity completion. Limits how long
2739
+ // retries will be attempted. Either this or `start_to_close_timeout` must be specified.
2740
+ //
2741
+ // (-- api-linter: core::0140::prepositions=disabled
2742
+ // aip.dev/not-precedent: "to" is used to indicate interval. --)
2743
+ google.protobuf.Duration schedule_to_close_timeout = 7;
2744
+ // Limits time an activity task can stay in a task queue before a worker picks it up. This
2745
+ // timeout is always non retryable, as all a retry would achieve is to put it back into the same
2746
+ // queue. Defaults to `schedule_to_close_timeout` if not specified.
2747
+ //
2748
+ // (-- api-linter: core::0140::prepositions=disabled
2749
+ // aip.dev/not-precedent: "to" is used to indicate interval. --)
2750
+ google.protobuf.Duration schedule_to_start_timeout = 8;
2751
+ // Maximum time an activity is allowed to execute after being picked up by a worker. This
2752
+ // timeout is always retryable. Either this or `schedule_to_close_timeout` must be
2753
+ // specified.
2754
+ //
2755
+ // (-- api-linter: core::0140::prepositions=disabled
2756
+ // aip.dev/not-precedent: "to" is used to indicate interval. --)
2757
+ google.protobuf.Duration start_to_close_timeout = 9;
2758
+ // Maximum permitted time between successful worker heartbeats.
2759
+ google.protobuf.Duration heartbeat_timeout = 10;
2760
+ // The retry policy for the activity. Will never exceed `schedule_to_close_timeout`.
2761
+ temporal.api.common.v1.RetryPolicy retry_policy = 11;
2762
+
2763
+ // Serialized arguments to the activity. These are passed as arguments to the activity function.
2764
+ temporal.api.common.v1.Payloads input = 12;
2765
+
2766
+ // Defines whether to allow re-using the activity id from a previously *closed* activity.
2767
+ // The default policy is ACTIVITY_ID_REUSE_POLICY_ALLOW_DUPLICATE.
2768
+ temporal.api.enums.v1.ActivityIdReusePolicy id_reuse_policy = 13;
2769
+ // Defines how to resolve an activity id conflict with a *running* activity.
2770
+ // The default policy is ACTIVITY_ID_CONFLICT_POLICY_FAIL.
2771
+ temporal.api.enums.v1.ActivityIdConflictPolicy id_conflict_policy = 14;
2772
+
2773
+ // Search attributes for indexing.
2774
+ temporal.api.common.v1.SearchAttributes search_attributes = 15;
2775
+ // Header for context propagation and tracing purposes.
2776
+ temporal.api.common.v1.Header header = 16;
2777
+ // Metadata for use by user interfaces to display the fixed as-of-start summary and details of the activity.
2778
+ temporal.api.sdk.v1.UserMetadata user_metadata = 17;
2779
+ // Priority metadata.
2780
+ temporal.api.common.v1.Priority priority = 18;
2781
+ }
2782
+
2783
+ message StartActivityExecutionResponse {
2784
+ // The run ID of the activity that was started - or used (via ACTIVITY_ID_CONFLICT_POLICY_USE_EXISTING).
2785
+ string run_id = 1;
2786
+ // If true, a new activity was started.
2787
+ bool started = 2;
2788
+ }
2789
+
2790
+ message DescribeActivityExecutionRequest {
2791
+ string namespace = 1;
2792
+ string activity_id = 2;
2793
+ // Activity run ID. If empty the request targets the latest run.
2794
+ string run_id = 3;
2795
+ // Include the input field in the response.
2796
+ bool include_input = 4;
2797
+ // Include the outcome (result/failure) in the response if the activity has completed.
2798
+ bool include_outcome = 5;
2799
+ // Token from a previous DescribeActivityExecutionResponse. If present, long-poll until activity
2800
+ // state changes from the state encoded in this token. If absent, return current state immediately.
2801
+ // If present, run_id must also be present.
2802
+ // Note that activity state may change multiple times between requests, therefore it is not
2803
+ // guaranteed that a client making a sequence of long-poll requests will see a complete
2804
+ // sequence of state changes.
2805
+ bytes long_poll_token = 6;
2806
+ }
2807
+
2808
+ message DescribeActivityExecutionResponse {
2809
+ // The run ID of the activity, useful when run_id was not specified in the request.
2810
+ string run_id = 1;
2811
+
2812
+ // Information about the activity execution.
2813
+ temporal.api.activity.v1.ActivityExecutionInfo info = 2;
2814
+
2815
+ // Serialized activity input, passed as arguments to the activity function.
2816
+ // Only set if include_input was true in the request.
2817
+ temporal.api.common.v1.Payloads input = 3;
2818
+
2819
+ // Only set if the activity is completed and include_outcome was true in the request.
2820
+ temporal.api.activity.v1.ActivityExecutionOutcome outcome = 4;
2821
+
2822
+ // Token for follow-on long-poll requests. Absent only if the activity is complete.
2823
+ bytes long_poll_token = 5;
2824
+ }
2825
+
2826
+ message PollActivityExecutionRequest {
2827
+ string namespace = 1;
2828
+ string activity_id = 2;
2829
+ // Activity run ID. If empty the request targets the latest run.
2830
+ string run_id = 3;
2831
+ }
2832
+
2833
+ message PollActivityExecutionResponse {
2834
+ // The run ID of the activity, useful when run_id was not specified in the request.
2835
+ string run_id = 1;
2836
+
2837
+ temporal.api.activity.v1.ActivityExecutionOutcome outcome = 2;
2838
+ }
2839
+
2840
+ message ListActivityExecutionsRequest {
2841
+ string namespace = 1;
2842
+ // Max number of executions to return per page.
2843
+ int32 page_size = 2;
2844
+ // Token returned in ListActivityExecutionsResponse.
2845
+ bytes next_page_token = 3;
2846
+ // Visibility query, see https://docs.temporal.io/list-filter for the syntax.
2847
+ string query = 4;
2848
+ }
2849
+
2850
+ message ListActivityExecutionsResponse {
2851
+ repeated temporal.api.activity.v1.ActivityExecutionListInfo executions = 1;
2852
+ // Token to use to fetch the next page. If empty, there is no next page.
2853
+ bytes next_page_token = 2;
2854
+ }
2855
+
2856
+ message CountActivityExecutionsRequest {
2857
+ string namespace = 1;
2858
+ // Visibility query, see https://docs.temporal.io/list-filter for the syntax.
2859
+ string query = 2;
2860
+ }
2861
+
2862
+ message CountActivityExecutionsResponse {
2863
+ // If `query` is not grouping by any field, the count is an approximate number
2864
+ // of activities that match the query.
2865
+ // If `query` is grouping by a field, the count is simply the sum of the counts
2866
+ // of the groups returned in the response. This number can be smaller than the
2867
+ // total number of activities matching the query.
2868
+ int64 count = 1;
2869
+
2870
+ // Contains the groups if the request is grouping by a field.
2871
+ // The list might not be complete, and the counts of each group is approximate.
2872
+ repeated AggregationGroup groups = 2;
2873
+
2874
+ message AggregationGroup {
2875
+ repeated temporal.api.common.v1.Payload group_values = 1;
2876
+ int64 count = 2;
2877
+ }
2878
+ }
2879
+
2880
+ message RequestCancelActivityExecutionRequest {
2881
+ string namespace = 1;
2882
+ string activity_id = 2;
2883
+ // Activity run ID, targets the latest run if run_id is empty.
2884
+ string run_id = 3;
2885
+ // The identity of the worker/client.
2886
+ string identity = 4;
2887
+ // Used to de-dupe cancellation requests.
2888
+ string request_id = 5;
2889
+ // Reason for requesting the cancellation, recorded and available via the PollActivityExecution API.
2890
+ // Not propagated to a worker if an activity attempt is currently running.
2891
+ string reason = 6;
2892
+ }
2893
+
2894
+ message RequestCancelActivityExecutionResponse {
2895
+ }
2896
+
2897
+ message TerminateActivityExecutionRequest {
2898
+ string namespace = 1;
2899
+ string activity_id = 2;
2900
+ // Activity run ID, targets the latest run if run_id is empty.
2901
+ string run_id = 3;
2902
+ // The identity of the worker/client.
2903
+ string identity = 4;
2904
+ // Used to de-dupe termination requests.
2905
+ string request_id = 5;
2906
+ // Reason for requesting the termination, recorded in in the activity's result failure outcome.
2907
+ string reason = 6;
2908
+ }
2909
+
2910
+ message TerminateActivityExecutionResponse {
2911
+ }
2912
+
2913
+ message DeleteActivityExecutionRequest {
2914
+ string namespace = 1;
2915
+ string activity_id = 2;
2916
+ // Activity run ID, targets the latest run if run_id is empty.
2917
+ string run_id = 3;
2918
+ }
2919
+
2920
+ message DeleteActivityExecutionResponse {
2921
+ }