Skip to content

Commit d495aac

Browse files
authored
Merge pull request #38 from UiPath/fix/handle_runtime_schema_errors
fix: update runtime factory contracts
2 parents 1768d6b + 1b7484a commit d495aac

3 files changed

Lines changed: 30 additions & 40 deletions

File tree

demo/mock_factory.py

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
from pathlib import Path
55

66
from uipath.runtime import (
7+
UiPathRuntimeFactorySettings,
78
UiPathRuntimeProtocol,
9+
UiPathRuntimeStorageProtocol,
810
)
911

1012
from demo.mock_greeting_runtime import (
@@ -75,25 +77,13 @@ async def new_runtime(
7577
)
7678
return MockGreetingRuntime(entrypoint=entrypoint)
7779

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()
9583

96-
return runtimes
84+
async def get_storage(self) -> UiPathRuntimeStorageProtocol | None:
85+
"""Return factory storage (no-op for mock)."""
86+
return None
9787

9888
def discover_entrypoints(self) -> list[str]:
9989
"""Return all available entrypoints."""

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
[project]
22
name = "uipath-dev"
3-
version = "0.0.19"
3+
version = "0.0.20"
44
description = "UiPath Developer Console"
55
readme = { file = "README.md", content-type = "text/markdown" }
66
requires-python = ">=3.11"
77
dependencies = [
8-
"uipath-runtime>=0.5.0, <0.6.0",
8+
"uipath-runtime>=0.6.0, <0.7.0",
99
"textual>=7.2.0, <8.0.0",
1010
"pyperclip>=1.11.0, <2.0.0",
1111
]

uv.lock

Lines changed: 20 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)