feat(agent): QuickForm escalation channel models#1686
Conversation
632f670 to
4e26bd0
Compare
Introduce a discriminated-union hierarchy for escalation channels (BaseEscalationChannelProperties, AgentActionCenterEscalationChannel, AgentQuickFormEscalationChannel) so QuickForm escalations carry their FormLib schema instead of an Action Center app reference. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
4e26bd0 to
dcceeaa
Compare
🚨 Heads up:
|
There was a problem hiding this comment.
Pull request overview
This PR extends the uipath.agent.models.agent model layer to represent QuickForm escalations as a channel variant of existing escalation resources, and updates tests + package versioning accordingly.
Changes:
- Introduces explicit escalation channel variants (Action Center vs. QuickForm) with distinct
propertiesmodels. - Refactors escalation channel parsing toward a discriminated union keyed by
type, and updates tests around channel/property behavior. - Bumps the
uipathpackage version to2.10.79.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| packages/uipath/src/uipath/agent/models/agent.py | Adds QuickForm channel/property models and refactors escalation channel/resource discrimination. |
| packages/uipath/tests/agent/models/test_agent.py | Updates channel model imports/usages and adds tests for QuickForm schema/schema_id behavior. |
| packages/uipath/pyproject.toml | Bumps package version to 2.10.79. |
| packages/uipath/uv.lock | Updates locked package version entry to 2.10.79. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
updated the version needed by the tests in: UiPath/uipath-integrations-python#353 |
…ield Address PR review: - Remove AgentUnknownEscalationChannel and the UNKNOWN channel-type enum member. The runtime cannot execute an unrecognized escalation channel, so an unknown type is now rejected at parse time rather than silently routed to a fallback (Field(discriminator="type") raises on unknown values). - Rename AgentQuickFormChannelProperties.schema -> form_schema (alias "schema") to stop shadowing BaseModel.schema(); drops the type: ignore. - Lock the intended break with a test asserting unknown channel types fail. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The channel refactor had renamed the concrete Action Center channel to AgentActionCenterEscalationChannel and rebound AgentEscalationChannel to an Annotated[Union[...]]. A typing.Union is not instantiable, so every consumer that builds AgentEscalationChannel(...) directly broke — e.g. uipath-langchain main's escalation test fixtures fail with "TypeError: Cannot instantiate typing.Union" under the cross-repo test. Restore AgentEscalationChannel as the concrete Action Center channel and move the discriminated union to EscalationChannel (matching the existing EscalationResourceConfig union-naming convention) for the channels field. Runtime parsing, QuickForm routing, and unknown-type rejection are unchanged. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
🚨 Heads up:
|
|
|
the failing test sends an invalid value to channel:type as |
| class AgentEscalationChannelType(str, CaseInsensitiveEnum): | ||
| """Agent escalation channel type enumeration.""" | ||
|
|
||
| ACTION_CENTER = "actionCenter" |
There was a problem hiding this comment.
nit: maybe leave a comment that this refers to action center apps specifically



Summary
Agent-model support for QuickForm escalations on low-code agents. QuickForm is a channel variant of the standard escalation (told apart by channel
type), not a separate resource type.Changes (
agent/models/agent.py)AgentEscalationChannelstays the concrete Action Center channel (typeactionCenter);AgentQuickFormEscalationChannelis the quick-form variant (actionCenterQuickForm). Thechannelsfield is typed as theEscalationChanneldiscriminated union (Field(discriminator="type")+ case-insensitive normalization). An unrecognized channeltypeis rejected at parse time — the runtime cannot execute a channel it does not know, so there is deliberately no silent fallback.AgentQuickFormChannelPropertiescarries the FormLib schema inline asform_schema(aliasschema, with aschema_idaccessor);AgentEscalationChannelProperties(Action Center) owns the app fields (app_name,app_version,folder_name,resource_key); the shared base keeps only the actionable-message fields.AgentEscalationResourceConfig(escalationType=0, shared by app-task and QuickForm) andAgentIxpVsEscalationResourceConfig(escalationType=1).Package bumped to
2.10.79.Compatibility
AgentEscalationChannelremains a concrete, directly-instantiable model under its original name, so existing consumers that buildAgentEscalationChannel(...)keep working (verified against theuipath-langchaincross-test). The only intentional break is that unknown/future channel types now raise on parse instead of falling back.🤖 Generated with Claude Code