Skip to content

Commit 5fe36f0

Browse files
fix: fix hitl redirect link
1 parent a39cee7 commit 5fe36f0

2 files changed

Lines changed: 7 additions & 18 deletions

File tree

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-langchain"
3-
version = "0.4.7"
3+
version = "0.4.8"
44
description = "Python SDK that enables developers to build and deploy LangGraph agents to the UiPath Cloud Platform"
55
readme = { file = "README.md", content-type = "text/markdown" }
66
requires-python = ">=3.11"
77
dependencies = [
8-
"uipath>=2.5.6, <2.6.0",
8+
"uipath>=2.5.10, <2.6.0",
99
"uipath-runtime>=0.5.0,<0.6.0",
1010
"langgraph>=1.0.0, <2.0.0",
1111
"langchain-core>=1.2.5, <2.0.0",

src/uipath_langchain/agent/guardrails/actions/escalate_action.py

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -82,14 +82,14 @@ async def _node(
8282
"GuardrailName": guardrail.name,
8383
"GuardrailDescription": guardrail.description,
8484
"Component": scope.name.lower(),
85+
"TenantName": UiPathConfig.tenant_name,
8586
"ExecutionStage": _execution_stage_to_string(execution_stage),
8687
"GuardrailResult": state.guardrail_validation_result,
8788
}
8889

8990
# Add tenant and trace URL if base_url is configured
9091
cloud_base_url = UiPathConfig.base_url
9192
if cloud_base_url is not None:
92-
data["TenantName"] = _get_tenant_name(cloud_base_url)
9393
data["AgentTrace"] = _get_agent_execution_viewer_url(cloud_base_url)
9494

9595
# Add stage-specific fields
@@ -633,19 +633,6 @@ def _execution_stage_to_string(
633633
return "PostExecution"
634634

635635

636-
def _get_tenant_name(cloud_base_url: str) -> str:
637-
"""Extract the tenant name from the UiPath base URL.
638-
639-
Args:
640-
cloud_base_url: The UiPath cloud base URL to extract tenant name from.
641-
642-
Returns:
643-
str: The tenant name extracted from the base URL.
644-
"""
645-
uiPath_Url = UiPathUrl(cloud_base_url)
646-
return uiPath_Url.tenant_name
647-
648-
649636
def _get_agent_execution_viewer_url(cloud_base_url: str) -> str:
650637
"""Generate the agent execution viewer URL based on execution context.
651638
@@ -661,15 +648,17 @@ def _get_agent_execution_viewer_url(cloud_base_url: str) -> str:
661648
"""
662649
uiPath_Url = UiPathUrl(cloud_base_url)
663650
organization_id = UiPathConfig.organization_id
664-
agent_id = UiPathConfig.project_id
651+
project_id = UiPathConfig.project_id
665652

666653
# Route to appropriate URL based on source
667654
if UiPathConfig.is_studio_project:
668-
return f"{uiPath_Url.base_url}/{organization_id}/studio_/designer/{agent_id}"
655+
solutionId = UiPathConfig.studio_solution_id
656+
return f"{uiPath_Url.base_url}/{organization_id}/studio_/designer/{project_id}?solutionId={solutionId}"
669657
else:
670658
execution_folder_id = UiPathConfig.folder_key
671659
process_uuid = UiPathConfig.process_uuid
672660
trace_id = UiPathConfig.trace_id
673661
package_version = UiPathConfig.process_version
662+
agent_id = UiPathConfig.agent_id
674663

675664
return f"{uiPath_Url.base_url}/{organization_id}/agents_/deployed/{execution_folder_id}/{process_uuid}/{agent_id}/{package_version}/traces/{trace_id}"

0 commit comments

Comments
 (0)