@@ -12,6 +12,7 @@ import google.protobuf.duration_pb2
1212import google .protobuf .empty_pb2
1313import google .protobuf .internal .containers
1414import google .protobuf .message
15+ import google .protobuf .timestamp_pb2
1516
1617import temporalio .api .enums .v1 .common_pb2
1718import temporalio .api .enums .v1 .event_type_pb2
@@ -1255,3 +1256,115 @@ class OnConflictOptions(google.protobuf.message.Message):
12551256 ) -> None : ...
12561257
12571258global___OnConflictOptions = OnConflictOptions
1259+
1260+ class TimeSkippingConfig (google .protobuf .message .Message ):
1261+ """The configuration for time skipping of a workflow execution (a chain of runs including retries, cron, continue-as-new).
1262+ When time skipping is enabled, virtual time advances automatically whenever there is no in-flight work.
1263+ In-flight work includes activities, child workflows, Nexus operations, signal/cancel external workflow operations,
1264+ and possibly other features added in the future.
1265+ User timers are not classified as in-flight work and will be skipped over; the virtual clock may also skip to the
1266+ time point of the registered fast forward when there is no in-flight work.
1267+ When time is skipped, a WorkflowExecutionTimeSkippingTransitionedEvent will be
1268+ added to the workflow history to capture the state changes.
1269+
1270+ For child workflows, by default, if the parent execution is skipping time, the child execution will also skip time,
1271+ but a parent's fast_forward won't affect its child's execution. A flag is provided to disable propagation of the
1272+ "enabled" flag to child workflows; regardless of that flag, a child workflow inherits the virtual time from the
1273+ parent execution as its start time.
1274+ """
1275+
1276+ DESCRIPTOR : google .protobuf .descriptor .Descriptor
1277+
1278+ ENABLED_FIELD_NUMBER : builtins .int
1279+ FAST_FORWARD_FIELD_NUMBER : builtins .int
1280+ DISABLE_CHILD_PROPAGATION_FIELD_NUMBER : builtins .int
1281+ enabled : builtins .bool
1282+ """Enables or disables time skipping for this workflow execution."""
1283+ @property
1284+ def fast_forward (self ) -> google .protobuf .duration_pb2 .Duration :
1285+ """Optionally fast-forward the current workflow execution by this duration ahead of current workflow execution time.
1286+ After the fast-forward completes, time skipping is disabled, and this
1287+ action is recorded in the WorkflowExecutionTimeSkippingTransitionedEvent. It can be re-enabled by
1288+ setting `enabled` to true or setting `fast_forward` again via UpdateWorkflowExecutionOptions.
1289+ The current workflow execution is a chain of runs (retries, cron, continue-as-new);
1290+ child workflows are separate executions, so this fast_forward won't affect them.
1291+
1292+ For a given workflow execution, only one active fast-forward is allowed at a time.
1293+ If a new fast-forward is set via UpdateWorkflowExecutionOptions before the previous
1294+ one completes, the new one will override the previous one.
1295+ If the fast-forward duration exceeds the remaining execution timeout, time will only
1296+ be fast-forwarded up to the end of the execution.
1297+ """
1298+ disable_child_propagation : builtins .bool
1299+ """By default, child workflows inherit the "enabled" flag when they are started.
1300+ This flag disables that inheritance.
1301+ """
1302+ def __init__ (
1303+ self ,
1304+ * ,
1305+ enabled : builtins .bool = ...,
1306+ fast_forward : google .protobuf .duration_pb2 .Duration | None = ...,
1307+ disable_child_propagation : builtins .bool = ...,
1308+ ) -> None : ...
1309+ def HasField (
1310+ self , field_name : typing_extensions .Literal ["fast_forward" , b"fast_forward" ]
1311+ ) -> builtins .bool : ...
1312+ def ClearField (
1313+ self ,
1314+ field_name : typing_extensions .Literal [
1315+ "disable_child_propagation" ,
1316+ b"disable_child_propagation" ,
1317+ "enabled" ,
1318+ b"enabled" ,
1319+ "fast_forward" ,
1320+ b"fast_forward" ,
1321+ ],
1322+ ) -> None : ...
1323+
1324+ global___TimeSkippingConfig = TimeSkippingConfig
1325+
1326+ class TimeSkippingStatePropagation (google .protobuf .message .Message ):
1327+ """The time-skipping state that needs to be propagated from a parent workflow to a child workflow,
1328+ or through a chain of runs.
1329+ """
1330+
1331+ DESCRIPTOR : google .protobuf .descriptor .Descriptor
1332+
1333+ INITIAL_SKIPPED_DURATION_FIELD_NUMBER : builtins .int
1334+ FAST_FORWARD_TARGET_TIME_FIELD_NUMBER : builtins .int
1335+ @property
1336+ def initial_skipped_duration (self ) -> google .protobuf .duration_pb2 .Duration :
1337+ """The time skipped by the previous execution that started this workflow.
1338+ It can happen in child workflows and a chain of runs (CaN, cron, retry).
1339+ """
1340+ @property
1341+ def fast_forward_target_time (self ) -> google .protobuf .timestamp_pb2 .Timestamp :
1342+ """If there is a fast-forward action set for the previous run in a chain of runs,
1343+ the target time should be propagated to the next run as well.
1344+ """
1345+ def __init__ (
1346+ self ,
1347+ * ,
1348+ initial_skipped_duration : google .protobuf .duration_pb2 .Duration | None = ...,
1349+ fast_forward_target_time : google .protobuf .timestamp_pb2 .Timestamp | None = ...,
1350+ ) -> None : ...
1351+ def HasField (
1352+ self ,
1353+ field_name : typing_extensions .Literal [
1354+ "fast_forward_target_time" ,
1355+ b"fast_forward_target_time" ,
1356+ "initial_skipped_duration" ,
1357+ b"initial_skipped_duration" ,
1358+ ],
1359+ ) -> builtins .bool : ...
1360+ def ClearField (
1361+ self ,
1362+ field_name : typing_extensions .Literal [
1363+ "fast_forward_target_time" ,
1364+ b"fast_forward_target_time" ,
1365+ "initial_skipped_duration" ,
1366+ b"initial_skipped_duration" ,
1367+ ],
1368+ ) -> None : ...
1369+
1370+ global___TimeSkippingStatePropagation = TimeSkippingStatePropagation
0 commit comments