Repository navigation
feat(sdk): accept a share token in run, item and artifact reads - #187
Merged
Merged
Conversation
getRun, listRunResults, getRunItem, downloadArtifact and downloadArtifactStream take an optional shareToken option and send it as the share_token query parameter. Calls without the option send the same requests as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
OX Security reviewed this pull request — nothing to fix.
Branch |
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #187 +/- ##
==========================================
- Coverage 93.44% 93.42% -0.03%
==========================================
Files 15 15
Lines 2488 2509 +21
Branches 296 297 +1
==========================================
+ Hits 2325 2344 +19
Misses 163 163
- Partials 0 2 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 1 file with indirect coverage changes 🚀 New features to boost your workflow:
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
santi698
approved these changes
Oct 28, 2026
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.



Resolves TSSDK-78.
Summary
The Console needs to read a run that was shared by link (CON-647). The generated
PublicApialready takes ashareTokenon the four run reads, but thePlatformSDKmethods built on them had no way to pass one.getRun,listRunResults,getRunItem,downloadArtifactanddownloadArtifactStreamnow take an optionalshareTokenand hand it to the generated call, which sends it as theshare_tokenquery parameter:listRunResultsalready had an options object, soshareTokenjoins it. The other four get a new trailing options object with a default of{}. Existing call forms keep compiling and send the same requests as in 3.8.1, because the generated code only addsshare_tokenwhen the value is defined.The
feat(sdk)commit makes release-please propose a minor release of@aignostics/sdk.Testing
platform-sdk.test.tsgets a table-driven block that runs each of the five methods twice against the MSW mocks and inspects the outgoing request URL:{ shareToken: 'share-token-value' },share_tokenequals that valueshare_tokenparameter at allThe five positive cases fail against the source on
main. Lint, typecheck and the full SDK and CLI unit suites pass locally.Spec
docs/specs/SPEC-SDK.md(SPEC-SDK) gets the matching changes:shareTokenoptiongetRunItem,downloadArtifactanddownloadArtifactStream, which the spec did not list beforeThe rest of the spec (grants, share-token management, retries on downloads, line numbers in 4.3) is still behind the code and stays out of this PR.
This branch now carries a Ketryx item, so it gets new commits only, no force-pushes.
🤖 Generated with Claude Code