Repository navigation
feat: support Platform API 1.200 features (agent launch and runs, lineage, studio logs) - #691
Closed
cristianrcv wants to merge 7 commits into
Closed
cristianrcv wants to merge 7 commits into
cristianrcv wants to merge 7 commits into
Conversation
Platform API 1.190.0 added agent launch, but tw had no command for it. tw agents launch starts a background run from a configured agent (--id or --name), from ad hoc instructions, or both. Launching a configured agent sends its stored instructions, like the web UI does. The command reads LaunchAgentResponse.agentRunId, which API 1.200.0 introduced: 1.190 servers send agentId instead, so the run id would print as null against them. That is why launch ships with 1.200 rather than with the rest of the agents command. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Platform API 1.200.0 added agent run listing and run status, but tw had no command for them. tw agents runs list pages through a workspace's runs, newest first, with the API's keyword filter, and tw agents runs view shows a run's status, thread and session. The filter help lists only the keywords API 1.200 accepts; the service-account keywords came later. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Platform API 1.200.0 added read-only lineage endpoints (resolve, search, record, summary, upstream, downstream) that tw did not expose. tw lineage resolve turns a run (session ID) or a file path into its LID; view shows a record, or its index summary with --summary; search runs the cross-workspace query DSL with token paging; upstream and downstream walk one data-flow hop, optionally filtered by record type. LIDs are double-encoded in the path, as the web UI does, because the API decodes them twice to survive proxy path normalization. API 1.200 resolves a run by session ID alone. The run name parameter, the pipeline search qualifiers and the record's pipeline name came in later API versions, so they are not offered here. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Platform API 1.200.0 added the studio session log endpoint, but tw had no way to read it. tw studios logs prints the process log of the latest session of a studio, one page at a time: --next takes the cursor printed at the end of the previous page and --max-length caps the characters returned. SDK 1.200.0 types LogPage.entries as Object (the spec declares an Iterator) while Platform sends a JSON array, so the log entries are read as a List, as tw runs view log does. The test compares against the platform line separator, since println writes CRLF on Windows. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ligent Compute Platform API 1.200.0 added maxCpusPerUser and maxSpotAttempts to the Seqera scheduler configuration, but tw could not set them. tw compute-envs add aws-cloud, azure-cloud and google-cloud gain --max-cpus-per-user, which caps the vCPUs one user may hold across their runs, and --max-spot-attempts, which bounds the spot attempts per task before giving up on spot capacity (falling back to on-demand with SPOT_FIRST). Both join the Intelligent Compute option group of each platform. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The Agents section gains launch and runs list|view, a Lineage section follows it, and the studios entry in 'Other additions' gains logs. Examples use bash code blocks, as markdownlint MD014 rejects $-prompted blocks that show no output. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Native images only see the picocli option fields and the Jackson response fields that reflect-config.json lists. These entries, for agents launch and runs, lineage and studios logs, come from the tracing agent run of the full suite on the 1.230 branch. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
@t0randr tagging you in this PR since it contains changes for lineage and studios. |
|
Tagging @vpatel85 since this PR seems to have tw-cli changes for agents which is owned by Growth and AI |
Contributor
Author
|
Superseded by #700 (API 1.200). Agent launch and agent runs from this PR moved to #702 (agents). The stack is now: #685 (1.101) → #686 (1.113) → #697 (1.145) → #698 (1.167) → #699 (1.190) → #700 (1.200) → #701 (1.230) → #702 (agents) → #703 (actions). The code at the top of the stack is identical to the old one; only the grouping changed. Agents and actions changes are grouped into one PR each instead of being spread across API versions. New branches were used instead of force-pushing. |
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.
Summary
Exposes features introduced in Platform API 1.200.0: agent launch and agent runs, lineage, studio logs, and per-user CPU / spot-attempt limits for Intelligent Compute.
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. Each PR adds the items whose API elements all exist in that version.
tower-java-sdk1.200.0, which already contains every API element used here. The last PR in the stack bumps it to 1.230.0.Changes
Notes for review
agents launch: it's here rather than in the 1.190 PR because it readsLaunchAgentResponse.agentRunId, which first appears in 1.200 (1.190 servers sendagentId).lineage resolve: takes--session-idor--file-path.--run-name(API 1.211) comes with the 1.230 PR. API 1.211+ requiresrunNamewithsessionId, so until that PR lands, resolving by session gets a 400 from 1.211+ servers (prod runs 1.226).LogPage.entries: SDK 1.200.0 types it asObject, sostudios logsreads it as a list, the same wayruns view logdoes.Verification
./gradlew test: 950 tests, 0 failures. Every new command and option has MockServer tests that assert the request (method, path, query, body) and the output.tower-sdk-gencodehistory) to confirm where it first appears.🤖 Generated with Claude Code