Skip to content

Commit d2d7ced

Browse files
fix: fix hitl redirect link
1 parent 0ef5fc8 commit d2d7ced

3 files changed

Lines changed: 13 additions & 24 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.5.2"
3+
version = "0.5.3"
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.6.0,<2.7.0",
8+
"uipath>=2.6.6,<2.7.0",
99
"uipath-runtime>=0.6.0, <0.7.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: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -94,14 +94,14 @@ async def _node(
9494
"GuardrailName": guardrail.name,
9595
"GuardrailDescription": guardrail.description,
9696
"Component": _build_component_name(scope, guarded_component_name),
97+
"TenantName": UiPathConfig.tenant_name,
9798
"ExecutionStage": _execution_stage_to_string(execution_stage),
9899
"GuardrailResult": state.inner_state.guardrail_validation_details,
99100
}
100101

101102
# Add tenant and trace URL if base_url is configured
102103
cloud_base_url = UiPathConfig.base_url
103104
if cloud_base_url is not None:
104-
data["TenantName"] = _get_tenant_name(cloud_base_url)
105105
data["AgentTrace"] = _get_agent_execution_viewer_url(cloud_base_url)
106106

107107
# Add stage-specific fields
@@ -689,19 +689,6 @@ def _execution_stage_to_string(
689689
return "PostExecution"
690690

691691

692-
def _get_tenant_name(cloud_base_url: str) -> str:
693-
"""Extract the tenant name from the UiPath base URL.
694-
695-
Args:
696-
cloud_base_url: The UiPath cloud base URL to extract tenant name from.
697-
698-
Returns:
699-
str: The tenant name extracted from the base URL.
700-
"""
701-
uiPath_Url = UiPathUrl(cloud_base_url)
702-
return uiPath_Url.tenant_name
703-
704-
705692
def _get_agent_execution_viewer_url(cloud_base_url: str) -> str:
706693
"""Generate the agent execution viewer URL based on execution context.
707694
@@ -717,15 +704,17 @@ def _get_agent_execution_viewer_url(cloud_base_url: str) -> str:
717704
"""
718705
uiPath_Url = UiPathUrl(cloud_base_url)
719706
organization_id = UiPathConfig.organization_id
720-
agent_id = UiPathConfig.project_id
707+
project_id = UiPathConfig.project_id
721708

722709
# Route to appropriate URL based on source
723710
if UiPathConfig.is_studio_project:
724-
return f"{uiPath_Url.base_url}/{organization_id}/studio_/designer/{agent_id}"
711+
solutionId = UiPathConfig.studio_solution_id
712+
return f"{uiPath_Url.base_url}/{organization_id}/studio_/designer/{project_id}?solutionId={solutionId}"
725713
else:
726714
execution_folder_id = UiPathConfig.folder_key
727715
process_uuid = UiPathConfig.process_uuid
728716
trace_id = UiPathConfig.trace_id
729717
package_version = UiPathConfig.process_version
718+
project_key = UiPathConfig.project_key
730719

731-
return f"{uiPath_Url.base_url}/{organization_id}/agents_/deployed/{execution_folder_id}/{process_uuid}/{agent_id}/{package_version}/traces/{trace_id}"
720+
return f"{uiPath_Url.base_url}/{organization_id}/agents_/deployed/{execution_folder_id}/{process_uuid}/{project_key}/{package_version}/traces/{trace_id}"

uv.lock

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

0 commit comments

Comments
 (0)