|
4 | 4 | from pathlib import Path |
5 | 5 |
|
6 | 6 | from uipath.runtime import ( |
| 7 | + UiPathRuntimeFactorySettings, |
7 | 8 | UiPathRuntimeProtocol, |
| 9 | + UiPathRuntimeStorageProtocol, |
8 | 10 | ) |
9 | 11 |
|
10 | 12 | from demo.mock_greeting_runtime import ( |
@@ -75,25 +77,13 @@ async def new_runtime( |
75 | 77 | ) |
76 | 78 | return MockGreetingRuntime(entrypoint=entrypoint) |
77 | 79 |
|
78 | | - async def discover_runtimes(self) -> list[UiPathRuntimeProtocol]: |
79 | | - """Return prototype instances for discovery (not really used by the UI).""" |
80 | | - runtimes: list[UiPathRuntimeProtocol] = [ |
81 | | - MockGreetingRuntime(entrypoint=ENTRYPOINT_GREETING), |
82 | | - MockNumberAnalyticsRuntime(entrypoint=ENTRYPOINT_ANALYZE_NUMBERS), |
83 | | - MockSupportChatRuntime(entrypoint=ENTRYPOINT_SUPPORT_CHAT), |
84 | | - MockTelemetryRuntime(entrypoint=ENTRYPOINT_TELEMETRY), |
85 | | - ] |
86 | | - |
87 | | - for entrypoint in TEMPLATE_RUNTIMES.keys(): |
88 | | - try: |
89 | | - runtime: UiPathRuntimeProtocol = await self.new_runtime( |
90 | | - entrypoint, runtime_id="discovery" |
91 | | - ) |
92 | | - runtimes.append(runtime) |
93 | | - except Exception as e: |
94 | | - logger.error(f"Failed to load template runtime '{entrypoint}': {e}") |
| 80 | + async def get_settings(self) -> UiPathRuntimeFactorySettings | None: |
| 81 | + """Return factory settings (no-op for mock).""" |
| 82 | + return UiPathRuntimeFactorySettings() |
95 | 83 |
|
96 | | - return runtimes |
| 84 | + async def get_storage(self) -> UiPathRuntimeStorageProtocol | None: |
| 85 | + """Return factory storage (no-op for mock).""" |
| 86 | + return None |
97 | 87 |
|
98 | 88 | def discover_entrypoints(self) -> list[str]: |
99 | 89 | """Return all available entrypoints.""" |
|
0 commit comments