Skip to content

Commit e36cfb4

Browse files
fix(platform): move interrupt models from common to resume_triggers
common/interrupt_models.py imported action_center, attachments, context_grounding, documents, and orchestrator at runtime, forming a cycle cluster around common — the same layering inversion class that broke 0.1.89 (only masked by import ordering). The models are HITL suspend/resume payloads consumed solely by resume_triggers, so they move into that package; all former upward edges now point downward and the import-linter contract passes with zero ignores. The models are importable from uipath.platform.resume_triggers. No re-export shim in common — an eager one recreates the cycle and a lazy one still violates the layering contract. Known external usages (uipath-langchain-python docs/samples/test mocks, POC repos) import from uipath.platform.common and need a coordinated update; none are published package sources. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 7b347b3 commit e36cfb4

7 files changed

Lines changed: 98 additions & 99 deletions

File tree

packages/uipath-platform/src/uipath/platform/common/__init__.py

Lines changed: 0 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -41,34 +41,6 @@
4141
from ._user_agent import user_agent_value
4242
from .auth import TokenData
4343
from .dynamic_schema import jsonschema_to_pydantic
44-
from .interrupt_models import (
45-
CreateBatchTransform,
46-
CreateDeepRag,
47-
CreateDeepRagRaw,
48-
CreateEphemeralIndex,
49-
CreateEphemeralIndexRaw,
50-
CreateEscalation,
51-
CreateTask,
52-
DocumentExtraction,
53-
DocumentExtractionValidation,
54-
InvokeProcess,
55-
InvokeProcessRaw,
56-
InvokeSystemAgent,
57-
WaitBatchTransform,
58-
WaitDeepRag,
59-
WaitDeepRagRaw,
60-
WaitDocumentExtraction,
61-
WaitDocumentExtractionValidation,
62-
WaitEphemeralIndex,
63-
WaitEphemeralIndexRaw,
64-
WaitEscalation,
65-
WaitIntegrationEvent,
66-
WaitJob,
67-
WaitJobRaw,
68-
WaitSystemAgent,
69-
WaitTask,
70-
WaitUntil,
71-
)
7244
from .paging import PagedResult
7345
from .timeout import (
7446
UiPathTimeoutError,
@@ -86,33 +58,7 @@
8658
"FolderContext",
8759
"TokenData",
8860
"UiPathConfig",
89-
"CreateTask",
90-
"CreateEscalation",
91-
"WaitEscalation",
92-
"InvokeProcess",
93-
"InvokeProcessRaw",
94-
"WaitTask",
95-
"WaitJob",
96-
"WaitJobRaw",
9761
"PagedResult",
98-
"CreateDeepRag",
99-
"CreateDeepRagRaw",
100-
"WaitDeepRag",
101-
"WaitDeepRagRaw",
102-
"CreateBatchTransform",
103-
"WaitBatchTransform",
104-
"DocumentExtraction",
105-
"WaitDocumentExtraction",
106-
"InvokeSystemAgent",
107-
"WaitSystemAgent",
108-
"CreateEphemeralIndex",
109-
"CreateEphemeralIndexRaw",
110-
"WaitEphemeralIndex",
111-
"WaitEphemeralIndexRaw",
112-
"DocumentExtractionValidation",
113-
"WaitDocumentExtractionValidation",
114-
"WaitIntegrationEvent",
115-
"WaitUntil",
11662
"RequestSpec",
11763
"Endpoint",
11864
"UiPathUrl",

packages/uipath-platform/src/uipath/platform/resume_triggers/__init__.py

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,34 @@
66
UiPathResumeTriggerHandler,
77
UiPathResumeTriggerReader,
88
)
9+
from .interrupt_models import (
10+
CreateBatchTransform,
11+
CreateDeepRag,
12+
CreateDeepRagRaw,
13+
CreateEphemeralIndex,
14+
CreateEphemeralIndexRaw,
15+
CreateEscalation,
16+
CreateTask,
17+
DocumentExtraction,
18+
DocumentExtractionValidation,
19+
InvokeProcess,
20+
InvokeProcessRaw,
21+
InvokeSystemAgent,
22+
WaitBatchTransform,
23+
WaitDeepRag,
24+
WaitDeepRagRaw,
25+
WaitDocumentExtraction,
26+
WaitDocumentExtractionValidation,
27+
WaitEphemeralIndex,
28+
WaitEphemeralIndexRaw,
29+
WaitEscalation,
30+
WaitIntegrationEvent,
31+
WaitJob,
32+
WaitJobRaw,
33+
WaitSystemAgent,
34+
WaitTask,
35+
WaitUntil,
36+
)
937

1038
__all__ = [
1139
"UiPathResumeTriggerReader",
@@ -14,4 +42,30 @@
1442
"PropertyName",
1543
"TriggerMarker",
1644
"is_no_content_marker",
45+
"CreateBatchTransform",
46+
"CreateDeepRag",
47+
"CreateDeepRagRaw",
48+
"CreateEphemeralIndex",
49+
"CreateEphemeralIndexRaw",
50+
"CreateEscalation",
51+
"CreateTask",
52+
"DocumentExtraction",
53+
"DocumentExtractionValidation",
54+
"InvokeProcess",
55+
"InvokeProcessRaw",
56+
"InvokeSystemAgent",
57+
"WaitBatchTransform",
58+
"WaitDeepRag",
59+
"WaitDeepRagRaw",
60+
"WaitDocumentExtraction",
61+
"WaitDocumentExtractionValidation",
62+
"WaitEphemeralIndex",
63+
"WaitEphemeralIndexRaw",
64+
"WaitEscalation",
65+
"WaitIntegrationEvent",
66+
"WaitJob",
67+
"WaitJobRaw",
68+
"WaitSystemAgent",
69+
"WaitTask",
70+
"WaitUntil",
1771
]

