Skip to content

feat: JIT escalation apps support#1000

Open
Sandeepan-Ghosh-0312 wants to merge 4 commits into
mainfrom
feat/JITEscalationAppsSupport
Open

feat: JIT escalation apps support#1000
Sandeepan-Ghosh-0312 wants to merge 4 commits into
mainfrom
feat/JITEscalationAppsSupport

Conversation

@Sandeepan-Ghosh-0312

Copy link
Copy Markdown

No description provided.

Copilot AI review requested due to automatic review settings July 21, 2026 10:59

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds support for creating Action Center escalation tasks against JIT (undeployed/debug) apps by forwarding additional app-resolution fields during debug (Studio) runs, and introducing a dedicated runtime error when required debug configuration is missing.

Changes:

  • Forward JIT-related fields (app_project_key, app_type, is_debug, action_schema) when creating Action Center escalation tasks.
  • Raise a new AgentRuntimeError code when running in debug mode without a configured app project key.
  • Add tests validating JIT field forwarding and the new debug-mode validation behavior.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.

File Description
tests/agent/tools/test_escalation_tool.py Adds tests for JIT field forwarding + missing project key behavior in debug mode.
src/uipath_langchain/agent/tools/escalation_tool.py Adds debug detection and attempts to pass JIT fields into escalation task creation.
src/uipath_langchain/agent/exceptions/exceptions.py Introduces a new AgentRuntimeErrorCode for missing JIT project key in debug mode.

Comment on lines +313 to +315
is_debug = UiPathConfig.is_rooted_to_debug_job()
jit_project_key = channel.properties.project_key
action_schema = channel.properties.action_schema
"outcome": cached_result.outcome,
}

if is_debug and not jit_project_key:
Comment on lines 363 to 375
client = UiPath()
created_task = await create_task_for_channel(
client,
channel,
title=task_title,
data=serialized_data,
recipient=recipient,
folder_path=folder_path,
app_project_key=jit_project_key,
app_type=channel.properties.app_type,
is_debug=is_debug,
action_schema=action_schema,
)
Comment on lines +265 to +267
tool = create_escalation_tool(escalation_resource_jit)
call = ToolCall(args={}, id="test-call", name=tool.name)
await tool.awrapper(tool, call, {}) # type: ignore[attr-defined]
Comment on lines +292 to +297
tool = create_escalation_tool(escalation_resource)
call = ToolCall(args={}, id="test-call", name=tool.name)

with pytest.raises(AgentRuntimeError):
await tool.awrapper(tool, call, {}) # type: ignore[attr-defined]
mock_client.tasks.create_async.assert_not_called()
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
48.1% Coverage on New Code (required ≥ 90%)

See analysis details on SonarQube Cloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants