Skip to content

feat: mirror GetUserAccessToken in the Python job-api IPC contract - #1915

Open
erghe wants to merge 2 commits into
mainfrom
feat/python-job-api-user-token
Open

erghe wants to merge 2 commits into
mainfrom
feat/python-job-api-user-token

Conversation

@erghe

@erghe erghe commented Sep 28, 2026

Copy link
Copy Markdown

Adds GetUserAccessToken and PythonUserAccessTokenRequestDto to the IPythonJobApi contract, so a job can later ask the handler for a user access token, optionally with its own scopes. Nothing calls it yet. Server side: UiPath/hdens#8253.

The method isn't abstract because the fakes in tests/cli/test_job_api.py subclass IPythonJobApi; the IPC proxy forwards any method on the class, so the body never runs.

just lint, just format and mypy src tests pass. The package version still needs a bump from 2.14.25 before merge.

🤖 Generated with Claude Code

@github-actions github-actions Bot added test:uipath-langchain Triggers tests in the uipath-langchain-python repository test:uipath-integrations labels Sep 28, 2026
@erghe
erghe marked this pull request as ready for review September 29, 2026 11:35
Copilot AI balanced review requested due to automatic review settings September 29, 2026 11:35

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The new wire DTO and non-abstract proxy method lack contract tests, and the acknowledged package version bump remains outstanding.

Review effort: Balanced
Findings: 2 Medium severity

Open (2)
What changed in this PR

Mirrors the user access-token operation in the Python job API IPC contract.

Changes:

  • Adds the token request DTO with optional scopes.
  • Adds non-abstract GetUserAccessToken forwarding.
File Description
packages/​uipath/​src/​uipath/​_cli/​_job_api.py Extends the IPC contract for user access tokens.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +68 to +73
class PythonUserAccessTokenRequestDto:
"""A token request; field names are the wire keys (do not rename)."""

jobKey: str
resumeVersion: int | None = None
scopes: str | None = None
Comment on lines +112 to +114
async def GetUserAccessToken(self, request: PythonUserAccessTokenRequestDto) -> str:
"""Request a user access token for the job; empty scopes means the job's default scopes."""
raise NotImplementedError
@github-actions

Copy link
Copy Markdown

🚨 Heads up: uipath-integrations cross-tests are FAILING 🚨

Your changes may break one or more integrations in uipath-integrations-python:

  • uipath-openai-agents
  • uipath-google-adk
  • uipath-agent-framework
  • uipath-llamaindex
  • uipath-pydantic-ai

⚠️ These checks are NOT enforced by branch protection rules. Please review the failures before merging.

🔍 Inspect the failed run →

@sonarqubecloud

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown

🚨 Heads up: uipath-langchain cross-tests are FAILING 🚨

Your changes may break the uipath-langchain-python integration.

⚠️ These checks are NOT enforced by branch protection rules. Please review the failures before merging.

🔍 Inspect the failed run →

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test:uipath-integrations test:uipath-langchain Triggers tests in the uipath-langchain-python repository

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants