@temporalio/core-bridge 1.11.2 → 1.11.4

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 (119) hide show
  1. package/Cargo.lock +396 -489
  2. package/Cargo.toml +3 -2
  3. package/lib/errors.d.ts +2 -0
  4. package/lib/errors.js +7 -3
  5. package/lib/errors.js.map +1 -1
  6. package/lib/index.d.ts +8 -2
  7. package/lib/index.js.map +1 -1
  8. package/lib/worker-tuner.d.ts +111 -1
  9. package/package.json +3 -3
  10. package/releases/aarch64-apple-darwin/index.node +0 -0
  11. package/releases/aarch64-unknown-linux-gnu/index.node +0 -0
  12. package/releases/x86_64-apple-darwin/index.node +0 -0
  13. package/releases/x86_64-pc-windows-msvc/index.node +0 -0
  14. package/releases/x86_64-unknown-linux-gnu/index.node +0 -0
  15. package/sdk-core/.github/workflows/per-pr.yml +3 -3
  16. package/sdk-core/Cargo.toml +0 -1
  17. package/sdk-core/client/Cargo.toml +1 -2
  18. package/sdk-core/client/src/lib.rs +21 -13
  19. package/sdk-core/client/src/metrics.rs +1 -1
  20. package/sdk-core/client/src/raw.rs +46 -1
  21. package/sdk-core/core/Cargo.toml +7 -7
  22. package/sdk-core/core/benches/workflow_replay.rs +1 -1
  23. package/sdk-core/core/src/abstractions/take_cell.rs +1 -1
  24. package/sdk-core/core/src/abstractions.rs +98 -10
  25. package/sdk-core/core/src/core_tests/activity_tasks.rs +8 -2
  26. package/sdk-core/core/src/core_tests/local_activities.rs +1 -1
  27. package/sdk-core/core/src/core_tests/mod.rs +3 -3
  28. package/sdk-core/core/src/core_tests/updates.rs +104 -9
  29. package/sdk-core/core/src/core_tests/workers.rs +72 -3
  30. package/sdk-core/core/src/core_tests/workflow_tasks.rs +6 -7
  31. package/sdk-core/core/src/debug_client.rs +78 -0
  32. package/sdk-core/core/src/ephemeral_server/mod.rs +15 -5
  33. package/sdk-core/core/src/lib.rs +30 -4
  34. package/sdk-core/core/src/pollers/mod.rs +1 -1
  35. package/sdk-core/core/src/pollers/poll_buffer.rs +7 -7
  36. package/sdk-core/core/src/replay/mod.rs +4 -4
  37. package/sdk-core/core/src/telemetry/log_export.rs +2 -2
  38. package/sdk-core/core/src/telemetry/metrics.rs +69 -1
  39. package/sdk-core/core/src/telemetry/otel.rs +2 -2
  40. package/sdk-core/core/src/test_help/mod.rs +3 -3
  41. package/sdk-core/core/src/worker/activities/activity_heartbeat_manager.rs +3 -3
  42. package/sdk-core/core/src/worker/activities/activity_task_poller_stream.rs +1 -1
  43. package/sdk-core/core/src/worker/activities/local_activities.rs +68 -24
  44. package/sdk-core/core/src/worker/activities.rs +26 -15
  45. package/sdk-core/core/src/worker/client/mocks.rs +10 -4
  46. package/sdk-core/core/src/worker/client.rs +17 -0
  47. package/sdk-core/core/src/worker/mod.rs +71 -13
  48. package/sdk-core/core/src/worker/slot_provider.rs +5 -7
  49. package/sdk-core/core/src/worker/tuner/fixed_size.rs +4 -3
  50. package/sdk-core/core/src/worker/tuner/resource_based.rs +171 -32
  51. package/sdk-core/core/src/worker/tuner.rs +18 -6
  52. package/sdk-core/core/src/worker/workflow/history_update.rs +43 -13
  53. package/sdk-core/core/src/worker/workflow/machines/transition_coverage.rs +6 -6
  54. package/sdk-core/core/src/worker/workflow/machines/workflow_machines.rs +6 -5
  55. package/sdk-core/core/src/worker/workflow/managed_run.rs +3 -3
  56. package/sdk-core/core/src/worker/workflow/mod.rs +13 -7
  57. package/sdk-core/core/src/worker/workflow/wft_extraction.rs +7 -7
  58. package/sdk-core/core/src/worker/workflow/wft_poller.rs +2 -2
  59. package/sdk-core/core/src/worker/workflow/workflow_stream.rs +11 -11
  60. package/sdk-core/core-api/Cargo.toml +1 -0
  61. package/sdk-core/core-api/src/worker.rs +84 -30
  62. package/sdk-core/sdk/Cargo.toml +1 -2
  63. package/sdk-core/sdk/src/lib.rs +1 -1
  64. package/sdk-core/sdk/src/workflow_context.rs +9 -8
  65. package/sdk-core/sdk/src/workflow_future.rs +19 -14
  66. package/sdk-core/sdk-core-protos/Cargo.toml +2 -0
  67. package/sdk-core/sdk-core-protos/build.rs +6 -1
  68. package/sdk-core/sdk-core-protos/protos/api_upstream/buf.yaml +1 -0
  69. package/sdk-core/sdk-core-protos/protos/api_upstream/openapi/openapiv2.json +3207 -158
  70. package/sdk-core/sdk-core-protos/protos/api_upstream/openapi/openapiv3.yaml +2934 -118
  71. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/activity/v1/message.proto +67 -0
  72. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/common/v1/message.proto +47 -1
  73. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/enums/v1/event_type.proto +6 -7
  74. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/enums/v1/failed_cause.proto +2 -0
  75. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/enums/v1/reset.proto +5 -3
  76. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/enums/v1/task_queue.proto +3 -3
  77. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/enums/v1/update.proto +14 -13
  78. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/failure/v1/message.proto +1 -3
  79. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/history/v1/message.proto +22 -0
  80. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/nexus/v1/message.proto +13 -2
  81. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/operatorservice/v1/service.proto +26 -6
  82. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/schedule/v1/message.proto +5 -0
  83. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/sdk/v1/workflow_metadata.proto +6 -0
  84. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/taskqueue/v1/message.proto +46 -12
  85. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/update/v1/message.proto +18 -19
  86. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/workflow/v1/message.proto +27 -0
  87. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/workflowservice/v1/request_response.proto +192 -19
  88. package/sdk-core/sdk-core-protos/protos/api_upstream/temporal/api/workflowservice/v1/service.proto +279 -12
  89. package/sdk-core/sdk-core-protos/protos/local/temporal/sdk/core/activity_result/activity_result.proto +1 -1
  90. package/sdk-core/sdk-core-protos/protos/local/temporal/sdk/core/activity_task/activity_task.proto +1 -1
  91. package/sdk-core/sdk-core-protos/protos/local/temporal/sdk/core/child_workflow/child_workflow.proto +1 -1
  92. package/sdk-core/sdk-core-protos/protos/local/temporal/sdk/core/common/common.proto +1 -1
  93. package/sdk-core/sdk-core-protos/protos/local/temporal/sdk/core/core_interface.proto +17 -1
  94. package/sdk-core/sdk-core-protos/protos/local/temporal/sdk/core/external_data/external_data.proto +1 -1
  95. package/sdk-core/sdk-core-protos/protos/local/temporal/sdk/core/workflow_activation/workflow_activation.proto +1 -1
  96. package/sdk-core/sdk-core-protos/protos/local/temporal/sdk/core/workflow_commands/workflow_commands.proto +1 -1
  97. package/sdk-core/sdk-core-protos/protos/local/temporal/sdk/core/workflow_completion/workflow_completion.proto +1 -1
  98. package/sdk-core/sdk-core-protos/src/lib.rs +30 -6
  99. package/sdk-core/test-utils/Cargo.toml +1 -2
  100. package/sdk-core/test-utils/src/lib.rs +2 -2
  101. package/sdk-core/tests/heavy_tests.rs +1 -1
  102. package/sdk-core/tests/integ_tests/ephemeral_server_tests.rs +2 -2
  103. package/sdk-core/tests/integ_tests/metrics_tests.rs +144 -7
  104. package/sdk-core/tests/integ_tests/queries_tests.rs +1 -1
  105. package/sdk-core/tests/integ_tests/update_tests.rs +109 -5
  106. package/sdk-core/tests/integ_tests/worker_tests.rs +44 -8
  107. package/sdk-core/tests/integ_tests/workflow_tests/local_activities.rs +1 -1
  108. package/sdk-core/tests/integ_tests/workflow_tests/resets.rs +1 -1
  109. package/sdk-core/tests/integ_tests/workflow_tests/signals.rs +1 -1
  110. package/sdk-core/tests/integ_tests/workflow_tests.rs +3 -2
  111. package/src/conversions/slot_supplier_bridge.rs +287 -0
  112. package/src/conversions.rs +23 -15
  113. package/src/helpers.rs +35 -1
  114. package/src/runtime.rs +7 -3
  115. package/src/worker.rs +1 -1
  116. package/ts/errors.ts +9 -2
  117. package/ts/index.ts +19 -4
  118. package/ts/worker-tuner.ts +123 -1
  119. package/sdk-core/sdk-core-protos/protos/api_upstream/.gitmodules +0 -3
