uipath-core 0.2.4__py3-none-any.whl → 0.3.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -79,9 +79,16 @@ from .exchange import (
79
79
  UiPathConversationExchangeStartEvent,
80
80
  )
81
81
  from .interrupt import (
82
+ InterruptTypeEnum,
83
+ UiPathConversationGenericInterruptEndEvent,
84
+ UiPathConversationGenericInterruptStartEvent,
82
85
  UiPathConversationInterruptEndEvent,
83
86
  UiPathConversationInterruptEvent,
84
87
  UiPathConversationInterruptStartEvent,
88
+ UiPathConversationToolCallConfirmationEndValue,
89
+ UiPathConversationToolCallConfirmationInterruptEndEvent,
90
+ UiPathConversationToolCallConfirmationInterruptStartEvent,
91
+ UiPathConversationToolCallConfirmationValue,
85
92
  )
86
93
  from .message import (
87
94
  UiPathConversationMessage,
@@ -122,9 +129,16 @@ __all__ = [
122
129
  "UiPathConversationMessageEvent",
123
130
  "UiPathConversationMessage",
124
131
  # Interrupt
132
+ "InterruptTypeEnum",
125
133
  "UiPathConversationInterruptStartEvent",
126
134
  "UiPathConversationInterruptEndEvent",
127
135
  "UiPathConversationInterruptEvent",
136
+ "UiPathConversationToolCallConfirmationValue",
137
+ "UiPathConversationToolCallConfirmationEndValue",
138
+ "UiPathConversationToolCallConfirmationInterruptStartEvent",
139
+ "UiPathConversationToolCallConfirmationInterruptEndEvent",
140
+ "UiPathConversationGenericInterruptStartEvent",
141
+ "UiPathConversationGenericInterruptEndEvent",
128
142
  # Content
129
143
  "UiPathConversationContentPartChunkEvent",
130
144
  "UiPathConversationContentPartStartEvent",
@@ -1,12 +1,39 @@
1
1
  """Interrupt events for human-in-the-loop patterns."""
2
2
 
3
- from typing import Any
3
+ from enum import Enum
4
+ from typing import Any, Literal, Union
4
5
 
5
6
  from pydantic import BaseModel, ConfigDict, Field
6
7
 
7
8
 
8
- class UiPathConversationInterruptStartEvent(BaseModel):
9
- """Signals the start of an interrupt - a pause point where the agent needs external input."""
9
+ class InterruptTypeEnum(str, Enum):
10
+ """Enum of known interrupt types."""
11
+
12
+ TOOL_CALL_CONFIRMATION = "uipath_cas_tool_call_confirmation"
13
+
14
+
15
+ class UiPathConversationToolCallConfirmationValue(BaseModel):
16
+ """Schema for tool call confirmation interrupt value."""
17
+
18
+ tool_call_id: str = Field(..., alias="toolCallId")
19
+ tool_name: str = Field(..., alias="toolName")
20
+ input_schema: Any = Field(..., alias="inputSchema")
21
+ input_value: Any | None = Field(None, alias="inputValue")
22
+
23
+ model_config = ConfigDict(validate_by_name=True, validate_by_alias=True)
24
+
25
+
26
+ class UiPathConversationToolCallConfirmationInterruptStartEvent(BaseModel):
27
+ """Tool call confirmation interrupt start event with strong typing."""
28
+
29
+ type: Literal["uipath_cas_tool_call_confirmation"]
30
+ value: UiPathConversationToolCallConfirmationValue
31
+
32
+ model_config = ConfigDict(validate_by_name=True, validate_by_alias=True)
33
+
34
+
35
+ class UiPathConversationGenericInterruptStartEvent(BaseModel):
36
+ """Generic interrupt start event for custom interrupt types."""
10
37
 
11
38
  type: str
12
39
  value: Any
@@ -14,13 +41,43 @@ class UiPathConversationInterruptStartEvent(BaseModel):
14
41
  model_config = ConfigDict(validate_by_name=True, validate_by_alias=True)
15
42
 
16
43
 
17
- class UiPathConversationInterruptEndEvent(BaseModel):
18
- """Signals the interrupt end event with the provided value."""
44
+ UiPathConversationInterruptStartEvent = Union[
45
+ UiPathConversationToolCallConfirmationInterruptStartEvent,
46
+ UiPathConversationGenericInterruptStartEvent,
47
+ ]
19
48
 
20
- # Can be any type
21
- model_config = ConfigDict(
22
- validate_by_name=True, validate_by_alias=True, extra="allow"
23
- )
49
+
50
+ class UiPathConversationToolCallConfirmationEndValue(BaseModel):
51
+ """Schema for tool call confirmation end value."""
52
+
53
+ approved: bool
54
+ input: Any | None = None
55
+
56
+ model_config = ConfigDict(validate_by_name=True, validate_by_alias=True)
57
+
58
+
59
+ class UiPathConversationToolCallConfirmationInterruptEndEvent(BaseModel):
60
+ """Tool call confirmation interrupt end event with strong typing."""
61
+
62
+ type: Literal["uipath_cas_tool_call_confirmation"]
63
+ value: UiPathConversationToolCallConfirmationEndValue
64
+
65
+ model_config = ConfigDict(validate_by_name=True, validate_by_alias=True)
66
+
67
+
68
+ class UiPathConversationGenericInterruptEndEvent(BaseModel):
69
+ """Generic interrupt end event for custom interrupt types."""
70
+
71
+ type: str
72
+ value: Any
73
+
74
+ model_config = ConfigDict(validate_by_name=True, validate_by_alias=True)
75
+
76
+
77
+ UiPathConversationInterruptEndEvent = Union[
78
+ UiPathConversationToolCallConfirmationInterruptEndEvent,
79
+ UiPathConversationGenericInterruptEndEvent,
80
+ ]
24
81
 
25
82
 
26
83
  class UiPathConversationInterruptEvent(BaseModel):
@@ -30,6 +87,6 @@ class UiPathConversationInterruptEvent(BaseModel):
30
87
  start: UiPathConversationInterruptStartEvent | None = Field(
31
88
  None, alias="startInterrupt"
32
89
  )
33
- end: Any | None = Field(None, alias="endInterrupt")
90
+ end: UiPathConversationInterruptEndEvent | None = Field(None, alias="endInterrupt")
34
91
 
35
92
  model_config = ConfigDict(validate_by_name=True, validate_by_alias=True)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: uipath-core
3
- Version: 0.2.4
3
+ Version: 0.3.0
4
4
  Summary: UiPath Core abstractions
5
5
  Project-URL: Homepage, https://uipath.com
6
6
  Project-URL: Repository, https://github.com/UiPath/uipath-core-python
@@ -1,6 +1,6 @@
1
1
  uipath/core/__init__.py,sha256=KaOxKswriK_zGul3KzILhqnR3G0E5otuXny0IuuwTqA,280
2
2
  uipath/core/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
- uipath/core/chat/__init__.py,sha256=1qwg2n6EhRS_u3vkXN1D40q_5bYNxj5BeQXUp7VtyQw,6013
3
+ uipath/core/chat/__init__.py,sha256=qHwtSReNXvq-yTA-R1uN6e-KPHirnIqqoeWy9JLC3Hc,6719
4
4
  uipath/core/chat/async_stream.py,sha256=XbfSAu67TKYzzHoeh-WkolP3WXqEGJ2fTtCX5XqfUKY,2163
5
5
  uipath/core/chat/citation.py,sha256=UBZ51wk3PyaXr7uljicEH_8Q2dthBMxYvPR6j2dEhA4,2608
6
6
  uipath/core/chat/content.py,sha256=TcZbmuSskr2TrFngp4ILdkNBwlunhcZOzDjmiSWjsls,3163
@@ -8,7 +8,7 @@ uipath/core/chat/conversation.py,sha256=CVCj4z0DYQsodciCpmiefMjvn8NmJsLTaZU49Qis
8
8
  uipath/core/chat/error.py,sha256=uXaI0jHYsRhOq8LRHVN5fwODX-uJX68PqJU26oe-4c4,1165
9
9
  uipath/core/chat/event.py,sha256=SRif5ZQGEKQBmzcSl2fx0O_--zlKZ7lOVh15hRjLxP4,3832
10
10
  uipath/core/chat/exchange.py,sha256=pkYt_pPDyzaJQAfDdqqUM36QLnz4rgBDR0DkBl03r90,2463
11
- uipath/core/chat/interrupt.py,sha256=-3Fl1_6_7cS8ZV64AaFwDnlNglGBfACwaDAPxI3dTa0,1064
11
+ uipath/core/chat/interrupt.py,sha256=DnnmyXHB9r2VOsWzATqV0XG47WNxF5SLFM_xHauh26s,2922
12
12
  uipath/core/chat/message.py,sha256=nJJ1xc--b7Nnj5hXwoH4T4pYkZSoiSHzSXlaiPqac4g,2390
13
13
  uipath/core/chat/meta.py,sha256=3t0eS9UHoAPHre97QTUeVbjDhnMX4zj4-qG6ju0B8wY,315
14
14
  uipath/core/chat/tool.py,sha256=6e5pyX3hOWM5fIzr_fdG49Mbzz6XzJD3nsmha-yGa2k,2308
@@ -28,7 +28,7 @@ uipath/core/tracing/processors.py,sha256=XlMKA_AWwrtC-0ytnAHxl4P9kXlQdsjcn8zwnSp
28
28
  uipath/core/tracing/span_utils.py,sha256=LZXNdnI0-fhKe49CLPsvMJIfh9zdzk8rK4g4YN5RfDU,13064
29
29
  uipath/core/tracing/trace_manager.py,sha256=vmPup-C2pSgwpSdcCzAjzP_nTtRWZgqlxnNT50ygOfk,3843
30
30
  uipath/core/tracing/types.py,sha256=8A8fFuWqMGk0SzIrFbMajmY6LA3w57h-YA602OctCrI,634
31
- uipath_core-0.2.4.dist-info/METADATA,sha256=jzDvhDV_sWnff-IwLeEua97kGVjfg7mxPXDQ4iBF5ik,938
32
- uipath_core-0.2.4.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
33
- uipath_core-0.2.4.dist-info/licenses/LICENSE,sha256=-KBavWXepyDjimmzH5fVAsi-6jNVpIKFc2kZs0Ri4ng,1058
34
- uipath_core-0.2.4.dist-info/RECORD,,
31
+ uipath_core-0.3.0.dist-info/METADATA,sha256=ERofu9L4yl9Hps324vWnIHgfF4H2XRBOoFT6l-8nx2w,938
32
+ uipath_core-0.3.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
33
+ uipath_core-0.3.0.dist-info/licenses/LICENSE,sha256=-KBavWXepyDjimmzH5fVAsi-6jNVpIKFc2kZs0Ri4ng,1058
34
+ uipath_core-0.3.0.dist-info/RECORD,,