uipath 2.1.40__tar.gz → 2.1.42__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.
- {uipath-2.1.40 → uipath-2.1.42}/PKG-INFO +1 -1
- {uipath-2.1.40 → uipath-2.1.42}/pyproject.toml +1 -1
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_cli/_auth/_auth_server.py +2 -2
- uipath-2.1.42/src/uipath/_cli/_auth/_auth_service.py +151 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_cli/_auth/_client_credentials.py +21 -22
- uipath-2.1.42/src/uipath/_cli/_auth/_oidc_utils.py +75 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_cli/_auth/_portal_service.py +23 -22
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_cli/_auth/_url_utils.py +15 -5
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_cli/_dev/_terminal/__init__.py +50 -10
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_cli/_dev/_terminal/_components/_chat.py +23 -5
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_cli/_dev/_terminal/_components/_details.py +10 -2
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_cli/_dev/_terminal/_components/_new.py +16 -3
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_cli/_dev/_terminal/_models/_execution.py +14 -5
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_cli/_dev/_terminal/_styles/terminal.tcss +9 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_cli/_runtime/_contracts.py +3 -1
- uipath-2.1.42/src/uipath/_cli/cli_auth.py +83 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_cli/cli_invoke.py +20 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_cli/middlewares.py +1 -0
- uipath-2.1.42/tests/cli/test_auth.py +148 -0
- {uipath-2.1.40 → uipath-2.1.42}/tests/cli/test_portal_service_ensure_valid_token.py +16 -18
- {uipath-2.1.40 → uipath-2.1.42}/tests/cli/test_portal_service_refresh_token.py +16 -7
- {uipath-2.1.40 → uipath-2.1.42}/uv.lock +1 -1
- uipath-2.1.40/src/uipath/_cli/_auth/_oidc_utils.py +0 -70
- uipath-2.1.40/src/uipath/_cli/cli_auth.py +0 -216
- uipath-2.1.40/tests/cli/test_auth.py +0 -141
- {uipath-2.1.40 → uipath-2.1.42}/.cursorrules +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/.editorconfig +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/.gitattributes +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/.github/workflows/cd.yml +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/.github/workflows/ci.yml +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/.github/workflows/commitlint.yml +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/.github/workflows/lint.yml +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/.github/workflows/publish-dev.yml +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/.github/workflows/publish-docs.yml +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/.github/workflows/slack.yml +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/.github/workflows/test.yml +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/.gitignore +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/.pre-commit-config.yaml +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/.python-version +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/.vscode/extensions.json +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/.vscode/launch.json +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/.vscode/settings.json +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/CONTRIBUTING.md +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/LICENSE +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/README.md +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/docs/CONTRIBUTING.md +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/docs/FAQ.md +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/docs/assets/env-preparation-failed-dark.png +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/docs/assets/env-preparation-failed-light.png +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/docs/assets/favicon.png +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/docs/assets/logo-dark.svg +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/docs/assets/logo-light.svg +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/docs/cli/index.md +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/docs/core/actions.md +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/docs/core/assets/cloud_env_var_dark.gif +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/docs/core/assets/cloud_env_var_light.gif +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/docs/core/assets/cloud_env_var_secret_dark.png +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/docs/core/assets/cloud_env_var_secret_light.png +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/docs/core/assets/copy_path_dark.png +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/docs/core/assets/copy_path_light.png +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/docs/core/assets.md +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/docs/core/attachments.md +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/docs/core/buckets.md +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/docs/core/connections.md +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/docs/core/context_grounding.md +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/docs/core/environment_variables.md +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/docs/core/getting_started.md +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/docs/core/jobs.md +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/docs/core/llm_gateway.md +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/docs/core/processes.md +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/docs/core/queues.md +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/docs/core/traced.md +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/docs/hooks.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/docs/index.md +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/docs/javascripts/extra.js +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/docs/overrides/main.html +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/docs/overrides/partials/actions.html +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/docs/overrides/partials/logo.html +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/docs/release_policy.md +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/docs/sample_images/google-ADK-agent/agent-output.png +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/docs/stylesheets/extra.css +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/justfile +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/mkdocs.yml +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/py.typed +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/samples/event-trigger/.python-version +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/samples/event-trigger/README.md +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/samples/event-trigger/main.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/samples/event-trigger/pyproject.toml +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/samples/google-ADK-agent/.env.example +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/samples/google-ADK-agent/README.md +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/samples/google-ADK-agent/input.json +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/samples/google-ADK-agent/multi_tool_agent/__init__.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/samples/google-ADK-agent/multi_tool_agent/agent.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/samples/google-ADK-agent/pyproject.toml +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/samples/google-ADK-agent/uv.lock +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/scripts/debug_test.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/scripts/lint_httpx_client.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/__init__.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_cli/README.md +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_cli/__init__.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_cli/_auth/_models.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_cli/_auth/_utils.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_cli/_auth/auth_config.json +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_cli/_auth/index.html +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_cli/_auth/localhost.crt +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_cli/_auth/localhost.key +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_cli/_dev/_terminal/_components/_history.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_cli/_dev/_terminal/_components/_json_input.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_cli/_dev/_terminal/_models/_messages.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_cli/_dev/_terminal/_utils/_chat.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_cli/_dev/_terminal/_utils/_exporter.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_cli/_dev/_terminal/_utils/_logger.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_cli/_evals/_evaluators/__init__.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_cli/_evals/_evaluators/_deterministic_evaluator_base.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_cli/_evals/_evaluators/_evaluator_base.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_cli/_evals/_evaluators/_evaluator_factory.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_cli/_evals/_evaluators/_exact_match_evaluator.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_cli/_evals/_evaluators/_json_similarity_evaluator.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_cli/_evals/_evaluators/_llm_as_judge_evaluator.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_cli/_evals/_evaluators/_trajectory_evaluator.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_cli/_evals/_models/__init__.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_cli/_evals/_models/_evaluation_set.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_cli/_evals/_models/_evaluators.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_cli/_evals/evaluation_service.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_cli/_evals/progress_reporter.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_cli/_push/sw_file_handler.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_cli/_runtime/_escalation.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_cli/_runtime/_hitl.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_cli/_runtime/_logging.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_cli/_runtime/_runtime.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_cli/_templates/.psmdcp.template +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_cli/_templates/.rels.template +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_cli/_templates/[Content_Types].xml.template +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_cli/_templates/main.py.template +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_cli/_templates/package.nuspec.template +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_cli/_utils/_common.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_cli/_utils/_console.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_cli/_utils/_constants.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_cli/_utils/_debug.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_cli/_utils/_folders.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_cli/_utils/_input_args.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_cli/_utils/_parse_ast.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_cli/_utils/_processes.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_cli/_utils/_project_files.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_cli/_utils/_studio_project.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_cli/_utils/_tracing.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_cli/_utils/_uv_helpers.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_cli/cli_deploy.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_cli/cli_dev.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_cli/cli_eval.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_cli/cli_init.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_cli/cli_new.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_cli/cli_pack.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_cli/cli_publish.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_cli/cli_pull.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_cli/cli_push.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_cli/cli_run.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_cli/spinner.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_config.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_execution_context.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_folder_context.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_services/__init__.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_services/_base_service.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_services/actions_service.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_services/api_client.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_services/assets_service.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_services/attachments_service.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_services/buckets_service.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_services/connections_service.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_services/context_grounding_service.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_services/folder_service.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_services/jobs_service.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_services/llm_gateway_service.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_services/processes_service.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_services/queues_service.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_uipath.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_utils/__init__.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_utils/_endpoint.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_utils/_infer_bindings.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_utils/_logs.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_utils/_read_overwrites.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_utils/_request_override.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_utils/_request_spec.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_utils/_ssl_context.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_utils/_url.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_utils/_user_agent.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/_utils/constants.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/agent/conversation/__init__.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/agent/conversation/async_stream.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/agent/conversation/citation.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/agent/conversation/content.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/agent/conversation/conversation.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/agent/conversation/event.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/agent/conversation/exchange.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/agent/conversation/message.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/agent/conversation/meta.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/agent/conversation/tool.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/models/__init__.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/models/action_schema.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/models/actions.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/models/assets.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/models/attachment.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/models/buckets.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/models/connections.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/models/context_grounding.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/models/context_grounding_index.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/models/errors.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/models/exceptions.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/models/interrupt_models.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/models/job.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/models/llm_gateway.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/models/processes.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/models/queues.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/py.typed +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/telemetry/__init__.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/telemetry/_constants.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/telemetry/_track.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/tracing/__init__.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/tracing/_otel_exporters.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/tracing/_traced.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/tracing/_utils.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/utils/__init__.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/src/uipath/utils/_endpoints_manager.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/tests/__init__.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/tests/cli/conftest.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/tests/cli/evaluators/test_json_similarity_evaluator.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/tests/cli/mocks/bindings_script.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/tests/cli/mocks/pyproject.toml +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/tests/cli/mocks/simple_script.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/tests/cli/mocks/uipath-mock.json +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/tests/cli/mocks/uipath-simple-script-mock.json +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/tests/cli/test_hitl.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/tests/cli/test_init.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/tests/cli/test_input_args.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/tests/cli/test_invoke.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/tests/cli/test_new.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/tests/cli/test_pack.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/tests/cli/test_publish.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/tests/cli/test_pull.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/tests/cli/test_push.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/tests/cli/test_run.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/tests/cli/test_utils.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/tests/cli/utils/common.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/tests/cli/utils/project_details.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/tests/cli/utils/uipath_json.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/tests/conftest.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/tests/sdk/services/conftest.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/tests/sdk/services/test_actions_service.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/tests/sdk/services/test_api_client.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/tests/sdk/services/test_assets_service.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/tests/sdk/services/test_attachments_service.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/tests/sdk/services/test_base_service.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/tests/sdk/services/test_buckets_service.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/tests/sdk/services/test_connections_service.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/tests/sdk/services/test_context_grounding_service.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/tests/sdk/services/test_folder_service.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/tests/sdk/services/test_jobs_service.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/tests/sdk/services/test_llm_integration.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/tests/sdk/services/test_llm_schema_cleanup.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/tests/sdk/services/test_llm_service.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/tests/sdk/services/test_processes_service.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/tests/sdk/services/test_queues_service.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/tests/sdk/services/test_uipath_llm_integration.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/tests/sdk/test_bindings_inference.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/tests/sdk/test_config.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/tests/sdk/test_overwrites.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/tests/tracing/test_otel_exporters.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/tests/tracing/test_span_utils.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/tests/tracing/test_traced.py +0 -0
- {uipath-2.1.40 → uipath-2.1.42}/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.1.
|
3
|
+
Version: 2.1.42
|
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
|
@@ -1,6 +1,6 @@
|
|
1
1
|
[project]
|
2
2
|
name = "uipath"
|
3
|
-
version = "2.1.
|
3
|
+
version = "2.1.42"
|
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"
|
@@ -7,7 +7,7 @@ import threading
|
|
7
7
|
import time
|
8
8
|
from typing import Optional
|
9
9
|
|
10
|
-
from ._oidc_utils import
|
10
|
+
from ._oidc_utils import OidcUtils
|
11
11
|
|
12
12
|
# Server port
|
13
13
|
PORT = 6234
|
@@ -74,7 +74,7 @@ def make_request_handler_class(state, code_verifier, token_callback, domain):
|
|
74
74
|
content = f.read()
|
75
75
|
|
76
76
|
# Get the redirect URI from auth config
|
77
|
-
auth_config = get_auth_config()
|
77
|
+
auth_config = OidcUtils.get_auth_config()
|
78
78
|
redirect_uri = auth_config["redirect_uri"]
|
79
79
|
|
80
80
|
content = content.replace("__PY_REPLACE_EXPECTED_STATE__", state)
|
@@ -0,0 +1,151 @@
|
|
1
|
+
import asyncio
|
2
|
+
import json
|
3
|
+
import os
|
4
|
+
import webbrowser
|
5
|
+
from socket import AF_INET, SOCK_STREAM, error, socket
|
6
|
+
from typing import Optional
|
7
|
+
from urllib.parse import urlparse
|
8
|
+
|
9
|
+
from uipath._cli._auth._auth_server import HTTPServer
|
10
|
+
from uipath._cli._auth._client_credentials import ClientCredentialsService
|
11
|
+
from uipath._cli._auth._oidc_utils import OidcUtils
|
12
|
+
from uipath._cli._auth._portal_service import PortalService, select_tenant
|
13
|
+
from uipath._cli._auth._url_utils import set_force_flag
|
14
|
+
from uipath._cli._auth._utils import update_auth_file, update_env_file
|
15
|
+
from uipath._cli._utils._console import ConsoleLogger
|
16
|
+
|
17
|
+
|
18
|
+
class AuthService:
|
19
|
+
def __init__(
|
20
|
+
self,
|
21
|
+
environment: str,
|
22
|
+
*,
|
23
|
+
force: bool,
|
24
|
+
client_id: Optional[str],
|
25
|
+
client_secret: Optional[str],
|
26
|
+
base_url: Optional[str],
|
27
|
+
scope: Optional[str],
|
28
|
+
):
|
29
|
+
self._force = force
|
30
|
+
self._console = ConsoleLogger()
|
31
|
+
self._domain = self._get_domain(environment)
|
32
|
+
self._client_id = client_id
|
33
|
+
self._client_secret = client_secret
|
34
|
+
self._base_url = base_url
|
35
|
+
self._scope = scope
|
36
|
+
set_force_flag(self._force)
|
37
|
+
|
38
|
+
def _get_domain(self, environment: str) -> str:
|
39
|
+
# only search env var if not force authentication
|
40
|
+
if not self._force:
|
41
|
+
uipath_url = os.getenv("UIPATH_URL")
|
42
|
+
if uipath_url and environment == "cloud": # "cloud" is the default
|
43
|
+
parsed_url = urlparse(uipath_url)
|
44
|
+
if parsed_url.scheme and parsed_url.netloc:
|
45
|
+
environment = f"{parsed_url.scheme}://{parsed_url.netloc}"
|
46
|
+
else:
|
47
|
+
self._console.error(
|
48
|
+
f"Malformed UIPATH_URL: '{uipath_url}'. Please ensure it includes both scheme and netloc (e.g., 'https://cloud.uipath.com')."
|
49
|
+
)
|
50
|
+
return environment
|
51
|
+
|
52
|
+
def authenticate(self) -> None:
|
53
|
+
if self._client_id and self._client_secret:
|
54
|
+
self._authenticate_client_credentials()
|
55
|
+
return
|
56
|
+
|
57
|
+
self._authenticate_authorization_code()
|
58
|
+
|
59
|
+
def _authenticate_client_credentials(self) -> None:
|
60
|
+
if not self._base_url:
|
61
|
+
self._console.error(
|
62
|
+
"--base-url is required when using client credentials authentication."
|
63
|
+
)
|
64
|
+
return
|
65
|
+
self._console.hint("Using client credentials authentication.")
|
66
|
+
credentials_service = ClientCredentialsService(self._base_url)
|
67
|
+
credentials_service.authenticate(
|
68
|
+
self._client_id, # type: ignore
|
69
|
+
self._client_secret, # type: ignore
|
70
|
+
self._scope,
|
71
|
+
)
|
72
|
+
|
73
|
+
def _authenticate_authorization_code(self) -> None:
|
74
|
+
with PortalService(self._domain) as portal_service:
|
75
|
+
if not self._force:
|
76
|
+
# use existing env vars
|
77
|
+
if (
|
78
|
+
os.getenv("UIPATH_URL")
|
79
|
+
and os.getenv("UIPATH_TENANT_ID")
|
80
|
+
and os.getenv("UIPATH_ORGANIZATION_ID")
|
81
|
+
):
|
82
|
+
try:
|
83
|
+
portal_service.ensure_valid_token()
|
84
|
+
return
|
85
|
+
except Exception:
|
86
|
+
self._console.error(
|
87
|
+
"Authentication token is invalid. Please reauthenticate using the '--force' flag.",
|
88
|
+
)
|
89
|
+
auth_url, code_verifier, state = OidcUtils.get_auth_url(self._domain)
|
90
|
+
webbrowser.open(auth_url, 1)
|
91
|
+
auth_config = OidcUtils.get_auth_config()
|
92
|
+
|
93
|
+
self._console.link(
|
94
|
+
"If a browser window did not open, please open the following URL in your browser:",
|
95
|
+
auth_url,
|
96
|
+
)
|
97
|
+
server = HTTPServer(port=auth_config["port"])
|
98
|
+
token_data = asyncio.run(server.start(state, code_verifier, self._domain))
|
99
|
+
|
100
|
+
if not token_data:
|
101
|
+
self._console.error(
|
102
|
+
"Authentication failed. Please try again.",
|
103
|
+
)
|
104
|
+
|
105
|
+
portal_service.update_token_data(token_data)
|
106
|
+
update_auth_file(token_data)
|
107
|
+
access_token = token_data["access_token"]
|
108
|
+
update_env_file({"UIPATH_ACCESS_TOKEN": access_token})
|
109
|
+
|
110
|
+
tenants_and_organizations = portal_service.get_tenants_and_organizations()
|
111
|
+
base_url = select_tenant(self._domain, tenants_and_organizations)
|
112
|
+
try:
|
113
|
+
portal_service.post_auth(base_url)
|
114
|
+
except Exception:
|
115
|
+
self._console.error(
|
116
|
+
"Could not prepare the environment. Please try again.",
|
117
|
+
)
|
118
|
+
|
119
|
+
def set_port(self):
|
120
|
+
def is_port_in_use(target_port: int) -> bool:
|
121
|
+
with socket(AF_INET, SOCK_STREAM) as s:
|
122
|
+
try:
|
123
|
+
s.bind(("localhost", target_port))
|
124
|
+
s.close()
|
125
|
+
return False
|
126
|
+
except error:
|
127
|
+
return True
|
128
|
+
|
129
|
+
auth_config = OidcUtils.get_auth_config()
|
130
|
+
port = int(auth_config.get("port", 8104))
|
131
|
+
port_option_one = int(auth_config.get("portOptionOne", 8104)) # type: ignore
|
132
|
+
port_option_two = int(auth_config.get("portOptionTwo", 8055)) # type: ignore
|
133
|
+
port_option_three = int(auth_config.get("portOptionThree", 42042)) # type: ignore
|
134
|
+
if is_port_in_use(port):
|
135
|
+
if is_port_in_use(port_option_one):
|
136
|
+
if is_port_in_use(port_option_two):
|
137
|
+
if is_port_in_use(port_option_three):
|
138
|
+
self._console.error(
|
139
|
+
"All configured ports are in use. Please close applications using ports or configure different ports."
|
140
|
+
)
|
141
|
+
else:
|
142
|
+
port = port_option_three
|
143
|
+
else:
|
144
|
+
port = port_option_two
|
145
|
+
else:
|
146
|
+
port = port_option_one
|
147
|
+
auth_config["port"] = port
|
148
|
+
with open(
|
149
|
+
os.path.join(os.path.dirname(__file__), "..", "auth_config.json"), "w"
|
150
|
+
) as f:
|
151
|
+
json.dump(auth_config, f)
|
@@ -1,4 +1,4 @@
|
|
1
|
-
from typing import Optional
|
1
|
+
from typing import Optional, cast
|
2
2
|
from urllib.parse import urlparse
|
3
3
|
|
4
4
|
import httpx
|
@@ -14,12 +14,13 @@ console = ConsoleLogger()
|
|
14
14
|
class ClientCredentialsService:
|
15
15
|
"""Service for client credentials authentication flow."""
|
16
16
|
|
17
|
-
def __init__(self,
|
18
|
-
self.
|
17
|
+
def __init__(self, base_url: str):
|
18
|
+
self._base_url = base_url
|
19
|
+
self._domain = self._extract_domain_from_base_url(base_url)
|
19
20
|
|
20
21
|
def get_token_url(self) -> str:
|
21
22
|
"""Get the token URL for the specified domain."""
|
22
|
-
match self.
|
23
|
+
match self._domain:
|
23
24
|
case "alpha":
|
24
25
|
return "https://alpha.uipath.com/identity_/connect/token"
|
25
26
|
case "staging":
|
@@ -39,7 +40,7 @@ class ClientCredentialsService:
|
|
39
40
|
"""
|
40
41
|
return hostname == domain or hostname.endswith(f".{domain}")
|
41
42
|
|
42
|
-
def
|
43
|
+
def _extract_domain_from_base_url(self, base_url: str) -> str:
|
43
44
|
"""Extract domain from base URL.
|
44
45
|
|
45
46
|
Args:
|
@@ -71,7 +72,7 @@ class ClientCredentialsService:
|
|
71
72
|
|
72
73
|
def authenticate(
|
73
74
|
self, client_id: str, client_secret: str, scope: Optional[str] = "OR.Execution"
|
74
|
-
) ->
|
75
|
+
) -> None:
|
75
76
|
"""Authenticate using client credentials flow.
|
76
77
|
|
77
78
|
Args:
|
@@ -97,37 +98,35 @@ class ClientCredentialsService:
|
|
97
98
|
match response.status_code:
|
98
99
|
case 200:
|
99
100
|
token_data = response.json()
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
101
|
+
token_data = cast(
|
102
|
+
TokenData,
|
103
|
+
{
|
104
|
+
"access_token": token_data["access_token"],
|
105
|
+
"token_type": token_data.get("token_type", "Bearer"),
|
106
|
+
"expires_in": token_data.get("expires_in", 3600),
|
107
|
+
"scope": token_data.get("scope", scope),
|
108
|
+
"refresh_token": "",
|
109
|
+
"id_token": "",
|
110
|
+
},
|
111
|
+
)
|
112
|
+
self._setup_environment(token_data)
|
109
113
|
case 400:
|
110
114
|
console.error(
|
111
115
|
"Invalid client credentials or request parameters."
|
112
116
|
)
|
113
|
-
return None
|
114
117
|
case 401:
|
115
118
|
console.error("Unauthorized: Invalid client credentials.")
|
116
|
-
return None
|
117
119
|
case _:
|
118
120
|
console.error(
|
119
121
|
f"Authentication failed: {response.status_code} - {response.text}"
|
120
122
|
)
|
121
|
-
return None
|
122
123
|
|
123
124
|
except httpx.RequestError as e:
|
124
125
|
console.error(f"Network error during authentication: {e}")
|
125
|
-
return None
|
126
126
|
except Exception as e:
|
127
127
|
console.error(f"Unexpected error during authentication: {e}")
|
128
|
-
return None
|
129
128
|
|
130
|
-
def
|
129
|
+
def _setup_environment(self, token_data: TokenData):
|
131
130
|
"""Setup environment variables for client credentials authentication.
|
132
131
|
|
133
132
|
Args:
|
@@ -138,7 +137,7 @@ class ClientCredentialsService:
|
|
138
137
|
|
139
138
|
env_vars = {
|
140
139
|
"UIPATH_ACCESS_TOKEN": token_data["access_token"],
|
141
|
-
"UIPATH_URL":
|
140
|
+
"UIPATH_URL": self._base_url,
|
142
141
|
"UIPATH_ORGANIZATION_ID": parsed_access_token.get("prt_id", ""),
|
143
142
|
"UIPATH_TENANT_ID": "",
|
144
143
|
}
|
@@ -0,0 +1,75 @@
|
|
1
|
+
import base64
|
2
|
+
import hashlib
|
3
|
+
import json
|
4
|
+
import os
|
5
|
+
from urllib.parse import urlencode
|
6
|
+
|
7
|
+
from ._models import AuthConfig
|
8
|
+
from ._url_utils import build_service_url
|
9
|
+
|
10
|
+
|
11
|
+
def generate_code_verifier_and_challenge():
|
12
|
+
"""Generate PKCE code verifier and challenge."""
|
13
|
+
code_verifier = base64.urlsafe_b64encode(os.urandom(32)).decode("utf-8").rstrip("=")
|
14
|
+
|
15
|
+
code_challenge_bytes = hashlib.sha256(code_verifier.encode("utf-8")).digest()
|
16
|
+
code_challenge = (
|
17
|
+
base64.urlsafe_b64encode(code_challenge_bytes).decode("utf-8").rstrip("=")
|
18
|
+
)
|
19
|
+
|
20
|
+
return code_verifier, code_challenge
|
21
|
+
|
22
|
+
|
23
|
+
def get_state_param() -> str:
|
24
|
+
return base64.urlsafe_b64encode(os.urandom(32)).decode("utf-8").rstrip("=")
|
25
|
+
|
26
|
+
|
27
|
+
class OidcUtils:
|
28
|
+
@classmethod
|
29
|
+
def get_auth_config(cls) -> AuthConfig:
|
30
|
+
with open(
|
31
|
+
os.path.join(os.path.dirname(__file__), "auth_config.json"), "r"
|
32
|
+
) as f:
|
33
|
+
auth_config = json.load(f)
|
34
|
+
|
35
|
+
port = auth_config.get("port", 8104)
|
36
|
+
|
37
|
+
redirect_uri = auth_config["redirect_uri"].replace(
|
38
|
+
"__PY_REPLACE_PORT__", str(port)
|
39
|
+
)
|
40
|
+
|
41
|
+
return AuthConfig(
|
42
|
+
client_id=auth_config["client_id"],
|
43
|
+
redirect_uri=redirect_uri,
|
44
|
+
scope=auth_config["scope"],
|
45
|
+
port=port,
|
46
|
+
)
|
47
|
+
|
48
|
+
@classmethod
|
49
|
+
def get_auth_url(cls, domain: str) -> tuple[str, str, str]:
|
50
|
+
"""Get the authorization URL for OAuth2 PKCE flow.
|
51
|
+
|
52
|
+
Args:
|
53
|
+
domain (str): The UiPath domain to authenticate against (e.g. 'alpha', 'cloud')
|
54
|
+
|
55
|
+
Returns:
|
56
|
+
tuple[str, str]: A tuple containing:
|
57
|
+
- The authorization URL with query parameters
|
58
|
+
- The code verifier for PKCE flow
|
59
|
+
"""
|
60
|
+
code_verifier, code_challenge = generate_code_verifier_and_challenge()
|
61
|
+
auth_config = cls.get_auth_config()
|
62
|
+
state = get_state_param()
|
63
|
+
query_params = {
|
64
|
+
"client_id": auth_config["client_id"],
|
65
|
+
"redirect_uri": auth_config["redirect_uri"],
|
66
|
+
"response_type": "code",
|
67
|
+
"scope": auth_config["scope"],
|
68
|
+
"state": state,
|
69
|
+
"code_challenge": code_challenge,
|
70
|
+
"code_challenge_method": "S256",
|
71
|
+
}
|
72
|
+
|
73
|
+
query_string = urlencode(query_params)
|
74
|
+
url = build_service_url(domain, f"/identity_/connect/authorize?{query_string}")
|
75
|
+
return url, code_verifier, state
|
@@ -8,7 +8,7 @@ import httpx
|
|
8
8
|
from ..._utils._ssl_context import get_httpx_client_kwargs
|
9
9
|
from .._utils._console import ConsoleLogger
|
10
10
|
from ._models import TenantsAndOrganizationInfoResponse, TokenData
|
11
|
-
from ._oidc_utils import
|
11
|
+
from ._oidc_utils import OidcUtils
|
12
12
|
from ._url_utils import build_service_url, get_base_url
|
13
13
|
from ._utils import (
|
14
14
|
get_auth_data,
|
@@ -102,7 +102,7 @@ class PortalService:
|
|
102
102
|
raise RuntimeError("HTTP client is not initialized")
|
103
103
|
|
104
104
|
url = build_service_url(self.domain, "/identity_/connect/token")
|
105
|
-
client_id = get_auth_config().get("client_id")
|
105
|
+
client_id = OidcUtils.get_auth_config().get("client_id")
|
106
106
|
|
107
107
|
data = {
|
108
108
|
"grant_type": "refresh_token",
|
@@ -136,32 +136,33 @@ class PortalService:
|
|
136
136
|
auth_data = get_auth_data()
|
137
137
|
claims = get_parsed_token_data(auth_data)
|
138
138
|
exp = claims.get("exp")
|
139
|
-
|
140
139
|
if exp is not None and float(exp) > time.time():
|
141
140
|
if not os.getenv("UIPATH_URL"):
|
142
141
|
tenants_and_organizations = self.get_tenants_and_organizations()
|
143
142
|
select_tenant(
|
144
143
|
self.domain if self.domain else "alpha", tenants_and_organizations
|
145
144
|
)
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
145
|
+
updated_env_contents = {
|
146
|
+
"UIPATH_ACCESS_TOKEN": auth_data["access_token"],
|
147
|
+
}
|
148
|
+
else:
|
149
|
+
refresh_token = auth_data.get("refresh_token")
|
150
|
+
if refresh_token is None:
|
151
|
+
raise Exception("Refresh token not found")
|
152
|
+
token_data = self.post_refresh_token_request(refresh_token)
|
153
|
+
update_auth_file(token_data)
|
154
|
+
|
155
|
+
self.access_token = token_data["access_token"]
|
156
|
+
self.prt_id = claims.get("prt_id")
|
157
|
+
|
158
|
+
updated_env_contents = {
|
159
|
+
"UIPATH_ACCESS_TOKEN": token_data["access_token"],
|
160
|
+
}
|
161
|
+
if not os.getenv("UIPATH_URL"):
|
162
|
+
tenants_and_organizations = self.get_tenants_and_organizations()
|
163
|
+
select_tenant(
|
164
|
+
self.domain if self.domain else "alpha", tenants_and_organizations
|
165
|
+
)
|
165
166
|
|
166
167
|
update_env_file(updated_env_contents)
|
167
168
|
|
@@ -1,6 +1,8 @@
|
|
1
1
|
import os
|
2
2
|
from urllib.parse import urlparse
|
3
3
|
|
4
|
+
ignore_env_var = False
|
5
|
+
|
4
6
|
|
5
7
|
def get_base_url(domain: str) -> str:
|
6
8
|
"""Get the base URL for UiPath services.
|
@@ -11,11 +13,14 @@ def get_base_url(domain: str) -> str:
|
|
11
13
|
Returns:
|
12
14
|
The base URL to use for UiPath services
|
13
15
|
"""
|
14
|
-
|
15
|
-
|
16
|
-
if
|
17
|
-
|
18
|
-
|
16
|
+
global ignore_env_var
|
17
|
+
|
18
|
+
if not ignore_env_var:
|
19
|
+
# If UIPATH_URL is set and domain is 'cloud' (default), use the base from UIPATH_URL
|
20
|
+
uipath_url = os.getenv("UIPATH_URL")
|
21
|
+
if uipath_url and domain == "cloud":
|
22
|
+
parsed_url = urlparse(uipath_url)
|
23
|
+
return f"{parsed_url.scheme}://{parsed_url.netloc}"
|
19
24
|
|
20
25
|
# If domain is already a full URL, use it directly
|
21
26
|
if domain.startswith("http"):
|
@@ -25,6 +30,11 @@ def get_base_url(domain: str) -> str:
|
|
25
30
|
return f"https://{domain if domain else 'cloud'}.uipath.com"
|
26
31
|
|
27
32
|
|
33
|
+
def set_force_flag(force: bool):
|
34
|
+
global ignore_env_var
|
35
|
+
ignore_env_var = force
|
36
|
+
|
37
|
+
|
28
38
|
def build_service_url(domain: str, path: str) -> str:
|
29
39
|
"""Build a service URL by combining the base URL with a path.
|
30
40
|
|
@@ -4,7 +4,7 @@ import traceback
|
|
4
4
|
from datetime import datetime
|
5
5
|
from os import environ as env
|
6
6
|
from pathlib import Path
|
7
|
-
from typing import Any, Dict
|
7
|
+
from typing import Any, Dict, cast
|
8
8
|
from uuid import uuid4
|
9
9
|
|
10
10
|
import pyperclip # type: ignore[import-untyped]
|
@@ -15,7 +15,12 @@ from textual.binding import Binding
|
|
15
15
|
from textual.containers import Container, Horizontal
|
16
16
|
from textual.widgets import Button, Footer, Input, ListView, RichLog
|
17
17
|
|
18
|
-
from uipath.agent.conversation import
|
18
|
+
from uipath.agent.conversation import (
|
19
|
+
UiPathConversationContentPart,
|
20
|
+
UiPathConversationEvent,
|
21
|
+
UiPathConversationMessage,
|
22
|
+
UiPathInlineValue,
|
23
|
+
)
|
19
24
|
|
20
25
|
from ..._runtime._contracts import (
|
21
26
|
UiPathErrorContract,
|
@@ -116,7 +121,8 @@ class UiPathDevTerminal(App[Any]):
|
|
116
121
|
|
117
122
|
details_panel = self.query_one("#details-panel", RunDetailsPanel)
|
118
123
|
if details_panel and details_panel.current_run:
|
119
|
-
|
124
|
+
status = details_panel.current_run.status
|
125
|
+
if status == "running":
|
120
126
|
self.app.notify(
|
121
127
|
"Wait for agent response...", timeout=1.5, severity="warning"
|
122
128
|
)
|
@@ -128,7 +134,22 @@ class UiPathDevTerminal(App[Any]):
|
|
128
134
|
),
|
129
135
|
details_panel.current_run.id,
|
130
136
|
)
|
131
|
-
details_panel.current_run.
|
137
|
+
if details_panel.current_run.status == "suspended":
|
138
|
+
details_panel.current_run.resume_data = user_text
|
139
|
+
else:
|
140
|
+
details_panel.current_run.input_data = UiPathConversationMessage(
|
141
|
+
message_id=str(uuid4()),
|
142
|
+
created_at=datetime.now().isoformat(),
|
143
|
+
updated_at=datetime.now().isoformat(),
|
144
|
+
content_parts=[
|
145
|
+
UiPathConversationContentPart(
|
146
|
+
content_part_id=str(uuid4()),
|
147
|
+
mime_type="text/plain",
|
148
|
+
data=UiPathInlineValue(inline=user_text),
|
149
|
+
)
|
150
|
+
],
|
151
|
+
role="user",
|
152
|
+
)
|
132
153
|
asyncio.create_task(self._execute_runtime(details_panel.current_run))
|
133
154
|
event.input.clear()
|
134
155
|
|
@@ -147,7 +168,7 @@ class UiPathDevTerminal(App[Any]):
|
|
147
168
|
async def action_execute_run(self) -> None:
|
148
169
|
"""Execute a new run with UiPath runtime."""
|
149
170
|
new_run_panel = self.query_one("#new-run-panel", NewRunPanel)
|
150
|
-
entrypoint, input_data = new_run_panel.get_input_values()
|
171
|
+
entrypoint, input_data, conversational = new_run_panel.get_input_values()
|
151
172
|
|
152
173
|
if not entrypoint:
|
153
174
|
return
|
@@ -158,7 +179,7 @@ class UiPathDevTerminal(App[Any]):
|
|
158
179
|
except json.JSONDecodeError:
|
159
180
|
return
|
160
181
|
|
161
|
-
run = ExecutionRun(entrypoint, input)
|
182
|
+
run = ExecutionRun(entrypoint, input, conversational)
|
162
183
|
|
163
184
|
self.runs[run.id] = run
|
164
185
|
|
@@ -166,7 +187,10 @@ class UiPathDevTerminal(App[Any]):
|
|
166
187
|
|
167
188
|
self._show_run_details(run)
|
168
189
|
|
169
|
-
|
190
|
+
if not run.conversational:
|
191
|
+
asyncio.create_task(self._execute_runtime(run))
|
192
|
+
else:
|
193
|
+
self._focus_chat_input()
|
170
194
|
|
171
195
|
async def action_clear_history(self) -> None:
|
172
196
|
"""Clear run history."""
|
@@ -191,6 +215,7 @@ class UiPathDevTerminal(App[Any]):
|
|
191
215
|
entrypoint=run.entrypoint,
|
192
216
|
trace_id=str(uuid4()),
|
193
217
|
execution_id=run.id,
|
218
|
+
is_conversational=run.conversational,
|
194
219
|
logs_min_level=env.get("LOG_LEVEL", "INFO"),
|
195
220
|
log_handler=RunContextLogHandler(
|
196
221
|
run_id=run.id, callback=self._handle_log_message
|
@@ -201,11 +226,16 @@ class UiPathDevTerminal(App[Any]):
|
|
201
226
|
)
|
202
227
|
|
203
228
|
if run.status == "suspended":
|
204
|
-
context.resume = True
|
205
229
|
context.input_json = run.resume_data
|
230
|
+
context.resume = True
|
206
231
|
self._add_info_log(run, f"Resuming execution: {run.entrypoint}")
|
207
232
|
else:
|
208
|
-
|
233
|
+
if run.conversational:
|
234
|
+
context.input_message = cast(
|
235
|
+
UiPathConversationMessage, run.input_data
|
236
|
+
)
|
237
|
+
else:
|
238
|
+
context.input_json = run.input_data
|
209
239
|
self._add_info_log(run, f"Starting execution: {run.entrypoint}")
|
210
240
|
|
211
241
|
run.status = "running"
|
@@ -214,7 +244,10 @@ class UiPathDevTerminal(App[Any]):
|
|
214
244
|
result = await self.runtime_factory.execute_in_root_span(context)
|
215
245
|
|
216
246
|
if result is not None:
|
217
|
-
if
|
247
|
+
if (
|
248
|
+
result.status == UiPathRuntimeStatus.SUSPENDED.value
|
249
|
+
and result.resume
|
250
|
+
):
|
218
251
|
run.status = "suspended"
|
219
252
|
else:
|
220
253
|
run.output_data = result.output
|
@@ -254,6 +287,13 @@ class UiPathDevTerminal(App[Any]):
|
|
254
287
|
# Populate the details panel with run data
|
255
288
|
details_panel.update_run(run)
|
256
289
|
|
290
|
+
def _focus_chat_input(self):
|
291
|
+
"""Focus the chat input box."""
|
292
|
+
details_panel = self.query_one("#details-panel", RunDetailsPanel)
|
293
|
+
details_panel.switch_tab("chat-tab")
|
294
|
+
chat_input = details_panel.query_one("#chat-input", Input)
|
295
|
+
chat_input.focus()
|
296
|
+
|
257
297
|
def _add_run_in_history(self, run: ExecutionRun):
|
258
298
|
"""Add run to history panel."""
|
259
299
|
history_panel = self.query_one("#history-panel", RunHistoryPanel)
|
@@ -1,10 +1,11 @@
|
|
1
1
|
import time
|
2
|
-
from typing import Dict, List, Union
|
2
|
+
from typing import Dict, List, Optional, Union
|
3
3
|
|
4
4
|
from textual.app import ComposeResult
|
5
5
|
from textual.containers import Container, Vertical, VerticalScroll
|
6
6
|
from textual.widgets import Input, Markdown
|
7
7
|
|
8
|
+
from uipath._cli._dev._terminal._models._execution import ExecutionRun
|
8
9
|
from uipath.agent.conversation import (
|
9
10
|
UiPathConversationEvent,
|
10
11
|
UiPathConversationMessage,
|
@@ -44,8 +45,22 @@ class ChatPanel(Container):
|
|
44
45
|
id="chat-input",
|
45
46
|
)
|
46
47
|
|
48
|
+
def update_messages(self, run: ExecutionRun) -> None:
|
49
|
+
"""Update the chat panel with messages from the given execution run."""
|
50
|
+
chat_view = self.query_one("#chat-view")
|
51
|
+
chat_view.remove_children()
|
52
|
+
self._chat_widgets.clear()
|
53
|
+
self._last_update_time.clear()
|
54
|
+
|
55
|
+
for chat_msg in run.messages:
|
56
|
+
self.add_chat_message(None, chat_msg, auto_scroll=False)
|
57
|
+
chat_view.scroll_end(animate=False)
|
58
|
+
|
47
59
|
def add_chat_message(
|
48
|
-
self,
|
60
|
+
self,
|
61
|
+
event: Optional[UiPathConversationEvent],
|
62
|
+
chat_msg: UiPathConversationMessage,
|
63
|
+
auto_scroll: bool = True,
|
49
64
|
) -> None:
|
50
65
|
"""Add or update a chat message bubble."""
|
51
66
|
chat_view = self.query_one("#chat-view")
|
@@ -90,17 +105,20 @@ class ChatPanel(Container):
|
|
90
105
|
|
91
106
|
if existing:
|
92
107
|
should_update = (
|
93
|
-
event
|
108
|
+
event
|
109
|
+
and event.exchange
|
94
110
|
and event.exchange.message
|
95
111
|
and event.exchange.message.end is not None
|
96
112
|
)
|
97
113
|
if should_update or now - last_update > 0.15:
|
98
114
|
existing.update(content)
|
99
115
|
self._last_update_time[chat_msg.message_id] = now
|
100
|
-
|
116
|
+
if auto_scroll:
|
117
|
+
chat_view.scroll_end(animate=False)
|
101
118
|
else:
|
102
119
|
widget_instance = widget_cls(content)
|
103
120
|
chat_view.mount(widget_instance)
|
104
121
|
self._chat_widgets[chat_msg.message_id] = widget_instance
|
105
122
|
self._last_update_time[chat_msg.message_id] = now
|
106
|
-
|
123
|
+
if auto_scroll:
|
124
|
+
chat_view.scroll_end(animate=False)
|