runner.py
 1  # Copyright 2026 Alibaba Group Holding Ltd.
 2  #
 3  # Licensed under the Apache License, Version 2.0 (the "License");
 4  # you may not use this file except in compliance with the License.
 5  # You may obtain a copy of the License at
 6  #
 7  #     http://www.apache.org/licenses/LICENSE-2.0
 8  #
 9  # Unless required by applicable law or agreed to in writing, software
10  # distributed under the License is distributed on an "AS IS" BASIS,
11  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  # See the License for the specific language governing permissions and
13  # limitations under the License.
14  
15  """Backward-compatible aliases for the unified renew-intent consumer."""
16  
17  from __future__ import annotations
18  
19  from typing import Optional
20  
21  from opensandbox_server.config import AppConfig
22  from opensandbox_server.integrations.renew_intent.consumer import (
23      RenewIntentConsumer,
24      start_renew_intent_consumer,
25  )
26  from opensandbox_server.services.extension_service import ExtensionService
27  from opensandbox_server.services.sandbox_service import SandboxService
28  
29  RenewIntentRunner = RenewIntentConsumer
30  
31  
32  async def start_renew_intent_runner(
33      app_config: AppConfig,
34      sandbox_service: SandboxService | None = None,
35      extension_service: ExtensionService | None = None,
36  ) -> Optional[RenewIntentConsumer]:
37      return await start_renew_intent_consumer(
38          app_config, sandbox_service, extension_service
39      )