feat(application): add --share-token to run commands - #688
Open
dima-aignostics wants to merge 4 commits into
Open
feat(application): add --share-token to run commands#688dima-aignostics wants to merge 4 commits into
dima-aignostics wants to merge 4 commits into
Conversation
dima-aignostics
force-pushed
the
feat/PYSDK-145-read-run-with-share-token
branch
4 times, most recently
from
June 22, 2026 11:36
b524be7 to
9510e92
Compare
dima-aignostics
force-pushed
the
feat/PYSDK-132-add-run-sharing-to-python-sdk
branch
6 times, most recently
from
June 23, 2026 21:15
6ae872e to
0bc4980
Compare
Base automatically changed from
feat/PYSDK-132-add-run-sharing-to-python-sdk
to
main
June 29, 2026 08:04
dima-aignostics
force-pushed
the
feat/PYSDK-145-read-run-with-share-token
branch
3 times, most recently
from
June 30, 2026 14:04
5ab4c44 to
23c6793
Compare
Codecov Report❌ Patch coverage is
|
…DK-145) Recipients holding a share token secret can now describe a run without OAuth login by passing --share-token <secret> to `application run describe`. The token is used directly as the Bearer token for platform API requests. - Adds `--share-token` option to `run describe`; when set, creates a `Client(token_provider=…)` bypassing OAuth, with `hide_platform_queue_position=True` - Catches `UnauthorizedException` and `ForbiddenException` when using a share token and surfaces a clear "Access denied" message with exit code 1 - Adds 5 integration tests covering success (text + JSON), not-found, unauthorized, and forbidden paths Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
dima-aignostics
force-pushed
the
feat/PYSDK-145-read-run-with-share-token
branch
from
June 30, 2026 15:38
23c6793 to
c3c99ef
Compare
dima-aignostics
force-pushed
the
feat/PYSDK-145-read-run-with-share-token
branch
from
July 1, 2026 11:23
01154f0 to
8bad631
Compare
|
Resolve conflict in application/_cli.py: keep both the --share-token option (this branch) and the --show-checksum option (main) on the run dump-metadata and dump-item-metadata commands. The command bodies already reference both parameters; only the signatures collided. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Adds a --share-token option to `application run describe / dump-metadata / dump-item-metadata / result download` (PYSDK-145), granting an authenticated user access to a run that has been shared with them. - Share-token access still authenticates as the calling user: the platform requires an OAuth Bearer token on every request. The share_token is forwarded as the `share_token` query parameter (on details/results and the artifact /file endpoint) and elevates that user's access to the shared run. Run.for_run_id and the artifact download path therefore keep the normal authenticated client and always send the Bearer header. - 403 handling: re-raise ForbiddenException before the generic ApiException->RuntimeError wrapper in application_run_download so the CLI surfaces the share-token access-denied message. - Percent-encode the share_token in the artifact /file URL so reserved characters cannot corrupt the URL or inject extra query parameters. - Remove three unrelated runtime dependencies (joserfc, python-engineio, python-socketio) that were added but never imported; re-lock. - DRY: extract share_token_access_denied_message() helper and a single ShareTokenOption alias (consistent help text across all four commands). - Rename the misleading _share_token cache-key parameter to share_token. - Add resource-, CLI-, and service-layer tests covering token forwarding, URL encoding, the Bearer header being sent alongside the share_token, authenticated-client wiring, exit-2 not-found paths, and the 403 re-raise. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
olivermeyer
force-pushed
the
feat/PYSDK-145-read-run-with-share-token
branch
from
August 3, 2026 15:00
13331ff to
d8936d0
Compare
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Add
--share-tokenargument to next commands to theuvx aignostics application rungroup: