temporalio 0.4.0-arm64-darwin → 0.6.0-arm64-darwin
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.
- checksums.yaml +4 -4
- data/.yardopts +1 -1
- data/lib/temporalio/activity/cancellation_details.rb +58 -0
- data/lib/temporalio/activity/context.rb +10 -1
- data/lib/temporalio/activity/definition.rb +41 -3
- data/lib/temporalio/activity/info.rb +25 -4
- data/lib/temporalio/activity.rb +2 -0
- data/lib/temporalio/api/activity/v1/message.rb +1 -1
- data/lib/temporalio/api/batch/v1/message.rb +7 -2
- data/lib/temporalio/api/cloud/account/v1/message.rb +1 -1
- data/lib/temporalio/api/cloud/cloudservice/v1/request_response.rb +22 -2
- data/lib/temporalio/api/cloud/cloudservice/v1/service.rb +2 -2
- data/lib/temporalio/api/cloud/connectivityrule/v1/message.rb +29 -0
- data/lib/temporalio/api/cloud/identity/v1/message.rb +7 -2
- data/lib/temporalio/api/cloud/namespace/v1/message.rb +7 -2
- data/lib/temporalio/api/cloud/nexus/v1/message.rb +3 -2
- data/lib/temporalio/api/cloud/operation/v1/message.rb +2 -2
- data/lib/temporalio/api/cloud/region/v1/message.rb +1 -1
- data/lib/temporalio/api/cloud/resource/v1/message.rb +1 -1
- data/lib/temporalio/api/cloud/sink/v1/message.rb +1 -1
- data/lib/temporalio/api/cloud/usage/v1/message.rb +1 -1
- data/lib/temporalio/api/command/v1/message.rb +2 -2
- data/lib/temporalio/api/common/v1/grpc_status.rb +1 -1
- data/lib/temporalio/api/common/v1/message.rb +4 -2
- data/lib/temporalio/api/deployment/v1/message.rb +3 -2
- data/lib/temporalio/api/enums/v1/batch_operation.rb +2 -2
- data/lib/temporalio/api/enums/v1/command_type.rb +1 -1
- data/lib/temporalio/api/enums/v1/common.rb +5 -2
- data/lib/temporalio/api/enums/v1/deployment.rb +3 -2
- data/lib/temporalio/api/enums/v1/event_type.rb +2 -2
- data/lib/temporalio/api/enums/v1/failed_cause.rb +2 -2
- data/lib/temporalio/api/enums/v1/namespace.rb +1 -1
- data/lib/temporalio/api/enums/v1/nexus.rb +1 -1
- data/lib/temporalio/api/enums/v1/query.rb +1 -1
- data/lib/temporalio/api/enums/v1/reset.rb +1 -1
- data/lib/temporalio/api/enums/v1/schedule.rb +1 -1
- data/lib/temporalio/api/enums/v1/task_queue.rb +3 -2
- data/lib/temporalio/api/enums/v1/update.rb +1 -1
- data/lib/temporalio/api/enums/v1/workflow.rb +2 -2
- data/lib/temporalio/api/errordetails/v1/message.rb +1 -1
- data/lib/temporalio/api/export/v1/message.rb +1 -1
- data/lib/temporalio/api/failure/v1/message.rb +3 -2
- data/lib/temporalio/api/filter/v1/message.rb +1 -1
- data/lib/temporalio/api/history/v1/message.rb +4 -2
- data/lib/temporalio/api/namespace/v1/message.rb +1 -1
- data/lib/temporalio/api/nexus/v1/message.rb +2 -2
- data/lib/temporalio/api/operatorservice/v1/request_response.rb +1 -1
- data/lib/temporalio/api/operatorservice/v1/service.rb +1 -1
- data/lib/temporalio/api/payload_visitor.rb +106 -1
- data/lib/temporalio/api/protocol/v1/message.rb +1 -1
- data/lib/temporalio/api/query/v1/message.rb +1 -1
- data/lib/temporalio/api/replication/v1/message.rb +1 -1
- data/lib/temporalio/api/rules/v1/message.rb +27 -0
- data/lib/temporalio/api/schedule/v1/message.rb +2 -2
- data/lib/temporalio/api/sdk/v1/enhanced_stack_trace.rb +1 -1
- data/lib/temporalio/api/sdk/v1/task_complete_metadata.rb +1 -1
- data/lib/temporalio/api/sdk/v1/user_metadata.rb +1 -1
- data/lib/temporalio/api/sdk/v1/worker_config.rb +23 -0
- data/lib/temporalio/api/sdk/v1/workflow_metadata.rb +1 -1
- data/lib/temporalio/api/taskqueue/v1/message.rb +6 -2
- data/lib/temporalio/api/testservice/v1/request_response.rb +1 -1
- data/lib/temporalio/api/testservice/v1/service.rb +1 -1
- data/lib/temporalio/api/update/v1/message.rb +1 -1
- data/lib/temporalio/api/version/v1/message.rb +1 -1
- data/lib/temporalio/api/worker/v1/message.rb +31 -0
- data/lib/temporalio/api/workflow/v1/message.rb +14 -2
- data/lib/temporalio/api/workflowservice/v1/request_response.rb +28 -2
- data/lib/temporalio/api/workflowservice/v1/service.rb +2 -2
- data/lib/temporalio/cancellation.rb +16 -12
- data/lib/temporalio/client/async_activity_handle.rb +12 -4
- data/lib/temporalio/client/connection/cloud_service.rb +135 -0
- data/lib/temporalio/client/connection/workflow_service.rb +150 -0
- data/lib/temporalio/client/connection.rb +2 -1
- data/lib/temporalio/client/interceptor.rb +25 -7
- data/lib/temporalio/client/schedule.rb +10 -2
- data/lib/temporalio/client/with_start_workflow_operation.rb +9 -1
- data/lib/temporalio/client/workflow_handle.rb +50 -10
- data/lib/temporalio/client/workflow_update_handle.rb +9 -3
- data/lib/temporalio/client.rb +110 -6
- data/lib/temporalio/common_enums.rb +14 -0
- data/lib/temporalio/contrib/open_telemetry.rb +7 -7
- data/lib/temporalio/converters/data_converter.rb +18 -8
- data/lib/temporalio/converters/failure_converter.rb +6 -3
- data/lib/temporalio/converters/payload_converter/binary_null.rb +2 -2
- data/lib/temporalio/converters/payload_converter/binary_plain.rb +2 -2
- data/lib/temporalio/converters/payload_converter/binary_protobuf.rb +2 -2
- data/lib/temporalio/converters/payload_converter/composite.rb +6 -4
- data/lib/temporalio/converters/payload_converter/encoding.rb +4 -2
- data/lib/temporalio/converters/payload_converter/json_plain.rb +24 -7
- data/lib/temporalio/converters/payload_converter/json_protobuf.rb +2 -2
- data/lib/temporalio/converters/payload_converter.rb +16 -6
- data/lib/temporalio/error/failure.rb +19 -1
- data/lib/temporalio/error.rb +1 -1
- data/lib/temporalio/internal/bridge/3.2/temporalio_bridge.bundle +0 -0
- data/lib/temporalio/internal/bridge/3.3/temporalio_bridge.bundle +0 -0
- data/lib/temporalio/internal/bridge/3.4/temporalio_bridge.bundle +0 -0
- data/lib/temporalio/internal/bridge/api/activity_result/activity_result.rb +1 -1
- data/lib/temporalio/internal/bridge/api/activity_task/activity_task.rb +3 -2
- data/lib/temporalio/internal/bridge/api/child_workflow/child_workflow.rb +1 -1
- data/lib/temporalio/internal/bridge/api/common/common.rb +1 -1
- data/lib/temporalio/internal/bridge/api/core_interface.rb +1 -1
- data/lib/temporalio/internal/bridge/api/external_data/external_data.rb +1 -1
- data/lib/temporalio/internal/bridge/api/nexus/nexus.rb +3 -2
- data/lib/temporalio/internal/bridge/api/workflow_activation/workflow_activation.rb +2 -2
- data/lib/temporalio/internal/bridge/api/workflow_commands/workflow_commands.rb +3 -2
- data/lib/temporalio/internal/bridge/api/workflow_completion/workflow_completion.rb +1 -1
- data/lib/temporalio/internal/bridge/worker.rb +28 -4
- data/lib/temporalio/internal/bridge.rb +1 -1
- data/lib/temporalio/internal/client/implementation.rb +60 -52
- data/lib/temporalio/internal/proto_utils.rb +4 -4
- data/lib/temporalio/internal/worker/activity_worker.rb +93 -20
- data/lib/temporalio/internal/worker/workflow_instance/child_workflow_handle.rb +8 -6
- data/lib/temporalio/internal/worker/workflow_instance/context.rb +66 -24
- data/lib/temporalio/internal/worker/workflow_instance/details.rb +5 -2
- data/lib/temporalio/internal/worker/workflow_instance/external_workflow_handle.rb +2 -2
- data/lib/temporalio/internal/worker/workflow_instance/externally_immutable_hash.rb +2 -0
- data/lib/temporalio/internal/worker/workflow_instance/illegal_call_tracer.rb +64 -18
- data/lib/temporalio/internal/worker/workflow_instance/outbound_implementation.rb +28 -14
- data/lib/temporalio/internal/worker/workflow_instance/replay_safe_logger.rb +5 -2
- data/lib/temporalio/internal/worker/workflow_instance/scheduler.rb +10 -4
- data/lib/temporalio/internal/worker/workflow_instance.rb +58 -23
- data/lib/temporalio/internal/worker/workflow_worker.rb +16 -6
- data/lib/temporalio/priority.rb +100 -0
- data/lib/temporalio/scoped_logger.rb +1 -1
- data/lib/temporalio/testing/activity_environment.rb +17 -2
- data/lib/temporalio/testing/workflow_environment.rb +3 -3
- data/lib/temporalio/version.rb +1 -1
- data/lib/temporalio/versioning_override.rb +56 -0
- data/lib/temporalio/worker/deployment_options.rb +45 -0
- data/lib/temporalio/worker/illegal_workflow_call_validator.rb +73 -0
- data/lib/temporalio/worker/interceptor.rb +13 -1
- data/lib/temporalio/worker/poller_behavior.rb +61 -0
- data/lib/temporalio/worker/thread_pool.rb +1 -1
- data/lib/temporalio/worker/workflow_executor/thread_pool.rb +2 -1
- data/lib/temporalio/worker/workflow_replayer.rb +12 -13
- data/lib/temporalio/worker.rb +73 -28
- data/lib/temporalio/worker_deployment_version.rb +67 -0
- data/lib/temporalio/workflow/child_workflow_handle.rb +10 -2
- data/lib/temporalio/workflow/definition.rb +187 -39
- data/lib/temporalio/workflow/external_workflow_handle.rb +3 -1
- data/lib/temporalio/workflow/info.rb +4 -1
- data/lib/temporalio/workflow.rb +134 -11
- data/lib/temporalio.rb +1 -0
- data/temporalio.gemspec +1 -0
- metadata +13 -2
    
        data/lib/temporalio/workflow.rb
    CHANGED
    
    | @@ -2,6 +2,8 @@ | |
| 2 2 |  | 
| 3 3 | 
             
            require 'random/formatter'
         | 
| 4 4 | 
             
            require 'temporalio/error'
         | 
| 5 | 
            +
            require 'temporalio/internal/worker/workflow_instance'
         | 
| 6 | 
            +
            require 'temporalio/priority'
         | 
| 5 7 | 
             
            require 'temporalio/workflow/activity_cancellation_type'
         | 
| 6 8 | 
             
            require 'temporalio/workflow/child_workflow_cancellation_type'
         | 
| 7 9 | 
             
            require 'temporalio/workflow/child_workflow_handle'
         | 
| @@ -56,6 +58,18 @@ module Temporalio | |
| 56 58 | 
             
                  _current.current_details = details
         | 
| 57 59 | 
             
                end
         | 
| 58 60 |  | 
| 61 | 
            +
                # Get the deployment version of the worker which executed the current Workflow Task.
         | 
| 62 | 
            +
                #
         | 
| 63 | 
            +
                # May be nil if the task was completed by a worker without a deployment version or build id. If
         | 
| 64 | 
            +
                # this worker is the one executing this task for the first time and has a deployment version
         | 
| 65 | 
            +
                # set, then its ID will be used. This value may change over the lifetime of the workflow run,
         | 
| 66 | 
            +
                # but is deterministic and safe to use for branching. This is currently experimental.
         | 
