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

@ -14,7 +14,9 @@ The package is private while its API is explored. Its tests are the executable s
- Keep the Promise surface domain-oriented rather than Hey API compatible: methods return unwrapped values and reject with tagged declared errors or `ClientError`.
- Return Promise streams as lazy `AsyncIterable` values and Effect streams as `Stream` values. Neither runtime reconnects automatically.
- Flatten path, query, header, and payload fields into one input object.
- Flatten path, query, header, and struct payload fields into one input object.
- Represent every non-struct payload (including unions, arrays, primitives, and records with index signatures) as one required `payload` input field and send that value as the request body directly.
- Reject an opaque `payload` field when its name collides with a path, query, or header field.
- Reject duplicate field names across input channels.
- Emit no method argument for zero fields, an optional object when every field is optional, and a required object when any field is required.
- Unwrap exact `{ data: A }` success envelopes.