feat: JIT escalation apps support#1000
Open
Sandeepan-Ghosh-0312 wants to merge 4 commits into
Open
Conversation
There was a problem hiding this comment.
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
AgentRuntimeErrorcode 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() |
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


No description provided.