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
co-authored by Aiden Cline
parent fe9a936867
commit bef6cfbffe
6 changed files with 255 additions and 32 deletions
+12
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(