@@ -35,23 +35,23 @@ import "temporal/api/common/v1/message.proto";
35
35
  import "temporal/api/enums/v1/update.proto";
36
36
  import "temporal/api/failure/v1/message.proto";
37
37
 
38
- // Specifies to the gRPC server how long the client wants the an update-related
39
- // RPC call to wait before returning control to the caller.
38
+ // Specifies client's intent to wait for Update results.
40
39
  message WaitPolicy {
41
-
42
- // Indicates the update lifecycle stage that the gRPC call should wait for
43
- // before returning.
40
+ // Indicates the Update lifecycle stage that the Update must reach before
41
+ // API call is returned.
42
+ // NOTE: This field works together with API call timeout which is limited by
43
+ // server timeout (maximum wait time). If server timeout is expired before
44
+ // user specified timeout, API call returns even if specified stage is not reached.
44
45
  temporal.api.enums.v1.UpdateWorkflowExecutionLifecycleStage lifecycle_stage = 1;
45
46
  }
46
47
 
47
- // The data needed by a client to refer to a previously invoked workflow
48
- // execution update process.
48
+ // The data needed by a client to refer to a previously invoked Workflow Update.
49
49
  message UpdateRef {
50
50
  temporal.api.common.v1.WorkflowExecution workflow_execution = 1;
51
51
  string update_id = 2;
52
52
  }
53
53
 
54
- // The outcome of a workflow update - success or failure.
54
+ // The outcome of a Workflow Update: success or failure.
55
55
  message Outcome {
56
56
  oneof value {
57
57
  temporal.api.common.v1.Payloads success = 1;
@@ -59,35 +59,34 @@ message Outcome {
59
59
  }
60
60
  }
61
61
 
62
- // Metadata about a workflow execution update.
62
+ // Metadata about a Workflow Update.
63
63
  message Meta {
64
- // An ID with workflow-scoped uniqueness for this update
64
+ // An ID with workflow-scoped uniqueness for this Update.
65
65
  string update_id = 1;
66
66
 
67
- // A string identifying the agent that requested this update.
67
+ // A string identifying the agent that requested this Update.
68
68
  string identity = 2;
69
69
  }
70
70
 
71
71
  message Input {
72
- // Headers that are passed with the update from the requesting entity.
72
+ // Headers that are passed with the Update from the requesting entity.
73
73
  // These can include things like auth or tracing tokens.
74
74
  temporal.api.common.v1.Header header = 1;
75
75
 
76
- // The name of the input handler to invoke on the target workflow
76
+ // The name of the Update handler to invoke on the target Workflow.
77
77
  string name = 2;
78
78
 
79
- // The arguments to pass to the named handler.
79
+ // The arguments to pass to the named Update handler.
80
80
  temporal.api.common.v1.Payloads args = 3;
81
81
  }
82
82
 
83
- // The client request that triggers a workflow execution update
83
+ // The client request that triggers a Workflow Update.
84
84
  message Request {
85
85
  Meta meta = 1;
86
86
  Input input = 2;
87
87
  }
88
88
 
89
- // An update protocol message indicating that a workflow execution update has
90
- // been rejected.
89
+ // An Update protocol message indicating that a Workflow Update has been rejected.
91
90
  message Rejection {
92
91
  string rejected_request_message_id = 1;
93
92
  int64 rejected_request_sequencing_event_id = 2;
@@ -95,7 +94,7 @@ message Rejection {
95
94
  temporal.api.failure.v1.Failure failure = 4;
96
95
  }
97
96
 
98
- // An update protocol message indicating that a workflow execution update has
97
+ // An Update protocol message indicating that a Workflow Update has
99
98
  // been accepted (i.e. passed the worker-side validation phase).
100
99
  message Acceptance {
101
100
  string accepted_request_message_id = 1;
@@ -103,7 +102,7 @@ message Acceptance {
103
102
  Request accepted_request = 3;
104
103
  }
105
104
 
106
- // An update protocol message indicating that a workflow execution update has
105
+ // An Update protocol message indicating that a Workflow Update has
107
106
  // completed with the contained outcome.
108
107
  message Response {
109
108
  Meta meta = 1;
@@ -91,6 +91,13 @@ message WorkflowExecutionInfo {
91
91
  // Build ID inherited from a previous/parent execution. If present, assigned_build_id will be set to this, instead
92
92
  // of using the assignment rules.
93
93
  string inherited_build_id = 20;
94
+ // The first run ID in the execution chain.
95
+ // Executions created via the following operations are considered to be in the same chain
96
+ // - ContinueAsNew
97
+ // - Workflow Retry
98
+ // - Workflow Reset
99
+ // - Cron Schedule
100
+ string first_run_id = 21;
94
101
  }
95
102
 
96
103
  message WorkflowExecutionConfig {
@@ -129,6 +136,22 @@ message PendingActivityInfo {
129
136
  }
130
137
  // The version stamp of the worker to whom this activity was most recently dispatched
131
138
  temporal.api.common.v1.WorkerVersionStamp last_worker_version_stamp = 15;
139
+
140
+ // The time activity will wait until the next retry.
141
+ // If activity is currently running it will be next retry interval if activity failed.
142
+ // If activity is currently waiting it will be current retry interval.
143
+ // If there will be no retry it will be null.
144
+ google.protobuf.Duration current_retry_interval = 16;
145
+
146
+ // The time when the last activity attempt was completed. If activity has not been completed yet then it will be null.
147
+ google.protobuf.Timestamp last_attempt_complete_time = 17;
148
+
149
+ // Next time when activity will be scheduled.
150
+ // If activity is currently scheduled or started it will be null.
151
+ google.protobuf.Timestamp next_attempt_schedule_time = 18;
152
+
153
+ // Indicates if activity is paused.
154
+ bool paused = 19;
132
155
  }
133
156
 
134
157
  message PendingChildExecutionInfo {
@@ -273,6 +296,10 @@ message PendingNexusOperationInfo {
273
296
  google.protobuf.Timestamp next_attempt_schedule_time = 11;
274
297
 
275
298
  NexusOperationCancellationInfo cancellation_info = 12;
299
+
300
+ // The event ID of the NexusOperationScheduled event. Can be used to correlate an operation in the
301
+ // DescribeWorkflowExecution response with workflow history.
302
+ int64 scheduled_event_id = 13;
276
303
  }
277
304
 
278
305
  // NexusOperationCancellationInfo contains the state of a nexus operation cancellation.
@@ -32,14 +32,15 @@ option ruby_package = "Temporalio::Api::WorkflowService::V1";
32
32
  option csharp_namespace = "Temporalio.Api.WorkflowService.V1";
33
33
 
34
34
  import "temporal/api/enums/v1/batch_operation.proto";
35
+ import "temporal/api/enums/v1/common.proto";
35
36
  import "temporal/api/enums/v1/workflow.proto";
36
37
  import "temporal/api/enums/v1/namespace.proto";
37
38
  import "temporal/api/enums/v1/failed_cause.proto";
38
- 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
42
  import "temporal/api/enums/v1/update.proto";
43
+ import "temporal/api/activity/v1/message.proto";
43
44
  import "temporal/api/common/v1/message.proto";
44
45
  import "temporal/api/history/v1/message.proto";
45
46
  import "temporal/api/workflow/v1/message.proto";
@@ -60,6 +61,7 @@ import "temporal/api/sdk/v1/user_metadata.proto";
60
61
  import "temporal/api/nexus/v1/message.proto";
61
62
 
62
63
  import "google/protobuf/duration.proto";
64
+ import "google/protobuf/field_mask.proto";
63
65
  import "google/protobuf/timestamp.proto";
64
66
 
65
67
  message RegisterNamespaceRequest {
@@ -197,6 +199,8 @@ message StartWorkflowExecutionRequest {
197
199
  // for use by user interfaces to display the fixed as-of-start summary and details of the
198
200
  // workflow.
199
201
  temporal.api.sdk.v1.UserMetadata user_metadata = 23;
202
+ // Links to be associated with the workflow.
203
+ repeated temporal.api.common.v1.Link links = 24;
200
204
  }
201
205
 
202
206
  message StartWorkflowExecutionResponse {
@@ -350,14 +354,28 @@ message RespondWorkflowTaskCompletedRequest {
350
354
  temporal.api.sdk.v1.WorkflowTaskCompletedMetadata sdk_metadata = 12;
351
355
  // Local usage data collected for metering
352
356
  temporal.api.common.v1.MeteringMetadata metering_metadata = 13;
357
+ // All capabilities the SDK supports.
358
+ Capabilities capabilities = 14;
359
+ // SDK capability details.
360
+ message Capabilities {
361
+ // True if the SDK can handle speculative workflow task with command events.
362
+ // If true, the server may chosse, at its discretion, to discard a speculative workflow task
363
+ // even if that speculative task included command events the SDK had not previouly processed
364
+ //
365
+ // (-- api-linter: core::0140::prepositions=disabled
366
+ // aip.dev/not-precedent: "with" used to describe the workflow task. --)
367
+ bool discard_speculative_workflow_task_with_events = 1;
368
+ }
353
369
  }
354
370
 
355
371
  message RespondWorkflowTaskCompletedResponse {
356
372
  // See `RespondWorkflowTaskCompletedResponse::return_new_workflow_task`
357
373
  PollWorkflowTaskQueueResponse workflow_task = 1;
358
- // See `ScheduleActivityTaskCommandAttributes::request_start`
374
+ // See `ScheduleActivityTaskCommandAttributes::request_eager_execution`
359
375
  repeated PollActivityTaskQueueResponse activity_tasks = 2;
360
-
376
+ // If non zero, indicates the server has discarded the workflow task that was being responded to.
377
+ // Will be the event ID of the last workflow task started event in the history before the new workflow task.
378
+ // Server is only expected to discard a workflow task if it could not have modified the workflow state.
361
379
  int64 reset_history_event_id = 3;
362
380
  }
363
381
 
@@ -459,6 +477,9 @@ message RecordActivityTaskHeartbeatResponse {
459
477
  // Will be set to true if the activity has been asked to cancel itself. The SDK should then
460
478
  // notify the activity of cancellation if it is still running.
461
479
  bool cancel_requested = 1;
480
+
481
+ // Will be set to true if the activity is paused.
482
+ bool activity_paused = 2;
462
483
  }
463
484
 
464
485
  message RecordActivityTaskHeartbeatByIdRequest {
@@ -610,6 +631,8 @@ message RequestCancelWorkflowExecutionRequest {
610
631
  string first_execution_run_id = 5;
611
632
  // Reason for requesting the cancellation
612
633
  string reason = 6;
634
+ // Links to be associated with the WorkflowExecutionCanceled event.
635
+ repeated temporal.api.common.v1.Link links = 7;
613
636
  }
614
637
 
615
638
  message RequestCancelWorkflowExecutionResponse {
@@ -633,6 +656,9 @@ message SignalWorkflowExecutionRequest {
633
656
  temporal.api.common.v1.Header header = 8;
634
657
  // Indicates that a new workflow task should not be generated when this signal is received.
635
658
  bool skip_generate_workflow_task = 9;
659
+
660
+ // Links to be associated with the WorkflowExecutionSignaled event.
661
+ repeated temporal.api.common.v1.Link links = 10;
636
662
  }
637
663
 
638
664
  message SignalWorkflowExecutionResponse {
@@ -693,6 +719,9 @@ message SignalWithStartWorkflowExecutionRequest {
693
719
  // for use by user interfaces to display the fixed as-of-start summary and details of the
694
720
  // workflow.
695
721
  temporal.api.sdk.v1.UserMetadata user_metadata = 23;
722
+
723
+ // Links to be associated with the WorkflowExecutionStarted and WorkflowExecutionSignaled events.
724
+ repeated temporal.api.common.v1.Link links = 24;
696
725
  }
697
726
 
698
727
  message SignalWithStartWorkflowExecutionResponse {
@@ -734,6 +763,9 @@ message TerminateWorkflowExecutionRequest {
734
763
  // `workflow_execution`), or specified (if it is) workflow execution is not part of the same
735
764
  // execution chain as this id.
736
765
  string first_execution_run_id = 6;
766
+
767
+ // Links to be associated with the WorkflowExecutionTerminated event.
768
+ repeated temporal.api.common.v1.Link links = 7;
737
769
  }
738
770
 
739
771
  message TerminateWorkflowExecutionResponse {
@@ -867,6 +899,16 @@ message ResetStickyTaskQueueRequest {
867
899
  message ResetStickyTaskQueueResponse {
868
900
  }
869
901
 
902
+ message ShutdownWorkerRequest {
903
+ string namespace = 1;
904
+ string sticky_task_queue = 2;
905
+ string identity = 3;
906
+ string reason = 4;
907
+ }
908
+
909
+ message ShutdownWorkerResponse {
910
+ }
911
+
870
912
  message QueryWorkflowRequest {
871
913
  string namespace = 1;
872
914
  temporal.api.common.v1.WorkflowExecution execution = 2;
@@ -1006,6 +1048,10 @@ message GetSystemInfoResponse {
1006
1048
  // True if the server supports count group by execution status
1007
1049
  // (-- api-linter: core::0140::prepositions=disabled --)
1008
1050
  bool count_group_by_execution_status = 10;
1051
+
1052
+ // True if the server supports Nexus operations.
1053
+ // This flag is dependent both on server version and for Nexus to be enabled via server configuration.
1054
+ bool nexus = 11;
1009
1055
  }
1010
1056
  }
1011
1057
 
@@ -1395,23 +1441,26 @@ message GetWorkerTaskReachabilityResponse {
1395
1441
  // (-- api-linter: core::0134=disabled
1396
1442
  // aip.dev/not-precedent: Update RPCs don't follow Google API format. --)
1397
1443
  message UpdateWorkflowExecutionRequest {
1398
- // The namespace name of the target workflow
1444
+ // The namespace name of the target Workflow.
1399
1445
  string namespace = 1;
1400
- // The target workflow id and (optionally) a specific run thereof
1446
+ // The target Workflow Id and (optionally) a specific Run Id thereof.
1401
1447
  // (-- api-linter: core::0203::optional=disabled
1402
1448
  // aip.dev/not-precedent: false positive triggered by the word "optional" --)
1403
1449
  temporal.api.common.v1.WorkflowExecution workflow_execution = 2;
1404
- // If set, this call will error if the most recent (if no run id is set on
1405
- // `workflow_execution`), or specified (if it is) workflow execution is not
1406
- // part of the same execution chain as this id.
1450
+ // If set, this call will error if the most recent (if no Run Id is set on
1451
+ // `workflow_execution`), or specified (if it is) Workflow Execution is not
1452
+ // part of the same execution chain as this Id.
1407
1453
  string first_execution_run_id = 3;
1408
1454
 
1409
- // Describes when this request should return - basically whether the
1410
- // update is synchronous, asynchronous, or somewhere in between.
1455
+ // Specifies client's intent to wait for Update results.
1456
+ // NOTE: This field works together with API call timeout which is limited by
1457
+ // server timeout (maximum wait time). If server timeout is expired before
1458
+ // user specified timeout, API call returns even if specified stage is not reached.
1459
+ // Actual reached stage will be included in the response.
1411
1460
  temporal.api.update.v1.WaitPolicy wait_policy = 4;
1412
1461
 
1413
1462
  // The request information that will be delivered all the way down to the
1414
- // workflow execution.
1463
+ // Workflow Execution.
1415
1464
  temporal.api.update.v1.Request request = 5;
1416
1465
  }
1417
1466
 
@@ -1419,8 +1468,8 @@ message UpdateWorkflowExecutionResponse {
1419
1468
  // Enough information for subsequent poll calls if needed. Never null.
1420
1469
  temporal.api.update.v1.UpdateRef update_ref = 1;
1421
1470
 
1422
- // The outcome of the update if and only if the workflow execution update
1423
- // has completed. If this response is being returned before the update has
1471
+ // The outcome of the Update if and only if the Workflow Update
1472
+ // has completed. If this response is being returned before the Update has
1424
1473
  // completed then this field will not be set.
1425
1474
  temporal.api.update.v1.Outcome outcome = 2;
1426
1475
 
@@ -1530,15 +1579,14 @@ message ListBatchOperationsResponse {
1530
1579
  }
1531
1580
 
1532
1581
  message PollWorkflowExecutionUpdateRequest {
1533
- // The namespace of the workflow execution to which the update was
1582
+ // The namespace of the Workflow Execution to which the Update was
1534
1583
  // originally issued.
1535
1584
  string namespace = 1;
1536
- // The update reference returned in the initial
1537
- // UpdateWorkflowExecutionResponse
1585
+ // The Update reference returned in the initial UpdateWorkflowExecutionResponse.
1538
1586
  temporal.api.update.v1.UpdateRef update_ref = 2;
1539
- // The identity of the worker/client who is polling this update outcome
1587
+ // The identity of the worker/client who is polling this Update outcome.
1540
1588
  string identity = 3;
1541
- // Describes when this poll request should return a response.
1589
+ // Specifies client's intent to wait for Update results.
1542
1590
  // Omit to request a non-blocking poll.
1543
1591
  temporal.api.update.v1.WaitPolicy wait_policy = 4;
1544
1592
  }
@@ -1561,7 +1609,7 @@ message PollWorkflowExecutionUpdateResponse {
1561
1609
  // request WaitPolicy, and before the context deadline expired; clients may
1562
1610
  // may then retry the call as needed.
1563
1611
  temporal.api.enums.v1.UpdateWorkflowExecutionLifecycleStage stage = 2;
1564
- // Sufficient information to address this update.
1612
+ // Sufficient information to address this Update.
1565
1613
  temporal.api.update.v1.UpdateRef update_ref = 3;
1566
1614
  }
1567
1615
 
@@ -1626,8 +1674,12 @@ message ExecuteMultiOperationRequest {
1626
1674
  // Additional restrictions:
1627
1675
  // - setting `cron_schedule` is invalid
1628
1676
  // - setting `request_eager_execution` is invalid
1677
+ // - setting `workflow_start_delay` is invalid
1629
1678
  StartWorkflowExecutionRequest start_workflow = 1;
1630
1679
 
1680
+ // Additional restrictions:
1681
+ // - setting `first_execution_run_id` is invalid
1682
+ // - setting `workflow_execution.run_id` is invalid
1631
1683
  UpdateWorkflowExecutionRequest update_workflow = 2;
1632
1684
  }
1633
1685
  }
@@ -1643,3 +1695,124 @@ message ExecuteMultiOperationResponse {
1643
1695
  }
1644
1696
  }
1645
1697
  }
1698
+
1699
+ message UpdateActivityOptionsByIdRequest {
1700
+ // Namespace of the workflow which scheduled this activity
1701
+ string namespace = 1;
1702
+ // ID of the workflow which scheduled this activity
1703
+ string workflow_id = 2;
1704
+ // Run ID of the workflow which scheduled this activity
1705
+ // if empty - latest workflow is used
1706
+ string run_id = 3;
1707
+ // ID of the activity we're updating
1708
+ string activity_id = 4;
1709
+
1710
+ // The identity of the client who initiated this request
1711
+ string identity = 5;
1712
+
1713
+ // Activity options. Partial updates are accepted and controlled by update_mask
1714
+ temporal.api.activity.v1.ActivityOptions activity_options = 6;
1715
+
1716
+ // Controls which fields from `activity_options` will be applied
1717
+ google.protobuf.FieldMask update_mask = 7;
1718
+
1719
+ // Used to de-dupe requests
1720
+ string request_id = 8;
1721
+ }
1722
+
1723
+ message UpdateActivityOptionsByIdResponse {
1724
+ // Activity options after an update
1725
+ temporal.api.activity.v1.ActivityOptions activity_options = 1;
1726
+ }
1727
+
1728
+ message PauseActivityByIdRequest {
1729
+ // Namespace of the workflow which scheduled this activity.
1730
+ string namespace = 1;
1731
+ // ID of the workflow which scheduled this activity.
1732
+ string workflow_id = 2;
1733
+ // Run ID of the workflow which scheduled this activity.
1734
+ // If empty - latest workflow is used.
1735
+ string run_id = 3;
1736
+ // ID of the activity we're updating.
1737
+ string activity_id = 4;
1738
+
1739
+ // The identity of the client who initiated this request.
1740
+ string identity = 5;
1741
+
1742
+ // Used to de-dupe requests.
1743
+ string request_id = 6;
1744
+ }
1745
+
1746
+ message PauseActivityByIdResponse {
1747
+ }
1748
+
1749
+ message UnpauseActivityByIdRequest {
1750
+ message ResumeOperation {
1751
+ // Indicates that if the activity is waiting to retry, it will be scheduled immediately.
1752
+ bool no_wait = 1;
1753
+ }
1754
+
1755
+ message ResetOperation {
1756
+ // Indicates that the activity should be scheduled immediately.
1757
+ // Note that this may run simultaneously with any existing executions of the activity.
1758
+ bool no_wait = 1;
1759
+ // If set, the Heartbeat Details will be cleared out to make the Activity start over from the beginning
1760
+ bool reset_heartbeat = 2;
1761
+ }
1762
+
1763
+ // Namespace of the workflow which scheduled this activity.
1764
+ string namespace = 1;
1765
+ // ID of the workflow which scheduled this activity.
1766
+ string workflow_id = 2;
1767
+ // Run ID of the workflow which scheduled this activity.
1768
+ // If empty - latest workflow is used.
1769
+ string run_id = 3;
1770
+ // ID of the activity we're updating.
1771
+ string activity_id = 4;
1772
+
1773
+ // The identity of the client who initiated this request.
1774
+ string identity = 5;
1775
+
1776
+ // Used to de-dupe requests.
1777
+ string request_id = 6;
1778
+
1779
+ // There are two options to resume the activity - with 'resume' or with 'reset'.
1780
+ oneof operation{
1781
+ ResumeOperation resume = 7;
1782
+ ResetOperation reset = 8;
1783
+ }
1784
+ }
1785
+
1786
+ message UnpauseActivityByIdResponse {
1787
+ }
1788
+
1789
+ message ResetActivityByIdRequest {
1790
+ // Namespace of the workflow which scheduled this activity.
1791
+ string namespace = 1;
1792
+ // ID of the workflow which scheduled this activity.
1793
+ string workflow_id = 2;
1794
+ // Run ID of the workflow which scheduled this activity.
1795
+ // If empty - latest workflow is used.
1796
+ string run_id = 3;
1797
+ // ID of the activity we're updating.
1798
+ string activity_id = 4;
1799
+
1800
+ // The identity of the client who initiated this request.
1801
+ string identity = 5;
1802
+
1803
+ // Used to de-dupe requests.
1804
+ string request_id = 6;
1805
+
1806
+ // Indicates that activity should be scheduled immediately.
1807
+ // If this flag doesn't set, and activity currently running - temporal will wait until activity is completed.
1808
+ bool no_wait = 7;
1809
+
1810
+ // Indicates that activity should reset heartbeat details.
1811
+ // This flag will be applied only to the new instance of the activity.
1812
+ bool reset_heartbeat = 8;
1813
+ }
1814
+
1815
+ message ResetActivityByIdResponse {
1816
+ }
1817
+
1818
+