| 67 | 
            +
                #
         | 
| 68 | 
            +
                # @return [WorkerDeploymentVersion, nil] the current deployment version if any.
         | 
| 69 | 
            +
                def self.current_deployment_version
         | 
| 70 | 
            +
                  _current.current_deployment_version
         | 
| 71 | 
            +
                end
         | 
| 72 | 
            +
             | 
| 59 73 | 
             
                # @return [Integer] Current number of events in history. This value is the current history event count up until the
         | 
| 60 74 | 
             
                #   current task. Note, this value may not be up to date when accessed in a query.
         | 
| 61 75 | 
             
                def self.current_history_length
         | 
| @@ -118,6 +132,11 @@ module Temporalio | |
| 118 132 | 
             
                #   optimization on some servers that sends activities back to the same worker as the calling workflow if they can
         | 
| 119 133 | 
             
                #   run there. If `false` (the default), eager execution may still be disabled at the worker level or may not be
         | 
| 120 134 | 
             
                #   requested due to lack of available slots.
         | 
| 135 | 
            +
                # @param priority [Priority] Priority of the activity. This is currently experimental.
         | 
| 136 | 
            +
                # @param arg_hints [Array<Object>, nil] Overrides converter hints for arguments if any. If unset/nil and the
         | 
| 137 | 
            +
                #   activity definition has arg hints, those are used by default.
         | 
| 138 | 
            +
                # @param result_hint [Object, nil] Overrides converter hint for result if any. If unset/nil and the activity
         | 
| 139 | 
            +
                #   definition has result hint, it is used by default.
         | 
| 121 140 | 
             
                #
         | 
| 122 141 | 
             
                # @return [Object] Result of the activity.
         | 
| 123 142 | 
             
                # @raise [Error::ActivityError] Activity failed (and retry was disabled or exhausted).
         | 
| @@ -136,12 +155,16 @@ module Temporalio | |
| 136 155 | 
             
                  cancellation: Workflow.cancellation,
         | 
| 137 156 | 
             
                  cancellation_type: ActivityCancellationType::TRY_CANCEL,
         | 
| 138 157 | 
             
                  activity_id: nil,
         | 
| 139 | 
            -
                  disable_eager_execution: false
         | 
| 158 | 
            +
                  disable_eager_execution: false,
         | 
| 159 | 
            +
                  priority: Priority.default,
         | 
| 160 | 
            +
                  arg_hints: nil,
         | 
| 161 | 
            +
                  result_hint: nil
         | 
| 140 162 | 
             
                )
         | 
| 141 163 | 
             
                  _current.execute_activity(
         | 
| 142 164 | 
             
                    activity, *args,
         | 
| 143 165 | 
             
                    task_queue:, summary:, schedule_to_close_timeout:, schedule_to_start_timeout:, start_to_close_timeout:,
         | 
| 144 | 
            -
                    heartbeat_timeout:, retry_policy:, cancellation:, cancellation_type:, activity_id:, disable_eager_execution | 
| 166 | 
            +
                    heartbeat_timeout:, retry_policy:, cancellation:, cancellation_type:, activity_id:, disable_eager_execution:,
         | 
| 167 | 
            +
                    priority:, arg_hints:, result_hint:
         | 
| 145 168 | 
             
                  )
         | 
| 146 169 | 
             
                end
         | 
| 147 170 |  | 
| @@ -163,13 +186,16 @@ module Temporalio | |
| 163 186 | 
             
                  retry_policy: nil,
         | 
| 164 187 | 
             
                  cron_schedule: nil,
         | 
| 165 188 | 
             
                  memo: nil,
         | 
| 166 | 
            -
                  search_attributes: nil
         | 
| 189 | 
            +
                  search_attributes: nil,
         | 
| 190 | 
            +
                  priority: Priority.default,
         | 
| 191 | 
            +
                  arg_hints: nil,
         | 
| 192 | 
            +
                  result_hint: nil
         | 
| 167 193 | 
             
                )
         | 
| 168 194 | 
             
                  start_child_workflow(
         | 
| 169 195 | 
             
                    workflow, *args,
         | 
| 170 196 | 
             
                    id:, task_queue:, static_summary:, static_details:, cancellation:, cancellation_type:,
         | 
| 171 197 | 
             
                    parent_close_policy:, execution_timeout:, run_timeout:, task_timeout:, id_reuse_policy:,
         | 
| 172 | 
            -
                    retry_policy:, cron_schedule:, memo:, search_attributes:
         | 
| 198 | 
            +
                    retry_policy:, cron_schedule:, memo:, search_attributes:, priority:, arg_hints:, result_hint:
         | 
| 173 199 | 
             
                  ).result
         | 
| 174 200 | 
             
                end
         | 
| 175 201 |  | 
| @@ -200,6 +226,10 @@ module Temporalio | |
| 200 226 | 
             
                #   workflow.
         | 
| 201 227 | 
             
                # @param activity_id [String, nil] Optional unique identifier for the activity. This is an advanced setting that
         | 
| 202 228 | 
             
                #   should not be set unless users are sure they need to. Contact Temporal before setting this value.
         | 
| 229 | 
            +
                # @param arg_hints [Array<Object>, nil] Overrides converter hints for arguments if any. If unset/nil and the
         | 
| 230 | 
            +
                #   activity definition has arg hints, those are used by default.
         | 
| 231 | 
            +
                # @param result_hint [Object, nil] Overrides converter hint for result if any. If unset/nil and the activity
         | 
| 232 | 
            +
                #   definition has result hint, it is used by default.
         | 
| 203 233 | 
             
                #
         | 
| 204 234 | 
             
                # @return [Object] Result of the activity.
         | 
| 205 235 | 
             
                # @raise [Error::ActivityError] Activity failed (and retry was disabled or exhausted).
         | 
| @@ -215,12 +245,15 @@ module Temporalio | |
| 215 245 | 
             
                  local_retry_threshold: nil,
         | 
| 216 246 | 
             
                  cancellation: Workflow.cancellation,
         | 
| 217 247 | 
             
                  cancellation_type: ActivityCancellationType::TRY_CANCEL,
         | 
| 218 | 
            -
                  activity_id: nil
         | 
| 248 | 
            +
                  activity_id: nil,
         | 
| 249 | 
            +
                  arg_hints: nil,
         | 
| 250 | 
            +
                  result_hint: nil
         | 
| 219 251 | 
             
                )
         | 
| 220 252 | 
             
                  _current.execute_local_activity(
         | 
| 221 253 | 
             
                    activity, *args,
         | 
| 222 254 | 
             
                    schedule_to_close_timeout:, schedule_to_start_timeout:, start_to_close_timeout:,
         | 
| 223 | 
            -
                    retry_policy:, local_retry_threshold:, cancellation:, cancellation_type:, | 
| 255 | 
            +
                    retry_policy:, local_retry_threshold:, cancellation:, cancellation_type:,
         | 
| 256 | 
            +
                    activity_id:, arg_hints:, result_hint:
         | 
| 224 257 | 
             
                  )
         | 
| 225 258 | 
             
                end
         | 
| 226 259 |  | 
| @@ -360,6 +393,11 @@ module Temporalio | |
| 360 393 | 
             
                # @param cron_schedule [String, nil] Cron schedule. Users should use schedules instead of this.
         | 
| 361 394 | 
             
                # @param memo [Hash{String, Symbol => Object}, nil] Memo for the workflow.
         | 