packages/uipath-platform/src/uipath/platform/resume_triggers/_protocol.py

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,25 @@
2424
from uipath.platform.action_center import Task
2525
from uipath.platform.action_center.tasks import TaskStatus
2626
from uipath.platform.common._config import UiPathConfig
27-
from uipath.platform.common.interrupt_models import (
27+
from uipath.platform.connections import EventArguments
28+
from uipath.platform.context_grounding import DeepRagStatus, IndexStatus
29+
from uipath.platform.context_grounding.context_grounding_index import (
30+
ContextGroundingIndex,
31+
)
32+
from uipath.platform.errors import (
33+
BatchTransformFailedException,
34+
BatchTransformNotCompleteException,
35+
OperationNotCompleteException,
36+
)
37+
from uipath.platform.orchestrator.job import JobState
38+
from uipath.platform.resume_triggers._enums import (
39+
ExternalTrigger,
40+
ExternalTriggerType,
41+
PropertyName,
42+
TriggerMarker,
43+
)
44+
45+
from .interrupt_models import (
2846
CreateBatchTransform,
2947
CreateDeepRag,
3048
CreateDeepRagRaw,
@@ -52,23 +70,6 @@
5270
WaitTask,
5371
WaitUntil,
5472
)
55-
from uipath.platform.connections import EventArguments
56-
from uipath.platform.context_grounding import DeepRagStatus, IndexStatus
57-
from uipath.platform.context_grounding.context_grounding_index import (
58-
ContextGroundingIndex,
59-
)
60-
from uipath.platform.errors import (
61-
BatchTransformFailedException,
62-
BatchTransformNotCompleteException,
63-
OperationNotCompleteException,
64-
)
65-
from uipath.platform.orchestrator.job import JobState
66-
from uipath.platform.resume_triggers._enums import (
67-
ExternalTrigger,
68-
ExternalTriggerType,
69-
PropertyName,
70-
TriggerMarker,
71-
)
7273

7374

7475
def _try_convert_to_json_format(value: str | None) -> Any:

packages/uipath-platform/src/uipath/platform/common/interrupt_models.py renamed to packages/uipath-platform/src/uipath/platform/resume_triggers/interrupt_models.py

File renamed without changes.

packages/uipath-platform/tests/services/test_hitl.py

Lines changed: 23 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -18,31 +18,6 @@
1818

1919
from uipath.platform.action_center import Task
2020
from uipath.platform.action_center.tasks import TaskStatus
21-
from uipath.platform.common import (
22-
CreateBatchTransform,
23-
CreateDeepRag,
24-
CreateDeepRagRaw,
25-
CreateEphemeralIndex,
26-
CreateEphemeralIndexRaw,
27-
CreateTask,
28-
DocumentExtraction,
29-
DocumentExtractionValidation,
30-
InvokeProcess,
31-
InvokeProcessRaw,
32-
InvokeSystemAgent,
33-
WaitBatchTransform,
34-
WaitDeepRag,
35-
WaitDeepRagRaw,
36-
WaitDocumentExtractionValidation,
37-
WaitEphemeralIndex,
38-
WaitEphemeralIndexRaw,
39-
WaitIntegrationEvent,
40-
WaitJob,
41-
WaitJobRaw,
42-
WaitSystemAgent,
43-
WaitTask,
44-
WaitUntil,
45-
)
4621
from uipath.platform.connections import Connection
4722
from uipath.platform.context_grounding import (
4823
BatchTransformCreationResponse,
@@ -70,10 +45,33 @@
7045
from uipath.platform.orchestrator import Job, JobErrorInfo
7146
from uipath.platform.orchestrator.job import JobState
7247
from uipath.platform.resume_triggers import (
48+
CreateBatchTransform,
49+
CreateDeepRag,
50+
CreateDeepRagRaw,
51+
CreateEphemeralIndex,
52+
CreateEphemeralIndexRaw,
53+
CreateTask,
54+
DocumentExtraction,
55+
DocumentExtractionValidation,
56+
InvokeProcess,
57+
InvokeProcessRaw,
58+
InvokeSystemAgent,
7359
PropertyName,
7460
TriggerMarker,
7561
UiPathResumeTriggerCreator,
7662
UiPathResumeTriggerReader,
63+
WaitBatchTransform,
64+
WaitDeepRag,
65+
WaitDeepRagRaw,
66+
WaitDocumentExtractionValidation,
67+
WaitEphemeralIndex,
68+
WaitEphemeralIndexRaw,
69+
WaitIntegrationEvent,
70+
WaitJob,
71+
WaitJobRaw,
72+
WaitSystemAgent,
73+
WaitTask,
74+
WaitUntil,
7775
)
7876

7977

packages/uipath/tests/cli/unit/test_runtime_protocol_compat.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99
UiPathResumeTriggerName,
1010
UiPathResumeTriggerType,
1111
)
12-
from uipath.platform.common import WaitUntil
13-
from uipath.platform.resume_triggers import UiPathResumeTriggerHandler
12+
from uipath.platform.resume_triggers import UiPathResumeTriggerHandler, WaitUntil
1413
from uipath.runtime import (
1514
UiPathExecuteOptions,
1615
UiPathResumableRuntime,

packages/uipath/uv.lock

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

0 commit comments

Comments
 (0)