Skip to content

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

Merged
opencode-agent[bot] merged 2 commits into
v2from
httpapi-opaque-payload
Jul 19, 2026
Merged

feat(client): support opaque payload schemas#37773
opencode-agent[bot] merged 2 commits into
v2from
httpapi-opaque-payload

Conversation

@opencode-agent

Copy link
Copy Markdown
Contributor

Summary

  • keep struct payloads flattened while projecting every non-struct payload as a required payload input field
  • send opaque payload values directly in Promise and Effect request bodies, with a targeted collision error
  • cover union, array, primitive, and index-signature record classification across generated surfaces and the strict consumer fixture

Design

  • opaque field name: payload
  • opaque classification: any decoded payload that is not an object with zero index signatures
  • mcp.add can now be unwrapped in a follow-up; this PR intentionally leaves its protocol unchanged

Validation

  • bun test --timeout 5000 --only-failures (packages/httpapi-codegen)
  • bun typecheck (packages/httpapi-codegen)
  • bun run generate (packages/client), with no diff under packages/client
  • bun test --timeout 5000 (packages/client)
  • bun typecheck (packages/client, packages/sdk-next, packages/cli, packages/plugin, packages/tui)

Requested by: @rekram1-node (Aiden Cline via Slack)

@opencode-agent
opencode-agent Bot merged commit bef6cfb into v2 Jul 19, 2026
8 checks passed
@opencode-agent
opencode-agent Bot deleted the httpapi-opaque-payload branch July 19, 2026 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant