Skip to content

feat(api)!: a cloud session request names any agent (agent is a string) - #314

Merged
nathanfallet merged 1 commit into
mainfrom
feat/cloud-agent-string
Nov 16, 2026
Merged

nathanfallet merged 1 commit into
mainfrom
feat/cloud-agent-string

Conversation

@nathanfallet

Copy link
Copy Markdown
Member

Why

CreateCloudSessionRequest.agent was a CloudAgentKind. An enum value cannot carry a name this version doesn't know, so a client could only send the agents core names.

  • The server's generated document types agent as a string, and the server's enumerations are open.
  • The CLI's move to the typed client (ostrom-cli#243) mapped ostrom grok, ostrom hermes and ostrom pi onto the enum and crashed. Before that move, the CLI sent the name and the server decided.

What

  • Breaking: CreateCloudSessionRequest.agent is now a String. Callers pass CloudAgentKind.X.value or any agent name.
  • CloudAgentKind stays as the values this version names. Its KDoc now says the list is open. It still decodes an unknown value as UNKNOWN.
  • CloudSession.agent was already a String.
  • New test: anAgentThisVersionDoesNotNameIsSentAsIs sends grok as is.

Consumers that build the request: the CLI (#243, pinned to this PR's merge) and the app (RemoteCloudSessionRepository, now agent = kind.value). Both move when they next bump core.

How tested

:api/:client detekt, jvmTest and koverVerify pass, with the contract check reading @ostrom-hq/openapi 0.1.3581 as required.

🤖 Generated with Claude Code

CreateCloudSessionRequest.agent was a CloudAgentKind, an enum that cannot
carry a value this version does not name. The server's document types it as
a string and its enumerations are open, so the CLI crashed on `ostrom grok`,
`ostrom hermes` and `ostrom pi` (no enum entry) where it used to send the
name and let the server decide. The field is now a String; CloudAgentKind
stays as the values this version knows (pass `.value`), and still reads an
unknown value as UNKNOWN.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: NathanFallet <contact@nathanfallet.me>
@nathanfallet
nathanfallet requested a review from a team as a code owner November 16, 2026 03:42
@nathanfallet

Copy link
Copy Markdown
Member Author

Code review (medium) triage:
1 and 5. No compile-time check, and .value everywhere. This is intended. The server's agent list is open, and the CLI must send whatever agent the user names. A typo gets the server's 4xx, which is the same behaviour as before the typed client. Callers that pick from known values pass CloudAgentKind.X.value. I didn't add an overload, because a data class's secondary constructor would have to repeat the eighteen optional parameters.
2. Breaking change. Acknowledged, and marked ! in the title. The repo keeps no API dump, so there is no apiCheck. The two consumers, the CLI (#243) and the app, adapt when they bump.
3. Test scope. Decoding an unknown CloudAgentKind is already covered by ResourceClientsTest ("aider" decodes as UNKNOWN). CloudSession.agent was a string already.
4. UNKNOWN.value is "". Sending it gets a 4xx from the server, and the KDoc says it is never sent.

@nathanfallet
nathanfallet merged commit 332648f into main Nov 16, 2026
8 of 10 checks passed
@nathanfallet
nathanfallet deleted the feat/cloud-agent-string branch November 16, 2026 05:25
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.

1 participant