Skip to content

Commit 75a057c

Browse files
viswa-uipathclaude
andcommitted
feat(runtime): expose framework name via factory registry
Each adapter's factory registers itself with a framework name via `UiPathRuntimeFactoryRegistry.register(name=..., ...)`. Consumers that need the framework label for telemetry (governance audit, tracing) can now get it in a single lookup: factory, framework = UiPathRuntimeFactoryRegistry.get_selection(...) This lets the host CLI drop its filesystem-sniffing detection of langgraph.json / llama_index.json / etc. — framework identity now lives with the adapter that owns it. - New `SelectedFactory` NamedTuple (factory, framework) - New `get_selection()` method with same resolution rules as `get()` - `get()` unchanged in signature and return type — delegates to `get_selection().factory`; existing callers keep working Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 0734fca commit 75a057c

5 files changed

Lines changed: 15 additions & 4 deletions

File tree

‎pyproject.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "uipath-runtime"
3-
version = "0.11.6"
3+
version = "0.11.7"
44
description = "Runtime abstractions and interfaces for building agents and automation scripts in the UiPath ecosystem"
55
readme = { file = "README.md", content-type = "text/markdown" }
66
requires-python = ">=3.11"

‎src/uipath/runtime/__init__.py‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@
2929
UiPathRuntimeFactoryProtocol,
3030
UiPathRuntimeFactorySettings,
3131
)
32-
from uipath.runtime.registry import UiPathRuntimeFactoryRegistry
32+
from uipath.runtime.registry import (
33+
UiPathRuntimeFactoryRegistry,
34+
)
3335
from uipath.runtime.result import (
3436
UiPathRuntimeResult,
3537
UiPathRuntimeStatus,

‎src/uipath/runtime/factory.py‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ class UiPathRuntimeFactorySettings(BaseModel):
1919

2020
trace_settings: UiPathTraceSettings | None = None
2121

22+
agent_type: str | None = None
23+
24+
agent_framework: str | None = None
25+
2226

2327
class UiPathRuntimeFactoryProtocol(
2428
UiPathDisposableProtocol,

‎src/uipath/runtime/registry.py‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ def register(
2525
"""Register factory callable with its config file indicator.
2626
2727
Args:
28-
name: Factory identifier
28+
name: Registry key used for explicit ``get(name=...)`` lookup
29+
and as the default identifier when no config file matches.
2930
factory_callable: Callable that accepts context and returns a factory instance
3031
config_file: Config file name that indicates this factory should be used
3132
"""
@@ -44,6 +45,10 @@ def get(
4445
) -> UiPathRuntimeFactoryProtocol:
4546
"""Get factory instance by name or auto-detect from config files.
4647
48+
Resolution order: explicit ``name`` -> auto-detect by config
49+
file in reverse registration order -> registered default. Raises
50+
:class:`ValueError` when nothing matches and no default is set.
51+
4752
Args:
4853
name: Optional factory name
4954
search_path: Path to search for config files

‎uv.lock‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)