5959from .nexus import NexusOperationResult , nexus_request_payload
6060from .retry_policy import TransportRetryPolicy
6161
62- PROTOCOL_VERSION = "1.16 "
62+ PROTOCOL_VERSION = "1.19 "
6363CONTROL_PLANE_VERSION = "2"
6464PORTABLE_WORKER_AFFINITY_CAPABILITY_MANIFEST : dict [str , dict [str , str | bool ]] = {
6565 "local_activities" : {
@@ -4585,7 +4585,7 @@ async def register_worker(
45854585 sdk_version : str | None = None ,
45864586 build_id : str | None = None ,
45874587 capabilities : list [str ] | None = None ,
4588- capability_manifest : dict [str , dict [str , Any ]] | None = None ,
4588+ capability_manifest : dict [str , dict [str , Any ]],
45894589 task_slots : dict [str , int ] | None = None ,
45904590 process_metrics : dict [str , Any ] | None = None ,
45914591 heartbeat_interval_seconds : int | None = None ,
@@ -4596,6 +4596,8 @@ async def register_worker(
45964596 applications should not call this directly — create a
45974597 :class:`~durable_workflow.Worker` instead.
45984598 """
4599+ if capability_manifest is None :
4600+ raise ValueError ("capability_manifest is required for worker registration" )
45994601 if sdk_version is None :
46004602 sdk_version = DEFAULT_SDK_VERSION
46014603 if max_concurrent_workflow_tasks is not None and max_concurrent_workflow_tasks < 1 :
@@ -4616,15 +4618,14 @@ async def register_worker(
46164618 "sdk_version" : sdk_version ,
46174619 "supported_workflow_types" : supported_workflow_types or [],
46184620 "supported_activity_types" : supported_activity_types or [],
4621+ "capability_manifest" : capability_manifest ,
46194622 }
46204623 if workflow_definition_fingerprints is not None :
46214624 body ["workflow_definition_fingerprints" ] = workflow_definition_fingerprints
46224625 if workflow_command_contracts is not None :
46234626 body ["workflow_command_contracts" ] = workflow_command_contracts
46244627 if capabilities is not None :
46254628 body ["capabilities" ] = [capability for capability in capabilities if capability ]
4626- if capability_manifest is not None :
4627- body ["capability_manifest" ] = capability_manifest
46284629 if build_id is not None :
46294630 body ["build_id" ] = build_id
46304631 if max_concurrent_workflow_tasks is not None :
0 commit comments