| 362 395 | 
             
                # @param search_attributes [SearchAttributes, nil] Search attributes for the workflow.
         | 
| 396 | 
            +
                # @param priority [Priority] Priority of the workflow. This is currently experimental.
         | 
| 397 | 
            +
                # @param arg_hints [Array<Object>, nil] Overrides converter hints for arguments if any. If unset/nil and the
         | 
| 398 | 
            +
                #   workflow definition has arg hints, those are used by default.
         | 
| 399 | 
            +
                # @param result_hint [Object, nil] Overrides converter hint for result if any. If unset/nil and the workflow
         | 
| 400 | 
            +
                #   definition has result hint, it is used by default.
         | 
| 363 401 | 
             
                #
         | 
| 364 402 | 
             
                # @return [ChildWorkflowHandle] Workflow handle to the started workflow.
         | 
| 365 403 | 
             
                # @raise [Error::WorkflowAlreadyStartedError] Workflow already exists for the ID.
         | 
| @@ -381,13 +419,16 @@ module Temporalio | |
| 381 419 | 
             
                  retry_policy: nil,
         | 
| 382 420 | 
             
                  cron_schedule: nil,
         | 
| 383 421 | 
             
                  memo: nil,
         | 
| 384 | 
            -
                  search_attributes: nil
         | 
| 422 | 
            +
                  search_attributes: nil,
         | 
| 423 | 
            +
                  priority: Priority.default,
         | 
| 424 | 
            +
                  arg_hints: nil,
         | 
| 425 | 
            +
                  result_hint: nil
         | 
| 385 426 | 
             
                )
         | 
| 386 427 | 
             
                  _current.start_child_workflow(
         | 
| 387 428 | 
             
                    workflow, *args,
         | 
| 388 429 | 
             
                    id:, task_queue:, static_summary:, static_details:, cancellation:, cancellation_type:,
         | 
| 389 430 | 
             
                    parent_close_policy:, execution_timeout:, run_timeout:, task_timeout:, id_reuse_policy:,
         | 
| 390 | 
            -
                    retry_policy:, cron_schedule:, memo:, search_attributes:
         | 
| 431 | 
            +
                    retry_policy:, cron_schedule:, memo:, search_attributes:, priority:, arg_hints:, result_hint:
         | 
| 391 432 | 
             
                  )
         | 
| 392 433 | 
             
                end
         | 
| 393 434 |  | 
| @@ -497,25 +538,79 @@ module Temporalio | |
| 497 538 | 
             
                  # Run a block of code with illegal call tracing disabled. Users should be cautious about using this as it can
         | 
| 498 539 | 
             
                  # often signify unsafe code.
         | 
| 499 540 | 
             
                  #
         | 
| 541 | 
            +
                  # If this is invoked outside of a workflow, it just runs the block.
         | 
| 542 | 
            +
                  #
         | 
| 500 543 | 
             
                  # @yield Block to run with call tracing disabled
         | 
| 501 544 | 
             
                  #
         | 
| 502 545 | 
             
                  # @return [Object] Result of the block.
         | 
| 503 546 | 
             
                  def self.illegal_call_tracing_disabled(&)
         | 
| 504 | 
            -
                    Workflow. | 
| 547 | 
            +
                    if Workflow.in_workflow?
         | 
| 548 | 
            +
                      Workflow._current.illegal_call_tracing_disabled(&)
         | 
| 549 | 
            +
                    else
         | 
| 550 | 
            +
                      yield
         | 
| 551 | 
            +
                    end
         | 
| 505 552 | 
             
                  end
         | 
| 506 553 |  | 
| 507 554 | 
             
                  # Run a block of code with IO enabled. Specifically this allows the `io_wait` call of the fiber scheduler to work.
         | 
| 508 555 | 
             
                  # Users should be cautious about using this as it can often signify unsafe code. Note, this is often only
         | 
| 509 556 | 
             
                  # applicable to network code as file IO and most process-based IO does not go through scheduler `io_wait`.
         | 
| 557 | 
            +
                  #
         | 
| 558 | 
            +
                  # If this is invoked outside of a workflow, it just runs the block.
         | 
| 510 559 | 
             
                  def self.io_enabled(&)
         | 
| 511 | 
            -
                    Workflow. | 
| 560 | 
            +
                    if Workflow.in_workflow?
         | 
| 561 | 
            +
                      Workflow._current.io_enabled(&)
         | 
| 562 | 
            +
                    else
         | 
| 563 | 
            +
                      yield
         | 
| 564 | 
            +
                    end
         | 
| 565 | 
            +
                  end
         | 
| 566 | 
            +
             | 
| 567 | 
            +
                  # Run a block of code with the durable/deterministic workflow Fiber scheduler off. This means fallback to default
         | 
| 568 | 
            +
                  # fiber scheduler and no workflow helpers will be available in the block. This is usually only needed in advanced
         | 
| 569 | 
            +
                  # situations where a third party library does something like use "Timeout" in a way that shouldn't be made
         | 
| 570 | 
            +
                  # durable.
         | 
| 571 | 
            +
                  #
         | 
| 572 | 
            +
                  # If this is invoked outside of a workflow, it just runs the block.
         | 
| 573 | 
            +
                  #
         | 
| 574 | 
            +
                  # This implies {illegal_call_tracing_disabled}.
         | 
| 575 | 
            +
                  def self.durable_scheduler_disabled(&)
         | 
| 576 | 
            +
                    if Workflow.in_workflow?
         | 
| 577 | 
            +
                      Workflow._current.durable_scheduler_disabled(&)
         | 
| 578 | 
            +
                    else
         | 
| 579 | 
            +
                      yield
         | 
| 580 | 
            +
                    end
         | 
| 581 | 
            +
                  end
         | 
| 582 | 
            +
             | 
| 583 | 
            +
                  # @!visibility private
         | 
| 584 | 
            +
                  def self._wrap_ruby_class_as_legal(target_class)
         | 
| 585 | 
            +
                    Class.new do
         | 
| 586 | 
            +
                      define_method(:initialize) do |*args, **kwargs, &block|
         | 
| 587 | 
            +
                        @underlying = Unsafe.illegal_call_tracing_disabled do
         | 
| 588 | 
            +
                          target_class.new(*args, **kwargs, &block) # steep:ignore
         | 
| 589 | 
            +
                        end
         | 
| 590 | 
            +
                      end
         | 
| 591 | 
            +
             | 
| 592 | 
            +
                      # @!visibility private
         | 
| 593 | 
            +
                      def method_missing(name, ...)
         | 
| 594 | 
            +
                        if @underlying.respond_to?(name)
         | 
| 595 | 
            +
                          # Call with tracing disabled
         | 
| 596 | 
            +
                          Unsafe.illegal_call_tracing_disabled { @underlying.public_send(name, ...) }
         | 
| 597 | 
            +
                        else
         | 
| 598 | 
            +
                          super
         | 
| 599 | 
            +
                        end
         | 
| 600 | 
            +
                      end
         | 
| 601 | 
            +
             | 
| 602 | 
            +
                      # @!visibility private
         | 
| 603 | 
            +
                      def respond_to_missing?(name, include_all = false)
         | 
| 604 | 
            +
                        @underlying.respond_to?(name, include_all) || super
         | 
| 605 | 
            +
                      end
         | 
| 606 | 
            +
                    end
         | 
| 512 607 | 
             
                  end
         | 
| 513 608 | 
             
                end
         | 
| 514 609 |  | 
| 515 610 | 
             
                # Error that is raised by a workflow out of the primary workflow method to issue a continue-as-new.
         | 
| 516 611 | 
             
                class ContinueAsNewError < Error
         | 
| 517 612 | 
             
                  attr_accessor :args, :workflow, :task_queue, :run_timeout, :task_timeout,
         | 
| 518 | 
            -
                                :retry_policy, :memo, :search_attributes, :headers
         | 
| 613 | 
            +
                                :retry_policy, :memo, :search_attributes, :arg_hints, :headers
         | 
| 519 614 |  | 
| 520 615 | 
             
                  # Create a continue as new error.
         | 
| 521 616 | 
             
                  #
         | 
| @@ -534,6 +629,8 @@ module Temporalio | |
| 534 629 | 
             
                  #   is used.
         | 
| 535 630 | 
             
                  # @param search_attributes [SearchAttributes, nil] Search attributes for the workflow. If unset/nil, the current
         | 
| 536 631 | 
             
                  #   workflow search attributes are used.
         | 
| 632 | 
            +
                  # @param arg_hints [Array<Object>, nil] Overrides converter hints for arguments if any. If unset/nil and the
         | 
| 633 | 
            +
                  #   workflow definition has arg hints, those are used by default.
         | 
| 537 634 | 
             
                  # @param headers [Hash<String, Object>] Headers for the workflow. The default is _not_ carried over from the
         | 
| 538 635 | 
             
                  #   current workflow.
         | 
| 539 636 | 
             
                  def initialize(
         | 
| @@ -545,6 +642,7 @@ module Temporalio | |
| 545 642 | 
             
                    retry_policy: nil,
         | 
| 546 643 | 
             
                    memo: nil,
         | 
| 547 644 | 
             
                    search_attributes: nil,
         | 
| 645 | 
            +
                    arg_hints: nil,
         | 
| 548 646 | 
             
                    headers: {}
         | 
| 549 647 | 
             
                  )
         | 
| 550 648 | 
             
                    super('Continue as new')
         | 
| @@ -556,6 +654,7 @@ module Temporalio | |
| 556 654 | 
             
                    @retry_policy = retry_policy
         | 
| 557 655 | 
             
                    @memo = memo
         | 
| 558 656 | 
             
                    @search_attributes = search_attributes
         | 
| 657 | 
            +
                    @arg_hints = arg_hints
         | 
| 559 658 | 
             
                    @headers = headers
         | 
| 560 659 | 
             
                    Workflow._current.initialize_continue_as_new_error(self)
         | 
| 561 660 | 
             
                  end
         | 
| @@ -571,5 +670,29 @@ module Temporalio | |
| 571 670 | 
             
                # error can still be used with configuring workflow failure exception types to change non-deterministic errors from
         | 
| 572 671 | 
             
                # task failures to workflow failures.
         | 
| 573 672 | 
             
                class NondeterminismError < Error; end
         | 
| 673 | 
            +
             | 
| 674 | 
            +
                # Mutex is a workflow-safe wrapper around {::Mutex}.
         | 
| 675 | 
            +
                #
         | 
| 676 | 
            +
                # As of this writing, all methods on Mutex are safe for workflow use and are implicitly made deterministic by the
         | 
| 677 | 
            +
                # Fiber scheduler. The primary reason this is wrapped as safe is to be able to catch unintentional uses of Mutex by
         | 
| 678 | 
            +
                # non-workflow-safe code. However, users may prefer to use the more powerful {wait_condition} approach as a mutex
         | 
| 679 | 
            +
                # (e.g. wait until a certain attribute is set to false then set it to true before continuing).
         | 
| 680 | 
            +
                Mutex = Unsafe._wrap_ruby_class_as_legal(::Mutex)
         | 
| 681 | 
            +
             | 
| 682 | 
            +
                # Queue is a workflow-safe wrapper around {::Queue}.
         | 
| 683 | 
            +
                #
         | 
| 684 | 
            +
                # As of this writing, all methods on Queue are safe for workflow use and are implicitly made deterministic by the
         | 
| 685 | 
            +
                # Fiber scheduler. The primary reason this is wrapped as safe is to be able to catch unintentional uses of Queue by
         | 
| 686 | 
            +
                # non-workflow-safe code. However, users may prefer to use the more powerful {wait_condition} approach as a queue
         | 
| 687 | 
            +
                # (e.g. wait until an array is non-empty before continuing).
         | 
| 688 | 
            +
                Queue = Unsafe._wrap_ruby_class_as_legal(::Queue)
         | 
| 689 | 
            +
             | 
| 690 | 
            +
                # SizedQueue is a workflow-safe wrapper around {::SizedQueue}.
         | 
| 691 | 
            +
                #
         | 
| 692 | 
            +
                # As of this writing, all methods on SizedQueue are safe for workflow use and are implicitly made deterministic by
         | 
| 693 | 
            +
                # the Fiber scheduler. The primary reason this is wrapped as safe is to be able to catch unintentional uses of
         | 
| 694 | 
            +
                # SizedQueue by non-workflow-safe code. However, users may prefer to use the more powerful {wait_condition} approach
         | 
| 695 | 
            +
                # as a queue (e.g. wait until an array is non-empty before continuing).
         | 
| 696 | 
            +
                SizedQueue = Unsafe._wrap_ruby_class_as_legal(::SizedQueue)
         | 
| 574 697 | 
             
              end
         | 
| 575 698 | 
             
            end
         | 
    
        data/lib/temporalio.rb
    CHANGED
    
    
    
        data/temporalio.gemspec
    CHANGED
    
    | @@ -23,6 +23,7 @@ Gem::Specification.new do |spec| | |
| 23 23 | 
             
              spec.require_paths = ['lib']
         | 
| 24 24 | 
             
              spec.extensions = ['ext/Cargo.toml']
         | 
| 25 25 | 
             
              spec.metadata['rubygems_mfa_required'] = 'true'
         | 
| 26 | 
            +
              spec.required_ruby_version = '>= 3.2.0'
         | 
| 26 27 |  | 
| 27 28 | 
             
              spec.add_dependency 'google-protobuf', '>= 3.25.0'
         | 
| 28 29 | 
             
              spec.add_dependency 'logger'
         | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: temporalio
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0. | 
| 4 | 
            +
              version: 0.6.0
         | 
| 5 5 | 
             
            platform: arm64-darwin
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Temporal Technologies Inc
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: exe
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2025- | 
| 11 | 
            +
            date: 2025-08-25 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: google-protobuf
         | 
| @@ -50,6 +50,7 @@ files: | |
| 50 50 | 
             
            - Rakefile
         | 
| 51 51 | 
             
            - lib/temporalio.rb
         | 
| 52 52 | 
             
            - lib/temporalio/activity.rb
         | 
| 53 | 
            +
            - lib/temporalio/activity/cancellation_details.rb
         | 
| 53 54 | 
             
            - lib/temporalio/activity/complete_async_error.rb
         | 
| 54 55 | 
             
            - lib/temporalio/activity/context.rb
         | 
| 55 56 | 
             
            - lib/temporalio/activity/definition.rb
         | 
| @@ -61,6 +62,7 @@ files: | |
| 61 62 | 
             
            - lib/temporalio/api/cloud/cloudservice.rb
         | 
| 62 63 | 
             
            - lib/temporalio/api/cloud/cloudservice/v1/request_response.rb
         | 
| 63 64 | 
             
            - lib/temporalio/api/cloud/cloudservice/v1/service.rb
         | 
| 65 | 
            +
            - lib/temporalio/api/cloud/connectivityrule/v1/message.rb
         | 
