Skip to content

Commit 0fd4e29

Browse files
committed
fix: add graph runtime schema
1 parent 94a61e9 commit 0fd4e29

File tree

3 files changed

+42
-7
lines changed

3 files changed

+42
-7
lines changed

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
[project]
22
name = "uipath-runtime"
3-
version = "0.0.9"
3+
version = "0.0.10"
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"
77
dependencies = [
8-
"pydantic>=2.12.3",
9-
"uipath-core>=0.0.4, <0.1.0",
8+
"pydantic==2.12.3",
9+
"uipath-core==0.0.4",
1010
]
1111
classifiers = [
1212
"Intended Audience :: Developers",

src/uipath/runtime/schema.py

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""UiPath Runtime Schema Definitions."""
22

3-
from typing import Any
3+
from typing import Any, Optional
44

55
from pydantic import BaseModel, ConfigDict, Field
66

@@ -13,6 +13,35 @@
1313
)
1414

1515

16+
class UiPathRuntimeNode(BaseModel):
17+
"""Represents a node in the runtime graph."""
18+
19+
id: str = Field(..., description="Unique node identifier")
20+
name: str = Field(..., description="Display name of the node")
21+
type: str = Field(..., description="Node type (e.g., 'tool', 'model')")
22+
23+
model_config = COMMON_MODEL_SCHEMA
24+
25+
26+
class UiPathRuntimeEdge(BaseModel):
27+
"""Represents an edge/connection in the runtime graph."""
28+
29+
source: str = Field(..., description="Source node")
30+
target: str = Field(..., description="Target node")
31+
label: Optional[str] = Field(None, description="Edge label or condition")
32+
33+
model_config = COMMON_MODEL_SCHEMA
34+
35+
36+
class UiPathRuntimeGraph(BaseModel):
37+
"""Represents the runtime structure as a graph."""
38+
39+
nodes: list[UiPathRuntimeNode] = Field(default_factory=list)
40+
edges: list[UiPathRuntimeEdge] = Field(default_factory=list)
41+
42+
model_config = COMMON_MODEL_SCHEMA
43+
44+
1645
class UiPathRuntimeSchema(BaseModel):
1746
"""Represents the UiPath runtime schema."""
1847

@@ -21,10 +50,16 @@ class UiPathRuntimeSchema(BaseModel):
2150
type: str = Field(..., alias="type")
2251
input: dict[str, Any] = Field(..., alias="input")
2352
output: dict[str, Any] = Field(..., alias="output")
53+
graph: Optional[UiPathRuntimeGraph] = Field(
54+
None, description="Runtime graph structure for debugging"
55+
)
2456

2557
model_config = COMMON_MODEL_SCHEMA
2658

2759

2860
__all__ = [
2961
"UiPathRuntimeSchema",
62+
"UiPathRuntimeGraph",
63+
"UiPathRuntimeNode",
64+
"UiPathRuntimeEdge",
3065
]

uv.lock

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

0 commit comments

Comments
 (0)