temporalio 0.0.0 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (327) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +301 -0
  3. data/bridge/Cargo.lock +2888 -0
  4. data/bridge/Cargo.toml +27 -0
  5. data/bridge/sdk-core/ARCHITECTURE.md +76 -0
  6. data/bridge/sdk-core/Cargo.lock +2606 -0
  7. data/bridge/sdk-core/Cargo.toml +2 -0
  8. data/bridge/sdk-core/LICENSE.txt +23 -0
  9. data/bridge/sdk-core/README.md +104 -0
  10. data/bridge/sdk-core/arch_docs/diagrams/README.md +10 -0
  11. data/bridge/sdk-core/arch_docs/diagrams/sticky_queues.puml +40 -0
  12. data/bridge/sdk-core/arch_docs/diagrams/workflow_internals.svg +1 -0
  13. data/bridge/sdk-core/arch_docs/sticky_queues.md +51 -0
  14. data/bridge/sdk-core/client/Cargo.toml +40 -0
  15. data/bridge/sdk-core/client/LICENSE.txt +23 -0
  16. data/bridge/sdk-core/client/src/lib.rs +1286 -0
  17. data/bridge/sdk-core/client/src/metrics.rs +165 -0
  18. data/bridge/sdk-core/client/src/raw.rs +932 -0
  19. data/bridge/sdk-core/client/src/retry.rs +751 -0
  20. data/bridge/sdk-core/client/src/workflow_handle/mod.rs +185 -0
  21. data/bridge/sdk-core/core/Cargo.toml +116 -0
  22. data/bridge/sdk-core/core/LICENSE.txt +23 -0
  23. data/bridge/sdk-core/core/benches/workflow_replay.rs +76 -0
  24. data/bridge/sdk-core/core/src/abstractions.rs +166 -0
  25. data/bridge/sdk-core/core/src/core_tests/activity_tasks.rs +1014 -0
  26. data/bridge/sdk-core/core/src/core_tests/child_workflows.rs +221 -0
  27. data/bridge/sdk-core/core/src/core_tests/determinism.rs +107 -0
  28. data/bridge/sdk-core/core/src/core_tests/local_activities.rs +925 -0
  29. data/bridge/sdk-core/core/src/core_tests/mod.rs +100 -0
  30. data/bridge/sdk-core/core/src/core_tests/queries.rs +894 -0
  31. data/bridge/sdk-core/core/src/core_tests/replay_flag.rs +65 -0
  32. data/bridge/sdk-core/core/src/core_tests/workers.rs +259 -0
  33. data/bridge/sdk-core/core/src/core_tests/workflow_cancels.rs +124 -0
  34. data/bridge/sdk-core/core/src/core_tests/workflow_tasks.rs +2090 -0
  35. data/bridge/sdk-core/core/src/ephemeral_server/mod.rs +515 -0
  36. data/bridge/sdk-core/core/src/lib.rs +282 -0
  37. data/bridge/sdk-core/core/src/pollers/mod.rs +54 -0
  38. data/bridge/sdk-core/core/src/pollers/poll_buffer.rs +297 -0
  39. data/bridge/sdk-core/core/src/protosext/mod.rs +428 -0
  40. data/bridge/sdk-core/core/src/replay/mod.rs +215 -0
  41. data/bridge/sdk-core/core/src/retry_logic.rs +202 -0
  42. data/bridge/sdk-core/core/src/telemetry/log_export.rs +190 -0
  43. data/bridge/sdk-core/core/src/telemetry/metrics.rs +428 -0
  44. data/bridge/sdk-core/core/src/telemetry/mod.rs +407 -0
  45. data/bridge/sdk-core/core/src/telemetry/prometheus_server.rs +78 -0
  46. data/bridge/sdk-core/core/src/test_help/mod.rs +889 -0
  47. data/bridge/sdk-core/core/src/worker/activities/activity_heartbeat_manager.rs +580 -0
  48. data/bridge/sdk-core/core/src/worker/activities/local_activities.rs +1048 -0
  49. data/bridge/sdk-core/core/src/worker/activities.rs +481 -0
  50. data/bridge/sdk-core/core/src/worker/client/mocks.rs +87 -0
  51. data/bridge/sdk-core/core/src/worker/client.rs +373 -0
  52. data/bridge/sdk-core/core/src/worker/mod.rs +570 -0
  53. data/bridge/sdk-core/core/src/worker/workflow/bridge.rs +37 -0
  54. data/bridge/sdk-core/core/src/worker/workflow/driven_workflow.rs +101 -0
  55. data/bridge/sdk-core/core/src/worker/workflow/history_update.rs +532 -0
  56. data/bridge/sdk-core/core/src/worker/workflow/machines/activity_state_machine.rs +907 -0
  57. data/bridge/sdk-core/core/src/worker/workflow/machines/cancel_external_state_machine.rs +294 -0
  58. data/bridge/sdk-core/core/src/worker/workflow/machines/cancel_workflow_state_machine.rs +167 -0
  59. data/bridge/sdk-core/core/src/worker/workflow/machines/child_workflow_state_machine.rs +858 -0
  60. data/bridge/sdk-core/core/src/worker/workflow/machines/complete_workflow_state_machine.rs +136 -0
  61. data/bridge/sdk-core/core/src/worker/workflow/machines/continue_as_new_workflow_state_machine.rs +157 -0
  62. data/bridge/sdk-core/core/src/worker/workflow/machines/fail_workflow_state_machine.rs +129 -0
  63. data/bridge/sdk-core/core/src/worker/workflow/machines/local_activity_state_machine.rs +1450 -0
  64. data/bridge/sdk-core/core/src/worker/workflow/machines/mod.rs +316 -0
  65. data/bridge/sdk-core/core/src/worker/workflow/machines/modify_workflow_properties_state_machine.rs +178 -0
  66. data/bridge/sdk-core/core/src/worker/workflow/machines/patch_state_machine.rs +708 -0
  67. data/bridge/sdk-core/core/src/worker/workflow/machines/signal_external_state_machine.rs +439 -0
  68. data/bridge/sdk-core/core/src/worker/workflow/machines/timer_state_machine.rs +435 -0
  69. data/bridge/sdk-core/core/src/worker/workflow/machines/transition_coverage.rs +175 -0
  70. data/bridge/sdk-core/core/src/worker/workflow/machines/upsert_search_attributes_state_machine.rs +242 -0
  71. data/bridge/sdk-core/core/src/worker/workflow/machines/workflow_machines/local_acts.rs +96 -0
  72. data/bridge/sdk-core/core/src/worker/workflow/machines/workflow_machines.rs +1200 -0
  73. data/bridge/sdk-core/core/src/worker/workflow/machines/workflow_task_state_machine.rs +272 -0
  74. data/bridge/sdk-core/core/src/worker/workflow/managed_run/managed_wf_test.rs +198 -0
  75. data/bridge/sdk-core/core/src/worker/workflow/managed_run.rs +655 -0
  76. data/bridge/sdk-core/core/src/worker/workflow/mod.rs +1200 -0
  77. data/bridge/sdk-core/core/src/worker/workflow/run_cache.rs +145 -0
  78. data/bridge/sdk-core/core/src/worker/workflow/wft_poller.rs +88 -0
  79. data/bridge/sdk-core/core/src/worker/workflow/workflow_stream.rs +985 -0
  80. data/bridge/sdk-core/core-api/Cargo.toml +32 -0
  81. data/bridge/sdk-core/core-api/LICENSE.txt +23 -0
  82. data/bridge/sdk-core/core-api/src/errors.rs +95 -0
  83. data/bridge/sdk-core/core-api/src/lib.rs +109 -0
  84. data/bridge/sdk-core/core-api/src/telemetry.rs +147 -0
  85. data/bridge/sdk-core/core-api/src/worker.rs +148 -0
  86. data/bridge/sdk-core/etc/deps.svg +162 -0
  87. data/bridge/sdk-core/etc/dynamic-config.yaml +2 -0
  88. data/bridge/sdk-core/etc/otel-collector-config.yaml +36 -0
  89. data/bridge/sdk-core/etc/prometheus.yaml +6 -0
  90. data/bridge/sdk-core/etc/regen-depgraph.sh +5 -0
  91. data/bridge/sdk-core/fsm/Cargo.toml +18 -0
  92. data/bridge/sdk-core/fsm/LICENSE.txt +23 -0
  93. data/bridge/sdk-core/fsm/README.md +3 -0
  94. data/bridge/sdk-core/fsm/rustfsm_procmacro/Cargo.toml +27 -0
  95. data/bridge/sdk-core/fsm/rustfsm_procmacro/LICENSE.txt +23 -0
  96. data/bridge/sdk-core/fsm/rustfsm_procmacro/src/lib.rs +647 -0
  97. data/bridge/sdk-core/fsm/rustfsm_procmacro/tests/progress.rs +8 -0
  98. data/bridge/sdk-core/fsm/rustfsm_procmacro/tests/trybuild/dupe_transitions_fail.rs +18 -0
  99. data/bridge/sdk-core/fsm/rustfsm_procmacro/tests/trybuild/dupe_transitions_fail.stderr +12 -0
  100. data/bridge/sdk-core/fsm/rustfsm_procmacro/tests/trybuild/dynamic_dest_pass.rs +41 -0
  101. data/bridge/sdk-core/fsm/rustfsm_procmacro/tests/trybuild/forgot_name_fail.rs +14 -0
  102. data/bridge/sdk-core/fsm/rustfsm_procmacro/tests/trybuild/forgot_name_fail.stderr +11 -0
  103. data/bridge/sdk-core/fsm/rustfsm_procmacro/tests/trybuild/handler_arg_pass.rs +32 -0
  104. data/bridge/sdk-core/fsm/rustfsm_procmacro/tests/trybuild/handler_pass.rs +31 -0
  105. data/bridge/sdk-core/fsm/rustfsm_procmacro/tests/trybuild/medium_complex_pass.rs +46 -0
  106. data/bridge/sdk-core/fsm/rustfsm_procmacro/tests/trybuild/no_handle_conversions_require_into_fail.rs +29 -0
  107. data/bridge/sdk-core/fsm/rustfsm_procmacro/tests/trybuild/no_handle_conversions_require_into_fail.stderr +12 -0
  108. data/bridge/sdk-core/fsm/rustfsm_procmacro/tests/trybuild/simple_pass.rs +32 -0
  109. data/bridge/sdk-core/fsm/rustfsm_procmacro/tests/trybuild/struct_event_variant_fail.rs +18 -0
  110. data/bridge/sdk-core/fsm/rustfsm_procmacro/tests/trybuild/struct_event_variant_fail.stderr +5 -0
  111. data/bridge/sdk-core/fsm/rustfsm_procmacro/tests/trybuild/tuple_more_item_event_variant_fail.rs +11 -0
  112. data/bridge/sdk-core/fsm/rustfsm_procmacro/tests/trybuild/tuple_more_item_event_variant_fail.stderr +5 -0
  113. data/bridge/sdk-core/fsm/rustfsm_procmacro/tests/trybuild/tuple_zero_item_event_variant_fail.rs +11 -0
  114. data/bridge/sdk-core/fsm/rustfsm_procmacro/tests/trybuild/tuple_zero_item_event_variant_fail.stderr +5 -0
  115. data/bridge/sdk-core/fsm/rustfsm_trait/Cargo.toml +14 -0
  116. data/bridge/sdk-core/fsm/rustfsm_trait/LICENSE.txt +23 -0
  117. data/bridge/sdk-core/fsm/rustfsm_trait/src/lib.rs +249 -0
  118. data/bridge/sdk-core/fsm/src/lib.rs +2 -0
  119. data/bridge/sdk-core/histories/evict_while_la_running_no_interference-23_history.bin +0 -0
  120. data/bridge/sdk-core/histories/evict_while_la_running_no_interference-85_history.bin +0 -0
  121. data/bridge/sdk-core/histories/fail_wf_task.bin +0 -0
  122. data/bridge/sdk-core/histories/timer_workflow_history.bin +0 -0
  123. data/bridge/sdk-core/integ-with-otel.sh +7 -0
  124. data/bridge/sdk-core/protos/api_upstream/README.md +9 -0
  125. data/bridge/sdk-core/protos/api_upstream/api-linter.yaml +40 -0
  126. data/bridge/sdk-core/protos/api_upstream/buf.yaml +9 -0
  127. data/bridge/sdk-core/protos/api_upstream/build/go.mod +7 -0
  128. data/bridge/sdk-core/protos/api_upstream/build/go.sum +5 -0
  129. data/bridge/sdk-core/protos/api_upstream/build/tools.go +29 -0
  130. data/bridge/sdk-core/protos/api_upstream/dependencies/gogoproto/gogo.proto +141 -0
  131. data/bridge/sdk-core/protos/api_upstream/go.mod +6 -0
  132. data/bridge/sdk-core/protos/api_upstream/temporal/api/batch/v1/message.proto +89 -0
  133. data/bridge/sdk-core/protos/api_upstream/temporal/api/command/v1/message.proto +260 -0
  134. data/bridge/sdk-core/protos/api_upstream/temporal/api/common/v1/message.proto +112 -0
  135. data/bridge/sdk-core/protos/api_upstream/temporal/api/enums/v1/batch_operation.proto +47 -0
  136. data/bridge/sdk-core/protos/api_upstream/temporal/api/enums/v1/command_type.proto +57 -0
  137. data/bridge/sdk-core/protos/api_upstream/temporal/api/enums/v1/common.proto +56 -0
  138. data/bridge/sdk-core/protos/api_upstream/temporal/api/enums/v1/event_type.proto +170 -0
  139. data/bridge/sdk-core/protos/api_upstream/temporal/api/enums/v1/failed_cause.proto +118 -0
  140. data/bridge/sdk-core/protos/api_upstream/temporal/api/enums/v1/interaction_type.proto +39 -0
  141. data/bridge/sdk-core/protos/api_upstream/temporal/api/enums/v1/namespace.proto +51 -0
  142. data/bridge/sdk-core/protos/api_upstream/temporal/api/enums/v1/query.proto +50 -0
  143. data/bridge/sdk-core/protos/api_upstream/temporal/api/enums/v1/reset.proto +41 -0
  144. data/bridge/sdk-core/protos/api_upstream/temporal/api/enums/v1/schedule.proto +60 -0
  145. data/bridge/sdk-core/protos/api_upstream/temporal/api/enums/v1/task_queue.proto +59 -0
  146. data/bridge/sdk-core/protos/api_upstream/temporal/api/enums/v1/update.proto +40 -0
  147. data/bridge/sdk-core/protos/api_upstream/temporal/api/enums/v1/workflow.proto +122 -0
  148. data/bridge/sdk-core/protos/api_upstream/temporal/api/errordetails/v1/message.proto +108 -0
  149. data/bridge/sdk-core/protos/api_upstream/temporal/api/failure/v1/message.proto +114 -0
  150. data/bridge/sdk-core/protos/api_upstream/temporal/api/filter/v1/message.proto +56 -0
  151. data/bridge/sdk-core/protos/api_upstream/temporal/api/history/v1/message.proto +758 -0
  152. data/bridge/sdk-core/protos/api_upstream/temporal/api/interaction/v1/message.proto +87 -0
  153. data/bridge/sdk-core/protos/api_upstream/temporal/api/namespace/v1/message.proto +97 -0
  154. data/bridge/sdk-core/protos/api_upstream/temporal/api/operatorservice/v1/request_response.proto +121 -0
  155. data/bridge/sdk-core/protos/api_upstream/temporal/api/operatorservice/v1/service.proto +80 -0
  156. data/bridge/sdk-core/protos/api_upstream/temporal/api/query/v1/message.proto +61 -0
  157. data/bridge/sdk-core/protos/api_upstream/temporal/api/replication/v1/message.proto +55 -0
  158. data/bridge/sdk-core/protos/api_upstream/temporal/api/schedule/v1/message.proto +379 -0
  159. data/bridge/sdk-core/protos/api_upstream/temporal/api/taskqueue/v1/message.proto +108 -0
  160. data/bridge/sdk-core/protos/api_upstream/temporal/api/version/v1/message.proto +59 -0
  161. data/bridge/sdk-core/protos/api_upstream/temporal/api/workflow/v1/message.proto +146 -0
  162. data/bridge/sdk-core/protos/api_upstream/temporal/api/workflowservice/v1/request_response.proto +1168 -0
  163. data/bridge/sdk-core/protos/api_upstream/temporal/api/workflowservice/v1/service.proto +415 -0
  164. data/bridge/sdk-core/protos/grpc/health/v1/health.proto +63 -0
  165. data/bridge/sdk-core/protos/local/temporal/sdk/core/activity_result/activity_result.proto +78 -0
  166. data/bridge/sdk-core/protos/local/temporal/sdk/core/activity_task/activity_task.proto +79 -0
  167. data/bridge/sdk-core/protos/local/temporal/sdk/core/child_workflow/child_workflow.proto +77 -0
  168. data/bridge/sdk-core/protos/local/temporal/sdk/core/common/common.proto +15 -0
  169. data/bridge/sdk-core/protos/local/temporal/sdk/core/core_interface.proto +30 -0
  170. data/bridge/sdk-core/protos/local/temporal/sdk/core/external_data/external_data.proto +30 -0
  171. data/bridge/sdk-core/protos/local/temporal/sdk/core/workflow_activation/workflow_activation.proto +263 -0
  172. data/bridge/sdk-core/protos/local/temporal/sdk/core/workflow_commands/workflow_commands.proto +304 -0
  173. data/bridge/sdk-core/protos/local/temporal/sdk/core/workflow_completion/workflow_completion.proto +29 -0
  174. data/bridge/sdk-core/protos/testsrv_upstream/api-linter.yaml +38 -0
  175. data/bridge/sdk-core/protos/testsrv_upstream/buf.yaml +13 -0
  176. data/bridge/sdk-core/protos/testsrv_upstream/dependencies/gogoproto/gogo.proto +141 -0
  177. data/bridge/sdk-core/protos/testsrv_upstream/temporal/api/testservice/v1/request_response.proto +63 -0
  178. data/bridge/sdk-core/protos/testsrv_upstream/temporal/api/testservice/v1/service.proto +90 -0
  179. data/bridge/sdk-core/rustfmt.toml +1 -0
  180. data/bridge/sdk-core/sdk/Cargo.toml +47 -0
  181. data/bridge/sdk-core/sdk/LICENSE.txt +23 -0
  182. data/bridge/sdk-core/sdk/src/activity_context.rs +230 -0
  183. data/bridge/sdk-core/sdk/src/app_data.rs +37 -0
  184. data/bridge/sdk-core/sdk/src/interceptors.rs +50 -0
  185. data/bridge/sdk-core/sdk/src/lib.rs +794 -0
  186. data/bridge/sdk-core/sdk/src/payload_converter.rs +11 -0
  187. data/bridge/sdk-core/sdk/src/workflow_context/options.rs +295 -0
  188. data/bridge/sdk-core/sdk/src/workflow_context.rs +694 -0
  189. data/bridge/sdk-core/sdk/src/workflow_future.rs +499 -0
  190. data/bridge/sdk-core/sdk-core-protos/Cargo.toml +30 -0
  191. data/bridge/sdk-core/sdk-core-protos/LICENSE.txt +23 -0
  192. data/bridge/sdk-core/sdk-core-protos/build.rs +107 -0
  193. data/bridge/sdk-core/sdk-core-protos/src/constants.rs +7 -0
  194. data/bridge/sdk-core/sdk-core-protos/src/history_builder.rs +544 -0
  195. data/bridge/sdk-core/sdk-core-protos/src/history_info.rs +230 -0
  196. data/bridge/sdk-core/sdk-core-protos/src/lib.rs +1970 -0
  197. data/bridge/sdk-core/sdk-core-protos/src/task_token.rs +38 -0
  198. data/bridge/sdk-core/sdk-core-protos/src/utilities.rs +14 -0
  199. data/bridge/sdk-core/test-utils/Cargo.toml +36 -0
  200. data/bridge/sdk-core/test-utils/src/canned_histories.rs +1579 -0
  201. data/bridge/sdk-core/test-utils/src/histfetch.rs +28 -0
  202. data/bridge/sdk-core/test-utils/src/lib.rs +650 -0
  203. data/bridge/sdk-core/tests/integ_tests/client_tests.rs +36 -0
  204. data/bridge/sdk-core/tests/integ_tests/ephemeral_server_tests.rs +128 -0
  205. data/bridge/sdk-core/tests/integ_tests/heartbeat_tests.rs +221 -0
  206. data/bridge/sdk-core/tests/integ_tests/metrics_tests.rs +37 -0
  207. data/bridge/sdk-core/tests/integ_tests/polling_tests.rs +133 -0
  208. data/bridge/sdk-core/tests/integ_tests/queries_tests.rs +437 -0
  209. data/bridge/sdk-core/tests/integ_tests/visibility_tests.rs +93 -0
  210. data/bridge/sdk-core/tests/integ_tests/workflow_tests/activities.rs +878 -0
  211. data/bridge/sdk-core/tests/integ_tests/workflow_tests/appdata_propagation.rs +61 -0
  212. data/bridge/sdk-core/tests/integ_tests/workflow_tests/cancel_external.rs +59 -0
  213. data/bridge/sdk-core/tests/integ_tests/workflow_tests/cancel_wf.rs +58 -0
  214. data/bridge/sdk-core/tests/integ_tests/workflow_tests/child_workflows.rs +50 -0
  215. data/bridge/sdk-core/tests/integ_tests/workflow_tests/continue_as_new.rs +60 -0
  216. data/bridge/sdk-core/tests/integ_tests/workflow_tests/determinism.rs +54 -0
  217. data/bridge/sdk-core/tests/integ_tests/workflow_tests/local_activities.rs +788 -0
  218. data/bridge/sdk-core/tests/integ_tests/workflow_tests/modify_wf_properties.rs +53 -0
  219. data/bridge/sdk-core/tests/integ_tests/workflow_tests/patches.rs +113 -0
  220. data/bridge/sdk-core/tests/integ_tests/workflow_tests/replay.rs +223 -0
  221. data/bridge/sdk-core/tests/integ_tests/workflow_tests/resets.rs +93 -0
  222. data/bridge/sdk-core/tests/integ_tests/workflow_tests/signals.rs +167 -0
  223. data/bridge/sdk-core/tests/integ_tests/workflow_tests/stickyness.rs +99 -0
  224. data/bridge/sdk-core/tests/integ_tests/workflow_tests/timers.rs +131 -0
  225. data/bridge/sdk-core/tests/integ_tests/workflow_tests/upsert_search_attrs.rs +75 -0
  226. data/bridge/sdk-core/tests/integ_tests/workflow_tests.rs +597 -0
  227. data/bridge/sdk-core/tests/load_tests.rs +191 -0
  228. data/bridge/sdk-core/tests/main.rs +113 -0
  229. data/bridge/sdk-core/tests/runner.rs +93 -0
  230. data/bridge/src/connection.rs +186 -0
  231. data/bridge/src/lib.rs +239 -0
  232. data/bridge/src/runtime.rs +54 -0
  233. data/bridge/src/worker.rs +124 -0
  234. data/ext/Rakefile +9 -0
  235. data/lib/bridge.so +0 -0
  236. data/lib/gen/dependencies/gogoproto/gogo_pb.rb +14 -0
  237. data/lib/gen/temporal/api/batch/v1/message_pb.rb +50 -0
  238. data/lib/gen/temporal/api/command/v1/message_pb.rb +174 -0
  239. data/lib/gen/temporal/api/common/v1/message_pb.rb +69 -0
  240. data/lib/gen/temporal/api/enums/v1/batch_operation_pb.rb +33 -0
  241. data/lib/gen/temporal/api/enums/v1/command_type_pb.rb +39 -0
  242. data/lib/gen/temporal/api/enums/v1/common_pb.rb +42 -0
  243. data/lib/gen/temporal/api/enums/v1/event_type_pb.rb +68 -0
  244. data/lib/gen/temporal/api/enums/v1/failed_cause_pb.rb +77 -0
  245. data/lib/gen/temporal/api/enums/v1/interaction_type_pb.rb +25 -0
  246. data/lib/gen/temporal/api/enums/v1/namespace_pb.rb +37 -0
  247. data/lib/gen/temporal/api/enums/v1/query_pb.rb +31 -0
  248. data/lib/gen/temporal/api/enums/v1/reset_pb.rb +24 -0
  249. data/lib/gen/temporal/api/enums/v1/schedule_pb.rb +28 -0
  250. data/lib/gen/temporal/api/enums/v1/task_queue_pb.rb +30 -0
  251. data/lib/gen/temporal/api/enums/v1/update_pb.rb +23 -0
  252. data/lib/gen/temporal/api/enums/v1/workflow_pb.rb +89 -0
  253. data/lib/gen/temporal/api/errordetails/v1/message_pb.rb +84 -0
  254. data/lib/gen/temporal/api/failure/v1/message_pb.rb +83 -0
  255. data/lib/gen/temporal/api/filter/v1/message_pb.rb +40 -0
  256. data/lib/gen/temporal/api/history/v1/message_pb.rb +490 -0
  257. data/lib/gen/temporal/api/interaction/v1/message_pb.rb +49 -0
  258. data/lib/gen/temporal/api/namespace/v1/message_pb.rb +63 -0
  259. data/lib/gen/temporal/api/operatorservice/v1/request_response_pb.rb +85 -0
  260. data/lib/gen/temporal/api/operatorservice/v1/service_pb.rb +20 -0
  261. data/lib/gen/temporal/api/query/v1/message_pb.rb +38 -0
  262. data/lib/gen/temporal/api/replication/v1/message_pb.rb +37 -0
  263. data/lib/gen/temporal/api/schedule/v1/message_pb.rb +149 -0
  264. data/lib/gen/temporal/api/taskqueue/v1/message_pb.rb +73 -0
  265. data/lib/gen/temporal/api/version/v1/message_pb.rb +41 -0
  266. data/lib/gen/temporal/api/workflow/v1/message_pb.rb +111 -0
  267. data/lib/gen/temporal/api/workflowservice/v1/request_response_pb.rb +788 -0
  268. data/lib/gen/temporal/api/workflowservice/v1/service_pb.rb +20 -0
  269. data/lib/gen/temporal/sdk/core/activity_result/activity_result_pb.rb +58 -0
  270. data/lib/gen/temporal/sdk/core/activity_task/activity_task_pb.rb +57 -0
  271. data/lib/gen/temporal/sdk/core/bridge/bridge_pb.rb +222 -0
  272. data/lib/gen/temporal/sdk/core/child_workflow/child_workflow_pb.rb +57 -0
  273. data/lib/gen/temporal/sdk/core/common/common_pb.rb +22 -0
  274. data/lib/gen/temporal/sdk/core/core_interface_pb.rb +34 -0
  275. data/lib/gen/temporal/sdk/core/external_data/external_data_pb.rb +27 -0
  276. data/lib/gen/temporal/sdk/core/workflow_activation/workflow_activation_pb.rb +165 -0
  277. data/lib/gen/temporal/sdk/core/workflow_commands/workflow_commands_pb.rb +196 -0
  278. data/lib/gen/temporal/sdk/core/workflow_completion/workflow_completion_pb.rb +34 -0
  279. data/lib/temporalio/activity/context.rb +97 -0
  280. data/lib/temporalio/activity/info.rb +67 -0
  281. data/lib/temporalio/activity.rb +85 -0
  282. data/lib/temporalio/bridge/error.rb +8 -0
  283. data/lib/temporalio/bridge.rb +14 -0
  284. data/lib/temporalio/client/implementation.rb +340 -0
  285. data/lib/temporalio/client/workflow_handle.rb +243 -0
  286. data/lib/temporalio/client.rb +131 -0
  287. data/lib/temporalio/connection.rb +751 -0
  288. data/lib/temporalio/data_converter.rb +191 -0
  289. data/lib/temporalio/error/failure.rb +194 -0
  290. data/lib/temporalio/error/workflow_failure.rb +19 -0
  291. data/lib/temporalio/errors.rb +40 -0
  292. data/lib/temporalio/failure_converter/base.rb +26 -0
  293. data/lib/temporalio/failure_converter/basic.rb +319 -0
  294. data/lib/temporalio/failure_converter.rb +7 -0
  295. data/lib/temporalio/interceptor/chain.rb +28 -0
  296. data/lib/temporalio/interceptor/client.rb +123 -0
  297. data/lib/temporalio/payload_codec/base.rb +32 -0
  298. data/lib/temporalio/payload_converter/base.rb +24 -0
  299. data/lib/temporalio/payload_converter/bytes.rb +27 -0
  300. data/lib/temporalio/payload_converter/composite.rb +49 -0
  301. data/lib/temporalio/payload_converter/encoding_base.rb +35 -0
  302. data/lib/temporalio/payload_converter/json.rb +26 -0
  303. data/lib/temporalio/payload_converter/nil.rb +26 -0
  304. data/lib/temporalio/payload_converter.rb +14 -0
  305. data/lib/temporalio/retry_policy.rb +82 -0
  306. data/lib/temporalio/retry_state.rb +35 -0
  307. data/lib/temporalio/runtime.rb +25 -0
  308. data/lib/temporalio/timeout_type.rb +29 -0
  309. data/lib/temporalio/version.rb +3 -0
  310. data/lib/temporalio/worker/activity_runner.rb +92 -0
  311. data/lib/temporalio/worker/activity_worker.rb +138 -0
  312. data/lib/temporalio/worker/reactor.rb +46 -0
  313. data/lib/temporalio/worker/runner.rb +63 -0
  314. data/lib/temporalio/worker/sync_worker.rb +88 -0
  315. data/lib/temporalio/worker/thread_pool_executor.rb +51 -0
  316. data/lib/temporalio/worker.rb +198 -0
  317. data/lib/temporalio/workflow/execution_info.rb +54 -0
  318. data/lib/temporalio/workflow/execution_status.rb +36 -0
  319. data/lib/temporalio/workflow/id_reuse_policy.rb +36 -0
  320. data/lib/temporalio/workflow/query_reject_condition.rb +33 -0
  321. data/lib/temporalio.rb +12 -1
  322. data/lib/thermite_patch.rb +23 -0
  323. data/temporalio.gemspec +45 -0
  324. metadata +566 -9
  325. data/lib/temporal/version.rb +0 -3
  326. data/lib/temporal.rb +0 -4
  327. data/temporal.gemspec +0 -20