| 64 66 | 
             
            - lib/temporalio/api/cloud/identity/v1/message.rb
         | 
| 65 67 | 
             
            - lib/temporalio/api/cloud/namespace/v1/message.rb
         | 
| 66 68 | 
             
            - lib/temporalio/api/cloud/nexus/v1/message.rb
         | 
| @@ -101,16 +103,19 @@ files: | |
| 101 103 | 
             
            - lib/temporalio/api/protocol/v1/message.rb
         | 
| 102 104 | 
             
            - lib/temporalio/api/query/v1/message.rb
         | 
| 103 105 | 
             
            - lib/temporalio/api/replication/v1/message.rb
         | 
| 106 | 
            +
            - lib/temporalio/api/rules/v1/message.rb
         | 
| 104 107 | 
             
            - lib/temporalio/api/schedule/v1/message.rb
         | 
| 105 108 | 
             
            - lib/temporalio/api/sdk/v1/enhanced_stack_trace.rb
         | 
| 106 109 | 
             
            - lib/temporalio/api/sdk/v1/task_complete_metadata.rb
         | 
| 107 110 | 
             
            - lib/temporalio/api/sdk/v1/user_metadata.rb
         | 
| 111 | 
            +
            - lib/temporalio/api/sdk/v1/worker_config.rb
         | 
| 108 112 | 
             
            - lib/temporalio/api/sdk/v1/workflow_metadata.rb
         | 
| 109 113 | 
             
            - lib/temporalio/api/taskqueue/v1/message.rb
         | 
| 110 114 | 
             
            - lib/temporalio/api/testservice/v1/request_response.rb
         | 
| 111 115 | 
             
            - lib/temporalio/api/testservice/v1/service.rb
         | 
| 112 116 | 
             
            - lib/temporalio/api/update/v1/message.rb
         | 
| 113 117 | 
             
            - lib/temporalio/api/version/v1/message.rb
         | 
| 118 | 
            +
            - lib/temporalio/api/worker/v1/message.rb
         | 
| 114 119 | 
             
            - lib/temporalio/api/workflow/v1/message.rb
         | 
| 115 120 | 
             
            - lib/temporalio/api/workflowservice.rb
         | 
| 116 121 | 
             
            - lib/temporalio/api/workflowservice/v1/request_response.rb
         | 
| @@ -194,6 +199,7 @@ files: | |
| 194 199 | 
             
            - lib/temporalio/internal/worker/workflow_instance/scheduler.rb
         | 
| 195 200 | 
             
            - lib/temporalio/internal/worker/workflow_worker.rb
         | 
| 196 201 | 
             
            - lib/temporalio/metric.rb
         | 
| 202 | 
            +
            - lib/temporalio/priority.rb
         | 
| 197 203 | 
             
            - lib/temporalio/retry_policy.rb
         | 
| 198 204 | 
             
            - lib/temporalio/runtime.rb
         | 
| 199 205 | 
             
            - lib/temporalio/runtime/metric_buffer.rb
         | 
| @@ -203,16 +209,21 @@ files: | |
| 203 209 | 
             
            - lib/temporalio/testing/activity_environment.rb
         | 
| 204 210 | 
             
            - lib/temporalio/testing/workflow_environment.rb
         | 
| 205 211 | 
             
            - lib/temporalio/version.rb
         | 
| 212 | 
            +
            - lib/temporalio/versioning_override.rb
         | 
| 206 213 | 
             
            - lib/temporalio/worker.rb
         | 
| 207 214 | 
             
            - lib/temporalio/worker/activity_executor.rb
         | 
| 208 215 | 
             
            - lib/temporalio/worker/activity_executor/fiber.rb
         | 
| 209 216 | 
             
            - lib/temporalio/worker/activity_executor/thread_pool.rb
         | 
| 217 | 
            +
            - lib/temporalio/worker/deployment_options.rb
         | 
| 218 | 
            +
            - lib/temporalio/worker/illegal_workflow_call_validator.rb
         | 
| 210 219 | 
             
            - lib/temporalio/worker/interceptor.rb
         | 
| 220 | 
            +
            - lib/temporalio/worker/poller_behavior.rb
         | 
| 211 221 | 
             
            - lib/temporalio/worker/thread_pool.rb
         | 
| 212 222 | 
             
            - lib/temporalio/worker/tuner.rb
         | 
| 213 223 | 
             
            - lib/temporalio/worker/workflow_executor.rb
         | 
| 214 224 | 
             
            - lib/temporalio/worker/workflow_executor/thread_pool.rb
         | 
| 215 225 | 
             
            - lib/temporalio/worker/workflow_replayer.rb
         | 
| 226 | 
            +
            - lib/temporalio/worker_deployment_version.rb
         | 
| 216 227 | 
             
            - lib/temporalio/workflow.rb
         | 
| 217 228 | 
             
            - lib/temporalio/workflow/activity_cancellation_type.rb
         | 
| 218 229 | 
             
            - lib/temporalio/workflow/child_workflow_cancellation_type.rb
         |