uipath 2.0.32__tar.gz → 2.0.33__tar.gz

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.

Potentially problematic release.


This version of uipath might be problematic. Click here for more details.

Files changed (133) hide show
  1. {uipath-2.0.32 → uipath-2.0.33}/PKG-INFO +2 -2
  2. {uipath-2.0.32 → uipath-2.0.33}/README.md +1 -1
  3. {uipath-2.0.32 → uipath-2.0.33}/docs/core/getting_started.md +21 -2
  4. {uipath-2.0.32 → uipath-2.0.33}/docs/stylesheets/extra.css +9 -5
  5. {uipath-2.0.32 → uipath-2.0.33}/pyproject.toml +1 -1
  6. {uipath-2.0.32 → uipath-2.0.33}/src/uipath/_cli/_runtime/_contracts.py +1 -1
  7. {uipath-2.0.32 → uipath-2.0.33}/src/uipath/_cli/_runtime/_logging.py +28 -16
  8. {uipath-2.0.32 → uipath-2.0.33}/src/uipath/_services/assets_service.py +6 -2
  9. {uipath-2.0.32 → uipath-2.0.33}/src/uipath/_services/queues_service.py +35 -12
  10. {uipath-2.0.32 → uipath-2.0.33}/uv.lock +1514 -1512
  11. {uipath-2.0.32 → uipath-2.0.33}/.cursorrules +0 -0
  12. {uipath-2.0.32 → uipath-2.0.33}/.editorconfig +0 -0
  13. {uipath-2.0.32 → uipath-2.0.33}/.gitattributes +0 -0
  14. {uipath-2.0.32 → uipath-2.0.33}/.github/workflows/build.yml +0 -0
  15. {uipath-2.0.32 → uipath-2.0.33}/.github/workflows/cd.yml +0 -0
  16. {uipath-2.0.32 → uipath-2.0.33}/.github/workflows/ci.yml +0 -0
  17. {uipath-2.0.32 → uipath-2.0.33}/.github/workflows/commitlint.yml +0 -0
  18. {uipath-2.0.32 → uipath-2.0.33}/.github/workflows/lint.yml +0 -0
  19. {uipath-2.0.32 → uipath-2.0.33}/.github/workflows/publish-dev.yml +0 -0
  20. {uipath-2.0.32 → uipath-2.0.33}/.github/workflows/test.yml +0 -0
  21. {uipath-2.0.32 → uipath-2.0.33}/.gitignore +0 -0
  22. {uipath-2.0.32 → uipath-2.0.33}/.pre-commit-config.yaml +0 -0
  23. {uipath-2.0.32 → uipath-2.0.33}/.python-version +0 -0
  24. {uipath-2.0.32 → uipath-2.0.33}/.vscode/extensions.json +0 -0
  25. {uipath-2.0.32 → uipath-2.0.33}/.vscode/settings.json +0 -0
  26. {uipath-2.0.32 → uipath-2.0.33}/CONTRIBUTING.md +0 -0
  27. {uipath-2.0.32 → uipath-2.0.33}/LICENSE +0 -0
  28. {uipath-2.0.32 → uipath-2.0.33}/docs/CONTRIBUTING.md +0 -0
  29. {uipath-2.0.32 → uipath-2.0.33}/docs/assets/uipath-logo.svg +0 -0
  30. {uipath-2.0.32 → uipath-2.0.33}/docs/core/actions.md +0 -0
  31. {uipath-2.0.32 → uipath-2.0.33}/docs/core/assets.md +0 -0
  32. {uipath-2.0.32 → uipath-2.0.33}/docs/core/buckets.md +0 -0
  33. {uipath-2.0.32 → uipath-2.0.33}/docs/core/context_grounding.md +0 -0
  34. {uipath-2.0.32 → uipath-2.0.33}/docs/core/index.md +0 -0
  35. {uipath-2.0.32 → uipath-2.0.33}/docs/core/jobs.md +0 -0
  36. {uipath-2.0.32 → uipath-2.0.33}/docs/core/processes.md +0 -0
  37. {uipath-2.0.32 → uipath-2.0.33}/docs/core/queues.md +0 -0
  38. {uipath-2.0.32 → uipath-2.0.33}/docs/hooks.py +0 -0
  39. {uipath-2.0.32 → uipath-2.0.33}/docs/langchain/chat_models.md +0 -0
  40. {uipath-2.0.32 → uipath-2.0.33}/docs/langchain/context_grounding.md +0 -0
  41. {uipath-2.0.32 → uipath-2.0.33}/docs/langchain/human_in_the_loop.md +0 -0
  42. {uipath-2.0.32 → uipath-2.0.33}/docs/langchain/index.md +0 -0
  43. {uipath-2.0.32 → uipath-2.0.33}/justfile +0 -0
  44. {uipath-2.0.32 → uipath-2.0.33}/mkdocs.yml +0 -0
  45. {uipath-2.0.32 → uipath-2.0.33}/py.typed +0 -0
  46. {uipath-2.0.32 → uipath-2.0.33}/src/uipath/__init__.py +0 -0
  47. {uipath-2.0.32 → uipath-2.0.33}/src/uipath/_cli/README.md +0 -0
  48. {uipath-2.0.32 → uipath-2.0.33}/src/uipath/_cli/__init__.py +0 -0
  49. {uipath-2.0.32 → uipath-2.0.33}/src/uipath/_cli/_auth/_auth_server.py +0 -0
  50. {uipath-2.0.32 → uipath-2.0.33}/src/uipath/_cli/_auth/_models.py +0 -0
  51. {uipath-2.0.32 → uipath-2.0.33}/src/uipath/_cli/_auth/_oidc_utils.py +0 -0
  52. {uipath-2.0.32 → uipath-2.0.33}/src/uipath/_cli/_auth/_portal_service.py +0 -0
  53. {uipath-2.0.32 → uipath-2.0.33}/src/uipath/_cli/_auth/_utils.py +0 -0
  54. {uipath-2.0.32 → uipath-2.0.33}/src/uipath/_cli/_auth/auth_config.json +0 -0
  55. {uipath-2.0.32 → uipath-2.0.33}/src/uipath/_cli/_auth/index.html +0 -0
  56. {uipath-2.0.32 → uipath-2.0.33}/src/uipath/_cli/_auth/localhost.crt +0 -0
  57. {uipath-2.0.32 → uipath-2.0.33}/src/uipath/_cli/_auth/localhost.key +0 -0
  58. {uipath-2.0.32 → uipath-2.0.33}/src/uipath/_cli/_runtime/_runtime.py +0 -0
  59. {uipath-2.0.32 → uipath-2.0.33}/src/uipath/_cli/_templates/.psmdcp.template +0 -0
  60. {uipath-2.0.32 → uipath-2.0.33}/src/uipath/_cli/_templates/.rels.template +0 -0
  61. {uipath-2.0.32 → uipath-2.0.33}/src/uipath/_cli/_templates/[Content_Types].xml.template +0 -0
  62. {uipath-2.0.32 → uipath-2.0.33}/src/uipath/_cli/_templates/main.py.template +0 -0
  63. {uipath-2.0.32 → uipath-2.0.33}/src/uipath/_cli/_templates/package.nuspec.template +0 -0
  64. {uipath-2.0.32 → uipath-2.0.33}/src/uipath/_cli/_utils/_common.py +0 -0
  65. {uipath-2.0.32 → uipath-2.0.33}/src/uipath/_cli/_utils/_console.py +0 -0
  66. {uipath-2.0.32 → uipath-2.0.33}/src/uipath/_cli/_utils/_folders.py +0 -0
  67. {uipath-2.0.32 → uipath-2.0.33}/src/uipath/_cli/_utils/_input_args.py +0 -0
  68. {uipath-2.0.32 → uipath-2.0.33}/src/uipath/_cli/_utils/_parse_ast.py +0 -0
  69. {uipath-2.0.32 → uipath-2.0.33}/src/uipath/_cli/_utils/_processes.py +0 -0
  70. {uipath-2.0.32 → uipath-2.0.33}/src/uipath/_cli/cli_auth.py +0 -0
  71. {uipath-2.0.32 → uipath-2.0.33}/src/uipath/_cli/cli_deploy.py +0 -0
  72. {uipath-2.0.32 → uipath-2.0.33}/src/uipath/_cli/cli_init.py +0 -0
  73. {uipath-2.0.32 → uipath-2.0.33}/src/uipath/_cli/cli_invoke.py +0 -0
  74. {uipath-2.0.32 → uipath-2.0.33}/src/uipath/_cli/cli_new.py +0 -0
  75. {uipath-2.0.32 → uipath-2.0.33}/src/uipath/_cli/cli_pack.py +0 -0
  76. {uipath-2.0.32 → uipath-2.0.33}/src/uipath/_cli/cli_publish.py +0 -0
  77. {uipath-2.0.32 → uipath-2.0.33}/src/uipath/_cli/cli_run.py +0 -0
  78. {uipath-2.0.32 → uipath-2.0.33}/src/uipath/_cli/middlewares.py +0 -0
  79. {uipath-2.0.32 → uipath-2.0.33}/src/uipath/_cli/spinner.py +0 -0
  80. {uipath-2.0.32 → uipath-2.0.33}/src/uipath/_config.py +0 -0
  81. {uipath-2.0.32 → uipath-2.0.33}/src/uipath/_execution_context.py +0 -0
  82. {uipath-2.0.32 → uipath-2.0.33}/src/uipath/_folder_context.py +0 -0
  83. {uipath-2.0.32 → uipath-2.0.33}/src/uipath/_services/__init__.py +0 -0
  84. {uipath-2.0.32 → uipath-2.0.33}/src/uipath/_services/_base_service.py +0 -0
  85. {uipath-2.0.32 → uipath-2.0.33}/src/uipath/_services/actions_service.py +0 -0
  86. {uipath-2.0.32 → uipath-2.0.33}/src/uipath/_services/api_client.py +0 -0
  87. {uipath-2.0.32 → uipath-2.0.33}/src/uipath/_services/buckets_service.py +0 -0
  88. {uipath-2.0.32 → uipath-2.0.33}/src/uipath/_services/connections_service.py +0 -0
  89. {uipath-2.0.32 → uipath-2.0.33}/src/uipath/_services/connections_service.pyi +0 -0
  90. {uipath-2.0.32 → uipath-2.0.33}/src/uipath/_services/context_grounding_service.py +0 -0
  91. {uipath-2.0.32 → uipath-2.0.33}/src/uipath/_services/folder_service.py +0 -0
  92. {uipath-2.0.32 → uipath-2.0.33}/src/uipath/_services/jobs_service.py +0 -0
  93. {uipath-2.0.32 → uipath-2.0.33}/src/uipath/_services/llm_gateway_service.py +0 -0
  94. {uipath-2.0.32 → uipath-2.0.33}/src/uipath/_services/processes_service.py +0 -0
  95. {uipath-2.0.32 → uipath-2.0.33}/src/uipath/_uipath.py +0 -0
  96. {uipath-2.0.32 → uipath-2.0.33}/src/uipath/_utils/__init__.py +0 -0
  97. {uipath-2.0.32 → uipath-2.0.33}/src/uipath/_utils/_endpoint.py +0 -0
  98. {uipath-2.0.32 → uipath-2.0.33}/src/uipath/_utils/_infer_bindings.py +0 -0
  99. {uipath-2.0.32 → uipath-2.0.33}/src/uipath/_utils/_logs.py +0 -0
  100. {uipath-2.0.32 → uipath-2.0.33}/src/uipath/_utils/_request_override.py +0 -0
  101. {uipath-2.0.32 → uipath-2.0.33}/src/uipath/_utils/_request_spec.py +0 -0
  102. {uipath-2.0.32 → uipath-2.0.33}/src/uipath/_utils/_user_agent.py +0 -0
  103. {uipath-2.0.32 → uipath-2.0.33}/src/uipath/_utils/constants.py +0 -0
  104. {uipath-2.0.32 → uipath-2.0.33}/src/uipath/models/__init__.py +0 -0
  105. {uipath-2.0.32 → uipath-2.0.33}/src/uipath/models/action_schema.py +0 -0
  106. {uipath-2.0.32 → uipath-2.0.33}/src/uipath/models/actions.py +0 -0
  107. {uipath-2.0.32 → uipath-2.0.33}/src/uipath/models/assets.py +0 -0
  108. {uipath-2.0.32 → uipath-2.0.33}/src/uipath/models/connections.py +0 -0
  109. {uipath-2.0.32 → uipath-2.0.33}/src/uipath/models/context_grounding.py +0 -0
  110. {uipath-2.0.32 → uipath-2.0.33}/src/uipath/models/context_grounding_index.py +0 -0
  111. {uipath-2.0.32 → uipath-2.0.33}/src/uipath/models/errors.py +0 -0
  112. {uipath-2.0.32 → uipath-2.0.33}/src/uipath/models/exceptions.py +0 -0
  113. {uipath-2.0.32 → uipath-2.0.33}/src/uipath/models/interrupt_models.py +0 -0
  114. {uipath-2.0.32 → uipath-2.0.33}/src/uipath/models/job.py +0 -0
  115. {uipath-2.0.32 → uipath-2.0.33}/src/uipath/models/llm_gateway.py +0 -0
  116. {uipath-2.0.32 → uipath-2.0.33}/src/uipath/models/processes.py +0 -0
  117. {uipath-2.0.32 → uipath-2.0.33}/src/uipath/models/queues.py +0 -0
  118. {uipath-2.0.32 → uipath-2.0.33}/src/uipath/py.typed +0 -0
  119. {uipath-2.0.32 → uipath-2.0.33}/src/uipath/tracing/__init__.py +0 -0
  120. {uipath-2.0.32 → uipath-2.0.33}/src/uipath/tracing/_otel_exporters.py +0 -0
  121. {uipath-2.0.32 → uipath-2.0.33}/src/uipath/tracing/_traced.py +0 -0
  122. {uipath-2.0.32 → uipath-2.0.33}/src/uipath/tracing/_utils.py +0 -0
  123. {uipath-2.0.32 → uipath-2.0.33}/tests/__init__.py +0 -0
  124. {uipath-2.0.32 → uipath-2.0.33}/tests/cli/test_init.py +0 -0
  125. {uipath-2.0.32 → uipath-2.0.33}/tests/conftest.py +0 -0
  126. {uipath-2.0.32 → uipath-2.0.33}/tests/sdk/services/test_llm_integration.py +0 -0
  127. {uipath-2.0.32 → uipath-2.0.33}/tests/sdk/services/test_llm_service.py +0 -0
  128. {uipath-2.0.32 → uipath-2.0.33}/tests/sdk/services/test_uipath_llm_integration.py +0 -0
  129. {uipath-2.0.32 → uipath-2.0.33}/tests/sdk/test_config.py +0 -0
  130. {uipath-2.0.32 → uipath-2.0.33}/tests/tracing/test_otel_exporters.py +0 -0
  131. {uipath-2.0.32 → uipath-2.0.33}/tests/tracing/test_span_utils.py +0 -0
  132. {uipath-2.0.32 → uipath-2.0.33}/tests/tracing/test_traced.py +0 -0
  133. {uipath-2.0.32 → uipath-2.0.33}/tests/tracing/test_tracing_manager.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: uipath
3
- Version: 2.0.32
3
+ Version: 2.0.33
4
4
  Summary: Python SDK and CLI for UiPath Platform, enabling programmatic interaction with automation services, process management, and deployment tools.
5
5
  Project-URL: Homepage, https://uipath.com
6
6
  Project-URL: Repository, https://github.com/UiPath/uipath-python
@@ -35,7 +35,7 @@ Description-Content-Type: text/markdown
35
35
  [![PyPI - Version](https://img.shields.io/pypi/v/uipath)](https://img.shields.io/pypi/v/uipath)
36
36
  [![Python versions](https://img.shields.io/pypi/pyversions/uipath.svg)](https://pypi.org/project/uipath/)
37
37
 
38
- A Python SDK that enables programmatic interaction with UiPath Platform services including processes, assets, buckets, context grounding, data services, jobs, and more. The package also features a CLI for creation, packaging, and deployment of automations to UiPath Platform.
38
+ A Python SDK that enables programmatic interaction with UiPath Cloud Platform services including processes, assets, buckets, context grounding, data services, jobs, and more. The package also features a CLI for creation, packaging, and deployment of automations to UiPath Cloud Platform.
39
39
 
40
40
  Use the [UiPath LangChain SDK](https://github.com/UiPath/uipath-langchain-python) to pack and publish LangGraph Agents.
41
41
 
@@ -4,7 +4,7 @@
4
4
  [![PyPI - Version](https://img.shields.io/pypi/v/uipath)](https://img.shields.io/pypi/v/uipath)
5
5
  [![Python versions](https://img.shields.io/pypi/pyversions/uipath.svg)](https://pypi.org/project/uipath/)
6
6
 
7
- A Python SDK that enables programmatic interaction with UiPath Platform services including processes, assets, buckets, context grounding, data services, jobs, and more. The package also features a CLI for creation, packaging, and deployment of automations to UiPath Platform.
7
+ A Python SDK that enables programmatic interaction with UiPath Cloud Platform services including processes, assets, buckets, context grounding, data services, jobs, and more. The package also features a CLI for creation, packaging, and deployment of automations to UiPath Cloud Platform.
8
8
 
9
9
  Use the [UiPath LangChain SDK](https://github.com/UiPath/uipath-langchain-python) to pack and publish LangGraph Agents.
10
10
 
@@ -4,28 +4,37 @@
4
4
 
5
5
  - Python 3.10 or higher
6
6
  - `pip` or `uv` package manager
7
- - A UiPath Platform account with appropriate permissions
7
+ - A UiPath Cloud Platform account with appropriate permissions
8
8
 
9
9
  ## Getting Started with the CLI
10
+
10
11
  //// tab | Linux, macOS, Windows Bash
12
+
11
13
  <!-- termynal -->
14
+
12
15
  ```shell
13
16
  > mkdir example
14
17
  > cd example
15
18
  ```
19
+
16
20
  ////
17
21
 
18
22
  //// tab | Windows PowerShell
23
+
19
24
  <!-- termynal -->
25
+
20
26
  ```powershell
21
27
  > New-Item -ItemType Directory -Path example
22
28
  > Set-Location example
23
29
  ```
30
+
24
31
  ////
25
32
 
26
33
  //// tab | uv
27
34
  new: true
35
+
28
36
  <!-- termynal -->
37
+
29
38
  ```shell
30
39
  # Initialize a new uv project in the current directory
31
40
  > uv init . --python 3.10
@@ -49,10 +58,13 @@ Activate with: source .venv/bin/activate
49
58
  > uipath --version
50
59
  uipath version 2.0.29
51
60
  ```
61
+
52
62
  ////
53
63
 
54
64
  //// tab | pip
65
+
55
66
  <!-- termynal -->
67
+
56
68
  ```shell
57
69
  # Create a new virtual environment
58
70
  > python -m venv .venv
@@ -72,6 +84,7 @@ uipath version 2.0.29
72
84
  > uipath --version
73
85
  uipath version 2.0.29
74
86
  ```
87
+
75
88
  ////
76
89
 
77
90
  ### Authentication
@@ -79,6 +92,7 @@ uipath version 2.0.29
79
92
  To debug your script locally and publish your project, you need to authenticate with UiPath:
80
93
 
81
94
  <!-- termynal -->
95
+
82
96
  ```shell
83
97
  > uipath auth
84
98
  ⠋ Authenticating with UiPath ...
@@ -132,6 +146,7 @@ def main(input: EchoIn) -> EchoOut:
132
146
  To create a UiPath project, run the following command in your terminal:
133
147
 
134
148
  <!-- termynal -->
149
+
135
150
  ```shell
136
151
  > uipath init
137
152
  ⠋ Initializing UiPath project ...
@@ -147,6 +162,7 @@ The `uipath init` command executes your `main.py` file to analyze its structure
147
162
  This command creates a `uipath.json` file containing the project metadata.
148
163
 
149
164
  <!-- termynal -->
165
+
150
166
  ```shell
151
167
  # Debug your project
152
168
  > uipath run main.py '{"message": "test"}'
@@ -164,6 +180,7 @@ authors = [{ name = "Your Name", email = "your.email@uipath.com" }]
164
180
  Then, package your project:
165
181
 
166
182
  <!-- termynal -->
183
+
167
184
  ```shell
168
185
  > uipath pack
169
186
  ⠋ Packaging project ...
@@ -177,6 +194,7 @@ Authors : Your Name
177
194
  Finally, publish your package:
178
195
 
179
196
  <!-- termynal -->
197
+
180
198
  ```shell
181
199
  > uipath publish
182
200
  ⠋ Fetching available package feeds...
@@ -216,6 +234,7 @@ def main():
216
234
  ### Verifying the Execution
217
235
 
218
236
  <!-- termynal -->
237
+
219
238
  ```shell
220
239
  > uipath run main.py
221
240
  ```
@@ -224,4 +243,4 @@ Open your browser and navigate to UiPath. Go to the specified folder, where you'
224
243
 
225
244
  ```
226
245
  [Echo]: Hello, World! Echo: Hello, World! Echo: Hello, World!
227
- ```
246
+ ```
@@ -10,12 +10,17 @@
10
10
  :root {
11
11
  --md-primary-bg-color: #ffffff;
12
12
  --md-primary-fg-color: #182027;
13
- --md-typeset-a-color: #0067df;
13
+ --md-typeset-a-color: #66adff;
14
14
  }
15
15
 
16
16
 
17
- [data-md-color-scheme=slate] {
17
+ [data-md-color-scheme=default]
18
+ {
18
19
  --md-typeset-a-color: #0067df;
20
+ }
21
+
22
+ [data-md-color-scheme=slate] {
23
+ --md-typeset-a-color: #66adff;
19
24
 
20
25
  .md-header {
21
26
  background-color: #182027;
@@ -27,7 +32,6 @@ body[data-md-color-scheme=slate] {
27
32
  background-color: #182027 !important;
28
33
  }
29
34
 
30
-
31
35
  .md-header {
32
36
  --md-primary-bg-color: #182027;
33
37
  --md-primary-fg-color: #ffffff;
@@ -43,7 +47,7 @@ body[data-md-color-scheme=slate] {
43
47
 
44
48
  &:hover {
45
49
  background-color: #ffffff;
46
- border-color: #0067df;
50
+ border-color: #66adff;
47
51
  }
48
52
  }
49
53
 
@@ -55,7 +59,7 @@ body[data-md-color-scheme=slate] {
55
59
 
56
60
  &:hover {
57
61
  background-color: #182027;
58
- border-color: #0067df;
62
+ border-color: #66adff;
59
63
  }
60
64
  }
61
65
 
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "uipath"
3
- version = "2.0.32"
3
+ version = "2.0.33"
4
4
  description = "Python SDK and CLI for UiPath Platform, enabling programmatic interaction with automation services, process management, and deployment tools."
5
5
  readme = { file = "README.md", content-type = "text/markdown" }
6
6
  requires-python = ">=3.10"
@@ -412,7 +412,7 @@ class UiPathBaseRuntime(ABC):
412
412
  raise
413
413
  finally:
414
414
  # Restore original logging
415
- if self.context.job_id and self.logs_interceptor:
415
+ if self.logs_interceptor:
416
416
  self.logs_interceptor.teardown()
417
417
 
418
418
  await self.cleanup()
@@ -51,8 +51,9 @@ class LogsInterceptor:
51
51
  self.original_level = self.root_logger.level
52
52
  self.original_handlers = list(self.root_logger.handlers)
53
53
 
54
- self.original_stdout: Optional[TextIO] = None
55
- self.original_stderr: Optional[TextIO] = None
54
+ # Store system stdout/stderr
55
+ self.original_stdout = cast(TextIO, sys.stdout)
56
+ self.original_stderr = cast(TextIO, sys.stderr)
56
57
 
57
58
  self.log_handler: Union[PersistentLogsHandler, logging.StreamHandler[TextIO]]
58
59
 
@@ -74,10 +75,6 @@ class LogsInterceptor:
74
75
  self.logger = logging.getLogger("runtime")
75
76
  self.patched_loggers: set[str] = set()
76
77
 
77
- # Store system stdout/stderr
78
- self.sys_stdout = cast(TextIO, sys.__stdout__)
79
- self.sys_stderr = cast(TextIO, sys.__stderr__)
80
-
81
78
  def _clean_all_handlers(self, logger: logging.Logger) -> None:
82
79
  """Remove ALL handlers from a logger except ours."""
83
80
  handlers_to_remove = list(logger.handlers)
@@ -111,8 +108,6 @@ class LogsInterceptor:
111
108
 
112
109
  def _redirect_stdout_stderr(self) -> None:
113
110
  """Redirect stdout and stderr to the logging system."""
114
- self.original_stdout = sys.stdout
115
- self.original_stderr = sys.stderr
116
111
 
117
112
  class LoggerWriter:
118
113
  def __init__(
@@ -129,15 +124,32 @@ class LogsInterceptor:
129
124
  self.sys_file = sys_file # Store reference to system stdout/stderr
130
125
 
131
126
  def write(self, message: str) -> None:
132
- if message and message.strip() and self.level >= self.min_level:
133
- self.logger.log(self.level, message.rstrip())
127
+ self.buffer += message
128
+ while "\n" in self.buffer:
129
+ line, self.buffer = self.buffer.split("\n", 1)
130
+ # Only log if the message is not empty and the level is sufficient
131
+ if line and self.level >= self.min_level:
132
+ # Use _log to avoid potential recursive logging if logging methods are overridden
133
+ self.logger._log(self.level, line, ())
134
134
 
135
135
  def flush(self) -> None:
136
- pass
136
+ # Log any remaining content in the buffer on flush
137
+ if self.buffer and self.level >= self.min_level:
138
+ self.logger._log(self.level, self.buffer, ())
139
+ self.buffer = ""
137
140
 
138
141
  def fileno(self) -> int:
139
142
  # Return the file descriptor of the original system stdout/stderr
140
- return self.sys_file.fileno()
143
+ try:
144
+ return self.sys_file.fileno()
145
+ except Exception:
146
+ return -1
147
+
148
+ def isatty(self) -> bool:
149
+ return hasattr(self.sys_file, "isatty") and self.sys_file.isatty()
150
+
151
+ def writable(self) -> bool:
152
+ return True
141
153
 
142
154
  # Set up stdout and stderr loggers with propagate=False
143
155
  stdout_logger = logging.getLogger("stdout")
@@ -150,10 +162,10 @@ class LogsInterceptor:
150
162
 
151
163
  # Use the min_level in the LoggerWriter to filter messages
152
164
  sys.stdout = LoggerWriter(
153
- stdout_logger, logging.INFO, self.numeric_min_level, self.sys_stdout
165
+ stdout_logger, logging.INFO, self.numeric_min_level, self.original_stdout
154
166
  )
155
167
  sys.stderr = LoggerWriter(
156
- stderr_logger, logging.ERROR, self.numeric_min_level, self.sys_stderr
168
+ stderr_logger, logging.ERROR, self.numeric_min_level, self.original_stderr
157
169
  )
158
170
 
159
171
  def teardown(self) -> None:
@@ -174,12 +186,12 @@ class LogsInterceptor:
174
186
  if handler not in self.root_logger.handlers:
175
187
  self.root_logger.addHandler(handler)
176
188
 
189
+ self.log_handler.close()
190
+
177
191
  if self.original_stdout and self.original_stderr:
178
192
  sys.stdout = self.original_stdout
179
193
  sys.stderr = self.original_stderr
180
194
 
181
- self.log_handler.close()
182
-
183
195
  def __enter__(self):
184
196
  self.setup()
185
197
  return self
@@ -188,13 +188,15 @@ class AssetsService(FolderContext, BaseService):
188
188
  robot_asset, folder_key=folder_key, folder_path=folder_path
189
189
  )
190
190
 
191
- return self.request(
191
+ response = self.request(
192
192
  spec.method,
193
193
  url=spec.endpoint,
194
194
  content=spec.content,
195
195
  headers=spec.headers,
196
196
  )
197
197
 
198
+ return response.json()
199
+
198
200
  @traced(name="assets_update", run_type="uipath", hide_input=True, hide_output=True)
199
201
  async def update_async(
200
202
  self,
@@ -217,13 +219,15 @@ class AssetsService(FolderContext, BaseService):
217
219
  robot_asset, folder_key=folder_key, folder_path=folder_path
218
220
  )
219
221
 
220
- return await self.request_async(
222
+ response = await self.request_async(
221
223
  spec.method,
222
224
  url=spec.endpoint,
223
225
  content=spec.content,
224
226
  headers=spec.headers,
225
227
  )
226
228
 
229
+ return response.json()
230
+
227
231
  @property
228
232
  def custom_headers(self) -> Dict[str, str]:
229
233
  return self.folder_headers
@@ -29,7 +29,9 @@ class QueuesService(FolderContext, BaseService):
29
29
  Response: HTTP response containing the list of queue items.
30
30
  """
31
31
  spec = self._list_items_spec()
32
- return self.request(spec.method, url=spec.endpoint)
32
+ response = self.request(spec.method, url=spec.endpoint)
33
+
34
+ return response.json()
33
35
 
34
36
  @traced(name="queues_list_items", run_type="uipath")
35
37
  async def list_items_async(self) -> Response:
@@ -39,7 +41,8 @@ class QueuesService(FolderContext, BaseService):
39
41
  Response: HTTP response containing the list of queue items.
40
42
  """
41
43
  spec = self._list_items_spec()
42
- return await self.request_async(spec.method, url=spec.endpoint)
44
+ response = await self.request_async(spec.method, url=spec.endpoint)
45
+ return response.json()
43
46
 
44
47
  @traced(name="queues_create_item", run_type="uipath")
45
48
  def create_item(self, item: Union[Dict[str, Any], QueueItem]) -> Response:
@@ -54,7 +57,8 @@ class QueuesService(FolderContext, BaseService):
54
57
  Related Activity: [Add Queue Item](https://docs.uipath.com/ACTIVITIES/other/latest/workflow/add-queue-item)
55
58
  """
56
59
  spec = self._create_item_spec(item)
57
- return self.request(spec.method, url=spec.endpoint, json=spec.json)
60
+ response = self.request(spec.method, url=spec.endpoint, json=spec.json)
61
+ return response.json()
58
62
 
59
63
  @traced(name="queues_create_item", run_type="uipath")
60
64
  async def create_item_async(
@@ -71,7 +75,10 @@ class QueuesService(FolderContext, BaseService):
71
75
  Related Activity: [Add Queue Item](https://docs.uipath.com/ACTIVITIES/other/latest/workflow/add-queue-item)
72
76
  """
73
77
  spec = self._create_item_spec(item)
74
- return await self.request_async(spec.method, url=spec.endpoint, json=spec.json)
78
+ response = await self.request_async(
79
+ spec.method, url=spec.endpoint, json=spec.json
80
+ )
81
+ return response.json()
75
82
 
76
83
  @traced(name="queues_create_items", run_type="uipath")
77
84
  def create_items(
@@ -91,7 +98,8 @@ class QueuesService(FolderContext, BaseService):
91
98
  Response: HTTP response containing the bulk operation result.
92
99
  """
93
100
  spec = self._create_items_spec(items, queue_name, commit_type)
94
- return self.request(spec.method, url=spec.endpoint, json=spec.json)
101
+ response = self.request(spec.method, url=spec.endpoint, json=spec.json)
102
+ return response.json()
95
103
 
96
104
  @traced(name="queues_create_items", run_type="uipath")
97
105
  async def create_items_async(
@@ -111,7 +119,10 @@ class QueuesService(FolderContext, BaseService):
111
119
  Response: HTTP response containing the bulk operation result.
112
120
  """
113
121
  spec = self._create_items_spec(items, queue_name, commit_type)
114
- return await self.request_async(spec.method, url=spec.endpoint, json=spec.json)
122
+ response = await self.request_async(
123
+ spec.method, url=spec.endpoint, json=spec.json
124
+ )
125
+ return response.json()
115
126
 
116
127
  @traced(name="queues_create_transaction_item", run_type="uipath")
117
128
  def create_transaction_item(
@@ -127,7 +138,8 @@ class QueuesService(FolderContext, BaseService):
127
138
  Response: HTTP response containing the transaction item details.
128
139
  """
129
140
  spec = self._create_transaction_item_spec(item, no_robot)
130
- return self.request(spec.method, url=spec.endpoint, json=spec.json)
141
+ response = self.request(spec.method, url=spec.endpoint, json=spec.json)
142
+ return response.json()
131
143
 
132
144
  @traced(name="queues_create_transaction_item", run_type="uipath")
133
145
  async def create_transaction_item_async(
@@ -143,7 +155,10 @@ class QueuesService(FolderContext, BaseService):
143
155
  Response: HTTP response containing the transaction item details.
144
156
  """
145
157
  spec = self._create_transaction_item_spec(item, no_robot)
146
- return await self.request_async(spec.method, url=spec.endpoint, json=spec.json)
158
+ response = await self.request_async(
159
+ spec.method, url=spec.endpoint, json=spec.json
160
+ )
161
+ return response.json()
147
162
 
148
163
  @traced(name="queues_update_progress_of_transaction_item", run_type="uipath")
149
164
  def update_progress_of_transaction_item(
@@ -161,7 +176,8 @@ class QueuesService(FolderContext, BaseService):
161
176
  Related Activity: [Set Transaction Progress](https://docs.uipath.com/activities/other/latest/workflow/set-transaction-progress)
162
177
  """
163
178
  spec = self._update_progress_of_transaction_item_spec(transaction_key, progress)
164
- return self.request(spec.method, url=spec.endpoint, json=spec.json)
179
+ response = self.request(spec.method, url=spec.endpoint, json=spec.json)
180
+ return response.json()
165
181
 
166
182
  @traced(name="queues_update_progress_of_transaction_item", run_type="uipath")
167
183
  async def update_progress_of_transaction_item_async(
@@ -179,7 +195,10 @@ class QueuesService(FolderContext, BaseService):
179
195
  Related Activity: [Set Transaction Progress](https://docs.uipath.com/activities/other/latest/workflow/set-transaction-progress)
180
196
  """
181
197
  spec = self._update_progress_of_transaction_item_spec(transaction_key, progress)
182
- return await self.request_async(spec.method, url=spec.endpoint, json=spec.json)
198
+ response = await self.request_async(
199
+ spec.method, url=spec.endpoint, json=spec.json
200
+ )
201
+ return response.json()
183
202
 
184
203
  @traced(name="queues_complete_transaction_item", run_type="uipath")
185
204
  def complete_transaction_item(
@@ -197,7 +216,8 @@ class QueuesService(FolderContext, BaseService):
197
216
  Related Activity: [Set Transaction Status](https://docs.uipath.com/activities/other/latest/workflow/set-transaction-status)
198
217
  """
199
218
  spec = self._complete_transaction_item_spec(transaction_key, result)
200
- return self.request(spec.method, url=spec.endpoint, json=spec.json)
219
+ response = self.request(spec.method, url=spec.endpoint, json=spec.json)
220
+ return response.json()
201
221
 
202
222
  @traced(name="queues_complete_transaction_item", run_type="uipath")
203
223
  async def complete_transaction_item_async(
@@ -215,7 +235,10 @@ class QueuesService(FolderContext, BaseService):
215
235
  Related Activity: [Set Transaction Status](https://docs.uipath.com/activities/other/latest/workflow/set-transaction-status)
216
236
  """
217
237
  spec = self._complete_transaction_item_spec(transaction_key, result)
218
- return await self.request_async(spec.method, url=spec.endpoint, json=spec.json)
238
+ response = await self.request_async(
239
+ spec.method, url=spec.endpoint, json=spec.json
240
+ )
241
+ return response.json()
219
242
 
220
243
  @property
221
244
  def custom_headers(self) -> Dict[str, str]: