feat(client): support opaque payload schemas (#37773)

Co-authored-by: Aiden Cline <rekram1-node@users.noreply.github.com>
This commit is contained in:
opencode-agent[bot] 2026-07-19 16:08:26 +00:00 committed by GitHub
commit bef6cfbffe
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 255 additions and 32 deletions

View file

@ -27,6 +27,18 @@ export const Api = HttpApi.make("fixture")
params: { sessionID: Schema.String },
success: HttpApiSchema.NoContent,
}),
)
.add(
HttpApiEndpoint.post("configure", "/session/:sessionID/configure", {
params: { sessionID: Schema.String },
query: { dryRun: Schema.optional(Schema.Boolean) },
headers: { traceID: Schema.String },
payload: Schema.Union([
Schema.Struct({ type: Schema.Literal("local"), command: Schema.Array(Schema.String) }),
Schema.Struct({ type: Schema.Literal("remote"), url: Schema.String }),
]),
success: Schema.String,
}),
),
)
.add(