Skip to content

feat: support Platform API 1.145 features (roles, folder mounts, linked datasets) - #697

Merged
cristianrcv merged 7 commits into
masterfrom
feat/NOTASK-tw-api-1.145
Oct 7, 2026
Merged

cristianrcv merged 7 commits into
masterfrom
feat/NOTASK-tw-api-1.145

Conversation

@cristianrcv

@cristianrcv cristianrcv commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Exposes features introduced in Platform API 1.145.0: custom roles, data-link folder mounts for studios (mountDataV2), and linked (URL) datasets.

This is one PR in a stack that catches tw up with Platform API 1.230.0: one PR per API version that introduced the features, then one PR per topic for agents and actions, which are grouped across versions so they're easier to review.

Changes

  • feat(studios): mount data-link folders (8a4780b)
  • fix(studios): mount data links stored with a trailing slash (2f1e5f4)
  • feat(datasets): link datasets from a URL (6de652d)
  • feat(members): add roles command (6bb2f3b)
  • feat(roles): add custom role commands (457b5d8)
  • docs: document the commands and options added for API 1.145 (baef0f1)
  • build(native): register reflection metadata for the API 1.145 commands (7074dd0)

Notes for review

  • Changes to existing behaviour:
    • studios start|update|add-as-new --mount-data* now sets mountDataV2, which takes precedence in Platform. Before, a mount change was silently ignored for studios that already had v2 mounts.
    • Data links stored with a trailing slash (created before 2025-02) are matched again.
  • datasets add: FILENAME is optional when --url is given.
  • Bucket actions (also API 1.145) are in the actions PR at the top of the stack.

Verification

  • ./gradlew test: 857 tests, 0 failures. Every new command and option has MockServer tests that assert the request (method, path, query, body) and the output.
  • CI runs the full suite against the native binary on Linux, macOS and Windows.

🤖 Generated with Claude Code

@cristianrcv
cristianrcv added this pull request to stack #704 October 5, 2026 16:12
@cristianrcv
cristianrcv requested review from a team and t0randr October 5, 2026 16:18
@cristianrcv
cristianrcv removed this pull request from stack #704 October 5, 2026 16:20
@cristianrcv
cristianrcv added this pull request to stack #705 October 5, 2026 16:20
@cristianrcv
cristianrcv force-pushed the feat/NOTASK-api-1.113-catch-up branch from 349ef6b to 7fc52bb Compare October 7, 2026 09:39
@cristianrcv
cristianrcv force-pushed the feat/NOTASK-tw-api-1.145 branch from 7074dd0 to 1ae323f Compare October 7, 2026 09:39
@cristianrcv
cristianrcv removed this pull request from stack #705 October 7, 2026 13:26
@cristianrcv
cristianrcv changed the base branch from feat/NOTASK-api-1.113-catch-up to master October 7, 2026 13:31
cristianrcv and others added 5 commits October 7, 2026 16:47
DataStudioConfiguration.mountDataV2 (platform API 1.114.0, platform
commit ac72147bb3; first in the published spec at 1.145.0) mounts a data
link with an optional sub-path, and the platform gives it precedence over
the deprecated mountData. The UI now sends only mountDataV2, and studio
descriptions return both fields, so 'tw studios start|update|add-as-new'
with a mount option sent a new mountData while the fetched mountDataV2
still held the old mounts: the platform kept the old mounts and silently
ignored the change.

tw now always sends mountDataV2 (plus mountData for older platforms)
when a mount option is given. '--mount-data-uris' also accepts a URI
inside a data link: tw resolves the closest parent data link and mounts
the remainder as the path, which is what the UI's folder picker does.
'studios view' prints the mounted path.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Data links created before Platform stripped trailing slashes from resource refs (2025-02) can still
be stored as 's3://bucket/'. The mount-data URI lookup strips the slash from the user's URI and
then compared it exactly, so those links could no longer be mounted. Normalise both sides.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
API 1.145.0 added linked datasets: a dataset created with
sourceType=LINKED whose versions point to a public HTTP(S) CSV/TSV URL
(POST /datasets/{id}/link) instead of an uploaded file. tw could only
upload files, so:

- 'tw datasets add --url <url>' validates the URL first
  (POST /datasets/validate-url, as the UI does, so a bad URL does not
  leave an empty dataset behind), creates a LINKED dataset and links
  the URL as its first version.
- 'tw datasets update --url <url>' links a new version.
- 'datasets view ... versions' shows the source URL of linked versions,
  which have no file name (the table would otherwise hit a null cell).

preview-url and the version preview back UI widgets and add no CLI
capability.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
listUserRolesInOrganization (API 1.145, /orgs/{orgId}/users/{userId}/roles)
had no tw command.

Add 'tw members roles' to show a member's role in each workspace and
whether it was granted directly or through a team.

deleteWorkspaceUser is not added: it removes the same participant as
'tw participants delete' (both call MemberDeleteService.deleteParticipant
in the backend), only looked up by user ID instead of participant ID.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Platform API 1.145 added custom workspace roles (/roles), but tw could
only assign them by name through 'participants update --role'; there
was no way to see which roles exist or to create them.

Add 'tw roles' with list, view, add, update, delete and permissions.
The update endpoint replaces name, description and permissions as a
whole, so 'roles update' reads the current role and only overrides the
fields that were passed.

The /roles/permissions name filter is typed as int64 in the API spec,
so 'roles permissions' does not expose it.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
cristianrcv and others added 2 commits October 7, 2026 16:48
A custom roles section, 'tw members roles' next to organization quotas, and summary bullets for studio folder mounts and linked datasets.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Entries for the roles and members roles commands and responses, taken from a full test run under the GraalVM tracing agent. Response classes register allDeclaredFields, since Jackson serializes every field for -o json.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@cristianrcv
cristianrcv force-pushed the feat/NOTASK-tw-api-1.145 branch from 1ae323f to 24cb0df Compare October 7, 2026 14:50
@cristianrcv
cristianrcv merged commit 431d570 into master Oct 7, 2026
10 checks passed
@cristianrcv
cristianrcv deleted the feat/NOTASK-tw-api-1.145 branch October 8, 2026 09:09
@cristianrcv
cristianrcv restored the feat/NOTASK-tw-api-1.145 branch October 8, 2026 09:14
@cristianrcv
cristianrcv deleted the feat/NOTASK-tw-api-1.145 branch October 8, 2026 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants