@temporalio/core-bridge 1.8.5 → 1.9.0-rc.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 (196) hide show
  1. package/Cargo.lock +189 -152
  2. package/Cargo.toml +1 -0
  3. package/lib/index.d.ts +17 -44
  4. package/lib/index.js.map +1 -1
  5. package/package.json +3 -4
  6. package/releases/aarch64-apple-darwin/index.node +0 -0
  7. package/releases/aarch64-unknown-linux-gnu/index.node +0 -0
  8. package/releases/x86_64-apple-darwin/index.node +0 -0
  9. package/releases/x86_64-pc-windows-msvc/index.node +0 -0
  10. package/releases/x86_64-unknown-linux-gnu/index.node +0 -0
  11. package/sdk-core/.github/workflows/heavy.yml +4 -0
  12. package/sdk-core/.github/workflows/per-pr.yml +96 -0
  13. package/sdk-core/ARCHITECTURE.md +1 -1
  14. package/sdk-core/Cargo.toml +6 -0
  15. package/sdk-core/README.md +37 -21
  16. package/sdk-core/client/Cargo.toml +6 -3
  17. package/sdk-core/client/src/lib.rs +272 -138
  18. package/sdk-core/client/src/metrics.rs +68 -57
  19. package/sdk-core/client/src/raw.rs +191 -45
  20. package/sdk-core/client/src/retry.rs +20 -0
  21. package/sdk-core/client/src/worker_registry/mod.rs +264 -0
  22. package/sdk-core/client/src/workflow_handle/mod.rs +2 -1
  23. package/sdk-core/core/Cargo.toml +16 -18
  24. package/sdk-core/core/src/core_tests/child_workflows.rs +7 -7
  25. package/sdk-core/core/src/core_tests/mod.rs +1 -0
  26. package/sdk-core/core/src/core_tests/replay_flag.rs +29 -39
  27. package/sdk-core/core/src/core_tests/updates.rs +73 -0
  28. package/sdk-core/core/src/core_tests/workflow_tasks.rs +52 -1
  29. package/sdk-core/core/src/ephemeral_server/mod.rs +34 -11
  30. package/sdk-core/core/src/internal_flags.rs +7 -1
  31. package/sdk-core/core/src/lib.rs +19 -36
  32. package/sdk-core/core/src/protosext/mod.rs +11 -3
  33. package/sdk-core/core/src/protosext/protocol_messages.rs +102 -0
  34. package/sdk-core/core/src/replay/mod.rs +100 -48
  35. package/sdk-core/core/src/telemetry/log_export.rs +161 -28
  36. package/sdk-core/core/src/telemetry/metrics.rs +869 -248
  37. package/sdk-core/core/src/telemetry/mod.rs +135 -239
  38. package/sdk-core/core/src/telemetry/prometheus_server.rs +36 -31
  39. package/sdk-core/core/src/test_help/mod.rs +63 -4
  40. package/sdk-core/core/src/worker/activities/activity_heartbeat_manager.rs +12 -2
  41. package/sdk-core/core/src/worker/activities.rs +276 -10
  42. package/sdk-core/core/src/worker/client/mocks.rs +18 -0
  43. package/sdk-core/core/src/worker/client.rs +16 -3
  44. package/sdk-core/core/src/worker/mod.rs +50 -19
  45. package/sdk-core/core/src/worker/slot_provider.rs +175 -0
  46. package/sdk-core/core/src/worker/workflow/driven_workflow.rs +27 -34
  47. package/sdk-core/core/src/worker/workflow/history_update.rs +4 -1
  48. package/sdk-core/core/src/worker/workflow/machines/activity_state_machine.rs +36 -94
  49. package/sdk-core/core/src/worker/workflow/machines/cancel_external_state_machine.rs +34 -22
  50. package/sdk-core/core/src/worker/workflow/machines/cancel_workflow_state_machine.rs +50 -34
  51. package/sdk-core/core/src/worker/workflow/machines/child_workflow_state_machine.rs +106 -92
  52. package/sdk-core/core/src/worker/workflow/machines/continue_as_new_workflow_state_machine.rs +22 -21
  53. package/sdk-core/core/src/worker/workflow/machines/local_activity_state_machine.rs +386 -499
  54. package/sdk-core/core/src/worker/workflow/machines/mod.rs +12 -2
  55. package/sdk-core/core/src/worker/workflow/machines/modify_workflow_properties_state_machine.rs +33 -26
  56. package/sdk-core/core/src/worker/workflow/machines/patch_state_machine.rs +198 -215
  57. package/sdk-core/core/src/worker/workflow/machines/signal_external_state_machine.rs +66 -62
  58. package/sdk-core/core/src/worker/workflow/machines/timer_state_machine.rs +88 -119
  59. package/sdk-core/core/src/worker/workflow/machines/transition_coverage.rs +3 -1
  60. package/sdk-core/core/src/worker/workflow/machines/update_state_machine.rs +411 -0
  61. package/sdk-core/core/src/worker/workflow/machines/upsert_search_attributes_state_machine.rs +26 -25
  62. package/sdk-core/core/src/worker/workflow/machines/workflow_machines.rs +302 -85
  63. package/sdk-core/core/src/worker/workflow/managed_run.rs +179 -132
  64. package/sdk-core/core/src/worker/workflow/mod.rs +121 -46
  65. package/sdk-core/core/src/worker/workflow/run_cache.rs +8 -12
  66. package/sdk-core/core/src/worker/workflow/workflow_stream.rs +45 -38
  67. package/sdk-core/core-api/Cargo.toml +7 -6
  68. package/sdk-core/core-api/src/lib.rs +4 -12
  69. package/sdk-core/core-api/src/telemetry/metrics.rs +334 -0
  70. package/sdk-core/core-api/src/telemetry.rs +53 -42
  71. package/sdk-core/core-api/src/worker.rs +7 -0
  72. package/sdk-core/{.buildkite/docker → docker}/docker-compose.yaml +1 -1
  73. package/sdk-core/etc/dynamic-config.yaml +11 -1
  74. package/sdk-core/fsm/rustfsm_procmacro/Cargo.toml +1 -1
  75. package/sdk-core/fsm/rustfsm_procmacro/src/lib.rs +1 -3
  76. package/sdk-core/fsm/rustfsm_procmacro/tests/trybuild/no_handle_conversions_require_into_fail.stderr +2 -2
  77. package/sdk-core/sdk/Cargo.toml +1 -1
  78. package/sdk-core/sdk/src/lib.rs +85 -7
  79. package/sdk-core/sdk/src/workflow_context/options.rs +4 -0
  80. package/sdk-core/sdk/src/workflow_context.rs +43 -15
  81. package/sdk-core/sdk/src/workflow_future.rs +334 -204
  82. package/sdk-core/sdk-core-protos/Cargo.toml +2 -2
  83. package/sdk-core/sdk-core-protos/build.rs +14 -14
  84. package/sdk-core/sdk-core-protos/protos/api_upstream/.buildkite/Dockerfile +2 -0
  85. package/sdk-core/sdk-core-protos/protos/api_upstream/Makefile +99 -0
  86. package/sdk-core/sdk-core-protos/protos/api_upstream/api-linter.yaml +56 -0
  87. package/sdk-core/sdk-core-protos/protos/api_upstream/buf.gen.yaml +20 -0
  88. package/sdk-core/sdk-core-protos/protos/api_upstream/buf.lock +11 -0
  89. package/sdk-core/sdk-core-protos/protos/api_upstream/buf.yaml +18 -0
  90. package/sdk-core/sdk-core-protos/protos/api_upstream/google/api/annotations.proto +31 -0
  91. package/sdk-core/sdk-core-protos/protos/api_upstream/google/api/http.proto +379 -0
  92. package/sdk-core/sdk-core-protos/protos/api_upstream/google/protobuf/any.proto +162 -0
  93. package/sdk-core/sdk-core-protos/protos/api_upstream/google/protobuf/descriptor.proto +1212 -0
  94. package/sdk-core/sdk-core-protos/protos/api_upstream/google/protobuf/duration.proto +115 -0
  95. package/sdk-core/sdk-core-protos/protos/api_upstream/google/protobuf/empty.proto +51 -0
  96. package/sdk-core/sdk-core-protos/protos/api_upstream/google/protobuf/timestamp.proto +144 -0
  97. package/sdk-core/sdk-core-protos/protos/api_upstream/google/protobuf/wrappers.proto +123 -0
  98. package/sdk-core/{protos → sdk-core-protos/protos}/api_upstream/temporal/api/batch/v1/message.proto +3 -5
  99. package/sdk-core/{protos → sdk-core-protos/protos}/api_upstream/temporal/api/command/v1/message.proto +11 -13
  100. package/sdk-core/{protos → sdk-core-protos/protos}/api_upstream/temporal/api/common/v1/message.proto +2 -4
  101. package/sdk-core/{protos → sdk-core-protos/protos}/api_upstream/temporal/api/enums/v1/failed_cause.proto +2 -0
  102. package/sdk-core/{protos → sdk-core-protos/protos}/api_upstream/temporal/api/enums/v1/reset.proto +1 -1
  103. package/sdk-core/{protos/api_upstream/build/tools.go → sdk-core-protos/protos/api_upstream/temporal/api/export/v1/message.proto} +22 -6
  104. package/sdk-core/{protos → sdk-core-protos/protos}/api_upstream/temporal/api/filter/v1/message.proto +2 -4
  105. package/sdk-core/{protos → sdk-core-protos/protos}/api_upstream/temporal/api/history/v1/message.proto +21 -23
  106. package/sdk-core/{protos → sdk-core-protos/protos}/api_upstream/temporal/api/namespace/v1/message.proto +2 -4
  107. package/sdk-core/{protos → sdk-core-protos/protos}/api_upstream/temporal/api/operatorservice/v1/request_response.proto +2 -0
  108. package/sdk-core/{protos → sdk-core-protos/protos}/api_upstream/temporal/api/operatorservice/v1/service.proto +4 -0
  109. package/sdk-core/{protos → sdk-core-protos/protos}/api_upstream/temporal/api/replication/v1/message.proto +1 -3
  110. package/sdk-core/{protos → sdk-core-protos/protos}/api_upstream/temporal/api/schedule/v1/message.proto +36 -20
  111. package/sdk-core/{protos → sdk-core-protos/protos}/api_upstream/temporal/api/sdk/v1/task_complete_metadata.proto +13 -0
  112. package/sdk-core/{protos → sdk-core-protos/protos}/api_upstream/temporal/api/taskqueue/v1/message.proto +2 -4
  113. package/sdk-core/{protos → sdk-core-protos/protos}/api_upstream/temporal/api/update/v1/message.proto +1 -1
  114. package/sdk-core/{protos → sdk-core-protos/protos}/api_upstream/temporal/api/version/v1/message.proto +2 -3
  115. package/sdk-core/{protos → sdk-core-protos/protos}/api_upstream/temporal/api/workflow/v1/message.proto +18 -20
  116. package/sdk-core/{protos → sdk-core-protos/protos}/api_upstream/temporal/api/workflowservice/v1/request_response.proto +84 -32
  117. package/sdk-core/{protos → sdk-core-protos/protos}/api_upstream/temporal/api/workflowservice/v1/service.proto +205 -47
  118. package/sdk-core/{protos → sdk-core-protos/protos}/local/temporal/sdk/core/workflow_activation/workflow_activation.proto +57 -0
  119. package/sdk-core/{protos → sdk-core-protos/protos}/local/temporal/sdk/core/workflow_commands/workflow_commands.proto +27 -0
  120. package/sdk-core/sdk-core-protos/src/history_builder.rs +67 -2
  121. package/sdk-core/sdk-core-protos/src/lib.rs +75 -2
  122. package/sdk-core/sdk-core-protos/src/utilities.rs +14 -0
  123. package/sdk-core/test-utils/Cargo.toml +5 -1
  124. package/sdk-core/test-utils/src/canned_histories.rs +3 -57
  125. package/sdk-core/test-utils/src/interceptors.rs +46 -0
  126. package/sdk-core/test-utils/src/lib.rs +106 -38
  127. package/sdk-core/tests/integ_tests/metrics_tests.rs +110 -15
  128. package/sdk-core/tests/integ_tests/queries_tests.rs +174 -3
  129. package/sdk-core/tests/integ_tests/update_tests.rs +908 -0
  130. package/sdk-core/tests/integ_tests/workflow_tests/activities.rs +44 -1
  131. package/sdk-core/tests/integ_tests/workflow_tests/cancel_external.rs +1 -1
  132. package/sdk-core/tests/integ_tests/workflow_tests/cancel_wf.rs +1 -1
  133. package/sdk-core/tests/integ_tests/workflow_tests/child_workflows.rs +4 -4
  134. package/sdk-core/tests/integ_tests/workflow_tests/eager.rs +61 -0
  135. package/sdk-core/tests/integ_tests/workflow_tests/replay.rs +27 -2
  136. package/sdk-core/tests/integ_tests/workflow_tests.rs +1 -0
  137. package/sdk-core/tests/main.rs +2 -1
  138. package/sdk-core/tests/runner.rs +15 -2
  139. package/src/conversions.rs +75 -89
  140. package/src/helpers.rs +74 -0
  141. package/src/runtime.rs +17 -6
  142. package/src/worker.rs +14 -61
  143. package/ts/index.ts +21 -52
  144. package/sdk-core/.buildkite/docker/Dockerfile +0 -9
  145. package/sdk-core/.buildkite/docker/build.sh +0 -5
  146. package/sdk-core/.buildkite/docker/docker-compose-ci.yaml +0 -27
  147. package/sdk-core/.buildkite/pipeline.yml +0 -57
  148. package/sdk-core/.github/workflows/semgrep.yml +0 -25
  149. package/sdk-core/core/src/worker/workflow/bridge.rs +0 -35
  150. package/sdk-core/core/src/worker/workflow/managed_run/managed_wf_test.rs +0 -215
  151. package/sdk-core/protos/api_upstream/.buildkite/Dockerfile +0 -2
  152. package/sdk-core/protos/api_upstream/Makefile +0 -80
  153. package/sdk-core/protos/api_upstream/api-linter.yaml +0 -40
  154. package/sdk-core/protos/api_upstream/buf.yaml +0 -9
  155. package/sdk-core/protos/api_upstream/build/go.mod +0 -7
  156. package/sdk-core/protos/api_upstream/build/go.sum +0 -5
  157. package/sdk-core/protos/api_upstream/go.mod +0 -6
  158. package/sdk-core/protos/testsrv_upstream/dependencies/gogoproto/gogo.proto +0 -141
  159. /package/sdk-core/{.buildkite/docker → docker}/docker-compose-telem.yaml +0 -0
  160. /package/sdk-core/{protos → sdk-core-protos/protos}/api_upstream/.buildkite/docker-compose.yml +0 -0
  161. /package/sdk-core/{protos → sdk-core-protos/protos}/api_upstream/.buildkite/pipeline.yml +0 -0
  162. /package/sdk-core/{protos → sdk-core-protos/protos}/api_upstream/.github/CODEOWNERS +0 -0
  163. /package/sdk-core/{protos → sdk-core-protos/protos}/api_upstream/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  164. /package/sdk-core/{protos → sdk-core-protos/protos}/api_upstream/.github/workflows/publish-docs.yml +0 -0
  165. /package/sdk-core/{protos → sdk-core-protos/protos}/api_upstream/.github/workflows/trigger-api-go-update.yml +0 -0
  166. /package/sdk-core/{protos → sdk-core-protos/protos}/api_upstream/LICENSE +0 -0
  167. /package/sdk-core/{protos → sdk-core-protos/protos}/api_upstream/README.md +0 -0
  168. /package/sdk-core/{protos → sdk-core-protos/protos}/api_upstream/temporal/api/enums/v1/batch_operation.proto +0 -0
  169. /package/sdk-core/{protos → sdk-core-protos/protos}/api_upstream/temporal/api/enums/v1/command_type.proto +0 -0
  170. /package/sdk-core/{protos → sdk-core-protos/protos}/api_upstream/temporal/api/enums/v1/common.proto +0 -0
  171. /package/sdk-core/{protos → sdk-core-protos/protos}/api_upstream/temporal/api/enums/v1/event_type.proto +0 -0
  172. /package/sdk-core/{protos → sdk-core-protos/protos}/api_upstream/temporal/api/enums/v1/namespace.proto +0 -0
  173. /package/sdk-core/{protos → sdk-core-protos/protos}/api_upstream/temporal/api/enums/v1/query.proto +0 -0
  174. /package/sdk-core/{protos → sdk-core-protos/protos}/api_upstream/temporal/api/enums/v1/schedule.proto +0 -0
  175. /package/sdk-core/{protos → sdk-core-protos/protos}/api_upstream/temporal/api/enums/v1/task_queue.proto +0 -0
  176. /package/sdk-core/{protos → sdk-core-protos/protos}/api_upstream/temporal/api/enums/v1/update.proto +0 -0
  177. /package/sdk-core/{protos → sdk-core-protos/protos}/api_upstream/temporal/api/enums/v1/workflow.proto +0 -0
  178. /package/sdk-core/{protos → sdk-core-protos/protos}/api_upstream/temporal/api/errordetails/v1/message.proto +0 -0
  179. /package/sdk-core/{protos → sdk-core-protos/protos}/api_upstream/temporal/api/failure/v1/message.proto +0 -0
  180. /package/sdk-core/{protos → sdk-core-protos/protos}/api_upstream/temporal/api/protocol/v1/message.proto +0 -0
  181. /package/sdk-core/{protos → sdk-core-protos/protos}/api_upstream/temporal/api/query/v1/message.proto +0 -0
  182. /package/sdk-core/{protos → sdk-core-protos/protos}/google/rpc/status.proto +0 -0
  183. /package/sdk-core/{protos → sdk-core-protos/protos}/grpc/health/v1/health.proto +0 -0
  184. /package/sdk-core/{protos → sdk-core-protos/protos}/local/temporal/sdk/core/activity_result/activity_result.proto +0 -0
  185. /package/sdk-core/{protos → sdk-core-protos/protos}/local/temporal/sdk/core/activity_task/activity_task.proto +0 -0
  186. /package/sdk-core/{protos → sdk-core-protos/protos}/local/temporal/sdk/core/child_workflow/child_workflow.proto +0 -0
  187. /package/sdk-core/{protos → sdk-core-protos/protos}/local/temporal/sdk/core/common/common.proto +0 -0
  188. /package/sdk-core/{protos → sdk-core-protos/protos}/local/temporal/sdk/core/core_interface.proto +0 -0
  189. /package/sdk-core/{protos → sdk-core-protos/protos}/local/temporal/sdk/core/external_data/external_data.proto +0 -0
  190. /package/sdk-core/{protos → sdk-core-protos/protos}/local/temporal/sdk/core/workflow_completion/workflow_completion.proto +0 -0
  191. /package/sdk-core/{protos → sdk-core-protos/protos}/testsrv_upstream/Makefile +0 -0
  192. /package/sdk-core/{protos → sdk-core-protos/protos}/testsrv_upstream/api-linter.yaml +0 -0
  193. /package/sdk-core/{protos → sdk-core-protos/protos}/testsrv_upstream/buf.yaml +0 -0
  194. /package/sdk-core/{protos/api_upstream → sdk-core-protos/protos/testsrv_upstream}/dependencies/gogoproto/gogo.proto +0 -0
  195. /package/sdk-core/{protos → sdk-core-protos/protos}/testsrv_upstream/temporal/api/testservice/v1/request_response.proto +0 -0
  196. /package/sdk-core/{protos → sdk-core-protos/protos}/testsrv_upstream/temporal/api/testservice/v1/service.proto +0 -0
@@ -39,6 +39,7 @@ import "temporal/api/enums/v1/common.proto";
39
39
  import "temporal/api/enums/v1/query.proto";
40
40
  import "temporal/api/enums/v1/reset.proto";
41
41
  import "temporal/api/enums/v1/task_queue.proto";
42
+ import "temporal/api/enums/v1/update.proto";
42
43
  import "temporal/api/common/v1/message.proto";
43
44
  import "temporal/api/history/v1/message.proto";
44
45
  import "temporal/api/workflow/v1/message.proto";
@@ -59,13 +60,11 @@ import "temporal/api/sdk/v1/task_complete_metadata.proto";
59
60
  import "google/protobuf/duration.proto";
60
61
  import "google/protobuf/timestamp.proto";
61
62
 
62
- import "dependencies/gogoproto/gogo.proto";
63
-
64
63
  message RegisterNamespaceRequest {
65
64
  string namespace = 1;
66
65
  string description = 2;
67
66
  string owner_email = 3;
68
- google.protobuf.Duration workflow_execution_retention_period = 4 [(gogoproto.stdduration) = true];
67
+ google.protobuf.Duration workflow_execution_retention_period = 4;
69
68
  repeated temporal.api.replication.v1.ClusterReplicationConfig clusters = 5;
70
69
  string active_cluster_name = 6;
71
70
  // A key-value map for any customized purpose.
@@ -151,11 +150,11 @@ message StartWorkflowExecutionRequest {
151
150
  // Serialized arguments to the workflow. These are passed as arguments to the workflow function.
152
151
  temporal.api.common.v1.Payloads input = 5;
153
152
  // Total workflow execution timeout including retries and continue as new.
154
- google.protobuf.Duration workflow_execution_timeout = 6 [(gogoproto.stdduration) = true];
153
+ google.protobuf.Duration workflow_execution_timeout = 6;
155
154
  // Timeout of a single workflow run.
156
- google.protobuf.Duration workflow_run_timeout = 7 [(gogoproto.stdduration) = true];
155
+ google.protobuf.Duration workflow_run_timeout = 7;
157
156
  // Timeout of a single workflow task.
158
- google.protobuf.Duration workflow_task_timeout = 8 [(gogoproto.stdduration) = true];
157
+ google.protobuf.Duration workflow_task_timeout = 8;
159
158
  // The identity of the client who initiated this request
160
159
  string identity = 9;
161
160
  // A unique identifier for this start request. Typically UUIDv4.
@@ -183,7 +182,7 @@ message StartWorkflowExecutionRequest {
183
182
  // Time to wait before dispatching the first workflow task. Cannot be used with `cron_schedule`.
184
183
  // If the workflow gets a signal before the delay, a workflow task will be dispatched and the rest
185
184
  // of the delay will be ignored.
186
- google.protobuf.Duration workflow_start_delay = 20 [(gogoproto.stdduration) = true];
185
+ google.protobuf.Duration workflow_start_delay = 20;
187
186
  }
188
187
 
189
188
  message StartWorkflowExecutionResponse {
@@ -256,7 +255,9 @@ message PollWorkflowTaskQueueResponse {
256
255
  // Will be zero if no task has ever started.
257
256
  int64 previous_started_event_id = 4;
258
257
  // The id of the most recent workflow task started event, which will have been generated as a
259
- // result of this poll request being served.
258
+ // result of this poll request being served. Will be zero if the task
259
+ // does not contain any events which would advance history (no new WFT started).
260
+ // Currently this can happen for queries.
260
261
  int64 started_event_id = 5;
261
262
  // Starting at 1, the number of attempts to complete this task by any worker.
262
263
  int32 attempt = 6;
@@ -279,9 +280,9 @@ message PollWorkflowTaskQueueResponse {
279
280
  // for the queue, even if this response came from polling a sticky queue.
280
281
  temporal.api.taskqueue.v1.TaskQueue workflow_execution_task_queue = 11;
281
282
  // When this task was scheduled by the server
282
- google.protobuf.Timestamp scheduled_time = 12 [(gogoproto.stdtime) = true];
283
+ google.protobuf.Timestamp scheduled_time = 12;
283
284
  // When the current workflow task started event was generated, meaning the current attempt.
284
- google.protobuf.Timestamp started_time = 13 [(gogoproto.stdtime) = true];
285
+ google.protobuf.Timestamp started_time = 13;
285
286
  // Queries that should be executed after applying the history in this task. Responses should be
286
287
  // attached to `RespondWorkflowTaskCompletedRequest::query_results`
287
288
  map<string, temporal.api.query.v1.WorkflowQuery> queries = 14;
@@ -394,25 +395,25 @@ message PollActivityTaskQueueResponse {
394
395
  // was delivered.
395
396
  temporal.api.common.v1.Payloads heartbeat_details = 9;
396
397
  // When was this task first scheduled
397
- google.protobuf.Timestamp scheduled_time = 10 [(gogoproto.stdtime) = true];
398
+ google.protobuf.Timestamp scheduled_time = 10;
398
399
  // When was this task attempt scheduled
399
- google.protobuf.Timestamp current_attempt_scheduled_time = 11 [(gogoproto.stdtime) = true];
400
+ google.protobuf.Timestamp current_attempt_scheduled_time = 11;
400
401
  // When was this task started (this attempt)
401
- google.protobuf.Timestamp started_time = 12 [(gogoproto.stdtime) = true];
402
+ google.protobuf.Timestamp started_time = 12;
402
403
  // Starting at 1, the number of attempts to perform this activity
403
404
  int32 attempt = 13;
404
405
  // First scheduled -> final result reported timeout
405
406
  //
406
407
  // (-- api-linter: core::0140::prepositions=disabled
407
408
  // aip.dev/not-precedent: "to" is used to indicate interval. --)
408
- google.protobuf.Duration schedule_to_close_timeout = 14 [(gogoproto.stdduration) = true];
409
+ google.protobuf.Duration schedule_to_close_timeout = 14;
409
410
  // Current attempt start -> final result reported timeout
410
411
  //
411
412
  // (-- api-linter: core::0140::prepositions=disabled
412
413
  // aip.dev/not-precedent: "to" is used to indicate interval. --)
413
- google.protobuf.Duration start_to_close_timeout = 15 [(gogoproto.stdduration) = true];
414
+ google.protobuf.Duration start_to_close_timeout = 15;
414
415
  // Window within which the activity must report a heartbeat, or be timed out.
415
- google.protobuf.Duration heartbeat_timeout = 16 [(gogoproto.stdduration) = true];
416
+ google.protobuf.Duration heartbeat_timeout = 16;
416
417
  // This is the retry policy the service uses which may be different from the one provided
417
418
  // (or not) during activity scheduling. The service can override the provided one if some
418
419
  // values are not specified or exceed configured system limits.
@@ -621,11 +622,11 @@ message SignalWithStartWorkflowExecutionRequest {
621
622
  // Serialized arguments to the workflow. These are passed as arguments to the workflow function.
622
623
  temporal.api.common.v1.Payloads input = 5;
623
624
  // Total workflow execution timeout including retries and continue as new
624
- google.protobuf.Duration workflow_execution_timeout = 6 [(gogoproto.stdduration) = true];
625
+ google.protobuf.Duration workflow_execution_timeout = 6;
625
626
  // Timeout of a single workflow run
626
- google.protobuf.Duration workflow_run_timeout = 7 [(gogoproto.stdduration) = true];
627
+ google.protobuf.Duration workflow_run_timeout = 7;
627
628
  // Timeout of a single workflow task
628
- google.protobuf.Duration workflow_task_timeout = 8 [(gogoproto.stdduration) = true];
629
+ google.protobuf.Duration workflow_task_timeout = 8;
629
630
  // The identity of the worker/client
630
631
  string identity = 9;
631
632
  // Used to de-dupe signal w/ start requests
@@ -650,7 +651,7 @@ message SignalWithStartWorkflowExecutionRequest {
650
651
  // or not set, a workflow task will be dispatched immediately and the rest of the delay period
651
652
  // will be ignored, even if that request also had a delay. Signal via SignalWorkflowExecution
652
653
  // will not unblock the workflow.
653
- google.protobuf.Duration workflow_start_delay = 20 [(gogoproto.stdduration) = true];
654
+ google.protobuf.Duration workflow_start_delay = 20;
654
655
  // Indicates that a new workflow task should not be generated when this signal is received.
655
656
  bool skip_generate_workflow_task = 21;
656
657
  }
@@ -668,7 +669,7 @@ message ResetWorkflowExecutionRequest {
668
669
  int64 workflow_task_finish_event_id = 4;
669
670
  // Used to de-dupe reset requests
670
671
  string request_id = 5;
671
- // Reset reapplay(replay) options.
672
+ // Reset reapply (replay) options.
672
673
  temporal.api.enums.v1.ResetReapplyType reset_reapply_type = 6;
673
674
  }
674
675
 
@@ -781,7 +782,21 @@ message CountWorkflowExecutionsRequest {
781
782
  }
782
783
 
783
784
  message CountWorkflowExecutionsResponse {
785
+ // If `query` is not grouping by any field, the count is an approximate number
786
+ // of workflows that matches the query.
787
+ // If `query` is grouping by a field, the count is simply the sum of the counts
788
+ // of the groups returned in the response. This number can be smaller than the
789
+ // total number of workflows matching the query.
784
790
  int64 count = 1;
791
+
792
+ // `groups` contains the groups if the request is grouping by a field.
793
+ // The list might not be complete, and the counts of each group is approximate.
794
+ repeated AggregationGroup groups = 2;
795
+
796
+ message AggregationGroup {
797
+ repeated temporal.api.common.v1.Payload group_values = 1;
798
+ int64 count = 2;
799
+ }
785
800
  }
786
801
 
787
802
  message GetSearchAttributesRequest {
@@ -841,6 +856,7 @@ message DescribeWorkflowExecutionResponse {
841
856
  message DescribeTaskQueueRequest {
842
857
  string namespace = 1;
843
858
  temporal.api.taskqueue.v1.TaskQueue task_queue = 2;
859
+ // If unspecified (TASK_QUEUE_TYPE_UNSPECIFIED), then default value (TASK_QUEUE_TYPE_WORKFLOW) will be used.
844
860
  temporal.api.enums.v1.TaskQueueType task_queue_type = 3;
845
861
  bool include_task_queue_status = 4;
846
862
  }
@@ -912,6 +928,10 @@ message GetSystemInfoResponse {
912
928
  // True if the server knows about the sdk metadata field on WFT completions and will record
913
929
  // it in history
914
930
  bool sdk_metadata = 9;
931
+
932
+ // True if the server supports count group by execution status
933
+ // (-- api-linter: core::0140::prepositions=disabled --)
934
+ bool count_group_by_execution_status = 10;
915
935
  }
916
936
  }
917
937
 
@@ -1028,12 +1048,12 @@ message ListScheduleMatchingTimesRequest {
1028
1048
  // The id of the schedule to query.
1029
1049
  string schedule_id = 2;
1030
1050
  // Time range to query.
1031
- google.protobuf.Timestamp start_time = 3 [(gogoproto.stdtime) = true];
1032
- google.protobuf.Timestamp end_time = 4 [(gogoproto.stdtime) = true];
1051
+ google.protobuf.Timestamp start_time = 3;
1052
+ google.protobuf.Timestamp end_time = 4;
1033
1053
  }
1034
1054
 
1035
1055
  message ListScheduleMatchingTimesResponse {
1036
- repeated google.protobuf.Timestamp start_time = 1 [(gogoproto.stdtime) = true];
1056
+ repeated google.protobuf.Timestamp start_time = 1;
1037
1057
  }
1038
1058
 
1039
1059
  // (-- api-linter: core::0135::request-name-required=disabled
@@ -1126,9 +1146,8 @@ message UpdateWorkerBuildIdCompatibilityRequest {
1126
1146
  }
1127
1147
  }
1128
1148
  message UpdateWorkerBuildIdCompatibilityResponse {
1129
- // The id of the compatible set that the updated version was added to, or exists in. Users don't
1130
- // need to understand or care about this value, but it has value for debugging purposes.
1131
- string version_set_id = 1;
1149
+ reserved 1;
1150
+ reserved "version_set_id";
1132
1151
  }
1133
1152
 
1134
1153
  // (-- api-linter: core::0134::request-resource-required=disabled
@@ -1218,21 +1237,40 @@ message UpdateWorkflowExecutionResponse {
1218
1237
  // has completed. If this response is being returned before the update has
1219
1238
  // completed then this field will not be set.
1220
1239
  temporal.api.update.v1.Outcome outcome = 2;
1240
+
1241
+ // The most advanced lifecycle stage that the Update is known to have
1242
+ // reached, where lifecycle stages are ordered
1243
+ // UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_UNSPECIFIED <
1244
+ // UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ADMITTED <
1245
+ // UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED <
1246
+ // UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_COMPLETED.
1247
+ // UNSPECIFIED will be returned if and only if the server's maximum wait
1248
+ // time was reached before the Update reached the stage specified in the
1249
+ // request WaitPolicy, and before the context deadline expired; clients may
1250
+ // may then retry the call as needed.
1251
+ temporal.api.enums.v1.UpdateWorkflowExecutionLifecycleStage stage = 3;
1221
1252
  }
1222
1253
 
1223
1254
  message StartBatchOperationRequest {
1224
1255
  // Namespace that contains the batch operation
1225
1256
  string namespace = 1;
1226
1257
  // Visibility query defines the the group of workflow to apply the batch operation
1227
- // This field and Executions are mutually exclusive
1258
+ // This field and `executions` are mutually exclusive
1228
1259
  string visibility_query = 2;
1229
1260
  // Job ID defines the unique ID for the batch job
1230
1261
  string job_id = 3;
1231
1262
  // Reason to perform the batch operation
1232
1263
  string reason = 4;
1233
1264
  // Executions to apply the batch operation
1234
- // This field and VisibilityQuery are mutually exclusive
1265
+ // This field and `visibility_query` are mutually exclusive
1235
1266
  repeated temporal.api.common.v1.WorkflowExecution executions = 5;
1267
+ // Limit for the number of operations processed per second within this batch.
1268
+ // Its purpose is to reduce the stress on the system caused by batch operations, which helps to prevent system
1269
+ // overload and minimize potential delays in executing ongoing tasks for user workers.
1270
+ // Note that when no explicit limit is provided, the server will operate according to its limit defined by the
1271
+ // dynamic configuration key `worker.batcherRPS`. This also applies if the value in this field exceeds the
1272
+ // server's configured limit.
1273
+ float max_operations_per_second = 6;
1236
1274
  // Operation input
1237
1275
  oneof operation {
1238
1276
  temporal.api.batch.v1.BatchOperationTermination termination_operation = 10;
@@ -1275,9 +1313,9 @@ message DescribeBatchOperationResponse {
1275
1313
  // Batch operation state
1276
1314
  temporal.api.enums.v1.BatchOperationState state = 3;
1277
1315
  // Batch operation start time
1278
- google.protobuf.Timestamp start_time = 4 [(gogoproto.stdtime) = true];
1316
+ google.protobuf.Timestamp start_time = 4;
1279
1317
  // Batch operation close time
1280
- google.protobuf.Timestamp close_time = 5 [(gogoproto.stdtime) = true];
1318
+ google.protobuf.Timestamp close_time = 5;
1281
1319
  // Total operation count
1282
1320
  int64 total_operation_count = 6;
1283
1321
  // Complete operation count
@@ -1314,7 +1352,8 @@ message PollWorkflowExecutionUpdateRequest {
1314
1352
  temporal.api.update.v1.UpdateRef update_ref = 2;
1315
1353
  // The identity of the worker/client who is polling this update outcome
1316
1354
  string identity = 3;
1317
- // Describes when this poll request should return a response
1355
+ // Describes when this poll request should return a response.
1356
+ // Omit to request a non-blocking poll.
1318
1357
  temporal.api.update.v1.WaitPolicy wait_policy = 4;
1319
1358
  }
1320
1359
 
@@ -1325,4 +1364,17 @@ message PollWorkflowExecutionUpdateResponse {
1325
1364
  // UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED) then this field will
1326
1365
  // not be set.
1327
1366
  temporal.api.update.v1.Outcome outcome = 1;
1367
+ // The most advanced lifecycle stage that the Update is known to have
1368
+ // reached, where lifecycle stages are ordered
1369
+ // UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_UNSPECIFIED <
1370
+ // UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ADMITTED <
1371
+ // UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED <
1372
+ // UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_COMPLETED.
1373
+ // UNSPECIFIED will be returned if and only if the server's maximum wait
1374
+ // time was reached before the Update reached the stage specified in the
1375
+ // request WaitPolicy, and before the context deadline expired; clients may
1376
+ // may then retry the call as needed.
1377
+ temporal.api.enums.v1.UpdateWorkflowExecutionLifecycleStage stage = 2;
1378
+ // Sufficient information to address this update.
1379
+ temporal.api.update.v1.UpdateRef update_ref = 3;
1328
1380
  }