feat(subscriptions): add --inline-body flag (cueapi #791 / Item 1 parity)#54
Merged
Merged
Conversation
…ity)
Server-side Item 1 (hosted PR #791) added `subscriptions.inline_body`
opt-in body embedding for pull subscriptions — when True, the source
message body is embedded in the event payload as `payload.body`,
eliminating the extra GET /v1/messages/{id} round-trip on the consumer
side.
This CLI port wires the kwarg through `subscriptions create` via a new
`--inline-body` click flag (is_flag, defaults False). When omitted,
the field is NOT sent on the wire — preserves pre-#791 wire format
for the common no-embed case. When set, sends `inline_body: true`
in the JSON body.
Companion to cueapi-python PR #42 (SDK `inline_body` kwarg on
`AgentsResource.subscriptions_create`). Same semantic, same default-
omit behavior. Mirrors the existing pattern in cueapi-cli where
default-omit avoids payload noise for unopted callers.
Tests (3 new):
- test_subscriptions_create_inline_body_flag_default_omits_field — no
flag = no field on wire
- test_subscriptions_create_inline_body_flag_opts_in — --inline-body
sends true
- test_subscriptions_create_help_lists_inline_body — --help mentions
the flag + the 32KB cap
Backlog row: cmp1v3azw.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Wires server-side
subscriptions.inline_bodyopt-in (hosted PR #791, Item 1) through the CLI via a new--inline-bodyflag onsubscriptions create.When set, the server embeds the source message body in the event payload as
payload.body— eliminates the extraGET /v1/messages/{id}round-trip on the consumer side. Bodies > 32KB are NOT embedded; payload instead carriespayload.body_omitted = "size_too_large"+payload.body_size_bytes = Nso consumers can fall back to the fetch.Wire shape
inline_bodyfieldFalseapplies--inline-bodytrueDefault-omit matches the existing pattern in cueapi-cli where flags default to no-op when unset, keeping the wire format identical to pre-#791 callers.
Companion PR
cueapi-python #42 — SDK kwarg with the same semantic. Merged 2026-05-12T00:20Z.
Tests (3 new)
test_subscriptions_create_inline_body_flag_default_omits_field— default case, no payload noisetest_subscriptions_create_inline_body_flag_opts_in—--inline-bodysendstruetest_subscriptions_create_help_lists_inline_body—--helpmentions the flag + the 32KB capFull file: 215/215 passing.
Parity-impact checklist
cmp1v39ihcovers body-verify Phase 2 first; inline_body for MCP can ride on top)Backlog row:
cmp1v3azw.🤖 Generated with Claude Code