Repository navigation
feat: support Platform API 1.190 features (agents, studio stars, Nextflow versions) - #690
cristianrcv wants to merge 5 commits into
Conversation
Platform API 1.175.0 added workspace agents (CRUD, enable/disable), and 1.190.0 replaced their systemPrompt/templateId fields with agentInstructions/agentInstructionsTemplateId, but tw had no command for any of them. tw agents list/view/add/update/delete/enable/disable cover these operations against the 1.190 agent model. Agents are workspace-scoped and gated per organization by the agent configuration feature, so every command takes a required workspace. The update API replaces the whole agent, so update fetches the agent and resends unchanged fields. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
--nextflow-version must name a version Platform knows, but tw had no way to list them. Platform API 1.190.0 added GET /platform/versions, which returns the configured Nextflow versions and the default one, as the launch form uses them. It lives under 'tw info' because it describes the Platform deployment rather than a workspace resource: 'tw launch' takes a positional pipeline name a subcommand would shadow, and 'tw pipelines versions' already means pipeline versions. The --nextflow-version help now points at it. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Platform API 1.190.0 added studio starring (POST/DELETE
/studios/{sessionId}/star) and the starred flag on studio describe,
but tw never wired them up. This adds 'tw studios star|unstar' so CLI
users can do what the UI already does. 'studios view' now shows the
starred flag so the result of star/unstar is visible.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
An Agents section, plus 'Other additions' entries for 'tw info versions' and 'tw studios star|unstar'. 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>
The agents, 'info versions' and 'studios star|unstar' commands and their responses are new tw classes, so the native image needs their reflection entries for picocli and Jackson. Entries copied from the full catch-up branch, where a test run under the GraalVM tracing agent captured them. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
educalleja
left a comment
There was a problem hiding this comment.
Usage of the new commands
This PR adds a new tw agents command group, tw info versions, and tw studios star|unstar.
1. tw agents (new)
"Manage AI agents." Agents must be enabled for the workspace's organization. Every subcommand requires -w, --workspace.
Commands that act on an existing agent (view, update, delete, enable and disable) identify it by -i, --id or -n, --name, and exactly one is required. An unknown name fails with "Unknown agent '<name>' at <workspace> workspace".
tw agents list
Lists agents.
| Option | Description |
|---|---|
-f, --filter |
Filter agents by name |
| Pagination options | Standard --page / --offset / --max |
- The output is a table with ID, Name, Description, Status and Updated.
tw agents view
Shows an agent: ID, Name, Description, Status, Created and Updated, followed by its full instructions.
tw agents add
Adds an agent.
| Option | Description |
|---|---|
-n, --name |
Agent name (required). Must be unique per workspace. Names can use letters, numbers, hyphens and underscores |
-d, --description |
Agent description (max 120 characters) |
--instructions |
Agent instructions: the role, behavior, and constraints for the agent |
--instructions-file |
File containing the agent instructions. - reads from stdin |
- You must give exactly one of
--instructionsor--instructions-file.
tw agents add -w my-org/my-workspace -n triage --instructions-file triage.mdtw agents update
Updates an agent. Fields you don't pass keep their current value.
| Option | Description |
|---|---|
--new-name |
New agent name |
-d, --description |
New description (max 120 characters) |
--instructions / --instructions-file |
New instructions, inline or from a file (- reads from stdin). Use one or the other |
tw agents delete
Deletes an agent.
tw agents enable / tw agents disable
Enables an inactive agent, or disables an active one. A disabled agent can't be launched.
tw agents launch and tw agents runs aren't in this PR. They come in the API 1.200 PR (#691).
2. tw info versions (new)
Lists the Nextflow versions you can launch with. It takes no options.
- The output is a table with Version and Default (
yes/no). - The help for
--nextflow-version(used bytw launch,tw pipelines add|updateand others) now points to this command.
3. tw studios star / tw studios unstar (new)
Adds a studio to your starred studios, or removes it.
| Option | Description |
|---|---|
-i, --id / -n, --name |
The studio, by session ID or by name. You must give exactly one |
-w, --workspace |
Workspace |
tw studios viewnow shows Starred.
USAGE.md
- A new "Agents" section, with the
addexample above. tw info versionsis mentioned next to the--nextflow-versionbullet.- The studios bullet changes to
tw studios star|unstar|extend|rename-checkpoint.
🤖 Generated with Claude Code
|
Adding @vpatel85 since this PR includes commands for agents |
|
Superseded by #699 (API 1.190). The agents commands 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. |
Summary
Exposes features introduced in Platform API 1.190.0: agents, studio stars, and the list of launchable Nextflow versions.
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 launchis not here: it readsLaunchAgentResponse.agentRunId, which first appears in API 1.200 (1.190 servers sendagentId), so it is in the next PR.tw info versions: listsGET /platform/versionsonly. The version catalog and Fusion versions arrive with API 1.230.Verification
./gradlew test: 924 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