Repository navigation
feat(api)!: a cloud session request names any agent (agent is a string) - #314
Conversation
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>
|
Code review (medium) triage: |
Why
CreateCloudSessionRequest.agentwas aCloudAgentKind. An enum value cannot carry a name this version doesn't know, so a client could only send the agents core names.agentas a string, and the server's enumerations are open.ostrom grok,ostrom hermesandostrom pionto the enum and crashed. Before that move, the CLI sent the name and the server decided.What
CreateCloudSessionRequest.agentis now aString. Callers passCloudAgentKind.X.valueor any agent name.CloudAgentKindstays as the values this version names. Its KDoc now says the list is open. It still decodes an unknown value asUNKNOWN.CloudSession.agentwas already aString.anAgentThisVersionDoesNotNameIsSentAsIssendsgrokas is.Consumers that build the request: the CLI (#243, pinned to this PR's merge) and the app (
RemoteCloudSessionRepository, nowagent = kind.value). Both move when they next bump core.How tested
:api/:clientdetekt, jvmTest and koverVerify pass, with the contract check reading@ostrom-hq/openapi0.1.3581 as required.🤖 Generated with Claude Code