@@ -0,0 +1,1168 @@
1
+ // The MIT License
2
+ //
3
+ // Copyright (c) 2020 Temporal Technologies Inc. All rights reserved.
4
+ //
5
+ // Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ // of this software and associated documentation files (the "Software"), to deal
7
+ // in the Software without restriction, including without limitation the rights
8
+ // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ // copies of the Software, and to permit persons to whom the Software is
10
+ // furnished to do so, subject to the following conditions:
11
+ //
12
+ // The above copyright notice and this permission notice shall be included in
13
+ // all copies or substantial portions of the Software.
14
+ //
15
+ // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ // THE SOFTWARE.
22
+
23
+ syntax = "proto3";
24
+
25
+ package temporal.api.workflowservice.v1;
26
+
27
+ option go_package = "go.temporal.io/api/workflowservice/v1;workflowservice";
28
+ option java_package = "io.temporal.api.workflowservice.v1";
29
+ option java_multiple_files = true;
30
+ option java_outer_classname = "RequestResponseProto";
31
+ option ruby_package = "Temporalio::Api::WorkflowService::V1";
32
+ option csharp_namespace = "Temporalio.Api.WorkflowService.V1";
33
+
34
+ import "temporal/api/enums/v1/batch_operation.proto";
35
+ import "temporal/api/enums/v1/workflow.proto";
36
+ import "temporal/api/enums/v1/namespace.proto";
37
+ import "temporal/api/enums/v1/failed_cause.proto";
38
+ import "temporal/api/enums/v1/common.proto";
39
+ import "temporal/api/enums/v1/query.proto";
40
+ import "temporal/api/enums/v1/reset.proto";
41
+ import "temporal/api/enums/v1/task_queue.proto";
42
+ import "temporal/api/enums/v1/update.proto";
43
+ import "temporal/api/common/v1/message.proto";
44
+ import "temporal/api/history/v1/message.proto";
45
+ import "temporal/api/interaction/v1/message.proto";
46
+ import "temporal/api/workflow/v1/message.proto";
47
+ import "temporal/api/command/v1/message.proto";
48
+ import "temporal/api/failure/v1/message.proto";
49
+ import "temporal/api/filter/v1/message.proto";
50
+ import "temporal/api/namespace/v1/message.proto";
51
+ import "temporal/api/query/v1/message.proto";
52
+ import "temporal/api/replication/v1/message.proto";
53
+ import "temporal/api/schedule/v1/message.proto";
54
+ import "temporal/api/taskqueue/v1/message.proto";
55
+ import "temporal/api/version/v1/message.proto";
56
+ import "temporal/api/batch/v1/message.proto";
57
+
58
+ import "google/protobuf/duration.proto";
59
+ import "google/protobuf/timestamp.proto";
60
+
61
+ import "dependencies/gogoproto/gogo.proto";
62
+
63
+ message RegisterNamespaceRequest {
64
+ string namespace = 1;
65
+ string description = 2;
66
+ string owner_email = 3;
67
+ google.protobuf.Duration workflow_execution_retention_period = 4 [(gogoproto.stdduration) = true];
68
+ repeated temporal.api.replication.v1.ClusterReplicationConfig clusters = 5;
69
+ string active_cluster_name = 6;
70
+ // A key-value map for any customized purpose.
71
+ map<string, string> data = 7;
72
+ string security_token = 8;
73
+ bool is_global_namespace = 9;
74
+ // If unspecified (ARCHIVAL_STATE_UNSPECIFIED) then default server configuration is used.
75
+ temporal.api.enums.v1.ArchivalState history_archival_state = 10;
76
+ string history_archival_uri = 11;
77
+ // If unspecified (ARCHIVAL_STATE_UNSPECIFIED) then default server configuration is used.
78
+ temporal.api.enums.v1.ArchivalState visibility_archival_state = 12;
79
+ string visibility_archival_uri = 13;
80
+ }
81
+
82
+ message RegisterNamespaceResponse {
83
+ }
84
+
85
+ message ListNamespacesRequest {
86
+ int32 page_size = 1;
87
+ bytes next_page_token = 2;
88
+ temporal.api.namespace.v1.NamespaceFilter namespace_filter = 3;
89
+ }
90
+
91
+ message ListNamespacesResponse {
92
+ repeated DescribeNamespaceResponse namespaces = 1;
93
+ bytes next_page_token = 2;
94
+ }
95
+
96
+ message DescribeNamespaceRequest {
97
+ string namespace = 1;
98
+ string id = 2;
99
+ }
100
+
101
+ message DescribeNamespaceResponse {
102
+ temporal.api.namespace.v1.NamespaceInfo namespace_info = 1;
103
+ temporal.api.namespace.v1.NamespaceConfig config = 2;
104
+ temporal.api.replication.v1.NamespaceReplicationConfig replication_config = 3;
105
+ int64 failover_version = 4;
106
+ bool is_global_namespace = 5;
107
+ // Contains the historical state of failover_versions for the cluster, truncated to contain only the last N
108
+ // states to ensure that the list does not grow unbounded.
109
+ repeated temporal.api.replication.v1.FailoverStatus failover_history = 6;
110
+ }
111
+
112
+ // (-- api-linter: core::0134::request-mask-required=disabled
113
+ // aip.dev/not-precedent: UpdateNamespace RPC doesn't follow Google API format. --)
114
+ // (-- api-linter: core::0134::request-resource-required=disabled
115
+ // aip.dev/not-precedent: UpdateNamespace RPC doesn't follow Google API format. --)
116
+ message UpdateNamespaceRequest {
117
+ string namespace = 1;
118
+ temporal.api.namespace.v1.UpdateNamespaceInfo update_info = 2;
119
+ temporal.api.namespace.v1.NamespaceConfig config = 3;
120
+ temporal.api.replication.v1.NamespaceReplicationConfig replication_config = 4;
121
+ string security_token = 5;
122
+ string delete_bad_binary = 6;
123
+ // promote local namespace to global namespace. Ignored if namespace is already global namespace.
124
+ bool promote_namespace = 7;
125
+ }
126
+
127
+ message UpdateNamespaceResponse {
128
+ temporal.api.namespace.v1.NamespaceInfo namespace_info = 1;
129
+ temporal.api.namespace.v1.NamespaceConfig config = 2;
130
+ temporal.api.replication.v1.NamespaceReplicationConfig replication_config = 3;
131
+ int64 failover_version = 4;
132
+ bool is_global_namespace = 5;
133
+ }
134
+
135
+ // Deprecated.
136
+ message DeprecateNamespaceRequest {
137
+ string namespace = 1;
138
+ string security_token = 2;
139
+ }
140
+
141
+ // Deprecated.
142
+ message DeprecateNamespaceResponse {
143
+ }
144
+
145
+ message StartWorkflowExecutionRequest {
146
+ string namespace = 1;
147
+ string workflow_id = 2;
148
+ temporal.api.common.v1.WorkflowType workflow_type = 3;
149
+ temporal.api.taskqueue.v1.TaskQueue task_queue = 4;
150
+ // Serialized arguments to the workflow. These are passed as arguments to the workflow function.
151
+ temporal.api.common.v1.Payloads input = 5;
152
+ // Total workflow execution timeout including retries and continue as new.
153
+ google.protobuf.Duration workflow_execution_timeout = 6 [(gogoproto.stdduration) = true];
154
+ // Timeout of a single workflow run.
155
+ google.protobuf.Duration workflow_run_timeout = 7 [(gogoproto.stdduration) = true];
156
+ // Timeout of a single workflow task.
157
+ google.protobuf.Duration workflow_task_timeout = 8 [(gogoproto.stdduration) = true];
158
+ // The identity of the client who initiated this request
159
+ string identity = 9;
160
+ // A unique identifier for this start request. Typically UUIDv4.
161
+ string request_id = 10;
162
+ // Default: WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE.
163
+ temporal.api.enums.v1.WorkflowIdReusePolicy workflow_id_reuse_policy = 11;
164
+ // The retry policy for the workflow. Will never exceed `workflow_execution_timeout`.
165
+ temporal.api.common.v1.RetryPolicy retry_policy = 12;
166
+ // See https://docs.temporal.io/docs/content/what-is-a-temporal-cron-job/
167
+ string cron_schedule = 13;
168
+ temporal.api.common.v1.Memo memo = 14;
169
+ temporal.api.common.v1.SearchAttributes search_attributes = 15;
170
+ temporal.api.common.v1.Header header = 16;
171
+ }
172
+
173
+ message StartWorkflowExecutionResponse {
174
+ string run_id = 1;
175
+ }
176
+
177
+ message GetWorkflowExecutionHistoryRequest {
178
+ string namespace = 1;
179
+ temporal.api.common.v1.WorkflowExecution execution = 2;
180
+ int32 maximum_page_size = 3;
181
+ // If a `GetWorkflowExecutionHistoryResponse` or a `PollWorkflowTaskQueueResponse` had one of
182
+ // these, it should be passed here to fetch the next page.
183
+ bytes next_page_token = 4;
184
+ // If set to true, the RPC call will not resolve until there is a new event which matches
185
+ // the `history_event_filter_type`, or a timeout is hit.
186
+ bool wait_new_event = 5;
187
+ // Filter returned events such that they match the specified filter type.
188
+ // Default: HISTORY_EVENT_FILTER_TYPE_ALL_EVENT.
189
+ temporal.api.enums.v1.HistoryEventFilterType history_event_filter_type = 6;
190
+ bool skip_archival = 7;
191
+ }
192
+
193
+ message GetWorkflowExecutionHistoryResponse {
194
+ temporal.api.history.v1.History history = 1;
195
+ // Raw history is an alternate representation of history that may be returned if configured on
196
+ // the frontend. This is not supported by all SDKs. Either this or `history` will be set.
197
+ repeated temporal.api.common.v1.DataBlob raw_history = 2;
198
+ // Will be set if there are more history events than were included in this response
199
+ bytes next_page_token = 3;
200
+ bool archived = 4;
201
+ }
202
+
203
+ message GetWorkflowExecutionHistoryReverseRequest {
204
+ string namespace = 1;
205
+ temporal.api.common.v1.WorkflowExecution execution = 2;
206
+ int32 maximum_page_size = 3;
207
+ bytes next_page_token = 4;
208
+ }
209
+
210
+ message GetWorkflowExecutionHistoryReverseResponse {
211
+ temporal.api.history.v1.History history = 1;
212
+ // Will be set if there are more history events than were included in this response
213
+ bytes next_page_token = 3;
214
+ }
215
+
216
+ message PollWorkflowTaskQueueRequest {
217
+ string namespace = 1;
218
+ temporal.api.taskqueue.v1.TaskQueue task_queue = 2;
219
+ // The identity of the worker/client who is polling this task queue
220
+ string identity = 3;
221
+ // Each worker process should provide an ID unique to the specific set of code it is running
222
+ // "checksum" in this field name isn't very accurate, it should be though of as an id.
223
+ string binary_checksum = 4;
224
+ // If set, the worker is opting in to build-id based versioning and wishes to only
225
+ // receive tasks that are considered compatible with the version provided.
226
+ // Doing so only makes sense in conjunction with the `UpdateWorkerBuildIdOrdering` API.
227
+ // When `worker_versioning_id` has a `worker_build_id`, and `binary_checksum` is not
228
+ // set, that value should also be considered as the `binary_checksum`.
229
+ temporal.api.taskqueue.v1.VersionId worker_versioning_id = 5;
230
+ }
231
+
232
+ message PollWorkflowTaskQueueResponse {
233
+ // A unique identifier for this task
234
+ bytes task_token = 1;
235
+ temporal.api.common.v1.WorkflowExecution workflow_execution = 2;
236
+ temporal.api.common.v1.WorkflowType workflow_type = 3;
237
+ // The last workflow task started event which was processed by some worker for this execution.
238
+ // Will be zero if no task has ever started.
239
+ int64 previous_started_event_id = 4;
240
+ // The id of the most recent workflow task started event, which will have been generated as a
241
+ // result of this poll request being served.
242
+ int64 started_event_id = 5;
243
+ // Starting at 1, the number of attempts to complete this task by any worker.
244
+ int32 attempt = 6;
245
+ // A hint that there are more tasks already present in this task queue. Can be used to
246
+ // prioritize draining a sticky queue before polling from a normal queue.
247
+ int64 backlog_count_hint = 7;
248
+ // The history for this workflow, which will either be complete or partial. Partial histories
249
+ // are sent to workers who have signaled that they are using a sticky queue when completing
250
+ // a workflow task.
251
+ temporal.api.history.v1.History history = 8;
252
+ // Will be set if there are more history events than were included in this response. Such events
253
+ // should be fetched via `GetWorkflowExecutionHistory`.
254
+ bytes next_page_token = 9;
255
+ // Legacy queries appear in this field. The query must be responded to via
256
+ // `RespondQueryTaskCompleted`. If the workflow is already closed (queries are permitted on
257
+ // closed workflows) then the `history` field will be populated with the entire history. It
258
+ // may also be populated if this task originates on a non-sticky queue.
259
+ temporal.api.query.v1.WorkflowQuery query = 10;
260
+ // The task queue this task originated from, which will always be the original non-sticky name
261
+ // for the queue, even if this response came from polling a sticky queue.
262
+ temporal.api.taskqueue.v1.TaskQueue workflow_execution_task_queue = 11;
263
+ // When this task was scheduled by the server
264
+ google.protobuf.Timestamp scheduled_time = 12 [(gogoproto.stdtime) = true];
265
+ // When the current workflow task started event was generated, meaning the current attempt.
266
+ google.protobuf.Timestamp started_time = 13 [(gogoproto.stdtime) = true];
267
+ // Queries that should be executed after applying the history in this task. Responses should be
268
+ // attached to `RespondWorkflowTaskCompletedRequest::query_results`
269
+ map<string, temporal.api.query.v1.WorkflowQuery> queries = 14;
270
+
271
+ repeated temporal.api.interaction.v1.Invocation interactions = 15;
272
+ }
273
+
274
+ message RespondWorkflowTaskCompletedRequest {
275
+ // The task token as received in `PollWorkflowTaskQueueResponse`
276
+ bytes task_token = 1;
277
+ // A list of commands generated when driving the workflow code in response to the new task
278
+ repeated temporal.api.command.v1.Command commands = 2;
279
+ // The identity of the worker/client
280
+ string identity = 3;
281
+ // May be set by workers to indicate that the worker desires future tasks to be provided with
282
+ // incremental history on a sticky queue.
283
+ temporal.api.taskqueue.v1.StickyExecutionAttributes sticky_attributes = 4;
284
+ // If set, the worker wishes to immediately receive the next workflow task as a response to
285
+ // this completion. This can save on polling round-trips.
286
+ bool return_new_workflow_task = 5;
287
+ // Can be used to *force* creation of a new workflow task, even if no commands have resolved or
288
+ // one would not otherwise have been generated. This is used when the worker knows it is doing
289
+ // something useful, but cannot complete it within the workflow task timeout. Local activities
290
+ // which run for longer than the task timeout being the prime example.
291
+ bool force_create_new_workflow_task = 6;
292
+ // Worker process' unique binary id
293
+ string binary_checksum = 7;
294
+ // Responses to the `queries` field in the task being responded to
295
+ map<string, temporal.api.query.v1.WorkflowQueryResult> query_results = 8;
296
+ string namespace = 9;
297
+ // If using versioning, worker should send the same id here that it used to
298
+ // poll for the workflow task.
299
+ // When `worker_versioning_id` has a `worker_build_id`, and `binary_checksum` is not
300
+ // set, that value should also be considered as the `binary_checksum`.
301
+ temporal.api.taskqueue.v1.VersionId worker_versioning_id = 10;
302
+ }
303
+
304
+ message RespondWorkflowTaskCompletedResponse {
305
+ // See `RespondWorkflowTaskCompletedResponse::return_new_workflow_task`
306
+ PollWorkflowTaskQueueResponse workflow_task = 1;
307
+ // See `ScheduleActivityTaskCommandAttributes::request_start`
308
+ repeated PollActivityTaskQueueResponse activity_tasks = 2;
309
+
310
+ int64 reset_history_event_id = 3;
311
+ }
312
+
313
+ message RespondWorkflowTaskFailedRequest {
314
+ // The task token as received in `PollWorkflowTaskQueueResponse`
315
+ bytes task_token = 1;
316
+ // Why did the task fail? It's important to note that many of the variants in this enum cannot
317
+ // apply to worker responses. See the type's doc for more.
318
+ temporal.api.enums.v1.WorkflowTaskFailedCause cause = 2;
319
+ // Failure details
320
+ temporal.api.failure.v1.Failure failure = 3;
321
+ // The identity of the worker/client
322
+ string identity = 4;
323
+ // Worker process' unique binary id
324
+ string binary_checksum = 5;
325
+ string namespace = 6;
326
+ }
327
+
328
+ message RespondWorkflowTaskFailedResponse {
329
+ }
330
+
331
+ message PollActivityTaskQueueRequest {
332
+ string namespace = 1;
333
+ temporal.api.taskqueue.v1.TaskQueue task_queue = 2;
334
+ // The identity of the worker/client
335
+ string identity = 3;
336
+ temporal.api.taskqueue.v1.TaskQueueMetadata task_queue_metadata = 4;
337
+ // If set, the worker is opting in to build-id based versioning and wishes to only
338
+ // receive tasks that are considered compatible with the version provided.
339
+ // Doing so only makes sense in conjunction with the `UpdateWorkerBuildIdOrdering` API.
340
+ temporal.api.taskqueue.v1.VersionId worker_versioning_id = 5;
341
+ }
342
+
343
+ message PollActivityTaskQueueResponse {
344
+ // A unique identifier for this task
345
+ bytes task_token = 1;
346
+ // The namespace the workflow which requested this activity lives in
347
+ string workflow_namespace = 2;
348
+ // Type of the requesting workflow
349
+ temporal.api.common.v1.WorkflowType workflow_type = 3;
350
+ // Execution info of the requesting workflow
351
+ temporal.api.common.v1.WorkflowExecution workflow_execution = 4;
352
+ temporal.api.common.v1.ActivityType activity_type = 5;
353
+ // The autogenerated or user specified identifier of this activity. Can be used to complete the
354
+ // activity via `RespondActivityTaskCompletedById`. May be re-used as long as the last usage
355
+ // has resolved, but unique IDs for every activity invocation is a good idea.
356
+ string activity_id = 6;
357
+ // Headers specified by the scheduling workflow. Commonly used to propagate contextual info
358
+ // from the workflow to its activities. For example, tracing contexts.
359
+ temporal.api.common.v1.Header header = 7;
360
+ // Arguments to the activity invocation
361
+ temporal.api.common.v1.Payloads input = 8;
362
+ // Details of the last heartbeat that was recorded for this activity as of the time this task
363
+ // was delivered.
364
+ temporal.api.common.v1.Payloads heartbeat_details = 9;
365
+ // When was this task first scheduled
366
+ google.protobuf.Timestamp scheduled_time = 10 [(gogoproto.stdtime) = true];
367
+ // When was this task attempt scheduled
368
+ google.protobuf.Timestamp current_attempt_scheduled_time = 11 [(gogoproto.stdtime) = true];
369
+ // When was this task started (this attempt)
370
+ google.protobuf.Timestamp started_time = 12 [(gogoproto.stdtime) = true];
371
+ // Starting at 1, the number of attempts to perform this activity
372
+ int32 attempt = 13;
373
+ // First scheduled -> final result reported timeout
374
+ //
375
+ // (-- api-linter: core::0140::prepositions=disabled
376
+ // aip.dev/not-precedent: "to" is used to indicate interval. --)
377
+ google.protobuf.Duration schedule_to_close_timeout = 14 [(gogoproto.stdduration) = true];
378
+ // Current attempt start -> final result reported timeout
379
+ //
380
+ // (-- api-linter: core::0140::prepositions=disabled
381
+ // aip.dev/not-precedent: "to" is used to indicate interval. --)
382
+ google.protobuf.Duration start_to_close_timeout = 15 [(gogoproto.stdduration) = true];
383
+ // Window within which the activity must report a heartbeat, or be timed out.
384
+ google.protobuf.Duration heartbeat_timeout = 16 [(gogoproto.stdduration) = true];
385
+ // This is the retry policy the service uses which may be different from the one provided
386
+ // (or not) during activity scheduling. The service can override the provided one if some
387
+ // values are not specified or exceed configured system limits.
388
+ temporal.api.common.v1.RetryPolicy retry_policy = 17;
389
+ }
390
+
391
+ message RecordActivityTaskHeartbeatRequest {
392
+ // The task token as received in `PollActivityTaskQueueResponse`
393
+ bytes task_token = 1;
394
+ // Arbitrary data, of which the most recent call is kept, to store for this activity
395
+ temporal.api.common.v1.Payloads details = 2;
396
+ // The identity of the worker/client
397
+ string identity = 3;
398
+ string namespace = 4;
399
+ }
400
+
401
+ message RecordActivityTaskHeartbeatResponse {
402
+ // Will be set to true if the activity has been asked to cancel itself. The SDK should then
403
+ // notify the activity of cancellation if it is still running.
404
+ bool cancel_requested = 1;
405
+ }
406
+
407
+ message RecordActivityTaskHeartbeatByIdRequest {
408
+ // Namespace of the workflow which scheduled this activity
409
+ string namespace = 1;
410
+ // Id of the workflow which scheduled this activity
411
+ string workflow_id = 2;
412
+ // Run Id of the workflow which scheduled this activity
413
+ string run_id = 3;
414
+ // Id of the activity we're heartbeating
415
+ string activity_id = 4;
416
+ // Arbitrary data, of which the most recent call is kept, to store for this activity
417
+ temporal.api.common.v1.Payloads details = 5;
418
+ // The identity of the worker/client
419
+ string identity = 6;
420
+ }
421
+
422
+ message RecordActivityTaskHeartbeatByIdResponse {
423
+ // Will be set to true if the activity has been asked to cancel itself. The SDK should then
424
+ // notify the activity of cancellation if it is still running.
425
+ bool cancel_requested = 1;
426
+ }
427
+
428
+ message RespondActivityTaskCompletedRequest {
429
+ // The task token as received in `PollActivityTaskQueueResponse`
430
+ bytes task_token = 1;
431
+ // The result of successfully executing the activity
432
+ temporal.api.common.v1.Payloads result = 2;
433
+ // The identity of the worker/client
434
+ string identity = 3;
435
+ string namespace = 4;
436
+ }
437
+
438
+ message RespondActivityTaskCompletedResponse {
439
+ }
440
+
441
+ message RespondActivityTaskCompletedByIdRequest {
442
+ // Namespace of the workflow which scheduled this activity
443
+ string namespace = 1;
444
+ // Id of the workflow which scheduled this activity
445
+ string workflow_id = 2;
446
+ // Run Id of the workflow which scheduled this activity
447
+ string run_id = 3;
448
+ // Id of the activity to complete
449
+ string activity_id = 4;
450
+ // The serialized result of activity execution
451
+ temporal.api.common.v1.Payloads result = 5;
452
+ // The identity of the worker/client
453
+ string identity = 6;
454
+ }
455
+
456
+ message RespondActivityTaskCompletedByIdResponse {
457
+ }
458
+
459
+ message RespondActivityTaskFailedRequest {
460
+ // The task token as received in `PollActivityTaskQueueResponse`
461
+ bytes task_token = 1;
462
+ // Detailed failure information
463
+ temporal.api.failure.v1.Failure failure = 2;
464
+ // The identity of the worker/client
465
+ string identity = 3;
466
+ string namespace = 4;
467
+ // Additional details to be stored as last activity heartbeat
468
+ temporal.api.common.v1.Payloads last_heartbeat_details = 5;
469
+ }
470
+
471
+ message RespondActivityTaskFailedResponse {
472
+ // Server validation failures could include
473
+ // last_heartbeat_details payload is too large, request failure is too large
474
+ repeated temporal.api.failure.v1.Failure failures = 1;
475
+ }
476
+
477
+ message RespondActivityTaskFailedByIdRequest {
478
+ // Namespace of the workflow which scheduled this activity
479
+ string namespace = 1;
480
+ // Id of the workflow which scheduled this activity
481
+ string workflow_id = 2;
482
+ // Run Id of the workflow which scheduled this activity
483
+ string run_id = 3;
484
+ // Id of the activity to fail
485
+ string activity_id = 4;
486
+ // Detailed failure information
487
+ temporal.api.failure.v1.Failure failure = 5;
488
+ // The identity of the worker/client
489
+ string identity = 6;
490
+ // Additional details to be stored as last activity heartbeat
491
+ temporal.api.common.v1.Payloads last_heartbeat_details = 7;
492
+ }
493
+
494
+ message RespondActivityTaskFailedByIdResponse {
495
+ // Server validation failures could include
496
+ // last_heartbeat_details payload is too large, request failure is too large
497
+ repeated temporal.api.failure.v1.Failure failures = 1;
498
+ }
499
+
500
+ message RespondActivityTaskCanceledRequest {
501
+ // The task token as received in `PollActivityTaskQueueResponse`
502
+ bytes task_token = 1;
503
+ // Serialized additional information to attach to the cancellation
504
+ temporal.api.common.v1.Payloads details = 2;
505
+ // The identity of the worker/client
506
+ string identity = 3;
507
+ string namespace = 4;
508
+ }
509
+
510
+ message RespondActivityTaskCanceledResponse {
511
+ }
512
+
513
+ message RespondActivityTaskCanceledByIdRequest {
514
+ // Namespace of the workflow which scheduled this activity
515
+ string namespace = 1;
516
+ // Id of the workflow which scheduled this activity
517
+ string workflow_id = 2;
518
+ // Run Id of the workflow which scheduled this activity
519
+ string run_id = 3;
520
+ // Id of the activity to confirm is cancelled
521
+ string activity_id = 4;
522
+ // Serialized additional information to attach to the cancellation
523
+ temporal.api.common.v1.Payloads details = 5;
524
+ // The identity of the worker/client
525
+ string identity = 6;
526
+ }
527
+
528
+ message RespondActivityTaskCanceledByIdResponse {
529
+ }
530
+
531
+ message RequestCancelWorkflowExecutionRequest {
532
+ string namespace = 1;
533
+ temporal.api.common.v1.WorkflowExecution workflow_execution = 2;
534
+ // The identity of the worker/client
535
+ string identity = 3;
536
+ // Used to de-dupe cancellation requests
537
+ string request_id = 4;
538
+ // If set, this call will error if the most recent (if no run id is set on
539
+ // `workflow_execution`), or specified (if it is) workflow execution is not part of the same
540
+ // execution chain as this id.
541
+ string first_execution_run_id = 5;
542
+ // Reason for requesting the cancellation
543
+ string reason = 6;
544
+ }
545
+
546
+ message RequestCancelWorkflowExecutionResponse {
547
+ }
548
+
549
+ message SignalWorkflowExecutionRequest {
550
+ string namespace = 1;
551
+ temporal.api.common.v1.WorkflowExecution workflow_execution = 2;
552
+ // The workflow author-defined name of the signal to send to the workflow
553
+ string signal_name = 3;
554
+ // Serialized value(s) to provide with the signal
555
+ temporal.api.common.v1.Payloads input = 4;
556
+ // The identity of the worker/client
557
+ string identity = 5;
558
+ // Used to de-dupe sent signals
559
+ string request_id = 6;
560
+ // Deprecated
561
+ string control = 7;
562
+ // Headers that are passed with the signal to the processing workflow.
563
+ // These can include things like auth or tracing tokens.
564
+ temporal.api.common.v1.Header header = 8;
565
+ }
566
+
567
+ message SignalWorkflowExecutionResponse {
568
+ }
569
+
570
+ message SignalWithStartWorkflowExecutionRequest {
571
+ string namespace = 1;
572
+ string workflow_id = 2;
573
+ temporal.api.common.v1.WorkflowType workflow_type = 3;
574
+ // The task queue to start this workflow on, if it will be started
575
+ temporal.api.taskqueue.v1.TaskQueue task_queue = 4;
576
+ // Serialized arguments to the workflow. These are passed as arguments to the workflow function.
577
+ temporal.api.common.v1.Payloads input = 5;
578
+ // Total workflow execution timeout including retries and continue as new
579
+ google.protobuf.Duration workflow_execution_timeout = 6 [(gogoproto.stdduration) = true];
580
+ // Timeout of a single workflow run
581
+ google.protobuf.Duration workflow_run_timeout = 7 [(gogoproto.stdduration) = true];
582
+ // Timeout of a single workflow task
583
+ google.protobuf.Duration workflow_task_timeout = 8 [(gogoproto.stdduration) = true];
584
+ // The identity of the worker/client
585
+ string identity = 9;
586
+ // Used to de-dupe signal w/ start requests
587
+ string request_id = 10;
588
+ temporal.api.enums.v1.WorkflowIdReusePolicy workflow_id_reuse_policy = 11;
589
+ // The workflow author-defined name of the signal to send to the workflow
590
+ string signal_name = 12;
591
+ // Serialized value(s) to provide with the signal
592
+ temporal.api.common.v1.Payloads signal_input = 13;
593
+ // Deprecated
594
+ string control = 14;
595
+ // Retry policy for the workflow Default: WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE.
596
+ temporal.api.common.v1.RetryPolicy retry_policy = 15;
597
+ // See https://docs.temporal.io/docs/content/what-is-a-temporal-cron-job/
598
+ string cron_schedule = 16;
599
+ temporal.api.common.v1.Memo memo = 17;
600
+ temporal.api.common.v1.SearchAttributes search_attributes = 18;
601
+ temporal.api.common.v1.Header header = 19;
602
+ }
603
+
604
+ message SignalWithStartWorkflowExecutionResponse {
605
+ string run_id = 1;
606
+ }
607
+
608
+ message ResetWorkflowExecutionRequest {
609
+ string namespace = 1;
610
+ temporal.api.common.v1.WorkflowExecution workflow_execution = 2;
611
+ string reason = 3;
612
+ // The id of a `WORKFLOW_TASK_COMPLETED`,`WORKFLOW_TASK_TIMED_OUT`, `WORKFLOW_TASK_FAILED`, or
613
+ // `WORKFLOW_TASK_STARTED` event to reset to.
614
+ int64 workflow_task_finish_event_id = 4;
615
+ // Used to de-dupe reset requests
616
+ string request_id = 5;
617
+ // Reset reapplay(replay) options.
618
+ temporal.api.enums.v1.ResetReapplyType reset_reapply_type = 6;
619
+ }
620
+
621
+ message ResetWorkflowExecutionResponse {
622
+ string run_id = 1;
623
+ }
624
+
625
+ message TerminateWorkflowExecutionRequest {
626
+ string namespace = 1;
627
+ temporal.api.common.v1.WorkflowExecution workflow_execution = 2;
628
+ string reason = 3;
629
+ // Serialized additional information to attach to the termination event
630
+ temporal.api.common.v1.Payloads details = 4;
631
+ // The identity of the worker/client
632
+ string identity = 5;
633
+ // If set, this call will error if the most recent (if no run id is set on
634
+ // `workflow_execution`), or specified (if it is) workflow execution is not part of the same
635
+ // execution chain as this id.
636
+ string first_execution_run_id = 6;
637
+ }
638
+
639
+ message TerminateWorkflowExecutionResponse {
640
+ }
641
+
642
+ // (-- api-linter: core::0135::request-unknown-fields=disabled
643
+ // aip.dev/not-precedent: DeleteNamespace RPC doesn't follow Google API format. --)
644
+ // (-- api-linter: core::0135::request-name-required=disabled
645
+ // aip.dev/not-precedent: DeleteNamespace RPC doesn't follow Google API format. --)
646
+ message DeleteWorkflowExecutionRequest {
647
+ string namespace = 1;
648
+ // Workflow Execution to delete. If run_id is not specified, the latest one is used.
649
+ temporal.api.common.v1.WorkflowExecution workflow_execution = 2;
650
+ }
651
+
652
+ message DeleteWorkflowExecutionResponse {
653
+ }
654
+
655
+ message ListOpenWorkflowExecutionsRequest {
656
+ string namespace = 1;
657
+ int32 maximum_page_size = 2;
658
+ bytes next_page_token = 3;
659
+ temporal.api.filter.v1.StartTimeFilter start_time_filter = 4;
660
+ oneof filters {
661
+ temporal.api.filter.v1.WorkflowExecutionFilter execution_filter = 5;
662
+ temporal.api.filter.v1.WorkflowTypeFilter type_filter = 6;
663
+ }
664
+ }
665
+
666
+ message ListOpenWorkflowExecutionsResponse {
667
+ repeated temporal.api.workflow.v1.WorkflowExecutionInfo executions = 1;
668
+ bytes next_page_token = 2;
669
+ }
670
+
671
+ message ListClosedWorkflowExecutionsRequest {
672
+ string namespace = 1;
673
+ int32 maximum_page_size = 2;
674
+ bytes next_page_token = 3;
675
+ temporal.api.filter.v1.StartTimeFilter start_time_filter = 4;
676
+ oneof filters {
677
+ temporal.api.filter.v1.WorkflowExecutionFilter execution_filter = 5;
678
+ temporal.api.filter.v1.WorkflowTypeFilter type_filter = 6;
679
+ temporal.api.filter.v1.StatusFilter status_filter = 7;
680
+ }
681
+ }
682
+
683
+ message ListClosedWorkflowExecutionsResponse {
684
+ repeated temporal.api.workflow.v1.WorkflowExecutionInfo executions = 1;
685
+ bytes next_page_token = 2;
686
+ }
687
+
688
+ message ListWorkflowExecutionsRequest {
689
+ string namespace = 1;
690
+ int32 page_size = 2;
691
+ bytes next_page_token = 3;
692
+ string query = 4;
693
+ }
694
+
695
+ message ListWorkflowExecutionsResponse {
696
+ repeated temporal.api.workflow.v1.WorkflowExecutionInfo executions = 1;
697
+ bytes next_page_token = 2;
698
+ }
699
+
700
+ message ListArchivedWorkflowExecutionsRequest {
701
+ string namespace = 1;
702
+ int32 page_size = 2;
703
+ bytes next_page_token = 3;
704
+ string query = 4;
705
+ }
706
+
707
+ message ListArchivedWorkflowExecutionsResponse {
708
+ repeated temporal.api.workflow.v1.WorkflowExecutionInfo executions = 1;
709
+ bytes next_page_token = 2;
710
+ }
711
+
712
+ message ScanWorkflowExecutionsRequest {
713
+ string namespace = 1;
714
+ int32 page_size = 2;
715
+ bytes next_page_token = 3;
716
+ string query = 4;
717
+ }
718
+
719
+ message ScanWorkflowExecutionsResponse {
720
+ repeated temporal.api.workflow.v1.WorkflowExecutionInfo executions = 1;
721
+ bytes next_page_token = 2;
722
+ }
723
+
724
+ message CountWorkflowExecutionsRequest {
725
+ string namespace = 1;
726
+ string query = 2;
727
+ }
728
+
729
+ message CountWorkflowExecutionsResponse {
730
+ int64 count = 1;
731
+ }
732
+
733
+ message GetSearchAttributesRequest {
734
+ }
735
+
736
+ message GetSearchAttributesResponse {
737
+ map<string, temporal.api.enums.v1.IndexedValueType> keys = 1;
738
+ }
739
+
740
+ message RespondQueryTaskCompletedRequest {
741
+ bytes task_token = 1;
742
+ temporal.api.enums.v1.QueryResultType completed_type = 2;
743
+ temporal.api.common.v1.Payloads query_result = 3;
744
+ string error_message = 4;
745
+ reserved 5;
746
+ string namespace = 6;
747
+ }
748
+
749
+ message RespondQueryTaskCompletedResponse {
750
+ }
751
+
752
+ message ResetStickyTaskQueueRequest {
753
+ string namespace = 1;
754
+ temporal.api.common.v1.WorkflowExecution execution = 2;
755
+ }
756
+
757
+ message ResetStickyTaskQueueResponse {
758
+ }
759
+
760
+ message QueryWorkflowRequest {
761
+ string namespace = 1;
762
+ temporal.api.common.v1.WorkflowExecution execution = 2;
763
+ temporal.api.query.v1.WorkflowQuery query = 3;
764
+ // QueryRejectCondition can used to reject the query if workflow state does not satisfy condition.
765
+ // Default: QUERY_REJECT_CONDITION_NONE.
766
+ temporal.api.enums.v1.QueryRejectCondition query_reject_condition = 4;
767
+ }
768
+
769
+ message QueryWorkflowResponse {
770
+ temporal.api.common.v1.Payloads query_result = 1;
771
+ temporal.api.query.v1.QueryRejected query_rejected = 2;
772
+ }
773
+
774
+ message DescribeWorkflowExecutionRequest {
775
+ string namespace = 1;
776
+ temporal.api.common.v1.WorkflowExecution execution = 2;
777
+ }
778
+
779
+ message DescribeWorkflowExecutionResponse {
780
+ temporal.api.workflow.v1.WorkflowExecutionConfig execution_config = 1;
781
+ temporal.api.workflow.v1.WorkflowExecutionInfo workflow_execution_info = 2;
782
+ repeated temporal.api.workflow.v1.PendingActivityInfo pending_activities = 3;
783
+ repeated temporal.api.workflow.v1.PendingChildExecutionInfo pending_children = 4;
784
+ temporal.api.workflow.v1.PendingWorkflowTaskInfo pending_workflow_task = 5;
785
+ }
786
+
787
+ message DescribeTaskQueueRequest {
788
+ string namespace = 1;
789
+ temporal.api.taskqueue.v1.TaskQueue task_queue = 2;
790
+ temporal.api.enums.v1.TaskQueueType task_queue_type = 3;
791
+ bool include_task_queue_status = 4;
792
+ }
793
+
794
+ message DescribeTaskQueueResponse {
795
+ repeated temporal.api.taskqueue.v1.PollerInfo pollers = 1;
796
+ temporal.api.taskqueue.v1.TaskQueueStatus task_queue_status = 2;
797
+ }
798
+
799
+ message GetClusterInfoRequest {
800
+ }
801
+
802
+ // GetClusterInfoResponse contains information about Temporal cluster.
803
+ message GetClusterInfoResponse {
804
+ // Key is client name i.e "temporal-go", "temporal-java", or "temporal-cli".
805
+ // Value is ranges of supported versions of this client i.e ">1.1.1 <=1.4.0 || ^5.0.0".
806
+ map<string,string> supported_clients = 1;
807
+ string server_version = 2;
808
+ string cluster_id = 3;
809
+ temporal.api.version.v1.VersionInfo version_info = 4;
810
+ string cluster_name = 5;
811
+ int32 history_shard_count = 6;
812
+ string persistence_store = 7;
813
+ string visibility_store = 8;
814
+ }
815
+
816
+ message GetSystemInfoRequest {
817
+ }
818
+
819
+ message GetSystemInfoResponse {
820
+ // Version of the server.
821
+ string server_version = 1;
822
+
823
+ // All capabilities the system supports.
824
+ Capabilities capabilities = 2;
825
+
826
+ // System capability details.
827
+ message Capabilities {
828
+ // True if signal and query headers are supported.
829
+ bool signal_and_query_header = 1;
830
+
831
+ // True if internal errors are differentiated from other types of errors for purposes of
832
+ // retrying non-internal errors.
833
+ //
834
+ // When unset/false, clients retry all failures. When true, clients should only retry
835
+ // non-internal errors.
836
+ bool internal_error_differentiation = 2;
837
+
838
+ // True if RespondActivityTaskFailed API supports including heartbeat details
839
+ bool activity_failure_include_heartbeat = 3;
840
+
841
+ // Supports scheduled workflow features.
842
+ bool supports_schedules = 4;
843
+
844
+ // True if server uses protos that include temporal.api.failure.v1.Failure.encoded_attributes
845
+ bool encoded_failure_attributes = 5;
846
+
847
+ // True if server supports dispatching Workflow and Activity tasks based on a worker's build_id
848
+ // (see:
849
+ // https://github.com/temporalio/proposals/blob/a123af3b559f43db16ea6dd31870bfb754c4dc5e/versioning/worker-versions.md)
850
+ bool build_id_based_versioning = 6;
851
+
852
+ // True if server supports upserting workflow memo
853
+ bool upsert_memo = 7;
854
+ }
855
+ }
856
+
857
+ message ListTaskQueuePartitionsRequest {
858
+ string namespace = 1;
859
+ temporal.api.taskqueue.v1.TaskQueue task_queue = 2;
860
+ }
861
+
862
+ message ListTaskQueuePartitionsResponse {
863
+ repeated temporal.api.taskqueue.v1.TaskQueuePartitionMetadata activity_task_queue_partitions = 1;
864
+ repeated temporal.api.taskqueue.v1.TaskQueuePartitionMetadata workflow_task_queue_partitions = 2;
865
+ }
866
+
867
+ // (-- api-linter: core::0133::request-parent-required=disabled
868
+ // aip.dev/not-precedent: CreateSchedule doesn't follow Google API format --)
869
+ // (-- api-linter: core::0133::request-unknown-fields=disabled
870
+ // aip.dev/not-precedent: CreateSchedule doesn't follow Google API format --)
871
+ // (-- api-linter: core::0133::request-resource-behavior=disabled
872
+ // aip.dev/not-precedent: field_behavior annotation not available in our gogo fork --)
873
+ // (-- api-linter: core::0203::optional=disabled
874
+ // aip.dev/not-precedent: field_behavior annotation not available in our gogo fork --)
875
+ message CreateScheduleRequest {
876
+ // The namespace the schedule should be created in.
877
+ string namespace = 1;
878
+ // The id of the new schedule.
879
+ string schedule_id = 2;
880
+ // The schedule spec, policies, action, and initial state.
881
+ temporal.api.schedule.v1.Schedule schedule = 3;
882
+ // Optional initial patch (e.g. to run the action once immediately).
883
+ temporal.api.schedule.v1.SchedulePatch initial_patch = 4;
884
+ // The identity of the client who initiated this request.
885
+ string identity = 5;
886
+ // A unique identifier for this create request for idempotence. Typically UUIDv4.
887
+ string request_id = 6;
888
+ // Memo and search attributes to attach to the schedule itself.
889
+ temporal.api.common.v1.Memo memo = 7;
890
+ temporal.api.common.v1.SearchAttributes search_attributes = 8;
891
+ }
892
+
893
+ message CreateScheduleResponse {
894
+ bytes conflict_token = 1;
895
+ }
896
+
897
+ message DescribeScheduleRequest {
898
+ // The namespace of the schedule to describe.
899
+ string namespace = 1;
900
+ // The id of the schedule to describe.
901
+ string schedule_id = 2;
902
+ }
903
+
904
+ message DescribeScheduleResponse {
905
+ // The complete current schedule details. This may not match the schedule as
906
+ // created because:
907
+ // - some types of schedule specs may get compiled into others (e.g.
908
+ // CronString into StructuredCalendarSpec)
909
+ // - some unspecified fields may be replaced by defaults
910
+ // - some fields in the state are modified automatically
911
+ // - the schedule may have been modified by UpdateSchedule or PatchSchedule
912
+ temporal.api.schedule.v1.Schedule schedule = 1;
913
+ // Extra schedule state info.
914
+ temporal.api.schedule.v1.ScheduleInfo info = 2;
915
+ // The memo and search attributes that the schedule was created with.
916
+ temporal.api.common.v1.Memo memo = 3;
917
+ temporal.api.common.v1.SearchAttributes search_attributes = 4;
918
+
919
+ // This value can be passed back to UpdateSchedule to ensure that the
920
+ // schedule was not modified between a Describe and an Update, which could
921
+ // lead to lost updates and other confusion.
922
+ bytes conflict_token = 5;
923
+ }
924
+
925
+ // (-- api-linter: core::0134::request-mask-required=disabled
926
+ // aip.dev/not-precedent: UpdateSchedule doesn't follow Google API format --)
927
+ message UpdateScheduleRequest {
928
+ // The namespace of the schedule to update.
929
+ string namespace = 1;
930
+ // The id of the schedule to update.
931
+ string schedule_id = 2;
932
+ // The new schedule. The four main fields of the schedule (spec, action,
933
+ // policies, state) are replaced completely by the values in this message.
934
+ temporal.api.schedule.v1.Schedule schedule = 3;
935
+ // This can be the value of conflict_token from a DescribeScheduleResponse,
936
+ // which will cause this request to fail if the schedule has been modified
937
+ // between the Describe and this Update.
938
+ // If missing, the schedule will be updated unconditionally.
939
+ bytes conflict_token = 4;
940
+ // The identity of the client who initiated this request.
941
+ string identity = 5;
942
+ // A unique identifier for this update request for idempotence. Typically UUIDv4.
943
+ string request_id = 6;
944
+ }
945
+
946
+ message UpdateScheduleResponse {
947
+ }
948
+
949
+ message PatchScheduleRequest {
950
+ // The namespace of the schedule to patch.
951
+ string namespace = 1;
952
+ // The id of the schedule to patch.
953
+ string schedule_id = 2;
954
+ temporal.api.schedule.v1.SchedulePatch patch = 3;
955
+ // The identity of the client who initiated this request.
956
+ string identity = 4;
957
+ // A unique identifier for this update request for idempotence. Typically UUIDv4.
958
+ string request_id = 5;
959
+ }
960
+
961
+ message PatchScheduleResponse {
962
+ }
963
+
964
+ message ListScheduleMatchingTimesRequest {
965
+ // The namespace of the schedule to query.
966
+ string namespace = 1;
967
+ // The id of the schedule to query.
968
+ string schedule_id = 2;
969
+ // Time range to query.
970
+ google.protobuf.Timestamp start_time = 3 [(gogoproto.stdtime) = true];
971
+ google.protobuf.Timestamp end_time = 4 [(gogoproto.stdtime) = true];
972
+ }
973
+
974
+ message ListScheduleMatchingTimesResponse {
975
+ repeated google.protobuf.Timestamp start_time = 1 [(gogoproto.stdtime) = true];
976
+ }
977
+
978
+ // (-- api-linter: core::0135::request-name-required=disabled
979
+ // aip.dev/not-precedent: DeleteSchedule doesn't follow Google API format --)
980
+ // (-- api-linter: core::0135::request-unknown-fields=disabled
981
+ // aip.dev/not-precedent: DeleteSchedule doesn't follow Google API format --)
982
+ message DeleteScheduleRequest {
983
+ // The namespace of the schedule to delete.
984
+ string namespace = 1;
985
+ // The id of the schedule to delete.
986
+ string schedule_id = 2;
987
+ // The identity of the client who initiated this request.
988
+ string identity = 3;
989
+ }
990
+
991
+ message DeleteScheduleResponse {
992
+ }
993
+
994
+ message ListSchedulesRequest {
995
+ // The namespace to list schedules in.
996
+ string namespace = 1;
997
+ // How many to return at once.
998
+ int32 maximum_page_size = 2;
999
+ // Token to get the next page of results.
1000
+ bytes next_page_token = 3;
1001
+ }
1002
+
1003
+ message ListSchedulesResponse {
1004
+ repeated temporal.api.schedule.v1.ScheduleListEntry schedules = 1;
1005
+ bytes next_page_token = 2;
1006
+ }
1007
+
1008
+ // (-- api-linter: core::0134::request-mask-required=disabled
1009
+ // aip.dev/not-precedent: UpdateWorkerBuildIdOrderingRequest doesn't follow Google API format --)
1010
+ // (-- api-linter: core::0134::request-resource-required=disabled
1011
+ // aip.dev/not-precedent: UpdateWorkerBuildIdOrderingRequest RPC doesn't follow Google API format. --)
1012
+ message UpdateWorkerBuildIdOrderingRequest {
1013
+ string namespace = 1;
1014
+ // Must be set, the task queue to apply changes to. Because all workers on
1015
+ // a given task queue must have the same set of workflow & activity
1016
+ // implementations, there is no reason to specify a task queue type here.
1017
+ string task_queue = 2;
1018
+ // The version id we are targeting.
1019
+ temporal.api.taskqueue.v1.VersionId version_id = 3;
1020
+ // When set, indicates that the `version_id` in this message is compatible
1021
+ // with the one specified in this field. Because compatability should form
1022
+ // a DAG, any build id can only be the "next compatible" version for one
1023
+ // other ID of a certain type at a time, and any setting which would create a cycle is invalid.
1024
+ temporal.api.taskqueue.v1.VersionId previous_compatible = 4;
1025
+ // When set, establishes the specified `version_id` as the default of it's type
1026
+ // for the queue. Workers matching it will begin processing new workflow executions.
1027
+ // The existing default will be marked as a previous incompatible version
1028
+ // to this one, assuming it is not also in `is_compatible_with`.
1029
+ bool become_default = 5;
1030
+ }
1031
+ message UpdateWorkerBuildIdOrderingResponse {}
1032
+
1033
+ // (-- api-linter: core::0134::request-resource-required=disabled
1034
+ // aip.dev/not-precedent: GetWorkerBuildIdOrderingRequest RPC doesn't follow Google API format. --)
1035
+ message GetWorkerBuildIdOrderingRequest {
1036
+ string namespace = 1;
1037
+ // Must be set, the task queue to interrogate about worker id ordering
1038
+ string task_queue = 2;
1039
+ // Limits how deep the returned DAG will go. 1 will return only the
1040
+ // default build id. A default/0 value will return the entire graph.
1041
+ int32 max_depth = 3;
1042
+ }
1043
+ message GetWorkerBuildIdOrderingResponse {
1044
+ // The currently established default version
1045
+ temporal.api.taskqueue.v1.VersionIdNode current_default = 1;
1046
+ // Other current latest-compatible versions who are not the overall default. These are the
1047
+ // versions that will be used when generating new tasks by following the graph from the
1048
+ // version of the last task out to a leaf.
1049
+ repeated temporal.api.taskqueue.v1.VersionIdNode compatible_leaves = 2;
1050
+ }
1051
+
1052
+ // (-- api-linter: core::0134=disabled
1053
+ // aip.dev/not-precedent: Update RPCs don't follow Google API format. --)
1054
+ message UpdateWorkflowRequest {
1055
+ // A unique ID for this logical request
1056
+ string request_id = 1;
1057
+
1058
+ // The manner in which the update result will be accessed.
1059
+ // This field requires a non-default value; the default value of the enum
1060
+ // will result in an error.
1061
+ temporal.api.enums.v1.WorkflowUpdateResultAccessStyle result_access_style = 2;
1062
+
1063
+ // The namespace name of the target workflow
1064
+ string namespace = 3;
1065
+ // The target workflow id and (optionally) a specific run thereof
1066
+ // (-- api-linter: core::0203::optional=disabled
1067
+ // aip.dev/not-precedent: false positive triggered by the word "optional" --)
1068
+ temporal.api.common.v1.WorkflowExecution workflow_execution = 4;
1069
+ // If set, this call will error if the most recent (if no run id is set on
1070
+ // `workflow_execution`), or specified (if it is) workflow execution is not
1071
+ // part of the same execution chain as this id.
1072
+ string first_execution_run_id = 5;
1073
+
1074
+ // A string identifying the agent that requested this interaction.
1075
+ string identity = 6;
1076
+
1077
+ // The name under which the workflow update function is registered and the
1078
+ // arguments to pass to said function.
1079
+ temporal.api.interaction.v1.Input input = 7;
1080
+ }
1081
+
1082
+ message UpdateWorkflowResponse {
1083
+ // An opaque token that can be used to retrieve the update result via
1084
+ // polling if it is not returned as part of the gRPC response
1085
+ bytes update_token = 1;
1086
+ // The success or failure status of the update
1087
+ temporal.api.interaction.v1.Output output = 2;
1088
+ }
1089
+
1090
+ message StartBatchOperationRequest {
1091
+ // Namespace that contains the batch operation
1092
+ string namespace = 1;
1093
+ // Visibility query defines the the group of workflow to do batch operation
1094
+ string visibility_query = 2;
1095
+ // Job ID defines the unique ID for the batch job
1096
+ string job_id = 3;
1097
+ // Reason to perform the batch operation
1098
+ string reason = 4;
1099
+ // Operation input
1100
+ oneof operation {
1101
+ temporal.api.batch.v1.BatchOperationTermination termination_operation = 10;
1102
+ temporal.api.batch.v1.BatchOperationSignal signal_operation = 11;
1103
+ temporal.api.batch.v1.BatchOperationCancellation cancellation_operation = 12;
1104
+ temporal.api.batch.v1.BatchOperationDeletion deletion_operation = 13;
1105
+ }
1106
+ }
1107
+
1108
+ message StartBatchOperationResponse {
1109
+ }
1110
+
1111
+ message StopBatchOperationRequest {
1112
+ // Namespace that contains the batch operation
1113
+ string namespace = 1;
1114
+ // Batch job id
1115
+ string job_id = 2;
1116
+ // Reason to stop a batch operation
1117
+ string reason = 3;
1118
+ // Identity of the operator
1119
+ string identity = 4;
1120
+ }
1121
+
1122
+ message StopBatchOperationResponse {
1123
+ }
1124
+
1125
+ message DescribeBatchOperationRequest {
1126
+ // Namespace that contains the batch operation
1127
+ string namespace = 1;
1128
+ // Batch job id
1129
+ string job_id = 2;
1130
+ }
1131
+
1132
+ message DescribeBatchOperationResponse {
1133
+ // Batch operation type
1134
+ temporal.api.enums.v1.BatchOperationType operation_type = 1;
1135
+ // Batch job ID
1136
+ string job_id = 2;
1137
+ // Batch operation state
1138
+ temporal.api.enums.v1.BatchOperationState state = 3;
1139
+ // Batch operation start time
1140
+ google.protobuf.Timestamp start_time = 4 [(gogoproto.stdtime) = true];
1141
+ // Batch operation close time
1142
+ google.protobuf.Timestamp close_time = 5 [(gogoproto.stdtime) = true];
1143
+ // Total operation count
1144
+ int64 total_operation_count = 6;
1145
+ // Complete operation count
1146
+ int64 complete_operation_count = 7;
1147
+ // Failure operation count
1148
+ int64 failure_operation_count = 8;
1149
+ // Identity indicates the operator identity
1150
+ string identity = 9;
1151
+ // Reason indicates the reason to stop a operation
1152
+ string reason = 10;
1153
+ }
1154
+
1155
+ message ListBatchOperationsRequest {
1156
+ // Namespace that contains the batch operation
1157
+ string namespace = 1;
1158
+ // List page size
1159
+ int32 page_size = 2;
1160
+ // Next page token
1161
+ bytes next_page_token = 3;
1162
+ }
1163
+
1164
+ message ListBatchOperationsResponse {
1165
+ // BatchOperationInfo contains the basic info about batch operation
1166
+ repeated temporal.api.batch.v1.BatchOperationInfo operation_info = 1;
1167
+ bytes next_page_token = 2;
1168
+ }